diff --git a/.changeset/afraid-cups-scream.md b/.changeset/afraid-cups-scream.md deleted file mode 100644 index 37226b86555..00000000000 --- a/.changeset/afraid-cups-scream.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"chainlink": patch ---- - -#added zkSync L1 GasPrice calculation diff --git a/.changeset/angry-wolves-fix.md b/.changeset/angry-wolves-fix.md new file mode 100644 index 00000000000..51fe7d7be88 --- /dev/null +++ b/.changeset/angry-wolves-fix.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +add chaos and reorg tests #added diff --git a/.changeset/blue-phones-rest.md b/.changeset/blue-phones-rest.md deleted file mode 100644 index 4a427c78351..00000000000 --- a/.changeset/blue-phones-rest.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"chainlink": patch ---- - -#internal Use audited version of OCR2Base.sol in OCR3Capability.sol diff --git a/.changeset/bright-crabs-live.md b/.changeset/bright-crabs-live.md new file mode 100644 index 00000000000..7e21431ee24 --- /dev/null +++ b/.changeset/bright-crabs-live.md @@ -0,0 +1,7 @@ +--- +"chainlink": minor +--- + +Remove ocr2vrf + +#removed all ocr2vrf and dkg OCR2 plugin materials. \ No newline at end of file diff --git a/.changeset/chilled-panthers-joke.md b/.changeset/chilled-panthers-joke.md deleted file mode 100644 index 77dc4817714..00000000000 --- a/.changeset/chilled-panthers-joke.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"chainlink": patch ---- - -#internal bump `chainlink-common` version to commit 6d926be950a6f6ca289a84edad938d4eef2ee337. diff --git a/.changeset/cuddly-toys-warn.md b/.changeset/cuddly-toys-warn.md new file mode 100644 index 00000000000..8e15ba65014 --- /dev/null +++ b/.changeset/cuddly-toys-warn.md @@ -0,0 +1,14 @@ +--- +"chainlink": patch +--- + +Add "VerboseLogging" option to mercury + +Off by default, can be enabled like so: + +```toml +[Mercury] +VerboseLogging = true +``` + +#updated diff --git a/.changeset/curly-crabs-doubt.md b/.changeset/curly-crabs-doubt.md deleted file mode 100644 index 0408383bd03..00000000000 --- a/.changeset/curly-crabs-doubt.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"chainlink": patch ---- - -#internal diff --git a/.changeset/curly-zebras-agree.md b/.changeset/curly-zebras-agree.md new file mode 100644 index 00000000000..a57b379d2a3 --- /dev/null +++ b/.changeset/curly-zebras-agree.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#added support for EIP-1559 transactions for Scroll diff --git a/.changeset/dull-seals-jog.md b/.changeset/dull-seals-jog.md new file mode 100644 index 00000000000..12dbb06d86d --- /dev/null +++ b/.changeset/dull-seals-jog.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +remove tautological err check within evm txm. #internal diff --git a/.changeset/eighty-points-bathe.md b/.changeset/eighty-points-bathe.md new file mode 100644 index 00000000000..914975c9610 --- /dev/null +++ b/.changeset/eighty-points-bathe.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#db_update add an empty BAL spec in migrations diff --git a/.changeset/eleven-buckets-search.md b/.changeset/eleven-buckets-search.md deleted file mode 100644 index 6c68fbcfdcc..00000000000 --- a/.changeset/eleven-buckets-search.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"chainlink": minor ---- - -#internal Add Log Poller support to Chain Reader through setting them in config. All filters should be part of the contract wide filter unless an event needs specific polling configuration, which can be set on a per event basis.. diff --git a/.changeset/fair-buttons-judge.md b/.changeset/fair-buttons-judge.md deleted file mode 100644 index 7aacd89787a..00000000000 --- a/.changeset/fair-buttons-judge.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"chainlink": patch ---- - -#internal Bumped `chainlink-common` package version to commit `1fb0b48758af25d689b6957ebfb76598c9fb27ea`. diff --git a/.changeset/fluffy-ghosts-sneeze.md b/.changeset/fluffy-ghosts-sneeze.md new file mode 100644 index 00000000000..48503995c23 --- /dev/null +++ b/.changeset/fluffy-ghosts-sneeze.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +Dequeue minimum guaranteed upkeeps as a priority #changed diff --git a/.changeset/funny-snails-shake.md b/.changeset/funny-snails-shake.md deleted file mode 100644 index dad6c90872b..00000000000 --- a/.changeset/funny-snails-shake.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"chainlink": minor ---- - -Added API for products to query a transaction's status in the TXM #internal diff --git a/.changeset/fuzzy-frogs-live.md b/.changeset/fuzzy-frogs-live.md deleted file mode 100644 index 58a9ffd2288..00000000000 --- a/.changeset/fuzzy-frogs-live.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"chainlink": minor ---- - -#added EVM implementation of GetFeeComponents function for ChainWriter diff --git a/.changeset/gold-candles-flow.md b/.changeset/gold-candles-flow.md new file mode 100644 index 00000000000..277a96469ef --- /dev/null +++ b/.changeset/gold-candles-flow.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#internal Bumped dependencies for `chainlink-common`, `chainlink-solana`, and `chainlink-starknet`. diff --git a/.changeset/good-paws-switch.md b/.changeset/good-paws-switch.md new file mode 100644 index 00000000000..76758a2c86e --- /dev/null +++ b/.changeset/good-paws-switch.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#internal add `NewChainWriter` method onto the dummy relayer. diff --git a/.changeset/happy-fans-enjoy.md b/.changeset/happy-fans-enjoy.md deleted file mode 100644 index a9e878719d5..00000000000 --- a/.changeset/happy-fans-enjoy.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"chainlink": patch ---- - -#db_update ccip capability specs migration diff --git a/.changeset/healthy-lamps-argue.md b/.changeset/healthy-lamps-argue.md new file mode 100644 index 00000000000..33357ddd6ce --- /dev/null +++ b/.changeset/healthy-lamps-argue.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +Initialize registry syncer' contract reader lazily #keystone #internal diff --git a/.changeset/healthy-plants-guess.md b/.changeset/healthy-plants-guess.md deleted file mode 100644 index 6ec74b5a040..00000000000 --- a/.changeset/healthy-plants-guess.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"chainlink": patch ---- - -#internal removed HistoryDepth to FinalityDepth validation diff --git a/.changeset/hungry-pandas-suffer.md b/.changeset/hungry-pandas-suffer.md new file mode 100644 index 00000000000..f8f151a7ce5 --- /dev/null +++ b/.changeset/hungry-pandas-suffer.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +Make send signatures configurable when Transmit in Contract Transmitter #internal diff --git a/.changeset/lemon-buttons-raise.md b/.changeset/lemon-buttons-raise.md deleted file mode 100644 index 0408383bd03..00000000000 --- a/.changeset/lemon-buttons-raise.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"chainlink": patch ---- - -#internal diff --git a/.changeset/ninety-zebras-hammer.md b/.changeset/many-kids-shave.md similarity index 57% rename from .changeset/ninety-zebras-hammer.md rename to .changeset/many-kids-shave.md index 0408383bd03..5c3c83bad99 100644 --- a/.changeset/ninety-zebras-hammer.md +++ b/.changeset/many-kids-shave.md @@ -2,4 +2,4 @@ "chainlink": patch --- -#internal +Go: 1.21.7 => 1.22.5 diff --git a/.changeset/metal-glasses-count.md b/.changeset/metal-glasses-count.md deleted file mode 100644 index 0408383bd03..00000000000 --- a/.changeset/metal-glasses-count.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"chainlink": patch ---- - -#internal diff --git a/.changeset/mighty-nails-argue.md b/.changeset/mighty-nails-argue.md new file mode 100644 index 00000000000..9456f449562 --- /dev/null +++ b/.changeset/mighty-nails-argue.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +#internal Change CR GetLatestValue to accept confidenceLevels that map to finality for contract read and event querying. Also remove Pending from BoundContract which used to map to finality for log events. diff --git a/.changeset/neat-peas-reflect.md b/.changeset/neat-peas-reflect.md new file mode 100644 index 00000000000..2728e74668b --- /dev/null +++ b/.changeset/neat-peas-reflect.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#internal Updated wrappers for improved L1 -> L2 fee calculation for Functions diff --git a/.changeset/neat-rockets-love.md b/.changeset/neat-rockets-love.md new file mode 100644 index 00000000000..29fdcebe6e5 --- /dev/null +++ b/.changeset/neat-rockets-love.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +#internal Added small check to allow for nil TxMeta in CW SubmitTransaction diff --git a/.changeset/pink-ants-reply.md b/.changeset/pink-ants-reply.md deleted file mode 100644 index fab4ef31f7f..00000000000 --- a/.changeset/pink-ants-reply.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"chainlink": minor ---- - -#internal remove shared secret from transmission schedule diff --git a/.changeset/pink-papayas-swim.md b/.changeset/pink-papayas-swim.md new file mode 100644 index 00000000000..1e6a2cacd06 --- /dev/null +++ b/.changeset/pink-papayas-swim.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +#internal Add BatchGetLatestValues to ChainReader diff --git a/.changeset/pretty-dancers-pull.md b/.changeset/pretty-dancers-pull.md deleted file mode 100644 index af8ec9db0c8..00000000000 --- a/.changeset/pretty-dancers-pull.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"chainlink": patch ---- - -#changed Expand EVM implementation compatibility pipeline diff --git a/.changeset/proud-zoos-sort.md b/.changeset/proud-zoos-sort.md new file mode 100644 index 00000000000..571beae821d --- /dev/null +++ b/.changeset/proud-zoos-sort.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +VRFV2Plus coordinator and wrapper split contracts between L1 and L2 chains #updated diff --git a/.changeset/rare-carpets-cry.md b/.changeset/rare-carpets-cry.md deleted file mode 100644 index f096d31885c..00000000000 --- a/.changeset/rare-carpets-cry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"chainlink": minor ---- - -#internal capability dispatcher threading and context usage diff --git a/.changeset/metal-cars-report.md b/.changeset/red-meals-mix.md similarity index 100% rename from .changeset/metal-cars-report.md rename to .changeset/red-meals-mix.md diff --git a/.changeset/serious-apples-dance.md b/.changeset/serious-apples-dance.md new file mode 100644 index 00000000000..37f8be7e6ed --- /dev/null +++ b/.changeset/serious-apples-dance.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#internal Mercury v3: Include telemetry if bid/ask violation is detected diff --git a/.changeset/shaggy-ears-share.md b/.changeset/shaggy-ears-share.md deleted file mode 100644 index 5946faf03cf..00000000000 --- a/.changeset/shaggy-ears-share.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"chainlink": minor ---- - -#internal Add RegistrySyncer diff --git a/.changeset/shiny-ligers-compete.md b/.changeset/shiny-ligers-compete.md new file mode 100644 index 00000000000..d621b94183c --- /dev/null +++ b/.changeset/shiny-ligers-compete.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#internal logging of non determinism in target server diff --git a/.changeset/shiny-poems-juggle.md b/.changeset/shiny-poems-juggle.md deleted file mode 100644 index 32fc2069ee7..00000000000 --- a/.changeset/shiny-poems-juggle.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"chainlink": minor ---- - -#changed Refactored the BlockHistoryEstimator check to prevent excessively bumping transactions. Check no longer waits for CheckInclusionBlocks to pass before assessing an attempt. -#bugfix Fixed a bug that would use the oldest blocks in the cached history instead of the latest to perform gas estimations. diff --git a/.changeset/shy-deers-hope.md b/.changeset/shy-deers-hope.md deleted file mode 100644 index 0408383bd03..00000000000 --- a/.changeset/shy-deers-hope.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"chainlink": patch ---- - -#internal diff --git a/.changeset/silent-cups-flow.md b/.changeset/silent-cups-flow.md new file mode 100644 index 00000000000..564e02223fa --- /dev/null +++ b/.changeset/silent-cups-flow.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +#internal refactor goose migrations to use provider diff --git a/.changeset/silver-peas-happen.md b/.changeset/silver-peas-happen.md new file mode 100644 index 00000000000..2e7d062e265 --- /dev/null +++ b/.changeset/silver-peas-happen.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +#internal cleanup heavyweight test databases automatically diff --git a/.changeset/slow-trees-pay.md b/.changeset/slow-trees-pay.md new file mode 100644 index 00000000000..73dca08308f --- /dev/null +++ b/.changeset/slow-trees-pay.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +Protocol-level support for preventing bid/ask variant violations in mercury #added diff --git a/.changeset/soft-maps-ring.md b/.changeset/soft-maps-ring.md new file mode 100644 index 00000000000..1beed3685b1 --- /dev/null +++ b/.changeset/soft-maps-ring.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#changed Rename the `InBackupHealthReport` to `StartUpHealthReport` and enable it for DB migrations as well. This will enable health report to be available during long start-up tasks (db backups and migrations). \ No newline at end of file diff --git a/.changeset/sour-guests-exercise.md b/.changeset/sour-guests-exercise.md new file mode 100644 index 00000000000..6138a786d95 --- /dev/null +++ b/.changeset/sour-guests-exercise.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#internal additional logging to remote target capability diff --git a/.changeset/sour-pigs-develop.md b/.changeset/sour-pigs-develop.md deleted file mode 100644 index 5737b20601f..00000000000 --- a/.changeset/sour-pigs-develop.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"chainlink": minor ---- - -#internal remote target wait until initiated threads exit on close diff --git a/.changeset/stupid-poems-glow.md b/.changeset/stupid-poems-glow.md deleted file mode 100644 index bdd8acc66d5..00000000000 --- a/.changeset/stupid-poems-glow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"chainlink": minor ---- - -#internal rework operator_ui installer diff --git a/.changeset/tall-emus-fail.md b/.changeset/tall-emus-fail.md new file mode 100644 index 00000000000..98d5775cb14 --- /dev/null +++ b/.changeset/tall-emus-fail.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#internal Use txid as the idempotency key in the evm chainwriter diff --git a/.changeset/tall-walls-agree.md b/.changeset/tall-walls-agree.md deleted file mode 100644 index 6f1f5505b64..00000000000 --- a/.changeset/tall-walls-agree.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"chainlink": patch ---- - -#internal upgrade keystone contracts to 0.8.24 diff --git a/.changeset/ten-falcons-suffer.md b/.changeset/ten-falcons-suffer.md deleted file mode 100644 index e4476b10457..00000000000 --- a/.changeset/ten-falcons-suffer.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"chainlink": patch ---- - -move v23 contracts #bugfix diff --git a/.changeset/thick-lemons-beam.md b/.changeset/thick-lemons-beam.md deleted file mode 100644 index 0ce6e04780e..00000000000 --- a/.changeset/thick-lemons-beam.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"chainlink": minor ---- - -#internal Add script to provision capability registry diff --git a/.changeset/thick-moles-travel.md b/.changeset/thick-moles-travel.md deleted file mode 100644 index 45559e47154..00000000000 --- a/.changeset/thick-moles-travel.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"chainlink": minor ---- - -#internal moves workflow name and owner to the yaml spec diff --git a/.changeset/tricky-seas-invite.md b/.changeset/tricky-seas-invite.md new file mode 100644 index 00000000000..f109a2d8f93 --- /dev/null +++ b/.changeset/tricky-seas-invite.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +Fix TestHeadTracker_CallsHeadTrackableCallbacks flaky test #internal diff --git a/.changeset/twenty-rings-kneel.md b/.changeset/twenty-rings-kneel.md new file mode 100644 index 00000000000..160881c7faf --- /dev/null +++ b/.changeset/twenty-rings-kneel.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +#bugfix Set LatestFinalizedBlock for finalized blocks saved by logpoller diff --git a/.changeset/unlucky-pillows-fly.md b/.changeset/unlucky-pillows-fly.md deleted file mode 100644 index c8f690eda19..00000000000 --- a/.changeset/unlucky-pillows-fly.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"chainlink": patch ---- - -add events, add getter and add comments #bugfix diff --git a/.changeset/warm-cobras-poke.md b/.changeset/warm-cobras-poke.md deleted file mode 100644 index 0bfb1dd44b4..00000000000 --- a/.changeset/warm-cobras-poke.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"chainlink": patch ---- - -#updated Fix verb formatting in the log outputs. diff --git a/.changeset/wet-wasps-hide.md b/.changeset/wet-wasps-hide.md new file mode 100644 index 00000000000..2d6d6fd7640 --- /dev/null +++ b/.changeset/wet-wasps-hide.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +Fix TestIntegration_KeeperPluginLogUpkeep_ErrHandler flaky test #internal diff --git a/.changeset/wise-wasps-drum.md b/.changeset/wise-wasps-drum.md deleted file mode 100644 index 0a4a6eaf665..00000000000 --- a/.changeset/wise-wasps-drum.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"chainlink": patch ---- - -#internal Add loggercheck linter to verify that \*w logging methods have even number of args. diff --git a/CODEOWNERS b/.github/CODEOWNERS similarity index 94% rename from CODEOWNERS rename to .github/CODEOWNERS index 8741cb7a685..c7eb22991b5 100644 --- a/CODEOWNERS +++ b/.github/CODEOWNERS @@ -2,8 +2,8 @@ # 1. Per Github docs: "Order is important; the last matching pattern takes the most precedence." # Please define less specific codeowner paths before more specific codeowner paths in order for the more specific rule to have priority -# Core -/core @smartcontractkit/foundations +# Root +* @smartcontractkit/foundations # Chains /common @smartcontractkit/bix-framework @@ -12,6 +12,7 @@ # Services /core/services/directrequest @smartcontractkit/keepers /core/services/feeds @smartcontractkit/FMS +/core/services/synchronization/telem @smartcontractkit/realtime # To be deprecated in Chainlink V3 /core/services/fluxmonitorv2 @smartcontractkit/foundations @@ -33,8 +34,6 @@ /core/services/pipeline/task.vrf.go @smartcontractkit/vrf-team /core/services/pipeline/task.vrfv2.go @smartcontractkit/vrf-team /core/services/pipeline/task.vrfv2plus.go @smartcontractkit/vrf-team -/core/services/ocr2/plugins/dkg @smartcontractkit/vrf-team -/core/services/ocr2/plugins/ocr2vrf @smartcontractkit/vrf-team # Keeper/Automation-related services /core/services/keeper @smartcontractkit/keepers @@ -110,8 +109,8 @@ contracts/scripts/requirements.txt @smartcontractkit/prodsec-public .nvmrc @smartcontractkit/prodsec-public contracts/package.json @smartcontractkit/prodsec-public contracts/pnpm.lock @smartcontractkit/prodsec-public -go.mod @smartcontractkit/prodsec-public -go.sum @smartcontractkit/prodsec-public +go.mod @smartcontractkit/prodsec-public @smartcontractkit/releng @smartcontractkit/foundations +go.sum @smartcontractkit/prodsec-public @smartcontractkit/releng @smartcontractkit/foundations integration-tests/go.mod @smartcontractkit/prodsec-public integration-tests/go.sum @smartcontractkit/prodsec-public flake.nix @smartcontractkit/prodsec-public diff --git a/.github/actions/build-chainlink-image/action.yml b/.github/actions/build-chainlink-image/action.yml index bee48af3989..9cd90432e9e 100644 --- a/.github/actions/build-chainlink-image/action.yml +++ b/.github/actions/build-chainlink-image/action.yml @@ -29,7 +29,7 @@ runs: - name: Check if image exists if: ${{ inputs.dep_evm_sha != '' || inputs.check_image_exists == 'true'}} id: check-image - uses: smartcontractkit/chainlink-github-actions/docker/image-exists@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/docker/image-exists@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: repository: chainlink tag: ${{ inputs.git_commit_sha }}${{ inputs.tag_suffix }} @@ -37,7 +37,7 @@ runs: AWS_ROLE_TO_ASSUME: ${{ inputs.AWS_ROLE_TO_ASSUME }} - name: Build Image if: steps.check-image.outputs.exists != 'true' - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: cl_repo: smartcontractkit/chainlink cl_ref: ${{ inputs.git_commit_sha }} diff --git a/.github/actions/build-test-image/action.yml b/.github/actions/build-test-image/action.yml index dfe31f639f4..dcc9fefda71 100644 --- a/.github/actions/build-test-image/action.yml +++ b/.github/actions/build-test-image/action.yml @@ -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@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/docker/image-exists@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: repository: 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@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/docker/build-push@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 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@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/docker/image-exists@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 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@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/docker/build-push@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 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 6641b352b37..eaf7e0f61bd 100644 --- a/.github/actions/delete-deployments/action.yml +++ b/.github/actions/delete-deployments/action.yml @@ -31,7 +31,7 @@ runs: steps: - uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0 with: - version: ^8.0.0 + version: ^9.0.0 - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: diff --git a/.github/actions/delete-deployments/package.json b/.github/actions/delete-deployments/package.json index d385569b2ea..a2d6f839089 100644 --- a/.github/actions/delete-deployments/package.json +++ b/.github/actions/delete-deployments/package.json @@ -10,6 +10,10 @@ "keywords": [], "author": "", "license": "ISC", + "engines": { + "node": ">=18", + "pnpm": ">=9" + }, "dependencies": { "@actions/core": "^1.10.1", "@octokit/action": "^6.1.0", diff --git a/.github/actions/delete-deployments/pnpm-lock.yaml b/.github/actions/delete-deployments/pnpm-lock.yaml index 92da36617d5..d9f25b3f80d 100644 --- a/.github/actions/delete-deployments/pnpm-lock.yaml +++ b/.github/actions/delete-deployments/pnpm-lock.yaml @@ -1,285 +1,183 @@ -lockfileVersion: '6.0' +lockfileVersion: '9.0' settings: autoInstallPeers: true excludeLinksFromLockfile: false -dependencies: - '@actions/core': - specifier: ^1.10.1 - version: 1.10.1 - '@octokit/action': - specifier: ^6.1.0 - version: 6.1.0 - '@octokit/plugin-retry': - specifier: ^6.0.1 - version: 6.0.1(@octokit/core@5.0.0) - '@octokit/plugin-throttling': - specifier: ^7.0.0 - version: 7.0.0(@octokit/core@5.0.0) - ts-node: - specifier: ^10.9.2 - version: 10.9.2(@types/node@20.12.10)(typescript@5.4.5) - -devDependencies: - '@octokit/types': - specifier: ^11.1.0 - version: 11.1.0 - '@types/node': - specifier: ^20.12.10 - version: 20.12.10 - typescript: - specifier: ^5.4.5 - version: 5.4.5 +importers: + + .: + dependencies: + '@actions/core': + specifier: ^1.10.1 + version: 1.10.1 + '@octokit/action': + specifier: ^6.1.0 + version: 6.1.0 + '@octokit/plugin-retry': + specifier: ^6.0.1 + version: 6.0.1(@octokit/core@5.0.0) + '@octokit/plugin-throttling': + specifier: ^7.0.0 + version: 7.0.0(@octokit/core@5.0.0) + ts-node: + specifier: ^10.9.2 + version: 10.9.2(@types/node@20.12.10)(typescript@5.4.5) + devDependencies: + '@octokit/types': + specifier: ^11.1.0 + version: 11.1.0 + '@types/node': + specifier: ^20.12.10 + version: 20.12.10 + typescript: + specifier: ^5.4.5 + version: 5.4.5 packages: - /@actions/core@1.10.1: + '@actions/core@1.10.1': resolution: {integrity: sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==} - dependencies: - '@actions/http-client': 2.1.1 - uuid: 8.3.2 - dev: false - /@actions/http-client@2.1.1: + '@actions/http-client@2.1.1': resolution: {integrity: sha512-qhrkRMB40bbbLo7gF+0vu+X+UawOvQQqNAA/5Unx774RS8poaOhThDOG6BGmxvAnxhQnDp2BG/ZUm65xZILTpw==} - dependencies: - tunnel: 0.0.6 - dev: false - /@cspotcode/source-map-support@0.8.1: + '@cspotcode/source-map-support@0.8.1': resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} engines: {node: '>=12'} - dependencies: - '@jridgewell/trace-mapping': 0.3.9 - dev: false - /@jridgewell/resolve-uri@3.1.1: + '@jridgewell/resolve-uri@3.1.1': resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==} engines: {node: '>=6.0.0'} - dev: false - /@jridgewell/sourcemap-codec@1.4.15: + '@jridgewell/sourcemap-codec@1.4.15': resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} - dev: false - /@jridgewell/trace-mapping@0.3.9: + '@jridgewell/trace-mapping@0.3.9': resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} - dependencies: - '@jridgewell/resolve-uri': 3.1.1 - '@jridgewell/sourcemap-codec': 1.4.15 - dev: false - /@octokit/action@6.1.0: + '@octokit/action@6.1.0': resolution: {integrity: sha512-lo+nHx8kAV86bxvOVOI3vFjX3gXPd/L7guAUbvs3pUvnR2KC+R7yjBkA1uACt4gYhs4LcWP3AXSGQzsbeN2XXw==} engines: {node: '>= 18'} - dependencies: - '@octokit/auth-action': 4.0.0 - '@octokit/core': 5.0.0 - '@octokit/plugin-paginate-rest': 9.2.1(@octokit/core@5.0.0) - '@octokit/plugin-rest-endpoint-methods': 10.4.1(@octokit/core@5.0.0) - '@octokit/types': 12.6.0 - undici: 6.16.0 - dev: false - /@octokit/auth-action@4.0.0: + '@octokit/auth-action@4.0.0': resolution: {integrity: sha512-sMm9lWZdiX6e89YFaLrgE9EFs94k58BwIkvjOtozNWUqyTmsrnWFr/M5LolaRzZ7Kmb5FbhF9hi7FEeE274SoQ==} engines: {node: '>= 18'} - dependencies: - '@octokit/auth-token': 4.0.0 - '@octokit/types': 11.1.0 - dev: false - /@octokit/auth-token@4.0.0: + '@octokit/auth-token@4.0.0': resolution: {integrity: sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==} engines: {node: '>= 18'} - dev: false - /@octokit/core@5.0.0: + '@octokit/core@5.0.0': resolution: {integrity: sha512-YbAtMWIrbZ9FCXbLwT9wWB8TyLjq9mxpKdgB3dUNxQcIVTf9hJ70gRPwAcqGZdY6WdJPZ0I7jLaaNDCiloGN2A==} engines: {node: '>= 18'} - dependencies: - '@octokit/auth-token': 4.0.0 - '@octokit/graphql': 7.0.1 - '@octokit/request': 8.1.1 - '@octokit/request-error': 5.0.0 - '@octokit/types': 11.1.0 - before-after-hook: 2.2.3 - universal-user-agent: 6.0.0 - dev: false - /@octokit/endpoint@9.0.0: + '@octokit/endpoint@9.0.0': resolution: {integrity: sha512-szrQhiqJ88gghWY2Htt8MqUDO6++E/EIXqJ2ZEp5ma3uGS46o7LZAzSLt49myB7rT+Hfw5Y6gO3LmOxGzHijAQ==} engines: {node: '>= 18'} - dependencies: - '@octokit/types': 11.1.0 - is-plain-object: 5.0.0 - universal-user-agent: 6.0.0 - dev: false - /@octokit/graphql@7.0.1: + '@octokit/graphql@7.0.1': resolution: {integrity: sha512-T5S3oZ1JOE58gom6MIcrgwZXzTaxRnxBso58xhozxHpOqSTgDS6YNeEUvZ/kRvXgPrRz/KHnZhtb7jUMRi9E6w==} engines: {node: '>= 18'} - dependencies: - '@octokit/request': 8.1.1 - '@octokit/types': 11.1.0 - universal-user-agent: 6.0.0 - dev: false - /@octokit/openapi-types@18.0.0: + '@octokit/openapi-types@18.0.0': resolution: {integrity: sha512-V8GImKs3TeQRxRtXFpG2wl19V7444NIOTDF24AWuIbmNaNYOQMWRbjcGDXV5B+0n887fgDcuMNOmlul+k+oJtw==} - /@octokit/openapi-types@20.0.0: + '@octokit/openapi-types@20.0.0': resolution: {integrity: sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==} - dev: false - /@octokit/plugin-paginate-rest@9.2.1(@octokit/core@5.0.0): + '@octokit/plugin-paginate-rest@9.2.1': resolution: {integrity: sha512-wfGhE/TAkXZRLjksFXuDZdmGnJQHvtU/joFQdweXUgzo1XwvBCD4o4+75NtFfjfLK5IwLf9vHTfSiU3sLRYpRw==} engines: {node: '>= 18'} peerDependencies: '@octokit/core': '5' - dependencies: - '@octokit/core': 5.0.0 - '@octokit/types': 12.6.0 - dev: false - /@octokit/plugin-rest-endpoint-methods@10.4.1(@octokit/core@5.0.0): + '@octokit/plugin-rest-endpoint-methods@10.4.1': resolution: {integrity: sha512-xV1b+ceKV9KytQe3zCVqjg+8GTGfDYwaT1ATU5isiUyVtlVAO3HNdzpS4sr4GBx4hxQ46s7ITtZrAsxG22+rVg==} engines: {node: '>= 18'} peerDependencies: '@octokit/core': '5' - dependencies: - '@octokit/core': 5.0.0 - '@octokit/types': 12.6.0 - dev: false - /@octokit/plugin-retry@6.0.1(@octokit/core@5.0.0): + '@octokit/plugin-retry@6.0.1': resolution: {integrity: sha512-SKs+Tz9oj0g4p28qkZwl/topGcb0k0qPNX/i7vBKmDsjoeqnVfFUquqrE/O9oJY7+oLzdCtkiWSXLpLjvl6uog==} engines: {node: '>= 18'} peerDependencies: '@octokit/core': '>=5' - dependencies: - '@octokit/core': 5.0.0 - '@octokit/request-error': 5.0.0 - '@octokit/types': 12.6.0 - bottleneck: 2.19.5 - dev: false - /@octokit/plugin-throttling@7.0.0(@octokit/core@5.0.0): + '@octokit/plugin-throttling@7.0.0': resolution: {integrity: sha512-KL2k/d0uANc8XqP5S64YcNFCudR3F5AaKO39XWdUtlJIjT9Ni79ekWJ6Kj5xvAw87udkOMEPcVf9xEge2+ahew==} engines: {node: '>= 18'} peerDependencies: '@octokit/core': ^5.0.0 - dependencies: - '@octokit/core': 5.0.0 - '@octokit/types': 11.1.0 - bottleneck: 2.19.5 - dev: false - /@octokit/request-error@5.0.0: + '@octokit/request-error@5.0.0': resolution: {integrity: sha512-1ue0DH0Lif5iEqT52+Rf/hf0RmGO9NWFjrzmrkArpG9trFfDM/efx00BJHdLGuro4BR/gECxCU2Twf5OKrRFsQ==} engines: {node: '>= 18'} - dependencies: - '@octokit/types': 11.1.0 - deprecation: 2.3.1 - once: 1.4.0 - dev: false - /@octokit/request@8.1.1: + '@octokit/request@8.1.1': resolution: {integrity: sha512-8N+tdUz4aCqQmXl8FpHYfKG9GelDFd7XGVzyN8rc6WxVlYcfpHECnuRkgquzz+WzvHTK62co5di8gSXnzASZPQ==} engines: {node: '>= 18'} - dependencies: - '@octokit/endpoint': 9.0.0 - '@octokit/request-error': 5.0.0 - '@octokit/types': 11.1.0 - is-plain-object: 5.0.0 - universal-user-agent: 6.0.0 - dev: false - /@octokit/types@11.1.0: + '@octokit/types@11.1.0': resolution: {integrity: sha512-Fz0+7GyLm/bHt8fwEqgvRBWwIV1S6wRRyq+V6exRKLVWaKGsuy6H9QFYeBVDV7rK6fO3XwHgQOPxv+cLj2zpXQ==} - dependencies: - '@octokit/openapi-types': 18.0.0 - /@octokit/types@12.6.0: + '@octokit/types@12.6.0': resolution: {integrity: sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==} - dependencies: - '@octokit/openapi-types': 20.0.0 - dev: false - /@tsconfig/node10@1.0.9: + '@tsconfig/node10@1.0.9': resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==} - dev: false - /@tsconfig/node12@1.0.11: + '@tsconfig/node12@1.0.11': resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} - dev: false - /@tsconfig/node14@1.0.3: + '@tsconfig/node14@1.0.3': resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} - dev: false - /@tsconfig/node16@1.0.4: + '@tsconfig/node16@1.0.4': resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} - dev: false - /@types/node@20.12.10: + '@types/node@20.12.10': resolution: {integrity: sha512-Eem5pH9pmWBHoGAT8Dr5fdc5rYA+4NAovdM4EktRPVAAiJhmWWfQrA0cFhAbOsQdSfIHjAud6YdkbL69+zSKjw==} - dependencies: - undici-types: 5.26.5 - /acorn-walk@8.2.0: + acorn-walk@8.2.0: resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} engines: {node: '>=0.4.0'} - dev: false - /acorn@8.10.0: + acorn@8.10.0: resolution: {integrity: sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==} engines: {node: '>=0.4.0'} hasBin: true - dev: false - /arg@4.1.3: + arg@4.1.3: resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} - dev: false - /before-after-hook@2.2.3: + before-after-hook@2.2.3: resolution: {integrity: sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==} - dev: false - /bottleneck@2.19.5: + bottleneck@2.19.5: resolution: {integrity: sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw==} - dev: false - /create-require@1.1.1: + create-require@1.1.1: resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} - dev: false - /deprecation@2.3.1: + deprecation@2.3.1: resolution: {integrity: sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==} - dev: false - /diff@4.0.2: + diff@4.0.2: resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} engines: {node: '>=0.3.1'} - dev: false - /is-plain-object@5.0.0: + is-plain-object@5.0.0: resolution: {integrity: sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==} engines: {node: '>=0.10.0'} - dev: false - /make-error@1.3.6: + make-error@1.3.6: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} - dev: false - /once@1.4.0: + once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} - dependencies: - wrappy: 1.0.2 - dev: false - /ts-node@10.9.2(@types/node@20.12.10)(typescript@5.4.5): + ts-node@10.9.2: resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} hasBin: true peerDependencies: @@ -292,6 +190,188 @@ packages: optional: true '@swc/wasm': optional: true + + tunnel@0.0.6: + resolution: {integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==} + engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'} + + typescript@5.4.5: + resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} + engines: {node: '>=14.17'} + hasBin: true + + undici-types@5.26.5: + resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + + undici@6.16.0: + resolution: {integrity: sha512-HQfVddOTb5PJtfLnJ1Px8bNGyIg/z7WTj1hjUSna1Itsv59Oca9JdclIU08ToNqvWWXjFLRzc9rqjnpfw5UWcQ==} + engines: {node: '>=18.17'} + + universal-user-agent@6.0.0: + resolution: {integrity: sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==} + + uuid@8.3.2: + resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} + hasBin: true + + v8-compile-cache-lib@3.0.1: + resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} + + wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + + yn@3.1.1: + resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} + engines: {node: '>=6'} + +snapshots: + + '@actions/core@1.10.1': + dependencies: + '@actions/http-client': 2.1.1 + uuid: 8.3.2 + + '@actions/http-client@2.1.1': + dependencies: + tunnel: 0.0.6 + + '@cspotcode/source-map-support@0.8.1': + dependencies: + '@jridgewell/trace-mapping': 0.3.9 + + '@jridgewell/resolve-uri@3.1.1': {} + + '@jridgewell/sourcemap-codec@1.4.15': {} + + '@jridgewell/trace-mapping@0.3.9': + dependencies: + '@jridgewell/resolve-uri': 3.1.1 + '@jridgewell/sourcemap-codec': 1.4.15 + + '@octokit/action@6.1.0': + dependencies: + '@octokit/auth-action': 4.0.0 + '@octokit/core': 5.0.0 + '@octokit/plugin-paginate-rest': 9.2.1(@octokit/core@5.0.0) + '@octokit/plugin-rest-endpoint-methods': 10.4.1(@octokit/core@5.0.0) + '@octokit/types': 12.6.0 + undici: 6.16.0 + + '@octokit/auth-action@4.0.0': + dependencies: + '@octokit/auth-token': 4.0.0 + '@octokit/types': 11.1.0 + + '@octokit/auth-token@4.0.0': {} + + '@octokit/core@5.0.0': + dependencies: + '@octokit/auth-token': 4.0.0 + '@octokit/graphql': 7.0.1 + '@octokit/request': 8.1.1 + '@octokit/request-error': 5.0.0 + '@octokit/types': 11.1.0 + before-after-hook: 2.2.3 + universal-user-agent: 6.0.0 + + '@octokit/endpoint@9.0.0': + dependencies: + '@octokit/types': 11.1.0 + is-plain-object: 5.0.0 + universal-user-agent: 6.0.0 + + '@octokit/graphql@7.0.1': + dependencies: + '@octokit/request': 8.1.1 + '@octokit/types': 11.1.0 + universal-user-agent: 6.0.0 + + '@octokit/openapi-types@18.0.0': {} + + '@octokit/openapi-types@20.0.0': {} + + '@octokit/plugin-paginate-rest@9.2.1(@octokit/core@5.0.0)': + dependencies: + '@octokit/core': 5.0.0 + '@octokit/types': 12.6.0 + + '@octokit/plugin-rest-endpoint-methods@10.4.1(@octokit/core@5.0.0)': + dependencies: + '@octokit/core': 5.0.0 + '@octokit/types': 12.6.0 + + '@octokit/plugin-retry@6.0.1(@octokit/core@5.0.0)': + dependencies: + '@octokit/core': 5.0.0 + '@octokit/request-error': 5.0.0 + '@octokit/types': 12.6.0 + bottleneck: 2.19.5 + + '@octokit/plugin-throttling@7.0.0(@octokit/core@5.0.0)': + dependencies: + '@octokit/core': 5.0.0 + '@octokit/types': 11.1.0 + bottleneck: 2.19.5 + + '@octokit/request-error@5.0.0': + dependencies: + '@octokit/types': 11.1.0 + deprecation: 2.3.1 + once: 1.4.0 + + '@octokit/request@8.1.1': + dependencies: + '@octokit/endpoint': 9.0.0 + '@octokit/request-error': 5.0.0 + '@octokit/types': 11.1.0 + is-plain-object: 5.0.0 + universal-user-agent: 6.0.0 + + '@octokit/types@11.1.0': + dependencies: + '@octokit/openapi-types': 18.0.0 + + '@octokit/types@12.6.0': + dependencies: + '@octokit/openapi-types': 20.0.0 + + '@tsconfig/node10@1.0.9': {} + + '@tsconfig/node12@1.0.11': {} + + '@tsconfig/node14@1.0.3': {} + + '@tsconfig/node16@1.0.4': {} + + '@types/node@20.12.10': + dependencies: + undici-types: 5.26.5 + + acorn-walk@8.2.0: {} + + acorn@8.10.0: {} + + arg@4.1.3: {} + + before-after-hook@2.2.3: {} + + bottleneck@2.19.5: {} + + create-require@1.1.1: {} + + deprecation@2.3.1: {} + + diff@4.0.2: {} + + is-plain-object@5.0.0: {} + + make-error@1.3.6: {} + + once@1.4.0: + dependencies: + wrappy: 1.0.2 + + ts-node@10.9.2(@types/node@20.12.10)(typescript@5.4.5): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.9 @@ -308,44 +388,21 @@ packages: typescript: 5.4.5 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 - dev: false - /tunnel@0.0.6: - resolution: {integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==} - engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'} - dev: false + tunnel@0.0.6: {} - /typescript@5.4.5: - resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} - engines: {node: '>=14.17'} - hasBin: true + typescript@5.4.5: {} - /undici-types@5.26.5: - resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + undici-types@5.26.5: {} - /undici@6.16.0: - resolution: {integrity: sha512-HQfVddOTb5PJtfLnJ1Px8bNGyIg/z7WTj1hjUSna1Itsv59Oca9JdclIU08ToNqvWWXjFLRzc9rqjnpfw5UWcQ==} - engines: {node: '>=18.17'} - dev: false + undici@6.16.0: {} - /universal-user-agent@6.0.0: - resolution: {integrity: sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==} - dev: false + universal-user-agent@6.0.0: {} - /uuid@8.3.2: - resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} - hasBin: true - dev: false + uuid@8.3.2: {} - /v8-compile-cache-lib@3.0.1: - resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} - dev: false + v8-compile-cache-lib@3.0.1: {} - /wrappy@1.0.2: - resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - dev: false + wrappy@1.0.2: {} - /yn@3.1.1: - resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} - engines: {node: '>=6'} - dev: false + yn@3.1.1: {} diff --git a/.github/actions/setup-create-base64-config/action.yml b/.github/actions/setup-create-base64-config/action.yml deleted file mode 100644 index d54554278d1..00000000000 --- a/.github/actions/setup-create-base64-config/action.yml +++ /dev/null @@ -1,161 +0,0 @@ -name: Create Base64 Config -description: A composite action that creates a base64-encoded config to be used by integration tests - -inputs: - runId: - description: The run id - testLogCollect: - description: Whether to always collect logs, even for passing tests - default: "false" - selectedNetworks: - description: The networks to run tests against - chainlinkImage: - description: The chainlink image to use - default: "public.ecr.aws/chainlink/chainlink" - chainlinkPostgresVersion: - description: The postgres version to use with the chainlink node - default: "15.6" - chainlinkVersion: - description: The git commit sha to use for the image tag - pyroscopeServer: - description: URL of Pyroscope server - pyroscopeEnvironment: - description: Name of Pyroscope environment - pyroscopeKey: - description: Pyroscope server key - lokiEndpoint: - description: Loki push endpoint - lokiTenantId: - description: Loki tenant id - lokiBasicAuth: - description: Loki basic auth - logstreamLogTargets: - description: Where to send logs (e.g. file, loki) - grafanaUrl: - description: Grafana URL - grafanaDashboardUrl: - description: Grafana dashboard URL - grafanaBearerToken: - description: Grafana bearer token - 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 - steps: - - name: Prepare Base64 TOML override - shell: bash - id: base64-config-override - env: - RUN_ID: ${{ inputs.runId }} - TEST_LOG_COLLECT: ${{ inputs.testLogCollect }} - SELECTED_NETWORKS: ${{ inputs.selectedNetworks }} - PYROSCOPE_SERVER: ${{ inputs.pyroscopeServer }} - PYROSCOPE_ENVIRONMENT: ${{ inputs.pyroscopeEnvironment }} - PYROSCOPE_KEY: ${{ inputs.pyroscopeKey }} - CHAINLINK_IMAGE: ${{ inputs.chainlinkImage }} - CHAINLINK_VERSION: ${{ inputs.chainlinkVersion }} - CHAINLINK_POSTGRES_VERSION: ${{ inputs.chainlinkPostgresVersion }} - LOKI_ENDPOINT: ${{ inputs.lokiEndpoint }} - LOKI_TENANT_ID: ${{ inputs.lokiTenantId }} - LOKI_BASIC_AUTH: ${{ inputs.lokiBasicAuth }} - LOGSTREAM_LOG_TARGETS: ${{ inputs.logstreamLogTargets }} - GRAFANA_URL: ${{ inputs.grafanaUrl }} - GRAFANA_DASHBOARD_URL: ${{ inputs.grafanaDashboardUrl }} - GRAFANA_BEARER_TOKEN: ${{ inputs.grafanaBearerToken }} - ETH_EXECUTION_CLIENT: ${{ inputs.ethExecutionClient }} - CUSTOM_ETH_CLIENT_DOCKER_IMAGE: ${{ inputs.customEthClientDockerImage }} - run: | - echo ::add-mask::$CHAINLINK_IMAGE - function convert_to_toml_array() { - local IFS=',' - local input_array=($1) - local toml_array_format="[" - - for element in "${input_array[@]}"; do - toml_array_format+="\"$element\"," - done - - toml_array_format="${toml_array_format%,}]" - echo "$toml_array_format" - } - - selected_networks=$(convert_to_toml_array "$SELECTED_NETWORKS") - log_targets=$(convert_to_toml_array "$LOGSTREAM_LOG_TARGETS") - - if [ -n "$PYROSCOPE_SERVER" ]; then - pyroscope_enabled=true - else - pyroscope_enabled=false - fi - - if [ -n "$TEST_LOG_COLLECT" ]; then - test_log_collect=true - else - 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 - - grafana_bearer_token="" - if [ -n "$GRAFANA_BEARER_TOKEN" ]; then - grafana_bearer_token="bearer_token_secret=\"$GRAFANA_BEARER_TOKEN\"" - fi - - cat << EOF > config.toml - [Network] - selected_networks=$selected_networks - - [ChainlinkImage] - image="$CHAINLINK_IMAGE" - version="$CHAINLINK_VERSION" - postgres_version="$CHAINLINK_POSTGRES_VERSION" - - [Pyroscope] - enabled=$pyroscope_enabled - server_url="$PYROSCOPE_SERVER" - environment="$PYROSCOPE_ENVIRONMENT" - key_secret="$PYROSCOPE_KEY" - - [Logging] - test_log_collect=$test_log_collect - run_id="$RUN_ID" - - [Logging.LogStream] - log_targets=$log_targets - - [Logging.Loki] - tenant_id="$LOKI_TENANT_ID" - endpoint="$LOKI_ENDPOINT" - basic_auth_secret="$LOKI_BASIC_AUTH" - - [Logging.Grafana] - base_url="$GRAFANA_URL" - dashboard_url="$GRAFANA_DASHBOARD_URL" - $grafana_bearer_token - - [PrivateEthereumNetwork] - execution_layer="$execution_layer" - $ethereum_version - - $custom_images - EOF - - BASE64_CONFIG_OVERRIDE=$(cat config.toml | base64 -w 0) - echo ::add-mask::$BASE64_CONFIG_OVERRIDE - echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV diff --git a/.github/actions/setup-merge-base64-config/action.yml b/.github/actions/setup-merge-base64-config/action.yml index b734873c1f6..79dc8758315 100644 --- a/.github/actions/setup-merge-base64-config/action.yml +++ b/.github/actions/setup-merge-base64-config/action.yml @@ -24,22 +24,20 @@ runs: echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV decoded_toml=$(echo $BASE64_CONFIG_OVERRIDE | base64 -d) - CHAINLINK_IMAGE=$(echo "$decoded_toml" | dasel -r toml 'ChainlinkImage.image') + CHAINLINK_IMAGE=$(echo "$decoded_toml" | { dasel -r toml 'ChainlinkImage.image' 2>/dev/null || echo ''; }) echo ::add-mask::$CHAINLINK_IMAGE - CHAINLINK_VERSION=$(echo "$decoded_toml" | dasel -r toml 'ChainlinkImage.version') + CHAINLINK_VERSION=$(echo "$decoded_toml" | { dasel -r toml 'ChainlinkImage.version' 2>/dev/null || echo ''; }) NETWORKS=$(echo "$decoded_toml" | awk -F'=' '/^[[:space:]]*selected_networks[[:space:]]*=/ {gsub(/^[[:space:]]+|[[:space:]]+$/, "", $2); print $2}' 2>/dev/null) if [ -n "$CHAINLINK_IMAGE" ]; then echo "CHAINLINK_IMAGE=$CHAINLINK_IMAGE" >> $GITHUB_ENV else - echo "No Chainlink Image found in base64-ed config. Exiting" - exit 1 + echo "No Chainlink Image found in base64-ed config" fi if [ -n "$CHAINLINK_VERSION" ]; then echo "CHAINLINK_VERSION=$CHAINLINK_VERSION" >> $GITHUB_ENV else - echo "No Chainlink Version found in base64-ed config. Exiting" - exit 1 + echo "No Chainlink Version found in base64-ed config" fi if [ -n "$NETWORKS" ]; then echo "NETWORKS=$NETWORKS" >> $GITHUB_ENV diff --git a/.github/actions/setup-nodejs/action.yaml b/.github/actions/setup-nodejs/action.yaml index ae6975e7415..e0de9b01382 100644 --- a/.github/actions/setup-nodejs/action.yaml +++ b/.github/actions/setup-nodejs/action.yaml @@ -3,28 +3,32 @@ inputs: prod: default: "false" description: Set to 'true' to do a prod only install + base-path: + description: Path to the base of the repo + required: false + default: . description: Setup pnpm for contracts runs: using: composite steps: - uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0 with: - version: ^7.0.0 + version: ^9.0.0 - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: node-version: "20" cache: "pnpm" - cache-dependency-path: "contracts/pnpm-lock.yaml" + cache-dependency-path: "${{ inputs.base-path }}/contracts/pnpm-lock.yaml" - if: ${{ inputs.prod == 'false' }} name: Install dependencies shell: bash run: pnpm i - working-directory: contracts + working-directory: ${{ inputs.base-path }}/contracts - if: ${{ inputs.prod == 'true' }} name: Install prod dependencies shell: bash run: pnpm i --prod - working-directory: contracts + working-directory: ${{ inputs.base-path }}/contracts diff --git a/.github/actions/setup-parse-base64-config/action.yml b/.github/actions/setup-parse-base64-config/action.yml index 5e03c6de284..72e8982e6d0 100644 --- a/.github/actions/setup-parse-base64-config/action.yml +++ b/.github/actions/setup-parse-base64-config/action.yml @@ -20,23 +20,21 @@ runs: shell: bash run: | decoded_toml=$(echo $BASE64_CONFIG_OVERRIDE | base64 -d) - CHAINLINK_IMAGE=$(echo "$decoded_toml" | dasel -r toml 'ChainlinkImage.image') + CHAINLINK_IMAGE=$(echo "$decoded_toml" | { dasel -r toml 'ChainlinkImage.image' 2>/dev/null || echo ''; }) echo ::add-mask::$CHAINLINK_IMAGE - CHAINLINK_VERSION=$(echo "$decoded_toml" | dasel -r toml 'ChainlinkImage.version') + CHAINLINK_VERSION=$(echo "$decoded_toml" | { dasel -r toml 'ChainlinkImage.version' 2>/dev/null || echo ''; }) NETWORKS=$(echo "$decoded_toml" | awk -F'=' '/^[[:space:]]*selected_networks[[:space:]]*=/ {gsub(/^[[:space:]]+|[[:space:]]+$/, "", $2); print $2}' 2>/dev/null) ETH2_EL_CLIENT=$(echo "$decoded_toml" | awk -F'=' '/^[[:space:]]*execution_layer[[:space:]]*=/ {gsub(/^[[:space:]]+|[[:space:]]+$/, "", $2); print $2}' 2>/dev/null) if [ -n "$CHAINLINK_IMAGE" ]; then echo "CHAINLINK_IMAGE=$CHAINLINK_IMAGE" >> $GITHUB_ENV else - echo "No Chainlink Image found in base64-ed config. Exiting" - exit 1 + echo "No Chainlink Image found in base64-ed config" fi if [ -n "$CHAINLINK_VERSION" ]; then echo "CHAINLINK_VERSION=$CHAINLINK_VERSION" >> $GITHUB_ENV else echo "No Chainlink Version found in base64-ed config. Exiting" - exit 1 fi if [ -n "$NETWORKS" ]; then echo "NETWORKS=$NETWORKS" >> $GITHUB_ENV diff --git a/.github/actions/setup-postgres/action.yml b/.github/actions/setup-postgres/action.yml index f683934d789..45bfba5965f 100644 --- a/.github/actions/setup-postgres/action.yml +++ b/.github/actions/setup-postgres/action.yml @@ -1,13 +1,18 @@ name: Setup Postgresql description: Setup postgres docker container via docker-compose, allowing usage of a custom command, see https://github.com/orgs/community/discussions/26688 +inputs: + base-path: + description: Path to the base of the repo + required: false + default: . runs: using: composite steps: - name: Start postgres service run: docker compose up -d shell: bash - working-directory: ./.github/actions/setup-postgres + working-directory: ${{ inputs.base-path }}/.github/actions/setup-postgres - name: Wait for postgres service to be healthy run: ./wait-for-healthy-postgres.sh shell: bash - working-directory: ./.github/actions/setup-postgres + working-directory: ${{ inputs.base-path }}/.github/actions/setup-postgres diff --git a/.github/actions/setup-solana/action.yml b/.github/actions/setup-solana/action.yml index 41c67a94197..02a0b85ca8b 100644 --- a/.github/actions/setup-solana/action.yml +++ b/.github/actions/setup-solana/action.yml @@ -1,5 +1,10 @@ name: Setup Solana CLI description: Setup solana CLI +inputs: + base-path: + description: Path to the base of the repo + required: false + default: . runs: using: composite steps: @@ -9,11 +14,12 @@ runs: with: path: | ~/.local/share/solana/install/active_release/bin - key: ${{ runner.os }}-solana-cli-${{ hashFiles('./tools/ci/install_solana') }} + key: ${{ runner.os }}-solana-cli-${{ hashFiles('${{ inputs.base-path }}tools/ci/install_solana') }} - if: ${{ steps.cache.outputs.cache-hit != 'true' }} name: Install solana cli shell: bash + working-directory: ${{ inputs.base-path }} run: ./tools/ci/install_solana - name: Export solana path to env diff --git a/.github/actions/setup-wasmd/action.yml b/.github/actions/setup-wasmd/action.yml index 3e3846a70eb..ae31cf2395a 100644 --- a/.github/actions/setup-wasmd/action.yml +++ b/.github/actions/setup-wasmd/action.yml @@ -1,5 +1,10 @@ name: Setup Cosmos wasmd description: Setup Cosmos wasmd, used for integration tests +inputs: + base-path: + description: Path to the base of the repo + required: false + default: . runs: using: composite steps: @@ -10,11 +15,12 @@ runs: path: ~/wasmd-build # this caching works without cloning the repo because the install_wasmd contains # the commit hash. - key: ${{ runner.os }}-wasmd-cli-${{ hashFiles('./tools/ci/install_wasmd') }} + key: ${{ runner.os }}-wasmd-cli-${{ hashFiles('${{ inputs.base-path }}/tools/ci/install_wasmd') }} - if: ${{ steps.cache.outputs.cache-hit != 'true' }} name: Install wasmd shell: bash + working-directory: ${{ inputs.base-path }} run: ./tools/ci/install_wasmd - name: Export wasmd path to env diff --git a/.github/actions/split-tests/.npmrc b/.github/actions/split-tests/.npmrc deleted file mode 100644 index 4c2f52b3be7..00000000000 --- a/.github/actions/split-tests/.npmrc +++ /dev/null @@ -1,2 +0,0 @@ -auto-install-peers=true -strict-peer-dependencies=false diff --git a/.github/actions/split-tests/action.yaml b/.github/actions/split-tests/action.yaml deleted file mode 100644 index 633e897db54..00000000000 --- a/.github/actions/split-tests/action.yaml +++ /dev/null @@ -1,35 +0,0 @@ -name: Test Spliting -description: Split tests -inputs: - config: - required: true - description: The path to the splitting config -outputs: - splits: - description: The generated test splits - value: ${{ steps.split.outputs.splits }} -runs: - using: composite - steps: - - uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0 - with: - version: ^7.0.0 - - - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 - with: - node-version: "16" - cache: "pnpm" - cache-dependency-path: "./.github/actions/split-tests/pnpm-lock.yaml" - - - name: Install dependencies - shell: bash - run: pnpm i --prod - working-directory: "./.github/actions/split-tests" - - - name: Run test spliter - id: split - shell: bash - run: pnpm start - env: - CONFIG: ${{ inputs.config }} - working-directory: "./.github/actions/split-tests" diff --git a/.github/actions/split-tests/jest.config.js b/.github/actions/split-tests/jest.config.js deleted file mode 100644 index 7b3dcf296ff..00000000000 --- a/.github/actions/split-tests/jest.config.js +++ /dev/null @@ -1,15 +0,0 @@ -/** @type {import('ts-jest').JestConfigWithTsJest} */ -const jestConfig = { - preset: "ts-jest/presets/default-esm", - resolver: "/mjs-resolver.ts", - transform: { - "^.+\\.mts?$": [ - "ts-jest", - { - useESM: true, - }, - ], - }, - testEnvironment: "node", -}; -export default jestConfig; diff --git a/.github/actions/split-tests/mjs-resolver.ts b/.github/actions/split-tests/mjs-resolver.ts deleted file mode 100644 index 92c66f7b6ca..00000000000 --- a/.github/actions/split-tests/mjs-resolver.ts +++ /dev/null @@ -1,15 +0,0 @@ -const mjsResolver = (path, options) => { - const mjsExtRegex = /\.mjs$/i; - const resolver = options.defaultResolver; - if (mjsExtRegex.test(path)) { - try { - return resolver(path.replace(mjsExtRegex, ".mts"), options); - } catch { - // use default resolver - } - } - - return resolver(path, options); -}; - -module.exports = mjsResolver; diff --git a/.github/actions/split-tests/package.json b/.github/actions/split-tests/package.json deleted file mode 100644 index cddc547bb12..00000000000 --- a/.github/actions/split-tests/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "shard-packages", - "version": "1.0.0", - "description": "", - "type": "module", - "main": "index.js", - "scripts": { - "start": "ts-node -T --esm ./src/index.mts", - "test": "node --experimental-vm-modules --no-warnings node_modules/jest/bin/jest.js" - }, - "keywords": [], - "author": "", - "license": "MIT", - "dependencies": { - "@actions/core": "^1.10.1", - "ts-node": "^10.9.2", - "zx": "^7.2.3" - }, - "devDependencies": { - "@types/jest": "^29.5.12", - "@types/node": "^18.19.32", - "jest": "^29.7.0", - "ts-jest": "^29.1.2", - "typescript": "^5.4.5" - } -} diff --git a/.github/actions/split-tests/pnpm-lock.yaml b/.github/actions/split-tests/pnpm-lock.yaml deleted file mode 100644 index 730971e0c63..00000000000 --- a/.github/actions/split-tests/pnpm-lock.yaml +++ /dev/null @@ -1,3071 +0,0 @@ -lockfileVersion: '6.0' - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - -dependencies: - '@actions/core': - specifier: ^1.10.1 - version: 1.10.1 - ts-node: - specifier: ^10.9.2 - version: 10.9.2(@types/node@18.19.32)(typescript@5.4.5) - zx: - specifier: ^7.2.3 - version: 7.2.3 - -devDependencies: - '@types/jest': - specifier: ^29.5.12 - version: 29.5.12 - '@types/node': - specifier: ^18.19.32 - version: 18.19.32 - jest: - specifier: ^29.7.0 - version: 29.7.0(@types/node@18.19.32)(ts-node@10.9.2) - ts-jest: - specifier: ^29.1.2 - version: 29.1.2(@babel/core@7.19.3)(jest@29.7.0)(typescript@5.4.5) - typescript: - specifier: ^5.4.5 - version: 5.4.5 - -packages: - - /@actions/core@1.10.1: - resolution: {integrity: sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==} - dependencies: - '@actions/http-client': 2.0.1 - uuid: 8.3.2 - dev: false - - /@actions/http-client@2.0.1: - resolution: {integrity: sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==} - dependencies: - tunnel: 0.0.6 - dev: false - - /@ampproject/remapping@2.2.0: - resolution: {integrity: sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==} - engines: {node: '>=6.0.0'} - dependencies: - '@jridgewell/gen-mapping': 0.1.1 - '@jridgewell/trace-mapping': 0.3.25 - dev: true - - /@babel/code-frame@7.18.6: - resolution: {integrity: sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/highlight': 7.18.6 - dev: true - - /@babel/code-frame@7.24.2: - resolution: {integrity: sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/highlight': 7.24.2 - picocolors: 1.0.0 - dev: true - - /@babel/compat-data@7.19.3: - resolution: {integrity: sha512-prBHMK4JYYK+wDjJF1q99KK4JLL+egWS4nmNqdlMUgCExMZ+iZW0hGhyC3VEbsPjvaN0TBhW//VIFwBrk8sEiw==} - engines: {node: '>=6.9.0'} - dev: true - - /@babel/compat-data@7.24.4: - resolution: {integrity: sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ==} - engines: {node: '>=6.9.0'} - dev: true - - /@babel/core@7.19.3: - resolution: {integrity: sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@ampproject/remapping': 2.2.0 - '@babel/code-frame': 7.18.6 - '@babel/generator': 7.19.3 - '@babel/helper-compilation-targets': 7.19.3(@babel/core@7.19.3) - '@babel/helper-module-transforms': 7.19.0 - '@babel/helpers': 7.19.0 - '@babel/parser': 7.19.3 - '@babel/template': 7.18.10 - '@babel/traverse': 7.24.1 - '@babel/types': 7.19.3 - convert-source-map: 1.8.0 - debug: 4.3.4 - gensync: 1.0.0-beta.2 - json5: 2.2.3 - semver: 6.3.0 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/core@7.24.4: - resolution: {integrity: sha512-MBVlMXP+kkl5394RBLSxxk/iLTeVGuXTV3cIDXavPpMMqnSnt6apKgan/U8O3USWZCWZT/TbgfEpKa4uMgN4Dg==} - engines: {node: '>=6.9.0'} - dependencies: - '@ampproject/remapping': 2.2.0 - '@babel/code-frame': 7.24.2 - '@babel/generator': 7.24.4 - '@babel/helper-compilation-targets': 7.23.6 - '@babel/helper-module-transforms': 7.23.3(@babel/core@7.24.4) - '@babel/helpers': 7.24.4 - '@babel/parser': 7.24.4 - '@babel/template': 7.24.0 - '@babel/traverse': 7.24.1 - '@babel/types': 7.24.0 - convert-source-map: 2.0.0 - debug: 4.3.4 - gensync: 1.0.0-beta.2 - json5: 2.2.3 - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/generator@7.19.3: - resolution: {integrity: sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.19.3 - '@jridgewell/gen-mapping': 0.3.2 - jsesc: 2.5.2 - dev: true - - /@babel/generator@7.24.4: - resolution: {integrity: sha512-Xd6+v6SnjWVx/nus+y0l1sxMOTOMBkyL4+BIdbALyatQnAe/SRVjANeDPSCYaX+i1iJmuGSKf3Z+E+V/va1Hvw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.24.0 - '@jridgewell/gen-mapping': 0.3.5 - '@jridgewell/trace-mapping': 0.3.25 - jsesc: 2.5.2 - dev: true - - /@babel/helper-compilation-targets@7.19.3(@babel/core@7.19.3): - resolution: {integrity: sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/compat-data': 7.19.3 - '@babel/core': 7.19.3 - '@babel/helper-validator-option': 7.18.6 - browserslist: 4.21.4 - semver: 6.3.0 - dev: true - - /@babel/helper-compilation-targets@7.23.6: - resolution: {integrity: sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/compat-data': 7.24.4 - '@babel/helper-validator-option': 7.23.5 - browserslist: 4.23.0 - lru-cache: 5.1.1 - semver: 6.3.1 - dev: true - - /@babel/helper-environment-visitor@7.18.9: - resolution: {integrity: sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==} - engines: {node: '>=6.9.0'} - dev: true - - /@babel/helper-environment-visitor@7.22.20: - resolution: {integrity: sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==} - engines: {node: '>=6.9.0'} - dev: true - - /@babel/helper-function-name@7.23.0: - resolution: {integrity: sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/template': 7.24.0 - '@babel/types': 7.24.0 - dev: true - - /@babel/helper-hoist-variables@7.22.5: - resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.24.0 - dev: true - - /@babel/helper-module-imports@7.18.6: - resolution: {integrity: sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.19.3 - dev: true - - /@babel/helper-module-imports@7.24.3: - resolution: {integrity: sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.24.0 - dev: true - - /@babel/helper-module-transforms@7.19.0: - resolution: {integrity: sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-environment-visitor': 7.18.9 - '@babel/helper-module-imports': 7.18.6 - '@babel/helper-simple-access': 7.18.6 - '@babel/helper-split-export-declaration': 7.18.6 - '@babel/helper-validator-identifier': 7.19.1 - '@babel/template': 7.18.10 - '@babel/traverse': 7.24.1 - '@babel/types': 7.19.3 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/helper-module-transforms@7.23.3(@babel/core@7.24.4): - resolution: {integrity: sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.24.4 - '@babel/helper-environment-visitor': 7.22.20 - '@babel/helper-module-imports': 7.24.3 - '@babel/helper-simple-access': 7.22.5 - '@babel/helper-split-export-declaration': 7.22.6 - '@babel/helper-validator-identifier': 7.22.20 - dev: true - - /@babel/helper-plugin-utils@7.19.0: - resolution: {integrity: sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==} - engines: {node: '>=6.9.0'} - dev: true - - /@babel/helper-simple-access@7.18.6: - resolution: {integrity: sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.19.3 - dev: true - - /@babel/helper-simple-access@7.22.5: - resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.24.0 - dev: true - - /@babel/helper-split-export-declaration@7.18.6: - resolution: {integrity: sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.19.3 - dev: true - - /@babel/helper-split-export-declaration@7.22.6: - resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.24.0 - dev: true - - /@babel/helper-string-parser@7.18.10: - resolution: {integrity: sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==} - engines: {node: '>=6.9.0'} - dev: true - - /@babel/helper-string-parser@7.24.1: - resolution: {integrity: sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==} - engines: {node: '>=6.9.0'} - 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/helper-validator-identifier@7.22.20: - resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==} - engines: {node: '>=6.9.0'} - dev: true - - /@babel/helper-validator-option@7.18.6: - resolution: {integrity: sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==} - engines: {node: '>=6.9.0'} - dev: true - - /@babel/helper-validator-option@7.23.5: - resolution: {integrity: sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==} - engines: {node: '>=6.9.0'} - dev: true - - /@babel/helpers@7.19.0: - resolution: {integrity: sha512-DRBCKGwIEdqY3+rPJgG/dKfQy9+08rHIAJx8q2p+HSWP87s2HCrQmaAMMyMll2kIXKCW0cO1RdQskx15Xakftg==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/template': 7.18.10 - '@babel/traverse': 7.24.1 - '@babel/types': 7.19.3 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/helpers@7.24.4: - resolution: {integrity: sha512-FewdlZbSiwaVGlgT1DPANDuCHaDMiOo+D/IDYRFYjHOuv66xMSJ7fQwwODwRNAPkADIO/z1EoF/l2BCWlWABDw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/template': 7.24.0 - '@babel/traverse': 7.24.1 - '@babel/types': 7.24.0 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/highlight@7.18.6: - resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-validator-identifier': 7.19.1 - chalk: 2.4.2 - js-tokens: 4.0.0 - dev: true - - /@babel/highlight@7.24.2: - resolution: {integrity: sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-validator-identifier': 7.22.20 - chalk: 2.4.2 - js-tokens: 4.0.0 - picocolors: 1.0.0 - dev: true - - /@babel/parser@7.19.3: - resolution: {integrity: sha512-pJ9xOlNWHiy9+FuFP09DEAFbAn4JskgRsVcc169w2xRBC3FRGuQEwjeIMMND9L2zc0iEhO/tGv4Zq+km+hxNpQ==} - engines: {node: '>=6.0.0'} - hasBin: true - dependencies: - '@babel/types': 7.19.3 - dev: true - - /@babel/parser@7.24.4: - resolution: {integrity: sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==} - engines: {node: '>=6.0.0'} - hasBin: true - dependencies: - '@babel/types': 7.19.3 - dev: true - - /@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.19.3): - resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.19.3 - '@babel/helper-plugin-utils': 7.19.0 - dev: true - - /@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.19.3): - resolution: {integrity: sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.19.3 - '@babel/helper-plugin-utils': 7.19.0 - dev: true - - /@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.19.3): - resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.19.3 - '@babel/helper-plugin-utils': 7.19.0 - dev: true - - /@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.19.3): - resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.19.3 - '@babel/helper-plugin-utils': 7.19.0 - dev: true - - /@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.19.3): - resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.19.3 - '@babel/helper-plugin-utils': 7.19.0 - dev: true - - /@babel/plugin-syntax-jsx@7.18.6(@babel/core@7.19.3): - resolution: {integrity: sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.19.3 - '@babel/helper-plugin-utils': 7.19.0 - dev: true - - /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.19.3): - resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.19.3 - '@babel/helper-plugin-utils': 7.19.0 - dev: true - - /@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.19.3): - resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.19.3 - '@babel/helper-plugin-utils': 7.19.0 - dev: true - - /@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.19.3): - resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.19.3 - '@babel/helper-plugin-utils': 7.19.0 - dev: true - - /@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.19.3): - resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.19.3 - '@babel/helper-plugin-utils': 7.19.0 - dev: true - - /@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.19.3): - resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.19.3 - '@babel/helper-plugin-utils': 7.19.0 - dev: true - - /@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.19.3): - resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.19.3 - '@babel/helper-plugin-utils': 7.19.0 - dev: true - - /@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.19.3): - resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.19.3 - '@babel/helper-plugin-utils': 7.19.0 - dev: true - - /@babel/plugin-syntax-typescript@7.18.6(@babel/core@7.19.3): - resolution: {integrity: sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.19.3 - '@babel/helper-plugin-utils': 7.19.0 - dev: true - - /@babel/template@7.18.10: - resolution: {integrity: sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/code-frame': 7.18.6 - '@babel/parser': 7.19.3 - '@babel/types': 7.19.3 - dev: true - - /@babel/template@7.24.0: - resolution: {integrity: sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/code-frame': 7.24.2 - '@babel/parser': 7.24.4 - '@babel/types': 7.24.0 - dev: true - - /@babel/traverse@7.24.1: - resolution: {integrity: sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/code-frame': 7.24.2 - '@babel/generator': 7.24.4 - '@babel/helper-environment-visitor': 7.22.20 - '@babel/helper-function-name': 7.23.0 - '@babel/helper-hoist-variables': 7.22.5 - '@babel/helper-split-export-declaration': 7.22.6 - '@babel/parser': 7.24.4 - '@babel/types': 7.24.0 - debug: 4.3.4 - globals: 11.12.0 - transitivePeerDependencies: - - supports-color - dev: true - - /@babel/types@7.19.3: - resolution: {integrity: sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-string-parser': 7.18.10 - '@babel/helper-validator-identifier': 7.19.1 - to-fast-properties: 2.0.0 - dev: true - - /@babel/types@7.24.0: - resolution: {integrity: sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-string-parser': 7.24.1 - '@babel/helper-validator-identifier': 7.22.20 - to-fast-properties: 2.0.0 - dev: true - - /@bcoe/v8-coverage@0.2.3: - resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} - dev: true - - /@cspotcode/source-map-support@0.8.1: - resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} - engines: {node: '>=12'} - dependencies: - '@jridgewell/trace-mapping': 0.3.9 - - /@istanbuljs/load-nyc-config@1.1.0: - resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} - engines: {node: '>=8'} - dependencies: - camelcase: 5.3.1 - find-up: 4.1.0 - get-package-type: 0.1.0 - js-yaml: 3.14.1 - resolve-from: 5.0.0 - dev: true - - /@istanbuljs/schema@0.1.3: - resolution: {integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==} - engines: {node: '>=8'} - dev: true - - /@jest/console@29.7.0: - resolution: {integrity: sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/types': 29.6.3 - '@types/node': 18.19.32 - chalk: 4.1.2 - jest-message-util: 29.7.0 - jest-util: 29.7.0 - slash: 3.0.0 - dev: true - - /@jest/core@29.7.0(ts-node@10.9.2): - resolution: {integrity: sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - dependencies: - '@jest/console': 29.7.0 - '@jest/reporters': 29.7.0 - '@jest/test-result': 29.7.0 - '@jest/transform': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 18.19.32 - ansi-escapes: 4.3.2 - chalk: 4.1.2 - ci-info: 3.4.0 - exit: 0.1.2 - graceful-fs: 4.2.10 - jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@18.19.32)(ts-node@10.9.2) - jest-haste-map: 29.7.0 - jest-message-util: 29.7.0 - jest-regex-util: 29.6.3 - jest-resolve: 29.7.0 - jest-resolve-dependencies: 29.7.0 - jest-runner: 29.7.0 - jest-runtime: 29.7.0 - jest-snapshot: 29.7.0 - jest-util: 29.7.0 - jest-validate: 29.7.0 - jest-watcher: 29.7.0 - micromatch: 4.0.5 - pretty-format: 29.7.0 - slash: 3.0.0 - strip-ansi: 6.0.1 - transitivePeerDependencies: - - babel-plugin-macros - - supports-color - - ts-node - dev: true - - /@jest/environment@29.7.0: - resolution: {integrity: sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/fake-timers': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 18.19.32 - jest-mock: 29.7.0 - dev: true - - /@jest/expect-utils@29.1.2: - resolution: {integrity: sha512-4a48bhKfGj/KAH39u0ppzNTABXQ8QPccWAFUFobWBaEMSMp+sB31Z2fK/l47c4a/Mu1po2ffmfAIPxXbVTXdtg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - jest-get-type: 29.0.0 - dev: true - - /@jest/expect-utils@29.7.0: - resolution: {integrity: sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - jest-get-type: 29.6.3 - dev: true - - /@jest/expect@29.7.0: - resolution: {integrity: sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - expect: 29.7.0 - jest-snapshot: 29.7.0 - transitivePeerDependencies: - - supports-color - dev: true - - /@jest/fake-timers@29.7.0: - resolution: {integrity: sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/types': 29.6.3 - '@sinonjs/fake-timers': 10.3.0 - '@types/node': 18.19.32 - jest-message-util: 29.7.0 - jest-mock: 29.7.0 - jest-util: 29.7.0 - dev: true - - /@jest/globals@29.7.0: - resolution: {integrity: sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/environment': 29.7.0 - '@jest/expect': 29.7.0 - '@jest/types': 29.6.3 - jest-mock: 29.7.0 - transitivePeerDependencies: - - supports-color - dev: true - - /@jest/reporters@29.7.0: - resolution: {integrity: sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - dependencies: - '@bcoe/v8-coverage': 0.2.3 - '@jest/console': 29.7.0 - '@jest/test-result': 29.7.0 - '@jest/transform': 29.7.0 - '@jest/types': 29.6.3 - '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 18.19.32 - chalk: 4.1.2 - collect-v8-coverage: 1.0.1 - exit: 0.1.2 - glob: 7.2.3 - graceful-fs: 4.2.10 - istanbul-lib-coverage: 3.2.0 - istanbul-lib-instrument: 6.0.2 - istanbul-lib-report: 3.0.0 - istanbul-lib-source-maps: 4.0.1 - istanbul-reports: 3.1.5 - jest-message-util: 29.7.0 - jest-util: 29.7.0 - jest-worker: 29.7.0 - slash: 3.0.0 - string-length: 4.0.2 - strip-ansi: 6.0.1 - v8-to-istanbul: 9.0.1 - transitivePeerDependencies: - - supports-color - dev: true - - /@jest/schemas@29.0.0: - resolution: {integrity: sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@sinclair/typebox': 0.24.44 - dev: true - - /@jest/schemas@29.6.3: - resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@sinclair/typebox': 0.27.8 - dev: true - - /@jest/source-map@29.6.3: - resolution: {integrity: sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jridgewell/trace-mapping': 0.3.25 - callsites: 3.1.0 - graceful-fs: 4.2.10 - dev: true - - /@jest/test-result@29.7.0: - resolution: {integrity: sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/console': 29.7.0 - '@jest/types': 29.6.3 - '@types/istanbul-lib-coverage': 2.0.4 - collect-v8-coverage: 1.0.1 - dev: true - - /@jest/test-sequencer@29.7.0: - resolution: {integrity: sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/test-result': 29.7.0 - graceful-fs: 4.2.10 - jest-haste-map: 29.7.0 - slash: 3.0.0 - dev: true - - /@jest/transform@29.7.0: - resolution: {integrity: sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@babel/core': 7.19.3 - '@jest/types': 29.6.3 - '@jridgewell/trace-mapping': 0.3.25 - babel-plugin-istanbul: 6.1.1 - chalk: 4.1.2 - convert-source-map: 2.0.0 - fast-json-stable-stringify: 2.1.0 - graceful-fs: 4.2.10 - jest-haste-map: 29.7.0 - jest-regex-util: 29.6.3 - jest-util: 29.7.0 - micromatch: 4.0.5 - pirates: 4.0.5 - slash: 3.0.0 - write-file-atomic: 4.0.2 - transitivePeerDependencies: - - supports-color - dev: true - - /@jest/types@29.1.2: - resolution: {integrity: sha512-DcXGtoTykQB5jiwCmVr8H4vdg2OJhQex3qPkG+ISyDO7xQXbt/4R6dowcRyPemRnkH7JoHvZuxPBdlq+9JxFCg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/schemas': 29.0.0 - '@types/istanbul-lib-coverage': 2.0.4 - '@types/istanbul-reports': 3.0.1 - '@types/node': 18.19.32 - '@types/yargs': 17.0.13 - chalk: 4.1.2 - dev: true - - /@jest/types@29.6.3: - resolution: {integrity: sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/schemas': 29.6.3 - '@types/istanbul-lib-coverage': 2.0.4 - '@types/istanbul-reports': 3.0.1 - '@types/node': 18.19.32 - '@types/yargs': 17.0.13 - chalk: 4.1.2 - dev: true - - /@jridgewell/gen-mapping@0.1.1: - resolution: {integrity: sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==} - engines: {node: '>=6.0.0'} - dependencies: - '@jridgewell/set-array': 1.1.2 - '@jridgewell/sourcemap-codec': 1.4.14 - dev: true - - /@jridgewell/gen-mapping@0.3.2: - resolution: {integrity: sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==} - engines: {node: '>=6.0.0'} - dependencies: - '@jridgewell/set-array': 1.1.2 - '@jridgewell/sourcemap-codec': 1.4.14 - '@jridgewell/trace-mapping': 0.3.15 - dev: true - - /@jridgewell/gen-mapping@0.3.5: - resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} - engines: {node: '>=6.0.0'} - dependencies: - '@jridgewell/set-array': 1.2.1 - '@jridgewell/sourcemap-codec': 1.4.14 - '@jridgewell/trace-mapping': 0.3.25 - dev: true - - /@jridgewell/resolve-uri@3.1.0: - resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} - engines: {node: '>=6.0.0'} - - /@jridgewell/set-array@1.1.2: - resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} - engines: {node: '>=6.0.0'} - dev: true - - /@jridgewell/set-array@1.2.1: - resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} - engines: {node: '>=6.0.0'} - dev: true - - /@jridgewell/sourcemap-codec@1.4.14: - resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} - - /@jridgewell/trace-mapping@0.3.15: - resolution: {integrity: sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==} - dependencies: - '@jridgewell/resolve-uri': 3.1.0 - '@jridgewell/sourcemap-codec': 1.4.14 - dev: true - - /@jridgewell/trace-mapping@0.3.25: - resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} - dependencies: - '@jridgewell/resolve-uri': 3.1.0 - '@jridgewell/sourcemap-codec': 1.4.14 - dev: true - - /@jridgewell/trace-mapping@0.3.9: - resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} - dependencies: - '@jridgewell/resolve-uri': 3.1.0 - '@jridgewell/sourcemap-codec': 1.4.14 - - /@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: false - - /@nodelib/fs.stat@2.0.5: - resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} - engines: {node: '>= 8'} - dev: false - - /@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.13.0 - dev: false - - /@sinclair/typebox@0.24.44: - resolution: {integrity: sha512-ka0W0KN5i6LfrSocduwliMMpqVgohtPFidKdMEOUjoOFCHcOOYkKsPRxfs5f15oPNHTm6ERAm0GV/+/LTKeiWg==} - dev: true - - /@sinclair/typebox@0.27.8: - resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} - dev: true - - /@sinonjs/commons@3.0.1: - resolution: {integrity: sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==} - dependencies: - type-detect: 4.0.8 - dev: true - - /@sinonjs/fake-timers@10.3.0: - resolution: {integrity: sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==} - dependencies: - '@sinonjs/commons': 3.0.1 - dev: true - - /@tsconfig/node10@1.0.9: - resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==} - - /@tsconfig/node12@1.0.11: - resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} - - /@tsconfig/node14@1.0.3: - resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} - - /@tsconfig/node16@1.0.3: - resolution: {integrity: sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==} - - /@types/babel__core@7.1.19: - resolution: {integrity: sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==} - dependencies: - '@babel/parser': 7.19.3 - '@babel/types': 7.19.3 - '@types/babel__generator': 7.6.4 - '@types/babel__template': 7.4.1 - '@types/babel__traverse': 7.18.2 - dev: true - - /@types/babel__generator@7.6.4: - resolution: {integrity: sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==} - dependencies: - '@babel/types': 7.19.3 - dev: true - - /@types/babel__template@7.4.1: - resolution: {integrity: sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==} - dependencies: - '@babel/parser': 7.19.3 - '@babel/types': 7.19.3 - dev: true - - /@types/babel__traverse@7.18.2: - resolution: {integrity: sha512-FcFaxOr2V5KZCviw1TnutEMVUVsGt4D2hP1TAfXZAMKuHYW3xQhe3jTxNPWutgCJ3/X1c5yX8ZoGVEItxKbwBg==} - dependencies: - '@babel/types': 7.19.3 - dev: true - - /@types/fs-extra@11.0.4: - resolution: {integrity: sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==} - dependencies: - '@types/jsonfile': 6.1.4 - '@types/node': 18.19.32 - dev: false - - /@types/graceful-fs@4.1.5: - resolution: {integrity: sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==} - dependencies: - '@types/node': 18.19.32 - dev: true - - /@types/istanbul-lib-coverage@2.0.4: - resolution: {integrity: sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==} - dev: true - - /@types/istanbul-lib-report@3.0.0: - resolution: {integrity: sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==} - dependencies: - '@types/istanbul-lib-coverage': 2.0.4 - dev: true - - /@types/istanbul-reports@3.0.1: - resolution: {integrity: sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==} - dependencies: - '@types/istanbul-lib-report': 3.0.0 - dev: true - - /@types/jest@29.5.12: - resolution: {integrity: sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==} - dependencies: - expect: 29.1.2 - pretty-format: 29.1.2 - dev: true - - /@types/jsonfile@6.1.4: - resolution: {integrity: sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==} - dependencies: - '@types/node': 18.19.32 - dev: false - - /@types/minimist@1.2.2: - resolution: {integrity: sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==} - dev: false - - /@types/node@18.19.32: - resolution: {integrity: sha512-2bkg93YBSDKk8DLmmHnmj/Rwr18TLx7/n+I23BigFwgexUJoMHZOd8X1OFxuF/W3NN0S2W2E5sVabI5CPinNvA==} - dependencies: - undici-types: 5.26.5 - - /@types/ps-tree@1.1.2: - resolution: {integrity: sha512-ZREFYlpUmPQJ0esjxoG1fMvB2HNaD3z+mjqdSosZvd3RalncI9NEur73P8ZJz4YQdL64CmV1w0RuqoRUlhQRBw==} - dev: false - - /@types/stack-utils@2.0.1: - resolution: {integrity: sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==} - dev: true - - /@types/which@3.0.3: - resolution: {integrity: sha512-2C1+XoY0huExTbs8MQv1DuS5FS86+SEjdM9F/+GS61gg5Hqbtj8ZiDSx8MfWcyei907fIPbfPGCOrNUTnVHY1g==} - dev: false - - /@types/yargs-parser@21.0.0: - resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==} - dev: true - - /@types/yargs@17.0.13: - resolution: {integrity: sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg==} - dependencies: - '@types/yargs-parser': 21.0.0 - dev: true - - /acorn-walk@8.2.0: - resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} - engines: {node: '>=0.4.0'} - - /acorn@8.8.0: - resolution: {integrity: sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==} - engines: {node: '>=0.4.0'} - hasBin: true - - /ansi-escapes@4.3.2: - resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} - engines: {node: '>=8'} - dependencies: - type-fest: 0.21.3 - 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 - - /ansi-styles@5.2.0: - resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} - engines: {node: '>=10'} - dev: true - - /anymatch@3.1.2: - resolution: {integrity: sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==} - engines: {node: '>= 8'} - dependencies: - normalize-path: 3.0.0 - picomatch: 2.3.1 - dev: true - - /arg@4.1.3: - resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} - - /argparse@1.0.10: - resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} - dependencies: - sprintf-js: 1.0.3 - dev: true - - /babel-jest@29.7.0(@babel/core@7.19.3): - resolution: {integrity: sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - '@babel/core': ^7.8.0 - dependencies: - '@babel/core': 7.19.3 - '@jest/transform': 29.7.0 - '@types/babel__core': 7.1.19 - babel-plugin-istanbul: 6.1.1 - babel-preset-jest: 29.6.3(@babel/core@7.19.3) - chalk: 4.1.2 - graceful-fs: 4.2.10 - slash: 3.0.0 - transitivePeerDependencies: - - supports-color - dev: true - - /babel-plugin-istanbul@6.1.1: - resolution: {integrity: sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==} - engines: {node: '>=8'} - dependencies: - '@babel/helper-plugin-utils': 7.19.0 - '@istanbuljs/load-nyc-config': 1.1.0 - '@istanbuljs/schema': 0.1.3 - istanbul-lib-instrument: 5.2.1 - test-exclude: 6.0.0 - transitivePeerDependencies: - - supports-color - dev: true - - /babel-plugin-jest-hoist@29.6.3: - resolution: {integrity: sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@babel/template': 7.18.10 - '@babel/types': 7.19.3 - '@types/babel__core': 7.1.19 - '@types/babel__traverse': 7.18.2 - dev: true - - /babel-preset-current-node-syntax@1.0.1(@babel/core@7.19.3): - resolution: {integrity: sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.19.3 - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.19.3) - '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.19.3) - '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.19.3) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.19.3) - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.19.3) - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.19.3) - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.19.3) - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.19.3) - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.19.3) - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.19.3) - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.19.3) - '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.19.3) - dev: true - - /babel-preset-jest@29.6.3(@babel/core@7.19.3): - resolution: {integrity: sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.19.3 - babel-plugin-jest-hoist: 29.6.3 - babel-preset-current-node-syntax: 1.0.1(@babel/core@7.19.3) - dev: true - - /balanced-match@1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - dev: true - - /brace-expansion@1.1.11: - resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} - dependencies: - balanced-match: 1.0.2 - concat-map: 0.0.1 - dev: true - - /braces@3.0.2: - resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} - engines: {node: '>=8'} - dependencies: - fill-range: 7.0.1 - - /browserslist@4.21.4: - resolution: {integrity: sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==} - engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} - hasBin: true - dependencies: - caniuse-lite: 1.0.30001418 - electron-to-chromium: 1.4.275 - node-releases: 2.0.6 - update-browserslist-db: 1.0.10(browserslist@4.21.4) - dev: true - - /browserslist@4.23.0: - resolution: {integrity: sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==} - engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} - hasBin: true - dependencies: - caniuse-lite: 1.0.30001607 - electron-to-chromium: 1.4.730 - node-releases: 2.0.14 - update-browserslist-db: 1.0.13(browserslist@4.23.0) - dev: true - - /bs-logger@0.2.6: - resolution: {integrity: sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==} - engines: {node: '>= 6'} - dependencies: - fast-json-stable-stringify: 2.1.0 - dev: true - - /bser@2.1.1: - resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==} - dependencies: - node-int64: 0.4.0 - dev: true - - /buffer-from@1.1.2: - resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - dev: true - - /callsites@3.1.0: - resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} - engines: {node: '>=6'} - dev: true - - /camelcase@5.3.1: - resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} - engines: {node: '>=6'} - dev: true - - /camelcase@6.3.0: - resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} - engines: {node: '>=10'} - dev: true - - /caniuse-lite@1.0.30001418: - resolution: {integrity: sha512-oIs7+JL3K9JRQ3jPZjlH6qyYDp+nBTCais7hjh0s+fuBwufc7uZ7hPYMXrDOJhV360KGMTcczMRObk0/iMqZRg==} - dev: true - - /caniuse-lite@1.0.30001607: - resolution: {integrity: sha512-WcvhVRjXLKFB/kmOFVwELtMxyhq3iM/MvmXcyCe2PNf166c39mptscOc/45TTS96n2gpNV2z7+NakArTWZCQ3w==} - 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 - - /chalk@5.3.0: - resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==} - engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} - dev: false - - /char-regex@1.0.2: - resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} - engines: {node: '>=10'} - dev: true - - /ci-info@3.4.0: - resolution: {integrity: sha512-t5QdPT5jq3o262DOQ8zA6E1tlH2upmUc4Hlvrbx1pGYJuiiHl7O7rvVNI+l8HTVhd/q3Qc9vqimkNk5yiXsAug==} - dev: true - - /cjs-module-lexer@1.2.2: - resolution: {integrity: sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==} - 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 - - /co@4.6.0: - resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==} - engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} - dev: true - - /collect-v8-coverage@1.0.1: - resolution: {integrity: sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==} - 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 - - /concat-map@0.0.1: - resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} - dev: true - - /convert-source-map@1.8.0: - resolution: {integrity: sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==} - dependencies: - safe-buffer: 5.1.2 - dev: true - - /convert-source-map@2.0.0: - resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} - dev: true - - /create-jest@29.7.0(@types/node@18.19.32)(ts-node@10.9.2): - resolution: {integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - hasBin: true - dependencies: - '@jest/types': 29.6.3 - chalk: 4.1.2 - exit: 0.1.2 - graceful-fs: 4.2.10 - jest-config: 29.7.0(@types/node@18.19.32)(ts-node@10.9.2) - jest-util: 29.7.0 - prompts: 2.4.2 - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - dev: true - - /create-require@1.1.1: - resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} - - /cross-spawn@7.0.3: - resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} - engines: {node: '>= 8'} - dependencies: - path-key: 3.1.1 - shebang-command: 2.0.0 - which: 2.0.2 - dev: true - - /data-uri-to-buffer@4.0.0: - resolution: {integrity: sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA==} - engines: {node: '>= 12'} - dev: false - - /debug@4.3.4: - resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.1.2 - dev: true - - /dedent@1.5.1: - resolution: {integrity: sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==} - peerDependencies: - babel-plugin-macros: ^3.1.0 - peerDependenciesMeta: - babel-plugin-macros: - optional: true - dev: true - - /deepmerge@4.2.2: - resolution: {integrity: sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==} - engines: {node: '>=0.10.0'} - dev: true - - /detect-newline@3.1.0: - resolution: {integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==} - engines: {node: '>=8'} - dev: true - - /diff-sequences@29.0.0: - resolution: {integrity: sha512-7Qe/zd1wxSDL4D/X/FPjOMB+ZMDt71W94KYaq05I2l0oQqgXgs7s4ftYYmV38gBSrPz2vcygxfs1xn0FT+rKNA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dev: true - - /diff-sequences@29.6.3: - resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dev: true - - /diff@4.0.2: - resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} - engines: {node: '>=0.3.1'} - - /dir-glob@3.0.1: - resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} - engines: {node: '>=8'} - dependencies: - path-type: 4.0.0 - dev: false - - /duplexer@0.1.2: - resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} - dev: false - - /electron-to-chromium@1.4.275: - resolution: {integrity: sha512-aJeQQ+Hl9Jyyzv4chBqYJwmVRY46N5i2BEX5Cuyk/5gFCUZ5F3i7Hnba6snZftWla7Gglwc5pIgcd+E7cW+rPg==} - dev: true - - /electron-to-chromium@1.4.730: - resolution: {integrity: sha512-oJRPo82XEqtQAobHpJIR3zW5YO3sSRRkPz2an4yxi1UvqhsGm54vR/wzTFV74a3soDOJ8CKW7ajOOX5ESzddwg==} - dev: true - - /emittery@0.13.1: - resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==} - engines: {node: '>=12'} - dev: true - - /emoji-regex@8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - dev: true - - /error-ex@1.3.2: - resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} - dependencies: - is-arrayish: 0.2.1 - dev: true - - /escalade@3.1.1: - resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} - engines: {node: '>=6'} - dev: true - - /escape-string-regexp@1.0.5: - resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} - engines: {node: '>=0.8.0'} - dev: true - - /escape-string-regexp@2.0.0: - resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} - engines: {node: '>=8'} - dev: true - - /esprima@4.0.1: - resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} - engines: {node: '>=4'} - hasBin: true - dev: true - - /event-stream@3.3.4: - resolution: {integrity: sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=} - dependencies: - duplexer: 0.1.2 - from: 0.1.7 - map-stream: 0.1.0 - pause-stream: 0.0.11 - split: 0.3.3 - stream-combiner: 0.0.4 - through: 2.3.8 - dev: false - - /execa@5.1.1: - resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} - engines: {node: '>=10'} - dependencies: - cross-spawn: 7.0.3 - get-stream: 6.0.1 - human-signals: 2.1.0 - is-stream: 2.0.1 - merge-stream: 2.0.0 - npm-run-path: 4.0.1 - onetime: 5.1.2 - signal-exit: 3.0.7 - strip-final-newline: 2.0.0 - dev: true - - /exit@0.1.2: - resolution: {integrity: sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==} - engines: {node: '>= 0.8.0'} - dev: true - - /expect@29.1.2: - resolution: {integrity: sha512-AuAGn1uxva5YBbBlXb+2JPxJRuemZsmlGcapPXWNSBNsQtAULfjioREGBWuI0EOvYUKjDnrCy8PW5Zlr1md5mw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/expect-utils': 29.1.2 - jest-get-type: 29.0.0 - jest-matcher-utils: 29.1.2 - jest-message-util: 29.1.2 - jest-util: 29.1.2 - dev: true - - /expect@29.7.0: - resolution: {integrity: sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/expect-utils': 29.7.0 - jest-get-type: 29.6.3 - jest-matcher-utils: 29.7.0 - jest-message-util: 29.7.0 - jest-util: 29.7.0 - 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: false - - /fast-json-stable-stringify@2.1.0: - resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} - dev: true - - /fastq@1.13.0: - resolution: {integrity: sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==} - dependencies: - reusify: 1.0.4 - dev: false - - /fb-watchman@2.0.2: - resolution: {integrity: sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==} - dependencies: - bser: 2.1.1 - dev: true - - /fetch-blob@3.2.0: - resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} - engines: {node: ^12.20 || >= 14.13} - dependencies: - node-domexception: 1.0.0 - web-streams-polyfill: 3.2.1 - dev: false - - /fill-range@7.0.1: - resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} - engines: {node: '>=8'} - dependencies: - to-regex-range: 5.0.1 - - /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 - - /formdata-polyfill@4.0.10: - resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==} - engines: {node: '>=12.20.0'} - dependencies: - fetch-blob: 3.2.0 - dev: false - - /from@0.1.7: - resolution: {integrity: sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g==} - dev: false - - /fs-extra@11.2.0: - resolution: {integrity: sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==} - engines: {node: '>=14.14'} - dependencies: - graceful-fs: 4.2.10 - jsonfile: 6.1.0 - universalify: 2.0.0 - dev: false - - /fs.realpath@1.0.0: - resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - dev: true - - /fsevents@2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} - engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /function-bind@1.1.1: - resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} - dev: true - - /fx@34.0.0: - resolution: {integrity: sha512-/fZih3/WLsrtlaj2mahjWxAmyuikmcl3D5kKPqLtFmEilLsy9wp0+/vEmfvYXXhwJc+ajtCFDCf+yttXmPMHSQ==} - hasBin: true - dev: false - - /gensync@1.0.0-beta.2: - resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} - engines: {node: '>=6.9.0'} - dev: true - - /get-caller-file@2.0.5: - resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} - engines: {node: 6.* || 8.* || >= 10.*} - dev: true - - /get-package-type@0.1.0: - resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} - engines: {node: '>=8.0.0'} - dev: true - - /get-stream@6.0.1: - resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} - engines: {node: '>=10'} - dev: true - - /glob-parent@5.1.2: - resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} - engines: {node: '>= 6'} - dependencies: - is-glob: 4.0.3 - dev: false - - /glob@7.2.3: - resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 - dev: true - - /globals@11.12.0: - resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} - engines: {node: '>=4'} - dev: true - - /globby@13.2.2: - resolution: {integrity: sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - dir-glob: 3.0.1 - fast-glob: 3.3.2 - ignore: 5.3.1 - merge2: 1.4.1 - slash: 4.0.0 - dev: false - - /graceful-fs@4.2.10: - resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} - - /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@1.0.3: - resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} - engines: {node: '>= 0.4.0'} - dependencies: - function-bind: 1.1.1 - dev: true - - /html-escaper@2.0.2: - resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} - dev: true - - /human-signals@2.1.0: - resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} - engines: {node: '>=10.17.0'} - dev: true - - /ignore@5.3.1: - resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} - engines: {node: '>= 4'} - dev: false - - /import-local@3.1.0: - resolution: {integrity: sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==} - engines: {node: '>=8'} - hasBin: true - dependencies: - pkg-dir: 4.2.0 - resolve-cwd: 3.0.0 - dev: true - - /imurmurhash@0.1.4: - resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} - engines: {node: '>=0.8.19'} - dev: true - - /inflight@1.0.6: - resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - dev: true - - /inherits@2.0.4: - resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - dev: true - - /is-arrayish@0.2.1: - resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} - dev: true - - /is-core-module@2.10.0: - resolution: {integrity: sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==} - dependencies: - has: 1.0.3 - dev: true - - /is-extglob@2.1.1: - resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} - engines: {node: '>=0.10.0'} - dev: false - - /is-fullwidth-code-point@3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} - engines: {node: '>=8'} - dev: true - - /is-generator-fn@2.1.0: - resolution: {integrity: sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==} - engines: {node: '>=6'} - dev: true - - /is-glob@4.0.3: - resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} - engines: {node: '>=0.10.0'} - dependencies: - is-extglob: 2.1.1 - dev: false - - /is-number@7.0.0: - resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} - engines: {node: '>=0.12.0'} - - /is-stream@2.0.1: - resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} - engines: {node: '>=8'} - dev: true - - /isexe@2.0.0: - resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - - /istanbul-lib-coverage@3.2.0: - resolution: {integrity: sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==} - engines: {node: '>=8'} - dev: true - - /istanbul-lib-instrument@5.2.1: - resolution: {integrity: sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==} - engines: {node: '>=8'} - dependencies: - '@babel/core': 7.19.3 - '@babel/parser': 7.19.3 - '@istanbuljs/schema': 0.1.3 - istanbul-lib-coverage: 3.2.0 - semver: 6.3.0 - transitivePeerDependencies: - - supports-color - dev: true - - /istanbul-lib-instrument@6.0.2: - resolution: {integrity: sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw==} - engines: {node: '>=10'} - dependencies: - '@babel/core': 7.24.4 - '@babel/parser': 7.24.4 - '@istanbuljs/schema': 0.1.3 - istanbul-lib-coverage: 3.2.0 - semver: 7.6.0 - transitivePeerDependencies: - - supports-color - dev: true - - /istanbul-lib-report@3.0.0: - resolution: {integrity: sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==} - engines: {node: '>=8'} - dependencies: - istanbul-lib-coverage: 3.2.0 - make-dir: 3.1.0 - supports-color: 7.2.0 - dev: true - - /istanbul-lib-source-maps@4.0.1: - resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==} - engines: {node: '>=10'} - dependencies: - debug: 4.3.4 - istanbul-lib-coverage: 3.2.0 - source-map: 0.6.1 - transitivePeerDependencies: - - supports-color - dev: true - - /istanbul-reports@3.1.5: - resolution: {integrity: sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==} - engines: {node: '>=8'} - dependencies: - html-escaper: 2.0.2 - istanbul-lib-report: 3.0.0 - dev: true - - /jest-changed-files@29.7.0: - resolution: {integrity: sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - execa: 5.1.1 - jest-util: 29.7.0 - p-limit: 3.1.0 - dev: true - - /jest-circus@29.7.0: - resolution: {integrity: sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/environment': 29.7.0 - '@jest/expect': 29.7.0 - '@jest/test-result': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 18.19.32 - chalk: 4.1.2 - co: 4.6.0 - dedent: 1.5.1 - is-generator-fn: 2.1.0 - jest-each: 29.7.0 - jest-matcher-utils: 29.7.0 - jest-message-util: 29.7.0 - jest-runtime: 29.7.0 - jest-snapshot: 29.7.0 - jest-util: 29.7.0 - p-limit: 3.1.0 - pretty-format: 29.7.0 - pure-rand: 6.1.0 - slash: 3.0.0 - stack-utils: 2.0.5 - transitivePeerDependencies: - - babel-plugin-macros - - supports-color - dev: true - - /jest-cli@29.7.0(@types/node@18.19.32)(ts-node@10.9.2): - resolution: {integrity: sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - hasBin: true - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2) - '@jest/test-result': 29.7.0 - '@jest/types': 29.6.3 - chalk: 4.1.2 - create-jest: 29.7.0(@types/node@18.19.32)(ts-node@10.9.2) - exit: 0.1.2 - import-local: 3.1.0 - jest-config: 29.7.0(@types/node@18.19.32)(ts-node@10.9.2) - jest-util: 29.7.0 - jest-validate: 29.7.0 - yargs: 17.6.0 - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - dev: true - - /jest-config@29.7.0(@types/node@18.19.32)(ts-node@10.9.2): - resolution: {integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - '@types/node': '*' - ts-node: '>=9.0.0' - peerDependenciesMeta: - '@types/node': - optional: true - ts-node: - optional: true - dependencies: - '@babel/core': 7.19.3 - '@jest/test-sequencer': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 18.19.32 - babel-jest: 29.7.0(@babel/core@7.19.3) - chalk: 4.1.2 - ci-info: 3.4.0 - deepmerge: 4.2.2 - glob: 7.2.3 - graceful-fs: 4.2.10 - jest-circus: 29.7.0 - jest-environment-node: 29.7.0 - jest-get-type: 29.6.3 - jest-regex-util: 29.6.3 - jest-resolve: 29.7.0 - jest-runner: 29.7.0 - jest-util: 29.7.0 - jest-validate: 29.7.0 - micromatch: 4.0.5 - parse-json: 5.2.0 - pretty-format: 29.7.0 - slash: 3.0.0 - strip-json-comments: 3.1.1 - ts-node: 10.9.2(@types/node@18.19.32)(typescript@5.4.5) - transitivePeerDependencies: - - babel-plugin-macros - - supports-color - dev: true - - /jest-diff@29.1.2: - resolution: {integrity: sha512-4GQts0aUopVvecIT4IwD/7xsBaMhKTYoM4/njE/aVw9wpw+pIUVp8Vab/KnSzSilr84GnLBkaP3JLDnQYCKqVQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - chalk: 4.1.2 - diff-sequences: 29.0.0 - jest-get-type: 29.0.0 - pretty-format: 29.1.2 - dev: true - - /jest-diff@29.7.0: - resolution: {integrity: sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - chalk: 4.1.2 - diff-sequences: 29.6.3 - jest-get-type: 29.6.3 - pretty-format: 29.7.0 - dev: true - - /jest-docblock@29.7.0: - resolution: {integrity: sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - detect-newline: 3.1.0 - dev: true - - /jest-each@29.7.0: - resolution: {integrity: sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/types': 29.6.3 - chalk: 4.1.2 - jest-get-type: 29.6.3 - jest-util: 29.7.0 - pretty-format: 29.7.0 - dev: true - - /jest-environment-node@29.7.0: - resolution: {integrity: sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/environment': 29.7.0 - '@jest/fake-timers': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 18.19.32 - jest-mock: 29.7.0 - jest-util: 29.7.0 - dev: true - - /jest-get-type@29.0.0: - resolution: {integrity: sha512-83X19z/HuLKYXYHskZlBAShO7UfLFXu/vWajw9ZNJASN32li8yHMaVGAQqxFW1RCFOkB7cubaL6FaJVQqqJLSw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dev: true - - /jest-get-type@29.6.3: - resolution: {integrity: sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dev: true - - /jest-haste-map@29.7.0: - resolution: {integrity: sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/types': 29.6.3 - '@types/graceful-fs': 4.1.5 - '@types/node': 18.19.32 - anymatch: 3.1.2 - fb-watchman: 2.0.2 - graceful-fs: 4.2.10 - jest-regex-util: 29.6.3 - jest-util: 29.7.0 - jest-worker: 29.7.0 - micromatch: 4.0.5 - walker: 1.0.8 - optionalDependencies: - fsevents: 2.3.2 - dev: true - - /jest-leak-detector@29.7.0: - resolution: {integrity: sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - jest-get-type: 29.6.3 - pretty-format: 29.7.0 - dev: true - - /jest-matcher-utils@29.1.2: - resolution: {integrity: sha512-MV5XrD3qYSW2zZSHRRceFzqJ39B2z11Qv0KPyZYxnzDHFeYZGJlgGi0SW+IXSJfOewgJp/Km/7lpcFT+cgZypw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - chalk: 4.1.2 - jest-diff: 29.1.2 - jest-get-type: 29.0.0 - pretty-format: 29.1.2 - dev: true - - /jest-matcher-utils@29.7.0: - resolution: {integrity: sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - chalk: 4.1.2 - jest-diff: 29.7.0 - jest-get-type: 29.6.3 - pretty-format: 29.7.0 - dev: true - - /jest-message-util@29.1.2: - resolution: {integrity: sha512-9oJ2Os+Qh6IlxLpmvshVbGUiSkZVc2FK+uGOm6tghafnB2RyjKAxMZhtxThRMxfX1J1SOMhTn9oK3/MutRWQJQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@babel/code-frame': 7.18.6 - '@jest/types': 29.1.2 - '@types/stack-utils': 2.0.1 - chalk: 4.1.2 - graceful-fs: 4.2.10 - micromatch: 4.0.5 - pretty-format: 29.1.2 - slash: 3.0.0 - stack-utils: 2.0.5 - dev: true - - /jest-message-util@29.7.0: - resolution: {integrity: sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@babel/code-frame': 7.18.6 - '@jest/types': 29.6.3 - '@types/stack-utils': 2.0.1 - chalk: 4.1.2 - graceful-fs: 4.2.10 - micromatch: 4.0.5 - pretty-format: 29.7.0 - slash: 3.0.0 - stack-utils: 2.0.5 - dev: true - - /jest-mock@29.7.0: - resolution: {integrity: sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/types': 29.6.3 - '@types/node': 18.19.32 - jest-util: 29.7.0 - dev: true - - /jest-pnp-resolver@1.2.2(jest-resolve@29.7.0): - resolution: {integrity: sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==} - engines: {node: '>=6'} - peerDependencies: - jest-resolve: '*' - peerDependenciesMeta: - jest-resolve: - optional: true - dependencies: - jest-resolve: 29.7.0 - dev: true - - /jest-regex-util@29.6.3: - resolution: {integrity: sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dev: true - - /jest-resolve-dependencies@29.7.0: - resolution: {integrity: sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - jest-regex-util: 29.6.3 - jest-snapshot: 29.7.0 - transitivePeerDependencies: - - supports-color - dev: true - - /jest-resolve@29.7.0: - resolution: {integrity: sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - chalk: 4.1.2 - graceful-fs: 4.2.10 - jest-haste-map: 29.7.0 - jest-pnp-resolver: 1.2.2(jest-resolve@29.7.0) - jest-util: 29.7.0 - jest-validate: 29.7.0 - resolve: 1.22.1 - resolve.exports: 2.0.2 - slash: 3.0.0 - dev: true - - /jest-runner@29.7.0: - resolution: {integrity: sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/console': 29.7.0 - '@jest/environment': 29.7.0 - '@jest/test-result': 29.7.0 - '@jest/transform': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 18.19.32 - chalk: 4.1.2 - emittery: 0.13.1 - graceful-fs: 4.2.10 - jest-docblock: 29.7.0 - jest-environment-node: 29.7.0 - jest-haste-map: 29.7.0 - jest-leak-detector: 29.7.0 - jest-message-util: 29.7.0 - jest-resolve: 29.7.0 - jest-runtime: 29.7.0 - jest-util: 29.7.0 - jest-watcher: 29.7.0 - jest-worker: 29.7.0 - p-limit: 3.1.0 - source-map-support: 0.5.13 - transitivePeerDependencies: - - supports-color - dev: true - - /jest-runtime@29.7.0: - resolution: {integrity: sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/environment': 29.7.0 - '@jest/fake-timers': 29.7.0 - '@jest/globals': 29.7.0 - '@jest/source-map': 29.6.3 - '@jest/test-result': 29.7.0 - '@jest/transform': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 18.19.32 - chalk: 4.1.2 - cjs-module-lexer: 1.2.2 - collect-v8-coverage: 1.0.1 - glob: 7.2.3 - graceful-fs: 4.2.10 - jest-haste-map: 29.7.0 - jest-message-util: 29.7.0 - jest-mock: 29.7.0 - jest-regex-util: 29.6.3 - jest-resolve: 29.7.0 - jest-snapshot: 29.7.0 - jest-util: 29.7.0 - slash: 3.0.0 - strip-bom: 4.0.0 - transitivePeerDependencies: - - supports-color - dev: true - - /jest-snapshot@29.7.0: - resolution: {integrity: sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@babel/core': 7.19.3 - '@babel/generator': 7.19.3 - '@babel/plugin-syntax-jsx': 7.18.6(@babel/core@7.19.3) - '@babel/plugin-syntax-typescript': 7.18.6(@babel/core@7.19.3) - '@babel/types': 7.19.3 - '@jest/expect-utils': 29.7.0 - '@jest/transform': 29.7.0 - '@jest/types': 29.6.3 - babel-preset-current-node-syntax: 1.0.1(@babel/core@7.19.3) - chalk: 4.1.2 - expect: 29.7.0 - graceful-fs: 4.2.10 - jest-diff: 29.7.0 - jest-get-type: 29.6.3 - jest-matcher-utils: 29.7.0 - jest-message-util: 29.7.0 - jest-util: 29.7.0 - natural-compare: 1.4.0 - pretty-format: 29.7.0 - semver: 7.6.0 - transitivePeerDependencies: - - supports-color - dev: true - - /jest-util@29.1.2: - resolution: {integrity: sha512-vPCk9F353i0Ymx3WQq3+a4lZ07NXu9Ca8wya6o4Fe4/aO1e1awMMprZ3woPFpKwghEOW+UXgd15vVotuNN9ONQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/types': 29.1.2 - '@types/node': 18.19.32 - chalk: 4.1.2 - ci-info: 3.4.0 - graceful-fs: 4.2.10 - picomatch: 2.3.1 - dev: true - - /jest-util@29.7.0: - resolution: {integrity: sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/types': 29.6.3 - '@types/node': 18.19.32 - chalk: 4.1.2 - ci-info: 3.4.0 - graceful-fs: 4.2.10 - picomatch: 2.3.1 - dev: true - - /jest-validate@29.7.0: - resolution: {integrity: sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/types': 29.6.3 - camelcase: 6.3.0 - chalk: 4.1.2 - jest-get-type: 29.6.3 - leven: 3.1.0 - pretty-format: 29.7.0 - dev: true - - /jest-watcher@29.7.0: - resolution: {integrity: sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/test-result': 29.7.0 - '@jest/types': 29.6.3 - '@types/node': 18.19.32 - ansi-escapes: 4.3.2 - chalk: 4.1.2 - emittery: 0.13.1 - jest-util: 29.7.0 - string-length: 4.0.2 - dev: true - - /jest-worker@29.7.0: - resolution: {integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@types/node': 18.19.32 - jest-util: 29.7.0 - merge-stream: 2.0.0 - supports-color: 8.1.1 - dev: true - - /jest@29.7.0(@types/node@18.19.32)(ts-node@10.9.2): - resolution: {integrity: sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - hasBin: true - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2) - '@jest/types': 29.6.3 - import-local: 3.1.0 - jest-cli: 29.7.0(@types/node@18.19.32)(ts-node@10.9.2) - transitivePeerDependencies: - - '@types/node' - - babel-plugin-macros - - supports-color - - ts-node - 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 - - /jsesc@2.5.2: - resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} - engines: {node: '>=4'} - hasBin: true - dev: true - - /json-parse-even-better-errors@2.3.1: - resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} - dev: true - - /json5@2.2.3: - resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} - engines: {node: '>=6'} - hasBin: true - dev: true - - /jsonfile@6.1.0: - resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} - dependencies: - universalify: 2.0.0 - optionalDependencies: - graceful-fs: 4.2.10 - dev: false - - /kleur@3.0.3: - resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} - engines: {node: '>=6'} - dev: true - - /leven@3.1.0: - resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} - engines: {node: '>=6'} - dev: true - - /lines-and-columns@1.2.4: - resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - dev: true - - /locate-path@5.0.0: - resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} - engines: {node: '>=8'} - dependencies: - p-locate: 4.1.0 - dev: true - - /lodash.memoize@4.1.2: - resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} - dev: true - - /lru-cache@5.1.1: - resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} - dependencies: - yallist: 3.1.1 - dev: true - - /lru-cache@6.0.0: - resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} - engines: {node: '>=10'} - dependencies: - yallist: 4.0.0 - dev: true - - /make-dir@3.1.0: - resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} - engines: {node: '>=8'} - dependencies: - semver: 6.3.0 - dev: true - - /make-error@1.3.6: - resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} - - /makeerror@1.0.12: - resolution: {integrity: sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==} - dependencies: - tmpl: 1.0.5 - dev: true - - /map-stream@0.1.0: - resolution: {integrity: sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g==} - dev: false - - /merge-stream@2.0.0: - resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} - dev: true - - /merge2@1.4.1: - resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} - engines: {node: '>= 8'} - dev: false - - /micromatch@4.0.5: - resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} - engines: {node: '>=8.6'} - dependencies: - braces: 3.0.2 - picomatch: 2.3.1 - - /mimic-fn@2.1.0: - resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} - engines: {node: '>=6'} - dev: true - - /minimatch@3.1.2: - resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} - dependencies: - brace-expansion: 1.1.11 - dev: true - - /minimist@1.2.8: - resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} - dev: false - - /ms@2.1.2: - resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} - dev: true - - /natural-compare@1.4.0: - resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - dev: true - - /node-domexception@1.0.0: - resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} - engines: {node: '>=10.5.0'} - dev: false - - /node-fetch@3.3.1: - resolution: {integrity: sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - data-uri-to-buffer: 4.0.0 - fetch-blob: 3.2.0 - formdata-polyfill: 4.0.10 - dev: false - - /node-int64@0.4.0: - resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} - dev: true - - /node-releases@2.0.14: - resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} - dev: true - - /node-releases@2.0.6: - resolution: {integrity: sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==} - dev: true - - /normalize-path@3.0.0: - resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} - engines: {node: '>=0.10.0'} - dev: true - - /npm-run-path@4.0.1: - resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} - engines: {node: '>=8'} - dependencies: - path-key: 3.1.1 - dev: true - - /once@1.4.0: - resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} - dependencies: - wrappy: 1.0.2 - dev: true - - /onetime@5.1.2: - resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} - engines: {node: '>=6'} - dependencies: - mimic-fn: 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-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.18.6 - 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-is-absolute@1.0.1: - resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} - engines: {node: '>=0.10.0'} - dev: true - - /path-key@3.1.1: - resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} - 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: false - - /pause-stream@0.0.11: - resolution: {integrity: sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=} - dependencies: - through: 2.3.8 - dev: false - - /picocolors@1.0.0: - resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} - dev: true - - /picomatch@2.3.1: - resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} - engines: {node: '>=8.6'} - - /pirates@4.0.5: - resolution: {integrity: sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==} - 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 - - /pretty-format@29.1.2: - resolution: {integrity: sha512-CGJ6VVGXVRP2o2Dorl4mAwwvDWT25luIsYhkyVQW32E4nL+TgW939J7LlKT/npq5Cpq6j3s+sy+13yk7xYpBmg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/schemas': 29.0.0 - ansi-styles: 5.2.0 - react-is: 18.2.0 - dev: true - - /pretty-format@29.7.0: - resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/schemas': 29.6.3 - ansi-styles: 5.2.0 - react-is: 18.2.0 - dev: true - - /prompts@2.4.2: - resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} - engines: {node: '>= 6'} - dependencies: - kleur: 3.0.3 - sisteransi: 1.0.5 - dev: true - - /ps-tree@1.2.0: - resolution: {integrity: sha512-0VnamPPYHl4uaU/nSFeZZpR21QAWRz+sRv4iW9+v/GS/J5U5iZB5BNN6J0RMoOvdx2gWM2+ZFMIm58q24e4UYA==} - engines: {node: '>= 0.10'} - hasBin: true - dependencies: - event-stream: 3.3.4 - dev: false - - /pure-rand@6.1.0: - resolution: {integrity: sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==} - dev: true - - /queue-microtask@1.2.3: - resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} - dev: false - - /react-is@18.2.0: - resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} - dev: true - - /require-directory@2.1.1: - resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} - engines: {node: '>=0.10.0'} - dev: true - - /resolve-cwd@3.0.0: - resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} - engines: {node: '>=8'} - dependencies: - resolve-from: 5.0.0 - dev: true - - /resolve-from@5.0.0: - resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} - engines: {node: '>=8'} - dev: true - - /resolve.exports@2.0.2: - resolution: {integrity: sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==} - engines: {node: '>=10'} - dev: true - - /resolve@1.22.1: - resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==} - hasBin: true - dependencies: - is-core-module: 2.10.0 - 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: false - - /run-parallel@1.2.0: - resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} - dependencies: - queue-microtask: 1.2.3 - dev: false - - /safe-buffer@5.1.2: - resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} - dev: true - - /semver@6.3.0: - resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} - hasBin: true - dev: true - - /semver@6.3.1: - resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} - 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 - - /shebang-command@2.0.0: - resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} - engines: {node: '>=8'} - dependencies: - shebang-regex: 3.0.0 - dev: true - - /shebang-regex@3.0.0: - resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} - engines: {node: '>=8'} - dev: true - - /signal-exit@3.0.7: - resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} - dev: true - - /sisteransi@1.0.5: - resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} - dev: true - - /slash@3.0.0: - resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} - engines: {node: '>=8'} - dev: true - - /slash@4.0.0: - resolution: {integrity: sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==} - engines: {node: '>=12'} - dev: false - - /source-map-support@0.5.13: - resolution: {integrity: sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==} - dependencies: - buffer-from: 1.1.2 - source-map: 0.6.1 - dev: true - - /source-map@0.6.1: - resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} - engines: {node: '>=0.10.0'} - dev: true - - /split@0.3.3: - resolution: {integrity: sha512-wD2AeVmxXRBoX44wAycgjVpMhvbwdI2aZjCkvfNcH1YqHQvJVa1duWc73OyVGJUc05fhFaTZeQ/PYsrmyH0JVA==} - dependencies: - through: 2.3.8 - dev: false - - /sprintf-js@1.0.3: - resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} - dev: true - - /stack-utils@2.0.5: - resolution: {integrity: sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==} - engines: {node: '>=10'} - dependencies: - escape-string-regexp: 2.0.0 - dev: true - - /stream-combiner@0.0.4: - resolution: {integrity: sha512-rT00SPnTVyRsaSz5zgSPma/aHSOic5U1prhYdRy5HS2kTZviFpmDgzilbtsJsxiroqACmayynDN/9VzIbX5DOw==} - dependencies: - duplexer: 0.1.2 - dev: false - - /string-length@4.0.2: - resolution: {integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==} - engines: {node: '>=10'} - dependencies: - char-regex: 1.0.2 - strip-ansi: 6.0.1 - 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 - - /strip-ansi@6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} - engines: {node: '>=8'} - dependencies: - ansi-regex: 5.0.1 - dev: true - - /strip-bom@4.0.0: - resolution: {integrity: sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==} - engines: {node: '>=8'} - dev: true - - /strip-final-newline@2.0.0: - resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} - engines: {node: '>=6'} - dev: true - - /strip-json-comments@3.1.1: - resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} - engines: {node: '>=8'} - 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-color@8.1.1: - resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} - engines: {node: '>=10'} - 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 - - /test-exclude@6.0.0: - resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} - engines: {node: '>=8'} - dependencies: - '@istanbuljs/schema': 0.1.3 - glob: 7.2.3 - minimatch: 3.1.2 - dev: true - - /through@2.3.8: - resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} - dev: false - - /tmpl@1.0.5: - resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==} - dev: true - - /to-fast-properties@2.0.0: - resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} - engines: {node: '>=4'} - 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 - - /ts-jest@29.1.2(@babel/core@7.19.3)(jest@29.7.0)(typescript@5.4.5): - resolution: {integrity: sha512-br6GJoH/WUX4pu7FbZXuWGKGNDuU7b8Uj77g/Sp7puZV6EXzuByl6JrECvm0MzVzSTkSHWTihsXt+5XYER5b+g==} - engines: {node: ^16.10.0 || ^18.0.0 || >=20.0.0} - hasBin: true - peerDependencies: - '@babel/core': '>=7.0.0-beta.0 <8' - '@jest/types': ^29.0.0 - babel-jest: ^29.0.0 - esbuild: '*' - jest: ^29.0.0 - typescript: '>=4.3 <6' - peerDependenciesMeta: - '@babel/core': - optional: true - '@jest/types': - optional: true - babel-jest: - optional: true - esbuild: - optional: true - dependencies: - '@babel/core': 7.19.3 - bs-logger: 0.2.6 - fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@18.19.32)(ts-node@10.9.2) - jest-util: 29.1.2 - json5: 2.2.3 - lodash.memoize: 4.1.2 - make-error: 1.3.6 - semver: 7.6.0 - typescript: 5.4.5 - yargs-parser: 21.1.1 - dev: true - - /ts-node@10.9.2(@types/node@18.19.32)(typescript@5.4.5): - resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} - hasBin: true - peerDependencies: - '@swc/core': '>=1.2.50' - '@swc/wasm': '>=1.2.50' - '@types/node': '*' - typescript: '>=2.7' - peerDependenciesMeta: - '@swc/core': - optional: true - '@swc/wasm': - optional: true - dependencies: - '@cspotcode/source-map-support': 0.8.1 - '@tsconfig/node10': 1.0.9 - '@tsconfig/node12': 1.0.11 - '@tsconfig/node14': 1.0.3 - '@tsconfig/node16': 1.0.3 - '@types/node': 18.19.32 - acorn: 8.8.0 - acorn-walk: 8.2.0 - arg: 4.1.3 - create-require: 1.1.1 - diff: 4.0.2 - make-error: 1.3.6 - typescript: 5.4.5 - v8-compile-cache-lib: 3.0.1 - yn: 3.1.1 - - /tunnel@0.0.6: - resolution: {integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==} - engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'} - dev: false - - /type-detect@4.0.8: - resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} - engines: {node: '>=4'} - dev: true - - /type-fest@0.21.3: - resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} - engines: {node: '>=10'} - dev: true - - /typescript@5.4.5: - resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} - engines: {node: '>=14.17'} - hasBin: true - - /undici-types@5.26.5: - resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} - - /universalify@2.0.0: - resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} - engines: {node: '>= 10.0.0'} - dev: false - - /update-browserslist-db@1.0.10(browserslist@4.21.4): - resolution: {integrity: sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==} - hasBin: true - peerDependencies: - browserslist: '>= 4.21.0' - dependencies: - browserslist: 4.21.4 - escalade: 3.1.1 - picocolors: 1.0.0 - dev: true - - /update-browserslist-db@1.0.13(browserslist@4.23.0): - resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} - hasBin: true - peerDependencies: - browserslist: '>= 4.21.0' - dependencies: - browserslist: 4.23.0 - escalade: 3.1.1 - picocolors: 1.0.0 - dev: true - - /uuid@8.3.2: - resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} - hasBin: true - dev: false - - /v8-compile-cache-lib@3.0.1: - resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} - - /v8-to-istanbul@9.0.1: - resolution: {integrity: sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==} - engines: {node: '>=10.12.0'} - dependencies: - '@jridgewell/trace-mapping': 0.3.25 - '@types/istanbul-lib-coverage': 2.0.4 - convert-source-map: 1.8.0 - dev: true - - /walker@1.0.8: - resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==} - dependencies: - makeerror: 1.0.12 - dev: true - - /web-streams-polyfill@3.2.1: - resolution: {integrity: sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==} - engines: {node: '>= 8'} - dev: false - - /webpod@0.0.2: - resolution: {integrity: sha512-cSwwQIeg8v4i3p4ajHhwgR7N6VyxAf+KYSSsY6Pd3aETE+xEU4vbitz7qQkB0I321xnhDdgtxuiSfk5r/FVtjg==} - hasBin: true - dev: false - - /which@2.0.2: - resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} - engines: {node: '>= 8'} - hasBin: true - dependencies: - isexe: 2.0.0 - dev: true - - /which@3.0.1: - resolution: {integrity: sha512-XA1b62dzQzLfaEOSQFTCOd5KFf/1VSzZo7/7TUjnya6u0vGGKzU96UQBZTAThCb2j4/xjBAyii1OhRLJEivHvg==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - hasBin: true - dependencies: - isexe: 2.0.0 - dev: false - - /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 - - /wrappy@1.0.2: - resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - dev: true - - /write-file-atomic@4.0.2: - resolution: {integrity: sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} - dependencies: - imurmurhash: 0.1.4 - signal-exit: 3.0.7 - dev: true - - /y18n@5.0.8: - resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} - engines: {node: '>=10'} - dev: true - - /yallist@3.1.1: - resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} - dev: true - - /yallist@4.0.0: - resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - dev: true - - /yaml@2.4.1: - resolution: {integrity: sha512-pIXzoImaqmfOrL7teGUBt/T7ZDnyeGBWyXQBvOVhLkWLN37GXv8NMLK406UY6dS51JfcQHsmcW5cJ441bHg6Lg==} - engines: {node: '>= 14'} - hasBin: true - dev: false - - /yargs-parser@21.1.1: - resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} - engines: {node: '>=12'} - dev: true - - /yargs@17.6.0: - resolution: {integrity: sha512-8H/wTDqlSwoSnScvV2N/JHfLWOKuh5MVla9hqLjK3nsfyy6Y4kDSYSvkU5YCUEPOSnRXfIyx3Sq+B/IWudTo4g==} - 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: true - - /yn@3.1.1: - resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} - engines: {node: '>=6'} - - /yocto-queue@0.1.0: - resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} - engines: {node: '>=10'} - dev: true - - /zx@7.2.3: - resolution: {integrity: sha512-QODu38nLlYXg/B/Gw7ZKiZrvPkEsjPN3LQ5JFXM7h0JvwhEdPNNl+4Ao1y4+o3CLNiDUNcwzQYZ4/Ko7kKzCMA==} - engines: {node: '>= 16.0.0'} - hasBin: true - dependencies: - '@types/fs-extra': 11.0.4 - '@types/minimist': 1.2.2 - '@types/node': 18.19.32 - '@types/ps-tree': 1.1.2 - '@types/which': 3.0.3 - chalk: 5.3.0 - fs-extra: 11.2.0 - fx: 34.0.0 - globby: 13.2.2 - minimist: 1.2.8 - node-fetch: 3.3.1 - ps-tree: 1.2.0 - webpod: 0.0.2 - which: 3.0.1 - yaml: 2.4.1 - dev: false diff --git a/.github/actions/split-tests/src/index.mts b/.github/actions/split-tests/src/index.mts deleted file mode 100644 index 43f9eb13161..00000000000 --- a/.github/actions/split-tests/src/index.mts +++ /dev/null @@ -1,74 +0,0 @@ -import { $, cd, glob, fs } from "zx"; -import path from "node:path"; -import { setOutput } from "@actions/core"; -import { SolidityConfig, SoliditySplit } from "./types.mjs"; -import { sieveSlowTests } from "./sieve.mjs"; -import { simpleSplit } from "./splitter.mjs"; - -/** - * Get a JSON formatted config file - * - * @param path The path to the config relative to the git root - */ -function getConfigFrom(path?: string): SolidityConfig { - if (!path) { - throw Error("No config path given, specify a path via $CONFIG"); - } - try { - const config = fs.readJsonSync(path); - return config; - } catch (e: unknown) { - throw Error( - `Could not find config file at path: ${path}. ${(e as Error).message}` - ); - } -} - -async function main() { - $.verbose = false; - await runAtGitRoot(); - const configPath = process.env.CONFIG; - const config = getConfigFrom(configPath); - if (config.type === "solidity") { - await handleSolidity(config); - } else { - throw Error(`Invalid config given`); - } -} -main(); - -async function handleSolidity(config: SolidityConfig) { - const { basePath, splits: configBySplit } = config; - const splits = await Promise.all( - configBySplit.map( - async ({ dir, numOfSplits, slowTests: slowTestMatchers }) => { - const globPath = path.join(basePath, dir, "/**/*.test.ts"); - const rawTests = await glob(globPath); - const pathMappedTests = rawTests.map((r) => - r.replace("contracts/", "") - ); - const { filteredTests, slowTests } = sieveSlowTests( - pathMappedTests, - slowTestMatchers - ); - const testsBySplit = simpleSplit(filteredTests, slowTests, numOfSplits); - const splits: SoliditySplit[] = testsBySplit.map((tests, i) => ({ - idx: `${dir}_${i + 1}`, - id: `${dir} ${i + 1}/${numOfSplits}`, - tests: tests.join(" "), - coverageTests: - tests.length === 1 ? tests.join(",") : `{${tests.join(",")}}`, - })); - return splits; - } - ) - ); - - const serializedSplits = JSON.stringify(splits.flat()); - setOutput("splits", serializedSplits); -} - -async function runAtGitRoot() { - const gitRoot = await $`git rev-parse --show-toplevel`; - cd(gitRoot.stdout.trimEnd()); -} diff --git a/.github/actions/split-tests/src/sieve.mts b/.github/actions/split-tests/src/sieve.mts deleted file mode 100644 index 93573669a78..00000000000 --- a/.github/actions/split-tests/src/sieve.mts +++ /dev/null @@ -1,27 +0,0 @@ -import {Tests} from "./types.mjs"; - -export function sieveSlowTests(tests: Tests, slowTestMatchers?: string[]) { - const slowTests: Tests = []; - const filteredTests: Tests = []; - - if (!slowTestMatchers) { - return {slowTests, filteredTests: tests}; - } - - // If the user supplies slow test matchers - // then we go through each test to see if we get a case sensitive match - - tests.forEach((t) => { - const isSlow = slowTestMatchers.reduce( - (isSlow, matcher) => t.includes(matcher) || isSlow, - false - ); - if (isSlow) { - slowTests.push(t); - } else { - filteredTests.push(t); - } - }); - - return {slowTests, filteredTests}; -} diff --git a/.github/actions/split-tests/src/splitter.mts b/.github/actions/split-tests/src/splitter.mts deleted file mode 100644 index f924df55087..00000000000 --- a/.github/actions/split-tests/src/splitter.mts +++ /dev/null @@ -1,43 +0,0 @@ -import {Tests, TestsBySplit} from "./types.mjs"; - -/** - * Split tests by first prioritizing slow tests being spread over each split, then filling each split by test list order. - * - * @example - * Given the following arguments: - * tests: ['foo.test', 'bar.test', 'baz.test', 'yup.test', 'nope.test'] - * slowTests: ['bonk.test', 'bop.test', 'ouch.test.ts'] - * numOfSplits: 2 - * - * We get the following output: - * 1. Spread slow tests across splits: [['bonk.test', 'ouch.test.ts'], ['bop.test']] - * 2. Insert list of tests: [['bonk.test', 'ouch.test.ts', 'foo.test', 'bar.test'], ['bop.test', 'baz.test', 'yup.test', 'nope.test']] - * - * @param tests A list of tests to distribute across splits by the test list order - * @param slowTests A list of slow tests, where the list of tests is evenly distributed across all splits before inserting regular tests - * @param numOfSplits The number of splits to spread tests across - */ -export function simpleSplit( - tests: Tests, - slowTests: Tests, - numOfSplits: number -): TestsBySplit { - const maxTestsPerSplit = Math.max(tests.length / numOfSplits); - - const testsBySplit: TestsBySplit = new Array(numOfSplits) - .fill(null) - .map(() => []); - - // Evenly distribute slow tests over each split - slowTests.forEach((test, i) => { - const splitIndex = i % numOfSplits; - testsBySplit[splitIndex].push(test); - }); - - tests.forEach((test, i) => { - const splitIndex = Math.floor(i / maxTestsPerSplit); - testsBySplit[splitIndex].push(test); - }); - - return testsBySplit; -} diff --git a/.github/actions/split-tests/src/types.mts b/.github/actions/split-tests/src/types.mts deleted file mode 100644 index 3eae2f0eb96..00000000000 --- a/.github/actions/split-tests/src/types.mts +++ /dev/null @@ -1,75 +0,0 @@ -/** - * An array of all tests - */ -export type Tests = string[]; - -/** - * An array of tests, indexed by split - */ -export type TestsBySplit = string[][]; - -export interface Split { - /** - * The split index - * @example "4" - */ - idx: string; - - /** - * The split index in the context of all splits - * @example "4/10" - */ - id: string; -} - -export interface SoliditySplit extends Split { - /** - * A string that contains a whitespace delimited list of tests to run - * - * This format is to support the `hardhat test` command. - * @example test/foo.test.ts test/bar.test.ts - */ - tests: string; - - /** - * A string that contains a glob that expresses the list of tests to run. - * - * This format is used to conform to the --testfiles flag of solidity-coverage - * @example {test/foo.test.ts,test/bar.test.ts} - */ - coverageTests: string; -} - -/** - * Configuration file for solidity tests - */ -export interface SolidityConfig { - type: "solidity"; - /** - * The path to the contracts tests directory, relative to the git root - */ - basePath: string; - splits: { - /** - * The number of sub-splits to run across - */ - numOfSplits: number; - /** - * The directory of the tests to create sub-splits across, relative to the basePath - */ - dir: string; - /** - * An array of known slow tests, to better distribute across sub-splits - * - * Each string is a case-sensitive matcher that will match against any substring within the list of test file paths within the `dir` configuration. - * - * @example - * Given the dir `v0.8`, we get the following tests: ['v0.8/Foo1.test.ts','v0.8/bar.test.ts','v0.8/dev/eolpe/Foo.test.ts'] - * - * If we supply the following `slowTests` argument: ['Foo'] - * - * Then it'll match against both 'v0.8/Foo1.test.ts' and 'v0.8/dev/eolpe/Foo.test.ts'. - */ - slowTests?: string[]; - }[]; -} diff --git a/.github/actions/split-tests/test/__snapshots__/sieve.test.ts.snap b/.github/actions/split-tests/test/__snapshots__/sieve.test.ts.snap deleted file mode 100644 index d55bc175b8b..00000000000 --- a/.github/actions/split-tests/test/__snapshots__/sieve.test.ts.snap +++ /dev/null @@ -1,99 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`sieveSlowTests works 1`] = ` -{ - "filteredTests": [], - "slowTests": [], -} -`; - -exports[`sieveSlowTests works 2`] = ` -{ - "filteredTests": [], - "slowTests": [], -} -`; - -exports[`sieveSlowTests works 3`] = ` -{ - "filteredTests": [ - "keepme", - ], - "slowTests": [], -} -`; - -exports[`sieveSlowTests works 4`] = ` -{ - "filteredTests": [ - "keepme", - ], - "slowTests": [], -} -`; - -exports[`sieveSlowTests works 5`] = ` -{ - "filteredTests": [ - "foo.test", - "bar.test", - "baz.test", - "yup.test", - "nope.test", - "bonk.test", - "bop.test", - "ouch.test.ts", - ], - "slowTests": [], -} -`; - -exports[`sieveSlowTests works 6`] = ` -{ - "filteredTests": [ - "foo.test", - "bar.test", - "baz.test", - "yup.test", - "nope.test", - "bonk.test", - "bop.test", - "ouch.test.ts", - ], - "slowTests": [], -} -`; - -exports[`sieveSlowTests works 7`] = ` -{ - "filteredTests": [ - "foo.test", - "bar.test", - "baz.test", - "yup.test", - "nope.test", - "bonk.test", - "bop.test", - ], - "slowTests": [ - "ouch.test.ts", - ], -} -`; - -exports[`sieveSlowTests works 8`] = ` -{ - "filteredTests": [ - "foo.test", - "bar.test", - "baz.test", - "yup.test", - "nope.test", - ], - "slowTests": [ - "bonk.test", - "bop.test", - "ouch.test.ts", - ], -} -`; diff --git a/.github/actions/split-tests/test/__snapshots__/splitter.test.ts.snap b/.github/actions/split-tests/test/__snapshots__/splitter.test.ts.snap deleted file mode 100644 index 70dfe70ec15..00000000000 --- a/.github/actions/split-tests/test/__snapshots__/splitter.test.ts.snap +++ /dev/null @@ -1,119 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`simpleSplit doesn't error on empty arrays 1`] = ` -[ - [], -] -`; - -exports[`simpleSplit doesn't error on empty arrays 2`] = ` -[ - [], - [], - [], - [], - [], -] -`; - -exports[`simpleSplit handles no slow test splitting 1`] = ` -[ - [ - "foo.test", - "bar.test", - "baz.test", - "yup.test", - "nope.test", - "bonk.test", - "bop.test", - "ouch.test.ts", - ], -] -`; - -exports[`simpleSplit handles no slow test splitting 2`] = ` -[ - [ - "foo.test", - "bar.test", - "baz.test", - "yup.test", - ], - [ - "nope.test", - "bonk.test", - "bop.test", - "ouch.test.ts", - ], -] -`; - -exports[`simpleSplit handles no slow test splitting 3`] = ` -[ - [ - "foo.test", - "bar.test", - "baz.test", - ], - [ - "yup.test", - "nope.test", - "bonk.test", - ], - [ - "bop.test", - "ouch.test.ts", - ], -] -`; - -exports[`simpleSplit handles slow test splitting 1`] = ` -[ - [ - "bonk.test", - "bop.test", - "ouch.test.ts", - "foo.test", - "bar.test", - "baz.test", - "yup.test", - "nope.test", - ], -] -`; - -exports[`simpleSplit handles slow test splitting 2`] = ` -[ - [ - "bonk.test", - "ouch.test.ts", - "foo.test", - "bar.test", - "baz.test", - ], - [ - "bop.test", - "yup.test", - "nope.test", - ], -] -`; - -exports[`simpleSplit handles slow test splitting 3`] = ` -[ - [ - "bonk.test", - "foo.test", - "bar.test", - ], - [ - "bop.test", - "baz.test", - "yup.test", - ], - [ - "ouch.test.ts", - "nope.test", - ], -] -`; diff --git a/.github/actions/split-tests/test/fixtures.mts b/.github/actions/split-tests/test/fixtures.mts deleted file mode 100644 index aa87ba4c35c..00000000000 --- a/.github/actions/split-tests/test/fixtures.mts +++ /dev/null @@ -1,20 +0,0 @@ -export const testArr: string[] = [ - "foo.test", - "bar.test", - "baz.test", - "yup.test", - "nope.test", - "bonk.test", - "bop.test", - "ouch.test.ts", -]; - -export const testSievedArr: string[] = [ - "foo.test", - "bar.test", - "baz.test", - "yup.test", - "nope.test", -]; - -export const testSlowArr: string[] = ["bonk.test", "bop.test", "ouch.test.ts"]; diff --git a/.github/actions/split-tests/test/sieve.test.ts b/.github/actions/split-tests/test/sieve.test.ts deleted file mode 100644 index bc296a435f4..00000000000 --- a/.github/actions/split-tests/test/sieve.test.ts +++ /dev/null @@ -1,15 +0,0 @@ -import {sieveSlowTests} from "../src/sieve.mjs"; -import {testArr} from "./fixtures.mjs"; - -describe("sieveSlowTests", () => { - it("works", () => { - expect(sieveSlowTests([])).toMatchSnapshot(); - expect(sieveSlowTests([], [])).toMatchSnapshot(); - expect(sieveSlowTests(["keepme"], [])).toMatchSnapshot(); - expect(sieveSlowTests(["keepme"])).toMatchSnapshot(); - expect(sieveSlowTests(testArr, [])).toMatchSnapshot(); - expect(sieveSlowTests(testArr, ["noself"])).toMatchSnapshot(); - expect(sieveSlowTests(testArr, ["ouch.test.ts"])).toMatchSnapshot(); - expect(sieveSlowTests(testArr, ["bo", "ouch.test.ts"])).toMatchSnapshot(); - }); -}); diff --git a/.github/actions/split-tests/test/splitter.test.ts b/.github/actions/split-tests/test/splitter.test.ts deleted file mode 100644 index 85ae7726fe7..00000000000 --- a/.github/actions/split-tests/test/splitter.test.ts +++ /dev/null @@ -1,21 +0,0 @@ -import {simpleSplit} from "../src/splitter.mjs"; -import {testArr, testSievedArr, testSlowArr} from "./fixtures.mjs"; - -describe("simpleSplit", () => { - it("doesn't error on empty arrays", () => { - expect(simpleSplit([], [], 1)).toMatchSnapshot(); - expect(simpleSplit([], [], 5)).toMatchSnapshot(); - }); - - it("handles no slow test splitting", () => { - expect(simpleSplit(testArr, [], 1)).toMatchSnapshot(); - expect(simpleSplit(testArr, [], 2)).toMatchSnapshot(); - expect(simpleSplit(testArr, [], 3)).toMatchSnapshot(); - }); - - it("handles slow test splitting", () => { - expect(simpleSplit(testSievedArr, testSlowArr, 1)).toMatchSnapshot(); - expect(simpleSplit(testSievedArr, testSlowArr, 2)).toMatchSnapshot(); - expect(simpleSplit(testSievedArr, testSlowArr, 3)).toMatchSnapshot(); - }); -}); diff --git a/.github/actions/split-tests/tsconfig.json b/.github/actions/split-tests/tsconfig.json deleted file mode 100644 index 4b36d4a178c..00000000000 --- a/.github/actions/split-tests/tsconfig.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "compilerOptions": { - /* Visit https://aka.ms/tsconfig to read more about this file */ - - /* Projects */ - // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ - // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ - // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ - // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ - // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ - // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ - - /* Language and Environment */ - "target": "ESNext" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, - // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ - // "jsx": "preserve", /* Specify what JSX code is generated. */ - // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ - // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ - // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ - // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ - // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ - // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ - // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ - // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ - // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ - - /* Modules */ - "module": "NodeNext" /* Specify what module code is generated. */, - // "rootDir": "./", /* Specify the root folder within your source files. */ - "moduleResolution": "NodeNext" /* Specify how TypeScript looks up a file from a given module specifier. */, - // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ - // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ - // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ - // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ - // "types": [], /* Specify type package names to be included without being referenced in a source file. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ - // "resolveJsonModule": true, /* Enable importing .json files. */ - // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ - - /* JavaScript Support */ - // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ - // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ - // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ - - /* Emit */ - // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ - // "declarationMap": true, /* Create sourcemaps for d.ts files. */ - // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ - // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ - // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ - // "outDir": "./", /* Specify an output folder for all emitted files. */ - // "removeComments": true, /* Disable emitting comments. */ - "noEmit": true /* Disable emitting files from a compilation. */, - // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ - // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ - // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ - // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ - // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ - // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ - // "newLine": "crlf", /* Set the newline character for emitting files. */ - // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ - // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ - // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ - // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ - // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ - // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ - - /* Interop Constraints */ - // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ - // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ - "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */, - // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ - "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, - - /* Type Checking */ - "strict": true /* Enable all strict type-checking options. */, - // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ - // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ - // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ - // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ - // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ - // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ - // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ - // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ - // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ - // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ - // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ - // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ - // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ - // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ - // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ - // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ - // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ - - /* Completeness */ - // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ - "skipLibCheck": false /* Skip type checking all .d.ts files. */ - }, - "include": ["src", "test"] -} diff --git a/.github/actions/version-file-bump/action.yml b/.github/actions/version-file-bump/action.yml index d51ce199a69..eb8d5c17426 100644 --- a/.github/actions/version-file-bump/action.yml +++ b/.github/actions/version-file-bump/action.yml @@ -31,7 +31,7 @@ runs: current_version=$(jq -r '.version' ./package.json) echo "current_version=${current_version}" | tee -a "$GITHUB_OUTPUT" - name: Compare semantic versions - uses: smartcontractkit/chainlink-github-actions/semver-compare@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/semver-compare@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 id: compare with: version1: ${{ steps.get-current-version.outputs.current_version }} diff --git a/.github/e2e-tests.yml b/.github/e2e-tests.yml new file mode 100644 index 00000000000..6aef81ec12f --- /dev/null +++ b/.github/e2e-tests.yml @@ -0,0 +1,824 @@ +# This file specifies the GitHub runner for each E2E test and is utilized by all E2E CI workflows. +# +# Each entry in this file includes the following: +# - The GitHub runner (runs_on field) that will execute tests. +# - The tests that will be run by the runner. +# - The workflows (e.g., Run PR E2E Tests, Run Nightly E2E Tests) that should trigger these tests. +# +runner-test-matrix: + + # START: OCR tests + + # Example of 1 runner for all tests in integration-tests/smoke/ocr_test.go + - id: integration-tests/smoke/ocr_test.go:* + path: integration-tests/smoke/ocr_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/ && go test smoke/ocr_test.go -timeout 30m -count=1 -test.parallel=2 -json + pyroscope_env: ci-smoke-ocr-evm-simulated + + # Example of 2 separate runners for the same test file but different tests. Can be used if tests if are too heavy to run on the same runner + - id: integration-tests/smoke/ocr2_test.go:^TestOCRv2Request$ + path: integration-tests/smoke/ocr2_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/ && go test smoke/ocr2_test.go -test.run ^TestOCRv2Request$ -test.parallel=1 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-ocr2-evm-simulated-nightly + + - id: integration-tests/smoke/ocr2_test.go:^TestOCRv2Basic$ + path: integration-tests/smoke/ocr2_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/ && go test smoke/ocr2_test.go -test.run ^TestOCRv2Basic$ -test.parallel=1 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-ocr2-evm-simulated-nightly + + # Example of a configuration for running a single soak test in Kubernetes Remote Runner + - id: integration-tests/soak/ocr_test.go:^TestOCRv1Soak$ + path: integration-tests/soak/ocr_test.go + test_env_type: k8s-remote-runner + runs_on: ubuntu-latest + test_cmd: cd integration-tests/ && go test soak/ocr_test.go -v -test.run ^TestOCRv1Soak$ -test.parallel=1 -timeout 30m -count=1 + test_inputs: + test_suite: soak + + - id: integration-tests/soak/ocr_test.go:^TestOCRv2Soak$ + path: integration-tests/soak/ocr_test.go + test_env_type: k8s-remote-runner + runs_on: ubuntu-latest + test_cmd: cd integration-tests/ && go test soak/ocr_test.go -v -test.run ^TestOCRv2Soak$ -test.parallel=1 -timeout 30m -count=1 + test_config_override_required: true + test_secrets_required: true + test_inputs: + test_suite: soak + + - id: integration-tests/soak/ocr_test.go:^TestForwarderOCRv1Soak$ + path: integration-tests/soak/ocr_test.go + test_env_type: k8s-remote-runner + runs_on: ubuntu-latest + test_cmd: cd integration-tests/ && go test soak/ocr_test.go -v -test.run ^TestForwarderOCRv1Soak$ -test.parallel=1 -timeout 30m -count=1 + test_config_override_required: true + test_secrets_required: true + test_inputs: + test_suite: soak + + - id: integration-tests/soak/ocr_test.go:^TestForwarderOCRv2Soak$ + path: integration-tests/soak/ocr_test.go + test_env_type: k8s-remote-runner + runs_on: ubuntu-latest + test_cmd: cd integration-tests/ && go test soak/ocr_test.go -v -test.run ^TestForwarderOCRv2Soak$ -test.parallel=1 -timeout 30m -count=1 + test_config_override_required: true + test_secrets_required: true + test_inputs: + test_suite: soak + + - id: integration-tests/soak/ocr_test.go:^TestOCRSoak_GethReorgBelowFinality_FinalityTagDisabled$ + path: integration-tests/soak/ocr_test.go + test_env_type: k8s-remote-runner + runs_on: ubuntu-latest + test_cmd: cd integration-tests/ && go test soak/ocr_test.go -v -test.run ^TestOCRSoak_GethReorgBelowFinality_FinalityTagDisabled$ -test.parallel=1 -timeout 30m -count=1 + test_config_override_required: true + test_secrets_required: true + test_inputs: + test_suite: soak + + - id: integration-tests/soak/ocr_test.go:^TestOCRSoak_GethReorgBelowFinality_FinalityTagEnabled$ + path: integration-tests/soak/ocr_test.go + test_env_type: k8s-remote-runner + runs_on: ubuntu-latest + test_cmd: cd integration-tests/ && go test soak/ocr_test.go -v -test.run ^TestOCRSoak_GethReorgBelowFinality_FinalityTagEnabled$ -test.parallel=1 -timeout 30m -count=1 + test_config_override_required: true + test_secrets_required: true + test_inputs: + test_suite: soak + + - id: integration-tests/soak/ocr_test.go:^TestOCRSoak_GasSpike$ + path: integration-tests/soak/ocr_test.go + test_env_type: k8s-remote-runner + runs_on: ubuntu-latest + test_cmd: cd integration-tests/ && go test soak/ocr_test.go -v -test.run ^TestOCRSoak_GasSpike$ -test.parallel=1 -timeout 30m -count=1 + test_config_override_required: true + test_secrets_required: true + test_inputs: + test_suite: soak + + - id: integration-tests/soak/ocr_test.go:^TestOCRSoak_ChangeBlockGasLimit$ + path: integration-tests/soak/ocr_test.go + test_env_type: k8s-remote-runner + runs_on: ubuntu-latest + test_cmd: cd integration-tests/ && go test soak/ocr_test.go -v -test.run ^TestOCRSoak_ChangeBlockGasLimit$ -test.parallel=1 -timeout 30m -count=1 + test_config_override_required: true + test_secrets_required: true + test_inputs: + test_suite: soak + + - id: integration-tests/soak/ocr_test.go:^TestOCRSoak_RPCDownForAllCLNodes$ + path: integration-tests/soak/ocr_test.go + test_env_type: k8s-remote-runner + runs_on: ubuntu-latest + test_cmd: cd integration-tests/ && go test soak/ocr_test.go -v -test.run ^TestOCRSoak_RPCDownForAllCLNodes$ -test.parallel=1 -timeout 30m -count=1 + test_config_override_required: true + test_secrets_required: true + test_inputs: + test_suite: soak + + - id: integration-tests/soak/ocr_test.go:^TestOCRSoak_RPCDownForHalfCLNodes$ + path: integration-tests/soak/ocr_test.go + test_env_type: k8s-remote-runner + runs_on: ubuntu-latest + test_cmd: cd integration-tests/ && go test soak/ocr_test.go -v -test.run ^TestOCRSoak_RPCDownForHalfCLNodes$ -test.parallel=1 -timeout 30m -count=1 + test_config_override_required: true + test_secrets_required: true + test_inputs: + test_suite: soak + + - id: integration-tests/smoke/forwarder_ocr_test.go:* + path: integration-tests/smoke/forwarder_ocr_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/ && go test smoke/forwarder_ocr_test.go -timeout 30m -count=1 -test.parallel=2 -json + pyroscope_env: ci-smoke-forwarder-ocr-evm-simulated + + - id: integration-tests/smoke/forwarders_ocr2_test.go:* + path: integration-tests/smoke/forwarders_ocr2_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/ && go test smoke/forwarders_ocr2_test.go -timeout 30m -count=1 -test.parallel=2 -json + pyroscope_env: ci-smoke-forwarder-ocr-evm-simulated + + - id: integration-tests/smoke/ocr2_test.go:* + path: integration-tests/smoke/ocr2_test.go + test_env_type: docker + runs_on: ubuntu22.04-16cores-64GB + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/ && go test smoke/ocr2_test.go -timeout 30m -count=1 -test.parallel=6 -json + pyroscope_env: ci-smoke-ocr2-evm-simulated + + - id: integration-tests/smoke/ocr2_test.go:*-plugins + path: integration-tests/smoke/ocr2_test.go + test_env_type: docker + runs_on: ubuntu22.04-16cores-64GB + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/ && go test smoke/ocr2_test.go -timeout 30m -count=1 -test.parallel=6 -json + pyroscope_env: ci-smoke-ocr2-plugins-evm-simulated + test_inputs: + # chainlink_version: '{{ env.GITHUB_SHA_PLUGINS }}' # This is the chainlink version that has the plugins + chainlink_version: develop-plugins + + # END: OCR tests + + # START: Automation tests + + - id: integration-tests/smoke/automation_test.go:^TestAutomationBasic/registry_2_0|TestAutomationBasic/registry_2_1_conditional|TestAutomationBasic/registry_2_1_logtrigger$ + path: integration-tests/smoke/automation_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run "^TestAutomationBasic/registry_2_0|TestAutomationBasic/registry_2_1_conditional|TestAutomationBasic/registry_2_1_logtrigger$" -test.parallel=3 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-automation-evm-simulated + + - id: integration-tests/smoke/automation_test.go:^TestAutomationBasic/registry_2_1_with_mercury_v02|TestAutomationBasic/registry_2_1_with_mercury_v03|TestAutomationBasic/registry_2_1_with_logtrigger_and_mercury_v02$ + path: integration-tests/smoke/automation_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run "^TestAutomationBasic/registry_2_1_with_mercury_v02|TestAutomationBasic/registry_2_1_with_mercury_v03|TestAutomationBasic/registry_2_1_with_logtrigger_and_mercury_v02$" -test.parallel=3 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-automation-evm-simulated + + - id: integration-tests/smoke/automation_test.go:^TestAutomationBasic/registry_2_2_conditional|TestAutomationBasic/registry_2_2_logtrigger|TestAutomationBasic/registry_2_2_with_mercury_v02$ + path: integration-tests/smoke/automation_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run "^TestAutomationBasic/registry_2_2_conditional|TestAutomationBasic/registry_2_2_logtrigger|TestAutomationBasic/registry_2_2_with_mercury_v02$" -test.parallel=3 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-automation-evm-simulated + + - id: integration-tests/smoke/automation_test.go:^TestAutomationBasic/registry_2_2_with_mercury_v03|TestAutomationBasic/registry_2_2_with_logtrigger_and_mercury_v02$ + path: integration-tests/smoke/automation_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run "^TestAutomationBasic/registry_2_2_with_mercury_v03|TestAutomationBasic/registry_2_2_with_logtrigger_and_mercury_v02$" -test.parallel=2 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-automation-evm-simulated + + - id: integration-tests/smoke/automation_test.go:^TestAutomationBasic/registry_2_3_conditional_native|TestAutomationBasic/registry_2_3_conditional_link$ + path: integration-tests/smoke/automation_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run "^TestAutomationBasic/registry_2_3_conditional_native|TestAutomationBasic/registry_2_3_conditional_link$" -test.parallel=3 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-automation-evm-simulated + + - id: integration-tests/smoke/automation_test.go:^TestAutomationBasic/registry_2_3_logtrigger_native|TestAutomationBasic/registry_2_3_logtrigger_link$ + path: integration-tests/smoke/automation_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run "^TestAutomationBasic/registry_2_3_logtrigger_native|TestAutomationBasic/registry_2_3_logtrigger_link$" -test.parallel=2 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-automation-evm-simulated + + - id: integration-tests/smoke/automation_test.go:^TestAutomationBasic/registry_2_3_with_mercury_v03_link|TestAutomationBasic/registry_2_3_with_logtrigger_and_mercury_v02_link$ + path: integration-tests/smoke/automation_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run "^TestAutomationBasic/registry_2_3_with_mercury_v03_link|TestAutomationBasic/registry_2_3_with_logtrigger_and_mercury_v02_link$" -test.parallel=2 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-automation-evm-simulated + + - id: integration-tests/smoke/automation_test.go:^TestSetUpkeepTriggerConfig$ + path: integration-tests/smoke/automation_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestSetUpkeepTriggerConfig$ -test.parallel=2 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-automation-evm-simulated + + - id: integration-tests/smoke/automation_test.go:^TestAutomationAddFunds$ + path: integration-tests/smoke/automation_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestAutomationAddFunds$ -test.parallel=3 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-automation-evm-simulated + + - id: integration-tests/smoke/automation_test.go:^TestAutomationPauseUnPause$ + path: integration-tests/smoke/automation_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestAutomationPauseUnPause$ -test.parallel=3 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-automation-evm-simulated + + - id: integration-tests/smoke/automation_test.go:^TestAutomationRegisterUpkeep$ + path: integration-tests/smoke/automation_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestAutomationRegisterUpkeep$ -test.parallel=3 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-automation-evm-simulated + + - id: integration-tests/smoke/automation_test.go:^TestAutomationPauseRegistry$ + path: integration-tests/smoke/automation_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestAutomationPauseRegistry$ -test.parallel=3 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-automation-evm-simulated + + - id: integration-tests/smoke/automation_test.go:^TestAutomationKeeperNodesDown$ + path: integration-tests/smoke/automation_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestAutomationKeeperNodesDown$ -test.parallel=3 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-automation-evm-simulated + + - id: integration-tests/smoke/automation_test.go:^TestAutomationPerformSimulation$ + path: integration-tests/smoke/automation_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestAutomationPerformSimulation$ -test.parallel=3 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-automation-evm-simulated + + - id: integration-tests/smoke/automation_test.go:^TestAutomationCheckPerformGasLimit$ + path: integration-tests/smoke/automation_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestAutomationCheckPerformGasLimit$ -test.parallel=3 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-automation-evm-simulated + + - id: integration-tests/smoke/automation_test.go:^TestUpdateCheckData$ + path: integration-tests/smoke/automation_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestUpdateCheckData$ -test.parallel=3 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-automation-evm-simulated + + - id: integration-tests/smoke/automation_test.go:^TestSetOffchainConfigWithMaxGasPrice$ + path: integration-tests/smoke/automation_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestSetOffchainConfigWithMaxGasPrice$ -test.parallel=2 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-automation-evm-simulated + + - id: integration-tests/smoke/keeper_test.go:^TestKeeperBasicSmoke$ + path: integration-tests/smoke/keeper_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestKeeperBasicSmoke$ -test.parallel=3 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-keeper-evm-simulated + + - id: integration-tests/smoke/keeper_test.go:^TestKeeperBlockCountPerTurn$ + path: integration-tests/smoke/keeper_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestKeeperBlockCountPerTurn$ -test.parallel=3 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-keeper-evm-simulated + + - id: integration-tests/smoke/keeper_test.go:^TestKeeperSimulation$ + path: integration-tests/smoke/keeper_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestKeeperSimulation$ -test.parallel=2 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-keeper-evm-simulated + + - id: integration-tests/smoke/keeper_test.go:^TestKeeperCheckPerformGasLimit$ + path: integration-tests/smoke/keeper_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestKeeperCheckPerformGasLimit$ -test.parallel=3 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-keeper-evm-simulated + + - id: integration-tests/smoke/keeper_test.go:^TestKeeperRegisterUpkeep$ + path: integration-tests/smoke/keeper_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestKeeperRegisterUpkeep$ -test.parallel=3 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-keeper-evm-simulated + + - id: integration-tests/smoke/keeper_test.go:^TestKeeperAddFunds$ + path: integration-tests/smoke/keeper_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestKeeperAddFunds$ -test.parallel=3 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-keeper-evm-simulated + + - id: integration-tests/smoke/keeper_test.go:^TestKeeperRemove$ + path: integration-tests/smoke/keeper_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestKeeperRemove$ -test.parallel=3 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-keeper-evm-simulated + + - id: integration-tests/smoke/keeper_test.go:^TestKeeperPauseRegistry$ + path: integration-tests/smoke/keeper_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestKeeperPauseRegistry$ -test.parallel=2 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-keeper-evm-simulated + + - id: integration-tests/smoke/keeper_test.go:^TestKeeperMigrateRegistry$ + path: integration-tests/smoke/keeper_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestKeeperMigrateRegistry$ -test.parallel=1 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-keeper-evm-simulated + + - id: integration-tests/smoke/keeper_test.go:^TestKeeperNodeDown$ + path: integration-tests/smoke/keeper_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestKeeperNodeDown$ -test.parallel=3 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-keeper-evm-simulated + + - id: integration-tests/smoke/keeper_test.go:^TestKeeperPauseUnPauseUpkeep$ + path: integration-tests/smoke/keeper_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestKeeperPauseUnPauseUpkeep$ -test.parallel=1 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-keeper-evm-simulated + + - id: integration-tests/smoke/keeper_test.go:^TestKeeperUpdateCheckData$ + path: integration-tests/smoke/keeper_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestKeeperUpdateCheckData$ -test.parallel=1 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-keeper-evm-simulated + + - id: integration-tests/smoke/keeper_test.go:^TestKeeperJobReplacement$ + path: integration-tests/smoke/keeper_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestKeeperJobReplacement$ -test.parallel=1 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-keeper-evm-simulated + + - id: integration-tests/load/automationv2_1/automationv2_1_test.go:TestLogTrigger + path: integration-tests/load/automationv2_1/automationv2_1_test.go + runs_on: ubuntu-latest + test_env_type: k8s-remote-runner + test_cmd: cd integration-tests/load/automationv2_1 && go test -test.run TestLogTrigger -test.parallel=1 -timeout 60m -count=1 -json + remote_runner_memory: 4Gi + test_config_override_required: true + test_secrets_required: true + test_inputs: + test_suite: automationv2_1 + workflows: + - Automation Load Test + pyroscope_env: automation-load-test + + - id: integration-tests/smoke/automation_upgrade_test.go:^TestAutomationNodeUpgrade/registry_2_0 + path: integration-tests/smoke/automation_upgrade_test.go + test_env_type: docker + runs_on: ubuntu22.04-8cores-32GB + workflows: + - Run Automation Product Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestAutomationNodeUpgrade/registry_2_0 -test.parallel=1 -timeout 60m -count=1 -json + test_inputs: + chainlink_image: public.ecr.aws/chainlink/chainlink + chainlink_version: latest + chainlink_upgrade_image: '{{ env.QA_CHAINLINK_IMAGE }}' + chainlink_upgrade_version: develop + pyroscope_env: ci-smoke-automation-upgrade-tests + + - id: integration-tests/smoke/automation_upgrade_test.go:^TestAutomationNodeUpgrade/registry_2_1 + path: integration-tests/smoke/automation_upgrade_test.go + test_env_type: docker + runs_on: ubuntu22.04-8cores-32GB + workflows: + - Run Automation Product Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestAutomationNodeUpgrade/registry_2_1 -test.parallel=5 -timeout 60m -count=1 -json + test_inputs: + chainlink_image: public.ecr.aws/chainlink/chainlink + chainlink_version: latest + chainlink_upgrade_image: '{{ env.QA_CHAINLINK_IMAGE }}' + chainlink_upgrade_version: develop + pyroscope_env: ci-smoke-automation-upgrade-tests + + - id: integration-tests/smoke/automation_upgrade_test.go:^TestAutomationNodeUpgrade/registry_2_2 + path: integration-tests/smoke/automation_upgrade_test.go + test_env_type: docker + runs_on: ubuntu22.04-8cores-32GB + workflows: + - Run Automation Product Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestAutomationNodeUpgrade/registry_2_2 -test.parallel=5 -timeout 60m -count=1 -json + test_inputs: + chainlink_image: public.ecr.aws/chainlink/chainlink + chainlink_version: latest + chainlink_upgrade_image: '{{ env.QA_CHAINLINK_IMAGE }}' + chainlink_upgrade_version: develop + pyroscope_env: ci-smoke-automation-upgrade-tests + + - id: integration-tests/reorg/automation_reorg_test.go + path: integration-tests/reorg/automation_reorg_test.go + runs_on: ubuntu-latest + test_env_type: k8s-remote-runner + test_inputs: + test_suite: reorg + workflows: + # - Run Automation Product Nightly E2E Tests + test_cmd: cd integration-tests/reorg && go test -v -test.run ^TestAutomationReorg$ -test.parallel=5 -timeout 60m -count=1 + pyroscope_env: ci-automation-on-demand-reorg + + - id: integration-tests/chaos/automation_chaos_test.go + path: integration-tests/chaos/automation_chaos_test.go + test_env_type: k8s-remote-runner + runs_on: ubuntu-latest + workflows: + # - Run Automation Product Nightly E2E Tests + test_cmd: cd integration-tests/chaos && go test -v -test.run ^TestAutomationChaos$ -test.parallel=15 -timeout 60m -count=1 + pyroscope_env: ci-automation-on-demand-chaos + test_inputs: + test_suite: chaos + + - id: integration-tests/benchmark/keeper_test.go:^TestAutomationBenchmark$ + path: integration-tests/benchmark/keeper_test.go + test_env_type: k8s-remote-runner + remote_runner_memory: 4Gi + runs_on: ubuntu-latest + # workflows: + # - Run Nightly E2E Tests + test_cmd: cd integration-tests/benchmark && go test -v -test.run ^TestAutomationBenchmark$ -test.parallel=1 -timeout 30m -count=1 + pyroscope_env: ci-benchmark-automation-nightly + test_inputs: + test_suite: benchmark + + # END: Automation tests + + # START: VRF tests + + - id: integration-tests/smoke/vrfv2_test.go:TestVRFv2Basic + path: integration-tests/smoke/vrfv2_test.go + runs_on: ubuntu22.04-8cores-32GB + test_env_type: docker + test_cmd: cd integration-tests/smoke && go test -v -test.run TestVRFv2Basic -test.parallel=1 -timeout 30m -count=1 + test_config_override_required: true + test_secrets_required: true + workflows: + - On Demand VRFV2 Smoke Test (Ethereum clients) + + - id: integration-tests/load/vrfv2plus/vrfv2plus_test.go:^TestVRFV2PlusPerformance$Smoke + path: integration-tests/load/vrfv2plus/vrfv2plus_test.go + runs_on: ubuntu22.04-8cores-32GB + test_env_type: docker + test_cmd: cd integration-tests/load/vrfv2plus && go test -v -test.run ^TestVRFV2PlusPerformance$ -test.parallel=1 -timeout 24h -count=1 + test_config_override_required: true + test_secrets_required: true + test_inputs: + test_type: Smoke + workflows: + - On Demand VRFV2 Plus Performance Test + + - id: integration-tests/load/vrfv2plus/vrfv2plus_test.go:^TestVRFV2PlusBHSPerformance$Smoke + path: integration-tests/load/vrfv2plus/vrfv2plus_test.go + runs_on: ubuntu22.04-8cores-32GB + test_env_type: docker + test_cmd: cd integration-tests/load/vrfv2plus && go test -v -test.run ^TestVRFV2PlusBHSPerformance$ -test.parallel=1 -timeout 24h -count=1 + test_config_override_required: true + test_secrets_required: true + test_inputs: + test_type: Smoke + workflows: + - On Demand VRFV2 Plus Performance Test + + - id: integration-tests/load/vrfv2/vrfv2_test.go:^TestVRFV2Performance$Smoke + path: integration-tests/load/vrfv2/vrfv2_test.go + runs_on: ubuntu22.04-8cores-32GB + test_env_type: docker + test_cmd: cd integration-tests/load/vrfv2 && go test -v -test.run ^TestVRFV2Performance$ -test.parallel=1 -timeout 24h -count=1 + test_config_override_required: true + test_secrets_required: true + test_inputs: + test_type: Smoke + workflows: + - On Demand VRFV2 Performance Test + + - id: integration-tests/load/vrfv2/vrfv2_test.go:^TestVRFV2PlusBHSPerformance$Smoke + path: integration-tests/load/vrfv2/vrfv2_test.go + runs_on: ubuntu22.04-8cores-32GB + test_env_type: docker + test_cmd: cd integration-tests/load/vrfv2 && go test -v -test.run ^TestVRFV2PlusBHSPerformance$ -test.parallel=1 -timeout 24h -count=1 + test_config_override_required: true + test_secrets_required: true + test_inputs: + test_type: Smoke + workflows: + - On Demand VRFV2 Performance Test + + - id: integration-tests/smoke/vrfv2plus_test.go:^TestVRFv2Plus$/^Link_Billing$ + path: integration-tests/smoke/vrfv2plus_test.go + runs_on: ubuntu22.04-8cores-32GB + test_env_type: docker + test_cmd: cd integration-tests && go test -v -test.run ^TestVRFv2Plus$/^Link_Billing$ smoke/vrfv2plus_test.go -test.parallel=1 -timeout 30m -count=1 + test_config_override_required: true + test_secrets_required: true + workflows: + - On Demand VRFV2Plus Smoke Test (Ethereum clients) + + - id: integration-tests/smoke/vrf_test.go:* + path: integration-tests/smoke/vrf_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/ && go test smoke/vrf_test.go -timeout 30m -count=1 -test.parallel=2 -json + pyroscope_env: ci-smoke-vrf-evm-simulated + + - id: integration-tests/smoke/vrfv2_test.go:* + path: integration-tests/smoke/vrfv2_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/ && go test smoke/vrfv2_test.go -timeout 30m -count=1 -test.parallel=6 -json + pyroscope_env: ci-smoke-vrf2-evm-simulated + + - id: integration-tests/smoke/vrfv2plus_test.go:* + path: integration-tests/smoke/vrfv2plus_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/ && go test smoke/vrfv2plus_test.go -timeout 30m -count=1 -test.parallel=9 -json + pyroscope_env: ci-smoke-vrf2plus-evm-simulated + + # END: VRF tests + + # START: LogPoller tests + + - id: integration-tests/smoke/log_poller_test.go:^TestLogPollerFewFiltersFixedDepth$ + path: integration-tests/smoke/log_poller_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestLogPollerFewFiltersFixedDepth$ -test.parallel=1 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-log_poller-evm-simulated + + - id: integration-tests/smoke/log_poller_test.go:^TestLogPollerFewFiltersFinalityTag$ + path: integration-tests/smoke/log_poller_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestLogPollerFewFiltersFinalityTag$ -test.parallel=1 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-log_poller-evm-simulated + + - id: integration-tests/smoke/log_poller_test.go:^TestLogPollerWithChaosFixedDepth$ + path: integration-tests/smoke/log_poller_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestLogPollerWithChaosFixedDepth$ -test.parallel=1 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-log_poller-evm-simulated + + - id: integration-tests/smoke/log_poller_test.go:^TestLogPollerWithChaosFinalityTag$ + path: integration-tests/smoke/log_poller_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestLogPollerWithChaosFinalityTag$ -test.parallel=1 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-log_poller-evm-simulated + + - id: integration-tests/smoke/log_poller_test.go:^TestLogPollerWithChaosPostgresFinalityTag$ + path: integration-tests/smoke/log_poller_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestLogPollerWithChaosPostgresFinalityTag$ -test.parallel=1 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-log_poller-evm-simulated + + - id: integration-tests/smoke/log_poller_test.go:^TestLogPollerWithChaosPostgresFixedDepth$ + path: integration-tests/smoke/log_poller_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestLogPollerWithChaosPostgresFixedDepth$ -test.parallel=1 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-log_poller-evm-simulated + + - id: integration-tests/smoke/log_poller_test.go:^TestLogPollerReplayFixedDepth$ + path: integration-tests/smoke/log_poller_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestLogPollerReplayFixedDepth$ -test.parallel=1 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-log_poller-evm-simulated + + - id: integration-tests/smoke/log_poller_test.go:^TestLogPollerReplayFinalityTag$ + path: integration-tests/smoke/log_poller_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/smoke && go test -test.run ^TestLogPollerReplayFinalityTag$ -test.parallel=1 -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-log_poller-evm-simulated + + # END: LogPoller tests + + # START: Other tests + + - id: integration-tests/smoke/runlog_test.go:* + path: integration-tests/smoke/runlog_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/ && go test smoke/runlog_test.go -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-runlog-evm-simulated + + - id: integration-tests/smoke/cron_test.go:* + path: integration-tests/smoke/cron_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/ && go test smoke/cron_test.go -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-cron-evm-simulated + + - id: integration-tests/smoke/flux_test.go:* + path: integration-tests/smoke/flux_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/ && go test smoke/flux_test.go -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-flux-evm-simulated + + - id: integration-tests/smoke/reorg_above_finality_test.go:* + path: integration-tests/smoke/reorg_above_finality_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/ && go test smoke/reorg_above_finality_test.go -timeout 30m -count=1 -json + pyroscope_env: ci-smoke-reorg-above-finality-evm-simulated + + - id: integration-tests/migration/upgrade_version_test.go:* + path: integration-tests/migration/upgrade_version_test.go + test_env_type: docker + runs_on: ubuntu-latest + workflows: + - Run PR E2E Tests + - Run Nightly E2E Tests + test_cmd: cd integration-tests/migration && go test upgrade_version_test.go -timeout 30m -count=1 -test.parallel=2 -json + test_inputs: + chainlink_image: public.ecr.aws/chainlink/chainlink + chainlink_version: '{{ env.LATEST_CHAINLINK_RELEASE_VERSION }}' + chainlink_upgrade_image: '{{ env.QA_CHAINLINK_IMAGE }}' + chainlink_upgrade_version: develop + + # END: Other tests diff --git a/.github/scripts/crib/package.json b/.github/scripts/crib/package.json index 8a935ecae32..b009d63f386 100644 --- a/.github/scripts/crib/package.json +++ b/.github/scripts/crib/package.json @@ -7,6 +7,10 @@ "keywords": [], "author": "", "license": "MIT", + "engines": { + "node": ">=18", + "pnpm": ">=9" + }, "dependencies": { "@actions/core": "^1.10.1", "@actions/github": "^6.0.0", diff --git a/.github/scripts/crib/pnpm-lock.yaml b/.github/scripts/crib/pnpm-lock.yaml index c449716078f..a65caf8355d 100644 --- a/.github/scripts/crib/pnpm-lock.yaml +++ b/.github/scripts/crib/pnpm-lock.yaml @@ -1,64 +1,454 @@ -lockfileVersion: '6.0' +lockfileVersion: '9.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 +importers: + + .: + 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: + '@actions/core@1.10.1': resolution: {integrity: sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==} + + '@actions/github@6.0.0': + resolution: {integrity: sha512-alScpSVnYmjNEXboZjarjukQEzgCRmjMv6Xj47fsdnqGS73bjJNDpiiXmp8jr0UZLdUB6d9jW63IcmddUP+l0g==} + + '@actions/http-client@2.2.1': + resolution: {integrity: sha512-KhC/cZsq7f8I4LfZSJKgCvEwfkE8o1538VoBeoGzokVLLnbFDEAdFD3UhoMklxo2un9NJVBdANOresx7vTHlHw==} + + '@aws-crypto/crc32@3.0.0': + resolution: {integrity: sha512-IzSgsrxUcsrejQbPVilIKy16kAT52EwB6zSaI+M3xxIhKh5+aldEyvI+z6erM7TCLB2BJsFrtHjp6/4/sr+3dA==} + + '@aws-crypto/ie11-detection@3.0.0': + resolution: {integrity: sha512-341lBBkiY1DfDNKai/wXM3aujNBkXR7tq1URPQDL9wi3AUbI80NR74uF1TXHMm7po1AcnFk8iu2S2IeU/+/A+Q==} + + '@aws-crypto/sha256-browser@3.0.0': + resolution: {integrity: sha512-8VLmW2B+gjFbU5uMeqtQM6Nj0/F1bro80xQXCW6CQBWgosFWXTx77aeOF5CAIAmbOK64SdMBJdNr6J41yP5mvQ==} + + '@aws-crypto/sha256-js@3.0.0': + resolution: {integrity: sha512-PnNN7os0+yd1XvXAy23CFOmTbMaDxgxXtTKHybrJ39Y8kGzBATgBFibWJKH6BhytLI/Zyszs87xCOBNyBig6vQ==} + + '@aws-crypto/supports-web-crypto@3.0.0': + resolution: {integrity: sha512-06hBdMwUAb2WFTuGG73LSC0wfPu93xWwo5vL2et9eymgmu3Id5vFAHBbajVWiGhPO37qcsdCap/FqXvJGJWPIg==} + + '@aws-crypto/util@3.0.0': + resolution: {integrity: sha512-2OJlpeJpCR48CC8r+uKVChzs9Iungj9wkZrl8Z041DWEWvyIHILYKCPNzJghKsivj+S3mLo6BVc7mBNzdxA46w==} + + '@aws-sdk/client-route-53@3.529.1': + resolution: {integrity: sha512-osra30V5ILwEBeE1DUZreY7HYWQGco+WcQ1qg1UDSh/C0Nyxlu+8bVpwB/bjaldmy5Fi9MRv8SQsMdiAJFNp+w==} + engines: {node: '>=14.0.0'} + + '@aws-sdk/client-sso-oidc@3.529.1': + resolution: {integrity: sha512-bimxCWAvRnVcluWEQeadXvHyzWlBWsuGVligsaVZaGF0TLSn0eLpzpN9B1EhHzTf7m0Kh/wGtPSH1JxO6PpB+A==} + engines: {node: '>=14.0.0'} + peerDependencies: + '@aws-sdk/credential-provider-node': ^3.529.1 + + '@aws-sdk/client-sso@3.529.1': + resolution: {integrity: sha512-KT1U/ZNjDhVv2ZgjzaeAn9VM7l667yeSguMrRYC8qk5h91/61MbjZypi6eOuKuVM+0fsQvzKScTQz0Lio0eYag==} + engines: {node: '>=14.0.0'} + + '@aws-sdk/client-sts@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 + + '@aws-sdk/core@3.529.1': + resolution: {integrity: sha512-Sj42sYPfaL9PHvvciMICxhyrDZjqnnvFbPKDmQL5aFKyXy122qx7RdVqUOQERDmMQfvJh6+0W1zQlLnre89q4Q==} + engines: {node: '>=14.0.0'} + + '@aws-sdk/credential-provider-env@3.523.0': + resolution: {integrity: sha512-Y6DWdH6/OuMDoNKVzZlNeBc6f1Yjk1lYMjANKpIhMbkRCvLJw/PYZKOZa8WpXbTYdgg9XLjKybnLIb3ww3uuzA==} + engines: {node: '>=14.0.0'} + + '@aws-sdk/credential-provider-http@3.525.0': + resolution: {integrity: sha512-RNWQGuSBQZhl3iqklOslUEfQ4br1V3DCPboMpeqFtddUWJV3m2u2extFur9/4Uy+1EHVF120IwZUKtd8dF+ibw==} + engines: {node: '>=14.0.0'} + + '@aws-sdk/credential-provider-ini@3.529.1': + resolution: {integrity: sha512-RjHsuTvHIwXG7a/3ERexemiD3c9riKMCZQzY2/b0Gg0ButEVbBcMfERtUzWmQ0V4ufe/PEZjP68MH1gupcoF9A==} + engines: {node: '>=14.0.0'} + + '@aws-sdk/credential-provider-node@3.529.1': + resolution: {integrity: sha512-mvY7F3dMmk/0dZOCfl5sUI1bG0osureBjxhELGCF0KkJqhWI0hIzh8UnPkYytSg3vdc97CMv7pTcozxrdA3b0g==} + engines: {node: '>=14.0.0'} + + '@aws-sdk/credential-provider-process@3.523.0': + resolution: {integrity: sha512-f0LP9KlFmMvPWdKeUKYlZ6FkQAECUeZMmISsv6NKtvPCI9e4O4cLTeR09telwDK8P0HrgcRuZfXM7E30m8re0Q==} + engines: {node: '>=14.0.0'} + + '@aws-sdk/credential-provider-sso@3.529.1': + resolution: {integrity: sha512-KFMKkaoTGDgSJG+o9Ii7AglWG5JQeF6IFw9cXLMwDdIrp3KUmRcUIqe0cjOoCqeQEDGy0VHsimHmKKJ3894i/A==} + engines: {node: '>=14.0.0'} + + '@aws-sdk/credential-provider-web-identity@3.529.1': + resolution: {integrity: sha512-AGuZDOKN+AttjwTjrF47WLqzeEut2YynyxjkXZhxZF/xn8i5Y51kUAUdXsXw1bgR25pAeXQIdhsrQlRa1Pm5kw==} + engines: {node: '>=14.0.0'} + + '@aws-sdk/middleware-host-header@3.523.0': + resolution: {integrity: sha512-4g3q7Ta9sdD9TMUuohBAkbx/e3I/juTqfKi7TPgP+8jxcYX72MOsgemAMHuP6CX27eyj4dpvjH+w4SIVDiDSmg==} + engines: {node: '>=14.0.0'} + + '@aws-sdk/middleware-logger@3.523.0': + resolution: {integrity: sha512-PeDNJNhfiaZx54LBaLTXzUaJ9LXFwDFFIksipjqjvxMafnoVcQwKbkoPUWLe5ytT4nnL1LogD3s55mERFUsnwg==} + engines: {node: '>=14.0.0'} + + '@aws-sdk/middleware-recursion-detection@3.523.0': + resolution: {integrity: sha512-nZ3Vt7ehfSDYnrcg/aAfjjvpdE+61B3Zk68i6/hSUIegT3IH9H1vSW67NDKVp+50hcEfzWwM2HMPXxlzuyFyrw==} + engines: {node: '>=14.0.0'} + + '@aws-sdk/middleware-sdk-route53@3.523.0': + resolution: {integrity: sha512-d+SKqDBM3XCVkF/crRWwJD1WuS4PBY/CaTGwIyND1Z3o3ZCMhyo4f2ni19U+7ZtEULW50ZGznhB2F4GJHqpDUg==} + engines: {node: '>=14.0.0'} + + '@aws-sdk/middleware-user-agent@3.525.0': + resolution: {integrity: sha512-4al/6uO+t/QIYXK2OgqzDKQzzLAYJza1vWFS+S0lJ3jLNGyLB5BMU5KqWjDzevYZ4eCnz2Nn7z0FveUTNz8YdQ==} + engines: {node: '>=14.0.0'} + + '@aws-sdk/region-config-resolver@3.525.0': + resolution: {integrity: sha512-8kFqXk6UyKgTMi7N7QlhA6qM4pGPWbiUXqEY2RgUWngtxqNFGeM9JTexZeuavQI+qLLe09VPShPNX71fEDcM6w==} + engines: {node: '>=14.0.0'} + + '@aws-sdk/token-providers@3.529.1': + resolution: {integrity: sha512-NpgMjsfpqiugbxrYGXtta914N43Mx/H0niidqv8wKMTgWQEtsJvYtOni+kuLXB+LmpjaMFNlpadooFU/bK4buA==} + engines: {node: '>=14.0.0'} + + '@aws-sdk/types@3.523.0': + resolution: {integrity: sha512-AqGIu4u+SxPiUuNBp2acCVcq80KDUFjxe6e3cMTvKWTzCbrVk1AXv0dAaJnCmdkWIha6zJDWxpIk/aL4EGhZ9A==} + engines: {node: '>=14.0.0'} + + '@aws-sdk/util-endpoints@3.525.0': + resolution: {integrity: sha512-DIW7WWU5tIGkeeKX6NJUyrEIdWMiqjLQG3XBzaUj+ufIENwNjdAHhlD8l2vX7Yr3JZRT6yN/84wBCj7Tw1xd1g==} + engines: {node: '>=14.0.0'} + + '@aws-sdk/util-locate-window@3.495.0': + resolution: {integrity: sha512-MfaPXT0kLX2tQaR90saBT9fWQq2DHqSSJRzW+MZWsmF+y5LGCOhO22ac/2o6TKSQm7h0HRc2GaADqYYYor62yg==} + engines: {node: '>=14.0.0'} + + '@aws-sdk/util-user-agent-browser@3.523.0': + resolution: {integrity: sha512-6ZRNdGHX6+HQFqTbIA5+i8RWzxFyxsZv8D3soRfpdyWIKkzhSz8IyRKXRciwKBJDaC7OX2jzGE90wxRQft27nA==} + + '@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 + + '@aws-sdk/util-utf8-browser@3.259.0': + resolution: {integrity: sha512-UvFa/vR+e19XookZF8RzFZBrw2EUkQWxiBW0yYQAhvk3C+QVGl0H3ouca8LDBlBfQKXwmW3huo/59H8rwb1wJw==} + + '@aws-sdk/xml-builder@3.523.0': + resolution: {integrity: sha512-wfvyVymj2TUw7SuDor9IuFcAzJZvWRBZotvY/wQJOlYa3UP3Oezzecy64N4FWfBJEsZdrTN+HOZFl+IzTWWnUA==} + engines: {node: '>=14.0.0'} + + '@fastify/busboy@2.1.1': + resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==} + engines: {node: '>=14'} + + '@octokit/auth-token@4.0.0': + resolution: {integrity: sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==} + engines: {node: '>= 18'} + + '@octokit/core@5.1.0': + resolution: {integrity: sha512-BDa2VAMLSh3otEiaMJ/3Y36GU4qf6GI+VivQ/P41NC6GHcdxpKlqV0ikSZ5gdQsmS3ojXeRx5vasgNTinF0Q4g==} + engines: {node: '>= 18'} + + '@octokit/endpoint@9.0.4': + resolution: {integrity: sha512-DWPLtr1Kz3tv8L0UvXTDP1fNwM0S+z6EJpRcvH66orY6Eld4XBMCSYsaWp4xIm61jTWxK68BrR7ibO+vSDnZqw==} + engines: {node: '>= 18'} + + '@octokit/graphql@7.0.2': + resolution: {integrity: sha512-OJ2iGMtj5Tg3s6RaXH22cJcxXRi7Y3EBqbHTBRq+PQAqfaS8f/236fUrWhfSn8P4jovyzqucxme7/vWSSZBX2Q==} + engines: {node: '>= 18'} + + '@octokit/openapi-types@20.0.0': + resolution: {integrity: sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==} + + '@octokit/plugin-paginate-rest@9.2.1': + resolution: {integrity: sha512-wfGhE/TAkXZRLjksFXuDZdmGnJQHvtU/joFQdweXUgzo1XwvBCD4o4+75NtFfjfLK5IwLf9vHTfSiU3sLRYpRw==} + engines: {node: '>= 18'} + peerDependencies: + '@octokit/core': '5' + + '@octokit/plugin-request-log@4.0.1': + resolution: {integrity: sha512-GihNqNpGHorUrO7Qa9JbAl0dbLnqJVrV8OXe2Zm5/Y4wFkZQDfTreBzVmiRfJVfE4mClXdihHnbpyyO9FSX4HA==} + engines: {node: '>= 18'} + peerDependencies: + '@octokit/core': '5' + + '@octokit/plugin-rest-endpoint-methods@10.4.1': + resolution: {integrity: sha512-xV1b+ceKV9KytQe3zCVqjg+8GTGfDYwaT1ATU5isiUyVtlVAO3HNdzpS4sr4GBx4hxQ46s7ITtZrAsxG22+rVg==} + engines: {node: '>= 18'} + peerDependencies: + '@octokit/core': '5' + + '@octokit/request-error@5.0.1': + resolution: {integrity: sha512-X7pnyTMV7MgtGmiXBwmO6M5kIPrntOXdyKZLigNfQWSEQzVxR4a4vo49vJjTWX70mPndj8KhfT4Dx+2Ng3vnBQ==} + engines: {node: '>= 18'} + + '@octokit/request@8.2.0': + resolution: {integrity: sha512-exPif6x5uwLqv1N1irkLG1zZNJkOtj8bZxuVHd71U5Ftuxf2wGNvAJyNBcPbPC+EBzwYEbBDdSFb8EPcjpYxPQ==} + engines: {node: '>= 18'} + + '@octokit/rest@20.0.2': + resolution: {integrity: sha512-Ux8NDgEraQ/DMAU1PlAohyfBBXDwhnX2j33Z1nJNziqAfHi70PuxkFYIcIt8aIAxtRE7KVuKp8lSR8pA0J5iOQ==} + engines: {node: '>= 18'} + + '@octokit/types@12.6.0': + resolution: {integrity: sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==} + + '@smithy/abort-controller@2.1.4': + resolution: {integrity: sha512-66HO817oIZ2otLIqy06R5muapqZjkgF1jfU0wyNko8cuqZNu8nbS9ljlhcRYw/M/uWRJzB9ih81DLSHhYbBLlQ==} + engines: {node: '>=14.0.0'} + + '@smithy/config-resolver@2.1.5': + resolution: {integrity: sha512-LcBB5JQC3Tx2ZExIJzfvWaajhFIwHrUNQeqxhred2r5nnqrdly9uoCrvM1sxOOdghYuWWm2Kr8tBCDOmxsgeTA==} + engines: {node: '>=14.0.0'} + + '@smithy/core@1.3.8': + resolution: {integrity: sha512-6cFhQ9ChU7MxvOXJn6nuUSONacpNsGHWhfueROQuM/0vibDdZA9FWEdNbVkuVuc+BFI5BnaX3ltERUlpUirpIA==} + engines: {node: '>=14.0.0'} + + '@smithy/credential-provider-imds@2.2.6': + resolution: {integrity: sha512-+xQe4Pite0kdk9qn0Vyw5BRVh0iSlj+T4TEKRXr4E1wZKtVgIzGlkCrfICSjiPVFkPxk4jMpVboMYdEiiA88/w==} + engines: {node: '>=14.0.0'} + + '@smithy/eventstream-codec@2.1.4': + resolution: {integrity: sha512-UkiieTztP7adg8EuqZvB0Y4LewdleZCJU7Kgt9RDutMsRYqO32fMpWeQHeTHaIMosmzcRZUykMRrhwGJe9mP3A==} + + '@smithy/fetch-http-handler@2.4.5': + resolution: {integrity: sha512-FR1IMGdo0yRFs1tk71zRGSa1MznVLQOVNaPjyNtx6dOcy/u0ovEnXN5NVz6slw5KujFlg3N1w4+UbO8F3WyYUg==} + + '@smithy/hash-node@2.1.4': + resolution: {integrity: sha512-uvCcpDLXaTTL0X/9ezF8T8sS77UglTfZVQaUOBiCvR0QydeSyio3t0Hj3QooVdyFsKTubR8gCk/ubLk3vAyDng==} + engines: {node: '>=14.0.0'} + + '@smithy/invalid-dependency@2.1.4': + resolution: {integrity: sha512-QzlNBl6jt3nb9jNnE51wTegReVvUdozyMMrFEyb/rc6AzPID1O+qMJYjAAoNw098y0CZVfCpEnoK2+mfBOd8XA==} + + '@smithy/is-array-buffer@2.1.1': + resolution: {integrity: sha512-xozSQrcUinPpNPNPds4S7z/FakDTh1MZWtRP/2vQtYB/u3HYrX2UXuZs+VhaKBd6Vc7g2XPr2ZtwGBNDN6fNKQ==} + engines: {node: '>=14.0.0'} + + '@smithy/middleware-content-length@2.1.4': + resolution: {integrity: sha512-C6VRwfcr0w9qRFhDGCpWMVhlEIBFlmlPRP1aX9Cv9xDj9SUwlDrNvoV1oP1vjRYuLxCDgovBBynCwwcluS2wLw==} + engines: {node: '>=14.0.0'} + + '@smithy/middleware-endpoint@2.4.6': + resolution: {integrity: sha512-AsXtUXHPOAS0EGZUSFOsVJvc7p0KL29PGkLxLfycPOcFVLru/oinYB6yvyL73ZZPX2OB8sMYUMrj7eH2kI7V/w==} + engines: {node: '>=14.0.0'} + + '@smithy/middleware-retry@2.1.7': + resolution: {integrity: sha512-8fOP/cJN4oMv+5SRffZC8RkqfWxHqGgn/86JPINY/1DnTRegzf+G5GT9lmIdG1YasuSbU7LISfW9PXil3isPVw==} + engines: {node: '>=14.0.0'} + + '@smithy/middleware-serde@2.2.1': + resolution: {integrity: sha512-VAWRWqnNjgccebndpyK94om4ZTYzXLQxUmNCXYzM/3O9MTfQjTNBgtFtQwyIIez6z7LWcCsXmnKVIOE9mLqAHQ==} + engines: {node: '>=14.0.0'} + + '@smithy/middleware-stack@2.1.4': + resolution: {integrity: sha512-Qqs2ba8Ax1rGKOSGJS2JN23fhhox2WMdRuzx0NYHtXzhxbJOIMmz9uQY6Hf4PY8FPteBPp1+h0j5Fmr+oW12sg==} + engines: {node: '>=14.0.0'} + + '@smithy/node-config-provider@2.2.5': + resolution: {integrity: sha512-CxPf2CXhjO79IypHJLBATB66Dw6suvr1Yc2ccY39hpR6wdse3pZ3E8RF83SODiNH0Wjmkd0ze4OF8exugEixgA==} + engines: {node: '>=14.0.0'} + + '@smithy/node-http-handler@2.4.3': + resolution: {integrity: sha512-bD5zRdEl1u/4vAAMeQnGEUNbH1seISV2Z0Wnn7ltPRl/6B2zND1R9XzTfsOnH1R5jqghpochF/mma8u7uXz0qQ==} + engines: {node: '>=14.0.0'} + + '@smithy/property-provider@2.1.4': + resolution: {integrity: sha512-nWaY/MImj1BiXZ9WY65h45dcxOx8pl06KYoHxwojDxDL+Q9yLU1YnZpgv8zsHhEftlj9KhePENjQTlNowWVyug==} + engines: {node: '>=14.0.0'} + + '@smithy/protocol-http@3.2.2': + resolution: {integrity: sha512-xYBlllOQcOuLoxzhF2u8kRHhIFGQpDeTQj/dBSnw4kfI29WMKL5RnW1m9YjnJAJ49miuIvrkJR+gW5bCQ+Mchw==} + engines: {node: '>=14.0.0'} + + '@smithy/querystring-builder@2.1.4': + resolution: {integrity: sha512-LXSL0J/nRWvGT+jIj+Fip3j0J1ZmHkUyBFRzg/4SmPNCLeDrtVu7ptKOnTboPsFZu5BxmpYok3kJuQzzRdrhbw==} + engines: {node: '>=14.0.0'} + + '@smithy/querystring-parser@2.1.4': + resolution: {integrity: sha512-U2b8olKXgZAs0eRo7Op11jTNmmcC/sqYmsA7vN6A+jkGnDvJlEl7AetUegbBzU8q3D6WzC5rhR/joIy8tXPzIg==} + engines: {node: '>=14.0.0'} + + '@smithy/service-error-classification@2.1.4': + resolution: {integrity: sha512-JW2Hthy21evnvDmYYk1kItOmbp3X5XI5iqorXgFEunb6hQfSDZ7O1g0Clyxg7k/Pcr9pfLk5xDIR2To/IohlsQ==} + engines: {node: '>=14.0.0'} + + '@smithy/shared-ini-file-loader@2.3.5': + resolution: {integrity: sha512-oI99+hOvsM8oAJtxAGmoL/YCcGXtbP0fjPseYGaNmJ4X5xOFTer0KPk7AIH3AL6c5AlYErivEi1X/X78HgTVIw==} + engines: {node: '>=14.0.0'} + + '@smithy/signature-v4@2.1.4': + resolution: {integrity: sha512-gnu9gCn0qQ8IdhNjs6o3QVCXzUs33znSDYwVMWo3nX4dM6j7z9u6FC302ShYyVWfO4MkVMuGCCJ6nl3PcH7V1Q==} + engines: {node: '>=14.0.0'} + + '@smithy/smithy-client@2.4.5': + resolution: {integrity: sha512-igXOM4kPXPo6b5LZXTUqTnrGk20uVd8OXoybC3f89gczzGfziLK4yUNOmiHSdxY9OOMOnnhVe5MpTm01MpFqvA==} + engines: {node: '>=14.0.0'} + + '@smithy/types@2.11.0': + resolution: {integrity: sha512-AR0SXO7FuAskfNhyGfSTThpLRntDI5bOrU0xrpVYU0rZyjl3LBXInZFMTP/NNSd7IS6Ksdtar0QvnrPRIhVrLQ==} + engines: {node: '>=14.0.0'} + + '@smithy/url-parser@2.1.4': + resolution: {integrity: sha512-1hTy6UYRYqOZlHKH2/2NzdNQ4NNmW2Lp0sYYvztKy+dEQuLvZL9w88zCzFQqqFer3DMcscYOshImxkJTGdV+rg==} + + '@smithy/util-base64@2.2.1': + resolution: {integrity: sha512-troGfokrpoqv8TGgsb8p4vvM71vqor314514jyQ0i9Zae3qs0jUVbSMCIBB1tseVynXFRcZJAZ9hPQYlifLD5A==} + engines: {node: '>=14.0.0'} + + '@smithy/util-body-length-browser@2.1.1': + resolution: {integrity: sha512-ekOGBLvs1VS2d1zM2ER4JEeBWAvIOUKeaFch29UjjJsxmZ/f0L3K3x0dEETgh3Q9bkZNHgT+rkdl/J/VUqSRag==} + + '@smithy/util-body-length-node@2.2.2': + resolution: {integrity: sha512-U7DooaT1SfW7XHrOcxthYJnQ+WMaefRrFPxW5Qmypw38Ivv+TKvfVuVHA9V162h8BeW9rzOJwOunjgXd0DdB4w==} + engines: {node: '>=14.0.0'} + + '@smithy/util-buffer-from@2.1.1': + resolution: {integrity: sha512-clhNjbyfqIv9Md2Mg6FffGVrJxw7bgK7s3Iax36xnfVj6cg0fUG7I4RH0XgXJF8bxi+saY5HR21g2UPKSxVCXg==} + engines: {node: '>=14.0.0'} + + '@smithy/util-config-provider@2.2.1': + resolution: {integrity: sha512-50VL/tx9oYYcjJn/qKqNy7sCtpD0+s8XEBamIFo4mFFTclKMNp+rsnymD796uybjiIquB7VCB/DeafduL0y2kw==} + engines: {node: '>=14.0.0'} + + '@smithy/util-defaults-mode-browser@2.1.7': + resolution: {integrity: sha512-vvIpWsysEdY77R0Qzr6+LRW50ye7eii7AyHM0OJnTi0isHYiXo5M/7o4k8gjK/b1upQJdfjzSBoJVa2SWrI+2g==} + engines: {node: '>= 10.0.0'} + + '@smithy/util-defaults-mode-node@2.2.7': + resolution: {integrity: sha512-qzXkSDyU6Th+rNNcNkG4a7Ix7m5HlMOtSCPxTVKlkz7eVsqbSSPggegbFeQJ2MVELBB4wnzNPsVPJIrpIaJpXA==} + engines: {node: '>= 10.0.0'} + + '@smithy/util-endpoints@1.1.5': + resolution: {integrity: sha512-tgDpaUNsUtRvNiBulKU1VnpoXU1GINMfZZXunRhUXOTBEAufG1Wp79uDXLau2gg1RZ4dpAR6lXCkrmddihCGUg==} + engines: {node: '>= 14.0.0'} + + '@smithy/util-hex-encoding@2.1.1': + resolution: {integrity: sha512-3UNdP2pkYUUBGEXzQI9ODTDK+Tcu1BlCyDBaRHwyxhA+8xLP8agEKQq4MGmpjqb4VQAjq9TwlCQX0kP6XDKYLg==} + engines: {node: '>=14.0.0'} + + '@smithy/util-middleware@2.1.4': + resolution: {integrity: sha512-5yYNOgCN0DL0OplME0pthoUR/sCfipnROkbTO7m872o0GHCVNJj5xOFJ143rvHNA54+pIPMLum4z2DhPC2pVGA==} + engines: {node: '>=14.0.0'} + + '@smithy/util-retry@2.1.4': + resolution: {integrity: sha512-JRZwhA3fhkdenSEYIWatC8oLwt4Bdf2LhHbNQApqb7yFoIGMl4twcYI3BcJZ7YIBZrACA9jGveW6tuCd836XzQ==} + engines: {node: '>= 14.0.0'} + + '@smithy/util-stream@2.1.5': + resolution: {integrity: sha512-FqvBFeTgx+QC4+i8USHqU8Ifs9nYRpW/OBfksojtgkxPIQ2H7ypXDEbnQRAV7PwoNHWcSwPomLYi0svmQQG5ow==} + engines: {node: '>=14.0.0'} + + '@smithy/util-uri-escape@2.1.1': + resolution: {integrity: sha512-saVzI1h6iRBUVSqtnlOnc9ssU09ypo7n+shdQ8hBTZno/9rZ3AuRYvoHInV57VF7Qn7B+pFJG7qTzFiHxWlWBw==} + engines: {node: '>=14.0.0'} + + '@smithy/util-utf8@2.2.0': + resolution: {integrity: sha512-hBsKr5BqrDrKS8qy+YcV7/htmMGxriA1PREOf/8AGBhHIZnfilVv1Waf1OyKhSbFW15U/8+gcMUQ9/Kk5qwpHQ==} + engines: {node: '>=14.0.0'} + + '@smithy/util-waiter@2.1.4': + resolution: {integrity: sha512-AK17WaC0hx1wR9juAOsQkJ6DjDxBGEf5TrKhpXtNFEn+cVto9Li3MVsdpAO97AF7bhFXSyC8tJA3F4ThhqwCdg==} + engines: {node: '>=14.0.0'} + + before-after-hook@2.2.3: + resolution: {integrity: sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==} + + bowser@2.11.0: + resolution: {integrity: sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==} + + deprecation@2.3.1: + resolution: {integrity: sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==} + + fast-xml-parser@4.2.5: + resolution: {integrity: sha512-B9/wizE4WngqQftFPmdaMYlXoJlJOYxGQOanC77fq9k8+Z0v5dDSVh+3glErdIROP//s/jgb7ZuxKfB8nVyo0g==} + hasBin: true + + once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + + strnum@1.0.5: + resolution: {integrity: sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==} + + tslib@1.14.1: + resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} + + tslib@2.6.2: + resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + + tunnel@0.0.6: + resolution: {integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==} + engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'} + + undici@5.28.3: + resolution: {integrity: sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==} + engines: {node: '>=14.0'} + + universal-user-agent@6.0.1: + resolution: {integrity: sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==} + + uuid@8.3.2: + resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} + hasBin: true + + wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + +snapshots: + + '@actions/core@1.10.1': dependencies: '@actions/http-client': 2.2.1 uuid: 8.3.2 - dev: false - /@actions/github@6.0.0: - resolution: {integrity: sha512-alScpSVnYmjNEXboZjarjukQEzgCRmjMv6Xj47fsdnqGS73bjJNDpiiXmp8jr0UZLdUB6d9jW63IcmddUP+l0g==} + '@actions/github@6.0.0': 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==} + '@actions/http-client@2.2.1': 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==} + '@aws-crypto/crc32@3.0.0': 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==} + '@aws-crypto/ie11-detection@3.0.0': dependencies: tslib: 1.14.1 - dev: false - /@aws-crypto/sha256-browser@3.0.0: - resolution: {integrity: sha512-8VLmW2B+gjFbU5uMeqtQM6Nj0/F1bro80xQXCW6CQBWgosFWXTx77aeOF5CAIAmbOK64SdMBJdNr6J41yP5mvQ==} + '@aws-crypto/sha256-browser@3.0.0': dependencies: '@aws-crypto/ie11-detection': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 @@ -68,33 +458,24 @@ packages: '@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==} + '@aws-crypto/sha256-js@3.0.0': 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==} + '@aws-crypto/supports-web-crypto@3.0.0': dependencies: tslib: 1.14.1 - dev: false - /@aws-crypto/util@3.0.0: - resolution: {integrity: sha512-2OJlpeJpCR48CC8r+uKVChzs9Iungj9wkZrl8Z041DWEWvyIHILYKCPNzJghKsivj+S3mLo6BVc7mBNzdxA46w==} + '@aws-crypto/util@3.0.0': 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'} + '@aws-sdk/client-route-53@3.529.1': dependencies: '@aws-crypto/sha256-browser': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 @@ -141,13 +522,8 @@ packages: 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 + '@aws-sdk/client-sso-oidc@3.529.1(@aws-sdk/credential-provider-node@3.529.1)': dependencies: '@aws-crypto/sha256-browser': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 @@ -191,11 +567,8 @@ packages: 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'} + '@aws-sdk/client-sso@3.529.1': dependencies: '@aws-crypto/sha256-browser': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 @@ -237,13 +610,8 @@ packages: 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 + '@aws-sdk/client-sts@3.529.1(@aws-sdk/credential-provider-node@3.529.1)': dependencies: '@aws-crypto/sha256-browser': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 @@ -286,11 +654,8 @@ packages: 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'} + '@aws-sdk/core@3.529.1': dependencies: '@smithy/core': 1.3.8 '@smithy/protocol-http': 3.2.2 @@ -299,21 +664,15 @@ packages: '@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'} + '@aws-sdk/credential-provider-env@3.523.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'} + '@aws-sdk/credential-provider-http@3.525.0': dependencies: '@aws-sdk/types': 3.523.0 '@smithy/fetch-http-handler': 2.4.5 @@ -324,11 +683,8 @@ packages: '@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'} + '@aws-sdk/credential-provider-ini@3.529.1(@aws-sdk/credential-provider-node@3.529.1)': dependencies: '@aws-sdk/client-sts': 3.529.1(@aws-sdk/credential-provider-node@3.529.1) '@aws-sdk/credential-provider-env': 3.523.0 @@ -344,11 +700,8 @@ packages: 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'} + '@aws-sdk/credential-provider-node@3.529.1': dependencies: '@aws-sdk/credential-provider-env': 3.523.0 '@aws-sdk/credential-provider-http': 3.525.0 @@ -364,22 +717,16 @@ packages: 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'} + '@aws-sdk/credential-provider-process@3.523.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'} + '@aws-sdk/credential-provider-sso@3.529.1(@aws-sdk/credential-provider-node@3.529.1)': dependencies: '@aws-sdk/client-sso': 3.529.1 '@aws-sdk/token-providers': 3.529.1(@aws-sdk/credential-provider-node@3.529.1) @@ -391,11 +738,8 @@ packages: 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'} + '@aws-sdk/credential-provider-web-identity@3.529.1(@aws-sdk/credential-provider-node@3.529.1)': dependencies: '@aws-sdk/client-sts': 3.529.1(@aws-sdk/credential-provider-node@3.529.1) '@aws-sdk/types': 3.523.0 @@ -405,60 +749,42 @@ packages: 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'} + '@aws-sdk/middleware-host-header@3.523.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'} + '@aws-sdk/middleware-logger@3.523.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'} + '@aws-sdk/middleware-recursion-detection@3.523.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'} + '@aws-sdk/middleware-sdk-route53@3.523.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'} + '@aws-sdk/middleware-user-agent@3.525.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'} + '@aws-sdk/region-config-resolver@3.525.0': dependencies: '@aws-sdk/types': 3.523.0 '@smithy/node-config-provider': 2.2.5 @@ -466,11 +792,8 @@ packages: '@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'} + '@aws-sdk/token-providers@3.529.1(@aws-sdk/credential-provider-node@3.529.1)': dependencies: '@aws-sdk/client-sso-oidc': 3.529.1(@aws-sdk/credential-provider-node@3.529.1) '@aws-sdk/types': 3.523.0 @@ -481,84 +804,51 @@ packages: 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'} + '@aws-sdk/types@3.523.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'} + '@aws-sdk/util-endpoints@3.525.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'} + '@aws-sdk/util-locate-window@3.495.0': dependencies: tslib: 2.6.2 - dev: false - /@aws-sdk/util-user-agent-browser@3.523.0: - resolution: {integrity: sha512-6ZRNdGHX6+HQFqTbIA5+i8RWzxFyxsZv8D3soRfpdyWIKkzhSz8IyRKXRciwKBJDaC7OX2jzGE90wxRQft27nA==} + '@aws-sdk/util-user-agent-browser@3.523.0': 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 + '@aws-sdk/util-user-agent-node@3.525.0': 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==} + '@aws-sdk/util-utf8-browser@3.259.0': 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'} + '@aws-sdk/xml-builder@3.523.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 + '@fastify/busboy@2.1.1': {} - /@octokit/auth-token@4.0.0: - resolution: {integrity: sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==} - engines: {node: '>= 18'} - dev: false + '@octokit/auth-token@4.0.0': {} - /@octokit/core@5.1.0: - resolution: {integrity: sha512-BDa2VAMLSh3otEiaMJ/3Y36GU4qf6GI+VivQ/P41NC6GHcdxpKlqV0ikSZ5gdQsmS3ojXeRx5vasgNTinF0Q4g==} - engines: {node: '>= 18'} + '@octokit/core@5.1.0': dependencies: '@octokit/auth-token': 4.0.0 '@octokit/graphql': 7.0.2 @@ -567,115 +857,72 @@ packages: '@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'} + '@octokit/endpoint@9.0.4': 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'} + '@octokit/graphql@7.0.2': 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/openapi-types@20.0.0': {} - /@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' + '@octokit/plugin-paginate-rest@9.2.1(@octokit/core@5.1.0)': 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' + '@octokit/plugin-request-log@4.0.1(@octokit/core@5.1.0)': 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' + '@octokit/plugin-rest-endpoint-methods@10.4.1(@octokit/core@5.1.0)': 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'} + '@octokit/request-error@5.0.1': 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'} + '@octokit/request@8.2.0': 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'} + '@octokit/rest@20.0.2': 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==} + '@octokit/types@12.6.0': 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'} + '@smithy/abort-controller@2.1.4': 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'} + '@smithy/config-resolver@2.1.5': 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'} + '@smithy/core@1.3.8': dependencies: '@smithy/middleware-endpoint': 2.4.6 '@smithy/middleware-retry': 2.1.7 @@ -685,74 +932,53 @@ packages: '@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'} + '@smithy/credential-provider-imds@2.2.6': 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==} + '@smithy/eventstream-codec@2.1.4': 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==} + '@smithy/fetch-http-handler@2.4.5': 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'} + '@smithy/hash-node@2.1.4': 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==} + '@smithy/invalid-dependency@2.1.4': 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'} + '@smithy/is-array-buffer@2.1.1': dependencies: tslib: 2.6.2 - dev: false - /@smithy/middleware-content-length@2.1.4: - resolution: {integrity: sha512-C6VRwfcr0w9qRFhDGCpWMVhlEIBFlmlPRP1aX9Cv9xDj9SUwlDrNvoV1oP1vjRYuLxCDgovBBynCwwcluS2wLw==} - engines: {node: '>=14.0.0'} + '@smithy/middleware-content-length@2.1.4': 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'} + '@smithy/middleware-endpoint@2.4.6': dependencies: '@smithy/middleware-serde': 2.2.1 '@smithy/node-config-provider': 2.2.5 @@ -761,11 +987,8 @@ packages: '@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'} + '@smithy/middleware-retry@2.1.7': dependencies: '@smithy/node-config-provider': 2.2.5 '@smithy/protocol-http': 3.2.2 @@ -776,96 +999,63 @@ packages: '@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'} + '@smithy/middleware-serde@2.2.1': 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'} + '@smithy/middleware-stack@2.1.4': 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'} + '@smithy/node-config-provider@2.2.5': 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'} + '@smithy/node-http-handler@2.4.3': 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'} + '@smithy/property-provider@2.1.4': 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'} + '@smithy/protocol-http@3.2.2': 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'} + '@smithy/querystring-builder@2.1.4': 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'} + '@smithy/querystring-parser@2.1.4': 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'} + '@smithy/service-error-classification@2.1.4': 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'} + '@smithy/shared-ini-file-loader@2.3.5': 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'} + '@smithy/signature-v4@2.1.4': dependencies: '@smithy/eventstream-codec': 2.1.4 '@smithy/is-array-buffer': 2.1.1 @@ -875,11 +1065,8 @@ packages: '@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'} + '@smithy/smithy-client@2.4.5': dependencies: '@smithy/middleware-endpoint': 2.4.6 '@smithy/middleware-stack': 2.1.4 @@ -887,74 +1074,49 @@ packages: '@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'} + '@smithy/types@2.11.0': dependencies: tslib: 2.6.2 - dev: false - /@smithy/url-parser@2.1.4: - resolution: {integrity: sha512-1hTy6UYRYqOZlHKH2/2NzdNQ4NNmW2Lp0sYYvztKy+dEQuLvZL9w88zCzFQqqFer3DMcscYOshImxkJTGdV+rg==} + '@smithy/url-parser@2.1.4': 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'} + '@smithy/util-base64@2.2.1': 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==} + '@smithy/util-body-length-browser@2.1.1': 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'} + '@smithy/util-body-length-node@2.2.2': dependencies: tslib: 2.6.2 - dev: false - /@smithy/util-buffer-from@2.1.1: - resolution: {integrity: sha512-clhNjbyfqIv9Md2Mg6FffGVrJxw7bgK7s3Iax36xnfVj6cg0fUG7I4RH0XgXJF8bxi+saY5HR21g2UPKSxVCXg==} - engines: {node: '>=14.0.0'} + '@smithy/util-buffer-from@2.1.1': 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'} + '@smithy/util-config-provider@2.2.1': 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'} + '@smithy/util-defaults-mode-browser@2.1.7': 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'} + '@smithy/util-defaults-mode-node@2.2.7': dependencies: '@smithy/config-resolver': 2.1.5 '@smithy/credential-provider-imds': 2.2.6 @@ -963,44 +1125,29 @@ packages: '@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'} + '@smithy/util-endpoints@1.1.5': 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'} + '@smithy/util-hex-encoding@2.1.1': dependencies: tslib: 2.6.2 - dev: false - /@smithy/util-middleware@2.1.4: - resolution: {integrity: sha512-5yYNOgCN0DL0OplME0pthoUR/sCfipnROkbTO7m872o0GHCVNJj5xOFJ143rvHNA54+pIPMLum4z2DhPC2pVGA==} - engines: {node: '>=14.0.0'} + '@smithy/util-middleware@2.1.4': 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'} + '@smithy/util-retry@2.1.4': 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'} + '@smithy/util-stream@2.1.5': dependencies: '@smithy/fetch-http-handler': 2.4.5 '@smithy/node-http-handler': 2.4.3 @@ -1010,90 +1157,50 @@ packages: '@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'} + '@smithy/util-uri-escape@2.1.1': 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'} + '@smithy/util-utf8@2.2.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'} + '@smithy/util-waiter@2.1.4': 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 + before-after-hook@2.2.3: {} - /bowser@2.11.0: - resolution: {integrity: sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==} - dev: false + bowser@2.11.0: {} - /deprecation@2.3.1: - resolution: {integrity: sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==} - dev: false + deprecation@2.3.1: {} - /fast-xml-parser@4.2.5: - resolution: {integrity: sha512-B9/wizE4WngqQftFPmdaMYlXoJlJOYxGQOanC77fq9k8+Z0v5dDSVh+3glErdIROP//s/jgb7ZuxKfB8nVyo0g==} - hasBin: true + fast-xml-parser@4.2.5: dependencies: strnum: 1.0.5 - dev: false - /once@1.4.0: - resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + once@1.4.0: dependencies: wrappy: 1.0.2 - dev: false - /strnum@1.0.5: - resolution: {integrity: sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==} - dev: false + strnum@1.0.5: {} - /tslib@1.14.1: - resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} - dev: false + tslib@1.14.1: {} - /tslib@2.6.2: - resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} - dev: false + tslib@2.6.2: {} - /tunnel@0.0.6: - resolution: {integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==} - engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'} - dev: false + tunnel@0.0.6: {} - /undici@5.28.3: - resolution: {integrity: sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==} - engines: {node: '>=14.0'} + undici@5.28.3: dependencies: '@fastify/busboy': 2.1.1 - dev: false - /universal-user-agent@6.0.1: - resolution: {integrity: sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==} - dev: false + universal-user-agent@6.0.1: {} - /uuid@8.3.2: - resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} - hasBin: true - dev: false + uuid@8.3.2: {} - /wrappy@1.0.2: - resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - dev: false + wrappy@1.0.2: {} diff --git a/.github/scripts/jira/package.json b/.github/scripts/jira/package.json index 69f307c5509..2c57d35a647 100644 --- a/.github/scripts/jira/package.json +++ b/.github/scripts/jira/package.json @@ -8,6 +8,10 @@ "keywords": [], "author": "", "license": "MIT", + "engines": { + "node": ">=18", + "pnpm": ">=9" + }, "dependencies": { "@actions/core": "^1.10.1", "node-fetch": "^2.7.0" diff --git a/.github/scripts/jira/pnpm-lock.yaml b/.github/scripts/jira/pnpm-lock.yaml index e6e4d82b150..09ba8c749cc 100644 --- a/.github/scripts/jira/pnpm-lock.yaml +++ b/.github/scripts/jira/pnpm-lock.yaml @@ -1,39 +1,33 @@ -lockfileVersion: '6.0' +lockfileVersion: '9.0' settings: autoInstallPeers: true excludeLinksFromLockfile: false -dependencies: - '@actions/core': - specifier: ^1.10.1 - version: 1.10.1 - node-fetch: - specifier: ^2.7.0 - version: 2.7.0 +importers: + + .: + dependencies: + '@actions/core': + specifier: ^1.10.1 + version: 1.10.1 + node-fetch: + specifier: ^2.7.0 + version: 2.7.0 packages: - /@actions/core@1.10.1: + '@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/http-client@2.2.1: + '@actions/http-client@2.2.1': resolution: {integrity: sha512-KhC/cZsq7f8I4LfZSJKgCvEwfkE8o1538VoBeoGzokVLLnbFDEAdFD3UhoMklxo2un9NJVBdANOresx7vTHlHw==} - dependencies: - tunnel: 0.0.6 - undici: 5.28.4 - dev: false - /@fastify/busboy@2.1.1: + '@fastify/busboy@2.1.1': resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==} engines: {node: '>=14'} - dev: false - /node-fetch@2.7.0: + node-fetch@2.7.0: resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} engines: {node: 4.x || >=6.0.0} peerDependencies: @@ -41,38 +35,59 @@ packages: peerDependenciesMeta: encoding: optional: true - dependencies: - whatwg-url: 5.0.0 - dev: false - /tr46@0.0.3: + tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} - dev: false - /tunnel@0.0.6: + 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.4: + undici@5.28.4: resolution: {integrity: sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==} engines: {node: '>=14.0'} - dependencies: - '@fastify/busboy': 2.1.1 - dev: false - /uuid@8.3.2: + uuid@8.3.2: resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} hasBin: true - dev: false - /webidl-conversions@3.0.1: + webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} - dev: false - /whatwg-url@5.0.0: + whatwg-url@5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + +snapshots: + + '@actions/core@1.10.1': + dependencies: + '@actions/http-client': 2.2.1 + uuid: 8.3.2 + + '@actions/http-client@2.2.1': + dependencies: + tunnel: 0.0.6 + undici: 5.28.4 + + '@fastify/busboy@2.1.1': {} + + node-fetch@2.7.0: + dependencies: + whatwg-url: 5.0.0 + + tr46@0.0.3: {} + + tunnel@0.0.6: {} + + undici@5.28.4: + dependencies: + '@fastify/busboy': 2.1.1 + + uuid@8.3.2: {} + + webidl-conversions@3.0.1: {} + + whatwg-url@5.0.0: dependencies: tr46: 0.0.3 webidl-conversions: 3.0.1 - dev: false diff --git a/.github/workflows/automation-benchmark-tests.yml b/.github/workflows/automation-benchmark-tests.yml index c1a8d9edc9f..c21171a83db 100644 --- a/.github/workflows/automation-benchmark-tests.yml +++ b/.github/workflows/automation-benchmark-tests.yml @@ -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@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@2967f2287bd3f3ddbac7b476e9568993df01796e # v2.3.27 env: DETACH_RUNNER: true TEST_SUITE: benchmark diff --git a/.github/workflows/automation-load-tests.yml b/.github/workflows/automation-load-tests.yml index d56ee2e74c4..187ca3b5b66 100644 --- a/.github/workflows/automation-load-tests.yml +++ b/.github/workflows/automation-load-tests.yml @@ -11,6 +11,10 @@ on: required: true default: U02Q14G80TY type: string + test_secrets_override_key: + description: 'Key to run tests with custom test secrets' + required: false + type: string jobs: automation_load: @@ -82,7 +86,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@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@2967f2287bd3f3ddbac7b476e9568993df01796e # v2.3.27 env: RR_CPU: 4000m RR_MEM: 4Gi @@ -95,6 +99,7 @@ jobs: PYROSCOPE_KEY: ${{ secrets.QA_PYROSCOPE_KEY }} with: test_command_to_run: cd integration-tests/load && go test -timeout 1h -v -run TestLogTrigger ./automationv2_1 -count=1 + test_secrets_override_base64: ${{ secrets[inputs.test_secrets_override_key] }} test_download_vendor_packages_command: make gomod cl_repo: ${{ env.CHAINLINK_IMAGE }} cl_image_tag: ${{ env.CHAINLINK_VERSION }} diff --git a/.github/workflows/automation-nightly-tests.yml b/.github/workflows/automation-nightly-tests.yml index 39a6d907e61..f018124624a 100644 --- a/.github/workflows/automation-nightly-tests.yml +++ b/.github/workflows/automation-nightly-tests.yml @@ -88,7 +88,7 @@ jobs: with: ref: ${{ github.head_ref || github.ref_name }} - name: Setup GAP for Grafana - uses: smartcontractkit/.github/actions/setup-gap@6c9d62fdad050cfb8b59376ded291f1350705944 # setup-gap@0.2.2 + uses: smartcontractkit/.github/actions/setup-gap@d316f66b2990ea4daa479daa3de6fc92b00f863e # setup-gap@0.3.2 with: # aws inputs aws-region: ${{ secrets.AWS_REGION }} @@ -114,7 +114,7 @@ jobs: grafanaDashboardUrl: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs" grafanaBearerToken: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }} - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@2967f2287bd3f3ddbac7b476e9568993df01796e # v2.3.27 env: TEST_SUITE: ${{ matrix.tests.suite }} with: diff --git a/.github/workflows/automation-ondemand-tests.yml b/.github/workflows/automation-ondemand-tests.yml index 588bf567bc0..83701ef7f9d 100644 --- a/.github/workflows/automation-ondemand-tests.yml +++ b/.github/workflows/automation-ondemand-tests.yml @@ -2,24 +2,28 @@ name: Automation On Demand Tests on: workflow_dispatch: inputs: - chainlinkVersion: - description: Chainlink image version to use - required: false - type: string - chainlinkImage: - description: Chainlink image repo to use (Leave empty to build from head/ref) + chainlinkVersionUpdate: + description: Chainlink image version to upgrade to required: false type: string - chainlinkVersionUpdate: + chainlinkImageUpdate: + description: Chainlink image repo to upgrade to (Leave empty to build from head/ref) + options: + - public.ecr.aws/chainlink/chainlink + - QA_ECR + type: choice + chainlinkVersion: description: Chainlink image version to use initially for upgrade test default: latest required: true type: string - chainlinkImageUpdate: + chainlinkImage: description: Chainlink image repo to use initially for upgrade test required: true - default: public.ecr.aws/chainlink/chainlink - type: string + options: + - public.ecr.aws/chainlink/chainlink + - QA_ECR + type: choice enableChaos: description: Check to enable chaos tests type: boolean @@ -71,7 +75,7 @@ jobs: - name: Check if image exists if: inputs.chainlinkImage == '' id: check-image - uses: smartcontractkit/chainlink-github-actions/docker/image-exists@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/docker/image-exists@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: repository: chainlink tag: ${{ github.sha }}${{ matrix.image.tag-suffix }} @@ -79,7 +83,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@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: cl_repo: smartcontractkit/chainlink cl_ref: ${{ github.sha }} @@ -151,7 +155,7 @@ jobs: - name: reorg id: reorg suite: reorg - nodes: 5 + nodes: 7 os: ubuntu-latest enabled: ${{ inputs.enableReorg }} pyroscope_env: ci-automation-on-demand-reorg @@ -198,27 +202,28 @@ jobs: id: determine-build shell: bash run: | - if [[ "${{ inputs.chainlinkImage }}" == "" ]]; then + if [[ "${{ inputs.chainlinkImage }}" == "QA_ECR" ]]; then echo "image=${{ env.CHAINLINK_IMAGE }}" >>$GITHUB_OUTPUT - echo "version=${{ github.sha }}" >>$GITHUB_OUTPUT - echo "upgrade_version=${{ github.sha }}" >>$GITHUB_OUTPUT + else + echo "image=${{ inputs.chainlinkImage }}" >>$GITHUB_OUTPUT + fi + if [[ "${{ inputs.chainlinkImageUpdate }}" == "QA_ECR" ]]; then echo "upgrade_image=${{ env.CHAINLINK_IMAGE }}" >>$GITHUB_OUTPUT else - READ_CL_IMAGE=$(jq -r '.inputs.chainlinkImage' $GITHUB_EVENT_PATH) - echo ::add-mask::$READ_CL_IMAGE - echo "image=$READ_CL_IMAGE" >>$GITHUB_OUTPUT + echo "upgrade_image=${{ inputs.chainlinkImageUpdate }}" >>$GITHUB_OUTPUT + fi + if [[ -z "${{ inputs.chainlinkVersion }}" ]] && [[ "${{ inputs.chainlinkImage }}" == "QA_ECR" ]]; then + echo "version=${{ github.sha }}" >>$GITHUB_OUTPUT + else echo "version=${{ inputs.chainlinkVersion }}" >>$GITHUB_OUTPUT - echo "upgrade_version=${{ inputs.chainlinkVersion }}" >>$GITHUB_OUTPUT - echo "upgrade_image=$READ_CL_IMAGE" >>$GITHUB_OUTPUT fi - 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 - echo "version=${{ inputs.chainlinkVersionUpdate }}" >>$GITHUB_OUTPUT + if [[ -z "${{ inputs.chainlinkVersionUpdate }}" ]] && [[ "${{ inputs.chainlinkImageUpdate }}" == "QA_ECR" ]]; then + echo "upgrade_version=${{ github.sha }}" >>$GITHUB_OUTPUT + else + echo "upgrade_version=${{ inputs.chainlinkVersionUpdate }}" >>$GITHUB_OUTPUT fi - name: Setup GAP for Grafana - uses: smartcontractkit/.github/actions/setup-gap@6c9d62fdad050cfb8b59376ded291f1350705944 # setup-gap@0.2.2 + uses: smartcontractkit/.github/actions/setup-gap@d316f66b2990ea4daa479daa3de6fc92b00f863e # setup-gap@0.3.2 with: # aws inputs aws-region: ${{ secrets.AWS_REGION }} @@ -226,100 +231,21 @@ jobs: api-gateway-host: ${{ secrets.AWS_API_GW_HOST_GRAFANA }} # other inputs duplicate-authorization-header: "true" - - name: Prepare Base64 TOML config - env: - SELECTED_NETWORKS: ${{ matrix.tests.network }} - OLD_IMAGE: ${{ steps.determine-build.outputs.image }} - OLD_VERSION: ${{ steps.determine-build.outputs.version }} - UPGRADE_VERSION: ${{ steps.determine-build.outputs.upgrade_version }} - UPGRADE_IMAGE: ${{ steps.determine-build.outputs.upgrade_image }} - PYROSCOPE_SERVER: ${{ matrix.tests.pyroscope_env == '' && '' || !startsWith(github.ref, 'refs/tags/') && '' || secrets.QA_PYROSCOPE_INSTANCE }} # Avoid sending blank envs https://github.com/orgs/community/discussions/25725 - PYROSCOPE_ENVIRONMENT: ${{ matrix.tests.pyroscope_env }} - PYROSCOPE_KEY: ${{ secrets.QA_PYROSCOPE_KEY }} - RUN_ID: ${{ github.run_id }} - TEST_LOG_COLLECT: "true" - LOKI_ENDPOINT: https://${{ secrets.GRAFANA_INTERNAL_HOST }}/loki/api/v1/push - LOKI_TENANT_ID: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - LOKI_BASIC_AUTH: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - LOGSTREAM_LOG_TARGETS: ${{ vars.LOGSTREAM_LOG_TARGETS }} - GRAFANA_URL: "http://localhost:8080/primary" - GRAFANA_DASHBOARD_URL: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs" - $GRAFANA_BEARER_TOKEN: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }} - run: | - echo ::add-mask::$UPGRADE_IMAGE - echo ::add-mask::$OLD_IMAGE - - # load reusable functions - source ./.github/scripts/functions.sh - - selected_networks=$(convert_to_toml_array "$SELECTED_NETWORKS") - - if [ -n "$PYROSCOPE_SERVER" ]; then - pyroscope_enabled=true - else - pyroscope_enabled=false - fi - - if [ -n "$TEST_LOG_COLLECT" ]; then - test_log_collect=true - else - test_log_collect=false - fi - - log_targets=$(convert_to_toml_array "$LOGSTREAM_LOG_TARGETS") - - grafana_bearer_token="" - if [ -n "$GRAFANA_BEARER_TOKEN" ]; then - grafana_bearer_token="bearer_token_secret=\"$GRAFANA_BEARER_TOKEN\"" - fi - - cat << EOF > config.toml - [Network] - selected_networks=$selected_networks - - [ChainlinkImage] - image="$OLD_IMAGE" - version="$OLD_VERSION" - - [ChainlinkUpgradeImage] - image="$UPGRADE_IMAGE" - version="$UPGRADE_VERSION" - - [Logging] - test_log_collect=$test_log_collect - run_id="$RUN_ID" - - [Logging.LogStream] - log_targets=$log_targets - - [Logging.Loki] - tenant_id="$LOKI_TENANT_ID" - endpoint="$LOKI_ENDPOINT" - basic_auth_secret="$LOKI_BASIC_AUTH" - - [Logging.Grafana] - base_url="$GRAFANA_URL" - dashboard_url="$GRAFANA_DASHBOARD_URL" - $grafana_bearer_token - - [Pyroscope] - enabled=$pyroscope_enabled - server_url="$PYROSCOPE_SERVER" - environment="$PYROSCOPE_ENVIRONMENT" - key_secret="$PYROSCOPE_KEY" - EOF - - BASE64_CONFIG_OVERRIDE=$(cat config.toml | base64 -w 0) - 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@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@aa8eea635029ab8d95abd3c206f56dae1e22e623 # v2.3.28 if: ${{ matrix.tests.enabled == true }} - env: - TEST_SUITE: ${{ matrix.tests.suite }} with: + test_config_override_base64: ${{ env.BASE64_CONFIG_OVERRIDE }} test_command_to_run: cd ./integration-tests && go test -timeout 60m -count=1 -json -test.parallel=${{ matrix.tests.nodes }} ${{ matrix.tests.command }} 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false -hidepassinglogs test_download_vendor_packages_command: cd ./integration-tests && go mod download + test_suite: ${{ matrix.tests.suite }} + test_config_chainlink_version: ${{ steps.determine-build.outputs.version }} + test_config_chainlink_upgrade_version: ${{ steps.determine-build.outputs.upgrade_version }} + test_config_selected_networks: ${{ matrix.tests.network }} + test_config_logging_run_id: ${{ github.run_id }} + test_config_logstream_log_targets: ${{ vars.LOGSTREAM_LOG_TARGETS }} + test_config_test_log_collect: "true" cl_repo: ${{ steps.determine-build.outputs.image }} cl_image_tag: ${{ steps.determine-build.outputs.version }} aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} @@ -330,6 +256,19 @@ jobs: QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} + DEFAULT_CHAINLINK_IMAGE: ${{ steps.determine-build.outputs.image }} + DEFAULT_CHAINLINK_UPGRADE_IMAGE: ${{ steps.determine-build.outputs.upgrade_image }} + DEFAULT_LOKI_TENANT_ID: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} + DEFAULT_LOKI_ENDPOINT: https://${{ secrets.GRAFANA_INTERNAL_HOST }}/loki/api/v1/push + DEFAULT_LOKI_BASIC_AUTH: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} + DEFAULT_GRAFANA_BASE_URL: "http://localhost:8080/primary" + DEFAULT_GRAFANA_DASHBOARD_URL: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs" + DEFAULT_GRAFANA_BEARER_TOKEN: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }} + DEFAULT_PYROSCOPE_SERVER_URL: ${{ matrix.tests.pyroscope_env == '' && '' || !startsWith(github.ref, 'refs/tags/') && '' || secrets.QA_PYROSCOPE_INSTANCE }} # Avoid sending blank envs https://github.com/orgs/community/discussions/25725 + DEFAULT_PYROSCOPE_KEY: ${{ secrets.QA_PYROSCOPE_KEY }} + DEFAULT_PYROSCOPE_ENVIRONMENT: ${{ matrix.tests.pyroscope_env }} + DEFAULT_PYROSCOPE_ENABLED: ${{ matrix.tests.pyroscope_env == '' || !startsWith(github.ref, 'refs/tags/') && 'false' || 'true' }} + - name: Upload test log uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 if: failure() diff --git a/.github/workflows/build-publish-pr.yml b/.github/workflows/build-publish-pr.yml index d30e49f3cd6..36eac61cab0 100644 --- a/.github/workflows/build-publish-pr.yml +++ b/.github/workflows/build-publish-pr.yml @@ -32,7 +32,7 @@ jobs: - name: Check if image exists id: check-image - uses: smartcontractkit/chainlink-github-actions/docker/image-exists@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/docker/image-exists@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: repository: ${{ env.ECR_IMAGE_NAME}} tag: sha-${{ env.GIT_SHORT_SHA }} diff --git a/.github/workflows/changeset.yml b/.github/workflows/changeset.yml index 7e6d13021c4..cfb4b322bf2 100644 --- a/.github/workflows/changeset.yml +++ b/.github/workflows/changeset.yml @@ -68,7 +68,7 @@ jobs: uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0 if: ${{ steps.files-changed.outputs.core == 'true' || steps.files-changed.outputs.shared == 'true' }} with: - version: ^8.0.0 + version: ^9.0.0 - name: Setup node uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 diff --git a/.github/workflows/changesets-preview-pr.yml b/.github/workflows/changesets-preview-pr.yml index 03d1fecf618..94dc1635c4e 100644 --- a/.github/workflows/changesets-preview-pr.yml +++ b/.github/workflows/changesets-preview-pr.yml @@ -31,7 +31,7 @@ jobs: uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0 if: steps.change.outputs.core-changeset == 'true' with: - version: ^8.0.0 + version: ^9.0.0 - name: Setup node uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 diff --git a/.github/workflows/ci-core.yml b/.github/workflows/ci-core.yml index b0c80a4afb3..aac8e578d13 100644 --- a/.github/workflows/ci-core.yml +++ b/.github/workflows/ci-core.yml @@ -88,15 +88,22 @@ jobs: type: - cmd: go_core_tests id: core_unit + os: ubuntu22.04-32cores-128GB - cmd: go_core_race_tests id: core_race + # use 64cores for overnight runs only due to massive number of runs from PRs + os: ${{ github.event_name == 'schedule' && 'ubuntu-latest-64cores-256GB' || 'ubuntu-latest-32cores-128GB' }} - cmd: go_core_fuzz id: core_fuzz + os: ubuntu22.04-8cores-32GB name: Core Tests (${{ matrix.type.cmd }}) # 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 + runs-on: ${{ matrix.type.os }} + permissions: + id-token: write + contents: read steps: - name: Checkout the repo uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 @@ -111,9 +118,10 @@ jobs: - name: Setup Go if: ${{ needs.filter.outputs.changes == 'true' }} uses: ./.github/actions/setup-go - - name: Run short tests - if: ${{ needs.filter.outputs.changes == 'true' && matrix.type.cmd == 'go_core_tests' }} - run: go test -short ./... + - name: Replace chainlink-evm deps + if: ${{ needs.filter.outputs.changes == 'true' && inputs.evm-ref != ''}} + shell: bash + run: go get github.com/smartcontractkit/chainlink-integrations/evm/relayer@${{ inputs.evm-ref }} - name: Setup Solana if: ${{ needs.filter.outputs.changes == 'true' }} uses: ./.github/actions/setup-solana @@ -129,10 +137,6 @@ jobs: - 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 . @@ -173,7 +177,7 @@ jobs: CL_DATABASE_URL: ${{ env.DB_URL }} run: ./tools/bin/${{ matrix.type.cmd }} ./... - name: Print Filtered Test Results - if: ${{ failure() && matrix.type.cmd == 'go_core_tests' && needs.filter.outputs.changes == 'true' }} + if: ${{ failure() && matrix.type.cmd == 'go_core_tests' && needs.filter.outputs.changes == 'true' && steps.run-tests.conclusion == 'failure' }} run: | cat output.txt | gotestloghelper -ci - name: Print Races @@ -243,6 +247,9 @@ jobs: if: ${{ always() && github.actor != 'dependabot[bot]' }} env: CL_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/chainlink_test?sslmode=disable + permissions: + id-token: write + contents: read steps: - name: Checkout the repo uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 @@ -269,7 +276,7 @@ jobs: - 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 }} + run: go get github.com/smartcontractkit/chainlink-integrations/evm/relayer@${{ inputs.evm-ref }} - name: Build binary if: ${{ needs.filter.outputs.changes == 'true' }} run: go build -o chainlink.test . @@ -280,7 +287,14 @@ jobs: if: ${{ needs.filter.outputs.changes == 'true' }} uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 with: + name: go_core_tests_logs path: ./artifacts + - name: Delete go_core_tests_logs/coverage.txt + if: ${{ needs.filter.outputs.changes == 'true' }} + shell: bash + run: | + # Need to delete coverage.txt so the disk doesn't fill up + rm -f ./artifacts/go_core_tests_logs/coverage.txt - name: Build flakey test runner if: ${{ needs.filter.outputs.changes == 'true' }} run: go build ./tools/flakeytests/cmd/runner @@ -326,22 +340,50 @@ jobs: 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@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 + - name: Set SonarQube Report Paths id: sonarqube_report_paths shell: bash run: | echo "sonarqube_tests_report_paths=$(find go_core_tests_logs -name output.txt | paste -sd "," -)" >> $GITHUB_OUTPUT echo "sonarqube_coverage_report_paths=$(find go_core_tests_logs -name coverage.txt | paste -sd "," -)" >> $GITHUB_OUTPUT + echo "sonarqube_lint_report_paths=$(find golangci-lint-report -name golangci-lint-report.xml | paste -sd "," -)" >> $GITHUB_OUTPUT + + - name: Check SonarQube Report Paths + id: check_sonarqube_paths + run: | + ARGS="" + + if [[ -z "${{ steps.sonarqube_report_paths.outputs.sonarqube_tests_report_paths }}" ]]; then + echo "::warning::No test report paths found, will not pass to sonarqube" + else + ARGS="$ARGS -Dsonar.go.tests.reportPaths=${{ steps.sonarqube_report_paths.outputs.sonarqube_tests_report_paths }}" + fi + + if [[ -z "${{ steps.sonarqube_report_paths.outputs.sonarqube_coverage_report_paths }}" ]]; then + echo "::warning::No coverage report paths found, will not pass to sonarqube" + else + ARGS="$ARGS -Dsonar.go.coverage.reportPaths=${{ steps.sonarqube_report_paths.outputs.sonarqube_coverage_report_paths }}" + fi + + if [[ -z "${{ steps.sonarqube_report_paths.outputs.sonarqube_lint_report_paths }}" ]]; then + echo "::warning::No lint report paths found, will not pass to sonarqube" + else + ARGS="$ARGS -Dsonar.go.golangci-lint.reportPaths=${{ steps.sonarqube_report_paths.outputs.sonarqube_lint_report_paths }}" + fi + + echo "SONARQUBE_ARGS=$ARGS" >> $GITHUB_ENV + - name: SonarQube Scan - uses: sonarsource/sonarqube-scan-action@69c1a75940dec6249b86dace6b630d3a2ae9d2a7 # v2.0.1 + if: ${{ env.SONARQUBE_ARGS != '' }} + uses: sonarsource/sonarqube-scan-action@aecaf43ae57e412bd97d70ef9ce6076e672fe0a9 # v2.3.0 with: - args: > - -Dsonar.go.tests.reportPaths=${{ steps.sonarqube_report_paths.outputs.sonarqube_tests_report_paths }} - -Dsonar.go.coverage.reportPaths=${{ steps.sonarqube_report_paths.outputs.sonarqube_coverage_report_paths }} - -Dsonar.go.golangci-lint.reportPaths=golangci-lint-report/golangci-lint-report.xml + args: ${{ env.SONARQUBE_ARGS }} env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + SONAR_SCANNER_OPTS: "-Xms6g -Xmx8g" + - name: Collect Metrics if: always() id: collect-gha-metrics @@ -378,7 +420,9 @@ jobs: run: curl https://github.com/smartcontractkit/wsrpc/raw/main/cmd/protoc-gen-go-wsrpc/protoc-gen-go-wsrpc --output $HOME/go/bin/protoc-gen-go-wsrpc && chmod +x $HOME/go/bin/protoc-gen-go-wsrpc - name: Setup NodeJS uses: ./.github/actions/setup-nodejs - - run: make generate # generate install go deps + - run: | + make rm-mocked + make generate - name: Ensure clean after generate run: git diff --stat --exit-code - run: make gomodtidy diff --git a/.github/workflows/ci-protobuf.yml b/.github/workflows/ci-protobuf.yml new file mode 100644 index 00000000000..d832939ded9 --- /dev/null +++ b/.github/workflows/ci-protobuf.yml @@ -0,0 +1,36 @@ +name: CI ProtoBuf + +on: + pull_request: + +jobs: + buf-breaking: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + + - name: Setup buf + uses: bufbuild/buf-setup-action@35c243d7f2a909b1d4e40399b348a7fdab27d78d # v1.34.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Run buf breaking + uses: bufbuild/buf-breaking-action@c57b3d842a5c3f3b454756ef65305a50a587c5ba # v1.1.4 + env: + REPO_URL: https://github.com/${{ github.repository }} + BASE_BRANCH: ${{ github.base_ref }} + with: + against: "${REPO_URL}.git#branch=${BASE_BRANCH}" + + - name: Collect Metrics + if: always() + id: collect-gha-metrics + uses: smartcontractkit/push-gha-metrics-action@d9da21a2747016b3e13de58c7d4115a3d5c97935 # v3.0.1 + with: + id: ci-protobuf + org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} + basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} + hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} + this-job-name: buf-breaking + continue-on-error: true diff --git a/.github/workflows/client-compatibility-tests.yml b/.github/workflows/client-compatibility-tests.yml index d8a4709fb61..311614033b0 100644 --- a/.github/workflows/client-compatibility-tests.yml +++ b/.github/workflows/client-compatibility-tests.yml @@ -84,7 +84,7 @@ jobs: runs-on: ubuntu-latest outputs: should_run: ${{ steps.should-run.outputs.should_run }} - eth_implementations : ${{ steps.should-run.outputs.eth_implementations }} + eth_implementations: ${{ steps.should-run.outputs.eth_implementations }} env: GITHUB_REF_TYPE: ${{ github.ref_type }} steps: @@ -117,7 +117,7 @@ jobs: RELEASED_DAYS_AGO: 4 GITHUB_REF_TYPE: ${{ github.ref_type }} outputs: - evm_implementations : ${{ steps.select-implementations.outputs.evm_implementations }} + evm_implementations: ${{ steps.select-implementations.outputs.evm_implementations }} chainlink_version: ${{ steps.select-chainlink-version.outputs.chainlink_version }} latest_image_count: ${{ steps.get-image-count.outputs.image_count }} steps: @@ -131,7 +131,7 @@ jobs: run: | PATH=$PATH:$(go env GOPATH)/bin export PATH - + if [ "$GITHUB_EVENT_NAME" = "schedule" ]; then echo "Checking for new releases" implementations_arr=() @@ -141,23 +141,27 @@ jobs: implementations_arr+=("geth") fi new_besu=$(ghlatestreleasechecker "hyperledger/besu" $RELEASED_DAYS_AGO) - if [ "new_besu" != "none" ]; then + if [ "$new_besu" != "none" ]; then echo "New besu release found: $new_besu" implementations_arr+=("besu") fi new_erigon=$(ghlatestreleasechecker "ledgerwatch/erigon" $RELEASED_DAYS_AGO) - if [ "new_erigon" != "none" ]; then + if [ "$new_erigon" != "none" ]; then echo "New erigon release found: $new_erigon" implementations_arr+=("erigon") fi new_nethermind=$(ghlatestreleasechecker "nethermindEth/nethermind" $RELEASED_DAYS_AGO) - if [ "new_nethermind" != "none" ]; then + if [ "$new_nethermind" != "none" ]; then echo "New nethermind release found: $new_nethermind" implementations_arr+=("nethermind") fi IFS=',' eth_implementations="${implementations_arr[*]}" - echo "Found new releases for: $eth_implementations" + if [ -n "$eth_implementations" ]; then + echo "Found new releases for: $eth_implementations" + else + echo "No new releases found" + fi echo "evm_implementations=$eth_implementations" >> $GITHUB_OUTPUT elif [ "$GITHUB_EVENT_NAME" = "workflow_dispatch" ]; then if [ -n "${{ github.event.inputs.base64TestList }}" ]; then @@ -175,7 +179,7 @@ jobs: run: | PATH=$PATH:$(go env GOPATH)/bin export PATH - + if [ "$GITHUB_EVENT_NAME" = "schedule" ]; then echo "Fetching latest Chainlink stable version" implementations_arr=() @@ -202,7 +206,7 @@ jobs: echo "chainlink_version=$chainlink_version" >> $GITHUB_OUTPUT elif [ "$GITHUB_REF_TYPE" = "tag" ]; then echo "Fetching Chainlink version from tag" - chainlink_version="${{ github.ref }}" + chainlink_version="${{ github.ref_name }}" echo "chainlink_version=$chainlink_version" >> $GITHUB_OUTPUT else echo "Unsupported trigger event. It's probably an issue with the pipeline definition. Please reach out to the Test Tooling team." @@ -229,7 +233,7 @@ jobs: check-ecr-images-exist: name: Check images used as test dependencies exist in ECR - if: always() && needs.should-run.outputs.should_run == 'true' + if: always() && needs.should-run.outputs.should_run == 'true' && (needs.select-versions.outputs.evm_implementations != '' || github.event.inputs.base64TestList != '') environment: integration permissions: id-token: write @@ -263,7 +267,14 @@ jobs: page_size: ${{matrix.mirror.page_size}} build-chainlink: - if: always() && needs.should-run.outputs.should_run == 'true' + if: | + always() && + needs.should-run.outputs.should_run == 'true' && + github.ref_type != 'tag' && + ( + needs.select-versions.outputs.evm_implementations != '' || + github.event.inputs.base64TestList != '' + ) environment: integration permissions: id-token: write @@ -272,16 +283,6 @@ jobs: runs-on: ubuntu-latest needs: [should-run, select-versions] steps: - - name: Collect Metrics - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@d9da21a2747016b3e13de58c7d4115a3d5c97935 # v3.0.1 - with: - id: client-compatablility-build-chainlink - 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@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 with: @@ -292,13 +293,23 @@ jobs: tag_suffix: "" dockerfile: core/chainlink.Dockerfile git_commit_sha: ${{ needs.select-versions.outputs.chainlink_version }} - check_image_exists: 'true' + check_image_exists: "true" AWS_REGION: ${{ secrets.QA_AWS_REGION }} AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} + - name: Collect Metrics + id: collect-gha-metrics + uses: smartcontractkit/push-gha-metrics-action@d9da21a2747016b3e13de58c7d4115a3d5c97935 # v3.0.1 + with: + id: client-compatablility-build-chainlink + 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 get-latest-available-images: name: Get Latest EVM Implementation's Images - if: always() && needs.should-run.outputs.should_run == 'true' + if: always() && needs.should-run.outputs.should_run == 'true' && (needs.select-versions.outputs.evm_implementations != '' || github.event.inputs.base64TestList != '') environment: integration runs-on: ubuntu-latest needs: [check-ecr-images-exist, should-run, select-versions] @@ -346,20 +357,20 @@ jobs: echo "GETH_IMAGES=$geth_images" >> $GITHUB_ENV echo "Geth latest images: $geth_images" fi - + if [[ "$ETH_IMPLEMENTATIONS" == *"nethermind"* ]]; then nethermind_images=$(ecrimagefetcher 'nethermind/nethermind' '^[0-9]+\.[0-9]+\.[0-9]+$' ${{ env.LATEST_IMAGE_COUNT }}) echo "NETHERMIND_IMAGES=$nethermind_images" >> $GITHUB_ENV echo "Nethermind latest images: $nethermind_images" fi - + if [[ "$ETH_IMPLEMENTATIONS" == *"besu"* ]]; then # 24.3.3 is ignored as it doesn't support data & input fields in eth_call besu_images=$(ecrimagefetcher 'hyperledger/besu' '^[0-9]+\.[0-9]+(\.[0-9]+)?$' ${{ env.LATEST_IMAGE_COUNT }} ">=24.5.1") echo "BESU_IMAGES=$besu_images" >> $GITHUB_ENV echo "Besu latest images: $besu_images" fi - + if [[ "$ETH_IMPLEMENTATIONS" == *"erigon"* ]]; then # 2.60.0 and 2.60.1 are ignored as they stopped working with CL node erigon_images=$(ecrimagefetcher 'thorax/erigon' '^v[0-9]+\.[0-9]+\.[0-9]+$' ${{ env.LATEST_IMAGE_COUNT }} "> $GITHUB_ENV + echo "JOB_MATRIX_JSON=${JOB_MATRIX_JSON}" >> $GITHUB_ENV run-client-compatibility-matrix: name: ${{ matrix.evm_node.product }} compatibility with ${{ matrix.evm_node.docker_image }} - if: always() && needs.should-run.outputs.should_run == 'true' && needs.build-chainlink.result == 'success' + if: always() && needs.should-run.outputs.should_run == 'true' && needs.build-chainlink.result == 'success' && needs.prepare-compatibility-matrix.outputs.matrix != '' environment: integration permissions: checks: write pull-requests: write id-token: write contents: read - needs: [build-chainlink, prepare-compatibility-matrix, should-run, select-versions] + needs: + - build-chainlink + - prepare-compatibility-matrix + - should-run + - select-versions env: SELECTED_NETWORKS: SIMULATED,SIMULATED_1,SIMULATED_2 CHAINLINK_COMMIT_SHA: ${{ needs.select-versions.outputs.chainlink_version }} @@ -516,6 +531,7 @@ jobs: TEST_LOG_LEVEL: debug strategy: fail-fast: false + max-parallel: 10 matrix: evm_node: ${{fromJson(needs.prepare-compatibility-matrix.outputs.matrix)}} runs-on: ubuntu-latest @@ -534,26 +550,6 @@ jobs: api-gateway-host: ${{ secrets.AWS_API_GW_HOST_GRAFANA }} # other inputs duplicate-authorization-header: "true" - - 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: ${{ needs.select-versions.outputs.chainlink_version }} - 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: "http://localhost:8080/primary" - grafanaDashboardUrl: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs" - grafanaBearerToken: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }} - ethExecutionClient: ${{ matrix.evm_node.eth_implementation }} - customEthClientDockerImage: ${{ matrix.evm_node.docker_image }} - pyroscopeServer: ${{ secrets.QA_PYROSCOPE_INSTANCE }} - pyroscopeEnvironment: ci-client-compatability-${{ matrix.eth_client }}-testnet - pyroscopeKey: ${{ secrets.QA_PYROSCOPE_KEY }} - name: Prepare test log name run: | replace_special_chars() { @@ -576,11 +572,23 @@ jobs: echo "$modified_string" } echo "TEST_LOG_NAME=$(replace_special_chars "${{ matrix.evm_node.product }}-${{ matrix.evm_node.docker_image }}-test-logs")" >> $GITHUB_ENV + # - name: Collect Workflow Telemetry + # uses: catchpoint/workflow-telemetry-action@v2 + # with: + # comment_on_pr: false + # theme: 'dark' - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@aa8eea635029ab8d95abd3c206f56dae1e22e623 # v2.3.28 with: test_command_to_run: cd ./integration-tests && touch .root_dir && go test -timeout 30m -count=1 -json ${{ matrix.evm_node.run }} 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false -hidepassinglogs test_download_vendor_packages_command: cd ./integration-tests && go mod download + test_config_chainlink_version: ${{ needs.select-versions.outputs.chainlink_version }} + test_config_selected_networks: ${{ env.SELECTED_NETWORKS}} + test_config_logging_run_id: ${{ github.run_id }} + test_config_test_log_collect: ${{ vars.TEST_LOG_COLLECT }} + test_config_logstream_log_targets: ${{ vars.LOGSTREAM_LOG_TARGETS }} + test_config_private_ethereum_network_execution_layer: ${{ matrix.evm_node.eth_implementation || 'geth' }} + test_config_private_ethereum_network_custom_docker_image: ${{ matrix.evm_node.docker_image }} cl_repo: ${{ env.CHAINLINK_IMAGE }} cl_image_tag: ${{ needs.select-versions.outputs.chainlink_version }} aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} @@ -599,13 +607,25 @@ jobs: should_tidy: "false" go_coverage_src_dir: /var/tmp/go-coverage go_coverage_dest_dir: ${{ github.workspace }}/.covdata + DEFAULT_CHAINLINK_IMAGE: ${{ env.CHAINLINK_IMAGE }} + DEFAULT_LOKI_TENANT_ID: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} + DEFAULT_LOKI_ENDPOINT: https://${{ secrets.GRAFANA_INTERNAL_HOST }}/loki/api/v1/push + DEFAULT_LOKI_BASIC_AUTH: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} + DEFAULT_GRAFANA_BASE_URL: "http://localhost:8080/primary" + DEFAULT_GRAFANA_DASHBOARD_URL: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs" + DEFAULT_GRAFANA_BEARER_TOKEN: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }} + DEFAULT_PYROSCOPE_SERVER_URL: ${{ secrets.QA_PYROSCOPE_INSTANCE }} + DEFAULT_PYROSCOPE_KEY: ${{ secrets.QA_PYROSCOPE_KEY }} + DEFAULT_PYROSCOPE_ENVIRONMENT: ci-client-compatability-${{ matrix.eth_client }}-testnet + DEFAULT_PYROSCOPE_ENABLED: "true" + - name: Print failed test summary if: always() - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 start-slack-thread: name: Start Slack Thread - if: always() && needs.*.result != 'skipped' && needs.*.result != 'cancelled' && needs.should-run.outputs.should_run == 'true' + if: always() && needs.*.result != 'skipped' && needs.*.result != 'cancelled' && needs.should-run.outputs.should_run == 'true' && (needs.select-versions.outputs.evm_implementations != '' || github.event.inputs.base64TestList != '') environment: integration outputs: thread_ts: ${{ steps.slack.outputs.thread_ts }} @@ -642,7 +662,7 @@ jobs: "type": "section", "text": { "type": "mrkdwn", - "text": "${{ contains(join(needs.*.result, ','), 'failure') && 'Some tests failed, notifying <@U060CGGPY8H>' || 'All Good!' }}" + "text": "${{ contains(join(needs.*.result, ','), 'failure') && format('Some tests failed, notifying <{0}>', secrets.COMPAT_SLACK_NOTIFICATION_HANDLE) || 'All Good!' }}" } }, { @@ -664,7 +684,7 @@ jobs: parse-test-results: name: Parse Test Results - if: always() && needs.*.result != 'skipped' && needs.*.result != 'cancelled' && needs.should-run.outputs.should_run == 'true' + if: always() && needs.*.result != 'skipped' && needs.*.result != 'cancelled' && needs.should-run.outputs.should_run == 'true' && (needs.select-versions.outputs.evm_implementations != '' || github.event.inputs.base64TestList != '') environment: integration permissions: checks: write @@ -672,7 +692,7 @@ jobs: id-token: write contents: read runs-on: ubuntu-latest - needs: [run-client-compatibility-matrix,should-run] + needs: [run-client-compatibility-matrix, should-run] outputs: base64_parsed_results: ${{ steps.get-test-results.outputs.base64_parsed_results }} steps: @@ -687,7 +707,7 @@ jobs: run: | PATH=$PATH:$(go env GOPATH)/bin export PATH - + workflowresultparser -workflowRunID ${{ github.run_id }} -githubToken ${{ github.token }} -githubRepo "${{ github.repository }}" -jobNameRegex "^automation compatibility with (.*?)$" -namedKey="automation" -outputFile=output.json workflowresultparser -workflowRunID ${{ github.run_id }} -githubToken ${{ github.token }} -githubRepo "${{ github.repository }}" -jobNameRegex "^keeper compatibility with (.*?)$" -namedKey="keeper" -outputFile=output.json workflowresultparser -workflowRunID ${{ github.run_id }} -githubToken ${{ github.token }} -githubRepo "${{ github.repository }}" -jobNameRegex "^log_poller compatibility with (.*?)$" -namedKey="log_poller" -outputFile=output.json @@ -704,7 +724,7 @@ jobs: display-test-results: name: Aggregated test results - if: always() && needs.*.result != 'skipped' && needs.*.result != 'cancelled' && needs.should-run.outputs.should_run == 'true' && needs.parse-test-results.result == 'success' + if: always() && needs.*.result != 'skipped' && needs.*.result != 'cancelled' && needs.should-run.outputs.should_run == 'true' && needs.parse-test-results.result == 'success' environment: integration permissions: checks: write @@ -724,7 +744,7 @@ jobs: run: | PATH=$PATH:$(go env GOPATH)/bin export PATH - + raw_results="$(echo ${{ needs.parse-test-results.outputs.base64_parsed_results }} | base64 -d)" echo $raw_results > input.json asciitable --firstColumn "EVM Implementation" --secondColumn Result --jsonfile input.json --outputFile output.txt --section "automation" --namedKey "automation" @@ -738,11 +758,11 @@ jobs: asciitable --firstColumn "EVM Implementation" --secondColumn Result --jsonfile input.json --outputFile output.txt --section "flux" --namedKey "flux" asciitable --firstColumn "EVM Implementation" --secondColumn Result --jsonfile input.json --outputFile output.txt --section "cron" --namedKey "cron" asciitable --firstColumn "EVM Implementation" --secondColumn Result --jsonfile input.json --outputFile output.txt --section "runlog" --namedKey "runlog" - + echo echo "AGGREGATED RESULTS" cat output.txt - + echo "## Aggregated EVM Implementations compatibility results summary" >> $GITHUB_STEP_SUMMARY echo '```' >> $GITHUB_STEP_SUMMARY cat output.txt >> $GITHUB_STEP_SUMMARY @@ -750,7 +770,7 @@ jobs: post-test-results-to-slack: name: Post Test Results for ${{matrix.product}} - if: ${{ always() && needs.*.result != 'skipped' && needs.*.result != 'cancelled' && needs.should-run.outputs.should_run == 'true' }} + if: always() && needs.*.result != 'skipped' && needs.*.result != 'cancelled' && needs.should-run.outputs.should_run == 'true' && needs.parse-test-results.result == 'success' environment: integration permissions: checks: write @@ -762,7 +782,18 @@ jobs: strategy: fail-fast: false matrix: - product: [automation, keeper, log_poller, ocr, ocr2, vrf, vrfv2, vrfv2plus, cron, flux, runlog] + product: + - automation + - keeper + - log_poller + - ocr + - ocr2 + - vrf + - vrfv2 + - vrfv2plus + - cron + - flux + - runlog steps: - name: Checkout the repo uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 diff --git a/.github/workflows/integration-chaos-tests.yml b/.github/workflows/integration-chaos-tests.yml index e276917f103..673614bf2c2 100644 --- a/.github/workflows/integration-chaos-tests.yml +++ b/.github/workflows/integration-chaos-tests.yml @@ -29,7 +29,7 @@ jobs: uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - name: Check if image exists id: check-image - uses: smartcontractkit/chainlink-github-actions/docker/image-exists@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/docker/image-exists@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 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@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: cl_repo: smartcontractkit/chainlink cl_ref: ${{ github.sha }} @@ -132,7 +132,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@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@2967f2287bd3f3ddbac7b476e9568993df01796e # v2.3.27 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 | gotestloghelper -ci -singlepackage -hidepassingtests=false -hidepassinglogs test_download_vendor_packages_command: cd ./integration-tests && go mod download diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index a29f553f045..a54db66ba06 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -121,7 +121,7 @@ jobs: build-lint-integration-tests: name: Build and Lint ${{ matrix.project.name }} - runs-on: ubuntu22.04-16cores-64GB + runs-on: ubuntu22.04-8cores-32GB # We don't directly merge dependabot PRs, so let's not waste the resources if: github.actor != 'dependabot[bot]' strategy: @@ -152,7 +152,7 @@ jobs: repository: smartcontractkit/chainlink ref: ${{ inputs.cl_ref }} - name: Setup Go - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/setup-go@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/setup-go@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: test_download_vendor_packages_command: cd ${{ matrix.project.path }} && go mod download go_mod_path: ${{ matrix.project.path }}/go.mod @@ -190,7 +190,7 @@ jobs: dockerfile: plugins/chainlink.Dockerfile tag-suffix: -plugins name: Build Chainlink Image ${{ matrix.image.name }} - runs-on: ubuntu22.04-16cores-64GB + runs-on: ubuntu22.04-8cores-32GB needs: [changes, enforce-ctf-version] steps: - name: Collect Metrics @@ -209,6 +209,15 @@ jobs: with: repository: smartcontractkit/chainlink ref: ${{ inputs.cl_ref || github.event.pull_request.head.sha || github.event.merge_group.head_sha }} + - name: Setup Github Token + if: ${{ inputs.evm-ref }} + id: get-gh-token + uses: smartcontractkit/.github/actions/setup-github-token@ef78fa97bf3c77de6563db1175422703e9e6674f # setup-github-token@0.2.1 + with: + aws-role-arn: ${{ secrets.AWS_OIDC_GLOBAL_READ_ONLY_TOKEN_ISSUER_ROLE_ARN }} + aws-lambda-url: ${{ secrets.AWS_INFRA_RELENG_TOKEN_ISSUER_LAMBDA_URL }} + aws-region: ${{ secrets.AWS_REGION }} + set-git-config: "true" - name: Build Chainlink Image if: needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch' uses: ./.github/actions/build-chainlink-image @@ -322,7 +331,8 @@ jobs: echo "run_command=./smoke/${{ matrix.product.name }}_test.go" >> "$GITHUB_OUTPUT" fi - name: Setup GAP for Grafana - uses: smartcontractkit/.github/actions/setup-gap@6c9d62fdad050cfb8b59376ded291f1350705944 # setup-gap@0.2.2 + uses: smartcontractkit/.github/actions/setup-gap@d316f66b2990ea4daa479daa3de6fc92b00f863e # setup-gap@0.3.2 + id: setup-gap with: # aws inputs aws-region: ${{ secrets.AWS_REGION }} @@ -330,32 +340,19 @@ jobs: api-gateway-host: ${{ secrets.AWS_API_GW_HOST_GRAFANA }} # other inputs duplicate-authorization-header: "true" - - 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: ${{ inputs.evm-ref || github.sha }} - 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: 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: "http://localhost:8080/primary" # This is GAP's address - grafanaDashboardUrl: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs" - grafanaBearerToken: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }} ## 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@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@aa8eea635029ab8d95abd3c206f56dae1e22e623 # v2.3.28 with: test_command_to_run: cd ./integration-tests && go test -timeout 30m -count=1 -json -test.parallel=${{ matrix.product.nodes }} ${{ steps.build-go-test-command.outputs.run_command }} 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false -hidepassinglogs test_download_vendor_packages_command: cd ./integration-tests && go mod download + test_config_chainlink_version: ${{ inputs.evm-ref || github.sha }} + test_config_selected_networks: ${{ env.SELECTED_NETWORKS }} + test_config_logging_run_id: ${{ github.run_id }} + test_config_logstream_log_targets: ${{ vars.LOGSTREAM_LOG_TARGETS }} + test_config_test_log_collect: ${{ vars.TEST_LOG_COLLECT }} cl_repo: ${{ env.CHAINLINK_IMAGE }} cl_image_tag: ${{ inputs.evm-ref || github.sha }} aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} @@ -374,6 +371,17 @@ jobs: should_tidy: "false" go_coverage_src_dir: /var/tmp/go-coverage go_coverage_dest_dir: ${{ github.workspace }}/.covdata + DEFAULT_CHAINLINK_IMAGE: ${{ env.CHAINLINK_IMAGE }} + DEFAULT_LOKI_TENANT_ID: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} + DEFAULT_LOKI_ENDPOINT: https://${{ secrets.GRAFANA_INTERNAL_HOST }}/loki/api/v1/push + DEFAULT_LOKI_BASIC_AUTH: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} + DEFAULT_GRAFANA_BASE_URL: "http://localhost:8080/primary" + DEFAULT_GRAFANA_DASHBOARD_URL: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs" + DEFAULT_GRAFANA_BEARER_TOKEN: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }} + DEFAULT_PYROSCOPE_SERVER_URL: ${{ matrix.product.pyroscope_env == '' && '' || !startsWith(github.ref, 'refs/tags/') && '' || secrets.QA_PYROSCOPE_INSTANCE }} # Avoid sending blank envs https://github.com/orgs/community/discussions/25725 + DEFAULT_PYROSCOPE_KEY: ${{ secrets.QA_PYROSCOPE_KEY }} + DEFAULT_PYROSCOPE_ENVIRONMENT: ${{ matrix.product.pyroscope_env }} + DEFAULT_PYROSCOPE_ENABLED: ${{ matrix.product.pyroscope_env == '' || !startsWith(github.ref, 'refs/tags/') && 'false' || 'true' }} - name: Upload Coverage Data uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 @@ -386,7 +394,7 @@ jobs: - name: Print failed test summary if: always() - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 eth-smoke-tests-matrix-log-poller: if: ${{ !(contains(join(github.event.pull_request.labels.*.name, ' '), 'skip-smoke-tests') || github.event_name == 'workflow_dispatch') || inputs.distinct_run_name != '' }} @@ -437,7 +445,8 @@ jobs: echo "run_command=./smoke/${{ matrix.product.name }}_test.go" >> "$GITHUB_OUTPUT" fi - name: Setup GAP for Grafana - uses: smartcontractkit/.github/actions/setup-gap@6c9d62fdad050cfb8b59376ded291f1350705944 # setup-gap@0.2.2 + uses: smartcontractkit/.github/actions/setup-gap@d316f66b2990ea4daa479daa3de6fc92b00f863e # setup-gap@0.3.2 + id: setup-gap with: # aws inputs aws-region: ${{ secrets.AWS_REGION }} @@ -445,31 +454,18 @@ jobs: api-gateway-host: ${{ secrets.AWS_API_GW_HOST_GRAFANA }} # other inputs duplicate-authorization-header: "true" - - 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: ${{ inputs.evm-ref || github.sha }} - 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: 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: "http://localhost:8080/primary" # This is GAP's address - grafanaDashboardUrl: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs" - grafanaBearerToken: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }} ## 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@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@aa8eea635029ab8d95abd3c206f56dae1e22e623 # v2.3.28 with: test_command_to_run: cd ./integration-tests && go test -timeout 30m -count=1 -json -test.parallel=${{ matrix.product.nodes }} ${{ steps.build-go-test-command.outputs.run_command }} 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false -hidepassinglogs test_download_vendor_packages_command: cd ./integration-tests && go mod download + test_config_chainlink_version: ${{ inputs.evm-ref || github.sha }} + test_config_selected_networks: ${{ env.SELECTED_NETWORKS }} + test_config_logging_run_id: ${{ github.run_id }} + test_config_logstream_log_targets: ${{ vars.LOGSTREAM_LOG_TARGETS }} + test_config_test_log_collect: ${{ vars.TEST_LOG_COLLECT }} cl_repo: ${{ env.CHAINLINK_IMAGE }} cl_image_tag: ${{ inputs.evm-ref || github.sha }} aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} @@ -488,6 +484,17 @@ jobs: should_tidy: "false" go_coverage_src_dir: /var/tmp/go-coverage go_coverage_dest_dir: ${{ github.workspace }}/.covdata + DEFAULT_CHAINLINK_IMAGE: ${{ env.CHAINLINK_IMAGE }} + DEFAULT_LOKI_TENANT_ID: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} + DEFAULT_LOKI_ENDPOINT: https://${{ secrets.GRAFANA_INTERNAL_HOST }}/loki/api/v1/push + DEFAULT_LOKI_BASIC_AUTH: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} + DEFAULT_GRAFANA_BASE_URL: "http://localhost:8080/primary" + DEFAULT_GRAFANA_DASHBOARD_URL: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs" + DEFAULT_GRAFANA_BEARER_TOKEN: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }} + DEFAULT_PYROSCOPE_SERVER_URL: ${{ matrix.product.pyroscope_env == '' && '' || !startsWith(github.ref, 'refs/tags/') && '' || secrets.QA_PYROSCOPE_INSTANCE }} # Avoid sending blank envs https://github.com/orgs/community/discussions/25725 + DEFAULT_PYROSCOPE_KEY: ${{ secrets.QA_PYROSCOPE_KEY }} + DEFAULT_PYROSCOPE_ENVIRONMENT: ${{ matrix.product.pyroscope_env }} + DEFAULT_PYROSCOPE_ENABLED: ${{ matrix.product.pyroscope_env == '' || !startsWith(github.ref, 'refs/tags/') && 'false' || 'true' }} - name: Upload Coverage Data uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 @@ -498,6 +505,11 @@ jobs: path: .covdata retention-days: 1 + - name: Print failed test summary + if: always() + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 + + eth-smoke-tests-matrix: if: ${{ !contains(join(github.event.pull_request.labels.*.name, ' '), 'skip-smoke-tests') }} environment: integration @@ -656,17 +668,21 @@ jobs: -v $PWD/../../integration-tests/smoke/traces:/tracing \ --user "$(id -u):$(id -g)" \ -p 4317:4317 otel/opentelemetry-collector:0.88.0 --config=/etc/otel-collector.yaml + - name: Locate Docker Volume id: locate-volume if: false run: | echo "VOLUME_PATH=$(docker volume inspect --format '{{ .Mountpoint }}' otel-traces)" >> $GITHUB_OUTPUT + - name: Show Otel-Collector Logs if: steps.check-label.outputs.trace == 'true' && matrix.product.name == 'ocr2' && matrix.product.tag_suffix == '-plugins' run: | docker logs otel-collector + - name: Setup GAP for Grafana - uses: smartcontractkit/.github/actions/setup-gap@6c9d62fdad050cfb8b59376ded291f1350705944 # setup-gap@0.2.2 + uses: smartcontractkit/.github/actions/setup-gap@d316f66b2990ea4daa479daa3de6fc92b00f863e # setup-gap@0.3.2 + id: setup-gap with: # aws inputs aws-region: ${{ secrets.AWS_REGION }} @@ -674,31 +690,19 @@ jobs: api-gateway-host: ${{ secrets.AWS_API_GW_HOST_GRAFANA }} # other inputs duplicate-authorization-header: "true" - - 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: ${{ inputs.evm-ref || github.sha }} - 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: 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: "http://localhost:8080/primary" - grafanaDashboardUrl: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs" - grafanaBearerToken: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }} + ## 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@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@aa8eea635029ab8d95abd3c206f56dae1e22e623 # v2.3.28 with: test_command_to_run: cd ./integration-tests && go test -timeout 30m -count=1 -json -test.parallel=${{ matrix.product.nodes }} ${{ steps.build-go-test-command.outputs.run_command }} 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false -hidepassinglogs test_download_vendor_packages_command: cd ./integration-tests && go mod download + test_config_chainlink_version: ${{ inputs.evm-ref || github.sha }} + test_config_selected_networks: ${{ env.SELECTED_NETWORKS }} + test_config_logging_run_id: ${{ github.run_id }} + test_config_logstream_log_targets: ${{ vars.LOGSTREAM_LOG_TARGETS }} + test_config_test_log_collect: ${{ vars.TEST_LOG_COLLECT }} cl_repo: ${{ env.CHAINLINK_IMAGE }} cl_image_tag: ${{ inputs.evm-ref || github.sha }}${{ matrix.product.tag_suffix }} aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} @@ -717,6 +721,17 @@ jobs: should_tidy: "false" go_coverage_src_dir: /var/tmp/go-coverage go_coverage_dest_dir: ${{ github.workspace }}/.covdata + DEFAULT_CHAINLINK_IMAGE: ${{ env.CHAINLINK_IMAGE }} + DEFAULT_LOKI_TENANT_ID: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} + DEFAULT_LOKI_ENDPOINT: https://${{ secrets.GRAFANA_INTERNAL_HOST }}/loki/api/v1/push + DEFAULT_LOKI_BASIC_AUTH: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} + DEFAULT_GRAFANA_BASE_URL: "http://localhost:8080/primary" + DEFAULT_GRAFANA_DASHBOARD_URL: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs" + DEFAULT_GRAFANA_BEARER_TOKEN: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }} + DEFAULT_PYROSCOPE_SERVER_URL: ${{ matrix.product.pyroscope_env == '' && '' || !startsWith(github.ref, 'refs/tags/') && '' || secrets.QA_PYROSCOPE_INSTANCE }} # Avoid sending blank envs https://github.com/orgs/community/discussions/25725 + DEFAULT_PYROSCOPE_KEY: ${{ secrets.QA_PYROSCOPE_KEY }} + DEFAULT_PYROSCOPE_ENVIRONMENT: ${{ matrix.product.pyroscope_env }} + DEFAULT_PYROSCOPE_ENABLED: ${{ matrix.product.pyroscope_env == '' || !startsWith(github.ref, 'refs/tags/') && 'false' || 'true' }} - name: Upload Coverage Data uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 @@ -730,7 +745,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@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/setup-run-tests-environment@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: test_download_vendor_packages_command: cd ./integration-tests && go mod download go_mod_path: ./integration-tests/go.mod @@ -740,23 +755,27 @@ jobs: QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} QA_KUBECONFIG: "" should_tidy: "false" + - name: Show Otel-Collector Logs if: steps.check-label.outputs.trace == 'true' && matrix.product.name == 'ocr2' && matrix.product.tag_suffix == '-plugins' run: | docker logs otel-collector + - name: Permissions on traces if: steps.check-label.outputs.trace == 'true' && matrix.product.name == 'ocr2' && matrix.product.tag_suffix == '-plugins' run: | 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@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@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: test_directory: ./integration-tests/smoke/ @@ -842,7 +861,6 @@ jobs: # Run the setup if the matrix finishes but this time save the cache if we have a cache hit miss # this will also only run if both of the matrix jobs pass eth-smoke-go-mod-cache: - environment: integration needs: [eth-smoke-tests] runs-on: ubuntu-latest @@ -855,7 +873,7 @@ jobs: 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@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/setup-go@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: test_download_vendor_packages_command: | cd ./integration-tests @@ -923,23 +941,17 @@ jobs: uses: ./.github/actions/setup-create-base64-upgrade-config with: selectedNetworks: ${{ env.SELECTED_NETWORKS }} - chainlinkImage: ${{ env.CHAINLINK_IMAGE }} chainlinkVersion: ${{ steps.get_latest_version.outputs.latest_version }} - upgradeImage: ${{ env.UPGRADE_IMAGE }} upgradeVersion: ${{ env.UPGRADE_VERSION }} runId: ${{ github.run_id }} testLogCollect: ${{ vars.TEST_LOG_COLLECT }} - 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" - name: Run Migration Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@aa8eea635029ab8d95abd3c206f56dae1e22e623 # v2.3.28 with: test_command_to_run: cd ./integration-tests && go test -timeout 20m -count=1 -json ./migration 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false -hidepassinglogs test_download_vendor_packages_command: cd ./integration-tests && go mod download + test_config_override_base64: ${{ env.BASE64_CONFIG_OVERRIDE }} cl_repo: ${{ env.CHAINLINK_IMAGE }} cl_image_tag: ${{ steps.get_latest_version.outputs.latest_version }} aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} @@ -958,6 +970,19 @@ jobs: go_coverage_src_dir: /var/tmp/go-coverage go_coverage_dest_dir: ${{ github.workspace }}/.covdata should_tidy: "false" + DEFAULT_CHAINLINK_IMAGE: ${{ env.CHAINLINK_IMAGE }} + DEFAULT_CHAINLINK_UPGRADE_IMAGE: ${{ env.UPGRADE_IMAGE }} + DEFAULT_LOKI_TENANT_ID: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} + DEFAULT_LOKI_ENDPOINT: https://${{ secrets.GRAFANA_INTERNAL_HOST }}/loki/api/v1/push + DEFAULT_LOKI_BASIC_AUTH: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} + DEFAULT_GRAFANA_BASE_URL: "http://localhost:8080/primary" + DEFAULT_GRAFANA_DASHBOARD_URL: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs" + DEFAULT_GRAFANA_BEARER_TOKEN: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }} + DEFAULT_PYROSCOPE_SERVER_URL: ${{ matrix.product.pyroscope_env == '' && '' || !startsWith(github.ref, 'refs/tags/') && '' || secrets.QA_PYROSCOPE_INSTANCE }} # Avoid sending blank envs https://github.com/orgs/community/discussions/25725 + DEFAULT_PYROSCOPE_KEY: ${{ secrets.QA_PYROSCOPE_KEY }} + DEFAULT_PYROSCOPE_ENVIRONMENT: ${{ matrix.product.pyroscope_env }} + DEFAULT_PYROSCOPE_ENABLED: ${{ matrix.product.pyroscope_env == '' || !startsWith(github.ref, 'refs/tags/') && 'false' || 'true' }} + - name: Upload Coverage Data uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 timeout-minutes: 2 @@ -1056,7 +1081,7 @@ jobs: steps: - name: Check if image exists id: check-image - uses: smartcontractkit/chainlink-github-actions/docker/image-exists@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/docker/image-exists@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: repository: chainlink-solana-tests tag: ${{ needs.get_solana_sha.outputs.sha }} @@ -1071,7 +1096,7 @@ jobs: id-token: write contents: read name: Solana Build Artifacts - runs-on: ubuntu22.04-16cores-64GB + runs-on: ubuntu22.04-8cores-32GB needs: [ changes, @@ -1112,7 +1137,7 @@ jobs: id-token: write contents: read name: Solana Build Test Image - runs-on: ubuntu22.04-16cores-64GB + runs-on: ubuntu22.04-8cores-32GB needs: [ solana-build-contracts, @@ -1161,7 +1186,7 @@ jobs: id-token: write contents: read name: Solana Smoke Tests - runs-on: ubuntu22.04-16cores-64GB + runs-on: ubuntu22.04-8cores-32GB needs: [ build-chainlink, @@ -1195,7 +1220,7 @@ jobs: 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@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/setup-run-tests-environment@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: go_mod_path: ./integration-tests/go.mod cache_restore_only: true @@ -1224,6 +1249,7 @@ jobs: docker rm "$CONTAINER_ID" - name: Install Solana CLI # required for ensuring the local test validator is configured correctly run: ./scripts/install-solana-ci.sh + - name: Install gauntlet run: | yarn --cwd ./gauntlet install --frozen-lockfile @@ -1247,9 +1273,10 @@ 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@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@aa8eea635029ab8d95abd3c206f56dae1e22e623 # v2.3.28 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 + test_config_override_base64: ${{ env.BASE64_CONFIG_OVERRIDE }} cl_repo: ${{ env.CHAINLINK_IMAGE }} cl_image_tag: ${{ inputs.evm-ref || github.sha }} publish_check_name: Solana Smoke Test Results diff --git a/.github/workflows/live-testnet-tests.yml b/.github/workflows/live-testnet-tests.yml index 6edbf57f253..a7eaa19f7f0 100644 --- a/.github/workflows/live-testnet-tests.yml +++ b/.github/workflows/live-testnet-tests.yml @@ -114,7 +114,7 @@ jobs: 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@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-tests@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: test_download_vendor_packages_command: cd ./integration-tests && go mod download token: ${{ secrets.GITHUB_TOKEN }} @@ -248,7 +248,7 @@ jobs: with: fetch-depth: 0 - name: Setup GAP for Grafana - uses: smartcontractkit/.github/actions/setup-gap@6c9d62fdad050cfb8b59376ded291f1350705944 # setup-gap@0.2.2 + uses: smartcontractkit/.github/actions/setup-gap@d316f66b2990ea4daa479daa3de6fc92b00f863e # setup-gap@0.3.2 with: # aws inputs aws-region: ${{ secrets.AWS_REGION }} @@ -282,7 +282,7 @@ jobs: with: name: tests - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: test_command_to_run: ./tests -test.timeout 30m -test.count=1 -test.parallel=1 -test.run ${{ matrix.test }} binary_name: tests @@ -300,7 +300,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@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: test_directory: "./" @@ -331,7 +331,7 @@ jobs: with: fetch-depth: 0 - name: Setup GAP for Grafana - uses: smartcontractkit/.github/actions/setup-gap@6c9d62fdad050cfb8b59376ded291f1350705944 # setup-gap@0.2.2 + uses: smartcontractkit/.github/actions/setup-gap@d316f66b2990ea4daa479daa3de6fc92b00f863e # setup-gap@0.3.2 with: # aws inputs aws-region: ${{ secrets.AWS_REGION }} @@ -365,7 +365,7 @@ jobs: with: name: tests - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: test_command_to_run: ./tests -test.timeout 30m -test.count=1 -test.parallel=1 -test.run ${{ matrix.test }} binary_name: tests @@ -383,7 +383,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@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: test_directory: "./" @@ -414,7 +414,7 @@ jobs: with: fetch-depth: 0 - name: Setup GAP for Grafana - uses: smartcontractkit/.github/actions/setup-gap@6c9d62fdad050cfb8b59376ded291f1350705944 # setup-gap@0.2.2 + uses: smartcontractkit/.github/actions/setup-gap@d316f66b2990ea4daa479daa3de6fc92b00f863e # setup-gap@0.3.2 with: # aws inputs aws-region: ${{ secrets.AWS_REGION }} @@ -448,7 +448,7 @@ jobs: with: name: tests - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: test_command_to_run: ./tests -test.timeout 30m -test.count=1 -test.parallel=1 -test.run ${{ matrix.test }} binary_name: tests @@ -466,7 +466,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@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: test_directory: "./" @@ -497,7 +497,7 @@ jobs: with: fetch-depth: 0 - name: Setup GAP for Grafana - uses: smartcontractkit/.github/actions/setup-gap@6c9d62fdad050cfb8b59376ded291f1350705944 # setup-gap@0.2.2 + uses: smartcontractkit/.github/actions/setup-gap@d316f66b2990ea4daa479daa3de6fc92b00f863e # setup-gap@0.3.2 with: # aws inputs aws-region: ${{ secrets.AWS_REGION }} @@ -531,7 +531,7 @@ jobs: with: name: tests - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: test_command_to_run: ./tests -test.timeout 30m -test.count=1 -test.parallel=1 -test.run ${{ matrix.test }} binary_name: tests @@ -549,7 +549,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@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: test_directory: "./" @@ -576,7 +576,7 @@ jobs: with: fetch-depth: 0 - name: Setup GAP for Grafana - uses: smartcontractkit/.github/actions/setup-gap@6c9d62fdad050cfb8b59376ded291f1350705944 # setup-gap@0.2.2 + uses: smartcontractkit/.github/actions/setup-gap@d316f66b2990ea4daa479daa3de6fc92b00f863e # setup-gap@0.3.2 with: # aws inputs aws-region: ${{ secrets.AWS_REGION }} @@ -610,7 +610,7 @@ jobs: with: name: tests - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: test_command_to_run: ./tests -test.timeout 30m -test.count=1 -test.parallel=1 -test.run ${{ matrix.test }} binary_name: tests @@ -628,7 +628,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@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: test_directory: "./" @@ -659,7 +659,7 @@ jobs: with: fetch-depth: 0 - name: Setup GAP for Grafana - uses: smartcontractkit/.github/actions/setup-gap@6c9d62fdad050cfb8b59376ded291f1350705944 # setup-gap@0.2.2 + uses: smartcontractkit/.github/actions/setup-gap@d316f66b2990ea4daa479daa3de6fc92b00f863e # setup-gap@0.3.2 with: # aws inputs aws-region: ${{ secrets.AWS_REGION }} @@ -693,7 +693,7 @@ jobs: with: name: tests - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: test_command_to_run: ./tests -test.timeout 30m -test.count=1 -test.parallel=1 -test.run ${{ matrix.test }} binary_name: tests @@ -711,7 +711,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@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: test_directory: "./" @@ -742,7 +742,7 @@ jobs: with: fetch-depth: 0 - name: Setup GAP for Grafana - uses: smartcontractkit/.github/actions/setup-gap@6c9d62fdad050cfb8b59376ded291f1350705944 # setup-gap@0.2.2 + uses: smartcontractkit/.github/actions/setup-gap@d316f66b2990ea4daa479daa3de6fc92b00f863e # setup-gap@0.3.2 with: # aws inputs aws-region: ${{ secrets.AWS_REGION }} @@ -776,7 +776,7 @@ jobs: with: name: tests - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: test_command_to_run: ./tests -test.timeout 30m -test.count=1 -test.parallel=1 -test.run ${{ matrix.test }} binary_name: tests @@ -794,7 +794,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@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: test_directory: "./" @@ -825,7 +825,7 @@ jobs: with: fetch-depth: 0 - name: Setup GAP for Grafana - uses: smartcontractkit/.github/actions/setup-gap@6c9d62fdad050cfb8b59376ded291f1350705944 # setup-gap@0.2.2 + uses: smartcontractkit/.github/actions/setup-gap@d316f66b2990ea4daa479daa3de6fc92b00f863e # setup-gap@0.3.2 with: # aws inputs aws-region: ${{ secrets.AWS_REGION }} @@ -859,7 +859,7 @@ jobs: with: name: tests - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: test_command_to_run: ./tests -test.timeout 30m -test.count=1 -test.parallel=1 -test.run ${{ matrix.test }} binary_name: tests @@ -877,7 +877,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@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: test_directory: "./" @@ -904,7 +904,7 @@ jobs: with: fetch-depth: 0 - name: Setup GAP for Grafana - uses: smartcontractkit/.github/actions/setup-gap@6c9d62fdad050cfb8b59376ded291f1350705944 # setup-gap@0.2.2 + uses: smartcontractkit/.github/actions/setup-gap@d316f66b2990ea4daa479daa3de6fc92b00f863e # setup-gap@0.3.2 with: # aws inputs aws-region: ${{ secrets.AWS_REGION }} @@ -938,7 +938,7 @@ jobs: with: name: tests - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: test_command_to_run: ./tests -test.timeout 30m -test.count=1 -test.parallel=1 -test.run ${{ matrix.test }} binary_name: tests @@ -956,7 +956,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@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: test_directory: "./" @@ -983,7 +983,7 @@ jobs: with: fetch-depth: 0 - name: Setup GAP for Grafana - uses: smartcontractkit/.github/actions/setup-gap@6c9d62fdad050cfb8b59376ded291f1350705944 # setup-gap@0.2.2 + uses: smartcontractkit/.github/actions/setup-gap@d316f66b2990ea4daa479daa3de6fc92b00f863e # setup-gap@0.3.2 with: # aws inputs aws-region: ${{ secrets.AWS_REGION }} @@ -1017,7 +1017,7 @@ jobs: with: name: tests - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: test_command_to_run: ./tests -test.timeout 30m -test.count=1 -test.parallel=1 -test.run ${{ matrix.test }} binary_name: tests @@ -1035,7 +1035,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@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: test_directory: "./" @@ -1062,7 +1062,7 @@ jobs: with: fetch-depth: 0 - name: Setup GAP for Grafana - uses: smartcontractkit/.github/actions/setup-gap@6c9d62fdad050cfb8b59376ded291f1350705944 # setup-gap@0.2.2 + uses: smartcontractkit/.github/actions/setup-gap@d316f66b2990ea4daa479daa3de6fc92b00f863e # setup-gap@0.3.2 with: # aws inputs aws-region: ${{ secrets.AWS_REGION }} @@ -1096,7 +1096,7 @@ jobs: with: name: tests - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: test_command_to_run: ./tests -test.timeout 30m -test.count=1 -test.parallel=1 -test.run ${{ matrix.test }} binary_name: tests @@ -1114,6 +1114,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@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: test_directory: "./" diff --git a/.github/workflows/live-vrf-tests.yml b/.github/workflows/live-vrf-tests.yml index 22bc2fed345..faa4042e66e 100644 --- a/.github/workflows/live-vrf-tests.yml +++ b/.github/workflows/live-vrf-tests.yml @@ -97,7 +97,7 @@ jobs: NETWORKS="${NETWORKS//,/\",\"}" echo "matrix=${NETWORKS}" >> "$GITHUB_OUTPUT" - name: Build Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-tests@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-tests@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: test_download_vendor_packages_command: cd ./integration-tests && go mod download token: ${{ secrets.GITHUB_TOKEN }} @@ -139,7 +139,7 @@ jobs: with: fetch-depth: 0 - name: Setup GAP for Grafana - uses: smartcontractkit/.github/actions/setup-gap@6c9d62fdad050cfb8b59376ded291f1350705944 # setup-gap@0.2.2 + uses: smartcontractkit/.github/actions/setup-gap@d316f66b2990ea4daa479daa3de6fc92b00f863e # setup-gap@0.3.2 with: # aws inputs aws-region: ${{ secrets.AWS_REGION }} @@ -170,7 +170,7 @@ jobs: with: name: tests - name: Run Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: test_command_to_run: ./tests -test.v -test.timeout 4h -test.count=1 -test.parallel=1 -test.run ${{ env.test_list }} binary_name: tests @@ -188,6 +188,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@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@75a9005952a9e905649cfb5a6971fd9429436acd # v2.3.25 with: test_directory: "./" \ No newline at end of file diff --git a/.github/workflows/on-demand-keeper-smoke-tests.yml b/.github/workflows/on-demand-keeper-smoke-tests.yml index f6fa8f4467a..75359c7501f 100644 --- a/.github/workflows/on-demand-keeper-smoke-tests.yml +++ b/.github/workflows/on-demand-keeper-smoke-tests.yml @@ -131,30 +131,18 @@ jobs: else echo "run_command=./smoke/${{ matrix.product.name }}_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: ${{ inputs.evm-ref || github.sha }} - 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: 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 - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@aa8eea635029ab8d95abd3c206f56dae1e22e623 # v2.3.28 with: test_command_to_run: cd ./integration-tests && go test -timeout 30m -count=1 -json -test.parallel=${{ matrix.product.nodes }} ${{ steps.build-go-test-command.outputs.run_command }} 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false -hidepassinglogs test_download_vendor_packages_command: cd ./integration-tests && go mod download + test_config_chainlink_version: ${{ inputs.evm-ref || github.sha }} + test_config_selected_networks: ${{ env.SELECTED_NETWORKS }} + test_config_logging_run_id: ${{ github.run_id }} + test_config_logstream_log_targets: ${{ vars.LOGSTREAM_LOG_TARGETS }} + test_config_test_log_collect: ${{ vars.TEST_LOG_COLLECT }} cl_repo: ${{ env.CHAINLINK_IMAGE }} cl_image_tag: ${{ inputs.evm-ref || github.sha }} aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} @@ -173,6 +161,17 @@ jobs: should_tidy: "false" go_coverage_src_dir: /var/tmp/go-coverage go_coverage_dest_dir: ${{ github.workspace }}/.covdata + DEFAULT_CHAINLINK_IMAGE: ${{ env.CHAINLINK_IMAGE }} + DEFAULT_LOKI_TENANT_ID: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} + DEFAULT_LOKI_ENDPOINT: https://${{ secrets.GRAFANA_INTERNAL_HOST }}/loki/api/v1/push + DEFAULT_LOKI_BASIC_AUTH: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} + DEFAULT_GRAFANA_BASE_URL: ${{ vars.GRAFANA_URL }} + DEFAULT_GRAFANA_DASHBOARD_URL: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs" + DEFAULT_GRAFANA_BEARER_TOKEN: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }} + DEFAULT_PYROSCOPE_SERVER_URL: ${{ matrix.product.pyroscope_env == '' && '' || !startsWith(github.ref, 'refs/tags/') && '' || secrets.QA_PYROSCOPE_INSTANCE }} # Avoid sending blank envs https://github.com/orgs/community/discussions/25725 + DEFAULT_PYROSCOPE_KEY: ${{ secrets.QA_PYROSCOPE_KEY }} + DEFAULT_PYROSCOPE_ENVIRONMENT: ${{ matrix.product.pyroscope_env }} + DEFAULT_PYROSCOPE_ENABLED: ${{ matrix.product.pyroscope_env == '' || !startsWith(github.ref, 'refs/tags/') && 'false' || 'true' }} - name: Upload Coverage Data uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 diff --git a/.github/workflows/on-demand-ocr-soak-test.yml b/.github/workflows/on-demand-ocr-soak-test.yml index ae24786b437..924b43829e5 100644 --- a/.github/workflows/on-demand-ocr-soak-test.yml +++ b/.github/workflows/on-demand-ocr-soak-test.yml @@ -8,7 +8,10 @@ on: default: TestOCRSoak type: choice options: - - TestOCRSoak + - TestOCRv1Soak + - TestOCRv2Soak + - TestForwarderOCRv1Soak + - TestForwarderOCRv2Soak - TestOCRSoak_GethReorgBelowFinality_FinalityTagDisabled - TestOCRSoak_GethReorgBelowFinality_FinalityTagEnabled - TestOCRSoak_GasSpike @@ -18,13 +21,17 @@ on: base64Config: description: base64-ed config required: true - type: string + type: string slackMemberID: description: Slack Member ID (Not your @) required: true default: U01A2B2C3D4 type: string - + test_secrets_override_key: + description: 'Key to run tests with custom test secrets' + required: false + type: string + jobs: ocr_soak_test: name: OCR Soak Test @@ -78,7 +85,7 @@ jobs: echo "### chainlink-tests image tag for this test run :ship:" >>$GITHUB_STEP_SUMMARY echo "\`${GITHUB_SHA}\`" >>$GITHUB_STEP_SUMMARY echo "### Networks on which test was run" >>$GITHUB_STEP_SUMMARY - echo "\`${{ env.NETWORKS }}\`" >>$GITHUB_STEP_SUMMARY + echo "\`${{ env.NETWORKS }}\`" >>$GITHUB_STEP_SUMMARY - name: Build Image uses: ./.github/actions/build-test-image with: @@ -86,7 +93,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@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@2967f2287bd3f3ddbac7b476e9568993df01796e # v2.3.27 env: DETACH_RUNNER: true TEST_SUITE: soak @@ -98,6 +105,7 @@ jobs: with: test_command_to_run: cd ./integration-tests && go test -v -count=1 -run ^${{ github.event.inputs.testToRun }}$ ./soak test_download_vendor_packages_command: make gomod + test_secrets_override_base64: ${{ secrets[inputs.test_secrets_override_key] }} cl_repo: ${{ env.CHAINLINK_IMAGE }} cl_image_tag: ${{ env.CHAINLINK_VERSION }} token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/on-demand-vrfv2-eth2-clients-test.yml b/.github/workflows/on-demand-vrfv2-eth2-clients-test.yml index 03b07ab1b1b..5f24fa81c3d 100644 --- a/.github/workflows/on-demand-vrfv2-eth2-clients-test.yml +++ b/.github/workflows/on-demand-vrfv2-eth2-clients-test.yml @@ -6,7 +6,11 @@ on: description: base64-ed config required: true type: string - + test_secrets_override_key: + description: 'Key to run tests with custom test secrets' + required: false + type: string + jobs: vrfv2_smoke_test: name: VRFV2 Smoke Test with custom EL client client @@ -46,10 +50,11 @@ 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@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@2967f2287bd3f3ddbac7b476e9568993df01796e # v2.3.27 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 | gotestloghelper -ci -singlepackage -hidepassingtests=false -hidepassinglogs test_download_vendor_packages_command: cd ./integration-tests && go mod download + test_secrets_override_base64: ${{ secrets[inputs.test_secrets_override_key] }} cl_repo: ${{ env.CHAINLINK_IMAGE }} cl_image_tag: ${{ env.CHAINLINK_VERSION }} aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} @@ -61,3 +66,10 @@ jobs: QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} QA_KUBECONFIG: "" + DEFAULT_CHAINLINK_IMAGE: ${{ env.CHAINLINK_IMAGE }} + DEFAULT_LOKI_TENANT_ID: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} + DEFAULT_LOKI_ENDPOINT: https://${{ secrets.GRAFANA_INTERNAL_HOST }}/loki/api/v1/push + DEFAULT_LOKI_BASIC_AUTH: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} + DEFAULT_GRAFANA_BASE_URL: "http://localhost:8080/primary" + DEFAULT_GRAFANA_DASHBOARD_URL: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs" + DEFAULT_GRAFANA_BEARER_TOKEN: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/on-demand-vrfv2-performance-test.yml b/.github/workflows/on-demand-vrfv2-performance-test.yml index 43899b4e577..3d55c384580 100644 --- a/.github/workflows/on-demand-vrfv2-performance-test.yml +++ b/.github/workflows/on-demand-vrfv2-performance-test.yml @@ -19,6 +19,11 @@ on: description: "Regex for tests to run" required: false default: "(TestVRFV2Performance)" + test_secrets_override_key: + description: 'Key to run tests with custom test secrets' + required: false + type: string + jobs: vrfv2_performance_test: name: VRFV2 Performance Test @@ -76,10 +81,11 @@ 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@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@2967f2287bd3f3ddbac7b476e9568993df01796e # v2.3.27 with: test_command_to_run: cd ./integration-tests/load && go test -v -count=1 -timeout 24h -run "${{ inputs.test_list_regex }}" ./vrfv2 test_download_vendor_packages_command: cd ./integration-tests && go mod download + test_secrets_override_base64: ${{ secrets[inputs.test_secrets_override_key] }} cl_repo: ${{ env.CHAINLINK_IMAGE }} cl_image_tag: ${{ env.CHAINLINK_VERSION }} aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} diff --git a/.github/workflows/on-demand-vrfv2plus-eth2-clients-test.yml b/.github/workflows/on-demand-vrfv2plus-eth2-clients-test.yml index 242eed23640..58ecd39763d 100644 --- a/.github/workflows/on-demand-vrfv2plus-eth2-clients-test.yml +++ b/.github/workflows/on-demand-vrfv2plus-eth2-clients-test.yml @@ -5,7 +5,11 @@ on: base64Config: description: base64-ed config required: true - type: string + type: string + test_secrets_override_key: + description: 'Key to run tests with custom test secrets' + required: false + type: string jobs: vrfv2plus_smoke_test: @@ -46,10 +50,11 @@ 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@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@2967f2287bd3f3ddbac7b476e9568993df01796e # v2.3.27 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 | gotestloghelper -ci -singlepackage -hidepassingtests=false -hidepassinglogs test_download_vendor_packages_command: cd ./integration-tests && go mod download + test_secrets_override_base64: ${{ secrets[inputs.test_secrets_override_key] }} cl_repo: ${{ env.CHAINLINK_IMAGE }} cl_image_tag: ${{ env.CHAINLINK_VERSION }} aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} @@ -61,3 +66,10 @@ jobs: QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} QA_KUBECONFIG: "" + DEFAULT_CHAINLINK_IMAGE: ${{ env.CHAINLINK_IMAGE }} + DEFAULT_LOKI_TENANT_ID: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} + DEFAULT_LOKI_ENDPOINT: https://${{ secrets.GRAFANA_INTERNAL_HOST }}/loki/api/v1/push + DEFAULT_LOKI_BASIC_AUTH: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} + DEFAULT_GRAFANA_BASE_URL: "http://localhost:8080/primary" + DEFAULT_GRAFANA_DASHBOARD_URL: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs" + DEFAULT_GRAFANA_BEARER_TOKEN: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/on-demand-vrfv2plus-performance-test.yml b/.github/workflows/on-demand-vrfv2plus-performance-test.yml index fa915381d1c..658736ab03f 100644 --- a/.github/workflows/on-demand-vrfv2plus-performance-test.yml +++ b/.github/workflows/on-demand-vrfv2plus-performance-test.yml @@ -8,17 +8,17 @@ on: type: string performanceTestType: description: Performance Test Type of test to run - type: choice - options: - - "Smoke" - - "Soak" - - "Load" - - "Stress" - - "Spike" + type: string + required: true test_list_regex: description: "Regex for tests to run" required: false default: "(TestVRFV2PlusPerformance)" + test_secrets_override_key: + description: 'Key to run tests with custom test secrets' + required: false + type: string + jobs: vrfv2plus_performance_test: name: VRFV2 Plus Performance Test @@ -76,10 +76,11 @@ 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@af92c5fae8dcf1659201e907db82d221fc304b94 # v2.3.21 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@2967f2287bd3f3ddbac7b476e9568993df01796e # v2.3.27 with: test_command_to_run: cd ./integration-tests/load && go test -v -count=1 -timeout 24h -run "${{ inputs.test_list_regex }}" ./vrfv2plus test_download_vendor_packages_command: cd ./integration-tests && go mod download + test_secrets_override_base64: ${{ secrets[inputs.test_secrets_override_key] }} cl_repo: ${{ env.CHAINLINK_IMAGE }} cl_image_tag: ${{ env.CHAINLINK_VERSION }} aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml index 30b2a302e79..fc4cae227a5 100644 --- a/.github/workflows/pr-labels.yml +++ b/.github/workflows/pr-labels.yml @@ -19,7 +19,7 @@ jobs: - uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0 with: - version: ^8.0.0 + version: ^9.0.0 - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 with: diff --git a/.github/workflows/run-automation-ondemand-e2e-tests.yml b/.github/workflows/run-automation-ondemand-e2e-tests.yml new file mode 100644 index 00000000000..10a09df130e --- /dev/null +++ b/.github/workflows/run-automation-ondemand-e2e-tests.yml @@ -0,0 +1,164 @@ +name: Run Automation On Demand Tests (TEST WORKFLOW) + +on: + workflow_dispatch: + inputs: + chainlinkImage: + description: Chainlink image repo to use to upgrade Chainlink Nodes from + options: + - QA_ECR + - public.ecr.aws/chainlink/chainlink + default: QA_ECR + type: choice + chainlinkVersion: + description: Chainlink image version to use to upgrade Chainlink Nodes from + required: false + default: develop + type: string + chainlinkImageUpdate: + description: Chainlink image repo to use to upgrade Chainlink Nodes to + required: true + options: + - QA_ECR + - public.ecr.aws/chainlink/chainlink + default: QA_ECR + type: choice + chainlinkVersionUpdate: + description: Chainlink image version to use to upgrade Chainlink Nodes to + default: develop + required: true + 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 + with_existing_remote_runner_version: + description: 'Use the existing remote runner version for k8s tests. Example: "d3bf5044af33e08be788a2df31c4a745cf69d787"' + required: false + type: string + +env: + CHAINLINK_VERSION: ${{ inputs.chainlinkVersion || github.sha }} + CHAINLINK_UPGRADE_VERSION: ${{ inputs.chainlinkVersionUpdate }} + +jobs: + # Set tests to run based on the workflow inputs + set-tests-to-run: + name: Set tests to run + runs-on: ubuntu-latest + outputs: + test_list: ${{ steps.set-tests.outputs.test_list }} + require_chainlink_image_versions_in_qa_ecr: ${{ steps.set-tests.outputs.require_chainlink_image_versions_in_qa_ecr }} + require_chainlink_plugin_versions_in_qa_ecr: ${{ steps.set-tests.outputs.require_chainlink_plugin_versions_in_qa_ecr }} + steps: + - name: Set tests to run + id: set-tests + run: | + if [[ "${{ github.event.inputs.chainlinkImage }}" == 'QA_ECR' ]]; then + # Instead of passing chainlink image as plain text input, {{ env.QA_CHAINLINK_IMAGE }} will be securely resolved in the E2E tests reusable workflow + CHAINLINK_IMAGE="'{{ env.QA_CHAINLINK_IMAGE }}'" + elif [[ "${{ github.event.inputs.chainlinkImage }}" == 'public.ecr.aws/chainlink/chainlink' ]]; then + CHAINLINK_IMAGE=public.ecr.aws/chainlink/chainlink + else + echo "Error: Not supported image source '${{ github.event.inputs.chainlinkImage }}'" + exit 1 + fi + + if [[ "${{ github.event.inputs.chainlinkImageUpdate }}" == 'QA_ECR' ]]; then + CHAINLINK_UPGRADE_IMAGE="'{{ env.QA_CHAINLINK_IMAGE }}'" + elif [[ "${{ github.event.inputs.chainlinkImageUpdate }}" == 'public.ecr.aws/chainlink/chainlink' ]]; then + CHAINLINK_UPGRADE_IMAGE=public.ecr.aws/chainlink/chainlink + else + echo "Error: Not supported image source '${{ github.event.inputs.chainlinkImageUpdate }}'" + exit 1 + fi + + CHAINLINK_VERSION="${{ env.CHAINLINK_VERSION }}" + CHAINLINK_UPGRADE_VERSION="${{ env.CHAINLINK_UPGRADE_VERSION }}" + + # Always run upgrade tests + cat > test_list.yaml <> test_list.yaml <> test_list.yaml <> $GITHUB_OUTPUT + + chainlink_image_versions="" + if [ "${{ github.event.inputs.chainlinkImage }}" = "QA_ECR" ]; then + chainlink_image_versions+="${{ env.CHAINLINK_VERSION }}," + fi + if [ "${{ github.event.inputs.chainlinkImageUpdate }}" = "QA_ECR" ]; then + chainlink_image_versions+="${{ env.CHAINLINK_UPGRADE_VERSION }}" + fi + echo "require_chainlink_image_versions_in_qa_ecr=$chainlink_image_versions" >> $GITHUB_OUTPUT + + call-run-e2e-tests-workflow: + name: Run E2E Tests + needs: set-tests-to-run + uses: ./.github/workflows/run-e2e-tests-reusable-workflow.yml + with: + test_list: ${{ needs.set-tests-to-run.outputs.test_list }} + require_chainlink_image_versions_in_qa_ecr: ${{ needs.set-tests-to-run.outputs.require_chainlink_image_versions_in_qa_ecr }} + require_chainlink_plugin_versions_in_qa_ecr: ${{ needs.set-tests-to-run.outputs.require_chainlink_image_versions_in_qa_ecr }} + with_existing_remote_runner_version: ${{ github.event.inputs.with_existing_remote_runner_version }} + secrets: + QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} + QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} + QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} + QA_PYROSCOPE_INSTANCE: ${{ secrets.QA_PYROSCOPE_INSTANCE }} + QA_PYROSCOPE_KEY: ${{ secrets.QA_PYROSCOPE_KEY }} + QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} + GRAFANA_INTERNAL_TENANT_ID: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} + GRAFANA_INTERNAL_BASIC_AUTH: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} + GRAFANA_INTERNAL_HOST: ${{ secrets.GRAFANA_INTERNAL_HOST }} + GRAFANA_INTERNAL_URL_SHORTENER_TOKEN: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + AWS_REGION: ${{ secrets.QA_AWS_REGION }} + AWS_OIDC_IAM_ROLE_VALIDATION_PROD_ARN: ${{ secrets.AWS_OIDC_IAM_ROLE_VALIDATION_PROD_ARN }} + AWS_API_GW_HOST_GRAFANA: ${{ secrets.AWS_API_GW_HOST_GRAFANA }} + diff --git a/.github/workflows/run-e2e-tests-reusable-workflow.yml b/.github/workflows/run-e2e-tests-reusable-workflow.yml new file mode 100644 index 00000000000..43896262f3f --- /dev/null +++ b/.github/workflows/run-e2e-tests-reusable-workflow.yml @@ -0,0 +1,711 @@ +# This is a reusable workflow that runs E2E tests for Chainlink. +# It is not meant to be run on its own. +name: Run E2E Tests +on: + workflow_call: + inputs: + chainlink_version: + description: 'Enter Chainlink version to use for the tests. Example: "v2.10.0" or sha' + required: false + type: string + test_ids: + description: 'Run tests by test ids separated by commas. Example: "run_all_in_ocr_tests_go,run_TestOCRv2Request_in_ocr2_test_go". Check all test IDs in .github/e2e-tests.yml' + required: false + type: string + test_list: + description: 'Base64 encoded list of tests (YML objects) to run. Example in run-automation-ondemand-e2e-tests.yml' + required: false + type: string + test_workflow: + description: 'Run tests by workflow name. Example: "Run Nightly E2E Tests"' + required: false + type: string + # TODO: Uncomment once Test Config does not have any secrets. Related ticket https://smartcontract-it.atlassian.net/browse/TT-1392 + # test_config_override_base64: + # required: false + # description: The base64-encoded test config override + # type: string + enable_check_test_configurations: + description: 'Set to "true" to enable check-test-configurations job' + required: false + type: boolean + default: false + with_existing_remote_runner_version: + description: 'Use the existing remote runner version for k8s tests. Example: "d3bf5044af33e08be788a2df31c4a745cf69d787"' + required: false + type: string + require_chainlink_image_versions_in_qa_ecr: + description: 'Check Chainlink image versions to be present in QA ECR. If not, build and push the image to QA ECR. Takes comma separated list of Chainlink image versions. Example: "5733cdcda9a9fc6da6343798b119b2ae136146cd,0b7d2c497a508efa5a827714780d908b7b8eda19"' + required: false + type: string + require_chainlink_plugin_versions_in_qa_ecr: + description: 'Check Chainlink plugins versions to be present in QA ECR. If not, build and push the image to QA ECR. Takes comma separated list of Chainlink image versions. Example: "5733cdcda9a9fc6da6343798b119b2ae136146cd,0b7d2c497a508efa5a827714780d908b7b8eda19"' + required: false + type: string + slack_notification_after_tests: + description: 'Set to "true" to send a slack notification after the tests' + required: false + type: boolean + default: false + slack_notification_after_tests_channel_id: + description: 'Slack channel ID to send the notification to' + required: false + type: string + slack_notification_after_tests_name: + description: 'Name of the slack notification' + required: false + type: string + secrets: + TEST_SECRETS_OVERRIDE_BASE64: + required: false + QA_AWS_REGION: + required: true + QA_AWS_ROLE_TO_ASSUME: + required: true + QA_AWS_ACCOUNT_NUMBER: + required: true + QA_PYROSCOPE_INSTANCE: + required: true + QA_PYROSCOPE_KEY: + required: true + QA_KUBECONFIG: + required: true + GRAFANA_INTERNAL_TENANT_ID: + required: true + GRAFANA_INTERNAL_BASIC_AUTH: + required: true + GRAFANA_INTERNAL_HOST: + required: true + GRAFANA_INTERNAL_URL_SHORTENER_TOKEN: + required: true + GH_TOKEN: + required: true + AWS_REGION: + required: true + AWS_OIDC_IAM_ROLE_VALIDATION_PROD_ARN: + required: true + AWS_API_GW_HOST_GRAFANA: + required: true + SLACK_BOT_TOKEN: + required: false + +env: + CHAINLINK_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink + QA_CHAINLINK_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink + GITHUB_SHA_PLUGINS: ${{ github.sha }}-plugins + CHAINLINK_ENV_USER: ${{ github.actor }} + CHAINLINK_COMMIT_SHA: ${{ inputs.evm-ref || github.sha }} + SELECTED_NETWORKS: SIMULATED + MOD_CACHE_VERSION: 1 + TEST_LOG_LEVEL: debug + +jobs: + validate-inputs: + name: Validate workflow inputs + runs-on: ubuntu-latest + outputs: + require_chainlink_image_versions_in_qa_ecr_matrix: ${{ steps.set-required-chainlink-image-versions-matrix.outputs.versions }} + require_chainlink_plugin_versions_in_qa_ecr_matrix: ${{ steps.set-required-chainlink-plugin-versions-matrix.outputs.versions }} + steps: + - name: Check input conditions + run: | + if [[ "${{ inputs.test_ids }}" != "" && "${{ inputs.test_workflow }}" != "" ]]; then + echo "::error::Error: Both 'test_ids' and 'test_workflow' are provided. Please specify only one." + exit 1 + fi + if [[ "${{ secrets.TEST_SECRETS_OVERRIDE_BASE64 }}" != "" ]]; then + echo "Will run tests with custom test secrets" + fi + - name: Install jq + run: sudo apt-get install jq + - name: Create matrix for required Chainlink image versions + id: set-required-chainlink-image-versions-matrix + run: | + if [[ "${{ inputs.require_chainlink_image_versions_in_qa_ecr }}" != '' ]]; then + image_versions=$(echo "${{ inputs.require_chainlink_image_versions_in_qa_ecr }}" | jq -Rc 'split(",") | if . == [""] then [] else . end') + echo "versions=$image_versions" >> $GITHUB_OUTPUT + fi + - name: Create matrix for required Chainlink plugin versions + id: set-required-chainlink-plugin-versions-matrix + run: | + if [[ "${{ inputs.require_chainlink_plugin_versions_in_qa_ecr }}" != '' ]]; then + image_versions=$(echo "${{ inputs.require_chainlink_plugin_versions_in_qa_ecr }}" | jq -Rc 'split(",") | if . == [""] then [] else . end') + echo "versions=$image_versions" >> $GITHUB_OUTPUT + fi + + check-test-configurations: + name: Check test configurations + if: ${{ inputs.enable_check_test_configurations }} + needs: validate-inputs + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + - name: Setup Go + uses: ./.github/actions/setup-go + - name: Run Check Tests Command + run: | + cd integration-tests/ + if ! go run citool/main.go check-tests . ../.github/e2e-tests.yml; then + echo "::error::Some E2E test configurations have to be added to .github/e2e-tests.yml. This file defines Github CI configuration for each E2E test or set of E2E tests." && exit 1 + fi + + get_latest_chainlink_release_version: + name: Get latest Chainlink release version + runs-on: ubuntu-latest + environment: integration + outputs: + latest_chainlink_release_version: ${{ steps.get_latest_version.outputs.latest_version }} + steps: + - name: Get Latest Version + id: get_latest_version + run: | + untrimmed_ver=$(curl --header "Authorization: token ${{ secrets.GH_TOKEN }}" --request GET https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r .name) + latest_version="${untrimmed_ver:1}" + echo "Latest Chainlink release version: $latest_version" + echo "latest_version=${latest_version}" >> "$GITHUB_OUTPUT" + # Check if latest_version is empty + if [ -z "$latest_version" ]; then + echo "Error: The latest_version is empty. The migration tests need a verison to run." + exit 1 + fi + + load-test-configurations: + name: Load test configurations + needs: [validate-inputs] + runs-on: ubuntu-latest + outputs: + run-docker-tests: ${{ steps.check-matrices.outputs.run-docker-tests }} + run-k8s-tests: ${{ steps.check-matrices.outputs.run-k8s-tests }} + docker-matrix: ${{ steps.set-docker-matrix.outputs.matrix }} + k8s-runner-matrix: ${{ steps.set-k8s-runner-matrix.outputs.matrix }} + steps: + - name: Checkout code + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + - name: Setup Go + uses: ./.github/actions/setup-go + - name: Install jq + run: sudo apt-get install jq + - name: Generate Docker Tests Matrix + id: set-docker-matrix + run: | + cd integration-tests/citool + MATRIX_JSON=$(go run main.go filter --file ${{ github.workspace }}/.github/e2e-tests.yml --test-env-type 'docker' --test-list '${{ inputs.test_list }}' --test-ids '${{ inputs.test_ids }}' --workflow '${{ inputs.test_workflow }}') + echo "Docker tests:" + echo "$MATRIX_JSON" | jq + echo "matrix=$MATRIX_JSON" >> $GITHUB_OUTPUT + - name: Generate K8s Tests Matrix + id: set-k8s-runner-matrix + run: | + cd integration-tests/citool + MATRIX_JSON=$(go run main.go filter --file ${{ github.workspace }}/.github/e2e-tests.yml --test-env-type 'k8s-remote-runner' --test-list '${{ inputs.test_list }}' --test-ids '${{ inputs.test_ids }}' --workflow '${{ inputs.test_workflow }}') + echo "K8s tests:" + echo "$MATRIX_JSON" | jq + echo "matrix=$MATRIX_JSON" >> $GITHUB_OUTPUT + - name: Check Test Matrices + id: check-matrices + run: | + DOCKER_MATRIX_EMPTY=$(echo '${{ steps.set-docker-matrix.outputs.matrix }}' | jq '.tests == null or .tests == []') + K8S_MATRIX_EMPTY=$(echo '${{ steps.set-k8s-runner-matrix.outputs.matrix }}' | jq '.tests == null or .tests == []') + + # Check if jq commands succeeded + if [ $? -ne 0 ]; then + echo "JSON parse error occurred." + exit 1 + fi + + if [[ "$DOCKER_MATRIX_EMPTY" == "true" ]]; then + echo "run-docker-tests=false" >> $GITHUB_OUTPUT + else + echo "run-docker-tests=true" >> $GITHUB_OUTPUT + fi + if [[ "$K8S_MATRIX_EMPTY" == "true" ]]; then + echo "run-k8s-tests=false" >> $GITHUB_OUTPUT + else + echo "run-k8s-tests=true" >> $GITHUB_OUTPUT + fi + + # Check if both matrices are empty + if [[ "$DOCKER_MATRIX_EMPTY" == "true" ]] && [[ "$K8S_MATRIX_EMPTY" == "true" ]]; then + echo "No tests found for inputs: '${{ toJson(inputs) }}'. Both Docker and Kubernetes tests matrices are empty" + exit 1 + fi + shell: bash + + - name: Check if test config override is required for any test + shell: bash + run: | + # Check if the test config override is provided and skip the checks if it is non-empty + # TODO: Uncomment once Test Config does not have any secrets. Related ticket https://smartcontract-it.atlassian.net/browse/TT-1392 + # if [ -n "${{ inputs.test_config_override_base64 }}" ]; then + # echo "Test config override provided. Skipping checks for tests requiring config override." + # exit 0 + # fi + + # Parse the JSON to check for test_config_override_required in Docker matrix + DOCKER_TESTS_REQUIRING_CONFIG_OVERRIDE=$(echo '${{ steps.set-docker-matrix.outputs.matrix }}' | jq 'if .tests then .tests[] | select(has("test_config_override_required") and .test_config_override_required) | .id else empty end' -r) + # Parse the JSON to check for test_config_override_required in Kubernetes matrix + K8S_TESTS_REQUIRING_CONFIG_OVERRIDE=$(echo '${{ steps.set-k8s-runner-matrix.outputs.matrix }}' | jq 'if .tests then .tests[] | select(has("test_config_override_required") and .test_config_override_required) | .id else empty end' -r) + + # Determine if any tests require a configuration override + if [ ! -z "$DOCKER_TESTS_REQUIRING_CONFIG_OVERRIDE" ] || [ ! -z "$K8S_TESTS_REQUIRING_CONFIG_OVERRIDE" ]; then + echo "Tests in .github/e2e-tests.yml requiring test config override:" + if [ ! -z "$DOCKER_TESTS_REQUIRING_CONFIG_OVERRIDE" ]; then + echo $DOCKER_TESTS_REQUIRING_CONFIG_OVERRIDE + fi + if [ ! -z "$K8S_TESTS_REQUIRING_CONFIG_OVERRIDE" ]; then + echo $K8S_TESTS_REQUIRING_CONFIG_OVERRIDE + fi + echo "::error::Error: Some of the tests require a test config override. Please see workflow logs and set 'test_config_override_base64' to run these tests." + exit 1 + else + echo "No tests require a configuration override. Proceeding without overrides." + fi + + - name: Check if test secrets are required for any test + shell: bash + run: | + # Check if the test secret key is provided and skip the checks if it is non-empty + if [ -n "${{ secrets.TEST_SECRETS_OVERRIDE_BASE64 }}" ]; then + echo "Test secret key provided. Skipping checks for tests requiring secrets." + exit 0 + fi + + # Parse the JSON to check for test_secrets_required in Docker matrix + DOCKER_TESTS_REQUIRING_SECRETS=$(echo '${{ steps.set-docker-matrix.outputs.matrix }}' | jq 'if .tests then .tests[] | select(has("test_secrets_required") and .test_secrets_required) | .id else empty end' -r) + # Parse the JSON to check for test_secrets_required in Kubernetes matrix + K8S_TESTS_REQUIRING_SECRETS=$(echo '${{ steps.set-k8s-runner-matrix.outputs.matrix }}' | jq 'if .tests then .tests[] | select(has("test_secrets_required") and .test_secrets_required) | .id else empty end' -r) + + # Determine if any tests require secrets + if [ ! -z "$DOCKER_TESTS_REQUIRING_SECRETS" ] || [ ! -z "$K8S_TESTS_REQUIRING_SECRETS" ]; then + echo "Tests in .github/e2e-tests.yml requiring custom test secrets:" + if [ ! -z "$DOCKER_TESTS_REQUIRING_SECRETS" ]; then + echo $DOCKER_TESTS_REQUIRING_SECRETS + fi + if [ ! -z "$K8S_TESTS_REQUIRING_SECRETS" ]; then + echo $K8S_TESTS_REQUIRING_SECRETS + fi + echo "::error::Error: Some of the tests require custom test secrets to run. Please see workflow logs and set 'test_secrets_override_key' to run these tests." + exit 1 + else + echo "No tests require secrets. Proceeding without additional secret setup." + fi + + # Build Chainlink images required for the tests + require-chainlink-image-versions-in-qa-ecr: + name: Build Chainlink image + needs: [validate-inputs, load-test-configurations] + if: ${{ needs.validate-inputs.outputs.require_chainlink_image_versions_in_qa_ecr_matrix != '' }} + runs-on: ubuntu-latest + environment: integration + permissions: + id-token: write + contents: read + env: + CHAINLINK_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink + strategy: + matrix: + version: ${{ fromJson(needs.validate-inputs.outputs.require_chainlink_image_versions_in_qa_ecr_matrix) }} + steps: + - name: Checkout the repo + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + + - name: Build Chainlink image for ${{ matrix.version }} and push it to QA ECR + uses: ./.github/actions/build-chainlink-image + with: + dockerfile: core/chainlink.Dockerfile + git_commit_sha: ${{ matrix.version }} + tag_suffix: '' + check_image_exists: 'true' + AWS_REGION: ${{ secrets.QA_AWS_REGION }} + AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} + + # Build Chainlink plugins required for the tests + require-chainlink-plugin-versions-in-qa-ecr: + name: Build Chainlink plugins + needs: [validate-inputs, load-test-configurations] + if: ${{ needs.validate-inputs.outputs.require_chainlink_plugin_versions_in_qa_ecr_matrix != '' }} + runs-on: ubuntu-latest + environment: integration + permissions: + id-token: write + contents: read + env: + CHAINLINK_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink + strategy: + matrix: + version: ${{ fromJson(needs.validate-inputs.outputs.require_chainlink_plugin_versions_in_qa_ecr_matrix) }} + steps: + - name: Checkout the repo + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + + - name: Build Chainlink plugins image for ${{ matrix.version }} + uses: ./.github/actions/build-chainlink-image + with: + dockerfile: plugins/chainlink.Dockerfile + git_commit_sha: ${{ matrix.version }} + tag_suffix: '-plugins' + check_image_exists: 'true' + AWS_REGION: ${{ secrets.QA_AWS_REGION }} + AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} + + # Run Docker tests + run-docker-tests: + name: Run docker tests (${{ matrix.tests.id }}) + needs: [load-test-configurations, require-chainlink-image-versions-in-qa-ecr, require-chainlink-plugin-versions-in-qa-ecr, get_latest_chainlink_release_version] + # Run when none of the needed jobs fail or are cancelled (skipped or successful jobs are ok) + if: ${{ needs.load-test-configurations.outputs.run-docker-tests == 'true' && always() && !failure() && !cancelled() }} + runs-on: ${{ matrix.tests.runs_on }} + strategy: + fail-fast: false + matrix: ${{fromJson(needs.load-test-configurations.outputs.docker-matrix)}} + environment: integration + permissions: + actions: read + checks: write + pull-requests: write + id-token: write + contents: read + env: + LATEST_CHAINLINK_RELEASE_VERSION: ${{ needs.get_latest_chainlink_release_version.outputs.latest_chainlink_release_version }} + steps: + - name: Collect Metrics + if: always() + id: collect-gha-metrics + uses: smartcontractkit/push-gha-metrics-action@d9da21a2747016b3e13de58c7d4115a3d5c97935 # v3.0.1 + with: + id: e2e_tests_${{ matrix.tests.id_sanitized }} + org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} + basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} + hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} + this-job-name: Run E2E Tests / Run docker tests (${{ matrix.tests.id }}) + test-results-file: '{"testType":"go","filePath":"/tmp/gotest.log"}' + continue-on-error: true + + - name: Checkout repository + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + - name: Install jq + run: sudo apt-get install -y jq + - name: Show test configuration + run: echo '${{ toJson(matrix.tests) }}' | jq . + - name: Setup Go + uses: ./.github/actions/setup-go + - name: Setup GAP for Grafana + uses: smartcontractkit/.github/actions/setup-gap@d316f66b2990ea4daa479daa3de6fc92b00f863e # setup-gap@0.3.2 + id: setup-gap + with: + aws-region: ${{ secrets.AWS_REGION }} + aws-role-arn: ${{ secrets.AWS_OIDC_IAM_ROLE_VALIDATION_PROD_ARN }} + api-gateway-host: ${{ secrets.AWS_API_GW_HOST_GRAFANA }} + duplicate-authorization-header: "true" + + - name: Run tests + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@aa8eea635029ab8d95abd3c206f56dae1e22e623 # v2.3.28 + env: + DETACH_RUNNER: true + with: + test_command_to_run: ${{ matrix.tests.test_cmd }} 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage -hidepassingtests=false -hidepassinglogs + test_download_vendor_packages_command: cd ./integration-tests && go mod download + test_secrets_override_base64: ${{ secrets.TEST_SECRETS_OVERRIDE_BASE64 }} + # TODO: Uncomment once Test Config does not have any secrets. Related ticket https://smartcontract-it.atlassian.net/browse/TT-1392 + # test_config_override_base64: ${{ inputs.test_config_override_base64 }} + test_config_chainlink_version: ${{ matrix.tests.test_inputs.chainlink_version || inputs.chainlink_version || github.sha }} + test_config_chainlink_upgrade_version: ${{ matrix.tests.test_inputs.chainlink_upgrade_version }} + test_config_chainlink_postgres_version: ${{ matrix.tests.test_inputs.chainlink_postgres_version }} + test_config_selected_networks: ${{ matrix.tests.test_inputs.selected_networks || env.SELECTED_NETWORKS}} + test_config_logging_run_id: ${{ github.run_id }} + test_config_logstream_log_targets: ${{ vars.LOGSTREAM_LOG_TARGETS }} + test_type: ${{ matrix.tests.test_inputs.test_type }} + test_suite: ${{ matrix.tests.test_inputs.test_suite }} + aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} + artifacts_name: ${{ matrix.tests.id_sanitized }}-test-logs + artifacts_location: | + ./integration-tests/smoke/logs/ + /tmp/gotest.log + publish_check_name: ${{ matrix.tests.id_sanitized }} + token: ${{ secrets.GH_TOKEN }} + no_cache: true # Do not restore cache since go was already configured in the previous step + go_mod_path: ./integration-tests/go.mod + QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} + QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} + QA_KUBECONFIG: "" + should_tidy: "false" + go_coverage_src_dir: /var/tmp/go-coverage + go_coverage_dest_dir: ${{ github.workspace }}/.covdata + DEFAULT_CHAINLINK_IMAGE: ${{ matrix.tests.test_inputs.chainlink_image || env.CHAINLINK_IMAGE }} + DEFAULT_CHAINLINK_UPGRADE_IMAGE: ${{ matrix.tests.test_inputs.chainlink_upgrade_image }} + DEFAULT_LOKI_TENANT_ID: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} + DEFAULT_LOKI_ENDPOINT: https://${{ secrets.GRAFANA_INTERNAL_HOST }}/loki/api/v1/push + DEFAULT_LOKI_BASIC_AUTH: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} + DEFAULT_GRAFANA_BASE_URL: "http://localhost:8080/primary" + DEFAULT_GRAFANA_DASHBOARD_URL: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs" + DEFAULT_GRAFANA_BEARER_TOKEN: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }} + DEFAULT_PYROSCOPE_ENVIRONMENT: ${{ matrix.tests.pyroscope_env }} + DEFAULT_PYROSCOPE_SERVER_URL: ${{ matrix.tests.pyroscope_env != '' && secrets.QA_PYROSCOPE_INSTANCE || '' }} + DEFAULT_PYROSCOPE_KEY: ${{ matrix.tests.pyroscope_env != '' && secrets.QA_PYROSCOPE_KEY || '' }} + DEFAULT_PYROSCOPE_ENABLED: ${{ matrix.tests.pyroscope_env != '' && 'true' || '' }} + + # Run K8s tests using old remote runner + + prepare-remote-runner-test-image: + needs: [load-test-configurations, require-chainlink-image-versions-in-qa-ecr, require-chainlink-plugin-versions-in-qa-ecr] + if: ${{ needs.load-test-configurations.outputs.run-k8s-tests == 'true' && always() && !failure() && !cancelled() }} + name: Prepare remote runner test image + runs-on: ubuntu-latest + environment: integration + permissions: + actions: read + checks: write + pull-requests: write + id-token: write + contents: read + outputs: + remote-runner-version: ${{ steps.set-remote-runner-version.outputs.remote-runner-version }} + env: + ENV_JOB_IMAGE_BASE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-tests + steps: + - name: Checkout repository + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + - name: Build Test Runner Image + uses: ./.github/actions/build-test-image + if: ${{ inputs.with_existing_remote_runner_version == '' }} + with: + QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} + QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} + QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} + - name: Set Remote Runner Version + id: set-remote-runner-version + run: | + if [[ -z "${{ inputs.with_existing_remote_runner_version }}" ]]; then + echo "remote-runner-version=${{ github.sha }}" >> $GITHUB_OUTPUT + else + echo "remote-runner-version=${{ inputs.with_existing_remote_runner_version }}" >> $GITHUB_OUTPUT + fi + + run-k8s-runner-tests: + needs: [load-test-configurations, prepare-remote-runner-test-image, require-chainlink-image-versions-in-qa-ecr, require-chainlink-plugin-versions-in-qa-ecr, get_latest_chainlink_release_version] + if: ${{ needs.load-test-configurations.outputs.run-k8s-tests == 'true' && always() && !failure() && !cancelled() }} + name: Run k8s tests (${{ matrix.tests.id }}) + runs-on: ${{ matrix.tests.runs_on }} + strategy: + fail-fast: false + matrix: ${{fromJson(needs.load-test-configurations.outputs.k8s-runner-matrix)}} + environment: integration + permissions: + actions: read + checks: write + pull-requests: write + id-token: write + contents: read + env: + LATEST_CHAINLINK_RELEASE_VERSION: ${{ needs.get_latest_chainlink_release_version.outputs.latest_chainlink_release_version }} + steps: + - name: Collect Metrics + if: always() + id: collect-gha-metrics + uses: smartcontractkit/push-gha-metrics-action@d9da21a2747016b3e13de58c7d4115a3d5c97935 # v3.0.1 + with: + id: e2e_tests_${{ matrix.tests.id_sanitized }} + org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} + basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} + hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} + this-job-name: Run E2E Tests / Run k8s tests (${{ matrix.tests.id }}) + continue-on-error: true + + - name: Checkout repository + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + - name: Install jq + run: sudo apt-get install -y jq + - name: Show Test Configuration + run: echo '${{ toJson(matrix.tests) }}' | jq . + - name: Show Remote Runner Version + run: | + echo "Remote Runner Version: ${{ needs.prepare-remote-runner-test-image.outputs.remote-runner-version }}" + + - name: Run tests + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@aa8eea635029ab8d95abd3c206f56dae1e22e623 # v2.3.28 + env: + DETACH_RUNNER: true + RR_MEM: ${{ matrix.tests.remote_runner_memory }} + TEST_ARGS: -test.timeout 900h -test.memprofile memprofile.out -test.cpuprofile profile.out + ENV_JOB_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-tests:${{ needs.prepare-remote-runner-test-image.outputs.remote-runner-version }} + INTERNAL_DOCKER_REPO: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com + # We can comment these out when we have a stable soak test and aren't worried about resource consumption + TEST_UPLOAD_CPU_PROFILE: true + TEST_UPLOAD_MEM_PROFILE: true + TEST_LOG_LEVEL: debug + REF_NAME: ${{ github.head_ref || github.ref_name }} + with: + test_command_to_run: ${{ matrix.tests.test_cmd }} + test_download_vendor_packages_command: make gomod + test_secrets_override_base64: ${{ secrets.TEST_SECRETS_OVERRIDE_BASE64 }} + # TODO: Uncomment once Test Config does not have any secrets. Related ticket https://smartcontract-it.atlassian.net/browse/TT-1392 + # test_config_override_base64: ${{ inputs.test_config_override_base64 }} + test_config_chainlink_version: ${{ matrix.tests.test_inputs.chainlink_version || inputs.chainlink_version || github.sha }} + test_config_chainlink_upgrade_version: ${{ matrix.tests.test_inputs.chainlink_upgrade_version }} + test_config_chainlink_postgres_version: ${{ matrix.tests.test_inputs.chainlink_postgres_version }} + test_config_selected_networks: ${{ matrix.tests.test_inputs.selected_networks || env.SELECTED_NETWORKS}} + test_config_logging_run_id: ${{ github.run_id }} + test_config_logstream_log_targets: ${{ vars.LOGSTREAM_LOG_TARGETS }} + test_type: ${{ matrix.tests.test_inputs.test_type }} + test_suite: ${{ matrix.tests.test_inputs.test_suite }} + token: ${{ secrets.GH_TOKEN }} + should_cleanup: false + no_cache: true # Do not restore cache since go was already configured in the previous step + go_mod_path: ./integration-tests/go.mod + QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} + QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} + QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} + DEFAULT_CHAINLINK_IMAGE: ${{ matrix.tests.test_inputs.chainlink_image || env.CHAINLINK_IMAGE }} + DEFAULT_CHAINLINK_UPGRADE_IMAGE: ${{ matrix.tests.test_inputs.chainlink_upgrade_image }} + DEFAULT_LOKI_TENANT_ID: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} + DEFAULT_LOKI_ENDPOINT: https://${{ secrets.GRAFANA_INTERNAL_HOST }}/loki/api/v1/push + DEFAULT_LOKI_BASIC_AUTH: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} + DEFAULT_GRAFANA_BASE_URL: "http://localhost:8080/primary" + DEFAULT_GRAFANA_DASHBOARD_URL: "/d/ddf75041-1e39-42af-aa46-361fe4c36e9e/ci-e2e-tests-logs" + DEFAULT_GRAFANA_BEARER_TOKEN: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }} + DEFAULT_PYROSCOPE_ENVIRONMENT: ${{ matrix.tests.pyroscope_env }} + DEFAULT_PYROSCOPE_SERVER_URL: ${{ matrix.tests.pyroscope_env != '' && secrets.QA_PYROSCOPE_INSTANCE || '' }} + DEFAULT_PYROSCOPE_KEY: ${{ matrix.tests.pyroscope_env != '' && secrets.QA_PYROSCOPE_KEY || '' }} + DEFAULT_PYROSCOPE_ENABLED: ${{ matrix.tests.pyroscope_env != '' && 'true' || '' }} + + after_tests: + needs: [run-docker-tests, run-k8s-runner-tests] + if: always() + name: After tests notifications + runs-on: ubuntu-latest + steps: + - name: Determine combined test results + id: combine_results + run: | + docker_result="${{ needs.run-docker-tests.result }}" + k8s_result="${{ needs.run-k8s-runner-tests.result }}" + + function map_outcome { + case "$1" in + success|skipped) + echo "success" + ;; + cancelled) + echo "cancelled" + ;; + *) + echo "failure" + ;; + esac + } + + combined_docker_result=$(map_outcome $docker_result) + combined_k8s_result=$(map_outcome $k8s_result) + + if [[ $combined_docker_result == "failure" || $combined_k8s_result == "failure" ]]; then + echo "result=failure" >> $GITHUB_OUTPUT + elif [[ $combined_docker_result == "cancelled" || $combined_k8s_result == "cancelled" ]]; then + echo "result=cancelled" >> $GITHUB_OUTPUT + else + echo "result=success" >> $GITHUB_OUTPUT + fi + + - name: Send Slack notification + uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0 + if: ${{ inputs.slack_notification_after_tests }} + id: slack + env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + with: + channel-id: ${{ inputs.slack_notification_after_tests_channel_id }} + payload: | + { + "blocks": [ + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "${{ inputs.slack_notification_after_tests_name }} - ${{ steps.combine_results.outputs.result == 'failure' && 'Failed :x:' || steps.combine_results.outputs.result == 'cancelled' && 'Cancelled :warning:' || 'Passed :white_check_mark:' }}" + } + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Build Details>" + } + } + ] + } + + # Run K8s tests using new remote runner + # remote-runner-k8s-tests: + # runs-on: ubuntu-latest + # container: + # image: golang:1.18 + # steps: + # - name: Checkout repository + # uses: actions/checkout@v2 + + # - name: Set up Go + # uses: actions/setup-go@v2 + # with: + # go-version: '1.18' + + # - name: Load Runner Config + # run: echo "$RUNNER_CONFIG" > runner.toml + # env: + # RUNNER_CONFIG: | + # # Runner configuration + # detached_mode = true + # debug = false + + # [[test_runs]] + # namespace = "dev-env" + # rbac_role_name = "dev-role" + # rbac_service_account_name = "dev-service-account" + # sync_value = "unique-sync-value-1" + # ttl_seconds_after_finished = 300 + # image_registry_url = "https://myregistry.dev/" + # image_name = "dev-image" + # image_tag = "v1.0.0" + # test_name = "TestMercuryLoad/all_endpoints" + # test_config_base64_env_name = "CONFIG_ENV_DEV" + # test_config_file_path = "/configs/dev/test-config.toml" + # test_config_base64 = "dGVzdCBjb25maWcgdmFsdWUgZGV2" + # test_timeout = "30m" + # resources_requests_cpu = "500m" + # resources_requests_memory = "1Gi" + # resources_limits_cpu = "1000m" + # resources_limits_memory = "2Gi" + # job_count = 2 + # chart_path = "/charts/dev" + # [envs] + # WASP_LOG_LEVEL = "info" + # TEST_LOG_LEVEL = "info" + # MERCURY_TEST_LOG_LEVEL = "info" + + # [[test_runs]] + # namespace = "prod-env" + # rbac_role_name = "prod-role" + # rbac_service_account_name = "prod-service-account" + # sync_value = "unique-sync-value-2" + # ttl_seconds_after_finished = 600 + # image_registry_url = "https://myregistry.prod/" + # image_name = "prod-image" + # image_tag = "v1.0.1" + # test_name = "TestMercuryLoad/all_endpoints" + # test_config_base64_env_name = "CONFIG_ENV_PROD" + # test_config_file_path = "/configs/prod/test-config.toml" + # test_config_base64 = "dGVzdCBjb25maWcgdmFsdWUgcHJvZA==" + # test_timeout = "45m" + # resources_requests_cpu = "800m" + # resources_requests_memory = "2Gi" + # resources_limits_cpu = "1500m" + # resources_limits_memory = "4Gi" + # job_count = 3 + # chart_path = "/charts/prod" + # [envs] + # WASP_LOG_LEVEL = "info" + # TEST_LOG_LEVEL = "info" + # MERCURY_TEST_LOG_LEVEL = "info" + + # # Schedule the tests in K8s in remote runner + # - name: Run Kubernetes Tests + # run: go run ./cmd/main.go run -c runner.toml \ No newline at end of file diff --git a/.github/workflows/run-nightly-e2e-tests.yml b/.github/workflows/run-nightly-e2e-tests.yml new file mode 100644 index 00000000000..ab12b36555f --- /dev/null +++ b/.github/workflows/run-nightly-e2e-tests.yml @@ -0,0 +1,34 @@ +name: Run Nightly E2E Tests + +on: + schedule: + # Run every night at midnight UTC (0:00 AM) + - cron: '0 0 * * *' + workflow_dispatch: + +jobs: + call-run-e2e-tests-workflow: + name: Run E2E Tests + uses: ./.github/workflows/run-e2e-tests-reusable-workflow.yml + with: + chainlink_version: develop + test_workflow: Run Nightly E2E Tests + slack_notification_after_tests: true + slack_notification_after_tests_channel_id: "#team-test-tooling-internal" + slack_notification_after_tests_name: Nightly E2E Tests + secrets: + QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} + QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} + QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} + QA_PYROSCOPE_INSTANCE: ${{ secrets.QA_PYROSCOPE_INSTANCE }} + QA_PYROSCOPE_KEY: ${{ secrets.QA_PYROSCOPE_KEY }} + QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} + GRAFANA_INTERNAL_TENANT_ID: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} + GRAFANA_INTERNAL_BASIC_AUTH: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} + GRAFANA_INTERNAL_HOST: ${{ secrets.GRAFANA_INTERNAL_HOST }} + GRAFANA_INTERNAL_URL_SHORTENER_TOKEN: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + AWS_REGION: ${{ secrets.QA_AWS_REGION }} + AWS_OIDC_IAM_ROLE_VALIDATION_PROD_ARN: ${{ secrets.AWS_OIDC_IAM_ROLE_VALIDATION_PROD_ARN }} + AWS_API_GW_HOST_GRAFANA: ${{ secrets.AWS_API_GW_HOST_GRAFANA }} + SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }} diff --git a/.github/workflows/run-selected-e2e-tests.yml b/.github/workflows/run-selected-e2e-tests.yml new file mode 100644 index 00000000000..ab064531fd3 --- /dev/null +++ b/.github/workflows/run-selected-e2e-tests.yml @@ -0,0 +1,70 @@ +name: Run Selected E2E Tests + +on: + workflow_dispatch: + inputs: + chainlink_version: + description: 'Enter Chainlink version to use for the tests. Example: "v2.10.0" or sha' + required: false + type: string + test_ids: + description: 'Run all tests "*" by default. Or, enter test IDs to run separated by commas. Example: "run_all_in_ocr_tests_go,run_TestOCRv2Request_in_ocr2_test_go". Check all test IDs in .github/e2e-tests.yml' + default: "*" + required: true + type: string + test_secrets_override_key: + description: 'Enter the secret key to override test secrets' + required: false + type: string + # TODO: Uncomment once Test Config does not have any secrets. Related ticket https://smartcontract-it.atlassian.net/browse/TT-1392 + # test_config_override_base64: + # required: false + # description: The base64-encoded test config override + # type: string + enable_check_test_configurations: + description: 'Set to "true" to enable check-test-configurations job' + required: false + type: boolean + default: false + with_existing_remote_runner_version: + description: 'Use the existing remote runner version for k8s tests. Example: "d3bf5044af33e08be788a2df31c4a745cf69d787"' + required: false + type: string + workflow_run_name: + description: 'Enter the name of the workflow run' + default: 'Run E2E Tests' + required: false + type: string + +run-name: ${{ inputs.workflow_run_name }} + +jobs: + call-run-e2e-tests-workflow: + name: Run E2E Tests + uses: ./.github/workflows/run-e2e-tests-reusable-workflow.yml + with: + chainlink_version: ${{ github.event.inputs.chainlink_version }} + test_ids: ${{ github.event.inputs.test_ids }} + # TODO: Uncomment once Test Config does not have any secrets. Related ticket https://smartcontract-it.atlassian.net/browse/TT-1392 + # test_config_override_base64: ${{ github.event.inputs.test_config_override_base64 }} + with_existing_remote_runner_version: ${{ github.event.inputs.with_existing_remote_runner_version }} + # Use fromJSON to convert string to boolean. More info: https://github.com/actions/runner/issues/2206#issuecomment-1532246677 + enable_check_test_configurations: ${{ fromJSON(github.event.inputs.enable_check_test_configurations) }} + secrets: + QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} + QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} + QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} + QA_PYROSCOPE_INSTANCE: ${{ secrets.QA_PYROSCOPE_INSTANCE }} + QA_PYROSCOPE_KEY: ${{ secrets.QA_PYROSCOPE_KEY }} + QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} + GRAFANA_INTERNAL_TENANT_ID: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} + GRAFANA_INTERNAL_BASIC_AUTH: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} + GRAFANA_INTERNAL_HOST: ${{ secrets.GRAFANA_INTERNAL_HOST }} + GRAFANA_INTERNAL_URL_SHORTENER_TOKEN: ${{ secrets.GRAFANA_INTERNAL_URL_SHORTENER_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + AWS_REGION: ${{ secrets.QA_AWS_REGION }} + AWS_OIDC_IAM_ROLE_VALIDATION_PROD_ARN: ${{ secrets.AWS_OIDC_IAM_ROLE_VALIDATION_PROD_ARN }} + AWS_API_GW_HOST_GRAFANA: ${{ secrets.AWS_API_GW_HOST_GRAFANA }} + TEST_SECRETS_OVERRIDE_BASE64: ${{ secrets[inputs.test_secrets_override_key] }} + SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }} + diff --git a/.github/workflows/solidity-foundry.yml b/.github/workflows/solidity-foundry.yml index bfbca1c6324..a7ced0f5653 100644 --- a/.github/workflows/solidity-foundry.yml +++ b/.github/workflows/solidity-foundry.yml @@ -16,16 +16,12 @@ jobs: - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes with: - # Foundry is only used for Solidity v0.8 contracts, therefore we can ignore - # changes to older contracts. filters: | src: - 'contracts/src/v0.8/**/*' - '.github/workflows/solidity-foundry.yml' - 'contracts/foundry.toml' - 'contracts/gas-snapshots/*.gas-snapshot' - - 'contracts/foundry-lib/**/*' - - '.gitmodules' tests: strategy: diff --git a/.github/workflows/solidity-hardhat.yml b/.github/workflows/solidity-hardhat.yml index 9b5058eda6a..fb6ba6fef43 100644 --- a/.github/workflows/solidity-hardhat.yml +++ b/.github/workflows/solidity-hardhat.yml @@ -25,46 +25,17 @@ jobs: with: filters: | src: - - 'contracts/src/!(v0.8/(llo-feeds|keystone|ccip|functions|transmission)/**)/**/*' + - 'contracts/src/!(v0.8/(ccip|functions|keystone|l2ep|llo-feeds|transmission|vrf)/**)/**/*' - 'contracts/test/**/*' - 'contracts/package.json' - 'contracts/pnpm-lock.yaml' - 'contracts/hardhat.config.ts' - - 'contracts/ci.json' - '.github/workflows/solidity-hardhat.yml' - split-tests: - name: Split Solidity Tests - runs-on: ubuntu-latest - outputs: - splits: ${{ steps.split.outputs.splits }} - steps: - - name: Checkout the repo - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - - name: Generate splits - id: split - uses: ./.github/actions/split-tests - with: - config: ./contracts/ci.json - - name: Collect Metrics - id: collect-gha-metrics - uses: smartcontractkit/push-gha-metrics-action@d9da21a2747016b3e13de58c7d4115a3d5c97935 # v3.0.1 - with: - id: solidity-split-tests - org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: Split Solidity Tests - continue-on-error: true - - solidity-splits: - needs: [changes, split-tests] + hardhat-test: + needs: [changes] if: needs.changes.outputs.changes == 'true' - name: Solidity ${{ matrix.split.id }} ${{ fromJSON('["(skipped)", ""]')[needs.changes.outputs.changes == 'true'] }} - strategy: - fail-fast: false - matrix: - split: ${{ fromJson(needs.split-tests.outputs.splits) }} + name: Solidity ${{ fromJSON('["(skipped)", ""]')[needs.changes.outputs.changes == 'true'] }} runs-on: ubuntu-latest steps: - name: Checkout the repo @@ -76,23 +47,20 @@ jobs: with: namespace: coverage - name: Run tests - env: - SPLIT: ${{ matrix.split.tests }} working-directory: contracts - run: pnpm test -- $SPLIT + run: pnpm test - name: Collect Metrics id: collect-gha-metrics uses: smartcontractkit/push-gha-metrics-action@d9da21a2747016b3e13de58c7d4115a3d5c97935 # v3.0.1 with: - id: solidity-splits + id: hardhat-test org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }} - this-job-name: Solidity ${{ matrix.split.id }} continue-on-error: true solidity: - needs: [changes, solidity-splits] + needs: [changes, hardhat-test] name: Solidity runs-on: ubuntu-latest if: always() diff --git a/.gitignore b/.gitignore index 4f07e40516c..2b31c9d3a59 100644 --- a/.gitignore +++ b/.gitignore @@ -73,6 +73,7 @@ __debug_bin* integration-tests/**/traces/ benchmark_report.csv benchmark_summary.json +integration-tests/citool/output.csv # goreleaser builds cosign.* diff --git a/.mockery.yaml b/.mockery.yaml index 331655e7b3e..17800e3609a 100644 --- a/.mockery.yaml +++ b/.mockery.yaml @@ -1 +1,324 @@ -# empty config to prevent info/debug level log spam +dir: "{{ .InterfaceDir }}/mocks" +mockname: "{{ .InterfaceName }}" +outpkg: mocks +filename: "{{ .InterfaceName | snakecase }}.go" +packages: + github.com/smartcontractkit/chainlink/v2/common/client: + config: + dir: "{{ .InterfaceDir }}" + filename: "mock_{{ .InterfaceName | snakecase }}_test.go" + inpackage: true + mockname: "mock{{ .InterfaceName | camelcase }}" + interfaces: + Node: + NodeSelector: + sendOnlyClient: + SendOnlyNode: + RPC: + Head: + NodeClient: + PoolChainInfoProvider: + github.com/smartcontractkit/chainlink/v2/common/headtracker: + interfaces: + HeadTrackable: + HeadTracker: + HeadBroadcaster: + github.com/smartcontractkit/chainlink/v2/common/txmgr: + interfaces: + TxManager: + github.com/smartcontractkit/chainlink/v2/common/txmgr/types: + interfaces: + ReaperChainConfig: + config: + mockname: ReaperConfig + ForwarderManager: + KeyStore: + TxStrategy: + TxAttemptBuilder: + TxStore: + github.com/smartcontractkit/chainlink/v2/common/types: + interfaces: + Head: + Subscription: + github.com/smartcontractkit/chainlink/v2/core/bridges: + interfaces: + ORM: + github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/types: + interfaces: + Dispatcher: + Receiver: + github.com/smartcontractkit/chainlink/v2/core/chains/evm/client: + interfaces: + Client: + RPCClient: + github.com/smartcontractkit/chainlink/v2/core/chains/evm/config: + interfaces: + GasEstimator: + ChainScopedConfig: + github.com/smartcontractkit/chainlink/v2/core/chains/evm/forwarders: + interfaces: + ORM: + github.com/smartcontractkit/chainlink/v2/core/chains/evm/gas: + interfaces: + Config: + EvmFeeEstimator: + feeEstimatorClient: + config: + mockname: FeeEstimatorClient + EvmEstimator: + github.com/smartcontractkit/chainlink/v2/core/chains/evm/gas/rollups: + interfaces: + L1Oracle: + l1OracleClient: + config: + mockname: L1OracleClient + github.com/smartcontractkit/chainlink/v2/core/chains/evm/keystore: + interfaces: + Eth: + github.com/smartcontractkit/chainlink/v2/core/chains/evm/log: + interfaces: + Broadcaster: + Broadcast: + AbigenContract: + github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller: + interfaces: + LogPoller: + github.com/smartcontractkit/chainlink/v2/core/chains/evm/monitor: + interfaces: + BalanceMonitor: + config: + dir: "{{ .InterfaceDir }}/../mocks" + github.com/smartcontractkit/chainlink/v2/core/chains/evm/txmgr: + interfaces: + ChainConfig: + config: + mockname: Config + filename: config.go + EvmTxStore: + github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm: + interfaces: + Chain: + LegacyChainContainer: + github.com/smartcontractkit/chainlink/v2/core/cmd: + interfaces: + Prompter: + github.com/smartcontractkit/chainlink/v2/core/config: + interfaces: + TelemetryIngress: + TelemetryIngressEndpoint: + github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/flux_aggregator_wrapper: + config: + dir: core/internal/mocks + filename: flux_aggregator.go + interfaces: + FluxAggregatorInterface: + config: + mockname: FluxAggregator + github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/flags_wrapper: + config: + dir: core/internal/mocks + filename: flags.go + interfaces: + FlagsInterface: + config: + mockname: Flags + github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/aggregator_v3_interface: + config: + dir: core/services/vrf/mocks + filename: aggregator_v3_interface.go + interfaces: + AggregatorV3InterfaceInterface: + github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrf_coordinator_v2: + config: + dir: core/services/vrf/mocks + filename: vrf_coordinator_v2.go + interfaces: + VRFCoordinatorV2Interface: + github.com/smartcontractkit/chainlink/v2/core/logger: + config: + dir: "{{ .InterfaceDir }}" + mockname: "Mock{{ .InterfaceName }}" + inpackage: true + filename: logger_mocks.go + interfaces: + Logger: + github.com/smartcontractkit/chainlink/v2/core/services: + interfaces: + Checker: + github.com/smartcontractkit/chainlink/v2/core/services/blockhashstore: + interfaces: + BHS: + Timer: + github.com/smartcontractkit/chainlink/v2/core/services/ccip: + interfaces: + ORM: + github.com/smartcontractkit/chainlink/v2/core/services/chainlink: + interfaces: + Application: + config: + dir: core/internal/mocks + GeneralConfig: + github.com/smartcontractkit/chainlink/v2/core/services/feeds: + interfaces: + ConnectionsManager: + ORM: + Service: + github.com/smartcontractkit/chainlink/v2/core/services/feeds/proto: + config: + dir: "{{ .InterfaceDir }}/../mocks" + interfaces: + FeedsManagerClient: + github.com/smartcontractkit/chainlink/v2/core/services/fluxmonitorv2: + interfaces: + ContractSubmitter: + Flags: + KeyStoreInterface: + ORM: + github.com/smartcontractkit/chainlink/v2/core/services/functions: + interfaces: + ExternalAdapterClient: + BridgeAccessor: + FunctionsListener: + OffchainTransmitter: + ORM: + github.com/smartcontractkit/chainlink/v2/core/services/gateway/connector: + interfaces: + GatewayConnector: + GatewayConnectorHandler: + Signer: + github.com/smartcontractkit/chainlink/v2/core/services/gateway/handlers: + interfaces: + Handler: + DON: + github.com/smartcontractkit/chainlink/v2/core/services/gateway/handlers/functions/allowlist: + interfaces: + OnchainAllowlist: + ORM: + github.com/smartcontractkit/chainlink/v2/core/services/gateway/handlers/functions/subscriptions: + interfaces: + OnchainSubscriptions: + ORM: + github.com/smartcontractkit/chainlink/v2/core/services/gateway/network: + interfaces: + ConnectionInitiator: + ConnectionAcceptor: + HttpServer: + HTTPRequestHandler: + WebSocketServer: + github.com/smartcontractkit/chainlink/v2/core/services/job: + interfaces: + ServiceCtx: + KVStore: + ORM: + Spawner: + github.com/smartcontractkit/chainlink/v2/core/services/keystore: + interfaces: + Aptos: + Cosmos: + CSA: + Eth: + Master: + OCR: + OCR2: + P2P: + config: + filename: p2p.go + Solana: + StarkNet: + config: + filename: starknet.go + VRF: + github.com/smartcontractkit/chainlink/v2/core/services/ocr: + interfaces: + OCRContractTrackerDB: + github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20: + interfaces: + Registry: + github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21: + interfaces: + Registry: + HttpClient: + github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core: + interfaces: + UpkeepStateReader: + github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/promwrapper: + interfaces: + PrometheusBackend: + github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/threshold: + interfaces: + Decryptor: + github.com/smartcontractkit/chainlink/v2/core/services/p2p/types: + interfaces: + Peer: + PeerWrapper: + Signer: + github.com/smartcontractkit/chainlink/v2/core/services/pipeline: + interfaces: + Config: + ORM: + Runner: + PipelineParamUnmarshaler: + github.com/smartcontractkit/chainlink/v2/core/services/promreporter: + config: + dir: core/internal/mocks + interfaces: + PrometheusBackend: + github.com/smartcontractkit/chainlink/v2/core/services/relay/evm: + interfaces: + BatchCaller: + config: + dir: "{{ .InterfaceDir }}/rpclibmocks" + outpkg: rpclibmocks + LoopRelayAdapter: + RequestRoundDB: + github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury: + interfaces: + asyncDeleter: + config: + mockname: AsyncDeleter + github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types: + interfaces: + LogPollerWrapper: + github.com/smartcontractkit/chainlink/v2/core/services/s4: + interfaces: + ORM: + Storage: + github.com/smartcontractkit/chainlink/v2/core/services/synchronization: + interfaces: + TelemetryService: + github.com/smartcontractkit/chainlink/v2/core/services/synchronization/telem: + config: + dir: "{{ .InterfaceDir }}/../mocks" + interfaces: + TelemClient: + github.com/smartcontractkit/chainlink/v2/core/services/vrf/vrfcommon: + config: + dir: "{{ .InterfaceDir }}/../mocks" + interfaces: + Config: + FeeConfig: + github.com/smartcontractkit/chainlink/v2/core/services/webhook: + interfaces: + ExternalInitiatorManager: + HTTPClient: + github.com/smartcontractkit/chainlink/v2/core/sessions: + interfaces: + BasicAdminUsersORM: + AuthenticationProvider: + github.com/smartcontractkit/chainlink/v2/core/sessions/ldapauth: + interfaces: + LDAPClient: + LDAPConn: + github.com/smartcontractkit/chainlink-common/pkg/types: + config: + dir: core/capabilities/targets/mocks + interfaces: + Codec: + config: + dir: core/services/relay/evm/mocks + ChainReader: + ChainWriter: + + + + diff --git a/.tool-versions b/.tool-versions index 365218c5648..7d237b0a4a1 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,7 +1,7 @@ -golang 1.21.7 -mockery 2.42.2 +golang 1.22.5 +mockery 2.43.2 nodejs 20.13.1 -pnpm 8.15.8 +pnpm 9.4.0 postgres 15.1 helm 3.10.3 zig 0.11.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 7662247a36f..f2124455030 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,99 +1,136 @@ # Changelog Chainlink Core -## 2.13.0 - UNRELEASED +## 2.14.0 - UNRELEASED ### Minor Changes -- [#13235](https://github.com/smartcontractkit/chainlink/pull/13235) [`5374a577dd`](https://github.com/smartcontractkit/chainlink/commit/5374a577dd6396e149c26168a2f093b3204dfddb) Thanks [@krehermann](https://github.com/krehermann)! - #internal move workflow validation to common repo +- [#13356](https://github.com/smartcontractkit/chainlink/pull/13356) [`0228243f20`](https://github.com/smartcontractkit/chainlink/commit/0228243f20bb02d40c7ad2c9cf1002599436ff1d) Thanks [@ilija42](https://github.com/ilija42)! - #internal Add Log Poller support to Chain Reader through setting them in config. All filters should be part of the contract wide filter unless an event needs specific polling configuration, which can be set on a per event basis.. -- [#12970](https://github.com/smartcontractkit/chainlink/pull/12970) [`1eb7180205`](https://github.com/smartcontractkit/chainlink/commit/1eb71802053fcde7e809ef58918110cf03046f3a) Thanks [@dimriou](https://github.com/dimriou)! - Decouple client tests from core #internal +- [#13718](https://github.com/smartcontractkit/chainlink/pull/13718) [`f33cd1915c`](https://github.com/smartcontractkit/chainlink/commit/f33cd1915c03bef9bfe110481eb13094c36ce454) Thanks [@nickcorin](https://github.com/nickcorin)! - #internal Added a chain writer constructor onto the evm relayer. -- [#13354](https://github.com/smartcontractkit/chainlink/pull/13354) [`58d73ecf61`](https://github.com/smartcontractkit/chainlink/commit/58d73ecf618ac39c37f767e70c4e6d6a51eaba59) Thanks [@friedemannf](https://github.com/friedemannf)! - #breaking_change Remove the `xdai` `ChainType` config option. Moving forward, only `gnosis` can be used. +- [#13040](https://github.com/smartcontractkit/chainlink/pull/13040) [`0ac790b37f`](https://github.com/smartcontractkit/chainlink/commit/0ac790b37fca951dfb4b4093c00c5adbd6987668) Thanks [@amit-momin](https://github.com/amit-momin)! - Added API for products to query a transaction's status in the TXM #internal -- [#12971](https://github.com/smartcontractkit/chainlink/pull/12971) [`a2441ba8cc`](https://github.com/smartcontractkit/chainlink/commit/a2441ba8cc44b6455338410b739d394a3bf3557e) Thanks [@dimriou](https://github.com/dimriou)! - Decouple evm config tests from core #internal +- [#13413](https://github.com/smartcontractkit/chainlink/pull/13413) [`9e733a07fe`](https://github.com/smartcontractkit/chainlink/commit/9e733a07fe2082207e6d7884abee26d82d37e808) Thanks [@silaslenihan](https://github.com/silaslenihan)! - #added EVM implementation of GetFeeComponents function for ChainWriter -- [#13396](https://github.com/smartcontractkit/chainlink/pull/13396) [`5ff32bde25`](https://github.com/smartcontractkit/chainlink/commit/5ff32bde2575d2b2ef626a69d54b9f6eed0d21c5) Thanks [@ettec](https://github.com/ettec)! - #internal keystone: handle local target transmission logic in capability wrapper +- [#13478](https://github.com/smartcontractkit/chainlink/pull/13478) [`9f6e454bc5`](https://github.com/smartcontractkit/chainlink/commit/9f6e454bc51c07cf817c90a9a11fa44ae3708be5) Thanks [@snehaagni](https://github.com/snehaagni)! - Bump to start the next version -- [#13357](https://github.com/smartcontractkit/chainlink/pull/13357) [`21f38e52d1`](https://github.com/smartcontractkit/chainlink/commit/21f38e52d1d2401f58da83f143043e3f4561e21c) Thanks [@ettec](https://github.com/ettec)! - #internal remote target capability and transmission protocol +- [#13501](https://github.com/smartcontractkit/chainlink/pull/13501) [`15f02f65c1`](https://github.com/smartcontractkit/chainlink/commit/15f02f65c1ac3cfc89e726597a981ddf206eea2b) Thanks [@ettec](https://github.com/ettec)! - #internal remove shared secret from transmission schedule -- [#13397](https://github.com/smartcontractkit/chainlink/pull/13397) [`daf8cf6cfe`](https://github.com/smartcontractkit/chainlink/commit/daf8cf6cfe1c0b8d2a70fb476a4e815af5025ebe) Thanks [@dimriou](https://github.com/dimriou)! - Remove multiple core dependencies from evm head tracker tests #internal" +- [#13691](https://github.com/smartcontractkit/chainlink/pull/13691) [`f2630b280d`](https://github.com/smartcontractkit/chainlink/commit/f2630b280d917313c6d3af468d9a7c039d5e179e) Thanks [@nickcorin](https://github.com/nickcorin)! - #internal Implemented the `GetTransactionStatus` method on the EVM implementation of the `ChainWriter`. -- [#13312](https://github.com/smartcontractkit/chainlink/pull/13312) [`c3829cac20`](https://github.com/smartcontractkit/chainlink/commit/c3829cac20e158f805d0efb9a8a2183e8d7b0515) Thanks [@amit-momin](https://github.com/amit-momin)! - #internal Added new Geth InsufficientEth client error for internal TXM classification +- [#13551](https://github.com/smartcontractkit/chainlink/pull/13551) [`f7e036244c`](https://github.com/smartcontractkit/chainlink/commit/f7e036244c1bf019964704734a96be5e5699ca2c) Thanks [@ettec](https://github.com/ettec)! - #internal capability dispatcher threading and context usage -- [#13381](https://github.com/smartcontractkit/chainlink/pull/13381) [`0a62f024e1`](https://github.com/smartcontractkit/chainlink/commit/0a62f024e10398cdd6451ef0d15db2501de11538) Thanks [@nickcorin](https://github.com/nickcorin)! - #internal Pre-process contract abis in the evm chainwriter. +- [#13564](https://github.com/smartcontractkit/chainlink/pull/13564) [`2c2ca6a278`](https://github.com/smartcontractkit/chainlink/commit/2c2ca6a27899295dc87e48e4378671dbbe06ac48) Thanks [@yongkangchia](https://github.com/yongkangchia)! - #changed Added Aptos Keystore to Core. This includes Aptos Key which uses ED25519, Keystore, Relevant tests -- [#13221](https://github.com/smartcontractkit/chainlink/pull/13221) [`0b100ad3db`](https://github.com/smartcontractkit/chainlink/commit/0b100ad3dbf0a3c2fbd6e55c539046f6f3c9e5f6) Thanks [@ilija42](https://github.com/ilija42)! - Added a mechanism to validate forwarders for OCR2 and fallback to EOA if necessary #added +- [#13427](https://github.com/smartcontractkit/chainlink/pull/13427) [`66f154745d`](https://github.com/smartcontractkit/chainlink/commit/66f154745d3d973aa8b629a99a65a660a1d1b3bc) Thanks [@cedric-cordenier](https://github.com/cedric-cordenier)! - #internal Add RegistrySyncer -- [#13416](https://github.com/smartcontractkit/chainlink/pull/13416) [`68e00b3abf`](https://github.com/smartcontractkit/chainlink/commit/68e00b3abf566a222ff6775b0fb2575ff73f735e) Thanks [@ettec](https://github.com/ettec)! - #internal fix for workflow step persistence +- [#13661](https://github.com/smartcontractkit/chainlink/pull/13661) [`363e8290bb`](https://github.com/smartcontractkit/chainlink/commit/363e8290bb5ea2f7bf07528ba19cc64dca8e87a8) Thanks [@amit-momin](https://github.com/amit-momin)! - Updated L1 gas price calculations for Optimism Ecotone and Fjord upgrades #internal -- [#13259](https://github.com/smartcontractkit/chainlink/pull/13259) [`76dbe19282`](https://github.com/smartcontractkit/chainlink/commit/76dbe192822c7e9f289c98e33ebb6693a07046a0) Thanks [@archseer](https://github.com/archseer)! - #internal Added a configuration option to chain writer to set the tx send strategy. +- [#13297](https://github.com/smartcontractkit/chainlink/pull/13297) [`e55e0424a2`](https://github.com/smartcontractkit/chainlink/commit/e55e0424a276416cf849a83a1488a287872824c5) Thanks [@amit-momin](https://github.com/amit-momin)! - #changed Refactored the BlockHistoryEstimator check to prevent excessively bumping transactions. Check no longer waits for CheckInclusionBlocks to pass before assessing an attempt. + #bugfix Fixed a bug that would use the oldest blocks in the cached history instead of the latest to perform gas estimations. -- [#13384](https://github.com/smartcontractkit/chainlink/pull/13384) [`bc087f1de2`](https://github.com/smartcontractkit/chainlink/commit/bc087f1de2014cce1027341d14e0917c4351fb21) Thanks [@augustbleeds](https://github.com/augustbleeds)! - bump chainlink-starknet so it builds reports with median gas price #updated +- [#13524](https://github.com/smartcontractkit/chainlink/pull/13524) [`d736d9e083`](https://github.com/smartcontractkit/chainlink/commit/d736d9e0838983a021677bc608556b3994f46690) Thanks [@ettec](https://github.com/ettec)! - #internal remote target wait until initiated threads exit on close -- [#13353](https://github.com/smartcontractkit/chainlink/pull/13353) [`7a86103474`](https://github.com/smartcontractkit/chainlink/commit/7a861034740a44ebb5d3f1da2d271637691c0bd3) Thanks [@pavel-raykov](https://github.com/pavel-raykov)! - #updated Remove deprecated app.shortcut links +- [#13169](https://github.com/smartcontractkit/chainlink/pull/13169) [`3f56b3eecd`](https://github.com/smartcontractkit/chainlink/commit/3f56b3eecd2d5fd3e325325d9d1e82d8a749d9eb) Thanks [@HenryNguyen5](https://github.com/HenryNguyen5)! - #internal rework operator_ui installer -- [#13181](https://github.com/smartcontractkit/chainlink/pull/13181) [`c14576a945`](https://github.com/smartcontractkit/chainlink/commit/c14576a945fdc6b5099ffd31f467a0712afe6fd6) Thanks [@krehermann](https://github.com/krehermann)! - #added workflow spec auto-approval via CLO +- [#13601](https://github.com/smartcontractkit/chainlink/pull/13601) [`c3f6b704f1`](https://github.com/smartcontractkit/chainlink/commit/c3f6b704f1c510dbfb28b421ee3a8f63416b18c1) Thanks [@cedric-cordenier](https://github.com/cedric-cordenier)! - #internal Allow outputs to be passed directly to the inputs -- [#13455](https://github.com/smartcontractkit/chainlink/pull/13455) [`066afc0877`](https://github.com/smartcontractkit/chainlink/commit/066afc0877a9e953bbda25a4ff09009d7f1c1e2d) Thanks [@krehermann](https://github.com/krehermann)! - #bugfix use correct internal id in workflow auto-approval +- [#13621](https://github.com/smartcontractkit/chainlink/pull/13621) [`3eb0a3736f`](https://github.com/smartcontractkit/chainlink/commit/3eb0a3736ff1cc885dd7ff9c978c09218f61e7a6) Thanks [@cedric-cordenier](https://github.com/cedric-cordenier)! - #internal Add script to provision capability registry -- [#13259](https://github.com/smartcontractkit/chainlink/pull/13259) [`76dbe19282`](https://github.com/smartcontractkit/chainlink/commit/76dbe192822c7e9f289c98e33ebb6693a07046a0) Thanks [@archseer](https://github.com/archseer)! - #internal added tests for Chainwriter +- [#13522](https://github.com/smartcontractkit/chainlink/pull/13522) [`90924dcc26`](https://github.com/smartcontractkit/chainlink/commit/90924dcc2667807f57e31992aac9f674935680b8) Thanks [@krehermann](https://github.com/krehermann)! - #internal moves workflow name and owner to the yaml spec -- [#12881](https://github.com/smartcontractkit/chainlink/pull/12881) [`d675d864f0`](https://github.com/smartcontractkit/chainlink/commit/d675d864f0e6f33c783bfed17fe31b2c127eb51d) Thanks [@amit-momin](https://github.com/amit-momin)! - #added Added an auto-purge feature to the EVM TXM that identifies terminally stuck transactions either through a chain specific method or heurisitic then purges them to unblock the nonce. Included 4 new toml configs under Transactions.AutoPurge to configure this new feature: Enabled, Threshold, MinAttempts, and DetectionApiUrl. +- [#13668](https://github.com/smartcontractkit/chainlink/pull/13668) [`e5dc01e844`](https://github.com/smartcontractkit/chainlink/commit/e5dc01e844064e2fdab976369cf83195f9659216) Thanks [@cedric-cordenier](https://github.com/cedric-cordenier)! - Add registry syncer package #internal -- [#13401](https://github.com/smartcontractkit/chainlink/pull/13401) [`905830c3ff`](https://github.com/smartcontractkit/chainlink/commit/905830c3ff16c670c3fbf3d83a0c2ca3a15e83a8) Thanks [@krehermann](https://github.com/krehermann)! - #db_update add persistence for DON-2-DON discovery announcements +### Patch Changes -- [#13466](https://github.com/smartcontractkit/chainlink/pull/13466) [`4fdfffdb4c`](https://github.com/smartcontractkit/chainlink/commit/4fdfffdb4c4a6f16fcdb388fe38642398ce130da) Thanks [@dimriou](https://github.com/dimriou)! - Move chaintype #internal +- [#13498](https://github.com/smartcontractkit/chainlink/pull/13498) [`c6f1b30f34`](https://github.com/smartcontractkit/chainlink/commit/c6f1b30f346c0a8a64ed39b8317e247c928a368e) Thanks [@simsonraj](https://github.com/simsonraj)! - #added zkSync L1 GasPrice calculation -- [#13200](https://github.com/smartcontractkit/chainlink/pull/13200) [`4718aa7ec2`](https://github.com/smartcontractkit/chainlink/commit/4718aa7ec20e2ef70dff7fb72095d357f3725a80) Thanks [@augustbleeds](https://github.com/augustbleeds)! - Add option to include GasPriceSubunits pipeline to include gasPriceSubunits in median ocr2 transmission (only to be used with Starknet chain for now) #added #nops #updated +- [#13487](https://github.com/smartcontractkit/chainlink/pull/13487) [`5e27da95f0`](https://github.com/smartcontractkit/chainlink/commit/5e27da95f09f21272e93f086bc2de5a9bc2ae399) Thanks [@bolekk](https://github.com/bolekk)! - #internal Use audited version of OCR2Base.sol in OCR3Capability.sol + +- [#13612](https://github.com/smartcontractkit/chainlink/pull/13612) [`98108568dc`](https://github.com/smartcontractkit/chainlink/commit/98108568dc3ea54537a6867d36f3e48ee456daae) Thanks [@nickcorin](https://github.com/nickcorin)! - #internal bump `chainlink-common` version to commit 6d926be950a6f6ca289a84edad938d4eef2ee337. -- [#13215](https://github.com/smartcontractkit/chainlink/pull/13215) [`66d8d16638`](https://github.com/smartcontractkit/chainlink/commit/66d8d16638f16dc863cbc6d24356c3cf3c9724f0) Thanks [@ettec](https://github.com/ettec)! - #internal standard capability support +- [#13726](https://github.com/smartcontractkit/chainlink/pull/13726) [`2ecf45d381`](https://github.com/smartcontractkit/chainlink/commit/2ecf45d381b98714f4f673221bfc74577fcfeb04) Thanks [@ferglor](https://github.com/ferglor)! - Only encode non nil block numbers for eth_call #changed -- [#12995](https://github.com/smartcontractkit/chainlink/pull/12995) [`322f3b9616`](https://github.com/smartcontractkit/chainlink/commit/322f3b96162a4e0738d76ba00f949c5b19d09909) Thanks [@dimriou](https://github.com/dimriou)! - Decouple monitoring tests from core #internal +- [#13048](https://github.com/smartcontractkit/chainlink/pull/13048) [`3f8c00a6f1`](https://github.com/smartcontractkit/chainlink/commit/3f8c00a6f1884f765bbe9e4b70e0dc4fb94a0088) Thanks [@dhaidashenko](https://github.com/dhaidashenko)! - Fixed local finality violation caused by an RPC lagging behind on latest finalized block. -- [#12972](https://github.com/smartcontractkit/chainlink/pull/12972) [`1196df4684`](https://github.com/smartcontractkit/chainlink/commit/1196df4684c812361b8f0994ade6414a1f214c2c) Thanks [@dimriou](https://github.com/dimriou)! - Decouple gas tests from core #internal + Added `EVM.FinalizedBlockOffset` and `EVM.NodePool.EnforceRepeatableRead` config options. + With `EnforceRepeatableRead = true`, RPC is considered healthy only if its most recent finalized block is larger or equal to the highest finalized block observed by the Node minus `FinalizedBlockOffset`. + #bugfix -- [#12993](https://github.com/smartcontractkit/chainlink/pull/12993) [`2a8d1b150a`](https://github.com/smartcontractkit/chainlink/commit/2a8d1b150a07c5dfd036559a35c8f83bb3e4f757) Thanks [@dimriou](https://github.com/dimriou)! - Decouple utils tests from core #internal +- [#13554](https://github.com/smartcontractkit/chainlink/pull/13554) [`22cab6c152`](https://github.com/smartcontractkit/chainlink/commit/22cab6c1526371c898bde52e7836cfd01ba7daf5) Thanks [@nickcorin](https://github.com/nickcorin)! - #internal Bumped `chainlink-common` package version to commit `1fb0b48758af25d689b6957ebfb76598c9fb27ea`. -- [#13445](https://github.com/smartcontractkit/chainlink/pull/13445) [`3ff5128026`](https://github.com/smartcontractkit/chainlink/commit/3ff51280266dd979cbe2a8fe779c669a4e12fe22) Thanks [@ettec](https://github.com/ettec)! - #internal update operator ui versioun +- [#13670](https://github.com/smartcontractkit/chainlink/pull/13670) [`253a962fa3`](https://github.com/smartcontractkit/chainlink/commit/253a962fa3997765d5df40cf5ca19f5471ed5976) Thanks [@nickcorin](https://github.com/nickcorin)! - #internal bumped chainlink-common version to commit 1eff5dedc9857ed8811186dd2996603942dc1107 -- [#13259](https://github.com/smartcontractkit/chainlink/pull/13259) [`76dbe19282`](https://github.com/smartcontractkit/chainlink/commit/76dbe192822c7e9f289c98e33ebb6693a07046a0) Thanks [@archseer](https://github.com/archseer)! - #added A ChainWriter implementation in the EVM relay. +- [#13459](https://github.com/smartcontractkit/chainlink/pull/13459) [`8fdc77f6a7`](https://github.com/smartcontractkit/chainlink/commit/8fdc77f6a7c30be5254bd9d0cb75fd6b2736242e) Thanks [@makramkd](https://github.com/makramkd)! - #db_update ccip capability specs migration -- [#13265](https://github.com/smartcontractkit/chainlink/pull/13265) [`5db47b63b3`](https://github.com/smartcontractkit/chainlink/commit/5db47b63b3f2d0addf521904940d780caf9f57eb) Thanks [@krehermann](https://github.com/krehermann)! - #db_update Add name to workflow spec. Add unique constraint to (owner,name) for workflow spec +- [#13494](https://github.com/smartcontractkit/chainlink/pull/13494) [`a830fe093f`](https://github.com/smartcontractkit/chainlink/commit/a830fe093f4642236a89ac73bf9eefe5008898bc) Thanks [@HelloKashif](https://github.com/HelloKashif)! - #internal removed HistoryDepth to FinalityDepth validation -- [#13089](https://github.com/smartcontractkit/chainlink/pull/13089) [`b00ad69095`](https://github.com/smartcontractkit/chainlink/commit/b00ad6909571042947f615b8740c31c304bbf7ec) Thanks [@silaslenihan](https://github.com/silaslenihan)! - #internal Switched finality check in HeadTracker to use the underlying finality type +- [#13580](https://github.com/smartcontractkit/chainlink/pull/13580) [`0d4a3b2cd8`](https://github.com/smartcontractkit/chainlink/commit/0d4a3b2cd8ff938ba018d982ef514c754a7df345) Thanks [@DeividasK](https://github.com/DeividasK)! - #internal -### Patch Changes +- [#13569](https://github.com/smartcontractkit/chainlink/pull/13569) [`f5a70eb09a`](https://github.com/smartcontractkit/chainlink/commit/f5a70eb09abc9a4d859442c9bd062a74a7ec9c54) Thanks [@DeividasK](https://github.com/DeividasK)! - #internal -- [#13377](https://github.com/smartcontractkit/chainlink/pull/13377) [`390ee1990e`](https://github.com/smartcontractkit/chainlink/commit/390ee1990e2545d4f47e64a521ee61ee0b200786) Thanks [@bolekk](https://github.com/bolekk)! - #internal handle new metadata fields +- [#13528](https://github.com/smartcontractkit/chainlink/pull/13528) [`95502ad269`](https://github.com/smartcontractkit/chainlink/commit/95502ad2699d63891662594f70e82e76682f2ed8) Thanks [@DeividasK](https://github.com/DeividasK)! - #internal -- [#13315](https://github.com/smartcontractkit/chainlink/pull/13315) [`3af83ed014`](https://github.com/smartcontractkit/chainlink/commit/3af83ed01439648354ac6b348d61b0f9594b99ec) Thanks [@mateusz-sekara](https://github.com/mateusz-sekara)! - Reducing the scope of 0233 migration to include only 5th word index which is required for CCIP #db_update +- [#13563](https://github.com/smartcontractkit/chainlink/pull/13563) [`99fa0e68d1`](https://github.com/smartcontractkit/chainlink/commit/99fa0e68d11f4bbc5bc54c6c65edb1db024b21a9) Thanks [@HenryNguyen5](https://github.com/HenryNguyen5)! - #internal Clean up workflow engine logging -- [#13139](https://github.com/smartcontractkit/chainlink/pull/13139) [`15fab1daa8`](https://github.com/smartcontractkit/chainlink/commit/15fab1daa84348e96a7895280209cb73e456a1c5) Thanks [@jmank88](https://github.com/jmank88)! - core/services: fix ocrWrapper saveError contexts #internal +- [#13443](https://github.com/smartcontractkit/chainlink/pull/13443) [`955566fb9b`](https://github.com/smartcontractkit/chainlink/commit/955566fb9b9a4f930069d497a81bb6c37fac0125) Thanks [@Tofel](https://github.com/Tofel)! - #changed Expand EVM implementation compatibility pipeline -- [#13144](https://github.com/smartcontractkit/chainlink/pull/13144) [`49f1bf3ba2`](https://github.com/smartcontractkit/chainlink/commit/49f1bf3ba296f0e3dfc01d5a3d371f82f159dc4a) Thanks [@jmank88](https://github.com/jmank88)! - improve handling of postgres connection settings and driver versions #db +- [#13602](https://github.com/smartcontractkit/chainlink/pull/13602) [`fc3a291d6c`](https://github.com/smartcontractkit/chainlink/commit/fc3a291d6c75e8045c3f8e2458ec7513ffdb3882) Thanks [@nickcorin](https://github.com/nickcorin)! - #internal fixed a bug where we weren't sending the value param to the txm -- [#13286](https://github.com/smartcontractkit/chainlink/pull/13286) [`6139126034`](https://github.com/smartcontractkit/chainlink/commit/61391260340ba74f3510e6ded4fdace6829630b7) Thanks [@EasterTheBunny](https://github.com/EasterTheBunny)! - enforce proper result indexing on pipeline results #breaking_change +- [#13714](https://github.com/smartcontractkit/chainlink/pull/13714) [`4b19e37553`](https://github.com/smartcontractkit/chainlink/commit/4b19e37553ecf60c9d98209bc29b4079ae64cbe3) Thanks [@shileiwill](https://github.com/shileiwill)! - add native billing in smoke test #added -- [#13279](https://github.com/smartcontractkit/chainlink/pull/13279) [`5a87f4a59e`](https://github.com/smartcontractkit/chainlink/commit/5a87f4a59e3c6c92b08ebefc5090017693785729) Thanks [@DylanTinianov](https://github.com/DylanTinianov)! - #changed Remove ClientErrors interface from common +- [#13426](https://github.com/smartcontractkit/chainlink/pull/13426) [`592b2bb5a8`](https://github.com/smartcontractkit/chainlink/commit/592b2bb5a84a0e8858f77c5faa99e881f911878c) Thanks [@archseer](https://github.com/archseer)! - #internal + +- [#13546](https://github.com/smartcontractkit/chainlink/pull/13546) [`10ddafaebe`](https://github.com/smartcontractkit/chainlink/commit/10ddafaebedb94ad5a59968d19256b8c4592857f) Thanks [@cds95](https://github.com/cds95)! - #internal upgrade keystone contracts to 0.8.24 + +- [#13504](https://github.com/smartcontractkit/chainlink/pull/13504) [`815c5ea871`](https://github.com/smartcontractkit/chainlink/commit/815c5ea8715462e00f6ea10cdc0b93ec3e1ba505) Thanks [@shileiwill](https://github.com/shileiwill)! - move v23 contracts #bugfix + +- [#13583](https://github.com/smartcontractkit/chainlink/pull/13583) [`8ccaa140ae`](https://github.com/smartcontractkit/chainlink/commit/8ccaa140aebdafbb760569a1d2b7cabe8ac1bf61) Thanks [@samsondav](https://github.com/samsondav)! - Add new relayer type "dummy" for testing. -- [#13190](https://github.com/smartcontractkit/chainlink/pull/13190) [`c93e83ab99`](https://github.com/smartcontractkit/chainlink/commit/c93e83ab992c5238ec79f9581f2eb370d9862492) Thanks [@HenryNguyen5](https://github.com/HenryNguyen5)! - #internal Add Keystone CRIB Provisioning + #added -- [#13008](https://github.com/smartcontractkit/chainlink/pull/13008) [`841fe61daa`](https://github.com/smartcontractkit/chainlink/commit/841fe61daa90b980f1e1622d2f7bd8f850b55462) Thanks [@HenryNguyen5](https://github.com/HenryNguyen5)! - #internal Keystone - rename type -> id +- [#13671](https://github.com/smartcontractkit/chainlink/pull/13671) [`4493b96f62`](https://github.com/smartcontractkit/chainlink/commit/4493b96f62d18376d89ae152cb0df3eab87ab5fd) Thanks [@poopoothegorilla](https://github.com/poopoothegorilla)! - #bugfix fixed ureachable code bug which could result in stuck txns -- [#13436](https://github.com/smartcontractkit/chainlink/pull/13436) [`f37afb9eba`](https://github.com/smartcontractkit/chainlink/commit/f37afb9ebaeda10f8b3873b069b8a824e60a81c3) Thanks [@bolekk](https://github.com/bolekk)! - #internal #bugfix keystone bugfixes +- [#13376](https://github.com/smartcontractkit/chainlink/pull/13376) [`bb40d51502`](https://github.com/smartcontractkit/chainlink/commit/bb40d51502487b010a1d6621db42458356dbbdc0) Thanks [@shileiwill](https://github.com/shileiwill)! - add events, add getter and add comments #bugfix -- [#13214](https://github.com/smartcontractkit/chainlink/pull/13214) [`921a015792`](https://github.com/smartcontractkit/chainlink/commit/921a015792570ad3fa3b7700bdd3ec8f0590b383) Thanks [@momentmaker](https://github.com/momentmaker)! - Add to CI changeset workflow an additional step to update the Jira issue associated with this PR and set the `fixVersions` for the issue with the upcoming core release version. #internal #wip +- [#13495](https://github.com/smartcontractkit/chainlink/pull/13495) [`483ee6ae06`](https://github.com/smartcontractkit/chainlink/commit/483ee6ae06f608d150ab360e0a3ffe6895b39d52) Thanks [@pavel-raykov](https://github.com/pavel-raykov)! - #updated Fix verb formatting in the log outputs. -- [#13449](https://github.com/smartcontractkit/chainlink/pull/13449) [`69a95d8262`](https://github.com/smartcontractkit/chainlink/commit/69a95d82626290858219250e746fd51c8c7c4093) Thanks [@dimriou](https://github.com/dimriou)! - Cleanup txm tests #internal +- [#13599](https://github.com/smartcontractkit/chainlink/pull/13599) [`e0ce0795b4`](https://github.com/smartcontractkit/chainlink/commit/e0ce0795b44f27539611327efce7c7c004511daa) Thanks [@pavel-raykov](https://github.com/pavel-raykov)! - #internal Add loggercheck linter to verify that \*w logging methods have even number of args. -- [#13183](https://github.com/smartcontractkit/chainlink/pull/13183) [`96304756a7`](https://github.com/smartcontractkit/chainlink/commit/96304756a77cdb2acf251d21d59b6aa8b55bf61a) Thanks [@cds95](https://github.com/cds95)! - #internal add modify DON function to capability registry +## 2.13.0 - 2024-07-01 -- [#13453](https://github.com/smartcontractkit/chainlink/pull/13453) [`8c98c80376`](https://github.com/smartcontractkit/chainlink/commit/8c98c80376c3b6d72bffeab62ee45a74449b6ef5) Thanks [@cds95](https://github.com/cds95)! - #internal return hashed capability ids +### Minor Changes + +- [#13354](https://github.com/smartcontractkit/chainlink/pull/13354) [`58d73ecf61`](https://github.com/smartcontractkit/chainlink/commit/58d73ecf618ac39c37f767e70c4e6d6a51eaba59) Thanks [@friedemannf](https://github.com/friedemannf)! - #breaking_change Remove the `xdai` `ChainType` config option. Moving forward, only `gnosis` can be used. + +- [#13221](https://github.com/smartcontractkit/chainlink/pull/13221) [`0b100ad3db`](https://github.com/smartcontractkit/chainlink/commit/0b100ad3dbf0a3c2fbd6e55c539046f6f3c9e5f6) Thanks [@ilija42](https://github.com/ilija42)! - Added a mechanism to validate forwarders for OCR2 and fallback to EOA if necessary #added + +- [#13384](https://github.com/smartcontractkit/chainlink/pull/13384) [`bc087f1de2`](https://github.com/smartcontractkit/chainlink/commit/bc087f1de2014cce1027341d14e0917c4351fb21) Thanks [@augustbleeds](https://github.com/augustbleeds)! - bump chainlink-starknet so it builds reports with median gas price #updated + +- [#13353](https://github.com/smartcontractkit/chainlink/pull/13353) [`7a86103474`](https://github.com/smartcontractkit/chainlink/commit/7a861034740a44ebb5d3f1da2d271637691c0bd3) Thanks [@pavel-raykov](https://github.com/pavel-raykov)! - #updated Remove deprecated app.shortcut links + +- [#13181](https://github.com/smartcontractkit/chainlink/pull/13181) [`c14576a945`](https://github.com/smartcontractkit/chainlink/commit/c14576a945fdc6b5099ffd31f467a0712afe6fd6) Thanks [@krehermann](https://github.com/krehermann)! - #added workflow spec auto-approval via CLO -- [#13368](https://github.com/smartcontractkit/chainlink/pull/13368) [`000f2cb36b`](https://github.com/smartcontractkit/chainlink/commit/000f2cb36b7d9b6d046d383c85996ae1ae7a606e) Thanks [@cds95](https://github.com/cds95)! - #internal remove update capabilities from capability registry +- [#13455](https://github.com/smartcontractkit/chainlink/pull/13455) [`066afc0877`](https://github.com/smartcontractkit/chainlink/commit/066afc0877a9e953bbda25a4ff09009d7f1c1e2d) Thanks [@krehermann](https://github.com/krehermann)! - #bugfix use correct internal id in workflow auto-approval + +- [#12881](https://github.com/smartcontractkit/chainlink/pull/12881) [`d675d864f0`](https://github.com/smartcontractkit/chainlink/commit/d675d864f0e6f33c783bfed17fe31b2c127eb51d) Thanks [@amit-momin](https://github.com/amit-momin)! - #added Added an auto-purge feature to the EVM TXM that identifies terminally stuck transactions either through a chain specific method or heurisitic then purges them to unblock the nonce. Included 4 new toml configs under Transactions.AutoPurge to configure this new feature: Enabled, Threshold, MinAttempts, and DetectionApiUrl. -- [#13183](https://github.com/smartcontractkit/chainlink/pull/13183) [`96304756a7`](https://github.com/smartcontractkit/chainlink/commit/96304756a77cdb2acf251d21d59b6aa8b55bf61a) Thanks [@cds95](https://github.com/cds95)! - #internal add getters in capability registry +- [#13401](https://github.com/smartcontractkit/chainlink/pull/13401) [`905830c3ff`](https://github.com/smartcontractkit/chainlink/commit/905830c3ff16c670c3fbf3d83a0c2ca3a15e83a8) Thanks [@krehermann](https://github.com/krehermann)! - #db_update add persistence for DON-2-DON discovery announcements + +- [#13200](https://github.com/smartcontractkit/chainlink/pull/13200) [`4718aa7ec2`](https://github.com/smartcontractkit/chainlink/commit/4718aa7ec20e2ef70dff7fb72095d357f3725a80) Thanks [@augustbleeds](https://github.com/augustbleeds)! - Add option to include GasPriceSubunits pipeline to include gasPriceSubunits in median ocr2 transmission (only to be used with Starknet chain for now) #added #nops #updated +- [#13259](https://github.com/smartcontractkit/chainlink/pull/13259) [`76dbe19282`](https://github.com/smartcontractkit/chainlink/commit/76dbe192822c7e9f289c98e33ebb6693a07046a0) Thanks [@archseer](https://github.com/archseer)! - #added A ChainWriter implementation in the EVM relay. + +- [#13265](https://github.com/smartcontractkit/chainlink/pull/13265) [`5db47b63b3`](https://github.com/smartcontractkit/chainlink/commit/5db47b63b3f2d0addf521904940d780caf9f57eb) Thanks [@krehermann](https://github.com/krehermann)! - #db_update Add name to workflow spec. Add unique constraint to (owner,name) for workflow spec + +### Patch Changes +- [#13315](https://github.com/smartcontractkit/chainlink/pull/13315) [`3af83ed014`](https://github.com/smartcontractkit/chainlink/commit/3af83ed01439648354ac6b348d61b0f9594b99ec) Thanks [@mateusz-sekara](https://github.com/mateusz-sekara)! - Reducing the scope of 0233 migration to include only 5th word index which is required for CCIP #db_update + +- [#13144](https://github.com/smartcontractkit/chainlink/pull/13144) [`49f1bf3ba2`](https://github.com/smartcontractkit/chainlink/commit/49f1bf3ba296f0e3dfc01d5a3d371f82f159dc4a) Thanks [@jmank88](https://github.com/jmank88)! - improve handling of postgres connection settings and driver versions #db + +- [#13286](https://github.com/smartcontractkit/chainlink/pull/13286) [`6139126034`](https://github.com/smartcontractkit/chainlink/commit/61391260340ba74f3510e6ded4fdace6829630b7) Thanks [@EasterTheBunny](https://github.com/EasterTheBunny)! - enforce proper result indexing on pipeline results #breaking_change + +- [#13279](https://github.com/smartcontractkit/chainlink/pull/13279) [`5a87f4a59e`](https://github.com/smartcontractkit/chainlink/commit/5a87f4a59e3c6c92b08ebefc5090017693785729) Thanks [@DylanTinianov](https://github.com/DylanTinianov)! - #changed Remove ClientErrors interface from common - [#13230](https://github.com/smartcontractkit/chainlink/pull/13230) [`6f1ebca197`](https://github.com/smartcontractkit/chainlink/commit/6f1ebca1970d4a970be64c581800ab781c6c3c7c) Thanks [@dhaidashenko](https://github.com/dhaidashenko)! - Fixed CPU usage issues caused by inefficiencies in HeadTracker. HeadTracker's support of finality tags caused a drastic increase in the number of tracked blocks on the Arbitrum chain (from 50 to 12,000), which has led to a 30% increase in CPU usage. @@ -106,66 +143,30 @@ - [#13364](https://github.com/smartcontractkit/chainlink/pull/13364) [`fc007a9484`](https://github.com/smartcontractkit/chainlink/commit/fc007a94846c178bc9d5203dbff6b6b8c7546a71) Thanks [@FelixFan1992](https://github.com/FelixFan1992)! - #bugfix fix a funding bug in LinkAvailableBalanceMonitor -- [#13368](https://github.com/smartcontractkit/chainlink/pull/13368) [`000f2cb36b`](https://github.com/smartcontractkit/chainlink/commit/000f2cb36b7d9b6d046d383c85996ae1ae7a606e) Thanks [@cds95](https://github.com/cds95)! - #internal capability registry informational findings - -- [#13368](https://github.com/smartcontractkit/chainlink/pull/13368) [`000f2cb36b`](https://github.com/smartcontractkit/chainlink/commit/000f2cb36b7d9b6d046d383c85996ae1ae7a606e) Thanks [@cds95](https://github.com/cds95)! - #internal return don capability config contract config from capability registry - -- [#13368](https://github.com/smartcontractkit/chainlink/pull/13368) [`000f2cb36b`](https://github.com/smartcontractkit/chainlink/commit/000f2cb36b7d9b6d046d383c85996ae1ae7a606e) Thanks [@cds95](https://github.com/cds95)! - #internal add capability registry comment explaining why we do not validate node operator name - -- [#13425](https://github.com/smartcontractkit/chainlink/pull/13425) [`eeb363f123`](https://github.com/smartcontractkit/chainlink/commit/eeb363f1230415dde573607a095b177c612d3bef) Thanks [@DeividasK](https://github.com/DeividasK)! - #internal - -- [#13328](https://github.com/smartcontractkit/chainlink/pull/13328) [`0d95942ad4`](https://github.com/smartcontractkit/chainlink/commit/0d95942ad414a3ecefb17bd8166fe28f474018d0) Thanks [@HenryNguyen5](https://github.com/HenryNguyen5)! - #internal [Keystone] Merge version field with ID - - [#13174](https://github.com/smartcontractkit/chainlink/pull/13174) [`e778a3202b`](https://github.com/smartcontractkit/chainlink/commit/e778a3202b4d8761ffc44b790196d9a580fede1c) Thanks [@FelixFan1992](https://github.com/FelixFan1992)! - #changed: AUTO-10539: adjust logging for offchain config and gas control - [#12952](https://github.com/smartcontractkit/chainlink/pull/12952) [`7572a50a78`](https://github.com/smartcontractkit/chainlink/commit/7572a50a78a270188344786937f68233df82f65b) Thanks [@FelixFan1992](https://github.com/FelixFan1992)! - #added compare user-defined max gas price with current gas price in automation simulation pipeline -- [#13183](https://github.com/smartcontractkit/chainlink/pull/13183) [`96304756a7`](https://github.com/smartcontractkit/chainlink/commit/96304756a77cdb2acf251d21d59b6aa8b55bf61a) Thanks [@cds95](https://github.com/cds95)! - #internal update ICapabilityConfiguration interface - - [#13216](https://github.com/smartcontractkit/chainlink/pull/13216) [`6099abbdbf`](https://github.com/smartcontractkit/chainlink/commit/6099abbdbfb3ad396ca1ed5138ecd7a13159de19) Thanks [@ibrajer](https://github.com/ibrajer)! - Added Base Sepolia to ChainUtils #changed - [#13177](https://github.com/smartcontractkit/chainlink/pull/13177) [`0d58a8d5db`](https://github.com/smartcontractkit/chainlink/commit/0d58a8d5db24f42720226e73328e501637ba59c5) Thanks [@shileiwill](https://github.com/shileiwill)! - link transfer status check #bugfix -- [#13118](https://github.com/smartcontractkit/chainlink/pull/13118) [`6008d730bf`](https://github.com/smartcontractkit/chainlink/commit/6008d730bf1fcfc4a9dd1e46497c3db75cf390fe) Thanks [@bolekk](https://github.com/bolekk)! - #internal Pass MercuryTriggerService to Mercury Transmitter - - [#13058](https://github.com/smartcontractkit/chainlink/pull/13058) [`a34a17ae9d`](https://github.com/smartcontractkit/chainlink/commit/a34a17ae9d62679a1ff15a7703f5cbcf6dfd1d0f) Thanks [@shileiwill](https://github.com/shileiwill)! - withdraw in offchain mode #bugfix -- [#13328](https://github.com/smartcontractkit/chainlink/pull/13328) [`0d95942ad4`](https://github.com/smartcontractkit/chainlink/commit/0d95942ad414a3ecefb17bd8166fe28f474018d0) Thanks [@HenryNguyen5](https://github.com/HenryNguyen5)! - #internal Add workflow validation - -- [#13456](https://github.com/smartcontractkit/chainlink/pull/13456) [`b09c14d0ca`](https://github.com/smartcontractkit/chainlink/commit/b09c14d0ca85678799cb108500687d0e8456205a) Thanks [@bolekk](https://github.com/bolekk)! - #internal [Keystone] Add remote target to syncer - -- [#13176](https://github.com/smartcontractkit/chainlink/pull/13176) [`d2cd916e46`](https://github.com/smartcontractkit/chainlink/commit/d2cd916e46c51d76f7e1ea61a0cc86b1415f4036) Thanks [@ferglor](https://github.com/ferglor)! - Add logs for when the assumptions of how the log buffer will be used are violated #internal - - [#13213](https://github.com/smartcontractkit/chainlink/pull/13213) [`1b1e31ebfc`](https://github.com/smartcontractkit/chainlink/commit/1b1e31ebfc5198ab7e43291110b6f5d54e467a01) Thanks [@FelixFan1992](https://github.com/FelixFan1992)! - #bugfix fix an automation smoke test flake -- [#13368](https://github.com/smartcontractkit/chainlink/pull/13368) [`000f2cb36b`](https://github.com/smartcontractkit/chainlink/commit/000f2cb36b7d9b6d046d383c85996ae1ae7a606e) Thanks [@cds95](https://github.com/cds95)! - #internal verify valid node operator when adding nodes to capability registry - -- [#13218](https://github.com/smartcontractkit/chainlink/pull/13218) [`4938ef3961`](https://github.com/smartcontractkit/chainlink/commit/4938ef396112a6de6f9822cfcc116fd5cdfb92be) Thanks [@bolekk](https://github.com/bolekk)! - #internal ReportCodec for Streams trigger - -- [#13094](https://github.com/smartcontractkit/chainlink/pull/13094) [`a0d1ce5e9c`](https://github.com/smartcontractkit/chainlink/commit/a0d1ce5e9cddc540bba8eb193865646cf0ebc0a8) Thanks [@momentmaker](https://github.com/momentmaker)! - Refactor changesets release preview workflow #internal - -- [#13175](https://github.com/smartcontractkit/chainlink/pull/13175) [`fbd94c4351`](https://github.com/smartcontractkit/chainlink/commit/fbd94c43511dabd272d7fd990dfb76de66c30a16) Thanks [@erikburt](https://github.com/erikburt)! - bump chainlink-solana dependency #internal - -- [#13183](https://github.com/smartcontractkit/chainlink/pull/13183) [`96304756a7`](https://github.com/smartcontractkit/chainlink/commit/96304756a77cdb2acf251d21d59b6aa8b55bf61a) Thanks [@cds95](https://github.com/cds95)! - #internal implement remove DONs in capability registry - - [#12813](https://github.com/smartcontractkit/chainlink/pull/12813) [`ac893364e6`](https://github.com/smartcontractkit/chainlink/commit/ac893364e6c6ede08e9bf04da7dc64e0da94ab6e) Thanks [@matYang](https://github.com/matYang)! - #db_update created 2 new CCIP tables in migration 0236, one for observed gas prices, one for observed token prices; setup indexing for these tables. #added ORM for CCIP gas prices and token prices -- [#13080](https://github.com/smartcontractkit/chainlink/pull/13080) [`36cc95f625`](https://github.com/smartcontractkit/chainlink/commit/36cc95f6256b5ba418a916de2c9dc9597508147a) Thanks [@cds95](https://github.com/cds95)! - #internal Generate gethwrappers for capability registry changes - - [#13173](https://github.com/smartcontractkit/chainlink/pull/13173) [`a9717f05e9`](https://github.com/smartcontractkit/chainlink/commit/a9717f05e9af0fa07746c6b95b7f1625089a860f) Thanks [@ferglor](https://github.com/ferglor)! - Revert block number tracking #changed -- [#13453](https://github.com/smartcontractkit/chainlink/pull/13453) [`8c98c80376`](https://github.com/smartcontractkit/chainlink/commit/8c98c80376c3b6d72bffeab62ee45a74449b6ef5) Thanks [@cds95](https://github.com/cds95)! - #internal update error message when node does not exist - - [#12952](https://github.com/smartcontractkit/chainlink/pull/12952) [`7572a50a78`](https://github.com/smartcontractkit/chainlink/commit/7572a50a78a270188344786937f68233df82f65b) Thanks [@FelixFan1992](https://github.com/FelixFan1992)! - #added pass a gas estimator to registry 2.1 pipeline -- [#13128](https://github.com/smartcontractkit/chainlink/pull/13128) [`a0e7b7cdd6`](https://github.com/smartcontractkit/chainlink/commit/a0e7b7cdd63ecb3f4d8e0ca3f5a4111703760c9b) Thanks [@samsondav](https://github.com/samsondav)! - #internal improve mercury tranmission debugging - - [#13132](https://github.com/smartcontractkit/chainlink/pull/13132) [`eed5668e3c`](https://github.com/smartcontractkit/chainlink/commit/eed5668e3c83cb680d2915f89d097fcb1b74a4f9) Thanks [@akuzni2](https://github.com/akuzni2)! - #nops fix metric description on mercury_transmit_queue_load - [#13084](https://github.com/smartcontractkit/chainlink/pull/13084) [`d79bdf16c5`](https://github.com/smartcontractkit/chainlink/commit/d79bdf16c5129cf7bc7cc5114f92eb07fd3fbf02) Thanks [@austinborn](https://github.com/austinborn)! - #updated Add gethwrappers for operatorforwarder contracts @@ -176,56 +177,20 @@ - [#13133](https://github.com/smartcontractkit/chainlink/pull/13133) [`2e668372ac`](https://github.com/smartcontractkit/chainlink/commit/2e668372ac54e71fd357feba427ffacf0613bda2) Thanks [@matYang](https://github.com/matYang)! - #changed CCIP price cache to use DB timestamp -- [#13380](https://github.com/smartcontractkit/chainlink/pull/13380) [`21c4cde066`](https://github.com/smartcontractkit/chainlink/commit/21c4cde066f3d6a49072ca338c966265b910583e) Thanks [@dimriou](https://github.com/dimriou)! - Removed deprecated evm client code #internal - - [#13096](https://github.com/smartcontractkit/chainlink/pull/13096) [`2c08c8c1a5`](https://github.com/smartcontractkit/chainlink/commit/2c08c8c1a58ea4b7c09b0d5a5ca3b8a677beb9f4) Thanks [@shileiwill](https://github.com/shileiwill)! - add upkeepCharged event #bugfix -- [#13368](https://github.com/smartcontractkit/chainlink/pull/13368) [`000f2cb36b`](https://github.com/smartcontractkit/chainlink/commit/000f2cb36b7d9b6d046d383c85996ae1ae7a606e) Thanks [@cds95](https://github.com/cds95)! - #internal verify that node is not part of a DON when removing - -- [#13202](https://github.com/smartcontractkit/chainlink/pull/13202) [`eb6b50d313`](https://github.com/smartcontractkit/chainlink/commit/eb6b50d31323c324aaa2bf8d1cf465f97a7893fd) Thanks [@bolekk](https://github.com/bolekk)! - #internal [Keystone] EVM encoder support for tuples - - [#13078](https://github.com/smartcontractkit/chainlink/pull/13078) [`0917394a46`](https://github.com/smartcontractkit/chainlink/commit/0917394a4625c3e97b17e348dd473199a15402bf) Thanks [@finleydecker](https://github.com/finleydecker)! - bumpThreshold config setting for chains using suggestPrice estimator #updated -- [#13368](https://github.com/smartcontractkit/chainlink/pull/13368) [`000f2cb36b`](https://github.com/smartcontractkit/chainlink/commit/000f2cb36b7d9b6d046d383c85996ae1ae7a606e) Thanks [@cds95](https://github.com/cds95)! - #internal remove tracking deprecated arrays - -- [#13368](https://github.com/smartcontractkit/chainlink/pull/13368) [`000f2cb36b`](https://github.com/smartcontractkit/chainlink/commit/000f2cb36b7d9b6d046d383c85996ae1ae7a606e) Thanks [@cds95](https://github.com/cds95)! - #internal capability registry internal review - - [#13336](https://github.com/smartcontractkit/chainlink/pull/13336) [`4c7e5a0efa`](https://github.com/smartcontractkit/chainlink/commit/4c7e5a0efa90aed5d5454b5a68753076eea67f55) Thanks [@dhaidashenko](https://github.com/dhaidashenko)! - Added config option `HeadTracker.FinalityTagBypass` to force `HeadTracker` to track blocks up to `FinalityDepth` even if `FinalityTagsEnabled = true`. This option is a temporary measure to address high CPU usage on chains with extremely large actual finality depth (gap between the current head and the latest finalized block). #added Added config option `HeadTracker.MaxAllowedFinalityDepth` maximum gap between current head to the latest finalized block that `HeadTracker` considers healthy. #added -- [#13368](https://github.com/smartcontractkit/chainlink/pull/13368) [`000f2cb36b`](https://github.com/smartcontractkit/chainlink/commit/000f2cb36b7d9b6d046d383c85996ae1ae7a606e) Thanks [@cds95](https://github.com/cds95)! - #internal internal-review-fixes-for-capability-registry - -- [#13199](https://github.com/smartcontractkit/chainlink/pull/13199) [`4f502c9fd0`](https://github.com/smartcontractkit/chainlink/commit/4f502c9fd0fea458647bb345f5c0da995f3b6cb1) Thanks [@bolekk](https://github.com/bolekk)! - #internal Use Aggregator factory for OCR capability - - [#13263](https://github.com/smartcontractkit/chainlink/pull/13263) [`14ec6c4a91`](https://github.com/smartcontractkit/chainlink/commit/14ec6c4a912eeb65753703c363d1e90cbcf88328) Thanks [@shileiwill](https://github.com/shileiwill)! - tune debugging script #bugfix - [#13088](https://github.com/smartcontractkit/chainlink/pull/13088) [`29b16360fb`](https://github.com/smartcontractkit/chainlink/commit/29b16360fb41e4372f72fe744aaf3ee8234a9b67) Thanks [@shileiwill](https://github.com/shileiwill)! - get available erc20 for payment #bugfix - [#13165](https://github.com/smartcontractkit/chainlink/pull/13165) [`143741012c`](https://github.com/smartcontractkit/chainlink/commit/143741012c4d0b148ada9d5aa237ff932cd3005b) Thanks [@cedric-cordenier](https://github.com/cedric-cordenier)! - #db_update Add ON DELETE CASCADE to workflow tables -- [#13103](https://github.com/smartcontractkit/chainlink/pull/13103) [`54f7c9c8f5`](https://github.com/smartcontractkit/chainlink/commit/54f7c9c8f5508d0d0a063eb435404b4164723300) Thanks [@DeividasK](https://github.com/DeividasK)! - #internal regen geth wrappers for capability registry - -- [#13112](https://github.com/smartcontractkit/chainlink/pull/13112) [`80590662bd`](https://github.com/smartcontractkit/chainlink/commit/80590662bd9956d3c93449ca4703a2430e0613b7) Thanks [@HenryNguyen5](https://github.com/HenryNguyen5)! - #internal Normalize keystone workflow ref regex property to match id regex - -- [#13183](https://github.com/smartcontractkit/chainlink/pull/13183) [`96304756a7`](https://github.com/smartcontractkit/chainlink/commit/96304756a77cdb2acf251d21d59b6aa8b55bf61a) Thanks [@cds95](https://github.com/cds95)! - #internal track config count in DON struct - -- [#13102](https://github.com/smartcontractkit/chainlink/pull/13102) [`700a827194`](https://github.com/smartcontractkit/chainlink/commit/700a82719451611381ab5dbb94fe00547660440b) Thanks [@cds95](https://github.com/cds95)! - #internal generate geth wrappers for capability registry remove nodes - -- [#13406](https://github.com/smartcontractkit/chainlink/pull/13406) [`a63569c9a3`](https://github.com/smartcontractkit/chainlink/commit/a63569c9a3893a7dc431459e08a4b08bb3a91231) Thanks [@bolekk](https://github.com/bolekk)! - #internal #bugfix Fix target wrapper init problems - -- [#13368](https://github.com/smartcontractkit/chainlink/pull/13368) [`000f2cb36b`](https://github.com/smartcontractkit/chainlink/commit/000f2cb36b7d9b6d046d383c85996ae1ae7a606e) Thanks [@cds95](https://github.com/cds95)! - #internal allow updating capabilities and to add/remove multiple capabilities at once from the capability registry - -- [#13189](https://github.com/smartcontractkit/chainlink/pull/13189) [`1451b2b632`](https://github.com/smartcontractkit/chainlink/commit/1451b2b6321f997c2df2c0b7fd05d6ba1eac30e4) Thanks [@samsondav](https://github.com/samsondav)! - Performance improvements for mercury single insert for multiple mercury servers #internal - -- [#13366](https://github.com/smartcontractkit/chainlink/pull/13366) [`d53d6d08da`](https://github.com/smartcontractkit/chainlink/commit/d53d6d08dac5d3ee27ae89012669c6c2455295c8) Thanks [@bolekk](https://github.com/bolekk)! - #internal keystone report context - -- [#13389](https://github.com/smartcontractkit/chainlink/pull/13389) [`3959091d4f`](https://github.com/smartcontractkit/chainlink/commit/3959091d4f3925b64cb6b0b55b7f7c72a4f924b9) Thanks [@bolekk](https://github.com/bolekk)! - #internal Update metadata passed to Forwarder and Receiver - -- [#13183](https://github.com/smartcontractkit/chainlink/pull/13183) [`96304756a7`](https://github.com/smartcontractkit/chainlink/commit/96304756a77cdb2acf251d21d59b6aa8b55bf61a) Thanks [@cds95](https://github.com/cds95)! - #internal update node signer type - -- [#13368](https://github.com/smartcontractkit/chainlink/pull/13368) [`000f2cb36b`](https://github.com/smartcontractkit/chainlink/commit/000f2cb36b7d9b6d046d383c85996ae1ae7a606e) Thanks [@cds95](https://github.com/cds95)! - #internal update uint256 to uint32 for donId declaration in capability config interface - - [#12952](https://github.com/smartcontractkit/chainlink/pull/12952) [`7572a50a78`](https://github.com/smartcontractkit/chainlink/commit/7572a50a78a270188344786937f68233df82f65b) Thanks [@FelixFan1992](https://github.com/FelixFan1992)! - #added an integration test for max gas price check - [#13272](https://github.com/smartcontractkit/chainlink/pull/13272) [`c7a6356f49`](https://github.com/smartcontractkit/chainlink/commit/c7a6356f4903e919964ca91493f18e0ebf4eb08b) Thanks [@friedemannf](https://github.com/friedemannf)! - #bugfix allow ChainType to be set to xdai diff --git a/GNUmakefile b/GNUmakefile index b09e0ee3cc7..3cba1738d5d 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -95,6 +95,11 @@ generate: abigen codecgen mockery protoc ## Execute all go:generate commands. cd ./integration-tests && go generate -x ./... cd ./integration-tests/load && go generate -x ./... cd ./dashboard-lib && go generate -x ./... + mockery + +.PHONY: rm-mocked +rm-mocked: + grep -rl "^// Code generated by mockery" | grep .go$ | xargs -r rm .PHONY: testscripts testscripts: chainlink-test ## Install and run testscript against testdata/scripts/* files. @@ -114,7 +119,11 @@ setup-testdb: ## Setup the test database. testdb: ## Prepares the test database. go run . local db preparetest -.PHONY: testdb +.PHONY: testdb-force +testdb-force: ## Prepares the test database, drops any pesky user connections that stand in the the way. + go run . local db preparetest --force + +.PHONY: testdb-user-only testdb-user-only: ## Prepares the test database with user only. go run . local db preparetest --user-only @@ -131,7 +140,7 @@ gomods: ## Install gomods .PHONY: mockery mockery: $(mockery) ## Install mockery. - go install github.com/vektra/mockery/v2@v2.42.2 + go install github.com/vektra/mockery/v2@v2.43.2 .PHONY: codecgen codecgen: $(codecgen) ## Install codecgen @@ -141,6 +150,7 @@ codecgen: $(codecgen) ## Install codecgen protoc: ## Install protoc core/scripts/install-protoc.sh 25.1 / go install google.golang.org/protobuf/cmd/protoc-gen-go@`go list -m -json google.golang.org/protobuf | jq -r .Version` + go install github.com/smartcontractkit/wsrpc/cmd/protoc-gen-go-wsrpc@`go list -m -json github.com/smartcontractkit/wsrpc | jq -r .Version` .PHONY: telemetry-protobuf telemetry-protobuf: $(telemetry-protobuf) ## Generate telemetry protocol buffers. @@ -175,6 +185,10 @@ goreleaser-dev-release: ## run goreleaser snapshot release modgraph: ./tools/bin/modgraph > go.md +.PHONY: test-short +test-short: ## Run 'go test -short' and suppress uninteresting output + go test -short ./... | grep -v "[no test files]" | grep -v "\(cached\)" + help: @echo "" @echo " .__ .__ .__ .__ __" diff --git a/README.md b/README.md index 6d246a6c461..58e6516f4ca 100644 --- a/README.md +++ b/README.md @@ -32,9 +32,9 @@ regarding Chainlink social accounts, news, and networking. ## Build Chainlink -1. [Install Go 1.21](https://golang.org/doc/install), and add your GOPATH's [bin directory to your PATH](https://golang.org/doc/code.html#GOPATH) +1. [Install Go 1.22](https://golang.org/doc/install), and add your GOPATH's [bin directory to your PATH](https://golang.org/doc/code.html#GOPATH) - Example Path for macOS `export PATH=$GOPATH/bin:$PATH` & `export GOPATH=/Users/$USER/go` -2. Install [NodeJS v20](https://nodejs.org/en/download/package-manager/) & [pnpm v8 via npm](https://pnpm.io/installation#using-npm). +2. Install [NodeJS v20](https://nodejs.org/en/download/package-manager/) & [pnpm v9 via npm](https://pnpm.io/installation#using-npm). - It might be easier long term to use [nvm](https://nodejs.org/en/download/package-manager/#nvm) to switch between node versions for different projects. For example, assuming $NODE_VERSION was set to a valid version of NodeJS, you could run: `nvm install $NODE_VERSION && nvm use $NODE_VERSION` 3. Install [Postgres (>= 12.x)](https://wiki.postgresql.org/wiki/Detailed_installation_guides). It is recommended to run the latest major version of postgres. - Note if you are running the official Chainlink docker image, the highest supported Postgres version is 16.x due to the bundled client. @@ -136,7 +136,7 @@ For more information on creating and using external adapters, please see our [ex ### Running tests -1. [Install pnpm via npm](https://pnpm.io/installation#using-npm) +1. [Install pnpm 9 via npm](https://pnpm.io/installation#using-npm) 2. Install [gencodec](https://github.com/fjl/gencodec) and [jq](https://stedolan.github.io/jq/download/) to be able to run `go generate ./...` and `make abigen` @@ -158,7 +158,7 @@ popd 4. Generate and compile static assets: ```bash -go generate ./... +make generate ``` 5. Prepare your development environment: @@ -185,6 +185,14 @@ source .dbenv make testdb ``` +If you encounter the error `database accessed by other users (SQLSTATE 55006) exit status 1` +and you want force the database creation then use +``` +source .dbenv +make testdb-force +``` + + 7. Run tests: ```bash diff --git a/common/client/ctx.go b/common/client/ctx.go new file mode 100644 index 00000000000..57b2fc8a866 --- /dev/null +++ b/common/client/ctx.go @@ -0,0 +1,17 @@ +package client + +import "context" + +type multiNodeContextKey int + +const ( + contextKeyHeathCheckRequest multiNodeContextKey = iota + 1 +) + +func CtxAddHealthCheckFlag(ctx context.Context) context.Context { + return context.WithValue(ctx, contextKeyHeathCheckRequest, struct{}{}) +} + +func CtxIsHeathCheckRequest(ctx context.Context) bool { + return ctx.Value(contextKeyHeathCheckRequest) != nil +} diff --git a/common/client/ctx_test.go b/common/client/ctx_test.go new file mode 100644 index 00000000000..822b36c3f81 --- /dev/null +++ b/common/client/ctx_test.go @@ -0,0 +1,16 @@ +package client + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" +) + +func TestContext(t *testing.T) { + ctx := tests.Context(t) + assert.False(t, CtxIsHeathCheckRequest(ctx), "expected false for test context") + ctx = CtxAddHealthCheckFlag(ctx) + assert.True(t, CtxIsHeathCheckRequest(ctx), "expected context to contain the healthcheck flag") +} diff --git a/common/client/mock_head_test.go b/common/client/mock_head_test.go index 9a66e164aa0..cd3fda8b8e0 100644 --- a/common/client/mock_head_test.go +++ b/common/client/mock_head_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package client @@ -13,6 +13,14 @@ type mockHead struct { mock.Mock } +type mockHead_Expecter struct { + mock *mock.Mock +} + +func (_m *mockHead) EXPECT() *mockHead_Expecter { + return &mockHead_Expecter{mock: &_m.Mock} +} + // BlockDifficulty provides a mock function with given fields: func (_m *mockHead) BlockDifficulty() *big.Int { ret := _m.Called() @@ -33,6 +41,33 @@ func (_m *mockHead) BlockDifficulty() *big.Int { return r0 } +// mockHead_BlockDifficulty_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockDifficulty' +type mockHead_BlockDifficulty_Call struct { + *mock.Call +} + +// BlockDifficulty is a helper method to define mock.On call +func (_e *mockHead_Expecter) BlockDifficulty() *mockHead_BlockDifficulty_Call { + return &mockHead_BlockDifficulty_Call{Call: _e.mock.On("BlockDifficulty")} +} + +func (_c *mockHead_BlockDifficulty_Call) Run(run func()) *mockHead_BlockDifficulty_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockHead_BlockDifficulty_Call) Return(_a0 *big.Int) *mockHead_BlockDifficulty_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockHead_BlockDifficulty_Call) RunAndReturn(run func() *big.Int) *mockHead_BlockDifficulty_Call { + _c.Call.Return(run) + return _c +} + // BlockNumber provides a mock function with given fields: func (_m *mockHead) BlockNumber() int64 { ret := _m.Called() @@ -51,6 +86,33 @@ func (_m *mockHead) BlockNumber() int64 { return r0 } +// mockHead_BlockNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockNumber' +type mockHead_BlockNumber_Call struct { + *mock.Call +} + +// BlockNumber is a helper method to define mock.On call +func (_e *mockHead_Expecter) BlockNumber() *mockHead_BlockNumber_Call { + return &mockHead_BlockNumber_Call{Call: _e.mock.On("BlockNumber")} +} + +func (_c *mockHead_BlockNumber_Call) Run(run func()) *mockHead_BlockNumber_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockHead_BlockNumber_Call) Return(_a0 int64) *mockHead_BlockNumber_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockHead_BlockNumber_Call) RunAndReturn(run func() int64) *mockHead_BlockNumber_Call { + _c.Call.Return(run) + return _c +} + // IsValid provides a mock function with given fields: func (_m *mockHead) IsValid() bool { ret := _m.Called() @@ -69,6 +131,33 @@ func (_m *mockHead) IsValid() bool { return r0 } +// mockHead_IsValid_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsValid' +type mockHead_IsValid_Call struct { + *mock.Call +} + +// IsValid is a helper method to define mock.On call +func (_e *mockHead_Expecter) IsValid() *mockHead_IsValid_Call { + return &mockHead_IsValid_Call{Call: _e.mock.On("IsValid")} +} + +func (_c *mockHead_IsValid_Call) Run(run func()) *mockHead_IsValid_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockHead_IsValid_Call) Return(_a0 bool) *mockHead_IsValid_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockHead_IsValid_Call) RunAndReturn(run func() bool) *mockHead_IsValid_Call { + _c.Call.Return(run) + return _c +} + // newMockHead creates a new instance of mockHead. 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 newMockHead(t interface { diff --git a/common/client/mock_node_client_test.go b/common/client/mock_node_client_test.go index ec83158a5ff..5b7abe82121 100644 --- a/common/client/mock_node_client_test.go +++ b/common/client/mock_node_client_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package client @@ -14,6 +14,14 @@ type mockNodeClient[CHAIN_ID types.ID, HEAD Head] struct { mock.Mock } +type mockNodeClient_Expecter[CHAIN_ID types.ID, HEAD Head] struct { + mock *mock.Mock +} + +func (_m *mockNodeClient[CHAIN_ID, HEAD]) EXPECT() *mockNodeClient_Expecter[CHAIN_ID, HEAD] { + return &mockNodeClient_Expecter[CHAIN_ID, HEAD]{mock: &_m.Mock} +} + // ChainID provides a mock function with given fields: ctx func (_m *mockNodeClient[CHAIN_ID, HEAD]) ChainID(ctx context.Context) (CHAIN_ID, error) { ret := _m.Called(ctx) @@ -42,6 +50,34 @@ func (_m *mockNodeClient[CHAIN_ID, HEAD]) ChainID(ctx context.Context) (CHAIN_ID return r0, r1 } +// mockNodeClient_ChainID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChainID' +type mockNodeClient_ChainID_Call[CHAIN_ID types.ID, HEAD Head] struct { + *mock.Call +} + +// ChainID is a helper method to define mock.On call +// - ctx context.Context +func (_e *mockNodeClient_Expecter[CHAIN_ID, HEAD]) ChainID(ctx interface{}) *mockNodeClient_ChainID_Call[CHAIN_ID, HEAD] { + return &mockNodeClient_ChainID_Call[CHAIN_ID, HEAD]{Call: _e.mock.On("ChainID", ctx)} +} + +func (_c *mockNodeClient_ChainID_Call[CHAIN_ID, HEAD]) Run(run func(ctx context.Context)) *mockNodeClient_ChainID_Call[CHAIN_ID, HEAD] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *mockNodeClient_ChainID_Call[CHAIN_ID, HEAD]) Return(_a0 CHAIN_ID, _a1 error) *mockNodeClient_ChainID_Call[CHAIN_ID, HEAD] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockNodeClient_ChainID_Call[CHAIN_ID, HEAD]) RunAndReturn(run func(context.Context) (CHAIN_ID, error)) *mockNodeClient_ChainID_Call[CHAIN_ID, HEAD] { + _c.Call.Return(run) + return _c +} + // ClientVersion provides a mock function with given fields: _a0 func (_m *mockNodeClient[CHAIN_ID, HEAD]) ClientVersion(_a0 context.Context) (string, error) { ret := _m.Called(_a0) @@ -70,11 +106,66 @@ func (_m *mockNodeClient[CHAIN_ID, HEAD]) ClientVersion(_a0 context.Context) (st return r0, r1 } +// mockNodeClient_ClientVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClientVersion' +type mockNodeClient_ClientVersion_Call[CHAIN_ID types.ID, HEAD Head] struct { + *mock.Call +} + +// ClientVersion is a helper method to define mock.On call +// - _a0 context.Context +func (_e *mockNodeClient_Expecter[CHAIN_ID, HEAD]) ClientVersion(_a0 interface{}) *mockNodeClient_ClientVersion_Call[CHAIN_ID, HEAD] { + return &mockNodeClient_ClientVersion_Call[CHAIN_ID, HEAD]{Call: _e.mock.On("ClientVersion", _a0)} +} + +func (_c *mockNodeClient_ClientVersion_Call[CHAIN_ID, HEAD]) Run(run func(_a0 context.Context)) *mockNodeClient_ClientVersion_Call[CHAIN_ID, HEAD] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *mockNodeClient_ClientVersion_Call[CHAIN_ID, HEAD]) Return(_a0 string, _a1 error) *mockNodeClient_ClientVersion_Call[CHAIN_ID, HEAD] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockNodeClient_ClientVersion_Call[CHAIN_ID, HEAD]) RunAndReturn(run func(context.Context) (string, error)) *mockNodeClient_ClientVersion_Call[CHAIN_ID, HEAD] { + _c.Call.Return(run) + return _c +} + // Close provides a mock function with given fields: func (_m *mockNodeClient[CHAIN_ID, HEAD]) Close() { _m.Called() } +// mockNodeClient_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type mockNodeClient_Close_Call[CHAIN_ID types.ID, HEAD Head] struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *mockNodeClient_Expecter[CHAIN_ID, HEAD]) Close() *mockNodeClient_Close_Call[CHAIN_ID, HEAD] { + return &mockNodeClient_Close_Call[CHAIN_ID, HEAD]{Call: _e.mock.On("Close")} +} + +func (_c *mockNodeClient_Close_Call[CHAIN_ID, HEAD]) Run(run func()) *mockNodeClient_Close_Call[CHAIN_ID, HEAD] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockNodeClient_Close_Call[CHAIN_ID, HEAD]) Return() *mockNodeClient_Close_Call[CHAIN_ID, HEAD] { + _c.Call.Return() + return _c +} + +func (_c *mockNodeClient_Close_Call[CHAIN_ID, HEAD]) RunAndReturn(run func()) *mockNodeClient_Close_Call[CHAIN_ID, HEAD] { + _c.Call.Return(run) + return _c +} + // Dial provides a mock function with given fields: ctx func (_m *mockNodeClient[CHAIN_ID, HEAD]) Dial(ctx context.Context) error { ret := _m.Called(ctx) @@ -93,6 +184,34 @@ func (_m *mockNodeClient[CHAIN_ID, HEAD]) Dial(ctx context.Context) error { return r0 } +// mockNodeClient_Dial_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Dial' +type mockNodeClient_Dial_Call[CHAIN_ID types.ID, HEAD Head] struct { + *mock.Call +} + +// Dial is a helper method to define mock.On call +// - ctx context.Context +func (_e *mockNodeClient_Expecter[CHAIN_ID, HEAD]) Dial(ctx interface{}) *mockNodeClient_Dial_Call[CHAIN_ID, HEAD] { + return &mockNodeClient_Dial_Call[CHAIN_ID, HEAD]{Call: _e.mock.On("Dial", ctx)} +} + +func (_c *mockNodeClient_Dial_Call[CHAIN_ID, HEAD]) Run(run func(ctx context.Context)) *mockNodeClient_Dial_Call[CHAIN_ID, HEAD] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *mockNodeClient_Dial_Call[CHAIN_ID, HEAD]) Return(_a0 error) *mockNodeClient_Dial_Call[CHAIN_ID, HEAD] { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockNodeClient_Dial_Call[CHAIN_ID, HEAD]) RunAndReturn(run func(context.Context) error) *mockNodeClient_Dial_Call[CHAIN_ID, HEAD] { + _c.Call.Return(run) + return _c +} + // DialHTTP provides a mock function with given fields: func (_m *mockNodeClient[CHAIN_ID, HEAD]) DialHTTP() error { ret := _m.Called() @@ -111,11 +230,120 @@ func (_m *mockNodeClient[CHAIN_ID, HEAD]) DialHTTP() error { return r0 } +// mockNodeClient_DialHTTP_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DialHTTP' +type mockNodeClient_DialHTTP_Call[CHAIN_ID types.ID, HEAD Head] struct { + *mock.Call +} + +// DialHTTP is a helper method to define mock.On call +func (_e *mockNodeClient_Expecter[CHAIN_ID, HEAD]) DialHTTP() *mockNodeClient_DialHTTP_Call[CHAIN_ID, HEAD] { + return &mockNodeClient_DialHTTP_Call[CHAIN_ID, HEAD]{Call: _e.mock.On("DialHTTP")} +} + +func (_c *mockNodeClient_DialHTTP_Call[CHAIN_ID, HEAD]) Run(run func()) *mockNodeClient_DialHTTP_Call[CHAIN_ID, HEAD] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockNodeClient_DialHTTP_Call[CHAIN_ID, HEAD]) Return(_a0 error) *mockNodeClient_DialHTTP_Call[CHAIN_ID, HEAD] { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockNodeClient_DialHTTP_Call[CHAIN_ID, HEAD]) RunAndReturn(run func() error) *mockNodeClient_DialHTTP_Call[CHAIN_ID, HEAD] { + _c.Call.Return(run) + return _c +} + // DisconnectAll provides a mock function with given fields: func (_m *mockNodeClient[CHAIN_ID, HEAD]) DisconnectAll() { _m.Called() } +// mockNodeClient_DisconnectAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DisconnectAll' +type mockNodeClient_DisconnectAll_Call[CHAIN_ID types.ID, HEAD Head] struct { + *mock.Call +} + +// DisconnectAll is a helper method to define mock.On call +func (_e *mockNodeClient_Expecter[CHAIN_ID, HEAD]) DisconnectAll() *mockNodeClient_DisconnectAll_Call[CHAIN_ID, HEAD] { + return &mockNodeClient_DisconnectAll_Call[CHAIN_ID, HEAD]{Call: _e.mock.On("DisconnectAll")} +} + +func (_c *mockNodeClient_DisconnectAll_Call[CHAIN_ID, HEAD]) Run(run func()) *mockNodeClient_DisconnectAll_Call[CHAIN_ID, HEAD] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockNodeClient_DisconnectAll_Call[CHAIN_ID, HEAD]) Return() *mockNodeClient_DisconnectAll_Call[CHAIN_ID, HEAD] { + _c.Call.Return() + return _c +} + +func (_c *mockNodeClient_DisconnectAll_Call[CHAIN_ID, HEAD]) RunAndReturn(run func()) *mockNodeClient_DisconnectAll_Call[CHAIN_ID, HEAD] { + _c.Call.Return(run) + return _c +} + +// GetInterceptedChainInfo provides a mock function with given fields: +func (_m *mockNodeClient[CHAIN_ID, HEAD]) GetInterceptedChainInfo() (ChainInfo, ChainInfo) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetInterceptedChainInfo") + } + + var r0 ChainInfo + var r1 ChainInfo + if rf, ok := ret.Get(0).(func() (ChainInfo, ChainInfo)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() ChainInfo); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(ChainInfo) + } + + if rf, ok := ret.Get(1).(func() ChainInfo); ok { + r1 = rf() + } else { + r1 = ret.Get(1).(ChainInfo) + } + + return r0, r1 +} + +// mockNodeClient_GetInterceptedChainInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetInterceptedChainInfo' +type mockNodeClient_GetInterceptedChainInfo_Call[CHAIN_ID types.ID, HEAD Head] struct { + *mock.Call +} + +// GetInterceptedChainInfo is a helper method to define mock.On call +func (_e *mockNodeClient_Expecter[CHAIN_ID, HEAD]) GetInterceptedChainInfo() *mockNodeClient_GetInterceptedChainInfo_Call[CHAIN_ID, HEAD] { + return &mockNodeClient_GetInterceptedChainInfo_Call[CHAIN_ID, HEAD]{Call: _e.mock.On("GetInterceptedChainInfo")} +} + +func (_c *mockNodeClient_GetInterceptedChainInfo_Call[CHAIN_ID, HEAD]) Run(run func()) *mockNodeClient_GetInterceptedChainInfo_Call[CHAIN_ID, HEAD] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockNodeClient_GetInterceptedChainInfo_Call[CHAIN_ID, HEAD]) Return(latest ChainInfo, highestUserObservations ChainInfo) *mockNodeClient_GetInterceptedChainInfo_Call[CHAIN_ID, HEAD] { + _c.Call.Return(latest, highestUserObservations) + return _c +} + +func (_c *mockNodeClient_GetInterceptedChainInfo_Call[CHAIN_ID, HEAD]) RunAndReturn(run func() (ChainInfo, ChainInfo)) *mockNodeClient_GetInterceptedChainInfo_Call[CHAIN_ID, HEAD] { + _c.Call.Return(run) + return _c +} + // IsSyncing provides a mock function with given fields: ctx func (_m *mockNodeClient[CHAIN_ID, HEAD]) IsSyncing(ctx context.Context) (bool, error) { ret := _m.Called(ctx) @@ -144,6 +372,34 @@ func (_m *mockNodeClient[CHAIN_ID, HEAD]) IsSyncing(ctx context.Context) (bool, return r0, r1 } +// mockNodeClient_IsSyncing_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsSyncing' +type mockNodeClient_IsSyncing_Call[CHAIN_ID types.ID, HEAD Head] struct { + *mock.Call +} + +// IsSyncing is a helper method to define mock.On call +// - ctx context.Context +func (_e *mockNodeClient_Expecter[CHAIN_ID, HEAD]) IsSyncing(ctx interface{}) *mockNodeClient_IsSyncing_Call[CHAIN_ID, HEAD] { + return &mockNodeClient_IsSyncing_Call[CHAIN_ID, HEAD]{Call: _e.mock.On("IsSyncing", ctx)} +} + +func (_c *mockNodeClient_IsSyncing_Call[CHAIN_ID, HEAD]) Run(run func(ctx context.Context)) *mockNodeClient_IsSyncing_Call[CHAIN_ID, HEAD] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *mockNodeClient_IsSyncing_Call[CHAIN_ID, HEAD]) Return(_a0 bool, _a1 error) *mockNodeClient_IsSyncing_Call[CHAIN_ID, HEAD] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockNodeClient_IsSyncing_Call[CHAIN_ID, HEAD]) RunAndReturn(run func(context.Context) (bool, error)) *mockNodeClient_IsSyncing_Call[CHAIN_ID, HEAD] { + _c.Call.Return(run) + return _c +} + // LatestFinalizedBlock provides a mock function with given fields: ctx func (_m *mockNodeClient[CHAIN_ID, HEAD]) LatestFinalizedBlock(ctx context.Context) (HEAD, error) { ret := _m.Called(ctx) @@ -172,37 +428,90 @@ func (_m *mockNodeClient[CHAIN_ID, HEAD]) LatestFinalizedBlock(ctx context.Conte return r0, r1 } +// mockNodeClient_LatestFinalizedBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LatestFinalizedBlock' +type mockNodeClient_LatestFinalizedBlock_Call[CHAIN_ID types.ID, HEAD Head] struct { + *mock.Call +} + +// LatestFinalizedBlock is a helper method to define mock.On call +// - ctx context.Context +func (_e *mockNodeClient_Expecter[CHAIN_ID, HEAD]) LatestFinalizedBlock(ctx interface{}) *mockNodeClient_LatestFinalizedBlock_Call[CHAIN_ID, HEAD] { + return &mockNodeClient_LatestFinalizedBlock_Call[CHAIN_ID, HEAD]{Call: _e.mock.On("LatestFinalizedBlock", ctx)} +} + +func (_c *mockNodeClient_LatestFinalizedBlock_Call[CHAIN_ID, HEAD]) Run(run func(ctx context.Context)) *mockNodeClient_LatestFinalizedBlock_Call[CHAIN_ID, HEAD] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *mockNodeClient_LatestFinalizedBlock_Call[CHAIN_ID, HEAD]) Return(_a0 HEAD, _a1 error) *mockNodeClient_LatestFinalizedBlock_Call[CHAIN_ID, HEAD] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockNodeClient_LatestFinalizedBlock_Call[CHAIN_ID, HEAD]) RunAndReturn(run func(context.Context) (HEAD, error)) *mockNodeClient_LatestFinalizedBlock_Call[CHAIN_ID, HEAD] { + _c.Call.Return(run) + return _c +} + // SetAliveLoopSub provides a mock function with given fields: _a0 func (_m *mockNodeClient[CHAIN_ID, HEAD]) SetAliveLoopSub(_a0 types.Subscription) { _m.Called(_a0) } -// Subscribe provides a mock function with given fields: ctx, channel, args -func (_m *mockNodeClient[CHAIN_ID, HEAD]) Subscribe(ctx context.Context, channel chan<- HEAD, args ...interface{}) (types.Subscription, error) { - var _ca []interface{} - _ca = append(_ca, ctx, channel) - _ca = append(_ca, args...) - ret := _m.Called(_ca...) +// mockNodeClient_SetAliveLoopSub_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetAliveLoopSub' +type mockNodeClient_SetAliveLoopSub_Call[CHAIN_ID types.ID, HEAD Head] struct { + *mock.Call +} + +// SetAliveLoopSub is a helper method to define mock.On call +// - _a0 types.Subscription +func (_e *mockNodeClient_Expecter[CHAIN_ID, HEAD]) SetAliveLoopSub(_a0 interface{}) *mockNodeClient_SetAliveLoopSub_Call[CHAIN_ID, HEAD] { + return &mockNodeClient_SetAliveLoopSub_Call[CHAIN_ID, HEAD]{Call: _e.mock.On("SetAliveLoopSub", _a0)} +} + +func (_c *mockNodeClient_SetAliveLoopSub_Call[CHAIN_ID, HEAD]) Run(run func(_a0 types.Subscription)) *mockNodeClient_SetAliveLoopSub_Call[CHAIN_ID, HEAD] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Subscription)) + }) + return _c +} + +func (_c *mockNodeClient_SetAliveLoopSub_Call[CHAIN_ID, HEAD]) Return() *mockNodeClient_SetAliveLoopSub_Call[CHAIN_ID, HEAD] { + _c.Call.Return() + return _c +} + +func (_c *mockNodeClient_SetAliveLoopSub_Call[CHAIN_ID, HEAD]) RunAndReturn(run func(types.Subscription)) *mockNodeClient_SetAliveLoopSub_Call[CHAIN_ID, HEAD] { + _c.Call.Return(run) + return _c +} + +// SubscribeNewHead provides a mock function with given fields: ctx, channel +func (_m *mockNodeClient[CHAIN_ID, HEAD]) SubscribeNewHead(ctx context.Context, channel chan<- HEAD) (types.Subscription, error) { + ret := _m.Called(ctx, channel) if len(ret) == 0 { - panic("no return value specified for Subscribe") + panic("no return value specified for SubscribeNewHead") } var r0 types.Subscription var r1 error - if rf, ok := ret.Get(0).(func(context.Context, chan<- HEAD, ...interface{}) (types.Subscription, error)); ok { - return rf(ctx, channel, args...) + if rf, ok := ret.Get(0).(func(context.Context, chan<- HEAD) (types.Subscription, error)); ok { + return rf(ctx, channel) } - if rf, ok := ret.Get(0).(func(context.Context, chan<- HEAD, ...interface{}) types.Subscription); ok { - r0 = rf(ctx, channel, args...) + if rf, ok := ret.Get(0).(func(context.Context, chan<- HEAD) types.Subscription); ok { + r0 = rf(ctx, channel) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(types.Subscription) } } - if rf, ok := ret.Get(1).(func(context.Context, chan<- HEAD, ...interface{}) error); ok { - r1 = rf(ctx, channel, args...) + if rf, ok := ret.Get(1).(func(context.Context, chan<- HEAD) error); ok { + r1 = rf(ctx, channel) } else { r1 = ret.Error(1) } @@ -210,6 +519,35 @@ func (_m *mockNodeClient[CHAIN_ID, HEAD]) Subscribe(ctx context.Context, channel return r0, r1 } +// mockNodeClient_SubscribeNewHead_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SubscribeNewHead' +type mockNodeClient_SubscribeNewHead_Call[CHAIN_ID types.ID, HEAD Head] struct { + *mock.Call +} + +// SubscribeNewHead is a helper method to define mock.On call +// - ctx context.Context +// - channel chan<- HEAD +func (_e *mockNodeClient_Expecter[CHAIN_ID, HEAD]) SubscribeNewHead(ctx interface{}, channel interface{}) *mockNodeClient_SubscribeNewHead_Call[CHAIN_ID, HEAD] { + return &mockNodeClient_SubscribeNewHead_Call[CHAIN_ID, HEAD]{Call: _e.mock.On("SubscribeNewHead", ctx, channel)} +} + +func (_c *mockNodeClient_SubscribeNewHead_Call[CHAIN_ID, HEAD]) Run(run func(ctx context.Context, channel chan<- HEAD)) *mockNodeClient_SubscribeNewHead_Call[CHAIN_ID, HEAD] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(chan<- HEAD)) + }) + return _c +} + +func (_c *mockNodeClient_SubscribeNewHead_Call[CHAIN_ID, HEAD]) Return(_a0 types.Subscription, _a1 error) *mockNodeClient_SubscribeNewHead_Call[CHAIN_ID, HEAD] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockNodeClient_SubscribeNewHead_Call[CHAIN_ID, HEAD]) RunAndReturn(run func(context.Context, chan<- HEAD) (types.Subscription, error)) *mockNodeClient_SubscribeNewHead_Call[CHAIN_ID, HEAD] { + _c.Call.Return(run) + return _c +} + // SubscribersCount provides a mock function with given fields: func (_m *mockNodeClient[CHAIN_ID, HEAD]) SubscribersCount() int32 { ret := _m.Called() @@ -228,11 +566,65 @@ func (_m *mockNodeClient[CHAIN_ID, HEAD]) SubscribersCount() int32 { return r0 } +// mockNodeClient_SubscribersCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SubscribersCount' +type mockNodeClient_SubscribersCount_Call[CHAIN_ID types.ID, HEAD Head] struct { + *mock.Call +} + +// SubscribersCount is a helper method to define mock.On call +func (_e *mockNodeClient_Expecter[CHAIN_ID, HEAD]) SubscribersCount() *mockNodeClient_SubscribersCount_Call[CHAIN_ID, HEAD] { + return &mockNodeClient_SubscribersCount_Call[CHAIN_ID, HEAD]{Call: _e.mock.On("SubscribersCount")} +} + +func (_c *mockNodeClient_SubscribersCount_Call[CHAIN_ID, HEAD]) Run(run func()) *mockNodeClient_SubscribersCount_Call[CHAIN_ID, HEAD] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockNodeClient_SubscribersCount_Call[CHAIN_ID, HEAD]) Return(_a0 int32) *mockNodeClient_SubscribersCount_Call[CHAIN_ID, HEAD] { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockNodeClient_SubscribersCount_Call[CHAIN_ID, HEAD]) RunAndReturn(run func() int32) *mockNodeClient_SubscribersCount_Call[CHAIN_ID, HEAD] { + _c.Call.Return(run) + return _c +} + // UnsubscribeAllExceptAliveLoop provides a mock function with given fields: func (_m *mockNodeClient[CHAIN_ID, HEAD]) UnsubscribeAllExceptAliveLoop() { _m.Called() } +// mockNodeClient_UnsubscribeAllExceptAliveLoop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnsubscribeAllExceptAliveLoop' +type mockNodeClient_UnsubscribeAllExceptAliveLoop_Call[CHAIN_ID types.ID, HEAD Head] struct { + *mock.Call +} + +// UnsubscribeAllExceptAliveLoop is a helper method to define mock.On call +func (_e *mockNodeClient_Expecter[CHAIN_ID, HEAD]) UnsubscribeAllExceptAliveLoop() *mockNodeClient_UnsubscribeAllExceptAliveLoop_Call[CHAIN_ID, HEAD] { + return &mockNodeClient_UnsubscribeAllExceptAliveLoop_Call[CHAIN_ID, HEAD]{Call: _e.mock.On("UnsubscribeAllExceptAliveLoop")} +} + +func (_c *mockNodeClient_UnsubscribeAllExceptAliveLoop_Call[CHAIN_ID, HEAD]) Run(run func()) *mockNodeClient_UnsubscribeAllExceptAliveLoop_Call[CHAIN_ID, HEAD] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockNodeClient_UnsubscribeAllExceptAliveLoop_Call[CHAIN_ID, HEAD]) Return() *mockNodeClient_UnsubscribeAllExceptAliveLoop_Call[CHAIN_ID, HEAD] { + _c.Call.Return() + return _c +} + +func (_c *mockNodeClient_UnsubscribeAllExceptAliveLoop_Call[CHAIN_ID, HEAD]) RunAndReturn(run func()) *mockNodeClient_UnsubscribeAllExceptAliveLoop_Call[CHAIN_ID, HEAD] { + _c.Call.Return(run) + return _c +} + // newMockNodeClient creates a new instance of mockNodeClient. 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 newMockNodeClient[CHAIN_ID types.ID, HEAD Head](t interface { diff --git a/common/client/mock_node_selector_test.go b/common/client/mock_node_selector_test.go index 996d064daa4..d05c2979fc1 100644 --- a/common/client/mock_node_selector_test.go +++ b/common/client/mock_node_selector_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package client @@ -12,6 +12,14 @@ type mockNodeSelector[CHAIN_ID types.ID, HEAD Head, RPC NodeClient[CHAIN_ID, HEA mock.Mock } +type mockNodeSelector_Expecter[CHAIN_ID types.ID, HEAD Head, RPC NodeClient[CHAIN_ID, HEAD]] struct { + mock *mock.Mock +} + +func (_m *mockNodeSelector[CHAIN_ID, HEAD, RPC]) EXPECT() *mockNodeSelector_Expecter[CHAIN_ID, HEAD, RPC] { + return &mockNodeSelector_Expecter[CHAIN_ID, HEAD, RPC]{mock: &_m.Mock} +} + // Name provides a mock function with given fields: func (_m *mockNodeSelector[CHAIN_ID, HEAD, RPC]) Name() string { ret := _m.Called() @@ -30,6 +38,33 @@ func (_m *mockNodeSelector[CHAIN_ID, HEAD, RPC]) Name() string { return r0 } +// mockNodeSelector_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type mockNodeSelector_Name_Call[CHAIN_ID types.ID, HEAD Head, RPC NodeClient[CHAIN_ID, HEAD]] struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *mockNodeSelector_Expecter[CHAIN_ID, HEAD, RPC]) Name() *mockNodeSelector_Name_Call[CHAIN_ID, HEAD, RPC] { + return &mockNodeSelector_Name_Call[CHAIN_ID, HEAD, RPC]{Call: _e.mock.On("Name")} +} + +func (_c *mockNodeSelector_Name_Call[CHAIN_ID, HEAD, RPC]) Run(run func()) *mockNodeSelector_Name_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockNodeSelector_Name_Call[CHAIN_ID, HEAD, RPC]) Return(_a0 string) *mockNodeSelector_Name_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockNodeSelector_Name_Call[CHAIN_ID, HEAD, RPC]) RunAndReturn(run func() string) *mockNodeSelector_Name_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Return(run) + return _c +} + // Select provides a mock function with given fields: func (_m *mockNodeSelector[CHAIN_ID, HEAD, RPC]) Select() Node[CHAIN_ID, HEAD, RPC] { ret := _m.Called() @@ -50,6 +85,33 @@ func (_m *mockNodeSelector[CHAIN_ID, HEAD, RPC]) Select() Node[CHAIN_ID, HEAD, R return r0 } +// mockNodeSelector_Select_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Select' +type mockNodeSelector_Select_Call[CHAIN_ID types.ID, HEAD Head, RPC NodeClient[CHAIN_ID, HEAD]] struct { + *mock.Call +} + +// Select is a helper method to define mock.On call +func (_e *mockNodeSelector_Expecter[CHAIN_ID, HEAD, RPC]) Select() *mockNodeSelector_Select_Call[CHAIN_ID, HEAD, RPC] { + return &mockNodeSelector_Select_Call[CHAIN_ID, HEAD, RPC]{Call: _e.mock.On("Select")} +} + +func (_c *mockNodeSelector_Select_Call[CHAIN_ID, HEAD, RPC]) Run(run func()) *mockNodeSelector_Select_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockNodeSelector_Select_Call[CHAIN_ID, HEAD, RPC]) Return(_a0 Node[CHAIN_ID, HEAD, RPC]) *mockNodeSelector_Select_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockNodeSelector_Select_Call[CHAIN_ID, HEAD, RPC]) RunAndReturn(run func() Node[CHAIN_ID, HEAD, RPC]) *mockNodeSelector_Select_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Return(run) + return _c +} + // newMockNodeSelector creates a new instance of mockNodeSelector. 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 newMockNodeSelector[CHAIN_ID types.ID, HEAD Head, RPC NodeClient[CHAIN_ID, HEAD]](t interface { diff --git a/common/client/mock_node_test.go b/common/client/mock_node_test.go index ee2cacb9274..a342a533a7d 100644 --- a/common/client/mock_node_test.go +++ b/common/client/mock_node_test.go @@ -1,14 +1,12 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package client import ( context "context" - big "math/big" - - mock "github.com/stretchr/testify/mock" types "github.com/smartcontractkit/chainlink/v2/common/types" + mock "github.com/stretchr/testify/mock" ) // mockNode is an autogenerated mock type for the Node type @@ -16,6 +14,14 @@ type mockNode[CHAIN_ID types.ID, HEAD Head, RPC NodeClient[CHAIN_ID, HEAD]] stru mock.Mock } +type mockNode_Expecter[CHAIN_ID types.ID, HEAD Head, RPC NodeClient[CHAIN_ID, HEAD]] struct { + mock *mock.Mock +} + +func (_m *mockNode[CHAIN_ID, HEAD, RPC]) EXPECT() *mockNode_Expecter[CHAIN_ID, HEAD, RPC] { + return &mockNode_Expecter[CHAIN_ID, HEAD, RPC]{mock: &_m.Mock} +} + // Close provides a mock function with given fields: func (_m *mockNode[CHAIN_ID, HEAD, RPC]) Close() error { ret := _m.Called() @@ -34,6 +40,33 @@ func (_m *mockNode[CHAIN_ID, HEAD, RPC]) Close() error { return r0 } +// mockNode_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type mockNode_Close_Call[CHAIN_ID types.ID, HEAD Head, RPC NodeClient[CHAIN_ID, HEAD]] struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *mockNode_Expecter[CHAIN_ID, HEAD, RPC]) Close() *mockNode_Close_Call[CHAIN_ID, HEAD, RPC] { + return &mockNode_Close_Call[CHAIN_ID, HEAD, RPC]{Call: _e.mock.On("Close")} +} + +func (_c *mockNode_Close_Call[CHAIN_ID, HEAD, RPC]) Run(run func()) *mockNode_Close_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockNode_Close_Call[CHAIN_ID, HEAD, RPC]) Return(_a0 error) *mockNode_Close_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockNode_Close_Call[CHAIN_ID, HEAD, RPC]) RunAndReturn(run func() error) *mockNode_Close_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Return(run) + return _c +} + // ConfiguredChainID provides a mock function with given fields: func (_m *mockNode[CHAIN_ID, HEAD, RPC]) ConfiguredChainID() CHAIN_ID { ret := _m.Called() @@ -52,6 +85,78 @@ func (_m *mockNode[CHAIN_ID, HEAD, RPC]) ConfiguredChainID() CHAIN_ID { return r0 } +// mockNode_ConfiguredChainID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ConfiguredChainID' +type mockNode_ConfiguredChainID_Call[CHAIN_ID types.ID, HEAD Head, RPC NodeClient[CHAIN_ID, HEAD]] struct { + *mock.Call +} + +// ConfiguredChainID is a helper method to define mock.On call +func (_e *mockNode_Expecter[CHAIN_ID, HEAD, RPC]) ConfiguredChainID() *mockNode_ConfiguredChainID_Call[CHAIN_ID, HEAD, RPC] { + return &mockNode_ConfiguredChainID_Call[CHAIN_ID, HEAD, RPC]{Call: _e.mock.On("ConfiguredChainID")} +} + +func (_c *mockNode_ConfiguredChainID_Call[CHAIN_ID, HEAD, RPC]) Run(run func()) *mockNode_ConfiguredChainID_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockNode_ConfiguredChainID_Call[CHAIN_ID, HEAD, RPC]) Return(_a0 CHAIN_ID) *mockNode_ConfiguredChainID_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockNode_ConfiguredChainID_Call[CHAIN_ID, HEAD, RPC]) RunAndReturn(run func() CHAIN_ID) *mockNode_ConfiguredChainID_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Return(run) + return _c +} + +// HighestUserObservations provides a mock function with given fields: +func (_m *mockNode[CHAIN_ID, HEAD, RPC]) HighestUserObservations() ChainInfo { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for HighestUserObservations") + } + + var r0 ChainInfo + if rf, ok := ret.Get(0).(func() ChainInfo); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(ChainInfo) + } + + return r0 +} + +// mockNode_HighestUserObservations_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HighestUserObservations' +type mockNode_HighestUserObservations_Call[CHAIN_ID types.ID, HEAD Head, RPC NodeClient[CHAIN_ID, HEAD]] struct { + *mock.Call +} + +// HighestUserObservations is a helper method to define mock.On call +func (_e *mockNode_Expecter[CHAIN_ID, HEAD, RPC]) HighestUserObservations() *mockNode_HighestUserObservations_Call[CHAIN_ID, HEAD, RPC] { + return &mockNode_HighestUserObservations_Call[CHAIN_ID, HEAD, RPC]{Call: _e.mock.On("HighestUserObservations")} +} + +func (_c *mockNode_HighestUserObservations_Call[CHAIN_ID, HEAD, RPC]) Run(run func()) *mockNode_HighestUserObservations_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockNode_HighestUserObservations_Call[CHAIN_ID, HEAD, RPC]) Return(_a0 ChainInfo) *mockNode_HighestUserObservations_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockNode_HighestUserObservations_Call[CHAIN_ID, HEAD, RPC]) RunAndReturn(run func() ChainInfo) *mockNode_HighestUserObservations_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Return(run) + return _c +} + // Name provides a mock function with given fields: func (_m *mockNode[CHAIN_ID, HEAD, RPC]) Name() string { ret := _m.Called() @@ -70,6 +175,33 @@ func (_m *mockNode[CHAIN_ID, HEAD, RPC]) Name() string { return r0 } +// mockNode_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type mockNode_Name_Call[CHAIN_ID types.ID, HEAD Head, RPC NodeClient[CHAIN_ID, HEAD]] struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *mockNode_Expecter[CHAIN_ID, HEAD, RPC]) Name() *mockNode_Name_Call[CHAIN_ID, HEAD, RPC] { + return &mockNode_Name_Call[CHAIN_ID, HEAD, RPC]{Call: _e.mock.On("Name")} +} + +func (_c *mockNode_Name_Call[CHAIN_ID, HEAD, RPC]) Run(run func()) *mockNode_Name_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockNode_Name_Call[CHAIN_ID, HEAD, RPC]) Return(_a0 string) *mockNode_Name_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockNode_Name_Call[CHAIN_ID, HEAD, RPC]) RunAndReturn(run func() string) *mockNode_Name_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Return(run) + return _c +} + // Order provides a mock function with given fields: func (_m *mockNode[CHAIN_ID, HEAD, RPC]) Order() int32 { ret := _m.Called() @@ -88,6 +220,33 @@ func (_m *mockNode[CHAIN_ID, HEAD, RPC]) Order() int32 { return r0 } +// mockNode_Order_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Order' +type mockNode_Order_Call[CHAIN_ID types.ID, HEAD Head, RPC NodeClient[CHAIN_ID, HEAD]] struct { + *mock.Call +} + +// Order is a helper method to define mock.On call +func (_e *mockNode_Expecter[CHAIN_ID, HEAD, RPC]) Order() *mockNode_Order_Call[CHAIN_ID, HEAD, RPC] { + return &mockNode_Order_Call[CHAIN_ID, HEAD, RPC]{Call: _e.mock.On("Order")} +} + +func (_c *mockNode_Order_Call[CHAIN_ID, HEAD, RPC]) Run(run func()) *mockNode_Order_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockNode_Order_Call[CHAIN_ID, HEAD, RPC]) Return(_a0 int32) *mockNode_Order_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockNode_Order_Call[CHAIN_ID, HEAD, RPC]) RunAndReturn(run func() int32) *mockNode_Order_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Return(run) + return _c +} + // RPC provides a mock function with given fields: func (_m *mockNode[CHAIN_ID, HEAD, RPC]) RPC() RPC { ret := _m.Called() @@ -106,6 +265,66 @@ func (_m *mockNode[CHAIN_ID, HEAD, RPC]) RPC() RPC { return r0 } +// mockNode_RPC_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RPC' +type mockNode_RPC_Call[CHAIN_ID types.ID, HEAD Head, RPC NodeClient[CHAIN_ID, HEAD]] struct { + *mock.Call +} + +// RPC is a helper method to define mock.On call +func (_e *mockNode_Expecter[CHAIN_ID, HEAD, RPC]) RPC() *mockNode_RPC_Call[CHAIN_ID, HEAD, RPC] { + return &mockNode_RPC_Call[CHAIN_ID, HEAD, RPC]{Call: _e.mock.On("RPC")} +} + +func (_c *mockNode_RPC_Call[CHAIN_ID, HEAD, RPC]) Run(run func()) *mockNode_RPC_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockNode_RPC_Call[CHAIN_ID, HEAD, RPC]) Return(_a0 RPC) *mockNode_RPC_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockNode_RPC_Call[CHAIN_ID, HEAD, RPC]) RunAndReturn(run func() RPC) *mockNode_RPC_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Return(run) + return _c +} + +// SetPoolChainInfoProvider provides a mock function with given fields: _a0 +func (_m *mockNode[CHAIN_ID, HEAD, RPC]) SetPoolChainInfoProvider(_a0 PoolChainInfoProvider) { + _m.Called(_a0) +} + +// mockNode_SetPoolChainInfoProvider_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPoolChainInfoProvider' +type mockNode_SetPoolChainInfoProvider_Call[CHAIN_ID types.ID, HEAD Head, RPC NodeClient[CHAIN_ID, HEAD]] struct { + *mock.Call +} + +// SetPoolChainInfoProvider is a helper method to define mock.On call +// - _a0 PoolChainInfoProvider +func (_e *mockNode_Expecter[CHAIN_ID, HEAD, RPC]) SetPoolChainInfoProvider(_a0 interface{}) *mockNode_SetPoolChainInfoProvider_Call[CHAIN_ID, HEAD, RPC] { + return &mockNode_SetPoolChainInfoProvider_Call[CHAIN_ID, HEAD, RPC]{Call: _e.mock.On("SetPoolChainInfoProvider", _a0)} +} + +func (_c *mockNode_SetPoolChainInfoProvider_Call[CHAIN_ID, HEAD, RPC]) Run(run func(_a0 PoolChainInfoProvider)) *mockNode_SetPoolChainInfoProvider_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(PoolChainInfoProvider)) + }) + return _c +} + +func (_c *mockNode_SetPoolChainInfoProvider_Call[CHAIN_ID, HEAD, RPC]) Return() *mockNode_SetPoolChainInfoProvider_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Return() + return _c +} + +func (_c *mockNode_SetPoolChainInfoProvider_Call[CHAIN_ID, HEAD, RPC]) RunAndReturn(run func(PoolChainInfoProvider)) *mockNode_SetPoolChainInfoProvider_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *mockNode[CHAIN_ID, HEAD, RPC]) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -124,6 +343,34 @@ func (_m *mockNode[CHAIN_ID, HEAD, RPC]) Start(_a0 context.Context) error { return r0 } +// mockNode_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type mockNode_Start_Call[CHAIN_ID types.ID, HEAD Head, RPC NodeClient[CHAIN_ID, HEAD]] struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *mockNode_Expecter[CHAIN_ID, HEAD, RPC]) Start(_a0 interface{}) *mockNode_Start_Call[CHAIN_ID, HEAD, RPC] { + return &mockNode_Start_Call[CHAIN_ID, HEAD, RPC]{Call: _e.mock.On("Start", _a0)} +} + +func (_c *mockNode_Start_Call[CHAIN_ID, HEAD, RPC]) Run(run func(_a0 context.Context)) *mockNode_Start_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *mockNode_Start_Call[CHAIN_ID, HEAD, RPC]) Return(_a0 error) *mockNode_Start_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockNode_Start_Call[CHAIN_ID, HEAD, RPC]) RunAndReturn(run func(context.Context) error) *mockNode_Start_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Return(run) + return _c +} + // State provides a mock function with given fields: func (_m *mockNode[CHAIN_ID, HEAD, RPC]) State() nodeState { ret := _m.Called() @@ -142,8 +389,35 @@ func (_m *mockNode[CHAIN_ID, HEAD, RPC]) State() nodeState { return r0 } +// mockNode_State_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'State' +type mockNode_State_Call[CHAIN_ID types.ID, HEAD Head, RPC NodeClient[CHAIN_ID, HEAD]] struct { + *mock.Call +} + +// State is a helper method to define mock.On call +func (_e *mockNode_Expecter[CHAIN_ID, HEAD, RPC]) State() *mockNode_State_Call[CHAIN_ID, HEAD, RPC] { + return &mockNode_State_Call[CHAIN_ID, HEAD, RPC]{Call: _e.mock.On("State")} +} + +func (_c *mockNode_State_Call[CHAIN_ID, HEAD, RPC]) Run(run func()) *mockNode_State_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockNode_State_Call[CHAIN_ID, HEAD, RPC]) Return(_a0 nodeState) *mockNode_State_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockNode_State_Call[CHAIN_ID, HEAD, RPC]) RunAndReturn(run func() nodeState) *mockNode_State_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Return(run) + return _c +} + // StateAndLatest provides a mock function with given fields: -func (_m *mockNode[CHAIN_ID, HEAD, RPC]) StateAndLatest() (nodeState, int64, *big.Int) { +func (_m *mockNode[CHAIN_ID, HEAD, RPC]) StateAndLatest() (nodeState, ChainInfo) { ret := _m.Called() if len(ret) == 0 { @@ -151,9 +425,8 @@ func (_m *mockNode[CHAIN_ID, HEAD, RPC]) StateAndLatest() (nodeState, int64, *bi } var r0 nodeState - var r1 int64 - var r2 *big.Int - if rf, ok := ret.Get(0).(func() (nodeState, int64, *big.Int)); ok { + var r1 ChainInfo + if rf, ok := ret.Get(0).(func() (nodeState, ChainInfo)); ok { return rf() } if rf, ok := ret.Get(0).(func() nodeState); ok { @@ -162,21 +435,40 @@ func (_m *mockNode[CHAIN_ID, HEAD, RPC]) StateAndLatest() (nodeState, int64, *bi r0 = ret.Get(0).(nodeState) } - if rf, ok := ret.Get(1).(func() int64); ok { + if rf, ok := ret.Get(1).(func() ChainInfo); ok { r1 = rf() } else { - r1 = ret.Get(1).(int64) + r1 = ret.Get(1).(ChainInfo) } - if rf, ok := ret.Get(2).(func() *big.Int); ok { - r2 = rf() - } else { - if ret.Get(2) != nil { - r2 = ret.Get(2).(*big.Int) - } - } + return r0, r1 +} - return r0, r1, r2 +// mockNode_StateAndLatest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StateAndLatest' +type mockNode_StateAndLatest_Call[CHAIN_ID types.ID, HEAD Head, RPC NodeClient[CHAIN_ID, HEAD]] struct { + *mock.Call +} + +// StateAndLatest is a helper method to define mock.On call +func (_e *mockNode_Expecter[CHAIN_ID, HEAD, RPC]) StateAndLatest() *mockNode_StateAndLatest_Call[CHAIN_ID, HEAD, RPC] { + return &mockNode_StateAndLatest_Call[CHAIN_ID, HEAD, RPC]{Call: _e.mock.On("StateAndLatest")} +} + +func (_c *mockNode_StateAndLatest_Call[CHAIN_ID, HEAD, RPC]) Run(run func()) *mockNode_StateAndLatest_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockNode_StateAndLatest_Call[CHAIN_ID, HEAD, RPC]) Return(_a0 nodeState, _a1 ChainInfo) *mockNode_StateAndLatest_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockNode_StateAndLatest_Call[CHAIN_ID, HEAD, RPC]) RunAndReturn(run func() (nodeState, ChainInfo)) *mockNode_StateAndLatest_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Return(run) + return _c } // String provides a mock function with given fields: @@ -197,6 +489,33 @@ func (_m *mockNode[CHAIN_ID, HEAD, RPC]) String() string { return r0 } +// mockNode_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' +type mockNode_String_Call[CHAIN_ID types.ID, HEAD Head, RPC NodeClient[CHAIN_ID, HEAD]] struct { + *mock.Call +} + +// String is a helper method to define mock.On call +func (_e *mockNode_Expecter[CHAIN_ID, HEAD, RPC]) String() *mockNode_String_Call[CHAIN_ID, HEAD, RPC] { + return &mockNode_String_Call[CHAIN_ID, HEAD, RPC]{Call: _e.mock.On("String")} +} + +func (_c *mockNode_String_Call[CHAIN_ID, HEAD, RPC]) Run(run func()) *mockNode_String_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockNode_String_Call[CHAIN_ID, HEAD, RPC]) Return(_a0 string) *mockNode_String_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockNode_String_Call[CHAIN_ID, HEAD, RPC]) RunAndReturn(run func() string) *mockNode_String_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Return(run) + return _c +} + // SubscribersCount provides a mock function with given fields: func (_m *mockNode[CHAIN_ID, HEAD, RPC]) SubscribersCount() int32 { ret := _m.Called() @@ -215,11 +534,65 @@ func (_m *mockNode[CHAIN_ID, HEAD, RPC]) SubscribersCount() int32 { return r0 } +// mockNode_SubscribersCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SubscribersCount' +type mockNode_SubscribersCount_Call[CHAIN_ID types.ID, HEAD Head, RPC NodeClient[CHAIN_ID, HEAD]] struct { + *mock.Call +} + +// SubscribersCount is a helper method to define mock.On call +func (_e *mockNode_Expecter[CHAIN_ID, HEAD, RPC]) SubscribersCount() *mockNode_SubscribersCount_Call[CHAIN_ID, HEAD, RPC] { + return &mockNode_SubscribersCount_Call[CHAIN_ID, HEAD, RPC]{Call: _e.mock.On("SubscribersCount")} +} + +func (_c *mockNode_SubscribersCount_Call[CHAIN_ID, HEAD, RPC]) Run(run func()) *mockNode_SubscribersCount_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockNode_SubscribersCount_Call[CHAIN_ID, HEAD, RPC]) Return(_a0 int32) *mockNode_SubscribersCount_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockNode_SubscribersCount_Call[CHAIN_ID, HEAD, RPC]) RunAndReturn(run func() int32) *mockNode_SubscribersCount_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Return(run) + return _c +} + // UnsubscribeAllExceptAliveLoop provides a mock function with given fields: func (_m *mockNode[CHAIN_ID, HEAD, RPC]) UnsubscribeAllExceptAliveLoop() { _m.Called() } +// mockNode_UnsubscribeAllExceptAliveLoop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnsubscribeAllExceptAliveLoop' +type mockNode_UnsubscribeAllExceptAliveLoop_Call[CHAIN_ID types.ID, HEAD Head, RPC NodeClient[CHAIN_ID, HEAD]] struct { + *mock.Call +} + +// UnsubscribeAllExceptAliveLoop is a helper method to define mock.On call +func (_e *mockNode_Expecter[CHAIN_ID, HEAD, RPC]) UnsubscribeAllExceptAliveLoop() *mockNode_UnsubscribeAllExceptAliveLoop_Call[CHAIN_ID, HEAD, RPC] { + return &mockNode_UnsubscribeAllExceptAliveLoop_Call[CHAIN_ID, HEAD, RPC]{Call: _e.mock.On("UnsubscribeAllExceptAliveLoop")} +} + +func (_c *mockNode_UnsubscribeAllExceptAliveLoop_Call[CHAIN_ID, HEAD, RPC]) Run(run func()) *mockNode_UnsubscribeAllExceptAliveLoop_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockNode_UnsubscribeAllExceptAliveLoop_Call[CHAIN_ID, HEAD, RPC]) Return() *mockNode_UnsubscribeAllExceptAliveLoop_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Return() + return _c +} + +func (_c *mockNode_UnsubscribeAllExceptAliveLoop_Call[CHAIN_ID, HEAD, RPC]) RunAndReturn(run func()) *mockNode_UnsubscribeAllExceptAliveLoop_Call[CHAIN_ID, HEAD, RPC] { + _c.Call.Return(run) + return _c +} + // newMockNode creates a new instance of mockNode. 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 newMockNode[CHAIN_ID types.ID, HEAD Head, RPC NodeClient[CHAIN_ID, HEAD]](t interface { diff --git a/common/client/mock_pool_chain_info_provider_test.go b/common/client/mock_pool_chain_info_provider_test.go new file mode 100644 index 00000000000..473041f9fab --- /dev/null +++ b/common/client/mock_pool_chain_info_provider_test.go @@ -0,0 +1,132 @@ +// Code generated by mockery v2.43.2. DO NOT EDIT. + +package client + +import mock "github.com/stretchr/testify/mock" + +// mockPoolChainInfoProvider is an autogenerated mock type for the PoolChainInfoProvider type +type mockPoolChainInfoProvider struct { + mock.Mock +} + +type mockPoolChainInfoProvider_Expecter struct { + mock *mock.Mock +} + +func (_m *mockPoolChainInfoProvider) EXPECT() *mockPoolChainInfoProvider_Expecter { + return &mockPoolChainInfoProvider_Expecter{mock: &_m.Mock} +} + +// HighestUserObservations provides a mock function with given fields: +func (_m *mockPoolChainInfoProvider) HighestUserObservations() ChainInfo { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for HighestUserObservations") + } + + var r0 ChainInfo + if rf, ok := ret.Get(0).(func() ChainInfo); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(ChainInfo) + } + + return r0 +} + +// mockPoolChainInfoProvider_HighestUserObservations_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HighestUserObservations' +type mockPoolChainInfoProvider_HighestUserObservations_Call struct { + *mock.Call +} + +// HighestUserObservations is a helper method to define mock.On call +func (_e *mockPoolChainInfoProvider_Expecter) HighestUserObservations() *mockPoolChainInfoProvider_HighestUserObservations_Call { + return &mockPoolChainInfoProvider_HighestUserObservations_Call{Call: _e.mock.On("HighestUserObservations")} +} + +func (_c *mockPoolChainInfoProvider_HighestUserObservations_Call) Run(run func()) *mockPoolChainInfoProvider_HighestUserObservations_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockPoolChainInfoProvider_HighestUserObservations_Call) Return(_a0 ChainInfo) *mockPoolChainInfoProvider_HighestUserObservations_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockPoolChainInfoProvider_HighestUserObservations_Call) RunAndReturn(run func() ChainInfo) *mockPoolChainInfoProvider_HighestUserObservations_Call { + _c.Call.Return(run) + return _c +} + +// LatestChainInfo provides a mock function with given fields: +func (_m *mockPoolChainInfoProvider) LatestChainInfo() (int, ChainInfo) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for LatestChainInfo") + } + + var r0 int + var r1 ChainInfo + if rf, ok := ret.Get(0).(func() (int, ChainInfo)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() int); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(int) + } + + if rf, ok := ret.Get(1).(func() ChainInfo); ok { + r1 = rf() + } else { + r1 = ret.Get(1).(ChainInfo) + } + + return r0, r1 +} + +// mockPoolChainInfoProvider_LatestChainInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LatestChainInfo' +type mockPoolChainInfoProvider_LatestChainInfo_Call struct { + *mock.Call +} + +// LatestChainInfo is a helper method to define mock.On call +func (_e *mockPoolChainInfoProvider_Expecter) LatestChainInfo() *mockPoolChainInfoProvider_LatestChainInfo_Call { + return &mockPoolChainInfoProvider_LatestChainInfo_Call{Call: _e.mock.On("LatestChainInfo")} +} + +func (_c *mockPoolChainInfoProvider_LatestChainInfo_Call) Run(run func()) *mockPoolChainInfoProvider_LatestChainInfo_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockPoolChainInfoProvider_LatestChainInfo_Call) Return(_a0 int, _a1 ChainInfo) *mockPoolChainInfoProvider_LatestChainInfo_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockPoolChainInfoProvider_LatestChainInfo_Call) RunAndReturn(run func() (int, ChainInfo)) *mockPoolChainInfoProvider_LatestChainInfo_Call { + _c.Call.Return(run) + return _c +} + +// newMockPoolChainInfoProvider creates a new instance of mockPoolChainInfoProvider. 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 newMockPoolChainInfoProvider(t interface { + mock.TestingT + Cleanup(func()) +}) *mockPoolChainInfoProvider { + mock := &mockPoolChainInfoProvider{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/common/client/mock_rpc_test.go b/common/client/mock_rpc_test.go index 54f57e81f65..36beae901c6 100644 --- a/common/client/mock_rpc_test.go +++ b/common/client/mock_rpc_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package client @@ -21,6 +21,14 @@ type mockRPC[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_H mock.Mock } +type mockRPC_Expecter[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + mock *mock.Mock +} + +func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) EXPECT() *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{mock: &_m.Mock} +} + // BalanceAt provides a mock function with given fields: ctx, accountAddress, blockNumber func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) BalanceAt(ctx context.Context, accountAddress ADDR, blockNumber *big.Int) (*big.Int, error) { ret := _m.Called(ctx, accountAddress, blockNumber) @@ -51,6 +59,36 @@ func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS return r0, r1 } +// mockRPC_BalanceAt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BalanceAt' +type mockRPC_BalanceAt_Call[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + *mock.Call +} + +// BalanceAt is a helper method to define mock.On call +// - ctx context.Context +// - accountAddress ADDR +// - blockNumber *big.Int +func (_e *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) BalanceAt(ctx interface{}, accountAddress interface{}, blockNumber interface{}) *mockRPC_BalanceAt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_BalanceAt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{Call: _e.mock.On("BalanceAt", ctx, accountAddress, blockNumber)} +} + +func (_c *mockRPC_BalanceAt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Run(run func(ctx context.Context, accountAddress ADDR, blockNumber *big.Int)) *mockRPC_BalanceAt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ADDR), args[2].(*big.Int)) + }) + return _c +} + +func (_c *mockRPC_BalanceAt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Return(_a0 *big.Int, _a1 error) *mockRPC_BalanceAt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockRPC_BalanceAt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) RunAndReturn(run func(context.Context, ADDR, *big.Int) (*big.Int, error)) *mockRPC_BalanceAt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(run) + return _c +} + // BatchCallContext provides a mock function with given fields: ctx, b func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) BatchCallContext(ctx context.Context, b []BATCH_ELEM) error { ret := _m.Called(ctx, b) @@ -69,6 +107,35 @@ func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS return r0 } +// mockRPC_BatchCallContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BatchCallContext' +type mockRPC_BatchCallContext_Call[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + *mock.Call +} + +// BatchCallContext is a helper method to define mock.On call +// - ctx context.Context +// - b []BATCH_ELEM +func (_e *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) BatchCallContext(ctx interface{}, b interface{}) *mockRPC_BatchCallContext_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_BatchCallContext_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{Call: _e.mock.On("BatchCallContext", ctx, b)} +} + +func (_c *mockRPC_BatchCallContext_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Run(run func(ctx context.Context, b []BATCH_ELEM)) *mockRPC_BatchCallContext_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]BATCH_ELEM)) + }) + return _c +} + +func (_c *mockRPC_BatchCallContext_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Return(_a0 error) *mockRPC_BatchCallContext_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockRPC_BatchCallContext_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) RunAndReturn(run func(context.Context, []BATCH_ELEM) error) *mockRPC_BatchCallContext_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(run) + return _c +} + // BlockByHash provides a mock function with given fields: ctx, hash func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) BlockByHash(ctx context.Context, hash BLOCK_HASH) (HEAD, error) { ret := _m.Called(ctx, hash) @@ -97,6 +164,35 @@ func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS return r0, r1 } +// mockRPC_BlockByHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockByHash' +type mockRPC_BlockByHash_Call[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + *mock.Call +} + +// BlockByHash is a helper method to define mock.On call +// - ctx context.Context +// - hash BLOCK_HASH +func (_e *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) BlockByHash(ctx interface{}, hash interface{}) *mockRPC_BlockByHash_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_BlockByHash_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{Call: _e.mock.On("BlockByHash", ctx, hash)} +} + +func (_c *mockRPC_BlockByHash_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Run(run func(ctx context.Context, hash BLOCK_HASH)) *mockRPC_BlockByHash_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(BLOCK_HASH)) + }) + return _c +} + +func (_c *mockRPC_BlockByHash_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Return(_a0 HEAD, _a1 error) *mockRPC_BlockByHash_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockRPC_BlockByHash_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) RunAndReturn(run func(context.Context, BLOCK_HASH) (HEAD, error)) *mockRPC_BlockByHash_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(run) + return _c +} + // BlockByNumber provides a mock function with given fields: ctx, number func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) BlockByNumber(ctx context.Context, number *big.Int) (HEAD, error) { ret := _m.Called(ctx, number) @@ -125,6 +221,35 @@ func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS return r0, r1 } +// mockRPC_BlockByNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockByNumber' +type mockRPC_BlockByNumber_Call[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + *mock.Call +} + +// BlockByNumber is a helper method to define mock.On call +// - ctx context.Context +// - number *big.Int +func (_e *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) BlockByNumber(ctx interface{}, number interface{}) *mockRPC_BlockByNumber_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_BlockByNumber_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{Call: _e.mock.On("BlockByNumber", ctx, number)} +} + +func (_c *mockRPC_BlockByNumber_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Run(run func(ctx context.Context, number *big.Int)) *mockRPC_BlockByNumber_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*big.Int)) + }) + return _c +} + +func (_c *mockRPC_BlockByNumber_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Return(_a0 HEAD, _a1 error) *mockRPC_BlockByNumber_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockRPC_BlockByNumber_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) RunAndReturn(run func(context.Context, *big.Int) (HEAD, error)) *mockRPC_BlockByNumber_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(run) + return _c +} + // CallContext provides a mock function with given fields: ctx, result, method, args func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) CallContext(ctx context.Context, result interface{}, method string, args ...interface{}) error { var _ca []interface{} @@ -146,6 +271,44 @@ func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS return r0 } +// mockRPC_CallContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CallContext' +type mockRPC_CallContext_Call[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + *mock.Call +} + +// CallContext is a helper method to define mock.On call +// - ctx context.Context +// - result interface{} +// - method string +// - args ...interface{} +func (_e *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) CallContext(ctx interface{}, result interface{}, method interface{}, args ...interface{}) *mockRPC_CallContext_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_CallContext_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{Call: _e.mock.On("CallContext", + append([]interface{}{ctx, result, method}, args...)...)} +} + +func (_c *mockRPC_CallContext_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Run(run func(ctx context.Context, result interface{}, method string, args ...interface{})) *mockRPC_CallContext_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-3) + for i, a := range args[3:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(args[0].(context.Context), args[1].(interface{}), args[2].(string), variadicArgs...) + }) + return _c +} + +func (_c *mockRPC_CallContext_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Return(_a0 error) *mockRPC_CallContext_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockRPC_CallContext_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) RunAndReturn(run func(context.Context, interface{}, string, ...interface{}) error) *mockRPC_CallContext_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(run) + return _c +} + // CallContract provides a mock function with given fields: ctx, msg, blockNumber func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) CallContract(ctx context.Context, msg interface{}, blockNumber *big.Int) ([]byte, error) { ret := _m.Called(ctx, msg, blockNumber) @@ -176,6 +339,36 @@ func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS return r0, r1 } +// mockRPC_CallContract_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CallContract' +type mockRPC_CallContract_Call[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + *mock.Call +} + +// CallContract is a helper method to define mock.On call +// - ctx context.Context +// - msg interface{} +// - blockNumber *big.Int +func (_e *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) CallContract(ctx interface{}, msg interface{}, blockNumber interface{}) *mockRPC_CallContract_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_CallContract_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{Call: _e.mock.On("CallContract", ctx, msg, blockNumber)} +} + +func (_c *mockRPC_CallContract_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Run(run func(ctx context.Context, msg interface{}, blockNumber *big.Int)) *mockRPC_CallContract_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(interface{}), args[2].(*big.Int)) + }) + return _c +} + +func (_c *mockRPC_CallContract_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Return(rpcErr []byte, extractErr error) *mockRPC_CallContract_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(rpcErr, extractErr) + return _c +} + +func (_c *mockRPC_CallContract_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) RunAndReturn(run func(context.Context, interface{}, *big.Int) ([]byte, error)) *mockRPC_CallContract_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(run) + return _c +} + // ChainID 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]) ChainID(ctx context.Context) (CHAIN_ID, error) { ret := _m.Called(ctx) @@ -204,6 +397,34 @@ func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS return r0, r1 } +// mockRPC_ChainID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChainID' +type mockRPC_ChainID_Call[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + *mock.Call +} + +// ChainID is a helper method to define mock.On call +// - ctx context.Context +func (_e *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) ChainID(ctx interface{}) *mockRPC_ChainID_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_ChainID_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{Call: _e.mock.On("ChainID", ctx)} +} + +func (_c *mockRPC_ChainID_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Run(run func(ctx context.Context)) *mockRPC_ChainID_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *mockRPC_ChainID_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Return(_a0 CHAIN_ID, _a1 error) *mockRPC_ChainID_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockRPC_ChainID_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) RunAndReturn(run func(context.Context) (CHAIN_ID, error)) *mockRPC_ChainID_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(run) + return _c +} + // ClientVersion provides a mock function with given fields: _a0 func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) ClientVersion(_a0 context.Context) (string, error) { ret := _m.Called(_a0) @@ -232,11 +453,66 @@ func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS return r0, r1 } +// mockRPC_ClientVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClientVersion' +type mockRPC_ClientVersion_Call[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + *mock.Call +} + +// ClientVersion is a helper method to define mock.On call +// - _a0 context.Context +func (_e *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) ClientVersion(_a0 interface{}) *mockRPC_ClientVersion_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_ClientVersion_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{Call: _e.mock.On("ClientVersion", _a0)} +} + +func (_c *mockRPC_ClientVersion_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Run(run func(_a0 context.Context)) *mockRPC_ClientVersion_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *mockRPC_ClientVersion_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Return(_a0 string, _a1 error) *mockRPC_ClientVersion_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockRPC_ClientVersion_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) RunAndReturn(run func(context.Context) (string, error)) *mockRPC_ClientVersion_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(run) + return _c +} + // Close provides a mock function with given fields: func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Close() { _m.Called() } +// mockRPC_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type mockRPC_Close_Call[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Close() *mockRPC_Close_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_Close_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{Call: _e.mock.On("Close")} +} + +func (_c *mockRPC_Close_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Run(run func()) *mockRPC_Close_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockRPC_Close_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Return() *mockRPC_Close_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return() + return _c +} + +func (_c *mockRPC_Close_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) RunAndReturn(run func()) *mockRPC_Close_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(run) + return _c +} + // CodeAt provides a mock function with given fields: ctx, account, blockNumber func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) CodeAt(ctx context.Context, account ADDR, blockNumber *big.Int) ([]byte, error) { ret := _m.Called(ctx, account, blockNumber) @@ -267,6 +543,36 @@ func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS return r0, r1 } +// mockRPC_CodeAt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CodeAt' +type mockRPC_CodeAt_Call[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + *mock.Call +} + +// CodeAt is a helper method to define mock.On call +// - ctx context.Context +// - account ADDR +// - blockNumber *big.Int +func (_e *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) CodeAt(ctx interface{}, account interface{}, blockNumber interface{}) *mockRPC_CodeAt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_CodeAt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{Call: _e.mock.On("CodeAt", ctx, account, blockNumber)} +} + +func (_c *mockRPC_CodeAt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Run(run func(ctx context.Context, account ADDR, blockNumber *big.Int)) *mockRPC_CodeAt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ADDR), args[2].(*big.Int)) + }) + return _c +} + +func (_c *mockRPC_CodeAt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Return(_a0 []byte, _a1 error) *mockRPC_CodeAt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockRPC_CodeAt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) RunAndReturn(run func(context.Context, ADDR, *big.Int) ([]byte, error)) *mockRPC_CodeAt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(run) + return _c +} + // Dial 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]) Dial(ctx context.Context) error { ret := _m.Called(ctx) @@ -285,6 +591,34 @@ func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS return r0 } +// mockRPC_Dial_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Dial' +type mockRPC_Dial_Call[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + *mock.Call +} + +// Dial is a helper method to define mock.On call +// - ctx context.Context +func (_e *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Dial(ctx interface{}) *mockRPC_Dial_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_Dial_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{Call: _e.mock.On("Dial", ctx)} +} + +func (_c *mockRPC_Dial_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Run(run func(ctx context.Context)) *mockRPC_Dial_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *mockRPC_Dial_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Return(_a0 error) *mockRPC_Dial_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockRPC_Dial_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) RunAndReturn(run func(context.Context) error) *mockRPC_Dial_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(run) + return _c +} + // DialHTTP provides a mock function with given fields: func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) DialHTTP() error { ret := _m.Called() @@ -303,11 +637,65 @@ func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS return r0 } +// mockRPC_DialHTTP_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DialHTTP' +type mockRPC_DialHTTP_Call[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + *mock.Call +} + +// DialHTTP is a helper method to define mock.On call +func (_e *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) DialHTTP() *mockRPC_DialHTTP_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_DialHTTP_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{Call: _e.mock.On("DialHTTP")} +} + +func (_c *mockRPC_DialHTTP_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Run(run func()) *mockRPC_DialHTTP_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockRPC_DialHTTP_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Return(_a0 error) *mockRPC_DialHTTP_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockRPC_DialHTTP_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) RunAndReturn(run func() error) *mockRPC_DialHTTP_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(run) + return _c +} + // DisconnectAll provides a mock function with given fields: func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) DisconnectAll() { _m.Called() } +// mockRPC_DisconnectAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DisconnectAll' +type mockRPC_DisconnectAll_Call[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + *mock.Call +} + +// DisconnectAll is a helper method to define mock.On call +func (_e *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) DisconnectAll() *mockRPC_DisconnectAll_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_DisconnectAll_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{Call: _e.mock.On("DisconnectAll")} +} + +func (_c *mockRPC_DisconnectAll_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Run(run func()) *mockRPC_DisconnectAll_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockRPC_DisconnectAll_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Return() *mockRPC_DisconnectAll_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return() + return _c +} + +func (_c *mockRPC_DisconnectAll_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) RunAndReturn(run func()) *mockRPC_DisconnectAll_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(run) + return _c +} + // EstimateGas provides a mock function with given fields: ctx, call func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) EstimateGas(ctx context.Context, call interface{}) (uint64, error) { ret := _m.Called(ctx, call) @@ -336,6 +724,35 @@ func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS return r0, r1 } +// mockRPC_EstimateGas_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EstimateGas' +type mockRPC_EstimateGas_Call[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + *mock.Call +} + +// EstimateGas is a helper method to define mock.On call +// - ctx context.Context +// - call interface{} +func (_e *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) EstimateGas(ctx interface{}, call interface{}) *mockRPC_EstimateGas_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_EstimateGas_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{Call: _e.mock.On("EstimateGas", ctx, call)} +} + +func (_c *mockRPC_EstimateGas_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Run(run func(ctx context.Context, call interface{})) *mockRPC_EstimateGas_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(interface{})) + }) + return _c +} + +func (_c *mockRPC_EstimateGas_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Return(gas uint64, err error) *mockRPC_EstimateGas_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(gas, err) + return _c +} + +func (_c *mockRPC_EstimateGas_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) RunAndReturn(run func(context.Context, interface{}) (uint64, error)) *mockRPC_EstimateGas_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(run) + return _c +} + // FilterEvents provides a mock function with given fields: ctx, query func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) FilterEvents(ctx context.Context, query EVENT_OPS) ([]EVENT, error) { ret := _m.Called(ctx, query) @@ -366,6 +783,90 @@ func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS return r0, r1 } +// mockRPC_FilterEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterEvents' +type mockRPC_FilterEvents_Call[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + *mock.Call +} + +// FilterEvents is a helper method to define mock.On call +// - ctx context.Context +// - query EVENT_OPS +func (_e *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) FilterEvents(ctx interface{}, query interface{}) *mockRPC_FilterEvents_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_FilterEvents_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{Call: _e.mock.On("FilterEvents", ctx, query)} +} + +func (_c *mockRPC_FilterEvents_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Run(run func(ctx context.Context, query EVENT_OPS)) *mockRPC_FilterEvents_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(EVENT_OPS)) + }) + return _c +} + +func (_c *mockRPC_FilterEvents_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Return(_a0 []EVENT, _a1 error) *mockRPC_FilterEvents_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockRPC_FilterEvents_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) RunAndReturn(run func(context.Context, EVENT_OPS) ([]EVENT, error)) *mockRPC_FilterEvents_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(run) + return _c +} + +// GetInterceptedChainInfo provides a mock function with given fields: +func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) GetInterceptedChainInfo() (ChainInfo, ChainInfo) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetInterceptedChainInfo") + } + + var r0 ChainInfo + var r1 ChainInfo + if rf, ok := ret.Get(0).(func() (ChainInfo, ChainInfo)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() ChainInfo); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(ChainInfo) + } + + if rf, ok := ret.Get(1).(func() ChainInfo); ok { + r1 = rf() + } else { + r1 = ret.Get(1).(ChainInfo) + } + + return r0, r1 +} + +// mockRPC_GetInterceptedChainInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetInterceptedChainInfo' +type mockRPC_GetInterceptedChainInfo_Call[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + *mock.Call +} + +// GetInterceptedChainInfo is a helper method to define mock.On call +func (_e *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) GetInterceptedChainInfo() *mockRPC_GetInterceptedChainInfo_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_GetInterceptedChainInfo_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{Call: _e.mock.On("GetInterceptedChainInfo")} +} + +func (_c *mockRPC_GetInterceptedChainInfo_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Run(run func()) *mockRPC_GetInterceptedChainInfo_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockRPC_GetInterceptedChainInfo_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Return(latest ChainInfo, highestUserObservations ChainInfo) *mockRPC_GetInterceptedChainInfo_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(latest, highestUserObservations) + return _c +} + +func (_c *mockRPC_GetInterceptedChainInfo_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) RunAndReturn(run func() (ChainInfo, ChainInfo)) *mockRPC_GetInterceptedChainInfo_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(run) + return _c +} + // IsSyncing 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]) IsSyncing(ctx context.Context) (bool, error) { ret := _m.Called(ctx) @@ -394,6 +895,34 @@ func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS return r0, r1 } +// mockRPC_IsSyncing_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsSyncing' +type mockRPC_IsSyncing_Call[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + *mock.Call +} + +// IsSyncing is a helper method to define mock.On call +// - ctx context.Context +func (_e *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) IsSyncing(ctx interface{}) *mockRPC_IsSyncing_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_IsSyncing_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{Call: _e.mock.On("IsSyncing", ctx)} +} + +func (_c *mockRPC_IsSyncing_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Run(run func(ctx context.Context)) *mockRPC_IsSyncing_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *mockRPC_IsSyncing_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Return(_a0 bool, _a1 error) *mockRPC_IsSyncing_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockRPC_IsSyncing_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) RunAndReturn(run func(context.Context) (bool, error)) *mockRPC_IsSyncing_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(run) + return _c +} + // LINKBalance provides a mock function with given fields: ctx, accountAddress, linkAddress func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) LINKBalance(ctx context.Context, accountAddress ADDR, linkAddress ADDR) (*assets.Link, error) { ret := _m.Called(ctx, accountAddress, linkAddress) @@ -424,6 +953,36 @@ func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS return r0, r1 } +// mockRPC_LINKBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LINKBalance' +type mockRPC_LINKBalance_Call[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + *mock.Call +} + +// LINKBalance is a helper method to define mock.On call +// - ctx context.Context +// - accountAddress ADDR +// - linkAddress ADDR +func (_e *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) LINKBalance(ctx interface{}, accountAddress interface{}, linkAddress interface{}) *mockRPC_LINKBalance_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_LINKBalance_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{Call: _e.mock.On("LINKBalance", ctx, accountAddress, linkAddress)} +} + +func (_c *mockRPC_LINKBalance_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Run(run func(ctx context.Context, accountAddress ADDR, linkAddress ADDR)) *mockRPC_LINKBalance_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ADDR), args[2].(ADDR)) + }) + return _c +} + +func (_c *mockRPC_LINKBalance_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Return(_a0 *assets.Link, _a1 error) *mockRPC_LINKBalance_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockRPC_LINKBalance_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) RunAndReturn(run func(context.Context, ADDR, ADDR) (*assets.Link, error)) *mockRPC_LINKBalance_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(run) + return _c +} + // LatestBlockHeight provides a mock function with given fields: _a0 func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) LatestBlockHeight(_a0 context.Context) (*big.Int, error) { ret := _m.Called(_a0) @@ -454,6 +1013,34 @@ func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS return r0, r1 } +// mockRPC_LatestBlockHeight_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LatestBlockHeight' +type mockRPC_LatestBlockHeight_Call[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + *mock.Call +} + +// LatestBlockHeight is a helper method to define mock.On call +// - _a0 context.Context +func (_e *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) LatestBlockHeight(_a0 interface{}) *mockRPC_LatestBlockHeight_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_LatestBlockHeight_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{Call: _e.mock.On("LatestBlockHeight", _a0)} +} + +func (_c *mockRPC_LatestBlockHeight_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Run(run func(_a0 context.Context)) *mockRPC_LatestBlockHeight_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *mockRPC_LatestBlockHeight_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Return(_a0 *big.Int, _a1 error) *mockRPC_LatestBlockHeight_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockRPC_LatestBlockHeight_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) RunAndReturn(run func(context.Context) (*big.Int, error)) *mockRPC_LatestBlockHeight_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(run) + return _c +} + // 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) @@ -482,6 +1069,34 @@ func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS return r0, r1 } +// mockRPC_LatestFinalizedBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LatestFinalizedBlock' +type mockRPC_LatestFinalizedBlock_Call[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + *mock.Call +} + +// LatestFinalizedBlock is a helper method to define mock.On call +// - ctx context.Context +func (_e *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) LatestFinalizedBlock(ctx interface{}) *mockRPC_LatestFinalizedBlock_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_LatestFinalizedBlock_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{Call: _e.mock.On("LatestFinalizedBlock", ctx)} +} + +func (_c *mockRPC_LatestFinalizedBlock_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Run(run func(ctx context.Context)) *mockRPC_LatestFinalizedBlock_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *mockRPC_LatestFinalizedBlock_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Return(_a0 HEAD, _a1 error) *mockRPC_LatestFinalizedBlock_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockRPC_LatestFinalizedBlock_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) RunAndReturn(run func(context.Context) (HEAD, error)) *mockRPC_LatestFinalizedBlock_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(run) + return _c +} + // 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) @@ -512,6 +1127,35 @@ func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS return r0, r1 } +// mockRPC_PendingCallContract_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PendingCallContract' +type mockRPC_PendingCallContract_Call[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + *mock.Call +} + +// PendingCallContract is a helper method to define mock.On call +// - ctx context.Context +// - msg interface{} +func (_e *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) PendingCallContract(ctx interface{}, msg interface{}) *mockRPC_PendingCallContract_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_PendingCallContract_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{Call: _e.mock.On("PendingCallContract", ctx, msg)} +} + +func (_c *mockRPC_PendingCallContract_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Run(run func(ctx context.Context, msg interface{})) *mockRPC_PendingCallContract_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(interface{})) + }) + return _c +} + +func (_c *mockRPC_PendingCallContract_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Return(rpcErr []byte, extractErr error) *mockRPC_PendingCallContract_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(rpcErr, extractErr) + return _c +} + +func (_c *mockRPC_PendingCallContract_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) RunAndReturn(run func(context.Context, interface{}) ([]byte, error)) *mockRPC_PendingCallContract_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(run) + return _c +} + // PendingSequenceAt provides a mock function with given fields: ctx, addr func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) PendingSequenceAt(ctx context.Context, addr ADDR) (SEQ, error) { ret := _m.Called(ctx, addr) @@ -540,6 +1184,35 @@ func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS return r0, r1 } +// mockRPC_PendingSequenceAt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PendingSequenceAt' +type mockRPC_PendingSequenceAt_Call[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + *mock.Call +} + +// PendingSequenceAt is a helper method to define mock.On call +// - ctx context.Context +// - addr ADDR +func (_e *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) PendingSequenceAt(ctx interface{}, addr interface{}) *mockRPC_PendingSequenceAt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_PendingSequenceAt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{Call: _e.mock.On("PendingSequenceAt", ctx, addr)} +} + +func (_c *mockRPC_PendingSequenceAt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Run(run func(ctx context.Context, addr ADDR)) *mockRPC_PendingSequenceAt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ADDR)) + }) + return _c +} + +func (_c *mockRPC_PendingSequenceAt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Return(_a0 SEQ, _a1 error) *mockRPC_PendingSequenceAt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockRPC_PendingSequenceAt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) RunAndReturn(run func(context.Context, ADDR) (SEQ, error)) *mockRPC_PendingSequenceAt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(run) + return _c +} + // SendEmptyTransaction provides a mock function with given fields: ctx, newTxAttempt, seq, gasLimit, fee, fromAddress func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) SendEmptyTransaction(ctx context.Context, newTxAttempt func(SEQ, uint32, FEE, ADDR) (interface{}, error), seq SEQ, gasLimit uint32, fee FEE, fromAddress ADDR) (string, error) { ret := _m.Called(ctx, newTxAttempt, seq, gasLimit, fee, fromAddress) @@ -568,6 +1241,39 @@ func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS return r0, r1 } +// mockRPC_SendEmptyTransaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendEmptyTransaction' +type mockRPC_SendEmptyTransaction_Call[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + *mock.Call +} + +// SendEmptyTransaction is a helper method to define mock.On call +// - ctx context.Context +// - newTxAttempt func(SEQ , uint32 , FEE , ADDR)(interface{} , error) +// - seq SEQ +// - gasLimit uint32 +// - fee FEE +// - fromAddress ADDR +func (_e *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) SendEmptyTransaction(ctx interface{}, newTxAttempt interface{}, seq interface{}, gasLimit interface{}, fee interface{}, fromAddress interface{}) *mockRPC_SendEmptyTransaction_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_SendEmptyTransaction_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{Call: _e.mock.On("SendEmptyTransaction", ctx, newTxAttempt, seq, gasLimit, fee, fromAddress)} +} + +func (_c *mockRPC_SendEmptyTransaction_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Run(run func(ctx context.Context, newTxAttempt func(SEQ, uint32, FEE, ADDR) (interface{}, error), seq SEQ, gasLimit uint32, fee FEE, fromAddress ADDR)) *mockRPC_SendEmptyTransaction_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(func(SEQ, uint32, FEE, ADDR) (interface{}, error)), args[2].(SEQ), args[3].(uint32), args[4].(FEE), args[5].(ADDR)) + }) + return _c +} + +func (_c *mockRPC_SendEmptyTransaction_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Return(txhash string, err error) *mockRPC_SendEmptyTransaction_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(txhash, err) + return _c +} + +func (_c *mockRPC_SendEmptyTransaction_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) RunAndReturn(run func(context.Context, func(SEQ, uint32, FEE, ADDR) (interface{}, error), SEQ, uint32, FEE, ADDR) (string, error)) *mockRPC_SendEmptyTransaction_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(run) + return _c +} + // SendTransaction provides a mock function with given fields: ctx, tx func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) SendTransaction(ctx context.Context, tx TX) error { ret := _m.Called(ctx, tx) @@ -586,6 +1292,35 @@ func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS return r0 } +// mockRPC_SendTransaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendTransaction' +type mockRPC_SendTransaction_Call[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + *mock.Call +} + +// SendTransaction is a helper method to define mock.On call +// - ctx context.Context +// - tx TX +func (_e *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) SendTransaction(ctx interface{}, tx interface{}) *mockRPC_SendTransaction_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_SendTransaction_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{Call: _e.mock.On("SendTransaction", ctx, tx)} +} + +func (_c *mockRPC_SendTransaction_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Run(run func(ctx context.Context, tx TX)) *mockRPC_SendTransaction_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(TX)) + }) + return _c +} + +func (_c *mockRPC_SendTransaction_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Return(_a0 error) *mockRPC_SendTransaction_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockRPC_SendTransaction_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) RunAndReturn(run func(context.Context, TX) error) *mockRPC_SendTransaction_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(run) + return _c +} + // SequenceAt provides a mock function with given fields: ctx, accountAddress, blockNumber func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) SequenceAt(ctx context.Context, accountAddress ADDR, blockNumber *big.Int) (SEQ, error) { ret := _m.Called(ctx, accountAddress, blockNumber) @@ -614,11 +1349,69 @@ func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS return r0, r1 } +// mockRPC_SequenceAt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SequenceAt' +type mockRPC_SequenceAt_Call[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + *mock.Call +} + +// SequenceAt is a helper method to define mock.On call +// - ctx context.Context +// - accountAddress ADDR +// - blockNumber *big.Int +func (_e *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) SequenceAt(ctx interface{}, accountAddress interface{}, blockNumber interface{}) *mockRPC_SequenceAt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_SequenceAt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{Call: _e.mock.On("SequenceAt", ctx, accountAddress, blockNumber)} +} + +func (_c *mockRPC_SequenceAt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Run(run func(ctx context.Context, accountAddress ADDR, blockNumber *big.Int)) *mockRPC_SequenceAt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ADDR), args[2].(*big.Int)) + }) + return _c +} + +func (_c *mockRPC_SequenceAt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Return(_a0 SEQ, _a1 error) *mockRPC_SequenceAt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockRPC_SequenceAt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) RunAndReturn(run func(context.Context, ADDR, *big.Int) (SEQ, error)) *mockRPC_SequenceAt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(run) + return _c +} + // SetAliveLoopSub provides a mock function with given fields: _a0 func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) SetAliveLoopSub(_a0 types.Subscription) { _m.Called(_a0) } +// mockRPC_SetAliveLoopSub_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetAliveLoopSub' +type mockRPC_SetAliveLoopSub_Call[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + *mock.Call +} + +// SetAliveLoopSub is a helper method to define mock.On call +// - _a0 types.Subscription +func (_e *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) SetAliveLoopSub(_a0 interface{}) *mockRPC_SetAliveLoopSub_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_SetAliveLoopSub_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{Call: _e.mock.On("SetAliveLoopSub", _a0)} +} + +func (_c *mockRPC_SetAliveLoopSub_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Run(run func(_a0 types.Subscription)) *mockRPC_SetAliveLoopSub_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Subscription)) + }) + return _c +} + +func (_c *mockRPC_SetAliveLoopSub_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Return() *mockRPC_SetAliveLoopSub_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return() + return _c +} + +func (_c *mockRPC_SetAliveLoopSub_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) RunAndReturn(run func(types.Subscription)) *mockRPC_SetAliveLoopSub_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(run) + return _c +} + // SimulateTransaction provides a mock function with given fields: ctx, tx func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) SimulateTransaction(ctx context.Context, tx TX) error { ret := _m.Called(ctx, tx) @@ -637,32 +1430,58 @@ func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS return r0 } -// Subscribe provides a mock function with given fields: ctx, channel, args -func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Subscribe(ctx context.Context, channel chan<- HEAD, args ...interface{}) (types.Subscription, error) { - var _ca []interface{} - _ca = append(_ca, ctx, channel) - _ca = append(_ca, args...) - ret := _m.Called(_ca...) +// mockRPC_SimulateTransaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SimulateTransaction' +type mockRPC_SimulateTransaction_Call[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + *mock.Call +} + +// SimulateTransaction is a helper method to define mock.On call +// - ctx context.Context +// - tx TX +func (_e *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) SimulateTransaction(ctx interface{}, tx interface{}) *mockRPC_SimulateTransaction_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_SimulateTransaction_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{Call: _e.mock.On("SimulateTransaction", ctx, tx)} +} + +func (_c *mockRPC_SimulateTransaction_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Run(run func(ctx context.Context, tx TX)) *mockRPC_SimulateTransaction_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(TX)) + }) + return _c +} + +func (_c *mockRPC_SimulateTransaction_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Return(_a0 error) *mockRPC_SimulateTransaction_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockRPC_SimulateTransaction_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) RunAndReturn(run func(context.Context, TX) error) *mockRPC_SimulateTransaction_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(run) + return _c +} + +// SubscribeNewHead provides a mock function with given fields: ctx, channel +func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) SubscribeNewHead(ctx context.Context, channel chan<- HEAD) (types.Subscription, error) { + ret := _m.Called(ctx, channel) if len(ret) == 0 { - panic("no return value specified for Subscribe") + panic("no return value specified for SubscribeNewHead") } var r0 types.Subscription var r1 error - if rf, ok := ret.Get(0).(func(context.Context, chan<- HEAD, ...interface{}) (types.Subscription, error)); ok { - return rf(ctx, channel, args...) + if rf, ok := ret.Get(0).(func(context.Context, chan<- HEAD) (types.Subscription, error)); ok { + return rf(ctx, channel) } - if rf, ok := ret.Get(0).(func(context.Context, chan<- HEAD, ...interface{}) types.Subscription); ok { - r0 = rf(ctx, channel, args...) + if rf, ok := ret.Get(0).(func(context.Context, chan<- HEAD) types.Subscription); ok { + r0 = rf(ctx, channel) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(types.Subscription) } } - if rf, ok := ret.Get(1).(func(context.Context, chan<- HEAD, ...interface{}) error); ok { - r1 = rf(ctx, channel, args...) + if rf, ok := ret.Get(1).(func(context.Context, chan<- HEAD) error); ok { + r1 = rf(ctx, channel) } else { r1 = ret.Error(1) } @@ -670,6 +1489,35 @@ func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS return r0, r1 } +// mockRPC_SubscribeNewHead_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SubscribeNewHead' +type mockRPC_SubscribeNewHead_Call[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + *mock.Call +} + +// SubscribeNewHead is a helper method to define mock.On call +// - ctx context.Context +// - channel chan<- HEAD +func (_e *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) SubscribeNewHead(ctx interface{}, channel interface{}) *mockRPC_SubscribeNewHead_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_SubscribeNewHead_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{Call: _e.mock.On("SubscribeNewHead", ctx, channel)} +} + +func (_c *mockRPC_SubscribeNewHead_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Run(run func(ctx context.Context, channel chan<- HEAD)) *mockRPC_SubscribeNewHead_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(chan<- HEAD)) + }) + return _c +} + +func (_c *mockRPC_SubscribeNewHead_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Return(_a0 types.Subscription, _a1 error) *mockRPC_SubscribeNewHead_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockRPC_SubscribeNewHead_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) RunAndReturn(run func(context.Context, chan<- HEAD) (types.Subscription, error)) *mockRPC_SubscribeNewHead_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(run) + return _c +} + // SubscribersCount provides a mock function with given fields: func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) SubscribersCount() int32 { ret := _m.Called() @@ -688,6 +1536,33 @@ func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS return r0 } +// mockRPC_SubscribersCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SubscribersCount' +type mockRPC_SubscribersCount_Call[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + *mock.Call +} + +// SubscribersCount is a helper method to define mock.On call +func (_e *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) SubscribersCount() *mockRPC_SubscribersCount_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_SubscribersCount_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{Call: _e.mock.On("SubscribersCount")} +} + +func (_c *mockRPC_SubscribersCount_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Run(run func()) *mockRPC_SubscribersCount_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockRPC_SubscribersCount_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Return(_a0 int32) *mockRPC_SubscribersCount_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockRPC_SubscribersCount_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) RunAndReturn(run func() int32) *mockRPC_SubscribersCount_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(run) + return _c +} + // TokenBalance provides a mock function with given fields: ctx, accountAddress, tokenAddress func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) TokenBalance(ctx context.Context, accountAddress ADDR, tokenAddress ADDR) (*big.Int, error) { ret := _m.Called(ctx, accountAddress, tokenAddress) @@ -718,6 +1593,36 @@ func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS return r0, r1 } +// mockRPC_TokenBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TokenBalance' +type mockRPC_TokenBalance_Call[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + *mock.Call +} + +// TokenBalance is a helper method to define mock.On call +// - ctx context.Context +// - accountAddress ADDR +// - tokenAddress ADDR +func (_e *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) TokenBalance(ctx interface{}, accountAddress interface{}, tokenAddress interface{}) *mockRPC_TokenBalance_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_TokenBalance_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{Call: _e.mock.On("TokenBalance", ctx, accountAddress, tokenAddress)} +} + +func (_c *mockRPC_TokenBalance_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Run(run func(ctx context.Context, accountAddress ADDR, tokenAddress ADDR)) *mockRPC_TokenBalance_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ADDR), args[2].(ADDR)) + }) + return _c +} + +func (_c *mockRPC_TokenBalance_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Return(_a0 *big.Int, _a1 error) *mockRPC_TokenBalance_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockRPC_TokenBalance_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) RunAndReturn(run func(context.Context, ADDR, ADDR) (*big.Int, error)) *mockRPC_TokenBalance_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(run) + return _c +} + // TransactionByHash provides a mock function with given fields: ctx, txHash func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) TransactionByHash(ctx context.Context, txHash TX_HASH) (TX, error) { ret := _m.Called(ctx, txHash) @@ -746,6 +1651,35 @@ func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS return r0, r1 } +// mockRPC_TransactionByHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransactionByHash' +type mockRPC_TransactionByHash_Call[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + *mock.Call +} + +// TransactionByHash is a helper method to define mock.On call +// - ctx context.Context +// - txHash TX_HASH +func (_e *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) TransactionByHash(ctx interface{}, txHash interface{}) *mockRPC_TransactionByHash_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_TransactionByHash_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{Call: _e.mock.On("TransactionByHash", ctx, txHash)} +} + +func (_c *mockRPC_TransactionByHash_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Run(run func(ctx context.Context, txHash TX_HASH)) *mockRPC_TransactionByHash_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(TX_HASH)) + }) + return _c +} + +func (_c *mockRPC_TransactionByHash_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Return(_a0 TX, _a1 error) *mockRPC_TransactionByHash_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockRPC_TransactionByHash_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) RunAndReturn(run func(context.Context, TX_HASH) (TX, error)) *mockRPC_TransactionByHash_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(run) + return _c +} + // TransactionReceipt provides a mock function with given fields: ctx, txHash func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) TransactionReceipt(ctx context.Context, txHash TX_HASH) (TX_RECEIPT, error) { ret := _m.Called(ctx, txHash) @@ -774,11 +1708,67 @@ func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS return r0, r1 } +// mockRPC_TransactionReceipt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransactionReceipt' +type mockRPC_TransactionReceipt_Call[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + *mock.Call +} + +// TransactionReceipt is a helper method to define mock.On call +// - ctx context.Context +// - txHash TX_HASH +func (_e *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) TransactionReceipt(ctx interface{}, txHash interface{}) *mockRPC_TransactionReceipt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_TransactionReceipt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{Call: _e.mock.On("TransactionReceipt", ctx, txHash)} +} + +func (_c *mockRPC_TransactionReceipt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Run(run func(ctx context.Context, txHash TX_HASH)) *mockRPC_TransactionReceipt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(TX_HASH)) + }) + return _c +} + +func (_c *mockRPC_TransactionReceipt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Return(_a0 TX_RECEIPT, _a1 error) *mockRPC_TransactionReceipt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockRPC_TransactionReceipt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) RunAndReturn(run func(context.Context, TX_HASH) (TX_RECEIPT, error)) *mockRPC_TransactionReceipt_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(run) + return _c +} + // UnsubscribeAllExceptAliveLoop provides a mock function with given fields: func (_m *mockRPC[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) UnsubscribeAllExceptAliveLoop() { _m.Called() } +// mockRPC_UnsubscribeAllExceptAliveLoop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnsubscribeAllExceptAliveLoop' +type mockRPC_UnsubscribeAllExceptAliveLoop_Call[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}] struct { + *mock.Call +} + +// UnsubscribeAllExceptAliveLoop is a helper method to define mock.On call +func (_e *mockRPC_Expecter[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) UnsubscribeAllExceptAliveLoop() *mockRPC_UnsubscribeAllExceptAliveLoop_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + return &mockRPC_UnsubscribeAllExceptAliveLoop_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]{Call: _e.mock.On("UnsubscribeAllExceptAliveLoop")} +} + +func (_c *mockRPC_UnsubscribeAllExceptAliveLoop_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Run(run func()) *mockRPC_UnsubscribeAllExceptAliveLoop_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockRPC_UnsubscribeAllExceptAliveLoop_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) Return() *mockRPC_UnsubscribeAllExceptAliveLoop_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return() + return _c +} + +func (_c *mockRPC_UnsubscribeAllExceptAliveLoop_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM]) RunAndReturn(run func()) *mockRPC_UnsubscribeAllExceptAliveLoop_Call[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, BATCH_ELEM] { + _c.Call.Return(run) + return _c +} + // newMockRPC creates a new instance of mockRPC. 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 newMockRPC[CHAIN_ID types.ID, SEQ types.Sequence, ADDR types.Hashable, BLOCK_HASH types.Hashable, TX interface{}, TX_HASH types.Hashable, EVENT interface{}, EVENT_OPS interface{}, TX_RECEIPT types.Receipt[TX_HASH, BLOCK_HASH], FEE feetypes.Fee, HEAD types.Head[BLOCK_HASH], BATCH_ELEM interface{}](t interface { diff --git a/common/client/mock_send_only_client_test.go b/common/client/mock_send_only_client_test.go index b07e10ed8ce..a9c9f23b141 100644 --- a/common/client/mock_send_only_client_test.go +++ b/common/client/mock_send_only_client_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package client @@ -14,6 +14,14 @@ type mockSendOnlyClient[CHAIN_ID types.ID] struct { mock.Mock } +type mockSendOnlyClient_Expecter[CHAIN_ID types.ID] struct { + mock *mock.Mock +} + +func (_m *mockSendOnlyClient[CHAIN_ID]) EXPECT() *mockSendOnlyClient_Expecter[CHAIN_ID] { + return &mockSendOnlyClient_Expecter[CHAIN_ID]{mock: &_m.Mock} +} + // ChainID provides a mock function with given fields: _a0 func (_m *mockSendOnlyClient[CHAIN_ID]) ChainID(_a0 context.Context) (CHAIN_ID, error) { ret := _m.Called(_a0) @@ -42,11 +50,66 @@ func (_m *mockSendOnlyClient[CHAIN_ID]) ChainID(_a0 context.Context) (CHAIN_ID, return r0, r1 } +// mockSendOnlyClient_ChainID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChainID' +type mockSendOnlyClient_ChainID_Call[CHAIN_ID types.ID] struct { + *mock.Call +} + +// ChainID is a helper method to define mock.On call +// - _a0 context.Context +func (_e *mockSendOnlyClient_Expecter[CHAIN_ID]) ChainID(_a0 interface{}) *mockSendOnlyClient_ChainID_Call[CHAIN_ID] { + return &mockSendOnlyClient_ChainID_Call[CHAIN_ID]{Call: _e.mock.On("ChainID", _a0)} +} + +func (_c *mockSendOnlyClient_ChainID_Call[CHAIN_ID]) Run(run func(_a0 context.Context)) *mockSendOnlyClient_ChainID_Call[CHAIN_ID] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *mockSendOnlyClient_ChainID_Call[CHAIN_ID]) Return(_a0 CHAIN_ID, _a1 error) *mockSendOnlyClient_ChainID_Call[CHAIN_ID] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *mockSendOnlyClient_ChainID_Call[CHAIN_ID]) RunAndReturn(run func(context.Context) (CHAIN_ID, error)) *mockSendOnlyClient_ChainID_Call[CHAIN_ID] { + _c.Call.Return(run) + return _c +} + // Close provides a mock function with given fields: func (_m *mockSendOnlyClient[CHAIN_ID]) Close() { _m.Called() } +// mockSendOnlyClient_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type mockSendOnlyClient_Close_Call[CHAIN_ID types.ID] struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *mockSendOnlyClient_Expecter[CHAIN_ID]) Close() *mockSendOnlyClient_Close_Call[CHAIN_ID] { + return &mockSendOnlyClient_Close_Call[CHAIN_ID]{Call: _e.mock.On("Close")} +} + +func (_c *mockSendOnlyClient_Close_Call[CHAIN_ID]) Run(run func()) *mockSendOnlyClient_Close_Call[CHAIN_ID] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockSendOnlyClient_Close_Call[CHAIN_ID]) Return() *mockSendOnlyClient_Close_Call[CHAIN_ID] { + _c.Call.Return() + return _c +} + +func (_c *mockSendOnlyClient_Close_Call[CHAIN_ID]) RunAndReturn(run func()) *mockSendOnlyClient_Close_Call[CHAIN_ID] { + _c.Call.Return(run) + return _c +} + // DialHTTP provides a mock function with given fields: func (_m *mockSendOnlyClient[CHAIN_ID]) DialHTTP() error { ret := _m.Called() @@ -65,6 +128,33 @@ func (_m *mockSendOnlyClient[CHAIN_ID]) DialHTTP() error { return r0 } +// mockSendOnlyClient_DialHTTP_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DialHTTP' +type mockSendOnlyClient_DialHTTP_Call[CHAIN_ID types.ID] struct { + *mock.Call +} + +// DialHTTP is a helper method to define mock.On call +func (_e *mockSendOnlyClient_Expecter[CHAIN_ID]) DialHTTP() *mockSendOnlyClient_DialHTTP_Call[CHAIN_ID] { + return &mockSendOnlyClient_DialHTTP_Call[CHAIN_ID]{Call: _e.mock.On("DialHTTP")} +} + +func (_c *mockSendOnlyClient_DialHTTP_Call[CHAIN_ID]) Run(run func()) *mockSendOnlyClient_DialHTTP_Call[CHAIN_ID] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockSendOnlyClient_DialHTTP_Call[CHAIN_ID]) Return(_a0 error) *mockSendOnlyClient_DialHTTP_Call[CHAIN_ID] { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockSendOnlyClient_DialHTTP_Call[CHAIN_ID]) RunAndReturn(run func() error) *mockSendOnlyClient_DialHTTP_Call[CHAIN_ID] { + _c.Call.Return(run) + return _c +} + // newMockSendOnlyClient creates a new instance of mockSendOnlyClient. 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 newMockSendOnlyClient[CHAIN_ID types.ID](t interface { diff --git a/common/client/mock_send_only_node_test.go b/common/client/mock_send_only_node_test.go index 4822c2620b8..53077cd49db 100644 --- a/common/client/mock_send_only_node_test.go +++ b/common/client/mock_send_only_node_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package client @@ -14,6 +14,14 @@ type mockSendOnlyNode[CHAIN_ID types.ID, RPC sendOnlyClient[CHAIN_ID]] struct { mock.Mock } +type mockSendOnlyNode_Expecter[CHAIN_ID types.ID, RPC sendOnlyClient[CHAIN_ID]] struct { + mock *mock.Mock +} + +func (_m *mockSendOnlyNode[CHAIN_ID, RPC]) EXPECT() *mockSendOnlyNode_Expecter[CHAIN_ID, RPC] { + return &mockSendOnlyNode_Expecter[CHAIN_ID, RPC]{mock: &_m.Mock} +} + // Close provides a mock function with given fields: func (_m *mockSendOnlyNode[CHAIN_ID, RPC]) Close() error { ret := _m.Called() @@ -32,6 +40,33 @@ func (_m *mockSendOnlyNode[CHAIN_ID, RPC]) Close() error { return r0 } +// mockSendOnlyNode_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type mockSendOnlyNode_Close_Call[CHAIN_ID types.ID, RPC sendOnlyClient[CHAIN_ID]] struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *mockSendOnlyNode_Expecter[CHAIN_ID, RPC]) Close() *mockSendOnlyNode_Close_Call[CHAIN_ID, RPC] { + return &mockSendOnlyNode_Close_Call[CHAIN_ID, RPC]{Call: _e.mock.On("Close")} +} + +func (_c *mockSendOnlyNode_Close_Call[CHAIN_ID, RPC]) Run(run func()) *mockSendOnlyNode_Close_Call[CHAIN_ID, RPC] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockSendOnlyNode_Close_Call[CHAIN_ID, RPC]) Return(_a0 error) *mockSendOnlyNode_Close_Call[CHAIN_ID, RPC] { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockSendOnlyNode_Close_Call[CHAIN_ID, RPC]) RunAndReturn(run func() error) *mockSendOnlyNode_Close_Call[CHAIN_ID, RPC] { + _c.Call.Return(run) + return _c +} + // ConfiguredChainID provides a mock function with given fields: func (_m *mockSendOnlyNode[CHAIN_ID, RPC]) ConfiguredChainID() CHAIN_ID { ret := _m.Called() @@ -50,6 +85,33 @@ func (_m *mockSendOnlyNode[CHAIN_ID, RPC]) ConfiguredChainID() CHAIN_ID { return r0 } +// mockSendOnlyNode_ConfiguredChainID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ConfiguredChainID' +type mockSendOnlyNode_ConfiguredChainID_Call[CHAIN_ID types.ID, RPC sendOnlyClient[CHAIN_ID]] struct { + *mock.Call +} + +// ConfiguredChainID is a helper method to define mock.On call +func (_e *mockSendOnlyNode_Expecter[CHAIN_ID, RPC]) ConfiguredChainID() *mockSendOnlyNode_ConfiguredChainID_Call[CHAIN_ID, RPC] { + return &mockSendOnlyNode_ConfiguredChainID_Call[CHAIN_ID, RPC]{Call: _e.mock.On("ConfiguredChainID")} +} + +func (_c *mockSendOnlyNode_ConfiguredChainID_Call[CHAIN_ID, RPC]) Run(run func()) *mockSendOnlyNode_ConfiguredChainID_Call[CHAIN_ID, RPC] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockSendOnlyNode_ConfiguredChainID_Call[CHAIN_ID, RPC]) Return(_a0 CHAIN_ID) *mockSendOnlyNode_ConfiguredChainID_Call[CHAIN_ID, RPC] { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockSendOnlyNode_ConfiguredChainID_Call[CHAIN_ID, RPC]) RunAndReturn(run func() CHAIN_ID) *mockSendOnlyNode_ConfiguredChainID_Call[CHAIN_ID, RPC] { + _c.Call.Return(run) + return _c +} + // Name provides a mock function with given fields: func (_m *mockSendOnlyNode[CHAIN_ID, RPC]) Name() string { ret := _m.Called() @@ -68,6 +130,33 @@ func (_m *mockSendOnlyNode[CHAIN_ID, RPC]) Name() string { return r0 } +// mockSendOnlyNode_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type mockSendOnlyNode_Name_Call[CHAIN_ID types.ID, RPC sendOnlyClient[CHAIN_ID]] struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *mockSendOnlyNode_Expecter[CHAIN_ID, RPC]) Name() *mockSendOnlyNode_Name_Call[CHAIN_ID, RPC] { + return &mockSendOnlyNode_Name_Call[CHAIN_ID, RPC]{Call: _e.mock.On("Name")} +} + +func (_c *mockSendOnlyNode_Name_Call[CHAIN_ID, RPC]) Run(run func()) *mockSendOnlyNode_Name_Call[CHAIN_ID, RPC] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockSendOnlyNode_Name_Call[CHAIN_ID, RPC]) Return(_a0 string) *mockSendOnlyNode_Name_Call[CHAIN_ID, RPC] { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockSendOnlyNode_Name_Call[CHAIN_ID, RPC]) RunAndReturn(run func() string) *mockSendOnlyNode_Name_Call[CHAIN_ID, RPC] { + _c.Call.Return(run) + return _c +} + // RPC provides a mock function with given fields: func (_m *mockSendOnlyNode[CHAIN_ID, RPC]) RPC() RPC { ret := _m.Called() @@ -86,6 +175,33 @@ func (_m *mockSendOnlyNode[CHAIN_ID, RPC]) RPC() RPC { return r0 } +// mockSendOnlyNode_RPC_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RPC' +type mockSendOnlyNode_RPC_Call[CHAIN_ID types.ID, RPC sendOnlyClient[CHAIN_ID]] struct { + *mock.Call +} + +// RPC is a helper method to define mock.On call +func (_e *mockSendOnlyNode_Expecter[CHAIN_ID, RPC]) RPC() *mockSendOnlyNode_RPC_Call[CHAIN_ID, RPC] { + return &mockSendOnlyNode_RPC_Call[CHAIN_ID, RPC]{Call: _e.mock.On("RPC")} +} + +func (_c *mockSendOnlyNode_RPC_Call[CHAIN_ID, RPC]) Run(run func()) *mockSendOnlyNode_RPC_Call[CHAIN_ID, RPC] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockSendOnlyNode_RPC_Call[CHAIN_ID, RPC]) Return(_a0 RPC) *mockSendOnlyNode_RPC_Call[CHAIN_ID, RPC] { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockSendOnlyNode_RPC_Call[CHAIN_ID, RPC]) RunAndReturn(run func() RPC) *mockSendOnlyNode_RPC_Call[CHAIN_ID, RPC] { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *mockSendOnlyNode[CHAIN_ID, RPC]) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -104,6 +220,34 @@ func (_m *mockSendOnlyNode[CHAIN_ID, RPC]) Start(_a0 context.Context) error { return r0 } +// mockSendOnlyNode_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type mockSendOnlyNode_Start_Call[CHAIN_ID types.ID, RPC sendOnlyClient[CHAIN_ID]] struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *mockSendOnlyNode_Expecter[CHAIN_ID, RPC]) Start(_a0 interface{}) *mockSendOnlyNode_Start_Call[CHAIN_ID, RPC] { + return &mockSendOnlyNode_Start_Call[CHAIN_ID, RPC]{Call: _e.mock.On("Start", _a0)} +} + +func (_c *mockSendOnlyNode_Start_Call[CHAIN_ID, RPC]) Run(run func(_a0 context.Context)) *mockSendOnlyNode_Start_Call[CHAIN_ID, RPC] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *mockSendOnlyNode_Start_Call[CHAIN_ID, RPC]) Return(_a0 error) *mockSendOnlyNode_Start_Call[CHAIN_ID, RPC] { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockSendOnlyNode_Start_Call[CHAIN_ID, RPC]) RunAndReturn(run func(context.Context) error) *mockSendOnlyNode_Start_Call[CHAIN_ID, RPC] { + _c.Call.Return(run) + return _c +} + // State provides a mock function with given fields: func (_m *mockSendOnlyNode[CHAIN_ID, RPC]) State() nodeState { ret := _m.Called() @@ -122,6 +266,33 @@ func (_m *mockSendOnlyNode[CHAIN_ID, RPC]) State() nodeState { return r0 } +// mockSendOnlyNode_State_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'State' +type mockSendOnlyNode_State_Call[CHAIN_ID types.ID, RPC sendOnlyClient[CHAIN_ID]] struct { + *mock.Call +} + +// State is a helper method to define mock.On call +func (_e *mockSendOnlyNode_Expecter[CHAIN_ID, RPC]) State() *mockSendOnlyNode_State_Call[CHAIN_ID, RPC] { + return &mockSendOnlyNode_State_Call[CHAIN_ID, RPC]{Call: _e.mock.On("State")} +} + +func (_c *mockSendOnlyNode_State_Call[CHAIN_ID, RPC]) Run(run func()) *mockSendOnlyNode_State_Call[CHAIN_ID, RPC] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockSendOnlyNode_State_Call[CHAIN_ID, RPC]) Return(_a0 nodeState) *mockSendOnlyNode_State_Call[CHAIN_ID, RPC] { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockSendOnlyNode_State_Call[CHAIN_ID, RPC]) RunAndReturn(run func() nodeState) *mockSendOnlyNode_State_Call[CHAIN_ID, RPC] { + _c.Call.Return(run) + return _c +} + // String provides a mock function with given fields: func (_m *mockSendOnlyNode[CHAIN_ID, RPC]) String() string { ret := _m.Called() @@ -140,6 +311,33 @@ func (_m *mockSendOnlyNode[CHAIN_ID, RPC]) String() string { return r0 } +// mockSendOnlyNode_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' +type mockSendOnlyNode_String_Call[CHAIN_ID types.ID, RPC sendOnlyClient[CHAIN_ID]] struct { + *mock.Call +} + +// String is a helper method to define mock.On call +func (_e *mockSendOnlyNode_Expecter[CHAIN_ID, RPC]) String() *mockSendOnlyNode_String_Call[CHAIN_ID, RPC] { + return &mockSendOnlyNode_String_Call[CHAIN_ID, RPC]{Call: _e.mock.On("String")} +} + +func (_c *mockSendOnlyNode_String_Call[CHAIN_ID, RPC]) Run(run func()) *mockSendOnlyNode_String_Call[CHAIN_ID, RPC] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *mockSendOnlyNode_String_Call[CHAIN_ID, RPC]) Return(_a0 string) *mockSendOnlyNode_String_Call[CHAIN_ID, RPC] { + _c.Call.Return(_a0) + return _c +} + +func (_c *mockSendOnlyNode_String_Call[CHAIN_ID, RPC]) RunAndReturn(run func() string) *mockSendOnlyNode_String_Call[CHAIN_ID, RPC] { + _c.Call.Return(run) + return _c +} + // newMockSendOnlyNode creates a new instance of mockSendOnlyNode. 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 newMockSendOnlyNode[CHAIN_ID types.ID, RPC sendOnlyClient[CHAIN_ID]](t interface { diff --git a/common/client/mocks/config.go b/common/client/mocks/config.go index 306965a9f5d..d1007f39f0f 100644 --- a/common/client/mocks/config.go +++ b/common/client/mocks/config.go @@ -3,9 +3,10 @@ package mocks import "time" type ChainConfig struct { - IsFinalityTagEnabled bool - FinalityDepthVal uint32 - NoNewHeadsThresholdVal time.Duration + IsFinalityTagEnabled bool + FinalityDepthVal uint32 + NoNewHeadsThresholdVal time.Duration + FinalizedBlockOffsetVal uint32 } func (t ChainConfig) NodeNoNewHeadsThreshold() time.Duration { @@ -19,3 +20,7 @@ func (t ChainConfig) FinalityDepth() uint32 { func (t ChainConfig) FinalityTagEnabled() bool { return t.IsFinalityTagEnabled } + +func (t ChainConfig) FinalizedBlockOffset() uint32 { + return t.FinalizedBlockOffsetVal +} diff --git a/common/client/multi_node.go b/common/client/multi_node.go index 0fc095c2931..4d4ea925fe8 100644 --- a/common/client/multi_node.go +++ b/common/client/multi_node.go @@ -15,8 +15,6 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/assets" "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/services" - "github.com/smartcontractkit/chainlink-common/pkg/utils" - feetypes "github.com/smartcontractkit/chainlink/v2/common/fee/types" "github.com/smartcontractkit/chainlink/v2/common/types" ) @@ -90,18 +88,19 @@ type multiNode[ BATCH_ELEM any, ] struct { services.StateMachine - nodes []Node[CHAIN_ID, HEAD, RPC_CLIENT] - sendonlys []SendOnlyNode[CHAIN_ID, RPC_CLIENT] - chainID CHAIN_ID - lggr logger.SugaredLogger - selectionMode string - noNewHeadsThreshold time.Duration - nodeSelector NodeSelector[CHAIN_ID, HEAD, RPC_CLIENT] - leaseDuration time.Duration - leaseTicker *time.Ticker - chainFamily string - reportInterval time.Duration - sendTxSoftTimeout time.Duration // defines max waiting time from first response til responses evaluation + nodes []Node[CHAIN_ID, HEAD, RPC_CLIENT] + sendonlys []SendOnlyNode[CHAIN_ID, RPC_CLIENT] + chainID CHAIN_ID + lggr logger.SugaredLogger + selectionMode string + noNewHeadsThreshold time.Duration + nodeSelector NodeSelector[CHAIN_ID, HEAD, RPC_CLIENT] + leaseDuration time.Duration + leaseTicker *time.Ticker + chainFamily string + reportInterval time.Duration + deathDeclarationDelay time.Duration + sendTxSoftTimeout time.Duration // defines max waiting time from first response til responses evaluation activeMu sync.RWMutex activeNode Node[CHAIN_ID, HEAD, RPC_CLIENT] @@ -137,6 +136,7 @@ func NewMultiNode[ chainFamily string, classifySendTxError func(tx TX, err error) SendTxReturnCode, sendTxSoftTimeout time.Duration, + deathDeclarationDelay time.Duration, ) MultiNode[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, RPC_CLIENT, BATCH_ELEM] { nodeSelector := newNodeSelector(selectionMode, nodes) // Prometheus' default interval is 15s, set this to under 7.5s to avoid @@ -146,19 +146,20 @@ func NewMultiNode[ sendTxSoftTimeout = QueryTimeout / 2 } c := &multiNode[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, RPC_CLIENT, BATCH_ELEM]{ - nodes: nodes, - sendonlys: sendonlys, - chainID: chainID, - lggr: logger.Sugared(lggr).Named("MultiNode").With("chainID", chainID.String()), - selectionMode: selectionMode, - noNewHeadsThreshold: noNewHeadsThreshold, - nodeSelector: nodeSelector, - chStop: make(services.StopChan), - leaseDuration: leaseDuration, - chainFamily: chainFamily, - classifySendTxError: classifySendTxError, - reportInterval: reportInterval, - sendTxSoftTimeout: sendTxSoftTimeout, + nodes: nodes, + sendonlys: sendonlys, + chainID: chainID, + lggr: logger.Sugared(lggr).Named("MultiNode").With("chainID", chainID.String()), + selectionMode: selectionMode, + noNewHeadsThreshold: noNewHeadsThreshold, + nodeSelector: nodeSelector, + chStop: make(services.StopChan), + leaseDuration: leaseDuration, + chainFamily: chainFamily, + classifySendTxError: classifySendTxError, + reportInterval: reportInterval, + deathDeclarationDelay: deathDeclarationDelay, + sendTxSoftTimeout: sendTxSoftTimeout, } c.lggr.Debugf("The MultiNode is configured to use NodeSelectionMode: %s", selectionMode) @@ -180,14 +181,7 @@ func (c *multiNode[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OP if n.ConfiguredChainID().String() != c.chainID.String() { return ms.CloseBecause(fmt.Errorf("node %s has configured chain ID %s which does not match multinode configured chain ID of %s", n.String(), n.ConfiguredChainID().String(), c.chainID.String())) } - rawNode, ok := n.(*node[CHAIN_ID, HEAD, RPC_CLIENT]) - if ok { - // This is a bit hacky but it allows the node to be aware of - // pool state and prevent certain state transitions that might - // otherwise leave no nodes available. It is better to have one - // node in a degraded state than no nodes at all. - rawNode.nLiveNodes = c.nLiveNodes - } + n.SetPoolChainInfoProvider(c) // node will handle its own redialing and automatic recovery if err := ms.Start(ctx, n); err != nil { return err @@ -253,6 +247,9 @@ func (c *multiNode[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OP return // another goroutine beat us here } + if c.activeNode != nil { + c.activeNode.UnsubscribeAllExceptAliveLoop() + } c.activeNode = c.nodeSelector.Select() if c.activeNode == nil { @@ -265,22 +262,37 @@ func (c *multiNode[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OP return c.activeNode, err } -// nLiveNodes returns the number of currently alive nodes, as well as the highest block number and greatest total difficulty. -// totalDifficulty will be 0 if all nodes return nil. -func (c *multiNode[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, RPC_CLIENT, BATCH_ELEM]) nLiveNodes() (nLiveNodes int, blockNumber int64, totalDifficulty *big.Int) { - totalDifficulty = big.NewInt(0) +// LatestChainInfo - returns number of live nodes available in the pool, so we can prevent the last alive node in a pool from being marked as out-of-sync. +// Return highest ChainInfo most recently received by the alive nodes. +// E.g. If Node A's the most recent block is 10 and highest 15 and for Node B it's - 12 and 14. This method will return 12. +func (c *multiNode[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, RPC_CLIENT, BATCH_ELEM]) LatestChainInfo() (int, ChainInfo) { + var nLiveNodes int + ch := ChainInfo{ + TotalDifficulty: big.NewInt(0), + } for _, n := range c.nodes { - if s, num, td := n.StateAndLatest(); s == nodeStateAlive { + if s, nodeChainInfo := n.StateAndLatest(); s == nodeStateAlive { nLiveNodes++ - if num > blockNumber { - blockNumber = num - } - if td != nil && td.Cmp(totalDifficulty) > 0 { - totalDifficulty = td - } + ch.BlockNumber = max(ch.BlockNumber, nodeChainInfo.BlockNumber) + ch.FinalizedBlockNumber = max(ch.FinalizedBlockNumber, nodeChainInfo.FinalizedBlockNumber) + ch.TotalDifficulty = MaxTotalDifficulty(ch.TotalDifficulty, nodeChainInfo.TotalDifficulty) } } - return + return nLiveNodes, ch +} + +// HighestUserObservations - returns highest ChainInfo ever observed by any user of the MultiNode +func (c *multiNode[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, RPC_CLIENT, BATCH_ELEM]) HighestUserObservations() ChainInfo { + ch := ChainInfo{ + TotalDifficulty: big.NewInt(0), + } + for _, n := range c.nodes { + nodeChainInfo := n.HighestUserObservations() + ch.BlockNumber = max(ch.BlockNumber, nodeChainInfo.BlockNumber) + ch.FinalizedBlockNumber = max(ch.FinalizedBlockNumber, nodeChainInfo.FinalizedBlockNumber) + ch.TotalDifficulty = MaxTotalDifficulty(ch.TotalDifficulty, nodeChainInfo.TotalDifficulty) + } + return ch } func (c *multiNode[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, RPC_CLIENT, BATCH_ELEM]) checkLease() { @@ -295,10 +307,13 @@ func (c *multiNode[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OP } c.activeMu.Lock() + defer c.activeMu.Unlock() if bestNode != c.activeNode { + if c.activeNode != nil { + c.activeNode.UnsubscribeAllExceptAliveLoop() + } c.activeNode = bestNode } - c.activeMu.Unlock() } func (c *multiNode[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, RPC_CLIENT, BATCH_ELEM]) checkLeaseLoop() { @@ -319,52 +334,71 @@ func (c *multiNode[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OP func (c *multiNode[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, RPC_CLIENT, BATCH_ELEM]) runLoop() { defer c.wg.Done() - c.report() + nodeStates := make([]nodeWithState, len(c.nodes)) + for i, n := range c.nodes { + nodeStates[i] = nodeWithState{ + Node: n.String(), + State: n.State().String(), + DeadSince: nil, + } + } + + c.report(nodeStates) - monitor := time.NewTicker(utils.WithJitter(c.reportInterval)) + monitor := services.NewTicker(c.reportInterval) defer monitor.Stop() for { select { case <-monitor.C: - c.report() + c.report(nodeStates) case <-c.chStop: return } } } -func (c *multiNode[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, RPC_CLIENT, BATCH_ELEM]) report() { - type nodeWithState struct { - Node string - State string - } +type nodeWithState struct { + Node string + State string + DeadSince *time.Time +} - var total, dead int +func (c *multiNode[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, RPC_CLIENT, BATCH_ELEM]) report(nodesStateInfo []nodeWithState) { + start := time.Now() + var dead int counts := make(map[nodeState]int) - nodeStates := make([]nodeWithState, len(c.nodes)) for i, n := range c.nodes { state := n.State() - nodeStates[i] = nodeWithState{n.String(), state.String()} - total++ - if state != nodeStateAlive { + counts[state]++ + nodesStateInfo[i].State = state.String() + if state == nodeStateAlive { + nodesStateInfo[i].DeadSince = nil + continue + } + + if nodesStateInfo[i].DeadSince == nil { + nodesStateInfo[i].DeadSince = &start + } + + if start.Sub(*nodesStateInfo[i].DeadSince) >= c.deathDeclarationDelay { dead++ } - counts[state]++ } for _, state := range allNodeStates { count := counts[state] PromMultiNodeRPCNodeStates.WithLabelValues(c.chainFamily, c.chainID.String(), state.String()).Set(float64(count)) } + total := len(c.nodes) live := total - dead - c.lggr.Tracew(fmt.Sprintf("MultiNode state: %d/%d nodes are alive", live, total), "nodeStates", nodeStates) + c.lggr.Tracew(fmt.Sprintf("MultiNode state: %d/%d nodes are alive", live, total), "nodeStates", nodesStateInfo) if total == dead { rerr := fmt.Errorf("no primary nodes available: 0/%d nodes are alive", total) - c.lggr.Criticalw(rerr.Error(), "nodeStates", nodeStates) + c.lggr.Criticalw(rerr.Error(), "nodeStates", nodesStateInfo) c.SvcErrBuffer.Append(rerr) } else if dead > 0 { - c.lggr.Errorw(fmt.Sprintf("At least one primary node is dead: %d/%d nodes are alive", live, total), "nodeStates", nodeStates) + c.lggr.Errorw(fmt.Sprintf("At least one primary node is dead: %d/%d nodes are alive", live, total), "nodeStates", nodesStateInfo) } } @@ -779,12 +813,12 @@ func (c *multiNode[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OP return n.RPC().SimulateTransaction(ctx, tx) } -func (c *multiNode[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, RPC_CLIENT, BATCH_ELEM]) Subscribe(ctx context.Context, channel chan<- HEAD, args ...interface{}) (s types.Subscription, err error) { +func (c *multiNode[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, RPC_CLIENT, BATCH_ELEM]) SubscribeNewHead(ctx context.Context, channel chan<- HEAD) (s types.Subscription, err error) { n, err := c.selectNode() if err != nil { return s, err } - return n.RPC().Subscribe(ctx, channel, args...) + return n.RPC().SubscribeNewHead(ctx, channel) } func (c *multiNode[CHAIN_ID, SEQ, ADDR, BLOCK_HASH, TX, TX_HASH, EVENT, EVENT_OPS, TX_RECEIPT, FEE, HEAD, RPC_CLIENT, BATCH_ELEM]) TokenBalance(ctx context.Context, account ADDR, tokenAddr ADDR) (b *big.Int, err error) { diff --git a/common/client/multi_node_test.go b/common/client/multi_node_test.go index 3076d99b618..ffef0c29d56 100644 --- a/common/client/multi_node_test.go +++ b/common/client/multi_node_test.go @@ -29,16 +29,17 @@ type testMultiNode struct { } type multiNodeOpts struct { - logger logger.Logger - selectionMode string - leaseDuration time.Duration - noNewHeadsThreshold time.Duration - nodes []Node[types.ID, types.Head[Hashable], multiNodeRPCClient] - sendonlys []SendOnlyNode[types.ID, multiNodeRPCClient] - chainID types.ID - chainFamily string - classifySendTxError func(tx any, err error) SendTxReturnCode - sendTxSoftTimeout time.Duration + logger logger.Logger + selectionMode string + leaseDuration time.Duration + noNewHeadsThreshold time.Duration + nodes []Node[types.ID, types.Head[Hashable], multiNodeRPCClient] + sendonlys []SendOnlyNode[types.ID, multiNodeRPCClient] + chainID types.ID + chainFamily string + classifySendTxError func(tx any, err error) SendTxReturnCode + sendTxSoftTimeout time.Duration + deathDeclarationDelay time.Duration } func newTestMultiNode(t *testing.T, opts multiNodeOpts) testMultiNode { @@ -49,7 +50,7 @@ func newTestMultiNode(t *testing.T, opts multiNodeOpts) testMultiNode { result := NewMultiNode[types.ID, *big.Int, Hashable, Hashable, any, Hashable, any, any, types.Receipt[Hashable, Hashable], Hashable, types.Head[Hashable], multiNodeRPCClient, any](opts.logger, opts.selectionMode, opts.leaseDuration, opts.noNewHeadsThreshold, opts.nodes, opts.sendonlys, - opts.chainID, opts.chainFamily, opts.classifySendTxError, opts.sendTxSoftTimeout) + opts.chainID, opts.chainFamily, opts.classifySendTxError, opts.sendTxSoftTimeout, opts.deathDeclarationDelay) return testMultiNode{ result.(*multiNode[types.ID, *big.Int, Hashable, Hashable, any, Hashable, any, any, types.Receipt[Hashable, Hashable], Hashable, types.Head[Hashable], multiNodeRPCClient, any]), @@ -67,14 +68,21 @@ func newHealthyNode(t *testing.T, chainID types.ID) *mockNode[types.ID, types.He } func newNodeWithState(t *testing.T, chainID types.ID, state nodeState) *mockNode[types.ID, types.Head[Hashable], multiNodeRPCClient] { + node := newDialableNode(t, chainID) + node.On("State").Return(state).Maybe() + return node +} + +func newDialableNode(t *testing.T, chainID types.ID) *mockNode[types.ID, types.Head[Hashable], multiNodeRPCClient] { node := newMockNode[types.ID, types.Head[Hashable], multiNodeRPCClient](t) node.On("ConfiguredChainID").Return(chainID).Once() node.On("Start", mock.Anything).Return(nil).Once() node.On("Close").Return(nil).Once() - node.On("State").Return(state).Maybe() node.On("String").Return(fmt.Sprintf("healthy_node_%d", rand.Int())).Maybe() + node.On("SetPoolChainInfoProvider", mock.Anything).Once() return node } + func TestMultiNode_Dial(t *testing.T) { t.Parallel() @@ -111,6 +119,7 @@ func TestMultiNode_Dial(t *testing.T) { node := newMockNode(t) chainID := types.RandomID() node.On("ConfiguredChainID").Return(chainID).Once() + node.On("SetPoolChainInfoProvider", mock.Anything).Once() expectedError := errors.New("failed to start node") node.On("Start", mock.Anything).Return(expectedError).Once() mn := newTestMultiNode(t, multiNodeOpts{ @@ -128,6 +137,7 @@ func TestMultiNode_Dial(t *testing.T) { node1 := newHealthyNode(t, chainID) node2 := newMockNode(t) node2.On("ConfiguredChainID").Return(chainID).Once() + node2.On("SetPoolChainInfoProvider", mock.Anything).Once() expectedError := errors.New("failed to start node") node2.On("Start", mock.Anything).Return(expectedError).Once() @@ -219,6 +229,7 @@ func TestMultiNode_Report(t *testing.T) { logger: lggr, }) mn.reportInterval = tests.TestInterval + mn.deathDeclarationDelay = tests.TestInterval defer func() { assert.NoError(t, mn.Close()) }() err := mn.Dial(tests.Context(t)) require.NoError(t, err) @@ -236,6 +247,7 @@ func TestMultiNode_Report(t *testing.T) { logger: lggr, }) mn.reportInterval = tests.TestInterval + mn.deathDeclarationDelay = tests.TestInterval defer func() { assert.NoError(t, mn.Close()) }() err := mn.Dial(tests.Context(t)) require.NoError(t, err) @@ -377,6 +389,7 @@ func TestMultiNode_selectNode(t *testing.T) { chainID := types.RandomID() oldBest := newMockNode[types.ID, types.Head[Hashable], multiNodeRPCClient](t) oldBest.On("String").Return("oldBest").Maybe() + oldBest.On("UnsubscribeAllExceptAliveLoop").Once() newBest := newMockNode[types.ID, types.Head[Hashable], multiNodeRPCClient](t) newBest.On("String").Return("newBest").Maybe() mn := newTestMultiNode(t, multiNodeOpts{ @@ -417,49 +430,94 @@ func TestMultiNode_selectNode(t *testing.T) { }) } -func TestMultiNode_nLiveNodes(t *testing.T) { +func TestMultiNode_ChainInfo(t *testing.T) { t.Parallel() type nodeParams struct { - BlockNumber int64 - TotalDifficulty *big.Int - State nodeState + LatestChainInfo ChainInfo + HighestUserObservations ChainInfo + State nodeState } testCases := []struct { - Name string - ExpectedNLiveNodes int - ExpectedBlockNumber int64 - ExpectedTotalDifficulty *big.Int - NodeParams []nodeParams + Name string + ExpectedNLiveNodes int + ExpectedLatestChainInfo ChainInfo + ExpectedHighestUserObservations ChainInfo + NodeParams []nodeParams }{ { - Name: "no nodes", - ExpectedTotalDifficulty: big.NewInt(0), + Name: "no nodes", + ExpectedLatestChainInfo: ChainInfo{ + TotalDifficulty: big.NewInt(0), + }, + ExpectedHighestUserObservations: ChainInfo{ + TotalDifficulty: big.NewInt(0), + }, }, { - Name: "Best node is not healthy", - ExpectedTotalDifficulty: big.NewInt(10), - ExpectedBlockNumber: 20, - ExpectedNLiveNodes: 3, + Name: "Best node is not healthy", + ExpectedNLiveNodes: 3, + ExpectedLatestChainInfo: ChainInfo{ + BlockNumber: 20, + FinalizedBlockNumber: 10, + TotalDifficulty: big.NewInt(10), + }, + ExpectedHighestUserObservations: ChainInfo{ + BlockNumber: 1005, + FinalizedBlockNumber: 995, + TotalDifficulty: big.NewInt(2005), + }, NodeParams: []nodeParams{ { - State: nodeStateOutOfSync, - BlockNumber: 1000, - TotalDifficulty: big.NewInt(2000), + State: nodeStateOutOfSync, + LatestChainInfo: ChainInfo{ + BlockNumber: 1000, + FinalizedBlockNumber: 990, + TotalDifficulty: big.NewInt(2000), + }, + HighestUserObservations: ChainInfo{ + BlockNumber: 1005, + FinalizedBlockNumber: 995, + TotalDifficulty: big.NewInt(2005), + }, }, { - State: nodeStateAlive, - BlockNumber: 20, - TotalDifficulty: big.NewInt(9), + State: nodeStateAlive, + LatestChainInfo: ChainInfo{ + BlockNumber: 20, + FinalizedBlockNumber: 10, + TotalDifficulty: big.NewInt(9), + }, + HighestUserObservations: ChainInfo{ + BlockNumber: 25, + FinalizedBlockNumber: 15, + TotalDifficulty: big.NewInt(14), + }, }, { - State: nodeStateAlive, - BlockNumber: 19, - TotalDifficulty: big.NewInt(10), + State: nodeStateAlive, + LatestChainInfo: ChainInfo{ + BlockNumber: 19, + FinalizedBlockNumber: 9, + TotalDifficulty: big.NewInt(10), + }, + HighestUserObservations: ChainInfo{ + BlockNumber: 24, + FinalizedBlockNumber: 14, + TotalDifficulty: big.NewInt(15), + }, }, { - State: nodeStateAlive, - BlockNumber: 11, - TotalDifficulty: nil, + State: nodeStateAlive, + LatestChainInfo: ChainInfo{ + BlockNumber: 11, + FinalizedBlockNumber: 1, + TotalDifficulty: nil, + }, + HighestUserObservations: ChainInfo{ + BlockNumber: 16, + FinalizedBlockNumber: 6, + TotalDifficulty: nil, + }, }, }, }, @@ -475,14 +533,17 @@ func TestMultiNode_nLiveNodes(t *testing.T) { t.Run(tc.Name, func(t *testing.T) { for _, params := range tc.NodeParams { node := newMockNode[types.ID, types.Head[Hashable], multiNodeRPCClient](t) - node.On("StateAndLatest").Return(params.State, params.BlockNumber, params.TotalDifficulty) + node.On("StateAndLatest").Return(params.State, params.LatestChainInfo) + node.On("HighestUserObservations").Return(params.HighestUserObservations) mn.nodes = append(mn.nodes, node) } - nNodes, blockNum, td := mn.nLiveNodes() + nNodes, latestChainInfo := mn.LatestChainInfo() assert.Equal(t, tc.ExpectedNLiveNodes, nNodes) - assert.Equal(t, tc.ExpectedTotalDifficulty, td) - assert.Equal(t, tc.ExpectedBlockNumber, blockNum) + assert.Equal(t, tc.ExpectedLatestChainInfo, latestChainInfo) + + highestChainInfo := mn.HighestUserObservations() + assert.Equal(t, tc.ExpectedHighestUserObservations, highestChainInfo) }) } } diff --git a/common/client/node.go b/common/client/node.go index 869ea89c039..5ea31d65961 100644 --- a/common/client/node.go +++ b/common/client/node.go @@ -4,7 +4,6 @@ import ( "context" "errors" "fmt" - "math/big" "net/url" "sync" "time" @@ -44,29 +43,37 @@ type NodeConfig interface { SyncThreshold() uint32 NodeIsSyncingEnabled() bool FinalizedBlockPollInterval() time.Duration + EnforceRepeatableRead() bool + DeathDeclarationDelay() time.Duration } type ChainConfig interface { NodeNoNewHeadsThreshold() time.Duration FinalityDepth() uint32 FinalityTagEnabled() bool + FinalizedBlockOffset() uint32 } -//go:generate mockery --quiet --name Node --structname mockNode --filename "mock_node_test.go" --inpackage --case=underscore type Node[ CHAIN_ID types.ID, HEAD Head, RPC NodeClient[CHAIN_ID, HEAD], ] interface { - // State returns nodeState + // State returns most accurate state of the Node on the moment of call. + // While some of the checks may be performed in the background and State may return cached value, critical, like + // `FinalizedBlockOutOfSync`, must be executed upon every call. State() nodeState - // StateAndLatest returns nodeState with the latest received block number & total difficulty. - StateAndLatest() (nodeState, int64, *big.Int) + // StateAndLatest returns nodeState with the latest ChainInfo observed by Node during current lifecycle. + StateAndLatest() (nodeState, ChainInfo) + // HighestUserObservations - returns highest ChainInfo ever observed by underlying RPC excluding results of health check requests + HighestUserObservations() ChainInfo + SetPoolChainInfoProvider(PoolChainInfoProvider) // Name is a unique identifier for this node. Name() string String() string RPC() RPC SubscribersCount() int32 + // UnsubscribeAllExceptAliveLoop - closes all subscriptions except the aliveLoop subscription UnsubscribeAllExceptAliveLoop() ConfiguredChainID() CHAIN_ID Order() int32 @@ -96,20 +103,12 @@ type node[ stateMu sync.RWMutex // protects state* fields state nodeState - // Each node is tracking the last received head number and total difficulty - stateLatestBlockNumber int64 - stateLatestTotalDifficulty *big.Int - stateLatestFinalizedBlockNumber int64 + + poolInfoProvider PoolChainInfoProvider stopCh services.StopChan // wg waits for subsidiary goroutines wg sync.WaitGroup - - // nLiveNodes is a passed in function that allows this node to: - // 1. see how many live nodes there are in total, so we can prevent the last alive node in a pool from being - // moved to out-of-sync state. It is better to have one out-of-sync node than no nodes at all. - // 2. compare against the highest head (by number or difficulty) to ensure we don't fall behind too far. - nLiveNodes func() (count int, blockNumber int64, totalDifficulty *big.Int) } func NewNode[ @@ -150,7 +149,6 @@ func NewNode[ "nodeOrder", n.order, ) n.lfcLog = logger.Named(lggr, "Lifecycle") - n.stateLatestBlockNumber = -1 n.rpc = rpc n.chainFamily = chainFamily return n @@ -243,7 +241,7 @@ func (n *node[CHAIN_ID, HEAD, RPC]) verifyChainID(callerCtx context.Context, lgg promPoolRPCNodeVerifiesFailed.WithLabelValues(n.chainFamily, n.chainID.String(), n.name).Inc() } - st := n.State() + st := n.getCachedState() switch st { case nodeStateClosed: // The node is already closed, and any subsequent transition is invalid. @@ -258,7 +256,7 @@ func (n *node[CHAIN_ID, HEAD, RPC]) verifyChainID(callerCtx context.Context, lgg var err error if chainID, err = n.rpc.ChainID(callerCtx); err != nil { promFailed() - lggr.Errorw("Failed to verify chain ID for node", "err", err, "nodeState", n.State()) + lggr.Errorw("Failed to verify chain ID for node", "err", err, "nodeState", n.getCachedState()) return nodeStateUnreachable } else if chainID.String() != n.chainID.String() { promFailed() @@ -269,7 +267,7 @@ func (n *node[CHAIN_ID, HEAD, RPC]) verifyChainID(callerCtx context.Context, lgg n.name, errInvalidChainID, ) - lggr.Errorw("Failed to verify RPC node; remote endpoint returned the wrong chain ID", "err", err, "nodeState", n.State()) + lggr.Errorw("Failed to verify RPC node; remote endpoint returned the wrong chain ID", "err", err, "nodeState", n.getCachedState()) return nodeStateInvalidChainID } @@ -282,7 +280,7 @@ func (n *node[CHAIN_ID, HEAD, RPC]) verifyChainID(callerCtx context.Context, lgg // Returns desired state if one of the verifications fails. Otherwise, returns nodeStateAlive. func (n *node[CHAIN_ID, HEAD, RPC]) createVerifiedConn(ctx context.Context, lggr logger.Logger) nodeState { if err := n.rpc.Dial(ctx); err != nil { - n.lfcLog.Errorw("Dial failed: Node is unreachable", "err", err, "nodeState", n.State()) + n.lfcLog.Errorw("Dial failed: Node is unreachable", "err", err, "nodeState", n.getCachedState()) return nodeStateUnreachable } @@ -300,12 +298,12 @@ func (n *node[CHAIN_ID, HEAD, RPC]) verifyConn(ctx context.Context, lggr logger. if n.nodePoolCfg.NodeIsSyncingEnabled() { isSyncing, err := n.rpc.IsSyncing(ctx) if err != nil { - lggr.Errorw("Unexpected error while verifying RPC node synchronization status", "err", err, "nodeState", n.State()) + lggr.Errorw("Unexpected error while verifying RPC node synchronization status", "err", err, "nodeState", n.getCachedState()) return nodeStateUnreachable } if isSyncing { - lggr.Errorw("Verification failed: Node is syncing", "nodeState", n.State()) + lggr.Errorw("Verification failed: Node is syncing", "nodeState", n.getCachedState()) return nodeStateSyncing } } @@ -323,3 +321,9 @@ func (n *node[CHAIN_ID, HEAD, RPC]) disconnectAll() { func (n *node[CHAIN_ID, HEAD, RPC]) Order() int32 { return n.order } + +func (n *node[CHAIN_ID, HEAD, RPC]) newCtx() (context.Context, context.CancelFunc) { + ctx, cancel := n.stopCh.NewCtx() + ctx = CtxAddHealthCheckFlag(ctx) + return ctx, cancel +} diff --git a/common/client/node_fsm.go b/common/client/node_fsm.go index e9105dcc060..5a5e2554431 100644 --- a/common/client/node_fsm.go +++ b/common/client/node_fsm.go @@ -63,6 +63,8 @@ func (n nodeState) String() string { return "Closed" case nodeStateSyncing: return "Syncing" + case nodeStateFinalizedBlockOutOfSync: + return "FinalizedBlockOutOfSync" default: return fmt.Sprintf("nodeState(%d)", n) } @@ -98,6 +100,8 @@ const ( // to other primary nodes configured in the MultiNode. In contrast, `nodeStateSyncing` represents the internal state of // the node (RPC). nodeStateSyncing + // nodeStateFinalizedBlockOutOfSync - node is lagging behind on latest finalized block + nodeStateFinalizedBlockOutOfSync // nodeStateLen tracks the number of states nodeStateLen ) @@ -115,15 +119,59 @@ func init() { // State allows reading the current state of the node. func (n *node[CHAIN_ID, HEAD, RPC]) State() nodeState { + n.stateMu.RLock() + defer n.stateMu.RUnlock() + return n.recalculateState() +} + +func (n *node[CHAIN_ID, HEAD, RPC]) getCachedState() nodeState { n.stateMu.RLock() defer n.stateMu.RUnlock() return n.state } -func (n *node[CHAIN_ID, HEAD, RPC]) StateAndLatest() (nodeState, int64, *big.Int) { +func (n *node[CHAIN_ID, HEAD, RPC]) recalculateState() nodeState { + if n.state != nodeStateAlive { + return n.state + } + + // double check that node is not lagging on finalized block + if n.nodePoolCfg.EnforceRepeatableRead() && n.isFinalizedBlockOutOfSync() { + return nodeStateFinalizedBlockOutOfSync + } + + return nodeStateAlive +} + +func (n *node[CHAIN_ID, HEAD, RPC]) isFinalizedBlockOutOfSync() bool { + if n.poolInfoProvider == nil { + return false + } + + highestObservedByCaller := n.poolInfoProvider.HighestUserObservations() + latest, _ := n.rpc.GetInterceptedChainInfo() + if n.chainCfg.FinalityTagEnabled() { + return latest.FinalizedBlockNumber < highestObservedByCaller.FinalizedBlockNumber-int64(n.chainCfg.FinalizedBlockOffset()) + } + + return latest.BlockNumber < highestObservedByCaller.BlockNumber-int64(n.chainCfg.FinalizedBlockOffset()) +} + +// StateAndLatest returns nodeState with the latest ChainInfo observed by Node during current lifecycle. +func (n *node[CHAIN_ID, HEAD, RPC]) StateAndLatest() (nodeState, ChainInfo) { n.stateMu.RLock() defer n.stateMu.RUnlock() - return n.state, n.stateLatestBlockNumber, n.stateLatestTotalDifficulty + latest, _ := n.rpc.GetInterceptedChainInfo() + return n.recalculateState(), latest +} + +// HighestUserObservations - returns highest ChainInfo ever observed by external user of the Node +func (n *node[CHAIN_ID, HEAD, RPC]) HighestUserObservations() ChainInfo { + _, highestUserObservations := n.rpc.GetInterceptedChainInfo() + return highestUserObservations +} +func (n *node[CHAIN_ID, HEAD, RPC]) SetPoolChainInfoProvider(poolInfoProvider PoolChainInfoProvider) { + n.poolInfoProvider = poolInfoProvider } // setState is only used by internal state management methods. @@ -243,7 +291,7 @@ func (n *node[CHAIN_ID, HEAD, RPC]) transitionToUnreachable(fn func()) { } func (n *node[CHAIN_ID, HEAD, RPC]) declareState(state nodeState) { - if n.State() == nodeStateClosed { + if n.getCachedState() == nodeStateClosed { return } switch state { diff --git a/common/client/node_lifecycle.go b/common/client/node_lifecycle.go index 5947774e202..39e17bb4972 100644 --- a/common/client/node_lifecycle.go +++ b/common/client/node_lifecycle.go @@ -56,20 +56,11 @@ func zombieNodeCheckInterval(noNewHeadsThreshold time.Duration) time.Duration { return utils.WithJitter(interval) } -func (n *node[CHAIN_ID, HEAD, RPC]) setLatestReceived(blockNumber int64, totalDifficulty *big.Int) { - n.stateMu.Lock() - defer n.stateMu.Unlock() - n.stateLatestBlockNumber = blockNumber - n.stateLatestTotalDifficulty = totalDifficulty -} - const ( msgCannotDisable = "but cannot disable this connection because there are no other RPC endpoints, or all other RPC endpoints are dead." msgDegradedState = "Chainlink is now operating in a degraded state and urgent action is required to resolve the issue" ) -const rpcSubscriptionMethodNewHeads = "newHeads" - // Node is a FSM // Each state has a loop that goes with it, which monitors the node and moves it into another state as necessary. // Only one loop must run at a time. @@ -79,12 +70,12 @@ const rpcSubscriptionMethodNewHeads = "newHeads" // Should only be run ONCE per node, after a successful Dial func (n *node[CHAIN_ID, HEAD, RPC]) aliveLoop() { defer n.wg.Done() - ctx, cancel := n.stopCh.NewCtx() + ctx, cancel := n.newCtx() defer cancel() { // sanity check - state := n.State() + state := n.getCachedState() switch state { case nodeStateAlive: case nodeStateClosed: @@ -99,12 +90,12 @@ func (n *node[CHAIN_ID, HEAD, RPC]) aliveLoop() { pollInterval := n.nodePoolCfg.PollInterval() lggr := logger.Sugared(n.lfcLog).Named("Alive").With("noNewHeadsTimeoutThreshold", noNewHeadsTimeoutThreshold, "pollInterval", pollInterval, "pollFailureThreshold", pollFailureThreshold) - lggr.Tracew("Alive loop starting", "nodeState", n.State()) + lggr.Tracew("Alive loop starting", "nodeState", n.getCachedState()) headsC := make(chan HEAD) - sub, err := n.rpc.Subscribe(ctx, headsC, rpcSubscriptionMethodNewHeads) + sub, err := n.rpc.SubscribeNewHead(ctx, headsC) if err != nil { - lggr.Errorw("Initial subscribe for heads failed", "nodeState", n.State()) + lggr.Errorw("Initial subscribe for heads failed", "nodeState", n.getCachedState()) n.declareUnreachable() return } @@ -116,7 +107,7 @@ func (n *node[CHAIN_ID, HEAD, RPC]) aliveLoop() { var outOfSyncT *time.Ticker var outOfSyncTC <-chan time.Time if noNewHeadsTimeoutThreshold > 0 { - lggr.Debugw("Head liveness checking enabled", "nodeState", n.State()) + lggr.Debugw("Head liveness checking enabled", "nodeState", n.getCachedState()) outOfSyncT = time.NewTicker(noNewHeadsTimeoutThreshold) defer outOfSyncT.Stop() outOfSyncTC = outOfSyncT.C @@ -148,7 +139,7 @@ func (n *node[CHAIN_ID, HEAD, RPC]) aliveLoop() { pollFinalizedHeadCh = pollT.C } - _, highestReceivedBlockNumber, _ := n.StateAndLatest() + localHighestChainInfo, _ := n.rpc.GetInterceptedChainInfo() var pollFailures uint32 for { @@ -157,7 +148,7 @@ func (n *node[CHAIN_ID, HEAD, RPC]) aliveLoop() { return case <-pollCh: promPoolRPCNodePolls.WithLabelValues(n.chainID.String(), n.name).Inc() - lggr.Tracew("Polling for version", "nodeState", n.State(), "pollFailures", pollFailures) + lggr.Tracew("Polling for version", "nodeState", n.getCachedState(), "pollFailures", pollFailures) version, err := func(ctx context.Context) (string, error) { ctx, cancel := context.WithTimeout(ctx, pollInterval) defer cancel() @@ -169,16 +160,16 @@ func (n *node[CHAIN_ID, HEAD, RPC]) aliveLoop() { promPoolRPCNodePollsFailed.WithLabelValues(n.chainID.String(), n.name).Inc() pollFailures++ } - lggr.Warnw(fmt.Sprintf("Poll failure, RPC endpoint %s failed to respond properly", n.String()), "err", err, "pollFailures", pollFailures, "nodeState", n.State()) + lggr.Warnw(fmt.Sprintf("Poll failure, RPC endpoint %s failed to respond properly", n.String()), "err", err, "pollFailures", pollFailures, "nodeState", n.getCachedState()) } else { - lggr.Debugw("Version poll successful", "nodeState", n.State(), "clientVersion", version) + lggr.Debugw("Version poll successful", "nodeState", n.getCachedState(), "clientVersion", version) promPoolRPCNodePollsSuccess.WithLabelValues(n.chainID.String(), n.name).Inc() pollFailures = 0 } if pollFailureThreshold > 0 && pollFailures >= pollFailureThreshold { - lggr.Errorw(fmt.Sprintf("RPC endpoint failed to respond to %d consecutive polls", pollFailures), "pollFailures", pollFailures, "nodeState", n.State()) - if n.nLiveNodes != nil { - if l, _, _ := n.nLiveNodes(); l < 2 { + lggr.Errorw(fmt.Sprintf("RPC endpoint failed to respond to %d consecutive polls", pollFailures), "pollFailures", pollFailures, "nodeState", n.getCachedState()) + if n.poolInfoProvider != nil { + if l, _ := n.poolInfoProvider.LatestChainInfo(); l < 2 { lggr.Criticalf("RPC endpoint failed to respond to polls; %s %s", msgCannotDisable, msgDegradedState) continue } @@ -186,10 +177,10 @@ func (n *node[CHAIN_ID, HEAD, RPC]) aliveLoop() { n.declareUnreachable() return } - _, num, td := n.StateAndLatest() - if outOfSync, liveNodes := n.syncStatus(num, td); outOfSync { + _, ci := n.StateAndLatest() + if outOfSync, liveNodes := n.syncStatus(ci.BlockNumber, ci.TotalDifficulty); outOfSync { // note: there must be another live node for us to be out of sync - lggr.Errorw("RPC endpoint has fallen behind", "blockNumber", num, "totalDifficulty", td, "nodeState", n.State()) + lggr.Errorw("RPC endpoint has fallen behind", "blockNumber", ci.BlockNumber, "totalDifficulty", ci.TotalDifficulty, "nodeState", n.getCachedState()) if liveNodes < 2 { lggr.Criticalf("RPC endpoint has fallen behind; %s %s", msgCannotDisable, msgDegradedState) continue @@ -199,40 +190,39 @@ func (n *node[CHAIN_ID, HEAD, RPC]) aliveLoop() { } case bh, open := <-headsC: if !open { - lggr.Errorw("Subscription channel unexpectedly closed", "nodeState", n.State()) + lggr.Errorw("Subscription channel unexpectedly closed", "nodeState", n.getCachedState()) n.declareUnreachable() return } promPoolRPCNodeNumSeenBlocks.WithLabelValues(n.chainID.String(), n.name).Inc() lggr.Tracew("Got head", "head", bh) - if bh.BlockNumber() > highestReceivedBlockNumber { + if bh.BlockNumber() > localHighestChainInfo.BlockNumber { promPoolRPCNodeHighestSeenBlock.WithLabelValues(n.chainID.String(), n.name).Set(float64(bh.BlockNumber())) - lggr.Tracew("Got higher block number, resetting timer", "latestReceivedBlockNumber", highestReceivedBlockNumber, "blockNumber", bh.BlockNumber(), "nodeState", n.State()) - highestReceivedBlockNumber = bh.BlockNumber() + lggr.Tracew("Got higher block number, resetting timer", "latestReceivedBlockNumber", localHighestChainInfo.BlockNumber, "blockNumber", bh.BlockNumber(), "nodeState", n.getCachedState()) + localHighestChainInfo.BlockNumber = bh.BlockNumber() } else { - lggr.Tracew("Ignoring previously seen block number", "latestReceivedBlockNumber", highestReceivedBlockNumber, "blockNumber", bh.BlockNumber(), "nodeState", n.State()) + lggr.Tracew("Ignoring previously seen block number", "latestReceivedBlockNumber", localHighestChainInfo.BlockNumber, "blockNumber", bh.BlockNumber(), "nodeState", n.getCachedState()) } if outOfSyncT != nil { outOfSyncT.Reset(noNewHeadsTimeoutThreshold) } - n.setLatestReceived(bh.BlockNumber(), bh.BlockDifficulty()) if !n.chainCfg.FinalityTagEnabled() { latestFinalizedBN := max(bh.BlockNumber()-int64(n.chainCfg.FinalityDepth()), 0) - if latestFinalizedBN > n.stateLatestFinalizedBlockNumber { + if latestFinalizedBN > localHighestChainInfo.FinalizedBlockNumber { promPoolRPCNodeHighestFinalizedBlock.WithLabelValues(n.chainID.String(), n.name).Set(float64(latestFinalizedBN)) - n.stateLatestFinalizedBlockNumber = latestFinalizedBN + localHighestChainInfo.FinalizedBlockNumber = latestFinalizedBN } } case err := <-sub.Err(): - lggr.Errorw("Subscription was terminated", "err", err, "nodeState", n.State()) + lggr.Errorw("Subscription was terminated", "err", err, "nodeState", n.getCachedState()) n.declareUnreachable() return case <-outOfSyncTC: // We haven't received a head on the channel for at least the // threshold amount of time, mark it broken - lggr.Errorw(fmt.Sprintf("RPC endpoint detected out of sync; no new heads received for %s (last head received was %v)", noNewHeadsTimeoutThreshold, highestReceivedBlockNumber), "nodeState", n.State(), "latestReceivedBlockNumber", highestReceivedBlockNumber, "noNewHeadsTimeoutThreshold", noNewHeadsTimeoutThreshold) - if n.nLiveNodes != nil { - if l, _, _ := n.nLiveNodes(); l < 2 { + lggr.Errorw(fmt.Sprintf("RPC endpoint detected out of sync; no new heads received for %s (last head received was %v)", noNewHeadsTimeoutThreshold, localHighestChainInfo.BlockNumber), "nodeState", n.getCachedState(), "latestReceivedBlockNumber", localHighestChainInfo.BlockNumber, "noNewHeadsTimeoutThreshold", noNewHeadsTimeoutThreshold) + if n.poolInfoProvider != nil { + if l, _ := n.poolInfoProvider.LatestChainInfo(); l < 2 { lggr.Criticalf("RPC endpoint detected out of sync; %s %s", msgCannotDisable, msgDegradedState) // We don't necessarily want to wait the full timeout to check again, we should // check regularly and log noisily in this state @@ -240,7 +230,7 @@ func (n *node[CHAIN_ID, HEAD, RPC]) aliveLoop() { continue } } - n.declareOutOfSync(func(num int64, td *big.Int) bool { return num < highestReceivedBlockNumber }) + n.declareOutOfSync(func(num int64, td *big.Int) bool { return num < localHighestChainInfo.BlockNumber }) return case <-pollFinalizedHeadCh: latestFinalized, err := func(ctx context.Context) (HEAD, error) { @@ -259,9 +249,9 @@ func (n *node[CHAIN_ID, HEAD, RPC]) aliveLoop() { } latestFinalizedBN := latestFinalized.BlockNumber() - if latestFinalizedBN > n.stateLatestFinalizedBlockNumber { + if latestFinalizedBN > localHighestChainInfo.FinalizedBlockNumber { promPoolRPCNodeHighestFinalizedBlock.WithLabelValues(n.chainID.String(), n.name).Set(float64(latestFinalizedBN)) - n.stateLatestFinalizedBlockNumber = latestFinalizedBN + localHighestChainInfo.FinalizedBlockNumber = latestFinalizedBN } } } @@ -276,7 +266,7 @@ func (n *node[CHAIN_ID, HEAD, RPC]) isOutOfSync(num int64, td *big.Int) (outOfSy // Always returns outOfSync false for SyncThreshold 0. // liveNodes is only included when outOfSync is true. func (n *node[CHAIN_ID, HEAD, RPC]) syncStatus(num int64, td *big.Int) (outOfSync bool, liveNodes int) { - if n.nLiveNodes == nil { + if n.poolInfoProvider == nil { return // skip for tests } threshold := n.nodePoolCfg.SyncThreshold() @@ -284,14 +274,14 @@ func (n *node[CHAIN_ID, HEAD, RPC]) syncStatus(num int64, td *big.Int) (outOfSyn return // disabled } // Check against best node - ln, highest, greatest := n.nLiveNodes() + ln, ci := n.poolInfoProvider.LatestChainInfo() mode := n.nodePoolCfg.SelectionMode() switch mode { case NodeSelectionModeHighestHead, NodeSelectionModeRoundRobin, NodeSelectionModePriorityLevel: - return num < highest-int64(threshold), ln + return num < ci.BlockNumber-int64(threshold), ln case NodeSelectionModeTotalDifficulty: bigThreshold := big.NewInt(int64(threshold)) - return td.Cmp(bigmath.Sub(greatest, bigThreshold)) < 0, ln + return td.Cmp(bigmath.Sub(ci.TotalDifficulty, bigThreshold)) < 0, ln default: panic("unrecognized NodeSelectionMode: " + mode) } @@ -305,12 +295,12 @@ const ( // outOfSyncLoop takes an OutOfSync node and waits until isOutOfSync returns false to go back to live status func (n *node[CHAIN_ID, HEAD, RPC]) outOfSyncLoop(isOutOfSync func(num int64, td *big.Int) bool) { defer n.wg.Done() - ctx, cancel := n.stopCh.NewCtx() + ctx, cancel := n.newCtx() defer cancel() { // sanity check - state := n.State() + state := n.getCachedState() switch state { case nodeStateOutOfSync: case nodeStateClosed: @@ -323,7 +313,7 @@ func (n *node[CHAIN_ID, HEAD, RPC]) outOfSyncLoop(isOutOfSync func(num int64, td outOfSyncAt := time.Now() lggr := logger.Sugared(logger.Named(n.lfcLog, "OutOfSync")) - lggr.Debugw("Trying to revive out-of-sync RPC node", "nodeState", n.State()) + lggr.Debugw("Trying to revive out-of-sync RPC node", "nodeState", n.getCachedState()) // Need to redial since out-of-sync nodes are automatically disconnected state := n.createVerifiedConn(ctx, lggr) @@ -332,12 +322,12 @@ func (n *node[CHAIN_ID, HEAD, RPC]) outOfSyncLoop(isOutOfSync func(num int64, td return } - lggr.Tracew("Successfully subscribed to heads feed on out-of-sync RPC node", "nodeState", n.State()) + lggr.Tracew("Successfully subscribed to heads feed on out-of-sync RPC node", "nodeState", n.getCachedState()) ch := make(chan HEAD) - sub, err := n.rpc.Subscribe(ctx, ch, rpcSubscriptionMethodNewHeads) + sub, err := n.rpc.SubscribeNewHead(ctx, ch) if err != nil { - lggr.Errorw("Failed to subscribe heads on out-of-sync RPC node", "nodeState", n.State(), "err", err) + lggr.Errorw("Failed to subscribe heads on out-of-sync RPC node", "nodeState", n.getCachedState(), "err", err) n.declareUnreachable() return } @@ -349,28 +339,27 @@ func (n *node[CHAIN_ID, HEAD, RPC]) outOfSyncLoop(isOutOfSync func(num int64, td return case head, open := <-ch: if !open { - lggr.Error("Subscription channel unexpectedly closed", "nodeState", n.State()) + lggr.Error("Subscription channel unexpectedly closed", "nodeState", n.getCachedState()) n.declareUnreachable() return } - n.setLatestReceived(head.BlockNumber(), head.BlockDifficulty()) if !isOutOfSync(head.BlockNumber(), head.BlockDifficulty()) { // back in-sync! flip back into alive loop - lggr.Infow(fmt.Sprintf("%s: %s. Node was out-of-sync for %s", msgInSync, n.String(), time.Since(outOfSyncAt)), "blockNumber", head.BlockNumber(), "blockDifficulty", head.BlockDifficulty(), "nodeState", n.State()) + lggr.Infow(fmt.Sprintf("%s: %s. Node was out-of-sync for %s", msgInSync, n.String(), time.Since(outOfSyncAt)), "blockNumber", head.BlockNumber(), "blockDifficulty", head.BlockDifficulty(), "nodeState", n.getCachedState()) n.declareInSync() return } - lggr.Debugw(msgReceivedBlock, "blockNumber", head.BlockNumber(), "blockDifficulty", head.BlockDifficulty(), "nodeState", n.State()) + lggr.Debugw(msgReceivedBlock, "blockNumber", head.BlockNumber(), "blockDifficulty", head.BlockDifficulty(), "nodeState", n.getCachedState()) case <-time.After(zombieNodeCheckInterval(n.chainCfg.NodeNoNewHeadsThreshold())): - if n.nLiveNodes != nil { - if l, _, _ := n.nLiveNodes(); l < 1 { + if n.poolInfoProvider != nil { + if l, _ := n.poolInfoProvider.LatestChainInfo(); l < 1 { lggr.Critical("RPC endpoint is still out of sync, but there are no other available nodes. This RPC node will be forcibly moved back into the live pool in a degraded state") n.declareInSync() return } } case err := <-sub.Err(): - lggr.Errorw("Subscription was terminated", "nodeState", n.State(), "err", err) + lggr.Errorw("Subscription was terminated", "nodeState", n.getCachedState(), "err", err) n.declareUnreachable() return } @@ -379,12 +368,12 @@ func (n *node[CHAIN_ID, HEAD, RPC]) outOfSyncLoop(isOutOfSync func(num int64, td func (n *node[CHAIN_ID, HEAD, RPC]) unreachableLoop() { defer n.wg.Done() - ctx, cancel := n.stopCh.NewCtx() + ctx, cancel := n.newCtx() defer cancel() { // sanity check - state := n.State() + state := n.getCachedState() switch state { case nodeStateUnreachable: case nodeStateClosed: @@ -397,7 +386,7 @@ func (n *node[CHAIN_ID, HEAD, RPC]) unreachableLoop() { unreachableAt := time.Now() lggr := logger.Sugared(logger.Named(n.lfcLog, "Unreachable")) - lggr.Debugw("Trying to revive unreachable RPC node", "nodeState", n.State()) + lggr.Debugw("Trying to revive unreachable RPC node", "nodeState", n.getCachedState()) dialRetryBackoff := iutils.NewRedialBackoff() @@ -406,11 +395,11 @@ func (n *node[CHAIN_ID, HEAD, RPC]) unreachableLoop() { case <-ctx.Done(): return case <-time.After(dialRetryBackoff.Duration()): - lggr.Tracew("Trying to re-dial RPC node", "nodeState", n.State()) + lggr.Tracew("Trying to re-dial RPC node", "nodeState", n.getCachedState()) err := n.rpc.Dial(ctx) if err != nil { - lggr.Errorw(fmt.Sprintf("Failed to redial RPC node; still unreachable: %v", err), "err", err, "nodeState", n.State()) + lggr.Errorw(fmt.Sprintf("Failed to redial RPC node; still unreachable: %v", err), "err", err, "nodeState", n.getCachedState()) continue } @@ -422,7 +411,7 @@ func (n *node[CHAIN_ID, HEAD, RPC]) unreachableLoop() { n.setState(nodeStateUnreachable) continue case nodeStateAlive: - lggr.Infow(fmt.Sprintf("Successfully redialled and verified RPC node %s. Node was offline for %s", n.String(), time.Since(unreachableAt)), "nodeState", n.State()) + lggr.Infow(fmt.Sprintf("Successfully redialled and verified RPC node %s. Node was offline for %s", n.String(), time.Since(unreachableAt)), "nodeState", n.getCachedState()) fallthrough default: n.declareState(state) @@ -434,12 +423,12 @@ func (n *node[CHAIN_ID, HEAD, RPC]) unreachableLoop() { func (n *node[CHAIN_ID, HEAD, RPC]) invalidChainIDLoop() { defer n.wg.Done() - ctx, cancel := n.stopCh.NewCtx() + ctx, cancel := n.newCtx() defer cancel() { // sanity check - state := n.State() + state := n.getCachedState() switch state { case nodeStateInvalidChainID: case nodeStateClosed: @@ -460,7 +449,7 @@ func (n *node[CHAIN_ID, HEAD, RPC]) invalidChainIDLoop() { return } - lggr.Debugw(fmt.Sprintf("Periodically re-checking RPC node %s with invalid chain ID", n.String()), "nodeState", n.State()) + lggr.Debugw(fmt.Sprintf("Periodically re-checking RPC node %s with invalid chain ID", n.String()), "nodeState", n.getCachedState()) chainIDRecheckBackoff := iutils.NewRedialBackoff() @@ -474,7 +463,7 @@ func (n *node[CHAIN_ID, HEAD, RPC]) invalidChainIDLoop() { case nodeStateInvalidChainID: continue case nodeStateAlive: - lggr.Infow(fmt.Sprintf("Successfully verified RPC node. Node was offline for %s", time.Since(invalidAt)), "nodeState", n.State()) + lggr.Infow(fmt.Sprintf("Successfully verified RPC node. Node was offline for %s", time.Since(invalidAt)), "nodeState", n.getCachedState()) fallthrough default: n.declareState(state) @@ -486,12 +475,12 @@ func (n *node[CHAIN_ID, HEAD, RPC]) invalidChainIDLoop() { func (n *node[CHAIN_ID, HEAD, RPC]) syncingLoop() { defer n.wg.Done() - ctx, cancel := n.stopCh.NewCtx() + ctx, cancel := n.newCtx() defer cancel() { // sanity check - state := n.State() + state := n.getCachedState() switch state { case nodeStateSyncing: case nodeStateClosed: @@ -504,7 +493,7 @@ func (n *node[CHAIN_ID, HEAD, RPC]) syncingLoop() { syncingAt := time.Now() lggr := logger.Sugared(logger.Named(n.lfcLog, "Syncing")) - lggr.Debugw(fmt.Sprintf("Periodically re-checking RPC node %s with syncing status", n.String()), "nodeState", n.State()) + lggr.Debugw(fmt.Sprintf("Periodically re-checking RPC node %s with syncing status", n.String()), "nodeState", n.getCachedState()) // Need to redial since syncing nodes are automatically disconnected state := n.createVerifiedConn(ctx, lggr) if state != nodeStateSyncing { @@ -519,20 +508,20 @@ func (n *node[CHAIN_ID, HEAD, RPC]) syncingLoop() { case <-ctx.Done(): return case <-time.After(recheckBackoff.Duration()): - lggr.Tracew("Trying to recheck if the node is still syncing", "nodeState", n.State()) + lggr.Tracew("Trying to recheck if the node is still syncing", "nodeState", n.getCachedState()) isSyncing, err := n.rpc.IsSyncing(ctx) if err != nil { - lggr.Errorw("Unexpected error while verifying RPC node synchronization status", "err", err, "nodeState", n.State()) + lggr.Errorw("Unexpected error while verifying RPC node synchronization status", "err", err, "nodeState", n.getCachedState()) n.declareUnreachable() return } if isSyncing { - lggr.Errorw("Verification failed: Node is syncing", "nodeState", n.State()) + lggr.Errorw("Verification failed: Node is syncing", "nodeState", n.getCachedState()) continue } - lggr.Infow(fmt.Sprintf("Successfully verified RPC node. Node was syncing for %s", time.Since(syncingAt)), "nodeState", n.State()) + lggr.Infow(fmt.Sprintf("Successfully verified RPC node. Node was syncing for %s", time.Since(syncingAt)), "nodeState", n.getCachedState()) n.declareAlive() return } diff --git a/common/client/node_lifecycle_test.go b/common/client/node_lifecycle_test.go index 4bdfd698f7a..863a15a1fad 100644 --- a/common/client/node_lifecycle_test.go +++ b/common/client/node_lifecycle_test.go @@ -15,7 +15,6 @@ import ( "go.uber.org/zap" "github.com/smartcontractkit/chainlink-common/pkg/logger" - bigmath "github.com/smartcontractkit/chainlink-common/pkg/utils/big_math" "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" clientMocks "github.com/smartcontractkit/chainlink/v2/common/client/mocks" @@ -49,8 +48,8 @@ func TestUnit_NodeLifecycle_aliveLoop(t *testing.T) { defer func() { assert.NoError(t, node.close()) }() expectedError := errors.New("failed to subscribe to rpc") - rpc.On("Subscribe", mock.Anything, mock.Anything, rpcSubscriptionMethodNewHeads).Return(nil, expectedError).Once() rpc.On("DisconnectAll").Once() + rpc.On("SubscribeNewHead", mock.Anything, mock.Anything).Return(nil, expectedError).Once() // might be called in unreachable loop rpc.On("Dial", mock.Anything).Return(errors.New("failed to dial")).Maybe() node.declareAlive() @@ -67,6 +66,7 @@ func TestUnit_NodeLifecycle_aliveLoop(t *testing.T) { rpc: rpc, lggr: lggr, }) + rpc.On("GetInterceptedChainInfo").Return(ChainInfo{}, ChainInfo{}).Once() defer func() { assert.NoError(t, node.close()) }() sub := mocks.NewSubscription(t) @@ -74,7 +74,7 @@ func TestUnit_NodeLifecycle_aliveLoop(t *testing.T) { close(errChan) sub.On("Err").Return((<-chan error)(errChan)).Once() sub.On("Unsubscribe").Once() - rpc.On("Subscribe", mock.Anything, mock.Anything, rpcSubscriptionMethodNewHeads).Return(sub, nil).Once() + rpc.On("SubscribeNewHead", mock.Anything, mock.Anything).Return(sub, nil).Once() rpc.On("SetAliveLoopSub", sub).Once() // disconnects all on transfer to unreachable rpc.On("DisconnectAll").Once() @@ -89,13 +89,14 @@ func TestUnit_NodeLifecycle_aliveLoop(t *testing.T) { sub := mocks.NewSubscription(t) sub.On("Err").Return((<-chan error)(nil)) sub.On("Unsubscribe").Once() - opts.rpc.On("Subscribe", mock.Anything, mock.Anything, rpcSubscriptionMethodNewHeads).Return(sub, nil).Once() + opts.rpc.On("SubscribeNewHead", mock.Anything, mock.Anything).Return(sub, nil).Once() opts.rpc.On("SetAliveLoopSub", sub).Once() return newDialedNode(t, opts) } t.Run("Stays alive and waits for signal", func(t *testing.T) { t.Parallel() rpc := newMockNodeClient[types.ID, Head](t) + rpc.On("GetInterceptedChainInfo").Return(ChainInfo{}, ChainInfo{}).Once() lggr, observedLogs := logger.TestObserved(t, zap.DebugLevel) node := newSubscribedNode(t, testNodeOpts{ config: testNodeConfig{}, @@ -111,6 +112,7 @@ func TestUnit_NodeLifecycle_aliveLoop(t *testing.T) { t.Run("stays alive while below pollFailureThreshold and resets counter on success", func(t *testing.T) { t.Parallel() rpc := newMockNodeClient[types.ID, Head](t) + rpc.On("GetInterceptedChainInfo").Return(ChainInfo{}, ChainInfo{}) lggr, observedLogs := logger.TestObserved(t, zap.DebugLevel) const pollFailureThreshold = 3 node := newSubscribedNode(t, testNodeOpts{ @@ -152,6 +154,7 @@ func TestUnit_NodeLifecycle_aliveLoop(t *testing.T) { t.Run("with threshold poll failures, transitions to unreachable", func(t *testing.T) { t.Parallel() rpc := newMockNodeClient[types.ID, Head](t) + rpc.On("GetInterceptedChainInfo").Return(ChainInfo{}, ChainInfo{}) lggr, observedLogs := logger.TestObserved(t, zap.DebugLevel) const pollFailureThreshold = 3 node := newSubscribedNode(t, testNodeOpts{ @@ -189,9 +192,12 @@ func TestUnit_NodeLifecycle_aliveLoop(t *testing.T) { lggr: lggr, }) defer func() { assert.NoError(t, node.close()) }() - node.nLiveNodes = func() (count int, blockNumber int64, totalDifficulty *big.Int) { - return 1, 20, big.NewInt(10) - } + poolInfo := newMockPoolChainInfoProvider(t) + poolInfo.On("LatestChainInfo").Return(1, ChainInfo{ + BlockNumber: 20, + }).Once() + node.SetPoolChainInfoProvider(poolInfo) + rpc.On("GetInterceptedChainInfo").Return(ChainInfo{BlockNumber: 20}, ChainInfo{BlockNumber: 20}) pollError := errors.New("failed to get ClientVersion") rpc.On("ClientVersion", mock.Anything).Return("", pollError) node.declareAlive() @@ -213,10 +219,14 @@ func TestUnit_NodeLifecycle_aliveLoop(t *testing.T) { lggr: lggr, }) defer func() { assert.NoError(t, node.close()) }() - node.stateLatestBlockNumber = 20 - node.nLiveNodes = func() (count int, blockNumber int64, totalDifficulty *big.Int) { - return 10, syncThreshold + node.stateLatestBlockNumber + 1, big.NewInt(10) - } + const mostRecentBlock = 20 + rpc.On("GetInterceptedChainInfo").Return(ChainInfo{BlockNumber: mostRecentBlock}, ChainInfo{BlockNumber: 30}) + poolInfo := newMockPoolChainInfoProvider(t) + poolInfo.On("LatestChainInfo").Return(10, ChainInfo{ + BlockNumber: syncThreshold + mostRecentBlock + 1, + TotalDifficulty: big.NewInt(10), + }).Once() + node.SetPoolChainInfoProvider(poolInfo) rpc.On("ClientVersion", mock.Anything).Return("", nil) // tries to redial in outOfSync rpc.On("Dial", mock.Anything).Return(errors.New("failed to dial")).Run(func(_ mock.Arguments) { @@ -246,10 +256,14 @@ func TestUnit_NodeLifecycle_aliveLoop(t *testing.T) { lggr: lggr, }) defer func() { assert.NoError(t, node.close()) }() - node.stateLatestBlockNumber = 20 - node.nLiveNodes = func() (count int, blockNumber int64, totalDifficulty *big.Int) { - return 1, syncThreshold + node.stateLatestBlockNumber + 1, big.NewInt(10) - } + const mostRecentBlock = 20 + rpc.On("GetInterceptedChainInfo").Return(ChainInfo{BlockNumber: mostRecentBlock}, ChainInfo{BlockNumber: 30}) + poolInfo := newMockPoolChainInfoProvider(t) + poolInfo.On("LatestChainInfo").Return(1, ChainInfo{ + BlockNumber: syncThreshold + mostRecentBlock + 1, + TotalDifficulty: big.NewInt(10), + }).Once() + node.SetPoolChainInfoProvider(poolInfo) rpc.On("ClientVersion", mock.Anything).Return("", nil) node.declareAlive() tests.AssertLogEventually(t, observedLogs, fmt.Sprintf("RPC endpoint has fallen behind; %s %s", msgCannotDisable, msgDegradedState)) @@ -268,19 +282,17 @@ func TestUnit_NodeLifecycle_aliveLoop(t *testing.T) { lggr: lggr, }) defer func() { assert.NoError(t, node.close()) }() - node.stateLatestBlockNumber = 20 - node.nLiveNodes = func() (count int, blockNumber int64, totalDifficulty *big.Int) { - return 1, node.stateLatestBlockNumber + 100, big.NewInt(10) - } + const mostRecentBlock = 20 + rpc.On("GetInterceptedChainInfo").Return(ChainInfo{BlockNumber: mostRecentBlock}, ChainInfo{BlockNumber: 30}) rpc.On("ClientVersion", mock.Anything).Return("", nil) node.declareAlive() tests.AssertLogCountEventually(t, observedLogs, "Version poll successful", 2) assert.Equal(t, nodeStateAlive, node.State()) }) - t.Run("when no new heads received for threshold, transitions to out of sync", func(t *testing.T) { t.Parallel() rpc := newMockNodeClient[types.ID, Head](t) + rpc.On("GetInterceptedChainInfo").Return(ChainInfo{}, ChainInfo{}).Once() node := newSubscribedNode(t, testNodeOpts{ config: testNodeConfig{}, chainConfig: clientMocks.ChainConfig{ @@ -307,6 +319,7 @@ func TestUnit_NodeLifecycle_aliveLoop(t *testing.T) { t.Run("when no new heads received for threshold but we are the last live node, forcibly stays alive", func(t *testing.T) { t.Parallel() rpc := newMockNodeClient[types.ID, Head](t) + rpc.On("GetInterceptedChainInfo").Return(ChainInfo{}, ChainInfo{}).Once() lggr, observedLogs := logger.TestObserved(t, zap.DebugLevel) node := newSubscribedNode(t, testNodeOpts{ config: testNodeConfig{}, @@ -317,21 +330,24 @@ func TestUnit_NodeLifecycle_aliveLoop(t *testing.T) { rpc: rpc, }) defer func() { assert.NoError(t, node.close()) }() - node.nLiveNodes = func() (count int, blockNumber int64, totalDifficulty *big.Int) { - return 1, 20, big.NewInt(10) - } + poolInfo := newMockPoolChainInfoProvider(t) + poolInfo.On("LatestChainInfo").Return(1, ChainInfo{ + BlockNumber: 20, + TotalDifficulty: big.NewInt(10), + }).Once() + node.SetPoolChainInfoProvider(poolInfo) node.declareAlive() tests.AssertLogEventually(t, observedLogs, fmt.Sprintf("RPC endpoint detected out of sync; %s %s", msgCannotDisable, msgDegradedState)) assert.Equal(t, nodeStateAlive, node.State()) }) - t.Run("rpc closed head channel", func(t *testing.T) { t.Parallel() rpc := newMockNodeClient[types.ID, Head](t) + rpc.On("GetInterceptedChainInfo").Return(ChainInfo{}, ChainInfo{}).Once() sub := mocks.NewSubscription(t) sub.On("Err").Return((<-chan error)(nil)) sub.On("Unsubscribe").Once() - rpc.On("Subscribe", mock.Anything, mock.Anything, rpcSubscriptionMethodNewHeads).Run(func(args mock.Arguments) { + rpc.On("SubscribeNewHead", mock.Anything, mock.Anything).Run(func(args mock.Arguments) { ch := args.Get(1).(chan<- Head) close(ch) }).Return(sub, nil).Once() @@ -354,30 +370,6 @@ func TestUnit_NodeLifecycle_aliveLoop(t *testing.T) { tests.AssertLogEventually(t, observedLogs, "Subscription channel unexpectedly closed") assert.Equal(t, nodeStateUnreachable, node.State()) }) - t.Run("updates block number and difficulty on new head", func(t *testing.T) { - t.Parallel() - rpc := newMockNodeClient[types.ID, Head](t) - sub := mocks.NewSubscription(t) - sub.On("Err").Return((<-chan error)(nil)) - sub.On("Unsubscribe").Once() - expectedBlockNumber := rand.Int64() - expectedDiff := big.NewInt(rand.Int64()) - rpc.On("Subscribe", mock.Anything, mock.Anything, rpcSubscriptionMethodNewHeads).Run(func(args mock.Arguments) { - ch := args.Get(1).(chan<- Head) - go writeHeads(t, ch, head{BlockNumber: expectedBlockNumber, BlockDifficulty: expectedDiff}) - }).Return(sub, nil).Once() - rpc.On("SetAliveLoopSub", sub).Once() - node := newDialedNode(t, testNodeOpts{ - config: testNodeConfig{}, - rpc: rpc, - }) - defer func() { assert.NoError(t, node.close()) }() - node.declareAlive() - tests.AssertEventually(t, func() bool { - state, block, diff := node.StateAndLatest() - return state == nodeStateAlive && block == expectedBlockNumber == bigmath.Equal(diff, expectedDiff) - }) - }) t.Run("If finality tag is not enabled updates finalized block metric using finality depth and latest head", func(t *testing.T) { t.Parallel() rpc := newMockNodeClient[types.ID, Head](t) @@ -387,7 +379,8 @@ func TestUnit_NodeLifecycle_aliveLoop(t *testing.T) { const blockNumber = 1000 const finalityDepth = 10 const expectedBlock = 990 - rpc.On("Subscribe", mock.Anything, mock.Anything, rpcSubscriptionMethodNewHeads).Run(func(args mock.Arguments) { + rpc.On("GetInterceptedChainInfo").Return(ChainInfo{}, ChainInfo{}).Once() + rpc.On("SubscribeNewHead", mock.Anything, mock.Anything).Run(func(args mock.Arguments) { ch := args.Get(1).(chan<- Head) go writeHeads(t, ch, head{BlockNumber: blockNumber - 1}, head{BlockNumber: blockNumber}, head{BlockNumber: blockNumber - 1}) }).Return(sub, nil).Once() @@ -413,11 +406,12 @@ func TestUnit_NodeLifecycle_aliveLoop(t *testing.T) { t.Run("Logs warning if failed to get finalized block", func(t *testing.T) { t.Parallel() rpc := newMockNodeClient[types.ID, Head](t) + rpc.On("GetInterceptedChainInfo").Return(ChainInfo{}, ChainInfo{}).Once() rpc.On("LatestFinalizedBlock", mock.Anything).Return(newMockHead(t), errors.New("failed to get finalized block")) sub := mocks.NewSubscription(t) sub.On("Err").Return((<-chan error)(nil)) sub.On("Unsubscribe").Once() - rpc.On("Subscribe", mock.Anything, mock.Anything, rpcSubscriptionMethodNewHeads).Return(sub, nil).Once() + rpc.On("SubscribeNewHead", mock.Anything, mock.Anything).Return(sub, nil).Once() rpc.On("SetAliveLoopSub", sub).Once() lggr, observedLogs := logger.TestObserved(t, zap.DebugLevel) node := newDialedNode(t, testNodeOpts{ @@ -440,10 +434,11 @@ func TestUnit_NodeLifecycle_aliveLoop(t *testing.T) { head := newMockHead(t) head.On("IsValid").Return(false) rpc.On("LatestFinalizedBlock", mock.Anything).Return(head, nil) + rpc.On("GetInterceptedChainInfo").Return(ChainInfo{}, ChainInfo{}).Once() sub := mocks.NewSubscription(t) sub.On("Err").Return((<-chan error)(nil)) sub.On("Unsubscribe").Once() - rpc.On("Subscribe", mock.Anything, mock.Anything, rpcSubscriptionMethodNewHeads).Return(sub, nil).Once() + rpc.On("SubscribeNewHead", mock.Anything, mock.Anything).Return(sub, nil).Once() rpc.On("SetAliveLoopSub", sub).Once() lggr, observedLogs := logger.TestObserved(t, zap.DebugLevel) node := newDialedNode(t, testNodeOpts{ @@ -470,12 +465,13 @@ func TestUnit_NodeLifecycle_aliveLoop(t *testing.T) { sub := mocks.NewSubscription(t) sub.On("Err").Return((<-chan error)(nil)) sub.On("Unsubscribe").Once() - rpc.On("Subscribe", mock.Anything, mock.Anything, rpcSubscriptionMethodNewHeads).Run(func(args mock.Arguments) { + rpc.On("SubscribeNewHead", mock.Anything, mock.Anything).Run(func(args mock.Arguments) { ch := args.Get(1).(chan<- Head) // ensure that "calculated" finalized head is larger than actual, to ensure we are correctly setting // the metric go writeHeads(t, ch, head{BlockNumber: expectedBlock*2 + finalityDepth}) }).Return(sub, nil).Once() + rpc.On("GetInterceptedChainInfo").Return(ChainInfo{}, ChainInfo{}).Once() rpc.On("SetAliveLoopSub", sub).Once() name := "node-" + rand.Str(5) node := newDialedNode(t, testNodeOpts{ @@ -531,8 +527,9 @@ func setupRPCForAliveLoop(t *testing.T, rpc *mockNodeClient[types.ID, Head]) { aliveSubscription := mocks.NewSubscription(t) aliveSubscription.On("Err").Return((<-chan error)(nil)).Maybe() aliveSubscription.On("Unsubscribe").Maybe() - rpc.On("Subscribe", mock.Anything, mock.Anything, rpcSubscriptionMethodNewHeads).Return(aliveSubscription, nil).Maybe() + rpc.On("SubscribeNewHead", mock.Anything, mock.Anything).Return(aliveSubscription, nil).Maybe() rpc.On("SetAliveLoopSub", mock.Anything).Maybe() + rpc.On("GetInterceptedChainInfo").Return(ChainInfo{}, ChainInfo{}).Maybe() } func TestUnit_NodeLifecycle_outOfSyncLoop(t *testing.T) { @@ -577,7 +574,7 @@ func TestUnit_NodeLifecycle_outOfSyncLoop(t *testing.T) { outOfSyncSubscription.On("Err").Return((<-chan error)(nil)) outOfSyncSubscription.On("Unsubscribe").Once() heads := []head{{BlockNumber: 7}, {BlockNumber: 11}, {BlockNumber: 13}} - rpc.On("Subscribe", mock.Anything, mock.Anything, rpcSubscriptionMethodNewHeads).Run(func(args mock.Arguments) { + rpc.On("SubscribeNewHead", mock.Anything, mock.Anything).Run(func(args mock.Arguments) { ch := args.Get(1).(chan<- Head) go writeHeads(t, ch, heads...) }).Return(outOfSyncSubscription, nil).Once() @@ -701,7 +698,7 @@ func TestUnit_NodeLifecycle_outOfSyncLoop(t *testing.T) { rpc.On("Dial", mock.Anything).Return(nil).Once() rpc.On("ChainID", mock.Anything).Return(nodeChainID, nil).Once() expectedError := errors.New("failed to subscribe") - rpc.On("Subscribe", mock.Anything, mock.Anything, rpcSubscriptionMethodNewHeads).Return(nil, expectedError) + rpc.On("SubscribeNewHead", mock.Anything, mock.Anything).Return(nil, expectedError) rpc.On("Dial", mock.Anything).Return(errors.New("failed to redial")).Maybe() node.declareOutOfSync(stubIsOutOfSync) tests.AssertEventually(t, func() bool { @@ -728,7 +725,7 @@ func TestUnit_NodeLifecycle_outOfSyncLoop(t *testing.T) { errChan <- errors.New("subscription was terminate") sub.On("Err").Return((<-chan error)(errChan)) sub.On("Unsubscribe").Once() - rpc.On("Subscribe", mock.Anything, mock.Anything, rpcSubscriptionMethodNewHeads).Return(sub, nil).Once() + rpc.On("SubscribeNewHead", mock.Anything, mock.Anything).Return(sub, nil).Once() rpc.On("Dial", mock.Anything).Return(errors.New("failed to redial")).Maybe() node.declareOutOfSync(stubIsOutOfSync) tests.AssertLogEventually(t, observedLogs, "Subscription was terminated") @@ -754,7 +751,7 @@ func TestUnit_NodeLifecycle_outOfSyncLoop(t *testing.T) { sub := mocks.NewSubscription(t) sub.On("Err").Return((<-chan error)(nil)) sub.On("Unsubscribe").Once() - rpc.On("Subscribe", mock.Anything, mock.Anything, rpcSubscriptionMethodNewHeads).Run(func(args mock.Arguments) { + rpc.On("SubscribeNewHead", mock.Anything, mock.Anything).Run(func(args mock.Arguments) { ch := args.Get(1).(chan<- Head) close(ch) }).Return(sub, nil).Once() @@ -785,10 +782,11 @@ func TestUnit_NodeLifecycle_outOfSyncLoop(t *testing.T) { outOfSyncSubscription.On("Err").Return((<-chan error)(nil)) outOfSyncSubscription.On("Unsubscribe").Once() const highestBlock = 1000 - rpc.On("Subscribe", mock.Anything, mock.Anything, rpcSubscriptionMethodNewHeads).Run(func(args mock.Arguments) { + rpc.On("SubscribeNewHead", mock.Anything, mock.Anything).Run(func(args mock.Arguments) { ch := args.Get(1).(chan<- Head) go writeHeads(t, ch, head{BlockNumber: highestBlock - 1}, head{BlockNumber: highestBlock}) }).Return(outOfSyncSubscription, nil).Once() + rpc.On("GetInterceptedChainInfo").Return(ChainInfo{BlockNumber: highestBlock}, ChainInfo{BlockNumber: highestBlock}) setupRPCForAliveLoop(t, rpc) @@ -815,9 +813,13 @@ func TestUnit_NodeLifecycle_outOfSyncLoop(t *testing.T) { lggr: lggr, }) defer func() { assert.NoError(t, node.close()) }() - node.nLiveNodes = func() (count int, blockNumber int64, totalDifficulty *big.Int) { - return 0, 100, big.NewInt(200) - } + poolInfo := newMockPoolChainInfoProvider(t) + poolInfo.On("LatestChainInfo").Return(0, ChainInfo{ + BlockNumber: 100, + TotalDifficulty: big.NewInt(200), + }) + node.SetPoolChainInfoProvider(poolInfo) + rpc.On("GetInterceptedChainInfo").Return(ChainInfo{BlockNumber: 0}, ChainInfo{BlockNumber: 0}) rpc.On("Dial", mock.Anything).Return(nil).Once() rpc.On("ChainID", mock.Anything).Return(nodeChainID, nil).Once() @@ -825,7 +827,7 @@ func TestUnit_NodeLifecycle_outOfSyncLoop(t *testing.T) { outOfSyncSubscription := mocks.NewSubscription(t) outOfSyncSubscription.On("Err").Return((<-chan error)(nil)) outOfSyncSubscription.On("Unsubscribe").Once() - rpc.On("Subscribe", mock.Anything, mock.Anything, rpcSubscriptionMethodNewHeads).Return(outOfSyncSubscription, nil).Once() + rpc.On("SubscribeNewHead", mock.Anything, mock.Anything).Return(outOfSyncSubscription, nil).Once() setupRPCForAliveLoop(t, rpc) @@ -1304,9 +1306,8 @@ func TestUnit_NodeLifecycle_syncStatus(t *testing.T) { }) t.Run("skip if syncThreshold is not configured", func(t *testing.T) { node := newTestNode(t, testNodeOpts{}) - node.nLiveNodes = func() (count int, blockNumber int64, totalDifficulty *big.Int) { - return - } + poolInfo := newMockPoolChainInfoProvider(t) + node.SetPoolChainInfoProvider(poolInfo) outOfSync, liveNodes := node.syncStatus(0, nil) assert.Equal(t, false, outOfSync) assert.Equal(t, 0, liveNodes) @@ -1315,9 +1316,9 @@ func TestUnit_NodeLifecycle_syncStatus(t *testing.T) { node := newTestNode(t, testNodeOpts{ config: testNodeConfig{syncThreshold: 1}, }) - node.nLiveNodes = func() (count int, blockNumber int64, totalDifficulty *big.Int) { - return - } + poolInfo := newMockPoolChainInfoProvider(t) + poolInfo.On("LatestChainInfo").Return(1, ChainInfo{}).Once() + node.SetPoolChainInfoProvider(poolInfo) assert.Panics(t, func() { _, _ = node.syncStatus(0, nil) }) @@ -1361,9 +1362,12 @@ func TestUnit_NodeLifecycle_syncStatus(t *testing.T) { selectionMode: selectionMode, }, }) - node.nLiveNodes = func() (int, int64, *big.Int) { - return nodesNum, highestBlock, big.NewInt(totalDifficulty) - } + poolInfo := newMockPoolChainInfoProvider(t) + poolInfo.On("LatestChainInfo").Return(nodesNum, ChainInfo{ + BlockNumber: highestBlock, + TotalDifficulty: big.NewInt(totalDifficulty), + }) + node.SetPoolChainInfoProvider(poolInfo) for _, td := range []int64{totalDifficulty - syncThreshold - 1, totalDifficulty - syncThreshold, totalDifficulty, totalDifficulty + 1} { for _, testCase := range testCases { t.Run(fmt.Sprintf("%s: SelectionModeVal: %s: total difficulty: %d", testCase.name, selectionMode, td), func(t *testing.T) { @@ -1413,9 +1417,13 @@ func TestUnit_NodeLifecycle_syncStatus(t *testing.T) { selectionMode: NodeSelectionModeTotalDifficulty, }, }) - node.nLiveNodes = func() (int, int64, *big.Int) { - return nodesNum, highestBlock, big.NewInt(totalDifficulty) - } + + poolInfo := newMockPoolChainInfoProvider(t) + poolInfo.On("LatestChainInfo").Return(nodesNum, ChainInfo{ + BlockNumber: highestBlock, + TotalDifficulty: big.NewInt(totalDifficulty), + }) + node.SetPoolChainInfoProvider(poolInfo) for _, hb := range []int64{highestBlock - syncThreshold - 1, highestBlock - syncThreshold, highestBlock, highestBlock + 1} { for _, testCase := range testCases { t.Run(fmt.Sprintf("%s: SelectionModeVal: %s: highest block: %d", testCase.name, NodeSelectionModeTotalDifficulty, hb), func(t *testing.T) { @@ -1573,3 +1581,98 @@ func TestUnit_NodeLifecycle_SyncingLoop(t *testing.T) { }) }) } + +func TestNode_State(t *testing.T) { + t.Run("If not Alive, returns as is", func(t *testing.T) { + for state := nodeState(0); state < nodeStateLen; state++ { + if state == nodeStateAlive { + continue + } + + node := newTestNode(t, testNodeOpts{}) + node.setState(state) + assert.Equal(t, state, node.State()) + } + }) + t.Run("If repeatable read is not enforced, returns alive", func(t *testing.T) { + node := newTestNode(t, testNodeOpts{}) + node.setState(nodeStateAlive) + assert.Equal(t, nodeStateAlive, node.State()) + }) + testCases := []struct { + Name string + FinalizedBlockOffsetVal uint32 + IsFinalityTagEnabled bool + PoolChainInfo ChainInfo + NodeChainInfo ChainInfo + ExpectedState nodeState + }{ + { + Name: "If finality lag does not exceeds offset, returns alive (FinalityDepth)", + FinalizedBlockOffsetVal: 15, + PoolChainInfo: ChainInfo{ + BlockNumber: 20, + }, + NodeChainInfo: ChainInfo{ + BlockNumber: 5, + }, + ExpectedState: nodeStateAlive, + }, + { + Name: "If finality lag does not exceeds offset, returns alive (FinalityTag)", + FinalizedBlockOffsetVal: 15, + IsFinalityTagEnabled: true, + PoolChainInfo: ChainInfo{ + FinalizedBlockNumber: 20, + }, + NodeChainInfo: ChainInfo{ + FinalizedBlockNumber: 5, + }, + ExpectedState: nodeStateAlive, + }, + { + Name: "If finality lag exceeds offset, returns nodeStateFinalizedBlockOutOfSync (FinalityDepth)", + FinalizedBlockOffsetVal: 15, + PoolChainInfo: ChainInfo{ + BlockNumber: 20, + }, + NodeChainInfo: ChainInfo{ + BlockNumber: 4, + }, + ExpectedState: nodeStateFinalizedBlockOutOfSync, + }, + { + Name: "If finality lag exceeds offset, returns nodeStateFinalizedBlockOutOfSync (FinalityTag)", + FinalizedBlockOffsetVal: 15, + IsFinalityTagEnabled: true, + PoolChainInfo: ChainInfo{ + FinalizedBlockNumber: 20, + }, + NodeChainInfo: ChainInfo{ + FinalizedBlockNumber: 4, + }, + ExpectedState: nodeStateFinalizedBlockOutOfSync, + }, + } + for _, tc := range testCases { + t.Run(tc.Name, func(t *testing.T) { + rpc := newMockNodeClient[types.ID, Head](t) + rpc.On("GetInterceptedChainInfo").Return(tc.NodeChainInfo, tc.PoolChainInfo).Once() + node := newTestNode(t, testNodeOpts{ + config: testNodeConfig{ + enforceRepeatableRead: true, + }, + chainConfig: clientMocks.ChainConfig{ + FinalizedBlockOffsetVal: tc.FinalizedBlockOffsetVal, + IsFinalityTagEnabled: tc.IsFinalityTagEnabled, + }, + rpc: rpc, + }) + poolInfo := newMockPoolChainInfoProvider(t) + poolInfo.On("HighestUserObservations").Return(tc.PoolChainInfo).Once() + node.SetPoolChainInfoProvider(poolInfo) + node.setState(nodeStateAlive) + assert.Equal(t, tc.ExpectedState, node.State()) + }) + } +} diff --git a/common/client/node_selector.go b/common/client/node_selector.go index 45604ebe8d9..4aae3734eea 100644 --- a/common/client/node_selector.go +++ b/common/client/node_selector.go @@ -13,7 +13,6 @@ const ( NodeSelectionModePriorityLevel = "PriorityLevel" ) -//go:generate mockery --quiet --name NodeSelector --structname mockNodeSelector --filename "mock_node_selector_test.go" --inpackage --case=underscore type NodeSelector[ CHAIN_ID types.ID, HEAD Head, diff --git a/common/client/node_selector_highest_head.go b/common/client/node_selector_highest_head.go index 99a130004a9..25a931fc01b 100644 --- a/common/client/node_selector_highest_head.go +++ b/common/client/node_selector_highest_head.go @@ -24,7 +24,8 @@ func (s highestHeadNodeSelector[CHAIN_ID, HEAD, RPC]) Select() Node[CHAIN_ID, HE var highestHeadNumber int64 = math.MinInt64 var highestHeadNodes []Node[CHAIN_ID, HEAD, RPC] for _, n := range s { - state, currentHeadNumber, _ := n.StateAndLatest() + state, currentChainInfo := n.StateAndLatest() + currentHeadNumber := currentChainInfo.BlockNumber if state == nodeStateAlive && currentHeadNumber >= highestHeadNumber { if highestHeadNumber < currentHeadNumber { highestHeadNumber = currentHeadNumber diff --git a/common/client/node_selector_highest_head_test.go b/common/client/node_selector_highest_head_test.go index 6e47bbedcae..e245924589c 100644 --- a/common/client/node_selector_highest_head_test.go +++ b/common/client/node_selector_highest_head_test.go @@ -24,13 +24,13 @@ func TestHighestHeadNodeSelector(t *testing.T) { node := newMockNode[types.ID, Head, nodeClient](t) if i == 0 { // first node is out of sync - node.On("StateAndLatest").Return(nodeStateOutOfSync, int64(-1), nil) + node.On("StateAndLatest").Return(nodeStateOutOfSync, ChainInfo{BlockNumber: int64(-1)}) } else if i == 1 { // second node is alive, LatestReceivedBlockNumber = 1 - node.On("StateAndLatest").Return(nodeStateAlive, int64(1), nil) + node.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: int64(1)}) } else { // third node is alive, LatestReceivedBlockNumber = 2 (best node) - node.On("StateAndLatest").Return(nodeStateAlive, int64(2), nil) + node.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: int64(2)}) } node.On("Order").Maybe().Return(int32(1)) nodes = append(nodes, node) @@ -42,7 +42,7 @@ func TestHighestHeadNodeSelector(t *testing.T) { t.Run("stick to the same node", func(t *testing.T) { node := newMockNode[types.ID, Head, nodeClient](t) // fourth node is alive, LatestReceivedBlockNumber = 2 (same as 3rd) - node.On("StateAndLatest").Return(nodeStateAlive, int64(2), nil) + node.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: int64(2)}) node.On("Order").Return(int32(1)) nodes = append(nodes, node) @@ -53,7 +53,7 @@ func TestHighestHeadNodeSelector(t *testing.T) { t.Run("another best node", func(t *testing.T) { node := newMockNode[types.ID, Head, nodeClient](t) // fifth node is alive, LatestReceivedBlockNumber = 3 (better than 3rd and 4th) - node.On("StateAndLatest").Return(nodeStateAlive, int64(3), nil) + node.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: int64(3)}) node.On("Order").Return(int32(1)) nodes = append(nodes, node) @@ -63,10 +63,10 @@ func TestHighestHeadNodeSelector(t *testing.T) { t.Run("nodes never update latest block number", func(t *testing.T) { node1 := newMockNode[types.ID, Head, nodeClient](t) - node1.On("StateAndLatest").Return(nodeStateAlive, int64(-1), nil) + node1.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: int64(-1)}) node1.On("Order").Return(int32(1)) node2 := newMockNode[types.ID, Head, nodeClient](t) - node2.On("StateAndLatest").Return(nodeStateAlive, int64(-1), nil) + node2.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: int64(-1)}) node2.On("Order").Return(int32(1)) selector := newNodeSelector(NodeSelectionModeHighestHead, []Node[types.ID, Head, nodeClient]{node1, node2}) assert.Same(t, node1, selector.Select()) @@ -83,10 +83,10 @@ func TestHighestHeadNodeSelector_None(t *testing.T) { node := newMockNode[types.ID, Head, nodeClient](t) if i == 0 { // first node is out of sync - node.On("StateAndLatest").Return(nodeStateOutOfSync, int64(-1), nil) + node.On("StateAndLatest").Return(nodeStateOutOfSync, ChainInfo{BlockNumber: int64(-1)}) } else { // others are unreachable - node.On("StateAndLatest").Return(nodeStateUnreachable, int64(1), nil) + node.On("StateAndLatest").Return(nodeStateUnreachable, ChainInfo{BlockNumber: int64(-1)}) } nodes = append(nodes, node) } @@ -104,7 +104,7 @@ func TestHighestHeadNodeSelectorWithOrder(t *testing.T) { t.Run("same head and order", func(t *testing.T) { for i := 0; i < 3; i++ { node := newMockNode[types.ID, Head, nodeClient](t) - node.On("StateAndLatest").Return(nodeStateAlive, int64(1), nil) + node.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: int64(1)}) node.On("Order").Return(int32(2)) nodes = append(nodes, node) } @@ -115,15 +115,15 @@ func TestHighestHeadNodeSelectorWithOrder(t *testing.T) { t.Run("same head but different order", func(t *testing.T) { node1 := newMockNode[types.ID, Head, nodeClient](t) - node1.On("StateAndLatest").Return(nodeStateAlive, int64(3), nil) + node1.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: int64(3)}) node1.On("Order").Return(int32(3)) node2 := newMockNode[types.ID, Head, nodeClient](t) - node2.On("StateAndLatest").Return(nodeStateAlive, int64(3), nil) + node2.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: int64(3)}) node2.On("Order").Return(int32(1)) node3 := newMockNode[types.ID, Head, nodeClient](t) - node3.On("StateAndLatest").Return(nodeStateAlive, int64(3), nil) + node3.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: int64(3)}) node3.On("Order").Return(int32(2)) nodes := []Node[types.ID, Head, nodeClient]{node1, node2, node3} @@ -134,15 +134,15 @@ func TestHighestHeadNodeSelectorWithOrder(t *testing.T) { t.Run("different head but same order", func(t *testing.T) { node1 := newMockNode[types.ID, Head, nodeClient](t) - node1.On("StateAndLatest").Return(nodeStateAlive, int64(1), nil) + node1.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: int64(1)}) node1.On("Order").Maybe().Return(int32(3)) node2 := newMockNode[types.ID, Head, nodeClient](t) - node2.On("StateAndLatest").Return(nodeStateAlive, int64(2), nil) + node2.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: int64(2)}) node2.On("Order").Maybe().Return(int32(3)) node3 := newMockNode[types.ID, Head, nodeClient](t) - node3.On("StateAndLatest").Return(nodeStateAlive, int64(3), nil) + node3.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: int64(3)}) node3.On("Order").Return(int32(3)) nodes := []Node[types.ID, Head, nodeClient]{node1, node2, node3} @@ -153,19 +153,19 @@ func TestHighestHeadNodeSelectorWithOrder(t *testing.T) { t.Run("different head and different order", func(t *testing.T) { node1 := newMockNode[types.ID, Head, nodeClient](t) - node1.On("StateAndLatest").Return(nodeStateAlive, int64(10), nil) + node1.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: int64(10)}) node1.On("Order").Maybe().Return(int32(3)) node2 := newMockNode[types.ID, Head, nodeClient](t) - node2.On("StateAndLatest").Return(nodeStateAlive, int64(11), nil) + node2.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: int64(11)}) node2.On("Order").Maybe().Return(int32(4)) node3 := newMockNode[types.ID, Head, nodeClient](t) - node3.On("StateAndLatest").Return(nodeStateAlive, int64(11), nil) + node3.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: int64(11)}) node3.On("Order").Maybe().Return(int32(3)) node4 := newMockNode[types.ID, Head, nodeClient](t) - node4.On("StateAndLatest").Return(nodeStateAlive, int64(10), nil) + node4.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: int64(10)}) node4.On("Order").Maybe().Return(int32(1)) nodes := []Node[types.ID, Head, nodeClient]{node1, node2, node3, node4} diff --git a/common/client/node_selector_total_difficulty.go b/common/client/node_selector_total_difficulty.go index 35491503bcc..6b45e75528b 100644 --- a/common/client/node_selector_total_difficulty.go +++ b/common/client/node_selector_total_difficulty.go @@ -27,11 +27,12 @@ func (s totalDifficultyNodeSelector[CHAIN_ID, HEAD, RPC]) Select() Node[CHAIN_ID var aliveNodes []Node[CHAIN_ID, HEAD, RPC] for _, n := range s { - state, _, currentTD := n.StateAndLatest() + state, currentChainInfo := n.StateAndLatest() if state != nodeStateAlive { continue } + currentTD := currentChainInfo.TotalDifficulty aliveNodes = append(aliveNodes, n) if currentTD != nil && (highestTD == nil || currentTD.Cmp(highestTD) >= 0) { if highestTD == nil || currentTD.Cmp(highestTD) > 0 { diff --git a/common/client/node_selector_total_difficulty_test.go b/common/client/node_selector_total_difficulty_test.go index 5c43cdd8472..0bc214918d7 100644 --- a/common/client/node_selector_total_difficulty_test.go +++ b/common/client/node_selector_total_difficulty_test.go @@ -1,7 +1,7 @@ package client import ( - big "math/big" + "math/big" "testing" "github.com/smartcontractkit/chainlink/v2/common/types" @@ -24,13 +24,13 @@ func TestTotalDifficultyNodeSelector(t *testing.T) { node := newMockNode[types.ID, Head, nodeClient](t) if i == 0 { // first node is out of sync - node.On("StateAndLatest").Return(nodeStateOutOfSync, int64(-1), nil) + node.On("StateAndLatest").Return(nodeStateOutOfSync, ChainInfo{BlockNumber: -1}) } else if i == 1 { // second node is alive - node.On("StateAndLatest").Return(nodeStateAlive, int64(1), big.NewInt(7)) + node.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: 1, TotalDifficulty: big.NewInt(7)}) } else { // third node is alive and best - node.On("StateAndLatest").Return(nodeStateAlive, int64(2), big.NewInt(8)) + node.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: 2, TotalDifficulty: big.NewInt(8)}) } node.On("Order").Maybe().Return(int32(1)) nodes = append(nodes, node) @@ -42,7 +42,7 @@ func TestTotalDifficultyNodeSelector(t *testing.T) { t.Run("stick to the same node", func(t *testing.T) { node := newMockNode[types.ID, Head, nodeClient](t) // fourth node is alive (same as 3rd) - node.On("StateAndLatest").Return(nodeStateAlive, int64(2), big.NewInt(8)) + node.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: 2, TotalDifficulty: big.NewInt(8)}) node.On("Order").Maybe().Return(int32(1)) nodes = append(nodes, node) @@ -53,7 +53,7 @@ func TestTotalDifficultyNodeSelector(t *testing.T) { t.Run("another best node", func(t *testing.T) { node := newMockNode[types.ID, Head, nodeClient](t) // fifth node is alive (better than 3rd and 4th) - node.On("StateAndLatest").Return(nodeStateAlive, int64(3), big.NewInt(11)) + node.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: 3, TotalDifficulty: big.NewInt(11)}) node.On("Order").Maybe().Return(int32(1)) nodes = append(nodes, node) @@ -63,10 +63,10 @@ func TestTotalDifficultyNodeSelector(t *testing.T) { t.Run("nodes never update latest block number", func(t *testing.T) { node1 := newMockNode[types.ID, Head, nodeClient](t) - node1.On("StateAndLatest").Return(nodeStateAlive, int64(-1), nil) + node1.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: -1, TotalDifficulty: nil}) node1.On("Order").Maybe().Return(int32(1)) node2 := newMockNode[types.ID, Head, nodeClient](t) - node2.On("StateAndLatest").Return(nodeStateAlive, int64(-1), nil) + node2.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: -1, TotalDifficulty: nil}) node2.On("Order").Maybe().Return(int32(1)) nodes := []Node[types.ID, Head, nodeClient]{node1, node2} @@ -85,10 +85,10 @@ func TestTotalDifficultyNodeSelector_None(t *testing.T) { node := newMockNode[types.ID, Head, nodeClient](t) if i == 0 { // first node is out of sync - node.On("StateAndLatest").Return(nodeStateOutOfSync, int64(-1), nil) + node.On("StateAndLatest").Return(nodeStateOutOfSync, ChainInfo{BlockNumber: -1, TotalDifficulty: nil}) } else { // others are unreachable - node.On("StateAndLatest").Return(nodeStateUnreachable, int64(1), big.NewInt(7)) + node.On("StateAndLatest").Return(nodeStateUnreachable, ChainInfo{BlockNumber: 1, TotalDifficulty: big.NewInt(7)}) } nodes = append(nodes, node) } @@ -106,7 +106,7 @@ func TestTotalDifficultyNodeSelectorWithOrder(t *testing.T) { t.Run("same td and order", func(t *testing.T) { for i := 0; i < 3; i++ { node := newMockNode[types.ID, Head, nodeClient](t) - node.On("StateAndLatest").Return(nodeStateAlive, int64(1), big.NewInt(10)) + node.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: 1, TotalDifficulty: big.NewInt(10)}) node.On("Order").Return(int32(2)) nodes = append(nodes, node) } @@ -117,15 +117,15 @@ func TestTotalDifficultyNodeSelectorWithOrder(t *testing.T) { t.Run("same td but different order", func(t *testing.T) { node1 := newMockNode[types.ID, Head, nodeClient](t) - node1.On("StateAndLatest").Return(nodeStateAlive, int64(3), big.NewInt(10)) + node1.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: 3, TotalDifficulty: big.NewInt(10)}) node1.On("Order").Return(int32(3)) node2 := newMockNode[types.ID, Head, nodeClient](t) - node2.On("StateAndLatest").Return(nodeStateAlive, int64(3), big.NewInt(10)) + node2.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: 3, TotalDifficulty: big.NewInt(10)}) node2.On("Order").Return(int32(1)) node3 := newMockNode[types.ID, Head, nodeClient](t) - node3.On("StateAndLatest").Return(nodeStateAlive, int64(3), big.NewInt(10)) + node3.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: 3, TotalDifficulty: big.NewInt(10)}) node3.On("Order").Return(int32(2)) nodes := []Node[types.ID, Head, nodeClient]{node1, node2, node3} @@ -136,15 +136,15 @@ func TestTotalDifficultyNodeSelectorWithOrder(t *testing.T) { t.Run("different td but same order", func(t *testing.T) { node1 := newMockNode[types.ID, Head, nodeClient](t) - node1.On("StateAndLatest").Return(nodeStateAlive, int64(1), big.NewInt(10)) + node1.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: 1, TotalDifficulty: big.NewInt(10)}) node1.On("Order").Maybe().Return(int32(3)) node2 := newMockNode[types.ID, Head, nodeClient](t) - node2.On("StateAndLatest").Return(nodeStateAlive, int64(1), big.NewInt(11)) + node2.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: 1, TotalDifficulty: big.NewInt(11)}) node2.On("Order").Maybe().Return(int32(3)) node3 := newMockNode[types.ID, Head, nodeClient](t) - node3.On("StateAndLatest").Return(nodeStateAlive, int64(1), big.NewInt(12)) + node3.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: 1, TotalDifficulty: big.NewInt(12)}) node3.On("Order").Return(int32(3)) nodes := []Node[types.ID, Head, nodeClient]{node1, node2, node3} @@ -155,19 +155,19 @@ func TestTotalDifficultyNodeSelectorWithOrder(t *testing.T) { t.Run("different head and different order", func(t *testing.T) { node1 := newMockNode[types.ID, Head, nodeClient](t) - node1.On("StateAndLatest").Return(nodeStateAlive, int64(1), big.NewInt(100)) + node1.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: 1, TotalDifficulty: big.NewInt(100)}) node1.On("Order").Maybe().Return(int32(4)) node2 := newMockNode[types.ID, Head, nodeClient](t) - node2.On("StateAndLatest").Return(nodeStateAlive, int64(1), big.NewInt(110)) + node2.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: 1, TotalDifficulty: big.NewInt(110)}) node2.On("Order").Maybe().Return(int32(5)) node3 := newMockNode[types.ID, Head, nodeClient](t) - node3.On("StateAndLatest").Return(nodeStateAlive, int64(1), big.NewInt(110)) + node3.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: 1, TotalDifficulty: big.NewInt(110)}) node3.On("Order").Maybe().Return(int32(1)) node4 := newMockNode[types.ID, Head, nodeClient](t) - node4.On("StateAndLatest").Return(nodeStateAlive, int64(1), big.NewInt(105)) + node4.On("StateAndLatest").Return(nodeStateAlive, ChainInfo{BlockNumber: 1, TotalDifficulty: big.NewInt(105)}) node4.On("Order").Maybe().Return(int32(2)) nodes := []Node[types.ID, Head, nodeClient]{node1, node2, node3, node4} diff --git a/common/client/node_test.go b/common/client/node_test.go index a97f26555a9..3b971e84902 100644 --- a/common/client/node_test.go +++ b/common/client/node_test.go @@ -17,7 +17,9 @@ type testNodeConfig struct { selectionMode string syncThreshold uint32 nodeIsSyncingEnabled bool + enforceRepeatableRead bool finalizedBlockPollInterval time.Duration + deathDeclarationDelay time.Duration } func (n testNodeConfig) PollFailureThreshold() uint32 { @@ -44,6 +46,14 @@ func (n testNodeConfig) FinalizedBlockPollInterval() time.Duration { return n.finalizedBlockPollInterval } +func (n testNodeConfig) EnforceRepeatableRead() bool { + return n.enforceRepeatableRead +} + +func (n testNodeConfig) DeathDeclarationDelay() time.Duration { + return n.deathDeclarationDelay +} + type testNode struct { *node[types.ID, Head, NodeClient[types.ID, Head]] } diff --git a/common/client/send_only_node.go b/common/client/send_only_node.go index b63e93b703d..85e3a6fc2cc 100644 --- a/common/client/send_only_node.go +++ b/common/client/send_only_node.go @@ -12,7 +12,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/common/types" ) -//go:generate mockery --quiet --name sendOnlyClient --structname mockSendOnlyClient --filename "mock_send_only_client_test.go" --inpackage --case=underscore type sendOnlyClient[ CHAIN_ID types.ID, ] interface { @@ -22,8 +21,6 @@ type sendOnlyClient[ } // SendOnlyNode represents one node used as a sendonly -// -//go:generate mockery --quiet --name SendOnlyNode --structname mockSendOnlyNode --filename "mock_send_only_node_test.go" --inpackage --case=underscore type SendOnlyNode[ CHAIN_ID types.ID, RPC sendOnlyClient[CHAIN_ID], diff --git a/common/client/types.go b/common/client/types.go index a27e6a50b73..b07f57eb8fb 100644 --- a/common/client/types.go +++ b/common/client/types.go @@ -11,8 +11,6 @@ import ( ) // RPC includes all the necessary methods for a multi-node client to interact directly with any RPC endpoint. -// -//go:generate mockery --quiet --name RPC --structname mockRPC --inpackage --filename "mock_rpc_test.go" --case=underscore type RPC[ CHAIN_ID types.ID, SEQ types.Sequence, @@ -48,8 +46,6 @@ type RPC[ } // Head is the interface required by the NodeClient -// -//go:generate mockery --quiet --name Head --structname mockHead --filename "mock_head_test.go" --inpackage --case=underscore type Head interface { BlockNumber() int64 BlockDifficulty() *big.Int @@ -57,8 +53,6 @@ type Head interface { } // NodeClient includes all the necessary RPC methods required by a node. -// -//go:generate mockery --quiet --name NodeClient --structname mockNodeClient --filename "mock_node_client_test.go" --inpackage --case=underscore type NodeClient[ CHAIN_ID types.ID, HEAD Head, @@ -66,6 +60,7 @@ type NodeClient[ connection[CHAIN_ID, HEAD] DialHTTP() error + // DisconnectAll - cancels all inflight requests, terminates all subscriptions and resets latest ChainInfo. DisconnectAll() Close() ClientVersion(context.Context) (string, error) @@ -74,6 +69,17 @@ type NodeClient[ UnsubscribeAllExceptAliveLoop() IsSyncing(ctx context.Context) (bool, error) LatestFinalizedBlock(ctx context.Context) (HEAD, error) + // GetInterceptedChainInfo - returns latest and highest observed by application layer ChainInfo. + // latest ChainInfo is the most recent value received within a NodeClient's current lifecycle between Dial and DisconnectAll. + // highestUserObservations ChainInfo is the highest ChainInfo observed excluding health checks calls. + // Its values must not be reset. + // The results of corresponding calls, to get the most recent head and the latest finalized head, must be + // intercepted and reflected in ChainInfo before being returned to a caller. Otherwise, MultiNode is not able to + // provide repeatable read guarantee. + // DisconnectAll must reset latest ChainInfo to default value. + // Ensure implementation does not have a race condition when values are reset before request completion and as + // a result latest ChainInfo contains information from the previous cycle. + GetInterceptedChainInfo() (latest, highestUserObservations ChainInfo) } // clientAPI includes all the direct RPC methods required by the generalized common client to implement its own. @@ -145,5 +151,39 @@ type connection[ ] interface { ChainID(ctx context.Context) (CHAIN_ID, error) Dial(ctx context.Context) error - Subscribe(ctx context.Context, channel chan<- HEAD, args ...interface{}) (types.Subscription, error) + SubscribeNewHead(ctx context.Context, channel chan<- HEAD) (types.Subscription, error) +} + +// PoolChainInfoProvider - provides aggregation of nodes pool ChainInfo +type PoolChainInfoProvider interface { + // LatestChainInfo - returns number of live nodes available in the pool, so we can prevent the last alive node in a pool from being + // moved to out-of-sync state. It is better to have one out-of-sync node than no nodes at all. + // Returns highest latest ChainInfo within the alive nodes. E.g. most recent block number and highest block number + // observed by Node A are 10 and 15; Node B - 12 and 14. This method will return 12. + LatestChainInfo() (int, ChainInfo) + // HighestUserObservations - returns highest ChainInfo ever observed by any user of MultiNode. + HighestUserObservations() ChainInfo +} + +// ChainInfo - defines RPC's or MultiNode's view on the chain +type ChainInfo struct { + BlockNumber int64 + FinalizedBlockNumber int64 + TotalDifficulty *big.Int +} + +func MaxTotalDifficulty(a, b *big.Int) *big.Int { + if a == nil { + if b == nil { + return nil + } + + return big.NewInt(0).Set(b) + } + + if b == nil || a.Cmp(b) >= 0 { + return big.NewInt(0).Set(a) + } + + return big.NewInt(0).Set(b) } diff --git a/common/client/types_test.go b/common/client/types_test.go new file mode 100644 index 00000000000..68d7a3fe78e --- /dev/null +++ b/common/client/types_test.go @@ -0,0 +1,34 @@ +package client + +import ( + "math/big" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestMaxDifficulty(t *testing.T) { + cases := []struct { + A, B, Result *big.Int + }{ + { + A: nil, B: nil, Result: nil, + }, + { + A: nil, B: big.NewInt(1), Result: big.NewInt(1), + }, + { + A: big.NewInt(1), B: big.NewInt(1), Result: big.NewInt(1), + }, + { + A: big.NewInt(1), B: big.NewInt(2), Result: big.NewInt(2), + }, + } + + for _, test := range cases { + actualResult := MaxTotalDifficulty(test.A, test.B) + assert.Equal(t, test.Result, actualResult, "expected max(%v, %v) to produce %v", test.A, test.B, test.Result) + inverted := MaxTotalDifficulty(test.B, test.A) + assert.Equal(t, actualResult, inverted, "expected max(%v, %v) == max(%v, %v)", test.A, test.B, test.B, test.A) + } +} diff --git a/common/headtracker/head_broadcaster.go b/common/headtracker/head_broadcaster.go index 0d5da434060..7edcccfccbd 100644 --- a/common/headtracker/head_broadcaster.go +++ b/common/headtracker/head_broadcaster.go @@ -28,8 +28,6 @@ func (set callbackSet[H, BLOCK_HASH]) values() []HeadTrackable[H, BLOCK_HASH] { // HeadTrackable is implemented by the core txm to be able to receive head events from any chain. // Chain implementations should notify head events to the core txm via this interface. -// -//go:generate mockery --quiet --name HeadTrackable --output ./mocks/ --case=underscore type HeadTrackable[H types.Head[BLOCK_HASH], BLOCK_HASH types.Hashable] interface { // OnNewLongestChain sends a new head when it becomes available. Subscribers can recursively trace the parent // of the head to the finalized block back. @@ -37,8 +35,6 @@ type HeadTrackable[H types.Head[BLOCK_HASH], BLOCK_HASH types.Hashable] interfac } // HeadBroadcaster relays new Heads to all subscribers. -// -//go:generate mockery --quiet --name HeadBroadcaster --output ./mocks/ --case=underscore type HeadBroadcaster[H types.Head[BLOCK_HASH], BLOCK_HASH types.Hashable] interface { services.Service BroadcastNewLongestChain(H) diff --git a/common/headtracker/head_listener.go b/common/headtracker/head_listener.go index 15977c4dfe4..25715b35280 100644 --- a/common/headtracker/head_listener.go +++ b/common/headtracker/head_listener.go @@ -36,7 +36,7 @@ type headHandler[H types.Head[BLOCK_HASH], BLOCK_HASH types.Hashable] func(ctx c type HeadListener[H types.Head[BLOCK_HASH], BLOCK_HASH types.Hashable] interface { // ListenForNewHeads kicks off the listen loop (not thread safe) // done() must be executed upon leaving ListenForNewHeads() - ListenForNewHeads(handleNewHead headHandler[H, BLOCK_HASH], done func()) + ListenForNewHeads(onSubscribe func(), handleNewHead headHandler[H, BLOCK_HASH], done func()) // ReceivingHeads returns true if the listener is receiving heads (thread safe) ReceivingHeads() bool @@ -88,7 +88,7 @@ func (hl *headListener[HTH, S, ID, BLOCK_HASH]) Name() string { return hl.logger.Name() } -func (hl *headListener[HTH, S, ID, BLOCK_HASH]) ListenForNewHeads(handleNewHead headHandler[HTH, BLOCK_HASH], done func()) { +func (hl *headListener[HTH, S, ID, BLOCK_HASH]) ListenForNewHeads(onSubscription func(), handleNewHead headHandler[HTH, BLOCK_HASH], done func()) { defer done() defer hl.unsubscribe() @@ -99,6 +99,8 @@ func (hl *headListener[HTH, S, ID, BLOCK_HASH]) ListenForNewHeads(handleNewHead if !hl.subscribe(ctx) { break } + + onSubscription() err := hl.receiveHeaders(ctx, handleNewHead) if ctx.Err() != nil { break diff --git a/common/headtracker/head_tracker.go b/common/headtracker/head_tracker.go index 48c4859a64c..afa5d931ee6 100644 --- a/common/headtracker/head_tracker.go +++ b/common/headtracker/head_tracker.go @@ -35,13 +35,14 @@ var ( const HeadsBufferSize = 10 // HeadTracker holds and stores the block experienced by a particular node in a thread safe manner. -// -//go:generate mockery --quiet --name HeadTracker --output ./mocks/ --case=underscore type HeadTracker[H types.Head[BLOCK_HASH], BLOCK_HASH types.Hashable] interface { services.Service // Backfill given a head will fill in any missing heads up to latestFinalized - Backfill(ctx context.Context, headWithChain, latestFinalized H) (err error) + Backfill(ctx context.Context, headWithChain H) (err error) LatestChain() H + // LatestAndFinalizedBlock - returns latest and latest finalized blocks. + // NOTE: Returns latest finalized block as is, ignoring the FinalityTagBypass feature flag. + LatestAndFinalizedBlock(ctx context.Context) (latest, finalized H, err error) } type headTracker[ @@ -114,16 +115,15 @@ 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. - err := ht.handleInitialHead(ctx) - if err != nil { - if ctx.Err() != nil { - return ctx.Err() + onSubscribe := func() { + err := ht.handleInitialHead(ctx) + if err != nil { + ht.log.Errorw("Error handling initial head", "err", err.Error()) } - ht.log.Errorw("Error handling initial head", "err", err.Error()) } ht.wgDone.Add(3) - go ht.headListener.ListenForNewHeads(ht.handleNewHead, ht.wgDone.Done) + go ht.headListener.ListenForNewHeads(onSubscribe, ht.handleNewHead, ht.wgDone.Done) go ht.backfillLoop() go ht.broadcastLoop() @@ -145,7 +145,7 @@ func (ht *headTracker[HTH, S, ID, BLOCK_HASH]) handleInitialHead(ctx context.Con } ht.log.Debugw("Got initial head", "head", initialHead, "blockNumber", initialHead.BlockNumber(), "blockHash", initialHead.BlockHash()) - latestFinalized, err := ht.calculateLatestFinalized(ctx, initialHead) + latestFinalized, err := ht.calculateLatestFinalized(ctx, initialHead, ht.htConfig.FinalityTagBypass()) if err != nil { return fmt.Errorf("failed to calculate latest finalized head: %w", err) } @@ -195,7 +195,12 @@ 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, latestFinalized HTH) (err error) { +func (ht *headTracker[HTH, S, ID, BLOCK_HASH]) Backfill(ctx context.Context, headWithChain HTH) (err error) { + latestFinalized, err := ht.calculateLatestFinalized(ctx, headWithChain, ht.htConfig.FinalityTagBypass()) + if err != nil { + return fmt.Errorf("failed to calculate finalized block: %w", err) + } + if !latestFinalized.IsValid() { return errors.New("can not perform backfill without a valid latestFinalized head") } @@ -208,6 +213,11 @@ func (ht *headTracker[HTH, S, ID, BLOCK_HASH]) Backfill(ctx context.Context, hea return errors.New(errMsg) } + if headWithChain.BlockNumber()-latestFinalized.BlockNumber() > int64(ht.htConfig.MaxAllowedFinalityDepth()) { + return fmt.Errorf("gap between latest finalized block (%d) and current head (%d) is too large (> %d)", + latestFinalized.BlockNumber(), headWithChain.BlockNumber(), ht.htConfig.MaxAllowedFinalityDepth()) + } + return ht.backfill(ctx, headWithChain, latestFinalized) } @@ -317,13 +327,7 @@ func (ht *headTracker[HTH, S, ID, BLOCK_HASH]) backfillLoop() { break } { - 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) + err := ht.Backfill(ctx, head) if err != nil { ht.log.Warnw("Unexpected error while backfilling heads", "err", err) } else if ctx.Err() != nil { @@ -335,12 +339,58 @@ func (ht *headTracker[HTH, S, ID, BLOCK_HASH]) backfillLoop() { } } +// LatestAndFinalizedBlock - returns latest and latest finalized blocks. +// NOTE: Returns latest finalized block as is, ignoring the FinalityTagBypass feature flag. +// TODO: BCI-3321 use cached values instead of making RPC requests +func (ht *headTracker[HTH, S, ID, BLOCK_HASH]) LatestAndFinalizedBlock(ctx context.Context) (latest, finalized HTH, err error) { + latest, err = ht.client.HeadByNumber(ctx, nil) + if err != nil { + err = fmt.Errorf("failed to get latest block: %w", err) + return + } + + if !latest.IsValid() { + err = fmt.Errorf("expected latest block to be valid") + return + } + + finalized, err = ht.calculateLatestFinalized(ctx, latest, false) + if err != nil { + err = fmt.Errorf("failed to calculate latest finalized block: %w", err) + return + } + if !finalized.IsValid() { + err = fmt.Errorf("expected finalized block to be valid") + return + } + + return +} + +func (ht *headTracker[HTH, S, ID, BLOCK_HASH]) getHeadAtHeight(ctx context.Context, chainHeadHash BLOCK_HASH, blockHeight int64) (HTH, error) { + chainHead := ht.headSaver.Chain(chainHeadHash) + if chainHead.IsValid() { + // check if provided chain contains a block of specified height + headAtHeight, err := chainHead.HeadAtHeight(blockHeight) + if err == nil { + // we are forced to reload the block due to type mismatched caused by generics + hthAtHeight := ht.headSaver.Chain(headAtHeight.BlockHash()) + // ensure that the block was not removed from the chain by another goroutine + if hthAtHeight.IsValid() { + return hthAtHeight, nil + } + } + } + + return ht.client.HeadByNumber(ctx, big.NewInt(blockHeight)) +} + // 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) (latestFinalized HTH, err error) { - if ht.config.FinalityTagEnabled() && !ht.htConfig.FinalityTagBypass() { - latestFinalized, err = ht.client.LatestFinalizedBlock(ctx) +func (ht *headTracker[HTH, S, ID, BLOCK_HASH]) calculateLatestFinalized(ctx context.Context, currentHead HTH, finalityTagBypass bool) (HTH, error) { + if ht.config.FinalityTagEnabled() && !finalityTagBypass { + latestFinalized, err := ht.client.LatestFinalizedBlock(ctx) if err != nil { return latestFinalized, fmt.Errorf("failed to get latest finalized block: %w", err) } @@ -349,22 +399,22 @@ func (ht *headTracker[HTH, S, ID, BLOCK_HASH]) calculateLatestFinalized(ctx cont return latestFinalized, fmt.Errorf("failed to get valid latest finalized block") } - if currentHead.BlockNumber()-latestFinalized.BlockNumber() > int64(ht.htConfig.MaxAllowedFinalityDepth()) { - return latestFinalized, fmt.Errorf("gap between latest finalized block (%d) and current head (%d) is too large (> %d)", - latestFinalized.BlockNumber(), currentHead.BlockNumber(), ht.htConfig.MaxAllowedFinalityDepth()) + if ht.config.FinalizedBlockOffset() == 0 { + return latestFinalized, nil } - return latestFinalized, nil + finalizedBlockNumber := max(latestFinalized.BlockNumber()-int64(ht.config.FinalizedBlockOffset()), 0) + return ht.getHeadAtHeight(ctx, latestFinalized.BlockHash(), finalizedBlockNumber) } // no need to make an additional RPC call on chains with instant finality - if ht.config.FinalityDepth() == 0 { + if ht.config.FinalityDepth() == 0 && ht.config.FinalizedBlockOffset() == 0 { return currentHead, nil } - finalizedBlockNumber := currentHead.BlockNumber() - int64(ht.config.FinalityDepth()) + finalizedBlockNumber := currentHead.BlockNumber() - int64(ht.config.FinalityDepth()) - int64(ht.config.FinalizedBlockOffset()) if finalizedBlockNumber <= 0 { finalizedBlockNumber = 0 } - return ht.client.HeadByNumber(ctx, big.NewInt(finalizedBlockNumber)) + return ht.getHeadAtHeight(ctx, currentHead.BlockHash(), finalizedBlockNumber) } // backfill fetches all missing heads up until the latestFinalizedHead diff --git a/common/headtracker/mocks/head_broadcaster.go b/common/headtracker/mocks/head_broadcaster.go index c3a9fba97b7..83838ae6c10 100644 --- a/common/headtracker/mocks/head_broadcaster.go +++ b/common/headtracker/mocks/head_broadcaster.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -16,11 +16,47 @@ type HeadBroadcaster[H types.Head[BLOCK_HASH], BLOCK_HASH types.Hashable] struct mock.Mock } +type HeadBroadcaster_Expecter[H types.Head[BLOCK_HASH], BLOCK_HASH types.Hashable] struct { + mock *mock.Mock +} + +func (_m *HeadBroadcaster[H, BLOCK_HASH]) EXPECT() *HeadBroadcaster_Expecter[H, BLOCK_HASH] { + return &HeadBroadcaster_Expecter[H, BLOCK_HASH]{mock: &_m.Mock} +} + // BroadcastNewLongestChain provides a mock function with given fields: _a0 func (_m *HeadBroadcaster[H, BLOCK_HASH]) BroadcastNewLongestChain(_a0 H) { _m.Called(_a0) } +// HeadBroadcaster_BroadcastNewLongestChain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BroadcastNewLongestChain' +type HeadBroadcaster_BroadcastNewLongestChain_Call[H types.Head[BLOCK_HASH], BLOCK_HASH types.Hashable] struct { + *mock.Call +} + +// BroadcastNewLongestChain is a helper method to define mock.On call +// - _a0 H +func (_e *HeadBroadcaster_Expecter[H, BLOCK_HASH]) BroadcastNewLongestChain(_a0 interface{}) *HeadBroadcaster_BroadcastNewLongestChain_Call[H, BLOCK_HASH] { + return &HeadBroadcaster_BroadcastNewLongestChain_Call[H, BLOCK_HASH]{Call: _e.mock.On("BroadcastNewLongestChain", _a0)} +} + +func (_c *HeadBroadcaster_BroadcastNewLongestChain_Call[H, BLOCK_HASH]) Run(run func(_a0 H)) *HeadBroadcaster_BroadcastNewLongestChain_Call[H, BLOCK_HASH] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(H)) + }) + return _c +} + +func (_c *HeadBroadcaster_BroadcastNewLongestChain_Call[H, BLOCK_HASH]) Return() *HeadBroadcaster_BroadcastNewLongestChain_Call[H, BLOCK_HASH] { + _c.Call.Return() + return _c +} + +func (_c *HeadBroadcaster_BroadcastNewLongestChain_Call[H, BLOCK_HASH]) RunAndReturn(run func(H)) *HeadBroadcaster_BroadcastNewLongestChain_Call[H, BLOCK_HASH] { + _c.Call.Return(run) + return _c +} + // Close provides a mock function with given fields: func (_m *HeadBroadcaster[H, BLOCK_HASH]) Close() error { ret := _m.Called() @@ -39,6 +75,33 @@ func (_m *HeadBroadcaster[H, BLOCK_HASH]) Close() error { return r0 } +// HeadBroadcaster_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type HeadBroadcaster_Close_Call[H types.Head[BLOCK_HASH], BLOCK_HASH types.Hashable] struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *HeadBroadcaster_Expecter[H, BLOCK_HASH]) Close() *HeadBroadcaster_Close_Call[H, BLOCK_HASH] { + return &HeadBroadcaster_Close_Call[H, BLOCK_HASH]{Call: _e.mock.On("Close")} +} + +func (_c *HeadBroadcaster_Close_Call[H, BLOCK_HASH]) Run(run func()) *HeadBroadcaster_Close_Call[H, BLOCK_HASH] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *HeadBroadcaster_Close_Call[H, BLOCK_HASH]) Return(_a0 error) *HeadBroadcaster_Close_Call[H, BLOCK_HASH] { + _c.Call.Return(_a0) + return _c +} + +func (_c *HeadBroadcaster_Close_Call[H, BLOCK_HASH]) RunAndReturn(run func() error) *HeadBroadcaster_Close_Call[H, BLOCK_HASH] { + _c.Call.Return(run) + return _c +} + // HealthReport provides a mock function with given fields: func (_m *HeadBroadcaster[H, BLOCK_HASH]) HealthReport() map[string]error { ret := _m.Called() @@ -59,6 +122,33 @@ func (_m *HeadBroadcaster[H, BLOCK_HASH]) HealthReport() map[string]error { return r0 } +// HeadBroadcaster_HealthReport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HealthReport' +type HeadBroadcaster_HealthReport_Call[H types.Head[BLOCK_HASH], BLOCK_HASH types.Hashable] struct { + *mock.Call +} + +// HealthReport is a helper method to define mock.On call +func (_e *HeadBroadcaster_Expecter[H, BLOCK_HASH]) HealthReport() *HeadBroadcaster_HealthReport_Call[H, BLOCK_HASH] { + return &HeadBroadcaster_HealthReport_Call[H, BLOCK_HASH]{Call: _e.mock.On("HealthReport")} +} + +func (_c *HeadBroadcaster_HealthReport_Call[H, BLOCK_HASH]) Run(run func()) *HeadBroadcaster_HealthReport_Call[H, BLOCK_HASH] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *HeadBroadcaster_HealthReport_Call[H, BLOCK_HASH]) Return(_a0 map[string]error) *HeadBroadcaster_HealthReport_Call[H, BLOCK_HASH] { + _c.Call.Return(_a0) + return _c +} + +func (_c *HeadBroadcaster_HealthReport_Call[H, BLOCK_HASH]) RunAndReturn(run func() map[string]error) *HeadBroadcaster_HealthReport_Call[H, BLOCK_HASH] { + _c.Call.Return(run) + return _c +} + // Name provides a mock function with given fields: func (_m *HeadBroadcaster[H, BLOCK_HASH]) Name() string { ret := _m.Called() @@ -77,6 +167,33 @@ func (_m *HeadBroadcaster[H, BLOCK_HASH]) Name() string { return r0 } +// HeadBroadcaster_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type HeadBroadcaster_Name_Call[H types.Head[BLOCK_HASH], BLOCK_HASH types.Hashable] struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *HeadBroadcaster_Expecter[H, BLOCK_HASH]) Name() *HeadBroadcaster_Name_Call[H, BLOCK_HASH] { + return &HeadBroadcaster_Name_Call[H, BLOCK_HASH]{Call: _e.mock.On("Name")} +} + +func (_c *HeadBroadcaster_Name_Call[H, BLOCK_HASH]) Run(run func()) *HeadBroadcaster_Name_Call[H, BLOCK_HASH] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *HeadBroadcaster_Name_Call[H, BLOCK_HASH]) Return(_a0 string) *HeadBroadcaster_Name_Call[H, BLOCK_HASH] { + _c.Call.Return(_a0) + return _c +} + +func (_c *HeadBroadcaster_Name_Call[H, BLOCK_HASH]) RunAndReturn(run func() string) *HeadBroadcaster_Name_Call[H, BLOCK_HASH] { + _c.Call.Return(run) + return _c +} + // Ready provides a mock function with given fields: func (_m *HeadBroadcaster[H, BLOCK_HASH]) Ready() error { ret := _m.Called() @@ -95,6 +212,33 @@ func (_m *HeadBroadcaster[H, BLOCK_HASH]) Ready() error { return r0 } +// HeadBroadcaster_Ready_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ready' +type HeadBroadcaster_Ready_Call[H types.Head[BLOCK_HASH], BLOCK_HASH types.Hashable] struct { + *mock.Call +} + +// Ready is a helper method to define mock.On call +func (_e *HeadBroadcaster_Expecter[H, BLOCK_HASH]) Ready() *HeadBroadcaster_Ready_Call[H, BLOCK_HASH] { + return &HeadBroadcaster_Ready_Call[H, BLOCK_HASH]{Call: _e.mock.On("Ready")} +} + +func (_c *HeadBroadcaster_Ready_Call[H, BLOCK_HASH]) Run(run func()) *HeadBroadcaster_Ready_Call[H, BLOCK_HASH] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *HeadBroadcaster_Ready_Call[H, BLOCK_HASH]) Return(_a0 error) *HeadBroadcaster_Ready_Call[H, BLOCK_HASH] { + _c.Call.Return(_a0) + return _c +} + +func (_c *HeadBroadcaster_Ready_Call[H, BLOCK_HASH]) RunAndReturn(run func() error) *HeadBroadcaster_Ready_Call[H, BLOCK_HASH] { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *HeadBroadcaster[H, BLOCK_HASH]) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -113,6 +257,34 @@ func (_m *HeadBroadcaster[H, BLOCK_HASH]) Start(_a0 context.Context) error { return r0 } +// HeadBroadcaster_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type HeadBroadcaster_Start_Call[H types.Head[BLOCK_HASH], BLOCK_HASH types.Hashable] struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *HeadBroadcaster_Expecter[H, BLOCK_HASH]) Start(_a0 interface{}) *HeadBroadcaster_Start_Call[H, BLOCK_HASH] { + return &HeadBroadcaster_Start_Call[H, BLOCK_HASH]{Call: _e.mock.On("Start", _a0)} +} + +func (_c *HeadBroadcaster_Start_Call[H, BLOCK_HASH]) Run(run func(_a0 context.Context)) *HeadBroadcaster_Start_Call[H, BLOCK_HASH] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *HeadBroadcaster_Start_Call[H, BLOCK_HASH]) Return(_a0 error) *HeadBroadcaster_Start_Call[H, BLOCK_HASH] { + _c.Call.Return(_a0) + return _c +} + +func (_c *HeadBroadcaster_Start_Call[H, BLOCK_HASH]) RunAndReturn(run func(context.Context) error) *HeadBroadcaster_Start_Call[H, BLOCK_HASH] { + _c.Call.Return(run) + return _c +} + // Subscribe provides a mock function with given fields: callback func (_m *HeadBroadcaster[H, BLOCK_HASH]) Subscribe(callback headtracker.HeadTrackable[H, BLOCK_HASH]) (H, func()) { ret := _m.Called(callback) @@ -143,6 +315,34 @@ func (_m *HeadBroadcaster[H, BLOCK_HASH]) Subscribe(callback headtracker.HeadTra return r0, r1 } +// HeadBroadcaster_Subscribe_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Subscribe' +type HeadBroadcaster_Subscribe_Call[H types.Head[BLOCK_HASH], BLOCK_HASH types.Hashable] struct { + *mock.Call +} + +// Subscribe is a helper method to define mock.On call +// - callback headtracker.HeadTrackable[H,BLOCK_HASH] +func (_e *HeadBroadcaster_Expecter[H, BLOCK_HASH]) Subscribe(callback interface{}) *HeadBroadcaster_Subscribe_Call[H, BLOCK_HASH] { + return &HeadBroadcaster_Subscribe_Call[H, BLOCK_HASH]{Call: _e.mock.On("Subscribe", callback)} +} + +func (_c *HeadBroadcaster_Subscribe_Call[H, BLOCK_HASH]) Run(run func(callback headtracker.HeadTrackable[H, BLOCK_HASH])) *HeadBroadcaster_Subscribe_Call[H, BLOCK_HASH] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(headtracker.HeadTrackable[H, BLOCK_HASH])) + }) + return _c +} + +func (_c *HeadBroadcaster_Subscribe_Call[H, BLOCK_HASH]) Return(currentLongestChain H, unsubscribe func()) *HeadBroadcaster_Subscribe_Call[H, BLOCK_HASH] { + _c.Call.Return(currentLongestChain, unsubscribe) + return _c +} + +func (_c *HeadBroadcaster_Subscribe_Call[H, BLOCK_HASH]) RunAndReturn(run func(headtracker.HeadTrackable[H, BLOCK_HASH]) (H, func())) *HeadBroadcaster_Subscribe_Call[H, BLOCK_HASH] { + _c.Call.Return(run) + return _c +} + // NewHeadBroadcaster creates a new instance of HeadBroadcaster. 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 NewHeadBroadcaster[H types.Head[BLOCK_HASH], BLOCK_HASH types.Hashable](t interface { diff --git a/common/headtracker/mocks/head_trackable.go b/common/headtracker/mocks/head_trackable.go index 417152d8cbd..feb2c3c6d3d 100644 --- a/common/headtracker/mocks/head_trackable.go +++ b/common/headtracker/mocks/head_trackable.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -15,11 +15,48 @@ type HeadTrackable[H types.Head[BLOCK_HASH], BLOCK_HASH types.Hashable] struct { mock.Mock } +type HeadTrackable_Expecter[H types.Head[BLOCK_HASH], BLOCK_HASH types.Hashable] struct { + mock *mock.Mock +} + +func (_m *HeadTrackable[H, BLOCK_HASH]) EXPECT() *HeadTrackable_Expecter[H, BLOCK_HASH] { + return &HeadTrackable_Expecter[H, BLOCK_HASH]{mock: &_m.Mock} +} + // OnNewLongestChain provides a mock function with given fields: ctx, head func (_m *HeadTrackable[H, BLOCK_HASH]) OnNewLongestChain(ctx context.Context, head H) { _m.Called(ctx, head) } +// HeadTrackable_OnNewLongestChain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnNewLongestChain' +type HeadTrackable_OnNewLongestChain_Call[H types.Head[BLOCK_HASH], BLOCK_HASH types.Hashable] struct { + *mock.Call +} + +// OnNewLongestChain is a helper method to define mock.On call +// - ctx context.Context +// - head H +func (_e *HeadTrackable_Expecter[H, BLOCK_HASH]) OnNewLongestChain(ctx interface{}, head interface{}) *HeadTrackable_OnNewLongestChain_Call[H, BLOCK_HASH] { + return &HeadTrackable_OnNewLongestChain_Call[H, BLOCK_HASH]{Call: _e.mock.On("OnNewLongestChain", ctx, head)} +} + +func (_c *HeadTrackable_OnNewLongestChain_Call[H, BLOCK_HASH]) Run(run func(ctx context.Context, head H)) *HeadTrackable_OnNewLongestChain_Call[H, BLOCK_HASH] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(H)) + }) + return _c +} + +func (_c *HeadTrackable_OnNewLongestChain_Call[H, BLOCK_HASH]) Return() *HeadTrackable_OnNewLongestChain_Call[H, BLOCK_HASH] { + _c.Call.Return() + return _c +} + +func (_c *HeadTrackable_OnNewLongestChain_Call[H, BLOCK_HASH]) RunAndReturn(run func(context.Context, H)) *HeadTrackable_OnNewLongestChain_Call[H, BLOCK_HASH] { + _c.Call.Return(run) + return _c +} + // NewHeadTrackable creates a new instance of HeadTrackable. 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 NewHeadTrackable[H types.Head[BLOCK_HASH], BLOCK_HASH types.Hashable](t interface { diff --git a/common/headtracker/mocks/head_tracker.go b/common/headtracker/mocks/head_tracker.go index 2321c3bfdca..d7f8a5fc754 100644 --- a/common/headtracker/mocks/head_tracker.go +++ b/common/headtracker/mocks/head_tracker.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -15,17 +15,25 @@ type HeadTracker[H types.Head[BLOCK_HASH], BLOCK_HASH types.Hashable] struct { mock.Mock } -// 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) +type HeadTracker_Expecter[H types.Head[BLOCK_HASH], BLOCK_HASH types.Hashable] struct { + mock *mock.Mock +} + +func (_m *HeadTracker[H, BLOCK_HASH]) EXPECT() *HeadTracker_Expecter[H, BLOCK_HASH] { + return &HeadTracker_Expecter[H, BLOCK_HASH]{mock: &_m.Mock} +} + +// Backfill provides a mock function with given fields: ctx, headWithChain +func (_m *HeadTracker[H, BLOCK_HASH]) Backfill(ctx context.Context, headWithChain H) error { + ret := _m.Called(ctx, headWithChain) if len(ret) == 0 { panic("no return value specified for Backfill") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, H, H) error); ok { - r0 = rf(ctx, headWithChain, latestFinalized) + if rf, ok := ret.Get(0).(func(context.Context, H) error); ok { + r0 = rf(ctx, headWithChain) } else { r0 = ret.Error(0) } @@ -33,6 +41,35 @@ func (_m *HeadTracker[H, BLOCK_HASH]) Backfill(ctx context.Context, headWithChai return r0 } +// HeadTracker_Backfill_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Backfill' +type HeadTracker_Backfill_Call[H types.Head[BLOCK_HASH], BLOCK_HASH types.Hashable] struct { + *mock.Call +} + +// Backfill is a helper method to define mock.On call +// - ctx context.Context +// - headWithChain H +func (_e *HeadTracker_Expecter[H, BLOCK_HASH]) Backfill(ctx interface{}, headWithChain interface{}) *HeadTracker_Backfill_Call[H, BLOCK_HASH] { + return &HeadTracker_Backfill_Call[H, BLOCK_HASH]{Call: _e.mock.On("Backfill", ctx, headWithChain)} +} + +func (_c *HeadTracker_Backfill_Call[H, BLOCK_HASH]) Run(run func(ctx context.Context, headWithChain H)) *HeadTracker_Backfill_Call[H, BLOCK_HASH] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(H)) + }) + return _c +} + +func (_c *HeadTracker_Backfill_Call[H, BLOCK_HASH]) Return(err error) *HeadTracker_Backfill_Call[H, BLOCK_HASH] { + _c.Call.Return(err) + return _c +} + +func (_c *HeadTracker_Backfill_Call[H, BLOCK_HASH]) RunAndReturn(run func(context.Context, H) error) *HeadTracker_Backfill_Call[H, BLOCK_HASH] { + _c.Call.Return(run) + return _c +} + // Close provides a mock function with given fields: func (_m *HeadTracker[H, BLOCK_HASH]) Close() error { ret := _m.Called() @@ -51,6 +88,33 @@ func (_m *HeadTracker[H, BLOCK_HASH]) Close() error { return r0 } +// HeadTracker_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type HeadTracker_Close_Call[H types.Head[BLOCK_HASH], BLOCK_HASH types.Hashable] struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *HeadTracker_Expecter[H, BLOCK_HASH]) Close() *HeadTracker_Close_Call[H, BLOCK_HASH] { + return &HeadTracker_Close_Call[H, BLOCK_HASH]{Call: _e.mock.On("Close")} +} + +func (_c *HeadTracker_Close_Call[H, BLOCK_HASH]) Run(run func()) *HeadTracker_Close_Call[H, BLOCK_HASH] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *HeadTracker_Close_Call[H, BLOCK_HASH]) Return(_a0 error) *HeadTracker_Close_Call[H, BLOCK_HASH] { + _c.Call.Return(_a0) + return _c +} + +func (_c *HeadTracker_Close_Call[H, BLOCK_HASH]) RunAndReturn(run func() error) *HeadTracker_Close_Call[H, BLOCK_HASH] { + _c.Call.Return(run) + return _c +} + // HealthReport provides a mock function with given fields: func (_m *HeadTracker[H, BLOCK_HASH]) HealthReport() map[string]error { ret := _m.Called() @@ -71,6 +135,96 @@ func (_m *HeadTracker[H, BLOCK_HASH]) HealthReport() map[string]error { return r0 } +// HeadTracker_HealthReport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HealthReport' +type HeadTracker_HealthReport_Call[H types.Head[BLOCK_HASH], BLOCK_HASH types.Hashable] struct { + *mock.Call +} + +// HealthReport is a helper method to define mock.On call +func (_e *HeadTracker_Expecter[H, BLOCK_HASH]) HealthReport() *HeadTracker_HealthReport_Call[H, BLOCK_HASH] { + return &HeadTracker_HealthReport_Call[H, BLOCK_HASH]{Call: _e.mock.On("HealthReport")} +} + +func (_c *HeadTracker_HealthReport_Call[H, BLOCK_HASH]) Run(run func()) *HeadTracker_HealthReport_Call[H, BLOCK_HASH] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *HeadTracker_HealthReport_Call[H, BLOCK_HASH]) Return(_a0 map[string]error) *HeadTracker_HealthReport_Call[H, BLOCK_HASH] { + _c.Call.Return(_a0) + return _c +} + +func (_c *HeadTracker_HealthReport_Call[H, BLOCK_HASH]) RunAndReturn(run func() map[string]error) *HeadTracker_HealthReport_Call[H, BLOCK_HASH] { + _c.Call.Return(run) + return _c +} + +// LatestAndFinalizedBlock provides a mock function with given fields: ctx +func (_m *HeadTracker[H, BLOCK_HASH]) LatestAndFinalizedBlock(ctx context.Context) (H, H, error) { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for LatestAndFinalizedBlock") + } + + var r0 H + var r1 H + var r2 error + if rf, ok := ret.Get(0).(func(context.Context) (H, H, error)); ok { + return rf(ctx) + } + if rf, ok := ret.Get(0).(func(context.Context) H); ok { + r0 = rf(ctx) + } else { + r0 = ret.Get(0).(H) + } + + if rf, ok := ret.Get(1).(func(context.Context) H); ok { + r1 = rf(ctx) + } else { + r1 = ret.Get(1).(H) + } + + if rf, ok := ret.Get(2).(func(context.Context) error); ok { + r2 = rf(ctx) + } else { + r2 = ret.Error(2) + } + + return r0, r1, r2 +} + +// HeadTracker_LatestAndFinalizedBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LatestAndFinalizedBlock' +type HeadTracker_LatestAndFinalizedBlock_Call[H types.Head[BLOCK_HASH], BLOCK_HASH types.Hashable] struct { + *mock.Call +} + +// LatestAndFinalizedBlock is a helper method to define mock.On call +// - ctx context.Context +func (_e *HeadTracker_Expecter[H, BLOCK_HASH]) LatestAndFinalizedBlock(ctx interface{}) *HeadTracker_LatestAndFinalizedBlock_Call[H, BLOCK_HASH] { + return &HeadTracker_LatestAndFinalizedBlock_Call[H, BLOCK_HASH]{Call: _e.mock.On("LatestAndFinalizedBlock", ctx)} +} + +func (_c *HeadTracker_LatestAndFinalizedBlock_Call[H, BLOCK_HASH]) Run(run func(ctx context.Context)) *HeadTracker_LatestAndFinalizedBlock_Call[H, BLOCK_HASH] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *HeadTracker_LatestAndFinalizedBlock_Call[H, BLOCK_HASH]) Return(latest H, finalized H, err error) *HeadTracker_LatestAndFinalizedBlock_Call[H, BLOCK_HASH] { + _c.Call.Return(latest, finalized, err) + return _c +} + +func (_c *HeadTracker_LatestAndFinalizedBlock_Call[H, BLOCK_HASH]) RunAndReturn(run func(context.Context) (H, H, error)) *HeadTracker_LatestAndFinalizedBlock_Call[H, BLOCK_HASH] { + _c.Call.Return(run) + return _c +} + // LatestChain provides a mock function with given fields: func (_m *HeadTracker[H, BLOCK_HASH]) LatestChain() H { ret := _m.Called() @@ -89,6 +243,33 @@ func (_m *HeadTracker[H, BLOCK_HASH]) LatestChain() H { return r0 } +// HeadTracker_LatestChain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LatestChain' +type HeadTracker_LatestChain_Call[H types.Head[BLOCK_HASH], BLOCK_HASH types.Hashable] struct { + *mock.Call +} + +// LatestChain is a helper method to define mock.On call +func (_e *HeadTracker_Expecter[H, BLOCK_HASH]) LatestChain() *HeadTracker_LatestChain_Call[H, BLOCK_HASH] { + return &HeadTracker_LatestChain_Call[H, BLOCK_HASH]{Call: _e.mock.On("LatestChain")} +} + +func (_c *HeadTracker_LatestChain_Call[H, BLOCK_HASH]) Run(run func()) *HeadTracker_LatestChain_Call[H, BLOCK_HASH] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *HeadTracker_LatestChain_Call[H, BLOCK_HASH]) Return(_a0 H) *HeadTracker_LatestChain_Call[H, BLOCK_HASH] { + _c.Call.Return(_a0) + return _c +} + +func (_c *HeadTracker_LatestChain_Call[H, BLOCK_HASH]) RunAndReturn(run func() H) *HeadTracker_LatestChain_Call[H, BLOCK_HASH] { + _c.Call.Return(run) + return _c +} + // Name provides a mock function with given fields: func (_m *HeadTracker[H, BLOCK_HASH]) Name() string { ret := _m.Called() @@ -107,6 +288,33 @@ func (_m *HeadTracker[H, BLOCK_HASH]) Name() string { return r0 } +// HeadTracker_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type HeadTracker_Name_Call[H types.Head[BLOCK_HASH], BLOCK_HASH types.Hashable] struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *HeadTracker_Expecter[H, BLOCK_HASH]) Name() *HeadTracker_Name_Call[H, BLOCK_HASH] { + return &HeadTracker_Name_Call[H, BLOCK_HASH]{Call: _e.mock.On("Name")} +} + +func (_c *HeadTracker_Name_Call[H, BLOCK_HASH]) Run(run func()) *HeadTracker_Name_Call[H, BLOCK_HASH] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *HeadTracker_Name_Call[H, BLOCK_HASH]) Return(_a0 string) *HeadTracker_Name_Call[H, BLOCK_HASH] { + _c.Call.Return(_a0) + return _c +} + +func (_c *HeadTracker_Name_Call[H, BLOCK_HASH]) RunAndReturn(run func() string) *HeadTracker_Name_Call[H, BLOCK_HASH] { + _c.Call.Return(run) + return _c +} + // Ready provides a mock function with given fields: func (_m *HeadTracker[H, BLOCK_HASH]) Ready() error { ret := _m.Called() @@ -125,6 +333,33 @@ func (_m *HeadTracker[H, BLOCK_HASH]) Ready() error { return r0 } +// HeadTracker_Ready_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ready' +type HeadTracker_Ready_Call[H types.Head[BLOCK_HASH], BLOCK_HASH types.Hashable] struct { + *mock.Call +} + +// Ready is a helper method to define mock.On call +func (_e *HeadTracker_Expecter[H, BLOCK_HASH]) Ready() *HeadTracker_Ready_Call[H, BLOCK_HASH] { + return &HeadTracker_Ready_Call[H, BLOCK_HASH]{Call: _e.mock.On("Ready")} +} + +func (_c *HeadTracker_Ready_Call[H, BLOCK_HASH]) Run(run func()) *HeadTracker_Ready_Call[H, BLOCK_HASH] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *HeadTracker_Ready_Call[H, BLOCK_HASH]) Return(_a0 error) *HeadTracker_Ready_Call[H, BLOCK_HASH] { + _c.Call.Return(_a0) + return _c +} + +func (_c *HeadTracker_Ready_Call[H, BLOCK_HASH]) RunAndReturn(run func() error) *HeadTracker_Ready_Call[H, BLOCK_HASH] { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *HeadTracker[H, BLOCK_HASH]) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -143,6 +378,34 @@ func (_m *HeadTracker[H, BLOCK_HASH]) Start(_a0 context.Context) error { return r0 } +// HeadTracker_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type HeadTracker_Start_Call[H types.Head[BLOCK_HASH], BLOCK_HASH types.Hashable] struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *HeadTracker_Expecter[H, BLOCK_HASH]) Start(_a0 interface{}) *HeadTracker_Start_Call[H, BLOCK_HASH] { + return &HeadTracker_Start_Call[H, BLOCK_HASH]{Call: _e.mock.On("Start", _a0)} +} + +func (_c *HeadTracker_Start_Call[H, BLOCK_HASH]) Run(run func(_a0 context.Context)) *HeadTracker_Start_Call[H, BLOCK_HASH] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *HeadTracker_Start_Call[H, BLOCK_HASH]) Return(_a0 error) *HeadTracker_Start_Call[H, BLOCK_HASH] { + _c.Call.Return(_a0) + return _c +} + +func (_c *HeadTracker_Start_Call[H, BLOCK_HASH]) RunAndReturn(run func(context.Context) error) *HeadTracker_Start_Call[H, BLOCK_HASH] { + _c.Call.Return(run) + return _c +} + // NewHeadTracker creates a new instance of HeadTracker. 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 NewHeadTracker[H types.Head[BLOCK_HASH], BLOCK_HASH types.Hashable](t interface { diff --git a/common/headtracker/types/config.go b/common/headtracker/types/config.go index e0eb422672d..06ad93d39d2 100644 --- a/common/headtracker/types/config.go +++ b/common/headtracker/types/config.go @@ -6,6 +6,7 @@ type Config interface { BlockEmissionIdleWarningThreshold() time.Duration FinalityDepth() uint32 FinalityTagEnabled() bool + FinalizedBlockOffset() uint32 } type HeadTrackerConfig interface { diff --git a/common/txmgr/mocks/tx_manager.go b/common/txmgr/mocks/tx_manager.go index 502f6fe8a25..f2d04363993 100644 --- a/common/txmgr/mocks/tx_manager.go +++ b/common/txmgr/mocks/tx_manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -25,6 +25,14 @@ type TxManager[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashab mock.Mock } +type TxManager_Expecter[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + mock *mock.Mock +} + +func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) EXPECT() *TxManager_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxManager_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{mock: &_m.Mock} +} + // Close provides a mock function with given fields: func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Close() error { ret := _m.Called() @@ -43,6 +51,33 @@ func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Close( return r0 } +// TxManager_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type TxManager_Close_Call[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *TxManager_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Close() *TxManager_Close_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxManager_Close_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{Call: _e.mock.On("Close")} +} + +func (_c *TxManager_Close_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Run(run func()) *TxManager_Close_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *TxManager_Close_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Return(_a0 error) *TxManager_Close_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxManager_Close_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RunAndReturn(run func() error) *TxManager_Close_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // CountTransactionsByState provides a mock function with given fields: ctx, state func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) CountTransactionsByState(ctx context.Context, state txmgrtypes.TxState) (uint32, error) { ret := _m.Called(ctx, state) @@ -71,6 +106,35 @@ func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) CountT return r0, r1 } +// TxManager_CountTransactionsByState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CountTransactionsByState' +type TxManager_CountTransactionsByState_Call[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// CountTransactionsByState is a helper method to define mock.On call +// - ctx context.Context +// - state txmgrtypes.TxState +func (_e *TxManager_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) CountTransactionsByState(ctx interface{}, state interface{}) *TxManager_CountTransactionsByState_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxManager_CountTransactionsByState_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{Call: _e.mock.On("CountTransactionsByState", ctx, state)} +} + +func (_c *TxManager_CountTransactionsByState_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Run(run func(ctx context.Context, state txmgrtypes.TxState)) *TxManager_CountTransactionsByState_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(txmgrtypes.TxState)) + }) + return _c +} + +func (_c *TxManager_CountTransactionsByState_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Return(count uint32, err error) *TxManager_CountTransactionsByState_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(count, err) + return _c +} + +func (_c *TxManager_CountTransactionsByState_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RunAndReturn(run func(context.Context, txmgrtypes.TxState) (uint32, error)) *TxManager_CountTransactionsByState_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // CreateTransaction provides a mock function with given fields: ctx, txRequest func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) CreateTransaction(ctx context.Context, txRequest txmgrtypes.TxRequest[ADDR, TX_HASH]) (txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error) { ret := _m.Called(ctx, txRequest) @@ -99,6 +163,35 @@ func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Create return r0, r1 } +// TxManager_CreateTransaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateTransaction' +type TxManager_CreateTransaction_Call[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// CreateTransaction is a helper method to define mock.On call +// - ctx context.Context +// - txRequest txmgrtypes.TxRequest[ADDR,TX_HASH] +func (_e *TxManager_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) CreateTransaction(ctx interface{}, txRequest interface{}) *TxManager_CreateTransaction_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxManager_CreateTransaction_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{Call: _e.mock.On("CreateTransaction", ctx, txRequest)} +} + +func (_c *TxManager_CreateTransaction_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Run(run func(ctx context.Context, txRequest txmgrtypes.TxRequest[ADDR, TX_HASH])) *TxManager_CreateTransaction_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(txmgrtypes.TxRequest[ADDR, TX_HASH])) + }) + return _c +} + +func (_c *TxManager_CreateTransaction_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Return(etx txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], err error) *TxManager_CreateTransaction_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(etx, err) + return _c +} + +func (_c *TxManager_CreateTransaction_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RunAndReturn(run func(context.Context, txmgrtypes.TxRequest[ADDR, TX_HASH]) (txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error)) *TxManager_CreateTransaction_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // FindEarliestUnconfirmedBroadcastTime provides a mock function with given fields: ctx func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) FindEarliestUnconfirmedBroadcastTime(ctx context.Context) (null.Time, error) { ret := _m.Called(ctx) @@ -127,6 +220,34 @@ func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) FindEa return r0, r1 } +// TxManager_FindEarliestUnconfirmedBroadcastTime_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindEarliestUnconfirmedBroadcastTime' +type TxManager_FindEarliestUnconfirmedBroadcastTime_Call[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// FindEarliestUnconfirmedBroadcastTime is a helper method to define mock.On call +// - ctx context.Context +func (_e *TxManager_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) FindEarliestUnconfirmedBroadcastTime(ctx interface{}) *TxManager_FindEarliestUnconfirmedBroadcastTime_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxManager_FindEarliestUnconfirmedBroadcastTime_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{Call: _e.mock.On("FindEarliestUnconfirmedBroadcastTime", ctx)} +} + +func (_c *TxManager_FindEarliestUnconfirmedBroadcastTime_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Run(run func(ctx context.Context)) *TxManager_FindEarliestUnconfirmedBroadcastTime_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *TxManager_FindEarliestUnconfirmedBroadcastTime_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Return(_a0 null.Time, _a1 error) *TxManager_FindEarliestUnconfirmedBroadcastTime_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *TxManager_FindEarliestUnconfirmedBroadcastTime_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RunAndReturn(run func(context.Context) (null.Time, error)) *TxManager_FindEarliestUnconfirmedBroadcastTime_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // FindEarliestUnconfirmedTxAttemptBlock provides a mock function with given fields: ctx func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) FindEarliestUnconfirmedTxAttemptBlock(ctx context.Context) (null.Int, error) { ret := _m.Called(ctx) @@ -155,6 +276,34 @@ func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) FindEa return r0, r1 } +// TxManager_FindEarliestUnconfirmedTxAttemptBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindEarliestUnconfirmedTxAttemptBlock' +type TxManager_FindEarliestUnconfirmedTxAttemptBlock_Call[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// FindEarliestUnconfirmedTxAttemptBlock is a helper method to define mock.On call +// - ctx context.Context +func (_e *TxManager_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) FindEarliestUnconfirmedTxAttemptBlock(ctx interface{}) *TxManager_FindEarliestUnconfirmedTxAttemptBlock_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxManager_FindEarliestUnconfirmedTxAttemptBlock_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{Call: _e.mock.On("FindEarliestUnconfirmedTxAttemptBlock", ctx)} +} + +func (_c *TxManager_FindEarliestUnconfirmedTxAttemptBlock_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Run(run func(ctx context.Context)) *TxManager_FindEarliestUnconfirmedTxAttemptBlock_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *TxManager_FindEarliestUnconfirmedTxAttemptBlock_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Return(_a0 null.Int, _a1 error) *TxManager_FindEarliestUnconfirmedTxAttemptBlock_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *TxManager_FindEarliestUnconfirmedTxAttemptBlock_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RunAndReturn(run func(context.Context) (null.Int, error)) *TxManager_FindEarliestUnconfirmedTxAttemptBlock_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // FindTxesByMetaFieldAndStates provides a mock function with given fields: ctx, metaField, metaValue, states, chainID func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) FindTxesByMetaFieldAndStates(ctx context.Context, metaField string, metaValue string, states []txmgrtypes.TxState, chainID *big.Int) ([]*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error) { ret := _m.Called(ctx, metaField, metaValue, states, chainID) @@ -185,6 +334,38 @@ func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) FindTx return r0, r1 } +// TxManager_FindTxesByMetaFieldAndStates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxesByMetaFieldAndStates' +type TxManager_FindTxesByMetaFieldAndStates_Call[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// FindTxesByMetaFieldAndStates is a helper method to define mock.On call +// - ctx context.Context +// - metaField string +// - metaValue string +// - states []txmgrtypes.TxState +// - chainID *big.Int +func (_e *TxManager_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) FindTxesByMetaFieldAndStates(ctx interface{}, metaField interface{}, metaValue interface{}, states interface{}, chainID interface{}) *TxManager_FindTxesByMetaFieldAndStates_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxManager_FindTxesByMetaFieldAndStates_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{Call: _e.mock.On("FindTxesByMetaFieldAndStates", ctx, metaField, metaValue, states, chainID)} +} + +func (_c *TxManager_FindTxesByMetaFieldAndStates_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Run(run func(ctx context.Context, metaField string, metaValue string, states []txmgrtypes.TxState, chainID *big.Int)) *TxManager_FindTxesByMetaFieldAndStates_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].([]txmgrtypes.TxState), args[4].(*big.Int)) + }) + return _c +} + +func (_c *TxManager_FindTxesByMetaFieldAndStates_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Return(txes []*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], err error) *TxManager_FindTxesByMetaFieldAndStates_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(txes, err) + return _c +} + +func (_c *TxManager_FindTxesByMetaFieldAndStates_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RunAndReturn(run func(context.Context, string, string, []txmgrtypes.TxState, *big.Int) ([]*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error)) *TxManager_FindTxesByMetaFieldAndStates_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // FindTxesWithAttemptsAndReceiptsByIdsAndState provides a mock function with given fields: ctx, ids, states, chainID func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) FindTxesWithAttemptsAndReceiptsByIdsAndState(ctx context.Context, ids []int64, states []txmgrtypes.TxState, chainID *big.Int) ([]*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error) { ret := _m.Called(ctx, ids, states, chainID) @@ -215,6 +396,37 @@ func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) FindTx return r0, r1 } +// TxManager_FindTxesWithAttemptsAndReceiptsByIdsAndState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxesWithAttemptsAndReceiptsByIdsAndState' +type TxManager_FindTxesWithAttemptsAndReceiptsByIdsAndState_Call[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// FindTxesWithAttemptsAndReceiptsByIdsAndState is a helper method to define mock.On call +// - ctx context.Context +// - ids []int64 +// - states []txmgrtypes.TxState +// - chainID *big.Int +func (_e *TxManager_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) FindTxesWithAttemptsAndReceiptsByIdsAndState(ctx interface{}, ids interface{}, states interface{}, chainID interface{}) *TxManager_FindTxesWithAttemptsAndReceiptsByIdsAndState_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxManager_FindTxesWithAttemptsAndReceiptsByIdsAndState_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{Call: _e.mock.On("FindTxesWithAttemptsAndReceiptsByIdsAndState", ctx, ids, states, chainID)} +} + +func (_c *TxManager_FindTxesWithAttemptsAndReceiptsByIdsAndState_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Run(run func(ctx context.Context, ids []int64, states []txmgrtypes.TxState, chainID *big.Int)) *TxManager_FindTxesWithAttemptsAndReceiptsByIdsAndState_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]int64), args[2].([]txmgrtypes.TxState), args[3].(*big.Int)) + }) + return _c +} + +func (_c *TxManager_FindTxesWithAttemptsAndReceiptsByIdsAndState_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Return(txes []*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], err error) *TxManager_FindTxesWithAttemptsAndReceiptsByIdsAndState_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(txes, err) + return _c +} + +func (_c *TxManager_FindTxesWithAttemptsAndReceiptsByIdsAndState_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RunAndReturn(run func(context.Context, []int64, []txmgrtypes.TxState, *big.Int) ([]*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error)) *TxManager_FindTxesWithAttemptsAndReceiptsByIdsAndState_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // FindTxesWithMetaFieldByReceiptBlockNum provides a mock function with given fields: ctx, metaField, blockNum, chainID func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) FindTxesWithMetaFieldByReceiptBlockNum(ctx context.Context, metaField string, blockNum int64, chainID *big.Int) ([]*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error) { ret := _m.Called(ctx, metaField, blockNum, chainID) @@ -245,6 +457,37 @@ func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) FindTx return r0, r1 } +// TxManager_FindTxesWithMetaFieldByReceiptBlockNum_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxesWithMetaFieldByReceiptBlockNum' +type TxManager_FindTxesWithMetaFieldByReceiptBlockNum_Call[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// FindTxesWithMetaFieldByReceiptBlockNum is a helper method to define mock.On call +// - ctx context.Context +// - metaField string +// - blockNum int64 +// - chainID *big.Int +func (_e *TxManager_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) FindTxesWithMetaFieldByReceiptBlockNum(ctx interface{}, metaField interface{}, blockNum interface{}, chainID interface{}) *TxManager_FindTxesWithMetaFieldByReceiptBlockNum_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxManager_FindTxesWithMetaFieldByReceiptBlockNum_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{Call: _e.mock.On("FindTxesWithMetaFieldByReceiptBlockNum", ctx, metaField, blockNum, chainID)} +} + +func (_c *TxManager_FindTxesWithMetaFieldByReceiptBlockNum_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Run(run func(ctx context.Context, metaField string, blockNum int64, chainID *big.Int)) *TxManager_FindTxesWithMetaFieldByReceiptBlockNum_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(int64), args[3].(*big.Int)) + }) + return _c +} + +func (_c *TxManager_FindTxesWithMetaFieldByReceiptBlockNum_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Return(txes []*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], err error) *TxManager_FindTxesWithMetaFieldByReceiptBlockNum_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(txes, err) + return _c +} + +func (_c *TxManager_FindTxesWithMetaFieldByReceiptBlockNum_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RunAndReturn(run func(context.Context, string, int64, *big.Int) ([]*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error)) *TxManager_FindTxesWithMetaFieldByReceiptBlockNum_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // FindTxesWithMetaFieldByStates provides a mock function with given fields: ctx, metaField, states, chainID func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) FindTxesWithMetaFieldByStates(ctx context.Context, metaField string, states []txmgrtypes.TxState, chainID *big.Int) ([]*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error) { ret := _m.Called(ctx, metaField, states, chainID) @@ -275,6 +518,37 @@ func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) FindTx return r0, r1 } +// TxManager_FindTxesWithMetaFieldByStates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxesWithMetaFieldByStates' +type TxManager_FindTxesWithMetaFieldByStates_Call[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// FindTxesWithMetaFieldByStates is a helper method to define mock.On call +// - ctx context.Context +// - metaField string +// - states []txmgrtypes.TxState +// - chainID *big.Int +func (_e *TxManager_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) FindTxesWithMetaFieldByStates(ctx interface{}, metaField interface{}, states interface{}, chainID interface{}) *TxManager_FindTxesWithMetaFieldByStates_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxManager_FindTxesWithMetaFieldByStates_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{Call: _e.mock.On("FindTxesWithMetaFieldByStates", ctx, metaField, states, chainID)} +} + +func (_c *TxManager_FindTxesWithMetaFieldByStates_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Run(run func(ctx context.Context, metaField string, states []txmgrtypes.TxState, chainID *big.Int)) *TxManager_FindTxesWithMetaFieldByStates_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].([]txmgrtypes.TxState), args[3].(*big.Int)) + }) + return _c +} + +func (_c *TxManager_FindTxesWithMetaFieldByStates_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Return(txes []*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], err error) *TxManager_FindTxesWithMetaFieldByStates_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(txes, err) + return _c +} + +func (_c *TxManager_FindTxesWithMetaFieldByStates_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RunAndReturn(run func(context.Context, string, []txmgrtypes.TxState, *big.Int) ([]*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error)) *TxManager_FindTxesWithMetaFieldByStates_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // GetForwarderForEOA provides a mock function with given fields: ctx, eoa func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) GetForwarderForEOA(ctx context.Context, eoa ADDR) (ADDR, error) { ret := _m.Called(ctx, eoa) @@ -303,6 +577,35 @@ func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) GetFor return r0, r1 } +// TxManager_GetForwarderForEOA_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetForwarderForEOA' +type TxManager_GetForwarderForEOA_Call[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// GetForwarderForEOA is a helper method to define mock.On call +// - ctx context.Context +// - eoa ADDR +func (_e *TxManager_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) GetForwarderForEOA(ctx interface{}, eoa interface{}) *TxManager_GetForwarderForEOA_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxManager_GetForwarderForEOA_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{Call: _e.mock.On("GetForwarderForEOA", ctx, eoa)} +} + +func (_c *TxManager_GetForwarderForEOA_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Run(run func(ctx context.Context, eoa ADDR)) *TxManager_GetForwarderForEOA_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ADDR)) + }) + return _c +} + +func (_c *TxManager_GetForwarderForEOA_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Return(forwarder ADDR, err error) *TxManager_GetForwarderForEOA_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(forwarder, err) + return _c +} + +func (_c *TxManager_GetForwarderForEOA_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RunAndReturn(run func(context.Context, ADDR) (ADDR, error)) *TxManager_GetForwarderForEOA_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // GetForwarderForEOAOCR2Feeds provides a mock function with given fields: ctx, eoa, ocr2AggregatorID func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) GetForwarderForEOAOCR2Feeds(ctx context.Context, eoa ADDR, ocr2AggregatorID ADDR) (ADDR, error) { ret := _m.Called(ctx, eoa, ocr2AggregatorID) @@ -331,6 +634,36 @@ func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) GetFor return r0, r1 } +// TxManager_GetForwarderForEOAOCR2Feeds_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetForwarderForEOAOCR2Feeds' +type TxManager_GetForwarderForEOAOCR2Feeds_Call[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// GetForwarderForEOAOCR2Feeds is a helper method to define mock.On call +// - ctx context.Context +// - eoa ADDR +// - ocr2AggregatorID ADDR +func (_e *TxManager_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) GetForwarderForEOAOCR2Feeds(ctx interface{}, eoa interface{}, ocr2AggregatorID interface{}) *TxManager_GetForwarderForEOAOCR2Feeds_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxManager_GetForwarderForEOAOCR2Feeds_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{Call: _e.mock.On("GetForwarderForEOAOCR2Feeds", ctx, eoa, ocr2AggregatorID)} +} + +func (_c *TxManager_GetForwarderForEOAOCR2Feeds_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Run(run func(ctx context.Context, eoa ADDR, ocr2AggregatorID ADDR)) *TxManager_GetForwarderForEOAOCR2Feeds_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ADDR), args[2].(ADDR)) + }) + return _c +} + +func (_c *TxManager_GetForwarderForEOAOCR2Feeds_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Return(forwarder ADDR, err error) *TxManager_GetForwarderForEOAOCR2Feeds_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(forwarder, err) + return _c +} + +func (_c *TxManager_GetForwarderForEOAOCR2Feeds_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RunAndReturn(run func(context.Context, ADDR, ADDR) (ADDR, error)) *TxManager_GetForwarderForEOAOCR2Feeds_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // GetTransactionStatus provides a mock function with given fields: ctx, transactionID func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) GetTransactionStatus(ctx context.Context, transactionID string) (pkgtypes.TransactionStatus, error) { ret := _m.Called(ctx, transactionID) @@ -359,6 +692,35 @@ func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) GetTra return r0, r1 } +// TxManager_GetTransactionStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTransactionStatus' +type TxManager_GetTransactionStatus_Call[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// GetTransactionStatus is a helper method to define mock.On call +// - ctx context.Context +// - transactionID string +func (_e *TxManager_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) GetTransactionStatus(ctx interface{}, transactionID interface{}) *TxManager_GetTransactionStatus_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxManager_GetTransactionStatus_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{Call: _e.mock.On("GetTransactionStatus", ctx, transactionID)} +} + +func (_c *TxManager_GetTransactionStatus_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Run(run func(ctx context.Context, transactionID string)) *TxManager_GetTransactionStatus_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *TxManager_GetTransactionStatus_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Return(state pkgtypes.TransactionStatus, err error) *TxManager_GetTransactionStatus_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(state, err) + return _c +} + +func (_c *TxManager_GetTransactionStatus_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RunAndReturn(run func(context.Context, string) (pkgtypes.TransactionStatus, error)) *TxManager_GetTransactionStatus_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // HealthReport provides a mock function with given fields: func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) HealthReport() map[string]error { ret := _m.Called() @@ -379,6 +741,33 @@ func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Health return r0 } +// TxManager_HealthReport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HealthReport' +type TxManager_HealthReport_Call[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// HealthReport is a helper method to define mock.On call +func (_e *TxManager_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) HealthReport() *TxManager_HealthReport_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxManager_HealthReport_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{Call: _e.mock.On("HealthReport")} +} + +func (_c *TxManager_HealthReport_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Run(run func()) *TxManager_HealthReport_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *TxManager_HealthReport_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Return(_a0 map[string]error) *TxManager_HealthReport_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxManager_HealthReport_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RunAndReturn(run func() map[string]error) *TxManager_HealthReport_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // Name provides a mock function with given fields: func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Name() string { ret := _m.Called() @@ -397,11 +786,67 @@ func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Name() return r0 } +// TxManager_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type TxManager_Name_Call[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *TxManager_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Name() *TxManager_Name_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxManager_Name_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{Call: _e.mock.On("Name")} +} + +func (_c *TxManager_Name_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Run(run func()) *TxManager_Name_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *TxManager_Name_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Return(_a0 string) *TxManager_Name_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxManager_Name_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RunAndReturn(run func() string) *TxManager_Name_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // OnNewLongestChain provides a mock function with given fields: ctx, head func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) OnNewLongestChain(ctx context.Context, head HEAD) { _m.Called(ctx, head) } +// TxManager_OnNewLongestChain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnNewLongestChain' +type TxManager_OnNewLongestChain_Call[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// OnNewLongestChain is a helper method to define mock.On call +// - ctx context.Context +// - head HEAD +func (_e *TxManager_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) OnNewLongestChain(ctx interface{}, head interface{}) *TxManager_OnNewLongestChain_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxManager_OnNewLongestChain_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{Call: _e.mock.On("OnNewLongestChain", ctx, head)} +} + +func (_c *TxManager_OnNewLongestChain_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Run(run func(ctx context.Context, head HEAD)) *TxManager_OnNewLongestChain_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(HEAD)) + }) + return _c +} + +func (_c *TxManager_OnNewLongestChain_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Return() *TxManager_OnNewLongestChain_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return() + return _c +} + +func (_c *TxManager_OnNewLongestChain_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RunAndReturn(run func(context.Context, HEAD)) *TxManager_OnNewLongestChain_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // Ready provides a mock function with given fields: func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Ready() error { ret := _m.Called() @@ -420,11 +865,66 @@ func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Ready( return r0 } +// TxManager_Ready_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ready' +type TxManager_Ready_Call[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// Ready is a helper method to define mock.On call +func (_e *TxManager_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Ready() *TxManager_Ready_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxManager_Ready_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{Call: _e.mock.On("Ready")} +} + +func (_c *TxManager_Ready_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Run(run func()) *TxManager_Ready_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *TxManager_Ready_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Return(_a0 error) *TxManager_Ready_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxManager_Ready_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RunAndReturn(run func() error) *TxManager_Ready_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // RegisterResumeCallback provides a mock function with given fields: fn func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RegisterResumeCallback(fn txmgr.ResumeCallback) { _m.Called(fn) } +// TxManager_RegisterResumeCallback_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterResumeCallback' +type TxManager_RegisterResumeCallback_Call[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// RegisterResumeCallback is a helper method to define mock.On call +// - fn txmgr.ResumeCallback +func (_e *TxManager_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RegisterResumeCallback(fn interface{}) *TxManager_RegisterResumeCallback_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxManager_RegisterResumeCallback_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{Call: _e.mock.On("RegisterResumeCallback", fn)} +} + +func (_c *TxManager_RegisterResumeCallback_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Run(run func(fn txmgr.ResumeCallback)) *TxManager_RegisterResumeCallback_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(txmgr.ResumeCallback)) + }) + return _c +} + +func (_c *TxManager_RegisterResumeCallback_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Return() *TxManager_RegisterResumeCallback_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return() + return _c +} + +func (_c *TxManager_RegisterResumeCallback_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RunAndReturn(run func(txmgr.ResumeCallback)) *TxManager_RegisterResumeCallback_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // Reset provides a mock function with given fields: addr, abandon func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Reset(addr ADDR, abandon bool) error { ret := _m.Called(addr, abandon) @@ -443,6 +943,35 @@ func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Reset( return r0 } +// TxManager_Reset_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Reset' +type TxManager_Reset_Call[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// Reset is a helper method to define mock.On call +// - addr ADDR +// - abandon bool +func (_e *TxManager_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Reset(addr interface{}, abandon interface{}) *TxManager_Reset_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxManager_Reset_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{Call: _e.mock.On("Reset", addr, abandon)} +} + +func (_c *TxManager_Reset_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Run(run func(addr ADDR, abandon bool)) *TxManager_Reset_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(ADDR), args[1].(bool)) + }) + return _c +} + +func (_c *TxManager_Reset_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Return(_a0 error) *TxManager_Reset_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxManager_Reset_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RunAndReturn(run func(ADDR, bool) error) *TxManager_Reset_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // SendNativeToken provides a mock function with given fields: ctx, chainID, from, to, value, gasLimit func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) SendNativeToken(ctx context.Context, chainID CHAIN_ID, from ADDR, to ADDR, value big.Int, gasLimit uint64) (txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error) { ret := _m.Called(ctx, chainID, from, to, value, gasLimit) @@ -471,6 +1000,39 @@ func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) SendNa return r0, r1 } +// TxManager_SendNativeToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendNativeToken' +type TxManager_SendNativeToken_Call[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// SendNativeToken is a helper method to define mock.On call +// - ctx context.Context +// - chainID CHAIN_ID +// - from ADDR +// - to ADDR +// - value big.Int +// - gasLimit uint64 +func (_e *TxManager_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) SendNativeToken(ctx interface{}, chainID interface{}, from interface{}, to interface{}, value interface{}, gasLimit interface{}) *TxManager_SendNativeToken_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxManager_SendNativeToken_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{Call: _e.mock.On("SendNativeToken", ctx, chainID, from, to, value, gasLimit)} +} + +func (_c *TxManager_SendNativeToken_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Run(run func(ctx context.Context, chainID CHAIN_ID, from ADDR, to ADDR, value big.Int, gasLimit uint64)) *TxManager_SendNativeToken_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(CHAIN_ID), args[2].(ADDR), args[3].(ADDR), args[4].(big.Int), args[5].(uint64)) + }) + return _c +} + +func (_c *TxManager_SendNativeToken_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Return(etx txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], err error) *TxManager_SendNativeToken_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(etx, err) + return _c +} + +func (_c *TxManager_SendNativeToken_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RunAndReturn(run func(context.Context, CHAIN_ID, ADDR, ADDR, big.Int, uint64) (txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error)) *TxManager_SendNativeToken_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -489,11 +1051,67 @@ func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Start( return r0 } +// TxManager_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type TxManager_Start_Call[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *TxManager_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Start(_a0 interface{}) *TxManager_Start_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxManager_Start_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{Call: _e.mock.On("Start", _a0)} +} + +func (_c *TxManager_Start_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Run(run func(_a0 context.Context)) *TxManager_Start_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *TxManager_Start_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Return(_a0 error) *TxManager_Start_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxManager_Start_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RunAndReturn(run func(context.Context) error) *TxManager_Start_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // Trigger provides a mock function with given fields: addr func (_m *TxManager[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Trigger(addr ADDR) { _m.Called(addr) } +// TxManager_Trigger_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Trigger' +type TxManager_Trigger_Call[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// Trigger is a helper method to define mock.On call +// - addr ADDR +func (_e *TxManager_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Trigger(addr interface{}) *TxManager_Trigger_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxManager_Trigger_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{Call: _e.mock.On("Trigger", addr)} +} + +func (_c *TxManager_Trigger_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Run(run func(addr ADDR)) *TxManager_Trigger_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(ADDR)) + }) + return _c +} + +func (_c *TxManager_Trigger_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Return() *TxManager_Trigger_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return() + return _c +} + +func (_c *TxManager_Trigger_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RunAndReturn(run func(ADDR)) *TxManager_Trigger_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // NewTxManager creates a new instance of TxManager. 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 NewTxManager[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee](t interface { diff --git a/common/txmgr/reaper.go b/common/txmgr/reaper.go index 3ed05b2caee..932b58f6430 100644 --- a/common/txmgr/reaper.go +++ b/common/txmgr/reaper.go @@ -7,8 +7,6 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/services" - "github.com/smartcontractkit/chainlink-common/pkg/utils" - txmgrtypes "github.com/smartcontractkit/chainlink/v2/common/txmgr/types" "github.com/smartcontractkit/chainlink/v2/common/types" ) @@ -58,7 +56,7 @@ func (r *Reaper[CHAIN_ID]) Stop() { func (r *Reaper[CHAIN_ID]) runLoop() { defer close(r.chDone) - ticker := time.NewTicker(utils.WithJitter(r.txConfig.ReaperInterval())) + ticker := services.NewTicker(r.txConfig.ReaperInterval()) defer ticker.Stop() for { select { @@ -66,10 +64,9 @@ func (r *Reaper[CHAIN_ID]) runLoop() { return case <-ticker.C: r.work() - ticker.Reset(utils.WithJitter(r.txConfig.ReaperInterval())) case <-r.trigger: r.work() - ticker.Reset(utils.WithJitter(r.txConfig.ReaperInterval())) + ticker.Reset() } } } diff --git a/common/txmgr/resender.go b/common/txmgr/resender.go index 8483b7a0264..d4f1b4275a1 100644 --- a/common/txmgr/resender.go +++ b/common/txmgr/resender.go @@ -9,8 +9,6 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/chains/label" "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/services" - "github.com/smartcontractkit/chainlink-common/pkg/utils" - "github.com/smartcontractkit/chainlink/v2/common/client" feetypes "github.com/smartcontractkit/chainlink/v2/common/fee/types" txmgrtypes "github.com/smartcontractkit/chainlink/v2/common/txmgr/types" @@ -120,7 +118,7 @@ func (er *Resender[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) runLoop() er.logger.Warnw("Failed to resend unconfirmed transactions", "err", err) } - ticker := time.NewTicker(utils.WithJitter(er.interval)) + ticker := services.NewTicker(er.interval) defer ticker.Stop() for { select { diff --git a/common/txmgr/txmgr.go b/common/txmgr/txmgr.go index 3ac0d2e1d68..fc27e930c37 100644 --- a/common/txmgr/txmgr.go +++ b/common/txmgr/txmgr.go @@ -33,8 +33,6 @@ type NewErrorClassifier func(err error) txmgrtypes.ErrorClassifier // TxManager is the main component of the transaction manager. // It is also the interface to external callers. -// -//go:generate mockery --quiet --recursive --name TxManager --output ./mocks/ --case=underscore --structname TxManager --filename tx_manager.go type TxManager[ CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], diff --git a/common/txmgr/types/config.go b/common/txmgr/types/config.go index 53e35cd4b6e..4d9af5f0673 100644 --- a/common/txmgr/types/config.go +++ b/common/txmgr/types/config.go @@ -75,8 +75,6 @@ type ResenderTransactionsConfig interface { } // ReaperConfig is the config subset used by the reaper -// -//go:generate mockery --quiet --name ReaperChainConfig --structname ReaperConfig --output ./mocks/ --case=underscore type ReaperChainConfig interface { FinalityDepth() uint32 } diff --git a/common/txmgr/types/forwarder_manager.go b/common/txmgr/types/forwarder_manager.go index 6acb491a1fb..8f4089e2fb3 100644 --- a/common/txmgr/types/forwarder_manager.go +++ b/common/txmgr/types/forwarder_manager.go @@ -8,7 +8,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/common/types" ) -//go:generate mockery --quiet --name ForwarderManager --output ./mocks/ --case=underscore type ForwarderManager[ADDR types.Hashable] interface { services.Service ForwarderFor(ctx context.Context, addr ADDR) (forwarder ADDR, err error) diff --git a/common/txmgr/types/keystore.go b/common/txmgr/types/keystore.go index 0eecc49be70..1bcb9a5ce28 100644 --- a/common/txmgr/types/keystore.go +++ b/common/txmgr/types/keystore.go @@ -7,8 +7,6 @@ import ( ) // KeyStore encompasses the subset of keystore used by txmgr -// -//go:generate mockery --quiet --name KeyStore --output ./mocks/ --case=underscore type KeyStore[ // Account Address type. ADDR types.Hashable, diff --git a/common/txmgr/types/mocks/forwarder_manager.go b/common/txmgr/types/mocks/forwarder_manager.go index b2cf9bc9d35..00a7e6535f4 100644 --- a/common/txmgr/types/mocks/forwarder_manager.go +++ b/common/txmgr/types/mocks/forwarder_manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -15,6 +15,14 @@ type ForwarderManager[ADDR types.Hashable] struct { mock.Mock } +type ForwarderManager_Expecter[ADDR types.Hashable] struct { + mock *mock.Mock +} + +func (_m *ForwarderManager[ADDR]) EXPECT() *ForwarderManager_Expecter[ADDR] { + return &ForwarderManager_Expecter[ADDR]{mock: &_m.Mock} +} + // Close provides a mock function with given fields: func (_m *ForwarderManager[ADDR]) Close() error { ret := _m.Called() @@ -33,6 +41,33 @@ func (_m *ForwarderManager[ADDR]) Close() error { return r0 } +// ForwarderManager_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type ForwarderManager_Close_Call[ADDR types.Hashable] struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *ForwarderManager_Expecter[ADDR]) Close() *ForwarderManager_Close_Call[ADDR] { + return &ForwarderManager_Close_Call[ADDR]{Call: _e.mock.On("Close")} +} + +func (_c *ForwarderManager_Close_Call[ADDR]) Run(run func()) *ForwarderManager_Close_Call[ADDR] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ForwarderManager_Close_Call[ADDR]) Return(_a0 error) *ForwarderManager_Close_Call[ADDR] { + _c.Call.Return(_a0) + return _c +} + +func (_c *ForwarderManager_Close_Call[ADDR]) RunAndReturn(run func() error) *ForwarderManager_Close_Call[ADDR] { + _c.Call.Return(run) + return _c +} + // ConvertPayload provides a mock function with given fields: dest, origPayload func (_m *ForwarderManager[ADDR]) ConvertPayload(dest ADDR, origPayload []byte) ([]byte, error) { ret := _m.Called(dest, origPayload) @@ -63,6 +98,35 @@ func (_m *ForwarderManager[ADDR]) ConvertPayload(dest ADDR, origPayload []byte) return r0, r1 } +// ForwarderManager_ConvertPayload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ConvertPayload' +type ForwarderManager_ConvertPayload_Call[ADDR types.Hashable] struct { + *mock.Call +} + +// ConvertPayload is a helper method to define mock.On call +// - dest ADDR +// - origPayload []byte +func (_e *ForwarderManager_Expecter[ADDR]) ConvertPayload(dest interface{}, origPayload interface{}) *ForwarderManager_ConvertPayload_Call[ADDR] { + return &ForwarderManager_ConvertPayload_Call[ADDR]{Call: _e.mock.On("ConvertPayload", dest, origPayload)} +} + +func (_c *ForwarderManager_ConvertPayload_Call[ADDR]) Run(run func(dest ADDR, origPayload []byte)) *ForwarderManager_ConvertPayload_Call[ADDR] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(ADDR), args[1].([]byte)) + }) + return _c +} + +func (_c *ForwarderManager_ConvertPayload_Call[ADDR]) Return(_a0 []byte, _a1 error) *ForwarderManager_ConvertPayload_Call[ADDR] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ForwarderManager_ConvertPayload_Call[ADDR]) RunAndReturn(run func(ADDR, []byte) ([]byte, error)) *ForwarderManager_ConvertPayload_Call[ADDR] { + _c.Call.Return(run) + return _c +} + // ForwarderFor provides a mock function with given fields: ctx, addr func (_m *ForwarderManager[ADDR]) ForwarderFor(ctx context.Context, addr ADDR) (ADDR, error) { ret := _m.Called(ctx, addr) @@ -91,6 +155,35 @@ func (_m *ForwarderManager[ADDR]) ForwarderFor(ctx context.Context, addr ADDR) ( return r0, r1 } +// ForwarderManager_ForwarderFor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ForwarderFor' +type ForwarderManager_ForwarderFor_Call[ADDR types.Hashable] struct { + *mock.Call +} + +// ForwarderFor is a helper method to define mock.On call +// - ctx context.Context +// - addr ADDR +func (_e *ForwarderManager_Expecter[ADDR]) ForwarderFor(ctx interface{}, addr interface{}) *ForwarderManager_ForwarderFor_Call[ADDR] { + return &ForwarderManager_ForwarderFor_Call[ADDR]{Call: _e.mock.On("ForwarderFor", ctx, addr)} +} + +func (_c *ForwarderManager_ForwarderFor_Call[ADDR]) Run(run func(ctx context.Context, addr ADDR)) *ForwarderManager_ForwarderFor_Call[ADDR] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ADDR)) + }) + return _c +} + +func (_c *ForwarderManager_ForwarderFor_Call[ADDR]) Return(forwarder ADDR, err error) *ForwarderManager_ForwarderFor_Call[ADDR] { + _c.Call.Return(forwarder, err) + return _c +} + +func (_c *ForwarderManager_ForwarderFor_Call[ADDR]) RunAndReturn(run func(context.Context, ADDR) (ADDR, error)) *ForwarderManager_ForwarderFor_Call[ADDR] { + _c.Call.Return(run) + return _c +} + // ForwarderForOCR2Feeds provides a mock function with given fields: ctx, eoa, ocr2Aggregator func (_m *ForwarderManager[ADDR]) ForwarderForOCR2Feeds(ctx context.Context, eoa ADDR, ocr2Aggregator ADDR) (ADDR, error) { ret := _m.Called(ctx, eoa, ocr2Aggregator) @@ -119,6 +212,36 @@ func (_m *ForwarderManager[ADDR]) ForwarderForOCR2Feeds(ctx context.Context, eoa return r0, r1 } +// ForwarderManager_ForwarderForOCR2Feeds_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ForwarderForOCR2Feeds' +type ForwarderManager_ForwarderForOCR2Feeds_Call[ADDR types.Hashable] struct { + *mock.Call +} + +// ForwarderForOCR2Feeds is a helper method to define mock.On call +// - ctx context.Context +// - eoa ADDR +// - ocr2Aggregator ADDR +func (_e *ForwarderManager_Expecter[ADDR]) ForwarderForOCR2Feeds(ctx interface{}, eoa interface{}, ocr2Aggregator interface{}) *ForwarderManager_ForwarderForOCR2Feeds_Call[ADDR] { + return &ForwarderManager_ForwarderForOCR2Feeds_Call[ADDR]{Call: _e.mock.On("ForwarderForOCR2Feeds", ctx, eoa, ocr2Aggregator)} +} + +func (_c *ForwarderManager_ForwarderForOCR2Feeds_Call[ADDR]) Run(run func(ctx context.Context, eoa ADDR, ocr2Aggregator ADDR)) *ForwarderManager_ForwarderForOCR2Feeds_Call[ADDR] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ADDR), args[2].(ADDR)) + }) + return _c +} + +func (_c *ForwarderManager_ForwarderForOCR2Feeds_Call[ADDR]) Return(forwarder ADDR, err error) *ForwarderManager_ForwarderForOCR2Feeds_Call[ADDR] { + _c.Call.Return(forwarder, err) + return _c +} + +func (_c *ForwarderManager_ForwarderForOCR2Feeds_Call[ADDR]) RunAndReturn(run func(context.Context, ADDR, ADDR) (ADDR, error)) *ForwarderManager_ForwarderForOCR2Feeds_Call[ADDR] { + _c.Call.Return(run) + return _c +} + // HealthReport provides a mock function with given fields: func (_m *ForwarderManager[ADDR]) HealthReport() map[string]error { ret := _m.Called() @@ -139,6 +262,33 @@ func (_m *ForwarderManager[ADDR]) HealthReport() map[string]error { return r0 } +// ForwarderManager_HealthReport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HealthReport' +type ForwarderManager_HealthReport_Call[ADDR types.Hashable] struct { + *mock.Call +} + +// HealthReport is a helper method to define mock.On call +func (_e *ForwarderManager_Expecter[ADDR]) HealthReport() *ForwarderManager_HealthReport_Call[ADDR] { + return &ForwarderManager_HealthReport_Call[ADDR]{Call: _e.mock.On("HealthReport")} +} + +func (_c *ForwarderManager_HealthReport_Call[ADDR]) Run(run func()) *ForwarderManager_HealthReport_Call[ADDR] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ForwarderManager_HealthReport_Call[ADDR]) Return(_a0 map[string]error) *ForwarderManager_HealthReport_Call[ADDR] { + _c.Call.Return(_a0) + return _c +} + +func (_c *ForwarderManager_HealthReport_Call[ADDR]) RunAndReturn(run func() map[string]error) *ForwarderManager_HealthReport_Call[ADDR] { + _c.Call.Return(run) + return _c +} + // Name provides a mock function with given fields: func (_m *ForwarderManager[ADDR]) Name() string { ret := _m.Called() @@ -157,6 +307,33 @@ func (_m *ForwarderManager[ADDR]) Name() string { return r0 } +// ForwarderManager_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type ForwarderManager_Name_Call[ADDR types.Hashable] struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *ForwarderManager_Expecter[ADDR]) Name() *ForwarderManager_Name_Call[ADDR] { + return &ForwarderManager_Name_Call[ADDR]{Call: _e.mock.On("Name")} +} + +func (_c *ForwarderManager_Name_Call[ADDR]) Run(run func()) *ForwarderManager_Name_Call[ADDR] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ForwarderManager_Name_Call[ADDR]) Return(_a0 string) *ForwarderManager_Name_Call[ADDR] { + _c.Call.Return(_a0) + return _c +} + +func (_c *ForwarderManager_Name_Call[ADDR]) RunAndReturn(run func() string) *ForwarderManager_Name_Call[ADDR] { + _c.Call.Return(run) + return _c +} + // Ready provides a mock function with given fields: func (_m *ForwarderManager[ADDR]) Ready() error { ret := _m.Called() @@ -175,6 +352,33 @@ func (_m *ForwarderManager[ADDR]) Ready() error { return r0 } +// ForwarderManager_Ready_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ready' +type ForwarderManager_Ready_Call[ADDR types.Hashable] struct { + *mock.Call +} + +// Ready is a helper method to define mock.On call +func (_e *ForwarderManager_Expecter[ADDR]) Ready() *ForwarderManager_Ready_Call[ADDR] { + return &ForwarderManager_Ready_Call[ADDR]{Call: _e.mock.On("Ready")} +} + +func (_c *ForwarderManager_Ready_Call[ADDR]) Run(run func()) *ForwarderManager_Ready_Call[ADDR] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ForwarderManager_Ready_Call[ADDR]) Return(_a0 error) *ForwarderManager_Ready_Call[ADDR] { + _c.Call.Return(_a0) + return _c +} + +func (_c *ForwarderManager_Ready_Call[ADDR]) RunAndReturn(run func() error) *ForwarderManager_Ready_Call[ADDR] { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *ForwarderManager[ADDR]) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -193,6 +397,34 @@ func (_m *ForwarderManager[ADDR]) Start(_a0 context.Context) error { return r0 } +// ForwarderManager_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type ForwarderManager_Start_Call[ADDR types.Hashable] struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *ForwarderManager_Expecter[ADDR]) Start(_a0 interface{}) *ForwarderManager_Start_Call[ADDR] { + return &ForwarderManager_Start_Call[ADDR]{Call: _e.mock.On("Start", _a0)} +} + +func (_c *ForwarderManager_Start_Call[ADDR]) Run(run func(_a0 context.Context)) *ForwarderManager_Start_Call[ADDR] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *ForwarderManager_Start_Call[ADDR]) Return(_a0 error) *ForwarderManager_Start_Call[ADDR] { + _c.Call.Return(_a0) + return _c +} + +func (_c *ForwarderManager_Start_Call[ADDR]) RunAndReturn(run func(context.Context) error) *ForwarderManager_Start_Call[ADDR] { + _c.Call.Return(run) + return _c +} + // NewForwarderManager creates a new instance of ForwarderManager. 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 NewForwarderManager[ADDR types.Hashable](t interface { diff --git a/common/txmgr/types/mocks/key_store.go b/common/txmgr/types/mocks/key_store.go index f6f572a35ff..9b7993434cd 100644 --- a/common/txmgr/types/mocks/key_store.go +++ b/common/txmgr/types/mocks/key_store.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -15,6 +15,14 @@ type KeyStore[ADDR types.Hashable, CHAIN_ID types.ID, SEQ types.Sequence] struct mock.Mock } +type KeyStore_Expecter[ADDR types.Hashable, CHAIN_ID types.ID, SEQ types.Sequence] struct { + mock *mock.Mock +} + +func (_m *KeyStore[ADDR, CHAIN_ID, SEQ]) EXPECT() *KeyStore_Expecter[ADDR, CHAIN_ID, SEQ] { + return &KeyStore_Expecter[ADDR, CHAIN_ID, SEQ]{mock: &_m.Mock} +} + // CheckEnabled provides a mock function with given fields: ctx, address, chainID func (_m *KeyStore[ADDR, CHAIN_ID, SEQ]) CheckEnabled(ctx context.Context, address ADDR, chainID CHAIN_ID) error { ret := _m.Called(ctx, address, chainID) @@ -33,6 +41,36 @@ func (_m *KeyStore[ADDR, CHAIN_ID, SEQ]) CheckEnabled(ctx context.Context, addre return r0 } +// KeyStore_CheckEnabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckEnabled' +type KeyStore_CheckEnabled_Call[ADDR types.Hashable, CHAIN_ID types.ID, SEQ types.Sequence] struct { + *mock.Call +} + +// CheckEnabled is a helper method to define mock.On call +// - ctx context.Context +// - address ADDR +// - chainID CHAIN_ID +func (_e *KeyStore_Expecter[ADDR, CHAIN_ID, SEQ]) CheckEnabled(ctx interface{}, address interface{}, chainID interface{}) *KeyStore_CheckEnabled_Call[ADDR, CHAIN_ID, SEQ] { + return &KeyStore_CheckEnabled_Call[ADDR, CHAIN_ID, SEQ]{Call: _e.mock.On("CheckEnabled", ctx, address, chainID)} +} + +func (_c *KeyStore_CheckEnabled_Call[ADDR, CHAIN_ID, SEQ]) Run(run func(ctx context.Context, address ADDR, chainID CHAIN_ID)) *KeyStore_CheckEnabled_Call[ADDR, CHAIN_ID, SEQ] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ADDR), args[2].(CHAIN_ID)) + }) + return _c +} + +func (_c *KeyStore_CheckEnabled_Call[ADDR, CHAIN_ID, SEQ]) Return(_a0 error) *KeyStore_CheckEnabled_Call[ADDR, CHAIN_ID, SEQ] { + _c.Call.Return(_a0) + return _c +} + +func (_c *KeyStore_CheckEnabled_Call[ADDR, CHAIN_ID, SEQ]) RunAndReturn(run func(context.Context, ADDR, CHAIN_ID) error) *KeyStore_CheckEnabled_Call[ADDR, CHAIN_ID, SEQ] { + _c.Call.Return(run) + return _c +} + // EnabledAddressesForChain provides a mock function with given fields: ctx, chainId func (_m *KeyStore[ADDR, CHAIN_ID, SEQ]) EnabledAddressesForChain(ctx context.Context, chainId CHAIN_ID) ([]ADDR, error) { ret := _m.Called(ctx, chainId) @@ -63,6 +101,35 @@ func (_m *KeyStore[ADDR, CHAIN_ID, SEQ]) EnabledAddressesForChain(ctx context.Co return r0, r1 } +// KeyStore_EnabledAddressesForChain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnabledAddressesForChain' +type KeyStore_EnabledAddressesForChain_Call[ADDR types.Hashable, CHAIN_ID types.ID, SEQ types.Sequence] struct { + *mock.Call +} + +// EnabledAddressesForChain is a helper method to define mock.On call +// - ctx context.Context +// - chainId CHAIN_ID +func (_e *KeyStore_Expecter[ADDR, CHAIN_ID, SEQ]) EnabledAddressesForChain(ctx interface{}, chainId interface{}) *KeyStore_EnabledAddressesForChain_Call[ADDR, CHAIN_ID, SEQ] { + return &KeyStore_EnabledAddressesForChain_Call[ADDR, CHAIN_ID, SEQ]{Call: _e.mock.On("EnabledAddressesForChain", ctx, chainId)} +} + +func (_c *KeyStore_EnabledAddressesForChain_Call[ADDR, CHAIN_ID, SEQ]) Run(run func(ctx context.Context, chainId CHAIN_ID)) *KeyStore_EnabledAddressesForChain_Call[ADDR, CHAIN_ID, SEQ] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(CHAIN_ID)) + }) + return _c +} + +func (_c *KeyStore_EnabledAddressesForChain_Call[ADDR, CHAIN_ID, SEQ]) Return(_a0 []ADDR, _a1 error) *KeyStore_EnabledAddressesForChain_Call[ADDR, CHAIN_ID, SEQ] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *KeyStore_EnabledAddressesForChain_Call[ADDR, CHAIN_ID, SEQ]) RunAndReturn(run func(context.Context, CHAIN_ID) ([]ADDR, error)) *KeyStore_EnabledAddressesForChain_Call[ADDR, CHAIN_ID, SEQ] { + _c.Call.Return(run) + return _c +} + // SubscribeToKeyChanges provides a mock function with given fields: ctx func (_m *KeyStore[ADDR, CHAIN_ID, SEQ]) SubscribeToKeyChanges(ctx context.Context) (chan struct{}, func()) { ret := _m.Called(ctx) @@ -95,6 +162,34 @@ func (_m *KeyStore[ADDR, CHAIN_ID, SEQ]) SubscribeToKeyChanges(ctx context.Conte return r0, r1 } +// KeyStore_SubscribeToKeyChanges_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SubscribeToKeyChanges' +type KeyStore_SubscribeToKeyChanges_Call[ADDR types.Hashable, CHAIN_ID types.ID, SEQ types.Sequence] struct { + *mock.Call +} + +// SubscribeToKeyChanges is a helper method to define mock.On call +// - ctx context.Context +func (_e *KeyStore_Expecter[ADDR, CHAIN_ID, SEQ]) SubscribeToKeyChanges(ctx interface{}) *KeyStore_SubscribeToKeyChanges_Call[ADDR, CHAIN_ID, SEQ] { + return &KeyStore_SubscribeToKeyChanges_Call[ADDR, CHAIN_ID, SEQ]{Call: _e.mock.On("SubscribeToKeyChanges", ctx)} +} + +func (_c *KeyStore_SubscribeToKeyChanges_Call[ADDR, CHAIN_ID, SEQ]) Run(run func(ctx context.Context)) *KeyStore_SubscribeToKeyChanges_Call[ADDR, CHAIN_ID, SEQ] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *KeyStore_SubscribeToKeyChanges_Call[ADDR, CHAIN_ID, SEQ]) Return(ch chan struct{}, unsub func()) *KeyStore_SubscribeToKeyChanges_Call[ADDR, CHAIN_ID, SEQ] { + _c.Call.Return(ch, unsub) + return _c +} + +func (_c *KeyStore_SubscribeToKeyChanges_Call[ADDR, CHAIN_ID, SEQ]) RunAndReturn(run func(context.Context) (chan struct{}, func())) *KeyStore_SubscribeToKeyChanges_Call[ADDR, CHAIN_ID, SEQ] { + _c.Call.Return(run) + return _c +} + // NewKeyStore creates a new instance of KeyStore. 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 NewKeyStore[ADDR types.Hashable, CHAIN_ID types.ID, SEQ types.Sequence](t interface { diff --git a/common/txmgr/types/mocks/reaper_chain_config.go b/common/txmgr/types/mocks/reaper_chain_config.go index 716b3e5175a..0531b071708 100644 --- a/common/txmgr/types/mocks/reaper_chain_config.go +++ b/common/txmgr/types/mocks/reaper_chain_config.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -9,6 +9,14 @@ type ReaperConfig struct { mock.Mock } +type ReaperConfig_Expecter struct { + mock *mock.Mock +} + +func (_m *ReaperConfig) EXPECT() *ReaperConfig_Expecter { + return &ReaperConfig_Expecter{mock: &_m.Mock} +} + // FinalityDepth provides a mock function with given fields: func (_m *ReaperConfig) FinalityDepth() uint32 { ret := _m.Called() @@ -27,6 +35,33 @@ func (_m *ReaperConfig) FinalityDepth() uint32 { return r0 } +// ReaperConfig_FinalityDepth_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FinalityDepth' +type ReaperConfig_FinalityDepth_Call struct { + *mock.Call +} + +// FinalityDepth is a helper method to define mock.On call +func (_e *ReaperConfig_Expecter) FinalityDepth() *ReaperConfig_FinalityDepth_Call { + return &ReaperConfig_FinalityDepth_Call{Call: _e.mock.On("FinalityDepth")} +} + +func (_c *ReaperConfig_FinalityDepth_Call) Run(run func()) *ReaperConfig_FinalityDepth_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ReaperConfig_FinalityDepth_Call) Return(_a0 uint32) *ReaperConfig_FinalityDepth_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ReaperConfig_FinalityDepth_Call) RunAndReturn(run func() uint32) *ReaperConfig_FinalityDepth_Call { + _c.Call.Return(run) + return _c +} + // NewReaperConfig creates a new instance of ReaperConfig. 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 NewReaperConfig(t interface { diff --git a/common/txmgr/types/mocks/tx_attempt_builder.go b/common/txmgr/types/mocks/tx_attempt_builder.go index 47614674336..cac8135dfe8 100644 --- a/common/txmgr/types/mocks/tx_attempt_builder.go +++ b/common/txmgr/types/mocks/tx_attempt_builder.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -20,6 +20,14 @@ type TxAttemptBuilder[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types mock.Mock } +type TxAttemptBuilder_Expecter[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + mock *mock.Mock +} + +func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) EXPECT() *TxAttemptBuilder_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxAttemptBuilder_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{mock: &_m.Mock} +} + // Close provides a mock function with given fields: func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Close() error { ret := _m.Called() @@ -38,6 +46,33 @@ func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) return r0 } +// TxAttemptBuilder_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type TxAttemptBuilder_Close_Call[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *TxAttemptBuilder_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Close() *TxAttemptBuilder_Close_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxAttemptBuilder_Close_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{Call: _e.mock.On("Close")} +} + +func (_c *TxAttemptBuilder_Close_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Run(run func()) *TxAttemptBuilder_Close_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *TxAttemptBuilder_Close_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Return(_a0 error) *TxAttemptBuilder_Close_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxAttemptBuilder_Close_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RunAndReturn(run func() error) *TxAttemptBuilder_Close_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // HealthReport provides a mock function with given fields: func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) HealthReport() map[string]error { ret := _m.Called() @@ -58,6 +93,33 @@ func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) return r0 } +// TxAttemptBuilder_HealthReport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HealthReport' +type TxAttemptBuilder_HealthReport_Call[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// HealthReport is a helper method to define mock.On call +func (_e *TxAttemptBuilder_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) HealthReport() *TxAttemptBuilder_HealthReport_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxAttemptBuilder_HealthReport_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{Call: _e.mock.On("HealthReport")} +} + +func (_c *TxAttemptBuilder_HealthReport_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Run(run func()) *TxAttemptBuilder_HealthReport_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *TxAttemptBuilder_HealthReport_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Return(_a0 map[string]error) *TxAttemptBuilder_HealthReport_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxAttemptBuilder_HealthReport_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RunAndReturn(run func() map[string]error) *TxAttemptBuilder_HealthReport_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // Name provides a mock function with given fields: func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Name() string { ret := _m.Called() @@ -76,6 +138,33 @@ func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) return r0 } +// TxAttemptBuilder_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type TxAttemptBuilder_Name_Call[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *TxAttemptBuilder_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Name() *TxAttemptBuilder_Name_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxAttemptBuilder_Name_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{Call: _e.mock.On("Name")} +} + +func (_c *TxAttemptBuilder_Name_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Run(run func()) *TxAttemptBuilder_Name_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *TxAttemptBuilder_Name_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Return(_a0 string) *TxAttemptBuilder_Name_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxAttemptBuilder_Name_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RunAndReturn(run func() string) *TxAttemptBuilder_Name_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // 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, uint64, bool, error) { ret := _m.Called(ctx, tx, previousAttempt, priorAttempts, lggr) @@ -125,6 +214,38 @@ func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) return r0, r1, r2, r3, r4 } +// TxAttemptBuilder_NewBumpTxAttempt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewBumpTxAttempt' +type TxAttemptBuilder_NewBumpTxAttempt_Call[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// NewBumpTxAttempt is a helper method to define mock.On call +// - 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 +func (_e *TxAttemptBuilder_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) NewBumpTxAttempt(ctx interface{}, tx interface{}, previousAttempt interface{}, priorAttempts interface{}, lggr interface{}) *TxAttemptBuilder_NewBumpTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxAttemptBuilder_NewBumpTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{Call: _e.mock.On("NewBumpTxAttempt", ctx, tx, previousAttempt, priorAttempts, lggr)} +} + +func (_c *TxAttemptBuilder_NewBumpTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Run(run func(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)) *TxAttemptBuilder_NewBumpTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]), args[2].(txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]), args[3].([]txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]), args[4].(logger.Logger)) + }) + return _c +} + +func (_c *TxAttemptBuilder_NewBumpTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Return(attempt txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], bumpedFee FEE, bumpedFeeLimit uint64, retryable bool, err error) *TxAttemptBuilder_NewBumpTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(attempt, bumpedFee, bumpedFeeLimit, retryable, err) + return _c +} + +func (_c *TxAttemptBuilder_NewBumpTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RunAndReturn(run 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)) *TxAttemptBuilder_NewBumpTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // 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 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) @@ -160,6 +281,39 @@ func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) return r0, r1, r2 } +// TxAttemptBuilder_NewCustomTxAttempt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewCustomTxAttempt' +type TxAttemptBuilder_NewCustomTxAttempt_Call[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// NewCustomTxAttempt is a helper method to define mock.On call +// - ctx context.Context +// - tx txmgrtypes.Tx[CHAIN_ID,ADDR,TX_HASH,BLOCK_HASH,SEQ,FEE] +// - fee FEE +// - gasLimit uint64 +// - txType int +// - lggr logger.Logger +func (_e *TxAttemptBuilder_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) NewCustomTxAttempt(ctx interface{}, tx interface{}, fee interface{}, gasLimit interface{}, txType interface{}, lggr interface{}) *TxAttemptBuilder_NewCustomTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxAttemptBuilder_NewCustomTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{Call: _e.mock.On("NewCustomTxAttempt", ctx, tx, fee, gasLimit, txType, lggr)} +} + +func (_c *TxAttemptBuilder_NewCustomTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Run(run func(ctx context.Context, tx txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], fee FEE, gasLimit uint64, txType int, lggr logger.Logger)) *TxAttemptBuilder_NewCustomTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]), args[2].(FEE), args[3].(uint64), args[4].(int), args[5].(logger.Logger)) + }) + return _c +} + +func (_c *TxAttemptBuilder_NewCustomTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Return(attempt txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], retryable bool, err error) *TxAttemptBuilder_NewCustomTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(attempt, retryable, err) + return _c +} + +func (_c *TxAttemptBuilder_NewCustomTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RunAndReturn(run 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)) *TxAttemptBuilder_NewCustomTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // 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 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) @@ -188,6 +342,38 @@ func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) return r0, r1 } +// TxAttemptBuilder_NewEmptyTxAttempt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewEmptyTxAttempt' +type TxAttemptBuilder_NewEmptyTxAttempt_Call[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// NewEmptyTxAttempt is a helper method to define mock.On call +// - ctx context.Context +// - seq SEQ +// - feeLimit uint64 +// - fee FEE +// - fromAddress ADDR +func (_e *TxAttemptBuilder_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) NewEmptyTxAttempt(ctx interface{}, seq interface{}, feeLimit interface{}, fee interface{}, fromAddress interface{}) *TxAttemptBuilder_NewEmptyTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxAttemptBuilder_NewEmptyTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{Call: _e.mock.On("NewEmptyTxAttempt", ctx, seq, feeLimit, fee, fromAddress)} +} + +func (_c *TxAttemptBuilder_NewEmptyTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Run(run func(ctx context.Context, seq SEQ, feeLimit uint64, fee FEE, fromAddress ADDR)) *TxAttemptBuilder_NewEmptyTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(SEQ), args[2].(uint64), args[3].(FEE), args[4].(ADDR)) + }) + return _c +} + +func (_c *TxAttemptBuilder_NewEmptyTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Return(attempt txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], err error) *TxAttemptBuilder_NewEmptyTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(attempt, err) + return _c +} + +func (_c *TxAttemptBuilder_NewEmptyTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RunAndReturn(run func(context.Context, SEQ, uint64, FEE, ADDR) (txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error)) *TxAttemptBuilder_NewEmptyTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // NewPurgeTxAttempt provides a mock function with given fields: ctx, etx, lggr func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) NewPurgeTxAttempt(ctx context.Context, etx txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], lggr logger.Logger) (txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error) { ret := _m.Called(ctx, etx, lggr) @@ -216,6 +402,36 @@ func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) return r0, r1 } +// TxAttemptBuilder_NewPurgeTxAttempt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewPurgeTxAttempt' +type TxAttemptBuilder_NewPurgeTxAttempt_Call[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// NewPurgeTxAttempt is a helper method to define mock.On call +// - ctx context.Context +// - etx txmgrtypes.Tx[CHAIN_ID,ADDR,TX_HASH,BLOCK_HASH,SEQ,FEE] +// - lggr logger.Logger +func (_e *TxAttemptBuilder_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) NewPurgeTxAttempt(ctx interface{}, etx interface{}, lggr interface{}) *TxAttemptBuilder_NewPurgeTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxAttemptBuilder_NewPurgeTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{Call: _e.mock.On("NewPurgeTxAttempt", ctx, etx, lggr)} +} + +func (_c *TxAttemptBuilder_NewPurgeTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Run(run func(ctx context.Context, etx txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], lggr logger.Logger)) *TxAttemptBuilder_NewPurgeTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]), args[2].(logger.Logger)) + }) + return _c +} + +func (_c *TxAttemptBuilder_NewPurgeTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Return(attempt txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], err error) *TxAttemptBuilder_NewPurgeTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(attempt, err) + return _c +} + +func (_c *TxAttemptBuilder_NewPurgeTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RunAndReturn(run func(context.Context, txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], logger.Logger) (txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error)) *TxAttemptBuilder_NewPurgeTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // 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, uint64, bool, error) { _va := make([]interface{}, len(opts)) @@ -272,6 +488,44 @@ func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) return r0, r1, r2, r3, r4 } +// TxAttemptBuilder_NewTxAttempt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewTxAttempt' +type TxAttemptBuilder_NewTxAttempt_Call[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// NewTxAttempt is a helper method to define mock.On call +// - ctx context.Context +// - tx txmgrtypes.Tx[CHAIN_ID,ADDR,TX_HASH,BLOCK_HASH,SEQ,FEE] +// - lggr logger.Logger +// - opts ...feetypes.Opt +func (_e *TxAttemptBuilder_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) NewTxAttempt(ctx interface{}, tx interface{}, lggr interface{}, opts ...interface{}) *TxAttemptBuilder_NewTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxAttemptBuilder_NewTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{Call: _e.mock.On("NewTxAttempt", + append([]interface{}{ctx, tx, lggr}, opts...)...)} +} + +func (_c *TxAttemptBuilder_NewTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Run(run func(ctx context.Context, tx txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], lggr logger.Logger, opts ...feetypes.Opt)) *TxAttemptBuilder_NewTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]feetypes.Opt, len(args)-3) + for i, a := range args[3:] { + if a != nil { + variadicArgs[i] = a.(feetypes.Opt) + } + } + run(args[0].(context.Context), args[1].(txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]), args[2].(logger.Logger), variadicArgs...) + }) + return _c +} + +func (_c *TxAttemptBuilder_NewTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Return(attempt txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], fee FEE, feeLimit uint64, retryable bool, err error) *TxAttemptBuilder_NewTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(attempt, fee, feeLimit, retryable, err) + return _c +} + +func (_c *TxAttemptBuilder_NewTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RunAndReturn(run 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)) *TxAttemptBuilder_NewTxAttempt_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // 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, uint64, bool, error) { _va := make([]interface{}, len(opts)) @@ -328,11 +582,79 @@ func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) return r0, r1, r2, r3, r4 } +// TxAttemptBuilder_NewTxAttemptWithType_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewTxAttemptWithType' +type TxAttemptBuilder_NewTxAttemptWithType_Call[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// NewTxAttemptWithType is a helper method to define mock.On call +// - ctx context.Context +// - tx txmgrtypes.Tx[CHAIN_ID,ADDR,TX_HASH,BLOCK_HASH,SEQ,FEE] +// - lggr logger.Logger +// - txType int +// - opts ...feetypes.Opt +func (_e *TxAttemptBuilder_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) NewTxAttemptWithType(ctx interface{}, tx interface{}, lggr interface{}, txType interface{}, opts ...interface{}) *TxAttemptBuilder_NewTxAttemptWithType_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxAttemptBuilder_NewTxAttemptWithType_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{Call: _e.mock.On("NewTxAttemptWithType", + append([]interface{}{ctx, tx, lggr, txType}, opts...)...)} +} + +func (_c *TxAttemptBuilder_NewTxAttemptWithType_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Run(run func(ctx context.Context, tx txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], lggr logger.Logger, txType int, opts ...feetypes.Opt)) *TxAttemptBuilder_NewTxAttemptWithType_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]feetypes.Opt, len(args)-4) + for i, a := range args[4:] { + if a != nil { + variadicArgs[i] = a.(feetypes.Opt) + } + } + run(args[0].(context.Context), args[1].(txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]), args[2].(logger.Logger), args[3].(int), variadicArgs...) + }) + return _c +} + +func (_c *TxAttemptBuilder_NewTxAttemptWithType_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Return(attempt txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], fee FEE, feeLimit uint64, retryable bool, err error) *TxAttemptBuilder_NewTxAttemptWithType_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(attempt, fee, feeLimit, retryable, err) + return _c +} + +func (_c *TxAttemptBuilder_NewTxAttemptWithType_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RunAndReturn(run 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)) *TxAttemptBuilder_NewTxAttemptWithType_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // OnNewLongestChain provides a mock function with given fields: ctx, head func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) OnNewLongestChain(ctx context.Context, head HEAD) { _m.Called(ctx, head) } +// TxAttemptBuilder_OnNewLongestChain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnNewLongestChain' +type TxAttemptBuilder_OnNewLongestChain_Call[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// OnNewLongestChain is a helper method to define mock.On call +// - ctx context.Context +// - head HEAD +func (_e *TxAttemptBuilder_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) OnNewLongestChain(ctx interface{}, head interface{}) *TxAttemptBuilder_OnNewLongestChain_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxAttemptBuilder_OnNewLongestChain_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{Call: _e.mock.On("OnNewLongestChain", ctx, head)} +} + +func (_c *TxAttemptBuilder_OnNewLongestChain_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Run(run func(ctx context.Context, head HEAD)) *TxAttemptBuilder_OnNewLongestChain_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(HEAD)) + }) + return _c +} + +func (_c *TxAttemptBuilder_OnNewLongestChain_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Return() *TxAttemptBuilder_OnNewLongestChain_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return() + return _c +} + +func (_c *TxAttemptBuilder_OnNewLongestChain_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RunAndReturn(run func(context.Context, HEAD)) *TxAttemptBuilder_OnNewLongestChain_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // Ready provides a mock function with given fields: func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Ready() error { ret := _m.Called() @@ -351,6 +673,33 @@ func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) return r0 } +// TxAttemptBuilder_Ready_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ready' +type TxAttemptBuilder_Ready_Call[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// Ready is a helper method to define mock.On call +func (_e *TxAttemptBuilder_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Ready() *TxAttemptBuilder_Ready_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxAttemptBuilder_Ready_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{Call: _e.mock.On("Ready")} +} + +func (_c *TxAttemptBuilder_Ready_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Run(run func()) *TxAttemptBuilder_Ready_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *TxAttemptBuilder_Ready_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Return(_a0 error) *TxAttemptBuilder_Ready_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxAttemptBuilder_Ready_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RunAndReturn(run func() error) *TxAttemptBuilder_Ready_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -369,6 +718,34 @@ func (_m *TxAttemptBuilder[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) return r0 } +// TxAttemptBuilder_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type TxAttemptBuilder_Start_Call[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *TxAttemptBuilder_Expecter[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Start(_a0 interface{}) *TxAttemptBuilder_Start_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + return &TxAttemptBuilder_Start_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]{Call: _e.mock.On("Start", _a0)} +} + +func (_c *TxAttemptBuilder_Start_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Run(run func(_a0 context.Context)) *TxAttemptBuilder_Start_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *TxAttemptBuilder_Start_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) Return(_a0 error) *TxAttemptBuilder_Start_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxAttemptBuilder_Start_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) RunAndReturn(run func(context.Context) error) *TxAttemptBuilder_Start_Call[CHAIN_ID, HEAD, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // NewTxAttemptBuilder creates a new instance of TxAttemptBuilder. 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 NewTxAttemptBuilder[CHAIN_ID types.ID, HEAD types.Head[BLOCK_HASH], ADDR types.Hashable, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, SEQ types.Sequence, FEE feetypes.Fee](t interface { diff --git a/common/txmgr/types/mocks/tx_store.go b/common/txmgr/types/mocks/tx_store.go index bb8fabf1a71..ee166638e34 100644 --- a/common/txmgr/types/mocks/tx_store.go +++ b/common/txmgr/types/mocks/tx_store.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -25,6 +25,14 @@ type TxStore[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLO mock.Mock } +type TxStore_Expecter[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + mock *mock.Mock +} + +func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) EXPECT() *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{mock: &_m.Mock} +} + // Abandon provides a mock function with given fields: ctx, id, addr func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Abandon(ctx context.Context, id CHAIN_ID, addr ADDR) error { ret := _m.Called(ctx, id, addr) @@ -43,6 +51,36 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Abandon(ctx return r0 } +// TxStore_Abandon_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Abandon' +type TxStore_Abandon_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// Abandon is a helper method to define mock.On call +// - ctx context.Context +// - id CHAIN_ID +// - addr ADDR +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Abandon(ctx interface{}, id interface{}, addr interface{}) *TxStore_Abandon_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_Abandon_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("Abandon", ctx, id, addr)} +} + +func (_c *TxStore_Abandon_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, id CHAIN_ID, addr ADDR)) *TxStore_Abandon_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(CHAIN_ID), args[2].(ADDR)) + }) + return _c +} + +func (_c *TxStore_Abandon_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(_a0 error) *TxStore_Abandon_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxStore_Abandon_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, CHAIN_ID, ADDR) error) *TxStore_Abandon_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // CheckTxQueueCapacity provides a mock function with given fields: ctx, fromAddress, maxQueuedTransactions, chainID func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) CheckTxQueueCapacity(ctx context.Context, fromAddress ADDR, maxQueuedTransactions uint64, chainID CHAIN_ID) error { ret := _m.Called(ctx, fromAddress, maxQueuedTransactions, chainID) @@ -61,11 +99,69 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) CheckTxQueu return r0 } +// TxStore_CheckTxQueueCapacity_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckTxQueueCapacity' +type TxStore_CheckTxQueueCapacity_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// CheckTxQueueCapacity is a helper method to define mock.On call +// - ctx context.Context +// - fromAddress ADDR +// - maxQueuedTransactions uint64 +// - chainID CHAIN_ID +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) CheckTxQueueCapacity(ctx interface{}, fromAddress interface{}, maxQueuedTransactions interface{}, chainID interface{}) *TxStore_CheckTxQueueCapacity_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_CheckTxQueueCapacity_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("CheckTxQueueCapacity", ctx, fromAddress, maxQueuedTransactions, chainID)} +} + +func (_c *TxStore_CheckTxQueueCapacity_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, fromAddress ADDR, maxQueuedTransactions uint64, chainID CHAIN_ID)) *TxStore_CheckTxQueueCapacity_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ADDR), args[2].(uint64), args[3].(CHAIN_ID)) + }) + return _c +} + +func (_c *TxStore_CheckTxQueueCapacity_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(err error) *TxStore_CheckTxQueueCapacity_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(err) + return _c +} + +func (_c *TxStore_CheckTxQueueCapacity_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, ADDR, uint64, CHAIN_ID) error) *TxStore_CheckTxQueueCapacity_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // Close provides a mock function with given fields: func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Close() { _m.Called() } +// TxStore_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type TxStore_Close_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Close() *TxStore_Close_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_Close_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("Close")} +} + +func (_c *TxStore_Close_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func()) *TxStore_Close_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *TxStore_Close_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return() *TxStore_Close_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return() + return _c +} + +func (_c *TxStore_Close_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func()) *TxStore_Close_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // CountTransactionsByState provides a mock function with given fields: ctx, state, chainID func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) CountTransactionsByState(ctx context.Context, state txmgrtypes.TxState, chainID CHAIN_ID) (uint32, error) { ret := _m.Called(ctx, state, chainID) @@ -94,6 +190,36 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) CountTransa return r0, r1 } +// TxStore_CountTransactionsByState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CountTransactionsByState' +type TxStore_CountTransactionsByState_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// CountTransactionsByState is a helper method to define mock.On call +// - ctx context.Context +// - state txmgrtypes.TxState +// - chainID CHAIN_ID +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) CountTransactionsByState(ctx interface{}, state interface{}, chainID interface{}) *TxStore_CountTransactionsByState_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_CountTransactionsByState_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("CountTransactionsByState", ctx, state, chainID)} +} + +func (_c *TxStore_CountTransactionsByState_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, state txmgrtypes.TxState, chainID CHAIN_ID)) *TxStore_CountTransactionsByState_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(txmgrtypes.TxState), args[2].(CHAIN_ID)) + }) + return _c +} + +func (_c *TxStore_CountTransactionsByState_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(count uint32, err error) *TxStore_CountTransactionsByState_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(count, err) + return _c +} + +func (_c *TxStore_CountTransactionsByState_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, txmgrtypes.TxState, CHAIN_ID) (uint32, error)) *TxStore_CountTransactionsByState_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // CountUnconfirmedTransactions provides a mock function with given fields: ctx, fromAddress, chainID func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) CountUnconfirmedTransactions(ctx context.Context, fromAddress ADDR, chainID CHAIN_ID) (uint32, error) { ret := _m.Called(ctx, fromAddress, chainID) @@ -122,6 +248,36 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) CountUnconf return r0, r1 } +// TxStore_CountUnconfirmedTransactions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CountUnconfirmedTransactions' +type TxStore_CountUnconfirmedTransactions_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// CountUnconfirmedTransactions is a helper method to define mock.On call +// - ctx context.Context +// - fromAddress ADDR +// - chainID CHAIN_ID +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) CountUnconfirmedTransactions(ctx interface{}, fromAddress interface{}, chainID interface{}) *TxStore_CountUnconfirmedTransactions_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_CountUnconfirmedTransactions_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("CountUnconfirmedTransactions", ctx, fromAddress, chainID)} +} + +func (_c *TxStore_CountUnconfirmedTransactions_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, fromAddress ADDR, chainID CHAIN_ID)) *TxStore_CountUnconfirmedTransactions_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ADDR), args[2].(CHAIN_ID)) + }) + return _c +} + +func (_c *TxStore_CountUnconfirmedTransactions_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(count uint32, err error) *TxStore_CountUnconfirmedTransactions_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(count, err) + return _c +} + +func (_c *TxStore_CountUnconfirmedTransactions_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, ADDR, CHAIN_ID) (uint32, error)) *TxStore_CountUnconfirmedTransactions_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // CountUnstartedTransactions provides a mock function with given fields: ctx, fromAddress, chainID func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) CountUnstartedTransactions(ctx context.Context, fromAddress ADDR, chainID CHAIN_ID) (uint32, error) { ret := _m.Called(ctx, fromAddress, chainID) @@ -150,6 +306,36 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) CountUnstar return r0, r1 } +// TxStore_CountUnstartedTransactions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CountUnstartedTransactions' +type TxStore_CountUnstartedTransactions_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// CountUnstartedTransactions is a helper method to define mock.On call +// - ctx context.Context +// - fromAddress ADDR +// - chainID CHAIN_ID +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) CountUnstartedTransactions(ctx interface{}, fromAddress interface{}, chainID interface{}) *TxStore_CountUnstartedTransactions_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_CountUnstartedTransactions_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("CountUnstartedTransactions", ctx, fromAddress, chainID)} +} + +func (_c *TxStore_CountUnstartedTransactions_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, fromAddress ADDR, chainID CHAIN_ID)) *TxStore_CountUnstartedTransactions_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ADDR), args[2].(CHAIN_ID)) + }) + return _c +} + +func (_c *TxStore_CountUnstartedTransactions_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(count uint32, err error) *TxStore_CountUnstartedTransactions_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(count, err) + return _c +} + +func (_c *TxStore_CountUnstartedTransactions_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, ADDR, CHAIN_ID) (uint32, error)) *TxStore_CountUnstartedTransactions_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // CreateTransaction provides a mock function with given fields: ctx, txRequest, chainID func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) CreateTransaction(ctx context.Context, txRequest txmgrtypes.TxRequest[ADDR, TX_HASH], chainID CHAIN_ID) (txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error) { ret := _m.Called(ctx, txRequest, chainID) @@ -178,6 +364,36 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) CreateTrans return r0, r1 } +// TxStore_CreateTransaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateTransaction' +type TxStore_CreateTransaction_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// CreateTransaction is a helper method to define mock.On call +// - ctx context.Context +// - txRequest txmgrtypes.TxRequest[ADDR,TX_HASH] +// - chainID CHAIN_ID +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) CreateTransaction(ctx interface{}, txRequest interface{}, chainID interface{}) *TxStore_CreateTransaction_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_CreateTransaction_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("CreateTransaction", ctx, txRequest, chainID)} +} + +func (_c *TxStore_CreateTransaction_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, txRequest txmgrtypes.TxRequest[ADDR, TX_HASH], chainID CHAIN_ID)) *TxStore_CreateTransaction_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(txmgrtypes.TxRequest[ADDR, TX_HASH]), args[2].(CHAIN_ID)) + }) + return _c +} + +func (_c *TxStore_CreateTransaction_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(tx txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], err error) *TxStore_CreateTransaction_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(tx, err) + return _c +} + +func (_c *TxStore_CreateTransaction_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, txmgrtypes.TxRequest[ADDR, TX_HASH], CHAIN_ID) (txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error)) *TxStore_CreateTransaction_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // DeleteInProgressAttempt provides a mock function with given fields: ctx, attempt func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) DeleteInProgressAttempt(ctx context.Context, attempt txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) error { ret := _m.Called(ctx, attempt) @@ -196,6 +412,35 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) DeleteInPro return r0 } +// TxStore_DeleteInProgressAttempt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteInProgressAttempt' +type TxStore_DeleteInProgressAttempt_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// DeleteInProgressAttempt is a helper method to define mock.On call +// - ctx context.Context +// - attempt txmgrtypes.TxAttempt[CHAIN_ID,ADDR,TX_HASH,BLOCK_HASH,SEQ,FEE] +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) DeleteInProgressAttempt(ctx interface{}, attempt interface{}) *TxStore_DeleteInProgressAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_DeleteInProgressAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("DeleteInProgressAttempt", ctx, attempt)} +} + +func (_c *TxStore_DeleteInProgressAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, attempt txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE])) *TxStore_DeleteInProgressAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE])) + }) + return _c +} + +func (_c *TxStore_DeleteInProgressAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(_a0 error) *TxStore_DeleteInProgressAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxStore_DeleteInProgressAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) error) *TxStore_DeleteInProgressAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // FindEarliestUnconfirmedBroadcastTime provides a mock function with given fields: ctx, chainID func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindEarliestUnconfirmedBroadcastTime(ctx context.Context, chainID CHAIN_ID) (null.Time, error) { ret := _m.Called(ctx, chainID) @@ -224,6 +469,35 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindEarlies return r0, r1 } +// TxStore_FindEarliestUnconfirmedBroadcastTime_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindEarliestUnconfirmedBroadcastTime' +type TxStore_FindEarliestUnconfirmedBroadcastTime_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// FindEarliestUnconfirmedBroadcastTime is a helper method to define mock.On call +// - ctx context.Context +// - chainID CHAIN_ID +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindEarliestUnconfirmedBroadcastTime(ctx interface{}, chainID interface{}) *TxStore_FindEarliestUnconfirmedBroadcastTime_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_FindEarliestUnconfirmedBroadcastTime_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("FindEarliestUnconfirmedBroadcastTime", ctx, chainID)} +} + +func (_c *TxStore_FindEarliestUnconfirmedBroadcastTime_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, chainID CHAIN_ID)) *TxStore_FindEarliestUnconfirmedBroadcastTime_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(CHAIN_ID)) + }) + return _c +} + +func (_c *TxStore_FindEarliestUnconfirmedBroadcastTime_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(_a0 null.Time, _a1 error) *TxStore_FindEarliestUnconfirmedBroadcastTime_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *TxStore_FindEarliestUnconfirmedBroadcastTime_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, CHAIN_ID) (null.Time, error)) *TxStore_FindEarliestUnconfirmedBroadcastTime_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // FindEarliestUnconfirmedTxAttemptBlock provides a mock function with given fields: ctx, chainID func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindEarliestUnconfirmedTxAttemptBlock(ctx context.Context, chainID CHAIN_ID) (null.Int, error) { ret := _m.Called(ctx, chainID) @@ -252,6 +526,35 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindEarlies return r0, r1 } +// TxStore_FindEarliestUnconfirmedTxAttemptBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindEarliestUnconfirmedTxAttemptBlock' +type TxStore_FindEarliestUnconfirmedTxAttemptBlock_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// FindEarliestUnconfirmedTxAttemptBlock is a helper method to define mock.On call +// - ctx context.Context +// - chainID CHAIN_ID +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindEarliestUnconfirmedTxAttemptBlock(ctx interface{}, chainID interface{}) *TxStore_FindEarliestUnconfirmedTxAttemptBlock_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_FindEarliestUnconfirmedTxAttemptBlock_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("FindEarliestUnconfirmedTxAttemptBlock", ctx, chainID)} +} + +func (_c *TxStore_FindEarliestUnconfirmedTxAttemptBlock_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, chainID CHAIN_ID)) *TxStore_FindEarliestUnconfirmedTxAttemptBlock_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(CHAIN_ID)) + }) + return _c +} + +func (_c *TxStore_FindEarliestUnconfirmedTxAttemptBlock_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(_a0 null.Int, _a1 error) *TxStore_FindEarliestUnconfirmedTxAttemptBlock_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *TxStore_FindEarliestUnconfirmedTxAttemptBlock_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, CHAIN_ID) (null.Int, error)) *TxStore_FindEarliestUnconfirmedTxAttemptBlock_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // FindLatestSequence provides a mock function with given fields: ctx, fromAddress, chainId func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindLatestSequence(ctx context.Context, fromAddress ADDR, chainId CHAIN_ID) (SEQ, error) { ret := _m.Called(ctx, fromAddress, chainId) @@ -280,6 +583,36 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindLatestS return r0, r1 } +// TxStore_FindLatestSequence_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindLatestSequence' +type TxStore_FindLatestSequence_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// FindLatestSequence is a helper method to define mock.On call +// - ctx context.Context +// - fromAddress ADDR +// - chainId CHAIN_ID +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindLatestSequence(ctx interface{}, fromAddress interface{}, chainId interface{}) *TxStore_FindLatestSequence_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_FindLatestSequence_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("FindLatestSequence", ctx, fromAddress, chainId)} +} + +func (_c *TxStore_FindLatestSequence_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, fromAddress ADDR, chainId CHAIN_ID)) *TxStore_FindLatestSequence_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ADDR), args[2].(CHAIN_ID)) + }) + return _c +} + +func (_c *TxStore_FindLatestSequence_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(_a0 SEQ, _a1 error) *TxStore_FindLatestSequence_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *TxStore_FindLatestSequence_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, ADDR, CHAIN_ID) (SEQ, error)) *TxStore_FindLatestSequence_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // FindNextUnstartedTransactionFromAddress provides a mock function with given fields: ctx, fromAddress, chainID func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindNextUnstartedTransactionFromAddress(ctx context.Context, fromAddress ADDR, chainID CHAIN_ID) (*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error) { ret := _m.Called(ctx, fromAddress, chainID) @@ -310,6 +643,36 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindNextUns return r0, r1 } +// TxStore_FindNextUnstartedTransactionFromAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindNextUnstartedTransactionFromAddress' +type TxStore_FindNextUnstartedTransactionFromAddress_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// FindNextUnstartedTransactionFromAddress is a helper method to define mock.On call +// - ctx context.Context +// - fromAddress ADDR +// - chainID CHAIN_ID +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindNextUnstartedTransactionFromAddress(ctx interface{}, fromAddress interface{}, chainID interface{}) *TxStore_FindNextUnstartedTransactionFromAddress_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_FindNextUnstartedTransactionFromAddress_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("FindNextUnstartedTransactionFromAddress", ctx, fromAddress, chainID)} +} + +func (_c *TxStore_FindNextUnstartedTransactionFromAddress_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, fromAddress ADDR, chainID CHAIN_ID)) *TxStore_FindNextUnstartedTransactionFromAddress_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ADDR), args[2].(CHAIN_ID)) + }) + return _c +} + +func (_c *TxStore_FindNextUnstartedTransactionFromAddress_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(_a0 *txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], _a1 error) *TxStore_FindNextUnstartedTransactionFromAddress_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *TxStore_FindNextUnstartedTransactionFromAddress_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, ADDR, CHAIN_ID) (*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error)) *TxStore_FindNextUnstartedTransactionFromAddress_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // FindTransactionsConfirmedInBlockRange provides a mock function with given fields: ctx, highBlockNumber, lowBlockNumber, chainID func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTransactionsConfirmedInBlockRange(ctx context.Context, highBlockNumber int64, lowBlockNumber int64, chainID CHAIN_ID) ([]*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error) { ret := _m.Called(ctx, highBlockNumber, lowBlockNumber, chainID) @@ -340,6 +703,37 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTransac return r0, r1 } +// TxStore_FindTransactionsConfirmedInBlockRange_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTransactionsConfirmedInBlockRange' +type TxStore_FindTransactionsConfirmedInBlockRange_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// FindTransactionsConfirmedInBlockRange is a helper method to define mock.On call +// - ctx context.Context +// - highBlockNumber int64 +// - lowBlockNumber int64 +// - chainID CHAIN_ID +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTransactionsConfirmedInBlockRange(ctx interface{}, highBlockNumber interface{}, lowBlockNumber interface{}, chainID interface{}) *TxStore_FindTransactionsConfirmedInBlockRange_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_FindTransactionsConfirmedInBlockRange_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("FindTransactionsConfirmedInBlockRange", ctx, highBlockNumber, lowBlockNumber, chainID)} +} + +func (_c *TxStore_FindTransactionsConfirmedInBlockRange_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, highBlockNumber int64, lowBlockNumber int64, chainID CHAIN_ID)) *TxStore_FindTransactionsConfirmedInBlockRange_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64), args[2].(int64), args[3].(CHAIN_ID)) + }) + return _c +} + +func (_c *TxStore_FindTransactionsConfirmedInBlockRange_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(etxs []*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], err error) *TxStore_FindTransactionsConfirmedInBlockRange_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(etxs, err) + return _c +} + +func (_c *TxStore_FindTransactionsConfirmedInBlockRange_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, int64, int64, CHAIN_ID) ([]*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error)) *TxStore_FindTransactionsConfirmedInBlockRange_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // FindTxAttemptsConfirmedMissingReceipt provides a mock function with given fields: ctx, chainID func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxAttemptsConfirmedMissingReceipt(ctx context.Context, chainID CHAIN_ID) ([]txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error) { ret := _m.Called(ctx, chainID) @@ -370,6 +764,35 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxAttem return r0, r1 } +// TxStore_FindTxAttemptsConfirmedMissingReceipt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxAttemptsConfirmedMissingReceipt' +type TxStore_FindTxAttemptsConfirmedMissingReceipt_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// FindTxAttemptsConfirmedMissingReceipt is a helper method to define mock.On call +// - ctx context.Context +// - chainID CHAIN_ID +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxAttemptsConfirmedMissingReceipt(ctx interface{}, chainID interface{}) *TxStore_FindTxAttemptsConfirmedMissingReceipt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_FindTxAttemptsConfirmedMissingReceipt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("FindTxAttemptsConfirmedMissingReceipt", ctx, chainID)} +} + +func (_c *TxStore_FindTxAttemptsConfirmedMissingReceipt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, chainID CHAIN_ID)) *TxStore_FindTxAttemptsConfirmedMissingReceipt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(CHAIN_ID)) + }) + return _c +} + +func (_c *TxStore_FindTxAttemptsConfirmedMissingReceipt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(attempts []txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], err error) *TxStore_FindTxAttemptsConfirmedMissingReceipt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(attempts, err) + return _c +} + +func (_c *TxStore_FindTxAttemptsConfirmedMissingReceipt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, CHAIN_ID) ([]txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error)) *TxStore_FindTxAttemptsConfirmedMissingReceipt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // FindTxAttemptsRequiringReceiptFetch provides a mock function with given fields: ctx, chainID func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxAttemptsRequiringReceiptFetch(ctx context.Context, chainID CHAIN_ID) ([]txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error) { ret := _m.Called(ctx, chainID) @@ -400,6 +823,35 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxAttem return r0, r1 } +// TxStore_FindTxAttemptsRequiringReceiptFetch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxAttemptsRequiringReceiptFetch' +type TxStore_FindTxAttemptsRequiringReceiptFetch_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// FindTxAttemptsRequiringReceiptFetch is a helper method to define mock.On call +// - ctx context.Context +// - chainID CHAIN_ID +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxAttemptsRequiringReceiptFetch(ctx interface{}, chainID interface{}) *TxStore_FindTxAttemptsRequiringReceiptFetch_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_FindTxAttemptsRequiringReceiptFetch_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("FindTxAttemptsRequiringReceiptFetch", ctx, chainID)} +} + +func (_c *TxStore_FindTxAttemptsRequiringReceiptFetch_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, chainID CHAIN_ID)) *TxStore_FindTxAttemptsRequiringReceiptFetch_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(CHAIN_ID)) + }) + return _c +} + +func (_c *TxStore_FindTxAttemptsRequiringReceiptFetch_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(attempts []txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], err error) *TxStore_FindTxAttemptsRequiringReceiptFetch_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(attempts, err) + return _c +} + +func (_c *TxStore_FindTxAttemptsRequiringReceiptFetch_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, CHAIN_ID) ([]txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error)) *TxStore_FindTxAttemptsRequiringReceiptFetch_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // FindTxAttemptsRequiringResend provides a mock function with given fields: ctx, olderThan, maxInFlightTransactions, chainID, address func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxAttemptsRequiringResend(ctx context.Context, olderThan time.Time, maxInFlightTransactions uint32, chainID CHAIN_ID, address ADDR) ([]txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error) { ret := _m.Called(ctx, olderThan, maxInFlightTransactions, chainID, address) @@ -430,6 +882,38 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxAttem return r0, r1 } +// TxStore_FindTxAttemptsRequiringResend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxAttemptsRequiringResend' +type TxStore_FindTxAttemptsRequiringResend_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// FindTxAttemptsRequiringResend is a helper method to define mock.On call +// - ctx context.Context +// - olderThan time.Time +// - maxInFlightTransactions uint32 +// - chainID CHAIN_ID +// - address ADDR +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxAttemptsRequiringResend(ctx interface{}, olderThan interface{}, maxInFlightTransactions interface{}, chainID interface{}, address interface{}) *TxStore_FindTxAttemptsRequiringResend_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_FindTxAttemptsRequiringResend_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("FindTxAttemptsRequiringResend", ctx, olderThan, maxInFlightTransactions, chainID, address)} +} + +func (_c *TxStore_FindTxAttemptsRequiringResend_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, olderThan time.Time, maxInFlightTransactions uint32, chainID CHAIN_ID, address ADDR)) *TxStore_FindTxAttemptsRequiringResend_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(time.Time), args[2].(uint32), args[3].(CHAIN_ID), args[4].(ADDR)) + }) + return _c +} + +func (_c *TxStore_FindTxAttemptsRequiringResend_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(attempts []txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], err error) *TxStore_FindTxAttemptsRequiringResend_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(attempts, err) + return _c +} + +func (_c *TxStore_FindTxAttemptsRequiringResend_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, time.Time, uint32, CHAIN_ID, ADDR) ([]txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error)) *TxStore_FindTxAttemptsRequiringResend_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // FindTxWithIdempotencyKey provides a mock function with given fields: ctx, idempotencyKey, chainID func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxWithIdempotencyKey(ctx context.Context, idempotencyKey string, chainID CHAIN_ID) (*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error) { ret := _m.Called(ctx, idempotencyKey, chainID) @@ -460,6 +944,36 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxWithI return r0, r1 } +// TxStore_FindTxWithIdempotencyKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxWithIdempotencyKey' +type TxStore_FindTxWithIdempotencyKey_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// FindTxWithIdempotencyKey is a helper method to define mock.On call +// - ctx context.Context +// - idempotencyKey string +// - chainID CHAIN_ID +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxWithIdempotencyKey(ctx interface{}, idempotencyKey interface{}, chainID interface{}) *TxStore_FindTxWithIdempotencyKey_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_FindTxWithIdempotencyKey_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("FindTxWithIdempotencyKey", ctx, idempotencyKey, chainID)} +} + +func (_c *TxStore_FindTxWithIdempotencyKey_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, idempotencyKey string, chainID CHAIN_ID)) *TxStore_FindTxWithIdempotencyKey_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(CHAIN_ID)) + }) + return _c +} + +func (_c *TxStore_FindTxWithIdempotencyKey_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(tx *txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], err error) *TxStore_FindTxWithIdempotencyKey_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(tx, err) + return _c +} + +func (_c *TxStore_FindTxWithIdempotencyKey_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, string, CHAIN_ID) (*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error)) *TxStore_FindTxWithIdempotencyKey_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // FindTxWithSequence provides a mock function with given fields: ctx, fromAddress, seq func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxWithSequence(ctx context.Context, fromAddress ADDR, seq SEQ) (*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error) { ret := _m.Called(ctx, fromAddress, seq) @@ -490,6 +1004,36 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxWithS return r0, r1 } +// TxStore_FindTxWithSequence_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxWithSequence' +type TxStore_FindTxWithSequence_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// FindTxWithSequence is a helper method to define mock.On call +// - ctx context.Context +// - fromAddress ADDR +// - seq SEQ +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxWithSequence(ctx interface{}, fromAddress interface{}, seq interface{}) *TxStore_FindTxWithSequence_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_FindTxWithSequence_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("FindTxWithSequence", ctx, fromAddress, seq)} +} + +func (_c *TxStore_FindTxWithSequence_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, fromAddress ADDR, seq SEQ)) *TxStore_FindTxWithSequence_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ADDR), args[2].(SEQ)) + }) + return _c +} + +func (_c *TxStore_FindTxWithSequence_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(etx *txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], err error) *TxStore_FindTxWithSequence_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(etx, err) + return _c +} + +func (_c *TxStore_FindTxWithSequence_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, ADDR, SEQ) (*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error)) *TxStore_FindTxWithSequence_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // FindTxesByMetaFieldAndStates provides a mock function with given fields: ctx, metaField, metaValue, states, chainID func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxesByMetaFieldAndStates(ctx context.Context, metaField string, metaValue string, states []txmgrtypes.TxState, chainID *big.Int) ([]*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error) { ret := _m.Called(ctx, metaField, metaValue, states, chainID) @@ -520,6 +1064,38 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxesByM return r0, r1 } +// TxStore_FindTxesByMetaFieldAndStates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxesByMetaFieldAndStates' +type TxStore_FindTxesByMetaFieldAndStates_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// FindTxesByMetaFieldAndStates is a helper method to define mock.On call +// - ctx context.Context +// - metaField string +// - metaValue string +// - states []txmgrtypes.TxState +// - chainID *big.Int +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxesByMetaFieldAndStates(ctx interface{}, metaField interface{}, metaValue interface{}, states interface{}, chainID interface{}) *TxStore_FindTxesByMetaFieldAndStates_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_FindTxesByMetaFieldAndStates_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("FindTxesByMetaFieldAndStates", ctx, metaField, metaValue, states, chainID)} +} + +func (_c *TxStore_FindTxesByMetaFieldAndStates_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, metaField string, metaValue string, states []txmgrtypes.TxState, chainID *big.Int)) *TxStore_FindTxesByMetaFieldAndStates_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].([]txmgrtypes.TxState), args[4].(*big.Int)) + }) + return _c +} + +func (_c *TxStore_FindTxesByMetaFieldAndStates_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(tx []*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], err error) *TxStore_FindTxesByMetaFieldAndStates_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(tx, err) + return _c +} + +func (_c *TxStore_FindTxesByMetaFieldAndStates_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, string, string, []txmgrtypes.TxState, *big.Int) ([]*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error)) *TxStore_FindTxesByMetaFieldAndStates_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // FindTxesPendingCallback provides a mock function with given fields: ctx, blockNum, chainID func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxesPendingCallback(ctx context.Context, blockNum int64, chainID CHAIN_ID) ([]txmgrtypes.ReceiptPlus[R], error) { ret := _m.Called(ctx, blockNum, chainID) @@ -550,6 +1126,36 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxesPen return r0, r1 } +// TxStore_FindTxesPendingCallback_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxesPendingCallback' +type TxStore_FindTxesPendingCallback_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// FindTxesPendingCallback is a helper method to define mock.On call +// - ctx context.Context +// - blockNum int64 +// - chainID CHAIN_ID +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxesPendingCallback(ctx interface{}, blockNum interface{}, chainID interface{}) *TxStore_FindTxesPendingCallback_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_FindTxesPendingCallback_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("FindTxesPendingCallback", ctx, blockNum, chainID)} +} + +func (_c *TxStore_FindTxesPendingCallback_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, blockNum int64, chainID CHAIN_ID)) *TxStore_FindTxesPendingCallback_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64), args[2].(CHAIN_ID)) + }) + return _c +} + +func (_c *TxStore_FindTxesPendingCallback_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(receiptsPlus []txmgrtypes.ReceiptPlus[R], err error) *TxStore_FindTxesPendingCallback_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(receiptsPlus, err) + return _c +} + +func (_c *TxStore_FindTxesPendingCallback_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, int64, CHAIN_ID) ([]txmgrtypes.ReceiptPlus[R], error)) *TxStore_FindTxesPendingCallback_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // FindTxesWithAttemptsAndReceiptsByIdsAndState provides a mock function with given fields: ctx, ids, states, chainID func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxesWithAttemptsAndReceiptsByIdsAndState(ctx context.Context, ids []int64, states []txmgrtypes.TxState, chainID *big.Int) ([]*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error) { ret := _m.Called(ctx, ids, states, chainID) @@ -580,6 +1186,37 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxesWit return r0, r1 } +// TxStore_FindTxesWithAttemptsAndReceiptsByIdsAndState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxesWithAttemptsAndReceiptsByIdsAndState' +type TxStore_FindTxesWithAttemptsAndReceiptsByIdsAndState_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// FindTxesWithAttemptsAndReceiptsByIdsAndState is a helper method to define mock.On call +// - ctx context.Context +// - ids []int64 +// - states []txmgrtypes.TxState +// - chainID *big.Int +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxesWithAttemptsAndReceiptsByIdsAndState(ctx interface{}, ids interface{}, states interface{}, chainID interface{}) *TxStore_FindTxesWithAttemptsAndReceiptsByIdsAndState_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_FindTxesWithAttemptsAndReceiptsByIdsAndState_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("FindTxesWithAttemptsAndReceiptsByIdsAndState", ctx, ids, states, chainID)} +} + +func (_c *TxStore_FindTxesWithAttemptsAndReceiptsByIdsAndState_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, ids []int64, states []txmgrtypes.TxState, chainID *big.Int)) *TxStore_FindTxesWithAttemptsAndReceiptsByIdsAndState_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]int64), args[2].([]txmgrtypes.TxState), args[3].(*big.Int)) + }) + return _c +} + +func (_c *TxStore_FindTxesWithAttemptsAndReceiptsByIdsAndState_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(tx []*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], err error) *TxStore_FindTxesWithAttemptsAndReceiptsByIdsAndState_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(tx, err) + return _c +} + +func (_c *TxStore_FindTxesWithAttemptsAndReceiptsByIdsAndState_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, []int64, []txmgrtypes.TxState, *big.Int) ([]*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error)) *TxStore_FindTxesWithAttemptsAndReceiptsByIdsAndState_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // FindTxesWithMetaFieldByReceiptBlockNum provides a mock function with given fields: ctx, metaField, blockNum, chainID func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxesWithMetaFieldByReceiptBlockNum(ctx context.Context, metaField string, blockNum int64, chainID *big.Int) ([]*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error) { ret := _m.Called(ctx, metaField, blockNum, chainID) @@ -610,6 +1247,37 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxesWit return r0, r1 } +// TxStore_FindTxesWithMetaFieldByReceiptBlockNum_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxesWithMetaFieldByReceiptBlockNum' +type TxStore_FindTxesWithMetaFieldByReceiptBlockNum_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// FindTxesWithMetaFieldByReceiptBlockNum is a helper method to define mock.On call +// - ctx context.Context +// - metaField string +// - blockNum int64 +// - chainID *big.Int +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxesWithMetaFieldByReceiptBlockNum(ctx interface{}, metaField interface{}, blockNum interface{}, chainID interface{}) *TxStore_FindTxesWithMetaFieldByReceiptBlockNum_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_FindTxesWithMetaFieldByReceiptBlockNum_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("FindTxesWithMetaFieldByReceiptBlockNum", ctx, metaField, blockNum, chainID)} +} + +func (_c *TxStore_FindTxesWithMetaFieldByReceiptBlockNum_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, metaField string, blockNum int64, chainID *big.Int)) *TxStore_FindTxesWithMetaFieldByReceiptBlockNum_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(int64), args[3].(*big.Int)) + }) + return _c +} + +func (_c *TxStore_FindTxesWithMetaFieldByReceiptBlockNum_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(tx []*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], err error) *TxStore_FindTxesWithMetaFieldByReceiptBlockNum_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(tx, err) + return _c +} + +func (_c *TxStore_FindTxesWithMetaFieldByReceiptBlockNum_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, string, int64, *big.Int) ([]*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error)) *TxStore_FindTxesWithMetaFieldByReceiptBlockNum_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // FindTxesWithMetaFieldByStates provides a mock function with given fields: ctx, metaField, states, chainID func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxesWithMetaFieldByStates(ctx context.Context, metaField string, states []txmgrtypes.TxState, chainID *big.Int) ([]*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error) { ret := _m.Called(ctx, metaField, states, chainID) @@ -640,6 +1308,37 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxesWit return r0, r1 } +// TxStore_FindTxesWithMetaFieldByStates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxesWithMetaFieldByStates' +type TxStore_FindTxesWithMetaFieldByStates_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// FindTxesWithMetaFieldByStates is a helper method to define mock.On call +// - ctx context.Context +// - metaField string +// - states []txmgrtypes.TxState +// - chainID *big.Int +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxesWithMetaFieldByStates(ctx interface{}, metaField interface{}, states interface{}, chainID interface{}) *TxStore_FindTxesWithMetaFieldByStates_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_FindTxesWithMetaFieldByStates_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("FindTxesWithMetaFieldByStates", ctx, metaField, states, chainID)} +} + +func (_c *TxStore_FindTxesWithMetaFieldByStates_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, metaField string, states []txmgrtypes.TxState, chainID *big.Int)) *TxStore_FindTxesWithMetaFieldByStates_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].([]txmgrtypes.TxState), args[3].(*big.Int)) + }) + return _c +} + +func (_c *TxStore_FindTxesWithMetaFieldByStates_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(tx []*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], err error) *TxStore_FindTxesWithMetaFieldByStates_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(tx, err) + return _c +} + +func (_c *TxStore_FindTxesWithMetaFieldByStates_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, string, []txmgrtypes.TxState, *big.Int) ([]*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error)) *TxStore_FindTxesWithMetaFieldByStates_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // FindTxsRequiringGasBump provides a mock function with given fields: ctx, address, blockNum, gasBumpThreshold, depth, chainID func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxsRequiringGasBump(ctx context.Context, address ADDR, blockNum int64, gasBumpThreshold int64, depth int64, chainID CHAIN_ID) ([]*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error) { ret := _m.Called(ctx, address, blockNum, gasBumpThreshold, depth, chainID) @@ -670,6 +1369,39 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxsRequ return r0, r1 } +// TxStore_FindTxsRequiringGasBump_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxsRequiringGasBump' +type TxStore_FindTxsRequiringGasBump_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// FindTxsRequiringGasBump is a helper method to define mock.On call +// - ctx context.Context +// - address ADDR +// - blockNum int64 +// - gasBumpThreshold int64 +// - depth int64 +// - chainID CHAIN_ID +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxsRequiringGasBump(ctx interface{}, address interface{}, blockNum interface{}, gasBumpThreshold interface{}, depth interface{}, chainID interface{}) *TxStore_FindTxsRequiringGasBump_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_FindTxsRequiringGasBump_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("FindTxsRequiringGasBump", ctx, address, blockNum, gasBumpThreshold, depth, chainID)} +} + +func (_c *TxStore_FindTxsRequiringGasBump_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, address ADDR, blockNum int64, gasBumpThreshold int64, depth int64, chainID CHAIN_ID)) *TxStore_FindTxsRequiringGasBump_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ADDR), args[2].(int64), args[3].(int64), args[4].(int64), args[5].(CHAIN_ID)) + }) + return _c +} + +func (_c *TxStore_FindTxsRequiringGasBump_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(etxs []*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], err error) *TxStore_FindTxsRequiringGasBump_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(etxs, err) + return _c +} + +func (_c *TxStore_FindTxsRequiringGasBump_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, ADDR, int64, int64, int64, CHAIN_ID) ([]*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error)) *TxStore_FindTxsRequiringGasBump_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // FindTxsRequiringResubmissionDueToInsufficientFunds provides a mock function with given fields: ctx, address, chainID func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxsRequiringResubmissionDueToInsufficientFunds(ctx context.Context, address ADDR, chainID CHAIN_ID) ([]*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error) { ret := _m.Called(ctx, address, chainID) @@ -700,6 +1432,36 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxsRequ return r0, r1 } +// TxStore_FindTxsRequiringResubmissionDueToInsufficientFunds_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxsRequiringResubmissionDueToInsufficientFunds' +type TxStore_FindTxsRequiringResubmissionDueToInsufficientFunds_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// FindTxsRequiringResubmissionDueToInsufficientFunds is a helper method to define mock.On call +// - ctx context.Context +// - address ADDR +// - chainID CHAIN_ID +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) FindTxsRequiringResubmissionDueToInsufficientFunds(ctx interface{}, address interface{}, chainID interface{}) *TxStore_FindTxsRequiringResubmissionDueToInsufficientFunds_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_FindTxsRequiringResubmissionDueToInsufficientFunds_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("FindTxsRequiringResubmissionDueToInsufficientFunds", ctx, address, chainID)} +} + +func (_c *TxStore_FindTxsRequiringResubmissionDueToInsufficientFunds_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, address ADDR, chainID CHAIN_ID)) *TxStore_FindTxsRequiringResubmissionDueToInsufficientFunds_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ADDR), args[2].(CHAIN_ID)) + }) + return _c +} + +func (_c *TxStore_FindTxsRequiringResubmissionDueToInsufficientFunds_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(etxs []*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], err error) *TxStore_FindTxsRequiringResubmissionDueToInsufficientFunds_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(etxs, err) + return _c +} + +func (_c *TxStore_FindTxsRequiringResubmissionDueToInsufficientFunds_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, ADDR, CHAIN_ID) ([]*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error)) *TxStore_FindTxsRequiringResubmissionDueToInsufficientFunds_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // GetAbandonedTransactionsByBatch provides a mock function with given fields: ctx, chainID, enabledAddrs, offset, limit func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) GetAbandonedTransactionsByBatch(ctx context.Context, chainID CHAIN_ID, enabledAddrs []ADDR, offset uint, limit uint) ([]*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error) { ret := _m.Called(ctx, chainID, enabledAddrs, offset, limit) @@ -730,8 +1492,40 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) GetAbandone return r0, r1 } -// GetInProgressTxAttempts provides a mock function with given fields: ctx, address, chainID -func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) GetInProgressTxAttempts(ctx context.Context, address ADDR, chainID CHAIN_ID) ([]txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error) { +// TxStore_GetAbandonedTransactionsByBatch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAbandonedTransactionsByBatch' +type TxStore_GetAbandonedTransactionsByBatch_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// GetAbandonedTransactionsByBatch is a helper method to define mock.On call +// - ctx context.Context +// - chainID CHAIN_ID +// - enabledAddrs []ADDR +// - offset uint +// - limit uint +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) GetAbandonedTransactionsByBatch(ctx interface{}, chainID interface{}, enabledAddrs interface{}, offset interface{}, limit interface{}) *TxStore_GetAbandonedTransactionsByBatch_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_GetAbandonedTransactionsByBatch_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("GetAbandonedTransactionsByBatch", ctx, chainID, enabledAddrs, offset, limit)} +} + +func (_c *TxStore_GetAbandonedTransactionsByBatch_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, chainID CHAIN_ID, enabledAddrs []ADDR, offset uint, limit uint)) *TxStore_GetAbandonedTransactionsByBatch_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(CHAIN_ID), args[2].([]ADDR), args[3].(uint), args[4].(uint)) + }) + return _c +} + +func (_c *TxStore_GetAbandonedTransactionsByBatch_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(txs []*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], err error) *TxStore_GetAbandonedTransactionsByBatch_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(txs, err) + return _c +} + +func (_c *TxStore_GetAbandonedTransactionsByBatch_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, CHAIN_ID, []ADDR, uint, uint) ([]*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error)) *TxStore_GetAbandonedTransactionsByBatch_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + +// GetInProgressTxAttempts provides a mock function with given fields: ctx, address, chainID +func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) GetInProgressTxAttempts(ctx context.Context, address ADDR, chainID CHAIN_ID) ([]txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error) { ret := _m.Called(ctx, address, chainID) if len(ret) == 0 { @@ -760,6 +1554,36 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) GetInProgre return r0, r1 } +// TxStore_GetInProgressTxAttempts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetInProgressTxAttempts' +type TxStore_GetInProgressTxAttempts_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// GetInProgressTxAttempts is a helper method to define mock.On call +// - ctx context.Context +// - address ADDR +// - chainID CHAIN_ID +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) GetInProgressTxAttempts(ctx interface{}, address interface{}, chainID interface{}) *TxStore_GetInProgressTxAttempts_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_GetInProgressTxAttempts_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("GetInProgressTxAttempts", ctx, address, chainID)} +} + +func (_c *TxStore_GetInProgressTxAttempts_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, address ADDR, chainID CHAIN_ID)) *TxStore_GetInProgressTxAttempts_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ADDR), args[2].(CHAIN_ID)) + }) + return _c +} + +func (_c *TxStore_GetInProgressTxAttempts_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(attempts []txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], err error) *TxStore_GetInProgressTxAttempts_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(attempts, err) + return _c +} + +func (_c *TxStore_GetInProgressTxAttempts_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, ADDR, CHAIN_ID) ([]txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error)) *TxStore_GetInProgressTxAttempts_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // GetTxByID provides a mock function with given fields: ctx, id func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) GetTxByID(ctx context.Context, id int64) (*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error) { ret := _m.Called(ctx, id) @@ -790,6 +1614,35 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) GetTxByID(c return r0, r1 } +// TxStore_GetTxByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTxByID' +type TxStore_GetTxByID_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// GetTxByID is a helper method to define mock.On call +// - ctx context.Context +// - id int64 +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) GetTxByID(ctx interface{}, id interface{}) *TxStore_GetTxByID_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_GetTxByID_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("GetTxByID", ctx, id)} +} + +func (_c *TxStore_GetTxByID_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, id int64)) *TxStore_GetTxByID_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64)) + }) + return _c +} + +func (_c *TxStore_GetTxByID_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(tx *txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], err error) *TxStore_GetTxByID_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(tx, err) + return _c +} + +func (_c *TxStore_GetTxByID_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, int64) (*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error)) *TxStore_GetTxByID_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // GetTxInProgress provides a mock function with given fields: ctx, fromAddress func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) GetTxInProgress(ctx context.Context, fromAddress ADDR) (*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error) { ret := _m.Called(ctx, fromAddress) @@ -820,6 +1673,35 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) GetTxInProg return r0, r1 } +// TxStore_GetTxInProgress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTxInProgress' +type TxStore_GetTxInProgress_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// GetTxInProgress is a helper method to define mock.On call +// - ctx context.Context +// - fromAddress ADDR +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) GetTxInProgress(ctx interface{}, fromAddress interface{}) *TxStore_GetTxInProgress_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_GetTxInProgress_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("GetTxInProgress", ctx, fromAddress)} +} + +func (_c *TxStore_GetTxInProgress_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, fromAddress ADDR)) *TxStore_GetTxInProgress_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ADDR)) + }) + return _c +} + +func (_c *TxStore_GetTxInProgress_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(etx *txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], err error) *TxStore_GetTxInProgress_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(etx, err) + return _c +} + +func (_c *TxStore_GetTxInProgress_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, ADDR) (*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], error)) *TxStore_GetTxInProgress_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // HasInProgressTransaction provides a mock function with given fields: ctx, account, chainID func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) HasInProgressTransaction(ctx context.Context, account ADDR, chainID CHAIN_ID) (bool, error) { ret := _m.Called(ctx, account, chainID) @@ -848,6 +1730,36 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) HasInProgre return r0, r1 } +// TxStore_HasInProgressTransaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasInProgressTransaction' +type TxStore_HasInProgressTransaction_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// HasInProgressTransaction is a helper method to define mock.On call +// - ctx context.Context +// - account ADDR +// - chainID CHAIN_ID +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) HasInProgressTransaction(ctx interface{}, account interface{}, chainID interface{}) *TxStore_HasInProgressTransaction_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_HasInProgressTransaction_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("HasInProgressTransaction", ctx, account, chainID)} +} + +func (_c *TxStore_HasInProgressTransaction_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, account ADDR, chainID CHAIN_ID)) *TxStore_HasInProgressTransaction_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ADDR), args[2].(CHAIN_ID)) + }) + return _c +} + +func (_c *TxStore_HasInProgressTransaction_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(exists bool, err error) *TxStore_HasInProgressTransaction_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(exists, err) + return _c +} + +func (_c *TxStore_HasInProgressTransaction_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, ADDR, CHAIN_ID) (bool, error)) *TxStore_HasInProgressTransaction_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // IsTxFinalized provides a mock function with given fields: ctx, blockHeight, txID, chainID func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) IsTxFinalized(ctx context.Context, blockHeight int64, txID int64, chainID CHAIN_ID) (bool, error) { ret := _m.Called(ctx, blockHeight, txID, chainID) @@ -876,6 +1788,37 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) IsTxFinaliz return r0, r1 } +// TxStore_IsTxFinalized_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsTxFinalized' +type TxStore_IsTxFinalized_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// IsTxFinalized is a helper method to define mock.On call +// - ctx context.Context +// - blockHeight int64 +// - txID int64 +// - chainID CHAIN_ID +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) IsTxFinalized(ctx interface{}, blockHeight interface{}, txID interface{}, chainID interface{}) *TxStore_IsTxFinalized_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_IsTxFinalized_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("IsTxFinalized", ctx, blockHeight, txID, chainID)} +} + +func (_c *TxStore_IsTxFinalized_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, blockHeight int64, txID int64, chainID CHAIN_ID)) *TxStore_IsTxFinalized_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64), args[2].(int64), args[3].(CHAIN_ID)) + }) + return _c +} + +func (_c *TxStore_IsTxFinalized_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(finalized bool, err error) *TxStore_IsTxFinalized_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(finalized, err) + return _c +} + +func (_c *TxStore_IsTxFinalized_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, int64, int64, CHAIN_ID) (bool, error)) *TxStore_IsTxFinalized_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // LoadTxAttempts provides a mock function with given fields: ctx, etx func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) LoadTxAttempts(ctx context.Context, etx *txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) error { ret := _m.Called(ctx, etx) @@ -894,6 +1837,35 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) LoadTxAttem return r0 } +// TxStore_LoadTxAttempts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadTxAttempts' +type TxStore_LoadTxAttempts_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// LoadTxAttempts is a helper method to define mock.On call +// - ctx context.Context +// - etx *txmgrtypes.Tx[CHAIN_ID,ADDR,TX_HASH,BLOCK_HASH,SEQ,FEE] +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) LoadTxAttempts(ctx interface{}, etx interface{}) *TxStore_LoadTxAttempts_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_LoadTxAttempts_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("LoadTxAttempts", ctx, etx)} +} + +func (_c *TxStore_LoadTxAttempts_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, etx *txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE])) *TxStore_LoadTxAttempts_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE])) + }) + return _c +} + +func (_c *TxStore_LoadTxAttempts_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(_a0 error) *TxStore_LoadTxAttempts_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxStore_LoadTxAttempts_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, *txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) error) *TxStore_LoadTxAttempts_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // MarkAllConfirmedMissingReceipt provides a mock function with given fields: ctx, chainID func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) MarkAllConfirmedMissingReceipt(ctx context.Context, chainID CHAIN_ID) error { ret := _m.Called(ctx, chainID) @@ -912,6 +1884,35 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) MarkAllConf return r0 } +// TxStore_MarkAllConfirmedMissingReceipt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MarkAllConfirmedMissingReceipt' +type TxStore_MarkAllConfirmedMissingReceipt_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// MarkAllConfirmedMissingReceipt is a helper method to define mock.On call +// - ctx context.Context +// - chainID CHAIN_ID +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) MarkAllConfirmedMissingReceipt(ctx interface{}, chainID interface{}) *TxStore_MarkAllConfirmedMissingReceipt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_MarkAllConfirmedMissingReceipt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("MarkAllConfirmedMissingReceipt", ctx, chainID)} +} + +func (_c *TxStore_MarkAllConfirmedMissingReceipt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, chainID CHAIN_ID)) *TxStore_MarkAllConfirmedMissingReceipt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(CHAIN_ID)) + }) + return _c +} + +func (_c *TxStore_MarkAllConfirmedMissingReceipt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(err error) *TxStore_MarkAllConfirmedMissingReceipt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(err) + return _c +} + +func (_c *TxStore_MarkAllConfirmedMissingReceipt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, CHAIN_ID) error) *TxStore_MarkAllConfirmedMissingReceipt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // MarkOldTxesMissingReceiptAsErrored provides a mock function with given fields: ctx, blockNum, finalityDepth, chainID func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) MarkOldTxesMissingReceiptAsErrored(ctx context.Context, blockNum int64, finalityDepth uint32, chainID CHAIN_ID) error { ret := _m.Called(ctx, blockNum, finalityDepth, chainID) @@ -930,6 +1931,37 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) MarkOldTxes return r0 } +// TxStore_MarkOldTxesMissingReceiptAsErrored_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MarkOldTxesMissingReceiptAsErrored' +type TxStore_MarkOldTxesMissingReceiptAsErrored_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// MarkOldTxesMissingReceiptAsErrored is a helper method to define mock.On call +// - ctx context.Context +// - blockNum int64 +// - finalityDepth uint32 +// - chainID CHAIN_ID +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) MarkOldTxesMissingReceiptAsErrored(ctx interface{}, blockNum interface{}, finalityDepth interface{}, chainID interface{}) *TxStore_MarkOldTxesMissingReceiptAsErrored_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_MarkOldTxesMissingReceiptAsErrored_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("MarkOldTxesMissingReceiptAsErrored", ctx, blockNum, finalityDepth, chainID)} +} + +func (_c *TxStore_MarkOldTxesMissingReceiptAsErrored_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, blockNum int64, finalityDepth uint32, chainID CHAIN_ID)) *TxStore_MarkOldTxesMissingReceiptAsErrored_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64), args[2].(uint32), args[3].(CHAIN_ID)) + }) + return _c +} + +func (_c *TxStore_MarkOldTxesMissingReceiptAsErrored_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(_a0 error) *TxStore_MarkOldTxesMissingReceiptAsErrored_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxStore_MarkOldTxesMissingReceiptAsErrored_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, int64, uint32, CHAIN_ID) error) *TxStore_MarkOldTxesMissingReceiptAsErrored_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // PreloadTxes provides a mock function with given fields: ctx, attempts func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) PreloadTxes(ctx context.Context, attempts []txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) error { ret := _m.Called(ctx, attempts) @@ -948,6 +1980,35 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) PreloadTxes return r0 } +// TxStore_PreloadTxes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PreloadTxes' +type TxStore_PreloadTxes_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// PreloadTxes is a helper method to define mock.On call +// - ctx context.Context +// - attempts []txmgrtypes.TxAttempt[CHAIN_ID,ADDR,TX_HASH,BLOCK_HASH,SEQ,FEE] +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) PreloadTxes(ctx interface{}, attempts interface{}) *TxStore_PreloadTxes_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_PreloadTxes_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("PreloadTxes", ctx, attempts)} +} + +func (_c *TxStore_PreloadTxes_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, attempts []txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE])) *TxStore_PreloadTxes_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE])) + }) + return _c +} + +func (_c *TxStore_PreloadTxes_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(_a0 error) *TxStore_PreloadTxes_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxStore_PreloadTxes_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, []txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) error) *TxStore_PreloadTxes_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // PruneUnstartedTxQueue provides a mock function with given fields: ctx, queueSize, subject func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) PruneUnstartedTxQueue(ctx context.Context, queueSize uint32, subject uuid.UUID) ([]int64, error) { ret := _m.Called(ctx, queueSize, subject) @@ -978,6 +2039,36 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) PruneUnstar return r0, r1 } +// TxStore_PruneUnstartedTxQueue_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PruneUnstartedTxQueue' +type TxStore_PruneUnstartedTxQueue_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// PruneUnstartedTxQueue is a helper method to define mock.On call +// - ctx context.Context +// - queueSize uint32 +// - subject uuid.UUID +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) PruneUnstartedTxQueue(ctx interface{}, queueSize interface{}, subject interface{}) *TxStore_PruneUnstartedTxQueue_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_PruneUnstartedTxQueue_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("PruneUnstartedTxQueue", ctx, queueSize, subject)} +} + +func (_c *TxStore_PruneUnstartedTxQueue_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, queueSize uint32, subject uuid.UUID)) *TxStore_PruneUnstartedTxQueue_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint32), args[2].(uuid.UUID)) + }) + return _c +} + +func (_c *TxStore_PruneUnstartedTxQueue_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(ids []int64, err error) *TxStore_PruneUnstartedTxQueue_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(ids, err) + return _c +} + +func (_c *TxStore_PruneUnstartedTxQueue_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, uint32, uuid.UUID) ([]int64, error)) *TxStore_PruneUnstartedTxQueue_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // ReapTxHistory provides a mock function with given fields: ctx, minBlockNumberToKeep, timeThreshold, chainID func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) ReapTxHistory(ctx context.Context, minBlockNumberToKeep int64, timeThreshold time.Time, chainID CHAIN_ID) error { ret := _m.Called(ctx, minBlockNumberToKeep, timeThreshold, chainID) @@ -996,6 +2087,37 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) ReapTxHisto return r0 } +// TxStore_ReapTxHistory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReapTxHistory' +type TxStore_ReapTxHistory_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// ReapTxHistory is a helper method to define mock.On call +// - ctx context.Context +// - minBlockNumberToKeep int64 +// - timeThreshold time.Time +// - chainID CHAIN_ID +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) ReapTxHistory(ctx interface{}, minBlockNumberToKeep interface{}, timeThreshold interface{}, chainID interface{}) *TxStore_ReapTxHistory_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_ReapTxHistory_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("ReapTxHistory", ctx, minBlockNumberToKeep, timeThreshold, chainID)} +} + +func (_c *TxStore_ReapTxHistory_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, minBlockNumberToKeep int64, timeThreshold time.Time, chainID CHAIN_ID)) *TxStore_ReapTxHistory_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64), args[2].(time.Time), args[3].(CHAIN_ID)) + }) + return _c +} + +func (_c *TxStore_ReapTxHistory_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(_a0 error) *TxStore_ReapTxHistory_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxStore_ReapTxHistory_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, int64, time.Time, CHAIN_ID) error) *TxStore_ReapTxHistory_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // SaveConfirmedMissingReceiptAttempt provides a mock function with given fields: ctx, timeout, attempt, broadcastAt func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) SaveConfirmedMissingReceiptAttempt(ctx context.Context, timeout time.Duration, attempt *txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], broadcastAt time.Time) error { ret := _m.Called(ctx, timeout, attempt, broadcastAt) @@ -1014,6 +2136,37 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) SaveConfirm return r0 } +// TxStore_SaveConfirmedMissingReceiptAttempt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveConfirmedMissingReceiptAttempt' +type TxStore_SaveConfirmedMissingReceiptAttempt_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// SaveConfirmedMissingReceiptAttempt is a helper method to define mock.On call +// - ctx context.Context +// - timeout time.Duration +// - attempt *txmgrtypes.TxAttempt[CHAIN_ID,ADDR,TX_HASH,BLOCK_HASH,SEQ,FEE] +// - broadcastAt time.Time +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) SaveConfirmedMissingReceiptAttempt(ctx interface{}, timeout interface{}, attempt interface{}, broadcastAt interface{}) *TxStore_SaveConfirmedMissingReceiptAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_SaveConfirmedMissingReceiptAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("SaveConfirmedMissingReceiptAttempt", ctx, timeout, attempt, broadcastAt)} +} + +func (_c *TxStore_SaveConfirmedMissingReceiptAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, timeout time.Duration, attempt *txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], broadcastAt time.Time)) *TxStore_SaveConfirmedMissingReceiptAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(time.Duration), args[2].(*txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]), args[3].(time.Time)) + }) + return _c +} + +func (_c *TxStore_SaveConfirmedMissingReceiptAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(_a0 error) *TxStore_SaveConfirmedMissingReceiptAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxStore_SaveConfirmedMissingReceiptAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, time.Duration, *txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], time.Time) error) *TxStore_SaveConfirmedMissingReceiptAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // SaveFetchedReceipts provides a mock function with given fields: ctx, r, state, errorMsg, chainID func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) SaveFetchedReceipts(ctx context.Context, r []R, state txmgrtypes.TxState, errorMsg *string, chainID CHAIN_ID) error { ret := _m.Called(ctx, r, state, errorMsg, chainID) @@ -1032,6 +2185,38 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) SaveFetched return r0 } +// TxStore_SaveFetchedReceipts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveFetchedReceipts' +type TxStore_SaveFetchedReceipts_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// SaveFetchedReceipts is a helper method to define mock.On call +// - ctx context.Context +// - r []R +// - state txmgrtypes.TxState +// - errorMsg *string +// - chainID CHAIN_ID +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) SaveFetchedReceipts(ctx interface{}, r interface{}, state interface{}, errorMsg interface{}, chainID interface{}) *TxStore_SaveFetchedReceipts_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_SaveFetchedReceipts_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("SaveFetchedReceipts", ctx, r, state, errorMsg, chainID)} +} + +func (_c *TxStore_SaveFetchedReceipts_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, r []R, state txmgrtypes.TxState, errorMsg *string, chainID CHAIN_ID)) *TxStore_SaveFetchedReceipts_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]R), args[2].(txmgrtypes.TxState), args[3].(*string), args[4].(CHAIN_ID)) + }) + return _c +} + +func (_c *TxStore_SaveFetchedReceipts_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(_a0 error) *TxStore_SaveFetchedReceipts_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxStore_SaveFetchedReceipts_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, []R, txmgrtypes.TxState, *string, CHAIN_ID) error) *TxStore_SaveFetchedReceipts_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // SaveInProgressAttempt provides a mock function with given fields: ctx, attempt func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) SaveInProgressAttempt(ctx context.Context, attempt *txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) error { ret := _m.Called(ctx, attempt) @@ -1050,6 +2235,35 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) SaveInProgr return r0 } +// TxStore_SaveInProgressAttempt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveInProgressAttempt' +type TxStore_SaveInProgressAttempt_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// SaveInProgressAttempt is a helper method to define mock.On call +// - ctx context.Context +// - attempt *txmgrtypes.TxAttempt[CHAIN_ID,ADDR,TX_HASH,BLOCK_HASH,SEQ,FEE] +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) SaveInProgressAttempt(ctx interface{}, attempt interface{}) *TxStore_SaveInProgressAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_SaveInProgressAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("SaveInProgressAttempt", ctx, attempt)} +} + +func (_c *TxStore_SaveInProgressAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, attempt *txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE])) *TxStore_SaveInProgressAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE])) + }) + return _c +} + +func (_c *TxStore_SaveInProgressAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(_a0 error) *TxStore_SaveInProgressAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxStore_SaveInProgressAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, *txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) error) *TxStore_SaveInProgressAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // SaveInsufficientFundsAttempt provides a mock function with given fields: ctx, timeout, attempt, broadcastAt func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) SaveInsufficientFundsAttempt(ctx context.Context, timeout time.Duration, attempt *txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], broadcastAt time.Time) error { ret := _m.Called(ctx, timeout, attempt, broadcastAt) @@ -1068,6 +2282,37 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) SaveInsuffi return r0 } +// TxStore_SaveInsufficientFundsAttempt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveInsufficientFundsAttempt' +type TxStore_SaveInsufficientFundsAttempt_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// SaveInsufficientFundsAttempt is a helper method to define mock.On call +// - ctx context.Context +// - timeout time.Duration +// - attempt *txmgrtypes.TxAttempt[CHAIN_ID,ADDR,TX_HASH,BLOCK_HASH,SEQ,FEE] +// - broadcastAt time.Time +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) SaveInsufficientFundsAttempt(ctx interface{}, timeout interface{}, attempt interface{}, broadcastAt interface{}) *TxStore_SaveInsufficientFundsAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_SaveInsufficientFundsAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("SaveInsufficientFundsAttempt", ctx, timeout, attempt, broadcastAt)} +} + +func (_c *TxStore_SaveInsufficientFundsAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, timeout time.Duration, attempt *txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], broadcastAt time.Time)) *TxStore_SaveInsufficientFundsAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(time.Duration), args[2].(*txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]), args[3].(time.Time)) + }) + return _c +} + +func (_c *TxStore_SaveInsufficientFundsAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(_a0 error) *TxStore_SaveInsufficientFundsAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxStore_SaveInsufficientFundsAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, time.Duration, *txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], time.Time) error) *TxStore_SaveInsufficientFundsAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // SaveReplacementInProgressAttempt provides a mock function with given fields: ctx, oldAttempt, replacementAttempt func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) SaveReplacementInProgressAttempt(ctx context.Context, oldAttempt txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], replacementAttempt *txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) error { ret := _m.Called(ctx, oldAttempt, replacementAttempt) @@ -1086,6 +2331,36 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) SaveReplace return r0 } +// TxStore_SaveReplacementInProgressAttempt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveReplacementInProgressAttempt' +type TxStore_SaveReplacementInProgressAttempt_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// SaveReplacementInProgressAttempt is a helper method to define mock.On call +// - ctx context.Context +// - oldAttempt txmgrtypes.TxAttempt[CHAIN_ID,ADDR,TX_HASH,BLOCK_HASH,SEQ,FEE] +// - replacementAttempt *txmgrtypes.TxAttempt[CHAIN_ID,ADDR,TX_HASH,BLOCK_HASH,SEQ,FEE] +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) SaveReplacementInProgressAttempt(ctx interface{}, oldAttempt interface{}, replacementAttempt interface{}) *TxStore_SaveReplacementInProgressAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_SaveReplacementInProgressAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("SaveReplacementInProgressAttempt", ctx, oldAttempt, replacementAttempt)} +} + +func (_c *TxStore_SaveReplacementInProgressAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, oldAttempt txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], replacementAttempt *txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE])) *TxStore_SaveReplacementInProgressAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]), args[2].(*txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE])) + }) + return _c +} + +func (_c *TxStore_SaveReplacementInProgressAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(_a0 error) *TxStore_SaveReplacementInProgressAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxStore_SaveReplacementInProgressAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], *txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) error) *TxStore_SaveReplacementInProgressAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // SaveSentAttempt provides a mock function with given fields: ctx, timeout, attempt, broadcastAt func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) SaveSentAttempt(ctx context.Context, timeout time.Duration, attempt *txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], broadcastAt time.Time) error { ret := _m.Called(ctx, timeout, attempt, broadcastAt) @@ -1104,6 +2379,37 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) SaveSentAtt return r0 } +// TxStore_SaveSentAttempt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveSentAttempt' +type TxStore_SaveSentAttempt_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// SaveSentAttempt is a helper method to define mock.On call +// - ctx context.Context +// - timeout time.Duration +// - attempt *txmgrtypes.TxAttempt[CHAIN_ID,ADDR,TX_HASH,BLOCK_HASH,SEQ,FEE] +// - broadcastAt time.Time +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) SaveSentAttempt(ctx interface{}, timeout interface{}, attempt interface{}, broadcastAt interface{}) *TxStore_SaveSentAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_SaveSentAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("SaveSentAttempt", ctx, timeout, attempt, broadcastAt)} +} + +func (_c *TxStore_SaveSentAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, timeout time.Duration, attempt *txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], broadcastAt time.Time)) *TxStore_SaveSentAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(time.Duration), args[2].(*txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]), args[3].(time.Time)) + }) + return _c +} + +func (_c *TxStore_SaveSentAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(_a0 error) *TxStore_SaveSentAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxStore_SaveSentAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, time.Duration, *txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], time.Time) error) *TxStore_SaveSentAttempt_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // SetBroadcastBeforeBlockNum provides a mock function with given fields: ctx, blockNum, chainID func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) SetBroadcastBeforeBlockNum(ctx context.Context, blockNum int64, chainID CHAIN_ID) error { ret := _m.Called(ctx, blockNum, chainID) @@ -1122,6 +2428,36 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) SetBroadcas return r0 } +// TxStore_SetBroadcastBeforeBlockNum_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetBroadcastBeforeBlockNum' +type TxStore_SetBroadcastBeforeBlockNum_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// SetBroadcastBeforeBlockNum is a helper method to define mock.On call +// - ctx context.Context +// - blockNum int64 +// - chainID CHAIN_ID +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) SetBroadcastBeforeBlockNum(ctx interface{}, blockNum interface{}, chainID interface{}) *TxStore_SetBroadcastBeforeBlockNum_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_SetBroadcastBeforeBlockNum_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("SetBroadcastBeforeBlockNum", ctx, blockNum, chainID)} +} + +func (_c *TxStore_SetBroadcastBeforeBlockNum_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, blockNum int64, chainID CHAIN_ID)) *TxStore_SetBroadcastBeforeBlockNum_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64), args[2].(CHAIN_ID)) + }) + return _c +} + +func (_c *TxStore_SetBroadcastBeforeBlockNum_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(_a0 error) *TxStore_SetBroadcastBeforeBlockNum_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxStore_SetBroadcastBeforeBlockNum_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, int64, CHAIN_ID) error) *TxStore_SetBroadcastBeforeBlockNum_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // UpdateBroadcastAts provides a mock function with given fields: ctx, now, etxIDs func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) UpdateBroadcastAts(ctx context.Context, now time.Time, etxIDs []int64) error { ret := _m.Called(ctx, now, etxIDs) @@ -1140,6 +2476,36 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) UpdateBroad return r0 } +// TxStore_UpdateBroadcastAts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateBroadcastAts' +type TxStore_UpdateBroadcastAts_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// UpdateBroadcastAts is a helper method to define mock.On call +// - ctx context.Context +// - now time.Time +// - etxIDs []int64 +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) UpdateBroadcastAts(ctx interface{}, now interface{}, etxIDs interface{}) *TxStore_UpdateBroadcastAts_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_UpdateBroadcastAts_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("UpdateBroadcastAts", ctx, now, etxIDs)} +} + +func (_c *TxStore_UpdateBroadcastAts_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, now time.Time, etxIDs []int64)) *TxStore_UpdateBroadcastAts_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(time.Time), args[2].([]int64)) + }) + return _c +} + +func (_c *TxStore_UpdateBroadcastAts_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(_a0 error) *TxStore_UpdateBroadcastAts_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxStore_UpdateBroadcastAts_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, time.Time, []int64) error) *TxStore_UpdateBroadcastAts_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // UpdateTxAttemptInProgressToBroadcast provides a mock function with given fields: ctx, etx, attempt, NewAttemptState func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) UpdateTxAttemptInProgressToBroadcast(ctx context.Context, etx *txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], attempt txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], NewAttemptState txmgrtypes.TxAttemptState) error { ret := _m.Called(ctx, etx, attempt, NewAttemptState) @@ -1158,6 +2524,37 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) UpdateTxAtt return r0 } +// TxStore_UpdateTxAttemptInProgressToBroadcast_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateTxAttemptInProgressToBroadcast' +type TxStore_UpdateTxAttemptInProgressToBroadcast_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// UpdateTxAttemptInProgressToBroadcast is a helper method to define mock.On call +// - ctx context.Context +// - etx *txmgrtypes.Tx[CHAIN_ID,ADDR,TX_HASH,BLOCK_HASH,SEQ,FEE] +// - attempt txmgrtypes.TxAttempt[CHAIN_ID,ADDR,TX_HASH,BLOCK_HASH,SEQ,FEE] +// - NewAttemptState txmgrtypes.TxAttemptState +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) UpdateTxAttemptInProgressToBroadcast(ctx interface{}, etx interface{}, attempt interface{}, NewAttemptState interface{}) *TxStore_UpdateTxAttemptInProgressToBroadcast_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_UpdateTxAttemptInProgressToBroadcast_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("UpdateTxAttemptInProgressToBroadcast", ctx, etx, attempt, NewAttemptState)} +} + +func (_c *TxStore_UpdateTxAttemptInProgressToBroadcast_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, etx *txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], attempt txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], NewAttemptState txmgrtypes.TxAttemptState)) *TxStore_UpdateTxAttemptInProgressToBroadcast_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]), args[2].(txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]), args[3].(txmgrtypes.TxAttemptState)) + }) + return _c +} + +func (_c *TxStore_UpdateTxAttemptInProgressToBroadcast_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(_a0 error) *TxStore_UpdateTxAttemptInProgressToBroadcast_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxStore_UpdateTxAttemptInProgressToBroadcast_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run 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.TxAttemptState) error) *TxStore_UpdateTxAttemptInProgressToBroadcast_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // UpdateTxCallbackCompleted provides a mock function with given fields: ctx, pipelineTaskRunRid, chainId func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) UpdateTxCallbackCompleted(ctx context.Context, pipelineTaskRunRid uuid.UUID, chainId CHAIN_ID) error { ret := _m.Called(ctx, pipelineTaskRunRid, chainId) @@ -1176,6 +2573,36 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) UpdateTxCal return r0 } +// TxStore_UpdateTxCallbackCompleted_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateTxCallbackCompleted' +type TxStore_UpdateTxCallbackCompleted_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// UpdateTxCallbackCompleted is a helper method to define mock.On call +// - ctx context.Context +// - pipelineTaskRunRid uuid.UUID +// - chainId CHAIN_ID +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) UpdateTxCallbackCompleted(ctx interface{}, pipelineTaskRunRid interface{}, chainId interface{}) *TxStore_UpdateTxCallbackCompleted_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_UpdateTxCallbackCompleted_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("UpdateTxCallbackCompleted", ctx, pipelineTaskRunRid, chainId)} +} + +func (_c *TxStore_UpdateTxCallbackCompleted_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, pipelineTaskRunRid uuid.UUID, chainId CHAIN_ID)) *TxStore_UpdateTxCallbackCompleted_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(CHAIN_ID)) + }) + return _c +} + +func (_c *TxStore_UpdateTxCallbackCompleted_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(_a0 error) *TxStore_UpdateTxCallbackCompleted_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxStore_UpdateTxCallbackCompleted_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, uuid.UUID, CHAIN_ID) error) *TxStore_UpdateTxCallbackCompleted_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // UpdateTxFatalError provides a mock function with given fields: ctx, etx func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) UpdateTxFatalError(ctx context.Context, etx *txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) error { ret := _m.Called(ctx, etx) @@ -1194,6 +2621,35 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) UpdateTxFat return r0 } +// TxStore_UpdateTxFatalError_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateTxFatalError' +type TxStore_UpdateTxFatalError_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// UpdateTxFatalError is a helper method to define mock.On call +// - ctx context.Context +// - etx *txmgrtypes.Tx[CHAIN_ID,ADDR,TX_HASH,BLOCK_HASH,SEQ,FEE] +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) UpdateTxFatalError(ctx interface{}, etx interface{}) *TxStore_UpdateTxFatalError_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_UpdateTxFatalError_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("UpdateTxFatalError", ctx, etx)} +} + +func (_c *TxStore_UpdateTxFatalError_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, etx *txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE])) *TxStore_UpdateTxFatalError_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE])) + }) + return _c +} + +func (_c *TxStore_UpdateTxFatalError_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(_a0 error) *TxStore_UpdateTxFatalError_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxStore_UpdateTxFatalError_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, *txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) error) *TxStore_UpdateTxFatalError_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // UpdateTxForRebroadcast provides a mock function with given fields: ctx, etx, etxAttempt func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) UpdateTxForRebroadcast(ctx context.Context, etx txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], etxAttempt txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) error { ret := _m.Called(ctx, etx, etxAttempt) @@ -1212,6 +2668,36 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) UpdateTxFor return r0 } +// TxStore_UpdateTxForRebroadcast_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateTxForRebroadcast' +type TxStore_UpdateTxForRebroadcast_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// UpdateTxForRebroadcast is a helper method to define mock.On call +// - ctx context.Context +// - etx txmgrtypes.Tx[CHAIN_ID,ADDR,TX_HASH,BLOCK_HASH,SEQ,FEE] +// - etxAttempt txmgrtypes.TxAttempt[CHAIN_ID,ADDR,TX_HASH,BLOCK_HASH,SEQ,FEE] +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) UpdateTxForRebroadcast(ctx interface{}, etx interface{}, etxAttempt interface{}) *TxStore_UpdateTxForRebroadcast_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_UpdateTxForRebroadcast_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("UpdateTxForRebroadcast", ctx, etx, etxAttempt)} +} + +func (_c *TxStore_UpdateTxForRebroadcast_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, etx txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], etxAttempt txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE])) *TxStore_UpdateTxForRebroadcast_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]), args[2].(txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE])) + }) + return _c +} + +func (_c *TxStore_UpdateTxForRebroadcast_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(_a0 error) *TxStore_UpdateTxForRebroadcast_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxStore_UpdateTxForRebroadcast_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run 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]) error) *TxStore_UpdateTxForRebroadcast_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // UpdateTxUnstartedToInProgress provides a mock function with given fields: ctx, etx, attempt func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) UpdateTxUnstartedToInProgress(ctx context.Context, etx *txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], attempt *txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) error { ret := _m.Called(ctx, etx, attempt) @@ -1230,6 +2716,36 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) UpdateTxUns return r0 } +// TxStore_UpdateTxUnstartedToInProgress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateTxUnstartedToInProgress' +type TxStore_UpdateTxUnstartedToInProgress_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// UpdateTxUnstartedToInProgress is a helper method to define mock.On call +// - ctx context.Context +// - etx *txmgrtypes.Tx[CHAIN_ID,ADDR,TX_HASH,BLOCK_HASH,SEQ,FEE] +// - attempt *txmgrtypes.TxAttempt[CHAIN_ID,ADDR,TX_HASH,BLOCK_HASH,SEQ,FEE] +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) UpdateTxUnstartedToInProgress(ctx interface{}, etx interface{}, attempt interface{}) *TxStore_UpdateTxUnstartedToInProgress_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_UpdateTxUnstartedToInProgress_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("UpdateTxUnstartedToInProgress", ctx, etx, attempt)} +} + +func (_c *TxStore_UpdateTxUnstartedToInProgress_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, etx *txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE], attempt *txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE])) *TxStore_UpdateTxUnstartedToInProgress_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*txmgrtypes.Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]), args[2].(*txmgrtypes.TxAttempt[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE])) + }) + return _c +} + +func (_c *TxStore_UpdateTxUnstartedToInProgress_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(_a0 error) *TxStore_UpdateTxUnstartedToInProgress_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxStore_UpdateTxUnstartedToInProgress_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run 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]) error) *TxStore_UpdateTxUnstartedToInProgress_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // UpdateTxsUnconfirmed provides a mock function with given fields: ctx, ids func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) UpdateTxsUnconfirmed(ctx context.Context, ids []int64) error { ret := _m.Called(ctx, ids) @@ -1248,6 +2764,35 @@ func (_m *TxStore[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) UpdateTxsUn return r0 } +// TxStore_UpdateTxsUnconfirmed_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateTxsUnconfirmed' +type TxStore_UpdateTxsUnconfirmed_Call[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee] struct { + *mock.Call +} + +// UpdateTxsUnconfirmed is a helper method to define mock.On call +// - ctx context.Context +// - ids []int64 +func (_e *TxStore_Expecter[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) UpdateTxsUnconfirmed(ctx interface{}, ids interface{}) *TxStore_UpdateTxsUnconfirmed_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + return &TxStore_UpdateTxsUnconfirmed_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]{Call: _e.mock.On("UpdateTxsUnconfirmed", ctx, ids)} +} + +func (_c *TxStore_UpdateTxsUnconfirmed_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Run(run func(ctx context.Context, ids []int64)) *TxStore_UpdateTxsUnconfirmed_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]int64)) + }) + return _c +} + +func (_c *TxStore_UpdateTxsUnconfirmed_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) Return(_a0 error) *TxStore_UpdateTxsUnconfirmed_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxStore_UpdateTxsUnconfirmed_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE]) RunAndReturn(run func(context.Context, []int64) error) *TxStore_UpdateTxsUnconfirmed_Call[ADDR, CHAIN_ID, TX_HASH, BLOCK_HASH, R, SEQ, FEE] { + _c.Call.Return(run) + return _c +} + // NewTxStore creates a new instance of TxStore. 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 NewTxStore[ADDR types.Hashable, CHAIN_ID types.ID, TX_HASH types.Hashable, BLOCK_HASH types.Hashable, R txmgrtypes.ChainReceipt[TX_HASH, BLOCK_HASH], SEQ types.Sequence, FEE feetypes.Fee](t interface { diff --git a/common/txmgr/types/mocks/tx_strategy.go b/common/txmgr/types/mocks/tx_strategy.go index 414fdb44cb0..434b074caf2 100644 --- a/common/txmgr/types/mocks/tx_strategy.go +++ b/common/txmgr/types/mocks/tx_strategy.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -16,6 +16,14 @@ type TxStrategy struct { mock.Mock } +type TxStrategy_Expecter struct { + mock *mock.Mock +} + +func (_m *TxStrategy) EXPECT() *TxStrategy_Expecter { + return &TxStrategy_Expecter{mock: &_m.Mock} +} + // PruneQueue provides a mock function with given fields: ctx, pruneService func (_m *TxStrategy) PruneQueue(ctx context.Context, pruneService types.UnstartedTxQueuePruner) ([]int64, error) { ret := _m.Called(ctx, pruneService) @@ -46,6 +54,35 @@ func (_m *TxStrategy) PruneQueue(ctx context.Context, pruneService types.Unstart return r0, r1 } +// TxStrategy_PruneQueue_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PruneQueue' +type TxStrategy_PruneQueue_Call struct { + *mock.Call +} + +// PruneQueue is a helper method to define mock.On call +// - ctx context.Context +// - pruneService types.UnstartedTxQueuePruner +func (_e *TxStrategy_Expecter) PruneQueue(ctx interface{}, pruneService interface{}) *TxStrategy_PruneQueue_Call { + return &TxStrategy_PruneQueue_Call{Call: _e.mock.On("PruneQueue", ctx, pruneService)} +} + +func (_c *TxStrategy_PruneQueue_Call) Run(run func(ctx context.Context, pruneService types.UnstartedTxQueuePruner)) *TxStrategy_PruneQueue_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.UnstartedTxQueuePruner)) + }) + return _c +} + +func (_c *TxStrategy_PruneQueue_Call) Return(ids []int64, err error) *TxStrategy_PruneQueue_Call { + _c.Call.Return(ids, err) + return _c +} + +func (_c *TxStrategy_PruneQueue_Call) RunAndReturn(run func(context.Context, types.UnstartedTxQueuePruner) ([]int64, error)) *TxStrategy_PruneQueue_Call { + _c.Call.Return(run) + return _c +} + // Subject provides a mock function with given fields: func (_m *TxStrategy) Subject() uuid.NullUUID { ret := _m.Called() @@ -64,6 +101,33 @@ func (_m *TxStrategy) Subject() uuid.NullUUID { return r0 } +// TxStrategy_Subject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Subject' +type TxStrategy_Subject_Call struct { + *mock.Call +} + +// Subject is a helper method to define mock.On call +func (_e *TxStrategy_Expecter) Subject() *TxStrategy_Subject_Call { + return &TxStrategy_Subject_Call{Call: _e.mock.On("Subject")} +} + +func (_c *TxStrategy_Subject_Call) Run(run func()) *TxStrategy_Subject_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *TxStrategy_Subject_Call) Return(_a0 uuid.NullUUID) *TxStrategy_Subject_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxStrategy_Subject_Call) RunAndReturn(run func() uuid.NullUUID) *TxStrategy_Subject_Call { + _c.Call.Return(run) + return _c +} + // NewTxStrategy creates a new instance of TxStrategy. 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 NewTxStrategy(t interface { diff --git a/common/txmgr/types/tx.go b/common/txmgr/types/tx.go index d2afbd209d8..b65f7edf6e5 100644 --- a/common/txmgr/types/tx.go +++ b/common/txmgr/types/tx.go @@ -22,8 +22,6 @@ import ( ) // TxStrategy controls how txes are queued and sent -// -//go:generate mockery --quiet --name TxStrategy --output ./mocks/ --case=underscore --structname TxStrategy --filename tx_strategy.go type TxStrategy interface { // Subject will be saved txes.subject if not null Subject() uuid.NullUUID diff --git a/common/txmgr/types/tx_attempt_builder.go b/common/txmgr/types/tx_attempt_builder.go index a9cbddfc2cf..44443e78211 100644 --- a/common/txmgr/types/tx_attempt_builder.go +++ b/common/txmgr/types/tx_attempt_builder.go @@ -13,8 +13,6 @@ import ( // TxAttemptBuilder takes the base unsigned transaction + optional parameters (tx type, gas parameters) // and returns a signed TxAttempt // it is able to estimate fees and sign transactions -// -//go:generate mockery --quiet --name TxAttemptBuilder --output ./mocks/ --case=underscore type TxAttemptBuilder[ CHAIN_ID types.ID, // CHAIN_ID - chain id type HEAD types.Head[BLOCK_HASH], // HEAD - chain head type diff --git a/common/txmgr/types/tx_store.go b/common/txmgr/types/tx_store.go index c102fb5912a..25040ea3bdb 100644 --- a/common/txmgr/types/tx_store.go +++ b/common/txmgr/types/tx_store.go @@ -13,8 +13,6 @@ import ( ) // TxStore is a superset of all the needed persistence layer methods -// -//go:generate mockery --quiet --name TxStore --output ./mocks/ --case=underscore type TxStore[ // Represents an account address, in native chain format. ADDR types.Hashable, diff --git a/common/types/head.go b/common/types/head.go index 9d927d4f5e4..5252c8f75a1 100644 --- a/common/types/head.go +++ b/common/types/head.go @@ -7,8 +7,6 @@ import ( // Head provides access to a chain's head, as needed by the TxManager. // This is a generic interface which ALL chains will implement. -// -//go:generate mockery --quiet --name Head --output ./mocks/ --case=underscore type Head[BLOCK_HASH Hashable] interface { // BlockNumber is the head's block number BlockNumber() int64 @@ -33,6 +31,9 @@ type Head[BLOCK_HASH Hashable] interface { // If not in chain, returns the zero hash HashAtHeight(blockNum int64) BLOCK_HASH + // HeadAtHeight returns head at specified height or an error, if one does not exist in provided chain. + HeadAtHeight(blockNum int64) (Head[BLOCK_HASH], error) + // Returns the total difficulty of the block. For chains who do not have a concept of block // difficulty, return 0. BlockDifficulty() *big.Int diff --git a/common/types/mocks/head.go b/common/types/mocks/head.go index 8fcd57a33c9..407a6251a94 100644 --- a/common/types/mocks/head.go +++ b/common/types/mocks/head.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -16,6 +16,14 @@ type Head[BLOCK_HASH types.Hashable] struct { mock.Mock } +type Head_Expecter[BLOCK_HASH types.Hashable] struct { + mock *mock.Mock +} + +func (_m *Head[BLOCK_HASH]) EXPECT() *Head_Expecter[BLOCK_HASH] { + return &Head_Expecter[BLOCK_HASH]{mock: &_m.Mock} +} + // BlockDifficulty provides a mock function with given fields: func (_m *Head[BLOCK_HASH]) BlockDifficulty() *big.Int { ret := _m.Called() @@ -36,6 +44,33 @@ func (_m *Head[BLOCK_HASH]) BlockDifficulty() *big.Int { return r0 } +// Head_BlockDifficulty_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockDifficulty' +type Head_BlockDifficulty_Call[BLOCK_HASH types.Hashable] struct { + *mock.Call +} + +// BlockDifficulty is a helper method to define mock.On call +func (_e *Head_Expecter[BLOCK_HASH]) BlockDifficulty() *Head_BlockDifficulty_Call[BLOCK_HASH] { + return &Head_BlockDifficulty_Call[BLOCK_HASH]{Call: _e.mock.On("BlockDifficulty")} +} + +func (_c *Head_BlockDifficulty_Call[BLOCK_HASH]) Run(run func()) *Head_BlockDifficulty_Call[BLOCK_HASH] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Head_BlockDifficulty_Call[BLOCK_HASH]) Return(_a0 *big.Int) *Head_BlockDifficulty_Call[BLOCK_HASH] { + _c.Call.Return(_a0) + return _c +} + +func (_c *Head_BlockDifficulty_Call[BLOCK_HASH]) RunAndReturn(run func() *big.Int) *Head_BlockDifficulty_Call[BLOCK_HASH] { + _c.Call.Return(run) + return _c +} + // BlockHash provides a mock function with given fields: func (_m *Head[BLOCK_HASH]) BlockHash() BLOCK_HASH { ret := _m.Called() @@ -54,6 +89,33 @@ func (_m *Head[BLOCK_HASH]) BlockHash() BLOCK_HASH { return r0 } +// Head_BlockHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockHash' +type Head_BlockHash_Call[BLOCK_HASH types.Hashable] struct { + *mock.Call +} + +// BlockHash is a helper method to define mock.On call +func (_e *Head_Expecter[BLOCK_HASH]) BlockHash() *Head_BlockHash_Call[BLOCK_HASH] { + return &Head_BlockHash_Call[BLOCK_HASH]{Call: _e.mock.On("BlockHash")} +} + +func (_c *Head_BlockHash_Call[BLOCK_HASH]) Run(run func()) *Head_BlockHash_Call[BLOCK_HASH] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Head_BlockHash_Call[BLOCK_HASH]) Return(_a0 BLOCK_HASH) *Head_BlockHash_Call[BLOCK_HASH] { + _c.Call.Return(_a0) + return _c +} + +func (_c *Head_BlockHash_Call[BLOCK_HASH]) RunAndReturn(run func() BLOCK_HASH) *Head_BlockHash_Call[BLOCK_HASH] { + _c.Call.Return(run) + return _c +} + // BlockNumber provides a mock function with given fields: func (_m *Head[BLOCK_HASH]) BlockNumber() int64 { ret := _m.Called() @@ -72,6 +134,33 @@ func (_m *Head[BLOCK_HASH]) BlockNumber() int64 { return r0 } +// Head_BlockNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockNumber' +type Head_BlockNumber_Call[BLOCK_HASH types.Hashable] struct { + *mock.Call +} + +// BlockNumber is a helper method to define mock.On call +func (_e *Head_Expecter[BLOCK_HASH]) BlockNumber() *Head_BlockNumber_Call[BLOCK_HASH] { + return &Head_BlockNumber_Call[BLOCK_HASH]{Call: _e.mock.On("BlockNumber")} +} + +func (_c *Head_BlockNumber_Call[BLOCK_HASH]) Run(run func()) *Head_BlockNumber_Call[BLOCK_HASH] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Head_BlockNumber_Call[BLOCK_HASH]) Return(_a0 int64) *Head_BlockNumber_Call[BLOCK_HASH] { + _c.Call.Return(_a0) + return _c +} + +func (_c *Head_BlockNumber_Call[BLOCK_HASH]) RunAndReturn(run func() int64) *Head_BlockNumber_Call[BLOCK_HASH] { + _c.Call.Return(run) + return _c +} + // ChainLength provides a mock function with given fields: func (_m *Head[BLOCK_HASH]) ChainLength() uint32 { ret := _m.Called() @@ -90,6 +179,33 @@ func (_m *Head[BLOCK_HASH]) ChainLength() uint32 { return r0 } +// Head_ChainLength_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChainLength' +type Head_ChainLength_Call[BLOCK_HASH types.Hashable] struct { + *mock.Call +} + +// ChainLength is a helper method to define mock.On call +func (_e *Head_Expecter[BLOCK_HASH]) ChainLength() *Head_ChainLength_Call[BLOCK_HASH] { + return &Head_ChainLength_Call[BLOCK_HASH]{Call: _e.mock.On("ChainLength")} +} + +func (_c *Head_ChainLength_Call[BLOCK_HASH]) Run(run func()) *Head_ChainLength_Call[BLOCK_HASH] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Head_ChainLength_Call[BLOCK_HASH]) Return(_a0 uint32) *Head_ChainLength_Call[BLOCK_HASH] { + _c.Call.Return(_a0) + return _c +} + +func (_c *Head_ChainLength_Call[BLOCK_HASH]) RunAndReturn(run func() uint32) *Head_ChainLength_Call[BLOCK_HASH] { + _c.Call.Return(run) + return _c +} + // EarliestHeadInChain provides a mock function with given fields: func (_m *Head[BLOCK_HASH]) EarliestHeadInChain() types.Head[BLOCK_HASH] { ret := _m.Called() @@ -110,6 +226,33 @@ func (_m *Head[BLOCK_HASH]) EarliestHeadInChain() types.Head[BLOCK_HASH] { return r0 } +// Head_EarliestHeadInChain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EarliestHeadInChain' +type Head_EarliestHeadInChain_Call[BLOCK_HASH types.Hashable] struct { + *mock.Call +} + +// EarliestHeadInChain is a helper method to define mock.On call +func (_e *Head_Expecter[BLOCK_HASH]) EarliestHeadInChain() *Head_EarliestHeadInChain_Call[BLOCK_HASH] { + return &Head_EarliestHeadInChain_Call[BLOCK_HASH]{Call: _e.mock.On("EarliestHeadInChain")} +} + +func (_c *Head_EarliestHeadInChain_Call[BLOCK_HASH]) Run(run func()) *Head_EarliestHeadInChain_Call[BLOCK_HASH] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Head_EarliestHeadInChain_Call[BLOCK_HASH]) Return(_a0 types.Head[BLOCK_HASH]) *Head_EarliestHeadInChain_Call[BLOCK_HASH] { + _c.Call.Return(_a0) + return _c +} + +func (_c *Head_EarliestHeadInChain_Call[BLOCK_HASH]) RunAndReturn(run func() types.Head[BLOCK_HASH]) *Head_EarliestHeadInChain_Call[BLOCK_HASH] { + _c.Call.Return(run) + return _c +} + // GetParent provides a mock function with given fields: func (_m *Head[BLOCK_HASH]) GetParent() types.Head[BLOCK_HASH] { ret := _m.Called() @@ -130,6 +273,33 @@ func (_m *Head[BLOCK_HASH]) GetParent() types.Head[BLOCK_HASH] { return r0 } +// Head_GetParent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetParent' +type Head_GetParent_Call[BLOCK_HASH types.Hashable] struct { + *mock.Call +} + +// GetParent is a helper method to define mock.On call +func (_e *Head_Expecter[BLOCK_HASH]) GetParent() *Head_GetParent_Call[BLOCK_HASH] { + return &Head_GetParent_Call[BLOCK_HASH]{Call: _e.mock.On("GetParent")} +} + +func (_c *Head_GetParent_Call[BLOCK_HASH]) Run(run func()) *Head_GetParent_Call[BLOCK_HASH] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Head_GetParent_Call[BLOCK_HASH]) Return(_a0 types.Head[BLOCK_HASH]) *Head_GetParent_Call[BLOCK_HASH] { + _c.Call.Return(_a0) + return _c +} + +func (_c *Head_GetParent_Call[BLOCK_HASH]) RunAndReturn(run func() types.Head[BLOCK_HASH]) *Head_GetParent_Call[BLOCK_HASH] { + _c.Call.Return(run) + return _c +} + // GetParentHash provides a mock function with given fields: func (_m *Head[BLOCK_HASH]) GetParentHash() BLOCK_HASH { ret := _m.Called() @@ -148,6 +318,33 @@ func (_m *Head[BLOCK_HASH]) GetParentHash() BLOCK_HASH { return r0 } +// Head_GetParentHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetParentHash' +type Head_GetParentHash_Call[BLOCK_HASH types.Hashable] struct { + *mock.Call +} + +// GetParentHash is a helper method to define mock.On call +func (_e *Head_Expecter[BLOCK_HASH]) GetParentHash() *Head_GetParentHash_Call[BLOCK_HASH] { + return &Head_GetParentHash_Call[BLOCK_HASH]{Call: _e.mock.On("GetParentHash")} +} + +func (_c *Head_GetParentHash_Call[BLOCK_HASH]) Run(run func()) *Head_GetParentHash_Call[BLOCK_HASH] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Head_GetParentHash_Call[BLOCK_HASH]) Return(_a0 BLOCK_HASH) *Head_GetParentHash_Call[BLOCK_HASH] { + _c.Call.Return(_a0) + return _c +} + +func (_c *Head_GetParentHash_Call[BLOCK_HASH]) RunAndReturn(run func() BLOCK_HASH) *Head_GetParentHash_Call[BLOCK_HASH] { + _c.Call.Return(run) + return _c +} + // GetTimestamp provides a mock function with given fields: func (_m *Head[BLOCK_HASH]) GetTimestamp() time.Time { ret := _m.Called() @@ -166,6 +363,33 @@ func (_m *Head[BLOCK_HASH]) GetTimestamp() time.Time { return r0 } +// Head_GetTimestamp_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTimestamp' +type Head_GetTimestamp_Call[BLOCK_HASH types.Hashable] struct { + *mock.Call +} + +// GetTimestamp is a helper method to define mock.On call +func (_e *Head_Expecter[BLOCK_HASH]) GetTimestamp() *Head_GetTimestamp_Call[BLOCK_HASH] { + return &Head_GetTimestamp_Call[BLOCK_HASH]{Call: _e.mock.On("GetTimestamp")} +} + +func (_c *Head_GetTimestamp_Call[BLOCK_HASH]) Run(run func()) *Head_GetTimestamp_Call[BLOCK_HASH] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Head_GetTimestamp_Call[BLOCK_HASH]) Return(_a0 time.Time) *Head_GetTimestamp_Call[BLOCK_HASH] { + _c.Call.Return(_a0) + return _c +} + +func (_c *Head_GetTimestamp_Call[BLOCK_HASH]) RunAndReturn(run func() time.Time) *Head_GetTimestamp_Call[BLOCK_HASH] { + _c.Call.Return(run) + return _c +} + // HashAtHeight provides a mock function with given fields: blockNum func (_m *Head[BLOCK_HASH]) HashAtHeight(blockNum int64) BLOCK_HASH { ret := _m.Called(blockNum) @@ -184,6 +408,92 @@ func (_m *Head[BLOCK_HASH]) HashAtHeight(blockNum int64) BLOCK_HASH { return r0 } +// Head_HashAtHeight_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HashAtHeight' +type Head_HashAtHeight_Call[BLOCK_HASH types.Hashable] struct { + *mock.Call +} + +// HashAtHeight is a helper method to define mock.On call +// - blockNum int64 +func (_e *Head_Expecter[BLOCK_HASH]) HashAtHeight(blockNum interface{}) *Head_HashAtHeight_Call[BLOCK_HASH] { + return &Head_HashAtHeight_Call[BLOCK_HASH]{Call: _e.mock.On("HashAtHeight", blockNum)} +} + +func (_c *Head_HashAtHeight_Call[BLOCK_HASH]) Run(run func(blockNum int64)) *Head_HashAtHeight_Call[BLOCK_HASH] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64)) + }) + return _c +} + +func (_c *Head_HashAtHeight_Call[BLOCK_HASH]) Return(_a0 BLOCK_HASH) *Head_HashAtHeight_Call[BLOCK_HASH] { + _c.Call.Return(_a0) + return _c +} + +func (_c *Head_HashAtHeight_Call[BLOCK_HASH]) RunAndReturn(run func(int64) BLOCK_HASH) *Head_HashAtHeight_Call[BLOCK_HASH] { + _c.Call.Return(run) + return _c +} + +// HeadAtHeight provides a mock function with given fields: blockNum +func (_m *Head[BLOCK_HASH]) HeadAtHeight(blockNum int64) (types.Head[BLOCK_HASH], error) { + ret := _m.Called(blockNum) + + if len(ret) == 0 { + panic("no return value specified for HeadAtHeight") + } + + var r0 types.Head[BLOCK_HASH] + var r1 error + if rf, ok := ret.Get(0).(func(int64) (types.Head[BLOCK_HASH], error)); ok { + return rf(blockNum) + } + if rf, ok := ret.Get(0).(func(int64) types.Head[BLOCK_HASH]); ok { + r0 = rf(blockNum) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(types.Head[BLOCK_HASH]) + } + } + + if rf, ok := ret.Get(1).(func(int64) error); ok { + r1 = rf(blockNum) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Head_HeadAtHeight_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HeadAtHeight' +type Head_HeadAtHeight_Call[BLOCK_HASH types.Hashable] struct { + *mock.Call +} + +// HeadAtHeight is a helper method to define mock.On call +// - blockNum int64 +func (_e *Head_Expecter[BLOCK_HASH]) HeadAtHeight(blockNum interface{}) *Head_HeadAtHeight_Call[BLOCK_HASH] { + return &Head_HeadAtHeight_Call[BLOCK_HASH]{Call: _e.mock.On("HeadAtHeight", blockNum)} +} + +func (_c *Head_HeadAtHeight_Call[BLOCK_HASH]) Run(run func(blockNum int64)) *Head_HeadAtHeight_Call[BLOCK_HASH] { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64)) + }) + return _c +} + +func (_c *Head_HeadAtHeight_Call[BLOCK_HASH]) Return(_a0 types.Head[BLOCK_HASH], _a1 error) *Head_HeadAtHeight_Call[BLOCK_HASH] { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Head_HeadAtHeight_Call[BLOCK_HASH]) RunAndReturn(run func(int64) (types.Head[BLOCK_HASH], error)) *Head_HeadAtHeight_Call[BLOCK_HASH] { + _c.Call.Return(run) + return _c +} + // IsValid provides a mock function with given fields: func (_m *Head[BLOCK_HASH]) IsValid() bool { ret := _m.Called() @@ -202,6 +512,33 @@ func (_m *Head[BLOCK_HASH]) IsValid() bool { return r0 } +// Head_IsValid_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsValid' +type Head_IsValid_Call[BLOCK_HASH types.Hashable] struct { + *mock.Call +} + +// IsValid is a helper method to define mock.On call +func (_e *Head_Expecter[BLOCK_HASH]) IsValid() *Head_IsValid_Call[BLOCK_HASH] { + return &Head_IsValid_Call[BLOCK_HASH]{Call: _e.mock.On("IsValid")} +} + +func (_c *Head_IsValid_Call[BLOCK_HASH]) Run(run func()) *Head_IsValid_Call[BLOCK_HASH] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Head_IsValid_Call[BLOCK_HASH]) Return(_a0 bool) *Head_IsValid_Call[BLOCK_HASH] { + _c.Call.Return(_a0) + return _c +} + +func (_c *Head_IsValid_Call[BLOCK_HASH]) RunAndReturn(run func() bool) *Head_IsValid_Call[BLOCK_HASH] { + _c.Call.Return(run) + return _c +} + // LatestFinalizedHead provides a mock function with given fields: func (_m *Head[BLOCK_HASH]) LatestFinalizedHead() types.Head[BLOCK_HASH] { ret := _m.Called() @@ -222,6 +559,33 @@ func (_m *Head[BLOCK_HASH]) LatestFinalizedHead() types.Head[BLOCK_HASH] { return r0 } +// Head_LatestFinalizedHead_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LatestFinalizedHead' +type Head_LatestFinalizedHead_Call[BLOCK_HASH types.Hashable] struct { + *mock.Call +} + +// LatestFinalizedHead is a helper method to define mock.On call +func (_e *Head_Expecter[BLOCK_HASH]) LatestFinalizedHead() *Head_LatestFinalizedHead_Call[BLOCK_HASH] { + return &Head_LatestFinalizedHead_Call[BLOCK_HASH]{Call: _e.mock.On("LatestFinalizedHead")} +} + +func (_c *Head_LatestFinalizedHead_Call[BLOCK_HASH]) Run(run func()) *Head_LatestFinalizedHead_Call[BLOCK_HASH] { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Head_LatestFinalizedHead_Call[BLOCK_HASH]) Return(_a0 types.Head[BLOCK_HASH]) *Head_LatestFinalizedHead_Call[BLOCK_HASH] { + _c.Call.Return(_a0) + return _c +} + +func (_c *Head_LatestFinalizedHead_Call[BLOCK_HASH]) RunAndReturn(run func() types.Head[BLOCK_HASH]) *Head_LatestFinalizedHead_Call[BLOCK_HASH] { + _c.Call.Return(run) + return _c +} + // NewHead creates a new instance of Head. 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 NewHead[BLOCK_HASH types.Hashable](t interface { diff --git a/common/types/mocks/subscription.go b/common/types/mocks/subscription.go index e52fafa7ca5..9119936ec4f 100644 --- a/common/types/mocks/subscription.go +++ b/common/types/mocks/subscription.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -9,6 +9,14 @@ type Subscription struct { mock.Mock } +type Subscription_Expecter struct { + mock *mock.Mock +} + +func (_m *Subscription) EXPECT() *Subscription_Expecter { + return &Subscription_Expecter{mock: &_m.Mock} +} + // Err provides a mock function with given fields: func (_m *Subscription) Err() <-chan error { ret := _m.Called() @@ -29,11 +37,65 @@ func (_m *Subscription) Err() <-chan error { return r0 } +// Subscription_Err_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Err' +type Subscription_Err_Call struct { + *mock.Call +} + +// Err is a helper method to define mock.On call +func (_e *Subscription_Expecter) Err() *Subscription_Err_Call { + return &Subscription_Err_Call{Call: _e.mock.On("Err")} +} + +func (_c *Subscription_Err_Call) Run(run func()) *Subscription_Err_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Subscription_Err_Call) Return(_a0 <-chan error) *Subscription_Err_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Subscription_Err_Call) RunAndReturn(run func() <-chan error) *Subscription_Err_Call { + _c.Call.Return(run) + return _c +} + // Unsubscribe provides a mock function with given fields: func (_m *Subscription) Unsubscribe() { _m.Called() } +// Subscription_Unsubscribe_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unsubscribe' +type Subscription_Unsubscribe_Call struct { + *mock.Call +} + +// Unsubscribe is a helper method to define mock.On call +func (_e *Subscription_Expecter) Unsubscribe() *Subscription_Unsubscribe_Call { + return &Subscription_Unsubscribe_Call{Call: _e.mock.On("Unsubscribe")} +} + +func (_c *Subscription_Unsubscribe_Call) Run(run func()) *Subscription_Unsubscribe_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Subscription_Unsubscribe_Call) Return() *Subscription_Unsubscribe_Call { + _c.Call.Return() + return _c +} + +func (_c *Subscription_Unsubscribe_Call) RunAndReturn(run func()) *Subscription_Unsubscribe_Call { + _c.Call.Return(run) + return _c +} + // NewSubscription creates a new instance of Subscription. 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 NewSubscription(t interface { diff --git a/common/types/subscription.go b/common/types/subscription.go index e0cd0a1660d..b9b44e41943 100644 --- a/common/types/subscription.go +++ b/common/types/subscription.go @@ -1,7 +1,5 @@ package types -//go:generate mockery --quiet --name Subscription --output ./mocks/ --case=underscore - // Subscription represents an event subscription where events are // delivered on a data channel. // This is a generic interface for Subscription to represent used by clients. diff --git a/contracts/.changeset/green-pigs-reflect.md b/contracts/.changeset/green-pigs-reflect.md new file mode 100644 index 00000000000..cb197a32bcf --- /dev/null +++ b/contracts/.changeset/green-pigs-reflect.md @@ -0,0 +1,5 @@ +--- +"@chainlink/contracts": patch +--- + +add test for v23 #added diff --git a/contracts/.changeset/neat-brooms-repeat.md b/contracts/.changeset/neat-brooms-repeat.md new file mode 100644 index 00000000000..48188702bc3 --- /dev/null +++ b/contracts/.changeset/neat-brooms-repeat.md @@ -0,0 +1,5 @@ +--- +'@chainlink/contracts': minor +--- + +We have multiple validation use-cases on-chain which requires the inputs to be a set, sorted-set or we need to do subset checks.Adding a library for these validations diff --git a/contracts/.changeset/proud-turkeys-fold.md b/contracts/.changeset/proud-turkeys-fold.md new file mode 100644 index 00000000000..eab0c192497 --- /dev/null +++ b/contracts/.changeset/proud-turkeys-fold.md @@ -0,0 +1,5 @@ +--- +'@chainlink/contracts': patch +--- + +VRFV2Plus coordinator and wrapper split contracts between L1 and L2 chains #updated diff --git a/contracts/.changeset/serious-cats-fold.md b/contracts/.changeset/serious-cats-fold.md new file mode 100644 index 00000000000..ccf89c9b040 --- /dev/null +++ b/contracts/.changeset/serious-cats-fold.md @@ -0,0 +1,5 @@ +--- +"@chainlink/contracts": patch +--- + +Implemented improved L1 fee calculation for L2 chains in Functions contracts diff --git a/contracts/.changeset/tender-roses-know.md b/contracts/.changeset/tender-roses-know.md new file mode 100644 index 00000000000..383837fce0a --- /dev/null +++ b/contracts/.changeset/tender-roses-know.md @@ -0,0 +1,5 @@ +--- +'@chainlink/contracts': minor +--- + +#internal Modify ChainReader tester contract. diff --git a/contracts/.changeset/tricky-comics-scream.md b/contracts/.changeset/tricky-comics-scream.md new file mode 100644 index 00000000000..f7cd1ceeab1 --- /dev/null +++ b/contracts/.changeset/tricky-comics-scream.md @@ -0,0 +1,5 @@ +--- +"@chainlink/contracts": patch +--- + +remove stale automation HH tests diff --git a/contracts/.prettierignore b/contracts/.prettierignore index b2c6d61c220..7c3131db424 100644 --- a/contracts/.prettierignore +++ b/contracts/.prettierignore @@ -15,7 +15,6 @@ abi artifacts foundry-artifacts foundry-cache -foundry-lib cache node_modules solc diff --git a/contracts/GNUmakefile b/contracts/GNUmakefile index ba11b396e89..c3e69464698 100644 --- a/contracts/GNUmakefile +++ b/contracts/GNUmakefile @@ -39,7 +39,7 @@ abigen: ## Build & install abigen. .PHONY: mockery mockery: $(mockery) ## Install mockery. - go install github.com/vektra/mockery/v2@v2.35.4 + go install github.com/vektra/mockery/v2@v2.43.2 .PHONY: foundry foundry: ## Install foundry. @@ -73,18 +73,6 @@ wrappers-all: pnpmdep mockery abigen ## Recompiles solidity contracts and their # go_generate contains a call to compile all contracts before generating wrappers go generate ../core/gethwrappers/go_generate.go -# Custom wrapper generation for OCR2VRF as their contracts do not exist in this repo -.PHONY: go-solidity-wrappers-ocr2vrf -go-solidity-wrappers-ocr2vrf: pnpmdep abigen ## Recompiles OCR2VRF solidity contracts and their go wrappers. - ./scripts/native_solc_compile_all_ocr2vrf - # replace the go:generate_disabled directive with the regular go:generate directive - sed -i '' 's/go:generate_disabled/go:generate/g' ../core/gethwrappers/ocr2vrf/go_generate.go - go generate ../core/gethwrappers/ocr2vrf - go generate ../core/internal/mocks - # put the go:generate_disabled directive back - sed -i '' 's/go:generate/go:generate_disabled/g' ../core/gethwrappers/ocr2vrf/go_generate.go - - help: @echo "" @echo " .__ .__ .__ .__ __" diff --git a/contracts/ci.json b/contracts/ci.json deleted file mode 100644 index 668c85fd4d4..00000000000 --- a/contracts/ci.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "type": "solidity", - "basePath": "./contracts/test/", - "splits": [ - { - "dir": "v0.8", - "numOfSplits": 5, - "slowTests": [ - "CronUpkeepFactory", - "AutomationRegistry2_2", - "AutomationRegistry2_3" - ] - } - ] -} diff --git a/contracts/foundry.toml b/contracts/foundry.toml index f5922c4a575..08940b4e9ff 100644 --- a/contracts/foundry.toml +++ b/contracts/foundry.toml @@ -7,7 +7,7 @@ src = 'src/v0.8' test = 'test/v0.8' out = 'foundry-artifacts' cache_path = 'foundry-cache' -libs = ['node_modules', 'foundry-lib'] +libs = ['node_modules'] bytecode_hash = "none" ffi = false diff --git a/contracts/gas-snapshots/functions.gas-snapshot b/contracts/gas-snapshots/functions.gas-snapshot index 53b34c786c9..d7945f225e6 100644 --- a/contracts/gas-snapshots/functions.gas-snapshot +++ b/contracts/gas-snapshots/functions.gas-snapshot @@ -1,20 +1,20 @@ -ChainSpecificUtil__getCurrentTxL1GasFees_Arbitrum:test__getCurrentTxL1GasFees_SuccessWhenArbitrumGoerli() (gas: 15910179) -ChainSpecificUtil__getCurrentTxL1GasFees_Arbitrum:test__getCurrentTxL1GasFees_SuccessWhenArbitrumMainnet() (gas: 15910157) -ChainSpecificUtil__getCurrentTxL1GasFees_Arbitrum:test__getCurrentTxL1GasFees_SuccessWhenArbitrumSepolia() (gas: 15910173) -ChainSpecificUtil__getCurrentTxL1GasFees_Base:test__getCurrentTxL1GasFees_SuccessWhenBaseGoerli() (gas: 15921621) -ChainSpecificUtil__getCurrentTxL1GasFees_Base:test__getCurrentTxL1GasFees_SuccessWhenBaseMainnet() (gas: 15921598) -ChainSpecificUtil__getCurrentTxL1GasFees_Base:test__getCurrentTxL1GasFees_SuccessWhenBaseSepolia() (gas: 15921570) -ChainSpecificUtil__getCurrentTxL1GasFees_Optimism:test__getCurrentTxL1GasFees_SuccessWhenOptimismGoerli() (gas: 15921521) -ChainSpecificUtil__getCurrentTxL1GasFees_Optimism:test__getCurrentTxL1GasFees_SuccessWhenOptimismMainnet() (gas: 15921510) -ChainSpecificUtil__getCurrentTxL1GasFees_Optimism:test__getCurrentTxL1GasFees_SuccessWhenOptimismSepolia() (gas: 15921554) +ChainSpecificUtil__getL1FeeUpperLimit_Arbitrum:test__getL1FeeUpperLimit_SuccessWhenArbitrumGoerli() (gas: 15903239) +ChainSpecificUtil__getL1FeeUpperLimit_Arbitrum:test__getL1FeeUpperLimit_SuccessWhenArbitrumMainnet() (gas: 15903196) +ChainSpecificUtil__getL1FeeUpperLimit_Arbitrum:test__getL1FeeUpperLimit_SuccessWhenArbitrumSepolia() (gas: 15903265) +ChainSpecificUtil__getL1FeeUpperLimit_Base:test__getL1FeeUpperLimit_SuccessWhenBaseGoerli() (gas: 15903033) +ChainSpecificUtil__getL1FeeUpperLimit_Base:test__getL1FeeUpperLimit_SuccessWhenBaseMainnet() (gas: 15903011) +ChainSpecificUtil__getL1FeeUpperLimit_Base:test__getL1FeeUpperLimit_SuccessWhenBaseSepolia() (gas: 15903060) +ChainSpecificUtil__getL1FeeUpperLimit_Optimism:test__getL1FeeUpperLimit_SuccessWhenOptimismGoerli() (gas: 15902946) +ChainSpecificUtil__getL1FeeUpperLimit_Optimism:test__getL1FeeUpperLimit_SuccessWhenOptimismMainnet() (gas: 15902968) +ChainSpecificUtil__getL1FeeUpperLimit_Optimism:test__getL1FeeUpperLimit_SuccessWhenOptimismSepolia() (gas: 15903011) FunctionsBilling_Constructor:test_Constructor_Success() (gas: 17982) FunctionsBilling_DeleteCommitment:test_DeleteCommitment_RevertIfNotRouter() (gas: 13260) FunctionsBilling_DeleteCommitment:test_DeleteCommitment_Success() (gas: 15875) FunctionsBilling_EstimateCost:test_EstimateCost_RevertsIfGasPriceAboveCeiling() (gas: 32450) -FunctionsBilling_EstimateCost:test_EstimateCost_Success() (gas: 91058) -FunctionsBilling_EstimateCost:test_EstimateCost_SuccessLowGasPrice() (gas: 91161) +FunctionsBilling_EstimateCost:test_EstimateCost_Success() (gas: 90999) +FunctionsBilling_EstimateCost:test_EstimateCost_SuccessLowGasPrice() (gas: 91102) FunctionsBilling_GetAdminFeeJuels:test_GetAdminFeeJuels_Success() (gas: 18671) -FunctionsBilling_GetConfig:test_GetConfig_Success() (gas: 30213) +FunctionsBilling_GetConfig:test_GetConfig_Success() (gas: 30727) FunctionsBilling_GetDONFeeJuels:test_GetDONFeeJuels_Success() (gas: 41128) FunctionsBilling_GetOperationFee:test_GetOperationFeeJuels_Success() (gas: 40548) FunctionsBilling_GetWeiPerUnitLink:test_GetWeiPerUnitLink_Success() (gas: 29751) @@ -25,44 +25,44 @@ FunctionsBilling_OracleWithdraw:test_OracleWithdraw_SuccessTransmitterWithBalanc FunctionsBilling_OracleWithdraw:test_OracleWithdraw_SuccessTransmitterWithBalanceValidAmountGiven() (gas: 145165) FunctionsBilling_OracleWithdrawAll:test_OracleWithdrawAll_RevertIfNotOwner() (gas: 13297) FunctionsBilling_OracleWithdrawAll:test_OracleWithdrawAll_SuccessPaysTransmittersWithBalance() (gas: 222357) -FunctionsBilling_UpdateConfig:test_UpdateConfig_RevertIfNotOwner() (gas: 21521) -FunctionsBilling_UpdateConfig:test_UpdateConfig_Success() (gas: 53173) +FunctionsBilling_UpdateConfig:test_UpdateConfig_RevertIfNotOwner() (gas: 21654) +FunctionsBilling_UpdateConfig:test_UpdateConfig_Success() (gas: 54121) FunctionsBilling__DisperseFeePool:test__DisperseFeePool_RevertIfNotSet() (gas: 8810) FunctionsBilling__FulfillAndBill:test__FulfillAndBill_RevertIfInvalidCommitment() (gas: 13375) -FunctionsBilling__FulfillAndBill:test__FulfillAndBill_Success() (gas: 186305) -FunctionsBilling__StartBilling:test__FulfillAndBill_HasUniqueGlobalRequestId() (gas: 524688) +FunctionsBilling__FulfillAndBill:test__FulfillAndBill_Success() (gas: 185953) +FunctionsBilling__StartBilling:test__FulfillAndBill_HasUniqueGlobalRequestId() (gas: 524582) FunctionsClient_Constructor:test_Constructor_Success() (gas: 10407) FunctionsClient_HandleOracleFulfillment:test_HandleOracleFulfillment_RevertIfNotRouter() (gas: 14617) FunctionsClient_HandleOracleFulfillment:test_HandleOracleFulfillment_Success() (gas: 22917) FunctionsClient__SendRequest:test__SendRequest_RevertIfInvalidCallbackGasLimit() (gas: 55069) -FunctionsCoordinator_Constructor:test_Constructor_Success() (gas: 15107) +FunctionsCoordinator_Constructor:test_Constructor_Success() (gas: 15085) FunctionsCoordinator_GetDONPublicKey:test_GetDONPublicKey_RevertIfEmpty() (gas: 15378) -FunctionsCoordinator_GetDONPublicKey:test_GetDONPublicKey_Success() (gas: 91701) +FunctionsCoordinator_GetDONPublicKey:test_GetDONPublicKey_Success() (gas: 91691) FunctionsCoordinator_GetThresholdPublicKey:test_GetThresholdPublicKey_RevertIfEmpty() (gas: 15356) -FunctionsCoordinator_GetThresholdPublicKey:test_GetThresholdPublicKey_Success() (gas: 515779) +FunctionsCoordinator_GetThresholdPublicKey:test_GetThresholdPublicKey_Success() (gas: 515973) FunctionsCoordinator_SetDONPublicKey:test_SetDONPublicKey_RevertNotOwner() (gas: 20365) -FunctionsCoordinator_SetDONPublicKey:test_SetDONPublicKey_Success() (gas: 88980) +FunctionsCoordinator_SetDONPublicKey:test_SetDONPublicKey_Success() (gas: 88970) FunctionsCoordinator_SetThresholdPublicKey:test_SetThresholdPublicKey_RevertNotOwner() (gas: 13892) -FunctionsCoordinator_SetThresholdPublicKey:test_SetThresholdPublicKey_Success() (gas: 512971) +FunctionsCoordinator_SetThresholdPublicKey:test_SetThresholdPublicKey_Success() (gas: 513165) FunctionsCoordinator_StartRequest:test_StartRequest_RevertIfNotRouter() (gas: 22736) -FunctionsCoordinator_StartRequest:test_StartRequest_Success() (gas: 150175) +FunctionsCoordinator_StartRequest:test_StartRequest_Success() (gas: 150172) FunctionsCoordinator__IsTransmitter:test__IsTransmitter_SuccessFound() (gas: 15106) FunctionsCoordinator__IsTransmitter:test__IsTransmitter_SuccessNotFound() (gas: 22938) FunctionsRequest_DEFAULT_BUFFER_SIZE:test_DEFAULT_BUFFER_SIZE() (gas: 3089) FunctionsRequest_EncodeCBOR:test_EncodeCBOR_Success() (gas: 3066) FunctionsRequest_REQUEST_DATA_VERSION:test_REQUEST_DATA_VERSION() (gas: 3068) FunctionsRouter_Constructor:test_Constructor_Success() (gas: 15107) -FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedCostExceedsCommitment() (gas: 173017) -FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedInsufficientGas() (gas: 163489) +FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedCostExceedsCommitment() (gas: 172497) +FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedInsufficientGas() (gas: 163010) FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedInvalidCommitment() (gas: 38777) FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedInvalidRequestId() (gas: 35900) -FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedSubscriptionBalanceInvariant() (gas: 181496) +FunctionsRouter_Fulfill:test_Fulfill_RequestNotProcessedSubscriptionBalanceInvariant() (gas: 180976) FunctionsRouter_Fulfill:test_Fulfill_RevertIfNotCommittedCoordinator() (gas: 28086) -FunctionsRouter_Fulfill:test_Fulfill_RevertIfPaused() (gas: 157055) -FunctionsRouter_Fulfill:test_Fulfill_SuccessClientNoLongerExists() (gas: 335507) -FunctionsRouter_Fulfill:test_Fulfill_SuccessFulfilled() (gas: 349131) -FunctionsRouter_Fulfill:test_Fulfill_SuccessUserCallbackReverts() (gas: 2628028) -FunctionsRouter_Fulfill:test_Fulfill_SuccessUserCallbackRunsOutOfGas() (gas: 658973) +FunctionsRouter_Fulfill:test_Fulfill_RevertIfPaused() (gas: 156535) +FunctionsRouter_Fulfill:test_Fulfill_SuccessClientNoLongerExists() (gas: 335070) +FunctionsRouter_Fulfill:test_Fulfill_SuccessFulfilled() (gas: 348695) +FunctionsRouter_Fulfill:test_Fulfill_SuccessUserCallbackReverts() (gas: 2627478) +FunctionsRouter_Fulfill:test_Fulfill_SuccessUserCallbackRunsOutOfGas() (gas: 658423) FunctionsRouter_GetAdminFee:test_GetAdminFee_Success() (gas: 18323) FunctionsRouter_GetAllowListId:test_GetAllowListId_Success() (gas: 13241) FunctionsRouter_GetConfig:test_GetConfig_Success() (gas: 40170) @@ -83,15 +83,15 @@ FunctionsRouter_ProposeContractsUpdate:test_ProposeContractsUpdate_RevertIfNotNe FunctionsRouter_ProposeContractsUpdate:test_ProposeContractsUpdate_RevertIfNotOwner() (gas: 23392) FunctionsRouter_ProposeContractsUpdate:test_ProposeContractsUpdate_Success() (gas: 118479) FunctionsRouter_SendRequest:test_SendRequest_RevertIfConsumerNotAllowed() (gas: 59400) -FunctionsRouter_SendRequest:test_SendRequest_RevertIfDuplicateRequestId() (gas: 217990) +FunctionsRouter_SendRequest:test_SendRequest_RevertIfDuplicateRequestId() (gas: 217996) FunctionsRouter_SendRequest:test_SendRequest_RevertIfEmptyData() (gas: 29426) FunctionsRouter_SendRequest:test_SendRequest_RevertIfIncorrectDonId() (gas: 57904) -FunctionsRouter_SendRequest:test_SendRequest_RevertIfInsufficientSubscriptionBalance() (gas: 208562) +FunctionsRouter_SendRequest:test_SendRequest_RevertIfInsufficientSubscriptionBalance() (gas: 208451) FunctionsRouter_SendRequest:test_SendRequest_RevertIfInvalidCallbackGasLimit() (gas: 50953) FunctionsRouter_SendRequest:test_SendRequest_RevertIfInvalidDonId() (gas: 25082) FunctionsRouter_SendRequest:test_SendRequest_RevertIfNoSubscription() (gas: 29132) FunctionsRouter_SendRequest:test_SendRequest_RevertIfPaused() (gas: 34291) -FunctionsRouter_SendRequest:test_SendRequest_Success() (gas: 226521) +FunctionsRouter_SendRequest:test_SendRequest_Success() (gas: 226346) FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_RevertIfConsumerNotAllowed() (gas: 65896) FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_RevertIfEmptyData() (gas: 36012) FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_RevertIfIncorrectDonId() (gas: 29896) @@ -99,8 +99,8 @@ FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_RevertIfInvalid FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_RevertIfInvalidDonId() (gas: 27503) FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_RevertIfNoSubscription() (gas: 35717) FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_RevertIfPaused() (gas: 40810) -FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_Success() (gas: 232958) -FunctionsRouter_SendRequestToProposed:test_SendRequest_RevertIfInsufficientSubscriptionBalance() (gas: 215010) +FunctionsRouter_SendRequestToProposed:test_SendRequestToProposed_Success() (gas: 232783) +FunctionsRouter_SendRequestToProposed:test_SendRequest_RevertIfInsufficientSubscriptionBalance() (gas: 214899) FunctionsRouter_SetAllowListId:test_SetAllowListId_Success() (gas: 33531) FunctionsRouter_SetAllowListId:test_UpdateConfig_RevertIfNotOwner() (gas: 13403) FunctionsRouter_Unpause:test_Unpause_RevertIfNotOwner() (gas: 13293) @@ -113,7 +113,7 @@ FunctionsSubscriptions_AcceptSubscriptionOwnerTransfer:test_AcceptSubscriptionOw FunctionsSubscriptions_AcceptSubscriptionOwnerTransfer:test_AcceptSubscriptionOwnerTransfer_RevertIfPaused() (gas: 61040) FunctionsSubscriptions_AcceptSubscriptionOwnerTransfer:test_AcceptSubscriptionOwnerTransfer_RevertIfSenderBecomesBlocked() (gas: 139706) FunctionsSubscriptions_AcceptSubscriptionOwnerTransfer:test_AcceptSubscriptionOwnerTransfer_RevertIfSenderIsNotNewOwner() (gas: 62780) -FunctionsSubscriptions_AcceptSubscriptionOwnerTransfer:test_AcceptSubscriptionOwnerTransfer_Success() (gas: 240035) +FunctionsSubscriptions_AcceptSubscriptionOwnerTransfer:test_AcceptSubscriptionOwnerTransfer_Success() (gas: 239911) FunctionsSubscriptions_AddConsumer:test_AddConsumer_RevertIfMaximumConsumers() (gas: 138033) FunctionsSubscriptions_AddConsumer:test_AddConsumer_RevertIfMaximumConsumersAfterConfigUpdate() (gas: 164977) FunctionsSubscriptions_AddConsumer:test_AddConsumer_RevertIfNoSubscription() (gas: 12955) @@ -125,7 +125,7 @@ FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfNoSubs FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfNotAllowedSender() (gas: 102529) FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfNotSubscriptionOwner() (gas: 89318) FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfPaused() (gas: 20157) -FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfPendingRequests() (gas: 218446) +FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_RevertIfPendingRequests() (gas: 218330) FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_SuccessForfeitAllBalanceAsDeposit() (gas: 115656) FunctionsSubscriptions_CancelSubscription:test_CancelSubscription_SuccessForfeitSomeBalanceAsDeposit() (gas: 126964) FunctionsSubscriptions_CancelSubscription_ReceiveDeposit:test_CancelSubscription_SuccessRecieveDeposit() (gas: 75369) @@ -158,7 +158,7 @@ FunctionsSubscriptions_OwnerCancelSubscription:test_OwnerCancelSubscription_Reve FunctionsSubscriptions_OwnerCancelSubscription:test_OwnerCancelSubscription_Success() (gas: 55141) FunctionsSubscriptions_OwnerCancelSubscription:test_OwnerCancelSubscription_SuccessDeletesSubscription() (gas: 49607) FunctionsSubscriptions_OwnerCancelSubscription:test_OwnerCancelSubscription_SuccessSubOwnerRefunded() (gas: 53166) -FunctionsSubscriptions_OwnerCancelSubscription:test_OwnerCancelSubscription_SuccessWhenRequestInFlight() (gas: 186649) +FunctionsSubscriptions_OwnerCancelSubscription:test_OwnerCancelSubscription_SuccessWhenRequestInFlight() (gas: 186533) FunctionsSubscriptions_OwnerWithdraw:test_OwnerWithdraw_RevertIfAmountMoreThanBalance() (gas: 17945) FunctionsSubscriptions_OwnerWithdraw:test_OwnerWithdraw_RevertIfBalanceInvariant() (gas: 210) FunctionsSubscriptions_OwnerWithdraw:test_OwnerWithdraw_RevertIfNotOwner() (gas: 15555) @@ -167,7 +167,7 @@ FunctionsSubscriptions_OwnerWithdraw:test_OwnerWithdraw_SuccessIfRecipientAddres FunctionsSubscriptions_OwnerWithdraw:test_OwnerWithdraw_SuccessPaysRecipient() (gas: 33935) FunctionsSubscriptions_OwnerWithdraw:test_OwnerWithdraw_SuccessSetsBalanceToZero() (gas: 31584) FunctionsSubscriptions_PendingRequestExists:test_PendingRequestExists_SuccessFalseIfNoPendingRequests() (gas: 17818) -FunctionsSubscriptions_PendingRequestExists:test_PendingRequestExists_SuccessTrueIfPendingRequests() (gas: 203449) +FunctionsSubscriptions_PendingRequestExists:test_PendingRequestExists_SuccessTrueIfPendingRequests() (gas: 203333) FunctionsSubscriptions_ProposeSubscriptionOwnerTransfer:test_ProposeSubscriptionOwnerTransfer_RevertIfEmptyNewOwner() (gas: 27664) FunctionsSubscriptions_ProposeSubscriptionOwnerTransfer:test_ProposeSubscriptionOwnerTransfer_RevertIfInvalidNewOwner() (gas: 57815) FunctionsSubscriptions_ProposeSubscriptionOwnerTransfer:test_ProposeSubscriptionOwnerTransfer_RevertIfNoSubscription() (gas: 15013) @@ -183,7 +183,7 @@ FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_RevertIfNoSubscription FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_RevertIfNotAllowedSender() (gas: 102444) FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_RevertIfNotSubscriptionOwner() (gas: 87254) FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_RevertIfPaused() (gas: 18058) -FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_RevertIfPendingRequests() (gas: 215971) +FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_RevertIfPendingRequests() (gas: 215863) FunctionsSubscriptions_RemoveConsumer:test_RemoveConsumer_Success() (gas: 42088) FunctionsSubscriptions_SetFlags:test_SetFlags_RevertIfNoSubscription() (gas: 12888) FunctionsSubscriptions_SetFlags:test_SetFlags_RevertIfNotOwner() (gas: 15684) @@ -208,12 +208,12 @@ FunctionsTermsOfServiceAllowList_BlockSender:test_BlockSender_Success() (gas: 97 FunctionsTermsOfServiceAllowList_Constructor:test_Constructor_Success() (gas: 15345) FunctionsTermsOfServiceAllowList_GetAllAllowedSenders:test_GetAllAllowedSenders_Success() (gas: 19243) FunctionsTermsOfServiceAllowList_GetAllowedSendersCount:test_GetAllowedSendersCount_Success() (gas: 13332) -FunctionsTermsOfServiceAllowList_GetAllowedSendersInRange:test_GetAllowedSendersInRange_RevertIfAllowedSendersIsEmpty() (gas: 13161056) +FunctionsTermsOfServiceAllowList_GetAllowedSendersInRange:test_GetAllowedSendersInRange_RevertIfAllowedSendersIsEmpty() (gas: 13153024) FunctionsTermsOfServiceAllowList_GetAllowedSendersInRange:test_GetAllowedSendersInRange_RevertIfEndIsAfterLastAllowedSender() (gas: 16554) FunctionsTermsOfServiceAllowList_GetAllowedSendersInRange:test_GetAllowedSendersInRange_RevertIfStartIsAfterEnd() (gas: 13284) FunctionsTermsOfServiceAllowList_GetAllowedSendersInRange:test_GetAllowedSendersInRange_Success() (gas: 20312) FunctionsTermsOfServiceAllowList_GetBlockedSendersCount:test_GetBlockedSendersCount_Success() (gas: 13268) -FunctionsTermsOfServiceAllowList_GetBlockedSendersInRange:test_GetBlockedSendersInRange_RevertIfAllowedSendersIsEmpty() (gas: 13161066) +FunctionsTermsOfServiceAllowList_GetBlockedSendersInRange:test_GetBlockedSendersInRange_RevertIfAllowedSendersIsEmpty() (gas: 13153034) FunctionsTermsOfServiceAllowList_GetBlockedSendersInRange:test_GetBlockedSendersInRange_RevertIfEndIsAfterLastAllowedSender() (gas: 16549) FunctionsTermsOfServiceAllowList_GetBlockedSendersInRange:test_GetBlockedSendersInRange_RevertIfStartIsAfterEnd() (gas: 13367) FunctionsTermsOfServiceAllowList_GetBlockedSendersInRange:test_GetBlockedSendersInRange_Success() (gas: 18537) @@ -232,8 +232,8 @@ Gas_AddConsumer:test_AddConsumer_Gas() (gas: 79140) Gas_CreateSubscription:test_CreateSubscription_Gas() (gas: 73419) Gas_FulfillRequest_DuplicateRequestID:test_FulfillRequest_DuplicateRequestID_MaximumGas() (gas: 20717) Gas_FulfillRequest_DuplicateRequestID:test_FulfillRequest_DuplicateRequestID_MinimumGas() (gas: 20157) -Gas_FulfillRequest_Success:test_FulfillRequest_Success_MaximumGas() (gas: 501825) -Gas_FulfillRequest_Success:test_FulfillRequest_Success_MinimumGas() (gas: 203029) +Gas_FulfillRequest_Success:test_FulfillRequest_Success_MaximumGas() (gas: 501339) +Gas_FulfillRequest_Success:test_FulfillRequest_Success_MinimumGas() (gas: 202509) Gas_FundSubscription:test_FundSubscription_Gas() (gas: 38524) -Gas_SendRequest:test_SendRequest_MaximumGas() (gas: 1003809) -Gas_SendRequest:test_SendRequest_MinimumGas() (gas: 181701) \ No newline at end of file +Gas_SendRequest:test_SendRequest_MaximumGas() (gas: 988895) +Gas_SendRequest:test_SendRequest_MinimumGas() (gas: 181579) \ No newline at end of file diff --git a/contracts/gas-snapshots/shared.gas-snapshot b/contracts/gas-snapshots/shared.gas-snapshot index ed0620b1276..0419c42a6aa 100644 --- a/contracts/gas-snapshots/shared.gas-snapshot +++ b/contracts/gas-snapshots/shared.gas-snapshot @@ -1,3 +1,12 @@ +AuthorizedCallers_applyAuthorizedCallerUpdates:test_AddAndRemove_Success() (gas: 125205) +AuthorizedCallers_applyAuthorizedCallerUpdates:test_OnlyAdd_Success() (gas: 133100) +AuthorizedCallers_applyAuthorizedCallerUpdates:test_OnlyCallableByOwner_Revert() (gas: 12350) +AuthorizedCallers_applyAuthorizedCallerUpdates:test_OnlyRemove_Success() (gas: 45064) +AuthorizedCallers_applyAuthorizedCallerUpdates:test_RemoveThenAdd_Success() (gas: 57241) +AuthorizedCallers_applyAuthorizedCallerUpdates:test_SkipRemove_Success() (gas: 32121) +AuthorizedCallers_applyAuthorizedCallerUpdates:test_ZeroAddressNotAllowed_Revert() (gas: 64473) +AuthorizedCallers_constructor:test_ZeroAddressNotAllowed_Revert() (gas: 64473) +AuthorizedCallers_constructor:test_constructor_Success() (gas: 720513) BurnMintERC677_approve:testApproveSuccess() (gas: 55512) BurnMintERC677_approve:testInvalidAddressReverts() (gas: 10663) BurnMintERC677_burn:testBasicBurnSuccess() (gas: 173939) @@ -61,4 +70,17 @@ OpStackBurnMintERC677_constructor:testConstructorSuccess() (gas: 1743649) OpStackBurnMintERC677_interfaceCompatibility:testBurnCompatibility() (gas: 298649) OpStackBurnMintERC677_interfaceCompatibility:testMintCompatibility() (gas: 137957) OpStackBurnMintERC677_interfaceCompatibility:testStaticFunctionsCompatibility() (gas: 13781) -OpStackBurnMintERC677_supportsInterface:testConstructorSuccess() (gas: 12752) \ No newline at end of file +OpStackBurnMintERC677_supportsInterface:testConstructorSuccess() (gas: 12752) +SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_EmptySubset_Reverts() (gas: 5460) +SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_EmptySuperset_Reverts() (gas: 4661) +SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_HasDuplicates_Reverts() (gas: 8265) +SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_NotASubset_Reverts() (gas: 12487) +SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_SingleElementSubset() (gas: 4489) +SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_SingleElementSubsetAndSuperset_Equal() (gas: 1464) +SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_SingleElementSubsetAndSuperset_NotEqual_Reverts() (gas: 6172) +SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_SubsetEqualsSuperset_NoRevert() (gas: 8867) +SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_SubsetLargerThanSuperset_Reverts() (gas: 16544) +SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_SupersetHasDuplicates_Reverts() (gas: 9420) +SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_UnsortedSubset_Reverts() (gas: 7380) +SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_UnsortedSuperset_Reverts() (gas: 9600) +SortedSetValidationUtil_CheckIsValidUniqueSubsetTest:test__checkIsValidUniqueSubset_ValidSubset_Success() (gas: 6490) \ No newline at end of file diff --git a/contracts/hardhat.config.ts b/contracts/hardhat.config.ts index 61f5455f4e9..1b2ac1bdf19 100644 --- a/contracts/hardhat.config.ts +++ b/contracts/hardhat.config.ts @@ -103,6 +103,30 @@ let config = { }, }, }, + 'src/v0.8/vrf/dev/VRFCoordinatorV2_5_Arbitrum.sol': { + version: '0.8.19', + settings: { + optimizer: { + enabled: true, + runs: 500, // see native_solc_compile_all_vrf + }, + metadata: { + bytecodeHash: 'none', + }, + }, + }, + 'src/v0.8/vrf/dev/VRFCoordinatorV2_5_Optimism.sol': { + version: '0.8.19', + settings: { + optimizer: { + enabled: true, + runs: 500, // see native_solc_compile_all_vrf + }, + metadata: { + bytecodeHash: 'none', + }, + }, + }, 'src/v0.8/automation/AutomationForwarderLogic.sol': { version: '0.8.19', settings: COMPILER_SETTINGS, diff --git a/contracts/package.json b/contracts/package.json index 775ee529a4d..247bb92303e 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -31,6 +31,10 @@ "@ethersproject/logger": "5.0.6" } }, + "engines": { + "node": ">=18", + "pnpm": ">=9" + }, "devDependencies": { "@ethereum-waffle/mock-contract": "^3.4.4", "@ethersproject/abi": "~5.7.0", diff --git a/contracts/pnpm-lock.yaml b/contracts/pnpm-lock.yaml index ee36e0a0c55..4ad8deda991 100644 --- a/contracts/pnpm-lock.yaml +++ b/contracts/pnpm-lock.yaml @@ -1,4 +1,4 @@ -lockfileVersion: '6.0' +lockfileVersion: '9.0' settings: autoInstallPeers: true @@ -7,184 +7,3173 @@ settings: overrides: '@ethersproject/logger': 5.0.6 -dependencies: - '@changesets/changelog-github': - specifier: ^0.5.0 - version: 0.5.0 - '@changesets/cli': - specifier: ~2.27.3 - version: 2.27.3 - '@eth-optimism/contracts': - specifier: 0.6.0 - version: 0.6.0(ethers@5.7.2) - '@openzeppelin/contracts': - specifier: 4.9.3 - version: 4.9.3 - '@openzeppelin/contracts-upgradeable': - specifier: 4.9.3 - version: 4.9.3 - '@scroll-tech/contracts': - specifier: 0.1.0 - version: 0.1.0 - semver: - specifier: ^7.6.2 - version: 7.6.2 - -devDependencies: - '@ethereum-waffle/mock-contract': - specifier: ^3.4.4 - version: 3.4.4 - '@ethersproject/abi': - specifier: ~5.7.0 - version: 5.7.0 - '@ethersproject/bignumber': - specifier: ~5.7.0 - version: 5.7.0 - '@ethersproject/contracts': - specifier: ~5.7.0 - version: 5.7.0 - '@ethersproject/providers': - specifier: ~5.7.2 - version: 5.7.2 - '@nomicfoundation/hardhat-chai-matchers': - specifier: ^1.0.6 - version: 1.0.6(@nomiclabs/hardhat-ethers@2.2.3)(chai@4.4.1)(ethers@5.7.2)(hardhat@2.20.1) - '@nomicfoundation/hardhat-ethers': - specifier: ^3.0.6 - version: 3.0.6(ethers@5.7.2)(hardhat@2.20.1) - '@nomicfoundation/hardhat-network-helpers': - specifier: ^1.0.9 - version: 1.0.10(hardhat@2.20.1) - '@nomicfoundation/hardhat-verify': - specifier: ^2.0.7 - version: 2.0.7(hardhat@2.20.1) - '@typechain/ethers-v5': - specifier: ^7.2.0 - version: 7.2.0(@ethersproject/abi@5.7.0)(@ethersproject/bytes@5.7.0)(@ethersproject/providers@5.7.2)(ethers@5.7.2)(typechain@8.3.2)(typescript@5.4.5) - '@typechain/hardhat': - specifier: ^7.0.0 - version: 7.0.0(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2)(@typechain/ethers-v5@7.2.0)(ethers@5.7.2)(hardhat@2.20.1)(typechain@8.3.2) - '@types/cbor': - specifier: ~5.0.1 - version: 5.0.1 - '@types/chai': - specifier: ^4.3.16 - version: 4.3.16 - '@types/debug': - specifier: ^4.1.12 - version: 4.1.12 - '@types/deep-equal-in-any-order': - specifier: ^1.0.3 - version: 1.0.3 - '@types/mocha': - specifier: ^10.0.6 - version: 10.0.6 - '@types/node': - specifier: ^20.12.12 - version: 20.12.12 - '@typescript-eslint/eslint-plugin': - specifier: ^7.10.0 - version: 7.10.0(@typescript-eslint/parser@7.10.0)(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/parser': - specifier: ^7.10.0 - version: 7.10.0(eslint@8.57.0)(typescript@5.4.5) - abi-to-sol: - specifier: ^0.6.6 - version: 0.6.6 - cbor: - specifier: ^5.2.0 - version: 5.2.0 - chai: - specifier: ^4.3.10 - version: 4.4.1 - debug: - specifier: ^4.3.4 - version: 4.3.4(supports-color@8.1.1) - deep-equal-in-any-order: - specifier: ^2.0.6 - version: 2.0.6 - eslint: - specifier: ^8.57.0 - version: 8.57.0 - eslint-config-prettier: - specifier: ^9.1.0 - version: 9.1.0(eslint@8.57.0) - eslint-plugin-prettier: - specifier: ^5.1.3 - version: 5.1.3(eslint-config-prettier@9.1.0)(eslint@8.57.0)(prettier@3.2.5) - ethers: - specifier: ~5.7.2 - version: 5.7.2 - hardhat: - specifier: ~2.20.1 - version: 2.20.1(ts-node@10.9.2)(typescript@5.4.5) - hardhat-abi-exporter: - specifier: ^2.10.1 - version: 2.10.1(hardhat@2.20.1) - hardhat-ignore-warnings: - specifier: ^0.2.6 - version: 0.2.11 - moment: - specifier: ^2.30.1 - version: 2.30.1 - prettier: - specifier: ^3.2.5 - version: 3.2.5 - prettier-plugin-solidity: - specifier: ^1.3.1 - version: 1.3.1(prettier@3.2.5) - solhint: - specifier: ^5.0.1 - version: 5.0.1 - solhint-plugin-chainlink-solidity: - specifier: git+https://github.com/smartcontractkit/chainlink-solhint-rules.git#v1.2.1 - version: github.com/smartcontractkit/chainlink-solhint-rules/1b4c0c2663fcd983589d4f33a2e73908624ed43c - solhint-plugin-prettier: - specifier: ^0.1.0 - version: 0.1.0(prettier-plugin-solidity@1.3.1)(prettier@3.2.5) - ts-node: - specifier: ^10.9.2 - version: 10.9.2(@types/node@20.12.12)(typescript@5.4.5) - typechain: - specifier: ^8.2.1 - version: 8.3.2(typescript@5.4.5) - typescript: - specifier: ^5.4.5 - version: 5.4.5 +importers: + + .: + dependencies: + '@changesets/changelog-github': + specifier: ^0.5.0 + version: 0.5.0 + '@changesets/cli': + specifier: ~2.27.3 + version: 2.27.3 + '@eth-optimism/contracts': + specifier: 0.6.0 + version: 0.6.0(ethers@5.7.2) + '@openzeppelin/contracts': + specifier: 4.9.3 + version: 4.9.3 + '@openzeppelin/contracts-upgradeable': + specifier: 4.9.3 + version: 4.9.3 + '@scroll-tech/contracts': + specifier: 0.1.0 + version: 0.1.0 + semver: + specifier: ^7.6.2 + version: 7.6.2 + devDependencies: + '@ethereum-waffle/mock-contract': + specifier: ^3.4.4 + version: 3.4.4 + '@ethersproject/abi': + specifier: ~5.7.0 + version: 5.7.0 + '@ethersproject/bignumber': + specifier: ~5.7.0 + version: 5.7.0 + '@ethersproject/contracts': + specifier: ~5.7.0 + version: 5.7.0 + '@ethersproject/providers': + specifier: ~5.7.2 + version: 5.7.2 + '@nomicfoundation/hardhat-chai-matchers': + specifier: ^1.0.6 + version: 1.0.6(@nomiclabs/hardhat-ethers@2.2.3)(chai@4.4.1)(ethers@5.7.2)(hardhat@2.20.1) + '@nomicfoundation/hardhat-ethers': + specifier: ^3.0.6 + version: 3.0.6(ethers@5.7.2)(hardhat@2.20.1) + '@nomicfoundation/hardhat-network-helpers': + specifier: ^1.0.9 + version: 1.0.10(hardhat@2.20.1) + '@nomicfoundation/hardhat-verify': + specifier: ^2.0.7 + version: 2.0.7(hardhat@2.20.1) + '@typechain/ethers-v5': + specifier: ^7.2.0 + version: 7.2.0(@ethersproject/abi@5.7.0)(@ethersproject/bytes@5.7.0)(@ethersproject/providers@5.7.2)(ethers@5.7.2)(typechain@8.3.2)(typescript@5.4.5) + '@typechain/hardhat': + specifier: ^7.0.0 + version: 7.0.0(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2)(@typechain/ethers-v5@7.2.0)(ethers@5.7.2)(hardhat@2.20.1)(typechain@8.3.2) + '@types/cbor': + specifier: ~5.0.1 + version: 5.0.1 + '@types/chai': + specifier: ^4.3.16 + version: 4.3.16 + '@types/debug': + specifier: ^4.1.12 + version: 4.1.12 + '@types/deep-equal-in-any-order': + specifier: ^1.0.3 + version: 1.0.3 + '@types/mocha': + specifier: ^10.0.6 + version: 10.0.6 + '@types/node': + specifier: ^20.12.12 + version: 20.12.12 + '@typescript-eslint/eslint-plugin': + specifier: ^7.10.0 + version: 7.10.0(@typescript-eslint/parser@7.10.0)(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/parser': + specifier: ^7.10.0 + version: 7.10.0(eslint@8.57.0)(typescript@5.4.5) + abi-to-sol: + specifier: ^0.6.6 + version: 0.6.6 + cbor: + specifier: ^5.2.0 + version: 5.2.0 + chai: + specifier: ^4.3.10 + version: 4.4.1 + debug: + specifier: ^4.3.4 + version: 4.3.4(supports-color@8.1.1) + deep-equal-in-any-order: + specifier: ^2.0.6 + version: 2.0.6 + eslint: + specifier: ^8.57.0 + version: 8.57.0 + eslint-config-prettier: + specifier: ^9.1.0 + version: 9.1.0(eslint@8.57.0) + eslint-plugin-prettier: + specifier: ^5.1.3 + version: 5.1.3(eslint-config-prettier@9.1.0)(eslint@8.57.0)(prettier@3.2.5) + ethers: + specifier: ~5.7.2 + version: 5.7.2 + hardhat: + specifier: ~2.20.1 + version: 2.20.1(ts-node@10.9.2)(typescript@5.4.5) + hardhat-abi-exporter: + specifier: ^2.10.1 + version: 2.10.1(hardhat@2.20.1) + hardhat-ignore-warnings: + specifier: ^0.2.6 + version: 0.2.11 + moment: + specifier: ^2.30.1 + version: 2.30.1 + prettier: + specifier: ^3.2.5 + version: 3.2.5 + prettier-plugin-solidity: + specifier: ^1.3.1 + version: 1.3.1(prettier@3.2.5) + solhint: + specifier: ^5.0.1 + version: 5.0.1 + solhint-plugin-chainlink-solidity: + specifier: git+https://github.com/smartcontractkit/chainlink-solhint-rules.git#v1.2.1 + version: '@chainlink/solhint-plugin-chainlink-solidity@https://codeload.github.com/smartcontractkit/chainlink-solhint-rules/tar.gz/1b4c0c2663fcd983589d4f33a2e73908624ed43c' + solhint-plugin-prettier: + specifier: ^0.1.0 + version: 0.1.0(prettier-plugin-solidity@1.3.1)(prettier@3.2.5) + ts-node: + specifier: ^10.9.2 + version: 10.9.2(@types/node@20.12.12)(typescript@5.4.5) + typechain: + specifier: ^8.2.1 + version: 8.3.2(typescript@5.4.5) + typescript: + specifier: ^5.4.5 + version: 5.4.5 + +packages: + + '@aashutoshrathi/word-wrap@1.2.6': + resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} + engines: {node: '>=0.10.0'} + + '@babel/code-frame@7.18.6': + resolution: {integrity: sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-identifier@7.19.1': + resolution: {integrity: sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==} + engines: {node: '>=6.9.0'} + + '@babel/highlight@7.18.6': + resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==} + engines: {node: '>=6.9.0'} + + '@babel/runtime@7.24.0': + resolution: {integrity: sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw==} + engines: {node: '>=6.9.0'} + + '@chainlink/solhint-plugin-chainlink-solidity@https://codeload.github.com/smartcontractkit/chainlink-solhint-rules/tar.gz/1b4c0c2663fcd983589d4f33a2e73908624ed43c': + resolution: {tarball: https://codeload.github.com/smartcontractkit/chainlink-solhint-rules/tar.gz/1b4c0c2663fcd983589d4f33a2e73908624ed43c} + name: '@chainlink/solhint-plugin-chainlink-solidity' + version: 1.2.0 + + '@changesets/apply-release-plan@7.0.1': + resolution: {integrity: sha512-aPdSq/R++HOyfEeBGjEe6LNG8gs0KMSyRETD/J2092OkNq8mOioAxyKjMbvVUdzgr/HTawzMOz7lfw339KnsCA==} + + '@changesets/assemble-release-plan@6.0.0': + resolution: {integrity: sha512-4QG7NuisAjisbW4hkLCmGW2lRYdPrKzro+fCtZaILX+3zdUELSvYjpL4GTv0E4aM9Mef3PuIQp89VmHJ4y2bfw==} + + '@changesets/changelog-git@0.2.0': + resolution: {integrity: sha512-bHOx97iFI4OClIT35Lok3sJAwM31VbUM++gnMBV16fdbtBhgYu4dxsphBF/0AZZsyAHMrnM0yFcj5gZM1py6uQ==} + + '@changesets/changelog-github@0.5.0': + resolution: {integrity: sha512-zoeq2LJJVcPJcIotHRJEEA2qCqX0AQIeFE+L21L8sRLPVqDhSXY8ZWAt2sohtBpFZkBwu+LUwMSKRr2lMy3LJA==} + + '@changesets/cli@2.27.3': + resolution: {integrity: sha512-ve/VpWApILlSs8cr0okNx5C2LKRawI9XZgvfmf58S8sar2nhx5DPJREFXYZBahs0FeTfvH0rdVl+nGe8QF45Ig==} + hasBin: true + + '@changesets/config@3.0.0': + resolution: {integrity: sha512-o/rwLNnAo/+j9Yvw9mkBQOZySDYyOr/q+wptRLcAVGlU6djOeP9v1nlalbL9MFsobuBVQbZCTp+dIzdq+CLQUA==} + + '@changesets/errors@0.2.0': + resolution: {integrity: sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==} + + '@changesets/get-dependents-graph@2.0.0': + resolution: {integrity: sha512-cafUXponivK4vBgZ3yLu944mTvam06XEn2IZGjjKc0antpenkYANXiiE6GExV/yKdsCnE8dXVZ25yGqLYZmScA==} + + '@changesets/get-github-info@0.6.0': + resolution: {integrity: sha512-v/TSnFVXI8vzX9/w3DU2Ol+UlTZcu3m0kXTjTT4KlAdwSvwutcByYwyYn9hwerPWfPkT2JfpoX0KgvCEi8Q/SA==} + + '@changesets/get-release-plan@4.0.0': + resolution: {integrity: sha512-9L9xCUeD/Tb6L/oKmpm8nyzsOzhdNBBbt/ZNcjynbHC07WW4E1eX8NMGC5g5SbM5z/V+MOrYsJ4lRW41GCbg3w==} + + '@changesets/get-version-range-type@0.4.0': + resolution: {integrity: sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ==} + + '@changesets/git@3.0.0': + resolution: {integrity: sha512-vvhnZDHe2eiBNRFHEgMiGd2CT+164dfYyrJDhwwxTVD/OW0FUD6G7+4DIx1dNwkwjHyzisxGAU96q0sVNBns0w==} + + '@changesets/logger@0.1.0': + resolution: {integrity: sha512-pBrJm4CQm9VqFVwWnSqKEfsS2ESnwqwH+xR7jETxIErZcfd1u2zBSqrHbRHR7xjhSgep9x2PSKFKY//FAshA3g==} + + '@changesets/parse@0.4.0': + resolution: {integrity: sha512-TS/9KG2CdGXS27S+QxbZXgr8uPsP4yNJYb4BC2/NeFUj80Rni3TeD2qwWmabymxmrLo7JEsytXH1FbpKTbvivw==} + + '@changesets/pre@2.0.0': + resolution: {integrity: sha512-HLTNYX/A4jZxc+Sq8D1AMBsv+1qD6rmmJtjsCJa/9MSRybdxh0mjbTvE6JYZQ/ZiQ0mMlDOlGPXTm9KLTU3jyw==} + + '@changesets/read@0.6.0': + resolution: {integrity: sha512-ZypqX8+/im1Fm98K4YcZtmLKgjs1kDQ5zHpc2U1qdtNBmZZfo/IBiG162RoP0CUF05tvp2y4IspH11PLnPxuuw==} + + '@changesets/types@4.1.0': + resolution: {integrity: sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==} + + '@changesets/types@6.0.0': + resolution: {integrity: sha512-b1UkfNulgKoWfqyHtzKS5fOZYSJO+77adgL7DLRDr+/7jhChN+QcHnbjiQVOz/U+Ts3PGNySq7diAItzDgugfQ==} + + '@changesets/write@0.3.1': + resolution: {integrity: sha512-SyGtMXzH3qFqlHKcvFY2eX+6b0NGiFcNav8AFsYwy5l8hejOeoeTDemu5Yjmke2V5jpzY+pBvM0vCCQ3gdZpfw==} + + '@cspotcode/source-map-support@0.8.1': + resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} + engines: {node: '>=12'} + + '@eslint-community/eslint-utils@4.4.0': + resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + + '@eslint-community/regexpp@4.10.0': + resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + + '@eslint/eslintrc@2.1.4': + resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + '@eslint/js@8.57.0': + resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + '@eth-optimism/contracts@0.6.0': + resolution: {integrity: sha512-vQ04wfG9kMf1Fwy3FEMqH2QZbgS0gldKhcBeBUPfO8zu68L61VI97UDXmsMQXzTsEAxK8HnokW3/gosl4/NW3w==} + peerDependencies: + ethers: ^5 + + '@eth-optimism/core-utils@0.12.0': + resolution: {integrity: sha512-qW+7LZYCz7i8dRa7SRlUKIo1VBU8lvN0HeXCxJR+z+xtMzMQpPds20XJNCMclszxYQHkXY00fOT6GvFw9ZL6nw==} + + '@ethereum-waffle/mock-contract@3.4.4': + resolution: {integrity: sha512-Mp0iB2YNWYGUV+VMl5tjPsaXKbKo8MDH9wSJ702l9EBjdxFf/vBvnMBAC1Fub1lLtmD0JHtp1pq+mWzg/xlLnA==} + engines: {node: '>=10.0'} + + '@ethersproject/abi@5.7.0': + resolution: {integrity: sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==} + + '@ethersproject/abstract-provider@5.7.0': + resolution: {integrity: sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw==} + + '@ethersproject/abstract-signer@5.7.0': + resolution: {integrity: sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ==} + + '@ethersproject/address@5.7.0': + resolution: {integrity: sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA==} + + '@ethersproject/base64@5.7.0': + resolution: {integrity: sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ==} + + '@ethersproject/basex@5.7.0': + resolution: {integrity: sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw==} + + '@ethersproject/bignumber@5.7.0': + resolution: {integrity: sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw==} + + '@ethersproject/bytes@5.7.0': + resolution: {integrity: sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==} + + '@ethersproject/constants@5.7.0': + resolution: {integrity: sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA==} + + '@ethersproject/contracts@5.7.0': + resolution: {integrity: sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg==} + + '@ethersproject/hash@5.7.0': + resolution: {integrity: sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==} + + '@ethersproject/hdnode@5.7.0': + resolution: {integrity: sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg==} + + '@ethersproject/json-wallets@5.7.0': + resolution: {integrity: sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g==} + + '@ethersproject/keccak256@5.7.0': + resolution: {integrity: sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg==} + + '@ethersproject/logger@5.0.6': + resolution: {integrity: sha512-FrX0Vnb3JZ1md/7GIZfmJ06XOAA8r3q9Uqt9O5orr4ZiksnbpXKlyDzQtlZ5Yv18RS8CAUbiKH9vwidJg1BPmQ==} + + '@ethersproject/networks@5.7.1': + resolution: {integrity: sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ==} + + '@ethersproject/pbkdf2@5.7.0': + resolution: {integrity: sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw==} + + '@ethersproject/properties@5.7.0': + resolution: {integrity: sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw==} + + '@ethersproject/providers@5.7.2': + resolution: {integrity: sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg==} + + '@ethersproject/random@5.7.0': + resolution: {integrity: sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ==} + + '@ethersproject/rlp@5.7.0': + resolution: {integrity: sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w==} + + '@ethersproject/sha2@5.7.0': + resolution: {integrity: sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw==} + + '@ethersproject/signing-key@5.7.0': + resolution: {integrity: sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q==} + + '@ethersproject/solidity@5.7.0': + resolution: {integrity: sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA==} + + '@ethersproject/strings@5.7.0': + resolution: {integrity: sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg==} + + '@ethersproject/transactions@5.7.0': + resolution: {integrity: sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ==} + + '@ethersproject/units@5.7.0': + resolution: {integrity: sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg==} + + '@ethersproject/wallet@5.7.0': + resolution: {integrity: sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA==} + + '@ethersproject/web@5.7.1': + resolution: {integrity: sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w==} + + '@ethersproject/wordlists@5.7.0': + resolution: {integrity: sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA==} + + '@fastify/busboy@2.1.1': + resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==} + engines: {node: '>=14'} + + '@humanwhocodes/config-array@0.11.14': + resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} + engines: {node: '>=10.10.0'} + + '@humanwhocodes/module-importer@1.0.1': + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} + + '@humanwhocodes/object-schema@2.0.3': + resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + + '@jridgewell/resolve-uri@3.1.1': + resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==} + engines: {node: '>=6.0.0'} + + '@jridgewell/sourcemap-codec@1.4.15': + resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + + '@jridgewell/trace-mapping@0.3.9': + resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + + '@manypkg/find-root@1.1.0': + resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} + + '@manypkg/get-packages@1.1.3': + resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==} + + '@metamask/eth-sig-util@4.0.1': + resolution: {integrity: sha512-tghyZKLHZjcdlDqCA3gNZmLeR0XvOE9U1qoQO9ohyAZT6Pya+H9vkBPcsyXytmYLNgVoin7CKCmweo/R43V+tQ==} + engines: {node: '>=12.0.0'} + + '@noble/hashes@1.1.2': + resolution: {integrity: sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA==} + + '@noble/secp256k1@1.6.3': + resolution: {integrity: sha512-T04e4iTurVy7I8Sw4+c5OSN9/RkPlo1uKxAomtxQNLq8j1uPAqnsqG1bqvY3Jv7c13gyr6dui0zmh/I3+f/JaQ==} + + '@nodelib/fs.scandir@2.1.5': + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} + + '@nodelib/fs.stat@2.0.5': + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} + + '@nodelib/fs.walk@1.2.8': + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} + + '@nomicfoundation/ethereumjs-block@5.0.4': + resolution: {integrity: sha512-AcyacJ9eX/uPEvqsPiB+WO1ymE+kyH48qGGiGV+YTojdtas8itUTW5dehDSOXEEItWGbbzEJ4PRqnQZlWaPvDw==} + engines: {node: '>=18'} + + '@nomicfoundation/ethereumjs-blockchain@7.0.4': + resolution: {integrity: sha512-jYsd/kwzbmpnxx86tXsYV8wZ5xGvFL+7/P0c6OlzpClHsbFzeF41KrYA9scON8Rg6bZu3ZTv6JOAgj3t7USUfg==} + engines: {node: '>=18'} + + '@nomicfoundation/ethereumjs-common@4.0.4': + resolution: {integrity: sha512-9Rgb658lcWsjiicr5GzNCjI1llow/7r0k50dLL95OJ+6iZJcVbi15r3Y0xh2cIO+zgX0WIHcbzIu6FeQf9KPrg==} + + '@nomicfoundation/ethereumjs-ethash@3.0.4': + resolution: {integrity: sha512-xvIrwIMl9sSaiYKRem68+O7vYdj7Q2XWv5P7JXiIkn83918QzWHvqbswTRsH7+r6X1UEvdsURRnZbvZszEjAaQ==} + engines: {node: '>=18'} + + '@nomicfoundation/ethereumjs-evm@2.0.4': + resolution: {integrity: sha512-lTyZZi1KpeMHzaO6cSVisR2tjiTTedjo7PcmhI/+GNFo9BmyY6QYzGeSti0sFttmjbEMioHgXxl5yrLNRg6+1w==} + engines: {node: '>=18'} + + '@nomicfoundation/ethereumjs-rlp@5.0.4': + resolution: {integrity: sha512-8H1S3s8F6QueOc/X92SdrA4RDenpiAEqMg5vJH99kcQaCy/a3Q6fgseo75mgWlbanGJXSlAPtnCeG9jvfTYXlw==} + engines: {node: '>=18'} + hasBin: true + + '@nomicfoundation/ethereumjs-statemanager@2.0.4': + resolution: {integrity: sha512-HPDjeFrxw6llEi+BzqXkZ+KkvFnTOPczuHBtk21hRlDiuKuZz32dPzlhpRsDBGV1b5JTmRDUVqCS1lp3Gghw4Q==} + peerDependencies: + '@nomicfoundation/ethereumjs-verkle': 0.0.2 + peerDependenciesMeta: + '@nomicfoundation/ethereumjs-verkle': + optional: true + + '@nomicfoundation/ethereumjs-trie@6.0.4': + resolution: {integrity: sha512-3nSwQiFMvr2VFe/aZUyinuohYvtytUqZCUCvIWcPJ/BwJH6oQdZRB42aNFBJ/8nAh2s3OcroWpBLskzW01mFKA==} + engines: {node: '>=18'} + + '@nomicfoundation/ethereumjs-tx@5.0.4': + resolution: {integrity: sha512-Xjv8wAKJGMrP1f0n2PeyfFCCojHd7iS3s/Ab7qzF1S64kxZ8Z22LCMynArYsVqiFx6rzYy548HNVEyI+AYN/kw==} + engines: {node: '>=18'} + peerDependencies: + c-kzg: ^2.1.2 + peerDependenciesMeta: + c-kzg: + optional: true + + '@nomicfoundation/ethereumjs-util@9.0.4': + resolution: {integrity: sha512-sLOzjnSrlx9Bb9EFNtHzK/FJFsfg2re6bsGqinFinH1gCqVfz9YYlXiMWwDM4C/L4ywuHFCYwfKTVr/QHQcU0Q==} + engines: {node: '>=18'} + peerDependencies: + c-kzg: ^2.1.2 + peerDependenciesMeta: + c-kzg: + optional: true + + '@nomicfoundation/ethereumjs-verkle@0.0.2': + resolution: {integrity: sha512-bjnfZElpYGK/XuuVRmLS3yDvr+cDs85D9oonZ0YUa5A3lgFgokWMp76zXrxX2jVQ0BfHaw12y860n1+iOi6yFQ==} + engines: {node: '>=18'} + + '@nomicfoundation/ethereumjs-vm@7.0.4': + resolution: {integrity: sha512-gsA4IhmtWHI4BofKy3kio9W+dqZQs5Ji5mLjLYxHCkat+JQBUt5szjRKra2F9nGDJ2XcI/wWb0YWUFNgln4zRQ==} + engines: {node: '>=18'} + + '@nomicfoundation/hardhat-chai-matchers@1.0.6': + resolution: {integrity: sha512-f5ZMNmabZeZegEfuxn/0kW+mm7+yV7VNDxLpMOMGXWFJ2l/Ct3QShujzDRF9cOkK9Ui/hbDeOWGZqyQALDXVCQ==} + peerDependencies: + '@nomiclabs/hardhat-ethers': ^2.0.0 + chai: ^4.2.0 + ethers: ^5.0.0 + hardhat: ^2.9.4 + + '@nomicfoundation/hardhat-ethers@3.0.6': + resolution: {integrity: sha512-/xzkFQAaHQhmIAYOQmvHBPwL+NkwLzT9gRZBsgWUYeV+E6pzXsBQsHfRYbAZ3XEYare+T7S+5Tg/1KDJgepSkA==} + peerDependencies: + ethers: ^6.1.0 + hardhat: ^2.0.0 + + '@nomicfoundation/hardhat-network-helpers@1.0.10': + resolution: {integrity: sha512-R35/BMBlx7tWN5V6d/8/19QCwEmIdbnA4ZrsuXgvs8i2qFx5i7h6mH5pBS4Pwi4WigLH+upl6faYusrNPuzMrQ==} + peerDependencies: + hardhat: ^2.9.5 + + '@nomicfoundation/hardhat-verify@2.0.7': + resolution: {integrity: sha512-jiYHBX+K6bBN0YhwFHQ5SWWc3dQZliM3pdgpH33C7tnsVACsX1ubZn6gZ9hfwlzG0tyjFM72XQhpaXQ56cE6Ew==} + peerDependencies: + hardhat: ^2.0.4 + + '@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.0': + resolution: {integrity: sha512-vEF3yKuuzfMHsZecHQcnkUrqm8mnTWfJeEVFHpg+cO+le96xQA4lAJYdUan8pXZohQxv1fSReQsn4QGNuBNuCw==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + + '@nomicfoundation/solidity-analyzer-darwin-x64@0.1.0': + resolution: {integrity: sha512-dlHeIg0pTL4dB1l9JDwbi/JG6dHQaU1xpDK+ugYO8eJ1kxx9Dh2isEUtA4d02cQAl22cjOHTvifAk96A+ItEHA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + + '@nomicfoundation/solidity-analyzer-freebsd-x64@0.1.0': + resolution: {integrity: sha512-WFCZYMv86WowDA4GiJKnebMQRt3kCcFqHeIomW6NMyqiKqhK1kIZCxSLDYsxqlx396kKLPN1713Q1S8tu68GKg==} + engines: {node: '>= 10'} + cpu: [x64] + os: [freebsd] + + '@nomicfoundation/solidity-analyzer-linux-arm64-gnu@0.1.0': + resolution: {integrity: sha512-DTw6MNQWWlCgc71Pq7CEhEqkb7fZnS7oly13pujs4cMH1sR0JzNk90Mp1zpSCsCs4oKan2ClhMlLKtNat/XRKQ==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + + '@nomicfoundation/solidity-analyzer-linux-arm64-musl@0.1.0': + resolution: {integrity: sha512-wUpUnR/3GV5Da88MhrxXh/lhb9kxh9V3Jya2NpBEhKDIRCDmtXMSqPMXHZmOR9DfCwCvG6vLFPr/+YrPCnUN0w==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + + '@nomicfoundation/solidity-analyzer-linux-x64-gnu@0.1.0': + resolution: {integrity: sha512-lR0AxK1x/MeKQ/3Pt923kPvwigmGX3OxeU5qNtQ9pj9iucgk4PzhbS3ruUeSpYhUxG50jN4RkIGwUMoev5lguw==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + + '@nomicfoundation/solidity-analyzer-linux-x64-musl@0.1.0': + resolution: {integrity: sha512-A1he/8gy/JeBD3FKvmI6WUJrGrI5uWJNr5Xb9WdV+DK0F8msuOqpEByLlnTdLkXMwW7nSl3awvLezOs9xBHJEg==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + + '@nomicfoundation/solidity-analyzer-win32-arm64-msvc@0.1.0': + resolution: {integrity: sha512-7x5SXZ9R9H4SluJZZP8XPN+ju7Mx+XeUMWZw7ZAqkdhP5mK19I4vz3x0zIWygmfE8RT7uQ5xMap0/9NPsO+ykw==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] + + '@nomicfoundation/solidity-analyzer-win32-ia32-msvc@0.1.0': + resolution: {integrity: sha512-m7w3xf+hnE774YRXu+2mGV7RiF3QJtUoiYU61FascCkQhX3QMQavh7saH/vzb2jN5D24nT/jwvaHYX/MAM9zUw==} + engines: {node: '>= 10'} + cpu: [ia32] + os: [win32] + + '@nomicfoundation/solidity-analyzer-win32-x64-msvc@0.1.0': + resolution: {integrity: sha512-xCuybjY0sLJQnJhupiFAXaek2EqF0AP0eBjgzaalPXSNvCEN6ZYHvUzdA50ENDVeSYFXcUsYf3+FsD3XKaeptA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + + '@nomicfoundation/solidity-analyzer@0.1.0': + resolution: {integrity: sha512-xGWAiVCGOycvGiP/qrlf9f9eOn7fpNbyJygcB0P21a1MDuVPlKt0Srp7rvtBEutYQ48ouYnRXm33zlRnlTOPHg==} + engines: {node: '>= 12'} + + '@nomiclabs/hardhat-ethers@2.2.3': + resolution: {integrity: sha512-YhzPdzb612X591FOe68q+qXVXGG2ANZRvDo0RRUtimev85rCrAlv/TLMEZw5c+kq9AbzocLTVX/h2jVIFPL9Xg==} + peerDependencies: + ethers: ^5.0.0 + hardhat: ^2.0.0 + + '@openzeppelin/contracts-upgradeable@4.9.3': + resolution: {integrity: sha512-jjaHAVRMrE4UuZNfDwjlLGDxTHWIOwTJS2ldnc278a0gevfXfPr8hxKEVBGFBE96kl2G3VHDZhUimw/+G3TG2A==} + + '@openzeppelin/contracts@4.9.3': + resolution: {integrity: sha512-He3LieZ1pP2TNt5JbkPA4PNT9WC3gOTOlDcFGJW4Le4QKqwmiNJCRt44APfxMxvq7OugU/cqYuPcSBzOw38DAg==} + + '@pkgr/core@0.1.1': + resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==} + engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + + '@pnpm/config.env-replace@1.1.0': + resolution: {integrity: sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w==} + engines: {node: '>=12.22.0'} + + '@pnpm/network.ca-file@1.0.2': + resolution: {integrity: sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA==} + engines: {node: '>=12.22.0'} + + '@pnpm/npm-conf@2.2.2': + resolution: {integrity: sha512-UA91GwWPhFExt3IizW6bOeY/pQ0BkuNwKjk9iQW9KqxluGCrg4VenZ0/L+2Y0+ZOtme72EVvg6v0zo3AMQRCeA==} + engines: {node: '>=12'} + + '@prettier/sync@0.3.0': + resolution: {integrity: sha512-3dcmCyAxIcxy036h1I7MQU/uEEBq8oLwf1CE3xeze+MPlgkdlb/+w6rGR/1dhp6Hqi17fRS6nvwnOzkESxEkOw==} + peerDependencies: + prettier: ^3.0.0 + + '@scroll-tech/contracts@0.1.0': + resolution: {integrity: sha512-aBbDOc3WB/WveZdpJYcrfvMYMz7ZTEiW8M9XMJLba8p9FAR5KGYB/cV+8+EUsq3MKt7C1BfR+WnXoTVdvwIY6w==} + + '@scure/base@1.1.1': + resolution: {integrity: sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA==} + + '@scure/bip32@1.1.0': + resolution: {integrity: sha512-ftTW3kKX54YXLCxH6BB7oEEoJfoE2pIgw7MINKAs5PsS6nqKPuKk1haTF/EuHmYqG330t5GSrdmtRuHaY1a62Q==} + + '@scure/bip39@1.1.0': + resolution: {integrity: sha512-pwrPOS16VeTKg98dYXQyIjJEcWfz7/1YJIwxUEPFfQPtc86Ym/1sVgQ2RLoD43AazMk2l/unK4ITySSpW2+82w==} + + '@sentry/core@5.30.0': + resolution: {integrity: sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg==} + engines: {node: '>=6'} + + '@sentry/hub@5.30.0': + resolution: {integrity: sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ==} + engines: {node: '>=6'} + + '@sentry/minimal@5.30.0': + resolution: {integrity: sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw==} + engines: {node: '>=6'} + + '@sentry/node@5.30.0': + resolution: {integrity: sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg==} + engines: {node: '>=6'} + + '@sentry/tracing@5.30.0': + resolution: {integrity: sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw==} + engines: {node: '>=6'} + + '@sentry/types@5.30.0': + resolution: {integrity: sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw==} + engines: {node: '>=6'} + + '@sentry/utils@5.30.0': + resolution: {integrity: sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww==} + engines: {node: '>=6'} + + '@sindresorhus/is@4.6.0': + resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==} + engines: {node: '>=10'} + + '@solidity-parser/parser@0.17.0': + resolution: {integrity: sha512-Nko8R0/kUo391jsEHHxrGM07QFdnPGvlmox4rmH0kNiNAashItAilhy4Mv4pK5gQmW5f4sXAF58fwJbmlkGcVw==} + + '@solidity-parser/parser@0.18.0': + resolution: {integrity: sha512-yfORGUIPgLck41qyN7nbwJRAx17/jAIXCTanHOJZhB6PJ1iAk/84b/xlsVKFSyNyLXIj0dhppoE0+CRws7wlzA==} + + '@szmarczak/http-timer@5.0.1': + resolution: {integrity: sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==} + engines: {node: '>=14.16'} + + '@truffle/abi-utils@0.3.2': + resolution: {integrity: sha512-32queMD64YKL/tmQgSV4Xs073dIaZ9tp7NP1icjwvFSA3Q9yeu7ApYbSbYMsx9H9zWkkVOsfcoJ2kJEieOCzsA==} + + '@truffle/contract-schema@3.4.10': + resolution: {integrity: sha512-BhRNRoRvlj2th6E5RNS0BnS0ZxQe01JJz8I7MjkGqdeXSvrn6qDCAnbmvhNgUv0l5h8w5+gBOQhAJhILf1shdQ==} + + '@tsconfig/node10@1.0.9': + resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==} + + '@tsconfig/node12@1.0.11': + resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} + + '@tsconfig/node14@1.0.3': + resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} + + '@tsconfig/node16@1.0.3': + resolution: {integrity: sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==} + + '@typechain/ethers-v5@7.2.0': + resolution: {integrity: sha512-jfcmlTvaaJjng63QsT49MT6R1HFhtO/TBMWbyzPFSzMmVIqb2tL6prnKBs4ZJrSvmgIXWy+ttSjpaxCTq8D/Tw==} + peerDependencies: + '@ethersproject/abi': ^5.0.0 + '@ethersproject/bytes': ^5.0.0 + '@ethersproject/providers': ^5.0.0 + ethers: ^5.1.3 + typechain: ^5.0.0 + typescript: '>=4.0.0' + + '@typechain/hardhat@7.0.0': + resolution: {integrity: sha512-XB79i5ewg9Met7gMVGfgVkmypicbnI25T5clJBEooMoW2161p4zvKFpoS2O+lBppQyMrPIZkdvl2M3LMDayVcA==} + peerDependencies: + '@ethersproject/abi': ^5.4.7 + '@ethersproject/providers': ^5.4.7 + '@typechain/ethers-v5': ^11.0.0 + ethers: ^5.4.7 + hardhat: ^2.9.9 + typechain: ^8.2.0 + + '@types/bn.js@4.11.6': + resolution: {integrity: sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==} + + '@types/bn.js@5.1.1': + resolution: {integrity: sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g==} + + '@types/cacheable-request@6.0.2': + resolution: {integrity: sha512-B3xVo+dlKM6nnKTcmm5ZtY/OL8bOAOd2Olee9M1zft65ox50OzjEHW91sDiU9j6cvW8Ejg1/Qkf4xd2kugApUA==} + + '@types/cbor@5.0.1': + resolution: {integrity: sha512-zVqJy2KzusZPLOgyGJDnOIbu3DxIGGqxYbEwtEEe4Z+la8jwIhOyb+GMrlHafs5tvKruwf8f8qOYP6zTvse/pw==} + + '@types/chai-as-promised@7.1.8': + resolution: {integrity: sha512-ThlRVIJhr69FLlh6IctTXFkmhtP3NpMZ2QGq69StYLyKZFp/HOp1VdKZj7RvfNWYYcJ1xlbLGLLWj1UvP5u/Gw==} + + '@types/chai@4.3.16': + resolution: {integrity: sha512-PatH4iOdyh3MyWtmHVFXLWCCIhUbopaltqddG9BzB+gMIzee2MJrvd+jouii9Z3wzQJruGWAm7WOMjgfG8hQlQ==} + + '@types/debug@4.1.12': + resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} + + '@types/deep-equal-in-any-order@1.0.3': + resolution: {integrity: sha512-jT0O3hAILDKeKbdWJ9FZLD0Xdfhz7hMvfyFlRWpirjiEVr8G+GZ4kVIzPIqM6x6Rpp93TNPgOAed4XmvcuV6Qg==} + + '@types/http-cache-semantics@4.0.1': + resolution: {integrity: sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==} + + '@types/keyv@3.1.4': + resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} + + '@types/lru-cache@5.1.1': + resolution: {integrity: sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==} + + '@types/minimist@1.2.5': + resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} + + '@types/mocha@10.0.6': + resolution: {integrity: sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==} + + '@types/ms@0.7.31': + resolution: {integrity: sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==} + + '@types/node@12.19.16': + resolution: {integrity: sha512-7xHmXm/QJ7cbK2laF+YYD7gb5MggHIIQwqyjin3bpEGiSuvScMQ5JZZXPvRipi1MwckTQbJZROMns/JxdnIL1Q==} + + '@types/node@20.12.12': + resolution: {integrity: sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==} + + '@types/normalize-package-data@2.4.4': + resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} + + '@types/pbkdf2@3.1.0': + resolution: {integrity: sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==} + + '@types/prettier@2.7.1': + resolution: {integrity: sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow==} + + '@types/readable-stream@2.3.15': + resolution: {integrity: sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ==} + + '@types/responselike@1.0.0': + resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==} + + '@types/secp256k1@4.0.3': + resolution: {integrity: sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w==} + + '@types/semver@7.5.0': + resolution: {integrity: sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==} + + '@typescript-eslint/eslint-plugin@7.10.0': + resolution: {integrity: sha512-PzCr+a/KAef5ZawX7nbyNwBDtM1HdLIT53aSA2DDlxmxMngZ43O8SIePOeX8H5S+FHXeI6t97mTt/dDdzY4Fyw==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + '@typescript-eslint/parser': ^7.0.0 + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/parser@7.10.0': + resolution: {integrity: sha512-2EjZMA0LUW5V5tGQiaa2Gys+nKdfrn2xiTIBLR4fxmPmVSvgPcKNW+AE/ln9k0A4zDUti0J/GZXMDupQoI+e1w==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/scope-manager@7.10.0': + resolution: {integrity: sha512-7L01/K8W/VGl7noe2mgH0K7BE29Sq6KAbVmxurj8GGaPDZXPr8EEQ2seOeAS+mEV9DnzxBQB6ax6qQQ5C6P4xg==} + engines: {node: ^18.18.0 || >=20.0.0} + + '@typescript-eslint/type-utils@7.10.0': + resolution: {integrity: sha512-D7tS4WDkJWrVkuzgm90qYw9RdgBcrWmbbRkrLA4d7Pg3w0ttVGDsvYGV19SH8gPR5L7OtcN5J1hTtyenO9xE9g==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/types@7.10.0': + resolution: {integrity: sha512-7fNj+Ya35aNyhuqrA1E/VayQX9Elwr8NKZ4WueClR3KwJ7Xx9jcCdOrLW04h51de/+gNbyFMs+IDxh5xIwfbNg==} + engines: {node: ^18.18.0 || >=20.0.0} + + '@typescript-eslint/typescript-estree@7.10.0': + resolution: {integrity: sha512-LXFnQJjL9XIcxeVfqmNj60YhatpRLt6UhdlFwAkjNc6jSUlK8zQOl1oktAP8PlWFzPQC1jny/8Bai3/HPuvN5g==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/utils@7.10.0': + resolution: {integrity: sha512-olzif1Fuo8R8m/qKkzJqT7qwy16CzPRWBvERS0uvyc+DHd8AKbO4Jb7kpAvVzMmZm8TrHnI7hvjN4I05zow+tg==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.56.0 + + '@typescript-eslint/visitor-keys@7.10.0': + resolution: {integrity: sha512-9ntIVgsi6gg6FIq9xjEO4VQJvwOqA3jaBFQJ/6TK5AvEup2+cECI6Fh7QiBxmfMHXU0V0J4RyPeOU1VDNzl9cg==} + engines: {node: ^18.18.0 || >=20.0.0} + + '@ungap/structured-clone@1.2.0': + resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + + abi-to-sol@0.6.6: + resolution: {integrity: sha512-PRn81rSpv6NXFPYQSw7ujruqIP6UkwZ/XoFldtiqCX8+2kHVc73xVaUVvdbro06vvBVZiwnxhEIGdI4BRMwGHw==} + hasBin: true + + acorn-jsx@5.3.2: + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + + acorn-walk@8.2.0: + resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} + engines: {node: '>=0.4.0'} + + acorn@8.10.0: + resolution: {integrity: sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==} + engines: {node: '>=0.4.0'} + hasBin: true + + acorn@8.11.3: + resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} + engines: {node: '>=0.4.0'} + hasBin: true + + adm-zip@0.4.16: + resolution: {integrity: sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==} + engines: {node: '>=0.3.0'} + + aes-js@3.0.0: + resolution: {integrity: sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==} + + agent-base@6.0.2: + resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} + engines: {node: '>= 6.0.0'} + + aggregate-error@3.1.0: + resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} + engines: {node: '>=8'} + + ajv@6.12.6: + resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + + ajv@8.11.0: + resolution: {integrity: sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==} + + ansi-align@3.0.1: + resolution: {integrity: sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==} + + ansi-colors@4.1.1: + resolution: {integrity: sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==} + engines: {node: '>=6'} + + ansi-colors@4.1.3: + resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} + engines: {node: '>=6'} + + ansi-escapes@4.3.2: + resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} + engines: {node: '>=8'} + + ansi-regex@2.1.1: + resolution: {integrity: sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==} + engines: {node: '>=0.10.0'} + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-styles@3.2.1: + resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} + engines: {node: '>=4'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + antlr4@4.13.1-patch-1: + resolution: {integrity: sha512-OjFLWWLzDMV9rdFhpvroCWR4ooktNg9/nvVYSA5z28wuVpU36QUNuioR1XLnQtcjVlf8npjyz593PxnU/f/Cow==} + engines: {node: '>=16'} + + anymatch@3.1.2: + resolution: {integrity: sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==} + engines: {node: '>= 8'} + + arg@4.1.3: + resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} + + argparse@1.0.10: + resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} + + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + + array-back@3.1.0: + resolution: {integrity: sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==} + engines: {node: '>=6'} + + array-back@4.0.2: + resolution: {integrity: sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==} + engines: {node: '>=8'} + + array-buffer-byte-length@1.0.0: + resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==} + + array-union@2.1.0: + resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} + engines: {node: '>=8'} + + array.prototype.flat@1.3.2: + resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==} + engines: {node: '>= 0.4'} + + arraybuffer.prototype.slice@1.0.2: + resolution: {integrity: sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==} + engines: {node: '>= 0.4'} + + arrify@1.0.1: + resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==} + engines: {node: '>=0.10.0'} + + assertion-error@1.1.0: + resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} + + ast-parents@0.0.1: + resolution: {integrity: sha512-XHusKxKz3zoYk1ic8Un640joHbFMhbqneyoZfoKnEGtf2ey9Uh/IdpcQplODdO/kENaMIWsD0nJm4+wX3UNLHA==} + + astral-regex@2.0.0: + resolution: {integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==} + engines: {node: '>=8'} + + at-least-node@1.0.0: + resolution: {integrity: sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==} + engines: {node: '>= 4.0.0'} + + available-typed-arrays@1.0.5: + resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} + engines: {node: '>= 0.4'} + + balanced-match@1.0.0: + resolution: {integrity: sha512-9Y0g0Q8rmSt+H33DfKv7FOc3v+iRI+o1lbzt8jGcIosYW37IIW/2XVYq5NPdmaD5NQ59Nk26Kl/vZbwW9Fr8vg==} + + base-x@3.0.9: + resolution: {integrity: sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==} + + bech32@1.1.4: + resolution: {integrity: sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==} + + better-ajv-errors@0.8.2: + resolution: {integrity: sha512-FnODTBJSQSHmJXDLPiC7ca0dC4S1HSTPv1+Hg2sm/C71i3Dj0l1jcUEaq/3OQ6MmnUveshTsUvUj65pDSr3Qow==} + peerDependencies: + ajv: 4.11.8 - 8 + + better-path-resolve@1.0.0: + resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} + engines: {node: '>=4'} + + bigint-crypto-utils@3.3.0: + resolution: {integrity: sha512-jOTSb+drvEDxEq6OuUybOAv/xxoh3cuYRUIPyu8sSHQNKM303UQ2R1DAo45o1AkcIXw6fzbaFI1+xGGdaXs2lg==} + engines: {node: '>=14.0.0'} + + bignumber.js@9.1.0: + resolution: {integrity: sha512-4LwHK4nfDOraBCtst+wOWIHbu1vhvAPJK8g8nROd4iuc3PSEjWif/qwbkh8jwCJz6yDBvtU4KPynETgrfh7y3A==} + + binary-extensions@2.2.0: + resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} + engines: {node: '>=8'} + + blakejs@1.2.1: + resolution: {integrity: sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==} + + bn.js@4.11.6: + resolution: {integrity: sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==} + + bn.js@4.12.0: + resolution: {integrity: sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==} + + bn.js@5.2.1: + resolution: {integrity: sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==} + + boxen@5.1.2: + resolution: {integrity: sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==} + engines: {node: '>=10'} + + brace-expansion@1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + + brace-expansion@2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + + braces@3.0.2: + resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} + engines: {node: '>=8'} + + breakword@1.0.6: + resolution: {integrity: sha512-yjxDAYyK/pBvws9H4xKYpLDpYKEH6CzrBPAuXq3x18I+c/2MkVtT3qAr7Oloi6Dss9qNhPVueAAVU1CSeNDIXw==} + + brorand@1.1.0: + resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} + + browser-stdout@1.3.1: + resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} + + browserify-aes@1.2.0: + resolution: {integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==} + + bs58@4.0.1: + resolution: {integrity: sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==} + + bs58check@2.1.2: + resolution: {integrity: sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==} + + buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + + buffer-xor@1.0.3: + resolution: {integrity: sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==} + + bufio@1.0.7: + resolution: {integrity: sha512-bd1dDQhiC+bEbEfg56IdBv7faWa6OipMs/AFFFvtFnB3wAYjlwQpQRZ0pm6ZkgtfL0pILRXhKxOiQj6UzoMR7A==} + engines: {node: '>=8.0.0'} + + bytes@3.1.2: + resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} + engines: {node: '>= 0.8'} + + cacheable-lookup@6.1.0: + resolution: {integrity: sha512-KJ/Dmo1lDDhmW2XDPMo+9oiy/CeqosPguPCrgcVzKyZrL6pM1gU2GmPY/xo6OQPTUaA/c0kwHuywB4E6nmT9ww==} + engines: {node: '>=10.6.0'} + + cacheable-request@7.0.2: + resolution: {integrity: sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==} + engines: {node: '>=8'} + + call-bind@1.0.5: + resolution: {integrity: sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==} + + callsites@3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + + camel-case@3.0.0: + resolution: {integrity: sha512-+MbKztAYHXPr1jNTSKQF52VpcFjwY5RkR7fxksV8Doo4KAYc5Fl4UJRgthBbTmEx8C54DqahhbLJkDwjI3PI/w==} + + camelcase-keys@6.2.2: + resolution: {integrity: sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==} + engines: {node: '>=8'} + + camelcase@5.3.1: + resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} + engines: {node: '>=6'} + + camelcase@6.3.0: + resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} + engines: {node: '>=10'} + + cbor@5.2.0: + resolution: {integrity: sha512-5IMhi9e1QU76ppa5/ajP1BmMWZ2FHkhAhjeVKQ/EFCgYSEaeVaoGtL7cxJskf9oCCk+XjzaIdc3IuU/dbA/o2A==} + engines: {node: '>=6.0.0'} + + cbor@8.1.0: + resolution: {integrity: sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==} + engines: {node: '>=12.19'} + + chai-as-promised@7.1.1: + resolution: {integrity: sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==} + peerDependencies: + chai: '>= 2.1.2 < 5' + + chai@4.4.1: + resolution: {integrity: sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==} + engines: {node: '>=4'} + + chalk@2.4.2: + resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} + engines: {node: '>=4'} + + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + + change-case@3.0.2: + resolution: {integrity: sha512-Mww+SLF6MZ0U6kdg11algyKd5BARbyM4TbFBepwowYSR5ClfQGCGtxNXgykpN0uF/bstWeaGDT4JWaDh8zWAHA==} + + chardet@0.7.0: + resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} + + check-error@1.0.3: + resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} + + chokidar@3.5.3: + resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} + engines: {node: '>= 8.10.0'} + + ci-info@2.0.0: + resolution: {integrity: sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==} + + ci-info@3.9.0: + resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} + engines: {node: '>=8'} + + cipher-base@1.0.4: + resolution: {integrity: sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==} + + clean-stack@2.2.0: + resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} + engines: {node: '>=6'} + + cli-boxes@2.2.1: + resolution: {integrity: sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==} + engines: {node: '>=6'} + + cliui@6.0.0: + resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==} + + cliui@7.0.4: + resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} + + cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + + clone-response@1.0.2: + resolution: {integrity: sha512-yjLXh88P599UOyPTFX0POsd7WxnbsVsGohcwzHOLspIhhpalPw1BcqED8NblyZLKcGrL8dTgMlcaZxV2jAD41Q==} + + clone@1.0.4: + resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} + engines: {node: '>=0.8'} + + code-error-fragment@0.0.230: + resolution: {integrity: sha512-cadkfKp6932H8UkhzE/gcUqhRMNf8jHzkAN7+5Myabswaghu4xABTgPHDCjW+dBAJxj/SpkTYokpzDqY4pCzQw==} + engines: {node: '>= 4'} + + color-convert@1.9.3: + resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.3: + resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + command-exists@1.2.9: + resolution: {integrity: sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==} + + command-line-args@5.2.1: + resolution: {integrity: sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==} + engines: {node: '>=4.0.0'} + + command-line-usage@6.1.3: + resolution: {integrity: sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw==} + engines: {node: '>=8.0.0'} + + commander@10.0.1: + resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} + engines: {node: '>=14'} + + commander@3.0.2: + resolution: {integrity: sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==} + + concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + + config-chain@1.1.13: + resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==} + + constant-case@2.0.0: + resolution: {integrity: sha512-eS0N9WwmjTqrOmR3o83F5vW8Z+9R1HnVz3xmzT2PMFug9ly+Au/fxRWlEBSb6LcZwspSsEn9Xs1uw9YgzAg1EQ==} + + cookie@0.4.2: + resolution: {integrity: sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==} + engines: {node: '>= 0.6'} + + core-js@3.30.1: + resolution: {integrity: sha512-ZNS5nbiSwDTq4hFosEDqm65izl2CWmLz0hARJMyNQBgkUZMIF51cQiMvIQKA6hvuaeWxQDP3hEedM1JZIgTldQ==} + + cosmiconfig@8.2.0: + resolution: {integrity: sha512-3rTMnFJA1tCOPwRxtgF4wd7Ab2qvDbL8jX+3smjIbS4HlZBagTlpERbdN7iAbWlrfxE3M8c27kTwTawQ7st+OQ==} + engines: {node: '>=14'} + + create-hash@1.2.0: + resolution: {integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==} + + create-hmac@1.1.7: + resolution: {integrity: sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==} + + create-require@1.1.1: + resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} + + cross-spawn@5.1.0: + resolution: {integrity: sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==} + + cross-spawn@7.0.3: + resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} + engines: {node: '>= 8'} + + csv-generate@3.4.3: + resolution: {integrity: sha512-w/T+rqR0vwvHqWs/1ZyMDWtHHSJaN06klRqJXBEpDJaM/+dZkso0OKh1VcuuYvK3XM53KysVNq8Ko/epCK8wOw==} + + csv-parse@4.16.3: + resolution: {integrity: sha512-cO1I/zmz4w2dcKHVvpCr7JVRu8/FymG5OEpmvsZYlccYolPBLoVGKUHgNoc4ZGkFeFlWGEDmMyBM+TTqRdW/wg==} + + csv-stringify@5.6.5: + resolution: {integrity: sha512-PjiQ659aQ+fUTQqSrd1XEDnOr52jh30RBurfzkscaE2tPaFsDH5wOAHJiw8XAHphRknCwMUE9KRayc4K/NbO8A==} + + csv@5.5.3: + resolution: {integrity: sha512-QTaY0XjjhTQOdguARF0lGKm5/mEq9PD9/VhZZegHDIBq2tQwgNpHc3dneD4mGo2iJs+fTKv5Bp0fZ+BRuY3Z0g==} + engines: {node: '>= 0.1.90'} + + dataloader@1.4.0: + resolution: {integrity: sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==} + + debug@4.3.4: + resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + decamelize-keys@1.1.1: + resolution: {integrity: sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==} + engines: {node: '>=0.10.0'} + + decamelize@1.2.0: + resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} + engines: {node: '>=0.10.0'} + + decamelize@4.0.0: + resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} + engines: {node: '>=10'} + + decompress-response@6.0.0: + resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} + engines: {node: '>=10'} + + deep-eql@4.1.3: + resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==} + engines: {node: '>=6'} + + deep-equal-in-any-order@2.0.6: + resolution: {integrity: sha512-RfnWHQzph10YrUjvWwhd15Dne8ciSJcZ3U6OD7owPwiVwsdE5IFSoZGg8rlwJD11ES+9H5y8j3fCofviRHOqLQ==} + + deep-extend@0.6.0: + resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} + engines: {node: '>=4.0.0'} + + deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + + defaults@1.0.4: + resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} + + defer-to-connect@2.0.1: + resolution: {integrity: sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==} + engines: {node: '>=10'} + + define-data-property@1.1.1: + resolution: {integrity: sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==} + engines: {node: '>= 0.4'} + + define-properties@1.2.1: + resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} + engines: {node: '>= 0.4'} + + delete-empty@3.0.0: + resolution: {integrity: sha512-ZUyiwo76W+DYnKsL3Kim6M/UOavPdBJgDYWOmuQhYaZvJH0AXAHbUNyEDtRbBra8wqqr686+63/0azfEk1ebUQ==} + engines: {node: '>=10'} + hasBin: true + + depd@2.0.0: + resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} + engines: {node: '>= 0.8'} + + detect-indent@6.1.0: + resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} + engines: {node: '>=8'} + + diff@4.0.2: + resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} + engines: {node: '>=0.3.1'} + + diff@5.0.0: + resolution: {integrity: sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==} + engines: {node: '>=0.3.1'} + + dir-glob@3.0.1: + resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} + engines: {node: '>=8'} + + doctrine@3.0.0: + resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} + engines: {node: '>=6.0.0'} + + dot-case@2.1.1: + resolution: {integrity: sha512-HnM6ZlFqcajLsyudHq7LeeLDr2rFAVYtDv/hV5qchQEidSck8j9OPUsXY9KwJv/lHMtYlX4DjRQqwFYa+0r8Ug==} + + dotenv@8.6.0: + resolution: {integrity: sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==} + engines: {node: '>=10'} + + elliptic@6.5.4: + resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + end-of-stream@1.4.4: + resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} + + enquirer@2.3.6: + resolution: {integrity: sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==} + engines: {node: '>=8.6'} + + env-paths@2.2.1: + resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} + engines: {node: '>=6'} + + error-ex@1.3.2: + resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} + + es-abstract@1.22.3: + resolution: {integrity: sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==} + engines: {node: '>= 0.4'} + + es-set-tostringtag@2.0.2: + resolution: {integrity: sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==} + engines: {node: '>= 0.4'} + + es-shim-unscopables@1.0.2: + resolution: {integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==} + + es-to-primitive@1.2.1: + resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} + engines: {node: '>= 0.4'} + + escalade@3.1.1: + resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} + engines: {node: '>=6'} + + escape-string-regexp@1.0.5: + resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} + engines: {node: '>=0.8.0'} + + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + + eslint-config-prettier@9.1.0: + resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} + hasBin: true + peerDependencies: + eslint: '>=7.0.0' + + eslint-plugin-prettier@5.1.3: + resolution: {integrity: sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + '@types/eslint': '>=8.0.0' + eslint: '>=8.0.0' + eslint-config-prettier: '*' + prettier: '>=3.0.0' + peerDependenciesMeta: + '@types/eslint': + optional: true + eslint-config-prettier: + optional: true + + eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint@8.57.0: + resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + hasBin: true + + espree@9.6.1: + resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + esprima@4.0.1: + resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} + engines: {node: '>=4'} + hasBin: true + + esquery@1.5.0: + resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} + engines: {node: '>=0.10'} + + esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + + estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + + esutils@2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} + + ethereum-bloom-filters@1.0.10: + resolution: {integrity: sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA==} + + ethereum-cryptography@0.1.3: + resolution: {integrity: sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==} + + ethereum-cryptography@1.1.2: + resolution: {integrity: sha512-XDSJlg4BD+hq9N2FjvotwUET9Tfxpxc3kWGE2AqUG5vcbeunnbImVk3cj6e/xT3phdW21mE8R5IugU4fspQDcQ==} + + ethereumjs-abi@0.6.8: + resolution: {integrity: sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==} + + ethereumjs-util@6.2.1: + resolution: {integrity: sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==} + + ethereumjs-util@7.1.5: + resolution: {integrity: sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg==} + engines: {node: '>=10.0.0'} + + ethers@5.7.2: + resolution: {integrity: sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==} + + ethjs-unit@0.1.6: + resolution: {integrity: sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw==} + engines: {node: '>=6.5.0', npm: '>=3'} + + ethjs-util@0.1.6: + resolution: {integrity: sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==} + engines: {node: '>=6.5.0', npm: '>=3'} + + evp_bytestokey@1.0.3: + resolution: {integrity: sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==} + + extendable-error@0.1.7: + resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} + + external-editor@3.1.0: + resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} + engines: {node: '>=4'} + + fast-check@3.1.1: + resolution: {integrity: sha512-3vtXinVyuUKCKFKYcwXhGE6NtGWkqF8Yh3rvMZNzmwz8EPrgoc/v4pDdLHyLnCyCI5MZpZZkDEwFyXyEONOxpA==} + engines: {node: '>=8.0.0'} + + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + + fast-diff@1.2.0: + resolution: {integrity: sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==} + + fast-glob@3.3.1: + resolution: {integrity: sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==} + engines: {node: '>=8.6.0'} + + fast-json-stable-stringify@2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + + fast-levenshtein@2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + + fastq@1.6.0: + resolution: {integrity: sha512-jmxqQ3Z/nXoeyDmWAzF9kH1aGZSis6e/SbfPmJpUnyZ0ogr6iscHQaml4wsEepEWSdtmpy+eVXmCRIMpxaXqOA==} + + file-entry-cache@6.0.1: + resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} + engines: {node: ^10.12.0 || >=12.0.0} + + fill-range@7.0.1: + resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} + engines: {node: '>=8'} + + find-replace@3.0.0: + resolution: {integrity: sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==} + engines: {node: '>=4.0.0'} + + find-up@2.1.0: + resolution: {integrity: sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==} + engines: {node: '>=4'} + + find-up@4.1.0: + resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} + engines: {node: '>=8'} + + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + + find-yarn-workspace-root2@1.2.16: + resolution: {integrity: sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==} + + flat-cache@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} + engines: {node: ^10.12.0 || >=12.0.0} + + flat@5.0.2: + resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} + hasBin: true + + flatted@3.3.1: + resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} + + follow-redirects@1.15.6: + resolution: {integrity: sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==} + engines: {node: '>=4.0'} + peerDependencies: + debug: '*' + peerDependenciesMeta: + debug: + optional: true + + for-each@0.3.3: + resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + + form-data-encoder@1.7.1: + resolution: {integrity: sha512-EFRDrsMm/kyqbTQocNvRXMLjc7Es2Vk+IQFx/YW7hkUH1eBl4J1fqiP34l74Yt0pFLCNpc06fkbVk00008mzjg==} + + fp-ts@1.19.3: + resolution: {integrity: sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg==} + + fs-extra@0.30.0: + resolution: {integrity: sha512-UvSPKyhMn6LEd/WpUaV9C9t3zATuqoqfWc3QdPhPLb58prN9tqYPlPWi8Krxi44loBoUzlobqZ3+8tGpxxSzwA==} + + fs-extra@7.0.1: + resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} + engines: {node: '>=6 <7 || >=8'} + + fs-extra@8.1.0: + resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} + engines: {node: '>=6 <7 || >=8'} + + fs-extra@9.1.0: + resolution: {integrity: sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==} + engines: {node: '>=10'} + + fs.realpath@1.0.0: + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + + fsevents@2.3.2: + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + + function.prototype.name@1.1.6: + resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} + engines: {node: '>= 0.4'} + + functions-have-names@1.2.3: + resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} + + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + + get-func-name@2.0.2: + resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} + + get-intrinsic@1.2.2: + resolution: {integrity: sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==} + + get-stream@5.1.0: + resolution: {integrity: sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==} + engines: {node: '>=8'} + + get-stream@6.0.1: + resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} + engines: {node: '>=10'} + + get-symbol-description@1.0.0: + resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} + engines: {node: '>= 0.4'} + + glob-parent@5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + + glob-parent@6.0.2: + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} + + glob@7.1.7: + resolution: {integrity: sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==} + + glob@7.2.0: + resolution: {integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==} + + glob@7.2.3: + resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + + glob@8.1.0: + resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} + engines: {node: '>=12'} + + globals@13.24.0: + resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} + engines: {node: '>=8'} + + globalthis@1.0.3: + resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} + engines: {node: '>= 0.4'} + + globby@11.1.0: + resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} + engines: {node: '>=10'} + + gopd@1.0.1: + resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + + got@12.1.0: + resolution: {integrity: sha512-hBv2ty9QN2RdbJJMK3hesmSkFTjVIHyIDDbssCKnSmq62edGgImJWD10Eb1k77TiV1bxloxqcFAVK8+9pkhOig==} + engines: {node: '>=14.16'} + + graceful-fs@4.2.10: + resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} + + grapheme-splitter@1.0.4: + resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} + + graphemer@1.4.0: + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + + hard-rejection@2.1.0: + resolution: {integrity: sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==} + engines: {node: '>=6'} + + hardhat-abi-exporter@2.10.1: + resolution: {integrity: sha512-X8GRxUTtebMAd2k4fcPyVnCdPa6dYK4lBsrwzKP5yiSq4i+WadWPIumaLfce53TUf/o2TnLpLOduyO1ylE2NHQ==} + engines: {node: '>=14.14.0'} + peerDependencies: + hardhat: ^2.0.0 + + hardhat-ignore-warnings@0.2.11: + resolution: {integrity: sha512-+nHnRbP6COFZaXE7HAY7TZNE3au5vHe5dkcnyq0XaP07ikT2fJ3NhFY0vn7Deh4Qbz0Z/9Xpnj2ki6Ktgk61pg==} + + hardhat@2.20.1: + resolution: {integrity: sha512-q75xDQiQtCZcTMBwjTovrXEU5ECr49baxr4/OBkIu/ULTPzlB20yk1dRWNmD2IFbAeAeXggaWvQAdpiScaHtPw==} + hasBin: true + peerDependencies: + ts-node: '*' + typescript: '*' + peerDependenciesMeta: + ts-node: + optional: true + typescript: + optional: true + + has-bigints@1.0.2: + resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} + + has-flag@3.0.0: + resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} + engines: {node: '>=4'} + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + has-property-descriptors@1.0.0: + resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} + + has-proto@1.0.1: + resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} + engines: {node: '>= 0.4'} + + has-symbols@1.0.3: + resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} + engines: {node: '>= 0.4'} + + has-tostringtag@1.0.0: + resolution: {integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==} + engines: {node: '>= 0.4'} + + has@1.0.3: + resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} + engines: {node: '>= 0.4.0'} + + hash-base@3.1.0: + resolution: {integrity: sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==} + engines: {node: '>=4'} + + hash.js@1.1.7: + resolution: {integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==} + + hasown@2.0.0: + resolution: {integrity: sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==} + engines: {node: '>= 0.4'} + + he@1.2.0: + resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} + hasBin: true + + header-case@1.0.1: + resolution: {integrity: sha512-i0q9mkOeSuhXw6bGgiQCCBgY/jlZuV/7dZXyZ9c6LcBrqwvT8eT719E9uxE5LiZftdl+z81Ugbg/VvXV4OJOeQ==} + + hmac-drbg@1.0.1: + resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} + + hosted-git-info@2.8.9: + resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} + + http-cache-semantics@4.0.3: + resolution: {integrity: sha512-TcIMG3qeVLgDr1TEd2XvHaTnMPwYQUQMIBLy+5pLSDKYFc7UIqj39w8EGzZkaxoLv/l2K8HaI0t5AVA+YYgUew==} + + http-errors@2.0.0: + resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} + engines: {node: '>= 0.8'} + + http2-wrapper@2.1.11: + resolution: {integrity: sha512-aNAk5JzLturWEUiuhAN73Jcbq96R7rTitAoXV54FYMatvihnpD2+6PUgU4ce3D/m5VDbw+F5CsyKSF176ptitQ==} + engines: {node: '>=10.19.0'} + + https-proxy-agent@5.0.1: + resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} + engines: {node: '>= 6'} + + human-id@1.0.2: + resolution: {integrity: sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==} + + iconv-lite@0.4.24: + resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} + engines: {node: '>=0.10.0'} + + ignore@5.2.4: + resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} + engines: {node: '>= 4'} + + ignore@5.3.1: + resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} + engines: {node: '>= 4'} + + immutable@4.1.0: + resolution: {integrity: sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==} + + import-fresh@3.3.0: + resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} + engines: {node: '>=6'} + + imurmurhash@0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + + indent-string@4.0.0: + resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} + engines: {node: '>=8'} + + inflight@1.0.6: + resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + + inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + + ini@1.3.8: + resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} + + internal-slot@1.0.6: + resolution: {integrity: sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==} + engines: {node: '>= 0.4'} + + io-ts@1.10.4: + resolution: {integrity: sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g==} + + is-array-buffer@3.0.2: + resolution: {integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==} + + is-arrayish@0.2.1: + resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} + + is-bigint@1.0.4: + resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} + + is-binary-path@2.1.0: + resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} + engines: {node: '>=8'} + + is-boolean-object@1.1.2: + resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} + engines: {node: '>= 0.4'} + + is-callable@1.2.7: + resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} + engines: {node: '>= 0.4'} + + is-core-module@2.10.0: + resolution: {integrity: sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==} + + is-date-object@1.0.2: + resolution: {integrity: sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==} + engines: {node: '>= 0.4'} + + is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + + is-hex-prefixed@1.0.0: + resolution: {integrity: sha1-fY035q135dEnFIkTxXPggtd39VQ=} + engines: {node: '>=6.5.0', npm: '>=3'} + + is-lower-case@1.1.3: + resolution: {integrity: sha512-+5A1e/WJpLLXZEDlgz4G//WYSHyQBD32qa4Jd3Lw06qQlv3fJHnp3YIHjTQSGzHMgzmVKz2ZP3rBxTHkPw/lxA==} + + is-negative-zero@2.0.2: + resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} + engines: {node: '>= 0.4'} + + is-number-object@1.0.7: + resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} + engines: {node: '>= 0.4'} + + is-number@7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + + is-path-inside@3.0.3: + resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} + engines: {node: '>=8'} + + is-plain-obj@1.1.0: + resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} + engines: {node: '>=0.10.0'} + + is-plain-obj@2.1.0: + resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} + engines: {node: '>=8'} + + is-regex@1.1.4: + resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} + engines: {node: '>= 0.4'} + + is-shared-array-buffer@1.0.2: + resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} + + is-string@1.0.7: + resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} + engines: {node: '>= 0.4'} + + is-subdir@1.2.0: + resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} + engines: {node: '>=4'} + + is-symbol@1.0.3: + resolution: {integrity: sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==} + engines: {node: '>= 0.4'} + + is-typed-array@1.1.12: + resolution: {integrity: sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==} + engines: {node: '>= 0.4'} + + is-unicode-supported@0.1.0: + resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} + engines: {node: '>=10'} + + is-upper-case@1.1.2: + resolution: {integrity: sha512-GQYSJMgfeAmVwh9ixyk888l7OIhNAGKtY6QA+IrWlu9MDTCaXmeozOZ2S9Knj7bQwBO/H6J2kb+pbyTUiMNbsw==} + + is-weakref@1.0.2: + resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} + + is-windows@1.0.2: + resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} + engines: {node: '>=0.10.0'} + + isarray@2.0.5: + resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + js-sdsl@4.4.2: + resolution: {integrity: sha512-dwXFwByc/ajSV6m5bcKAPwe4yDDF6D614pxmIi5odytzxRlwqF6nwoiCek80Ixc7Cvma5awClxrzFtxCQvcM8w==} + + js-sha3@0.8.0: + resolution: {integrity: sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==} + + js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + + js-yaml@3.14.1: + resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} + hasBin: true + + js-yaml@4.1.0: + resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} + hasBin: true + + json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + + json-parse-even-better-errors@2.3.1: + resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + + json-schema-traverse@0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + + json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + + json-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + + json-to-ast@2.1.0: + resolution: {integrity: sha512-W9Lq347r8tA1DfMvAGn9QNcgYm4Wm7Yc+k8e6vezpMnRT+NHbtlxgNBXRVjXe9YM6eTn6+p/MKOlV/aABJcSnQ==} + engines: {node: '>= 4'} + + jsonfile@2.4.0: + resolution: {integrity: sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==} + + jsonfile@4.0.0: + resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} + + jsonfile@6.1.0: + resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + + jsonpointer@5.0.1: + resolution: {integrity: sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==} + engines: {node: '>=0.10.0'} + + keccak@3.0.2: + resolution: {integrity: sha512-PyKKjkH53wDMLGrvmRGSNWgmSxZOUqbnXwKL9tmgbFYA1iAYqW21kfR7mZXV0MlESiefxQQE9X9fTa3X+2MPDQ==} + engines: {node: '>=10.0.0'} + + keyv@4.5.0: + resolution: {integrity: sha512-2YvuMsA+jnFGtBareKqgANOEKe1mk3HKiXu2fRmAfyxG0MJAywNhi5ttWA3PMjl4NmpyjZNbFifR2vNjW1znfA==} + + keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + + kind-of@6.0.3: + resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} + engines: {node: '>=0.10.0'} + + klaw@1.3.1: + resolution: {integrity: sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw==} + + kleur@4.1.5: + resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} + engines: {node: '>=6'} + + latest-version@7.0.0: + resolution: {integrity: sha512-KvNT4XqAMzdcL6ka6Tl3i2lYeFDgXNCuIX+xNx6ZMVR1dFq+idXd9FLKNMOIx0t9mJ9/HudyX4oZWXZQ0UJHeg==} + engines: {node: '>=14.16'} + + leven@3.1.0: + resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} + engines: {node: '>=6'} + + levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + + lines-and-columns@1.2.4: + resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + + load-yaml-file@0.2.0: + resolution: {integrity: sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==} + engines: {node: '>=6'} + + locate-path@2.0.0: + resolution: {integrity: sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==} + engines: {node: '>=4'} + + locate-path@5.0.0: + resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} + engines: {node: '>=8'} + + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + + lodash.camelcase@4.3.0: + resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} + + lodash.clonedeep@4.5.0: + resolution: {integrity: sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==} + + lodash.isequal@4.5.0: + resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==} + + lodash.mapvalues@4.6.0: + resolution: {integrity: sha512-JPFqXFeZQ7BfS00H58kClY7SPVeHertPE0lNuCyZ26/XlN8TvakYD7b9bGyNmXbT/D3BbtPAAmq90gPWqLkxlQ==} + + lodash.merge@4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + + lodash.startcase@4.4.0: + resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} + + lodash.truncate@4.4.2: + resolution: {integrity: sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==} + + lodash@4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + + log-symbols@4.1.0: + resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} + engines: {node: '>=10'} + + loupe@2.3.7: + resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} + + lower-case-first@1.0.2: + resolution: {integrity: sha512-UuxaYakO7XeONbKrZf5FEgkantPf5DUqDayzP5VXZrtRPdH86s4kN47I8B3TW10S4QKiE3ziHNf3kRN//okHjA==} + + lower-case@1.1.4: + resolution: {integrity: sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA==} + + lowercase-keys@2.0.0: + resolution: {integrity: sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==} + engines: {node: '>=8'} + + lowercase-keys@3.0.0: + resolution: {integrity: sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + lru-cache@10.2.2: + resolution: {integrity: sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==} + engines: {node: 14 || >=16.14} + + lru-cache@4.1.5: + resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==} + + lru_map@0.3.3: + resolution: {integrity: sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==} + + make-error@1.3.6: + resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} + + map-obj@1.0.1: + resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} + engines: {node: '>=0.10.0'} + + map-obj@4.3.0: + resolution: {integrity: sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==} + engines: {node: '>=8'} + + md5.js@1.3.5: + resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==} + + memorystream@0.3.1: + resolution: {integrity: sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==} + engines: {node: '>= 0.10.0'} + + meow@6.1.1: + resolution: {integrity: sha512-3YffViIt2QWgTy6Pale5QpopX/IvU3LPL03jOTqp6pGj3VjesdO/U8CuHMKpnQr4shCNCM5fd5XFFvIIl6JBHg==} + engines: {node: '>=8'} + + merge2@1.4.1: + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} + + micromatch@4.0.5: + resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} + engines: {node: '>=8.6'} + + mimic-response@1.0.1: + resolution: {integrity: sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==} + engines: {node: '>=4'} + + mimic-response@3.1.0: + resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} + engines: {node: '>=10'} + + min-indent@1.0.1: + resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} + engines: {node: '>=4'} + + minimalistic-assert@1.0.1: + resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} + + minimalistic-crypto-utils@1.0.1: + resolution: {integrity: sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==} + + minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + + minimatch@5.0.1: + resolution: {integrity: sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==} + engines: {node: '>=10'} + + minimatch@5.1.6: + resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} + engines: {node: '>=10'} + + minimatch@9.0.4: + resolution: {integrity: sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==} + engines: {node: '>=16 || 14 >=14.17'} + + minimist-options@4.1.0: + resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} + engines: {node: '>= 6'} + + minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + + mixme@0.5.10: + resolution: {integrity: sha512-5H76ANWinB1H3twpJ6JY8uvAtpmFvHNArpilJAjXRKXSDDLPIMoZArw5SH0q9z+lLs8IrMw7Q2VWpWimFKFT1Q==} + engines: {node: '>= 8.0.0'} + + mkdirp@1.0.4: + resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} + engines: {node: '>=10'} + hasBin: true + + mnemonist@0.38.5: + resolution: {integrity: sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg==} + + mocha@10.2.0: + resolution: {integrity: sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==} + engines: {node: '>= 14.0.0'} + hasBin: true + + moment@2.30.1: + resolution: {integrity: sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==} + + ms@2.1.2: + resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + nanoid@3.3.3: + resolution: {integrity: sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + + natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + + neodoc@2.0.2: + resolution: {integrity: sha512-NAppJ0YecKWdhSXFYCHbo6RutiX8vOt/Jo3l46mUg6pQlpJNaqc5cGxdrW2jITQm5JIYySbFVPDl3RrREXNyPw==} + + no-case@2.3.2: + resolution: {integrity: sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==} + + node-addon-api@2.0.2: + resolution: {integrity: sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==} + + node-fetch@2.6.7: + resolution: {integrity: sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + + node-gyp-build@4.5.0: + resolution: {integrity: sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==} + hasBin: true + + node-interval-tree@2.1.2: + resolution: {integrity: sha512-bJ9zMDuNGzVQg1xv0bCPzyEDxHgbrx7/xGj6CDokvizZZmastPsOh0JJLuY8wA5q2SfX1TLNMk7XNV8WxbGxzA==} + engines: {node: '>= 14.0.0'} + + nofilter@1.0.4: + resolution: {integrity: sha512-N8lidFp+fCz+TD51+haYdbDGrcBWwuHX40F5+z0qkUjMJ5Tp+rdSuAkMJ9N9eoolDlEVTf6u5icM+cNKkKW2mA==} + engines: {node: '>=8'} + + nofilter@3.1.0: + resolution: {integrity: sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==} + engines: {node: '>=12.19'} + + normalize-package-data@2.5.0: + resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} + + normalize-path@3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + + normalize-url@6.1.0: + resolution: {integrity: sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==} + engines: {node: '>=10'} + + number-to-bn@1.7.0: + resolution: {integrity: sha512-wsJ9gfSz1/s4ZsJN01lyonwuxA1tml6X1yBDnfpMglypcBRFZZkus26EdPSlqS5GJfYddVZa22p3VNb3z5m5Ig==} + engines: {node: '>=6.5.0', npm: '>=3'} + + object-inspect@1.13.1: + resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} + + object-keys@1.1.1: + resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} + engines: {node: '>= 0.4'} + + object.assign@4.1.4: + resolution: {integrity: sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==} + engines: {node: '>= 0.4'} + + obliterator@2.0.4: + resolution: {integrity: sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ==} + + once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + + optionator@0.9.3: + resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} + engines: {node: '>= 0.8.0'} + + ordinal@1.0.3: + resolution: {integrity: sha512-cMddMgb2QElm8G7vdaa02jhUNbTSrhsgAGUz1OokD83uJTwSUn+nKoNoKVVaRa08yF6sgfO7Maou1+bgLd9rdQ==} + + os-tmpdir@1.0.2: + resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} + engines: {node: '>=0.10.0'} + + outdent@0.5.0: + resolution: {integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==} + + p-cancelable@3.0.0: + resolution: {integrity: sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==} + engines: {node: '>=12.20'} + + p-filter@2.1.0: + resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==} + engines: {node: '>=8'} + + p-limit@1.3.0: + resolution: {integrity: sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==} + engines: {node: '>=4'} + + p-limit@2.3.0: + resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} + engines: {node: '>=6'} + + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + + p-locate@2.0.0: + resolution: {integrity: sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==} + engines: {node: '>=4'} + + p-locate@4.1.0: + resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} + engines: {node: '>=8'} + + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + + p-map@2.1.0: + resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} + engines: {node: '>=6'} + + p-map@4.0.0: + resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} + engines: {node: '>=10'} + + p-try@1.0.0: + resolution: {integrity: sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==} + engines: {node: '>=4'} + + p-try@2.2.0: + resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} + engines: {node: '>=6'} + + package-json@8.1.1: + resolution: {integrity: sha512-cbH9IAIJHNj9uXi196JVsRlt7cHKak6u/e6AkL/bkRelZ7rlL3X1YKxsZwa36xipOEKAsdtmaG6aAJoM1fx2zA==} + engines: {node: '>=14.16'} + + param-case@2.1.1: + resolution: {integrity: sha512-eQE845L6ot89sk2N8liD8HAuH4ca6Vvr7VWAWwt7+kvvG5aBcPmmphQ68JsEG2qa9n1TykS2DLeMt363AAH8/w==} + + parent-module@1.0.1: + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} + + parse-json@5.2.0: + resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} + engines: {node: '>=8'} + + pascal-case@2.0.1: + resolution: {integrity: sha512-qjS4s8rBOJa2Xm0jmxXiyh1+OFf6ekCWOvUaRgAQSktzlTbMotS0nmG9gyYAybCWBcuP4fsBeRCKNwGBnMe2OQ==} + + path-case@2.1.1: + resolution: {integrity: sha512-Ou0N05MioItesaLr9q8TtHVWmJ6fxWdqKB2RohFmNWVyJ+2zeKIeDNWAN6B/Pe7wpzWChhZX6nONYmOnMeJQ/Q==} + + path-exists@3.0.0: + resolution: {integrity: sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==} + engines: {node: '>=4'} + + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-is-absolute@1.0.1: + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-parse@1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + + path-starts-with@2.0.1: + resolution: {integrity: sha512-wZ3AeiRBRlNwkdUxvBANh0+esnt38DLffHDujZyRHkqkaKHTglnY2EP5UX3b8rdeiSutgO4y9NEJwXezNP5vHg==} + engines: {node: '>=8'} + + path-type@4.0.0: + resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} + engines: {node: '>=8'} + + pathval@1.1.1: + resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} + + pbkdf2@3.1.2: + resolution: {integrity: sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==} + engines: {node: '>=0.12'} + + picomatch@2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + + pify@4.0.1: + resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} + engines: {node: '>=6'} + + pkg-dir@4.2.0: + resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} + engines: {node: '>=8'} + + pluralize@8.0.0: + resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} + engines: {node: '>=4'} + + preferred-pm@3.1.3: + resolution: {integrity: sha512-MkXsENfftWSRpzCzImcp4FRsCc3y1opwB73CfCNWyzMqArju2CrlMHlqB7VexKiPEOjGMbttv1r9fSCn5S610w==} + engines: {node: '>=10'} + + prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + + prettier-linter-helpers@1.0.0: + resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} + engines: {node: '>=6.0.0'} + + prettier-plugin-solidity@1.3.1: + resolution: {integrity: sha512-MN4OP5I2gHAzHZG1wcuJl0FsLS3c4Cc5494bbg+6oQWBPuEamjwDvmGfFMZ6NFzsh3Efd9UUxeT7ImgjNH4ozA==} + engines: {node: '>=16'} + peerDependencies: + prettier: '>=2.3.0' + + prettier@2.8.8: + resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} + engines: {node: '>=10.13.0'} + hasBin: true + + prettier@3.2.5: + resolution: {integrity: sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==} + engines: {node: '>=14'} + hasBin: true + + proto-list@1.2.4: + resolution: {integrity: sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==} + + pseudomap@1.0.2: + resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} + + pump@3.0.0: + resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} + + punycode@2.1.1: + resolution: {integrity: sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==} + engines: {node: '>=6'} + + pure-rand@5.0.3: + resolution: {integrity: sha512-9N8x1h8dptBQpHyC7aZMS+iNOAm97WMGY0AFrguU1cpfW3I5jINkWe5BIY5md0ofy+1TCIELsVcm/GJXZSaPbw==} + + quick-lru@4.0.1: + resolution: {integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==} + engines: {node: '>=8'} + + quick-lru@5.1.1: + resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==} + engines: {node: '>=10'} + + randombytes@2.1.0: + resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} + + raw-body@2.5.1: + resolution: {integrity: sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==} + engines: {node: '>= 0.8'} + + rc@1.2.8: + resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} + hasBin: true + + read-pkg-up@7.0.1: + resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==} + engines: {node: '>=8'} + + read-pkg@5.2.0: + resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==} + engines: {node: '>=8'} + + read-yaml-file@1.1.0: + resolution: {integrity: sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==} + engines: {node: '>=6'} + + readable-stream@3.6.0: + resolution: {integrity: sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==} + engines: {node: '>= 6'} + + readdirp@3.6.0: + resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} + engines: {node: '>=8.10.0'} + + redent@3.0.0: + resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} + engines: {node: '>=8'} + + reduce-flatten@2.0.0: + resolution: {integrity: sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==} + engines: {node: '>=6'} + + regenerator-runtime@0.14.1: + resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} + + regexp.prototype.flags@1.5.1: + resolution: {integrity: sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==} + engines: {node: '>= 0.4'} + + registry-auth-token@5.0.2: + resolution: {integrity: sha512-o/3ikDxtXaA59BmZuZrJZDJv8NMDGSj+6j6XaeBmHw8eY1i1qd9+6H+LjVvQXx3HN6aRCGa1cUdJ9RaJZUugnQ==} + engines: {node: '>=14'} + + registry-url@6.0.1: + resolution: {integrity: sha512-+crtS5QjFRqFCoQmvGduwYWEBng99ZvmFvF+cUJkGYF1L1BfU8C6Zp9T7f5vPAwyLkUExpvK+ANVZmGU49qi4Q==} + engines: {node: '>=12'} + + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + + require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + + require-main-filename@2.0.0: + resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} + + resolve-alpn@1.2.1: + resolution: {integrity: sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==} + + resolve-from@4.0.0: + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} + + resolve-from@5.0.0: + resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} + engines: {node: '>=8'} + + resolve@1.17.0: + resolution: {integrity: sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==} + + resolve@1.22.1: + resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==} + hasBin: true + + responselike@2.0.1: + resolution: {integrity: sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==} + + reusify@1.0.4: + resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + + rimraf@2.7.1: + resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} + hasBin: true + + rimraf@3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + hasBin: true + + ripemd160@2.0.2: + resolution: {integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==} + + rlp@2.2.7: + resolution: {integrity: sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==} + hasBin: true + + run-parallel@1.1.9: + resolution: {integrity: sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==} + + rust-verkle-wasm@0.0.1: + resolution: {integrity: sha512-BN6fiTsxcd2dCECz/cHtGTt9cdLJR925nh7iAuRcj8ymKw7OOaPmCneQZ7JePOJ/ia27TjEL91VdOi88Yf+mcA==} + + rustbn-wasm@0.2.0: + resolution: {integrity: sha512-FThvYFNTqrEKGqXuseeg0zR7yROh/6U1617mCHF68OVqrN1tNKRN7Tdwy4WayPVsCmmK+eMxtIZX1qL6JxTkMg==} + + safe-array-concat@1.0.1: + resolution: {integrity: sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==} + engines: {node: '>=0.4'} + + safe-buffer@5.1.2: + resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} + + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + safe-regex-test@1.0.0: + resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} + + safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + + scrypt-js@3.0.1: + resolution: {integrity: sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==} + + secp256k1@4.0.3: + resolution: {integrity: sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA==} + engines: {node: '>=10.0.0'} + + semver@5.7.1: + resolution: {integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==} + hasBin: true + + semver@6.3.0: + resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} + hasBin: true + + semver@7.6.2: + resolution: {integrity: sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==} + engines: {node: '>=10'} + hasBin: true + + sentence-case@2.1.1: + resolution: {integrity: sha512-ENl7cYHaK/Ktwk5OTD+aDbQ3uC8IByu/6Bkg+HDv8Mm+XnBnppVNalcfJTNsp1ibstKh030/JKQQWglDvtKwEQ==} + + serialize-javascript@6.0.0: + resolution: {integrity: sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==} + + set-blocking@2.0.0: + resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} + + set-function-length@1.1.1: + resolution: {integrity: sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==} + engines: {node: '>= 0.4'} + + set-function-name@2.0.1: + resolution: {integrity: sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==} + engines: {node: '>= 0.4'} + + setimmediate@1.0.5: + resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==} + + setprototypeof@1.2.0: + resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} + + sha.js@2.4.11: + resolution: {integrity: sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==} + hasBin: true + + shallowequal@1.1.0: + resolution: {integrity: sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==} + + shebang-command@1.2.0: + resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} + engines: {node: '>=0.10.0'} + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@1.0.0: + resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==} + engines: {node: '>=0.10.0'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + side-channel@1.0.4: + resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} + + signal-exit@3.0.7: + resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + + slash@3.0.0: + resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} + engines: {node: '>=8'} + + slice-ansi@4.0.0: + resolution: {integrity: sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==} + engines: {node: '>=10'} + + smartwrap@2.0.2: + resolution: {integrity: sha512-vCsKNQxb7PnCNd2wY1WClWifAc2lwqsG8OaswpJkVJsvMGcnEntdTCDajZCkk93Ay1U3t/9puJmb525Rg5MZBA==} + engines: {node: '>=6'} + hasBin: true + + snake-case@2.1.0: + resolution: {integrity: sha512-FMR5YoPFwOLuh4rRz92dywJjyKYZNLpMn1R5ujVpIYkbA9p01fq8RMg0FkO4M+Yobt4MjHeLTJVm5xFFBHSV2Q==} + + solc@0.7.3: + resolution: {integrity: sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA==} + engines: {node: '>=8.0.0'} + hasBin: true + + solhint-plugin-prettier@0.1.0: + resolution: {integrity: sha512-SDOTSM6tZxZ6hamrzl3GUgzF77FM6jZplgL2plFBclj/OjKP8Z3eIPojKU73gRr0MvOS8ACZILn8a5g0VTz/Gw==} + peerDependencies: + prettier: ^3.0.0 + prettier-plugin-solidity: ^1.0.0 + + solhint@5.0.1: + resolution: {integrity: sha512-QeQLS9HGCnIiibt+xiOa/+MuP7BWz9N7C5+Mj9pLHshdkNhuo3AzCpWmjfWVZBUuwIUO3YyCRVIcYLR3YOKGfg==} + hasBin: true + + solidity-comments-darwin-arm64@0.0.2: + resolution: {integrity: sha512-HidWkVLSh7v+Vu0CA7oI21GWP/ZY7ro8g8OmIxE8oTqyMwgMbE8F1yc58Sj682Hj199HCZsjmtn1BE4PCbLiGA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + + solidity-comments-darwin-x64@0.0.2: + resolution: {integrity: sha512-Zjs0Ruz6faBTPT6fBecUt6qh4CdloT8Bwoc0+qxRoTn9UhYscmbPQkUgQEbS0FQPysYqVzzxJB4h1Ofbf4wwtA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + + solidity-comments-extractor@0.0.8: + resolution: {integrity: sha512-htM7Vn6LhHreR+EglVMd2s+sZhcXAirB1Zlyrv5zBuTxieCvjfnRpd7iZk75m/u6NOlEyQ94C6TWbBn2cY7w8g==} + + solidity-comments-freebsd-x64@0.0.2: + resolution: {integrity: sha512-8Qe4mpjuAxFSwZJVk7B8gAoLCdbtS412bQzBwk63L8dmlHogvE39iT70aAk3RHUddAppT5RMBunlPUCFYJ3ZTw==} + engines: {node: '>= 10'} + cpu: [x64] + os: [freebsd] + + solidity-comments-linux-arm64-gnu@0.0.2: + resolution: {integrity: sha512-spkb0MZZnmrP+Wtq4UxP+nyPAVRe82idOjqndolcNR0S9Xvu4ebwq+LvF4HiUgjTDmeiqYiFZQ8T9KGdLSIoIg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + + solidity-comments-linux-arm64-musl@0.0.2: + resolution: {integrity: sha512-guCDbHArcjE+JDXYkxx5RZzY1YF6OnAKCo+sTC5fstyW/KGKaQJNPyBNWuwYsQiaEHpvhW1ha537IvlGek8GqA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + + solidity-comments-linux-x64-gnu@0.0.2: + resolution: {integrity: sha512-zIqLehBK/g7tvrFmQljrfZXfkEeLt2v6wbe+uFu6kH/qAHZa7ybt8Vc0wYcmjo2U0PeBm15d79ee3AkwbIjFdQ==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + + solidity-comments-linux-x64-musl@0.0.2: + resolution: {integrity: sha512-R9FeDloVlFGTaVkOlELDVC7+1Tjx5WBPI5L8r0AGOPHK3+jOcRh6sKYpI+VskSPDc3vOO46INkpDgUXrKydlIw==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + + solidity-comments-win32-arm64-msvc@0.0.2: + resolution: {integrity: sha512-QnWJoCQcJj+rnutULOihN9bixOtYWDdF5Rfz9fpHejL1BtNjdLW1om55XNVHGAHPqBxV4aeQQ6OirKnp9zKsug==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] + + solidity-comments-win32-ia32-msvc@0.0.2: + resolution: {integrity: sha512-vUg4nADtm/NcOtlIymG23NWJUSuMsvX15nU7ynhGBsdKtt8xhdP3C/zA6vjDk8Jg+FXGQL6IHVQ++g/7rSQi0w==} + engines: {node: '>= 10'} + cpu: [ia32] + os: [win32] + + solidity-comments-win32-x64-msvc@0.0.2: + resolution: {integrity: sha512-36j+KUF4V/y0t3qatHm/LF5sCUCBx2UndxE1kq5bOzh/s+nQgatuyB+Pd5BfuPQHdWu2KaExYe20FlAa6NL7+Q==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + + solidity-comments@0.0.2: + resolution: {integrity: sha512-G+aK6qtyUfkn1guS8uzqUeua1dURwPlcOjoTYW/TwmXAcE7z/1+oGCfZUdMSe4ZMKklNbVZNiG5ibnF8gkkFfw==} + engines: {node: '>= 12'} + + sort-any@2.0.0: + resolution: {integrity: sha512-T9JoiDewQEmWcnmPn/s9h/PH9t3d/LSWi0RgVmXSuDYeZXTZOZ1/wrK2PHaptuR1VXe3clLLt0pD6sgVOwjNEA==} + + source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + + source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + + spawndamnit@2.0.0: + resolution: {integrity: sha512-j4JKEcncSjFlqIwU5L/rp2N5SIPsdxaRsIv678+TZxZ0SRDJTm8JrxJMjE/XuiEZNEir3S8l0Fa3Ke339WI4qA==} + + spdx-correct@3.1.1: + resolution: {integrity: sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==} + + spdx-exceptions@2.3.0: + resolution: {integrity: sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==} + + spdx-expression-parse@3.0.1: + resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} + + spdx-license-ids@3.0.12: + resolution: {integrity: sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==} + + sprintf-js@1.0.3: + resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} + + stacktrace-parser@0.1.10: + resolution: {integrity: sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg==} + engines: {node: '>=6'} + + statuses@2.0.1: + resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} + engines: {node: '>= 0.8'} + + stream-transform@2.1.3: + resolution: {integrity: sha512-9GHUiM5hMiCi6Y03jD2ARC1ettBXkQBoQAe7nJsPknnI0ow10aXjTnew8QtYQmLjzn974BnmWEAJgCY6ZP1DeQ==} + + string-format@2.0.0: + resolution: {integrity: sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA==} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + string.prototype.trim@1.2.8: + resolution: {integrity: sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==} + engines: {node: '>= 0.4'} + + string.prototype.trimend@1.0.7: + resolution: {integrity: sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==} + + string.prototype.trimstart@1.0.7: + resolution: {integrity: sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==} + + string_decoder@1.3.0: + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-bom@3.0.0: + resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} + engines: {node: '>=4'} + + strip-hex-prefix@1.0.0: + resolution: {integrity: sha1-DF8VX+8RUTczd96du1iNoFUA428=} + engines: {node: '>=6.5.0', npm: '>=3'} + + strip-indent@3.0.0: + resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} + engines: {node: '>=8'} + + strip-json-comments@2.0.1: + resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} + engines: {node: '>=0.10.0'} + + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + + supports-color@5.5.0: + resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} + engines: {node: '>=4'} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + supports-color@8.1.1: + resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} + engines: {node: '>=10'} + + supports-preserve-symlinks-flag@1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + + swap-case@1.1.2: + resolution: {integrity: sha512-BAmWG6/bx8syfc6qXPprof3Mn5vQgf5dwdUNJhsNqU9WdPt5P+ES/wQ5bxfijy8zwZgZZHslC3iAsxsuQMCzJQ==} + + synckit@0.8.8: + resolution: {integrity: sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==} + engines: {node: ^14.18.0 || >=16.0.0} + + table-layout@1.0.2: + resolution: {integrity: sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A==} + engines: {node: '>=8.0.0'} + + table@6.8.1: + resolution: {integrity: sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==} + engines: {node: '>=10.0.0'} + + term-size@2.2.1: + resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} + engines: {node: '>=8'} + + text-table@0.2.0: + resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} + + title-case@2.1.1: + resolution: {integrity: sha512-EkJoZ2O3zdCz3zJsYCsxyq2OC5hrxR9mfdd5I+w8h/tmFfeOxJ+vvkxsKxdmN0WtS9zLdHEgfgVOiMVgv+Po4Q==} + + tmp@0.0.33: + resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} + engines: {node: '>=0.6.0'} + + to-regex-range@5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + + toidentifier@1.0.1: + resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} + engines: {node: '>=0.6'} + + tr46@0.0.3: + resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + + trim-newlines@3.0.1: + resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} + engines: {node: '>=8'} + + ts-api-utils@1.3.0: + resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} + engines: {node: '>=16'} + peerDependencies: + typescript: '>=4.2.0' + + ts-command-line-args@2.5.1: + resolution: {integrity: sha512-H69ZwTw3rFHb5WYpQya40YAX2/w7Ut75uUECbgBIsLmM+BNuYnxsltfyyLMxy6sEeKxgijLTnQtLd0nKd6+IYw==} + hasBin: true + + ts-essentials@7.0.3: + resolution: {integrity: sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ==} + peerDependencies: + typescript: '>=3.7.0' + + ts-node@10.9.2: + resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + + tslib@1.14.1: + resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} + + tslib@2.6.2: + resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + + tsort@0.0.1: + resolution: {integrity: sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw==} + + tty-table@4.2.3: + resolution: {integrity: sha512-Fs15mu0vGzCrj8fmJNP7Ynxt5J7praPXqFN0leZeZBXJwkMxv9cb2D454k1ltrtUSJbZ4yH4e0CynsHLxmUfFA==} + engines: {node: '>=8.0.0'} + hasBin: true + + tweetnacl-util@0.15.1: + resolution: {integrity: sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==} + + tweetnacl@1.0.3: + resolution: {integrity: sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==} + + type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + + type-detect@4.0.8: + 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'} + + type-fest@0.20.2: + resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} + engines: {node: '>=10'} + + type-fest@0.21.3: + resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} + engines: {node: '>=10'} + + type-fest@0.6.0: + resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==} + engines: {node: '>=8'} + + type-fest@0.7.1: + resolution: {integrity: sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==} + engines: {node: '>=8'} + + type-fest@0.8.1: + resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} + engines: {node: '>=8'} + + typechain@8.3.2: + resolution: {integrity: sha512-x/sQYr5w9K7yv3es7jo4KTX05CLxOf7TRWwoHlrjRh8H82G64g+k7VuWPJlgMo6qrjfCulOdfBjiaDtmhFYD/Q==} + hasBin: true + peerDependencies: + typescript: '>=4.3.0' + + typed-array-buffer@1.0.0: + resolution: {integrity: sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==} + engines: {node: '>= 0.4'} + + typed-array-byte-length@1.0.0: + resolution: {integrity: sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==} + engines: {node: '>= 0.4'} + + typed-array-byte-offset@1.0.0: + resolution: {integrity: sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==} + engines: {node: '>= 0.4'} + + typed-array-length@1.0.4: + resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==} + + typescript@5.4.5: + resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} + engines: {node: '>=14.17'} + hasBin: true + + typical@4.0.0: + resolution: {integrity: sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==} + engines: {node: '>=8'} + + typical@5.2.0: + resolution: {integrity: sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==} + engines: {node: '>=8'} + + unbox-primitive@1.0.2: + resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} + + undici-types@5.26.5: + resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + + undici@5.28.4: + resolution: {integrity: sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==} + engines: {node: '>=14.0'} + + universalify@0.1.2: + resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} + engines: {node: '>= 4.0.0'} + + universalify@2.0.0: + resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} + engines: {node: '>= 10.0.0'} + + unpipe@1.0.0: + resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} + engines: {node: '>= 0.8'} + + upper-case-first@1.1.2: + resolution: {integrity: sha512-wINKYvI3Db8dtjikdAqoBbZoP6Q+PZUyfMR7pmwHzjC2quzSkUq5DmPrTtPEqHaz8AGtmsB4TqwapMTM1QAQOQ==} + + upper-case@1.1.3: + resolution: {integrity: sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA==} + + uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + + utf8@3.0.0: + resolution: {integrity: sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==} + + util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + + uuid@8.3.2: + resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} + hasBin: true + + v8-compile-cache-lib@3.0.1: + resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} + + validate-npm-package-license@3.0.4: + resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} + + wcwidth@1.0.1: + resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} + + web3-utils@1.7.4: + resolution: {integrity: sha512-acBdm6Evd0TEZRnChM/MCvGsMwYKmSh7OaUfNf5OKG0CIeGWD/6gqLOWIwmwSnre/2WrA1nKGId5uW2e5EfluA==} + engines: {node: '>=8.0.0'} -packages: + webidl-conversions@3.0.1: + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} - /@aashutoshrathi/word-wrap@1.2.6: - resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} - engines: {node: '>=0.10.0'} - dev: true + whatwg-url@5.0.0: + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} - /@babel/code-frame@7.18.6: - resolution: {integrity: sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==} - engines: {node: '>=6.9.0'} + which-boxed-primitive@1.0.2: + resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} + + which-module@2.0.0: + resolution: {integrity: sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==} + + which-pm@2.0.0: + resolution: {integrity: sha512-Lhs9Pmyph0p5n5Z3mVnN0yWcbQYUAD7rbQUiMsQxOJ3T57k7RFe35SUwWMf7dsbDZks1uOmw4AecB/JMDj3v/w==} + engines: {node: '>=8.15'} + + which-typed-array@1.1.13: + resolution: {integrity: sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==} + engines: {node: '>= 0.4'} + + which@1.3.1: + resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} + hasBin: true + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + widest-line@3.1.0: + resolution: {integrity: sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==} + engines: {node: '>=8'} + + wordwrapjs@4.0.1: + resolution: {integrity: sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA==} + engines: {node: '>=8.0.0'} + + workerpool@6.2.1: + resolution: {integrity: sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==} + + wrap-ansi@6.2.0: + resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} + engines: {node: '>=8'} + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + + ws@7.4.6: + resolution: {integrity: sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==} + engines: {node: '>=8.3.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + + ws@7.5.9: + resolution: {integrity: sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==} + engines: {node: '>=8.3.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + + y18n@4.0.3: + resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} + + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + + yallist@2.1.2: + resolution: {integrity: sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==} + + yargs-parser@18.1.3: + resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} + engines: {node: '>=6'} + + yargs-parser@20.2.4: + resolution: {integrity: sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==} + engines: {node: '>=10'} + + yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + + yargs-unparser@2.0.0: + resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} + engines: {node: '>=10'} + + yargs@15.4.1: + resolution: {integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==} + engines: {node: '>=8'} + + yargs@16.2.0: + resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} + engines: {node: '>=10'} + + yargs@17.7.2: + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} + engines: {node: '>=12'} + + yn@3.1.1: + resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} + engines: {node: '>=6'} + + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + +snapshots: + + '@aashutoshrathi/word-wrap@1.2.6': {} + + '@babel/code-frame@7.18.6': dependencies: '@babel/highlight': 7.18.6 - /@babel/helper-validator-identifier@7.19.1: - resolution: {integrity: sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==} - engines: {node: '>=6.9.0'} + '@babel/helper-validator-identifier@7.19.1': {} - /@babel/highlight@7.18.6: - resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==} - engines: {node: '>=6.9.0'} + '@babel/highlight@7.18.6': dependencies: '@babel/helper-validator-identifier': 7.19.1 chalk: 2.4.2 js-tokens: 4.0.0 - /@babel/runtime@7.24.0: - resolution: {integrity: sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw==} - engines: {node: '>=6.9.0'} + '@babel/runtime@7.24.0': dependencies: regenerator-runtime: 0.14.1 - /@changesets/apply-release-plan@7.0.1: - resolution: {integrity: sha512-aPdSq/R++HOyfEeBGjEe6LNG8gs0KMSyRETD/J2092OkNq8mOioAxyKjMbvVUdzgr/HTawzMOz7lfw339KnsCA==} + '@chainlink/solhint-plugin-chainlink-solidity@https://codeload.github.com/smartcontractkit/chainlink-solhint-rules/tar.gz/1b4c0c2663fcd983589d4f33a2e73908624ed43c': {} + + '@changesets/apply-release-plan@7.0.1': dependencies: '@babel/runtime': 7.24.0 '@changesets/config': 3.0.0 @@ -199,10 +3188,8 @@ packages: prettier: 2.8.8 resolve-from: 5.0.0 semver: 7.6.2 - dev: false - /@changesets/assemble-release-plan@6.0.0: - resolution: {integrity: sha512-4QG7NuisAjisbW4hkLCmGW2lRYdPrKzro+fCtZaILX+3zdUELSvYjpL4GTv0E4aM9Mef3PuIQp89VmHJ4y2bfw==} + '@changesets/assemble-release-plan@6.0.0': dependencies: '@babel/runtime': 7.24.0 '@changesets/errors': 0.2.0 @@ -210,27 +3197,20 @@ packages: '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 semver: 7.6.2 - dev: false - /@changesets/changelog-git@0.2.0: - resolution: {integrity: sha512-bHOx97iFI4OClIT35Lok3sJAwM31VbUM++gnMBV16fdbtBhgYu4dxsphBF/0AZZsyAHMrnM0yFcj5gZM1py6uQ==} + '@changesets/changelog-git@0.2.0': dependencies: '@changesets/types': 6.0.0 - dev: false - /@changesets/changelog-github@0.5.0: - resolution: {integrity: sha512-zoeq2LJJVcPJcIotHRJEEA2qCqX0AQIeFE+L21L8sRLPVqDhSXY8ZWAt2sohtBpFZkBwu+LUwMSKRr2lMy3LJA==} + '@changesets/changelog-github@0.5.0': dependencies: '@changesets/get-github-info': 0.6.0 '@changesets/types': 6.0.0 dotenv: 8.6.0 transitivePeerDependencies: - encoding - dev: false - /@changesets/cli@2.27.3: - resolution: {integrity: sha512-ve/VpWApILlSs8cr0okNx5C2LKRawI9XZgvfmf58S8sar2nhx5DPJREFXYZBahs0FeTfvH0rdVl+nGe8QF45Ig==} - hasBin: true + '@changesets/cli@2.27.3': dependencies: '@babel/runtime': 7.24.0 '@changesets/apply-release-plan': 7.0.1 @@ -264,10 +3244,8 @@ packages: spawndamnit: 2.0.0 term-size: 2.2.1 tty-table: 4.2.3 - dev: false - /@changesets/config@3.0.0: - resolution: {integrity: sha512-o/rwLNnAo/+j9Yvw9mkBQOZySDYyOr/q+wptRLcAVGlU6djOeP9v1nlalbL9MFsobuBVQbZCTp+dIzdq+CLQUA==} + '@changesets/config@3.0.0': dependencies: '@changesets/errors': 0.2.0 '@changesets/get-dependents-graph': 2.0.0 @@ -276,35 +3254,27 @@ packages: '@manypkg/get-packages': 1.1.3 fs-extra: 7.0.1 micromatch: 4.0.5 - dev: false - /@changesets/errors@0.2.0: - resolution: {integrity: sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==} + '@changesets/errors@0.2.0': dependencies: extendable-error: 0.1.7 - dev: false - /@changesets/get-dependents-graph@2.0.0: - resolution: {integrity: sha512-cafUXponivK4vBgZ3yLu944mTvam06XEn2IZGjjKc0antpenkYANXiiE6GExV/yKdsCnE8dXVZ25yGqLYZmScA==} + '@changesets/get-dependents-graph@2.0.0': dependencies: '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 chalk: 2.4.2 fs-extra: 7.0.1 semver: 7.6.2 - dev: false - /@changesets/get-github-info@0.6.0: - resolution: {integrity: sha512-v/TSnFVXI8vzX9/w3DU2Ol+UlTZcu3m0kXTjTT4KlAdwSvwutcByYwyYn9hwerPWfPkT2JfpoX0KgvCEi8Q/SA==} + '@changesets/get-github-info@0.6.0': dependencies: dataloader: 1.4.0 node-fetch: 2.6.7 transitivePeerDependencies: - encoding - dev: false - /@changesets/get-release-plan@4.0.0: - resolution: {integrity: sha512-9L9xCUeD/Tb6L/oKmpm8nyzsOzhdNBBbt/ZNcjynbHC07WW4E1eX8NMGC5g5SbM5z/V+MOrYsJ4lRW41GCbg3w==} + '@changesets/get-release-plan@4.0.0': dependencies: '@babel/runtime': 7.24.0 '@changesets/assemble-release-plan': 6.0.0 @@ -313,14 +3283,10 @@ packages: '@changesets/read': 0.6.0 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 - dev: false - /@changesets/get-version-range-type@0.4.0: - resolution: {integrity: sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ==} - dev: false + '@changesets/get-version-range-type@0.4.0': {} - /@changesets/git@3.0.0: - resolution: {integrity: sha512-vvhnZDHe2eiBNRFHEgMiGd2CT+164dfYyrJDhwwxTVD/OW0FUD6G7+4DIx1dNwkwjHyzisxGAU96q0sVNBns0w==} + '@changesets/git@3.0.0': dependencies: '@babel/runtime': 7.24.0 '@changesets/errors': 0.2.0 @@ -329,33 +3295,25 @@ packages: is-subdir: 1.2.0 micromatch: 4.0.5 spawndamnit: 2.0.0 - dev: false - /@changesets/logger@0.1.0: - resolution: {integrity: sha512-pBrJm4CQm9VqFVwWnSqKEfsS2ESnwqwH+xR7jETxIErZcfd1u2zBSqrHbRHR7xjhSgep9x2PSKFKY//FAshA3g==} + '@changesets/logger@0.1.0': dependencies: chalk: 2.4.2 - dev: false - /@changesets/parse@0.4.0: - resolution: {integrity: sha512-TS/9KG2CdGXS27S+QxbZXgr8uPsP4yNJYb4BC2/NeFUj80Rni3TeD2qwWmabymxmrLo7JEsytXH1FbpKTbvivw==} + '@changesets/parse@0.4.0': dependencies: '@changesets/types': 6.0.0 js-yaml: 3.14.1 - dev: false - /@changesets/pre@2.0.0: - resolution: {integrity: sha512-HLTNYX/A4jZxc+Sq8D1AMBsv+1qD6rmmJtjsCJa/9MSRybdxh0mjbTvE6JYZQ/ZiQ0mMlDOlGPXTm9KLTU3jyw==} + '@changesets/pre@2.0.0': dependencies: '@babel/runtime': 7.24.0 '@changesets/errors': 0.2.0 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 fs-extra: 7.0.1 - dev: false - /@changesets/read@0.6.0: - resolution: {integrity: sha512-ZypqX8+/im1Fm98K4YcZtmLKgjs1kDQ5zHpc2U1qdtNBmZZfo/IBiG162RoP0CUF05tvp2y4IspH11PLnPxuuw==} + '@changesets/read@0.6.0': dependencies: '@babel/runtime': 7.24.0 '@changesets/git': 3.0.0 @@ -365,51 +3323,31 @@ packages: 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@4.1.0': {} - /@changesets/types@6.0.0: - resolution: {integrity: sha512-b1UkfNulgKoWfqyHtzKS5fOZYSJO+77adgL7DLRDr+/7jhChN+QcHnbjiQVOz/U+Ts3PGNySq7diAItzDgugfQ==} - dev: false + '@changesets/types@6.0.0': {} - /@changesets/write@0.3.1: - resolution: {integrity: sha512-SyGtMXzH3qFqlHKcvFY2eX+6b0NGiFcNav8AFsYwy5l8hejOeoeTDemu5Yjmke2V5jpzY+pBvM0vCCQ3gdZpfw==} + '@changesets/write@0.3.1': dependencies: '@babel/runtime': 7.24.0 '@changesets/types': 6.0.0 fs-extra: 7.0.1 human-id: 1.0.2 prettier: 2.8.8 - dev: false - /@cspotcode/source-map-support@0.8.1: - resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} - engines: {node: '>=12'} + '@cspotcode/source-map-support@0.8.1': dependencies: '@jridgewell/trace-mapping': 0.3.9 - dev: true - /@eslint-community/eslint-utils@4.4.0(eslint@8.57.0): - resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)': dependencies: eslint: 8.57.0 eslint-visitor-keys: 3.4.3 - dev: true - /@eslint-community/regexpp@4.10.0: - resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - dev: true + '@eslint-community/regexpp@4.10.0': {} - /@eslint/eslintrc@2.1.4: - resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 debug: 4.3.4(supports-color@8.1.1) @@ -422,17 +3360,10 @@ packages: strip-json-comments: 3.1.1 transitivePeerDependencies: - supports-color - dev: true - /@eslint/js@8.57.0: - resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true + '@eslint/js@8.57.0': {} - /@eth-optimism/contracts@0.6.0(ethers@5.7.2): - resolution: {integrity: sha512-vQ04wfG9kMf1Fwy3FEMqH2QZbgS0gldKhcBeBUPfO8zu68L61VI97UDXmsMQXzTsEAxK8HnokW3/gosl4/NW3w==} - peerDependencies: - ethers: ^5 + '@eth-optimism/contracts@0.6.0(ethers@5.7.2)': dependencies: '@eth-optimism/core-utils': 0.12.0 '@ethersproject/abstract-provider': 5.7.0 @@ -441,10 +3372,8 @@ packages: transitivePeerDependencies: - bufferutil - utf-8-validate - dev: false - /@eth-optimism/core-utils@0.12.0: - resolution: {integrity: sha512-qW+7LZYCz7i8dRa7SRlUKIo1VBU8lvN0HeXCxJR+z+xtMzMQpPds20XJNCMclszxYQHkXY00fOT6GvFw9ZL6nw==} + '@eth-optimism/core-utils@0.12.0': dependencies: '@ethersproject/abi': 5.7.0 '@ethersproject/abstract-provider': 5.7.0 @@ -465,21 +3394,16 @@ packages: transitivePeerDependencies: - bufferutil - utf-8-validate - dev: false - /@ethereum-waffle/mock-contract@3.4.4: - resolution: {integrity: sha512-Mp0iB2YNWYGUV+VMl5tjPsaXKbKo8MDH9wSJ702l9EBjdxFf/vBvnMBAC1Fub1lLtmD0JHtp1pq+mWzg/xlLnA==} - engines: {node: '>=10.0'} + '@ethereum-waffle/mock-contract@3.4.4': dependencies: '@ethersproject/abi': 5.7.0 ethers: 5.7.2 transitivePeerDependencies: - bufferutil - utf-8-validate - dev: true - /@ethersproject/abi@5.7.0: - resolution: {integrity: sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==} + '@ethersproject/abi@5.7.0': dependencies: '@ethersproject/address': 5.7.0 '@ethersproject/bignumber': 5.7.0 @@ -491,8 +3415,7 @@ packages: '@ethersproject/properties': 5.7.0 '@ethersproject/strings': 5.7.0 - /@ethersproject/abstract-provider@5.7.0: - resolution: {integrity: sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw==} + '@ethersproject/abstract-provider@5.7.0': dependencies: '@ethersproject/bignumber': 5.7.0 '@ethersproject/bytes': 5.7.0 @@ -502,8 +3425,7 @@ packages: '@ethersproject/transactions': 5.7.0 '@ethersproject/web': 5.7.1 - /@ethersproject/abstract-signer@5.7.0: - resolution: {integrity: sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ==} + '@ethersproject/abstract-signer@5.7.0': dependencies: '@ethersproject/abstract-provider': 5.7.0 '@ethersproject/bignumber': 5.7.0 @@ -511,8 +3433,7 @@ packages: '@ethersproject/logger': 5.0.6 '@ethersproject/properties': 5.7.0 - /@ethersproject/address@5.7.0: - resolution: {integrity: sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA==} + '@ethersproject/address@5.7.0': dependencies: '@ethersproject/bignumber': 5.7.0 '@ethersproject/bytes': 5.7.0 @@ -520,36 +3441,30 @@ packages: '@ethersproject/logger': 5.0.6 '@ethersproject/rlp': 5.7.0 - /@ethersproject/base64@5.7.0: - resolution: {integrity: sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ==} + '@ethersproject/base64@5.7.0': dependencies: '@ethersproject/bytes': 5.7.0 - /@ethersproject/basex@5.7.0: - resolution: {integrity: sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw==} + '@ethersproject/basex@5.7.0': dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/properties': 5.7.0 - /@ethersproject/bignumber@5.7.0: - resolution: {integrity: sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw==} + '@ethersproject/bignumber@5.7.0': dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/logger': 5.0.6 bn.js: 5.2.1 - /@ethersproject/bytes@5.7.0: - resolution: {integrity: sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==} + '@ethersproject/bytes@5.7.0': dependencies: '@ethersproject/logger': 5.0.6 - /@ethersproject/constants@5.7.0: - resolution: {integrity: sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA==} + '@ethersproject/constants@5.7.0': dependencies: '@ethersproject/bignumber': 5.7.0 - /@ethersproject/contracts@5.7.0: - resolution: {integrity: sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg==} + '@ethersproject/contracts@5.7.0': dependencies: '@ethersproject/abi': 5.7.0 '@ethersproject/abstract-provider': 5.7.0 @@ -562,8 +3477,7 @@ packages: '@ethersproject/properties': 5.7.0 '@ethersproject/transactions': 5.7.0 - /@ethersproject/hash@5.7.0: - resolution: {integrity: sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==} + '@ethersproject/hash@5.7.0': dependencies: '@ethersproject/abstract-signer': 5.7.0 '@ethersproject/address': 5.7.0 @@ -575,8 +3489,7 @@ packages: '@ethersproject/properties': 5.7.0 '@ethersproject/strings': 5.7.0 - /@ethersproject/hdnode@5.7.0: - resolution: {integrity: sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg==} + '@ethersproject/hdnode@5.7.0': dependencies: '@ethersproject/abstract-signer': 5.7.0 '@ethersproject/basex': 5.7.0 @@ -591,8 +3504,7 @@ packages: '@ethersproject/transactions': 5.7.0 '@ethersproject/wordlists': 5.7.0 - /@ethersproject/json-wallets@5.7.0: - resolution: {integrity: sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g==} + '@ethersproject/json-wallets@5.7.0': dependencies: '@ethersproject/abstract-signer': 5.7.0 '@ethersproject/address': 5.7.0 @@ -608,33 +3520,27 @@ packages: aes-js: 3.0.0 scrypt-js: 3.0.1 - /@ethersproject/keccak256@5.7.0: - resolution: {integrity: sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg==} + '@ethersproject/keccak256@5.7.0': dependencies: '@ethersproject/bytes': 5.7.0 js-sha3: 0.8.0 - /@ethersproject/logger@5.0.6: - resolution: {integrity: sha512-FrX0Vnb3JZ1md/7GIZfmJ06XOAA8r3q9Uqt9O5orr4ZiksnbpXKlyDzQtlZ5Yv18RS8CAUbiKH9vwidJg1BPmQ==} + '@ethersproject/logger@5.0.6': {} - /@ethersproject/networks@5.7.1: - resolution: {integrity: sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ==} + '@ethersproject/networks@5.7.1': dependencies: '@ethersproject/logger': 5.0.6 - /@ethersproject/pbkdf2@5.7.0: - resolution: {integrity: sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw==} + '@ethersproject/pbkdf2@5.7.0': dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/sha2': 5.7.0 - /@ethersproject/properties@5.7.0: - resolution: {integrity: sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw==} + '@ethersproject/properties@5.7.0': dependencies: '@ethersproject/logger': 5.0.6 - /@ethersproject/providers@5.7.2: - resolution: {integrity: sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg==} + '@ethersproject/providers@5.7.2': dependencies: '@ethersproject/abstract-provider': 5.7.0 '@ethersproject/abstract-signer': 5.7.0 @@ -660,27 +3566,23 @@ packages: - bufferutil - utf-8-validate - /@ethersproject/random@5.7.0: - resolution: {integrity: sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ==} + '@ethersproject/random@5.7.0': dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/logger': 5.0.6 - /@ethersproject/rlp@5.7.0: - resolution: {integrity: sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w==} + '@ethersproject/rlp@5.7.0': dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/logger': 5.0.6 - /@ethersproject/sha2@5.7.0: - resolution: {integrity: sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw==} + '@ethersproject/sha2@5.7.0': dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/logger': 5.0.6 hash.js: 1.1.7 - /@ethersproject/signing-key@5.7.0: - resolution: {integrity: sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q==} + '@ethersproject/signing-key@5.7.0': dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/logger': 5.0.6 @@ -689,8 +3591,7 @@ packages: elliptic: 6.5.4 hash.js: 1.1.7 - /@ethersproject/solidity@5.7.0: - resolution: {integrity: sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA==} + '@ethersproject/solidity@5.7.0': dependencies: '@ethersproject/bignumber': 5.7.0 '@ethersproject/bytes': 5.7.0 @@ -699,15 +3600,13 @@ packages: '@ethersproject/sha2': 5.7.0 '@ethersproject/strings': 5.7.0 - /@ethersproject/strings@5.7.0: - resolution: {integrity: sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg==} + '@ethersproject/strings@5.7.0': dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/constants': 5.7.0 '@ethersproject/logger': 5.0.6 - /@ethersproject/transactions@5.7.0: - resolution: {integrity: sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ==} + '@ethersproject/transactions@5.7.0': dependencies: '@ethersproject/address': 5.7.0 '@ethersproject/bignumber': 5.7.0 @@ -719,15 +3618,13 @@ packages: '@ethersproject/rlp': 5.7.0 '@ethersproject/signing-key': 5.7.0 - /@ethersproject/units@5.7.0: - resolution: {integrity: sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg==} + '@ethersproject/units@5.7.0': dependencies: '@ethersproject/bignumber': 5.7.0 '@ethersproject/constants': 5.7.0 '@ethersproject/logger': 5.0.6 - /@ethersproject/wallet@5.7.0: - resolution: {integrity: sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA==} + '@ethersproject/wallet@5.7.0': dependencies: '@ethersproject/abstract-provider': 5.7.0 '@ethersproject/abstract-signer': 5.7.0 @@ -745,8 +3642,7 @@ packages: '@ethersproject/transactions': 5.7.0 '@ethersproject/wordlists': 5.7.0 - /@ethersproject/web@5.7.1: - resolution: {integrity: sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w==} + '@ethersproject/web@5.7.1': dependencies: '@ethersproject/base64': 5.7.0 '@ethersproject/bytes': 5.7.0 @@ -754,8 +3650,7 @@ packages: '@ethersproject/properties': 5.7.0 '@ethersproject/strings': 5.7.0 - /@ethersproject/wordlists@5.7.0: - resolution: {integrity: sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA==} + '@ethersproject/wordlists@5.7.0': dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/hash': 5.7.0 @@ -763,58 +3658,37 @@ packages: '@ethersproject/properties': 5.7.0 '@ethersproject/strings': 5.7.0 - /@fastify/busboy@2.1.1: - resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==} - engines: {node: '>=14'} - dev: true + '@fastify/busboy@2.1.1': {} - /@humanwhocodes/config-array@0.11.14: - resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} - engines: {node: '>=10.10.0'} + '@humanwhocodes/config-array@0.11.14': dependencies: '@humanwhocodes/object-schema': 2.0.3 debug: 4.3.4(supports-color@8.1.1) minimatch: 3.1.2 transitivePeerDependencies: - supports-color - dev: true - /@humanwhocodes/module-importer@1.0.1: - resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} - engines: {node: '>=12.22'} - dev: true + '@humanwhocodes/module-importer@1.0.1': {} - /@humanwhocodes/object-schema@2.0.3: - resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} - dev: true + '@humanwhocodes/object-schema@2.0.3': {} - /@jridgewell/resolve-uri@3.1.1: - resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==} - engines: {node: '>=6.0.0'} - dev: true + '@jridgewell/resolve-uri@3.1.1': {} - /@jridgewell/sourcemap-codec@1.4.15: - resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} - dev: true + '@jridgewell/sourcemap-codec@1.4.15': {} - /@jridgewell/trace-mapping@0.3.9: - resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + '@jridgewell/trace-mapping@0.3.9': dependencies: '@jridgewell/resolve-uri': 3.1.1 '@jridgewell/sourcemap-codec': 1.4.15 - dev: true - /@manypkg/find-root@1.1.0: - resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} + '@manypkg/find-root@1.1.0': 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==} + '@manypkg/get-packages@1.1.3': dependencies: '@babel/runtime': 7.24.0 '@changesets/types': 4.1.0 @@ -822,48 +3696,32 @@ packages: 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'} + '@metamask/eth-sig-util@4.0.1': dependencies: ethereumjs-abi: 0.6.8 ethereumjs-util: 6.2.1 ethjs-util: 0.1.6 tweetnacl: 1.0.3 tweetnacl-util: 0.15.1 - dev: true - /@noble/hashes@1.1.2: - resolution: {integrity: sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA==} - dev: true + '@noble/hashes@1.1.2': {} - /@noble/secp256k1@1.6.3: - resolution: {integrity: sha512-T04e4iTurVy7I8Sw4+c5OSN9/RkPlo1uKxAomtxQNLq8j1uPAqnsqG1bqvY3Jv7c13gyr6dui0zmh/I3+f/JaQ==} - dev: true + '@noble/secp256k1@1.6.3': {} - /@nodelib/fs.scandir@2.1.5: - resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} - engines: {node: '>= 8'} + '@nodelib/fs.scandir@2.1.5': dependencies: '@nodelib/fs.stat': 2.0.5 run-parallel: 1.1.9 - /@nodelib/fs.stat@2.0.5: - resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} - engines: {node: '>= 8'} + '@nodelib/fs.stat@2.0.5': {} - /@nodelib/fs.walk@1.2.8: - resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} - engines: {node: '>= 8'} + '@nodelib/fs.walk@1.2.8': dependencies: '@nodelib/fs.scandir': 2.1.5 fastq: 1.6.0 - /@nomicfoundation/ethereumjs-block@5.0.4: - resolution: {integrity: sha512-AcyacJ9eX/uPEvqsPiB+WO1ymE+kyH48qGGiGV+YTojdtas8itUTW5dehDSOXEEItWGbbzEJ4PRqnQZlWaPvDw==} - engines: {node: '>=18'} + '@nomicfoundation/ethereumjs-block@5.0.4': dependencies: '@nomicfoundation/ethereumjs-common': 4.0.4 '@nomicfoundation/ethereumjs-rlp': 5.0.4 @@ -873,11 +3731,8 @@ packages: ethereum-cryptography: 0.1.3 transitivePeerDependencies: - c-kzg - dev: true - /@nomicfoundation/ethereumjs-blockchain@7.0.4: - resolution: {integrity: sha512-jYsd/kwzbmpnxx86tXsYV8wZ5xGvFL+7/P0c6OlzpClHsbFzeF41KrYA9scON8Rg6bZu3ZTv6JOAgj3t7USUfg==} - engines: {node: '>=18'} + '@nomicfoundation/ethereumjs-blockchain@7.0.4': dependencies: '@nomicfoundation/ethereumjs-block': 5.0.4 '@nomicfoundation/ethereumjs-common': 4.0.4 @@ -892,19 +3747,14 @@ packages: transitivePeerDependencies: - c-kzg - supports-color - dev: true - /@nomicfoundation/ethereumjs-common@4.0.4: - resolution: {integrity: sha512-9Rgb658lcWsjiicr5GzNCjI1llow/7r0k50dLL95OJ+6iZJcVbi15r3Y0xh2cIO+zgX0WIHcbzIu6FeQf9KPrg==} + '@nomicfoundation/ethereumjs-common@4.0.4': dependencies: '@nomicfoundation/ethereumjs-util': 9.0.4 transitivePeerDependencies: - c-kzg - dev: true - /@nomicfoundation/ethereumjs-ethash@3.0.4: - resolution: {integrity: sha512-xvIrwIMl9sSaiYKRem68+O7vYdj7Q2XWv5P7JXiIkn83918QzWHvqbswTRsH7+r6X1UEvdsURRnZbvZszEjAaQ==} - engines: {node: '>=18'} + '@nomicfoundation/ethereumjs-ethash@3.0.4': dependencies: '@nomicfoundation/ethereumjs-block': 5.0.4 '@nomicfoundation/ethereumjs-rlp': 5.0.4 @@ -913,11 +3763,8 @@ packages: ethereum-cryptography: 0.1.3 transitivePeerDependencies: - c-kzg - dev: true - /@nomicfoundation/ethereumjs-evm@2.0.4(@nomicfoundation/ethereumjs-verkle@0.0.2): - resolution: {integrity: sha512-lTyZZi1KpeMHzaO6cSVisR2tjiTTedjo7PcmhI/+GNFo9BmyY6QYzGeSti0sFttmjbEMioHgXxl5yrLNRg6+1w==} - engines: {node: '>=18'} + '@nomicfoundation/ethereumjs-evm@2.0.4(@nomicfoundation/ethereumjs-verkle@0.0.2)': dependencies: '@nomicfoundation/ethereumjs-common': 4.0.4 '@nomicfoundation/ethereumjs-statemanager': 2.0.4(@nomicfoundation/ethereumjs-verkle@0.0.2) @@ -931,21 +3778,10 @@ packages: - '@nomicfoundation/ethereumjs-verkle' - c-kzg - supports-color - dev: true - /@nomicfoundation/ethereumjs-rlp@5.0.4: - resolution: {integrity: sha512-8H1S3s8F6QueOc/X92SdrA4RDenpiAEqMg5vJH99kcQaCy/a3Q6fgseo75mgWlbanGJXSlAPtnCeG9jvfTYXlw==} - engines: {node: '>=18'} - hasBin: true - dev: true + '@nomicfoundation/ethereumjs-rlp@5.0.4': {} - /@nomicfoundation/ethereumjs-statemanager@2.0.4(@nomicfoundation/ethereumjs-verkle@0.0.2): - resolution: {integrity: sha512-HPDjeFrxw6llEi+BzqXkZ+KkvFnTOPczuHBtk21hRlDiuKuZz32dPzlhpRsDBGV1b5JTmRDUVqCS1lp3Gghw4Q==} - peerDependencies: - '@nomicfoundation/ethereumjs-verkle': 0.0.2 - peerDependenciesMeta: - '@nomicfoundation/ethereumjs-verkle': - optional: true + '@nomicfoundation/ethereumjs-statemanager@2.0.4(@nomicfoundation/ethereumjs-verkle@0.0.2)': dependencies: '@nomicfoundation/ethereumjs-common': 4.0.4 '@nomicfoundation/ethereumjs-rlp': 5.0.4 @@ -959,11 +3795,8 @@ packages: transitivePeerDependencies: - c-kzg - supports-color - dev: true - /@nomicfoundation/ethereumjs-trie@6.0.4: - resolution: {integrity: sha512-3nSwQiFMvr2VFe/aZUyinuohYvtytUqZCUCvIWcPJ/BwJH6oQdZRB42aNFBJ/8nAh2s3OcroWpBLskzW01mFKA==} - engines: {node: '>=18'} + '@nomicfoundation/ethereumjs-trie@6.0.4': dependencies: '@nomicfoundation/ethereumjs-rlp': 5.0.4 '@nomicfoundation/ethereumjs-util': 9.0.4 @@ -973,39 +3806,20 @@ packages: readable-stream: 3.6.0 transitivePeerDependencies: - c-kzg - dev: true - /@nomicfoundation/ethereumjs-tx@5.0.4: - resolution: {integrity: sha512-Xjv8wAKJGMrP1f0n2PeyfFCCojHd7iS3s/Ab7qzF1S64kxZ8Z22LCMynArYsVqiFx6rzYy548HNVEyI+AYN/kw==} - engines: {node: '>=18'} - peerDependencies: - c-kzg: ^2.1.2 - peerDependenciesMeta: - c-kzg: - optional: true + '@nomicfoundation/ethereumjs-tx@5.0.4': dependencies: '@nomicfoundation/ethereumjs-common': 4.0.4 '@nomicfoundation/ethereumjs-rlp': 5.0.4 '@nomicfoundation/ethereumjs-util': 9.0.4 ethereum-cryptography: 0.1.3 - dev: true - /@nomicfoundation/ethereumjs-util@9.0.4: - resolution: {integrity: sha512-sLOzjnSrlx9Bb9EFNtHzK/FJFsfg2re6bsGqinFinH1gCqVfz9YYlXiMWwDM4C/L4ywuHFCYwfKTVr/QHQcU0Q==} - engines: {node: '>=18'} - peerDependencies: - c-kzg: ^2.1.2 - peerDependenciesMeta: - c-kzg: - optional: true + '@nomicfoundation/ethereumjs-util@9.0.4': dependencies: '@nomicfoundation/ethereumjs-rlp': 5.0.4 ethereum-cryptography: 0.1.3 - dev: true - /@nomicfoundation/ethereumjs-verkle@0.0.2: - resolution: {integrity: sha512-bjnfZElpYGK/XuuVRmLS3yDvr+cDs85D9oonZ0YUa5A3lgFgokWMp76zXrxX2jVQ0BfHaw12y860n1+iOi6yFQ==} - engines: {node: '>=18'} + '@nomicfoundation/ethereumjs-verkle@0.0.2': dependencies: '@nomicfoundation/ethereumjs-rlp': 5.0.4 '@nomicfoundation/ethereumjs-util': 9.0.4 @@ -1013,11 +3827,8 @@ packages: rust-verkle-wasm: 0.0.1 transitivePeerDependencies: - c-kzg - dev: true - /@nomicfoundation/ethereumjs-vm@7.0.4(@nomicfoundation/ethereumjs-verkle@0.0.2): - resolution: {integrity: sha512-gsA4IhmtWHI4BofKy3kio9W+dqZQs5Ji5mLjLYxHCkat+JQBUt5szjRKra2F9nGDJ2XcI/wWb0YWUFNgln4zRQ==} - engines: {node: '>=18'} + '@nomicfoundation/ethereumjs-vm@7.0.4(@nomicfoundation/ethereumjs-verkle@0.0.2)': dependencies: '@nomicfoundation/ethereumjs-block': 5.0.4 '@nomicfoundation/ethereumjs-blockchain': 7.0.4 @@ -1034,15 +3845,8 @@ packages: - '@nomicfoundation/ethereumjs-verkle' - c-kzg - supports-color - dev: true - /@nomicfoundation/hardhat-chai-matchers@1.0.6(@nomiclabs/hardhat-ethers@2.2.3)(chai@4.4.1)(ethers@5.7.2)(hardhat@2.20.1): - resolution: {integrity: sha512-f5ZMNmabZeZegEfuxn/0kW+mm7+yV7VNDxLpMOMGXWFJ2l/Ct3QShujzDRF9cOkK9Ui/hbDeOWGZqyQALDXVCQ==} - peerDependencies: - '@nomiclabs/hardhat-ethers': ^2.0.0 - chai: ^4.2.0 - ethers: ^5.0.0 - hardhat: ^2.9.4 + '@nomicfoundation/hardhat-chai-matchers@1.0.6(@nomiclabs/hardhat-ethers@2.2.3)(chai@4.4.1)(ethers@5.7.2)(hardhat@2.20.1)': dependencies: '@ethersproject/abi': 5.7.0 '@nomiclabs/hardhat-ethers': 2.2.3(ethers@5.7.2)(hardhat@2.20.1) @@ -1053,13 +3857,8 @@ packages: ethers: 5.7.2 hardhat: 2.20.1(ts-node@10.9.2)(typescript@5.4.5) ordinal: 1.0.3 - dev: true - /@nomicfoundation/hardhat-ethers@3.0.6(ethers@5.7.2)(hardhat@2.20.1): - resolution: {integrity: sha512-/xzkFQAaHQhmIAYOQmvHBPwL+NkwLzT9gRZBsgWUYeV+E6pzXsBQsHfRYbAZ3XEYare+T7S+5Tg/1KDJgepSkA==} - peerDependencies: - ethers: ^6.1.0 - hardhat: ^2.0.0 + '@nomicfoundation/hardhat-ethers@3.0.6(ethers@5.7.2)(hardhat@2.20.1)': dependencies: debug: 4.3.4(supports-color@8.1.1) ethers: 5.7.2 @@ -1067,21 +3866,13 @@ packages: lodash.isequal: 4.5.0 transitivePeerDependencies: - supports-color - dev: true - /@nomicfoundation/hardhat-network-helpers@1.0.10(hardhat@2.20.1): - resolution: {integrity: sha512-R35/BMBlx7tWN5V6d/8/19QCwEmIdbnA4ZrsuXgvs8i2qFx5i7h6mH5pBS4Pwi4WigLH+upl6faYusrNPuzMrQ==} - peerDependencies: - hardhat: ^2.9.5 + '@nomicfoundation/hardhat-network-helpers@1.0.10(hardhat@2.20.1)': dependencies: ethereumjs-util: 7.1.5 hardhat: 2.20.1(ts-node@10.9.2)(typescript@5.4.5) - dev: true - /@nomicfoundation/hardhat-verify@2.0.7(hardhat@2.20.1): - resolution: {integrity: sha512-jiYHBX+K6bBN0YhwFHQ5SWWc3dQZliM3pdgpH33C7tnsVACsX1ubZn6gZ9hfwlzG0tyjFM72XQhpaXQ56cE6Ew==} - peerDependencies: - hardhat: ^2.0.4 + '@nomicfoundation/hardhat-verify@2.0.7(hardhat@2.20.1)': dependencies: '@ethersproject/abi': 5.7.0 '@ethersproject/address': 5.7.0 @@ -1095,101 +3886,38 @@ packages: undici: 5.28.4 transitivePeerDependencies: - supports-color - dev: true - - /@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.0: - resolution: {integrity: sha512-vEF3yKuuzfMHsZecHQcnkUrqm8mnTWfJeEVFHpg+cO+le96xQA4lAJYdUan8pXZohQxv1fSReQsn4QGNuBNuCw==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: true + + '@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.0': optional: true - /@nomicfoundation/solidity-analyzer-darwin-x64@0.1.0: - resolution: {integrity: sha512-dlHeIg0pTL4dB1l9JDwbi/JG6dHQaU1xpDK+ugYO8eJ1kxx9Dh2isEUtA4d02cQAl22cjOHTvifAk96A+ItEHA==} - engines: {node: '>= 10'} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: true + '@nomicfoundation/solidity-analyzer-darwin-x64@0.1.0': optional: true - /@nomicfoundation/solidity-analyzer-freebsd-x64@0.1.0: - resolution: {integrity: sha512-WFCZYMv86WowDA4GiJKnebMQRt3kCcFqHeIomW6NMyqiKqhK1kIZCxSLDYsxqlx396kKLPN1713Q1S8tu68GKg==} - engines: {node: '>= 10'} - cpu: [x64] - os: [freebsd] - requiresBuild: true - dev: true + '@nomicfoundation/solidity-analyzer-freebsd-x64@0.1.0': optional: true - /@nomicfoundation/solidity-analyzer-linux-arm64-gnu@0.1.0: - resolution: {integrity: sha512-DTw6MNQWWlCgc71Pq7CEhEqkb7fZnS7oly13pujs4cMH1sR0JzNk90Mp1zpSCsCs4oKan2ClhMlLKtNat/XRKQ==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true + '@nomicfoundation/solidity-analyzer-linux-arm64-gnu@0.1.0': optional: true - /@nomicfoundation/solidity-analyzer-linux-arm64-musl@0.1.0: - resolution: {integrity: sha512-wUpUnR/3GV5Da88MhrxXh/lhb9kxh9V3Jya2NpBEhKDIRCDmtXMSqPMXHZmOR9DfCwCvG6vLFPr/+YrPCnUN0w==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true + '@nomicfoundation/solidity-analyzer-linux-arm64-musl@0.1.0': optional: true - /@nomicfoundation/solidity-analyzer-linux-x64-gnu@0.1.0: - resolution: {integrity: sha512-lR0AxK1x/MeKQ/3Pt923kPvwigmGX3OxeU5qNtQ9pj9iucgk4PzhbS3ruUeSpYhUxG50jN4RkIGwUMoev5lguw==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true + '@nomicfoundation/solidity-analyzer-linux-x64-gnu@0.1.0': optional: true - /@nomicfoundation/solidity-analyzer-linux-x64-musl@0.1.0: - resolution: {integrity: sha512-A1he/8gy/JeBD3FKvmI6WUJrGrI5uWJNr5Xb9WdV+DK0F8msuOqpEByLlnTdLkXMwW7nSl3awvLezOs9xBHJEg==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true + '@nomicfoundation/solidity-analyzer-linux-x64-musl@0.1.0': optional: true - /@nomicfoundation/solidity-analyzer-win32-arm64-msvc@0.1.0: - resolution: {integrity: sha512-7x5SXZ9R9H4SluJZZP8XPN+ju7Mx+XeUMWZw7ZAqkdhP5mK19I4vz3x0zIWygmfE8RT7uQ5xMap0/9NPsO+ykw==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: true + '@nomicfoundation/solidity-analyzer-win32-arm64-msvc@0.1.0': optional: true - /@nomicfoundation/solidity-analyzer-win32-ia32-msvc@0.1.0: - resolution: {integrity: sha512-m7w3xf+hnE774YRXu+2mGV7RiF3QJtUoiYU61FascCkQhX3QMQavh7saH/vzb2jN5D24nT/jwvaHYX/MAM9zUw==} - engines: {node: '>= 10'} - cpu: [ia32] - os: [win32] - requiresBuild: true - dev: true + '@nomicfoundation/solidity-analyzer-win32-ia32-msvc@0.1.0': optional: true - /@nomicfoundation/solidity-analyzer-win32-x64-msvc@0.1.0: - resolution: {integrity: sha512-xCuybjY0sLJQnJhupiFAXaek2EqF0AP0eBjgzaalPXSNvCEN6ZYHvUzdA50ENDVeSYFXcUsYf3+FsD3XKaeptA==} - engines: {node: '>= 10'} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: true + '@nomicfoundation/solidity-analyzer-win32-x64-msvc@0.1.0': optional: true - /@nomicfoundation/solidity-analyzer@0.1.0: - resolution: {integrity: sha512-xGWAiVCGOycvGiP/qrlf9f9eOn7fpNbyJygcB0P21a1MDuVPlKt0Srp7rvtBEutYQ48ouYnRXm33zlRnlTOPHg==} - engines: {node: '>= 12'} + '@nomicfoundation/solidity-analyzer@0.1.0': optionalDependencies: '@nomicfoundation/solidity-analyzer-darwin-arm64': 0.1.0 '@nomicfoundation/solidity-analyzer-darwin-x64': 0.1.0 @@ -1201,115 +3929,70 @@ packages: '@nomicfoundation/solidity-analyzer-win32-arm64-msvc': 0.1.0 '@nomicfoundation/solidity-analyzer-win32-ia32-msvc': 0.1.0 '@nomicfoundation/solidity-analyzer-win32-x64-msvc': 0.1.0 - dev: true - /@nomiclabs/hardhat-ethers@2.2.3(ethers@5.7.2)(hardhat@2.20.1): - resolution: {integrity: sha512-YhzPdzb612X591FOe68q+qXVXGG2ANZRvDo0RRUtimev85rCrAlv/TLMEZw5c+kq9AbzocLTVX/h2jVIFPL9Xg==} - peerDependencies: - ethers: ^5.0.0 - hardhat: ^2.0.0 + '@nomiclabs/hardhat-ethers@2.2.3(ethers@5.7.2)(hardhat@2.20.1)': dependencies: ethers: 5.7.2 hardhat: 2.20.1(ts-node@10.9.2)(typescript@5.4.5) - dev: true - /@openzeppelin/contracts-upgradeable@4.9.3: - resolution: {integrity: sha512-jjaHAVRMrE4UuZNfDwjlLGDxTHWIOwTJS2ldnc278a0gevfXfPr8hxKEVBGFBE96kl2G3VHDZhUimw/+G3TG2A==} - dev: false + '@openzeppelin/contracts-upgradeable@4.9.3': {} - /@openzeppelin/contracts@4.9.3: - resolution: {integrity: sha512-He3LieZ1pP2TNt5JbkPA4PNT9WC3gOTOlDcFGJW4Le4QKqwmiNJCRt44APfxMxvq7OugU/cqYuPcSBzOw38DAg==} - dev: false + '@openzeppelin/contracts@4.9.3': {} - /@pkgr/core@0.1.1: - resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==} - engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} - dev: true + '@pkgr/core@0.1.1': {} - /@pnpm/config.env-replace@1.1.0: - resolution: {integrity: sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w==} - engines: {node: '>=12.22.0'} - dev: true + '@pnpm/config.env-replace@1.1.0': {} - /@pnpm/network.ca-file@1.0.2: - resolution: {integrity: sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA==} - engines: {node: '>=12.22.0'} + '@pnpm/network.ca-file@1.0.2': dependencies: graceful-fs: 4.2.10 - dev: true - /@pnpm/npm-conf@2.2.2: - resolution: {integrity: sha512-UA91GwWPhFExt3IizW6bOeY/pQ0BkuNwKjk9iQW9KqxluGCrg4VenZ0/L+2Y0+ZOtme72EVvg6v0zo3AMQRCeA==} - engines: {node: '>=12'} + '@pnpm/npm-conf@2.2.2': dependencies: '@pnpm/config.env-replace': 1.1.0 '@pnpm/network.ca-file': 1.0.2 config-chain: 1.1.13 - dev: true - /@prettier/sync@0.3.0(prettier@3.2.5): - resolution: {integrity: sha512-3dcmCyAxIcxy036h1I7MQU/uEEBq8oLwf1CE3xeze+MPlgkdlb/+w6rGR/1dhp6Hqi17fRS6nvwnOzkESxEkOw==} - peerDependencies: - prettier: ^3.0.0 + '@prettier/sync@0.3.0(prettier@3.2.5)': dependencies: prettier: 3.2.5 - dev: true - /@scroll-tech/contracts@0.1.0: - resolution: {integrity: sha512-aBbDOc3WB/WveZdpJYcrfvMYMz7ZTEiW8M9XMJLba8p9FAR5KGYB/cV+8+EUsq3MKt7C1BfR+WnXoTVdvwIY6w==} - dev: false + '@scroll-tech/contracts@0.1.0': {} - /@scure/base@1.1.1: - resolution: {integrity: sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA==} - dev: true + '@scure/base@1.1.1': {} - /@scure/bip32@1.1.0: - resolution: {integrity: sha512-ftTW3kKX54YXLCxH6BB7oEEoJfoE2pIgw7MINKAs5PsS6nqKPuKk1haTF/EuHmYqG330t5GSrdmtRuHaY1a62Q==} + '@scure/bip32@1.1.0': dependencies: '@noble/hashes': 1.1.2 '@noble/secp256k1': 1.6.3 '@scure/base': 1.1.1 - dev: true - /@scure/bip39@1.1.0: - resolution: {integrity: sha512-pwrPOS16VeTKg98dYXQyIjJEcWfz7/1YJIwxUEPFfQPtc86Ym/1sVgQ2RLoD43AazMk2l/unK4ITySSpW2+82w==} + '@scure/bip39@1.1.0': dependencies: '@noble/hashes': 1.1.2 '@scure/base': 1.1.1 - dev: true - /@sentry/core@5.30.0: - resolution: {integrity: sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg==} - engines: {node: '>=6'} + '@sentry/core@5.30.0': dependencies: '@sentry/hub': 5.30.0 '@sentry/minimal': 5.30.0 '@sentry/types': 5.30.0 '@sentry/utils': 5.30.0 tslib: 1.14.1 - dev: true - /@sentry/hub@5.30.0: - resolution: {integrity: sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ==} - engines: {node: '>=6'} + '@sentry/hub@5.30.0': dependencies: '@sentry/types': 5.30.0 '@sentry/utils': 5.30.0 tslib: 1.14.1 - dev: true - /@sentry/minimal@5.30.0: - resolution: {integrity: sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw==} - engines: {node: '>=6'} + '@sentry/minimal@5.30.0': dependencies: '@sentry/hub': 5.30.0 '@sentry/types': 5.30.0 tslib: 1.14.1 - dev: true - /@sentry/node@5.30.0: - resolution: {integrity: sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg==} - engines: {node: '>=6'} + '@sentry/node@5.30.0': dependencies: '@sentry/core': 5.30.0 '@sentry/hub': 5.30.0 @@ -1322,94 +4005,54 @@ packages: tslib: 1.14.1 transitivePeerDependencies: - supports-color - dev: true - /@sentry/tracing@5.30.0: - resolution: {integrity: sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw==} - engines: {node: '>=6'} + '@sentry/tracing@5.30.0': dependencies: '@sentry/hub': 5.30.0 '@sentry/minimal': 5.30.0 '@sentry/types': 5.30.0 '@sentry/utils': 5.30.0 tslib: 1.14.1 - dev: true - /@sentry/types@5.30.0: - resolution: {integrity: sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw==} - engines: {node: '>=6'} - dev: true + '@sentry/types@5.30.0': {} - /@sentry/utils@5.30.0: - resolution: {integrity: sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww==} - engines: {node: '>=6'} + '@sentry/utils@5.30.0': dependencies: '@sentry/types': 5.30.0 tslib: 1.14.1 - dev: true - /@sindresorhus/is@4.6.0: - resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==} - engines: {node: '>=10'} - dev: true + '@sindresorhus/is@4.6.0': {} - /@solidity-parser/parser@0.17.0: - resolution: {integrity: sha512-Nko8R0/kUo391jsEHHxrGM07QFdnPGvlmox4rmH0kNiNAashItAilhy4Mv4pK5gQmW5f4sXAF58fwJbmlkGcVw==} - dev: true + '@solidity-parser/parser@0.17.0': {} - /@solidity-parser/parser@0.18.0: - resolution: {integrity: sha512-yfORGUIPgLck41qyN7nbwJRAx17/jAIXCTanHOJZhB6PJ1iAk/84b/xlsVKFSyNyLXIj0dhppoE0+CRws7wlzA==} - dev: true + '@solidity-parser/parser@0.18.0': {} - /@szmarczak/http-timer@5.0.1: - resolution: {integrity: sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==} - engines: {node: '>=14.16'} + '@szmarczak/http-timer@5.0.1': dependencies: defer-to-connect: 2.0.1 - dev: true - /@truffle/abi-utils@0.3.2: - resolution: {integrity: sha512-32queMD64YKL/tmQgSV4Xs073dIaZ9tp7NP1icjwvFSA3Q9yeu7ApYbSbYMsx9H9zWkkVOsfcoJ2kJEieOCzsA==} + '@truffle/abi-utils@0.3.2': dependencies: change-case: 3.0.2 fast-check: 3.1.1 web3-utils: 1.7.4 - dev: true - /@truffle/contract-schema@3.4.10: - resolution: {integrity: sha512-BhRNRoRvlj2th6E5RNS0BnS0ZxQe01JJz8I7MjkGqdeXSvrn6qDCAnbmvhNgUv0l5h8w5+gBOQhAJhILf1shdQ==} + '@truffle/contract-schema@3.4.10': dependencies: ajv: 6.12.6 debug: 4.3.4(supports-color@8.1.1) transitivePeerDependencies: - supports-color - dev: true - /@tsconfig/node10@1.0.9: - resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==} - dev: true + '@tsconfig/node10@1.0.9': {} - /@tsconfig/node12@1.0.11: - resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} - dev: true + '@tsconfig/node12@1.0.11': {} - /@tsconfig/node14@1.0.3: - resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} - dev: true + '@tsconfig/node14@1.0.3': {} - /@tsconfig/node16@1.0.3: - resolution: {integrity: sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==} - dev: true + '@tsconfig/node16@1.0.3': {} - /@typechain/ethers-v5@7.2.0(@ethersproject/abi@5.7.0)(@ethersproject/bytes@5.7.0)(@ethersproject/providers@5.7.2)(ethers@5.7.2)(typechain@8.3.2)(typescript@5.4.5): - resolution: {integrity: sha512-jfcmlTvaaJjng63QsT49MT6R1HFhtO/TBMWbyzPFSzMmVIqb2tL6prnKBs4ZJrSvmgIXWy+ttSjpaxCTq8D/Tw==} - peerDependencies: - '@ethersproject/abi': ^5.0.0 - '@ethersproject/bytes': ^5.0.0 - '@ethersproject/providers': ^5.0.0 - ethers: ^5.1.3 - typechain: ^5.0.0 - typescript: '>=4.0.0' + '@typechain/ethers-v5@7.2.0(@ethersproject/abi@5.7.0)(@ethersproject/bytes@5.7.0)(@ethersproject/providers@5.7.2)(ethers@5.7.2)(typechain@8.3.2)(typescript@5.4.5)': dependencies: '@ethersproject/abi': 5.7.0 '@ethersproject/bytes': 5.7.0 @@ -1419,17 +4062,8 @@ packages: ts-essentials: 7.0.3(typescript@5.4.5) typechain: 8.3.2(typescript@5.4.5) typescript: 5.4.5 - dev: true - /@typechain/hardhat@7.0.0(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2)(@typechain/ethers-v5@7.2.0)(ethers@5.7.2)(hardhat@2.20.1)(typechain@8.3.2): - resolution: {integrity: sha512-XB79i5ewg9Met7gMVGfgVkmypicbnI25T5clJBEooMoW2161p4zvKFpoS2O+lBppQyMrPIZkdvl2M3LMDayVcA==} - peerDependencies: - '@ethersproject/abi': ^5.4.7 - '@ethersproject/providers': ^5.4.7 - '@typechain/ethers-v5': ^11.0.0 - ethers: ^5.4.7 - hardhat: ^2.9.9 - typechain: ^8.2.0 + '@typechain/hardhat@7.0.0(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2)(@typechain/ethers-v5@7.2.0)(ethers@5.7.2)(hardhat@2.20.1)(typechain@8.3.2)': dependencies: '@ethersproject/abi': 5.7.0 '@ethersproject/providers': 5.7.2 @@ -1438,138 +4072,82 @@ packages: fs-extra: 9.1.0 hardhat: 2.20.1(ts-node@10.9.2)(typescript@5.4.5) typechain: 8.3.2(typescript@5.4.5) - dev: true - /@types/bn.js@4.11.6: - resolution: {integrity: sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==} + '@types/bn.js@4.11.6': dependencies: '@types/node': 20.12.12 - dev: true - /@types/bn.js@5.1.1: - resolution: {integrity: sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g==} + '@types/bn.js@5.1.1': dependencies: '@types/node': 20.12.12 - dev: true - /@types/cacheable-request@6.0.2: - resolution: {integrity: sha512-B3xVo+dlKM6nnKTcmm5ZtY/OL8bOAOd2Olee9M1zft65ox50OzjEHW91sDiU9j6cvW8Ejg1/Qkf4xd2kugApUA==} + '@types/cacheable-request@6.0.2': dependencies: '@types/http-cache-semantics': 4.0.1 '@types/keyv': 3.1.4 '@types/node': 20.12.12 '@types/responselike': 1.0.0 - dev: true - /@types/cbor@5.0.1: - resolution: {integrity: sha512-zVqJy2KzusZPLOgyGJDnOIbu3DxIGGqxYbEwtEEe4Z+la8jwIhOyb+GMrlHafs5tvKruwf8f8qOYP6zTvse/pw==} + '@types/cbor@5.0.1': dependencies: '@types/node': 20.12.12 - dev: true - /@types/chai-as-promised@7.1.8: - resolution: {integrity: sha512-ThlRVIJhr69FLlh6IctTXFkmhtP3NpMZ2QGq69StYLyKZFp/HOp1VdKZj7RvfNWYYcJ1xlbLGLLWj1UvP5u/Gw==} + '@types/chai-as-promised@7.1.8': dependencies: '@types/chai': 4.3.16 - dev: true - /@types/chai@4.3.16: - resolution: {integrity: sha512-PatH4iOdyh3MyWtmHVFXLWCCIhUbopaltqddG9BzB+gMIzee2MJrvd+jouii9Z3wzQJruGWAm7WOMjgfG8hQlQ==} - dev: true + '@types/chai@4.3.16': {} - /@types/debug@4.1.12: - resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} + '@types/debug@4.1.12': dependencies: '@types/ms': 0.7.31 - dev: true - /@types/deep-equal-in-any-order@1.0.3: - resolution: {integrity: sha512-jT0O3hAILDKeKbdWJ9FZLD0Xdfhz7hMvfyFlRWpirjiEVr8G+GZ4kVIzPIqM6x6Rpp93TNPgOAed4XmvcuV6Qg==} - dev: true + '@types/deep-equal-in-any-order@1.0.3': {} - /@types/http-cache-semantics@4.0.1: - resolution: {integrity: sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==} - dev: true + '@types/http-cache-semantics@4.0.1': {} - /@types/keyv@3.1.4: - resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} + '@types/keyv@3.1.4': dependencies: '@types/node': 20.12.12 - dev: true - /@types/lru-cache@5.1.1: - resolution: {integrity: sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==} - dev: true + '@types/lru-cache@5.1.1': {} - /@types/minimist@1.2.5: - resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} - dev: false + '@types/minimist@1.2.5': {} - /@types/mocha@10.0.6: - resolution: {integrity: sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==} - dev: true + '@types/mocha@10.0.6': {} - /@types/ms@0.7.31: - resolution: {integrity: sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==} - dev: true + '@types/ms@0.7.31': {} - /@types/node@12.19.16: - resolution: {integrity: sha512-7xHmXm/QJ7cbK2laF+YYD7gb5MggHIIQwqyjin3bpEGiSuvScMQ5JZZXPvRipi1MwckTQbJZROMns/JxdnIL1Q==} - dev: false + '@types/node@12.19.16': {} - /@types/node@20.12.12: - resolution: {integrity: sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==} + '@types/node@20.12.12': dependencies: undici-types: 5.26.5 - dev: true - /@types/normalize-package-data@2.4.4: - resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} - dev: false + '@types/normalize-package-data@2.4.4': {} - /@types/pbkdf2@3.1.0: - resolution: {integrity: sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==} + '@types/pbkdf2@3.1.0': dependencies: '@types/node': 20.12.12 - dev: true - /@types/prettier@2.7.1: - resolution: {integrity: sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow==} - dev: true + '@types/prettier@2.7.1': {} - /@types/readable-stream@2.3.15: - resolution: {integrity: sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ==} + '@types/readable-stream@2.3.15': dependencies: '@types/node': 20.12.12 safe-buffer: 5.1.2 - dev: true - /@types/responselike@1.0.0: - resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==} + '@types/responselike@1.0.0': dependencies: '@types/node': 20.12.12 - dev: true - /@types/secp256k1@4.0.3: - resolution: {integrity: sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w==} + '@types/secp256k1@4.0.3': dependencies: '@types/node': 20.12.12 - dev: true - /@types/semver@7.5.0: - resolution: {integrity: sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==} - dev: false + '@types/semver@7.5.0': {} - /@typescript-eslint/eslint-plugin@7.10.0(@typescript-eslint/parser@7.10.0)(eslint@8.57.0)(typescript@5.4.5): - resolution: {integrity: sha512-PzCr+a/KAef5ZawX7nbyNwBDtM1HdLIT53aSA2DDlxmxMngZ43O8SIePOeX8H5S+FHXeI6t97mTt/dDdzY4Fyw==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - '@typescript-eslint/parser': ^7.0.0 - eslint: ^8.56.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true + '@typescript-eslint/eslint-plugin@7.10.0(@typescript-eslint/parser@7.10.0)(eslint@8.57.0)(typescript@5.4.5)': dependencies: '@eslint-community/regexpp': 4.10.0 '@typescript-eslint/parser': 7.10.0(eslint@8.57.0)(typescript@5.4.5) @@ -1585,17 +4163,8 @@ packages: typescript: 5.4.5 transitivePeerDependencies: - supports-color - dev: true - /@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.4.5): - resolution: {integrity: sha512-2EjZMA0LUW5V5tGQiaa2Gys+nKdfrn2xiTIBLR4fxmPmVSvgPcKNW+AE/ln9k0A4zDUti0J/GZXMDupQoI+e1w==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - eslint: ^8.56.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true + '@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.4.5)': dependencies: '@typescript-eslint/scope-manager': 7.10.0 '@typescript-eslint/types': 7.10.0 @@ -1606,25 +4175,13 @@ packages: typescript: 5.4.5 transitivePeerDependencies: - supports-color - dev: true - /@typescript-eslint/scope-manager@7.10.0: - resolution: {integrity: sha512-7L01/K8W/VGl7noe2mgH0K7BE29Sq6KAbVmxurj8GGaPDZXPr8EEQ2seOeAS+mEV9DnzxBQB6ax6qQQ5C6P4xg==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/scope-manager@7.10.0': dependencies: '@typescript-eslint/types': 7.10.0 '@typescript-eslint/visitor-keys': 7.10.0 - dev: true - /@typescript-eslint/type-utils@7.10.0(eslint@8.57.0)(typescript@5.4.5): - resolution: {integrity: sha512-D7tS4WDkJWrVkuzgm90qYw9RdgBcrWmbbRkrLA4d7Pg3w0ttVGDsvYGV19SH8gPR5L7OtcN5J1hTtyenO9xE9g==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - eslint: ^8.56.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true + '@typescript-eslint/type-utils@7.10.0(eslint@8.57.0)(typescript@5.4.5)': dependencies: '@typescript-eslint/typescript-estree': 7.10.0(typescript@5.4.5) '@typescript-eslint/utils': 7.10.0(eslint@8.57.0)(typescript@5.4.5) @@ -1634,21 +4191,10 @@ packages: typescript: 5.4.5 transitivePeerDependencies: - supports-color - dev: true - /@typescript-eslint/types@7.10.0: - resolution: {integrity: sha512-7fNj+Ya35aNyhuqrA1E/VayQX9Elwr8NKZ4WueClR3KwJ7Xx9jcCdOrLW04h51de/+gNbyFMs+IDxh5xIwfbNg==} - engines: {node: ^18.18.0 || >=20.0.0} - dev: true + '@typescript-eslint/types@7.10.0': {} - /@typescript-eslint/typescript-estree@7.10.0(typescript@5.4.5): - resolution: {integrity: sha512-LXFnQJjL9XIcxeVfqmNj60YhatpRLt6UhdlFwAkjNc6jSUlK8zQOl1oktAP8PlWFzPQC1jny/8Bai3/HPuvN5g==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true + '@typescript-eslint/typescript-estree@7.10.0(typescript@5.4.5)': dependencies: '@typescript-eslint/types': 7.10.0 '@typescript-eslint/visitor-keys': 7.10.0 @@ -1661,13 +4207,8 @@ packages: typescript: 5.4.5 transitivePeerDependencies: - supports-color - dev: true - /@typescript-eslint/utils@7.10.0(eslint@8.57.0)(typescript@5.4.5): - resolution: {integrity: sha512-olzif1Fuo8R8m/qKkzJqT7qwy16CzPRWBvERS0uvyc+DHd8AKbO4Jb7kpAvVzMmZm8TrHnI7hvjN4I05zow+tg==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - eslint: ^8.56.0 + '@typescript-eslint/utils@7.10.0(eslint@8.57.0)(typescript@5.4.5)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@typescript-eslint/scope-manager': 7.10.0 @@ -1677,23 +4218,15 @@ packages: transitivePeerDependencies: - supports-color - typescript - dev: true - /@typescript-eslint/visitor-keys@7.10.0: - resolution: {integrity: sha512-9ntIVgsi6gg6FIq9xjEO4VQJvwOqA3jaBFQJ/6TK5AvEup2+cECI6Fh7QiBxmfMHXU0V0J4RyPeOU1VDNzl9cg==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/visitor-keys@7.10.0': dependencies: '@typescript-eslint/types': 7.10.0 eslint-visitor-keys: 3.4.3 - dev: true - /@ungap/structured-clone@1.2.0: - resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} - dev: true + '@ungap/structured-clone@1.2.0': {} - /abi-to-sol@0.6.6: - resolution: {integrity: sha512-PRn81rSpv6NXFPYQSw7ujruqIP6UkwZ/XoFldtiqCX8+2kHVc73xVaUVvdbro06vvBVZiwnxhEIGdI4BRMwGHw==} - hasBin: true + abi-to-sol@0.6.6: dependencies: '@truffle/abi-utils': 0.3.2 '@truffle/contract-schema': 3.4.10 @@ -1707,180 +4240,104 @@ packages: prettier-plugin-solidity: 1.3.1(prettier@2.8.8) transitivePeerDependencies: - supports-color - dev: true - /acorn-jsx@5.3.2(acorn@8.11.3): - resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} - peerDependencies: - acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + acorn-jsx@5.3.2(acorn@8.11.3): dependencies: acorn: 8.11.3 - dev: true - /acorn-walk@8.2.0: - resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} - engines: {node: '>=0.4.0'} - dev: true + acorn-walk@8.2.0: {} - /acorn@8.10.0: - resolution: {integrity: sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==} - engines: {node: '>=0.4.0'} - hasBin: true - dev: true + acorn@8.10.0: {} - /acorn@8.11.3: - resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} - engines: {node: '>=0.4.0'} - hasBin: true - dev: true + acorn@8.11.3: {} - /adm-zip@0.4.16: - resolution: {integrity: sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==} - engines: {node: '>=0.3.0'} - dev: true + adm-zip@0.4.16: {} - /aes-js@3.0.0: - resolution: {integrity: sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==} + aes-js@3.0.0: {} - /agent-base@6.0.2: - resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} - engines: {node: '>= 6.0.0'} + agent-base@6.0.2: dependencies: debug: 4.3.4(supports-color@8.1.1) transitivePeerDependencies: - supports-color - dev: true - /aggregate-error@3.1.0: - resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} - engines: {node: '>=8'} + aggregate-error@3.1.0: dependencies: clean-stack: 2.2.0 indent-string: 4.0.0 - dev: true - /ajv@6.12.6: - resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + ajv@6.12.6: dependencies: fast-deep-equal: 3.1.3 fast-json-stable-stringify: 2.1.0 json-schema-traverse: 0.4.1 uri-js: 4.4.1 - dev: true - /ajv@8.11.0: - resolution: {integrity: sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==} + ajv@8.11.0: dependencies: fast-deep-equal: 3.1.3 json-schema-traverse: 1.0.0 require-from-string: 2.0.2 uri-js: 4.4.1 - dev: true - /ansi-align@3.0.1: - resolution: {integrity: sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==} + ansi-align@3.0.1: dependencies: string-width: 4.2.3 - dev: true - /ansi-colors@4.1.1: - resolution: {integrity: sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==} - engines: {node: '>=6'} - dev: true + ansi-colors@4.1.1: {} - /ansi-colors@4.1.3: - resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} - engines: {node: '>=6'} + ansi-colors@4.1.3: {} - /ansi-escapes@4.3.2: - resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} - engines: {node: '>=8'} + ansi-escapes@4.3.2: dependencies: type-fest: 0.21.3 - dev: true - /ansi-regex@2.1.1: - resolution: {integrity: sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==} - engines: {node: '>=0.10.0'} - dev: true + ansi-regex@2.1.1: {} - /ansi-regex@5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} - engines: {node: '>=8'} + ansi-regex@5.0.1: {} - /ansi-styles@3.2.1: - resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} - engines: {node: '>=4'} + ansi-styles@3.2.1: dependencies: color-convert: 1.9.3 - /ansi-styles@4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} + ansi-styles@4.3.0: dependencies: color-convert: 2.0.1 - /antlr4@4.13.1-patch-1: - resolution: {integrity: sha512-OjFLWWLzDMV9rdFhpvroCWR4ooktNg9/nvVYSA5z28wuVpU36QUNuioR1XLnQtcjVlf8npjyz593PxnU/f/Cow==} - engines: {node: '>=16'} - dev: true + antlr4@4.13.1-patch-1: {} - /anymatch@3.1.2: - resolution: {integrity: sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==} - engines: {node: '>= 8'} + anymatch@3.1.2: dependencies: normalize-path: 3.0.0 picomatch: 2.3.1 - dev: true - /arg@4.1.3: - resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} - dev: true + arg@4.1.3: {} - /argparse@1.0.10: - resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} + argparse@1.0.10: dependencies: sprintf-js: 1.0.3 - dev: false - /argparse@2.0.1: - resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - dev: true + argparse@2.0.1: {} - /array-back@3.1.0: - resolution: {integrity: sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==} - engines: {node: '>=6'} - dev: true + array-back@3.1.0: {} - /array-back@4.0.2: - resolution: {integrity: sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==} - engines: {node: '>=8'} - dev: true + array-back@4.0.2: {} - /array-buffer-byte-length@1.0.0: - resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==} + array-buffer-byte-length@1.0.0: dependencies: call-bind: 1.0.5 is-array-buffer: 3.0.2 - dev: false - /array-union@2.1.0: - resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} - engines: {node: '>=8'} + array-union@2.1.0: {} - /array.prototype.flat@1.3.2: - resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==} - engines: {node: '>= 0.4'} + array.prototype.flat@1.3.2: dependencies: call-bind: 1.0.5 define-properties: 1.2.1 es-abstract: 1.22.3 es-shim-unscopables: 1.0.2 - dev: false - /arraybuffer.prototype.slice@1.0.2: - resolution: {integrity: sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==} - engines: {node: '>= 0.4'} + arraybuffer.prototype.slice@1.0.2: dependencies: array-buffer-byte-length: 1.0.0 call-bind: 1.0.5 @@ -1889,52 +4346,28 @@ packages: get-intrinsic: 1.2.2 is-array-buffer: 3.0.2 is-shared-array-buffer: 1.0.2 - dev: false - /arrify@1.0.1: - resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==} - engines: {node: '>=0.10.0'} - dev: false + arrify@1.0.1: {} - /assertion-error@1.1.0: - resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} + assertion-error@1.1.0: {} - /ast-parents@0.0.1: - resolution: {integrity: sha512-XHusKxKz3zoYk1ic8Un640joHbFMhbqneyoZfoKnEGtf2ey9Uh/IdpcQplODdO/kENaMIWsD0nJm4+wX3UNLHA==} - dev: true + ast-parents@0.0.1: {} - /astral-regex@2.0.0: - resolution: {integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==} - engines: {node: '>=8'} - dev: true + astral-regex@2.0.0: {} - /at-least-node@1.0.0: - resolution: {integrity: sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==} - engines: {node: '>= 4.0.0'} - dev: true + at-least-node@1.0.0: {} - /available-typed-arrays@1.0.5: - resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} - engines: {node: '>= 0.4'} - dev: false + available-typed-arrays@1.0.5: {} - /balanced-match@1.0.0: - resolution: {integrity: sha512-9Y0g0Q8rmSt+H33DfKv7FOc3v+iRI+o1lbzt8jGcIosYW37IIW/2XVYq5NPdmaD5NQ59Nk26Kl/vZbwW9Fr8vg==} - dev: true + balanced-match@1.0.0: {} - /base-x@3.0.9: - resolution: {integrity: sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==} + base-x@3.0.9: dependencies: safe-buffer: 5.2.1 - dev: true - /bech32@1.1.4: - resolution: {integrity: sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==} + bech32@1.1.4: {} - /better-ajv-errors@0.8.2(ajv@6.12.6): - resolution: {integrity: sha512-FnODTBJSQSHmJXDLPiC7ca0dC4S1HSTPv1+Hg2sm/C71i3Dj0l1jcUEaq/3OQ6MmnUveshTsUvUj65pDSr3Qow==} - peerDependencies: - ajv: 4.11.8 - 8 + better-ajv-errors@0.8.2(ajv@6.12.6): dependencies: '@babel/code-frame': 7.18.6 '@babel/runtime': 7.24.0 @@ -1944,46 +4377,26 @@ packages: json-to-ast: 2.1.0 jsonpointer: 5.0.1 leven: 3.1.0 - dev: true - /better-path-resolve@1.0.0: - resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} - engines: {node: '>=4'} + better-path-resolve@1.0.0: dependencies: is-windows: 1.0.2 - dev: false - /bigint-crypto-utils@3.3.0: - resolution: {integrity: sha512-jOTSb+drvEDxEq6OuUybOAv/xxoh3cuYRUIPyu8sSHQNKM303UQ2R1DAo45o1AkcIXw6fzbaFI1+xGGdaXs2lg==} - engines: {node: '>=14.0.0'} - dev: true + bigint-crypto-utils@3.3.0: {} - /bignumber.js@9.1.0: - resolution: {integrity: sha512-4LwHK4nfDOraBCtst+wOWIHbu1vhvAPJK8g8nROd4iuc3PSEjWif/qwbkh8jwCJz6yDBvtU4KPynETgrfh7y3A==} - dev: true + bignumber.js@9.1.0: {} - /binary-extensions@2.2.0: - resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} - engines: {node: '>=8'} - dev: true + binary-extensions@2.2.0: {} - /blakejs@1.2.1: - resolution: {integrity: sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==} - dev: true + blakejs@1.2.1: {} - /bn.js@4.11.6: - resolution: {integrity: sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==} - dev: true + bn.js@4.11.6: {} - /bn.js@4.12.0: - resolution: {integrity: sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==} + bn.js@4.12.0: {} - /bn.js@5.2.1: - resolution: {integrity: sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==} + bn.js@5.2.1: {} - /boxen@5.1.2: - resolution: {integrity: sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==} - engines: {node: '>=10'} + boxen@5.1.2: dependencies: ansi-align: 3.0.1 camelcase: 6.3.0 @@ -1993,42 +4406,29 @@ packages: type-fest: 0.20.2 widest-line: 3.1.0 wrap-ansi: 7.0.0 - dev: true - /brace-expansion@1.1.11: - resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + brace-expansion@1.1.11: dependencies: balanced-match: 1.0.0 concat-map: 0.0.1 - dev: true - /brace-expansion@2.0.1: - resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + brace-expansion@2.0.1: dependencies: balanced-match: 1.0.0 - dev: true - /braces@3.0.2: - resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} - engines: {node: '>=8'} + braces@3.0.2: dependencies: fill-range: 7.0.1 - /breakword@1.0.6: - resolution: {integrity: sha512-yjxDAYyK/pBvws9H4xKYpLDpYKEH6CzrBPAuXq3x18I+c/2MkVtT3qAr7Oloi6Dss9qNhPVueAAVU1CSeNDIXw==} + breakword@1.0.6: dependencies: wcwidth: 1.0.1 - dev: false - /brorand@1.1.0: - resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} + brorand@1.1.0: {} - /browser-stdout@1.3.1: - resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} - dev: true + browser-stdout@1.3.1: {} - /browserify-aes@1.2.0: - resolution: {integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==} + browserify-aes@1.2.0: dependencies: buffer-xor: 1.0.3 cipher-base: 1.0.4 @@ -2036,48 +4436,28 @@ packages: evp_bytestokey: 1.0.3 inherits: 2.0.4 safe-buffer: 5.2.1 - dev: true - /bs58@4.0.1: - resolution: {integrity: sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==} + bs58@4.0.1: dependencies: base-x: 3.0.9 - dev: true - /bs58check@2.1.2: - resolution: {integrity: sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==} + bs58check@2.1.2: dependencies: bs58: 4.0.1 create-hash: 1.2.0 safe-buffer: 5.2.1 - dev: true - /buffer-from@1.1.2: - resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - dev: true + buffer-from@1.1.2: {} - /buffer-xor@1.0.3: - resolution: {integrity: sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==} - dev: true + buffer-xor@1.0.3: {} - /bufio@1.0.7: - resolution: {integrity: sha512-bd1dDQhiC+bEbEfg56IdBv7faWa6OipMs/AFFFvtFnB3wAYjlwQpQRZ0pm6ZkgtfL0pILRXhKxOiQj6UzoMR7A==} - engines: {node: '>=8.0.0'} - dev: false + bufio@1.0.7: {} - /bytes@3.1.2: - resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} - engines: {node: '>= 0.8'} - dev: true + bytes@3.1.2: {} - /cacheable-lookup@6.1.0: - resolution: {integrity: sha512-KJ/Dmo1lDDhmW2XDPMo+9oiy/CeqosPguPCrgcVzKyZrL6pM1gU2GmPY/xo6OQPTUaA/c0kwHuywB4E6nmT9ww==} - engines: {node: '>=10.6.0'} - dev: true + cacheable-lookup@6.1.0: {} - /cacheable-request@7.0.2: - resolution: {integrity: sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==} - engines: {node: '>=8'} + cacheable-request@7.0.2: dependencies: clone-response: 1.0.2 get-stream: 5.1.0 @@ -2086,74 +4466,45 @@ packages: lowercase-keys: 2.0.0 normalize-url: 6.1.0 responselike: 2.0.1 - dev: true - /call-bind@1.0.5: - resolution: {integrity: sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==} + call-bind@1.0.5: dependencies: function-bind: 1.1.2 get-intrinsic: 1.2.2 set-function-length: 1.1.1 - dev: false - /callsites@3.1.0: - resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} - engines: {node: '>=6'} - dev: true + callsites@3.1.0: {} - /camel-case@3.0.0: - resolution: {integrity: sha512-+MbKztAYHXPr1jNTSKQF52VpcFjwY5RkR7fxksV8Doo4KAYc5Fl4UJRgthBbTmEx8C54DqahhbLJkDwjI3PI/w==} + camel-case@3.0.0: dependencies: no-case: 2.3.2 upper-case: 1.1.3 - dev: true - /camelcase-keys@6.2.2: - resolution: {integrity: sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==} - engines: {node: '>=8'} + camelcase-keys@6.2.2: dependencies: camelcase: 5.3.1 map-obj: 4.3.0 quick-lru: 4.0.1 - dev: false - /camelcase@5.3.1: - resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} - engines: {node: '>=6'} - dev: false + camelcase@5.3.1: {} - /camelcase@6.3.0: - resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} - engines: {node: '>=10'} - dev: true + camelcase@6.3.0: {} - /cbor@5.2.0: - resolution: {integrity: sha512-5IMhi9e1QU76ppa5/ajP1BmMWZ2FHkhAhjeVKQ/EFCgYSEaeVaoGtL7cxJskf9oCCk+XjzaIdc3IuU/dbA/o2A==} - engines: {node: '>=6.0.0'} + cbor@5.2.0: dependencies: bignumber.js: 9.1.0 nofilter: 1.0.4 - dev: true - /cbor@8.1.0: - resolution: {integrity: sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==} - engines: {node: '>=12.19'} + cbor@8.1.0: dependencies: nofilter: 3.1.0 - dev: true - /chai-as-promised@7.1.1(chai@4.4.1): - resolution: {integrity: sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==} - peerDependencies: - chai: '>= 2.1.2 < 5' + chai-as-promised@7.1.1(chai@4.4.1): dependencies: chai: 4.4.1 check-error: 1.0.3 - dev: true - /chai@4.4.1: - resolution: {integrity: sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==} - engines: {node: '>=4'} + chai@4.4.1: dependencies: assertion-error: 1.1.0 check-error: 1.0.3 @@ -2163,23 +4514,18 @@ packages: pathval: 1.1.1 type-detect: 4.0.8 - /chalk@2.4.2: - resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} - engines: {node: '>=4'} + chalk@2.4.2: dependencies: ansi-styles: 3.2.1 escape-string-regexp: 1.0.5 supports-color: 5.5.0 - /chalk@4.1.2: - resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} - engines: {node: '>=10'} + chalk@4.1.2: dependencies: ansi-styles: 4.3.0 supports-color: 7.2.0 - /change-case@3.0.2: - resolution: {integrity: sha512-Mww+SLF6MZ0U6kdg11algyKd5BARbyM4TbFBepwowYSR5ClfQGCGtxNXgykpN0uF/bstWeaGDT4JWaDh8zWAHA==} + change-case@3.0.2: dependencies: camel-case: 3.0.0 constant-case: 2.0.0 @@ -2199,20 +4545,14 @@ packages: title-case: 2.1.1 upper-case: 1.1.3 upper-case-first: 1.1.2 - dev: true - /chardet@0.7.0: - resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} - dev: false + chardet@0.7.0: {} - /check-error@1.0.3: - resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} + check-error@1.0.3: dependencies: get-func-name: 2.0.2 - /chokidar@3.5.3: - resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} - engines: {node: '>= 8.10.0'} + chokidar@3.5.3: dependencies: anymatch: 3.1.2 braces: 3.0.2 @@ -2223,175 +4563,110 @@ packages: readdirp: 3.6.0 optionalDependencies: fsevents: 2.3.2 - dev: true - /ci-info@2.0.0: - resolution: {integrity: sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==} - dev: true + ci-info@2.0.0: {} - /ci-info@3.9.0: - resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} - engines: {node: '>=8'} - dev: false + ci-info@3.9.0: {} - /cipher-base@1.0.4: - resolution: {integrity: sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==} + cipher-base@1.0.4: dependencies: inherits: 2.0.4 safe-buffer: 5.2.1 - dev: true - /clean-stack@2.2.0: - resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} - engines: {node: '>=6'} - dev: true + clean-stack@2.2.0: {} - /cli-boxes@2.2.1: - resolution: {integrity: sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==} - engines: {node: '>=6'} - dev: true + cli-boxes@2.2.1: {} - /cliui@6.0.0: - resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==} + cliui@6.0.0: 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==} + cliui@7.0.4: dependencies: string-width: 4.2.3 strip-ansi: 6.0.1 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'} + cliui@8.0.1: 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==} + clone-response@1.0.2: 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@1.0.4: {} - /code-error-fragment@0.0.230: - resolution: {integrity: sha512-cadkfKp6932H8UkhzE/gcUqhRMNf8jHzkAN7+5Myabswaghu4xABTgPHDCjW+dBAJxj/SpkTYokpzDqY4pCzQw==} - engines: {node: '>= 4'} - dev: true + code-error-fragment@0.0.230: {} - /color-convert@1.9.3: - resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} + color-convert@1.9.3: dependencies: color-name: 1.1.3 - /color-convert@2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} + color-convert@2.0.1: dependencies: color-name: 1.1.4 - /color-name@1.1.3: - resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + color-name@1.1.3: {} - /color-name@1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + color-name@1.1.4: {} - /command-exists@1.2.9: - resolution: {integrity: sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==} - dev: true + command-exists@1.2.9: {} - /command-line-args@5.2.1: - resolution: {integrity: sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==} - engines: {node: '>=4.0.0'} + command-line-args@5.2.1: dependencies: array-back: 3.1.0 find-replace: 3.0.0 lodash.camelcase: 4.3.0 typical: 4.0.0 - dev: true - /command-line-usage@6.1.3: - resolution: {integrity: sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw==} - engines: {node: '>=8.0.0'} + command-line-usage@6.1.3: dependencies: array-back: 4.0.2 chalk: 2.4.2 table-layout: 1.0.2 typical: 5.2.0 - dev: true - /commander@10.0.1: - resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} - engines: {node: '>=14'} - dev: true + commander@10.0.1: {} - /commander@3.0.2: - resolution: {integrity: sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==} - dev: true + commander@3.0.2: {} - /concat-map@0.0.1: - resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - dev: true + concat-map@0.0.1: {} - /config-chain@1.1.13: - resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==} + config-chain@1.1.13: dependencies: ini: 1.3.8 proto-list: 1.2.4 - dev: true - /constant-case@2.0.0: - resolution: {integrity: sha512-eS0N9WwmjTqrOmR3o83F5vW8Z+9R1HnVz3xmzT2PMFug9ly+Au/fxRWlEBSb6LcZwspSsEn9Xs1uw9YgzAg1EQ==} + constant-case@2.0.0: dependencies: snake-case: 2.1.0 upper-case: 1.1.3 - dev: true - /cookie@0.4.2: - resolution: {integrity: sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==} - engines: {node: '>= 0.6'} - dev: true + cookie@0.4.2: {} - /core-js@3.30.1: - resolution: {integrity: sha512-ZNS5nbiSwDTq4hFosEDqm65izl2CWmLz0hARJMyNQBgkUZMIF51cQiMvIQKA6hvuaeWxQDP3hEedM1JZIgTldQ==} - requiresBuild: true - dev: true + core-js@3.30.1: {} - /cosmiconfig@8.2.0: - resolution: {integrity: sha512-3rTMnFJA1tCOPwRxtgF4wd7Ab2qvDbL8jX+3smjIbS4HlZBagTlpERbdN7iAbWlrfxE3M8c27kTwTawQ7st+OQ==} - engines: {node: '>=14'} + cosmiconfig@8.2.0: dependencies: import-fresh: 3.3.0 js-yaml: 4.1.0 parse-json: 5.2.0 path-type: 4.0.0 - dev: true - /create-hash@1.2.0: - resolution: {integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==} + create-hash@1.2.0: dependencies: cipher-base: 1.0.4 inherits: 2.0.4 md5.js: 1.3.5 ripemd160: 2.0.2 sha.js: 2.4.11 - dev: true - /create-hmac@1.1.7: - resolution: {integrity: sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==} + create-hmac@1.1.7: dependencies: cipher-base: 1.0.4 create-hash: 1.2.0 @@ -2399,201 +4674,115 @@ packages: ripemd160: 2.0.2 safe-buffer: 5.2.1 sha.js: 2.4.11 - dev: true - /create-require@1.1.1: - resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} - dev: true + create-require@1.1.1: {} - /cross-spawn@5.1.0: - resolution: {integrity: sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==} + cross-spawn@5.1.0: dependencies: lru-cache: 4.1.5 shebang-command: 1.2.0 which: 1.3.1 - dev: false - /cross-spawn@7.0.3: - resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} - engines: {node: '>= 8'} + cross-spawn@7.0.3: dependencies: path-key: 3.1.1 shebang-command: 2.0.0 which: 2.0.2 - dev: true - /csv-generate@3.4.3: - resolution: {integrity: sha512-w/T+rqR0vwvHqWs/1ZyMDWtHHSJaN06klRqJXBEpDJaM/+dZkso0OKh1VcuuYvK3XM53KysVNq8Ko/epCK8wOw==} - dev: false + csv-generate@3.4.3: {} - /csv-parse@4.16.3: - resolution: {integrity: sha512-cO1I/zmz4w2dcKHVvpCr7JVRu8/FymG5OEpmvsZYlccYolPBLoVGKUHgNoc4ZGkFeFlWGEDmMyBM+TTqRdW/wg==} - dev: false + csv-parse@4.16.3: {} - /csv-stringify@5.6.5: - resolution: {integrity: sha512-PjiQ659aQ+fUTQqSrd1XEDnOr52jh30RBurfzkscaE2tPaFsDH5wOAHJiw8XAHphRknCwMUE9KRayc4K/NbO8A==} - dev: false + csv-stringify@5.6.5: {} - /csv@5.5.3: - resolution: {integrity: sha512-QTaY0XjjhTQOdguARF0lGKm5/mEq9PD9/VhZZegHDIBq2tQwgNpHc3dneD4mGo2iJs+fTKv5Bp0fZ+BRuY3Z0g==} - engines: {node: '>= 0.1.90'} + csv@5.5.3: dependencies: csv-generate: 3.4.3 csv-parse: 4.16.3 csv-stringify: 5.6.5 stream-transform: 2.1.3 - dev: false - /dataloader@1.4.0: - resolution: {integrity: sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==} - dev: false + dataloader@1.4.0: {} - /debug@4.3.4(supports-color@8.1.1): - resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true + debug@4.3.4(supports-color@8.1.1): dependencies: ms: 2.1.2 supports-color: 8.1.1 - dev: true - /decamelize-keys@1.1.1: - resolution: {integrity: sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==} - engines: {node: '>=0.10.0'} + decamelize-keys@1.1.1: 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: false + decamelize@1.2.0: {} - /decamelize@4.0.0: - resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} - engines: {node: '>=10'} - dev: true + decamelize@4.0.0: {} - /decompress-response@6.0.0: - resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} - engines: {node: '>=10'} + decompress-response@6.0.0: dependencies: mimic-response: 3.1.0 - dev: true - /deep-eql@4.1.3: - resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==} - engines: {node: '>=6'} + deep-eql@4.1.3: dependencies: type-detect: 4.0.8 - /deep-equal-in-any-order@2.0.6: - resolution: {integrity: sha512-RfnWHQzph10YrUjvWwhd15Dne8ciSJcZ3U6OD7owPwiVwsdE5IFSoZGg8rlwJD11ES+9H5y8j3fCofviRHOqLQ==} + deep-equal-in-any-order@2.0.6: dependencies: lodash.mapvalues: 4.6.0 sort-any: 2.0.0 - dev: true - /deep-extend@0.6.0: - resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} - engines: {node: '>=4.0.0'} - dev: true + deep-extend@0.6.0: {} - /deep-is@0.1.4: - resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} - dev: true + deep-is@0.1.4: {} - /defaults@1.0.4: - resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} + defaults@1.0.4: dependencies: clone: 1.0.4 - dev: false - /defer-to-connect@2.0.1: - resolution: {integrity: sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==} - engines: {node: '>=10'} - dev: true + defer-to-connect@2.0.1: {} - /define-data-property@1.1.1: - resolution: {integrity: sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==} - engines: {node: '>= 0.4'} + define-data-property@1.1.1: dependencies: get-intrinsic: 1.2.2 gopd: 1.0.1 has-property-descriptors: 1.0.0 - dev: false - /define-properties@1.2.1: - resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} - engines: {node: '>= 0.4'} + define-properties@1.2.1: dependencies: define-data-property: 1.1.1 has-property-descriptors: 1.0.0 object-keys: 1.1.1 - dev: false - /delete-empty@3.0.0: - resolution: {integrity: sha512-ZUyiwo76W+DYnKsL3Kim6M/UOavPdBJgDYWOmuQhYaZvJH0AXAHbUNyEDtRbBra8wqqr686+63/0azfEk1ebUQ==} - engines: {node: '>=10'} - hasBin: true + delete-empty@3.0.0: dependencies: ansi-colors: 4.1.3 minimist: 1.2.8 path-starts-with: 2.0.1 rimraf: 2.7.1 - dev: true - /depd@2.0.0: - resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} - engines: {node: '>= 0.8'} - dev: true + depd@2.0.0: {} - /detect-indent@6.1.0: - resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} - engines: {node: '>=8'} - dev: false + detect-indent@6.1.0: {} - /diff@4.0.2: - resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} - engines: {node: '>=0.3.1'} - dev: true + diff@4.0.2: {} - /diff@5.0.0: - resolution: {integrity: sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==} - engines: {node: '>=0.3.1'} - dev: true + diff@5.0.0: {} - /dir-glob@3.0.1: - resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} - engines: {node: '>=8'} + dir-glob@3.0.1: dependencies: path-type: 4.0.0 - /doctrine@3.0.0: - resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} - engines: {node: '>=6.0.0'} + doctrine@3.0.0: dependencies: esutils: 2.0.3 - dev: true - /dot-case@2.1.1: - resolution: {integrity: sha512-HnM6ZlFqcajLsyudHq7LeeLDr2rFAVYtDv/hV5qchQEidSck8j9OPUsXY9KwJv/lHMtYlX4DjRQqwFYa+0r8Ug==} + dot-case@2.1.1: dependencies: no-case: 2.3.2 - dev: true - /dotenv@8.6.0: - resolution: {integrity: sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==} - engines: {node: '>=10'} - dev: false + dotenv@8.6.0: {} - /elliptic@6.5.4: - resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==} + elliptic@6.5.4: dependencies: bn.js: 4.12.0 brorand: 1.1.0 @@ -2603,34 +4792,23 @@ packages: minimalistic-assert: 1.0.1 minimalistic-crypto-utils: 1.0.1 - /emoji-regex@8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + emoji-regex@8.0.0: {} - /end-of-stream@1.4.4: - resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} + end-of-stream@1.4.4: dependencies: once: 1.4.0 - dev: true - /enquirer@2.3.6: - resolution: {integrity: sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==} - engines: {node: '>=8.6'} + enquirer@2.3.6: dependencies: ansi-colors: 4.1.3 - /env-paths@2.2.1: - resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} - engines: {node: '>=6'} - dev: true + env-paths@2.2.1: {} - /error-ex@1.3.2: - resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} + error-ex@1.3.2: dependencies: is-arrayish: 0.2.1 - /es-abstract@1.22.3: - resolution: {integrity: sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==} - engines: {node: '>= 0.4'} + es-abstract@1.22.3: dependencies: array-buffer-byte-length: 1.0.0 arraybuffer.prototype.slice: 1.0.2 @@ -2671,92 +4849,49 @@ packages: typed-array-length: 1.0.4 unbox-primitive: 1.0.2 which-typed-array: 1.1.13 - dev: false - /es-set-tostringtag@2.0.2: - resolution: {integrity: sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==} - engines: {node: '>= 0.4'} + es-set-tostringtag@2.0.2: dependencies: get-intrinsic: 1.2.2 has-tostringtag: 1.0.0 hasown: 2.0.0 - dev: false - /es-shim-unscopables@1.0.2: - resolution: {integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==} + es-shim-unscopables@1.0.2: dependencies: hasown: 2.0.0 - dev: false - /es-to-primitive@1.2.1: - resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} - engines: {node: '>= 0.4'} + es-to-primitive@1.2.1: dependencies: is-callable: 1.2.7 is-date-object: 1.0.2 is-symbol: 1.0.3 - dev: false - /escalade@3.1.1: - resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} - engines: {node: '>=6'} + escalade@3.1.1: {} - /escape-string-regexp@1.0.5: - resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} - engines: {node: '>=0.8.0'} + escape-string-regexp@1.0.5: {} - /escape-string-regexp@4.0.0: - resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} - engines: {node: '>=10'} - dev: true + escape-string-regexp@4.0.0: {} - /eslint-config-prettier@9.1.0(eslint@8.57.0): - resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} - hasBin: true - peerDependencies: - eslint: '>=7.0.0' + eslint-config-prettier@9.1.0(eslint@8.57.0): dependencies: eslint: 8.57.0 - dev: true - /eslint-plugin-prettier@5.1.3(eslint-config-prettier@9.1.0)(eslint@8.57.0)(prettier@3.2.5): - resolution: {integrity: sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==} - engines: {node: ^14.18.0 || >=16.0.0} - peerDependencies: - '@types/eslint': '>=8.0.0' - eslint: '>=8.0.0' - eslint-config-prettier: '*' - prettier: '>=3.0.0' - peerDependenciesMeta: - '@types/eslint': - optional: true - eslint-config-prettier: - optional: true + eslint-plugin-prettier@5.1.3(eslint-config-prettier@9.1.0)(eslint@8.57.0)(prettier@3.2.5): dependencies: eslint: 8.57.0 eslint-config-prettier: 9.1.0(eslint@8.57.0) prettier: 3.2.5 prettier-linter-helpers: 1.0.0 synckit: 0.8.8 - dev: true - /eslint-scope@7.2.2: - resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + eslint-scope@7.2.2: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 - dev: true - /eslint-visitor-keys@3.4.3: - resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true + eslint-visitor-keys@3.4.3: {} - /eslint@8.57.0: - resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - hasBin: true + eslint@8.57.0: dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@eslint-community/regexpp': 4.10.0 @@ -2798,55 +4933,32 @@ packages: text-table: 0.2.0 transitivePeerDependencies: - supports-color - dev: true - /espree@9.6.1: - resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + espree@9.6.1: dependencies: acorn: 8.11.3 acorn-jsx: 5.3.2(acorn@8.11.3) eslint-visitor-keys: 3.4.3 - dev: true - /esprima@4.0.1: - resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} - engines: {node: '>=4'} - hasBin: true - dev: false + esprima@4.0.1: {} - /esquery@1.5.0: - resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} - engines: {node: '>=0.10'} + esquery@1.5.0: dependencies: estraverse: 5.3.0 - dev: true - /esrecurse@4.3.0: - resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} - engines: {node: '>=4.0'} + esrecurse@4.3.0: dependencies: estraverse: 5.3.0 - dev: true - /estraverse@5.3.0: - resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} - engines: {node: '>=4.0'} - dev: true + estraverse@5.3.0: {} - /esutils@2.0.3: - resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} - engines: {node: '>=0.10.0'} - dev: true + esutils@2.0.3: {} - /ethereum-bloom-filters@1.0.10: - resolution: {integrity: sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA==} + ethereum-bloom-filters@1.0.10: dependencies: js-sha3: 0.8.0 - dev: true - /ethereum-cryptography@0.1.3: - resolution: {integrity: sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==} + ethereum-cryptography@0.1.3: dependencies: '@types/pbkdf2': 3.1.0 '@types/secp256k1': 4.0.3 @@ -2863,26 +4975,20 @@ packages: scrypt-js: 3.0.1 secp256k1: 4.0.3 setimmediate: 1.0.5 - dev: true - /ethereum-cryptography@1.1.2: - resolution: {integrity: sha512-XDSJlg4BD+hq9N2FjvotwUET9Tfxpxc3kWGE2AqUG5vcbeunnbImVk3cj6e/xT3phdW21mE8R5IugU4fspQDcQ==} + ethereum-cryptography@1.1.2: dependencies: '@noble/hashes': 1.1.2 '@noble/secp256k1': 1.6.3 '@scure/bip32': 1.1.0 '@scure/bip39': 1.1.0 - dev: true - /ethereumjs-abi@0.6.8: - resolution: {integrity: sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==} + ethereumjs-abi@0.6.8: dependencies: bn.js: 4.12.0 ethereumjs-util: 6.2.1 - dev: true - /ethereumjs-util@6.2.1: - resolution: {integrity: sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==} + ethereumjs-util@6.2.1: dependencies: '@types/bn.js': 4.11.6 bn.js: 4.12.0 @@ -2891,21 +4997,16 @@ packages: ethereum-cryptography: 0.1.3 ethjs-util: 0.1.6 rlp: 2.2.7 - dev: true - /ethereumjs-util@7.1.5: - resolution: {integrity: sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg==} - engines: {node: '>=10.0.0'} + ethereumjs-util@7.1.5: dependencies: '@types/bn.js': 5.1.1 bn.js: 5.2.1 create-hash: 1.2.0 ethereum-cryptography: 0.1.3 rlp: 2.2.7 - dev: true - /ethers@5.7.2: - resolution: {integrity: sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==} + ethers@5.7.2: dependencies: '@ethersproject/abi': 5.7.0 '@ethersproject/abstract-provider': 5.7.0 @@ -2941,60 +5042,38 @@ packages: - bufferutil - utf-8-validate - /ethjs-unit@0.1.6: - resolution: {integrity: sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw==} - engines: {node: '>=6.5.0', npm: '>=3'} + ethjs-unit@0.1.6: dependencies: bn.js: 4.11.6 number-to-bn: 1.7.0 - dev: true - /ethjs-util@0.1.6: - resolution: {integrity: sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==} - engines: {node: '>=6.5.0', npm: '>=3'} + ethjs-util@0.1.6: dependencies: is-hex-prefixed: 1.0.0 strip-hex-prefix: 1.0.0 - dev: true - /evp_bytestokey@1.0.3: - resolution: {integrity: sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==} + evp_bytestokey@1.0.3: dependencies: md5.js: 1.3.5 safe-buffer: 5.2.1 - dev: true - /extendable-error@0.1.7: - resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} - dev: false + extendable-error@0.1.7: {} - /external-editor@3.1.0: - resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} - engines: {node: '>=4'} + external-editor@3.1.0: dependencies: chardet: 0.7.0 iconv-lite: 0.4.24 tmp: 0.0.33 - dev: false - /fast-check@3.1.1: - resolution: {integrity: sha512-3vtXinVyuUKCKFKYcwXhGE6NtGWkqF8Yh3rvMZNzmwz8EPrgoc/v4pDdLHyLnCyCI5MZpZZkDEwFyXyEONOxpA==} - engines: {node: '>=8.0.0'} + fast-check@3.1.1: dependencies: pure-rand: 5.0.3 - dev: true - /fast-deep-equal@3.1.3: - resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - dev: true + fast-deep-equal@3.1.3: {} - /fast-diff@1.2.0: - resolution: {integrity: sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==} - dev: true + fast-diff@1.2.0: {} - /fast-glob@3.3.1: - resolution: {integrity: sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==} - engines: {node: '>=8.6.0'} + fast-glob@3.3.1: dependencies: '@nodelib/fs.stat': 2.0.5 '@nodelib/fs.walk': 1.2.8 @@ -3002,230 +5081,141 @@ packages: merge2: 1.4.1 micromatch: 4.0.5 - /fast-json-stable-stringify@2.1.0: - resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} - dev: true + fast-json-stable-stringify@2.1.0: {} - /fast-levenshtein@2.0.6: - resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} - dev: true + fast-levenshtein@2.0.6: {} - /fastq@1.6.0: - resolution: {integrity: sha512-jmxqQ3Z/nXoeyDmWAzF9kH1aGZSis6e/SbfPmJpUnyZ0ogr6iscHQaml4wsEepEWSdtmpy+eVXmCRIMpxaXqOA==} + fastq@1.6.0: dependencies: reusify: 1.0.4 - /file-entry-cache@6.0.1: - resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} - engines: {node: ^10.12.0 || >=12.0.0} + file-entry-cache@6.0.1: dependencies: flat-cache: 3.2.0 - dev: true - /fill-range@7.0.1: - resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} - engines: {node: '>=8'} + fill-range@7.0.1: dependencies: to-regex-range: 5.0.1 - /find-replace@3.0.0: - resolution: {integrity: sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==} - engines: {node: '>=4.0.0'} + find-replace@3.0.0: dependencies: array-back: 3.1.0 - dev: true - /find-up@2.1.0: - resolution: {integrity: sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==} - engines: {node: '>=4'} + find-up@2.1.0: dependencies: locate-path: 2.0.0 - dev: true - /find-up@4.1.0: - resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} - engines: {node: '>=8'} + find-up@4.1.0: dependencies: locate-path: 5.0.0 path-exists: 4.0.0 - dev: false - /find-up@5.0.0: - resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} - engines: {node: '>=10'} + find-up@5.0.0: dependencies: locate-path: 6.0.0 path-exists: 4.0.0 - /find-yarn-workspace-root2@1.2.16: - resolution: {integrity: sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==} + find-yarn-workspace-root2@1.2.16: dependencies: micromatch: 4.0.5 pkg-dir: 4.2.0 - dev: false - /flat-cache@3.2.0: - resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} - engines: {node: ^10.12.0 || >=12.0.0} + flat-cache@3.2.0: dependencies: flatted: 3.3.1 keyv: 4.5.4 rimraf: 3.0.2 - dev: true - /flat@5.0.2: - resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} - hasBin: true - dev: true + flat@5.0.2: {} - /flatted@3.3.1: - resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} - dev: true + flatted@3.3.1: {} - /follow-redirects@1.15.6(debug@4.3.4): - resolution: {integrity: sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==} - engines: {node: '>=4.0'} - peerDependencies: - debug: '*' - peerDependenciesMeta: - debug: - optional: true + follow-redirects@1.15.6(debug@4.3.4): dependencies: debug: 4.3.4(supports-color@8.1.1) - dev: true - /for-each@0.3.3: - resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + for-each@0.3.3: dependencies: is-callable: 1.2.7 - dev: false - /form-data-encoder@1.7.1: - resolution: {integrity: sha512-EFRDrsMm/kyqbTQocNvRXMLjc7Es2Vk+IQFx/YW7hkUH1eBl4J1fqiP34l74Yt0pFLCNpc06fkbVk00008mzjg==} - dev: true + form-data-encoder@1.7.1: {} - /fp-ts@1.19.3: - resolution: {integrity: sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg==} - dev: true + fp-ts@1.19.3: {} - /fs-extra@0.30.0: - resolution: {integrity: sha512-UvSPKyhMn6LEd/WpUaV9C9t3zATuqoqfWc3QdPhPLb58prN9tqYPlPWi8Krxi44loBoUzlobqZ3+8tGpxxSzwA==} + fs-extra@0.30.0: dependencies: graceful-fs: 4.2.10 jsonfile: 2.4.0 klaw: 1.3.1 path-is-absolute: 1.0.1 rimraf: 2.7.1 - dev: true - /fs-extra@7.0.1: - resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} - engines: {node: '>=6 <7 || >=8'} + fs-extra@7.0.1: dependencies: graceful-fs: 4.2.10 jsonfile: 4.0.0 universalify: 0.1.2 - - /fs-extra@8.1.0: - resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} - engines: {node: '>=6 <7 || >=8'} + + fs-extra@8.1.0: dependencies: graceful-fs: 4.2.10 jsonfile: 4.0.0 universalify: 0.1.2 - dev: false - /fs-extra@9.1.0: - resolution: {integrity: sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==} - engines: {node: '>=10'} + fs-extra@9.1.0: dependencies: at-least-node: 1.0.0 graceful-fs: 4.2.10 jsonfile: 6.1.0 universalify: 2.0.0 - dev: true - /fs.realpath@1.0.0: - resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - dev: true + fs.realpath@1.0.0: {} - /fsevents@2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} - engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} - os: [darwin] - requiresBuild: true - dev: true + fsevents@2.3.2: optional: true - /function-bind@1.1.2: - resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} - dev: false + function-bind@1.1.2: {} - /function.prototype.name@1.1.6: - resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} - engines: {node: '>= 0.4'} + function.prototype.name@1.1.6: dependencies: call-bind: 1.0.5 define-properties: 1.2.1 es-abstract: 1.22.3 functions-have-names: 1.2.3 - dev: false - /functions-have-names@1.2.3: - resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} - dev: false + functions-have-names@1.2.3: {} - /get-caller-file@2.0.5: - resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} - engines: {node: 6.* || 8.* || >= 10.*} + get-caller-file@2.0.5: {} - /get-func-name@2.0.2: - resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} + get-func-name@2.0.2: {} - /get-intrinsic@1.2.2: - resolution: {integrity: sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==} + get-intrinsic@1.2.2: dependencies: function-bind: 1.1.2 has-proto: 1.0.1 has-symbols: 1.0.3 hasown: 2.0.0 - dev: false - /get-stream@5.1.0: - resolution: {integrity: sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==} - engines: {node: '>=8'} + get-stream@5.1.0: dependencies: pump: 3.0.0 - dev: true - /get-stream@6.0.1: - resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} - engines: {node: '>=10'} - dev: true + get-stream@6.0.1: {} - /get-symbol-description@1.0.0: - resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} - engines: {node: '>= 0.4'} + get-symbol-description@1.0.0: dependencies: call-bind: 1.0.5 get-intrinsic: 1.2.2 - dev: false - /glob-parent@5.1.2: - resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} - engines: {node: '>= 6'} + glob-parent@5.1.2: dependencies: is-glob: 4.0.3 - /glob-parent@6.0.2: - resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} - engines: {node: '>=10.13.0'} + glob-parent@6.0.2: dependencies: is-glob: 4.0.3 - dev: true - /glob@7.1.7: - resolution: {integrity: sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==} + glob@7.1.7: dependencies: fs.realpath: 1.0.0 inflight: 1.0.6 @@ -3233,10 +5223,8 @@ packages: minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 - dev: true - /glob@7.2.0: - resolution: {integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==} + glob@7.2.0: dependencies: fs.realpath: 1.0.0 inflight: 1.0.6 @@ -3244,10 +5232,8 @@ packages: minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 - dev: true - /glob@7.2.3: - resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + glob@7.2.3: dependencies: fs.realpath: 1.0.0 inflight: 1.0.6 @@ -3255,36 +5241,24 @@ packages: minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 - dev: true - /glob@8.1.0: - resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} - engines: {node: '>=12'} + glob@8.1.0: dependencies: fs.realpath: 1.0.0 inflight: 1.0.6 inherits: 2.0.4 minimatch: 5.1.6 once: 1.4.0 - dev: true - /globals@13.24.0: - resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} - engines: {node: '>=8'} + globals@13.24.0: dependencies: type-fest: 0.20.2 - dev: true - /globalthis@1.0.3: - resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} - engines: {node: '>= 0.4'} + globalthis@1.0.3: dependencies: define-properties: 1.2.1 - dev: false - /globby@11.1.0: - resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} - engines: {node: '>=10'} + globby@11.1.0: dependencies: array-union: 2.1.0 dir-glob: 3.0.1 @@ -3293,15 +5267,11 @@ packages: merge2: 1.4.1 slash: 3.0.0 - /gopd@1.0.1: - resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + gopd@1.0.1: dependencies: get-intrinsic: 1.2.2 - dev: false - /got@12.1.0: - resolution: {integrity: sha512-hBv2ty9QN2RdbJJMK3hesmSkFTjVIHyIDDbssCKnSmq62edGgImJWD10Eb1k77TiV1bxloxqcFAVK8+9pkhOig==} - engines: {node: '>=14.16'} + got@12.1.0: dependencies: '@sindresorhus/is': 4.6.0 '@szmarczak/http-timer': 5.0.1 @@ -3316,53 +5286,28 @@ packages: lowercase-keys: 3.0.0 p-cancelable: 3.0.0 responselike: 2.0.1 - dev: true - /graceful-fs@4.2.10: - resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} + graceful-fs@4.2.10: {} - /grapheme-splitter@1.0.4: - resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} + grapheme-splitter@1.0.4: {} - /graphemer@1.4.0: - resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - dev: true + graphemer@1.4.0: {} - /hard-rejection@2.1.0: - resolution: {integrity: sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==} - engines: {node: '>=6'} - dev: false + hard-rejection@2.1.0: {} - /hardhat-abi-exporter@2.10.1(hardhat@2.20.1): - resolution: {integrity: sha512-X8GRxUTtebMAd2k4fcPyVnCdPa6dYK4lBsrwzKP5yiSq4i+WadWPIumaLfce53TUf/o2TnLpLOduyO1ylE2NHQ==} - engines: {node: '>=14.14.0'} - peerDependencies: - hardhat: ^2.0.0 + hardhat-abi-exporter@2.10.1(hardhat@2.20.1): dependencies: '@ethersproject/abi': 5.7.0 delete-empty: 3.0.0 hardhat: 2.20.1(ts-node@10.9.2)(typescript@5.4.5) - dev: true - /hardhat-ignore-warnings@0.2.11: - resolution: {integrity: sha512-+nHnRbP6COFZaXE7HAY7TZNE3au5vHe5dkcnyq0XaP07ikT2fJ3NhFY0vn7Deh4Qbz0Z/9Xpnj2ki6Ktgk61pg==} + hardhat-ignore-warnings@0.2.11: dependencies: minimatch: 5.1.6 node-interval-tree: 2.1.2 solidity-comments: 0.0.2 - dev: true - /hardhat@2.20.1(ts-node@10.9.2)(typescript@5.4.5): - resolution: {integrity: sha512-q75xDQiQtCZcTMBwjTovrXEU5ECr49baxr4/OBkIu/ULTPzlB20yk1dRWNmD2IFbAeAeXggaWvQAdpiScaHtPw==} - hasBin: true - peerDependencies: - ts-node: '*' - typescript: '*' - peerDependenciesMeta: - ts-node: - optional: true - typescript: - optional: true + hardhat@2.20.1(ts-node@10.9.2)(typescript@5.4.5): dependencies: '@ethersproject/abi': 5.7.0 '@metamask/eth-sig-util': 4.0.1 @@ -3421,651 +5366,379 @@ packages: - c-kzg - supports-color - utf-8-validate - dev: true - /has-bigints@1.0.2: - resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} - dev: false + has-bigints@1.0.2: {} - /has-flag@3.0.0: - resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} - engines: {node: '>=4'} + has-flag@3.0.0: {} - /has-flag@4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} - engines: {node: '>=8'} + has-flag@4.0.0: {} - /has-property-descriptors@1.0.0: - resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} + has-property-descriptors@1.0.0: dependencies: get-intrinsic: 1.2.2 - dev: false - /has-proto@1.0.1: - resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} - engines: {node: '>= 0.4'} - dev: false + has-proto@1.0.1: {} - /has-symbols@1.0.3: - resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} - engines: {node: '>= 0.4'} - dev: false + has-symbols@1.0.3: {} - /has-tostringtag@1.0.0: - resolution: {integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==} - engines: {node: '>= 0.4'} + has-tostringtag@1.0.0: dependencies: has-symbols: 1.0.3 - dev: false - /has@1.0.3: - resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} - engines: {node: '>= 0.4.0'} + has@1.0.3: dependencies: function-bind: 1.1.2 - dev: false - /hash-base@3.1.0: - resolution: {integrity: sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==} - engines: {node: '>=4'} + hash-base@3.1.0: dependencies: inherits: 2.0.4 readable-stream: 3.6.0 safe-buffer: 5.2.1 - dev: true - /hash.js@1.1.7: - resolution: {integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==} + hash.js@1.1.7: dependencies: inherits: 2.0.4 minimalistic-assert: 1.0.1 - /hasown@2.0.0: - resolution: {integrity: sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==} - engines: {node: '>= 0.4'} + hasown@2.0.0: dependencies: function-bind: 1.1.2 - dev: false - /he@1.2.0: - resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} - hasBin: true - dev: true + he@1.2.0: {} - /header-case@1.0.1: - resolution: {integrity: sha512-i0q9mkOeSuhXw6bGgiQCCBgY/jlZuV/7dZXyZ9c6LcBrqwvT8eT719E9uxE5LiZftdl+z81Ugbg/VvXV4OJOeQ==} + header-case@1.0.1: dependencies: no-case: 2.3.2 upper-case: 1.1.3 - dev: true - /hmac-drbg@1.0.1: - resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} + hmac-drbg@1.0.1: dependencies: hash.js: 1.1.7 minimalistic-assert: 1.0.1 minimalistic-crypto-utils: 1.0.1 - /hosted-git-info@2.8.9: - resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} - dev: false + hosted-git-info@2.8.9: {} - /http-cache-semantics@4.0.3: - resolution: {integrity: sha512-TcIMG3qeVLgDr1TEd2XvHaTnMPwYQUQMIBLy+5pLSDKYFc7UIqj39w8EGzZkaxoLv/l2K8HaI0t5AVA+YYgUew==} - dev: true + http-cache-semantics@4.0.3: {} - /http-errors@2.0.0: - resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} - engines: {node: '>= 0.8'} + http-errors@2.0.0: dependencies: depd: 2.0.0 inherits: 2.0.4 setprototypeof: 1.2.0 statuses: 2.0.1 toidentifier: 1.0.1 - dev: true - /http2-wrapper@2.1.11: - resolution: {integrity: sha512-aNAk5JzLturWEUiuhAN73Jcbq96R7rTitAoXV54FYMatvihnpD2+6PUgU4ce3D/m5VDbw+F5CsyKSF176ptitQ==} - engines: {node: '>=10.19.0'} + http2-wrapper@2.1.11: dependencies: quick-lru: 5.1.1 resolve-alpn: 1.2.1 - dev: true - /https-proxy-agent@5.0.1: - resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} - engines: {node: '>= 6'} + https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 debug: 4.3.4(supports-color@8.1.1) transitivePeerDependencies: - supports-color - dev: true - /human-id@1.0.2: - resolution: {integrity: sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==} - dev: false + human-id@1.0.2: {} - /iconv-lite@0.4.24: - resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} - engines: {node: '>=0.10.0'} + iconv-lite@0.4.24: dependencies: safer-buffer: 2.1.2 - /ignore@5.2.4: - resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} - engines: {node: '>= 4'} + ignore@5.2.4: {} - /ignore@5.3.1: - resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} - engines: {node: '>= 4'} - dev: true + ignore@5.3.1: {} - /immutable@4.1.0: - resolution: {integrity: sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==} - dev: true + immutable@4.1.0: {} - /import-fresh@3.3.0: - resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} - engines: {node: '>=6'} + import-fresh@3.3.0: dependencies: parent-module: 1.0.1 resolve-from: 4.0.0 - dev: true - /imurmurhash@0.1.4: - resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} - engines: {node: '>=0.8.19'} - dev: true + imurmurhash@0.1.4: {} - /indent-string@4.0.0: - resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} - engines: {node: '>=8'} + indent-string@4.0.0: {} - /inflight@1.0.6: - resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + inflight@1.0.6: dependencies: once: 1.4.0 wrappy: 1.0.2 - dev: true - /inherits@2.0.4: - resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + inherits@2.0.4: {} - /ini@1.3.8: - resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} - dev: true + ini@1.3.8: {} - /internal-slot@1.0.6: - resolution: {integrity: sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==} - engines: {node: '>= 0.4'} + internal-slot@1.0.6: dependencies: get-intrinsic: 1.2.2 hasown: 2.0.0 side-channel: 1.0.4 - dev: false - /io-ts@1.10.4: - resolution: {integrity: sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g==} + io-ts@1.10.4: dependencies: fp-ts: 1.19.3 - dev: true - /is-array-buffer@3.0.2: - resolution: {integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==} + is-array-buffer@3.0.2: dependencies: call-bind: 1.0.5 get-intrinsic: 1.2.2 is-typed-array: 1.1.12 - dev: false - /is-arrayish@0.2.1: - resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} + is-arrayish@0.2.1: {} - /is-bigint@1.0.4: - resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} + is-bigint@1.0.4: dependencies: has-bigints: 1.0.2 - dev: false - /is-binary-path@2.1.0: - resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} - engines: {node: '>=8'} + is-binary-path@2.1.0: dependencies: binary-extensions: 2.2.0 - dev: true - /is-boolean-object@1.1.2: - resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} - engines: {node: '>= 0.4'} + is-boolean-object@1.1.2: dependencies: call-bind: 1.0.5 has-tostringtag: 1.0.0 - dev: false - /is-callable@1.2.7: - resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} - engines: {node: '>= 0.4'} - dev: false + is-callable@1.2.7: {} - /is-core-module@2.10.0: - resolution: {integrity: sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==} + is-core-module@2.10.0: dependencies: has: 1.0.3 - dev: false - /is-date-object@1.0.2: - resolution: {integrity: sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==} - engines: {node: '>= 0.4'} - dev: false + is-date-object@1.0.2: {} - /is-extglob@2.1.1: - resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} - engines: {node: '>=0.10.0'} + is-extglob@2.1.1: {} - /is-fullwidth-code-point@3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} - engines: {node: '>=8'} + is-fullwidth-code-point@3.0.0: {} - /is-glob@4.0.3: - resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} - engines: {node: '>=0.10.0'} + is-glob@4.0.3: dependencies: is-extglob: 2.1.1 - /is-hex-prefixed@1.0.0: - resolution: {integrity: sha1-fY035q135dEnFIkTxXPggtd39VQ=} - engines: {node: '>=6.5.0', npm: '>=3'} - dev: true + is-hex-prefixed@1.0.0: {} - /is-lower-case@1.1.3: - resolution: {integrity: sha512-+5A1e/WJpLLXZEDlgz4G//WYSHyQBD32qa4Jd3Lw06qQlv3fJHnp3YIHjTQSGzHMgzmVKz2ZP3rBxTHkPw/lxA==} + is-lower-case@1.1.3: dependencies: lower-case: 1.1.4 - dev: true - /is-negative-zero@2.0.2: - resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} - engines: {node: '>= 0.4'} - dev: false + is-negative-zero@2.0.2: {} - /is-number-object@1.0.7: - resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} - engines: {node: '>= 0.4'} + is-number-object@1.0.7: dependencies: has-tostringtag: 1.0.0 - dev: false - /is-number@7.0.0: - resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} - engines: {node: '>=0.12.0'} + is-number@7.0.0: {} - /is-path-inside@3.0.3: - resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} - engines: {node: '>=8'} - dev: true + is-path-inside@3.0.3: {} - /is-plain-obj@1.1.0: - resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} - engines: {node: '>=0.10.0'} - dev: false + is-plain-obj@1.1.0: {} - /is-plain-obj@2.1.0: - resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} - engines: {node: '>=8'} - dev: true + is-plain-obj@2.1.0: {} - /is-regex@1.1.4: - resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} - engines: {node: '>= 0.4'} + is-regex@1.1.4: dependencies: call-bind: 1.0.5 has-tostringtag: 1.0.0 - dev: false - /is-shared-array-buffer@1.0.2: - resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} + is-shared-array-buffer@1.0.2: dependencies: call-bind: 1.0.5 - dev: false - /is-string@1.0.7: - resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} - engines: {node: '>= 0.4'} + is-string@1.0.7: dependencies: has-tostringtag: 1.0.0 - dev: false - /is-subdir@1.2.0: - resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} - engines: {node: '>=4'} + is-subdir@1.2.0: 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'} + is-symbol@1.0.3: dependencies: has-symbols: 1.0.3 - dev: false - /is-typed-array@1.1.12: - resolution: {integrity: sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==} - engines: {node: '>= 0.4'} + is-typed-array@1.1.12: dependencies: which-typed-array: 1.1.13 - dev: false - /is-unicode-supported@0.1.0: - resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} - engines: {node: '>=10'} - dev: true + is-unicode-supported@0.1.0: {} - /is-upper-case@1.1.2: - resolution: {integrity: sha512-GQYSJMgfeAmVwh9ixyk888l7OIhNAGKtY6QA+IrWlu9MDTCaXmeozOZ2S9Knj7bQwBO/H6J2kb+pbyTUiMNbsw==} + is-upper-case@1.1.2: dependencies: upper-case: 1.1.3 - dev: true - /is-weakref@1.0.2: - resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} + is-weakref@1.0.2: dependencies: call-bind: 1.0.5 - dev: false - /is-windows@1.0.2: - resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} - engines: {node: '>=0.10.0'} - dev: false + is-windows@1.0.2: {} - /isarray@2.0.5: - resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} - dev: false + isarray@2.0.5: {} - /isexe@2.0.0: - resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + isexe@2.0.0: {} - /js-sdsl@4.4.2: - resolution: {integrity: sha512-dwXFwByc/ajSV6m5bcKAPwe4yDDF6D614pxmIi5odytzxRlwqF6nwoiCek80Ixc7Cvma5awClxrzFtxCQvcM8w==} - dev: true + js-sdsl@4.4.2: {} - /js-sha3@0.8.0: - resolution: {integrity: sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==} + js-sha3@0.8.0: {} - /js-tokens@4.0.0: - resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + js-tokens@4.0.0: {} - /js-yaml@3.14.1: - resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} - hasBin: true + js-yaml@3.14.1: dependencies: argparse: 1.0.10 esprima: 4.0.1 - dev: false - /js-yaml@4.1.0: - resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} - hasBin: true + js-yaml@4.1.0: dependencies: argparse: 2.0.1 - dev: true - /json-buffer@3.0.1: - resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} - dev: true + json-buffer@3.0.1: {} - /json-parse-even-better-errors@2.3.1: - resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + json-parse-even-better-errors@2.3.1: {} - /json-schema-traverse@0.4.1: - resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} - dev: true + json-schema-traverse@0.4.1: {} - /json-schema-traverse@1.0.0: - resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} - dev: true + json-schema-traverse@1.0.0: {} - /json-stable-stringify-without-jsonify@1.0.1: - resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} - dev: true + json-stable-stringify-without-jsonify@1.0.1: {} - /json-to-ast@2.1.0: - resolution: {integrity: sha512-W9Lq347r8tA1DfMvAGn9QNcgYm4Wm7Yc+k8e6vezpMnRT+NHbtlxgNBXRVjXe9YM6eTn6+p/MKOlV/aABJcSnQ==} - engines: {node: '>= 4'} + json-to-ast@2.1.0: dependencies: code-error-fragment: 0.0.230 grapheme-splitter: 1.0.4 - dev: true - /jsonfile@2.4.0: - resolution: {integrity: sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==} + jsonfile@2.4.0: optionalDependencies: graceful-fs: 4.2.10 - dev: true - /jsonfile@4.0.0: - resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} + jsonfile@4.0.0: optionalDependencies: graceful-fs: 4.2.10 - /jsonfile@6.1.0: - resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + jsonfile@6.1.0: dependencies: universalify: 2.0.0 optionalDependencies: graceful-fs: 4.2.10 - dev: true - /jsonpointer@5.0.1: - resolution: {integrity: sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==} - engines: {node: '>=0.10.0'} - dev: true + jsonpointer@5.0.1: {} - /keccak@3.0.2: - resolution: {integrity: sha512-PyKKjkH53wDMLGrvmRGSNWgmSxZOUqbnXwKL9tmgbFYA1iAYqW21kfR7mZXV0MlESiefxQQE9X9fTa3X+2MPDQ==} - engines: {node: '>=10.0.0'} - requiresBuild: true + keccak@3.0.2: dependencies: node-addon-api: 2.0.2 node-gyp-build: 4.5.0 readable-stream: 3.6.0 - dev: true - /keyv@4.5.0: - resolution: {integrity: sha512-2YvuMsA+jnFGtBareKqgANOEKe1mk3HKiXu2fRmAfyxG0MJAywNhi5ttWA3PMjl4NmpyjZNbFifR2vNjW1znfA==} + keyv@4.5.0: dependencies: json-buffer: 3.0.1 - dev: true - /keyv@4.5.4: - resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + keyv@4.5.4: dependencies: json-buffer: 3.0.1 - dev: true - /kind-of@6.0.3: - resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} - engines: {node: '>=0.10.0'} - dev: false + kind-of@6.0.3: {} - /klaw@1.3.1: - resolution: {integrity: sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw==} + klaw@1.3.1: optionalDependencies: graceful-fs: 4.2.10 - dev: true - /kleur@4.1.5: - resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} - engines: {node: '>=6'} - dev: false + kleur@4.1.5: {} - /latest-version@7.0.0: - resolution: {integrity: sha512-KvNT4XqAMzdcL6ka6Tl3i2lYeFDgXNCuIX+xNx6ZMVR1dFq+idXd9FLKNMOIx0t9mJ9/HudyX4oZWXZQ0UJHeg==} - engines: {node: '>=14.16'} + latest-version@7.0.0: dependencies: package-json: 8.1.1 - dev: true - /leven@3.1.0: - resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} - engines: {node: '>=6'} - dev: true + leven@3.1.0: {} - /levn@0.4.1: - resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} - engines: {node: '>= 0.8.0'} + levn@0.4.1: dependencies: prelude-ls: 1.2.1 type-check: 0.4.0 - dev: true - /lines-and-columns@1.2.4: - resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + lines-and-columns@1.2.4: {} - /load-yaml-file@0.2.0: - resolution: {integrity: sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==} - engines: {node: '>=6'} + load-yaml-file@0.2.0: 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'} + locate-path@2.0.0: dependencies: p-locate: 2.0.0 path-exists: 3.0.0 - dev: true - /locate-path@5.0.0: - resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} - engines: {node: '>=8'} + locate-path@5.0.0: dependencies: p-locate: 4.1.0 - dev: false - /locate-path@6.0.0: - resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} - engines: {node: '>=10'} + locate-path@6.0.0: dependencies: p-locate: 5.0.0 - /lodash.camelcase@4.3.0: - resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} - dev: true + lodash.camelcase@4.3.0: {} - /lodash.clonedeep@4.5.0: - resolution: {integrity: sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==} - dev: true + lodash.clonedeep@4.5.0: {} - /lodash.isequal@4.5.0: - resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==} - dev: true + lodash.isequal@4.5.0: {} - /lodash.mapvalues@4.6.0: - resolution: {integrity: sha512-JPFqXFeZQ7BfS00H58kClY7SPVeHertPE0lNuCyZ26/XlN8TvakYD7b9bGyNmXbT/D3BbtPAAmq90gPWqLkxlQ==} - dev: true + lodash.mapvalues@4.6.0: {} - /lodash.merge@4.6.2: - resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} - dev: true + lodash.merge@4.6.2: {} - /lodash.startcase@4.4.0: - resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} - dev: false + lodash.startcase@4.4.0: {} - /lodash.truncate@4.4.2: - resolution: {integrity: sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==} - dev: true + lodash.truncate@4.4.2: {} - /lodash@4.17.21: - resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} - dev: true + lodash@4.17.21: {} - /log-symbols@4.1.0: - resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} - engines: {node: '>=10'} + log-symbols@4.1.0: dependencies: chalk: 4.1.2 is-unicode-supported: 0.1.0 - dev: true - /loupe@2.3.7: - resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} + loupe@2.3.7: dependencies: get-func-name: 2.0.2 - /lower-case-first@1.0.2: - resolution: {integrity: sha512-UuxaYakO7XeONbKrZf5FEgkantPf5DUqDayzP5VXZrtRPdH86s4kN47I8B3TW10S4QKiE3ziHNf3kRN//okHjA==} + lower-case-first@1.0.2: dependencies: lower-case: 1.1.4 - dev: true - /lower-case@1.1.4: - resolution: {integrity: sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA==} - dev: true + lower-case@1.1.4: {} - /lowercase-keys@2.0.0: - resolution: {integrity: sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==} - engines: {node: '>=8'} - dev: true + lowercase-keys@2.0.0: {} - /lowercase-keys@3.0.0: - resolution: {integrity: sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dev: true + lowercase-keys@3.0.0: {} - /lru-cache@10.2.2: - resolution: {integrity: sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==} - engines: {node: 14 || >=16.14} - dev: true + lru-cache@10.2.2: {} - /lru-cache@4.1.5: - resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==} + lru-cache@4.1.5: dependencies: pseudomap: 1.0.2 yallist: 2.1.2 - dev: false - /lru_map@0.3.3: - resolution: {integrity: sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==} - dev: true + lru_map@0.3.3: {} - /make-error@1.3.6: - resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} - dev: true + make-error@1.3.6: {} - /map-obj@1.0.1: - resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} - engines: {node: '>=0.10.0'} - dev: false + map-obj@1.0.1: {} - /map-obj@4.3.0: - resolution: {integrity: sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==} - engines: {node: '>=8'} - dev: false + map-obj@4.3.0: {} - /md5.js@1.3.5: - resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==} + md5.js@1.3.5: dependencies: hash-base: 3.1.0 inherits: 2.0.4 safe-buffer: 5.2.1 - dev: true - /memorystream@0.3.1: - resolution: {integrity: sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==} - engines: {node: '>= 0.10.0'} - dev: true + memorystream@0.3.1: {} - /meow@6.1.1: - resolution: {integrity: sha512-3YffViIt2QWgTy6Pale5QpopX/IvU3LPL03jOTqp6pGj3VjesdO/U8CuHMKpnQr4shCNCM5fd5XFFvIIl6JBHg==} - engines: {node: '>=8'} + meow@6.1.1: dependencies: '@types/minimist': 1.2.5 camelcase-keys: 6.2.2 @@ -4078,102 +5751,57 @@ packages: trim-newlines: 3.0.1 type-fest: 0.13.1 yargs-parser: 18.1.3 - dev: false - /merge2@1.4.1: - resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} - engines: {node: '>= 8'} + merge2@1.4.1: {} - /micromatch@4.0.5: - resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} - engines: {node: '>=8.6'} + micromatch@4.0.5: dependencies: braces: 3.0.2 picomatch: 2.3.1 - /mimic-response@1.0.1: - resolution: {integrity: sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==} - engines: {node: '>=4'} - requiresBuild: true - dev: true + mimic-response@1.0.1: {} - /mimic-response@3.1.0: - resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} - engines: {node: '>=10'} - dev: true + mimic-response@3.1.0: {} - /min-indent@1.0.1: - resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} - engines: {node: '>=4'} - dev: false + min-indent@1.0.1: {} - /minimalistic-assert@1.0.1: - resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} + minimalistic-assert@1.0.1: {} - /minimalistic-crypto-utils@1.0.1: - resolution: {integrity: sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==} + minimalistic-crypto-utils@1.0.1: {} - /minimatch@3.1.2: - resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + minimatch@3.1.2: dependencies: brace-expansion: 1.1.11 - dev: true - /minimatch@5.0.1: - resolution: {integrity: sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==} - engines: {node: '>=10'} + minimatch@5.0.1: dependencies: brace-expansion: 2.0.1 - dev: true - /minimatch@5.1.6: - resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} - engines: {node: '>=10'} + minimatch@5.1.6: dependencies: brace-expansion: 2.0.1 - dev: true - - /minimatch@9.0.4: - resolution: {integrity: sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==} - engines: {node: '>=16 || 14 >=14.17'} + + minimatch@9.0.4: dependencies: brace-expansion: 2.0.1 - dev: true - /minimist-options@4.1.0: - resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} - engines: {node: '>= 6'} + minimist-options@4.1.0: dependencies: arrify: 1.0.1 is-plain-obj: 1.1.0 kind-of: 6.0.3 - dev: false - /minimist@1.2.8: - resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} - dev: true + minimist@1.2.8: {} - /mixme@0.5.10: - resolution: {integrity: sha512-5H76ANWinB1H3twpJ6JY8uvAtpmFvHNArpilJAjXRKXSDDLPIMoZArw5SH0q9z+lLs8IrMw7Q2VWpWimFKFT1Q==} - engines: {node: '>= 8.0.0'} - dev: false + mixme@0.5.10: {} - /mkdirp@1.0.4: - resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} - engines: {node: '>=10'} - hasBin: true - dev: true + mkdirp@1.0.4: {} - /mnemonist@0.38.5: - resolution: {integrity: sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg==} + mnemonist@0.38.5: dependencies: obliterator: 2.0.4 - dev: true - /mocha@10.2.0: - resolution: {integrity: sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==} - engines: {node: '>= 14.0.0'} - hasBin: true + mocha@10.2.0: dependencies: ansi-colors: 4.1.1 browser-stdout: 1.3.1 @@ -4196,139 +5824,75 @@ packages: yargs: 16.2.0 yargs-parser: 20.2.4 yargs-unparser: 2.0.0 - dev: true - /moment@2.30.1: - resolution: {integrity: sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==} - dev: true + moment@2.30.1: {} - /ms@2.1.2: - resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} - dev: true + ms@2.1.2: {} - /ms@2.1.3: - resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - dev: true + ms@2.1.3: {} - /nanoid@3.3.3: - resolution: {integrity: sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==} - engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - hasBin: true - dev: true + nanoid@3.3.3: {} - /natural-compare@1.4.0: - resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - dev: true + natural-compare@1.4.0: {} - /neodoc@2.0.2: - resolution: {integrity: sha512-NAppJ0YecKWdhSXFYCHbo6RutiX8vOt/Jo3l46mUg6pQlpJNaqc5cGxdrW2jITQm5JIYySbFVPDl3RrREXNyPw==} + neodoc@2.0.2: dependencies: ansi-regex: 2.1.1 - dev: true - /no-case@2.3.2: - resolution: {integrity: sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==} + no-case@2.3.2: dependencies: lower-case: 1.1.4 - dev: true - /node-addon-api@2.0.2: - resolution: {integrity: sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==} - dev: true + node-addon-api@2.0.2: {} - /node-fetch@2.6.7: - resolution: {integrity: sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==} - engines: {node: 4.x || >=6.0.0} - peerDependencies: - encoding: ^0.1.0 - peerDependenciesMeta: - encoding: - optional: true + node-fetch@2.6.7: dependencies: whatwg-url: 5.0.0 - dev: false - /node-gyp-build@4.5.0: - resolution: {integrity: sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==} - hasBin: true - dev: true + node-gyp-build@4.5.0: {} - /node-interval-tree@2.1.2: - resolution: {integrity: sha512-bJ9zMDuNGzVQg1xv0bCPzyEDxHgbrx7/xGj6CDokvizZZmastPsOh0JJLuY8wA5q2SfX1TLNMk7XNV8WxbGxzA==} - engines: {node: '>= 14.0.0'} + node-interval-tree@2.1.2: dependencies: shallowequal: 1.1.0 - dev: true - /nofilter@1.0.4: - resolution: {integrity: sha512-N8lidFp+fCz+TD51+haYdbDGrcBWwuHX40F5+z0qkUjMJ5Tp+rdSuAkMJ9N9eoolDlEVTf6u5icM+cNKkKW2mA==} - engines: {node: '>=8'} - dev: true + nofilter@1.0.4: {} - /nofilter@3.1.0: - resolution: {integrity: sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==} - engines: {node: '>=12.19'} - dev: true + nofilter@3.1.0: {} - /normalize-package-data@2.5.0: - resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} + normalize-package-data@2.5.0: dependencies: hosted-git-info: 2.8.9 resolve: 1.22.1 semver: 5.7.1 validate-npm-package-license: 3.0.4 - dev: false - /normalize-path@3.0.0: - resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} - engines: {node: '>=0.10.0'} - dev: true + normalize-path@3.0.0: {} - /normalize-url@6.1.0: - resolution: {integrity: sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==} - engines: {node: '>=10'} - dev: true + normalize-url@6.1.0: {} - /number-to-bn@1.7.0: - resolution: {integrity: sha512-wsJ9gfSz1/s4ZsJN01lyonwuxA1tml6X1yBDnfpMglypcBRFZZkus26EdPSlqS5GJfYddVZa22p3VNb3z5m5Ig==} - engines: {node: '>=6.5.0', npm: '>=3'} + number-to-bn@1.7.0: dependencies: bn.js: 4.11.6 strip-hex-prefix: 1.0.0 - dev: true - /object-inspect@1.13.1: - resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} - dev: false + object-inspect@1.13.1: {} - /object-keys@1.1.1: - resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} - engines: {node: '>= 0.4'} - dev: false + object-keys@1.1.1: {} - /object.assign@4.1.4: - resolution: {integrity: sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==} - engines: {node: '>= 0.4'} + object.assign@4.1.4: dependencies: call-bind: 1.0.5 define-properties: 1.2.1 has-symbols: 1.0.3 object-keys: 1.1.1 - dev: false - /obliterator@2.0.4: - resolution: {integrity: sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ==} - dev: true + obliterator@2.0.4: {} - /once@1.4.0: - resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + once@1.4.0: dependencies: wrappy: 1.0.2 - dev: true - /optionator@0.9.3: - resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} - engines: {node: '>= 0.8.0'} + optionator@0.9.3: dependencies: '@aashutoshrathi/word-wrap': 1.2.6 deep-is: 0.1.4 @@ -4336,666 +5900,388 @@ packages: levn: 0.4.1 prelude-ls: 1.2.1 type-check: 0.4.0 - dev: true - /ordinal@1.0.3: - resolution: {integrity: sha512-cMddMgb2QElm8G7vdaa02jhUNbTSrhsgAGUz1OokD83uJTwSUn+nKoNoKVVaRa08yF6sgfO7Maou1+bgLd9rdQ==} - dev: true + ordinal@1.0.3: {} - /os-tmpdir@1.0.2: - resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} - engines: {node: '>=0.10.0'} + os-tmpdir@1.0.2: {} - /outdent@0.5.0: - resolution: {integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==} - dev: false + outdent@0.5.0: {} - /p-cancelable@3.0.0: - resolution: {integrity: sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==} - engines: {node: '>=12.20'} - dev: true + p-cancelable@3.0.0: {} - /p-filter@2.1.0: - resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==} - engines: {node: '>=8'} + p-filter@2.1.0: dependencies: p-map: 2.1.0 - dev: false - /p-limit@1.3.0: - resolution: {integrity: sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==} - engines: {node: '>=4'} + p-limit@1.3.0: dependencies: p-try: 1.0.0 - dev: true - /p-limit@2.3.0: - resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} - engines: {node: '>=6'} + p-limit@2.3.0: dependencies: p-try: 2.2.0 - dev: false - /p-limit@3.1.0: - resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} - engines: {node: '>=10'} + p-limit@3.1.0: dependencies: yocto-queue: 0.1.0 - /p-locate@2.0.0: - resolution: {integrity: sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==} - engines: {node: '>=4'} + p-locate@2.0.0: dependencies: p-limit: 1.3.0 - dev: true - /p-locate@4.1.0: - resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} - engines: {node: '>=8'} + p-locate@4.1.0: dependencies: p-limit: 2.3.0 - dev: false - /p-locate@5.0.0: - resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} - engines: {node: '>=10'} + p-locate@5.0.0: dependencies: p-limit: 3.1.0 - /p-map@2.1.0: - resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} - engines: {node: '>=6'} - dev: false + p-map@2.1.0: {} - /p-map@4.0.0: - resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} - engines: {node: '>=10'} + p-map@4.0.0: dependencies: aggregate-error: 3.1.0 - dev: true - /p-try@1.0.0: - resolution: {integrity: sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==} - engines: {node: '>=4'} - dev: true + p-try@1.0.0: {} - /p-try@2.2.0: - resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} - engines: {node: '>=6'} - dev: false + p-try@2.2.0: {} - /package-json@8.1.1: - resolution: {integrity: sha512-cbH9IAIJHNj9uXi196JVsRlt7cHKak6u/e6AkL/bkRelZ7rlL3X1YKxsZwa36xipOEKAsdtmaG6aAJoM1fx2zA==} - engines: {node: '>=14.16'} + package-json@8.1.1: dependencies: got: 12.1.0 registry-auth-token: 5.0.2 registry-url: 6.0.1 semver: 7.6.2 - dev: true - /param-case@2.1.1: - resolution: {integrity: sha512-eQE845L6ot89sk2N8liD8HAuH4ca6Vvr7VWAWwt7+kvvG5aBcPmmphQ68JsEG2qa9n1TykS2DLeMt363AAH8/w==} + param-case@2.1.1: dependencies: no-case: 2.3.2 - dev: true - /parent-module@1.0.1: - resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} - engines: {node: '>=6'} + parent-module@1.0.1: dependencies: callsites: 3.1.0 - dev: true - /parse-json@5.2.0: - resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} - engines: {node: '>=8'} + parse-json@5.2.0: dependencies: '@babel/code-frame': 7.18.6 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 - /pascal-case@2.0.1: - resolution: {integrity: sha512-qjS4s8rBOJa2Xm0jmxXiyh1+OFf6ekCWOvUaRgAQSktzlTbMotS0nmG9gyYAybCWBcuP4fsBeRCKNwGBnMe2OQ==} + pascal-case@2.0.1: dependencies: camel-case: 3.0.0 upper-case-first: 1.1.2 - dev: true - /path-case@2.1.1: - resolution: {integrity: sha512-Ou0N05MioItesaLr9q8TtHVWmJ6fxWdqKB2RohFmNWVyJ+2zeKIeDNWAN6B/Pe7wpzWChhZX6nONYmOnMeJQ/Q==} + path-case@2.1.1: dependencies: no-case: 2.3.2 - dev: true - /path-exists@3.0.0: - resolution: {integrity: sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==} - engines: {node: '>=4'} - dev: true + path-exists@3.0.0: {} - /path-exists@4.0.0: - resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} - engines: {node: '>=8'} + path-exists@4.0.0: {} - /path-is-absolute@1.0.1: - resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} - engines: {node: '>=0.10.0'} - dev: true + path-is-absolute@1.0.1: {} - /path-key@3.1.1: - resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} - engines: {node: '>=8'} - dev: true + path-key@3.1.1: {} - /path-parse@1.0.7: - resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + path-parse@1.0.7: {} - /path-starts-with@2.0.1: - resolution: {integrity: sha512-wZ3AeiRBRlNwkdUxvBANh0+esnt38DLffHDujZyRHkqkaKHTglnY2EP5UX3b8rdeiSutgO4y9NEJwXezNP5vHg==} - engines: {node: '>=8'} - dev: true + path-starts-with@2.0.1: {} - /path-type@4.0.0: - resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} - engines: {node: '>=8'} + path-type@4.0.0: {} - /pathval@1.1.1: - resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} + pathval@1.1.1: {} - /pbkdf2@3.1.2: - resolution: {integrity: sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==} - engines: {node: '>=0.12'} + pbkdf2@3.1.2: dependencies: create-hash: 1.2.0 create-hmac: 1.1.7 ripemd160: 2.0.2 safe-buffer: 5.2.1 sha.js: 2.4.11 - dev: true - /picomatch@2.3.1: - resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} - engines: {node: '>=8.6'} + picomatch@2.3.1: {} - /pify@4.0.1: - resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} - engines: {node: '>=6'} - dev: false + pify@4.0.1: {} - /pkg-dir@4.2.0: - resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} - engines: {node: '>=8'} + pkg-dir@4.2.0: dependencies: find-up: 4.1.0 - dev: false - /pluralize@8.0.0: - resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} - engines: {node: '>=4'} - dev: true + pluralize@8.0.0: {} - /preferred-pm@3.1.3: - resolution: {integrity: sha512-MkXsENfftWSRpzCzImcp4FRsCc3y1opwB73CfCNWyzMqArju2CrlMHlqB7VexKiPEOjGMbttv1r9fSCn5S610w==} - engines: {node: '>=10'} + preferred-pm@3.1.3: 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.2.1: - resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} - engines: {node: '>= 0.8.0'} - dev: true + prelude-ls@1.2.1: {} - /prettier-linter-helpers@1.0.0: - resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} - engines: {node: '>=6.0.0'} + prettier-linter-helpers@1.0.0: dependencies: fast-diff: 1.2.0 - dev: true - /prettier-plugin-solidity@1.3.1(prettier@2.8.8): - resolution: {integrity: sha512-MN4OP5I2gHAzHZG1wcuJl0FsLS3c4Cc5494bbg+6oQWBPuEamjwDvmGfFMZ6NFzsh3Efd9UUxeT7ImgjNH4ozA==} - engines: {node: '>=16'} - peerDependencies: - prettier: '>=2.3.0' + prettier-plugin-solidity@1.3.1(prettier@2.8.8): dependencies: '@solidity-parser/parser': 0.17.0 prettier: 2.8.8 semver: 7.6.2 solidity-comments-extractor: 0.0.8 - dev: true optional: true - /prettier-plugin-solidity@1.3.1(prettier@3.2.5): - resolution: {integrity: sha512-MN4OP5I2gHAzHZG1wcuJl0FsLS3c4Cc5494bbg+6oQWBPuEamjwDvmGfFMZ6NFzsh3Efd9UUxeT7ImgjNH4ozA==} - engines: {node: '>=16'} - peerDependencies: - prettier: '>=2.3.0' + prettier-plugin-solidity@1.3.1(prettier@3.2.5): dependencies: '@solidity-parser/parser': 0.17.0 prettier: 3.2.5 semver: 7.6.2 solidity-comments-extractor: 0.0.8 - dev: true - /prettier@2.8.8: - resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} - engines: {node: '>=10.13.0'} - hasBin: true + prettier@2.8.8: {} - /prettier@3.2.5: - resolution: {integrity: sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==} - engines: {node: '>=14'} - hasBin: true - dev: true + prettier@3.2.5: {} - /proto-list@1.2.4: - resolution: {integrity: sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==} - dev: true + proto-list@1.2.4: {} - /pseudomap@1.0.2: - resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} - dev: false + pseudomap@1.0.2: {} - /pump@3.0.0: - resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} - requiresBuild: true + pump@3.0.0: dependencies: end-of-stream: 1.4.4 once: 1.4.0 - dev: true - /punycode@2.1.1: - resolution: {integrity: sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==} - engines: {node: '>=6'} - dev: true + punycode@2.1.1: {} - /pure-rand@5.0.3: - resolution: {integrity: sha512-9N8x1h8dptBQpHyC7aZMS+iNOAm97WMGY0AFrguU1cpfW3I5jINkWe5BIY5md0ofy+1TCIELsVcm/GJXZSaPbw==} - dev: true + pure-rand@5.0.3: {} - /quick-lru@4.0.1: - resolution: {integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==} - engines: {node: '>=8'} - dev: false + quick-lru@4.0.1: {} - /quick-lru@5.1.1: - resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==} - engines: {node: '>=10'} - dev: true + quick-lru@5.1.1: {} - /randombytes@2.1.0: - resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} + randombytes@2.1.0: dependencies: safe-buffer: 5.2.1 - dev: true - /raw-body@2.5.1: - resolution: {integrity: sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==} - engines: {node: '>= 0.8'} + raw-body@2.5.1: dependencies: bytes: 3.1.2 http-errors: 2.0.0 iconv-lite: 0.4.24 unpipe: 1.0.0 - dev: true - /rc@1.2.8: - resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} - hasBin: true + rc@1.2.8: dependencies: deep-extend: 0.6.0 ini: 1.3.8 minimist: 1.2.8 strip-json-comments: 2.0.1 - dev: true - /read-pkg-up@7.0.1: - resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==} - engines: {node: '>=8'} + read-pkg-up@7.0.1: dependencies: find-up: 4.1.0 read-pkg: 5.2.0 type-fest: 0.8.1 - dev: false - /read-pkg@5.2.0: - resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==} - engines: {node: '>=8'} + read-pkg@5.2.0: 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'} + read-yaml-file@1.1.0: dependencies: graceful-fs: 4.2.10 js-yaml: 3.14.1 pify: 4.0.1 strip-bom: 3.0.0 - dev: false - /readable-stream@3.6.0: - resolution: {integrity: sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==} - engines: {node: '>= 6'} + readable-stream@3.6.0: dependencies: inherits: 2.0.4 string_decoder: 1.3.0 util-deprecate: 1.0.2 - dev: true - /readdirp@3.6.0: - resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} - engines: {node: '>=8.10.0'} + readdirp@3.6.0: dependencies: picomatch: 2.3.1 - dev: true - /redent@3.0.0: - resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} - engines: {node: '>=8'} + redent@3.0.0: 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'} - dev: true + reduce-flatten@2.0.0: {} - /regenerator-runtime@0.14.1: - resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} + regenerator-runtime@0.14.1: {} - /regexp.prototype.flags@1.5.1: - resolution: {integrity: sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==} - engines: {node: '>= 0.4'} + regexp.prototype.flags@1.5.1: dependencies: call-bind: 1.0.5 define-properties: 1.2.1 set-function-name: 2.0.1 - dev: false - /registry-auth-token@5.0.2: - resolution: {integrity: sha512-o/3ikDxtXaA59BmZuZrJZDJv8NMDGSj+6j6XaeBmHw8eY1i1qd9+6H+LjVvQXx3HN6aRCGa1cUdJ9RaJZUugnQ==} - engines: {node: '>=14'} + registry-auth-token@5.0.2: dependencies: '@pnpm/npm-conf': 2.2.2 - dev: true - /registry-url@6.0.1: - resolution: {integrity: sha512-+crtS5QjFRqFCoQmvGduwYWEBng99ZvmFvF+cUJkGYF1L1BfU8C6Zp9T7f5vPAwyLkUExpvK+ANVZmGU49qi4Q==} - engines: {node: '>=12'} + registry-url@6.0.1: dependencies: rc: 1.2.8 - dev: true - /require-directory@2.1.1: - resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} - engines: {node: '>=0.10.0'} + require-directory@2.1.1: {} - /require-from-string@2.0.2: - resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} - engines: {node: '>=0.10.0'} - dev: true + require-from-string@2.0.2: {} - /require-main-filename@2.0.0: - resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} - dev: false + require-main-filename@2.0.0: {} - /resolve-alpn@1.2.1: - resolution: {integrity: sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==} - dev: true + resolve-alpn@1.2.1: {} - /resolve-from@4.0.0: - resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} - engines: {node: '>=4'} - dev: true + resolve-from@4.0.0: {} - /resolve-from@5.0.0: - resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} - engines: {node: '>=8'} - dev: false + resolve-from@5.0.0: {} - /resolve@1.17.0: - resolution: {integrity: sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==} + resolve@1.17.0: dependencies: path-parse: 1.0.7 - dev: true - /resolve@1.22.1: - resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==} - hasBin: true + resolve@1.22.1: dependencies: is-core-module: 2.10.0 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 - dev: false - /responselike@2.0.1: - resolution: {integrity: sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==} + responselike@2.0.1: dependencies: lowercase-keys: 2.0.0 - dev: true - /reusify@1.0.4: - resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} - engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + reusify@1.0.4: {} - /rimraf@2.7.1: - resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} - hasBin: true + rimraf@2.7.1: dependencies: glob: 7.2.3 - dev: true - /rimraf@3.0.2: - resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - hasBin: true + rimraf@3.0.2: dependencies: glob: 7.2.3 - dev: true - /ripemd160@2.0.2: - resolution: {integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==} + ripemd160@2.0.2: dependencies: hash-base: 3.1.0 inherits: 2.0.4 - dev: true - /rlp@2.2.7: - resolution: {integrity: sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==} - hasBin: true + rlp@2.2.7: dependencies: bn.js: 5.2.1 - dev: true - /run-parallel@1.1.9: - resolution: {integrity: sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==} + run-parallel@1.1.9: {} - /rust-verkle-wasm@0.0.1: - resolution: {integrity: sha512-BN6fiTsxcd2dCECz/cHtGTt9cdLJR925nh7iAuRcj8ymKw7OOaPmCneQZ7JePOJ/ia27TjEL91VdOi88Yf+mcA==} - dev: true + rust-verkle-wasm@0.0.1: {} - /rustbn-wasm@0.2.0: - resolution: {integrity: sha512-FThvYFNTqrEKGqXuseeg0zR7yROh/6U1617mCHF68OVqrN1tNKRN7Tdwy4WayPVsCmmK+eMxtIZX1qL6JxTkMg==} + rustbn-wasm@0.2.0: dependencies: '@scure/base': 1.1.1 - dev: true - /safe-array-concat@1.0.1: - resolution: {integrity: sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==} - engines: {node: '>=0.4'} + safe-array-concat@1.0.1: dependencies: call-bind: 1.0.5 get-intrinsic: 1.2.2 has-symbols: 1.0.3 isarray: 2.0.5 - dev: false - /safe-buffer@5.1.2: - resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} - dev: true + safe-buffer@5.1.2: {} - /safe-buffer@5.2.1: - resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - dev: true + safe-buffer@5.2.1: {} - /safe-regex-test@1.0.0: - resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} + safe-regex-test@1.0.0: dependencies: call-bind: 1.0.5 get-intrinsic: 1.2.2 is-regex: 1.1.4 - dev: false - /safer-buffer@2.1.2: - resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + safer-buffer@2.1.2: {} - /scrypt-js@3.0.1: - resolution: {integrity: sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==} + scrypt-js@3.0.1: {} - /secp256k1@4.0.3: - resolution: {integrity: sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA==} - engines: {node: '>=10.0.0'} - requiresBuild: true + secp256k1@4.0.3: dependencies: elliptic: 6.5.4 node-addon-api: 2.0.2 node-gyp-build: 4.5.0 - dev: true - /semver@5.7.1: - resolution: {integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==} - hasBin: true + semver@5.7.1: {} - /semver@6.3.0: - resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} - hasBin: true - dev: true + semver@6.3.0: {} - /semver@7.6.2: - resolution: {integrity: sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==} - engines: {node: '>=10'} - hasBin: true + semver@7.6.2: {} - /sentence-case@2.1.1: - resolution: {integrity: sha512-ENl7cYHaK/Ktwk5OTD+aDbQ3uC8IByu/6Bkg+HDv8Mm+XnBnppVNalcfJTNsp1ibstKh030/JKQQWglDvtKwEQ==} + sentence-case@2.1.1: dependencies: no-case: 2.3.2 upper-case-first: 1.1.2 - dev: true - /serialize-javascript@6.0.0: - resolution: {integrity: sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==} + serialize-javascript@6.0.0: dependencies: randombytes: 2.1.0 - dev: true - /set-blocking@2.0.0: - resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} - dev: false + set-blocking@2.0.0: {} - /set-function-length@1.1.1: - resolution: {integrity: sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==} - engines: {node: '>= 0.4'} + set-function-length@1.1.1: dependencies: define-data-property: 1.1.1 get-intrinsic: 1.2.2 gopd: 1.0.1 has-property-descriptors: 1.0.0 - dev: false - /set-function-name@2.0.1: - resolution: {integrity: sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==} - engines: {node: '>= 0.4'} + set-function-name@2.0.1: dependencies: define-data-property: 1.1.1 functions-have-names: 1.2.3 has-property-descriptors: 1.0.0 - dev: false - /setimmediate@1.0.5: - resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==} - dev: true + setimmediate@1.0.5: {} - /setprototypeof@1.2.0: - resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} - dev: true + setprototypeof@1.2.0: {} - /sha.js@2.4.11: - resolution: {integrity: sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==} - hasBin: true + sha.js@2.4.11: dependencies: inherits: 2.0.4 safe-buffer: 5.2.1 - dev: true - /shallowequal@1.1.0: - resolution: {integrity: sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==} - dev: true + shallowequal@1.1.0: {} - /shebang-command@1.2.0: - resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} - engines: {node: '>=0.10.0'} + shebang-command@1.2.0: dependencies: shebang-regex: 1.0.0 - dev: false - /shebang-command@2.0.0: - resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} - engines: {node: '>=8'} + shebang-command@2.0.0: dependencies: shebang-regex: 3.0.0 - dev: true - /shebang-regex@1.0.0: - resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==} - engines: {node: '>=0.10.0'} - dev: false + shebang-regex@1.0.0: {} - /shebang-regex@3.0.0: - resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} - engines: {node: '>=8'} - dev: true + shebang-regex@3.0.0: {} - /side-channel@1.0.4: - resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} + side-channel@1.0.4: dependencies: call-bind: 1.0.5 get-intrinsic: 1.2.2 object-inspect: 1.13.1 - dev: false - /signal-exit@3.0.7: - resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} - dev: false + signal-exit@3.0.7: {} - /slash@3.0.0: - resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} - engines: {node: '>=8'} + slash@3.0.0: {} - /slice-ansi@4.0.0: - resolution: {integrity: sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==} - engines: {node: '>=10'} + slice-ansi@4.0.0: dependencies: ansi-styles: 4.3.0 astral-regex: 2.0.0 is-fullwidth-code-point: 3.0.0 - dev: true - /smartwrap@2.0.2: - resolution: {integrity: sha512-vCsKNQxb7PnCNd2wY1WClWifAc2lwqsG8OaswpJkVJsvMGcnEntdTCDajZCkk93Ay1U3t/9puJmb525Rg5MZBA==} - engines: {node: '>=6'} - hasBin: true + smartwrap@2.0.2: dependencies: array.prototype.flat: 1.3.2 breakword: 1.0.6 @@ -5003,18 +6289,12 @@ packages: 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==} + snake-case@2.1.0: dependencies: no-case: 2.3.2 - dev: true - /solc@0.7.3(debug@4.3.4): - resolution: {integrity: sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA==} - engines: {node: '>=8.0.0'} - hasBin: true + solc@0.7.3(debug@4.3.4): dependencies: command-exists: 1.2.9 commander: 3.0.2 @@ -5027,23 +6307,15 @@ packages: tmp: 0.0.33 transitivePeerDependencies: - debug - dev: true - /solhint-plugin-prettier@0.1.0(prettier-plugin-solidity@1.3.1)(prettier@3.2.5): - resolution: {integrity: sha512-SDOTSM6tZxZ6hamrzl3GUgzF77FM6jZplgL2plFBclj/OjKP8Z3eIPojKU73gRr0MvOS8ACZILn8a5g0VTz/Gw==} - peerDependencies: - prettier: ^3.0.0 - prettier-plugin-solidity: ^1.0.0 + solhint-plugin-prettier@0.1.0(prettier-plugin-solidity@1.3.1)(prettier@3.2.5): dependencies: '@prettier/sync': 0.3.0(prettier@3.2.5) prettier: 3.2.5 prettier-linter-helpers: 1.0.0 prettier-plugin-solidity: 1.3.1(prettier@3.2.5) - dev: true - /solhint@5.0.1: - resolution: {integrity: sha512-QeQLS9HGCnIiibt+xiOa/+MuP7BWz9N7C5+Mj9pLHshdkNhuo3AzCpWmjfWVZBUuwIUO3YyCRVIcYLR3YOKGfg==} - hasBin: true + solhint@5.0.1: dependencies: '@solidity-parser/parser': 0.18.0 ajv: 6.12.6 @@ -5065,105 +6337,40 @@ packages: text-table: 0.2.0 optionalDependencies: prettier: 2.8.8 - dev: true - /solidity-comments-darwin-arm64@0.0.2: - resolution: {integrity: sha512-HidWkVLSh7v+Vu0CA7oI21GWP/ZY7ro8g8OmIxE8oTqyMwgMbE8F1yc58Sj682Hj199HCZsjmtn1BE4PCbLiGA==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: true + solidity-comments-darwin-arm64@0.0.2: optional: true - /solidity-comments-darwin-x64@0.0.2: - resolution: {integrity: sha512-Zjs0Ruz6faBTPT6fBecUt6qh4CdloT8Bwoc0+qxRoTn9UhYscmbPQkUgQEbS0FQPysYqVzzxJB4h1Ofbf4wwtA==} - engines: {node: '>= 10'} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: true + solidity-comments-darwin-x64@0.0.2: optional: true - /solidity-comments-extractor@0.0.8: - resolution: {integrity: sha512-htM7Vn6LhHreR+EglVMd2s+sZhcXAirB1Zlyrv5zBuTxieCvjfnRpd7iZk75m/u6NOlEyQ94C6TWbBn2cY7w8g==} - dev: true + solidity-comments-extractor@0.0.8: {} - /solidity-comments-freebsd-x64@0.0.2: - resolution: {integrity: sha512-8Qe4mpjuAxFSwZJVk7B8gAoLCdbtS412bQzBwk63L8dmlHogvE39iT70aAk3RHUddAppT5RMBunlPUCFYJ3ZTw==} - engines: {node: '>= 10'} - cpu: [x64] - os: [freebsd] - requiresBuild: true - dev: true + solidity-comments-freebsd-x64@0.0.2: optional: true - /solidity-comments-linux-arm64-gnu@0.0.2: - resolution: {integrity: sha512-spkb0MZZnmrP+Wtq4UxP+nyPAVRe82idOjqndolcNR0S9Xvu4ebwq+LvF4HiUgjTDmeiqYiFZQ8T9KGdLSIoIg==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true + solidity-comments-linux-arm64-gnu@0.0.2: optional: true - /solidity-comments-linux-arm64-musl@0.0.2: - resolution: {integrity: sha512-guCDbHArcjE+JDXYkxx5RZzY1YF6OnAKCo+sTC5fstyW/KGKaQJNPyBNWuwYsQiaEHpvhW1ha537IvlGek8GqA==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true + solidity-comments-linux-arm64-musl@0.0.2: optional: true - /solidity-comments-linux-x64-gnu@0.0.2: - resolution: {integrity: sha512-zIqLehBK/g7tvrFmQljrfZXfkEeLt2v6wbe+uFu6kH/qAHZa7ybt8Vc0wYcmjo2U0PeBm15d79ee3AkwbIjFdQ==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true + solidity-comments-linux-x64-gnu@0.0.2: optional: true - /solidity-comments-linux-x64-musl@0.0.2: - resolution: {integrity: sha512-R9FeDloVlFGTaVkOlELDVC7+1Tjx5WBPI5L8r0AGOPHK3+jOcRh6sKYpI+VskSPDc3vOO46INkpDgUXrKydlIw==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true + solidity-comments-linux-x64-musl@0.0.2: optional: true - /solidity-comments-win32-arm64-msvc@0.0.2: - resolution: {integrity: sha512-QnWJoCQcJj+rnutULOihN9bixOtYWDdF5Rfz9fpHejL1BtNjdLW1om55XNVHGAHPqBxV4aeQQ6OirKnp9zKsug==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: true + solidity-comments-win32-arm64-msvc@0.0.2: optional: true - /solidity-comments-win32-ia32-msvc@0.0.2: - resolution: {integrity: sha512-vUg4nADtm/NcOtlIymG23NWJUSuMsvX15nU7ynhGBsdKtt8xhdP3C/zA6vjDk8Jg+FXGQL6IHVQ++g/7rSQi0w==} - engines: {node: '>= 10'} - cpu: [ia32] - os: [win32] - requiresBuild: true - dev: true + solidity-comments-win32-ia32-msvc@0.0.2: optional: true - /solidity-comments-win32-x64-msvc@0.0.2: - resolution: {integrity: sha512-36j+KUF4V/y0t3qatHm/LF5sCUCBx2UndxE1kq5bOzh/s+nQgatuyB+Pd5BfuPQHdWu2KaExYe20FlAa6NL7+Q==} - engines: {node: '>= 10'} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: true + solidity-comments-win32-x64-msvc@0.0.2: optional: true - /solidity-comments@0.0.2: - resolution: {integrity: sha512-G+aK6qtyUfkn1guS8uzqUeua1dURwPlcOjoTYW/TwmXAcE7z/1+oGCfZUdMSe4ZMKklNbVZNiG5ibnF8gkkFfw==} - engines: {node: '>= 12'} + solidity-comments@0.0.2: optionalDependencies: solidity-comments-darwin-arm64: 0.0.2 solidity-comments-darwin-x64: 0.0.2 @@ -5175,297 +6382,175 @@ packages: solidity-comments-win32-arm64-msvc: 0.0.2 solidity-comments-win32-ia32-msvc: 0.0.2 solidity-comments-win32-x64-msvc: 0.0.2 - dev: true - /sort-any@2.0.0: - resolution: {integrity: sha512-T9JoiDewQEmWcnmPn/s9h/PH9t3d/LSWi0RgVmXSuDYeZXTZOZ1/wrK2PHaptuR1VXe3clLLt0pD6sgVOwjNEA==} + sort-any@2.0.0: dependencies: lodash: 4.17.21 - dev: true - /source-map-support@0.5.21: - resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + source-map-support@0.5.21: dependencies: buffer-from: 1.1.2 source-map: 0.6.1 - dev: true - /source-map@0.6.1: - resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} - engines: {node: '>=0.10.0'} - dev: true + source-map@0.6.1: {} - /spawndamnit@2.0.0: - resolution: {integrity: sha512-j4JKEcncSjFlqIwU5L/rp2N5SIPsdxaRsIv678+TZxZ0SRDJTm8JrxJMjE/XuiEZNEir3S8l0Fa3Ke339WI4qA==} + spawndamnit@2.0.0: dependencies: cross-spawn: 5.1.0 signal-exit: 3.0.7 - dev: false - /spdx-correct@3.1.1: - resolution: {integrity: sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==} + spdx-correct@3.1.1: dependencies: spdx-expression-parse: 3.0.1 spdx-license-ids: 3.0.12 - dev: false - /spdx-exceptions@2.3.0: - resolution: {integrity: sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==} - dev: false + spdx-exceptions@2.3.0: {} - /spdx-expression-parse@3.0.1: - resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} + spdx-expression-parse@3.0.1: dependencies: spdx-exceptions: 2.3.0 spdx-license-ids: 3.0.12 - dev: false - /spdx-license-ids@3.0.12: - resolution: {integrity: sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==} - dev: false + spdx-license-ids@3.0.12: {} - /sprintf-js@1.0.3: - resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} - dev: false + sprintf-js@1.0.3: {} - /stacktrace-parser@0.1.10: - resolution: {integrity: sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg==} - engines: {node: '>=6'} + stacktrace-parser@0.1.10: dependencies: type-fest: 0.7.1 - dev: true - /statuses@2.0.1: - resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} - engines: {node: '>= 0.8'} - dev: true + statuses@2.0.1: {} - /stream-transform@2.1.3: - resolution: {integrity: sha512-9GHUiM5hMiCi6Y03jD2ARC1ettBXkQBoQAe7nJsPknnI0ow10aXjTnew8QtYQmLjzn974BnmWEAJgCY6ZP1DeQ==} + stream-transform@2.1.3: dependencies: mixme: 0.5.10 - dev: false - /string-format@2.0.0: - resolution: {integrity: sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA==} - dev: true + string-format@2.0.0: {} - /string-width@4.2.3: - resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} - engines: {node: '>=8'} + string-width@4.2.3: dependencies: emoji-regex: 8.0.0 is-fullwidth-code-point: 3.0.0 strip-ansi: 6.0.1 - /string.prototype.trim@1.2.8: - resolution: {integrity: sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==} - engines: {node: '>= 0.4'} + string.prototype.trim@1.2.8: dependencies: call-bind: 1.0.5 define-properties: 1.2.1 es-abstract: 1.22.3 - dev: false - /string.prototype.trimend@1.0.7: - resolution: {integrity: sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==} + string.prototype.trimend@1.0.7: dependencies: call-bind: 1.0.5 define-properties: 1.2.1 es-abstract: 1.22.3 - dev: false - /string.prototype.trimstart@1.0.7: - resolution: {integrity: sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==} + string.prototype.trimstart@1.0.7: dependencies: call-bind: 1.0.5 define-properties: 1.2.1 es-abstract: 1.22.3 - dev: false - /string_decoder@1.3.0: - resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + string_decoder@1.3.0: dependencies: safe-buffer: 5.2.1 - dev: true - /strip-ansi@6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} - engines: {node: '>=8'} + strip-ansi@6.0.1: dependencies: ansi-regex: 5.0.1 - /strip-bom@3.0.0: - resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} - engines: {node: '>=4'} - dev: false + strip-bom@3.0.0: {} - /strip-hex-prefix@1.0.0: - resolution: {integrity: sha1-DF8VX+8RUTczd96du1iNoFUA428=} - engines: {node: '>=6.5.0', npm: '>=3'} + strip-hex-prefix@1.0.0: dependencies: is-hex-prefixed: 1.0.0 - dev: true - /strip-indent@3.0.0: - resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} - engines: {node: '>=8'} + strip-indent@3.0.0: dependencies: min-indent: 1.0.1 - dev: false - /strip-json-comments@2.0.1: - resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} - engines: {node: '>=0.10.0'} - dev: true + strip-json-comments@2.0.1: {} - /strip-json-comments@3.1.1: - resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} - engines: {node: '>=8'} - dev: true + strip-json-comments@3.1.1: {} - /supports-color@5.5.0: - resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} - engines: {node: '>=4'} + supports-color@5.5.0: dependencies: has-flag: 3.0.0 - /supports-color@7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} - engines: {node: '>=8'} + supports-color@7.2.0: dependencies: has-flag: 4.0.0 - /supports-color@8.1.1: - resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} - engines: {node: '>=10'} + supports-color@8.1.1: 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: false + supports-preserve-symlinks-flag@1.0.0: {} - /swap-case@1.1.2: - resolution: {integrity: sha512-BAmWG6/bx8syfc6qXPprof3Mn5vQgf5dwdUNJhsNqU9WdPt5P+ES/wQ5bxfijy8zwZgZZHslC3iAsxsuQMCzJQ==} + swap-case@1.1.2: dependencies: lower-case: 1.1.4 upper-case: 1.1.3 - dev: true - /synckit@0.8.8: - resolution: {integrity: sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==} - engines: {node: ^14.18.0 || >=16.0.0} + synckit@0.8.8: dependencies: '@pkgr/core': 0.1.1 tslib: 2.6.2 - dev: true - /table-layout@1.0.2: - resolution: {integrity: sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A==} - engines: {node: '>=8.0.0'} + table-layout@1.0.2: dependencies: array-back: 4.0.2 deep-extend: 0.6.0 typical: 5.2.0 wordwrapjs: 4.0.1 - dev: true - /table@6.8.1: - resolution: {integrity: sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==} - engines: {node: '>=10.0.0'} + table@6.8.1: dependencies: ajv: 8.11.0 lodash.truncate: 4.4.2 slice-ansi: 4.0.0 string-width: 4.2.3 strip-ansi: 6.0.1 - dev: true - /term-size@2.2.1: - resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} - engines: {node: '>=8'} - dev: false + term-size@2.2.1: {} - /text-table@0.2.0: - resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} - dev: true + text-table@0.2.0: {} - /title-case@2.1.1: - resolution: {integrity: sha512-EkJoZ2O3zdCz3zJsYCsxyq2OC5hrxR9mfdd5I+w8h/tmFfeOxJ+vvkxsKxdmN0WtS9zLdHEgfgVOiMVgv+Po4Q==} + title-case@2.1.1: dependencies: no-case: 2.3.2 upper-case: 1.1.3 - dev: true - /tmp@0.0.33: - resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} - engines: {node: '>=0.6.0'} + tmp@0.0.33: dependencies: os-tmpdir: 1.0.2 - /to-regex-range@5.0.1: - resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} - engines: {node: '>=8.0'} + to-regex-range@5.0.1: dependencies: is-number: 7.0.0 - /toidentifier@1.0.1: - resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} - engines: {node: '>=0.6'} - dev: true + toidentifier@1.0.1: {} - /tr46@0.0.3: - resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} - dev: false + tr46@0.0.3: {} - /trim-newlines@3.0.1: - resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} - engines: {node: '>=8'} - dev: false + trim-newlines@3.0.1: {} - /ts-api-utils@1.3.0(typescript@5.4.5): - resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} - engines: {node: '>=16'} - peerDependencies: - typescript: '>=4.2.0' + ts-api-utils@1.3.0(typescript@5.4.5): dependencies: typescript: 5.4.5 - dev: true - /ts-command-line-args@2.5.1: - resolution: {integrity: sha512-H69ZwTw3rFHb5WYpQya40YAX2/w7Ut75uUECbgBIsLmM+BNuYnxsltfyyLMxy6sEeKxgijLTnQtLd0nKd6+IYw==} - hasBin: true + ts-command-line-args@2.5.1: dependencies: chalk: 4.1.2 command-line-args: 5.2.1 command-line-usage: 6.1.3 string-format: 2.0.0 - dev: true - /ts-essentials@7.0.3(typescript@5.4.5): - resolution: {integrity: sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ==} - peerDependencies: - typescript: '>=3.7.0' + ts-essentials@7.0.3(typescript@5.4.5): dependencies: typescript: 5.4.5 - dev: true - /ts-node@10.9.2(@types/node@20.12.12)(typescript@5.4.5): - resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} - hasBin: true - peerDependencies: - '@swc/core': '>=1.2.50' - '@swc/wasm': '>=1.2.50' - '@types/node': '*' - typescript: '>=2.7' - peerDependenciesMeta: - '@swc/core': - optional: true - '@swc/wasm': - optional: true + ts-node@10.9.2(@types/node@20.12.12)(typescript@5.4.5): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.9 @@ -5482,24 +6567,14 @@ packages: typescript: 5.4.5 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 - dev: true - /tslib@1.14.1: - resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} - dev: true + tslib@1.14.1: {} - /tslib@2.6.2: - resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} - dev: true + tslib@2.6.2: {} - /tsort@0.0.1: - resolution: {integrity: sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw==} - dev: true + tsort@0.0.1: {} - /tty-table@4.2.3: - resolution: {integrity: sha512-Fs15mu0vGzCrj8fmJNP7Ynxt5J7praPXqFN0leZeZBXJwkMxv9cb2D454k1ltrtUSJbZ4yH4e0CynsHLxmUfFA==} - engines: {node: '>=8.0.0'} - hasBin: true + tty-table@4.2.3: dependencies: chalk: 4.1.2 csv: 5.5.3 @@ -5508,62 +6583,30 @@ packages: strip-ansi: 6.0.1 wcwidth: 1.0.1 yargs: 17.7.2 - dev: false - /tweetnacl-util@0.15.1: - resolution: {integrity: sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==} - dev: true + tweetnacl-util@0.15.1: {} - /tweetnacl@1.0.3: - resolution: {integrity: sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==} - dev: true + tweetnacl@1.0.3: {} - /type-check@0.4.0: - resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} - engines: {node: '>= 0.8.0'} + type-check@0.4.0: dependencies: prelude-ls: 1.2.1 - dev: true - /type-detect@4.0.8: - resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} - engines: {node: '>=4'} + type-detect@4.0.8: {} - /type-fest@0.13.1: - resolution: {integrity: sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==} - engines: {node: '>=10'} - dev: false + type-fest@0.13.1: {} - /type-fest@0.20.2: - resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} - engines: {node: '>=10'} - dev: true + type-fest@0.20.2: {} - /type-fest@0.21.3: - resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} - engines: {node: '>=10'} - dev: true + type-fest@0.21.3: {} - /type-fest@0.6.0: - resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==} - engines: {node: '>=8'} - dev: false + type-fest@0.6.0: {} - /type-fest@0.7.1: - resolution: {integrity: sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==} - engines: {node: '>=8'} - dev: true + type-fest@0.7.1: {} - /type-fest@0.8.1: - resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} - engines: {node: '>=8'} - dev: false + type-fest@0.8.1: {} - /typechain@8.3.2(typescript@5.4.5): - resolution: {integrity: sha512-x/sQYr5w9K7yv3es7jo4KTX05CLxOf7TRWwoHlrjRh8H82G64g+k7VuWPJlgMo6qrjfCulOdfBjiaDtmhFYD/Q==} - hasBin: true - peerDependencies: - typescript: '>=4.3.0' + typechain@8.3.2(typescript@5.4.5): dependencies: '@types/prettier': 2.7.1 debug: 4.3.4(supports-color@8.1.1) @@ -5578,145 +6621,87 @@ packages: typescript: 5.4.5 transitivePeerDependencies: - supports-color - dev: true - /typed-array-buffer@1.0.0: - resolution: {integrity: sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==} - engines: {node: '>= 0.4'} + typed-array-buffer@1.0.0: dependencies: call-bind: 1.0.5 get-intrinsic: 1.2.2 is-typed-array: 1.1.12 - dev: false - /typed-array-byte-length@1.0.0: - resolution: {integrity: sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==} - engines: {node: '>= 0.4'} + typed-array-byte-length@1.0.0: dependencies: call-bind: 1.0.5 for-each: 0.3.3 has-proto: 1.0.1 is-typed-array: 1.1.12 - dev: false - /typed-array-byte-offset@1.0.0: - resolution: {integrity: sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==} - engines: {node: '>= 0.4'} + typed-array-byte-offset@1.0.0: dependencies: available-typed-arrays: 1.0.5 call-bind: 1.0.5 for-each: 0.3.3 has-proto: 1.0.1 is-typed-array: 1.1.12 - dev: false - /typed-array-length@1.0.4: - resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==} + typed-array-length@1.0.4: dependencies: call-bind: 1.0.5 for-each: 0.3.3 is-typed-array: 1.1.12 - dev: false - /typescript@5.4.5: - resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} - engines: {node: '>=14.17'} - hasBin: true - dev: true + typescript@5.4.5: {} - /typical@4.0.0: - resolution: {integrity: sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==} - engines: {node: '>=8'} - dev: true + typical@4.0.0: {} - /typical@5.2.0: - resolution: {integrity: sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==} - engines: {node: '>=8'} - dev: true + typical@5.2.0: {} - /unbox-primitive@1.0.2: - resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} + unbox-primitive@1.0.2: dependencies: call-bind: 1.0.5 has-bigints: 1.0.2 has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 - dev: false - /undici-types@5.26.5: - resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} - dev: true + undici-types@5.26.5: {} - /undici@5.28.4: - resolution: {integrity: sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==} - engines: {node: '>=14.0'} + undici@5.28.4: dependencies: '@fastify/busboy': 2.1.1 - dev: true - /universalify@0.1.2: - resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} - engines: {node: '>= 4.0.0'} + universalify@0.1.2: {} - /universalify@2.0.0: - resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} - engines: {node: '>= 10.0.0'} - dev: true + universalify@2.0.0: {} - /unpipe@1.0.0: - resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} - engines: {node: '>= 0.8'} - dev: true + unpipe@1.0.0: {} - /upper-case-first@1.1.2: - resolution: {integrity: sha512-wINKYvI3Db8dtjikdAqoBbZoP6Q+PZUyfMR7pmwHzjC2quzSkUq5DmPrTtPEqHaz8AGtmsB4TqwapMTM1QAQOQ==} + upper-case-first@1.1.2: dependencies: upper-case: 1.1.3 - dev: true - /upper-case@1.1.3: - resolution: {integrity: sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA==} - dev: true + upper-case@1.1.3: {} - /uri-js@4.4.1: - resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + uri-js@4.4.1: dependencies: punycode: 2.1.1 - dev: true - /utf8@3.0.0: - resolution: {integrity: sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==} - dev: true + utf8@3.0.0: {} - /util-deprecate@1.0.2: - resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} - dev: true + util-deprecate@1.0.2: {} - /uuid@8.3.2: - resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} - hasBin: true - dev: true + uuid@8.3.2: {} - /v8-compile-cache-lib@3.0.1: - resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} - dev: true + v8-compile-cache-lib@3.0.1: {} - /validate-npm-package-license@3.0.4: - resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} + validate-npm-package-license@3.0.4: dependencies: spdx-correct: 3.1.1 spdx-expression-parse: 3.0.1 - dev: false - /wcwidth@1.0.1: - resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} + wcwidth@1.0.1: dependencies: defaults: 1.0.4 - dev: false - /web3-utils@1.7.4: - resolution: {integrity: sha512-acBdm6Evd0TEZRnChM/MCvGsMwYKmSh7OaUfNf5OKG0CIeGWD/6gqLOWIwmwSnre/2WrA1nKGId5uW2e5EfluA==} - engines: {node: '>=8.0.0'} + web3-utils@1.7.4: dependencies: bn.js: 5.2.1 ethereum-bloom-filters: 1.0.10 @@ -5725,175 +6710,97 @@ packages: number-to-bn: 1.7.0 randombytes: 2.1.0 utf8: 3.0.0 - dev: true - /webidl-conversions@3.0.1: - resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} - dev: false + webidl-conversions@3.0.1: {} - /whatwg-url@5.0.0: - resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + whatwg-url@5.0.0: dependencies: tr46: 0.0.3 webidl-conversions: 3.0.1 - dev: false - /which-boxed-primitive@1.0.2: - resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} + which-boxed-primitive@1.0.2: 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.3 - dev: false - /which-module@2.0.0: - resolution: {integrity: sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==} - dev: false + which-module@2.0.0: {} - /which-pm@2.0.0: - resolution: {integrity: sha512-Lhs9Pmyph0p5n5Z3mVnN0yWcbQYUAD7rbQUiMsQxOJ3T57k7RFe35SUwWMf7dsbDZks1uOmw4AecB/JMDj3v/w==} - engines: {node: '>=8.15'} + which-pm@2.0.0: 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==} - engines: {node: '>= 0.4'} + which-typed-array@1.1.13: dependencies: available-typed-arrays: 1.0.5 call-bind: 1.0.5 for-each: 0.3.3 gopd: 1.0.1 has-tostringtag: 1.0.0 - dev: false - /which@1.3.1: - resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} - hasBin: true + which@1.3.1: dependencies: isexe: 2.0.0 - dev: false - /which@2.0.2: - resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} - engines: {node: '>= 8'} - hasBin: true + which@2.0.2: dependencies: isexe: 2.0.0 - dev: true - /widest-line@3.1.0: - resolution: {integrity: sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==} - engines: {node: '>=8'} + widest-line@3.1.0: dependencies: string-width: 4.2.3 - dev: true - /wordwrapjs@4.0.1: - resolution: {integrity: sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA==} - engines: {node: '>=8.0.0'} + wordwrapjs@4.0.1: dependencies: reduce-flatten: 2.0.0 typical: 5.2.0 - dev: true - /workerpool@6.2.1: - resolution: {integrity: sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==} - dev: true + workerpool@6.2.1: {} - /wrap-ansi@6.2.0: - resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} - engines: {node: '>=8'} + wrap-ansi@6.2.0: 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'} + wrap-ansi@7.0.0: dependencies: ansi-styles: 4.3.0 string-width: 4.2.3 strip-ansi: 6.0.1 - /wrappy@1.0.2: - resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - dev: true + wrappy@1.0.2: {} - /ws@7.4.6: - resolution: {integrity: sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==} - engines: {node: '>=8.3.0'} - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: ^5.0.2 - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true + ws@7.4.6: {} - /ws@7.5.9: - resolution: {integrity: sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==} - engines: {node: '>=8.3.0'} - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: ^5.0.2 - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - dev: true + ws@7.5.9: {} - /y18n@4.0.3: - resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} - dev: false + y18n@4.0.3: {} - /y18n@5.0.8: - resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} - engines: {node: '>=10'} + y18n@5.0.8: {} - /yallist@2.1.2: - resolution: {integrity: sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==} - dev: false + yallist@2.1.2: {} - /yargs-parser@18.1.3: - resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} - engines: {node: '>=6'} + yargs-parser@18.1.3: dependencies: camelcase: 5.3.1 decamelize: 1.2.0 - dev: false - /yargs-parser@20.2.4: - resolution: {integrity: sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==} - engines: {node: '>=10'} - dev: true + yargs-parser@20.2.4: {} - /yargs-parser@21.1.1: - resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} - engines: {node: '>=12'} - dev: false + yargs-parser@21.1.1: {} - /yargs-unparser@2.0.0: - resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} - engines: {node: '>=10'} + yargs-unparser@2.0.0: dependencies: camelcase: 6.3.0 decamelize: 4.0.0 flat: 5.0.2 is-plain-obj: 2.1.0 - dev: true - /yargs@15.4.1: - resolution: {integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==} - engines: {node: '>=8'} + yargs@15.4.1: dependencies: cliui: 6.0.0 decamelize: 1.2.0 @@ -5906,11 +6813,8 @@ packages: 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'} + yargs@16.2.0: dependencies: cliui: 7.0.4 escalade: 3.1.1 @@ -5919,11 +6823,8 @@ packages: string-width: 4.2.3 y18n: 5.0.8 yargs-parser: 20.2.4 - dev: true - /yargs@17.7.2: - resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} - engines: {node: '>=12'} + yargs@17.7.2: dependencies: cliui: 8.0.1 escalade: 3.1.1 @@ -5932,19 +6833,7 @@ packages: string-width: 4.2.3 y18n: 5.0.8 yargs-parser: 21.1.1 - dev: false - /yn@3.1.1: - resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} - engines: {node: '>=6'} - dev: true - - /yocto-queue@0.1.0: - resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} - engines: {node: '>=10'} + yn@3.1.1: {} - github.com/smartcontractkit/chainlink-solhint-rules/1b4c0c2663fcd983589d4f33a2e73908624ed43c: - resolution: {tarball: https://codeload.github.com/smartcontractkit/chainlink-solhint-rules/tar.gz/1b4c0c2663fcd983589d4f33a2e73908624ed43c} - name: '@chainlink/solhint-plugin-chainlink-solidity' - version: 1.2.0 - dev: true + yocto-queue@0.1.0: {} diff --git a/contracts/scripts/native_solc_compile_all_automation b/contracts/scripts/native_solc_compile_all_automation index 84656917d8f..f144e4f7dc8 100755 --- a/contracts/scripts/native_solc_compile_all_automation +++ b/contracts/scripts/native_solc_compile_all_automation @@ -106,3 +106,6 @@ compileContract automation/v2_3/AutomationRegistryLogicB2_3.sol compileContract automation/v2_3/AutomationRegistryLogicC2_3.sol compileContract automation/v2_3/AutomationUtils2_3.sol compileContract automation/interfaces/v2_3/IAutomationRegistryMaster2_3.sol + +compileContract automation/testhelpers/MockETHUSDAggregator.sol +compileContract automation/test/v2_3/WETH9.sol diff --git a/contracts/scripts/native_solc_compile_all_ocr2vrf b/contracts/scripts/native_solc_compile_all_ocr2vrf deleted file mode 100755 index 755edd34f56..00000000000 --- a/contracts/scripts/native_solc_compile_all_ocr2vrf +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env bash - -set -e - -echo " ┌──────────────────────────────────────────────┐" -echo " │ Compiling OCR2 VRF contracts... │" -echo " └──────────────────────────────────────────────┘" - -SOLC_VERSION="0.8.19" -OPTIMIZE_RUNS=1000000 -# The VRF contracts are not contained in the `chainlink` repository. -# Change me. -FOLDER="ocr2vrf-origin" - -echo "Compiling OCR2VRF contracts..." - -SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" -ROOT="$( cd "$(dirname "$0")" >/dev/null 2>&1; cd ../../ && pwd -P )" -python3 -m pip install --require-hashes -r "$SCRIPTPATH"/requirements.txt - -solc-select install $SOLC_VERSION -solc-select use $SOLC_VERSION -export SOLC_VERSION=$SOLC_VERSION - - -compileContract () { - local contract - contract=$(basename "$1" ".sol") - - solc --overwrite --optimize --optimize-runs "$2" --metadata-hash none \ - -o "$ROOT"/contracts/solc/v0.8.19/"$contract" \ - --abi --bin \ - --allow-paths "$ROOT"/../$FOLDER/contracts \ - "$ROOT"/"$1" -} - -# OCR2VRF -compileContract ../$FOLDER/contracts/DKG.sol $OPTIMIZE_RUNS -compileContract ../$FOLDER/contracts/VRFBeacon.sol $OPTIMIZE_RUNS -compileContract ../$FOLDER/contracts/VRFCoordinator.sol 1 -compileContract ../$FOLDER/contracts/test/TestBeaconVRFConsumer.sol $OPTIMIZE_RUNS -compileContract ../$FOLDER/contracts/test/LoadTestBeaconVRFConsumer.sol $OPTIMIZE_RUNS diff --git a/contracts/scripts/native_solc_compile_all_vrf b/contracts/scripts/native_solc_compile_all_vrf index 1bbaa0a75be..4bfd4ecac72 100755 --- a/contracts/scripts/native_solc_compile_all_vrf +++ b/contracts/scripts/native_solc_compile_all_vrf @@ -21,7 +21,8 @@ compileContract () { local contract contract=$(basename "$1" ".sol") - solc @openzeppelin/="$ROOT"/contracts/node_modules/@openzeppelin/ --overwrite --optimize --optimize-runs $OPTIMIZE_RUNS --metadata-hash none \ + solc @openzeppelin/="$ROOT"/contracts/node_modules/@openzeppelin/ \ + --overwrite --optimize --optimize-runs $OPTIMIZE_RUNS --metadata-hash none \ -o "$ROOT"/contracts/solc/v$SOLC_VERSION/"$contract" \ --abi --bin --allow-paths "$ROOT"/contracts/src/v0.8,"$ROOT"/contracts/node_modules\ "$ROOT"/contracts/src/v0.8/"$1" @@ -31,7 +32,8 @@ compileContractAltOpts () { local contract contract=$(basename "$1" ".sol") - solc @openzeppelin/="$ROOT"/contracts/node_modules/@openzeppelin/ --overwrite --optimize --optimize-runs "$2" --metadata-hash none \ + solc @openzeppelin/="$ROOT"/contracts/node_modules/@openzeppelin/ \ + --overwrite --optimize --optimize-runs "$2" --metadata-hash none \ -o "$ROOT"/contracts/solc/v$SOLC_VERSION/"$contract" \ --abi --bin --allow-paths "$ROOT"/contracts/src/v0.8,"$ROOT"/contracts/node_modules\ "$ROOT"/contracts/src/v0.8/"$1" @@ -80,6 +82,7 @@ compileContract vrf/testhelpers/VRFV2LoadTestWithMetrics.sol compileContract vrf/testhelpers/VRFV2OwnerTestConsumer.sol compileContractAltOpts vrf/testhelpers/VRFCoordinatorTestV2.sol 10000 compileContract vrf/testhelpers/VRFMockETHLINKAggregator.sol +compileContract vrf/testhelpers/Counter.sol # Helper contracts compileContract vrf/interfaces/IAuthorizedReceiver.sol @@ -97,8 +100,12 @@ export SOLC_VERSION=$SOLC_VERSION compileContract vrf/dev/interfaces/IVRFCoordinatorV2PlusInternal.sol compileContract vrf/dev/testhelpers/VRFV2PlusConsumerExample.sol compileContractAltOpts vrf/dev/VRFCoordinatorV2_5.sol 500 +compileContractAltOpts vrf/dev/VRFCoordinatorV2_5_Arbitrum.sol 500 +compileContractAltOpts vrf/dev/VRFCoordinatorV2_5_Optimism.sol 500 compileContract vrf/dev/BatchVRFCoordinatorV2Plus.sol compileContract vrf/dev/VRFV2PlusWrapper.sol +compileContract vrf/dev/VRFV2PlusWrapper_Arbitrum.sol +compileContract vrf/dev/VRFV2PlusWrapper_Optimism.sol compileContract vrf/dev/testhelpers/VRFConsumerV2PlusUpgradeableExample.sol compileContract vrf/dev/testhelpers/VRFMaliciousConsumerV2Plus.sol compileContract vrf/dev/testhelpers/VRFV2PlusExternalSubOwnerExample.sol @@ -113,5 +120,7 @@ compileContract vrf/dev/TrustedBlockhashStore.sol compileContract vrf/dev/testhelpers/VRFV2PlusLoadTestWithMetrics.sol compileContractAltOpts vrf/dev/testhelpers/VRFCoordinatorV2PlusUpgradedVersion.sol 5 compileContract vrf/dev/testhelpers/VRFV2PlusWrapperLoadTestConsumer.sol +compileContract vrf/testhelpers/VRFMockETHLINKAggregator.sol +compileContract vrf/dev/testhelpers/VRFV2PlusLoadTestWithMetrics.sol compileContract vrf/BatchBlockhashStore.sol -compileContract vrf/dev/BlockhashStore.sol \ No newline at end of file +compileContract vrf/dev/BlockhashStore.sol diff --git a/contracts/scripts/native_solc_compile_all_vrfv2plus b/contracts/scripts/native_solc_compile_all_vrfv2plus index 2c7e8693792..6a44b7d405a 100755 --- a/contracts/scripts/native_solc_compile_all_vrfv2plus +++ b/contracts/scripts/native_solc_compile_all_vrfv2plus @@ -21,7 +21,8 @@ compileContract () { local contract contract=$(basename "$1" ".sol") - solc @openzeppelin/="$ROOT"/contracts/node_modules/@openzeppelin/ --overwrite --optimize --optimize-runs $OPTIMIZE_RUNS --metadata-hash none \ + solc @openzeppelin/="$ROOT"/contracts/node_modules/@openzeppelin/ \ + --overwrite --optimize --optimize-runs $OPTIMIZE_RUNS --metadata-hash none \ -o "$ROOT"/contracts/solc/v$SOLC_VERSION/"$contract" \ --abi --bin --allow-paths "$ROOT"/contracts/src/v0.8,"$ROOT"/contracts/node_modules\ "$ROOT"/contracts/src/v0.8/"$1" @@ -31,7 +32,8 @@ compileContractAltOpts () { local contract contract=$(basename "$1" ".sol") - solc @openzeppelin/="$ROOT"/contracts/node_modules/@openzeppelin/ --overwrite --optimize --optimize-runs "$2" --metadata-hash none \ + solc @openzeppelin/="$ROOT"/contracts/node_modules/@openzeppelin/ \ + --overwrite --optimize --optimize-runs "$2" --metadata-hash none \ -o "$ROOT"/contracts/solc/v$SOLC_VERSION/"$contract" \ --abi --bin --allow-paths "$ROOT"/contracts/src/v0.8,"$ROOT"/contracts/node_modules\ "$ROOT"/contracts/src/v0.8/"$1" @@ -41,8 +43,12 @@ compileContractAltOpts () { compileContract vrf/dev/interfaces/IVRFCoordinatorV2PlusInternal.sol compileContract vrf/dev/testhelpers/VRFV2PlusConsumerExample.sol compileContractAltOpts vrf/dev/VRFCoordinatorV2_5.sol 500 +compileContractAltOpts vrf/dev/VRFCoordinatorV2_5_Arbitrum.sol 500 +compileContractAltOpts vrf/dev/VRFCoordinatorV2_5_Optimism.sol 500 compileContract vrf/dev/BatchVRFCoordinatorV2Plus.sol compileContract vrf/dev/VRFV2PlusWrapper.sol +compileContract vrf/dev/VRFV2PlusWrapper_Arbitrum.sol +compileContract vrf/dev/VRFV2PlusWrapper_Optimism.sol compileContract vrf/dev/testhelpers/VRFConsumerV2PlusUpgradeableExample.sol compileContract vrf/dev/testhelpers/VRFMaliciousConsumerV2Plus.sol compileContract vrf/dev/testhelpers/VRFV2PlusExternalSubOwnerExample.sol @@ -60,4 +66,4 @@ compileContract vrf/dev/testhelpers/VRFV2PlusWrapperLoadTestConsumer.sol compileContract vrf/testhelpers/VRFMockETHLINKAggregator.sol compileContract vrf/dev/testhelpers/VRFV2PlusLoadTestWithMetrics.sol compileContract vrf/BatchBlockhashStore.sol -compileContract vrf/dev/BlockhashStore.sol \ No newline at end of file +compileContract vrf/dev/BlockhashStore.sol diff --git a/contracts/src/v0.8/ChainSpecificUtil.sol b/contracts/src/v0.8/ChainSpecificUtil.sol index bea89386866..c5052cd9b25 100644 --- a/contracts/src/v0.8/ChainSpecificUtil.sol +++ b/contracts/src/v0.8/ChainSpecificUtil.sol @@ -83,7 +83,7 @@ library ChainSpecificUtil { * @notice Returns the L1 fees that will be paid for the current transaction, given any calldata * @notice for the current transaction. * @notice When on a known Arbitrum chain, it uses ArbGas.getCurrentTxL1GasFees to get the fees. - * @notice On Arbitrum, the provided calldata is not used to calculate the fees. + * @notice On Arbitrum, there's no need to pass the provided calldata * @notice On Optimism, the provided calldata is passed to the OVM_GasPriceOracle predeploy * @notice and getL1Fee is called to get the fees. */ diff --git a/contracts/src/v0.8/ChainSpecificUtil_v0_8_6.sol b/contracts/src/v0.8/ChainSpecificUtil_v0_8_6.sol index 1ee835dd751..0379dc86ca0 100644 --- a/contracts/src/v0.8/ChainSpecificUtil_v0_8_6.sol +++ b/contracts/src/v0.8/ChainSpecificUtil_v0_8_6.sol @@ -83,7 +83,7 @@ library ChainSpecificUtil { * @notice Returns the L1 fees that will be paid for the current transaction, given any calldata * @notice for the current transaction. * @notice When on a known Arbitrum chain, it uses ArbGas.getCurrentTxL1GasFees to get the fees. - * @notice On Arbitrum, the provided calldata is not used to calculate the fees. + * @notice On Arbitrum, there's no need to pass the provided calldata * @notice On Optimism, the provided calldata is passed to the OVM_GasPriceOracle predeploy * @notice and getL1Fee is called to get the fees. */ diff --git a/contracts/src/v0.8/automation/AutomationZKSyncForwarder.sol b/contracts/src/v0.8/automation/AutomationZKSyncForwarder.sol index 16f7f72453f..46f60541ec4 100644 --- a/contracts/src/v0.8/automation/AutomationZKSyncForwarder.sol +++ b/contracts/src/v0.8/automation/AutomationZKSyncForwarder.sol @@ -10,7 +10,9 @@ interface ISystemContext { function getCurrentPubdataSpent() external view returns (uint256 currentPubdataSpent); } -ISystemContext constant SYSTEM_CONTEXT_CONTRACT = ISystemContext(address(0x800b)); +interface IGasBoundCaller { + function gasBoundCall(address _to, uint256 _maxTotalGas, bytes calldata _data) external payable; +} /** * @title AutomationZKSyncForwarder is a relayer that sits between the registry and the customer's target contract @@ -19,15 +21,18 @@ ISystemContext constant SYSTEM_CONTEXT_CONTRACT = ISystemContext(address(0x800b) * want to programatically interact with the registry (ie top up funds) can do so. */ contract AutomationZKSyncForwarder { + ISystemContext public constant SYSTEM_CONTEXT_CONTRACT = ISystemContext(address(0x800b)); + address public constant GAS_BOUND_CALLER = address(0xc706EC7dfA5D4Dc87f29f859094165E8290530f5); + /// @notice the user's target contract address - address private immutable i_target; + address public immutable i_target; /// @notice the shared logic address - address private immutable i_logic; + address public immutable i_logic; - IAutomationRegistryConsumer private s_registry; + IAutomationRegistryConsumer public s_registry; - event GasDetails(uint256 indexed pubdataUsed, uint256 indexed gasPerPubdataByte, uint256 indexed executionGasUsed, uint256 p1, uint256 p2, uint256 gasprice); + event GasDetails(uint256 indexed pubdataUsed, uint256 indexed gasPerPubdataByte, uint256 indexed executionGasUsed, uint256 gasprice); constructor(address target, address registry, address logic) { s_registry = IAutomationRegistryConsumer(registry); @@ -45,38 +50,18 @@ contract AutomationZKSyncForwarder { if (msg.sender != address(s_registry)) revert(); address target = i_target; uint256 g1 = gasleft(); - uint256 p1 = SYSTEM_CONTEXT_CONTRACT.getCurrentPubdataSpent(); - assembly { - let g := gas() - // Compute g -= PERFORM_GAS_CUSHION and check for underflow - if lt(g, PERFORM_GAS_CUSHION) { - revert(0, 0) - } - g := sub(g, PERFORM_GAS_CUSHION) - // if g - g//64 <= gasAmount, revert - // (we subtract g//64 because of EIP-150) - if iszero(gt(sub(g, div(g, 64)), gasAmount)) { - revert(0, 0) - } - // solidity calls check that a contract actually exists at the destination, so we do the same - if iszero(extcodesize(target)) { - revert(0, 0) - } - // call with exact gas - success := call(gasAmount, target, 0, add(data, 0x20), mload(data), 0, 0) - } - uint256 p2 = SYSTEM_CONTEXT_CONTRACT.getCurrentPubdataSpent(); - // pubdata size can be less than 0 - uint256 pubdataUsed; - if (p2 > p1) { - pubdataUsed = p2 - p1; + bytes memory returnData; + + (success, returnData) = GAS_BOUND_CALLER.delegatecall{gas: gasAmount}(abi.encodeWithSelector(IGasBoundCaller.gasBoundCall.selector, target, gasAmount, data)); + uint256 pubdataGasSpent; + if (success) { + (, pubdataGasSpent) = abi.decode(returnData, (bytes, uint256)); } - uint256 gasPerPubdataByte = SYSTEM_CONTEXT_CONTRACT.gasPerPubdataByte(); uint256 g2 = gasleft(); gasUsed = g1 - g2; - emit GasDetails(pubdataUsed, gasPerPubdataByte, gasUsed, p1, p2, tx.gasprice); - return (success, gasUsed, pubdataUsed * gasPerPubdataByte); + emit GasDetails(pubdataGasSpent, SYSTEM_CONTEXT_CONTRACT.gasPerPubdataByte(), gasUsed, tx.gasprice); + return (success, gasUsed, pubdataGasSpent); } /* diff --git a/contracts/src/v0.8/automation/chains/ZKSyncModule.sol b/contracts/src/v0.8/automation/chains/ZKSyncModule.sol index 8f87288ce70..1458641e8f7 100644 --- a/contracts/src/v0.8/automation/chains/ZKSyncModule.sol +++ b/contracts/src/v0.8/automation/chains/ZKSyncModule.sol @@ -7,13 +7,14 @@ ISystemContext constant SYSTEM_CONTEXT_CONTRACT = ISystemContext(address(0x800b) interface ISystemContext { function gasPrice() external view returns (uint256); + function gasPerPubdataByte() external view returns (uint256 gasPerPubdataByte); } contract ZKSyncModule is ChainModuleBase { uint256 private constant FIXED_GAS_OVERHEAD = 5_000; function getMaxL1Fee(uint256 maxCalldataSize) external view override returns (uint256) { - return maxCalldataSize * SYSTEM_CONTEXT_CONTRACT.gasPrice(); + return maxCalldataSize * SYSTEM_CONTEXT_CONTRACT.gasPerPubdataByte() * SYSTEM_CONTEXT_CONTRACT.gasPrice(); } function getGasOverhead() diff --git a/contracts/src/v0.8/automation/testhelpers/MockETHUSDAggregator.sol b/contracts/src/v0.8/automation/testhelpers/MockETHUSDAggregator.sol new file mode 100644 index 00000000000..10f6732c998 --- /dev/null +++ b/contracts/src/v0.8/automation/testhelpers/MockETHUSDAggregator.sol @@ -0,0 +1,53 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.19; + +import "../../shared/interfaces/AggregatorV3Interface.sol"; + +contract MockETHUSDAggregator is AggregatorV3Interface { + int256 public answer; + uint256 private blockTimestampDeduction = 0; + + constructor(int256 _answer) { + answer = _answer; + } + + function decimals() external pure override returns (uint8) { + return 8; + } + + function description() external pure override returns (string memory) { + return "MockETHUSDAggregator"; + } + + function version() external pure override returns (uint256) { + return 1; + } + + function getRoundData( + uint80 /*_roundId*/ + ) + external + view + override + returns (uint80 roundId, int256 ans, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound) + { + return (1, answer, getDeductedBlockTimestamp(), getDeductedBlockTimestamp(), 1); + } + + function latestRoundData() + external + view + override + returns (uint80 roundId, int256 ans, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound) + { + return (1, answer, getDeductedBlockTimestamp(), getDeductedBlockTimestamp(), 1); + } + + function getDeductedBlockTimestamp() internal view returns (uint256) { + return block.timestamp - blockTimestampDeduction; + } + + function setBlockTimestampDeduction(uint256 _blockTimestampDeduction) external { + blockTimestampDeduction = _blockTimestampDeduction; + } +} diff --git a/contracts/src/v0.8/automation/testhelpers/MockFeed.sol b/contracts/src/v0.8/automation/testhelpers/MockFeed.sol index cf0260b2c56..991f95490a9 100644 --- a/contracts/src/v0.8/automation/testhelpers/MockFeed.sol +++ b/contracts/src/v0.8/automation/testhelpers/MockFeed.sol @@ -8,9 +8,9 @@ contract MockFeed { returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound) { roundId = 0; - answer = 0; + answer = 4120560980556678; startedAt = 0; - updatedAt = 0; + updatedAt = block.timestamp; answeredInRound = 0; } } diff --git a/contracts/src/v0.8/automation/testhelpers/UpkeepCounter.sol b/contracts/src/v0.8/automation/testhelpers/UpkeepCounter.sol index 24a8b1f9010..be6efdb0dfc 100644 --- a/contracts/src/v0.8/automation/testhelpers/UpkeepCounter.sol +++ b/contracts/src/v0.8/automation/testhelpers/UpkeepCounter.sol @@ -9,6 +9,7 @@ contract UpkeepCounter { uint256 previousBlock, uint256 counter ); + event CallerIs(address caller); uint256 public testRange; uint256 public interval; @@ -31,6 +32,7 @@ contract UpkeepCounter { } function performUpkeep(bytes calldata performData) external { + emit CallerIs(msg.sender); if (initialTimestamp == 0) { initialTimestamp = block.timestamp; } diff --git a/contracts/src/v0.8/automation/testhelpers/ZKSyncHashTester.sol b/contracts/src/v0.8/automation/testhelpers/ZKSyncHashTester.sol index 703c3dcbf34..1bfcdbaae69 100644 --- a/contracts/src/v0.8/automation/testhelpers/ZKSyncHashTester.sol +++ b/contracts/src/v0.8/automation/testhelpers/ZKSyncHashTester.sol @@ -20,6 +20,7 @@ contract ZKSyncHashTester { uint32 public iterations; bytes public data; bytes32 public storedHash; + bool public trickSimulation = false; constructor() { testRange = 10000; @@ -44,6 +45,10 @@ contract ZKSyncHashTester { iterations = _i; } + function setTrickSimulation(bool _trickSimulation) external { + trickSimulation = _trickSimulation; + } + function setData(bytes calldata _data) external { data = _data; } @@ -53,6 +58,10 @@ contract ZKSyncHashTester { } function performUpkeep(bytes calldata performData) external { + if (trickSimulation && tx.origin == address(0)) { + return; + } + if (initialTimestamp == 0) { initialTimestamp = block.timestamp; } diff --git a/contracts/src/v0.8/automation/testhelpers/ZKSyncStoreTester.sol b/contracts/src/v0.8/automation/testhelpers/ZKSyncStoreTester.sol index 8fb43a51849..0b5e842ba4e 100644 --- a/contracts/src/v0.8/automation/testhelpers/ZKSyncStoreTester.sol +++ b/contracts/src/v0.8/automation/testhelpers/ZKSyncStoreTester.sol @@ -28,6 +28,7 @@ contract ZKSyncStoreTester { bytes public data5; bytes public full = hex"ffffffff0f0ff0fffff0fffffff0fffffffffff0fffff0ffffff0ffffffffffff00000fffffffffffff000fffffffffffffffffffffffff0ffffffffff0fffffffffffffffffff00fffffffffff00ffffffffffffffffffffffff000000fffffffffffffffffffffffffffffffffff0ffffffffffffffff0fffff0ffffffff"; bytes public constant empty = hex"00"; + bool public trickSimulation = false; constructor() { testRange = 10000; @@ -36,7 +37,6 @@ contract ZKSyncStoreTester { lastTimestamp = block.timestamp; initialTimestamp = 0; counter = 0; - iterations = 1; } @@ -69,11 +69,19 @@ contract ZKSyncStoreTester { iterations = _i; } + function setTrickSimulation(bool _trickSimulation) external { + trickSimulation = _trickSimulation; + } + function checkUpkeep(bytes calldata data) external view returns (bool, bytes memory) { return (eligible(), data); } function performUpkeep(bytes calldata) external { + if (trickSimulation && tx.origin == address(0)) { + return; + } + if (initialTimestamp == 0) { initialTimestamp = block.timestamp; } diff --git a/contracts/src/v0.8/automation/v2_2_zksync/ZKSyncAutomationRegistry2_2.sol b/contracts/src/v0.8/automation/v2_2_zksync/ZKSyncAutomationRegistry2_2.sol index 974b6dd9bd2..da7d6992f5e 100644 --- a/contracts/src/v0.8/automation/v2_2_zksync/ZKSyncAutomationRegistry2_2.sol +++ b/contracts/src/v0.8/automation/v2_2_zksync/ZKSyncAutomationRegistry2_2.sol @@ -3,12 +3,19 @@ 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 {ZKSyncAutomationRegistryBase2_2} from "./ZKSyncAutomationRegistryBase2_2.sol"; -import {ZKSyncAutomationRegistryLogicB2_2} from "./ZKSyncAutomationRegistryLogicB2_2.sol"; +import {ZKSyncAutomationRegistryBase2_2} from "./../v2_2_zksync/ZKSyncAutomationRegistryBase2_2.sol"; +import {ZKSyncAutomationRegistryLogicB2_2} from "./../v2_2_zksync/ZKSyncAutomationRegistryLogicB2_2.sol"; import {Chainable} from "../Chainable.sol"; import {IERC677Receiver} from "../../shared/interfaces/IERC677Receiver.sol"; import {OCR2Abstract} from "../../shared/ocr2/OCR2Abstract.sol"; +interface ISystemContext { + function gasPerPubdataByte() external view returns (uint256 gasPerPubdataByte); +// function getCurrentPubdataSpent() external view returns (uint256 currentPubdataSpent); +} + +ISystemContext constant SYSTEM_CONTEXT_CONTRACT = ISystemContext(address(0x800b)); + /** * @notice Registry for adding work for Chainlink nodes to perform on client * contracts. Clients must support the AutomationCompatibleInterface interface. @@ -63,7 +70,6 @@ contract ZKSyncAutomationRegistry2_2 is ZKSyncAutomationRegistryBase2_2, OCR2Abs // solhint-disable-next-line gas-struct-packing struct TransmitVars { uint16 numUpkeepsPassedChecks; -// uint256 totalCalldataWeight; uint96 totalReimbursement; uint96 totalPremium; } @@ -107,15 +113,14 @@ contract ZKSyncAutomationRegistry2_2 is ZKSyncAutomationRegistryBase2_2, OCR2Abs function _handleReport(HotVars memory hotVars, Report memory report, uint256 gasOverhead) private { UpkeepTransmitInfo[] memory upkeepTransmitInfo = new UpkeepTransmitInfo[](report.upkeepIds.length); +// uint256[] memory l1GasUsed = new uint256[](report.upkeepIds.length); TransmitVars memory transmitVars = TransmitVars({ numUpkeepsPassedChecks: 0, -// totalCalldataWeight: 0, totalReimbursement: 0, totalPremium: 0 }); uint256 blocknumber = hotVars.chainModule.blockNumber(); -// uint256 l1Fee = hotVars.chainModule.getCurrentL1Fee(); for (uint256 i = 0; i < report.upkeepIds.length; i++) { upkeepTransmitInfo[i].upkeep = s_upkeep[report.upkeepIds[i]]; @@ -136,16 +141,31 @@ contract ZKSyncAutomationRegistry2_2 is ZKSyncAutomationRegistryBase2_2, OCR2Abs } // Actually perform the target upkeep - (upkeepTransmitInfo[i].performSuccess, upkeepTransmitInfo[i].gasUsed) = _performUpkeep( +// uint256 p1 = SYSTEM_CONTEXT_CONTRACT.getCurrentPubdataSpent(); + (upkeepTransmitInfo[i].performSuccess, upkeepTransmitInfo[i].gasUsed, upkeepTransmitInfo[i].l1GasUsed) = _performUpkeep( upkeepTransmitInfo[i].upkeep.forwarder, report.gasLimits[i], report.performDatas[i] ); +// uint256 p2 = SYSTEM_CONTEXT_CONTRACT.getCurrentPubdataSpent(); +// uint256 pubdataUsed; +// if (p2 > p1) { +// pubdataUsed = p2 - p1; +// } + uint256 gasPerPubdataByte = SYSTEM_CONTEXT_CONTRACT.gasPerPubdataByte(); +// l1GasUsed[i] = gasPerPubdataByte * pubdataUsed; +// if (report.gasLimits[i] < upkeepTransmitInfo[i].l1GasUsed + upkeepTransmitInfo[i].gasUsed) { +// // revert or ? +// revert InsufficientGas(upkeepTransmitInfo[i].gasUsed, upkeepTransmitInfo[i].l1GasUsed); +// } + emit GasDetails(upkeepTransmitInfo[i].l1GasUsed, gasPerPubdataByte, upkeepTransmitInfo[i].gasUsed, tx.gasprice); // Deduct that gasUsed by upkeep from our running counter - // for zksync, the L1 gas is deducted at the end of a transaction but gasUsed here already has all the cost - // if we don't add l1GasUsed here for zksync, `gasOverhead - gasleft()` will underflow - gasOverhead -= upkeepTransmitInfo[i].gasUsed; + // for zksync, the L1 gas is deducted at the end of a transaction + // so gasleft() is actually higher than it's actual value by (upkeepTransmitInfo[i].l1GasUsed) amount + // ?? +// gasOverhead = gasOverhead + l1GasUsed[i] - upkeepTransmitInfo[i].gasUsed; + gasOverhead = gasOverhead - upkeepTransmitInfo[i].gasUsed; // Store last perform block number / deduping key for upkeep _updateTriggerMarker(report.upkeepIds[i], blocknumber, upkeepTransmitInfo[i]); @@ -160,6 +180,7 @@ contract ZKSyncAutomationRegistry2_2 is ZKSyncAutomationRegistryBase2_2, OCR2Abs // for zksync, this place will underflow if we don't add back l1GasUsed gasOverhead = (16 * msg.data.length) + ACCOUNTING_FIXED_GAS_OVERHEAD + gasOverhead - gasleft(); gasOverhead = gasOverhead / transmitVars.numUpkeepsPassedChecks + ACCOUNTING_PER_UPKEEP_GAS_OVERHEAD; +// uint256 gasPerPubdataByte = SYSTEM_CONTEXT_CONTRACT.gasPerPubdataByte(); { uint96 reimbursement; @@ -173,7 +194,7 @@ contract ZKSyncAutomationRegistry2_2 is ZKSyncAutomationRegistryBase2_2, OCR2Abs report.fastGasWei, report.linkNative, gasOverhead, - 0 + upkeepTransmitInfo[i].l1GasUsed * tx.gasprice ); transmitVars.totalPremium += premium; transmitVars.totalReimbursement += reimbursement; @@ -216,8 +237,19 @@ contract ZKSyncAutomationRegistry2_2 is ZKSyncAutomationRegistryBase2_2, OCR2Abs if (s_hotVars.paused) revert RegistryPaused(); Upkeep memory upkeep = s_upkeep[id]; - (success, gasUsed) = _performUpkeep(upkeep.forwarder, upkeep.performGas, performData); - return (success, gasUsed); +// uint256 p1 = SYSTEM_CONTEXT_CONTRACT.getCurrentPubdataSpent(); + uint256 l1GasUsed; + (success, gasUsed, l1GasUsed) = _performUpkeep(upkeep.forwarder, upkeep.performGas, performData); +// uint256 p2 = SYSTEM_CONTEXT_CONTRACT.getCurrentPubdataSpent(); +// uint256 pubdataUsed; +// if (p2 > p1) { +// pubdataUsed = p2 - p1; +// } +// uint256 gasPerPubdataByte = SYSTEM_CONTEXT_CONTRACT.gasPerPubdataByte(); + if (upkeep.performGas < l1GasUsed + gasUsed) { + return (false, l1GasUsed + gasUsed); + } + return (success, l1GasUsed + gasUsed); } /** diff --git a/contracts/src/v0.8/automation/v2_2_zksync/ZKSyncAutomationRegistryBase2_2.sol b/contracts/src/v0.8/automation/v2_2_zksync/ZKSyncAutomationRegistryBase2_2.sol index 4ea19e2c6f6..da39948ce92 100644 --- a/contracts/src/v0.8/automation/v2_2_zksync/ZKSyncAutomationRegistryBase2_2.sol +++ b/contracts/src/v0.8/automation/v2_2_zksync/ZKSyncAutomationRegistryBase2_2.sol @@ -5,7 +5,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 {StreamsLookupCompatibleInterface} from "../interfaces/StreamsLookupCompatibleInterface.sol"; import {ILogAutomation, Log} from "../interfaces/ILogAutomation.sol"; -import {IAutomationForwarder} from "../interfaces/IAutomationForwarder.sol"; +import {IAutomationZKSyncForwarder} from "../interfaces/IAutomationZKSyncForwarder.sol"; import {ConfirmedOwner} from "../../shared/access/ConfirmedOwner.sol"; import {AggregatorV3Interface} from "../../shared/interfaces/AggregatorV3Interface.sol"; import {LinkTokenInterface} from "../../shared/interfaces/LinkTokenInterface.sol"; @@ -13,13 +13,6 @@ import {KeeperCompatibleInterface} from "../interfaces/KeeperCompatibleInterface import {UpkeepFormat} from "../interfaces/UpkeepTranscoderInterface.sol"; import {IChainModule} from "../interfaces/IChainModule.sol"; -interface ISystemContext { - function gasPerPubdataByte() external view returns (uint256 gasPerPubdataByte); - function getCurrentPubdataSpent() external view returns (uint256 currentPubdataSpent); -} - -ISystemContext constant SYSTEM_CONTEXT_CONTRACT = ISystemContext(address(0x800b)); - /** * @notice Base Keeper Registry contract, contains shared logic between * AutomationRegistry and AutomationRegistryLogic @@ -251,7 +244,7 @@ abstract contract ZKSyncAutomationRegistryBase2_2 is ConfirmedOwner { bool paused; uint32 performGas; uint32 maxValidBlocknumber; - IAutomationForwarder forwarder; + IAutomationZKSyncForwarder forwarder; // 0 bytes left in 1st EVM word - not written to in transmit uint96 amountSpent; uint96 balance; @@ -409,7 +402,7 @@ abstract contract ZKSyncAutomationRegistryBase2_2 is ConfirmedOwner { event UpkeepTriggerConfigSet(uint256 indexed id, bytes triggerConfig); event UpkeepUnpaused(uint256 indexed id); event Unpaused(address account); - event GasDetails(uint256 indexed pubdataUsed, uint256 indexed gasPerPubdataByte, uint256 indexed executionGasUsed, uint256 p1, uint256 p2, uint256 gasprice); + event GasDetails(uint256 indexed pubdataUsed, uint256 indexed gasPerPubdataByte, uint256 indexed executionGasUsed, uint256 gasprice); /** * @param link address of the LINK Token @@ -803,25 +796,12 @@ abstract contract ZKSyncAutomationRegistryBase2_2 is ConfirmedOwner { * transmitter and the exact gas required by the Upkeep */ function _performUpkeep( - IAutomationForwarder forwarder, + IAutomationZKSyncForwarder forwarder, uint256 performGas, bytes memory performData - ) internal nonReentrant returns (bool success, uint256 gasUsed) { + ) internal nonReentrant returns (bool success, uint256 gasUsed, uint256 l1GasUsed) { performData = abi.encodeWithSelector(PERFORM_SELECTOR, performData); - uint256 p1 = SYSTEM_CONTEXT_CONTRACT.getCurrentPubdataSpent(); - (bool success, uint256 executionGasUsed) = forwarder.forward(performGas, performData); - uint256 p2 = SYSTEM_CONTEXT_CONTRACT.getCurrentPubdataSpent(); - uint256 pubdataUsed; - if (p2 > p1) { - pubdataUsed = p2 - p1; - } - uint256 gasPerPubdataByte = SYSTEM_CONTEXT_CONTRACT.gasPerPubdataByte(); - emit GasDetails(pubdataUsed, gasPerPubdataByte, executionGasUsed, p1, p2, tx.gasprice); - uint256 l1GasUsed = gasPerPubdataByte * pubdataUsed; - if (performGas < l1GasUsed + executionGasUsed) { - revert InsufficientGas(executionGasUsed, l1GasUsed); - } - return (success, executionGasUsed + l1GasUsed); + return forwarder.forward(performGas, performData); } /** diff --git a/contracts/src/v0.8/automation/v2_2_zksync/ZKSyncAutomationRegistryLogicA2_2.sol b/contracts/src/v0.8/automation/v2_2_zksync/ZKSyncAutomationRegistryLogicA2_2.sol index fa605e89256..2c3d957fb77 100644 --- a/contracts/src/v0.8/automation/v2_2_zksync/ZKSyncAutomationRegistryLogicA2_2.sol +++ b/contracts/src/v0.8/automation/v2_2_zksync/ZKSyncAutomationRegistryLogicA2_2.sol @@ -6,8 +6,8 @@ import {Address} from "../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils import {ZKSyncAutomationRegistryBase2_2} from "./ZKSyncAutomationRegistryBase2_2.sol"; import {ZKSyncAutomationRegistryLogicB2_2} from "./ZKSyncAutomationRegistryLogicB2_2.sol"; import {Chainable} from "../Chainable.sol"; -import {AutomationForwarder} from "../AutomationForwarder.sol"; -import {IAutomationForwarder} from "../interfaces/IAutomationForwarder.sol"; +import {AutomationZKSyncForwarder} from "../AutomationZKSyncForwarder.sol"; +import {IAutomationZKSyncForwarder} from "../interfaces/IAutomationZKSyncForwarder.sol"; import {UpkeepTranscoderInterfaceV2} from "../interfaces/UpkeepTranscoderInterfaceV2.sol"; import {MigratableKeeperRegistryInterfaceV2} from "../interfaces/MigratableKeeperRegistryInterfaceV2.sol"; @@ -228,8 +228,8 @@ contract ZKSyncAutomationRegistryLogicA2_2 is ZKSyncAutomationRegistryBase2_2, C if (msg.sender != owner() && !s_registrars.contains(msg.sender)) revert OnlyCallableByOwnerOrRegistrar(); if (!target.isContract()) revert NotAContract(); id = _createID(triggerType); - IAutomationForwarder forwarder = IAutomationForwarder( - address(new AutomationForwarder(target, address(this), i_automationForwarderLogic)) + IAutomationZKSyncForwarder forwarder = IAutomationZKSyncForwarder( + address(new AutomationZKSyncForwarder(target, address(this), i_automationForwarderLogic)) ); _createUpkeep( id, @@ -404,8 +404,8 @@ contract ZKSyncAutomationRegistryLogicA2_2 is ZKSyncAutomationRegistryBase2_2, C ) = abi.decode(encodedUpkeeps, (uint256[], Upkeep[], address[], address[], bytes[], bytes[], bytes[])); for (uint256 idx = 0; idx < ids.length; idx++) { if (address(upkeeps[idx].forwarder) == ZERO_ADDRESS) { - upkeeps[idx].forwarder = IAutomationForwarder( - address(new AutomationForwarder(targets[idx], address(this), i_automationForwarderLogic)) + upkeeps[idx].forwarder = IAutomationZKSyncForwarder( + address(new AutomationZKSyncForwarder(targets[idx], address(this), i_automationForwarderLogic)) ); } _createUpkeep( diff --git a/contracts/src/v0.8/automation/v2_2_zksync/ZKSyncAutomationRegistryLogicB2_2.sol b/contracts/src/v0.8/automation/v2_2_zksync/ZKSyncAutomationRegistryLogicB2_2.sol index e1620e9182f..cb910c8fcb4 100644 --- a/contracts/src/v0.8/automation/v2_2_zksync/ZKSyncAutomationRegistryLogicB2_2.sol +++ b/contracts/src/v0.8/automation/v2_2_zksync/ZKSyncAutomationRegistryLogicB2_2.sol @@ -5,7 +5,7 @@ import {ZKSyncAutomationRegistryBase2_2} from "./ZKSyncAutomationRegistryBase2_2 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 {IAutomationZKSyncForwarder} from "../interfaces/IAutomationZKSyncForwarder.sol"; import {IChainModule} from "../interfaces/IChainModule.sol"; import {IAutomationV21PlusCommon} from "../interfaces/IAutomationV21PlusCommon.sol"; @@ -527,7 +527,7 @@ contract ZKSyncAutomationRegistryLogicB2_2 is ZKSyncAutomationRegistryBase2_2 { /** * @notice returns the upkeep's forwarder contract */ - function getForwarder(uint256 upkeepID) external view returns (IAutomationForwarder) { + function getForwarder(uint256 upkeepID) external view returns (IAutomationZKSyncForwarder) { return s_upkeep[upkeepID].forwarder; } 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 c973f55a715..75420fe71d1 100644 --- a/contracts/src/v0.8/functions/dev/v1_X/FunctionsBilling.sol +++ b/contracts/src/v0.8/functions/dev/v1_X/FunctionsBilling.sol @@ -199,13 +199,15 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { gasPriceWei = s_config.minimumEstimateGasPriceWei; } - uint256 gasPriceWithOverestimation = gasPriceWei + - ((gasPriceWei * s_config.fulfillmentGasPriceOverEstimationBP) / 10_000); - /// @NOTE: Basis Points are 1/100th of 1%, divide by 10_000 to bring back to original units - uint256 executionGas = s_config.gasOverheadBeforeCallback + s_config.gasOverheadAfterCallback + callbackGasLimit; - uint256 l1FeeWei = ChainSpecificUtil._getCurrentTxL1GasFees(msg.data); - uint96 estimatedGasReimbursementJuels = _getJuelsFromWei((gasPriceWithOverestimation * executionGas) + l1FeeWei); + uint256 l1FeeWei = ChainSpecificUtil._getL1FeeUpperLimit(s_config.transmitTxSizeBytes); + uint256 totalFeeWei = (gasPriceWei * executionGas) + l1FeeWei; + + // Basis Points are 1/100th of 1%, divide by 10_000 to bring back to original units + uint256 totalFeeWeiWithOverestimate = totalFeeWei + + ((totalFeeWei * s_config.fulfillmentGasPriceOverEstimationBP) / 10_000); + + uint96 estimatedGasReimbursementJuels = _getJuelsFromWei(totalFeeWeiWithOverestimate); uint96 feesJuels = uint96(donFeeJuels) + uint96(adminFeeJuels) + uint96(operationFeeJuels); @@ -298,7 +300,7 @@ abstract contract FunctionsBilling is Routable, IFunctionsBilling { FunctionsResponse.Commitment memory commitment = abi.decode(onchainMetadata, (FunctionsResponse.Commitment)); uint256 gasOverheadWei = (commitment.gasOverheadBeforeCallback + commitment.gasOverheadAfterCallback) * tx.gasprice; - uint256 l1FeeShareWei = ChainSpecificUtil._getCurrentTxL1GasFees(msg.data) / reportBatchSize; + uint256 l1FeeShareWei = ChainSpecificUtil._getL1FeeUpperLimit(msg.data.length) / reportBatchSize; // Gas overhead without callback uint96 gasOverheadJuels = _getJuelsFromWei(gasOverheadWei + l1FeeShareWei); uint96 juelsPerGas = _getJuelsFromWei(tx.gasprice); diff --git a/contracts/src/v0.8/functions/dev/v1_X/FunctionsCoordinator.sol b/contracts/src/v0.8/functions/dev/v1_X/FunctionsCoordinator.sol index f0bec7c3e9c..69d6f3a7b0a 100644 --- a/contracts/src/v0.8/functions/dev/v1_X/FunctionsCoordinator.sol +++ b/contracts/src/v0.8/functions/dev/v1_X/FunctionsCoordinator.sol @@ -16,7 +16,7 @@ contract FunctionsCoordinator is OCR2Base, IFunctionsCoordinator, FunctionsBilli using FunctionsResponse for FunctionsResponse.FulfillResult; /// @inheritdoc ITypeAndVersion - string public constant override typeAndVersion = "Functions Coordinator v1.3.0"; + string public constant override typeAndVersion = "Functions Coordinator v1.3.1"; event OracleRequest( bytes32 indexed requestId, 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 ecf15c68f0d..0f31f7f2344 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 @@ -69,5 +69,6 @@ struct FunctionsBillingConfig { uint224 fallbackNativePerUnitLink; // ═══════════╗ Fallback NATIVE CURRENCY / LINK conversion rate if the data feed is stale uint32 requestTimeoutSeconds; // ════════════════╝ How many seconds it takes before we consider a request to be timed out uint16 donFeeCentsUsd; // ═══════════════════════════════╗ Additional flat fee (denominated in cents of USD, paid as LINK) that will be split between Node Operators. - uint16 operationFeeCentsUsd; // ═════════════════════════╝ Additional flat fee (denominated in cents of USD, paid as LINK) that will be paid to the owner of the Coordinator contract. + uint16 operationFeeCentsUsd; // ║ Additional flat fee (denominated in cents of USD, paid as LINK) that will be paid to the owner of the Coordinator contract. + uint16 transmitTxSizeBytes; // ══════════════════════════╝ The size of the calldata for the transmit transaction in bytes assuming a single 256 byte response payload. Used to estimate L1 cost for fulfillments on L2 chains. } diff --git a/contracts/src/v0.8/functions/dev/v1_X/libraries/ChainSpecificUtil.sol b/contracts/src/v0.8/functions/dev/v1_X/libraries/ChainSpecificUtil.sol index 574d1bf1645..d4c4b5f4426 100644 --- a/contracts/src/v0.8/functions/dev/v1_X/libraries/ChainSpecificUtil.sol +++ b/contracts/src/v0.8/functions/dev/v1_X/libraries/ChainSpecificUtil.sol @@ -2,17 +2,19 @@ pragma solidity ^0.8.19; import {ArbGasInfo} from "../../../../vendor/@arbitrum/nitro-contracts/src/precompiles/ArbGasInfo.sol"; -import {GasPriceOracle} from "../../../../vendor/@eth-optimism/contracts-bedrock/v0.16.2/src/L2/GasPriceOracle.sol"; +import {GasPriceOracle} from "../../../../vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/L2/GasPriceOracle.sol"; /// @dev A library that abstracts out opcodes that behave differently across chains. /// @dev The methods below return values that are pertinent to the given chain. library ChainSpecificUtil { // ------------ Start Arbitrum Constants ------------ - /// @dev ARBGAS_ADDR is the address of the ArbGasInfo precompile on Arbitrum. /// @dev reference: https://github.com/OffchainLabs/nitro/blob/v2.0.14/contracts/src/precompiles/ArbGasInfo.sol#L10 address private constant ARBGAS_ADDR = address(0x000000000000000000000000000000000000006C); ArbGasInfo private constant ARBGAS = ArbGasInfo(ARBGAS_ADDR); + /// @dev ARB_DATA_PADDING_SIZE is the max size of the "static" data on Arbitrum for the transaction which refers to the tx data that is not the calldata (signature, etc.) + /// @dev reference: https://docs.arbitrum.io/build-decentralized-apps/how-to-estimate-gas#where-do-we-get-all-this-information-from + uint256 private constant ARB_DATA_PADDING_SIZE = 140; uint256 private constant ARB_MAINNET_CHAIN_ID = 42161; uint256 private constant ARB_GOERLI_TESTNET_CHAIN_ID = 421613; @@ -21,13 +23,9 @@ library ChainSpecificUtil { // ------------ End Arbitrum Constants ------------ // ------------ Start Optimism Constants ------------ - /// @dev L1_FEE_DATA_PADDING includes 35 bytes for L1 data padding for Optimism - bytes internal constant L1_FEE_DATA_PADDING = - "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"; - /// @dev OVM_GASPRICEORACLE_ADDR is the address of the GasPriceOracle precompile on Optimism. - /// @dev reference: https://community.optimism.io/docs/developers/build/transaction-fees/#estimating-the-l1-data-fee - address private constant OVM_GASPRICEORACLE_ADDR = address(0x420000000000000000000000000000000000000F); - GasPriceOracle private constant OVM_GASPRICEORACLE = GasPriceOracle(OVM_GASPRICEORACLE_ADDR); + /// @dev GAS_PRICE_ORACLE_ADDR is the address of the GasPriceOracle precompile on Optimism. + address private constant GAS_PRICE_ORACLE_ADDR = address(0x420000000000000000000000000000000000000F); + GasPriceOracle private constant GAS_PRICE_ORACLE = GasPriceOracle(GAS_PRICE_ORACLE_ADDR); uint256 private constant OP_MAINNET_CHAIN_ID = 10; uint256 private constant OP_GOERLI_CHAIN_ID = 420; @@ -40,18 +38,17 @@ library ChainSpecificUtil { // ------------ End Optimism Constants ------------ - /// @notice Returns the L1 fees in wei that will be paid for the current transaction, given any calldata - /// @notice for the current transaction. - /// @notice When on a known Arbitrum chain, it uses ArbGas.getCurrentTxL1GasFees to get the fees. - /// @notice On Arbitrum, the provided calldata is not used to calculate the fees. - /// @notice On Optimism, the provided calldata is passed to the GasPriceOracle predeploy - /// @notice and getL1Fee is called to get the fees. - function _getCurrentTxL1GasFees(bytes memory txCallData) internal view returns (uint256 l1FeeWei) { + /// @notice Returns the upper limit estimate of the L1 fees in wei that will be paid for L2 chains + /// @notice based on the size of the transaction data and the current gas conditions. + /// @notice This is an "upper limit" as it assumes the transaction data is uncompressed when posted on L1. + function _getL1FeeUpperLimit(uint256 calldataSizeBytes) internal view returns (uint256 l1FeeWei) { uint256 chainid = block.chainid; if (_isArbitrumChainId(chainid)) { - return ARBGAS.getCurrentTxL1GasFees(); + // https://docs.arbitrum.io/build-decentralized-apps/how-to-estimate-gas#where-do-we-get-all-this-information-from + (, uint256 l1PricePerByte, , , , ) = ARBGAS.getPricesInWei(); + return l1PricePerByte * (calldataSizeBytes + ARB_DATA_PADDING_SIZE); } else if (_isOptimismChainId(chainid)) { - return OVM_GASPRICEORACLE.getL1Fee(bytes.concat(txCallData, L1_FEE_DATA_PADDING)); + return GAS_PRICE_ORACLE.getL1FeeUpperBound(calldataSizeBytes); } return 0; } diff --git a/contracts/src/v0.8/functions/tests/v1_X/ChainSpecificUtil.t.sol b/contracts/src/v0.8/functions/tests/v1_X/ChainSpecificUtil.t.sol index 5384a66d912..d57d5113e89 100644 --- a/contracts/src/v0.8/functions/tests/v1_X/ChainSpecificUtil.t.sol +++ b/contracts/src/v0.8/functions/tests/v1_X/ChainSpecificUtil.t.sol @@ -11,22 +11,31 @@ import {FunctionsResponse} from "../../dev/v1_X/libraries/FunctionsResponse.sol" import {FunctionsFulfillmentSetup} from "./Setup.t.sol"; import {ArbGasInfo} from "../../../vendor/@arbitrum/nitro-contracts/src/precompiles/ArbGasInfo.sol"; -import {OVM_GasPriceOracle} from "../../../vendor/@eth-optimism/contracts/v0.8.9/contracts/L2/predeploys/OVM_GasPriceOracle.sol"; +import {GasPriceOracle} from "../../../vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/L2/GasPriceOracle.sol"; -/// @notice #_getCurrentTxL1GasFees Arbitrum +/// @notice #_getL1FeeUpperLimit Arbitrum /// @dev Arbitrum gas formula = L2 Gas Price * (Gas used on L2 + Extra Buffer for L1 cost) /// @dev where Extra Buffer for L1 cost = (L1 Estimated Cost / L2 Gas Price) -contract ChainSpecificUtil__getCurrentTxL1GasFees_Arbitrum is FunctionsFulfillmentSetup { +contract ChainSpecificUtil__getL1FeeUpperLimit_Arbitrum is FunctionsFulfillmentSetup { address private constant ARBGAS_ADDR = address(0x000000000000000000000000000000000000006C); - uint256 private constant L1_FEE_WEI = 15_818_209_764_247; + uint256 private constant WEI_PER_L1_CALLDATA_BYTE = 2_243_708_528; + uint256 private constant L1_FEE_ESTIMATE_WITH_OVERESTIMATION_WEI = 6_408_031_555_968; + uint256 private constant L1_FEE_WEI = 3_697_631_654_144; + + uint96 l1FeeEstimateJuels = uint96((1e18 * L1_FEE_ESTIMATE_WITH_OVERESTIMATION_WEI) / uint256(LINK_ETH_RATE)); uint96 l1FeeJuels = uint96((1e18 * L1_FEE_WEI) / uint256(LINK_ETH_RATE)); function setUp() public virtual override { - vm.mockCall(ARBGAS_ADDR, abi.encodeWithSelector(ArbGasInfo.getCurrentTxL1GasFees.selector), abi.encode(L1_FEE_WEI)); + uint256 unused = 0; + vm.mockCall( + ARBGAS_ADDR, + abi.encodeWithSelector(ArbGasInfo.getPricesInWei.selector), + abi.encode(unused, WEI_PER_L1_CALLDATA_BYTE, unused, unused, unused, unused) + ); } - function test__getCurrentTxL1GasFees_SuccessWhenArbitrumMainnet() public { + function test__getL1FeeUpperLimit_SuccessWhenArbitrumMainnet() public { // Set the chainID vm.chainId(42161); @@ -35,15 +44,19 @@ contract ChainSpecificUtil__getCurrentTxL1GasFees_Arbitrum is FunctionsFulfillme // Check request cost estimate uint96 expectedEstimatedTotalCostJuels = _getExpectedCostEstimate(s_requests[1].requestData.callbackGasLimit) + - l1FeeJuels; - assertEq(s_requests[1].commitment.estimatedTotalCostJuels, expectedEstimatedTotalCostJuels); + l1FeeEstimateJuels; + assertEq( + s_requests[1].commitment.estimatedTotalCostJuels, + expectedEstimatedTotalCostJuels, + "Estimated cost mismatch for Arbitrum mainnet" + ); // Check response actual cost uint96 expectedTotalCostJuels = _getExpectedCost(5416) + l1FeeJuels; - assertEq(s_responses[1].totalCostJuels, expectedTotalCostJuels); + assertEq(s_responses[1].totalCostJuels, expectedTotalCostJuels, "Response cost mismatch for Arbitrum mainnet"); } - function test__getCurrentTxL1GasFees_SuccessWhenArbitrumGoerli() public { + function test__getL1FeeUpperLimit_SuccessWhenArbitrumGoerli() public { // Set the chainID vm.chainId(421613); @@ -52,15 +65,19 @@ contract ChainSpecificUtil__getCurrentTxL1GasFees_Arbitrum is FunctionsFulfillme // Check request cost estimate uint96 expectedEstimatedTotalCostJuels = _getExpectedCostEstimate(s_requests[1].requestData.callbackGasLimit) + - l1FeeJuels; - assertEq(s_requests[1].commitment.estimatedTotalCostJuels, expectedEstimatedTotalCostJuels); + l1FeeEstimateJuels; + assertEq( + s_requests[1].commitment.estimatedTotalCostJuels, + expectedEstimatedTotalCostJuels, + "Estimated cost mismatch for Arbitrum Goerli" + ); // Check response actual cost uint96 expectedTotalCostJuels = _getExpectedCost(5416) + l1FeeJuels; - assertEq(s_responses[1].totalCostJuels, expectedTotalCostJuels); + assertEq(s_responses[1].totalCostJuels, expectedTotalCostJuels, "Response cost mismatch for Arbitrum Goerli"); } - function test__getCurrentTxL1GasFees_SuccessWhenArbitrumSepolia() public { + function test__getL1FeeUpperLimit_SuccessWhenArbitrumSepolia() public { // Set the chainID vm.chainId(421614); @@ -69,33 +86,43 @@ contract ChainSpecificUtil__getCurrentTxL1GasFees_Arbitrum is FunctionsFulfillme // Check request cost estimate uint96 expectedEstimatedTotalCostJuels = _getExpectedCostEstimate(s_requests[1].requestData.callbackGasLimit) + - l1FeeJuels; - assertEq(s_requests[1].commitment.estimatedTotalCostJuels, expectedEstimatedTotalCostJuels); + l1FeeEstimateJuels; + assertEq( + s_requests[1].commitment.estimatedTotalCostJuels, + expectedEstimatedTotalCostJuels, + "Estimated cost mismatch for Arbitrum Sepolia" + ); // Check response actual cost uint96 expectedTotalCostJuels = _getExpectedCost(5416) + l1FeeJuels; - assertEq(s_responses[1].totalCostJuels, expectedTotalCostJuels); + assertEq(s_responses[1].totalCostJuels, expectedTotalCostJuels, "Response cost mismatch for Arbitrum Sepolia"); } } -/// @notice #_getCurrentTxL1GasFees Optimism -/// @dev Optimism gas formula = ((l2_base_fee + l2_priority_fee) * l2_gas_used) + L1 data fee -/// @dev where L1 data fee = l1_gas_price * ((count_zero_bytes(tx_data) * 4 + count_non_zero_bytes(tx_data) * 16) + fixed_overhead + noncalldata_gas) * dynamic_overhead -contract ChainSpecificUtil__getCurrentTxL1GasFees_Optimism is FunctionsFulfillmentSetup { - address private constant OVM_GASPRICEORACLE_ADDR = address(0x420000000000000000000000000000000000000F); - uint256 private constant L1_FEE_WEI = 15_818_209_764_247; +/// @notice #_getL1FeeUpperLimit Optimism +/// @dev Optimism gas formula: https://docs.optimism.io/stack/transactions/fees#ecotone +/// @dev Note that the docs fail to mention the calculation also requires a division by 10^6 +/// @dev See here: https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/exec-engine.md#ecotone-l1-cost-fee-changes-eip-4844-da +/// @dev Also, we conservatively assume all non-zero bytes: tx_compressed_size = tx_data_size_bytes +contract ChainSpecificUtil__getL1FeeUpperLimit_Optimism is FunctionsFulfillmentSetup { + address private constant GAS_PRICE_ORACLE_ADDR = address(0x420000000000000000000000000000000000000F); + GasPriceOracle private constant GAS_PRICE_ORACLE = GasPriceOracle(GAS_PRICE_ORACLE_ADDR); + + uint256 private constant L1_FEE_WEI = 1_648_118_885_618; + uint256 private constant L1_FEE_ESTIMATE_WITH_OVERESTIMATION_WEI = (L1_FEE_WEI * (10_000 + 5_000)) / 10_000; + uint96 l1FeeEstimateJuels = uint96((1e18 * L1_FEE_ESTIMATE_WITH_OVERESTIMATION_WEI) / uint256(LINK_ETH_RATE)); uint96 l1FeeJuels = uint96((1e18 * L1_FEE_WEI) / uint256(LINK_ETH_RATE)); function setUp() public virtual override { vm.mockCall( - OVM_GASPRICEORACLE_ADDR, - abi.encodeWithSelector(OVM_GasPriceOracle.getL1Fee.selector), + GAS_PRICE_ORACLE_ADDR, + abi.encodeWithSelector(GAS_PRICE_ORACLE.getL1FeeUpperBound.selector), abi.encode(L1_FEE_WEI) ); } - function test__getCurrentTxL1GasFees_SuccessWhenOptimismMainnet() public { + function test__getL1FeeUpperLimit_SuccessWhenOptimismMainnet() public { // Set the chainID vm.chainId(10); @@ -104,15 +131,19 @@ contract ChainSpecificUtil__getCurrentTxL1GasFees_Optimism is FunctionsFulfillme // Check request cost estimate uint96 expectedEstimatedTotalCostJuels = _getExpectedCostEstimate(s_requests[1].requestData.callbackGasLimit) + - l1FeeJuels; - assertEq(s_requests[1].commitment.estimatedTotalCostJuels, expectedEstimatedTotalCostJuels); + l1FeeEstimateJuels; + assertEq( + s_requests[1].commitment.estimatedTotalCostJuels, + expectedEstimatedTotalCostJuels, + "Estimated cost mismatch for Optimism mainnet" + ); // Check response actual cost uint96 expectedTotalCostJuels = _getExpectedCost(5416) + l1FeeJuels; - assertEq(s_responses[1].totalCostJuels, expectedTotalCostJuels); + assertEq(s_responses[1].totalCostJuels, expectedTotalCostJuels, "Response cost mismatch for Optimism mainnet"); } - function test__getCurrentTxL1GasFees_SuccessWhenOptimismGoerli() public { + function test__getL1FeeUpperLimit_SuccessWhenOptimismGoerli() public { // Set the chainID vm.chainId(420); @@ -121,15 +152,19 @@ contract ChainSpecificUtil__getCurrentTxL1GasFees_Optimism is FunctionsFulfillme // Check request cost estimate uint96 expectedEstimatedTotalCostJuels = _getExpectedCostEstimate(s_requests[1].requestData.callbackGasLimit) + - l1FeeJuels; - assertEq(s_requests[1].commitment.estimatedTotalCostJuels, expectedEstimatedTotalCostJuels); + l1FeeEstimateJuels; + assertEq( + s_requests[1].commitment.estimatedTotalCostJuels, + expectedEstimatedTotalCostJuels, + "Estimated cost mismatch for Optimism Goerli" + ); // Check response actual cost uint96 expectedTotalCostJuels = _getExpectedCost(5416) + l1FeeJuels; - assertEq(s_responses[1].totalCostJuels, expectedTotalCostJuels); + assertEq(s_responses[1].totalCostJuels, expectedTotalCostJuels, "Response cost mismatch for Optimism Goerli"); } - function test__getCurrentTxL1GasFees_SuccessWhenOptimismSepolia() public { + function test__getL1FeeUpperLimit_SuccessWhenOptimismSepolia() public { // Set the chainID vm.chainId(11155420); @@ -138,33 +173,40 @@ contract ChainSpecificUtil__getCurrentTxL1GasFees_Optimism is FunctionsFulfillme // Check request cost estimate uint96 expectedEstimatedTotalCostJuels = _getExpectedCostEstimate(s_requests[1].requestData.callbackGasLimit) + - l1FeeJuels; - assertEq(s_requests[1].commitment.estimatedTotalCostJuels, expectedEstimatedTotalCostJuels); + l1FeeEstimateJuels; + assertEq( + s_requests[1].commitment.estimatedTotalCostJuels, + expectedEstimatedTotalCostJuels, + "Estimated cost mismatch for Optimism Sepolia" + ); // Check response actual cost uint96 expectedTotalCostJuels = _getExpectedCost(5416) + l1FeeJuels; - assertEq(s_responses[1].totalCostJuels, expectedTotalCostJuels); + assertEq(s_responses[1].totalCostJuels, expectedTotalCostJuels, "Response cost mismatch for Optimism Sepolia"); } } -/// @notice #_getCurrentTxL1GasFees Base -/// @dev Base gas formula uses Optimism formula = ((l2_base_fee + l2_priority_fee) * l2_gas_used) + L1 data fee -/// @dev where L1 data fee = l1_gas_price * ((count_zero_bytes(tx_data) * 4 + count_non_zero_bytes(tx_data) * 16) + fixed_overhead + noncalldata_gas) * dynamic_overhead -contract ChainSpecificUtil__getCurrentTxL1GasFees_Base is FunctionsFulfillmentSetup { - address private constant OVM_GASPRICEORACLE_ADDR = address(0x420000000000000000000000000000000000000F); - uint256 private constant L1_FEE_WEI = 15_818_209_764_247; +/// @notice #_getL1FeeUpperLimit Base +/// @dev Base gas formula uses Optimism formula since it is build on the OP chain stack (See comments above for Optimism tests) +contract ChainSpecificUtil__getL1FeeUpperLimit_Base is FunctionsFulfillmentSetup { + address private constant GAS_PRICE_ORACLE_ADDR = address(0x420000000000000000000000000000000000000F); + GasPriceOracle private constant GAS_PRICE_ORACLE = GasPriceOracle(GAS_PRICE_ORACLE_ADDR); + + uint256 private constant L1_FEE_WEI = 1_648_118_885_618; + uint256 private constant L1_FEE_ESTIMATE_WITH_OVERESTIMATION_WEI = (L1_FEE_WEI * (10_000 + 5_000)) / 10_000; + uint96 l1FeeEstimateJuels = uint96((1e18 * L1_FEE_ESTIMATE_WITH_OVERESTIMATION_WEI) / uint256(LINK_ETH_RATE)); uint96 l1FeeJuels = uint96((1e18 * L1_FEE_WEI) / uint256(LINK_ETH_RATE)); function setUp() public virtual override { vm.mockCall( - OVM_GASPRICEORACLE_ADDR, - abi.encodeWithSelector(OVM_GasPriceOracle.getL1Fee.selector), + GAS_PRICE_ORACLE_ADDR, + abi.encodeWithSelector(GAS_PRICE_ORACLE.getL1FeeUpperBound.selector), abi.encode(L1_FEE_WEI) ); } - function test__getCurrentTxL1GasFees_SuccessWhenBaseMainnet() public { + function test__getL1FeeUpperLimit_SuccessWhenBaseMainnet() public { // Set the chainID vm.chainId(8453); @@ -173,15 +215,19 @@ contract ChainSpecificUtil__getCurrentTxL1GasFees_Base is FunctionsFulfillmentSe // Check request cost estimate uint96 expectedEstimatedTotalCostJuels = _getExpectedCostEstimate(s_requests[1].requestData.callbackGasLimit) + - l1FeeJuels; - assertEq(s_requests[1].commitment.estimatedTotalCostJuels, expectedEstimatedTotalCostJuels); + l1FeeEstimateJuels; + assertEq( + s_requests[1].commitment.estimatedTotalCostJuels, + expectedEstimatedTotalCostJuels, + "Estimated cost mismatch for Base mainnet" + ); // Check response actual cost uint96 expectedTotalCostJuels = _getExpectedCost(5416) + l1FeeJuels; - assertEq(s_responses[1].totalCostJuels, expectedTotalCostJuels); + assertEq(s_responses[1].totalCostJuels, expectedTotalCostJuels, "Response cost mismatch for Base mainnet"); } - function test__getCurrentTxL1GasFees_SuccessWhenBaseGoerli() public { + function test__getL1FeeUpperLimit_SuccessWhenBaseGoerli() public { // Set the chainID vm.chainId(84531); @@ -190,15 +236,19 @@ contract ChainSpecificUtil__getCurrentTxL1GasFees_Base is FunctionsFulfillmentSe // Check request cost estimate uint96 expectedEstimatedTotalCostJuels = _getExpectedCostEstimate(s_requests[1].requestData.callbackGasLimit) + - l1FeeJuels; - assertEq(s_requests[1].commitment.estimatedTotalCostJuels, expectedEstimatedTotalCostJuels); + l1FeeEstimateJuels; + assertEq( + s_requests[1].commitment.estimatedTotalCostJuels, + expectedEstimatedTotalCostJuels, + "Estimated cost mismatch for Base Goerli" + ); // Check response actual cost uint96 expectedTotalCostJuels = _getExpectedCost(5416) + l1FeeJuels; - assertEq(s_responses[1].totalCostJuels, expectedTotalCostJuels); + assertEq(s_responses[1].totalCostJuels, expectedTotalCostJuels, "Response cost mismatch for Base Goerli"); } - function test__getCurrentTxL1GasFees_SuccessWhenBaseSepolia() public { + function test__getL1FeeUpperLimit_SuccessWhenBaseSepolia() public { // Set the chainID vm.chainId(84532); @@ -207,11 +257,15 @@ contract ChainSpecificUtil__getCurrentTxL1GasFees_Base is FunctionsFulfillmentSe // Check request cost estimate uint96 expectedEstimatedTotalCostJuels = _getExpectedCostEstimate(s_requests[1].requestData.callbackGasLimit) + - l1FeeJuels; - assertEq(s_requests[1].commitment.estimatedTotalCostJuels, expectedEstimatedTotalCostJuels); + l1FeeEstimateJuels; + assertEq( + s_requests[1].commitment.estimatedTotalCostJuels, + expectedEstimatedTotalCostJuels, + "Estimated cost mismatch for Base Sepolia" + ); // Check response actual cost uint96 expectedTotalCostJuels = _getExpectedCost(5416) + l1FeeJuels; - assertEq(s_responses[1].totalCostJuels, expectedTotalCostJuels); + assertEq(s_responses[1].totalCostJuels, expectedTotalCostJuels, "Response cost mismatch for Base Sepolia"); } } diff --git a/contracts/src/v0.8/functions/tests/v1_X/FunctionsBilling.t.sol b/contracts/src/v0.8/functions/tests/v1_X/FunctionsBilling.t.sol index 774fe4e875c..b66c1e42f90 100644 --- a/contracts/src/v0.8/functions/tests/v1_X/FunctionsBilling.t.sol +++ b/contracts/src/v0.8/functions/tests/v1_X/FunctionsBilling.t.sol @@ -59,7 +59,8 @@ contract FunctionsBilling_UpdateConfig is FunctionsRouterSetup { fallbackNativePerUnitLink: getCoordinatorConfig().fallbackNativePerUnitLink * 2, fallbackUsdPerUnitLink: getCoordinatorConfig().fallbackUsdPerUnitLink * 2, fallbackUsdPerUnitLinkDecimals: getCoordinatorConfig().fallbackUsdPerUnitLinkDecimals * 2, - minimumEstimateGasPriceWei: getCoordinatorConfig().minimumEstimateGasPriceWei * 2 + minimumEstimateGasPriceWei: getCoordinatorConfig().minimumEstimateGasPriceWei * 2, + transmitTxSizeBytes: getCoordinatorConfig().transmitTxSizeBytes * 2 }); } diff --git a/contracts/src/v0.8/functions/tests/v1_X/FunctionsCoordinator.t.sol b/contracts/src/v0.8/functions/tests/v1_X/FunctionsCoordinator.t.sol index 3944c5873b1..03d9f645146 100644 --- a/contracts/src/v0.8/functions/tests/v1_X/FunctionsCoordinator.t.sol +++ b/contracts/src/v0.8/functions/tests/v1_X/FunctionsCoordinator.t.sol @@ -14,7 +14,7 @@ import {FunctionsRouterSetup, FunctionsDONSetup, FunctionsSubscriptionSetup} fro /// @notice #constructor contract FunctionsCoordinator_Constructor is FunctionsRouterSetup { function test_Constructor_Success() public { - assertEq(s_functionsCoordinator.typeAndVersion(), "Functions Coordinator v1.3.0"); + assertEq(s_functionsCoordinator.typeAndVersion(), "Functions Coordinator v1.3.1"); assertEq(s_functionsCoordinator.owner(), OWNER_ADDRESS); } } diff --git a/contracts/src/v0.8/functions/tests/v1_X/Setup.t.sol b/contracts/src/v0.8/functions/tests/v1_X/Setup.t.sol index 32dc53e42ab..815366e62aa 100644 --- a/contracts/src/v0.8/functions/tests/v1_X/Setup.t.sol +++ b/contracts/src/v0.8/functions/tests/v1_X/Setup.t.sol @@ -93,7 +93,8 @@ contract FunctionsRouterSetup is BaseTest { fallbackNativePerUnitLink: 5000000000000000, fallbackUsdPerUnitLink: 1400000000, fallbackUsdPerUnitLinkDecimals: 8, - minimumEstimateGasPriceWei: 1000000000 // 1 gwei + minimumEstimateGasPriceWei: 1000000000, // 1 gwei + transmitTxSizeBytes: 1764 }); } diff --git a/contracts/src/v0.8/keystone/CapabilitiesRegistry.sol b/contracts/src/v0.8/keystone/CapabilitiesRegistry.sol index 56df5078672..6b150dc5d74 100644 --- a/contracts/src/v0.8/keystone/CapabilitiesRegistry.sol +++ b/contracts/src/v0.8/keystone/CapabilitiesRegistry.sol @@ -1010,10 +1010,7 @@ contract CapabilitiesRegistry is OwnerIsCreator, TypeAndVersionInterface { /// beforeCapabilityConfigSet if ( capability.configurationContract.code.length == 0 || - !IERC165(capability.configurationContract).supportsInterface( - ICapabilityConfiguration.getCapabilityConfiguration.selector ^ - ICapabilityConfiguration.beforeCapabilityConfigSet.selector - ) + !IERC165(capability.configurationContract).supportsInterface(type(ICapabilityConfiguration).interfaceId) ) revert InvalidCapabilityConfigurationContractInterface(capability.configurationContract); } s_capabilities[hashedCapabilityId] = capability; diff --git a/contracts/src/v0.8/shared/access/AuthorizedCallers.sol b/contracts/src/v0.8/shared/access/AuthorizedCallers.sol new file mode 100644 index 00000000000..93102d1a97a --- /dev/null +++ b/contracts/src/v0.8/shared/access/AuthorizedCallers.sol @@ -0,0 +1,82 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.0; + +import {OwnerIsCreator} from "./OwnerIsCreator.sol"; +import {EnumerableSet} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/structs/EnumerableSet.sol"; + +/// @title The AuthorizedCallers contract +/// @notice A contract that manages multiple authorized callers. Enables restricting access to certain functions to a set of addresses. +contract AuthorizedCallers is OwnerIsCreator { + using EnumerableSet for EnumerableSet.AddressSet; + + event AuthorizedCallerAdded(address caller); + event AuthorizedCallerRemoved(address caller); + + error UnauthorizedCaller(address caller); + error ZeroAddressNotAllowed(); + + /// @notice Update args for changing the authorized callers + struct AuthorizedCallerArgs { + address[] addedCallers; + address[] removedCallers; + } + + /// @dev Set of authorized callers + EnumerableSet.AddressSet internal s_authorizedCallers; + + /// @param authorizedCallers the authorized callers to set + constructor(address[] memory authorizedCallers) { + _applyAuthorizedCallerUpdates( + AuthorizedCallerArgs({addedCallers: authorizedCallers, removedCallers: new address[](0)}) + ); + } + + /// @return authorizedCallers Returns all authorized callers + function getAllAuthorizedCallers() external view returns (address[] memory) { + return s_authorizedCallers.values(); + } + + /// @notice Updates the list of authorized callers + /// @param authorizedCallerArgs Callers to add and remove. Removals are performed first. + function applyAuthorizedCallerUpdates(AuthorizedCallerArgs memory authorizedCallerArgs) external onlyOwner { + _applyAuthorizedCallerUpdates(authorizedCallerArgs); + } + + /// @notice Updates the list of authorized callers + /// @param authorizedCallerArgs Callers to add and remove. Removals are performed first. + function _applyAuthorizedCallerUpdates(AuthorizedCallerArgs memory authorizedCallerArgs) internal { + address[] memory removedCallers = authorizedCallerArgs.removedCallers; + for (uint256 i = 0; i < removedCallers.length; ++i) { + address caller = removedCallers[i]; + + if (s_authorizedCallers.remove(caller)) { + emit AuthorizedCallerRemoved(caller); + } + } + + address[] memory addedCallers = authorizedCallerArgs.addedCallers; + for (uint256 i = 0; i < addedCallers.length; ++i) { + address caller = addedCallers[i]; + + if (caller == address(0)) { + revert ZeroAddressNotAllowed(); + } + + s_authorizedCallers.add(caller); + emit AuthorizedCallerAdded(caller); + } + } + + /// @notice Checks the sender and reverts if it is anyone other than a listed authorized caller. + function _validateCaller() internal view { + if (!s_authorizedCallers.contains(msg.sender)) { + revert UnauthorizedCaller(msg.sender); + } + } + + /// @notice Checks the sender and reverts if it is anyone other than a listed authorized caller. + modifier onlyAuthorizedCallers() { + _validateCaller(); + _; + } +} diff --git a/contracts/src/v0.8/shared/test/access/AuthorizedCallers.t.sol b/contracts/src/v0.8/shared/test/access/AuthorizedCallers.t.sol new file mode 100644 index 00000000000..34ae6848a4d --- /dev/null +++ b/contracts/src/v0.8/shared/test/access/AuthorizedCallers.t.sol @@ -0,0 +1,186 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.19; + +import {AuthorizedCallers} from "../../access/AuthorizedCallers.sol"; +import {BaseTest} from "../BaseTest.t.sol"; + +contract AuthorizedCallers_setup is BaseTest { + address[] s_callers; + + AuthorizedCallers s_authorizedCallers; + + function setUp() public override { + super.setUp(); + s_callers.push(makeAddr("caller1")); + s_callers.push(makeAddr("caller2")); + + s_authorizedCallers = new AuthorizedCallers(s_callers); + } +} + +contract AuthorizedCallers_constructor is AuthorizedCallers_setup { + event AuthorizedCallerAdded(address caller); + + function test_constructor_Success() public { + for (uint256 i = 0; i < s_callers.length; ++i) { + vm.expectEmit(); + emit AuthorizedCallerAdded(s_callers[i]); + } + + s_authorizedCallers = new AuthorizedCallers(s_callers); + + assertEq(s_callers, s_authorizedCallers.getAllAuthorizedCallers()); + } + + function test_ZeroAddressNotAllowed_Revert() public { + s_callers[0] = address(0); + + vm.expectRevert(AuthorizedCallers.ZeroAddressNotAllowed.selector); + + new AuthorizedCallers(s_callers); + } +} + +contract AuthorizedCallers_applyAuthorizedCallerUpdates is AuthorizedCallers_setup { + event AuthorizedCallerAdded(address caller); + event AuthorizedCallerRemoved(address caller); + + function test_OnlyAdd_Success() public { + address[] memory addedCallers = new address[](2); + addedCallers[0] = vm.addr(3); + addedCallers[1] = vm.addr(4); + + address[] memory removedCallers = new address[](0); + + assertEq(s_authorizedCallers.getAllAuthorizedCallers(), s_callers); + + vm.expectEmit(); + emit AuthorizedCallerAdded(addedCallers[0]); + vm.expectEmit(); + emit AuthorizedCallerAdded(addedCallers[1]); + + s_authorizedCallers.applyAuthorizedCallerUpdates( + AuthorizedCallers.AuthorizedCallerArgs({addedCallers: addedCallers, removedCallers: removedCallers}) + ); + + address[] memory expectedCallers = new address[](4); + expectedCallers[0] = s_callers[0]; + expectedCallers[1] = s_callers[1]; + expectedCallers[2] = addedCallers[0]; + expectedCallers[3] = addedCallers[1]; + + assertEq(s_authorizedCallers.getAllAuthorizedCallers(), expectedCallers); + } + + function test_OnlyRemove_Success() public { + address[] memory addedCallers = new address[](0); + address[] memory removedCallers = new address[](1); + removedCallers[0] = s_callers[0]; + + assertEq(s_authorizedCallers.getAllAuthorizedCallers(), s_callers); + + vm.expectEmit(); + emit AuthorizedCallerRemoved(removedCallers[0]); + + s_authorizedCallers.applyAuthorizedCallerUpdates( + AuthorizedCallers.AuthorizedCallerArgs({addedCallers: addedCallers, removedCallers: removedCallers}) + ); + + address[] memory expectedCallers = new address[](1); + expectedCallers[0] = s_callers[1]; + + assertEq(s_authorizedCallers.getAllAuthorizedCallers(), expectedCallers); + } + + function test_AddAndRemove_Success() public { + address[] memory addedCallers = new address[](2); + addedCallers[0] = address(42); + addedCallers[1] = address(43); + + address[] memory removedCallers = new address[](1); + removedCallers[0] = s_callers[0]; + + assertEq(s_authorizedCallers.getAllAuthorizedCallers(), s_callers); + + vm.expectEmit(); + emit AuthorizedCallerRemoved(removedCallers[0]); + vm.expectEmit(); + emit AuthorizedCallerAdded(addedCallers[0]); + vm.expectEmit(); + emit AuthorizedCallerAdded(addedCallers[1]); + + s_authorizedCallers.applyAuthorizedCallerUpdates( + AuthorizedCallers.AuthorizedCallerArgs({addedCallers: addedCallers, removedCallers: removedCallers}) + ); + + // Order of the set changes on removal + address[] memory expectedCallers = new address[](3); + expectedCallers[0] = s_callers[1]; + expectedCallers[1] = addedCallers[0]; + expectedCallers[2] = addedCallers[1]; + + assertEq(s_authorizedCallers.getAllAuthorizedCallers(), expectedCallers); + } + + function test_RemoveThenAdd_Success() public { + address[] memory addedCallers = new address[](1); + addedCallers[0] = s_callers[0]; + + address[] memory removedCallers = new address[](1); + removedCallers[0] = s_callers[0]; + + assertEq(s_authorizedCallers.getAllAuthorizedCallers(), s_callers); + + vm.expectEmit(); + emit AuthorizedCallerRemoved(removedCallers[0]); + + vm.expectEmit(); + emit AuthorizedCallerAdded(addedCallers[0]); + + s_authorizedCallers.applyAuthorizedCallerUpdates( + AuthorizedCallers.AuthorizedCallerArgs({addedCallers: addedCallers, removedCallers: removedCallers}) + ); + + address[] memory expectedCallers = new address[](2); + expectedCallers[0] = s_callers[1]; + expectedCallers[1] = s_callers[0]; + + assertEq(s_authorizedCallers.getAllAuthorizedCallers(), expectedCallers); + } + + function test_SkipRemove_Success() public { + address[] memory addedCallers = new address[](0); + + address[] memory removedCallers = new address[](1); + removedCallers[0] = address(42); + + vm.recordLogs(); + s_authorizedCallers.applyAuthorizedCallerUpdates( + AuthorizedCallers.AuthorizedCallerArgs({addedCallers: addedCallers, removedCallers: removedCallers}) + ); + + assertEq(s_authorizedCallers.getAllAuthorizedCallers(), s_callers); + assertEq(vm.getRecordedLogs().length, 0); + } + + function test_OnlyCallableByOwner_Revert() public { + vm.stopPrank(); + + AuthorizedCallers.AuthorizedCallerArgs memory authorizedCallerArgs = AuthorizedCallers.AuthorizedCallerArgs({ + addedCallers: new address[](0), + removedCallers: new address[](0) + }); + + vm.expectRevert("Only callable by owner"); + + s_authorizedCallers.applyAuthorizedCallerUpdates(authorizedCallerArgs); + } + + function test_ZeroAddressNotAllowed_Revert() public { + s_callers[0] = address(0); + + vm.expectRevert(AuthorizedCallers.ZeroAddressNotAllowed.selector); + + new AuthorizedCallers(s_callers); + } +} diff --git a/contracts/src/v0.8/shared/test/helpers/ChainReaderTester.sol b/contracts/src/v0.8/shared/test/helpers/ChainReaderTester.sol index 32969acad70..58a4b9a25c5 100644 --- a/contracts/src/v0.8/shared/test/helpers/ChainReaderTester.sol +++ b/contracts/src/v0.8/shared/test/helpers/ChainReaderTester.sol @@ -42,6 +42,7 @@ contract ChainReaderTester { TestStruct[] private s_seen; uint64[] private s_arr; + uint64 private s_value; constructor() { // See chain_reader_interface_tests.go in chainlink-relay @@ -62,6 +63,10 @@ contract ChainReaderTester { s_seen.push(TestStruct(field, differentField, oracleId, oracleIds, account, accounts, bigField, nestedStruct)); } + function setAlterablePrimitiveValue(uint64 value) public { + s_value = value; + } + function returnSeen( int32 field, string calldata differentField, @@ -85,6 +90,11 @@ contract ChainReaderTester { return 3; } + function getAlterablePrimitiveValue() public view returns (uint64) { + // See chain_reader_interface_tests.go in chainlink-relay + return s_value; + } + function getDifferentPrimitiveValue() public pure returns (uint64) { // See chain_reader_interface_tests.go in chainlink-relay return 1990; diff --git a/contracts/src/v0.8/shared/test/util/SortedSetValidationUtil.t.sol b/contracts/src/v0.8/shared/test/util/SortedSetValidationUtil.t.sol new file mode 100644 index 00000000000..ae7eba479ff --- /dev/null +++ b/contracts/src/v0.8/shared/test/util/SortedSetValidationUtil.t.sol @@ -0,0 +1,168 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.4; + +import {BaseTest} from "../BaseTest.t.sol"; +import {SortedSetValidationUtil} from "../../../shared/util/SortedSetValidationUtil.sol"; + +contract SortedSetValidationUtilBaseTest is BaseTest { + uint256 constant OFFSET = 5; + + modifier _ensureSetLength(uint256 subsetLength, uint256 supersetLength) { + vm.assume(subsetLength > 0 && supersetLength > 0 && subsetLength <= supersetLength); + _; + } + + function _createSets( + uint256 subsetLength, + uint256 supersetLength + ) internal pure returns (bytes32[] memory subset, bytes32[] memory superset) { + subset = new bytes32[](subsetLength); + superset = new bytes32[](supersetLength); + } + + function _convertArrayToSortedSet(bytes32[] memory arr, uint256 offSet) internal pure { + for (uint256 i = 1; i < arr.length; ++i) { + arr[i] = bytes32(uint256(arr[i - 1]) + offSet); + } + } + + function _convertToUnsortedSet(bytes32[] memory arr, uint256 ptr1, uint256 ptr2) internal pure { + // Swap two elements to make it unsorted + (arr[ptr1], arr[ptr2]) = (arr[ptr2], arr[ptr1]); + } + + function _convertArrayToSubset(bytes32[] memory subset, bytes32[] memory superset) internal pure { + for (uint256 i; i < subset.length; ++i) { + subset[i] = superset[i]; + } + } + + function _makeInvalidSubset(bytes32[] memory subset, bytes32[] memory superset, uint256 ptr) internal pure { + _convertArrayToSubset(subset, superset); + subset[ptr] = bytes32(uint256(subset[ptr]) + 1); + } + + function _convertArrayToHaveDuplicates(bytes32[] memory arr, uint256 ptr1, uint256 ptr2) internal pure { + arr[ptr2] = arr[ptr1]; + } +} + +contract SortedSetValidationUtil_CheckIsValidUniqueSubsetTest is SortedSetValidationUtilBaseTest { + // Successes. + + function test__checkIsValidUniqueSubset_ValidSubset_Success() public { + (bytes32[] memory subset, bytes32[] memory superset) = _createSets(3, 5); + _convertArrayToSortedSet(superset, OFFSET); + _convertArrayToSubset(subset, superset); + + SortedSetValidationUtil._checkIsValidUniqueSubset(subset, superset); + } + + // Reverts. + + function test__checkIsValidUniqueSubset_EmptySubset_Reverts() public { + (bytes32[] memory subset, bytes32[] memory superset) = _createSets(0, 5); + _convertArrayToSortedSet(superset, OFFSET); + + vm.expectRevert(abi.encodeWithSelector(SortedSetValidationUtil.EmptySet.selector)); + SortedSetValidationUtil._checkIsValidUniqueSubset(subset, superset); + } + + function test__checkIsValidUniqueSubset_EmptySuperset_Reverts() public { + (bytes32[] memory subset, bytes32[] memory superset) = _createSets(3, 0); + _convertArrayToSortedSet(subset, OFFSET); + + vm.expectRevert(abi.encodeWithSelector(SortedSetValidationUtil.EmptySet.selector)); + SortedSetValidationUtil._checkIsValidUniqueSubset(subset, superset); + } + + function test__checkIsValidUniqueSubset_NotASubset_Reverts() public { + (bytes32[] memory subset, bytes32[] memory superset) = _createSets(3, 5); + _convertArrayToSortedSet(superset, OFFSET); + _makeInvalidSubset(subset, superset, 1); + + vm.expectRevert(abi.encodeWithSelector(SortedSetValidationUtil.NotASubset.selector, subset, superset)); + SortedSetValidationUtil._checkIsValidUniqueSubset(subset, superset); + } + + function test__checkIsValidUniqueSubset_UnsortedSubset_Reverts() public { + (bytes32[] memory subset, bytes32[] memory superset) = _createSets(3, 5); + _convertArrayToSortedSet(superset, OFFSET); + _convertToUnsortedSet(subset, 1, 2); + + vm.expectRevert(abi.encodeWithSelector(SortedSetValidationUtil.NotASortedSet.selector, subset)); + SortedSetValidationUtil._checkIsValidUniqueSubset(subset, superset); + } + + function test__checkIsValidUniqueSubset_UnsortedSuperset_Reverts() public { + (bytes32[] memory subset, bytes32[] memory superset) = _createSets(3, 5); + _convertArrayToSortedSet(superset, OFFSET); + _convertArrayToSubset(subset, superset); + _convertToUnsortedSet(superset, 1, 2); + + vm.expectRevert(abi.encodeWithSelector(SortedSetValidationUtil.NotASortedSet.selector, superset)); + SortedSetValidationUtil._checkIsValidUniqueSubset(subset, superset); + } + + function test__checkIsValidUniqueSubset_HasDuplicates_Reverts() public { + (bytes32[] memory subset, bytes32[] memory superset) = _createSets(3, 5); + _convertArrayToSortedSet(superset, OFFSET); + _convertArrayToSubset(subset, superset); + _convertArrayToHaveDuplicates(subset, 1, 2); + + vm.expectRevert(abi.encodeWithSelector(SortedSetValidationUtil.NotASortedSet.selector, subset)); + SortedSetValidationUtil._checkIsValidUniqueSubset(subset, superset); + } + + function test__checkIsValidUniqueSubset_SubsetLargerThanSuperset_Reverts() public { + (bytes32[] memory subset, bytes32[] memory superset) = _createSets(6, 5); + _convertArrayToSortedSet(subset, OFFSET); + _convertArrayToSortedSet(superset, OFFSET); + + vm.expectRevert(abi.encodeWithSelector(SortedSetValidationUtil.NotASubset.selector, subset, superset)); + SortedSetValidationUtil._checkIsValidUniqueSubset(subset, superset); + } + + function test__checkIsValidUniqueSubset_SubsetEqualsSuperset_NoRevert() public { + (bytes32[] memory subset, bytes32[] memory superset) = _createSets(5, 5); + _convertArrayToSortedSet(subset, OFFSET); + _convertArrayToSortedSet(superset, OFFSET); + + SortedSetValidationUtil._checkIsValidUniqueSubset(subset, superset); + } + + function test__checkIsValidUniqueSubset_SingleElementSubset() public { + (bytes32[] memory subset, bytes32[] memory superset) = _createSets(1, 5); + _convertArrayToSortedSet(superset, OFFSET); + _convertArrayToSubset(subset, superset); + + SortedSetValidationUtil._checkIsValidUniqueSubset(subset, superset); + } + + function test__checkIsValidUniqueSubset_SingleElementSubsetAndSuperset_Equal() public { + (bytes32[] memory subset, bytes32[] memory superset) = _createSets(1, 1); + _convertArrayToSortedSet(subset, OFFSET); + _convertArrayToSortedSet(superset, OFFSET); + + SortedSetValidationUtil._checkIsValidUniqueSubset(subset, superset); + } + + function test__checkIsValidUniqueSubset_SingleElementSubsetAndSuperset_NotEqual_Reverts() public { + (bytes32[] memory subset, bytes32[] memory superset) = _createSets(1, 1); + _convertArrayToSortedSet(subset, OFFSET); + superset[0] = bytes32(uint256(subset[0]) + 10); // Different value + + vm.expectRevert(abi.encodeWithSelector(SortedSetValidationUtil.NotASubset.selector, subset, superset)); + SortedSetValidationUtil._checkIsValidUniqueSubset(subset, superset); + } + + function test__checkIsValidUniqueSubset_SupersetHasDuplicates_Reverts() public { + (bytes32[] memory subset, bytes32[] memory superset) = _createSets(3, 5); + _convertArrayToSortedSet(superset, OFFSET); + _convertArrayToSubset(subset, superset); + _convertArrayToHaveDuplicates(superset, 1, 2); + + vm.expectRevert(abi.encodeWithSelector(SortedSetValidationUtil.NotASortedSet.selector, superset)); + SortedSetValidationUtil._checkIsValidUniqueSubset(subset, superset); + } +} diff --git a/contracts/src/v0.8/shared/util/SortedSetValidationUtil.sol b/contracts/src/v0.8/shared/util/SortedSetValidationUtil.sol new file mode 100644 index 00000000000..fec11e494be --- /dev/null +++ b/contracts/src/v0.8/shared/util/SortedSetValidationUtil.sol @@ -0,0 +1,60 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.0; + +/// @title Sorted Set Validation Utility +/// @notice Provides utility functions for validating sorted sets and their subset relationships. +/// @dev This library is used to ensure that arrays of bytes32 are sorted sets and to check subset relations. +library SortedSetValidationUtil { + /// @dev Error to be thrown when an operation is attempted on an empty set. + error EmptySet(); + /// @dev Error to be thrown when the set is not in ascending unique order. + error NotASortedSet(bytes32[] set); + /// @dev Error to be thrown when the first array is not a subset of the second array. + error NotASubset(bytes32[] subset, bytes32[] superset); + + /// @notice Checks if `subset` is a valid and unique subset of `superset`. + /// NOTE: Empty set is not considered a valid subset of superset for our use case. + /// @dev Both arrays must be valid sets (unique, sorted in ascending order) and `subset` must be entirely contained within `superset`. + /// @param subset The array of bytes32 to validate as a subset. + /// @param superset The array of bytes32 in which subset is checked against. + /// @custom:revert EmptySet If either `subset` or `superset` is empty. + /// @custom:revert NotASubset If `subset` is not a subset of `superset`. + function _checkIsValidUniqueSubset(bytes32[] memory subset, bytes32[] memory superset) internal pure { + if (subset.length == 0 || superset.length == 0) { + revert EmptySet(); + } + + _checkIsValidSet(subset); + _checkIsValidSet(superset); + + uint256 i = 0; // Pointer for 'subset' + uint256 j = 0; // Pointer for 'superset' + + while (i < subset.length && j < superset.length) { + if (subset[i] > superset[j]) { + ++j; // Move the pointer in 'superset' to find a match + } else if (subset[i] == superset[j]) { + ++i; // Found a match, move the pointer in 'subset' + ++j; // Also move in 'superset' to continue checking + } else { + revert NotASubset(subset, superset); + } + } + + if (i < subset.length) { + revert NotASubset(subset, superset); + } + } + + /// @notice Validates that a given set is sorted and has unique elements. + /// @dev Iterates through the array to check that each element is greater than the previous. + /// @param set The array of bytes32 to validate. + /// @custom:revert NotASortedSet If any element is not greater than its predecessor or if any two consecutive elements are equal. + function _checkIsValidSet(bytes32[] memory set) private pure { + for (uint256 i = 1; i < set.length; ++i) { + if (set[i] <= set[i - 1]) { + revert NotASortedSet(set); + } + } + } +} diff --git a/contracts/src/v0.8/vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/L2/GasPriceOracle.sol b/contracts/src/v0.8/vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/L2/GasPriceOracle.sol new file mode 100644 index 00000000000..01e07a736e2 --- /dev/null +++ b/contracts/src/v0.8/vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/L2/GasPriceOracle.sol @@ -0,0 +1,251 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.15; + +/// @notice: IMPORTANT NOTICE for anyone who wants to use this contract +/// @notice Source: https://github.com/ethereum-optimism/optimism/blob/71b93116738ee98c9f8713b1a5dfe626ce06c1b2/packages/contracts-bedrock/src/L2/GasPriceOracle.sol +/// @notice The original code was trimmed down to include only the necessary interface elements required to interact with GasPriceOracle +/// @notice We need this file so that Solidity compiler will not complain because some functions don't exist +/// @notice In reality, we don't embed this code into our own contracts, instead we make cross-contract calls on predeployed GasPriceOracle contract + +import {ISemver} from "../universal/ISemver.sol"; +import {Predeploys} from "../libraries/Predeploys.sol"; +import {L1Block} from "../L2/L1Block.sol"; +import {Constants} from "../libraries/Constants.sol"; +import {LibZip} from "../deps/LibZip.sol"; + +/// @custom:proxied +/// @custom:predeploy 0x420000000000000000000000000000000000000F +/// @title GasPriceOracle +/// @notice This contract maintains the variables responsible for computing the L1 portion of the +/// total fee charged on L2. Before Bedrock, this contract held variables in state that were +/// read during the state transition function to compute the L1 portion of the transaction +/// fee. After Bedrock, this contract now simply proxies the L1Block contract, which has +/// the values used to compute the L1 portion of the fee in its state. +/// +/// The contract exposes an API that is useful for knowing how large the L1 portion of the +/// transaction fee will be. The following events were deprecated with Bedrock: +/// - event OverheadUpdated(uint256 overhead); +/// - event ScalarUpdated(uint256 scalar); +/// - event DecimalsUpdated(uint256 decimals); +contract GasPriceOracle is ISemver { + /// @notice Number of decimals used in the scalar. + uint256 public constant DECIMALS = 6; + + /// @notice Semantic version. + /// @custom:semver 1.3.0 + string public constant version = "1.3.0"; + + /// @notice This is the intercept value for the linear regression used to estimate the final size of the + /// compressed transaction. + int32 private constant COST_INTERCEPT = -42_585_600; + + /// @notice This is the coefficient value for the linear regression used to estimate the final size of the + /// compressed transaction. + uint32 private constant COST_FASTLZ_COEF = 836_500; + + /// @notice This is the minimum bound for the fastlz to brotli size estimation. Any estimations below this + /// are set to this value. + uint256 private constant MIN_TRANSACTION_SIZE = 100; + + /// @notice Indicates whether the network has gone through the Ecotone upgrade. + bool public isEcotone; + + /// @notice Indicates whether the network has gone through the Fjord upgrade. + bool public isFjord; + + /// @notice Computes the L1 portion of the fee based on the size of the rlp encoded input + /// transaction, the current L1 base fee, and the various dynamic parameters. + /// @param _data Unsigned fully RLP-encoded transaction to get the L1 fee for. + /// @return L1 fee that should be paid for the tx + function getL1Fee(bytes memory _data) external view returns (uint256) { + if (isFjord) { + return _getL1FeeFjord(_data); + } else if (isEcotone) { + return _getL1FeeEcotone(_data); + } + return _getL1FeeBedrock(_data); + } + + /// @notice returns an upper bound for the L1 fee for a given transaction size. + /// It is provided for callers who wish to estimate L1 transaction costs in the + /// write path, and is much more gas efficient than `getL1Fee`. + /// It assumes the worst case of fastlz upper-bound which covers %99.99 txs. + /// @param _unsignedTxSize Unsigned fully RLP-encoded transaction size to get the L1 fee for. + /// @return L1 estimated upper-bound fee that should be paid for the tx + function getL1FeeUpperBound(uint256 _unsignedTxSize) external view returns (uint256) { + require(isFjord, "GasPriceOracle: getL1FeeUpperBound only supports Fjord"); + + // Add 68 to the size to account for unsigned tx: + uint256 txSize = _unsignedTxSize + 68; + // txSize / 255 + 16 is the pratical fastlz upper-bound covers %99.99 txs. + uint256 flzUpperBound = txSize + txSize / 255 + 16; + + return _fjordL1Cost(flzUpperBound); + } + + /// @notice Set chain to be Ecotone chain (callable by depositor account) + function setEcotone() external { + require( + msg.sender == Constants.DEPOSITOR_ACCOUNT, + "GasPriceOracle: only the depositor account can set isEcotone flag" + ); + require(isEcotone == false, "GasPriceOracle: Ecotone already active"); + isEcotone = true; + } + + /// @notice Set chain to be Fjord chain (callable by depositor account) + function setFjord() external { + require( + msg.sender == Constants.DEPOSITOR_ACCOUNT, + "GasPriceOracle: only the depositor account can set isFjord flag" + ); + require(isEcotone, "GasPriceOracle: Fjord can only be activated after Ecotone"); + require(isFjord == false, "GasPriceOracle: Fjord already active"); + isFjord = true; + } + + /// @notice Retrieves the current gas price (base fee). + /// @return Current L2 gas price (base fee). + function gasPrice() public view returns (uint256) { + return block.basefee; + } + + /// @notice Retrieves the current base fee. + /// @return Current L2 base fee. + function baseFee() public view returns (uint256) { + return block.basefee; + } + + /// @custom:legacy + /// @notice Retrieves the current fee overhead. + /// @return Current fee overhead. + function overhead() public view returns (uint256) { + require(!isEcotone, "GasPriceOracle: overhead() is deprecated"); + return L1Block(Predeploys.L1_BLOCK_ATTRIBUTES).l1FeeOverhead(); + } + + /// @custom:legacy + /// @notice Retrieves the current fee scalar. + /// @return Current fee scalar. + function scalar() public view returns (uint256) { + require(!isEcotone, "GasPriceOracle: scalar() is deprecated"); + return L1Block(Predeploys.L1_BLOCK_ATTRIBUTES).l1FeeScalar(); + } + + /// @notice Retrieves the latest known L1 base fee. + /// @return Latest known L1 base fee. + function l1BaseFee() public view returns (uint256) { + return L1Block(Predeploys.L1_BLOCK_ATTRIBUTES).basefee(); + } + + /// @notice Retrieves the current blob base fee. + /// @return Current blob base fee. + function blobBaseFee() public view returns (uint256) { + return L1Block(Predeploys.L1_BLOCK_ATTRIBUTES).blobBaseFee(); + } + + /// @notice Retrieves the current base fee scalar. + /// @return Current base fee scalar. + function baseFeeScalar() public view returns (uint32) { + return L1Block(Predeploys.L1_BLOCK_ATTRIBUTES).baseFeeScalar(); + } + + /// @notice Retrieves the current blob base fee scalar. + /// @return Current blob base fee scalar. + function blobBaseFeeScalar() public view returns (uint32) { + return L1Block(Predeploys.L1_BLOCK_ATTRIBUTES).blobBaseFeeScalar(); + } + + /// @custom:legacy + /// @notice Retrieves the number of decimals used in the scalar. + /// @return Number of decimals used in the scalar. + function decimals() public pure returns (uint256) { + return DECIMALS; + } + + /// @notice Computes the amount of L1 gas used for a transaction. Adds 68 bytes + /// of padding to account for the fact that the input does not have a signature. + /// @param _data Unsigned fully RLP-encoded transaction to get the L1 gas for. + /// @return Amount of L1 gas used to publish the transaction. + /// @custom:deprecated This method does not accurately estimate the gas used for a transaction. + /// If you are calculating fees use getL1Fee or getL1FeeUpperBound. + function getL1GasUsed(bytes memory _data) public view returns (uint256) { + if (isFjord) { + // Add 68 to the size to account for unsigned tx + // Assume the compressed data is mostly non-zero, and would pay 16 gas per calldata byte + // Divide by 1e6 due to the scaling factor of the linear regression + return (_fjordLinearRegression(LibZip.flzCompress(_data).length + 68) * 16) / 1e6; + } + uint256 l1GasUsed = _getCalldataGas(_data); + if (isEcotone) { + return l1GasUsed; + } + return l1GasUsed + L1Block(Predeploys.L1_BLOCK_ATTRIBUTES).l1FeeOverhead(); + } + + /// @notice Computation of the L1 portion of the fee for Bedrock. + /// @param _data Unsigned fully RLP-encoded transaction to get the L1 fee for. + /// @return L1 fee that should be paid for the tx + function _getL1FeeBedrock(bytes memory _data) internal view returns (uint256) { + uint256 l1GasUsed = _getCalldataGas(_data); + uint256 fee = (l1GasUsed + L1Block(Predeploys.L1_BLOCK_ATTRIBUTES).l1FeeOverhead()) * + l1BaseFee() * + L1Block(Predeploys.L1_BLOCK_ATTRIBUTES).l1FeeScalar(); + return fee / (10 ** DECIMALS); + } + + /// @notice L1 portion of the fee after Ecotone. + /// @param _data Unsigned fully RLP-encoded transaction to get the L1 fee for. + /// @return L1 fee that should be paid for the tx + function _getL1FeeEcotone(bytes memory _data) internal view returns (uint256) { + uint256 l1GasUsed = _getCalldataGas(_data); + uint256 scaledBaseFee = baseFeeScalar() * 16 * l1BaseFee(); + uint256 scaledBlobBaseFee = blobBaseFeeScalar() * blobBaseFee(); + uint256 fee = l1GasUsed * (scaledBaseFee + scaledBlobBaseFee); + return fee / (16 * 10 ** DECIMALS); + } + + /// @notice L1 portion of the fee after Fjord. + /// @param _data Unsigned fully RLP-encoded transaction to get the L1 fee for. + /// @return L1 fee that should be paid for the tx + function _getL1FeeFjord(bytes memory _data) internal view returns (uint256) { + return _fjordL1Cost(LibZip.flzCompress(_data).length + 68); + } + + /// @notice L1 gas estimation calculation. + /// @param _data Unsigned fully RLP-encoded transaction to get the L1 gas for. + /// @return Amount of L1 gas used to publish the transaction. + function _getCalldataGas(bytes memory _data) internal pure returns (uint256) { + uint256 total = 0; + uint256 length = _data.length; + for (uint256 i = 0; i < length; i++) { + if (_data[i] == 0) { + total += 4; + } else { + total += 16; + } + } + return total + (68 * 16); + } + + /// @notice Fjord L1 cost based on the compressed and original tx size. + /// @param _fastLzSize estimated compressed tx size. + /// @return Fjord L1 fee that should be paid for the tx + function _fjordL1Cost(uint256 _fastLzSize) internal view returns (uint256) { + // Apply the linear regression to estimate the Brotli 10 size + uint256 estimatedSize = _fjordLinearRegression(_fastLzSize); + uint256 feeScaled = baseFeeScalar() * 16 * l1BaseFee() + blobBaseFeeScalar() * blobBaseFee(); + return (estimatedSize * feeScaled) / (10 ** (DECIMALS * 2)); + } + + /// @notice Takes the fastLz size compression and returns the estimated Brotli + /// @param _fastLzSize fastlz compressed tx size. + /// @return Number of bytes in the compressed transaction + function _fjordLinearRegression(uint256 _fastLzSize) internal pure returns (uint256) { + int256 estimatedSize = COST_INTERCEPT + int256(COST_FASTLZ_COEF * _fastLzSize); + if (estimatedSize < int256(MIN_TRANSACTION_SIZE) * 1e6) { + estimatedSize = int256(MIN_TRANSACTION_SIZE) * 1e6; + } + return uint256(estimatedSize); + } +} diff --git a/contracts/src/v0.8/vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/L2/L1Block.sol b/contracts/src/v0.8/vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/L2/L1Block.sol new file mode 100644 index 00000000000..a58c85bd63b --- /dev/null +++ b/contracts/src/v0.8/vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/L2/L1Block.sol @@ -0,0 +1,169 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.15; + +/// @notice: IMPORTANT NOTICE for anyone who wants to use this contract +/// @notice Source: https://github.com/ethereum-optimism/optimism/blob/71b93116738ee98c9f8713b1a5dfe626ce06c1b2/packages/contracts-bedrock/src/L2/L1Block.sol +/// @notice The original code was trimmed down to include only the necessary interface elements required to interact with GasPriceOracle +/// @notice We need this file so that Solidity compiler will not complain because some functions don't exist +/// @notice In reality, we don't embed this code into our own contracts, instead we make cross-contract calls on predeployed GasPriceOracle contract + +import {ISemver} from "../universal/ISemver.sol"; +import {Constants} from "../libraries/Constants.sol"; +import {GasPayingToken, IGasToken} from "../libraries/GasPayingToken.sol"; +import "../libraries/L1BlockErrors.sol"; + +/// @custom:proxied +/// @custom:predeploy 0x4200000000000000000000000000000000000015 +/// @title L1Block +/// @notice The L1Block predeploy gives users access to information about the last known L1 block. +/// Values within this contract are updated once per epoch (every L1 block) and can only be +/// set by the "depositor" account, a special system address. Depositor account transactions +/// are created by the protocol whenever we move to a new epoch. +contract L1Block is ISemver, IGasToken { + /// @notice Event emitted when the gas paying token is set. + event GasPayingTokenSet(address indexed token, uint8 indexed decimals, bytes32 name, bytes32 symbol); + + /// @notice Address of the special depositor account. + function DEPOSITOR_ACCOUNT() public pure returns (address addr_) { + addr_ = Constants.DEPOSITOR_ACCOUNT; + } + + /// @notice The latest L1 block number known by the L2 system. + uint64 public number; + + /// @notice The latest L1 timestamp known by the L2 system. + uint64 public timestamp; + + /// @notice The latest L1 base fee. + uint256 public basefee; + + /// @notice The latest L1 blockhash. + bytes32 public hash; + + /// @notice The number of L2 blocks in the same epoch. + uint64 public sequenceNumber; + + /// @notice The scalar value applied to the L1 blob base fee portion of the blob-capable L1 cost func. + uint32 public blobBaseFeeScalar; + + /// @notice The scalar value applied to the L1 base fee portion of the blob-capable L1 cost func. + uint32 public baseFeeScalar; + + /// @notice The versioned hash to authenticate the batcher by. + bytes32 public batcherHash; + + /// @notice The overhead value applied to the L1 portion of the transaction fee. + /// @custom:legacy + uint256 public l1FeeOverhead; + + /// @notice The scalar value applied to the L1 portion of the transaction fee. + /// @custom:legacy + uint256 public l1FeeScalar; + + /// @notice The latest L1 blob base fee. + uint256 public blobBaseFee; + + /// @custom:semver 1.4.1-beta.1 + function version() public pure virtual returns (string memory) { + return "1.4.1-beta.1"; + } + + /// @notice Returns the gas paying token, its decimals, name and symbol. + /// If nothing is set in state, then it means ether is used. + function gasPayingToken() public view returns (address addr_, uint8 decimals_) { + (addr_, decimals_) = GasPayingToken.getToken(); + } + + /// @notice Returns the gas paying token name. + /// If nothing is set in state, then it means ether is used. + function gasPayingTokenName() public view returns (string memory name_) { + name_ = GasPayingToken.getName(); + } + + /// @notice Returns the gas paying token symbol. + /// If nothing is set in state, then it means ether is used. + function gasPayingTokenSymbol() public view returns (string memory symbol_) { + symbol_ = GasPayingToken.getSymbol(); + } + + /// @notice Getter for custom gas token paying networks. Returns true if the + /// network uses a custom gas token. + function isCustomGasToken() public view returns (bool) { + (address token, ) = gasPayingToken(); + return token != Constants.ETHER; + } + + /// @custom:legacy + /// @notice Updates the L1 block values. + /// @param _number L1 blocknumber. + /// @param _timestamp L1 timestamp. + /// @param _basefee L1 basefee. + /// @param _hash L1 blockhash. + /// @param _sequenceNumber Number of L2 blocks since epoch start. + /// @param _batcherHash Versioned hash to authenticate batcher by. + /// @param _l1FeeOverhead L1 fee overhead. + /// @param _l1FeeScalar L1 fee scalar. + function setL1BlockValues( + uint64 _number, + uint64 _timestamp, + uint256 _basefee, + bytes32 _hash, + uint64 _sequenceNumber, + bytes32 _batcherHash, + uint256 _l1FeeOverhead, + uint256 _l1FeeScalar + ) external { + require(msg.sender == DEPOSITOR_ACCOUNT(), "L1Block: only the depositor account can set L1 block values"); + + number = _number; + timestamp = _timestamp; + basefee = _basefee; + hash = _hash; + sequenceNumber = _sequenceNumber; + batcherHash = _batcherHash; + l1FeeOverhead = _l1FeeOverhead; + l1FeeScalar = _l1FeeScalar; + } + + /// @notice Updates the L1 block values for an Ecotone upgraded chain. + /// Params are packed and passed in as raw msg.data instead of ABI to reduce calldata size. + /// Params are expected to be in the following order: + /// 1. _baseFeeScalar L1 base fee scalar + /// 2. _blobBaseFeeScalar L1 blob base fee scalar + /// 3. _sequenceNumber Number of L2 blocks since epoch start. + /// 4. _timestamp L1 timestamp. + /// 5. _number L1 blocknumber. + /// 6. _basefee L1 base fee. + /// 7. _blobBaseFee L1 blob base fee. + /// 8. _hash L1 blockhash. + /// 9. _batcherHash Versioned hash to authenticate batcher by. + function setL1BlockValuesEcotone() external { + address depositor = DEPOSITOR_ACCOUNT(); + assembly { + // Revert if the caller is not the depositor account. + if xor(caller(), depositor) { + mstore(0x00, 0x3cc50b45) // 0x3cc50b45 is the 4-byte selector of "NotDepositor()" + revert(0x1C, 0x04) // returns the stored 4-byte selector from above + } + // sequencenum (uint64), blobBaseFeeScalar (uint32), baseFeeScalar (uint32) + sstore(sequenceNumber.slot, shr(128, calldataload(4))) + // number (uint64) and timestamp (uint64) + sstore(number.slot, shr(128, calldataload(20))) + sstore(basefee.slot, calldataload(36)) // uint256 + sstore(blobBaseFee.slot, calldataload(68)) // uint256 + sstore(hash.slot, calldataload(100)) // bytes32 + sstore(batcherHash.slot, calldataload(132)) // bytes32 + } + } + + /// @notice Sets the gas paying token for the L2 system. Can only be called by the special + /// depositor account. This function is not called on every L2 block but instead + /// only called by specially crafted L1 deposit transactions. + function setGasPayingToken(address _token, uint8 _decimals, bytes32 _name, bytes32 _symbol) external { + if (msg.sender != DEPOSITOR_ACCOUNT()) revert NotDepositor(); + + GasPayingToken.set({_token: _token, _decimals: _decimals, _name: _name, _symbol: _symbol}); + + emit GasPayingTokenSet({token: _token, decimals: _decimals, name: _name, symbol: _symbol}); + } +} diff --git a/contracts/src/v0.8/vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/deps/LibString.sol b/contracts/src/v0.8/vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/deps/LibString.sol new file mode 100644 index 00000000000..bf6d8c2e74c --- /dev/null +++ b/contracts/src/v0.8/vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/deps/LibString.sol @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.4; + +/// @notice: IMPORTANT NOTICE for anyone who wants to use this contract +/// @notice Source: https://github.com/transmissions11/solmate/blob/97bdb2003b70382996a79a406813f76417b1cf90/src/utils/LibString.sol +/// @notice The original code was trimmed down to include only the necessary interface elements required to interact with GasPriceOracle +/// @notice We need this file so that Solidity compiler will not complain because some functions don't exist +/// @notice In reality, we don't embed this code into our own contracts, instead we make cross-contract calls on predeployed GasPriceOracle contract + +/// @notice Library for converting numbers into strings and other string operations. +/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibString.sol) +/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/LibString.sol) +/// +/// Note: +/// For performance and bytecode compactness, most of the string operations are restricted to +/// byte strings (7-bit ASCII), except where otherwise specified. +/// Usage of byte string operations on charsets with runes spanning two or more bytes +/// can lead to undefined behavior. +library LibString { + /// @dev Returns a string from a small bytes32 string. + /// `s` must be null-terminated, or behavior will be undefined. + function fromSmallString(bytes32 s) internal pure returns (string memory result) { + /// @solidity memory-safe-assembly + assembly { + result := mload(0x40) + let n := 0 + for { + + } byte(n, s) { + n := add(n, 1) + } { + + } // Scan for '\0'. + mstore(result, n) + let o := add(result, 0x20) + mstore(o, s) + mstore(add(o, n), 0) + mstore(0x40, add(result, 0x40)) + } + } + + /// @dev Returns the string as a normalized null-terminated small string. + function toSmallString(string memory s) internal pure returns (bytes32 result) { + /// @solidity memory-safe-assembly + assembly { + result := mload(s) + if iszero(lt(result, 33)) { + mstore(0x00, 0xec92f9a3) // `TooBigForSmallString()`. + revert(0x1c, 0x04) + } + result := shl(shl(3, sub(32, result)), mload(add(s, result))) + } + } +} diff --git a/contracts/src/v0.8/vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/deps/LibZip.sol b/contracts/src/v0.8/vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/deps/LibZip.sol new file mode 100644 index 00000000000..5adc429113b --- /dev/null +++ b/contracts/src/v0.8/vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/deps/LibZip.sol @@ -0,0 +1,108 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.4; + +/// @notice: IMPORTANT NOTICE for anyone who wants to use this contract +/// @notice Source: https://github.com/Vectorized/solady/blob/3e8031b16417154dc2beae71b7b45f415d29566b/src/utils/LibZip.sol +/// @notice The original code was trimmed down to include only the necessary interface elements required to interact with GasPriceOracle +/// @notice We need this file so that Solidity compiler will not complain because some functions don't exist +/// @notice In reality, we don't embed this code into our own contracts, instead we make cross-contract calls on predeployed GasPriceOracle contract + +/// @notice Library for compressing and decompressing bytes. +/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibZip.sol) +/// @author Calldata compression by clabby (https://github.com/clabby/op-kompressor) +/// @author FastLZ by ariya (https://github.com/ariya/FastLZ) +/// +/// @dev Note: +/// The accompanying solady.js library includes implementations of +/// FastLZ and calldata operations for convenience. +library LibZip { + /// @dev Returns the compressed `data`. + function flzCompress(bytes memory data) internal pure returns (bytes memory result) { + /// @solidity memory-safe-assembly + assembly { + function ms8(d_, v_) -> _d { + mstore8(d_, v_) + _d := add(d_, 1) + } + function u24(p_) -> _u { + let w := mload(p_) + _u := or(shl(16, byte(2, w)), or(shl(8, byte(1, w)), byte(0, w))) + } + function cmp(p_, q_, e_) -> _l { + for { e_ := sub(e_, q_) } lt(_l, e_) { _l := add(_l, 1) } { + e_ := mul(iszero(byte(0, xor(mload(add(p_, _l)), mload(add(q_, _l))))), e_) + } + } + function literals(runs_, src_, dest_) -> _o { + for { _o := dest_ } iszero(lt(runs_, 0x20)) { runs_ := sub(runs_, 0x20) } { + mstore(ms8(_o, 31), mload(src_)) + _o := add(_o, 0x21) + src_ := add(src_, 0x20) + } + if iszero(runs_) { leave } + mstore(ms8(_o, sub(runs_, 1)), mload(src_)) + _o := add(1, add(_o, runs_)) + } + function match(l_, d_, o_) -> _o { + for { d_ := sub(d_, 1) } iszero(lt(l_, 263)) { l_ := sub(l_, 262) } { + o_ := ms8(ms8(ms8(o_, add(224, shr(8, d_))), 253), and(0xff, d_)) + } + if iszero(lt(l_, 7)) { + _o := ms8(ms8(ms8(o_, add(224, shr(8, d_))), sub(l_, 7)), and(0xff, d_)) + leave + } + _o := ms8(ms8(o_, add(shl(5, l_), shr(8, d_))), and(0xff, d_)) + } + function setHash(i_, v_) { + let p := add(mload(0x40), shl(2, i_)) + mstore(p, xor(mload(p), shl(224, xor(shr(224, mload(p)), v_)))) + } + function getHash(i_) -> _h { + _h := shr(224, mload(add(mload(0x40), shl(2, i_)))) + } + function hash(v_) -> _r { + _r := and(shr(19, mul(2654435769, v_)), 0x1fff) + } + function setNextHash(ip_, ipStart_) -> _ip { + setHash(hash(u24(ip_)), sub(ip_, ipStart_)) + _ip := add(ip_, 1) + } + codecopy(mload(0x40), codesize(), 0x8000) // Zeroize the hashmap. + let op := add(mload(0x40), 0x8000) + let a := add(data, 0x20) + let ipStart := a + let ipLimit := sub(add(ipStart, mload(data)), 13) + for { let ip := add(2, a) } lt(ip, ipLimit) {} { + let r := 0 + let d := 0 + for {} 1 {} { + let s := u24(ip) + let h := hash(s) + r := add(ipStart, getHash(h)) + setHash(h, sub(ip, ipStart)) + d := sub(ip, r) + if iszero(lt(ip, ipLimit)) { break } + ip := add(ip, 1) + if iszero(gt(d, 0x1fff)) { if eq(s, u24(r)) { break } } + } + if iszero(lt(ip, ipLimit)) { break } + ip := sub(ip, 1) + if gt(ip, a) { op := literals(sub(ip, a), a, op) } + let l := cmp(add(r, 3), add(ip, 3), add(ipLimit, 9)) + op := match(l, d, op) + ip := setNextHash(setNextHash(add(ip, l), ipStart), ipStart) + a := ip + } + op := literals(sub(add(ipStart, mload(data)), a), a, op) + result := mload(0x40) + let t := add(result, 0x8000) + let n := sub(op, t) + mstore(result, n) // Store the length. + // Copy the result to compact the memory, overwriting the hashmap. + let o := add(result, 0x20) + for { let i } lt(i, n) { i := add(i, 0x20) } { mstore(add(o, i), mload(add(t, i))) } + mstore(add(o, n), 0) // Zeroize the slot after the string. + mstore(0x40, add(add(o, n), 0x20)) // Allocate the memory. + } + } +} diff --git a/contracts/src/v0.8/vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/libraries/Constants.sol b/contracts/src/v0.8/vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/libraries/Constants.sol new file mode 100644 index 00000000000..79981ec6dc5 --- /dev/null +++ b/contracts/src/v0.8/vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/libraries/Constants.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +/// @notice: IMPORTANT NOTICE for anyone who wants to use this contract +/// @notice Source: https://github.com/ethereum-optimism/optimism/blob/71b93116738ee98c9f8713b1a5dfe626ce06c1b2/packages/contracts-bedrock/src/libraries/Constants.sol +/// @notice The original code was trimmed down to include only the necessary interface elements required to interact with GasPriceOracle +/// @notice We need this file so that Solidity compiler will not complain because some functions don't exist +/// @notice In reality, we don't embed this code into our own contracts, instead we make cross-contract calls on predeployed GasPriceOracle contract + +/// @title Constants +/// @notice Constants is a library for storing constants. Simple! Don't put everything in here, just +/// the stuff used in multiple contracts. Constants that only apply to a single contract +/// should be defined in that contract instead. +library Constants { + /// @notice Special address to be used as the tx origin for gas estimation calls in the + /// OptimismPortal and CrossDomainMessenger calls. You only need to use this address if + /// the minimum gas limit specified by the user is not actually enough to execute the + /// given message and you're attempting to estimate the actual necessary gas limit. We + /// use address(1) because it's the ecrecover precompile and therefore guaranteed to + /// never have any code on any EVM chain. + address internal constant ESTIMATION_ADDRESS = address(1); + + /// @notice Value used for the L2 sender storage slot in both the OptimismPortal and the + /// CrossDomainMessenger contracts before an actual sender is set. This value is + /// non-zero to reduce the gas cost of message passing transactions. + address internal constant DEFAULT_L2_SENDER = 0x000000000000000000000000000000000000dEaD; + + /// @notice The storage slot that holds the address of a proxy implementation. + /// @dev `bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)` + bytes32 internal constant PROXY_IMPLEMENTATION_ADDRESS = + 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; + + /// @notice The storage slot that holds the address of the owner. + /// @dev `bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1)` + bytes32 internal constant PROXY_OWNER_ADDRESS = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; + + /// @notice The address that represents ether when dealing with ERC20 token addresses. + address internal constant ETHER = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; + + /// @notice The address that represents the system caller responsible for L1 attributes + /// transactions. + address internal constant DEPOSITOR_ACCOUNT = 0xDeaDDEaDDeAdDeAdDEAdDEaddeAddEAdDEAd0001; +} diff --git a/contracts/src/v0.8/vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/libraries/GasPayingToken.sol b/contracts/src/v0.8/vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/libraries/GasPayingToken.sol new file mode 100644 index 00000000000..7754f5041f7 --- /dev/null +++ b/contracts/src/v0.8/vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/libraries/GasPayingToken.sol @@ -0,0 +1,93 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +/// @notice: IMPORTANT NOTICE for anyone who wants to use this contract +/// @notice Source: https://github.com/ethereum-optimism/optimism/blob/71b93116738ee98c9f8713b1a5dfe626ce06c1b2/packages/contracts-bedrock/src/libraries/GasPayingToken.sol +/// @notice The original code was trimmed down to include only the necessary interface elements required to interact with GasPriceOracle +/// @notice We need this file so that Solidity compiler will not complain because some functions don't exist +/// @notice In reality, we don't embed this code into our own contracts, instead we make cross-contract calls on predeployed GasPriceOracle contract + +import {Storage} from "./Storage.sol"; +import {Constants} from "./Constants.sol"; +import {LibString} from "../deps/LibString.sol"; + +/// @title IGasToken +/// @notice Implemented by contracts that are aware of the custom gas token used +/// by the L2 network. +interface IGasToken { + /// @notice Getter for the ERC20 token address that is used to pay for gas and its decimals. + function gasPayingToken() external view returns (address, uint8); + /// @notice Returns the gas token name. + function gasPayingTokenName() external view returns (string memory); + /// @notice Returns the gas token symbol. + function gasPayingTokenSymbol() external view returns (string memory); + /// @notice Returns true if the network uses a custom gas token. + function isCustomGasToken() external view returns (bool); +} + +/// @title GasPayingToken +/// @notice Handles reading and writing the custom gas token to storage. +/// To be used in any place where gas token information is read or +/// written to state. If multiple contracts use this library, the +/// values in storage should be kept in sync between them. +library GasPayingToken { + /// @notice The storage slot that contains the address and decimals of the gas paying token + bytes32 internal constant GAS_PAYING_TOKEN_SLOT = bytes32(uint256(keccak256("opstack.gaspayingtoken")) - 1); + + /// @notice The storage slot that contains the ERC20 `name()` of the gas paying token + bytes32 internal constant GAS_PAYING_TOKEN_NAME_SLOT = bytes32(uint256(keccak256("opstack.gaspayingtokenname")) - 1); + + /// @notice the storage slot that contains the ERC20 `symbol()` of the gas paying token + bytes32 internal constant GAS_PAYING_TOKEN_SYMBOL_SLOT = + bytes32(uint256(keccak256("opstack.gaspayingtokensymbol")) - 1); + + /// @notice Reads the gas paying token and its decimals from the magic + /// storage slot. If nothing is set in storage, then the ether + /// address is returned instead. + function getToken() internal view returns (address addr_, uint8 decimals_) { + bytes32 slot = Storage.getBytes32(GAS_PAYING_TOKEN_SLOT); + addr_ = address(uint160(uint256(slot) & uint256(type(uint160).max))); + if (addr_ == address(0)) { + addr_ = Constants.ETHER; + decimals_ = 18; + } else { + decimals_ = uint8(uint256(slot) >> 160); + } + } + + /// @notice Reads the gas paying token's name from the magic storage slot. + /// If nothing is set in storage, then the ether name, 'Ether', is returned instead. + function getName() internal view returns (string memory name_) { + (address addr, ) = getToken(); + if (addr == Constants.ETHER) { + name_ = "Ether"; + } else { + name_ = LibString.fromSmallString(Storage.getBytes32(GAS_PAYING_TOKEN_NAME_SLOT)); + } + } + + /// @notice Reads the gas paying token's symbol from the magic storage slot. + /// If nothing is set in storage, then the ether symbol, 'ETH', is returned instead. + function getSymbol() internal view returns (string memory symbol_) { + (address addr, ) = getToken(); + if (addr == Constants.ETHER) { + symbol_ = "ETH"; + } else { + symbol_ = LibString.fromSmallString(Storage.getBytes32(GAS_PAYING_TOKEN_SYMBOL_SLOT)); + } + } + + /// @notice Writes the gas paying token, its decimals, name and symbol to the magic storage slot. + function set(address _token, uint8 _decimals, bytes32 _name, bytes32 _symbol) internal { + Storage.setBytes32(GAS_PAYING_TOKEN_SLOT, bytes32((uint256(_decimals) << 160) | uint256(uint160(_token)))); + Storage.setBytes32(GAS_PAYING_TOKEN_NAME_SLOT, _name); + Storage.setBytes32(GAS_PAYING_TOKEN_SYMBOL_SLOT, _symbol); + } + + /// @notice Maps a string to a normalized null-terminated small string. + function sanitize(string memory _str) internal pure returns (bytes32) { + require(bytes(_str).length <= 32, "GasPayingToken: string cannot be greater than 32 bytes"); + + return LibString.toSmallString(_str); + } +} diff --git a/contracts/src/v0.8/vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/libraries/L1BlockErrors.sol b/contracts/src/v0.8/vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/libraries/L1BlockErrors.sol new file mode 100644 index 00000000000..e6a180abf68 --- /dev/null +++ b/contracts/src/v0.8/vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/libraries/L1BlockErrors.sol @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +/// @notice: IMPORTANT NOTICE for anyone who wants to use this contract +/// @notice Source: https://github.com/ethereum-optimism/optimism/blob/71b93116738ee98c9f8713b1a5dfe626ce06c1b2/packages/contracts-bedrock/src/libraries/L1BlockErrors.sol +/// @notice The original code was trimmed down to include only the necessary interface elements required to interact with GasPriceOracle +/// @notice We need this file so that Solidity compiler will not complain because some functions don't exist +/// @notice In reality, we don't embed this code into our own contracts, instead we make cross-contract calls on predeployed GasPriceOracle contract + +/// @notice Error returns when a non-depositor account tries to set L1 block values. +error NotDepositor(); + +/// @notice Error when a chain ID is not in the interop dependency set. +error NotDependency(); + +/// @notice Error when the interop dependency set size is too large. +error DependencySetSizeTooLarge(); + +/// @notice Error when a chain ID already in the interop dependency set is attempted to be added. +error AlreadyDependency(); + +/// @notice Error when the chain's chain ID is attempted to be removed from the interop dependency set. +error CantRemovedDependency(); diff --git a/contracts/src/v0.8/vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/libraries/Predeploys.sol b/contracts/src/v0.8/vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/libraries/Predeploys.sol new file mode 100644 index 00000000000..5b42d2e8844 --- /dev/null +++ b/contracts/src/v0.8/vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/libraries/Predeploys.sol @@ -0,0 +1,171 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +/// @notice: IMPORTANT NOTICE for anyone who wants to use this contract +/// @notice Source: https://github.com/ethereum-optimism/optimism/blob/71b93116738ee98c9f8713b1a5dfe626ce06c1b2/packages/contracts-bedrock/src/libraries/Predeploys.sol +/// @notice The original code was trimmed down to include only the necessary interface elements required to interact with GasPriceOracle +/// @notice We need this file so that Solidity compiler will not complain because some functions don't exist +/// @notice In reality, we don't embed this code into our own contracts, instead we make cross-contract calls on predeployed GasPriceOracle contract + +/// @title Predeploys +/// @notice Contains constant addresses for protocol contracts that are pre-deployed to the L2 system. +// This excludes the preinstalls (non-protocol contracts). +library Predeploys { + /// @notice Number of predeploy-namespace addresses reserved for protocol usage. + uint256 internal constant PREDEPLOY_COUNT = 2048; + + /// @custom:legacy + /// @notice Address of the LegacyMessagePasser predeploy. Deprecate. Use the updated + /// L2ToL1MessagePasser contract instead. + address internal constant LEGACY_MESSAGE_PASSER = 0x4200000000000000000000000000000000000000; + + /// @custom:legacy + /// @notice Address of the L1MessageSender predeploy. Deprecated. Use L2CrossDomainMessenger + /// or access tx.origin (or msg.sender) in a L1 to L2 transaction instead. + /// Not embedded into new OP-Stack chains. + address internal constant L1_MESSAGE_SENDER = 0x4200000000000000000000000000000000000001; + + /// @custom:legacy + /// @notice Address of the DeployerWhitelist predeploy. No longer active. + address internal constant DEPLOYER_WHITELIST = 0x4200000000000000000000000000000000000002; + + /// @notice Address of the canonical WETH contract. + address internal constant WETH = 0x4200000000000000000000000000000000000006; + + /// @notice Address of the L2CrossDomainMessenger predeploy. + address internal constant L2_CROSS_DOMAIN_MESSENGER = 0x4200000000000000000000000000000000000007; + + /// @notice Address of the GasPriceOracle predeploy. Includes fee information + /// and helpers for computing the L1 portion of the transaction fee. + address internal constant GAS_PRICE_ORACLE = 0x420000000000000000000000000000000000000F; + + /// @notice Address of the L2StandardBridge predeploy. + address internal constant L2_STANDARD_BRIDGE = 0x4200000000000000000000000000000000000010; + + //// @notice Address of the SequencerFeeWallet predeploy. + address internal constant SEQUENCER_FEE_WALLET = 0x4200000000000000000000000000000000000011; + + /// @notice Address of the OptimismMintableERC20Factory predeploy. + address internal constant OPTIMISM_MINTABLE_ERC20_FACTORY = 0x4200000000000000000000000000000000000012; + + /// @custom:legacy + /// @notice Address of the L1BlockNumber predeploy. Deprecated. Use the L1Block predeploy + /// instead, which exposes more information about the L1 state. + address internal constant L1_BLOCK_NUMBER = 0x4200000000000000000000000000000000000013; + + /// @notice Address of the L2ERC721Bridge predeploy. + address internal constant L2_ERC721_BRIDGE = 0x4200000000000000000000000000000000000014; + + /// @notice Address of the L1Block predeploy. + address internal constant L1_BLOCK_ATTRIBUTES = 0x4200000000000000000000000000000000000015; + + /// @notice Address of the L2ToL1MessagePasser predeploy. + address internal constant L2_TO_L1_MESSAGE_PASSER = 0x4200000000000000000000000000000000000016; + + /// @notice Address of the OptimismMintableERC721Factory predeploy. + address internal constant OPTIMISM_MINTABLE_ERC721_FACTORY = 0x4200000000000000000000000000000000000017; + + /// @notice Address of the ProxyAdmin predeploy. + address internal constant PROXY_ADMIN = 0x4200000000000000000000000000000000000018; + + /// @notice Address of the BaseFeeVault predeploy. + address internal constant BASE_FEE_VAULT = 0x4200000000000000000000000000000000000019; + + /// @notice Address of the L1FeeVault predeploy. + address internal constant L1_FEE_VAULT = 0x420000000000000000000000000000000000001A; + + /// @notice Address of the SchemaRegistry predeploy. + address internal constant SCHEMA_REGISTRY = 0x4200000000000000000000000000000000000020; + + /// @notice Address of the EAS predeploy. + address internal constant EAS = 0x4200000000000000000000000000000000000021; + + /// @notice Address of the GovernanceToken predeploy. + address internal constant GOVERNANCE_TOKEN = 0x4200000000000000000000000000000000000042; + + /// @custom:legacy + /// @notice Address of the LegacyERC20ETH predeploy. Deprecated. Balances are migrated to the + /// state trie as of the Bedrock upgrade. Contract has been locked and write functions + /// can no longer be accessed. + address internal constant LEGACY_ERC20_ETH = 0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000; + + /// @notice Address of the CrossL2Inbox predeploy. + address internal constant CROSS_L2_INBOX = 0x4200000000000000000000000000000000000022; + + /// @notice Address of the L2ToL2CrossDomainMessenger predeploy. + address internal constant L2_TO_L2_CROSS_DOMAIN_MESSENGER = 0x4200000000000000000000000000000000000023; + + /// @notice Returns the name of the predeploy at the given address. + function getName(address _addr) internal pure returns (string memory out_) { + require(isPredeployNamespace(_addr), "Predeploys: address must be a predeploy"); + if (_addr == LEGACY_MESSAGE_PASSER) return "LegacyMessagePasser"; + if (_addr == L1_MESSAGE_SENDER) return "L1MessageSender"; + if (_addr == DEPLOYER_WHITELIST) return "DeployerWhitelist"; + if (_addr == WETH) return "WETH"; + if (_addr == L2_CROSS_DOMAIN_MESSENGER) return "L2CrossDomainMessenger"; + if (_addr == GAS_PRICE_ORACLE) return "GasPriceOracle"; + if (_addr == L2_STANDARD_BRIDGE) return "L2StandardBridge"; + if (_addr == SEQUENCER_FEE_WALLET) return "SequencerFeeVault"; + if (_addr == OPTIMISM_MINTABLE_ERC20_FACTORY) return "OptimismMintableERC20Factory"; + if (_addr == L1_BLOCK_NUMBER) return "L1BlockNumber"; + if (_addr == L2_ERC721_BRIDGE) return "L2ERC721Bridge"; + if (_addr == L1_BLOCK_ATTRIBUTES) return "L1Block"; + if (_addr == L2_TO_L1_MESSAGE_PASSER) return "L2ToL1MessagePasser"; + if (_addr == OPTIMISM_MINTABLE_ERC721_FACTORY) return "OptimismMintableERC721Factory"; + if (_addr == PROXY_ADMIN) return "ProxyAdmin"; + if (_addr == BASE_FEE_VAULT) return "BaseFeeVault"; + if (_addr == L1_FEE_VAULT) return "L1FeeVault"; + if (_addr == SCHEMA_REGISTRY) return "SchemaRegistry"; + if (_addr == EAS) return "EAS"; + if (_addr == GOVERNANCE_TOKEN) return "GovernanceToken"; + if (_addr == LEGACY_ERC20_ETH) return "LegacyERC20ETH"; + if (_addr == CROSS_L2_INBOX) return "CrossL2Inbox"; + if (_addr == L2_TO_L2_CROSS_DOMAIN_MESSENGER) return "L2ToL2CrossDomainMessenger"; + revert("Predeploys: unnamed predeploy"); + } + + /// @notice Returns true if the predeploy is not proxied. + function notProxied(address _addr) internal pure returns (bool) { + return _addr == GOVERNANCE_TOKEN || _addr == WETH; + } + + /// @notice Returns true if the address is a defined predeploy that is embedded into new OP-Stack chains. + function isSupportedPredeploy(address _addr, bool _useInterop) internal pure returns (bool) { + return + _addr == LEGACY_MESSAGE_PASSER || + _addr == DEPLOYER_WHITELIST || + _addr == WETH || + _addr == L2_CROSS_DOMAIN_MESSENGER || + _addr == GAS_PRICE_ORACLE || + _addr == L2_STANDARD_BRIDGE || + _addr == SEQUENCER_FEE_WALLET || + _addr == OPTIMISM_MINTABLE_ERC20_FACTORY || + _addr == L1_BLOCK_NUMBER || + _addr == L2_ERC721_BRIDGE || + _addr == L1_BLOCK_ATTRIBUTES || + _addr == L2_TO_L1_MESSAGE_PASSER || + _addr == OPTIMISM_MINTABLE_ERC721_FACTORY || + _addr == PROXY_ADMIN || + _addr == BASE_FEE_VAULT || + _addr == L1_FEE_VAULT || + _addr == SCHEMA_REGISTRY || + _addr == EAS || + _addr == GOVERNANCE_TOKEN || + (_useInterop && _addr == CROSS_L2_INBOX) || + (_useInterop && _addr == L2_TO_L2_CROSS_DOMAIN_MESSENGER); + } + + function isPredeployNamespace(address _addr) internal pure returns (bool) { + return uint160(_addr) >> 11 == uint160(0x4200000000000000000000000000000000000000) >> 11; + } + + /// @notice Function to compute the expected address of the predeploy implementation + /// in the genesis state. + function predeployToCodeNamespace(address _addr) internal pure returns (address) { + require(isPredeployNamespace(_addr), "Predeploys: can only derive code-namespace address for predeploy addresses"); + return + address( + uint160((uint256(uint160(_addr)) & 0xffff) | uint256(uint160(0xc0D3C0d3C0d3C0D3c0d3C0d3c0D3C0d3c0d30000))) + ); + } +} diff --git a/contracts/src/v0.8/vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/libraries/Storage.sol b/contracts/src/v0.8/vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/libraries/Storage.sol new file mode 100644 index 00000000000..3da986bf104 --- /dev/null +++ b/contracts/src/v0.8/vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/libraries/Storage.sol @@ -0,0 +1,94 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +/// @notice: IMPORTANT NOTICE for anyone who wants to use this contract +/// @notice Source: https://github.com/ethereum-optimism/optimism/blob/71b93116738ee98c9f8713b1a5dfe626ce06c1b2/packages/contracts-bedrock/src/libraries/Storage.sol +/// @notice The original code was trimmed down to include only the necessary interface elements required to interact with GasPriceOracle +/// @notice We need this file so that Solidity compiler will not complain because some functions don't exist +/// @notice In reality, we don't embed this code into our own contracts, instead we make cross-contract calls on predeployed GasPriceOracle contract + +/// @title Storage +/// @notice Storage handles reading and writing to arbitary storage locations +library Storage { + /// @notice Returns an address stored in an arbitrary storage slot. + /// These storage slots decouple the storage layout from + /// solc's automation. + /// @param _slot The storage slot to retrieve the address from. + function getAddress(bytes32 _slot) internal view returns (address addr_) { + assembly { + addr_ := sload(_slot) + } + } + + /// @notice Stores an address in an arbitrary storage slot, `_slot`. + /// @param _slot The storage slot to store the address in. + /// @param _address The protocol version to store + /// @dev WARNING! This function must be used cautiously, as it allows for overwriting addresses + /// in arbitrary storage slots. + function setAddress(bytes32 _slot, address _address) internal { + assembly { + sstore(_slot, _address) + } + } + + /// @notice Returns a uint256 stored in an arbitrary storage slot. + /// These storage slots decouple the storage layout from + /// solc's automation. + /// @param _slot The storage slot to retrieve the address from. + function getUint(bytes32 _slot) internal view returns (uint256 value_) { + assembly { + value_ := sload(_slot) + } + } + + /// @notice Stores a value in an arbitrary storage slot, `_slot`. + /// @param _slot The storage slot to store the address in. + /// @param _value The protocol version to store + /// @dev WARNING! This function must be used cautiously, as it allows for overwriting values + /// in arbitrary storage slots. + function setUint(bytes32 _slot, uint256 _value) internal { + assembly { + sstore(_slot, _value) + } + } + + /// @notice Returns a bytes32 stored in an arbitrary storage slot. + /// These storage slots decouple the storage layout from + /// solc's automation. + /// @param _slot The storage slot to retrieve the address from. + function getBytes32(bytes32 _slot) internal view returns (bytes32 value_) { + assembly { + value_ := sload(_slot) + } + } + + /// @notice Stores a bytes32 value in an arbitrary storage slot, `_slot`. + /// @param _slot The storage slot to store the address in. + /// @param _value The bytes32 value to store. + /// @dev WARNING! This function must be used cautiously, as it allows for overwriting values + /// in arbitrary storage slots. + function setBytes32(bytes32 _slot, bytes32 _value) internal { + assembly { + sstore(_slot, _value) + } + } + + /// @notice Stores a bool value in an arbitrary storage slot, `_slot`. + /// @param _slot The storage slot to store the bool in. + /// @param _value The bool value to store + /// @dev WARNING! This function must be used cautiously, as it allows for overwriting values + /// in arbitrary storage slots. + function setBool(bytes32 _slot, bool _value) internal { + assembly { + sstore(_slot, _value) + } + } + + /// @notice Returns a bool stored in an arbitrary storage slot. + /// @param _slot The storage slot to retrieve the bool from. + function getBool(bytes32 _slot) internal view returns (bool value_) { + assembly { + value_ := sload(_slot) + } + } +} diff --git a/contracts/src/v0.8/vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/universal/ISemver.sol b/contracts/src/v0.8/vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/universal/ISemver.sol new file mode 100644 index 00000000000..d9f3cfd8f12 --- /dev/null +++ b/contracts/src/v0.8/vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/universal/ISemver.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +/// @notice: IMPORTANT NOTICE for anyone who wants to use this contract +/// @notice Source: https://github.com/ethereum-optimism/optimism/blob/71b93116738ee98c9f8713b1a5dfe626ce06c1b2/packages/contracts-bedrock/src/universal/ISemver.sol +/// @notice The original code was trimmed down to include only the necessary interface elements required to interact with GasPriceOracle +/// @notice We need this file so that Solidity compiler will not complain because some functions don't exist +/// @notice In reality, we don't embed this code into our own contracts, instead we make cross-contract calls on predeployed GasPriceOracle contract + +/// @title ISemver +/// @notice ISemver is a simple contract for ensuring that contracts are +/// versioned using semantic versioning. +interface ISemver { + /// @notice Getter for the semantic version of the contract. This is not + /// meant to be used onchain but instead meant to be used by offchain + /// tooling. + /// @return Semver contract version as a string. + function version() external view returns (string memory); +} diff --git a/contracts/src/v0.8/vrf/BatchVRFCoordinatorV2.sol b/contracts/src/v0.8/vrf/BatchVRFCoordinatorV2.sol index b9230f66ee9..bcea106e590 100644 --- a/contracts/src/v0.8/vrf/BatchVRFCoordinatorV2.sol +++ b/contracts/src/v0.8/vrf/BatchVRFCoordinatorV2.sol @@ -25,7 +25,7 @@ contract BatchVRFCoordinatorV2 { * @param proofs the randomness proofs generated by the VRF provider. * @param rcs the request commitments corresponding to the randomness proofs. */ - function fulfillRandomWords(VRFTypes.Proof[] memory proofs, VRFTypes.RequestCommitment[] memory rcs) external { + function fulfillRandomWords(VRFTypes.Proof[] calldata proofs, VRFTypes.RequestCommitment[] memory rcs) external { // solhint-disable-next-line gas-custom-errors require(proofs.length == rcs.length, "input array arg lengths mismatch"); for (uint256 i = 0; i < proofs.length; i++) { @@ -62,7 +62,7 @@ contract BatchVRFCoordinatorV2 { // solhint-disable-next-line interface-starts-with-i interface VRFCoordinatorV2 { function fulfillRandomWords( - VRFTypes.Proof memory proof, + VRFTypes.Proof calldata proof, VRFTypes.RequestCommitment memory rc ) external returns (uint96); } diff --git a/contracts/src/v0.8/vrf/VRF.sol b/contracts/src/v0.8/vrf/VRF.sol index efa7df44393..7f11569311c 100644 --- a/contracts/src/v0.8/vrf/VRF.sol +++ b/contracts/src/v0.8/vrf/VRF.sol @@ -570,7 +570,7 @@ contract VRF { * @return output i.e., the random output implied by the proof * *************************************************************************** */ - function _randomValueFromVRFProof(Proof memory proof, uint256 seed) internal view returns (uint256 output) { + function _randomValueFromVRFProof(Proof calldata proof, uint256 seed) internal view returns (uint256 output) { _verifyVRFProof( proof.pk, proof.gamma, diff --git a/contracts/src/v0.8/vrf/VRFCoordinatorV2.sol b/contracts/src/v0.8/vrf/VRFCoordinatorV2.sol index f3e569f58d2..717826a3b95 100644 --- a/contracts/src/v0.8/vrf/VRFCoordinatorV2.sol +++ b/contracts/src/v0.8/vrf/VRFCoordinatorV2.sol @@ -459,7 +459,7 @@ contract VRFCoordinatorV2 is VRF, ConfirmedOwner, TypeAndVersionInterface, VRFCo } function _getRandomnessFromProof( - Proof memory proof, + Proof calldata proof, RequestCommitment memory rc ) private view returns (bytes32 keyHash, uint256 requestId, uint256 randomness) { keyHash = hashOfKey(proof.pk); @@ -522,7 +522,10 @@ contract VRFCoordinatorV2 is VRF, ConfirmedOwner, TypeAndVersionInterface, VRFCo * @return payment amount billed to the subscription * @dev simulated offchain to determine if sufficient balance is present to fulfill the request */ - function fulfillRandomWords(Proof memory proof, RequestCommitment memory rc) external nonReentrant returns (uint96) { + function fulfillRandomWords( + Proof calldata proof, + RequestCommitment memory rc + ) external nonReentrant returns (uint96) { uint256 startGas = gasleft(); (bytes32 keyHash, uint256 requestId, uint256 randomness) = _getRandomnessFromProof(proof, rc); diff --git a/contracts/src/v0.8/vrf/VRFOwner.sol b/contracts/src/v0.8/vrf/VRFOwner.sol index 366b85c4104..6b6b22b6db7 100644 --- a/contracts/src/v0.8/vrf/VRFOwner.sol +++ b/contracts/src/v0.8/vrf/VRFOwner.sol @@ -91,7 +91,7 @@ interface IVRFCoordinatorV2 { function hashOfKey(uint256[2] memory publicKey) external pure returns (bytes32); function fulfillRandomWords( - VRFTypes.Proof memory proof, + VRFTypes.Proof calldata proof, VRFTypes.RequestCommitment memory rc ) external returns (uint96); } @@ -281,7 +281,7 @@ contract VRFOwner is ConfirmedOwner, AuthorizedReceiver { * @param rc request commitment pre-image, committed to at request time */ function fulfillRandomWords( - VRFTypes.Proof memory proof, + VRFTypes.Proof calldata proof, VRFTypes.RequestCommitment memory rc ) external validateAuthorizedSender { uint256 requestId = _requestIdFromProof(proof.pk, proof.seed); diff --git a/contracts/src/v0.8/vrf/dev/ArbitrumL1Fees.sol b/contracts/src/v0.8/vrf/dev/ArbitrumL1Fees.sol new file mode 100644 index 00000000000..e03736d667c --- /dev/null +++ b/contracts/src/v0.8/vrf/dev/ArbitrumL1Fees.sol @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import {ArbGasInfo} from "../../vendor/@arbitrum/nitro-contracts/src/precompiles/ArbGasInfo.sol"; + +/// @dev An abstract contract that provides Arbitrum specific L1 fee calculations. +// solhint-disable-next-line contract-name-camelcase +abstract contract ArbitrumL1Fees { + /// @dev ARBGAS_ADDR is the address of the ArbGasInfo precompile on Arbitrum. + /// @dev reference: https://github.com/OffchainLabs/nitro/blob/v2.0.14/contracts/src/precompiles/ArbGasInfo.sol#L10 + address private constant ARBGAS_ADDR = address(0x000000000000000000000000000000000000006C); + ArbGasInfo private constant ARBGAS = ArbGasInfo(ARBGAS_ADDR); + + /** + * @notice Returns the L1 fees that will be paid for the current transaction, given any calldata + * @notice for the current transaction. It uses ArbGas.getCurrentTxL1GasFees to get the fees. + */ + function _getL1CostWeiForCalldata() internal view returns (uint256) { + return ARBGAS.getCurrentTxL1GasFees(); + } + + /** + * @notice Returns the gas cost in wei of calldataSizeBytes of calldata being posted to L1 + */ + function _getL1CostWeiForCalldataSize(uint256 calldataSizeBytes) internal view returns (uint256) { + (, uint256 l1PricePerByte, , , , ) = ARBGAS.getPricesInWei(); + // see https://developer.arbitrum.io/devs-how-tos/how-to-estimate-gas#where-do-we-get-all-this-information-from + // for the justification behind the 140 number. + return l1PricePerByte * (calldataSizeBytes + 140); + } +} diff --git a/contracts/src/v0.8/vrf/dev/BatchVRFCoordinatorV2Plus.sol b/contracts/src/v0.8/vrf/dev/BatchVRFCoordinatorV2Plus.sol index b626aeb6189..69e0c2af555 100644 --- a/contracts/src/v0.8/vrf/dev/BatchVRFCoordinatorV2Plus.sol +++ b/contracts/src/v0.8/vrf/dev/BatchVRFCoordinatorV2Plus.sol @@ -25,7 +25,10 @@ contract BatchVRFCoordinatorV2Plus { * @param proofs the randomness proofs generated by the VRF provider. * @param rcs the request commitments corresponding to the randomness proofs. */ - function fulfillRandomWords(VRFTypes.Proof[] memory proofs, VRFTypes.RequestCommitmentV2Plus[] memory rcs) external { + function fulfillRandomWords( + VRFTypes.Proof[] calldata proofs, + VRFTypes.RequestCommitmentV2Plus[] calldata rcs + ) external { // solhint-disable-next-line gas-custom-errors require(proofs.length == rcs.length, "input array arg lengths mismatch"); for (uint256 i = 0; i < proofs.length; ++i) { @@ -61,8 +64,8 @@ contract BatchVRFCoordinatorV2Plus { interface IVRFCoordinatorV2PlusFulfill { function fulfillRandomWords( - VRFTypes.Proof memory proof, - VRFTypes.RequestCommitmentV2Plus memory rc, + VRFTypes.Proof calldata proof, + VRFTypes.RequestCommitmentV2Plus calldata rc, bool onlyPremium ) external returns (uint96); } diff --git a/contracts/src/v0.8/vrf/dev/OptimismL1Fees.sol b/contracts/src/v0.8/vrf/dev/OptimismL1Fees.sol new file mode 100644 index 00000000000..999e18134bb --- /dev/null +++ b/contracts/src/v0.8/vrf/dev/OptimismL1Fees.sol @@ -0,0 +1,97 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import {ConfirmedOwner} from "../../shared/access/ConfirmedOwner.sol"; +import {GasPriceOracle as OVM_GasPriceOracle} from "../../vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/L2/GasPriceOracle.sol"; + +/// @dev An abstract contract that provides Optimism specific L1 fee calculations. +// solhint-disable-next-line contract-name-camelcase +abstract contract OptimismL1Fees is ConfirmedOwner { + /// @dev This is the padding size for unsigned RLP-encoded transaction without the signature data + /// @dev The padding size was estimated based on hypothetical max RLP-encoded transaction size + uint256 internal constant L1_UNSIGNED_RLP_ENC_TX_DATA_BYTES_SIZE = 71; + /// @dev Signature data size used in the GasPriceOracle predeploy + /// @dev reference: https://github.com/ethereum-optimism/optimism/blob/a96cbe7c8da144d79d4cec1303d8ae60a64e681e/packages/contracts-bedrock/contracts/L2/GasPriceOracle.sol#L145 + uint256 internal constant L1_TX_SIGNATURE_DATA_BYTES_SIZE = 68; + /// @dev L1_FEE_DATA_PADDING includes 71 bytes for L1 data padding for Optimism + bytes internal constant L1_FEE_DATA_PADDING = + hex"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"; + /// @dev OVM_GASPRICEORACLE_ADDR is the address of the OVM_GasPriceOracle precompile on Optimism. + /// @dev reference: https://community.optimism.io/docs/developers/build/transaction-fees/#estimating-the-l1-data-fee + address private constant OVM_GASPRICEORACLE_ADDR = address(0x420000000000000000000000000000000000000F); + OVM_GasPriceOracle private constant OVM_GASPRICEORACLE = OVM_GasPriceOracle(OVM_GASPRICEORACLE_ADDR); + + /// @dev Option 1: getL1Fee() function from predeploy GasPriceOracle contract with the fulfillment calldata payload + /// @dev This option is only available for the Coordinator contract + uint8 internal constant L1_GAS_FEES_MODE = 0; + /// @dev Option 2: our own implementation of getL1Fee() function (Ecotone version) with projected + /// @dev fulfillment calldata payload (number of non-zero bytes estimated based on historical data) + /// @dev This option is available for the Coordinator and the Wrapper contract + uint8 internal constant L1_CALLDATA_GAS_COST_MODE = 1; + /// @dev Option 3: getL1FeeUpperBound() function from predeploy GasPriceOracle contract (available after Fjord upgrade) + /// @dev This option is available for the Coordinator and the Wrapper contract + uint8 internal constant L1_GAS_FEES_UPPER_BOUND_MODE = 2; + + uint8 public s_l1FeeCalculationMode = L1_GAS_FEES_MODE; + + /// @dev L1 fee coefficient can be applied to options 2 or 3 to reduce possibly inflated gas price + uint8 public s_l1FeeCoefficient = 100; + + error InvalidL1FeeCalculationMode(uint8 mode); + error InvalidL1FeeCoefficient(uint8 coefficient); + + event L1FeeCalculationSet(uint8 mode, uint8 coefficient); + + function setL1FeeCalculation(uint8 mode, uint8 coefficient) external virtual onlyOwner { + _setL1FeeCalculationInternal(mode, coefficient); + } + + function _setL1FeeCalculationInternal(uint8 mode, uint8 coefficient) internal { + if (mode >= 3) { + revert InvalidL1FeeCalculationMode(mode); + } + if (coefficient == 0 || coefficient > 100) { + revert InvalidL1FeeCoefficient(coefficient); + } + + s_l1FeeCalculationMode = mode; + s_l1FeeCoefficient = coefficient; + + emit L1FeeCalculationSet(mode, coefficient); + } + + function _getL1CostWeiForCalldata(bytes calldata data) internal view returns (uint256) { + if (s_l1FeeCalculationMode == L1_GAS_FEES_MODE) { + return OVM_GASPRICEORACLE.getL1Fee(bytes.concat(data, L1_FEE_DATA_PADDING)); + } + return _getL1CostWeiForCalldataSize(data.length); + } + + function _getL1CostWeiForCalldataSize(uint256 calldataSizeBytes) internal view returns (uint256) { + uint8 l1FeeCalculationMode = s_l1FeeCalculationMode; + if (l1FeeCalculationMode == L1_CALLDATA_GAS_COST_MODE) { + // estimate based on unsigned fully RLP-encoded transaction size so we have to account for paddding bytes as well + return + (s_l1FeeCoefficient * _calculateOptimismL1DataFee(calldataSizeBytes + L1_UNSIGNED_RLP_ENC_TX_DATA_BYTES_SIZE)) / + 100; + } else if (l1FeeCalculationMode == L1_GAS_FEES_UPPER_BOUND_MODE) { + // getL1FeeUpperBound expects unsigned fully RLP-encoded transaction size so we have to account for paddding bytes as well + return + (s_l1FeeCoefficient * + OVM_GASPRICEORACLE.getL1FeeUpperBound(calldataSizeBytes + L1_UNSIGNED_RLP_ENC_TX_DATA_BYTES_SIZE)) / 100; + } + revert InvalidL1FeeCalculationMode(l1FeeCalculationMode); + } + + function _calculateOptimismL1DataFee(uint256 calldataSizeBytes) internal view returns (uint256) { + // reference: https://docs.optimism.io/stack/transactions/fees#ecotone + // also: https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/exec-engine.md#ecotone-l1-cost-fee-changes-eip-4844-da + // we treat all bytes in the calldata payload as non-zero bytes (cost: 16 gas) because accurate estimation is too expensive + // we also have to account for the signature data size + uint256 l1GasUsed = (calldataSizeBytes + L1_TX_SIGNATURE_DATA_BYTES_SIZE) * 16; + uint256 scaledBaseFee = OVM_GASPRICEORACLE.baseFeeScalar() * 16 * OVM_GASPRICEORACLE.l1BaseFee(); + uint256 scaledBlobBaseFee = OVM_GASPRICEORACLE.blobBaseFeeScalar() * OVM_GASPRICEORACLE.blobBaseFee(); + uint256 fee = l1GasUsed * (scaledBaseFee + scaledBlobBaseFee); + return fee / (16 * 10 ** OVM_GASPRICEORACLE.decimals()); + } +} diff --git a/contracts/src/v0.8/vrf/dev/SubscriptionAPI.sol b/contracts/src/v0.8/vrf/dev/SubscriptionAPI.sol index e2ed900c049..7614d7dc718 100644 --- a/contracts/src/v0.8/vrf/dev/SubscriptionAPI.sol +++ b/contracts/src/v0.8/vrf/dev/SubscriptionAPI.sol @@ -148,6 +148,17 @@ abstract contract SubscriptionAPI is ConfirmedOwner, IERC677Receiver, IVRFSubscr } } + function _requireSufficientBalance(bool condition) internal pure { + if (!condition) { + revert InsufficientBalance(); + } + } + + function _requireValidSubscription(address subOwner) internal pure { + if (subOwner == address(0)) { + revert InvalidSubscription(); + } + } constructor() ConfirmedOwner(msg.sender) {} /** @@ -172,9 +183,7 @@ abstract contract SubscriptionAPI is ConfirmedOwner, IERC677Receiver, IVRFSubscr */ function ownerCancelSubscription(uint256 subId) external onlyOwner { address subOwner = s_subscriptionConfigs[subId].owner; - if (subOwner == address(0)) { - revert InvalidSubscription(); - } + _requireValidSubscription(subOwner); _cancelSubscriptionHelper(subId, subOwner); } @@ -236,15 +245,11 @@ abstract contract SubscriptionAPI is ConfirmedOwner, IERC677Receiver, IVRFSubscr if (address(LINK) == address(0)) { revert LinkNotSet(); } - if (s_withdrawableTokens == 0) { - revert InsufficientBalance(); - } uint96 amount = s_withdrawableTokens; - s_withdrawableTokens -= amount; + _requireSufficientBalance(amount > 0); + s_withdrawableTokens = 0; s_totalBalance -= amount; - if (!LINK.transfer(recipient, amount)) { - revert InsufficientBalance(); - } + _requireSufficientBalance(LINK.transfer(recipient, amount)); } /* @@ -253,17 +258,12 @@ abstract contract SubscriptionAPI is ConfirmedOwner, IERC677Receiver, IVRFSubscr * @param amount amount to withdraw */ function withdrawNative(address payable recipient) external nonReentrant onlyOwner { - if (s_withdrawableNative == 0) { - revert InsufficientBalance(); - } - // Prevent re-entrancy by updating state before transfer. uint96 amount = s_withdrawableNative; - s_withdrawableNative -= amount; + _requireSufficientBalance(amount > 0); + // Prevent re-entrancy by updating state before transfer. + s_withdrawableNative = 0; s_totalNativeBalance -= amount; - (bool sent, ) = recipient.call{value: amount}(""); - if (!sent) { - revert FailedToSendNative(); - } + _mustSendNative(recipient, amount); } function onTokenTransfer(address /* sender */, uint256 amount, bytes calldata data) external override nonReentrant { @@ -274,9 +274,7 @@ abstract contract SubscriptionAPI is ConfirmedOwner, IERC677Receiver, IVRFSubscr revert InvalidCalldata(); } uint256 subId = abi.decode(data, (uint256)); - if (s_subscriptionConfigs[subId].owner == address(0)) { - revert InvalidSubscription(); - } + _requireValidSubscription(s_subscriptionConfigs[subId].owner); // We do not check that the sender is the subscription owner, // anyone can fund a subscription. uint256 oldBalance = s_subscriptions[subId].balance; @@ -289,9 +287,7 @@ abstract contract SubscriptionAPI is ConfirmedOwner, IERC677Receiver, IVRFSubscr * @inheritdoc IVRFSubscriptionV2Plus */ function fundSubscriptionWithNative(uint256 subId) external payable override nonReentrant { - if (s_subscriptionConfigs[subId].owner == address(0)) { - revert InvalidSubscription(); - } + _requireValidSubscription(s_subscriptionConfigs[subId].owner); // We do not check that the msg.sender is the subscription owner, // anyone can fund a subscription. // We also do not check that msg.value > 0, since that's just a no-op @@ -314,9 +310,7 @@ abstract contract SubscriptionAPI is ConfirmedOwner, IERC677Receiver, IVRFSubscr returns (uint96 balance, uint96 nativeBalance, uint64 reqCount, address subOwner, address[] memory consumers) { subOwner = s_subscriptionConfigs[subId].owner; - if (subOwner == address(0)) { - revert InvalidSubscription(); - } + _requireValidSubscription(subOwner); return ( s_subscriptions[subId].balance, s_subscriptions[subId].nativeBalance, @@ -391,9 +385,7 @@ abstract contract SubscriptionAPI is ConfirmedOwner, IERC677Receiver, IVRFSubscr */ function acceptSubscriptionOwnerTransfer(uint256 subId) external override nonReentrant { address oldOwner = s_subscriptionConfigs[subId].owner; - if (oldOwner == address(0)) { - revert InvalidSubscription(); - } + _requireValidSubscription(oldOwner); if (s_subscriptionConfigs[subId].requestedOwner != msg.sender) { revert MustBeRequestedOwner(s_subscriptionConfigs[subId].requestedOwner); } @@ -453,16 +445,11 @@ abstract contract SubscriptionAPI is ConfirmedOwner, IERC677Receiver, IVRFSubscr // Only withdraw LINK if the token is active and there is a balance. if (address(LINK) != address(0) && balance != 0) { - if (!LINK.transfer(to, uint256(balance))) { - revert InsufficientBalance(); - } + _requireSufficientBalance(LINK.transfer(to, uint256(balance))); } // send native to the "to" address using call - (bool success, ) = to.call{value: uint256(nativeBalance)}(""); - if (!success) { - revert FailedToSendNative(); - } + _mustSendNative(to, uint256(nativeBalance)); emit SubscriptionCanceled(subId, to, balance, nativeBalance); } @@ -473,11 +460,16 @@ abstract contract SubscriptionAPI is ConfirmedOwner, IERC677Receiver, IVRFSubscr function _onlySubOwner(uint256 subId) internal view { address subOwner = s_subscriptionConfigs[subId].owner; - if (subOwner == address(0)) { - revert InvalidSubscription(); - } + _requireValidSubscription(subOwner); if (msg.sender != subOwner) { revert MustBeSubOwner(subOwner); } } + + function _mustSendNative(address to, uint256 amount) internal { + (bool success, ) = to.call{value: amount}(""); + if (!success) { + revert FailedToSendNative(); + } + } } diff --git a/contracts/src/v0.8/vrf/dev/VRFCoordinatorV2_5.sol b/contracts/src/v0.8/vrf/dev/VRFCoordinatorV2_5.sol index bde8267e30f..53d19c1279b 100644 --- a/contracts/src/v0.8/vrf/dev/VRFCoordinatorV2_5.sol +++ b/contracts/src/v0.8/vrf/dev/VRFCoordinatorV2_5.sol @@ -5,7 +5,6 @@ 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"; import {VRFV2PlusClient} from "./libraries/VRFV2PlusClient.sol"; import {IVRFCoordinatorV2PlusMigration} from "./interfaces/IVRFCoordinatorV2PlusMigration.sol"; @@ -76,6 +75,8 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { bool onlyPremium ); + event L1GasFee(uint256 fee); + int256 public s_fallbackWeiPerUnitLink; event ConfigSet( @@ -137,7 +138,7 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { * @notice Returns the proving key hash key associated with this public key * @param publicKey the key to return the hash of */ - function hashOfKey(uint256[2] memory publicKey) public pure returns (bytes32) { + function hashOfKey(uint256[2] calldata publicKey) public pure returns (bytes32) { return keccak256(abi.encode(publicKey)); } @@ -250,9 +251,7 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { ) external override nonReentrant returns (uint256 requestId) { // Input validation using the subscription storage. uint256 subId = req.subId; - if (s_subscriptionConfigs[subId].owner == address(0)) { - revert InvalidSubscription(); - } + _requireValidSubscription(s_subscriptionConfigs[subId].owner); // Its important to ensure that the consumer is in fact who they say they // are, otherwise they could use someone else's subscription balance. mapping(uint256 => ConsumerConfig) storage consumerConfigs = s_consumers[msg.sender]; @@ -291,15 +290,7 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { bytes memory extraArgsBytes = VRFV2PlusClient._argsToBytes(_fromBytes(req.extraArgs)); s_requestCommitments[requestId] = keccak256( - abi.encode( - requestId, - ChainSpecificUtil._getBlockNumber(), - subId, - req.callbackGasLimit, - req.numWords, - msg.sender, - extraArgsBytes - ) + abi.encode(requestId, _getBlockNumber(), subId, req.callbackGasLimit, req.numWords, msg.sender, extraArgsBytes) ); emit RandomWordsRequested( req.keyHash, @@ -367,8 +358,8 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { } function _getRandomnessFromProof( - Proof memory proof, - VRFTypes.RequestCommitmentV2Plus memory rc + Proof calldata proof, + VRFTypes.RequestCommitmentV2Plus calldata rc ) internal view returns (Output memory) { bytes32 keyHash = hashOfKey(proof.pk); ProvingKey memory key = s_provingKeys[keyHash]; @@ -388,7 +379,7 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { revert IncorrectCommitment(); } - bytes32 blockHash = ChainSpecificUtil._getBlockhash(rc.blockNum); + bytes32 blockHash = _getBlockhash(rc.blockNum); if (blockHash == bytes32(0)) { blockHash = BLOCKHASH_STORE.getBlockhash(rc.blockNum); if (blockHash == bytes32(0)) { @@ -417,7 +408,7 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { function _deliverRandomness( uint256 requestId, - VRFTypes.RequestCommitmentV2Plus memory rc, + VRFTypes.RequestCommitmentV2Plus calldata rc, uint256[] memory randomWords ) internal returns (bool success) { VRFConsumerBaseV2Plus v; @@ -443,8 +434,8 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { * @dev simulated offchain to determine if sufficient balance is present to fulfill the request */ function fulfillRandomWords( - Proof memory proof, - VRFTypes.RequestCommitmentV2Plus memory rc, + Proof calldata proof, + VRFTypes.RequestCommitmentV2Plus calldata rc, bool onlyPremium ) external nonReentrant returns (uint96 payment) { uint256 startGas = gasleft(); @@ -524,16 +515,12 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { Subscription storage subcription = s_subscriptions[subId]; if (nativePayment) { uint96 prevBal = subcription.nativeBalance; - if (prevBal < payment) { - revert InsufficientBalance(); - } + _requireSufficientBalance(prevBal >= payment); subcription.nativeBalance = prevBal - payment; s_withdrawableNative += payment; } else { uint96 prevBal = subcription.balance; - if (prevBal < payment) { - revert InsufficientBalance(); - } + _requireSufficientBalance(prevBal >= payment); subcription.balance = prevBal - payment; s_withdrawableTokens += payment; } @@ -544,7 +531,7 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { uint256 weiPerUnitGas, bool nativePayment, bool onlyPremium - ) internal view returns (uint96, bool) { + ) internal returns (uint96, bool) { if (nativePayment) { return (_calculatePaymentAmountNative(startGas, weiPerUnitGas, onlyPremium), false); } @@ -555,13 +542,17 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { uint256 startGas, uint256 weiPerUnitGas, bool onlyPremium - ) internal view returns (uint96) { + ) internal returns (uint96) { // Will return non-zero on chains that have this enabled - uint256 l1CostWei = ChainSpecificUtil._getCurrentTxL1GasFees(msg.data); + uint256 l1CostWei = _getL1CostWei(msg.data); // calculate the payment without the premium uint256 baseFeeWei = weiPerUnitGas * (s_config.gasAfterPaymentCalculation + startGas - gasleft()); // calculate flat fee in native uint256 flatFeeWei = 1e12 * uint256(s_config.fulfillmentFlatFeeNativePPM); + // emit this event only if this is an L2 chain that needs to cover for L1 gas fees + if (l1CostWei > 0) { + emit L1GasFee(l1CostWei); + } if (onlyPremium) { return uint96((((l1CostWei + baseFeeWei) * (s_config.nativePremiumPercentage)) / 100) + flatFeeWei); } else { @@ -574,13 +565,13 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { uint256 startGas, uint256 weiPerUnitGas, bool onlyPremium - ) internal view returns (uint96, bool) { + ) internal returns (uint96, bool) { (int256 weiPerUnitLink, bool isFeedStale) = _getFeedData(); if (weiPerUnitLink <= 0) { revert InvalidLinkWeiPrice(weiPerUnitLink); } // Will return non-zero on chains that have this enabled - uint256 l1CostWei = ChainSpecificUtil._getCurrentTxL1GasFees(msg.data); + uint256 l1CostWei = _getL1CostWei(msg.data); // (1e18 juels/link) ((wei/gas * gas) + l1wei) / (wei/link) = juels uint256 paymentNoFee = (1e18 * (weiPerUnitGas * (s_config.gasAfterPaymentCalculation + startGas - gasleft()) + l1CostWei)) / @@ -589,6 +580,10 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { uint256 flatFeeWei = 1e12 * uint256(s_config.fulfillmentFlatFeeNativePPM - s_config.fulfillmentFlatFeeLinkDiscountPPM); uint256 flatFeeJuels = (1e18 * flatFeeWei) / uint256(weiPerUnitLink); + // emit this event only if this is an L2 chain that needs to cover for L1 gas fees + if (l1CostWei > 0) { + emit L1GasFee(l1CostWei); + } uint256 payment; if (onlyPremium) { payment = ((paymentNoFee * (s_config.linkPremiumPercentage)) / 100 + flatFeeJuels); @@ -613,15 +608,37 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { return (weiPerUnitLink, isFeedStale); } + /** + * @notice Returns the block number of the current block by using specific opcode. + * @notice Override this function in chain specific way if needed (L2 chains). + */ + function _getBlockNumber() internal view virtual returns (uint256) { + return block.number; + } + + /** + * @notice Returns the blockhash for the given blockNumber by using specific opcode. + * @notice If the blockNumber is more than 256 blocks in the past, returns the empty string. + * @notice Override this function in chain specific way if needed (L2 chains). + */ + function _getBlockhash(uint64 blockNumber) internal view virtual returns (bytes32) { + return blockhash(blockNumber); + } + + /** + * @notice Returns the L1 fee for the calldata payload (always return 0 on L1 chains). + * @notice Override this function in chain specific way for L2 chains. + */ + function _getL1CostWei(bytes calldata /* data */) internal view virtual returns (uint256) { + return 0; + } + /** * @inheritdoc IVRFSubscriptionV2Plus */ function pendingRequestExists(uint256 subId) public view override returns (bool) { address[] storage consumers = s_subscriptionConfigs[subId].consumers; uint256 consumersLength = consumers.length; - if (consumersLength == 0) { - return false; - } for (uint256 i = 0; i < consumersLength; ++i) { if (s_consumers[consumers[i]][subId].pendingReqCount > 0) { return true; @@ -641,15 +658,14 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { revert InvalidConsumer(subId, consumer); } // Note bounded by MAX_CONSUMERS - address[] memory consumers = s_subscriptionConfigs[subId].consumers; - uint256 lastConsumerIndex = consumers.length - 1; - for (uint256 i = 0; i < consumers.length; ++i) { - if (consumers[i] == consumer) { - address last = consumers[lastConsumerIndex]; + address[] storage s_subscriptionConsumers = s_subscriptionConfigs[subId].consumers; + uint256 consumersLength = s_subscriptionConsumers.length; + for (uint256 i = 0; i < consumersLength; ++i) { + if (s_subscriptionConsumers[i] == consumer) { // Storage write to preserve last element - s_subscriptionConfigs[subId].consumers[i] = last; + s_subscriptionConsumers[i] = s_subscriptionConsumers[consumersLength - 1]; // Storage remove last element - s_subscriptionConfigs[subId].consumers.pop(); + s_subscriptionConsumers.pop(); break; } } @@ -737,10 +753,12 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { revert CoordinatorNotRegistered(newCoordinator); } (uint96 balance, uint96 nativeBalance, , address subOwner, address[] memory consumers) = getSubscription(subId); - // solhint-disable-next-line gas-custom-errors - require(subOwner == msg.sender, "Not subscription owner"); - // solhint-disable-next-line gas-custom-errors - require(!pendingRequestExists(subId), "Pending request exists"); + if (subOwner != msg.sender) { + revert MustBeSubOwner(subOwner); + } + if (pendingRequestExists(subId)) { + revert PendingRequestExists(); + } V1MigrationData memory migrationData = V1MigrationData({ fromVersion: 1, @@ -756,14 +774,14 @@ contract VRFCoordinatorV2_5 is VRF, SubscriptionAPI, IVRFCoordinatorV2Plus { // Only transfer LINK if the token is active and there is a balance. if (address(LINK) != address(0) && balance != 0) { - // solhint-disable-next-line gas-custom-errors - require(LINK.transfer(address(newCoordinator), balance), "insufficient funds"); + _requireSufficientBalance(LINK.transfer(address(newCoordinator), balance)); } // despite the fact that we follow best practices this is still probably safest // to prevent any re-entrancy possibilities. s_config.reentrancyLock = true; - for (uint256 i = 0; i < consumers.length; ++i) { + uint256 consumersLength = consumers.length; + for (uint256 i = 0; i < consumersLength; ++i) { IVRFMigratableConsumerV2Plus(consumers[i]).setCoordinator(newCoordinator); } s_config.reentrancyLock = false; diff --git a/contracts/src/v0.8/vrf/dev/VRFCoordinatorV2_5_Arbitrum.sol b/contracts/src/v0.8/vrf/dev/VRFCoordinatorV2_5_Arbitrum.sol new file mode 100644 index 00000000000..9b2357cbb74 --- /dev/null +++ b/contracts/src/v0.8/vrf/dev/VRFCoordinatorV2_5_Arbitrum.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import {ArbSys} from "../../vendor/@arbitrum/nitro-contracts/src/precompiles/ArbSys.sol"; +import {VRFCoordinatorV2_5} from "./VRFCoordinatorV2_5.sol"; +import {ArbitrumL1Fees} from "./ArbitrumL1Fees.sol"; + +/// @dev VRFCoordinatorV2_5_Arbitrum combines VRFCoordinatorV2_5 base contract with +/// @dev Arbitrum specific opcodes and L1 gas fee calculations. +// solhint-disable-next-line contract-name-camelcase +contract VRFCoordinatorV2_5_Arbitrum is VRFCoordinatorV2_5, ArbitrumL1Fees { + /// @dev ARBSYS_ADDR is the address of the ArbSys precompile on Arbitrum. + /// @dev reference: https://github.com/OffchainLabs/nitro/blob/v2.0.14/contracts/src/precompiles/ArbSys.sol#L10 + address private constant ARBSYS_ADDR = address(0x0000000000000000000000000000000000000064); + ArbSys private constant ARBSYS = ArbSys(ARBSYS_ADDR); + + constructor(address blockhashStore) VRFCoordinatorV2_5(blockhashStore) {} + + /** + * @notice Override getBlockhash from VRFCoordinatorV2_5 + * @notice When on a known Arbitrum chain, it uses ArbSys.arbBlockHash to get the blockhash. + */ + function _getBlockhash(uint64 blockNumber) internal view override returns (bytes32) { + uint64 currentBlockNumber = uint64(_getBlockNumber()); + if (blockNumber >= currentBlockNumber || (currentBlockNumber - blockNumber) > 256) { + return ""; + } + return ARBSYS.arbBlockHash(blockNumber); + } + + /** + * @notice Override getBlockNumber from VRFCoordinatorV2_5 + * @notice When on a known Arbitrum chain, it uses ArbSys.arbBlockNumber to get the block number. + */ + function _getBlockNumber() internal view override returns (uint256) { + return ARBSYS.arbBlockNumber(); + } + + /// @notice Override getL1CostWei function from VRFCoordinatorV2_5 to activate Arbitrum getL1Fee computation + function _getL1CostWei(bytes calldata /* data */) internal view override returns (uint256) { + return _getL1CostWeiForCalldata(); + } +} diff --git a/contracts/src/v0.8/vrf/dev/VRFCoordinatorV2_5_Optimism.sol b/contracts/src/v0.8/vrf/dev/VRFCoordinatorV2_5_Optimism.sol new file mode 100644 index 00000000000..ce5abbe632b --- /dev/null +++ b/contracts/src/v0.8/vrf/dev/VRFCoordinatorV2_5_Optimism.sol @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import {VRFCoordinatorV2_5} from "./VRFCoordinatorV2_5.sol"; +import {OptimismL1Fees} from "./OptimismL1Fees.sol"; + +/// @dev VRFCoordinatorV2_5_Optimism combines VRFCoordinatorV2_5 base contract with +/// @dev Optimism specific opcodes and L1 gas fee calculations. +/// @dev This coordinator contract is used for all chains in the OP stack (e.g. Base). +// solhint-disable-next-line contract-name-camelcase +contract VRFCoordinatorV2_5_Optimism is VRFCoordinatorV2_5, OptimismL1Fees { + constructor(address blockhashStore) VRFCoordinatorV2_5(blockhashStore) {} + + /// @notice no need to override getBlockhash and getBlockNumber from VRFCoordinatorV2_5 + /// @notice on OP stack, they will work with the default implementation + + /// @notice Override getL1CostWei function from VRFCoordinatorV2_5 to activate Optimism getL1Fee computation + function _getL1CostWei(bytes calldata data) internal view override returns (uint256) { + return _getL1CostWeiForCalldata(data); + } +} diff --git a/contracts/src/v0.8/vrf/dev/VRFV2PlusWrapper.sol b/contracts/src/v0.8/vrf/dev/VRFV2PlusWrapper.sol index 1d741280851..40fd8a90612 100644 --- a/contracts/src/v0.8/vrf/dev/VRFV2PlusWrapper.sol +++ b/contracts/src/v0.8/vrf/dev/VRFV2PlusWrapper.sol @@ -9,7 +9,6 @@ import {AggregatorV3Interface} from "../../shared/interfaces/AggregatorV3Interfa import {VRFV2PlusClient} from "./libraries/VRFV2PlusClient.sol"; import {IVRFV2PlusWrapper} from "./interfaces/IVRFV2PlusWrapper.sol"; import {VRFV2PlusWrapperConsumerBase} from "./VRFV2PlusWrapperConsumerBase.sol"; -import {ChainSpecificUtil} from "../../ChainSpecificUtil.sol"; /** * @notice A wrapper for VRFCoordinatorV2 that provides an interface better suited to one-off @@ -106,15 +105,16 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume // function. The cost for this gas is passed to the user. uint32 private s_wrapperGasOverhead; - // Configuration fetched from VRFCoordinatorV2 + // Configuration fetched from VRFCoordinatorV2_5 - /// @dev this is the size of a VRF v2 fulfillment's calldata abi-encoded in bytes. + /// @dev this is the size of a VRF v2plus fulfillment's calldata abi-encoded in bytes. /// @dev proofSize = 13 words = 13 * 256 = 3328 bits - /// @dev commitmentSize = 5 words = 5 * 256 = 1280 bits - /// @dev dataSize = proofSize + commitmentSize = 4608 bits - /// @dev selector = 32 bits - /// @dev total data size = 4608 bits + 32 bits = 4640 bits = 580 bytes - uint32 public s_fulfillmentTxSizeBytes = 580; + /// @dev commitmentSize = 10 words = 10 * 256 = 2560 bits + /// @dev onlyPremiumParameterSize = 256 bits + /// @dev dataSize = proofSize + commitmentSize + onlyPremiumParameterSize = 6144 bits + /// @dev function selector = 32 bits + /// @dev total data size = 6144 bits + 32 bits = 6176 bits = 772 bytes + uint32 public s_fulfillmentTxSizeBytes = 772; // s_coordinatorGasOverheadNative reflects the gas overhead of the coordinator's fulfillRandomWords // function for native payment. The cost for this gas is billed to the subscription, and must therefor be included @@ -188,12 +188,12 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume /** * @notice setFulfillmentTxSize sets the size of the fulfillment transaction in bytes. - * @param size is the size of the fulfillment transaction in bytes. + * @param _size is the size of the fulfillment transaction in bytes. */ - function setFulfillmentTxSize(uint32 size) external onlyOwner { - s_fulfillmentTxSizeBytes = size; + function setFulfillmentTxSize(uint32 _size) external onlyOwner { + s_fulfillmentTxSizeBytes = _size; - emit FulfillmentTxSizeSet(size); + emit FulfillmentTxSizeSet(_size); } /** @@ -232,6 +232,7 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume * @param _fulfillmentFlatFeeLinkDiscountPPM is the flat fee discount in millionths of native that VRFCoordinatorV2Plus * charges for link payment. */ + /// @dev This function while having only 12 parameters is causing a Stack too deep error when running forge coverage. function setConfig( uint32 _wrapperGasOverhead, uint32 _coordinatorGasOverheadNative, @@ -411,6 +412,14 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume return _calculateRequestPriceNative(_callbackGasLimit, _numWords, _requestGasPriceWei); } + /** + * @notice Returns the L1 fee for the fulfillment calldata payload (always return 0 on L1 chains). + * @notice Override this function in chain specific way for L2 chains. + */ + function _getL1CostWei() internal view virtual returns (uint256) { + return 0; + } + function _calculateRequestPriceNative( uint256 _gas, uint32 _numWords, @@ -424,7 +433,7 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume // (wei/gas) * gas + l1wei uint256 coordinatorCostWei = _requestGasPrice * (_gas + _getCoordinatorGasOverhead(_numWords, true)) + - ChainSpecificUtil._getL1CalldataGasCost(s_fulfillmentTxSizeBytes); + _getL1CostWei(); // coordinatorCostWithPremiumAndFlatFeeWei is the coordinator cost with the percentage premium and flat fee applied // coordinator cost * premium multiplier + flat fee @@ -448,7 +457,7 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume // (wei/gas) * gas + l1wei uint256 coordinatorCostWei = _requestGasPrice * (_gas + _getCoordinatorGasOverhead(_numWords, false)) + - ChainSpecificUtil._getL1CalldataGasCost(s_fulfillmentTxSizeBytes); + _getL1CostWei(); // coordinatorCostWithPremiumAndFlatFeeWei is the coordinator cost with the percentage premium and flat fee applied // coordinator cost * premium multiplier + flat fee diff --git a/contracts/src/v0.8/vrf/dev/VRFV2PlusWrapper_Arbitrum.sol b/contracts/src/v0.8/vrf/dev/VRFV2PlusWrapper_Arbitrum.sol new file mode 100644 index 00000000000..1ab5e8b5db5 --- /dev/null +++ b/contracts/src/v0.8/vrf/dev/VRFV2PlusWrapper_Arbitrum.sol @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import {ArbitrumL1Fees} from "./ArbitrumL1Fees.sol"; +import {VRFV2PlusWrapper} from "./VRFV2PlusWrapper.sol"; + +// solhint-disable-next-line contract-name-camelcase +contract VRFV2PlusWrapper_Arbitrum is VRFV2PlusWrapper, ArbitrumL1Fees { + constructor( + address _link, + address _linkNativeFeed, + address _coordinator, + uint256 _subId + ) VRFV2PlusWrapper(_link, _linkNativeFeed, _coordinator, _subId) {} + + /** + * @notice Returns estimated L1 gas fee cost for fulfillment calldata payload once + * @notice the request has been made through VRFV2PlusWrapper (direct funding model). + */ + function _getL1CostWei() internal view override returns (uint256) { + return ArbitrumL1Fees._getL1CostWeiForCalldataSize(s_fulfillmentTxSizeBytes); + } +} diff --git a/contracts/src/v0.8/vrf/dev/VRFV2PlusWrapper_Optimism.sol b/contracts/src/v0.8/vrf/dev/VRFV2PlusWrapper_Optimism.sol new file mode 100644 index 00000000000..6913b2ff1ea --- /dev/null +++ b/contracts/src/v0.8/vrf/dev/VRFV2PlusWrapper_Optimism.sol @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.19; + +import {OptimismL1Fees} from "./OptimismL1Fees.sol"; +import {VRFV2PlusWrapper} from "./VRFV2PlusWrapper.sol"; + +// solhint-disable-next-line contract-name-camelcase +contract VRFV2PlusWrapper_Optimism is VRFV2PlusWrapper, OptimismL1Fees { + error UnsupportedL1FeeCalculationMode(uint8 mode); + + constructor( + address _link, + address _linkNativeFeed, + address _coordinator, + uint256 _subId + ) VRFV2PlusWrapper(_link, _linkNativeFeed, _coordinator, _subId) { + // default calculation mode from OptimismL1Fees is not supported on the wrapper + // switch to the next available one + s_l1FeeCalculationMode = L1_CALLDATA_GAS_COST_MODE; + } + + /** + * @notice Overriding the setL1FeeCalculation function in VRFV2PlusWrapper for Optimism + * @notice ensures that L1_GAS_FEES_MODE can't be set for the wrapper contract. + */ + function setL1FeeCalculation(uint8 mode, uint8 coefficient) external override onlyOwner { + if (mode == L1_GAS_FEES_MODE) { + revert UnsupportedL1FeeCalculationMode(mode); + } + OptimismL1Fees._setL1FeeCalculationInternal(mode, coefficient); + } + + /** + * @notice Returns estimated L1 gas fee cost for fulfillment calldata payload once + * @notice the request has been made through VRFV2PlusWrapper (direct funding model). + */ + function _getL1CostWei() internal view override returns (uint256) { + return OptimismL1Fees._getL1CostWeiForCalldataSize(s_fulfillmentTxSizeBytes); + } +} diff --git a/contracts/src/v0.8/vrf/dev/interfaces/IVRFCoordinatorV2PlusInternal.sol b/contracts/src/v0.8/vrf/dev/interfaces/IVRFCoordinatorV2PlusInternal.sol index 81d609a84af..22e714cc947 100644 --- a/contracts/src/v0.8/vrf/dev/interfaces/IVRFCoordinatorV2PlusInternal.sol +++ b/contracts/src/v0.8/vrf/dev/interfaces/IVRFCoordinatorV2PlusInternal.sol @@ -57,7 +57,7 @@ interface IVRFCoordinatorV2PlusInternal is IVRFCoordinatorV2Plus { function s_requestCommitments(uint256 requestID) external view returns (bytes32); function fulfillRandomWords( - Proof memory proof, + Proof calldata proof, RequestCommitment memory rc, bool onlyPremium ) external returns (uint96); 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 3f4e799fb6d..1e781d1e17b 100644 --- a/contracts/src/v0.8/vrf/dev/testhelpers/ExposedVRFCoordinatorV2_5.sol +++ b/contracts/src/v0.8/vrf/dev/testhelpers/ExposedVRFCoordinatorV2_5.sol @@ -72,7 +72,7 @@ contract ExposedVRFCoordinatorV2_5 is VRFCoordinatorV2_5 { uint256 weiPerUnitGas, bool nativePayment, bool onlyPremium - ) external view returns (uint96, bool) { + ) external returns (uint96, bool) { return _calculatePaymentAmount(startGas, weiPerUnitGas, nativePayment, onlyPremium); } } diff --git a/contracts/src/v0.8/vrf/dev/testhelpers/ExposedVRFCoordinatorV2_5_Arbitrum.sol b/contracts/src/v0.8/vrf/dev/testhelpers/ExposedVRFCoordinatorV2_5_Arbitrum.sol new file mode 100644 index 00000000000..4f816dbc652 --- /dev/null +++ b/contracts/src/v0.8/vrf/dev/testhelpers/ExposedVRFCoordinatorV2_5_Arbitrum.sol @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.4; + +import {VRFCoordinatorV2_5_Arbitrum} from "../VRFCoordinatorV2_5_Arbitrum.sol"; + +// solhint-disable-next-line contract-name-camelcase +contract ExposedVRFCoordinatorV2_5_Arbitrum is VRFCoordinatorV2_5_Arbitrum { + constructor(address blockhashStore) VRFCoordinatorV2_5_Arbitrum(blockhashStore) {} + + function getBlockNumberExternal() external view returns (uint256) { + return _getBlockNumber(); + } + + function getBlockhashExternal(uint64 blockNumber) external view returns (bytes32) { + return _getBlockhash(blockNumber); + } + + function calculatePaymentAmountNativeExternal( + uint256 startGas, + uint256 weiPerUnitGas, + bool onlyPremium + ) external returns (uint96) { + return _calculatePaymentAmountNative(startGas, weiPerUnitGas, onlyPremium); + } + + function calculatePaymentAmountLinkExternal( + uint256 startGas, + uint256 weiPerUnitGas, + bool onlyPremium + ) external returns (uint96, bool) { + return _calculatePaymentAmountLink(startGas, weiPerUnitGas, onlyPremium); + } +} diff --git a/contracts/src/v0.8/vrf/dev/testhelpers/ExposedVRFCoordinatorV2_5_Optimism.sol b/contracts/src/v0.8/vrf/dev/testhelpers/ExposedVRFCoordinatorV2_5_Optimism.sol new file mode 100644 index 00000000000..3732a1ed192 --- /dev/null +++ b/contracts/src/v0.8/vrf/dev/testhelpers/ExposedVRFCoordinatorV2_5_Optimism.sol @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.4; + +import {VRFCoordinatorV2_5_Optimism} from "../VRFCoordinatorV2_5_Optimism.sol"; + +// solhint-disable-next-line contract-name-camelcase +contract ExposedVRFCoordinatorV2_5_Optimism is VRFCoordinatorV2_5_Optimism { + constructor(address blockhashStore) VRFCoordinatorV2_5_Optimism(blockhashStore) {} + + function getBlockNumberExternal() external view returns (uint256) { + return _getBlockNumber(); + } + + function getBlockhashExternal(uint64 blockNumber) external view returns (bytes32) { + return _getBlockhash(blockNumber); + } + + function calculatePaymentAmountNativeExternal( + uint256 startGas, + uint256 weiPerUnitGas, + bool onlyPremium + ) external returns (uint96) { + return _calculatePaymentAmountNative(startGas, weiPerUnitGas, onlyPremium); + } + + function calculatePaymentAmountLinkExternal( + uint256 startGas, + uint256 weiPerUnitGas, + bool onlyPremium + ) external returns (uint96, bool) { + return _calculatePaymentAmountLink(startGas, weiPerUnitGas, onlyPremium); + } +} diff --git a/contracts/src/v0.8/vrf/dev/testhelpers/VRFCoordinatorV2PlusUpgradedVersion.sol b/contracts/src/v0.8/vrf/dev/testhelpers/VRFCoordinatorV2PlusUpgradedVersion.sol index 53f499305e5..af5c56bde6c 100644 --- a/contracts/src/v0.8/vrf/dev/testhelpers/VRFCoordinatorV2PlusUpgradedVersion.sol +++ b/contracts/src/v0.8/vrf/dev/testhelpers/VRFCoordinatorV2PlusUpgradedVersion.sol @@ -364,8 +364,8 @@ contract VRFCoordinatorV2PlusUpgradedVersion is } function _getRandomnessFromProof( - Proof memory proof, - VRFTypes.RequestCommitmentV2Plus memory rc + Proof calldata proof, + VRFTypes.RequestCommitmentV2Plus calldata rc ) internal view returns (Output memory) { bytes32 keyHash = hashOfKey(proof.pk); ProvingKey memory key = s_provingKeys[keyHash]; @@ -414,7 +414,7 @@ contract VRFCoordinatorV2PlusUpgradedVersion is function _deliverRandomness( uint256 requestId, - VRFTypes.RequestCommitmentV2Plus memory rc, + VRFTypes.RequestCommitmentV2Plus calldata rc, uint256[] memory randomWords ) internal returns (bool success) { VRFConsumerBaseV2Plus v; @@ -440,8 +440,8 @@ contract VRFCoordinatorV2PlusUpgradedVersion is * @dev simulated offchain to determine if sufficient balance is present to fulfill the request */ function fulfillRandomWords( - Proof memory proof, - VRFTypes.RequestCommitmentV2Plus memory rc, + Proof calldata proof, + VRFTypes.RequestCommitmentV2Plus calldata rc, bool onlyPremium ) external nonReentrant returns (uint96 payment) { uint256 startGas = gasleft(); diff --git a/contracts/src/v0.8/vrf/test/BaseTest.t.sol b/contracts/src/v0.8/vrf/test/BaseTest.t.sol index 4da698d1740..1ae2869b240 100644 --- a/contracts/src/v0.8/vrf/test/BaseTest.t.sol +++ b/contracts/src/v0.8/vrf/test/BaseTest.t.sol @@ -14,4 +14,21 @@ contract BaseTest is Test { // Set msg.sender to OWNER until changePrank or stopPrank is called vm.startPrank(OWNER); } + + function getRandomAddresses(uint256 length) internal returns (address[] memory) { + address[] memory addresses = new address[](length); + for (uint256 i = 0; i < length; ++i) { + addresses[i] = address(uint160(uint(keccak256(abi.encodePacked(i))))); + } + return addresses; + } + + function addressIsIn(address addr, address[] memory addresses) internal returns (bool) { + for (uint256 i = 0; i < addresses.length; ++i) { + if (addresses[i] == addr) { + return true; + } + } + return false; + } } diff --git a/contracts/src/v0.8/vrf/test/BatchVRFCoordinatorV2Plus.t.sol b/contracts/src/v0.8/vrf/test/BatchVRFCoordinatorV2Plus.t.sol new file mode 100644 index 00000000000..c2938cb35b0 --- /dev/null +++ b/contracts/src/v0.8/vrf/test/BatchVRFCoordinatorV2Plus.t.sol @@ -0,0 +1,178 @@ +pragma solidity 0.8.19; + +import {console} from "forge-std/console.sol"; +import {VRF} from "../VRF.sol"; +import {VRFTypes} from "../VRFTypes.sol"; +import {BatchVRFCoordinatorV2Plus} from "../dev/BatchVRFCoordinatorV2Plus.sol"; +import {VRFV2PlusClient} from "../dev/libraries/VRFV2PlusClient.sol"; +import {VRFCoordinatorV2_5} from "../dev/VRFCoordinatorV2_5.sol"; +import "./BaseTest.t.sol"; +import {FixtureVRFCoordinatorV2_5} from "./FixtureVRFCoordinatorV2_5.t.sol"; + +contract BatchVRFCoordinatorV2PlusTest is FixtureVRFCoordinatorV2_5 { + BatchVRFCoordinatorV2Plus private s_batchCoordinator; + + event RandomWordsFulfilled( + uint256 indexed requestId, + uint256 outputSeed, + uint256 indexed subId, + uint96 payment, + bool nativePayment, + bool success, + bool onlyPremium + ); + + function setUp() public override { + FixtureVRFCoordinatorV2_5.setUp(); + + s_batchCoordinator = new BatchVRFCoordinatorV2Plus(address(s_coordinator)); + } + + function test_fulfillRandomWords() public { + _setUpConfig(); + _setUpProvingKey(); + _setUpSubscription(); + + uint32 requestBlock = 10; + vm.roll(requestBlock); + + vm.startPrank(SUBSCRIPTION_OWNER); + vm.deal(SUBSCRIPTION_OWNER, 10 ether); + s_coordinator.fundSubscriptionWithNative{value: 10 ether}(s_subId); + + // Request random words. + s_consumer.requestRandomWords(CALLBACK_GAS_LIMIT, MIN_CONFIRMATIONS, NUM_WORDS, VRF_KEY_HASH, true); + vm.stopPrank(); + + // Move on to the next block. + // Store the previous block's blockhash. + vm.roll(requestBlock + 1); + s_bhs.store(requestBlock); + + VRFTypes.Proof[] memory proofs = new VRFTypes.Proof[](2); + VRFTypes.RequestCommitmentV2Plus[] memory rcs = new VRFTypes.RequestCommitmentV2Plus[](2); + + // Proof generated via the generate-proof-v2-plus script command. Example usage: + // _printGenerateProofV2PlusCommand(address(s_consumer), 1, requestBlock, true); + /* + go run . generate-proof-v2-plus \ + -key-hash 0x9f2353bde94264dbc3d554a94cceba2d7d2b4fdce4304d3e09a1fea9fbeb1528 \ + -pre-seed 33855227690351884611579800220581891477580182035146587491531555927634180294480 \ + -block-hash 0x0a \ + -block-num 10 \ + -sender 0xdc90e8ce61c1af8a638b95264037c8e67ee5765c \ + -native-payment true + + */ + proofs[0] = VRFTypes.Proof({ + pk: [ + 72488970228380509287422715226575535698893157273063074627791787432852706183111, + 62070622898698443831883535403436258712770888294397026493185421712108624767191 + ], + gamma: [ + 80420391742429647505172101941811820476888293644816377569181566466584288434705, + 24046736031266889997051641830469514057863365715722268340801477580836256044582 + ], + c: 74775128390693502914275156263410881155583102046081919417827483535122161050585, + s: 69563235412360165148368009853509434870917653835330501139204071967997764190111, + seed: 33855227690351884611579800220581891477580182035146587491531555927634180294480, + uWitness: 0xfB0663eaf48785540dE0FD0F837FD9c09BF4B80A, + cGammaWitness: [ + 53711159452748734758194447734939737695995909567499536035707522847057731697403, + 113650002631484103366420937668971311744887820666944514581352028601506700116835 + ], + sHashWitness: [ + 89656531714223714144489731263049239277719465105516547297952288438117443488525, + 90859682705760125677895017864538514058733199985667976488434404721197234427011 + ], + zInv: 97275608653505690744303242942631893944856831559408852202478373762878300587548 + }); + rcs[0] = VRFTypes.RequestCommitmentV2Plus({ + blockNum: requestBlock, + subId: s_subId, + callbackGasLimit: CALLBACK_GAS_LIMIT, + numWords: 1, + sender: address(s_consumer), + extraArgs: VRFV2PlusClient._argsToBytes(VRFV2PlusClient.ExtraArgsV1({nativePayment: true})) + }); + + VRFCoordinatorV2_5.Output memory output = s_coordinator.getRandomnessFromProofExternal( + abi.decode(abi.encode(proofs[0]), (VRF.Proof)), + rcs[0] + ); + + requestBlock = 20; + vm.roll(requestBlock); + + vm.startPrank(SUBSCRIPTION_OWNER); + s_linkToken.setBalance(address(SUBSCRIPTION_OWNER), 10 ether); + s_linkToken.transferAndCall(address(s_coordinator), 10 ether, abi.encode(s_subId)); + + // Request random words. + s_consumer1.requestRandomWords(CALLBACK_GAS_LIMIT, MIN_CONFIRMATIONS, NUM_WORDS, VRF_KEY_HASH, false); + vm.stopPrank(); + + // Move on to the next block. + // Store the previous block's blockhash. + vm.roll(requestBlock + 1); + s_bhs.store(requestBlock); + + // Proof generated via the generate-proof-v2-plus script command. Example usage: + // _printGenerateProofV2PlusCommand(address(s_consumer1), 1, requestBlock, false); + /* + go run . generate-proof-v2-plus \ + -key-hash 0x9f2353bde94264dbc3d554a94cceba2d7d2b4fdce4304d3e09a1fea9fbeb1528 \ + -pre-seed 76568185840201037774581758921393822690942290841865097674309745036496166431060 \ + -block-hash 0x14 \ + -block-num 20 \ + -sender 0x2f1c0761d6e4b1e5f01968d6c746f695e5f3e25d \ + -native-payment false + */ + proofs[1] = VRFTypes.Proof({ + pk: [ + 72488970228380509287422715226575535698893157273063074627791787432852706183111, + 62070622898698443831883535403436258712770888294397026493185421712108624767191 + ], + gamma: [ + 21323932463597506192387578758854201988004673105893105492473194972397109828006, + 96834737826889397196571646974355352644437196500310392203712129010026003355112 + ], + c: 8775807990949224376582975115621037245862755412370175152581490650310350359728, + s: 6805708577951013810918872616271445638109899206333819877111740872779453350091, + seed: 76568185840201037774581758921393822690942290841865097674309745036496166431060, + uWitness: 0xE82fF24Fecfbe73d682f38308bE3E039Dfabdf5c, + cGammaWitness: [ + 92810770919624535241476539842820168209710445519252592382122118536598338376923, + 17271305664006119131434661141858450289379246199095231636439133258170648418554 + ], + sHashWitness: [ + 29540023305939374439696120003978246982707698669656874393367212257432197207536, + 93902323936532381028323379401739289810874348405259732508442252936582467730050 + ], + zInv: 88845170436601946907659333156418518556235340365885668267853966404617557948692 + }); + rcs[1] = VRFTypes.RequestCommitmentV2Plus({ + blockNum: requestBlock, + subId: s_subId, + callbackGasLimit: CALLBACK_GAS_LIMIT, + numWords: 1, + sender: address(s_consumer1), + extraArgs: VRFV2PlusClient._argsToBytes(VRFV2PlusClient.ExtraArgsV1({nativePayment: false})) + }); + + VRFCoordinatorV2_5.Output memory output1 = s_coordinator.getRandomnessFromProofExternal( + abi.decode(abi.encode(proofs[1]), (VRF.Proof)), + rcs[1] + ); + + // The payments are NOT pre-calculated and simply copied from the actual event. + // We can assert and ignore the payment field but the code will be considerably longer. + vm.expectEmit(true, true, false, true, address(s_coordinator)); + emit RandomWordsFulfilled(output.requestId, output.randomness, s_subId, 500000000000143283, true, true, false); + vm.expectEmit(true, true, false, true, address(s_coordinator)); + emit RandomWordsFulfilled(output1.requestId, output1.randomness, s_subId, 800000000000306143, false, true, false); + + // Fulfill the requests. + s_batchCoordinator.fulfillRandomWords(proofs, rcs); + } +} diff --git a/contracts/src/v0.8/vrf/test/FixtureVRFCoordinatorV2_5.t.sol b/contracts/src/v0.8/vrf/test/FixtureVRFCoordinatorV2_5.t.sol new file mode 100644 index 00000000000..c1c2c7eb27c --- /dev/null +++ b/contracts/src/v0.8/vrf/test/FixtureVRFCoordinatorV2_5.t.sol @@ -0,0 +1,134 @@ +pragma solidity ^0.8.19; + +import {console} from "forge-std/console.sol"; +import "@openzeppelin/contracts/utils/Strings.sol"; +import {VRF} from "../VRF.sol"; +import {VRFTypes} from "../VRFTypes.sol"; +import {BlockhashStore} from "../dev/BlockhashStore.sol"; +import {VRFV2PlusClient} from "../dev/libraries/VRFV2PlusClient.sol"; +import {ExposedVRFCoordinatorV2_5} from "../dev/testhelpers/ExposedVRFCoordinatorV2_5.sol"; +import {VRFV2PlusConsumerExample} from "../dev/testhelpers/VRFV2PlusConsumerExample.sol"; +import {MockLinkToken} from "../../mocks/MockLinkToken.sol"; +import {MockV3Aggregator} from "../../tests/MockV3Aggregator.sol"; +import "./BaseTest.t.sol"; + +contract FixtureVRFCoordinatorV2_5 is BaseTest, VRF { + address internal SUBSCRIPTION_OWNER = makeAddr("SUBSCRIPTION_OWNER"); + + 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; + + // VRF KeyV2 generated from a node; not sensitive information. + // The secret key used to generate this key is: 10. + bytes internal constant VRF_UNCOMPRESSED_PUBLIC_KEY = + hex"a0434d9e47f3c86235477c7b1ae6ae5d3442d49b1943c2b752a68e2a47e247c7893aba425419bc27a3b6c7e693a24c696f794c2ed877a1593cbee53b037368d7"; + bytes internal constant VRF_COMPRESSED_PUBLIC_KEY = + hex"a0434d9e47f3c86235477c7b1ae6ae5d3442d49b1943c2b752a68e2a47e247c701"; + bytes32 internal constant VRF_KEY_HASH = hex"9f2353bde94264dbc3d554a94cceba2d7d2b4fdce4304d3e09a1fea9fbeb1528"; + + BlockhashStore internal s_bhs; + ExposedVRFCoordinatorV2_5 internal s_coordinator; + + // Use multiple consumers because VRFV2PlusConsumerExample cannot have multiple pending requests. + uint256 internal s_subId; + VRFV2PlusConsumerExample internal s_consumer; + VRFV2PlusConsumerExample internal s_consumer1; + + MockLinkToken internal s_linkToken; + MockV3Aggregator internal s_linkNativeFeed; + + function setUp() public virtual override { + BaseTest.setUp(); + vm.stopPrank(); + + vm.startPrank(OWNER); + s_bhs = new BlockhashStore(); + + // Deploy coordinator. + s_coordinator = new ExposedVRFCoordinatorV2_5(address(s_bhs)); + s_linkToken = new MockLinkToken(); + s_linkNativeFeed = new MockV3Aggregator(18, 500000000000000000); // .5 ETH (good for testing) + + // Configure the coordinator. + s_coordinator.setLINKAndLINKNativeFeed(address(s_linkToken), address(s_linkNativeFeed)); + vm.stopPrank(); + + // Deploy consumers. + vm.startPrank(SUBSCRIPTION_OWNER); + s_consumer = new VRFV2PlusConsumerExample(address(s_coordinator), address(s_linkToken)); + s_consumer1 = new VRFV2PlusConsumerExample(address(s_coordinator), address(s_linkToken)); + vm.stopPrank(); + } + + function _setUpConfig() internal { + vm.prank(OWNER); + s_coordinator.setConfig( + 0, // minRequestConfirmations + 2_500_000, // maxGasLimit + 1, // stalenessSeconds + 50_000, // gasAfterPaymentCalculation + 50000000000000000, // fallbackWeiPerUnitLink + 500_000, // fulfillmentFlatFeeNativePPM + 100_000, // fulfillmentFlatFeeLinkDiscountPPM + 15, // nativePremiumPercentage + 10 // linkPremiumPercentage + ); + } + + function _setUpProvingKey() internal { + uint256[2] memory uncompressedKeyParts = this._getProvingKeyParts(VRF_UNCOMPRESSED_PUBLIC_KEY); + vm.prank(OWNER); + s_coordinator.registerProvingKey(uncompressedKeyParts, GAS_LANE_MAX_GAS); + } + + function _setUpSubscription() internal { + vm.startPrank(SUBSCRIPTION_OWNER); + s_subId = s_coordinator.createSubscription(); + s_coordinator.addConsumer(s_subId, address(s_consumer)); + s_consumer.setSubId(s_subId); + s_coordinator.addConsumer(s_subId, address(s_consumer1)); + s_consumer1.setSubId(s_subId); + vm.stopPrank(); + } + + // note: Call this function via this.getProvingKeyParts to be able to pass memory as calldata and + // index over the byte array. + function _getProvingKeyParts(bytes calldata uncompressedKey) public pure returns (uint256[2] memory) { + uint256 keyPart1 = uint256(bytes32(uncompressedKey[0:32])); + uint256 keyPart2 = uint256(bytes32(uncompressedKey[32:64])); + return [keyPart1, keyPart2]; + } + + /** + * Prints the command to generate a proof for a VRF request. + * + * This function provides a convenient way to generate the proof off-chain to be copied into the tests. + * + * An example of the command looks like this: + * go run . generate-proof-v2-plus \ + * -key-hash 0x9f2353bde94264dbc3d554a94cceba2d7d2b4fdce4304d3e09a1fea9fbeb1528 \ + * -pre-seed 76568185840201037774581758921393822690942290841865097674309745036496166431060 \ + * -block-hash 0x14 \ + * -block-num 20 \ + * -sender 0x2f1c0761d6e4b1e5f01968d6c746f695e5f3e25d \ + * -native-payment false + */ + function _printGenerateProofV2PlusCommand( + address sender, + uint64 nonce, + uint256 requestBlock, + bool nativePayment + ) internal { + (, uint256 preSeed) = s_coordinator.computeRequestIdExternal(VRF_KEY_HASH, sender, s_subId, nonce); + + console.log("go run . generate-proof-v2-plus \\"); + console.log(string.concat(" -key-hash ", Strings.toHexString(uint256(VRF_KEY_HASH)), " \\")); + console.log(string.concat(" -pre-seed ", Strings.toString(preSeed), " \\")); + console.log(string.concat(" -block-hash ", Strings.toHexString(uint256(blockhash(requestBlock))), " \\")); + console.log(string.concat(" -block-num ", Strings.toString(requestBlock), " \\")); + console.log(string.concat(" -sender ", Strings.toHexString(sender), " \\")); + console.log(string.concat(" -native-payment ", nativePayment ? "true" : "false")); + } +} diff --git a/contracts/src/v0.8/vrf/test/VRFCoordinatorV2Plus_Migration.t.sol b/contracts/src/v0.8/vrf/test/VRFCoordinatorV2Plus_Migration.t.sol index 31585656b37..ad239592d41 100644 --- a/contracts/src/v0.8/vrf/test/VRFCoordinatorV2Plus_Migration.t.sol +++ b/contracts/src/v0.8/vrf/test/VRFCoordinatorV2Plus_Migration.t.sol @@ -304,7 +304,7 @@ contract VRFCoordinatorV2Plus_Migration is BaseTest { function testMigrateRevertsWhenInvalidCaller() external { changePrank(makeAddr("invalidCaller")); - vm.expectRevert(bytes("Not subscription owner")); + vm.expectRevert(abi.encodeWithSelector(SubscriptionAPI.MustBeSubOwner.selector, OWNER)); v1Coordinator.migrate(subId, v2CoordinatorAddr); } @@ -319,7 +319,7 @@ contract VRFCoordinatorV2Plus_Migration is BaseTest { false ); - vm.expectRevert(bytes("Pending request exists")); + vm.expectRevert(SubscriptionAPI.PendingRequestExists.selector); v1Coordinator.migrate(subId, v2CoordinatorAddr); } diff --git a/contracts/src/v0.8/vrf/test/VRFCoordinatorV2_5_Arbitrum.t.sol b/contracts/src/v0.8/vrf/test/VRFCoordinatorV2_5_Arbitrum.t.sol new file mode 100644 index 00000000000..8e47b800ee5 --- /dev/null +++ b/contracts/src/v0.8/vrf/test/VRFCoordinatorV2_5_Arbitrum.t.sol @@ -0,0 +1,179 @@ +pragma solidity 0.8.19; + +import "./BaseTest.t.sol"; +import {MockLinkToken} from "../../mocks/MockLinkToken.sol"; +import {MockV3Aggregator} from "../../tests/MockV3Aggregator.sol"; +import {ExposedVRFCoordinatorV2_5_Arbitrum} from "../dev/testhelpers/ExposedVRFCoordinatorV2_5_Arbitrum.sol"; +import {BlockhashStore} from "../dev/BlockhashStore.sol"; +import {ArbGasInfo} from "../../vendor/@arbitrum/nitro-contracts/src/precompiles/ArbGasInfo.sol"; +import {ArbSys} from "../../vendor/@arbitrum/nitro-contracts/src/precompiles/ArbSys.sol"; +import {VmSafe} from "forge-std/Vm.sol"; + +contract VRFV2CoordinatorV2_5_Arbitrum is BaseTest { + /// @dev ARBGAS_ADDR is the address of the ArbGasInfo precompile on Arbitrum. + /// @dev reference: https://github.com/OffchainLabs/nitro/blob/v2.0.14/contracts/src/precompiles/ArbGasInfo.sol#L10 + address private constant ARBGAS_ADDR = address(0x000000000000000000000000000000000000006C); + ArbGasInfo private constant ARBGAS = ArbGasInfo(ARBGAS_ADDR); + + /// @dev ARBSYS_ADDR is the address of the ArbSys precompile on Arbitrum. + /// @dev reference: https://github.com/OffchainLabs/nitro/blob/v2.0.14/contracts/src/precompiles/ArbSys.sol#L10 + address private constant ARBSYS_ADDR = address(0x0000000000000000000000000000000000000064); + ArbSys private constant ARBSYS = ArbSys(ARBSYS_ADDR); + + address internal constant DEPLOYER = 0xD883a6A1C22fC4AbFE938a5aDF9B2Cc31b1BF18B; + + BlockhashStore s_bhs; + ExposedVRFCoordinatorV2_5_Arbitrum s_testCoordinator; + MockLinkToken s_linkToken; + MockV3Aggregator s_linkNativeFeed; + + uint256 s_startGas = 0.0038 gwei; + uint256 s_weiPerUnitGas = 0.003 gwei; + + function setUp() public override { + BaseTest.setUp(); + + // Fund our users. + vm.roll(1); + vm.deal(DEPLOYER, 10_000 ether); + changePrank(DEPLOYER); + + vm.txGasPrice(100 gwei); + + // Instantiate BHS. + s_bhs = new BlockhashStore(); + + // Deploy coordinator, LINK token and LINK/Native feed. + s_testCoordinator = new ExposedVRFCoordinatorV2_5_Arbitrum(address(s_bhs)); + s_linkToken = new MockLinkToken(); + s_linkNativeFeed = new MockV3Aggregator(18, 500000000000000000); // .5 ETH (good for testing) + + // Configure the coordinator. + s_testCoordinator.setLINKAndLINKNativeFeed(address(s_linkToken), address(s_linkNativeFeed)); + s_testCoordinator.setConfig( + 0, // minRequestConfirmations + 2_500_000, // maxGasLimit + 1, // stalenessSeconds + 50_000, // gasAfterPaymentCalculation + 50000000000000000, // fallbackWeiPerUnitLink + 500_000, // fulfillmentFlatFeeNativePPM + 100_000, // fulfillmentFlatFeeLinkDiscountPPM + 15, // nativePremiumPercentage + 10 // linkPremiumPercentage + ); + } + + function _encodeCalculatePaymentAmountNativeExternal( + uint256 startGas, + uint256 weiPerUnitGas, + bool onlyPremium + ) internal pure returns (bytes memory) { + return + abi.encodeWithSelector( + ExposedVRFCoordinatorV2_5_Arbitrum.calculatePaymentAmountNativeExternal.selector, + startGas, + weiPerUnitGas, + onlyPremium + ); + } + + function _encodeCalculatePaymentAmountLinkExternal( + uint256 startGas, + uint256 weiPerUnitGas, + bool onlyPremium + ) internal pure returns (bytes memory) { + return + abi.encodeWithSelector( + ExposedVRFCoordinatorV2_5_Arbitrum.calculatePaymentAmountLinkExternal.selector, + startGas, + weiPerUnitGas, + onlyPremium + ); + } + + function _checkL1GasFeeEmittedLogs(uint256 expectedL1GasFee) internal { + VmSafe.Log[] memory entries = vm.getRecordedLogs(); + assertEq(entries.length, 1); + assertEq(entries[0].topics.length, 1); + assertEq(entries[0].topics[0], keccak256("L1GasFee(uint256)")); + // 1e15 is less than 1 percent discrepancy + uint256 actualL1GasFee = abi.decode(entries[0].data, (uint256)); + assertApproxEqAbs(expectedL1GasFee, actualL1GasFee, 1e15); + } + + function test_getBlockNumber() public { + // sanity check that Arbitrum will use ArbSys to get the block number + vm.mockCall(ARBSYS_ADDR, abi.encodeWithSelector(ARBSYS.arbBlockNumber.selector), abi.encode(33691)); + assertEq(33691, s_testCoordinator.getBlockNumberExternal()); + } + + function test_getBlockhash() public { + // for blocks within 256 blocks from the current block return the blockhash using ArbSys + bytes32 testBlockHash = bytes32(keccak256("testBlock")); + vm.mockCall(ARBSYS_ADDR, abi.encodeWithSelector(ARBSYS.arbBlockNumber.selector), abi.encode(45830)); + vm.mockCall(ARBSYS_ADDR, abi.encodeWithSelector(ARBSYS.arbBlockHash.selector, 45825), abi.encode(testBlockHash)); + assertEq(testBlockHash, s_testCoordinator.getBlockhashExternal(45825)); + // for blocks outside 256 blocks from the current block return nothing + assertEq("", s_testCoordinator.getBlockhashExternal(33830)); + // for blocks greater than the current block return nothing + assertEq("", s_testCoordinator.getBlockhashExternal(50550)); + } + + function test_calculatePaymentAmountNative() public { + // first we test premium and flat fee payment combined + bool onlyPremium = false; + bytes memory txMsgData = _encodeCalculatePaymentAmountNativeExternal(s_startGas, s_weiPerUnitGas, onlyPremium); + vm.mockCall(ARBGAS_ADDR, abi.encodeWithSelector(ARBGAS.getCurrentTxL1GasFees.selector), abi.encode(10 gwei)); + vm.recordLogs(); + + uint256 gasLimit = 0.0001 gwei; // needed because gasleft() is used in the payment calculation + (bool success, bytes memory returnData) = address(s_testCoordinator).call{gas: gasLimit}(txMsgData); + assertTrue(success); + _checkL1GasFeeEmittedLogs(uint256(10 gwei)); + + uint96 payment = abi.decode(returnData, (uint96)); + // 1e15 is less than 1 percent discrepancy + assertApproxEqAbs(payment, 5.000129 * 1e17, 1e15); + + // now we test only premium payment + onlyPremium = true; + txMsgData = _encodeCalculatePaymentAmountNativeExternal(s_startGas, s_weiPerUnitGas, onlyPremium); + + (success, returnData) = address(s_testCoordinator).call{gas: gasLimit}(txMsgData); + assertTrue(success); + _checkL1GasFeeEmittedLogs(uint256(10 gwei)); + + payment = abi.decode(returnData, (uint96)); + // 1e15 is less than 1 percent discrepancy + assertApproxEqAbs(payment, 5.000017 * 1e17, 1e15); + } + + function test_calculatePaymentAmountLink() public { + // first we test premium and flat fee payment combined + bool onlyPremium = false; + bytes memory txMsgData = _encodeCalculatePaymentAmountLinkExternal(s_startGas, s_weiPerUnitGas, onlyPremium); + vm.mockCall(ARBGAS_ADDR, abi.encodeWithSelector(ARBGAS.getCurrentTxL1GasFees.selector), abi.encode(10 gwei)); + vm.recordLogs(); + + uint256 gasLimit = 0.0001 gwei; // needed because gasleft() is used in the payment calculation + (bool success, bytes memory returnData) = address(s_testCoordinator).call{gas: gasLimit}(txMsgData); + assertTrue(success); + _checkL1GasFeeEmittedLogs(uint256(10 gwei)); + + uint96 payment = abi.decode(returnData, (uint96)); + // 1e15 is less than 1 percent discrepancy + assertApproxEqAbs(payment, 8.00024772 * 1e17, 1e15); + + // now we test only premium payment + onlyPremium = true; + txMsgData = _encodeCalculatePaymentAmountLinkExternal(s_startGas, s_weiPerUnitGas, onlyPremium); + + (success, returnData) = address(s_testCoordinator).call{gas: gasLimit}(txMsgData); + assertTrue(success); + _checkL1GasFeeEmittedLogs(uint256(10 gwei)); + + payment = abi.decode(returnData, (uint96)); + // 1e15 is less than 1 percent discrepancy + assertApproxEqAbs(payment, 8.00002252 * 1e17, 1e15); + } +} diff --git a/contracts/src/v0.8/vrf/test/VRFCoordinatorV2_5_Optimism.t.sol b/contracts/src/v0.8/vrf/test/VRFCoordinatorV2_5_Optimism.t.sol new file mode 100644 index 00000000000..b54dbbaaa04 --- /dev/null +++ b/contracts/src/v0.8/vrf/test/VRFCoordinatorV2_5_Optimism.t.sol @@ -0,0 +1,413 @@ +pragma solidity 0.8.19; + +import "./BaseTest.t.sol"; +import {MockLinkToken} from "../../mocks/MockLinkToken.sol"; +import {MockV3Aggregator} from "../../tests/MockV3Aggregator.sol"; +import {ExposedVRFCoordinatorV2_5_Optimism} from "../dev/testhelpers/ExposedVRFCoordinatorV2_5_Optimism.sol"; +import {OptimismL1Fees} from "../dev/OptimismL1Fees.sol"; +import {BlockhashStore} from "../dev/BlockhashStore.sol"; +import {GasPriceOracle as OVM_GasPriceOracle} from "../../vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/L2/GasPriceOracle.sol"; +import {VmSafe} from "forge-std/Vm.sol"; + +contract VRFV2CoordinatorV2_5_Optimism is BaseTest { + /// @dev OVM_GASPRICEORACLE_ADDR is the address of the OVM_GasPriceOracle precompile on Optimism. + /// @dev reference: https://community.optimism.io/docs/developers/build/transaction-fees/#estimating-the-l1-data-fee + address private constant OVM_GASPRICEORACLE_ADDR = address(0x420000000000000000000000000000000000000F); + OVM_GasPriceOracle private constant OVM_GASPRICEORACLE = OVM_GasPriceOracle(OVM_GASPRICEORACLE_ADDR); + + /// @dev L1_FEE_DATA_PADDING includes 71 bytes for L1 data padding for Optimism + bytes internal constant L1_FEE_DATA_PADDING = + hex"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"; + + address internal constant DEPLOYER = 0xD883a6A1C22fC4AbFE938a5aDF9B2Cc31b1BF18B; + + BlockhashStore s_bhs; + ExposedVRFCoordinatorV2_5_Optimism s_testCoordinator; + MockLinkToken s_linkToken; + MockV3Aggregator s_linkNativeFeed; + + uint256 s_startGas = 0.0038 gwei; + uint256 s_weiPerUnitGas = 0.003 gwei; + + /// @dev Option 1: getL1Fee() function from predeploy GasPriceOracle contract with the fulfillment calldata payload + /// @dev This option is only available for the Coordinator contract + uint8 internal constant L1_GAS_FEES_MODE = 0; + /// @dev Option 2: our own implementation of getL1Fee() function (Ecotone version) with projected + /// @dev fulfillment calldata payload (number of non-zero bytes estimated based on historical data) + /// @dev This option is available for the Coordinator and the Wrapper contract + uint8 internal constant L1_CALLDATA_GAS_COST_MODE = 1; + /// @dev Option 3: getL1FeeUpperBound() function from predeploy GasPriceOracle contract (available after Fjord upgrade) + /// @dev This option is available for the Coordinator and the Wrapper contract + uint8 internal constant L1_GAS_FEES_UPPER_BOUND_MODE = 2; + + function setUp() public override { + BaseTest.setUp(); + + // Fund our users. + vm.roll(1); + vm.deal(DEPLOYER, 10_000 ether); + changePrank(DEPLOYER); + + vm.txGasPrice(100 gwei); + + // Instantiate BHS. + s_bhs = new BlockhashStore(); + + // Deploy coordinator, LINK token and LINK/Native feed. + s_testCoordinator = new ExposedVRFCoordinatorV2_5_Optimism(address(s_bhs)); + s_linkToken = new MockLinkToken(); + s_linkNativeFeed = new MockV3Aggregator(18, 500000000000000000); // .5 ETH (good for testing) + + // Configure the coordinator. + s_testCoordinator.setLINKAndLINKNativeFeed(address(s_linkToken), address(s_linkNativeFeed)); + s_testCoordinator.setConfig( + 0, // minRequestConfirmations + 2_500_000, // maxGasLimit + 1, // stalenessSeconds + 50_000, // gasAfterPaymentCalculation + 50000000000000000, // fallbackWeiPerUnitLink + 500_000, // fulfillmentFlatFeeNativePPM + 100_000, // fulfillmentFlatFeeLinkDiscountPPM + 15, // nativePremiumPercentage + 10 // linkPremiumPercentage + ); + } + + function _encodeCalculatePaymentAmountNativeExternal( + uint256 startGas, + uint256 weiPerUnitGas, + bool onlyPremium + ) internal pure returns (bytes memory) { + return + abi.encodeWithSelector( + ExposedVRFCoordinatorV2_5_Optimism.calculatePaymentAmountNativeExternal.selector, + startGas, + weiPerUnitGas, + onlyPremium + ); + } + + function _encodeCalculatePaymentAmountLinkExternal( + uint256 startGas, + uint256 weiPerUnitGas, + bool onlyPremium + ) internal pure returns (bytes memory) { + return + abi.encodeWithSelector( + ExposedVRFCoordinatorV2_5_Optimism.calculatePaymentAmountLinkExternal.selector, + startGas, + weiPerUnitGas, + onlyPremium + ); + } + + function _mockGasOraclePriceGetL1FeeUpperBoundCall() internal { + // 171 bytes is the size of tx.data we are sending in this test + // this is not expected fulfillment tx size! + vm.mockCall( + OVM_GASPRICEORACLE_ADDR, + abi.encodeWithSelector(OVM_GasPriceOracle.getL1FeeUpperBound.selector, 171), + abi.encode(uint256(0.02 ether)) + ); + } + + function _mockGasOraclePriceFeeMethods() internal { + // these values are taken from an example transaction on Base Sepolia + vm.mockCall( + OVM_GASPRICEORACLE_ADDR, + abi.encodeWithSelector(bytes4(keccak256("l1BaseFee()"))), + abi.encode(64273426165) + ); + vm.mockCall( + OVM_GASPRICEORACLE_ADDR, + abi.encodeWithSelector(bytes4(keccak256("baseFeeScalar()"))), + abi.encode(1101) + ); + vm.mockCall( + OVM_GASPRICEORACLE_ADDR, + abi.encodeWithSelector(bytes4(keccak256("blobBaseFeeScalar()"))), + abi.encode(659851) + ); + vm.mockCall( + OVM_GASPRICEORACLE_ADDR, + abi.encodeWithSelector(bytes4(keccak256("blobBaseFee()"))), + abi.encode(2126959908362) + ); + vm.mockCall(OVM_GASPRICEORACLE_ADDR, abi.encodeWithSelector(bytes4(keccak256("decimals()"))), abi.encode(6)); + } + + function _mockGasOraclePriceGetL1FeeCall(bytes memory txMsgData) internal { + vm.mockCall( + OVM_GASPRICEORACLE_ADDR, + abi.encodeWithSelector(OVM_GasPriceOracle.getL1Fee.selector, bytes.concat(txMsgData, L1_FEE_DATA_PADDING)), + abi.encode(uint256(0.001 ether)) + ); + } + + function _checkL1GasFeeEmittedLogs(uint256 expectedL1GasFee) internal { + VmSafe.Log[] memory entries = vm.getRecordedLogs(); + assertEq(entries.length, 1); + assertEq(entries[0].topics.length, 1); + assertEq(entries[0].topics[0], keccak256("L1GasFee(uint256)")); + // 1e15 is less than 1 percent discrepancy + uint256 actualL1GasFee = abi.decode(entries[0].data, (uint256)); + assertApproxEqAbs(expectedL1GasFee, actualL1GasFee, 1e15); + } + + function _checkL1FeeCalculationSetEmittedLogs(uint8 expectedMode, uint8 expectedCoefficient) internal { + VmSafe.Log[] memory entries = vm.getRecordedLogs(); + assertEq(entries.length, 1); + assertEq(entries[0].topics.length, 1); + assertEq(entries[0].topics[0], keccak256("L1FeeCalculationSet(uint8,uint8)")); + (uint8 actualMode, uint8 actualCoefficient) = abi.decode(entries[0].data, (uint8, uint8)); + assertEq(expectedMode, actualMode); + assertEq(expectedCoefficient, actualCoefficient); + } + + function test_setL1FeePaymentMethod() public { + // check default settings after contract deployment + assertEq(uint256(L1_GAS_FEES_MODE), uint256(s_testCoordinator.s_l1FeeCalculationMode())); + assertEq(100, uint256(s_testCoordinator.s_l1FeeCoefficient())); + vm.recordLogs(); + + s_testCoordinator.setL1FeeCalculation(L1_CALLDATA_GAS_COST_MODE, 70); + + _checkL1FeeCalculationSetEmittedLogs(L1_CALLDATA_GAS_COST_MODE, 70); + assertEq(uint256(L1_CALLDATA_GAS_COST_MODE), uint256(s_testCoordinator.s_l1FeeCalculationMode())); + assertEq(70, uint256(s_testCoordinator.s_l1FeeCoefficient())); + + s_testCoordinator.setL1FeeCalculation(L1_GAS_FEES_UPPER_BOUND_MODE, 30); + + _checkL1FeeCalculationSetEmittedLogs(L1_GAS_FEES_UPPER_BOUND_MODE, 30); + assertEq(uint256(L1_GAS_FEES_UPPER_BOUND_MODE), uint256(s_testCoordinator.s_l1FeeCalculationMode())); + assertEq(30, uint256(s_testCoordinator.s_l1FeeCoefficient())); + + // should revert if invalid L1 fee calculation mode is used + vm.expectRevert(abi.encodeWithSelector(OptimismL1Fees.InvalidL1FeeCalculationMode.selector, 4)); + s_testCoordinator.setL1FeeCalculation(4, 100); + + // should revert if invalid coefficient is used (equal to zero, this would disable L1 fees completely) + vm.expectRevert(abi.encodeWithSelector(OptimismL1Fees.InvalidL1FeeCoefficient.selector, 0)); + s_testCoordinator.setL1FeeCalculation(L1_GAS_FEES_UPPER_BOUND_MODE, 0); + + // should revert if invalid coefficient is used (larger than 100%) + vm.expectRevert(abi.encodeWithSelector(OptimismL1Fees.InvalidL1FeeCoefficient.selector, 150)); + s_testCoordinator.setL1FeeCalculation(L1_GAS_FEES_UPPER_BOUND_MODE, 150); + } + + function test_getBlockNumber() public { + // sanity check that OP stack will use block.number directly + vm.roll(1589); + assertEq(1589, s_testCoordinator.getBlockNumberExternal()); + } + + function test_getBlockhash() public { + // sanity check that OP stack will use blockhash() directly + vm.roll(1589); + bytes32 blockHash = blockhash(1589); + assertEq(blockHash, s_testCoordinator.getBlockhashExternal(1589)); + } + + // payment calculation depends on the L1 gas cost for fulfillment transaction payload + // both calculatePayment functions use msg.data passed down from the fulfillRandomWords function and + // in that case, msg.data contains the fulfillment transaction payload (calldata) + // it's not easy to simulate this in tests below plus we only want to concentrate on the payment part + // since we don't have to test with the correct payload, we can use any kind of payload for msg.data + // in the case of tests below, msg.data will carry calculatePayment function selectors and parameters + + function test_calculatePaymentAmountNativeUsingL1GasFeesMode() public { + s_testCoordinator.setL1FeeCalculation(L1_GAS_FEES_MODE, 100); + + // first we test premium and flat fee payment combined + bool onlyPremium = false; + bytes memory txMsgData = _encodeCalculatePaymentAmountNativeExternal(s_startGas, s_weiPerUnitGas, onlyPremium); + _mockGasOraclePriceGetL1FeeCall(txMsgData); + vm.recordLogs(); + + uint256 gasLimit = 0.0001 gwei; // needed because gasleft() is used in the payment calculation + (bool success, bytes memory returnData) = address(s_testCoordinator).call{gas: gasLimit}(txMsgData); + assertTrue(success); + _checkL1GasFeeEmittedLogs(uint256(0.001 ether)); + + uint96 payment = abi.decode(returnData, (uint96)); + // 1e15 is less than 1 percent discrepancy + assertApproxEqAbs(payment, 5.0162937 * 1e17, 1e15); + + // now we test only premium payment + onlyPremium = true; + txMsgData = _encodeCalculatePaymentAmountNativeExternal(s_startGas, s_weiPerUnitGas, onlyPremium); + _mockGasOraclePriceGetL1FeeCall(txMsgData); + + (success, returnData) = address(s_testCoordinator).call{gas: gasLimit}(txMsgData); + assertTrue(success); + _checkL1GasFeeEmittedLogs(uint256(0.001 ether)); + + payment = abi.decode(returnData, (uint96)); + // 1e15 is less than 1 percent discrepancy + assertApproxEqAbs(payment, 5.0015168 * 1e17, 1e15); + } + + function test_calculatePaymentAmountLinkUsingL1GasFeesMode() public { + s_testCoordinator.setL1FeeCalculation(L1_GAS_FEES_MODE, 100); + + // first we test premium and flat fee payment combined + bool onlyPremium = false; + bytes memory txMsgData = _encodeCalculatePaymentAmountLinkExternal(s_startGas, s_weiPerUnitGas, onlyPremium); + _mockGasOraclePriceGetL1FeeCall(txMsgData); + vm.recordLogs(); + + uint256 gasLimit = 0.0001 gwei; // needed because gasleft() is used in the payment calculation + (bool success, bytes memory returnData) = address(s_testCoordinator).call{gas: gasLimit}(txMsgData); + assertTrue(success); + _checkL1GasFeeEmittedLogs(uint256(0.001 ether)); + + uint96 payment = abi.decode(returnData, (uint96)); + // 1e15 is less than 1 percent discrepancy + assertApproxEqAbs(payment, 8.0222475 * 1e17, 1e15); + + // now we test only premium payment + onlyPremium = true; + txMsgData = _encodeCalculatePaymentAmountLinkExternal(s_startGas, s_weiPerUnitGas, onlyPremium); + _mockGasOraclePriceGetL1FeeCall(txMsgData); + + (success, returnData) = address(s_testCoordinator).call{gas: gasLimit}(txMsgData); + assertTrue(success); + _checkL1GasFeeEmittedLogs(uint256(0.001 ether)); + + payment = abi.decode(returnData, (uint96)); + // 1e15 is less than 1 percent discrepancy + assertApproxEqAbs(payment, 8.0020225 * 1e17, 1e15); + } + + function test_calculatePaymentAmountNativeUsingCalldataGasCostMode() public { + // for this type of cost calculation we are applying coefficient to reduce the inflated gas price + s_testCoordinator.setL1FeeCalculation(L1_CALLDATA_GAS_COST_MODE, 70); + + // first we test premium and flat fee payment combined + bool onlyPremium = false; + bytes memory txMsgData = _encodeCalculatePaymentAmountNativeExternal(s_startGas, s_weiPerUnitGas, onlyPremium); + _mockGasOraclePriceFeeMethods(); + vm.recordLogs(); + + uint256 gasLimit = 0.0001 gwei; // needed because gasleft() is used in the payment calculation + (bool success, bytes memory returnData) = address(s_testCoordinator).call{gas: gasLimit}(txMsgData); + assertTrue(success); + _checkL1GasFeeEmittedLogs(uint256(0.0002352 ether)); // 3.36e14 actual price times the coefficient (0.7) + + uint96 payment = abi.decode(returnData, (uint96)); + // 1e15 is less than 1 percent discrepancy + assertApproxEqAbs(payment, 5.002834 * 1e17, 1e15); + + // now we test only premium payment + onlyPremium = true; + txMsgData = _encodeCalculatePaymentAmountNativeExternal(s_startGas, s_weiPerUnitGas, onlyPremium); + _mockGasOraclePriceFeeMethods(); + + (success, returnData) = address(s_testCoordinator).call{gas: gasLimit}(txMsgData); + assertTrue(success); + _checkL1GasFeeEmittedLogs(uint256(0.0002352 ether)); // 3.36e14 actual price times the coefficient (0.7) + + payment = abi.decode(returnData, (uint96)); + // 1e15 is less than 1 percent discrepancy + assertApproxEqAbs(payment, 5.00037 * 1e17, 1e15); + } + + function test_calculatePaymentAmountLinkUsingCalldataGasCostMode() public { + // for this type of cost calculation we are applying coefficient to reduce the inflated gas price + s_testCoordinator.setL1FeeCalculation(L1_CALLDATA_GAS_COST_MODE, 70); + + // first we test premium and flat fee payment combined + bool onlyPremium = false; + bytes memory txMsgData = _encodeCalculatePaymentAmountLinkExternal(s_startGas, s_weiPerUnitGas, onlyPremium); + _mockGasOraclePriceFeeMethods(); + vm.recordLogs(); + + uint256 gasLimit = 0.0001 gwei; // needed because gasleft() is used in the payment calculation + (bool success, bytes memory returnData) = address(s_testCoordinator).call{gas: gasLimit}(txMsgData); + assertTrue(success); + _checkL1GasFeeEmittedLogs(uint256(0.0002352 ether)); // 3.36e14 actual price times the coefficient (0.7) + + uint96 payment = abi.decode(returnData, (uint96)); + // 1e15 is less than 1 percent discrepancy + assertApproxEqAbs(payment, 8.0054219 * 1e17, 1e15); + + // now we test only premium payment + onlyPremium = true; + txMsgData = _encodeCalculatePaymentAmountLinkExternal(s_startGas, s_weiPerUnitGas, onlyPremium); + _mockGasOraclePriceFeeMethods(); + + (success, returnData) = address(s_testCoordinator).call{gas: gasLimit}(txMsgData); + assertTrue(success); + _checkL1GasFeeEmittedLogs(uint256(0.0002352 ether)); // 3.36e14 actual price times the coefficient (0.7) + + payment = abi.decode(returnData, (uint96)); + // 1e15 is less than 1 percent discrepancy + assertApproxEqAbs(payment, 8.0004929 * 1e17, 1e15); + } + + function test_calculatePaymentAmountNativeUsingL1GasFeesUpperBoundMode() public { + // for this type of cost calculation we are applying coefficient to reduce the inflated gas price + s_testCoordinator.setL1FeeCalculation(L1_GAS_FEES_UPPER_BOUND_MODE, 50); + + // first we test premium and flat fee payment combined + bool onlyPremium = false; + bytes memory txMsgData = _encodeCalculatePaymentAmountNativeExternal(s_startGas, s_weiPerUnitGas, onlyPremium); + _mockGasOraclePriceGetL1FeeUpperBoundCall(); + vm.recordLogs(); + + uint256 gasLimit = 0.0001 gwei; // needed because gasleft() is used in the payment calculation + (bool success, bytes memory returnData) = address(s_testCoordinator).call{gas: gasLimit}(txMsgData); + assertTrue(success); + _checkL1GasFeeEmittedLogs(uint256(0.01 ether)); // 2e16 actual price times the coefficient (0.5) + + uint96 payment = abi.decode(returnData, (uint96)); + // 1e15 is less than 1 percent discrepancy + assertApproxEqAbs(payment, 5.115129 * 1e17, 1e15); + + // now we test only premium payment + onlyPremium = true; + txMsgData = _encodeCalculatePaymentAmountNativeExternal(s_startGas, s_weiPerUnitGas, onlyPremium); + _mockGasOraclePriceGetL1FeeUpperBoundCall(); + + (success, returnData) = address(s_testCoordinator).call{gas: gasLimit}(txMsgData); + assertTrue(success); + _checkL1GasFeeEmittedLogs(uint256(0.01 ether)); // 2e16 actual price times the coefficient (0.5) + + payment = abi.decode(returnData, (uint96)); + // 1e15 is less than 1 percent discrepancy + assertApproxEqAbs(payment, 5.015017 * 1e17, 1e15); + } + + function test_calculatePaymentAmountLinkUsingL1GasFeesUpperBoundMode() public { + // for this type of cost calculation we are applying coefficient to reduce the inflated gas price + s_testCoordinator.setL1FeeCalculation(L1_GAS_FEES_UPPER_BOUND_MODE, 50); + + // first we test premium and flat fee payment combined + bool onlyPremium = false; + bytes memory txMsgData = _encodeCalculatePaymentAmountLinkExternal(s_startGas, s_weiPerUnitGas, onlyPremium); + _mockGasOraclePriceGetL1FeeUpperBoundCall(); + vm.recordLogs(); + + uint256 gasLimit = 0.0001 gwei; // needed because gasleft() is used in the payment calculation + (bool success, bytes memory returnData) = address(s_testCoordinator).call{gas: gasLimit}(txMsgData); + assertTrue(success); + _checkL1GasFeeEmittedLogs(uint256(0.01 ether)); // 2e16 actual price times the coefficient (0.5) + + uint96 payment = abi.decode(returnData, (uint96)); + // 1e15 is less than 1 percent discrepancy + assertApproxEqAbs(payment, 8.2202475 * 1e17, 1e15); + + // now we test only premium payment + onlyPremium = true; + txMsgData = _encodeCalculatePaymentAmountLinkExternal(s_startGas, s_weiPerUnitGas, onlyPremium); + _mockGasOraclePriceGetL1FeeUpperBoundCall(); + + (success, returnData) = address(s_testCoordinator).call{gas: gasLimit}(txMsgData); + assertTrue(success); + _checkL1GasFeeEmittedLogs(uint256(0.01 ether)); // 2e16 actual price times the coefficient (0.5) + + payment = abi.decode(returnData, (uint96)); + // 1e15 is less than 1 percent discrepancy + assertApproxEqAbs(payment, 8.0200225 * 1e17, 1e15); + } +} diff --git a/contracts/src/v0.8/vrf/test/VRFV2Plus.t.sol b/contracts/src/v0.8/vrf/test/VRFV2Plus.t.sol index b7c2c1f882e..75a8d969273 100644 --- a/contracts/src/v0.8/vrf/test/VRFV2Plus.t.sol +++ b/contracts/src/v0.8/vrf/test/VRFV2Plus.t.sol @@ -702,24 +702,24 @@ contract VRFV2Plus is BaseTest { (bool fulfilled, , ) = s_testConsumer.s_requests(requestId); assertEq(fulfilled, true); - // The cost of fulfillRandomWords is approximately 70_000 gas. + // The cost of fulfillRandomWords is approximately 72_100 gas. // gasAfterPaymentCalculation is 50_000. // // The cost of the VRF fulfillment charged to the user is: // baseFeeWei = weiPerUnitGas * (gasAfterPaymentCalculation + startGas - gasleft()) // network gas price is capped at gas lane max gas (5000 gwei) - // baseFeeWei = 5e12 * (50_000 + 70_000) - // baseFeeWei = 6e17 + // baseFeeWei = 5e12 * (50_000 + 72_100) + // baseFeeWei = 6.11e17 // flatFeeWei = 1e12 * (fulfillmentFlatFeeNativePPM) // flatFeeWei = 1e12 * 500_000 = 5e17 // ... // billed_fee = baseFeeWei * (linkPremiumPercentage / 100) + 5e17 - // billed_fee = 6e17 * 0.15 + 5e17 - // billed_fee = 5.9e+17 + // billed_fee = 6.11e17 * 0.15 + 5e17 + // billed_fee = 5.9157e+17 (, uint96 nativeBalanceAfter, , , ) = s_testCoordinator.getSubscription(subId); // 1e15 is less than 1 percent discrepancy - assertApproxEqAbs(payment, 5.9 * 1e17, 1e15); - assertApproxEqAbs(nativeBalanceAfter, nativeBalanceBefore - 5.9 * 1e17, 1e15); + assertApproxEqAbs(payment, 5.9157 * 1e17, 1e15); + assertApproxEqAbs(nativeBalanceAfter, nativeBalanceBefore - 5.9157 * 1e17, 1e15); assertFalse(s_testCoordinator.pendingRequestExists(subId)); } @@ -750,26 +750,26 @@ contract VRFV2Plus is BaseTest { (bool fulfilled, , ) = s_testConsumer.s_requests(requestId); assertEq(fulfilled, true); - // The cost of fulfillRandomWords is approximately 86_000 gas. + // The cost of fulfillRandomWords is approximately 86_700 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 + 86_000 + 0)) / .5 - // paymentNoFee = 1.36e+18 + // paymentNoFee = (5e12 * (50_000 + 86_700 + 0)) / .5 + // paymentNoFee = 1.367e+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.36e+18 * 0.1 + 8e17 - // billed_fee = 9.36e+17 + // billed_fee = 1.367e+18 * 0.1 + 8e17 + // billed_fee = 9.367e+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.36 * 1e17, 1e15); - assertApproxEqAbs(linkBalanceAfter, linkBalanceBefore - 9.36 * 1e17, 1e15); + assertApproxEqAbs(payment, 9.367 * 1e17, 1e15); + assertApproxEqAbs(linkBalanceAfter, linkBalanceBefore - 9.367 * 1e17, 1e15); assertFalse(s_testCoordinator.pendingRequestExists(subId)); } @@ -1096,4 +1096,34 @@ contract VRFV2Plus is BaseTest { s_testCoordinator.addConsumer(subId, address(consumer)); return consumer; } + + function test_RemoveConsumer() public { + uint256 subId = s_testCoordinator.createSubscription(); + uint256 consumersLength = s_testCoordinator.MAX_CONSUMERS(); + address[] memory consumers = getRandomAddresses(consumersLength); + for (uint256 i = 0; i < consumersLength; ++i) { + s_testCoordinator.addConsumer(subId, consumers[i]); + } + + // test remove consumers from multiple positions to have better gas distribution + address earlyConsumerAddress = consumers[0]; + s_testCoordinator.removeConsumer(subId, earlyConsumerAddress); + (, , , , consumers) = s_testCoordinator.getSubscription(subId); + assertEq(consumers.length, consumersLength - 1); + assertFalse(addressIsIn(earlyConsumerAddress, consumers)); + + consumersLength = consumers.length; + address middleConsumerAddress = consumers[consumersLength / 2]; + s_testCoordinator.removeConsumer(subId, middleConsumerAddress); + (, , , , consumers) = s_testCoordinator.getSubscription(subId); + assertEq(consumers.length, consumersLength - 1); + assertFalse(addressIsIn(middleConsumerAddress, consumers)); + + consumersLength = consumers.length; + address lateConsumerAddress = consumers[consumersLength - 1]; + s_testCoordinator.removeConsumer(subId, lateConsumerAddress); + (, , , , consumers) = s_testCoordinator.getSubscription(subId); + assertEq(consumers.length, consumersLength - 1); + assertFalse(addressIsIn(lateConsumerAddress, consumers)); + } } diff --git a/contracts/src/v0.8/vrf/test/VRFV2PlusWrapper_Arbitrum.t.sol b/contracts/src/v0.8/vrf/test/VRFV2PlusWrapper_Arbitrum.t.sol new file mode 100644 index 00000000000..96f14847c41 --- /dev/null +++ b/contracts/src/v0.8/vrf/test/VRFV2PlusWrapper_Arbitrum.t.sol @@ -0,0 +1,109 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.19; + +import {BaseTest} from "./BaseTest.t.sol"; +import {MockLinkToken} from "../../mocks/MockLinkToken.sol"; +import {MockV3Aggregator} from "../../tests/MockV3Aggregator.sol"; +import {ExposedVRFCoordinatorV2_5_Arbitrum} from "../dev/testhelpers/ExposedVRFCoordinatorV2_5_Arbitrum.sol"; +import {VRFV2PlusWrapper_Arbitrum} from "../dev/VRFV2PlusWrapper_Arbitrum.sol"; +import {ArbGasInfo} from "../../vendor/@arbitrum/nitro-contracts/src/precompiles/ArbGasInfo.sol"; + +contract VRFV2PlusWrapperArbitrumTest is BaseTest { + /// @dev ARBGAS_ADDR is the address of the ArbGasInfo precompile on Arbitrum. + /// @dev reference: https://github.com/OffchainLabs/nitro/blob/v2.0.14/contracts/src/precompiles/ArbGasInfo.sol#L10 + address private constant ARBGAS_ADDR = address(0x000000000000000000000000000000000000006C); + ArbGasInfo private constant ARBGAS = ArbGasInfo(ARBGAS_ADDR); + + address internal constant DEPLOYER = 0xD883a6A1C22fC4AbFE938a5aDF9B2Cc31b1BF18B; + bytes32 private vrfKeyHash = hex"9f2353bde94264dbc3d554a94cceba2d7d2b4fdce4304d3e09a1fea9fbeb1528"; + uint256 private s_wrapperSubscriptionId; + + ExposedVRFCoordinatorV2_5_Arbitrum private s_testCoordinator; + MockLinkToken private s_linkToken; + MockV3Aggregator private s_linkNativeFeed; + VRFV2PlusWrapper_Arbitrum private s_wrapper; + + function setUp() public override { + BaseTest.setUp(); + + // Fund our users. + vm.roll(1); + vm.deal(DEPLOYER, 10_000 ether); + vm.stopPrank(); + vm.startPrank(DEPLOYER); + + // Deploy link token and link/native feed. + s_linkToken = new MockLinkToken(); + s_linkNativeFeed = new MockV3Aggregator(18, 500000000000000000); // .5 ETH (good for testing) + + // Deploy coordinator. + s_testCoordinator = new ExposedVRFCoordinatorV2_5_Arbitrum(address(0)); + + // Create subscription for all future wrapper contracts. + s_wrapperSubscriptionId = s_testCoordinator.createSubscription(); + + // Deploy wrapper. + s_wrapper = new VRFV2PlusWrapper_Arbitrum( + address(s_linkToken), + address(s_linkNativeFeed), + address(s_testCoordinator), + uint256(s_wrapperSubscriptionId) + ); + + // Configure the wrapper. + s_wrapper.setConfig( + 100_000, // wrapper gas overhead + 200_000, // coordinator gas overhead native + 220_000, // coordinator gas overhead link + 500, // coordinator gas overhead per word + 15, // native premium percentage, + 10, // link premium percentage + vrfKeyHash, // keyHash + 10, // max number of words, + 1, // stalenessSeconds + 50000000000000000, // fallbackWeiPerUnitLink + 500_000, // fulfillmentFlatFeeNativePPM + 100_000 // fulfillmentFlatFeeLinkDiscountPPM + ); + + // Add wrapper as a consumer to the wrapper's subscription. + s_testCoordinator.addConsumer(uint256(s_wrapperSubscriptionId), address(s_wrapper)); + } + + function _mockArbGasGetPricesInWei() internal { + // return gas prices in wei, assuming the specified aggregator is used + // ( + // per L2 tx, + // per L1 calldata unit, (zero byte = 4 units, nonzero byte = 16 units) + // per storage allocation, + // per ArbGas base, + // per ArbGas congestion, + // per ArbGas total + // ) + vm.mockCall( + ARBGAS_ADDR, + abi.encodeWithSelector(ARBGAS.getPricesInWei.selector), + abi.encode(1 gwei, 250 gwei, 1 gwei, 1 gwei, 1 gwei, 1 gwei) + ); + } + + function test_calculateRequestPriceNativeOnArbitrumWrapper() public { + vm.txGasPrice(1 gwei); + _mockArbGasGetPricesInWei(); + uint32 callbackGasLimit = 1_000_000; + uint32 numWords = 5; + uint256 wrapperCostCalculation = s_wrapper.calculateRequestPriceNative(callbackGasLimit, numWords); + // 1e15 is less than 1 percent discrepancy + assertApproxEqAbs(wrapperCostCalculation, 5.01483 * 1e17, 1e15); + } + + function test_calculateRequestPriceLinkOnArbitrumWrapper() public { + vm.txGasPrice(1 gwei); + _mockArbGasGetPricesInWei(); + uint32 callbackGasLimit = 1_000_000; + uint32 numWords = 5; + uint256 wrapperCostCalculation = s_wrapper.calculateRequestPrice(callbackGasLimit, numWords); + // 1e15 is less than 1 percent discrepancy + assertApproxEqAbs(wrapperCostCalculation, 8.02846 * 1e17, 1e15); + } +} diff --git a/contracts/src/v0.8/vrf/test/VRFV2PlusWrapper_Optimism.t.sol b/contracts/src/v0.8/vrf/test/VRFV2PlusWrapper_Optimism.t.sol new file mode 100644 index 00000000000..a8a97a57f0e --- /dev/null +++ b/contracts/src/v0.8/vrf/test/VRFV2PlusWrapper_Optimism.t.sol @@ -0,0 +1,216 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.19; + +import {BaseTest} from "./BaseTest.t.sol"; +import {MockLinkToken} from "../../mocks/MockLinkToken.sol"; +import {MockV3Aggregator} from "../../tests/MockV3Aggregator.sol"; +import {ExposedVRFCoordinatorV2_5_Optimism} from "../dev/testhelpers/ExposedVRFCoordinatorV2_5_Optimism.sol"; +import {VRFV2PlusWrapper_Optimism} from "../dev/VRFV2PlusWrapper_Optimism.sol"; +import {OptimismL1Fees} from "../dev/OptimismL1Fees.sol"; +import {GasPriceOracle as OVM_GasPriceOracle} from "../../vendor/@eth-optimism/contracts-bedrock/v0.17.3/src/L2/GasPriceOracle.sol"; +import {VmSafe} from "forge-std/Vm.sol"; + +contract VRFV2PlusWrapperOptimismAndBaseTest is BaseTest { + /// @dev OVM_GASPRICEORACLE_ADDR is the address of the OVM_GasPriceOracle precompile on Optimism. + /// @dev reference: https://community.optimism.io/docs/developers/build/transaction-fees/#estimating-the-l1-data-fee + address private constant OVM_GASPRICEORACLE_ADDR = address(0x420000000000000000000000000000000000000F); + OVM_GasPriceOracle private constant OVM_GASPRICEORACLE = OVM_GasPriceOracle(OVM_GASPRICEORACLE_ADDR); + + address internal constant DEPLOYER = 0xD883a6A1C22fC4AbFE938a5aDF9B2Cc31b1BF18B; + bytes32 private vrfKeyHash = hex"9f2353bde94264dbc3d554a94cceba2d7d2b4fdce4304d3e09a1fea9fbeb1528"; + uint256 private s_wrapperSubscriptionId; + + ExposedVRFCoordinatorV2_5_Optimism private s_testCoordinator; + MockLinkToken private s_linkToken; + MockV3Aggregator private s_linkNativeFeed; + VRFV2PlusWrapper_Optimism private s_wrapper; + + /// @dev Option 1: getL1Fee() function from predeploy GasPriceOracle contract with the fulfillment calldata payload + /// @dev This option is only available for the Coordinator contract + uint8 internal constant L1_GAS_FEES_MODE = 0; + /// @dev Option 2: our own implementation of getL1Fee() function (Ecotone version) with projected + /// @dev fulfillment calldata payload (number of non-zero bytes estimated based on historical data) + /// @dev This option is available for the Coordinator and the Wrapper contract + uint8 internal constant L1_CALLDATA_GAS_COST_MODE = 1; + /// @dev Option 3: getL1FeeUpperBound() function from predeploy GasPriceOracle contract (available after Fjord upgrade) + /// @dev This option is available for the Coordinator and the Wrapper contract + uint8 internal constant L1_GAS_FEES_UPPER_BOUND_MODE = 2; + + function setUp() public override { + BaseTest.setUp(); + + // Fund our users. + vm.roll(1); + vm.deal(DEPLOYER, 10_000 ether); + vm.stopPrank(); + vm.startPrank(DEPLOYER); + + // Deploy link token and link/native feed. + s_linkToken = new MockLinkToken(); + s_linkNativeFeed = new MockV3Aggregator(18, 500000000000000000); // .5 ETH (good for testing) + + // Deploy coordinator. + s_testCoordinator = new ExposedVRFCoordinatorV2_5_Optimism(address(0)); + + // Create subscription for all future wrapper contracts. + s_wrapperSubscriptionId = s_testCoordinator.createSubscription(); + + // Deploy wrapper. + s_wrapper = new VRFV2PlusWrapper_Optimism( + address(s_linkToken), + address(s_linkNativeFeed), + address(s_testCoordinator), + uint256(s_wrapperSubscriptionId) + ); + + // Configure the wrapper. + s_wrapper.setConfig( + 100_000, // wrapper gas overhead + 200_000, // coordinator gas overhead native + 220_000, // coordinator gas overhead link + 500, // coordinator gas overhead per word + 15, // native premium percentage, + 10, // link premium percentage + vrfKeyHash, // keyHash + 10, // max number of words, + 1, // stalenessSeconds + 50000000000000000, // fallbackWeiPerUnitLink + 500_000, // fulfillmentFlatFeeNativePPM + 100_000 // fulfillmentFlatFeeLinkDiscountPPM + ); + + // Add wrapper as a consumer to the wrapper's subscription. + s_testCoordinator.addConsumer(uint256(s_wrapperSubscriptionId), address(s_wrapper)); + } + + function _mockGasOraclePriceGetL1FeeUpperBoundCall() internal { + // fullfillment tx calldata size = 772 bytes + // RLP-encoded unsigned tx headers (approx padding size) = 71 bytes + // total = 843 bytes + vm.mockCall( + OVM_GASPRICEORACLE_ADDR, + abi.encodeWithSelector(OVM_GasPriceOracle.getL1FeeUpperBound.selector, 843), + abi.encode(uint256(0.02 ether)) + ); + } + + function _mockGasOraclePriceFeeMethods() internal { + // these values are taken from an example transaction on Base Sepolia + vm.mockCall( + OVM_GASPRICEORACLE_ADDR, + abi.encodeWithSelector(bytes4(keccak256("l1BaseFee()"))), + abi.encode(64273426165) + ); + vm.mockCall( + OVM_GASPRICEORACLE_ADDR, + abi.encodeWithSelector(bytes4(keccak256("baseFeeScalar()"))), + abi.encode(1101) + ); + vm.mockCall( + OVM_GASPRICEORACLE_ADDR, + abi.encodeWithSelector(bytes4(keccak256("blobBaseFeeScalar()"))), + abi.encode(659851) + ); + vm.mockCall( + OVM_GASPRICEORACLE_ADDR, + abi.encodeWithSelector(bytes4(keccak256("blobBaseFee()"))), + abi.encode(2126959908362) + ); + vm.mockCall(OVM_GASPRICEORACLE_ADDR, abi.encodeWithSelector(bytes4(keccak256("decimals()"))), abi.encode(6)); + } + + function _checkL1FeeCalculationSetEmittedLogs(uint8 expectedMode, uint8 expectedCoefficient) internal { + VmSafe.Log[] memory entries = vm.getRecordedLogs(); + assertEq(entries.length, 1); + assertEq(entries[0].topics.length, 1); + assertEq(entries[0].topics[0], keccak256("L1FeeCalculationSet(uint8,uint8)")); + (uint8 actualMode, uint8 actualCoefficient) = abi.decode(entries[0].data, (uint8, uint8)); + assertEq(expectedMode, actualMode); + assertEq(expectedCoefficient, actualCoefficient); + } + + function test_setL1FeePaymentMethodOnOptimismWrapper() public { + // check default settings after contract deployment + assertEq(uint256(L1_CALLDATA_GAS_COST_MODE), uint256(s_wrapper.s_l1FeeCalculationMode())); + assertEq(100, uint256(s_wrapper.s_l1FeeCoefficient())); + + vm.recordLogs(); + s_wrapper.setL1FeeCalculation(L1_CALLDATA_GAS_COST_MODE, 70); + + _checkL1FeeCalculationSetEmittedLogs(L1_CALLDATA_GAS_COST_MODE, 70); + assertEq(uint256(L1_CALLDATA_GAS_COST_MODE), uint256(s_wrapper.s_l1FeeCalculationMode())); + assertEq(70, uint256(s_wrapper.s_l1FeeCoefficient())); + + s_wrapper.setL1FeeCalculation(L1_GAS_FEES_UPPER_BOUND_MODE, 30); + + _checkL1FeeCalculationSetEmittedLogs(L1_GAS_FEES_UPPER_BOUND_MODE, 30); + assertEq(uint256(L1_GAS_FEES_UPPER_BOUND_MODE), uint256(s_wrapper.s_l1FeeCalculationMode())); + assertEq(30, uint256(s_wrapper.s_l1FeeCoefficient())); + + // VRFWrapper doesn't support this mode + vm.expectRevert( + abi.encodeWithSelector(VRFV2PlusWrapper_Optimism.UnsupportedL1FeeCalculationMode.selector, L1_GAS_FEES_MODE) + ); + s_wrapper.setL1FeeCalculation(L1_GAS_FEES_MODE, 100); + + // should revert if invalid L1 fee calculation mode is used + vm.expectRevert(abi.encodeWithSelector(OptimismL1Fees.InvalidL1FeeCalculationMode.selector, 6)); + s_wrapper.setL1FeeCalculation(6, 100); + + // should revert if invalid coefficient is used (equal to zero, this would disable L1 fees completely) + vm.expectRevert(abi.encodeWithSelector(OptimismL1Fees.InvalidL1FeeCoefficient.selector, 0)); + s_wrapper.setL1FeeCalculation(L1_GAS_FEES_UPPER_BOUND_MODE, 0); + + // should revert if invalid coefficient is used (larger than 100%) + vm.expectRevert(abi.encodeWithSelector(OptimismL1Fees.InvalidL1FeeCoefficient.selector, 101)); + s_wrapper.setL1FeeCalculation(L1_GAS_FEES_UPPER_BOUND_MODE, 101); + } + + function test_calculateRequestPriceNativeOnOptimismWrapper_UsingCalldataCostCall() public { + s_wrapper.setL1FeeCalculation(L1_CALLDATA_GAS_COST_MODE, 80); + + vm.txGasPrice(1 gwei); + _mockGasOraclePriceFeeMethods(); + uint32 callbackGasLimit = 1_000_000; + uint32 numWords = 5; + uint256 wrapperCostCalculation = s_wrapper.calculateRequestPriceNative(callbackGasLimit, numWords); + // 1e15 is less than 1 percent discrepancy + assertApproxEqAbs(wrapperCostCalculation, 5.02575 * 1e17, 1e15); + } + + function test_calculateRequestPriceLinkOnOptimismWrapper_UsingCalldataCostCall() public { + s_wrapper.setL1FeeCalculation(L1_CALLDATA_GAS_COST_MODE, 80); + + vm.txGasPrice(1 gwei); + _mockGasOraclePriceFeeMethods(); + uint32 callbackGasLimit = 1_000_000; + uint32 numWords = 5; + uint256 wrapperCostCalculation = s_wrapper.calculateRequestPrice(callbackGasLimit, numWords); + // 1e15 is less than 1 percent discrepancy + assertApproxEqAbs(wrapperCostCalculation, 8.04934 * 1e17, 1e15); + } + + function test_calculateRequestPriceNativeOnOptimismWrapper_UsingGetL1FeeUpperBoundCall() public { + s_wrapper.setL1FeeCalculation(L1_GAS_FEES_UPPER_BOUND_MODE, 60); + + vm.txGasPrice(1 gwei); + _mockGasOraclePriceGetL1FeeUpperBoundCall(); + uint32 callbackGasLimit = 1_000_000; + uint32 numWords = 5; + uint256 wrapperCostCalculation = s_wrapper.calculateRequestPriceNative(callbackGasLimit, numWords); + // 1e15 is less than 1 percent discrepancy + assertApproxEqAbs(wrapperCostCalculation, 5.15283 * 1e17, 1e15); + } + + function test_calculateRequestPriceLinkOnOptimismWrapper_UsingGetL1FeeUpperBoundCall() public { + s_wrapper.setL1FeeCalculation(L1_GAS_FEES_UPPER_BOUND_MODE, 60); + + vm.txGasPrice(1 gwei); + _mockGasOraclePriceGetL1FeeUpperBoundCall(); + uint32 callbackGasLimit = 1_000_000; + uint32 numWords = 5; + uint256 wrapperCostCalculation = s_wrapper.calculateRequestPrice(callbackGasLimit, numWords); + // 1e15 is less than 1 percent discrepancy + assertApproxEqAbs(wrapperCostCalculation, 8.29246 * 1e17, 1e15); + } +} diff --git a/contracts/src/v0.8/vrf/testhelpers/Counter.sol b/contracts/src/v0.8/vrf/testhelpers/Counter.sol new file mode 100644 index 00000000000..1ceb7891490 --- /dev/null +++ b/contracts/src/v0.8/vrf/testhelpers/Counter.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +contract Counter { + error AlwaysRevert(); + + uint256 public count = 0; + + function increment() public returns (uint256) { + count += 1; + return count; + } + + function reset() public { + count = 0; + } + + function alwaysRevert() public pure { + revert AlwaysRevert(); + } + + function alwaysRevertWithString() public pure { + revert("always revert"); + } +} diff --git a/contracts/src/v0.8/vrf/testhelpers/VRFCoordinatorTestV2.sol b/contracts/src/v0.8/vrf/testhelpers/VRFCoordinatorTestV2.sol index 04d09e2b9c4..5774b770750 100644 --- a/contracts/src/v0.8/vrf/testhelpers/VRFCoordinatorTestV2.sol +++ b/contracts/src/v0.8/vrf/testhelpers/VRFCoordinatorTestV2.sol @@ -465,8 +465,8 @@ contract VRFCoordinatorTestV2 is } function getRandomnessFromProof( - Proof memory proof, - RequestCommitment memory rc + Proof calldata proof, + RequestCommitment calldata rc ) private view returns (bytes32 keyHash, uint256 requestId, uint256 randomness) { keyHash = hashOfKey(proof.pk); // Only registered proving keys are permitted. @@ -527,7 +527,10 @@ contract VRFCoordinatorTestV2 is * @return payment amount billed to the subscription * @dev simulated offchain to determine if sufficient balance is present to fulfill the request */ - function fulfillRandomWords(Proof memory proof, RequestCommitment memory rc) external nonReentrant returns (uint96) { + function fulfillRandomWords( + Proof calldata proof, + RequestCommitment calldata rc + ) external nonReentrant returns (uint96) { uint256 startGas = gasleft(); (bytes32 keyHash, uint256 requestId, uint256 randomness) = getRandomnessFromProof(proof, rc); diff --git a/contracts/src/v0.8/vrf/testhelpers/VRFTestHelper.sol b/contracts/src/v0.8/vrf/testhelpers/VRFTestHelper.sol index bcead3f0c99..4b794d483e1 100644 --- a/contracts/src/v0.8/vrf/testhelpers/VRFTestHelper.sol +++ b/contracts/src/v0.8/vrf/testhelpers/VRFTestHelper.sol @@ -98,7 +98,7 @@ contract VRFTestHelper is VRF { super._verifyVRFProof(pk, gamma, c, s, seed, uWitness, cGammaWitness, sHashWitness, zInv); } - function randomValueFromVRFProof_(Proof memory proof, uint256 seed) public view returns (uint256 output) { + function randomValueFromVRFProof_(Proof calldata proof, uint256 seed) public view returns (uint256 output) { return super._randomValueFromVRFProof(proof, seed); } } diff --git a/contracts/test/v0.8/L2EP/ArbitrumCrossDomainForwarder.test.ts b/contracts/test/v0.8/L2EP/ArbitrumCrossDomainForwarder.test.ts deleted file mode 100644 index 6b6d8abad1b..00000000000 --- a/contracts/test/v0.8/L2EP/ArbitrumCrossDomainForwarder.test.ts +++ /dev/null @@ -1,194 +0,0 @@ -import { ethers } from 'hardhat' -import { assert, expect } from 'chai' -import { Contract, ContractFactory } from 'ethers' -import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' -import { - impersonateAs, - publicAbi, - toArbitrumL2AliasAddress, -} from '../../test-helpers/helpers' - -let owner: SignerWithAddress -let stranger: SignerWithAddress -let l1OwnerAddress: string -let crossdomainMessenger: SignerWithAddress -let newL1OwnerAddress: string -let newOwnerCrossdomainMessenger: SignerWithAddress -let forwarderFactory: ContractFactory -let greeterFactory: ContractFactory -let forwarder: Contract -let greeter: Contract - -before(async () => { - const accounts = await ethers.getSigners() - owner = accounts[0] - stranger = accounts[1] - l1OwnerAddress = owner.address - newL1OwnerAddress = stranger.address - - // Contract factories - forwarderFactory = await ethers.getContractFactory( - 'src/v0.8/l2ep/dev/arbitrum/ArbitrumCrossDomainForwarder.sol:ArbitrumCrossDomainForwarder', - owner, - ) - greeterFactory = await ethers.getContractFactory( - 'src/v0.8/tests/Greeter.sol:Greeter', - owner, - ) -}) - -describe('ArbitrumCrossDomainForwarder', () => { - beforeEach(async () => { - // governor config - crossdomainMessenger = await impersonateAs( - toArbitrumL2AliasAddress(l1OwnerAddress), - ) - await owner.sendTransaction({ - to: crossdomainMessenger.address, - value: ethers.utils.parseEther('1.0'), - }) - newOwnerCrossdomainMessenger = await impersonateAs( - toArbitrumL2AliasAddress(newL1OwnerAddress), - ) - await owner.sendTransaction({ - to: newOwnerCrossdomainMessenger.address, - value: ethers.utils.parseEther('1.0'), - }) - - forwarder = await forwarderFactory.deploy(l1OwnerAddress) - greeter = await greeterFactory.deploy(forwarder.address) - }) - - it('has a limited public interface [ @skip-coverage ]', async () => { - publicAbi(forwarder, [ - 'typeAndVersion', - 'crossDomainMessenger', - 'forward', - 'l1Owner', - 'transferL1Ownership', - 'acceptL1Ownership', - // ConfirmedOwner methods: - 'owner', - 'transferOwnership', - 'acceptOwnership', - ]) - }) - - describe('#constructor', () => { - it('should set the owner correctly', async () => { - const response = await forwarder.owner() - assert.equal(response, owner.address) - }) - - it('should set the l1Owner correctly', async () => { - const response = await forwarder.l1Owner() - assert.equal(response, l1OwnerAddress) - }) - - it('should set the crossdomain messenger correctly', async () => { - const response = await forwarder.crossDomainMessenger() - assert.equal(response, crossdomainMessenger.address) - }) - - it('should set the typeAndVersion correctly', async () => { - const response = await forwarder.typeAndVersion() - assert.equal(response, 'ArbitrumCrossDomainForwarder 1.0.0') - }) - }) - - describe('#forward', () => { - it('should not be callable by unknown address', async () => { - await expect( - forwarder.connect(stranger).forward(greeter.address, '0x'), - ).to.be.revertedWith('Sender is not the L2 messenger') - }) - - it('should be callable by crossdomain messenger address / L1 owner', async () => { - const newGreeting = 'hello' - const setGreetingData = greeterFactory.interface.encodeFunctionData( - 'setGreeting', - [newGreeting], - ) - await forwarder - .connect(crossdomainMessenger) - .forward(greeter.address, setGreetingData) - - const updatedGreeting = await greeter.greeting() - assert.equal(updatedGreeting, newGreeting) - }) - - it('should revert when contract call reverts', async () => { - const setGreetingData = greeterFactory.interface.encodeFunctionData( - 'setGreeting', - [''], - ) - await expect( - forwarder - .connect(crossdomainMessenger) - .forward(greeter.address, setGreetingData), - ).to.be.revertedWith('Invalid greeting length') - }) - }) - - describe('#transferL1Ownership', () => { - it('should not be callable by non-owners', async () => { - await expect( - forwarder.connect(stranger).transferL1Ownership(stranger.address), - ).to.be.revertedWith('Sender is not the L2 messenger') - }) - - it('should not be callable by L2 owner', async () => { - const forwarderOwner = await forwarder.owner() - assert.equal(forwarderOwner, owner.address) - - await expect( - forwarder.connect(owner).transferL1Ownership(stranger.address), - ).to.be.revertedWith('Sender is not the L2 messenger') - }) - - it('should be callable by current L1 owner', async () => { - const currentL1Owner = await forwarder.l1Owner() - await expect( - forwarder - .connect(crossdomainMessenger) - .transferL1Ownership(newL1OwnerAddress), - ) - .to.emit(forwarder, 'L1OwnershipTransferRequested') - .withArgs(currentL1Owner, newL1OwnerAddress) - }) - - it('should be callable by current L1 owner to zero address', async () => { - const currentL1Owner = await forwarder.l1Owner() - await expect( - forwarder - .connect(crossdomainMessenger) - .transferL1Ownership(ethers.constants.AddressZero), - ) - .to.emit(forwarder, 'L1OwnershipTransferRequested') - .withArgs(currentL1Owner, ethers.constants.AddressZero) - }) - }) - - describe('#acceptL1Ownership', () => { - it('should not be callable by non pending-owners', async () => { - await expect( - forwarder.connect(crossdomainMessenger).acceptL1Ownership(), - ).to.be.revertedWith('Must be proposed L1 owner') - }) - - it('should be callable by pending L1 owner', async () => { - const currentL1Owner = await forwarder.l1Owner() - await forwarder - .connect(crossdomainMessenger) - .transferL1Ownership(newL1OwnerAddress) - await expect( - forwarder.connect(newOwnerCrossdomainMessenger).acceptL1Ownership(), - ) - .to.emit(forwarder, 'L1OwnershipTransferred') - .withArgs(currentL1Owner, newL1OwnerAddress) - - const updatedL1Owner = await forwarder.l1Owner() - assert.equal(updatedL1Owner, newL1OwnerAddress) - }) - }) -}) diff --git a/contracts/test/v0.8/L2EP/ArbitrumCrossDomainGovernor.test.ts b/contracts/test/v0.8/L2EP/ArbitrumCrossDomainGovernor.test.ts deleted file mode 100644 index 96e93e833ec..00000000000 --- a/contracts/test/v0.8/L2EP/ArbitrumCrossDomainGovernor.test.ts +++ /dev/null @@ -1,365 +0,0 @@ -import { ethers } from 'hardhat' -import { assert, expect } from 'chai' -import etherslib, { Contract, ContractFactory } from 'ethers' -import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' -import { - impersonateAs, - publicAbi, - stripHexPrefix, - toArbitrumL2AliasAddress, -} from '../../test-helpers/helpers' - -let owner: SignerWithAddress -let stranger: SignerWithAddress -let l1OwnerAddress: string -let crossdomainMessenger: SignerWithAddress -let newL1OwnerAddress: string -let newOwnerCrossdomainMessenger: SignerWithAddress -let governorFactory: ContractFactory -let greeterFactory: ContractFactory -let multisendFactory: ContractFactory -let governor: Contract -let greeter: Contract -let multisend: Contract - -before(async () => { - const accounts = await ethers.getSigners() - owner = accounts[0] - stranger = accounts[1] - l1OwnerAddress = owner.address - newL1OwnerAddress = stranger.address - - // Contract factories - governorFactory = await ethers.getContractFactory( - 'src/v0.8/l2ep/dev/arbitrum/ArbitrumCrossDomainGovernor.sol:ArbitrumCrossDomainGovernor', - owner, - ) - greeterFactory = await ethers.getContractFactory( - 'src/v0.8/tests/Greeter.sol:Greeter', - owner, - ) - multisendFactory = await ethers.getContractFactory( - 'src/v0.8/vendor/MultiSend.sol:MultiSend', - owner, - ) -}) - -describe('ArbitrumCrossDomainGovernor', () => { - beforeEach(async () => { - // governor config - crossdomainMessenger = await impersonateAs( - toArbitrumL2AliasAddress(l1OwnerAddress), - ) - await owner.sendTransaction({ - to: crossdomainMessenger.address, - value: ethers.utils.parseEther('1.0'), - }) - newOwnerCrossdomainMessenger = await impersonateAs( - toArbitrumL2AliasAddress(newL1OwnerAddress), - ) - await owner.sendTransaction({ - to: newOwnerCrossdomainMessenger.address, - value: ethers.utils.parseEther('1.0'), - }) - - governor = await governorFactory.deploy(l1OwnerAddress) - greeter = await greeterFactory.deploy(governor.address) - multisend = await multisendFactory.deploy() - }) - - it('has a limited public interface [ @skip-coverage ]', async () => { - publicAbi(governor, [ - 'typeAndVersion', - 'crossDomainMessenger', - 'forward', - 'forwardDelegate', - 'l1Owner', - 'transferL1Ownership', - 'acceptL1Ownership', - // ConfirmedOwner methods: - 'owner', - 'transferOwnership', - 'acceptOwnership', - ]) - }) - - describe('#constructor', () => { - it('should set the owner correctly', async () => { - const response = await governor.owner() - assert.equal(response, owner.address) - }) - - it('should set the l1Owner correctly', async () => { - const response = await governor.l1Owner() - assert.equal(response, l1OwnerAddress) - }) - - it('should set the crossdomain messenger correctly', async () => { - const response = await governor.crossDomainMessenger() - assert.equal(response, crossdomainMessenger.address) - }) - - it('should set the typeAndVersion correctly', async () => { - const response = await governor.typeAndVersion() - assert.equal(response, 'ArbitrumCrossDomainGovernor 1.0.0') - }) - }) - - describe('#forward', () => { - it('should not be callable by unknown address', async () => { - await expect( - governor.connect(stranger).forward(greeter.address, '0x'), - ).to.be.revertedWith('Sender is not the L2 messenger or owner') - }) - - it('should be callable by crossdomain messenger address / L1 owner', async () => { - const newGreeting = 'hello' - const setGreetingData = greeterFactory.interface.encodeFunctionData( - 'setGreeting', - [newGreeting], - ) - await governor - .connect(crossdomainMessenger) - .forward(greeter.address, setGreetingData) - - const updatedGreeting = await greeter.greeting() - assert.equal(updatedGreeting, newGreeting) - }) - - it('should be callable by L2 owner', async () => { - const newGreeting = 'hello' - const setGreetingData = greeterFactory.interface.encodeFunctionData( - 'setGreeting', - [newGreeting], - ) - await governor.connect(owner).forward(greeter.address, setGreetingData) - - const updatedGreeting = await greeter.greeting() - assert.equal(updatedGreeting, newGreeting) - }) - - it('should revert when contract call reverts', async () => { - const setGreetingData = greeterFactory.interface.encodeFunctionData( - 'setGreeting', - [''], - ) - await expect( - governor - .connect(crossdomainMessenger) - .forward(greeter.address, setGreetingData), - ).to.be.revertedWith('Invalid greeting length') - }) - }) - - describe('#forwardDelegate', () => { - it('should not be callable by unknown address', async () => { - await expect( - governor.connect(stranger).forwardDelegate(multisend.address, '0x'), - ).to.be.revertedWith('Sender is not the L2 messenger or owner') - }) - - it('should be callable by crossdomain messenger address / L1 owner', async () => { - const calls = [ - { - to: greeter.address, - data: greeterFactory.interface.encodeFunctionData('setGreeting', [ - 'foo', - ]), - value: 0, - }, - { - to: greeter.address, - data: greeterFactory.interface.encodeFunctionData('setGreeting', [ - 'bar', - ]), - value: 0, - }, - ] - const multisendData = encodeMultisendData(multisend.interface, calls) - await governor - .connect(crossdomainMessenger) - .forwardDelegate(multisend.address, multisendData) - - const updatedGreeting = await greeter.greeting() - assert.equal(updatedGreeting, 'bar') - }) - - it('should be callable by L2 owner', async () => { - const calls = [ - { - to: greeter.address, - data: greeterFactory.interface.encodeFunctionData('setGreeting', [ - 'foo', - ]), - value: 0, - }, - { - to: greeter.address, - data: greeterFactory.interface.encodeFunctionData('setGreeting', [ - 'bar', - ]), - value: 0, - }, - ] - const multisendData = encodeMultisendData(multisend.interface, calls) - await governor - .connect(owner) - .forwardDelegate(multisend.address, multisendData) - - const updatedGreeting = await greeter.greeting() - assert.equal(updatedGreeting, 'bar') - }) - - it('should revert batch when one call fails', async () => { - const calls = [ - { - to: greeter.address, - data: greeterFactory.interface.encodeFunctionData('setGreeting', [ - 'foo', - ]), - value: 0, - }, - { - to: greeter.address, - data: greeterFactory.interface.encodeFunctionData('setGreeting', [ - '', // should revert - ]), - value: 0, - }, - ] - const multisendData = encodeMultisendData(multisend.interface, calls) - await expect( - governor - .connect(crossdomainMessenger) - .forwardDelegate(multisend.address, multisendData), - ).to.be.revertedWith('Governor delegatecall reverted') - - const greeting = await greeter.greeting() - assert.equal(greeting, '') // Unchanged - }) - - it('should bubble up revert when contract call reverts', async () => { - const triggerRevertData = - greeterFactory.interface.encodeFunctionData('triggerRevert') - await expect( - governor - .connect(crossdomainMessenger) - .forwardDelegate(greeter.address, triggerRevertData), - ).to.be.revertedWith('Greeter: revert triggered') - }) - }) - - describe('#transferL1Ownership', () => { - it('should not be callable by non-owners', async () => { - await expect( - governor.connect(stranger).transferL1Ownership(stranger.address), - ).to.be.revertedWith('Sender is not the L2 messenger') - }) - - it('should not be callable by L2 owner', async () => { - const governorOwner = await governor.owner() - assert.equal(governorOwner, owner.address) - - await expect( - governor.connect(owner).transferL1Ownership(stranger.address), - ).to.be.revertedWith('Sender is not the L2 messenger') - }) - - it('should be callable by current L1 owner', async () => { - const currentL1Owner = await governor.l1Owner() - await expect( - governor - .connect(crossdomainMessenger) - .transferL1Ownership(newL1OwnerAddress), - ) - .to.emit(governor, 'L1OwnershipTransferRequested') - .withArgs(currentL1Owner, newL1OwnerAddress) - }) - - it('should be callable by current L1 owner to zero address', async () => { - const currentL1Owner = await governor.l1Owner() - await expect( - governor - .connect(crossdomainMessenger) - .transferL1Ownership(ethers.constants.AddressZero), - ) - .to.emit(governor, 'L1OwnershipTransferRequested') - .withArgs(currentL1Owner, ethers.constants.AddressZero) - }) - }) - - describe('#acceptL1Ownership', () => { - it('should not be callable by non pending-owners', async () => { - await expect( - governor.connect(crossdomainMessenger).acceptL1Ownership(), - ).to.be.revertedWith('Must be proposed L1 owner') - }) - - it('should be callable by pending L1 owner', async () => { - const currentL1Owner = await governor.l1Owner() - await governor - .connect(crossdomainMessenger) - .transferL1Ownership(newL1OwnerAddress) - await expect( - governor.connect(newOwnerCrossdomainMessenger).acceptL1Ownership(), - ) - .to.emit(governor, 'L1OwnershipTransferred') - .withArgs(currentL1Owner, newL1OwnerAddress) - - const updatedL1Owner = await governor.l1Owner() - assert.equal(updatedL1Owner, newL1OwnerAddress) - }) - }) -}) - -// Multisend contract helpers - -/** - * Encodes an underlying transaction for the Multisend contract - * - * @param operation 0 for CALL, 1 for DELEGATECALL - * @param to tx target address - * @param value tx value - * @param data tx data - */ -export function encodeTxData( - operation: number, - to: string, - value: number, - data: string, -): string { - let dataBuffer = Buffer.from(stripHexPrefix(data), 'hex') - const types = ['uint8', 'address', 'uint256', 'uint256', 'bytes'] - const values = [operation, to, value, dataBuffer.length, dataBuffer] - let encoded = ethers.utils.solidityPack(types, values) - return stripHexPrefix(encoded) -} - -/** - * Encodes a Multisend call - * - * @param MultisendInterface Ethers Interface object of the Multisend contract - * @param transactions one or more transactions to include in the Multisend call - * @param to tx target address - * @param value tx value - * @param data tx data - */ -export function encodeMultisendData( - MultisendInterface: etherslib.utils.Interface, - transactions: { to: string; value: number; data: string }[], -): string { - let nestedTransactionData = '0x' - for (let transaction of transactions) { - nestedTransactionData += encodeTxData( - 0, - transaction.to, - transaction.value, - transaction.data, - ) - } - const encodedMultisendFnData = MultisendInterface.encodeFunctionData( - 'multiSend', - [nestedTransactionData], - ) - return encodedMultisendFnData -} diff --git a/contracts/test/v0.8/L2EP/ArbitrumSequencerUptimeFeed.test.ts b/contracts/test/v0.8/L2EP/ArbitrumSequencerUptimeFeed.test.ts deleted file mode 100644 index 5b101a34a31..00000000000 --- a/contracts/test/v0.8/L2EP/ArbitrumSequencerUptimeFeed.test.ts +++ /dev/null @@ -1,415 +0,0 @@ -import { ethers, network } from 'hardhat' -import { BigNumber, Contract } from 'ethers' -import { expect } from 'chai' -import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' - -describe('ArbitrumSequencerUptimeFeed', () => { - let flags: Contract - let arbitrumSequencerUptimeFeed: Contract - let accessController: Contract - let uptimeFeedConsumer: Contract - let deployer: SignerWithAddress - let l1Owner: SignerWithAddress - let l2Messenger: SignerWithAddress - const gasUsedDeviation = 100 - - before(async () => { - const accounts = await ethers.getSigners() - deployer = accounts[0] - l1Owner = accounts[1] - const dummy = accounts[2] - const l2MessengerAddress = ethers.utils.getAddress( - BigNumber.from(l1Owner.address) - .add('0x1111000000000000000000000000000000001111') - .toHexString(), - ) - // Pretend we're on L2 - await network.provider.request({ - method: 'hardhat_impersonateAccount', - params: [l2MessengerAddress], - }) - l2Messenger = await ethers.getSigner(l2MessengerAddress) - // Credit the L2 messenger with some ETH - await dummy.sendTransaction({ - to: l2Messenger.address, - value: (await dummy.getBalance()).sub(ethers.utils.parseEther('0.1')), - }) - }) - - beforeEach(async () => { - const accessControllerFactory = await ethers.getContractFactory( - 'src/v0.8/shared/access/SimpleWriteAccessController.sol:SimpleWriteAccessController', - deployer, - ) - accessController = await accessControllerFactory.deploy() - - const flagsHistoryFactory = await ethers.getContractFactory( - 'src/v0.8/l2ep/dev/Flags.sol:Flags', - deployer, - ) - flags = await flagsHistoryFactory.deploy( - accessController.address, - accessController.address, - ) - await accessController.addAccess(flags.address) - - const arbitrumSequencerStatusRecorderFactory = - await ethers.getContractFactory( - 'src/v0.8/l2ep/dev/arbitrum/ArbitrumSequencerUptimeFeed.sol:ArbitrumSequencerUptimeFeed', - deployer, - ) - arbitrumSequencerUptimeFeed = - await arbitrumSequencerStatusRecorderFactory.deploy( - flags.address, - l1Owner.address, - ) - // Required for ArbitrumSequencerUptimeFeed to raise/lower flags - await accessController.addAccess(arbitrumSequencerUptimeFeed.address) - // Required for ArbitrumSequencerUptimeFeed to read flags - await flags.addAccess(arbitrumSequencerUptimeFeed.address) - - // Deployer requires access to invoke initialize - await accessController.addAccess(deployer.address) - // Once ArbitrumSequencerUptimeFeed has access, we can initialise the 0th aggregator round - const initTx = await arbitrumSequencerUptimeFeed - .connect(deployer) - .initialize() - await expect(initTx).to.emit(arbitrumSequencerUptimeFeed, 'Initialized') - - // Mock consumer - const statusFeedConsumerFactory = await ethers.getContractFactory( - 'src/v0.8/tests/FeedConsumer.sol:FeedConsumer', - deployer, - ) - uptimeFeedConsumer = await statusFeedConsumerFactory.deploy( - arbitrumSequencerUptimeFeed.address, - ) - }) - - describe('constants', () => { - it('should have the correct value for FLAG_L2_SEQ_OFFLINE', async () => { - const flag: string = - await arbitrumSequencerUptimeFeed.FLAG_L2_SEQ_OFFLINE() - expect(flag.toLowerCase()).to.equal( - '0xa438451d6458044c3c8cd2f6f31c91ac882a6d91', - ) - }) - }) - - describe('#updateStatus', () => { - it(`should update status when status has changed and incoming timestamp is newer than the latest`, async () => { - let timestamp = await arbitrumSequencerUptimeFeed.latestTimestamp() - let tx = await arbitrumSequencerUptimeFeed - .connect(l2Messenger) - .updateStatus(true, timestamp) - await expect(tx) - .to.emit(arbitrumSequencerUptimeFeed, 'AnswerUpdated') - .withArgs(1, 2 /** roundId */, timestamp) - expect(await arbitrumSequencerUptimeFeed.latestAnswer()).to.equal(1) - - // Submit another status update, same status, newer timestamp, should ignore - tx = await arbitrumSequencerUptimeFeed - .connect(l2Messenger) - .updateStatus(true, timestamp.add(1000)) - await expect(tx).not.to.emit(arbitrumSequencerUptimeFeed, 'AnswerUpdated') - await expect(tx).to.emit(arbitrumSequencerUptimeFeed, 'UpdateIgnored') - expect(await arbitrumSequencerUptimeFeed.latestAnswer()).to.equal('1') - expect(await arbitrumSequencerUptimeFeed.latestTimestamp()).to.equal( - timestamp, - ) - - // Submit another status update, different status, newer timestamp should update - timestamp = timestamp.add(2000) - tx = await arbitrumSequencerUptimeFeed - .connect(l2Messenger) - .updateStatus(false, timestamp) - await expect(tx) - .to.emit(arbitrumSequencerUptimeFeed, 'AnswerUpdated') - .withArgs(0, 3 /** roundId */, timestamp) - expect(await arbitrumSequencerUptimeFeed.latestAnswer()).to.equal(0) - expect(await arbitrumSequencerUptimeFeed.latestTimestamp()).to.equal( - timestamp, - ) - }) - - it(`should update status when status has changed and incoming timestamp is the same as latest`, async () => { - const timestamp = await arbitrumSequencerUptimeFeed.latestTimestamp() - let tx = await arbitrumSequencerUptimeFeed - .connect(l2Messenger) - .updateStatus(true, timestamp) - await expect(tx) - .to.emit(arbitrumSequencerUptimeFeed, 'AnswerUpdated') - .withArgs(1, 2 /** roundId */, timestamp) - expect(await arbitrumSequencerUptimeFeed.latestAnswer()).to.equal(1) - - // Submit another status update, same status, same timestamp, should ignore - tx = await arbitrumSequencerUptimeFeed - .connect(l2Messenger) - .updateStatus(true, timestamp) - await expect(tx).not.to.emit(arbitrumSequencerUptimeFeed, 'AnswerUpdated') - await expect(tx).to.emit(arbitrumSequencerUptimeFeed, 'UpdateIgnored') - expect(await arbitrumSequencerUptimeFeed.latestAnswer()).to.equal('1') - expect(await arbitrumSequencerUptimeFeed.latestTimestamp()).to.equal( - timestamp, - ) - - // Submit another status update, different status, same timestamp should update - tx = await arbitrumSequencerUptimeFeed - .connect(l2Messenger) - .updateStatus(false, timestamp) - await expect(tx) - .to.emit(arbitrumSequencerUptimeFeed, 'AnswerUpdated') - .withArgs(0, 3 /** roundId */, timestamp) - expect(await arbitrumSequencerUptimeFeed.latestAnswer()).to.equal(0) - expect(await arbitrumSequencerUptimeFeed.latestTimestamp()).to.equal( - timestamp, - ) - }) - - it('should ignore out-of-order updates', async () => { - const timestamp = ( - await arbitrumSequencerUptimeFeed.latestTimestamp() - ).add(10_000) - // Update status - let tx = await arbitrumSequencerUptimeFeed - .connect(l2Messenger) - .updateStatus(true, timestamp) - await expect(tx) - .to.emit(arbitrumSequencerUptimeFeed, 'AnswerUpdated') - .withArgs(1, 2 /** roundId */, timestamp) - expect(await arbitrumSequencerUptimeFeed.latestAnswer()).to.equal(1) - - // Update with different status, but stale timestamp, should be ignored - const staleTimestamp = timestamp.sub(1000) - tx = await arbitrumSequencerUptimeFeed - .connect(l2Messenger) - .updateStatus(false, staleTimestamp) - await expect(tx).to.not.emit(arbitrumSequencerUptimeFeed, 'AnswerUpdated') - await expect(tx).to.emit(arbitrumSequencerUptimeFeed, 'UpdateIgnored') - }) - }) - - describe('AggregatorV3Interface', () => { - it('should return valid answer from getRoundData and latestRoundData', async () => { - let [roundId, answer, startedAt, updatedAt, answeredInRound] = - await arbitrumSequencerUptimeFeed.latestRoundData() - expect(roundId).to.equal(1) - expect(answer).to.equal(0) - expect(answeredInRound).to.equal(roundId) - expect(startedAt).to.equal(updatedAt) // startedAt = updatedAt = timestamp - - // Submit status update with different status and newer timestamp, should update - const timestamp = (startedAt as BigNumber).add(1000) - await arbitrumSequencerUptimeFeed - .connect(l2Messenger) - .updateStatus(true, timestamp) - ;[roundId, answer, startedAt, updatedAt, answeredInRound] = - await arbitrumSequencerUptimeFeed.getRoundData(2) - expect(roundId).to.equal(2) - expect(answer).to.equal(1) - expect(answeredInRound).to.equal(roundId) - expect(startedAt).to.equal(timestamp) - expect(updatedAt).to.equal(startedAt) - - // Check that last round is still returning the correct data - ;[roundId, answer, startedAt, updatedAt, answeredInRound] = - await arbitrumSequencerUptimeFeed.getRoundData(1) - expect(roundId).to.equal(1) - expect(answer).to.equal(0) - expect(answeredInRound).to.equal(roundId) - expect(startedAt).to.equal(updatedAt) - - // Assert latestRoundData corresponds to latest round id - expect(await arbitrumSequencerUptimeFeed.getRoundData(2)).to.deep.equal( - await arbitrumSequencerUptimeFeed.latestRoundData(), - ) - }) - - it('should return 0 from #getRoundData when round does not yet exist (future roundId)', async () => { - const [roundId, answer, startedAt, updatedAt, answeredInRound] = - await arbitrumSequencerUptimeFeed.getRoundData(2) - expect(roundId).to.equal(2) - expect(answer).to.equal(0) - expect(startedAt).to.equal(0) - expect(updatedAt).to.equal(0) - expect(answeredInRound).to.equal(2) - }) - }) - - describe('Protect reads on AggregatorV2V3Interface functions', () => { - it('should disallow reads on AggregatorV2V3Interface functions when consuming contract is not whitelisted', async () => { - // Sanity - consumer is not whitelisted - expect(await arbitrumSequencerUptimeFeed.checkEnabled()).to.be.true - expect( - await arbitrumSequencerUptimeFeed.hasAccess( - uptimeFeedConsumer.address, - '0x00', - ), - ).to.be.false - - // Assert reads are not possible from consuming contract - await expect(uptimeFeedConsumer.latestAnswer()).to.be.revertedWith( - 'No access', - ) - await expect(uptimeFeedConsumer.latestRoundData()).to.be.revertedWith( - 'No access', - ) - }) - - it('should allow reads on AggregatorV2V3Interface functions when consuming contract is whitelisted', async () => { - // Whitelist consumer - await arbitrumSequencerUptimeFeed.addAccess(uptimeFeedConsumer.address) - // Sanity - consumer is whitelisted - expect(await arbitrumSequencerUptimeFeed.checkEnabled()).to.be.true - expect( - await arbitrumSequencerUptimeFeed.hasAccess( - uptimeFeedConsumer.address, - '0x00', - ), - ).to.be.true - - // Assert reads are possible from consuming contract - expect(await uptimeFeedConsumer.latestAnswer()).to.be.equal('0') - const [roundId, answer] = await uptimeFeedConsumer.latestRoundData() - expect(roundId).to.equal(1) - expect(answer).to.equal(0) - }) - }) - - describe('Gas costs', () => { - it('should consume a known amount of gas for updates @skip-coverage', async () => { - // Sanity - start at flag = 0 (`false`) - expect(await arbitrumSequencerUptimeFeed.latestAnswer()).to.equal(0) - let timestamp = await arbitrumSequencerUptimeFeed.latestTimestamp() - - // Gas for no update - timestamp = timestamp.add(1000) - const _noUpdateTx = await arbitrumSequencerUptimeFeed - .connect(l2Messenger) - .updateStatus(false, timestamp) - const noUpdateTx = await _noUpdateTx.wait(1) - // Assert no update - expect(await arbitrumSequencerUptimeFeed.latestAnswer()).to.equal(0) - expect(noUpdateTx.cumulativeGasUsed.toNumber()).to.be.closeTo( - 28300, - gasUsedDeviation, - ) - - // Gas for update - timestamp = timestamp.add(1000) - const _updateTx = await arbitrumSequencerUptimeFeed - .connect(l2Messenger) - .updateStatus(true, timestamp) - const updateTx = await _updateTx.wait(1) - // Assert update - expect(await arbitrumSequencerUptimeFeed.latestAnswer()).to.equal(1) - expect(updateTx.cumulativeGasUsed.toNumber()).to.be.closeTo( - 93015, - gasUsedDeviation, - ) - }) - - describe('Aggregator interface', () => { - beforeEach(async () => { - const timestamp = ( - await arbitrumSequencerUptimeFeed.latestTimestamp() - ).add(1000) - // Initialise a round - await arbitrumSequencerUptimeFeed - .connect(l2Messenger) - .updateStatus(true, timestamp) - }) - - it('should consume a known amount of gas for getRoundData(uint80) @skip-coverage', async () => { - const _tx = await l2Messenger.sendTransaction( - await arbitrumSequencerUptimeFeed - .connect(l2Messenger) - .populateTransaction.getRoundData(1), - ) - const tx = await _tx.wait(1) - expect(tx.cumulativeGasUsed.toNumber()).to.be.closeTo( - 31157, - gasUsedDeviation, - ) - }) - - it('should consume a known amount of gas for latestRoundData() @skip-coverage', async () => { - const _tx = await l2Messenger.sendTransaction( - await arbitrumSequencerUptimeFeed - .connect(l2Messenger) - .populateTransaction.latestRoundData(), - ) - const tx = await _tx.wait(1) - expect(tx.cumulativeGasUsed.toNumber()).to.be.closeTo( - 28523, - gasUsedDeviation, - ) - }) - - it('should consume a known amount of gas for latestAnswer() @skip-coverage', async () => { - const _tx = await l2Messenger.sendTransaction( - await arbitrumSequencerUptimeFeed - .connect(l2Messenger) - .populateTransaction.latestAnswer(), - ) - const tx = await _tx.wait(1) - expect(tx.cumulativeGasUsed.toNumber()).to.be.closeTo( - 28329, - gasUsedDeviation, - ) - }) - - it('should consume a known amount of gas for latestTimestamp() @skip-coverage', async () => { - const _tx = await l2Messenger.sendTransaction( - await arbitrumSequencerUptimeFeed - .connect(l2Messenger) - .populateTransaction.latestTimestamp(), - ) - const tx = await _tx.wait(1) - expect(tx.cumulativeGasUsed.toNumber()).to.be.closeTo( - 28229, - gasUsedDeviation, - ) - }) - - it('should consume a known amount of gas for latestRound() @skip-coverage', async () => { - const _tx = await l2Messenger.sendTransaction( - await arbitrumSequencerUptimeFeed - .connect(l2Messenger) - .populateTransaction.latestRound(), - ) - const tx = await _tx.wait(1) - expect(tx.cumulativeGasUsed.toNumber()).to.be.closeTo( - 28245, - gasUsedDeviation, - ) - }) - - it('should consume a known amount of gas for getAnswer(roundId) @skip-coverage', async () => { - const _tx = await l2Messenger.sendTransaction( - await arbitrumSequencerUptimeFeed - .connect(l2Messenger) - .populateTransaction.getAnswer(1), - ) - const tx = await _tx.wait(1) - expect(tx.cumulativeGasUsed.toNumber()).to.be.closeTo( - 30799, - gasUsedDeviation, - ) - }) - - it('should consume a known amount of gas for getTimestamp(roundId) @skip-coverage', async () => { - const _tx = await l2Messenger.sendTransaction( - await arbitrumSequencerUptimeFeed - .connect(l2Messenger) - .populateTransaction.getTimestamp(1), - ) - const tx = await _tx.wait(1) - expect(tx.cumulativeGasUsed.toNumber()).to.be.closeTo( - 30753, - gasUsedDeviation, - ) - }) - }) - }) -}) diff --git a/contracts/test/v0.8/L2EP/ArbitrumValidator.test.ts b/contracts/test/v0.8/L2EP/ArbitrumValidator.test.ts deleted file mode 100644 index 232eea95839..00000000000 --- a/contracts/test/v0.8/L2EP/ArbitrumValidator.test.ts +++ /dev/null @@ -1,134 +0,0 @@ -import { ethers } from 'hardhat' -import { BigNumber, BigNumberish, Contract, ContractFactory } from 'ethers' -import { expect } from 'chai' -import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' -import { - deployMockContract, - MockContract, -} from '@ethereum-waffle/mock-contract' -/// Pick ABIs from compilation -// @ts-ignore -import { abi as arbitrumSequencerStatusRecorderAbi } from '../../../artifacts/src/v0.8/l2ep/dev/arbitrum/ArbitrumSequencerUptimeFeed.sol/ArbitrumSequencerUptimeFeed.json' -// @ts-ignore -import { abi as arbitrumInboxAbi } from '../../../artifacts/src/v0.8/vendor/arb-bridge-eth/v0.8.0-custom/contracts/bridge/interfaces/IInbox.sol/IInbox.json' -// @ts-ignore -import { abi as aggregatorAbi } from '../../../artifacts/src/v0.8/shared/interfaces/AggregatorV2V3Interface.sol/AggregatorV2V3Interface.json' - -const truncateBigNumToAddress = (num: BigNumberish) => { - // Pad, then slice off '0x' prefix - const hexWithoutPrefix = BigNumber.from(num).toHexString().slice(2) - // Ethereum address is 20B -> 40 hex chars w/o 0x prefix - const truncated = hexWithoutPrefix - .split('') - .reverse() - .slice(0, 40) - .reverse() - .join('') - return '0x' + truncated -} - -describe('ArbitrumValidator', () => { - const MAX_GAS = BigNumber.from(1_000_000) - const GAS_PRICE_BID = BigNumber.from(1_000_000) - const BASE_FEE = BigNumber.from(14_000_000_000) - /** Fake L2 target */ - const L2_SEQ_STATUS_RECORDER_ADDRESS = - '0x491B1dDA0A8fa069bbC1125133A975BF4e85a91b' - let arbitrumValidator: Contract - let accessController: Contract - let arbitrumSequencerStatusRecorderFactory: ContractFactory - let mockArbitrumInbox: Contract - let l1GasFeed: MockContract - let deployer: SignerWithAddress - let eoaValidator: SignerWithAddress - let arbitrumValidatorL2Address: string - before(async () => { - const accounts = await ethers.getSigners() - deployer = accounts[0] - eoaValidator = accounts[1] - }) - - beforeEach(async () => { - const accessControllerFactory = await ethers.getContractFactory( - 'src/v0.8/shared/access/SimpleWriteAccessController.sol:SimpleWriteAccessController', - deployer, - ) - accessController = await accessControllerFactory.deploy() - - // Required for building the calldata - arbitrumSequencerStatusRecorderFactory = await ethers.getContractFactory( - 'src/v0.8/l2ep/dev/arbitrum/ArbitrumSequencerUptimeFeed.sol:ArbitrumSequencerUptimeFeed', - deployer, - ) - l1GasFeed = await deployMockContract(deployer as any, aggregatorAbi) - await l1GasFeed.mock.latestRoundData.returns( - '73786976294838220258' /** roundId */, - '96800000000' /** answer */, - '163826896' /** startedAt */, - '1638268960' /** updatedAt */, - '73786976294838220258' /** answeredInRound */, - ) - // Arbitrum Inbox contract on L1 - const mockArbitrumInboxFactory = await ethers.getContractFactory( - 'src/v0.8/tests/MockArbitrumInbox.sol:MockArbitrumInbox', - ) - mockArbitrumInbox = await mockArbitrumInboxFactory.deploy() - - // Contract under test - const arbitrumValidatorFactory = await ethers.getContractFactory( - 'src/v0.8/l2ep/dev/arbitrum/ArbitrumValidator.sol:ArbitrumValidator', - deployer, - ) - arbitrumValidator = await arbitrumValidatorFactory.deploy( - mockArbitrumInbox.address, - L2_SEQ_STATUS_RECORDER_ADDRESS, - accessController.address, - MAX_GAS /** L1 gas bid */, - GAS_PRICE_BID /** L2 gas bid */, - BASE_FEE, - l1GasFeed.address, - 0, - ) - // Transfer some ETH to the ArbitrumValidator contract - await deployer.sendTransaction({ - to: arbitrumValidator.address, - value: ethers.utils.parseEther('1.0'), - }) - arbitrumValidatorL2Address = ethers.utils.getAddress( - truncateBigNumToAddress( - BigNumber.from(arbitrumValidator.address).add( - '0x1111000000000000000000000000000000001111', - ), - ), - ) - }) - - describe('#validate', () => { - it('post sequencer offline', async () => { - await arbitrumValidator.addAccess(eoaValidator.address) - - const now = Math.ceil(Date.now() / 1000) + 1000 - await ethers.provider.send('evm_setNextBlockTimestamp', [now]) - const arbitrumSequencerStatusRecorderCallData = - arbitrumSequencerStatusRecorderFactory.interface.encodeFunctionData( - 'updateStatus', - [true, now], - ) - await expect(arbitrumValidator.connect(eoaValidator).validate(0, 0, 1, 1)) - .to.emit( - mockArbitrumInbox, - 'RetryableTicketNoRefundAliasRewriteCreated', - ) - .withArgs( - L2_SEQ_STATUS_RECORDER_ADDRESS, - 0, - '25312000000000', - arbitrumValidatorL2Address, - arbitrumValidatorL2Address, - MAX_GAS, - GAS_PRICE_BID, - arbitrumSequencerStatusRecorderCallData, - ) - }) - }) -}) diff --git a/contracts/test/v0.8/L2EP/CrossDomainOwnable.test.ts b/contracts/test/v0.8/L2EP/CrossDomainOwnable.test.ts deleted file mode 100644 index 7d9d58cfbaa..00000000000 --- a/contracts/test/v0.8/L2EP/CrossDomainOwnable.test.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { ethers } from 'hardhat' -import { assert, expect } from 'chai' -import { Contract, ContractFactory } from 'ethers' -import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' - -let owner: SignerWithAddress -let stranger: SignerWithAddress -let l1OwnerAddress: string -let ownableFactory: ContractFactory -let ownable: Contract - -before(async () => { - const accounts = await ethers.getSigners() - owner = accounts[0] - stranger = accounts[1] - l1OwnerAddress = owner.address - - // Contract factories - ownableFactory = await ethers.getContractFactory( - 'src/v0.8/l2ep/dev/CrossDomainOwnable.sol:CrossDomainOwnable', - owner, - ) -}) - -describe('CrossDomainOwnable', () => { - beforeEach(async () => { - ownable = await ownableFactory.deploy(l1OwnerAddress) - }) - - describe('#constructor', () => { - it('should set the l1Owner correctly', async () => { - const response = await ownable.l1Owner() - assert.equal(response, l1OwnerAddress) - }) - }) - - describe('#transferL1Ownership', () => { - it('should not be callable by non-owners', async () => { - await expect( - ownable.connect(stranger).transferL1Ownership(stranger.address), - ).to.be.revertedWith('Only callable by L1 owner') - }) - - it('should be callable by current L1 owner', async () => { - const currentL1Owner = await ownable.l1Owner() - await expect(ownable.transferL1Ownership(stranger.address)) - .to.emit(ownable, 'L1OwnershipTransferRequested') - .withArgs(currentL1Owner, stranger.address) - }) - - it('should be callable by current L1 owner to zero address', async () => { - const currentL1Owner = await ownable.l1Owner() - await expect(ownable.transferL1Ownership(ethers.constants.AddressZero)) - .to.emit(ownable, 'L1OwnershipTransferRequested') - .withArgs(currentL1Owner, ethers.constants.AddressZero) - }) - }) - - describe('#acceptL1Ownership', () => { - it('should not be callable by non pending-owners', async () => { - await expect( - ownable.connect(stranger).acceptL1Ownership(), - ).to.be.revertedWith('Only callable by proposed L1 owner') - }) - - it('should be callable by pending L1 owner', async () => { - const currentL1Owner = await ownable.l1Owner() - await ownable.transferL1Ownership(stranger.address) - await expect(ownable.connect(stranger).acceptL1Ownership()) - .to.emit(ownable, 'L1OwnershipTransferred') - .withArgs(currentL1Owner, stranger.address) - - const updatedL1Owner = await ownable.l1Owner() - assert.equal(updatedL1Owner, stranger.address) - }) - }) -}) diff --git a/contracts/test/v0.8/L2EP/OptimismCrossDomainForwarder.test.ts b/contracts/test/v0.8/L2EP/OptimismCrossDomainForwarder.test.ts deleted file mode 100644 index 3b75b412bfd..00000000000 --- a/contracts/test/v0.8/L2EP/OptimismCrossDomainForwarder.test.ts +++ /dev/null @@ -1,224 +0,0 @@ -import { ethers } from 'hardhat' -import { assert, expect } from 'chai' -import { Contract, ContractFactory } from 'ethers' -import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' -import { publicAbi } from '../../test-helpers/helpers' - -let owner: SignerWithAddress -let stranger: SignerWithAddress -let l1OwnerAddress: string -let newL1OwnerAddress: string -let forwarderFactory: ContractFactory -let greeterFactory: ContractFactory -let crossDomainMessengerFactory: ContractFactory -let crossDomainMessenger: Contract -let forwarder: Contract -let greeter: Contract - -before(async () => { - const accounts = await ethers.getSigners() - owner = accounts[0] - stranger = accounts[1] - - // forwarder config - l1OwnerAddress = owner.address - newL1OwnerAddress = stranger.address - - // Contract factories - forwarderFactory = await ethers.getContractFactory( - 'src/v0.8/l2ep/dev/optimism/OptimismCrossDomainForwarder.sol:OptimismCrossDomainForwarder', - owner, - ) - greeterFactory = await ethers.getContractFactory( - 'src/v0.8/tests/Greeter.sol:Greeter', - owner, - ) - crossDomainMessengerFactory = await ethers.getContractFactory( - 'src/v0.8/vendor/MockOVMCrossDomainMessenger.sol:MockOVMCrossDomainMessenger', - ) -}) - -describe('OptimismCrossDomainForwarder', () => { - beforeEach(async () => { - crossDomainMessenger = - await crossDomainMessengerFactory.deploy(l1OwnerAddress) - forwarder = await forwarderFactory.deploy( - crossDomainMessenger.address, - l1OwnerAddress, - ) - greeter = await greeterFactory.deploy(forwarder.address) - }) - - it('has a limited public interface [ @skip-coverage ]', async () => { - publicAbi(forwarder, [ - 'typeAndVersion', - 'crossDomainMessenger', - 'forward', - 'l1Owner', - 'transferL1Ownership', - 'acceptL1Ownership', - // ConfirmedOwner methods: - 'owner', - 'transferOwnership', - 'acceptOwnership', - ]) - }) - - describe('#constructor', () => { - it('should set the owner correctly', async () => { - const response = await forwarder.owner() - assert.equal(response, owner.address) - }) - - it('should set the l1Owner correctly', async () => { - const response = await forwarder.l1Owner() - assert.equal(response, l1OwnerAddress) - }) - - it('should set the crossdomain messenger correctly', async () => { - const response = await forwarder.crossDomainMessenger() - assert.equal(response, crossDomainMessenger.address) - }) - - it('should set the typeAndVersion correctly', async () => { - const response = await forwarder.typeAndVersion() - assert.equal(response, 'OptimismCrossDomainForwarder 1.0.0') - }) - }) - - describe('#forward', () => { - it('should not be callable by unknown address', async () => { - await expect( - forwarder.connect(stranger).forward(greeter.address, '0x'), - ).to.be.revertedWith('Sender is not the L2 messenger') - }) - - it('should be callable by crossdomain messenger address / L1 owner', async () => { - const newGreeting = 'hello' - const setGreetingData = greeterFactory.interface.encodeFunctionData( - 'setGreeting', - [newGreeting], - ) - const forwardData = forwarderFactory.interface.encodeFunctionData( - 'forward', - [greeter.address, setGreetingData], - ) - await crossDomainMessenger // Simulate cross-chain OVM message - .connect(stranger) - .sendMessage(forwarder.address, forwardData, 0) - - const updatedGreeting = await greeter.greeting() - assert.equal(updatedGreeting, newGreeting) - }) - - it('should revert when contract call reverts', async () => { - const setGreetingData = greeterFactory.interface.encodeFunctionData( - 'setGreeting', - [''], - ) - const forwardData = forwarderFactory.interface.encodeFunctionData( - 'forward', - [greeter.address, setGreetingData], - ) - await expect( - crossDomainMessenger // Simulate cross-chain OVM message - .connect(stranger) - .sendMessage(forwarder.address, forwardData, 0), - ).to.be.revertedWith('Invalid greeting length') - }) - }) - - describe('#transferL1Ownership', () => { - it('should not be callable by non-owners', async () => { - await expect( - forwarder.connect(stranger).transferL1Ownership(stranger.address), - ).to.be.revertedWith('Sender is not the L2 messenger') - }) - - it('should not be callable by L2 owner', async () => { - const forwarderOwner = await forwarder.owner() - assert.equal(forwarderOwner, owner.address) - - await expect( - forwarder.connect(owner).transferL1Ownership(stranger.address), - ).to.be.revertedWith('Sender is not the L2 messenger') - }) - - it('should be callable by current L1 owner', async () => { - const currentL1Owner = await forwarder.l1Owner() - const forwardData = forwarderFactory.interface.encodeFunctionData( - 'transferL1Ownership', - [newL1OwnerAddress], - ) - - await expect( - crossDomainMessenger // Simulate cross-chain OVM message - .connect(stranger) - .sendMessage(forwarder.address, forwardData, 0), - ) - .to.emit(forwarder, 'L1OwnershipTransferRequested') - .withArgs(currentL1Owner, newL1OwnerAddress) - }) - - it('should be callable by current L1 owner to zero address', async () => { - const currentL1Owner = await forwarder.l1Owner() - const forwardData = forwarderFactory.interface.encodeFunctionData( - 'transferL1Ownership', - [ethers.constants.AddressZero], - ) - - await expect( - crossDomainMessenger // Simulate cross-chain OVM message - .connect(stranger) - .sendMessage(forwarder.address, forwardData, 0), - ) - .to.emit(forwarder, 'L1OwnershipTransferRequested') - .withArgs(currentL1Owner, ethers.constants.AddressZero) - }) - }) - - describe('#acceptL1Ownership', () => { - it('should not be callable by non pending-owners', async () => { - const forwardData = forwarderFactory.interface.encodeFunctionData( - 'acceptL1Ownership', - [], - ) - await expect( - crossDomainMessenger // Simulate cross-chain OVM message - .connect(stranger) - .sendMessage(forwarder.address, forwardData, 0), - ).to.be.revertedWith('Must be proposed L1 owner') - }) - - it('should be callable by pending L1 owner', async () => { - const currentL1Owner = await forwarder.l1Owner() - - // Transfer ownership - const forwardTransferData = forwarderFactory.interface.encodeFunctionData( - 'transferL1Ownership', - [newL1OwnerAddress], - ) - await crossDomainMessenger // Simulate cross-chain OVM message - .connect(stranger) - .sendMessage(forwarder.address, forwardTransferData, 0) - - const forwardAcceptData = forwarderFactory.interface.encodeFunctionData( - 'acceptL1Ownership', - [], - ) - // Simulate cross-chain message from another sender - await crossDomainMessenger._setMockMessageSender(newL1OwnerAddress) - - await expect( - crossDomainMessenger // Simulate cross-chain OVM message - .connect(stranger) - .sendMessage(forwarder.address, forwardAcceptData, 0), - ) - .to.emit(forwarder, 'L1OwnershipTransferred') - .withArgs(currentL1Owner, newL1OwnerAddress) - - const updatedL1Owner = await forwarder.l1Owner() - assert.equal(updatedL1Owner, newL1OwnerAddress) - }) - }) -}) diff --git a/contracts/test/v0.8/L2EP/OptimismCrossDomainGovernor.test.ts b/contracts/test/v0.8/L2EP/OptimismCrossDomainGovernor.test.ts deleted file mode 100644 index 7fbd0f9aa23..00000000000 --- a/contracts/test/v0.8/L2EP/OptimismCrossDomainGovernor.test.ts +++ /dev/null @@ -1,409 +0,0 @@ -import { ethers } from 'hardhat' -import { assert, expect } from 'chai' -import etherslib, { Contract, ContractFactory } from 'ethers' -import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' -import { publicAbi, stripHexPrefix } from '../../test-helpers/helpers' - -let owner: SignerWithAddress -let stranger: SignerWithAddress -let l1OwnerAddress: string -let newL1OwnerAddress: string -let governorFactory: ContractFactory -let greeterFactory: ContractFactory -let multisendFactory: ContractFactory -let crossDomainMessengerFactory: ContractFactory -let crossDomainMessenger: Contract -let governor: Contract -let greeter: Contract -let multisend: Contract - -before(async () => { - const accounts = await ethers.getSigners() - owner = accounts[0] - stranger = accounts[1] - - // governor config - l1OwnerAddress = owner.address - newL1OwnerAddress = stranger.address - - // Contract factories - governorFactory = await ethers.getContractFactory( - 'src/v0.8/l2ep/dev/optimism/OptimismCrossDomainGovernor.sol:OptimismCrossDomainGovernor', - owner, - ) - greeterFactory = await ethers.getContractFactory( - 'src/v0.8/tests/Greeter.sol:Greeter', - owner, - ) - multisendFactory = await ethers.getContractFactory( - 'src/v0.8/vendor/MultiSend.sol:MultiSend', - owner, - ) - crossDomainMessengerFactory = await ethers.getContractFactory( - 'src/v0.8/vendor/MockOVMCrossDomainMessenger.sol:MockOVMCrossDomainMessenger', - ) -}) - -describe('OptimismCrossDomainGovernor', () => { - beforeEach(async () => { - crossDomainMessenger = - await crossDomainMessengerFactory.deploy(l1OwnerAddress) - governor = await governorFactory.deploy( - crossDomainMessenger.address, - l1OwnerAddress, - ) - greeter = await greeterFactory.deploy(governor.address) - multisend = await multisendFactory.deploy() - }) - - it('has a limited public interface [ @skip-coverage ]', async () => { - publicAbi(governor, [ - 'typeAndVersion', - 'crossDomainMessenger', - 'forward', - 'forwardDelegate', - 'l1Owner', - 'transferL1Ownership', - 'acceptL1Ownership', - // ConfirmedOwner methods: - 'owner', - 'transferOwnership', - 'acceptOwnership', - ]) - }) - - describe('#constructor', () => { - it('should set the owner correctly', async () => { - const response = await governor.owner() - assert.equal(response, owner.address) - }) - - it('should set the l1Owner correctly', async () => { - const response = await governor.l1Owner() - assert.equal(response, l1OwnerAddress) - }) - - it('should set the crossdomain messenger correctly', async () => { - const response = await governor.crossDomainMessenger() - assert.equal(response, crossDomainMessenger.address) - }) - - it('should set the typeAndVersion correctly', async () => { - const response = await governor.typeAndVersion() - assert.equal(response, 'OptimismCrossDomainGovernor 1.0.0') - }) - }) - - describe('#forward', () => { - it('should not be callable by unknown address', async () => { - await expect( - governor.connect(stranger).forward(greeter.address, '0x'), - ).to.be.revertedWith('Sender is not the L2 messenger or owner') - }) - - it('should be callable by crossdomain messenger address / L1 owner', async () => { - const newGreeting = 'hello' - const setGreetingData = greeterFactory.interface.encodeFunctionData( - 'setGreeting', - [newGreeting], - ) - const forwardData = governorFactory.interface.encodeFunctionData( - 'forward', - [greeter.address, setGreetingData], - ) - await crossDomainMessenger // Simulate cross-chain OVM message - .connect(stranger) - .sendMessage(governor.address, forwardData, 0) - - const updatedGreeting = await greeter.greeting() - assert.equal(updatedGreeting, newGreeting) - }) - - it('should be callable by L2 owner', async () => { - const newGreeting = 'hello' - const setGreetingData = greeterFactory.interface.encodeFunctionData( - 'setGreeting', - [newGreeting], - ) - await governor.connect(owner).forward(greeter.address, setGreetingData) - - const updatedGreeting = await greeter.greeting() - assert.equal(updatedGreeting, newGreeting) - }) - - it('should revert when contract call reverts', async () => { - const setGreetingData = greeterFactory.interface.encodeFunctionData( - 'setGreeting', - [''], - ) - const forwardData = governorFactory.interface.encodeFunctionData( - 'forward', - [greeter.address, setGreetingData], - ) - await expect( - crossDomainMessenger // Simulate cross-chain OVM message - .connect(stranger) - .sendMessage(governor.address, forwardData, 0), - ).to.be.revertedWith('Invalid greeting length') - }) - }) - - describe('#forwardDelegate', () => { - it('should not be callable by unknown address', async () => { - await expect( - governor.connect(stranger).forwardDelegate(multisend.address, '0x'), - ).to.be.revertedWith('Sender is not the L2 messenger or owner') - }) - - it('should be callable by crossdomain messenger address / L1 owner', async () => { - const calls = [ - { - to: greeter.address, - data: greeterFactory.interface.encodeFunctionData('setGreeting', [ - 'foo', - ]), - value: 0, - }, - { - to: greeter.address, - data: greeterFactory.interface.encodeFunctionData('setGreeting', [ - 'bar', - ]), - value: 0, - }, - ] - const multisendData = encodeMultisendData(multisend.interface, calls) - const forwardData = governorFactory.interface.encodeFunctionData( - 'forwardDelegate', - [multisend.address, multisendData], - ) - - await crossDomainMessenger // Simulate cross-chain OVM message - .connect(stranger) - .sendMessage(governor.address, forwardData, 0) - - const updatedGreeting = await greeter.greeting() - assert.equal(updatedGreeting, 'bar') - }) - - it('should be callable by L2 owner', async () => { - const calls = [ - { - to: greeter.address, - data: greeterFactory.interface.encodeFunctionData('setGreeting', [ - 'foo', - ]), - value: 0, - }, - { - to: greeter.address, - data: greeterFactory.interface.encodeFunctionData('setGreeting', [ - 'bar', - ]), - value: 0, - }, - ] - const multisendData = encodeMultisendData(multisend.interface, calls) - await governor - .connect(owner) - .forwardDelegate(multisend.address, multisendData) - - const updatedGreeting = await greeter.greeting() - assert.equal(updatedGreeting, 'bar') - }) - - it('should revert batch when one call fails', async () => { - const calls = [ - { - to: greeter.address, - data: greeterFactory.interface.encodeFunctionData('setGreeting', [ - 'foo', - ]), - value: 0, - }, - { - to: greeter.address, - data: greeterFactory.interface.encodeFunctionData('setGreeting', [ - '', // should revert - ]), - value: 0, - }, - ] - const multisendData = encodeMultisendData(multisend.interface, calls) - const forwardData = governorFactory.interface.encodeFunctionData( - 'forwardDelegate', - [multisend.address, multisendData], - ) - - await expect( - crossDomainMessenger // Simulate cross-chain OVM message - .connect(stranger) - .sendMessage(governor.address, forwardData, 0), - ).to.be.revertedWith('Governor delegatecall reverted') - - const greeting = await greeter.greeting() - assert.equal(greeting, '') // Unchanged - }) - - it('should bubble up revert when contract call reverts', async () => { - const triggerRevertData = - greeterFactory.interface.encodeFunctionData('triggerRevert') - const forwardData = governorFactory.interface.encodeFunctionData( - 'forwardDelegate', - [greeter.address, triggerRevertData], - ) - - await expect( - crossDomainMessenger // Simulate cross-chain OVM message - .connect(stranger) - .sendMessage(governor.address, forwardData, 0), - ).to.be.revertedWith('Greeter: revert triggered') - }) - }) - - describe('#transferL1Ownership', () => { - it('should not be callable by non-owners', async () => { - await expect( - governor.connect(stranger).transferL1Ownership(stranger.address), - ).to.be.revertedWith('Sender is not the L2 messenger') - }) - - it('should not be callable by L2 owner', async () => { - const governorOwner = await governor.owner() - assert.equal(governorOwner, owner.address) - - await expect( - governor.connect(owner).transferL1Ownership(stranger.address), - ).to.be.revertedWith('Sender is not the L2 messenger') - }) - - it('should be callable by current L1 owner', async () => { - const currentL1Owner = await governor.l1Owner() - const forwardData = governorFactory.interface.encodeFunctionData( - 'transferL1Ownership', - [newL1OwnerAddress], - ) - - await expect( - crossDomainMessenger // Simulate cross-chain OVM message - .connect(stranger) - .sendMessage(governor.address, forwardData, 0), - ) - .to.emit(governor, 'L1OwnershipTransferRequested') - .withArgs(currentL1Owner, newL1OwnerAddress) - }) - - it('should be callable by current L1 owner to zero address', async () => { - const currentL1Owner = await governor.l1Owner() - const forwardData = governorFactory.interface.encodeFunctionData( - 'transferL1Ownership', - [ethers.constants.AddressZero], - ) - - await expect( - crossDomainMessenger // Simulate cross-chain OVM message - .connect(stranger) - .sendMessage(governor.address, forwardData, 0), - ) - .to.emit(governor, 'L1OwnershipTransferRequested') - .withArgs(currentL1Owner, ethers.constants.AddressZero) - }) - }) - - describe('#acceptL1Ownership', () => { - it('should not be callable by non pending-owners', async () => { - const forwardData = governorFactory.interface.encodeFunctionData( - 'acceptL1Ownership', - [], - ) - await expect( - crossDomainMessenger // Simulate cross-chain OVM message - .connect(stranger) - .sendMessage(governor.address, forwardData, 0), - ).to.be.revertedWith('Must be proposed L1 owner') - }) - - it('should be callable by pending L1 owner', async () => { - const currentL1Owner = await governor.l1Owner() - - // Transfer ownership - const forwardTransferData = governorFactory.interface.encodeFunctionData( - 'transferL1Ownership', - [newL1OwnerAddress], - ) - await crossDomainMessenger // Simulate cross-chain OVM message - .connect(stranger) - .sendMessage(governor.address, forwardTransferData, 0) - - const forwardAcceptData = governorFactory.interface.encodeFunctionData( - 'acceptL1Ownership', - [], - ) - // Simulate cross-chain message from another sender - await crossDomainMessenger._setMockMessageSender(newL1OwnerAddress) - - await expect( - crossDomainMessenger // Simulate cross-chain OVM message - .connect(stranger) - .sendMessage(governor.address, forwardAcceptData, 0), - ) - .to.emit(governor, 'L1OwnershipTransferred') - .withArgs(currentL1Owner, newL1OwnerAddress) - - const updatedL1Owner = await governor.l1Owner() - assert.equal(updatedL1Owner, newL1OwnerAddress) - }) - }) -}) - -// Multisend contract helpers - -/** - * Encodes an underlying transaction for the Multisend contract - * - * @param operation 0 for CALL, 1 for DELEGATECALL - * @param to tx target address - * @param value tx value - * @param data tx data - */ -export function encodeTxData( - operation: number, - to: string, - value: number, - data: string, -): string { - let dataBuffer = Buffer.from(stripHexPrefix(data), 'hex') - const types = ['uint8', 'address', 'uint256', 'uint256', 'bytes'] - const values = [operation, to, value, dataBuffer.length, dataBuffer] - let encoded = ethers.utils.solidityPack(types, values) - return stripHexPrefix(encoded) -} - -/** - * Encodes a Multisend call - * - * @param MultisendInterface Ethers Interface object of the Multisend contract - * @param transactions one or more transactions to include in the Multisend call - * @param to tx target address - * @param value tx value - * @param data tx data - */ -export function encodeMultisendData( - MultisendInterface: etherslib.utils.Interface, - transactions: { to: string; value: number; data: string }[], -): string { - let nestedTransactionData = '0x' - for (let transaction of transactions) { - nestedTransactionData += encodeTxData( - 0, - transaction.to, - transaction.value, - transaction.data, - ) - } - const encodedMultisendFnData = MultisendInterface.encodeFunctionData( - 'multiSend', - [nestedTransactionData], - ) - return encodedMultisendFnData -} diff --git a/contracts/test/v0.8/L2EP/OptimismSequencerUptimeFeed.test.ts b/contracts/test/v0.8/L2EP/OptimismSequencerUptimeFeed.test.ts deleted file mode 100644 index 32e17b10770..00000000000 --- a/contracts/test/v0.8/L2EP/OptimismSequencerUptimeFeed.test.ts +++ /dev/null @@ -1,426 +0,0 @@ -import { ethers, network } from 'hardhat' -import { BigNumber, Contract } from 'ethers' -import { expect } from 'chai' -import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' - -describe('OptimismSequencerUptimeFeed', () => { - let l2CrossDomainMessenger: Contract - let optimismUptimeFeed: Contract - let uptimeFeedConsumer: Contract - let deployer: SignerWithAddress - let l1Owner: SignerWithAddress - let l2Messenger: SignerWithAddress - let dummy: SignerWithAddress - const gasUsedDeviation = 100 - const initialStatus = 0 - - before(async () => { - const accounts = await ethers.getSigners() - deployer = accounts[0] - l1Owner = accounts[1] - dummy = accounts[3] - - const l2CrossDomainMessengerFactory = await ethers.getContractFactory( - 'src/v0.8/tests/MockOptimismL2CrossDomainMessenger.sol:MockOptimismL2CrossDomainMessenger', - deployer, - ) - - l2CrossDomainMessenger = await l2CrossDomainMessengerFactory.deploy() - - // Pretend we're on L2 - await network.provider.request({ - method: 'hardhat_impersonateAccount', - params: [l2CrossDomainMessenger.address], - }) - l2Messenger = await ethers.getSigner(l2CrossDomainMessenger.address) - // Credit the L2 messenger with some ETH - await dummy.sendTransaction({ - to: l2Messenger.address, - value: ethers.utils.parseEther('10'), - }) - }) - - beforeEach(async () => { - const optimismSequencerStatusRecorderFactory = - await ethers.getContractFactory( - 'src/v0.8/l2ep/dev/optimism/OptimismSequencerUptimeFeed.sol:OptimismSequencerUptimeFeed', - deployer, - ) - optimismUptimeFeed = await optimismSequencerStatusRecorderFactory.deploy( - l1Owner.address, - l2CrossDomainMessenger.address, - initialStatus, - ) - - // Set mock sender in mock L2 messenger contract - await l2CrossDomainMessenger.setSender(l1Owner.address) - - // Mock consumer - const statusFeedConsumerFactory = await ethers.getContractFactory( - 'src/v0.8/tests/FeedConsumer.sol:FeedConsumer', - deployer, - ) - uptimeFeedConsumer = await statusFeedConsumerFactory.deploy( - optimismUptimeFeed.address, - ) - }) - - describe('constructor', () => { - it('should have been deployed with the correct initial state', async () => { - const l1Sender = await optimismUptimeFeed.l1Sender() - expect(l1Sender).to.equal(l1Owner.address) - const { roundId, answer } = await optimismUptimeFeed.latestRoundData() - expect(roundId).to.equal(1) - expect(answer).to.equal(initialStatus) - }) - }) - - describe('#updateStatus', () => { - it('should revert if called by an address that is not the L2 Cross Domain Messenger', async () => { - let timestamp = await optimismUptimeFeed.latestTimestamp() - expect( - optimismUptimeFeed.connect(dummy).updateStatus(true, timestamp), - ).to.be.revertedWith('InvalidSender') - }) - - it('should revert if called by an address that is not the L2 Cross Domain Messenger and is not the L1 sender', async () => { - let timestamp = await optimismUptimeFeed.latestTimestamp() - await l2CrossDomainMessenger.setSender(dummy.address) - expect( - optimismUptimeFeed.connect(dummy).updateStatus(true, timestamp), - ).to.be.revertedWith('InvalidSender') - }) - - it(`should update status when status has not changed and incoming timestamp is the same as latest`, async () => { - const timestamp = await optimismUptimeFeed.latestTimestamp() - let tx = await optimismUptimeFeed - .connect(l2Messenger) - .updateStatus(true, timestamp) - await expect(tx) - .to.emit(optimismUptimeFeed, 'AnswerUpdated') - .withArgs(1, 2 /** roundId */, timestamp) - expect(await optimismUptimeFeed.latestAnswer()).to.equal(1) - - const latestRoundBeforeUpdate = await optimismUptimeFeed.latestRoundData() - - tx = await optimismUptimeFeed - .connect(l2Messenger) - .updateStatus(true, timestamp.add(200)) - - // Submit another status update with the same status - const latestBlock = await ethers.provider.getBlock('latest') - - await expect(tx) - .to.emit(optimismUptimeFeed, 'RoundUpdated') - .withArgs(1, latestBlock.timestamp) - expect(await optimismUptimeFeed.latestAnswer()).to.equal(1) - expect(await optimismUptimeFeed.latestTimestamp()).to.equal(timestamp) - - // Verify that latest round has been properly updated - const latestRoundDataAfterUpdate = - await optimismUptimeFeed.latestRoundData() - expect(latestRoundDataAfterUpdate.roundId).to.equal( - latestRoundBeforeUpdate.roundId, - ) - expect(latestRoundDataAfterUpdate.answer).to.equal( - latestRoundBeforeUpdate.answer, - ) - expect(latestRoundDataAfterUpdate.startedAt).to.equal( - latestRoundBeforeUpdate.startedAt, - ) - expect(latestRoundDataAfterUpdate.answeredInRound).to.equal( - latestRoundBeforeUpdate.answeredInRound, - ) - expect(latestRoundDataAfterUpdate.updatedAt).to.equal( - latestBlock.timestamp, - ) - }) - - it(`should update status when status has changed and incoming timestamp is newer than the latest`, async () => { - let timestamp = await optimismUptimeFeed.latestTimestamp() - let tx = await optimismUptimeFeed - .connect(l2Messenger) - .updateStatus(true, timestamp) - await expect(tx) - .to.emit(optimismUptimeFeed, 'AnswerUpdated') - .withArgs(1, 2 /** roundId */, timestamp) - expect(await optimismUptimeFeed.latestAnswer()).to.equal(1) - - // Submit another status update, different status, newer timestamp should update - timestamp = timestamp.add(2000) - tx = await optimismUptimeFeed - .connect(l2Messenger) - .updateStatus(false, timestamp) - await expect(tx) - .to.emit(optimismUptimeFeed, 'AnswerUpdated') - .withArgs(0, 3 /** roundId */, timestamp) - expect(await optimismUptimeFeed.latestAnswer()).to.equal(0) - expect(await optimismUptimeFeed.latestTimestamp()).to.equal(timestamp) - }) - - it(`should update status when status has changed and incoming timestamp is the same as latest`, async () => { - const timestamp = await optimismUptimeFeed.latestTimestamp() - let tx = await optimismUptimeFeed - .connect(l2Messenger) - .updateStatus(true, timestamp) - await expect(tx) - .to.emit(optimismUptimeFeed, 'AnswerUpdated') - .withArgs(1, 2 /** roundId */, timestamp) - expect(await optimismUptimeFeed.latestAnswer()).to.equal(1) - - // Submit another status update, different status, same timestamp should update - tx = await optimismUptimeFeed - .connect(l2Messenger) - .updateStatus(false, timestamp) - await expect(tx) - .to.emit(optimismUptimeFeed, 'AnswerUpdated') - .withArgs(0, 3 /** roundId */, timestamp) - expect(await optimismUptimeFeed.latestAnswer()).to.equal(0) - expect(await optimismUptimeFeed.latestTimestamp()).to.equal(timestamp) - }) - - it('should ignore out-of-order updates', async () => { - const timestamp = (await optimismUptimeFeed.latestTimestamp()).add(10_000) - // Update status - let tx = await optimismUptimeFeed - .connect(l2Messenger) - .updateStatus(true, timestamp) - await expect(tx) - .to.emit(optimismUptimeFeed, 'AnswerUpdated') - .withArgs(1, 2 /** roundId */, timestamp) - expect(await optimismUptimeFeed.latestAnswer()).to.equal(1) - - // Update with different status, but stale timestamp, should be ignored - const staleTimestamp = timestamp.sub(1000) - tx = await optimismUptimeFeed - .connect(l2Messenger) - .updateStatus(false, staleTimestamp) - await expect(tx).to.not.emit(optimismUptimeFeed, 'AnswerUpdated') - await expect(tx).to.emit(optimismUptimeFeed, 'UpdateIgnored') - }) - }) - - describe('AggregatorV3Interface', () => { - it('should return valid answer from getRoundData and latestRoundData', async () => { - let [roundId, answer, startedAt, updatedAt, answeredInRound] = - await optimismUptimeFeed.latestRoundData() - expect(roundId).to.equal(1) - expect(answer).to.equal(0) - expect(answeredInRound).to.equal(roundId) - - // Submit status update with different status and newer timestamp, should update - const timestamp = (startedAt as BigNumber).add(1000) - await optimismUptimeFeed - .connect(l2Messenger) - .updateStatus(true, timestamp) - ;[roundId, answer, startedAt, updatedAt, answeredInRound] = - await optimismUptimeFeed.getRoundData(2) - expect(roundId).to.equal(2) - expect(answer).to.equal(1) - expect(answeredInRound).to.equal(roundId) - expect(startedAt).to.equal(timestamp) - expect(updatedAt).to.equal(updatedAt) - - // Check that last round is still returning the correct data - ;[roundId, answer, startedAt, updatedAt, answeredInRound] = - await optimismUptimeFeed.getRoundData(1) - expect(roundId).to.equal(1) - expect(answer).to.equal(0) - expect(answeredInRound).to.equal(roundId) - expect(startedAt).to.equal(startedAt) - expect(updatedAt).to.equal(updatedAt) - - // Assert latestRoundData corresponds to latest round id - expect(await optimismUptimeFeed.getRoundData(2)).to.deep.equal( - await optimismUptimeFeed.latestRoundData(), - ) - }) - - it('should revert from #getRoundData when round does not yet exist (future roundId)', async () => { - expect(optimismUptimeFeed.getRoundData(2)).to.be.revertedWith( - 'NoDataPresent()', - ) - }) - - it('should revert from #getAnswer when round does not yet exist (future roundId)', async () => { - expect(optimismUptimeFeed.getAnswer(2)).to.be.revertedWith( - 'NoDataPresent()', - ) - }) - - it('should revert from #getTimestamp when round does not yet exist (future roundId)', async () => { - expect(optimismUptimeFeed.getTimestamp(2)).to.be.revertedWith( - 'NoDataPresent()', - ) - }) - }) - - describe('Protect reads on AggregatorV2V3Interface functions', () => { - it('should disallow reads on AggregatorV2V3Interface functions when consuming contract is not whitelisted', async () => { - // Sanity - consumer is not whitelisted - expect(await optimismUptimeFeed.checkEnabled()).to.be.true - expect( - await optimismUptimeFeed.hasAccess(uptimeFeedConsumer.address, '0x00'), - ).to.be.false - - // Assert reads are not possible from consuming contract - await expect(uptimeFeedConsumer.latestAnswer()).to.be.revertedWith( - 'No access', - ) - await expect(uptimeFeedConsumer.latestRoundData()).to.be.revertedWith( - 'No access', - ) - }) - - it('should allow reads on AggregatorV2V3Interface functions when consuming contract is whitelisted', async () => { - // Whitelist consumer - await optimismUptimeFeed.addAccess(uptimeFeedConsumer.address) - // Sanity - consumer is whitelisted - expect(await optimismUptimeFeed.checkEnabled()).to.be.true - expect( - await optimismUptimeFeed.hasAccess(uptimeFeedConsumer.address, '0x00'), - ).to.be.true - - // Assert reads are possible from consuming contract - expect(await uptimeFeedConsumer.latestAnswer()).to.be.equal('0') - const [roundId, answer] = await uptimeFeedConsumer.latestRoundData() - expect(roundId).to.equal(1) - expect(answer).to.equal(0) - }) - }) - - describe('Gas costs', () => { - it('should consume a known amount of gas for updates @skip-coverage', async () => { - // Sanity - start at flag = 0 (`false`) - expect(await optimismUptimeFeed.latestAnswer()).to.equal(0) - let timestamp = await optimismUptimeFeed.latestTimestamp() - - // Gas for no update - timestamp = timestamp.add(1000) - const _noUpdateTx = await optimismUptimeFeed - .connect(l2Messenger) - .updateStatus(false, timestamp) - const noUpdateTx = await _noUpdateTx.wait(1) - // Assert no update - expect(await optimismUptimeFeed.latestAnswer()).to.equal(0) - expect(noUpdateTx.cumulativeGasUsed.toNumber()).to.be.closeTo( - 38594, - gasUsedDeviation, - ) - - // Gas for update - timestamp = timestamp.add(1000) - const _updateTx = await optimismUptimeFeed - .connect(l2Messenger) - .updateStatus(true, timestamp) - const updateTx = await _updateTx.wait(1) - // Assert update - expect(await optimismUptimeFeed.latestAnswer()).to.equal(1) - expect(updateTx.cumulativeGasUsed.toNumber()).to.be.closeTo( - 60170, - gasUsedDeviation, - ) - }) - - describe('Aggregator interface', () => { - beforeEach(async () => { - const timestamp = (await optimismUptimeFeed.latestTimestamp()).add(1000) - // Initialise a round - await optimismUptimeFeed - .connect(l2Messenger) - .updateStatus(true, timestamp) - }) - - it('should consume a known amount of gas for getRoundData(uint80) @skip-coverage', async () => { - const _tx = await l2Messenger.sendTransaction( - await optimismUptimeFeed - .connect(l2Messenger) - .populateTransaction.getRoundData(1), - ) - const tx = await _tx.wait(1) - expect(tx.cumulativeGasUsed.toNumber()).to.be.closeTo( - 30952, - gasUsedDeviation, - ) - }) - - it('should consume a known amount of gas for latestRoundData() @skip-coverage', async () => { - const _tx = await l2Messenger.sendTransaction( - await optimismUptimeFeed - .connect(l2Messenger) - .populateTransaction.latestRoundData(), - ) - const tx = await _tx.wait(1) - expect(tx.cumulativeGasUsed.toNumber()).to.be.closeTo( - 28523, - gasUsedDeviation, - ) - }) - - it('should consume a known amount of gas for latestAnswer() @skip-coverage', async () => { - const _tx = await l2Messenger.sendTransaction( - await optimismUptimeFeed - .connect(l2Messenger) - .populateTransaction.latestAnswer(), - ) - const tx = await _tx.wait(1) - expect(tx.cumulativeGasUsed.toNumber()).to.be.closeTo( - 28329, - gasUsedDeviation, - ) - }) - - it('should consume a known amount of gas for latestTimestamp() @skip-coverage', async () => { - const _tx = await l2Messenger.sendTransaction( - await optimismUptimeFeed - .connect(l2Messenger) - .populateTransaction.latestTimestamp(), - ) - const tx = await _tx.wait(1) - expect(tx.cumulativeGasUsed.toNumber()).to.be.closeTo( - 28229, - gasUsedDeviation, - ) - }) - - it('should consume a known amount of gas for latestRound() @skip-coverage', async () => { - const _tx = await l2Messenger.sendTransaction( - await optimismUptimeFeed - .connect(l2Messenger) - .populateTransaction.latestRound(), - ) - const tx = await _tx.wait(1) - expect(tx.cumulativeGasUsed.toNumber()).to.be.closeTo( - 28245, - gasUsedDeviation, - ) - }) - - it('should consume a known amount of gas for getAnswer(roundId) @skip-coverage', async () => { - const _tx = await l2Messenger.sendTransaction( - await optimismUptimeFeed - .connect(l2Messenger) - .populateTransaction.getAnswer(1), - ) - const tx = await _tx.wait(1) - expect(tx.cumulativeGasUsed.toNumber()).to.be.closeTo( - 30682, - gasUsedDeviation, - ) - }) - - it('should consume a known amount of gas for getTimestamp(roundId) @skip-coverage', async () => { - const _tx = await l2Messenger.sendTransaction( - await optimismUptimeFeed - .connect(l2Messenger) - .populateTransaction.getTimestamp(1), - ) - const tx = await _tx.wait(1) - expect(tx.cumulativeGasUsed.toNumber()).to.be.closeTo( - 30570, - gasUsedDeviation, - ) - }) - }) - }) -}) diff --git a/contracts/test/v0.8/L2EP/OptimismValidator.test.ts b/contracts/test/v0.8/L2EP/OptimismValidator.test.ts deleted file mode 100644 index ee69211f56d..00000000000 --- a/contracts/test/v0.8/L2EP/OptimismValidator.test.ts +++ /dev/null @@ -1,123 +0,0 @@ -import { ethers } from 'hardhat' -import { BigNumber, Contract, ContractFactory } from 'ethers' -import { expect } from 'chai' -import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' -/// Pick ABIs from compilation -// @ts-ignore -import { abi as optimismSequencerStatusRecorderAbi } from '../../../artifacts/src/v0.8/l2ep/dev/optimism/OptimismSequencerUptimeFeed.sol/OptimismSequencerUptimeFeed.json' -// @ts-ignore -import { abi as optimismL1CrossDomainMessengerAbi } from '@eth-optimism/contracts/artifacts/contracts/L1/messaging/L1CrossDomainMessenger.sol' -// @ts-ignore -import { abi as aggregatorAbi } from '../../../artifacts/src/v0.8/shared/interfaces/AggregatorV2V3Interface.sol/AggregatorV2V3Interface.json' - -describe('OptimismValidator', () => { - const GAS_LIMIT = BigNumber.from(1_900_000) - /** Fake L2 target */ - const L2_SEQ_STATUS_RECORDER_ADDRESS = - '0x491B1dDA0A8fa069bbC1125133A975BF4e85a91b' - let optimismValidator: Contract - let optimismUptimeFeedFactory: ContractFactory - let mockOptimismL1CrossDomainMessenger: Contract - let deployer: SignerWithAddress - let eoaValidator: SignerWithAddress - - before(async () => { - const accounts = await ethers.getSigners() - deployer = accounts[0] - eoaValidator = accounts[1] - }) - - beforeEach(async () => { - // Required for building the calldata - optimismUptimeFeedFactory = await ethers.getContractFactory( - 'src/v0.8/l2ep/dev/optimism/OptimismSequencerUptimeFeed.sol:OptimismSequencerUptimeFeed', - deployer, - ) - - // Optimism Messenger contract on L1 - const mockOptimismL1CrossDomainMessengerFactory = - await ethers.getContractFactory( - 'src/v0.8/tests/MockOptimismL1CrossDomainMessenger.sol:MockOptimismL1CrossDomainMessenger', - ) - mockOptimismL1CrossDomainMessenger = - await mockOptimismL1CrossDomainMessengerFactory.deploy() - - // Contract under test - const optimismValidatorFactory = await ethers.getContractFactory( - 'src/v0.8/l2ep/dev/optimism/OptimismValidator.sol:OptimismValidator', - deployer, - ) - - optimismValidator = await optimismValidatorFactory.deploy( - mockOptimismL1CrossDomainMessenger.address, - L2_SEQ_STATUS_RECORDER_ADDRESS, - GAS_LIMIT, - ) - }) - - describe('#setGasLimit', () => { - it('correctly updates the gas limit', async () => { - const newGasLimit = BigNumber.from(2_000_000) - const tx = await optimismValidator.setGasLimit(newGasLimit) - await tx.wait() - const currentGasLimit = await optimismValidator.getGasLimit() - expect(currentGasLimit).to.equal(newGasLimit) - }) - }) - - describe('#validate', () => { - it('reverts if called by account with no access', async () => { - await expect( - optimismValidator.connect(eoaValidator).validate(0, 0, 1, 1), - ).to.be.revertedWith('No access') - }) - - it('posts sequencer status when there is not status change', async () => { - await optimismValidator.addAccess(eoaValidator.address) - - const currentBlock = await ethers.provider.getBlock('latest') - const futureTimestamp = currentBlock.timestamp + 5000 - - await ethers.provider.send('evm_setNextBlockTimestamp', [futureTimestamp]) - const sequencerStatusRecorderCallData = - optimismUptimeFeedFactory.interface.encodeFunctionData('updateStatus', [ - false, - futureTimestamp, - ]) - - await expect(optimismValidator.connect(eoaValidator).validate(0, 0, 0, 0)) - .to.emit(mockOptimismL1CrossDomainMessenger, 'SentMessage') - .withArgs( - L2_SEQ_STATUS_RECORDER_ADDRESS, - optimismValidator.address, - sequencerStatusRecorderCallData, - 0, - GAS_LIMIT, - ) - }) - - it('post sequencer offline', async () => { - await optimismValidator.addAccess(eoaValidator.address) - - const currentBlock = await ethers.provider.getBlock('latest') - const futureTimestamp = currentBlock.timestamp + 10000 - - await ethers.provider.send('evm_setNextBlockTimestamp', [futureTimestamp]) - const sequencerStatusRecorderCallData = - optimismUptimeFeedFactory.interface.encodeFunctionData('updateStatus', [ - true, - futureTimestamp, - ]) - - await expect(optimismValidator.connect(eoaValidator).validate(0, 0, 1, 1)) - .to.emit(mockOptimismL1CrossDomainMessenger, 'SentMessage') - .withArgs( - L2_SEQ_STATUS_RECORDER_ADDRESS, - optimismValidator.address, - sequencerStatusRecorderCallData, - 0, - GAS_LIMIT, - ) - }) - }) -}) diff --git a/contracts/test/v0.8/L2EP/ScrollCrossDomainForwarder.test.ts b/contracts/test/v0.8/L2EP/ScrollCrossDomainForwarder.test.ts deleted file mode 100644 index 923d41326ae..00000000000 --- a/contracts/test/v0.8/L2EP/ScrollCrossDomainForwarder.test.ts +++ /dev/null @@ -1,259 +0,0 @@ -import { ethers } from 'hardhat' -import { assert, expect } from 'chai' -import { Contract, ContractFactory } from 'ethers' -import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' -import { publicAbi } from '../../test-helpers/helpers' - -let owner: SignerWithAddress -let stranger: SignerWithAddress -let l1OwnerAddress: string -let newL1OwnerAddress: string -let forwarderFactory: ContractFactory -let greeterFactory: ContractFactory -let crossDomainMessengerFactory: ContractFactory -let crossDomainMessenger: Contract -let forwarder: Contract -let greeter: Contract - -before(async () => { - const accounts = await ethers.getSigners() - owner = accounts[0] - stranger = accounts[1] - - // forwarder config - l1OwnerAddress = owner.address - newL1OwnerAddress = stranger.address - - // Contract factories - forwarderFactory = await ethers.getContractFactory( - 'src/v0.8/l2ep/dev/scroll/ScrollCrossDomainForwarder.sol:ScrollCrossDomainForwarder', - owner, - ) - greeterFactory = await ethers.getContractFactory( - 'src/v0.8/tests/Greeter.sol:Greeter', - owner, - ) - crossDomainMessengerFactory = await ethers.getContractFactory( - 'src/v0.8/vendor/MockScrollCrossDomainMessenger.sol:MockScrollCrossDomainMessenger', - ) -}) - -describe('ScrollCrossDomainForwarder', () => { - beforeEach(async () => { - crossDomainMessenger = - await crossDomainMessengerFactory.deploy(l1OwnerAddress) - forwarder = await forwarderFactory.deploy( - crossDomainMessenger.address, - l1OwnerAddress, - ) - greeter = await greeterFactory.deploy(forwarder.address) - }) - - it('has a limited public interface [ @skip-coverage ]', async () => { - publicAbi(forwarder, [ - 'typeAndVersion', - 'crossDomainMessenger', - 'forward', - 'l1Owner', - 'transferL1Ownership', - 'acceptL1Ownership', - // ConfirmedOwner methods: - 'owner', - 'transferOwnership', - 'acceptOwnership', - ]) - }) - - describe('#constructor', () => { - it('should set the owner correctly', async () => { - const response = await forwarder.owner() - assert.equal(response, owner.address) - }) - - it('should set the l1Owner correctly', async () => { - const response = await forwarder.l1Owner() - assert.equal(response, l1OwnerAddress) - }) - - it('should set the crossdomain messenger correctly', async () => { - const response = await forwarder.crossDomainMessenger() - assert.equal(response, crossDomainMessenger.address) - }) - - it('should set the typeAndVersion correctly', async () => { - const response = await forwarder.typeAndVersion() - assert.equal(response, 'ScrollCrossDomainForwarder 1.0.0') - }) - }) - - describe('#forward', () => { - it('should not be callable by unknown address', async () => { - await expect( - forwarder.connect(stranger).forward(greeter.address, '0x'), - ).to.be.revertedWith('Sender is not the L2 messenger') - }) - - it('should be callable by crossdomain messenger address / L1 owner', async () => { - const newGreeting = 'hello' - const setGreetingData = greeterFactory.interface.encodeFunctionData( - 'setGreeting', - [newGreeting], - ) - const forwardData = forwarderFactory.interface.encodeFunctionData( - 'forward', - [greeter.address, setGreetingData], - ) - await crossDomainMessenger // Simulate cross-chain message - .connect(stranger) - ['sendMessage(address,uint256,bytes,uint256)']( - forwarder.address, // target - 0, // value - forwardData, // message - 0, // gasLimit - ) - - const updatedGreeting = await greeter.greeting() - assert.equal(updatedGreeting, newGreeting) - }) - - it('should revert when contract call reverts', async () => { - const setGreetingData = greeterFactory.interface.encodeFunctionData( - 'setGreeting', - [''], - ) - const forwardData = forwarderFactory.interface.encodeFunctionData( - 'forward', - [greeter.address, setGreetingData], - ) - await expect( - crossDomainMessenger // Simulate cross-chain message - .connect(stranger) - ['sendMessage(address,uint256,bytes,uint256)']( - forwarder.address, // target - 0, // value - forwardData, // message - 0, // gasLimit - ), - ).to.be.revertedWith('Invalid greeting length') - }) - }) - - describe('#transferL1Ownership', () => { - it('should not be callable by non-owners', async () => { - await expect( - forwarder.connect(stranger).transferL1Ownership(stranger.address), - ).to.be.revertedWith('Sender is not the L2 messenger') - }) - - it('should not be callable by L2 owner', async () => { - const forwarderOwner = await forwarder.owner() - assert.equal(forwarderOwner, owner.address) - - await expect( - forwarder.connect(owner).transferL1Ownership(stranger.address), - ).to.be.revertedWith('Sender is not the L2 messenger') - }) - - it('should be callable by current L1 owner', async () => { - const currentL1Owner = await forwarder.l1Owner() - const forwardData = forwarderFactory.interface.encodeFunctionData( - 'transferL1Ownership', - [newL1OwnerAddress], - ) - - await expect( - crossDomainMessenger // Simulate cross-chain message - .connect(stranger) - ['sendMessage(address,uint256,bytes,uint256)']( - forwarder.address, // target - 0, // value - forwardData, // message - 0, // gasLimit - ), - ) - .to.emit(forwarder, 'L1OwnershipTransferRequested') - .withArgs(currentL1Owner, newL1OwnerAddress) - }) - - it('should be callable by current L1 owner to zero address', async () => { - const currentL1Owner = await forwarder.l1Owner() - const forwardData = forwarderFactory.interface.encodeFunctionData( - 'transferL1Ownership', - [ethers.constants.AddressZero], - ) - - await expect( - crossDomainMessenger // Simulate cross-chain message - .connect(stranger) - ['sendMessage(address,uint256,bytes,uint256)']( - forwarder.address, // target - 0, // value - forwardData, // message - 0, // gasLimit - ), - ) - .to.emit(forwarder, 'L1OwnershipTransferRequested') - .withArgs(currentL1Owner, ethers.constants.AddressZero) - }) - }) - - describe('#acceptL1Ownership', () => { - it('should not be callable by non pending-owners', async () => { - const forwardData = forwarderFactory.interface.encodeFunctionData( - 'acceptL1Ownership', - [], - ) - await expect( - crossDomainMessenger // Simulate cross-chain message - .connect(stranger) - ['sendMessage(address,uint256,bytes,uint256)']( - forwarder.address, // target - 0, // value - forwardData, // message - 0, // gasLimit - ), - ).to.be.revertedWith('Must be proposed L1 owner') - }) - - it('should be callable by pending L1 owner', async () => { - const currentL1Owner = await forwarder.l1Owner() - - // Transfer ownership - const forwardTransferData = forwarderFactory.interface.encodeFunctionData( - 'transferL1Ownership', - [newL1OwnerAddress], - ) - await crossDomainMessenger // Simulate cross-chain message - .connect(stranger) - ['sendMessage(address,uint256,bytes,uint256)']( - forwarder.address, // target - 0, // value - forwardTransferData, // message - 0, // gasLimit - ) - - const forwardAcceptData = forwarderFactory.interface.encodeFunctionData( - 'acceptL1Ownership', - [], - ) - // Simulate cross-chain message from another sender - await crossDomainMessenger._setMockMessageSender(newL1OwnerAddress) - - await expect( - crossDomainMessenger // Simulate cross-chain message - .connect(stranger) - ['sendMessage(address,uint256,bytes,uint256)']( - forwarder.address, // target - 0, // value - forwardAcceptData, // message - 0, // gasLimit - ), - ) - .to.emit(forwarder, 'L1OwnershipTransferred') - .withArgs(currentL1Owner, newL1OwnerAddress) - - const updatedL1Owner = await forwarder.l1Owner() - assert.equal(updatedL1Owner, newL1OwnerAddress) - }) - }) -}) diff --git a/contracts/test/v0.8/L2EP/ScrollCrossDomainGovernor.test.ts b/contracts/test/v0.8/L2EP/ScrollCrossDomainGovernor.test.ts deleted file mode 100644 index d2211145bb6..00000000000 --- a/contracts/test/v0.8/L2EP/ScrollCrossDomainGovernor.test.ts +++ /dev/null @@ -1,459 +0,0 @@ -import { ethers } from 'hardhat' -import { assert, expect } from 'chai' -import etherslib, { Contract, ContractFactory } from 'ethers' -import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' -import { publicAbi, stripHexPrefix } from '../../test-helpers/helpers' - -let owner: SignerWithAddress -let stranger: SignerWithAddress -let l1OwnerAddress: string -let newL1OwnerAddress: string -let governorFactory: ContractFactory -let greeterFactory: ContractFactory -let multisendFactory: ContractFactory -let crossDomainMessengerFactory: ContractFactory -let crossDomainMessenger: Contract -let governor: Contract -let greeter: Contract -let multisend: Contract - -before(async () => { - const accounts = await ethers.getSigners() - owner = accounts[0] - stranger = accounts[1] - - // governor config - l1OwnerAddress = owner.address - newL1OwnerAddress = stranger.address - - // Contract factories - governorFactory = await ethers.getContractFactory( - 'src/v0.8/l2ep/dev/scroll/ScrollCrossDomainGovernor.sol:ScrollCrossDomainGovernor', - owner, - ) - greeterFactory = await ethers.getContractFactory( - 'src/v0.8/tests/Greeter.sol:Greeter', - owner, - ) - multisendFactory = await ethers.getContractFactory( - 'src/v0.8/vendor/MultiSend.sol:MultiSend', - owner, - ) - crossDomainMessengerFactory = await ethers.getContractFactory( - 'src/v0.8/vendor/MockScrollCrossDomainMessenger.sol:MockScrollCrossDomainMessenger', - ) -}) - -describe('ScrollCrossDomainGovernor', () => { - beforeEach(async () => { - crossDomainMessenger = - await crossDomainMessengerFactory.deploy(l1OwnerAddress) - governor = await governorFactory.deploy( - crossDomainMessenger.address, - l1OwnerAddress, - ) - greeter = await greeterFactory.deploy(governor.address) - multisend = await multisendFactory.deploy() - }) - - it('has a limited public interface [ @skip-coverage ]', async () => { - publicAbi(governor, [ - 'typeAndVersion', - 'crossDomainMessenger', - 'forward', - 'forwardDelegate', - 'l1Owner', - 'transferL1Ownership', - 'acceptL1Ownership', - // ConfirmedOwner methods: - 'owner', - 'transferOwnership', - 'acceptOwnership', - ]) - }) - - describe('#constructor', () => { - it('should set the owner correctly', async () => { - const response = await governor.owner() - assert.equal(response, owner.address) - }) - - it('should set the l1Owner correctly', async () => { - const response = await governor.l1Owner() - assert.equal(response, l1OwnerAddress) - }) - - it('should set the crossdomain messenger correctly', async () => { - const response = await governor.crossDomainMessenger() - assert.equal(response, crossDomainMessenger.address) - }) - - it('should set the typeAndVersion correctly', async () => { - const response = await governor.typeAndVersion() - assert.equal(response, 'ScrollCrossDomainGovernor 1.0.0') - }) - }) - - describe('#forward', () => { - it('should not be callable by unknown address', async () => { - await expect( - governor.connect(stranger).forward(greeter.address, '0x'), - ).to.be.revertedWith('Sender is not the L2 messenger or owner') - }) - - it('should be callable by crossdomain messenger address / L1 owner', async () => { - const newGreeting = 'hello' - const setGreetingData = greeterFactory.interface.encodeFunctionData( - 'setGreeting', - [newGreeting], - ) - const forwardData = governorFactory.interface.encodeFunctionData( - 'forward', - [greeter.address, setGreetingData], - ) - await crossDomainMessenger // Simulate cross-chain message - .connect(stranger) - ['sendMessage(address,uint256,bytes,uint256)']( - governor.address, // target - 0, // value - forwardData, // message - 0, // gasLimit - ) - - const updatedGreeting = await greeter.greeting() - assert.equal(updatedGreeting, newGreeting) - }) - - it('should be callable by L2 owner', async () => { - const newGreeting = 'hello' - const setGreetingData = greeterFactory.interface.encodeFunctionData( - 'setGreeting', - [newGreeting], - ) - await governor.connect(owner).forward(greeter.address, setGreetingData) - - const updatedGreeting = await greeter.greeting() - assert.equal(updatedGreeting, newGreeting) - }) - - it('should revert when contract call reverts', async () => { - const setGreetingData = greeterFactory.interface.encodeFunctionData( - 'setGreeting', - [''], - ) - const forwardData = governorFactory.interface.encodeFunctionData( - 'forward', - [greeter.address, setGreetingData], - ) - await expect( - crossDomainMessenger // Simulate cross-chain message - .connect(stranger) - ['sendMessage(address,uint256,bytes,uint256)']( - governor.address, // target - 0, // value - forwardData, // message - 0, // gasLimit - ), - ).to.be.revertedWith('Invalid greeting length') - }) - }) - - describe('#forwardDelegate', () => { - it('should not be callable by unknown address', async () => { - await expect( - governor.connect(stranger).forwardDelegate(multisend.address, '0x'), - ).to.be.revertedWith('Sender is not the L2 messenger or owner') - }) - - it('should be callable by crossdomain messenger address / L1 owner', async () => { - const calls = [ - { - to: greeter.address, - data: greeterFactory.interface.encodeFunctionData('setGreeting', [ - 'foo', - ]), - value: 0, - }, - { - to: greeter.address, - data: greeterFactory.interface.encodeFunctionData('setGreeting', [ - 'bar', - ]), - value: 0, - }, - ] - const multisendData = encodeMultisendData(multisend.interface, calls) - const forwardData = governorFactory.interface.encodeFunctionData( - 'forwardDelegate', - [multisend.address, multisendData], - ) - - await crossDomainMessenger // Simulate cross-chain message - .connect(stranger) - ['sendMessage(address,uint256,bytes,uint256)']( - governor.address, // target - 0, // value - forwardData, // message - 0, // gasLimit - ) - - const updatedGreeting = await greeter.greeting() - assert.equal(updatedGreeting, 'bar') - }) - - it('should be callable by L2 owner', async () => { - const calls = [ - { - to: greeter.address, - data: greeterFactory.interface.encodeFunctionData('setGreeting', [ - 'foo', - ]), - value: 0, - }, - { - to: greeter.address, - data: greeterFactory.interface.encodeFunctionData('setGreeting', [ - 'bar', - ]), - value: 0, - }, - ] - const multisendData = encodeMultisendData(multisend.interface, calls) - await governor - .connect(owner) - .forwardDelegate(multisend.address, multisendData) - - const updatedGreeting = await greeter.greeting() - assert.equal(updatedGreeting, 'bar') - }) - - it('should revert batch when one call fails', async () => { - const calls = [ - { - to: greeter.address, - data: greeterFactory.interface.encodeFunctionData('setGreeting', [ - 'foo', - ]), - value: 0, - }, - { - to: greeter.address, - data: greeterFactory.interface.encodeFunctionData('setGreeting', [ - '', // should revert - ]), - value: 0, - }, - ] - const multisendData = encodeMultisendData(multisend.interface, calls) - const forwardData = governorFactory.interface.encodeFunctionData( - 'forwardDelegate', - [multisend.address, multisendData], - ) - - await expect( - crossDomainMessenger // Simulate cross-chain message - .connect(stranger) - ['sendMessage(address,uint256,bytes,uint256)']( - governor.address, // target - 0, // value - forwardData, // message - 0, // gasLimit - ), - ).to.be.revertedWith('Governor delegatecall reverted') - - const greeting = await greeter.greeting() - assert.equal(greeting, '') // Unchanged - }) - - it('should bubble up revert when contract call reverts', async () => { - const triggerRevertData = - greeterFactory.interface.encodeFunctionData('triggerRevert') - const forwardData = governorFactory.interface.encodeFunctionData( - 'forwardDelegate', - [greeter.address, triggerRevertData], - ) - - await expect( - crossDomainMessenger // Simulate cross-chain message - .connect(stranger) - ['sendMessage(address,uint256,bytes,uint256)']( - governor.address, // target - 0, // value - forwardData, // message - 0, // gasLimit - ), - ).to.be.revertedWith('Greeter: revert triggered') - }) - }) - - describe('#transferL1Ownership', () => { - it('should not be callable by non-owners', async () => { - await expect( - governor.connect(stranger).transferL1Ownership(stranger.address), - ).to.be.revertedWith('Sender is not the L2 messenger') - }) - - it('should not be callable by L2 owner', async () => { - const governorOwner = await governor.owner() - assert.equal(governorOwner, owner.address) - - await expect( - governor.connect(owner).transferL1Ownership(stranger.address), - ).to.be.revertedWith('Sender is not the L2 messenger') - }) - - it('should be callable by current L1 owner', async () => { - const currentL1Owner = await governor.l1Owner() - const forwardData = governorFactory.interface.encodeFunctionData( - 'transferL1Ownership', - [newL1OwnerAddress], - ) - - await expect( - crossDomainMessenger // Simulate cross-chain message - .connect(stranger) - ['sendMessage(address,uint256,bytes,uint256)']( - governor.address, // target - 0, // value - forwardData, // message - 0, // gasLimit - ), - ) - .to.emit(governor, 'L1OwnershipTransferRequested') - .withArgs(currentL1Owner, newL1OwnerAddress) - }) - - it('should be callable by current L1 owner to zero address', async () => { - const currentL1Owner = await governor.l1Owner() - const forwardData = governorFactory.interface.encodeFunctionData( - 'transferL1Ownership', - [ethers.constants.AddressZero], - ) - - await expect( - crossDomainMessenger // Simulate cross-chain message - .connect(stranger) - ['sendMessage(address,uint256,bytes,uint256)']( - governor.address, // target - 0, // value - forwardData, // message - 0, // gasLimit - ), - ) - .to.emit(governor, 'L1OwnershipTransferRequested') - .withArgs(currentL1Owner, ethers.constants.AddressZero) - }) - }) - - describe('#acceptL1Ownership', () => { - it('should not be callable by non pending-owners', async () => { - const forwardData = governorFactory.interface.encodeFunctionData( - 'acceptL1Ownership', - [], - ) - await expect( - crossDomainMessenger // Simulate cross-chain message - .connect(stranger) - ['sendMessage(address,uint256,bytes,uint256)']( - governor.address, // target - 0, // value - forwardData, // message - 0, // gasLimit - ), - ).to.be.revertedWith('Must be proposed L1 owner') - }) - - it('should be callable by pending L1 owner', async () => { - const currentL1Owner = await governor.l1Owner() - - // Transfer ownership - const forwardTransferData = governorFactory.interface.encodeFunctionData( - 'transferL1Ownership', - [newL1OwnerAddress], - ) - await crossDomainMessenger // Simulate cross-chain message - .connect(stranger) - ['sendMessage(address,uint256,bytes,uint256)']( - governor.address, // target - 0, // value - forwardTransferData, // message - 0, // gasLimit - ) - - const forwardAcceptData = governorFactory.interface.encodeFunctionData( - 'acceptL1Ownership', - [], - ) - // Simulate cross-chain message from another sender - await crossDomainMessenger._setMockMessageSender(newL1OwnerAddress) - - await expect( - crossDomainMessenger // Simulate cross-chain message - .connect(stranger) - ['sendMessage(address,uint256,bytes,uint256)']( - governor.address, // target - 0, // value - forwardAcceptData, // message - 0, // gasLimit - ), - ) - .to.emit(governor, 'L1OwnershipTransferred') - .withArgs(currentL1Owner, newL1OwnerAddress) - - const updatedL1Owner = await governor.l1Owner() - assert.equal(updatedL1Owner, newL1OwnerAddress) - }) - }) -}) - -// Multisend contract helpers - -/** - * Encodes an underlying transaction for the Multisend contract - * - * @param operation 0 for CALL, 1 for DELEGATECALL - * @param to tx target address - * @param value tx value - * @param data tx data - */ -export function encodeTxData( - operation: number, - to: string, - value: number, - data: string, -): string { - const dataBuffer = Buffer.from(stripHexPrefix(data), 'hex') - const types = ['uint8', 'address', 'uint256', 'uint256', 'bytes'] - const values = [operation, to, value, dataBuffer.length, dataBuffer] - const encoded = ethers.utils.solidityPack(types, values) - return stripHexPrefix(encoded) -} - -/** - * Encodes a Multisend call - * - * @param MultisendInterface Ethers Interface object of the Multisend contract - * @param transactions one or more transactions to include in the Multisend call - * @param to tx target address - * @param value tx value - * @param data tx data - */ -export function encodeMultisendData( - MultisendInterface: etherslib.utils.Interface, - transactions: { to: string; value: number; data: string }[], -): string { - let nestedTransactionData = '0x' - for (const transaction of transactions) { - nestedTransactionData += encodeTxData( - 0, - transaction.to, - transaction.value, - transaction.data, - ) - } - const encodedMultisendFnData = MultisendInterface.encodeFunctionData( - 'multiSend', - [nestedTransactionData], - ) - return encodedMultisendFnData -} diff --git a/contracts/test/v0.8/L2EP/ScrollSequencerUptimeFeed.test.ts b/contracts/test/v0.8/L2EP/ScrollSequencerUptimeFeed.test.ts deleted file mode 100644 index d0fecf3b189..00000000000 --- a/contracts/test/v0.8/L2EP/ScrollSequencerUptimeFeed.test.ts +++ /dev/null @@ -1,424 +0,0 @@ -import { ethers, network } from 'hardhat' -import { BigNumber, Contract } from 'ethers' -import { expect } from 'chai' -import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' - -describe('ScrollSequencerUptimeFeed', () => { - let l2CrossDomainMessenger: Contract - let scrollUptimeFeed: Contract - let uptimeFeedConsumer: Contract - let deployer: SignerWithAddress - let l1Owner: SignerWithAddress - let l2Messenger: SignerWithAddress - let dummy: SignerWithAddress - const gasUsedDeviation = 100 - const initialStatus = 0 - - before(async () => { - const accounts = await ethers.getSigners() - deployer = accounts[0] - l1Owner = accounts[1] - dummy = accounts[3] - - const l2CrossDomainMessengerFactory = await ethers.getContractFactory( - 'src/v0.8/l2ep/test/mocks/scroll/MockScrollL2CrossDomainMessenger.sol:MockScrollL2CrossDomainMessenger', - deployer, - ) - - l2CrossDomainMessenger = await l2CrossDomainMessengerFactory.deploy() - - // Pretend we're on L2 - await network.provider.request({ - method: 'hardhat_impersonateAccount', - params: [l2CrossDomainMessenger.address], - }) - l2Messenger = await ethers.getSigner(l2CrossDomainMessenger.address) - // Credit the L2 messenger with some ETH - await dummy.sendTransaction({ - to: l2Messenger.address, - value: ethers.utils.parseEther('10'), - }) - }) - - beforeEach(async () => { - const scrollSequencerStatusRecorderFactory = - await ethers.getContractFactory( - 'src/v0.8/l2ep/dev/scroll/ScrollSequencerUptimeFeed.sol:ScrollSequencerUptimeFeed', - deployer, - ) - scrollUptimeFeed = await scrollSequencerStatusRecorderFactory.deploy( - l1Owner.address, - l2CrossDomainMessenger.address, - initialStatus, - ) - - // Set mock sender in mock L2 messenger contract - await l2CrossDomainMessenger.setSender(l1Owner.address) - - // Mock consumer - const statusFeedConsumerFactory = await ethers.getContractFactory( - 'src/v0.8/tests/FeedConsumer.sol:FeedConsumer', - deployer, - ) - uptimeFeedConsumer = await statusFeedConsumerFactory.deploy( - scrollUptimeFeed.address, - ) - }) - - describe('constructor', () => { - it('should have been deployed with the correct initial state', async () => { - const l1Sender = await scrollUptimeFeed.l1Sender() - expect(l1Sender).to.equal(l1Owner.address) - const { roundId, answer } = await scrollUptimeFeed.latestRoundData() - expect(roundId).to.equal(1) - expect(answer).to.equal(initialStatus) - }) - }) - - describe('#updateStatus', () => { - it('should revert if called by an address that is not the L2 Cross Domain Messenger', async () => { - const timestamp = await scrollUptimeFeed.latestTimestamp() - expect( - scrollUptimeFeed.connect(dummy).updateStatus(true, timestamp), - ).to.be.revertedWith('InvalidSender') - }) - - it('should revert if called by an address that is not the L2 Cross Domain Messenger and is not the L1 sender', async () => { - const timestamp = await scrollUptimeFeed.latestTimestamp() - await l2CrossDomainMessenger.setSender(dummy.address) - expect( - scrollUptimeFeed.connect(dummy).updateStatus(true, timestamp), - ).to.be.revertedWith('InvalidSender') - }) - - it(`should update status when status has not changed and incoming timestamp is the same as latest`, async () => { - const timestamp = await scrollUptimeFeed.latestTimestamp() - let tx = await scrollUptimeFeed - .connect(l2Messenger) - .updateStatus(true, timestamp) - await expect(tx) - .to.emit(scrollUptimeFeed, 'AnswerUpdated') - .withArgs(1, 2 /** roundId */, timestamp) - expect(await scrollUptimeFeed.latestAnswer()).to.equal(1) - - const latestRoundBeforeUpdate = await scrollUptimeFeed.latestRoundData() - - tx = await scrollUptimeFeed - .connect(l2Messenger) - .updateStatus(true, timestamp.add(200)) - - // Submit another status update with the same status - const latestBlock = await ethers.provider.getBlock('latest') - - await expect(tx) - .to.emit(scrollUptimeFeed, 'RoundUpdated') - .withArgs(1, latestBlock.timestamp) - expect(await scrollUptimeFeed.latestAnswer()).to.equal(1) - expect(await scrollUptimeFeed.latestTimestamp()).to.equal(timestamp) - - // Verify that latest round has been properly updated - const latestRoundDataAfterUpdate = - await scrollUptimeFeed.latestRoundData() - expect(latestRoundDataAfterUpdate.roundId).to.equal( - latestRoundBeforeUpdate.roundId, - ) - expect(latestRoundDataAfterUpdate.answer).to.equal( - latestRoundBeforeUpdate.answer, - ) - expect(latestRoundDataAfterUpdate.startedAt).to.equal( - latestRoundBeforeUpdate.startedAt, - ) - expect(latestRoundDataAfterUpdate.answeredInRound).to.equal( - latestRoundBeforeUpdate.answeredInRound, - ) - expect(latestRoundDataAfterUpdate.updatedAt).to.equal( - latestBlock.timestamp, - ) - }) - - it(`should update status when status has changed and incoming timestamp is newer than the latest`, async () => { - let timestamp = await scrollUptimeFeed.latestTimestamp() - let tx = await scrollUptimeFeed - .connect(l2Messenger) - .updateStatus(true, timestamp) - await expect(tx) - .to.emit(scrollUptimeFeed, 'AnswerUpdated') - .withArgs(1, 2 /** roundId */, timestamp) - expect(await scrollUptimeFeed.latestAnswer()).to.equal(1) - - // Submit another status update, different status, newer timestamp should update - timestamp = timestamp.add(2000) - tx = await scrollUptimeFeed - .connect(l2Messenger) - .updateStatus(false, timestamp) - await expect(tx) - .to.emit(scrollUptimeFeed, 'AnswerUpdated') - .withArgs(0, 3 /** roundId */, timestamp) - expect(await scrollUptimeFeed.latestAnswer()).to.equal(0) - expect(await scrollUptimeFeed.latestTimestamp()).to.equal(timestamp) - }) - - it(`should update status when status has changed and incoming timestamp is the same as latest`, async () => { - const timestamp = await scrollUptimeFeed.latestTimestamp() - let tx = await scrollUptimeFeed - .connect(l2Messenger) - .updateStatus(true, timestamp) - await expect(tx) - .to.emit(scrollUptimeFeed, 'AnswerUpdated') - .withArgs(1, 2 /** roundId */, timestamp) - expect(await scrollUptimeFeed.latestAnswer()).to.equal(1) - - // Submit another status update, different status, same timestamp should update - tx = await scrollUptimeFeed - .connect(l2Messenger) - .updateStatus(false, timestamp) - await expect(tx) - .to.emit(scrollUptimeFeed, 'AnswerUpdated') - .withArgs(0, 3 /** roundId */, timestamp) - expect(await scrollUptimeFeed.latestAnswer()).to.equal(0) - expect(await scrollUptimeFeed.latestTimestamp()).to.equal(timestamp) - }) - - it('should ignore out-of-order updates', async () => { - const timestamp = (await scrollUptimeFeed.latestTimestamp()).add(10_000) - // Update status - let tx = await scrollUptimeFeed - .connect(l2Messenger) - .updateStatus(true, timestamp) - await expect(tx) - .to.emit(scrollUptimeFeed, 'AnswerUpdated') - .withArgs(1, 2 /** roundId */, timestamp) - expect(await scrollUptimeFeed.latestAnswer()).to.equal(1) - - // Update with different status, but stale timestamp, should be ignored - const staleTimestamp = timestamp.sub(1000) - tx = await scrollUptimeFeed - .connect(l2Messenger) - .updateStatus(false, staleTimestamp) - await expect(tx).to.not.emit(scrollUptimeFeed, 'AnswerUpdated') - await expect(tx).to.emit(scrollUptimeFeed, 'UpdateIgnored') - }) - }) - - describe('AggregatorV3Interface', () => { - it('should return valid answer from getRoundData and latestRoundData', async () => { - let [roundId, answer, startedAt, updatedAt, answeredInRound] = - await scrollUptimeFeed.latestRoundData() - expect(roundId).to.equal(1) - expect(answer).to.equal(0) - expect(answeredInRound).to.equal(roundId) - expect(startedAt).to.equal(updatedAt) - - // Submit status update with different status and newer timestamp, should update - const timestamp = (startedAt as BigNumber).add(1000) - await scrollUptimeFeed.connect(l2Messenger).updateStatus(true, timestamp) - ;[roundId, answer, startedAt, updatedAt, answeredInRound] = - await scrollUptimeFeed.getRoundData(2) - expect(roundId).to.equal(2) - expect(answer).to.equal(1) - expect(answeredInRound).to.equal(roundId) - expect(startedAt).to.equal(timestamp) - expect(updatedAt.lte(startedAt)).to.be.true - - // Check that last round is still returning the correct data - ;[roundId, answer, startedAt, updatedAt, answeredInRound] = - await scrollUptimeFeed.getRoundData(1) - expect(roundId).to.equal(1) - expect(answer).to.equal(0) - expect(answeredInRound).to.equal(roundId) - expect(startedAt).to.equal(updatedAt) - - // Assert latestRoundData corresponds to latest round id - expect(await scrollUptimeFeed.getRoundData(2)).to.deep.equal( - await scrollUptimeFeed.latestRoundData(), - ) - }) - - it('should revert from #getRoundData when round does not yet exist (future roundId)', async () => { - expect(scrollUptimeFeed.getRoundData(2)).to.be.revertedWith( - 'NoDataPresent()', - ) - }) - - it('should revert from #getAnswer when round does not yet exist (future roundId)', async () => { - expect(scrollUptimeFeed.getAnswer(2)).to.be.revertedWith( - 'NoDataPresent()', - ) - }) - - it('should revert from #getTimestamp when round does not yet exist (future roundId)', async () => { - expect(scrollUptimeFeed.getTimestamp(2)).to.be.revertedWith( - 'NoDataPresent()', - ) - }) - }) - - describe('Protect reads on AggregatorV2V3Interface functions', () => { - it('should disallow reads on AggregatorV2V3Interface functions when consuming contract is not whitelisted', async () => { - // Sanity - consumer is not whitelisted - expect(await scrollUptimeFeed.checkEnabled()).to.be.true - expect( - await scrollUptimeFeed.hasAccess(uptimeFeedConsumer.address, '0x00'), - ).to.be.false - - // Assert reads are not possible from consuming contract - await expect(uptimeFeedConsumer.latestAnswer()).to.be.revertedWith( - 'No access', - ) - await expect(uptimeFeedConsumer.latestRoundData()).to.be.revertedWith( - 'No access', - ) - }) - - it('should allow reads on AggregatorV2V3Interface functions when consuming contract is whitelisted', async () => { - // Whitelist consumer - await scrollUptimeFeed.addAccess(uptimeFeedConsumer.address) - // Sanity - consumer is whitelisted - expect(await scrollUptimeFeed.checkEnabled()).to.be.true - expect( - await scrollUptimeFeed.hasAccess(uptimeFeedConsumer.address, '0x00'), - ).to.be.true - - // Assert reads are possible from consuming contract - expect(await uptimeFeedConsumer.latestAnswer()).to.be.equal('0') - const [roundId, answer] = await uptimeFeedConsumer.latestRoundData() - expect(roundId).to.equal(1) - expect(answer).to.equal(0) - }) - }) - - describe('Gas costs', () => { - it('should consume a known amount of gas for updates @skip-coverage', async () => { - // Sanity - start at flag = 0 (`false`) - expect(await scrollUptimeFeed.latestAnswer()).to.equal(0) - let timestamp = await scrollUptimeFeed.latestTimestamp() - - // Gas for no update - timestamp = timestamp.add(1000) - const _noUpdateTx = await scrollUptimeFeed - .connect(l2Messenger) - .updateStatus(false, timestamp) - const noUpdateTx = await _noUpdateTx.wait(1) - // Assert no update - expect(await scrollUptimeFeed.latestAnswer()).to.equal(0) - expect(noUpdateTx.cumulativeGasUsed.toNumber()).to.be.closeTo( - 38594, - gasUsedDeviation, - ) - - // Gas for update - timestamp = timestamp.add(1000) - const _updateTx = await scrollUptimeFeed - .connect(l2Messenger) - .updateStatus(true, timestamp) - const updateTx = await _updateTx.wait(1) - // Assert update - expect(await scrollUptimeFeed.latestAnswer()).to.equal(1) - expect(updateTx.cumulativeGasUsed.toNumber()).to.be.closeTo( - 58458, - gasUsedDeviation, - ) - }) - - describe('Aggregator interface', () => { - beforeEach(async () => { - const timestamp = (await scrollUptimeFeed.latestTimestamp()).add(1000) - // Initialise a round - await scrollUptimeFeed - .connect(l2Messenger) - .updateStatus(true, timestamp) - }) - - it('should consume a known amount of gas for getRoundData(uint80) @skip-coverage', async () => { - const _tx = await l2Messenger.sendTransaction( - await scrollUptimeFeed - .connect(l2Messenger) - .populateTransaction.getRoundData(1), - ) - const tx = await _tx.wait(1) - expect(tx.cumulativeGasUsed.toNumber()).to.be.closeTo( - 30952, - gasUsedDeviation, - ) - }) - - it('should consume a known amount of gas for latestRoundData() @skip-coverage', async () => { - const _tx = await l2Messenger.sendTransaction( - await scrollUptimeFeed - .connect(l2Messenger) - .populateTransaction.latestRoundData(), - ) - const tx = await _tx.wait(1) - expect(tx.cumulativeGasUsed.toNumber()).to.be.closeTo( - 28523, - gasUsedDeviation, - ) - }) - - it('should consume a known amount of gas for latestAnswer() @skip-coverage', async () => { - const _tx = await l2Messenger.sendTransaction( - await scrollUptimeFeed - .connect(l2Messenger) - .populateTransaction.latestAnswer(), - ) - const tx = await _tx.wait(1) - expect(tx.cumulativeGasUsed.toNumber()).to.be.closeTo( - 28229, - gasUsedDeviation, - ) - }) - - it('should consume a known amount of gas for latestTimestamp() @skip-coverage', async () => { - const _tx = await l2Messenger.sendTransaction( - await scrollUptimeFeed - .connect(l2Messenger) - .populateTransaction.latestTimestamp(), - ) - const tx = await _tx.wait(1) - expect(tx.cumulativeGasUsed.toNumber()).to.be.closeTo( - 28129, - gasUsedDeviation, - ) - }) - - it('should consume a known amount of gas for latestRound() @skip-coverage', async () => { - const _tx = await l2Messenger.sendTransaction( - await scrollUptimeFeed - .connect(l2Messenger) - .populateTransaction.latestRound(), - ) - const tx = await _tx.wait(1) - expect(tx.cumulativeGasUsed.toNumber()).to.be.closeTo( - 28145, - gasUsedDeviation, - ) - }) - - it('should consume a known amount of gas for getAnswer(roundId) @skip-coverage', async () => { - const _tx = await l2Messenger.sendTransaction( - await scrollUptimeFeed - .connect(l2Messenger) - .populateTransaction.getAnswer(1), - ) - const tx = await _tx.wait(1) - expect(tx.cumulativeGasUsed.toNumber()).to.be.closeTo( - 30682, - gasUsedDeviation, - ) - }) - - it('should consume a known amount of gas for getTimestamp(roundId) @skip-coverage', async () => { - const _tx = await l2Messenger.sendTransaction( - await scrollUptimeFeed - .connect(l2Messenger) - .populateTransaction.getTimestamp(1), - ) - const tx = await _tx.wait(1) - expect(tx.cumulativeGasUsed.toNumber()).to.be.closeTo( - 30570, - gasUsedDeviation, - ) - }) - }) - }) -}) diff --git a/contracts/test/v0.8/L2EP/ScrollValidator.test.ts b/contracts/test/v0.8/L2EP/ScrollValidator.test.ts deleted file mode 100644 index 94205a03112..00000000000 --- a/contracts/test/v0.8/L2EP/ScrollValidator.test.ts +++ /dev/null @@ -1,127 +0,0 @@ -import { ethers } from 'hardhat' -import { BigNumber, Contract, ContractFactory } from 'ethers' -import { expect } from 'chai' -import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' - -describe('ScrollValidator', () => { - const GAS_LIMIT = BigNumber.from(1_900_000) - /** Fake L2 target */ - const L2_SEQ_STATUS_RECORDER_ADDRESS = - '0x491B1dDA0A8fa069bbC1125133A975BF4e85a91b' - let scrollValidator: Contract - let l1MessageQueue: Contract - let scrollUptimeFeedFactory: ContractFactory - let mockScrollL1CrossDomainMessenger: Contract - let deployer: SignerWithAddress - let eoaValidator: SignerWithAddress - - before(async () => { - const accounts = await ethers.getSigners() - deployer = accounts[0] - eoaValidator = accounts[1] - }) - - beforeEach(async () => { - // Required for building the calldata - scrollUptimeFeedFactory = await ethers.getContractFactory( - 'src/v0.8/l2ep/dev/scroll/ScrollSequencerUptimeFeed.sol:ScrollSequencerUptimeFeed', - deployer, - ) - - // Scroll Messenger contract on L1 - const mockScrollL1CrossDomainMessengerFactory = - await ethers.getContractFactory( - 'src/v0.8/l2ep/test/mocks/scroll/MockScrollL1CrossDomainMessenger.sol:MockScrollL1CrossDomainMessenger', - ) - mockScrollL1CrossDomainMessenger = - await mockScrollL1CrossDomainMessengerFactory.deploy() - - // Scroll Message Queue contract on L1 - const l1MessageQueueFactory = await ethers.getContractFactory( - 'src/v0.8/l2ep/test/mocks/scroll/MockScrollL1MessageQueue.sol:MockScrollL1MessageQueue', - deployer, - ) - l1MessageQueue = await l1MessageQueueFactory.deploy() - - // Contract under test - const scrollValidatorFactory = await ethers.getContractFactory( - 'src/v0.8/l2ep/dev/scroll/ScrollValidator.sol:ScrollValidator', - deployer, - ) - - scrollValidator = await scrollValidatorFactory.deploy( - mockScrollL1CrossDomainMessenger.address, - L2_SEQ_STATUS_RECORDER_ADDRESS, - l1MessageQueue.address, - GAS_LIMIT, - ) - }) - - describe('#setGasLimit', () => { - it('correctly updates the gas limit', async () => { - const newGasLimit = BigNumber.from(2_000_000) - const tx = await scrollValidator.setGasLimit(newGasLimit) - await tx.wait() - const currentGasLimit = await scrollValidator.getGasLimit() - expect(currentGasLimit).to.equal(newGasLimit) - }) - }) - - describe('#validate', () => { - it('reverts if called by account with no access', async () => { - await expect( - scrollValidator.connect(eoaValidator).validate(0, 0, 1, 1), - ).to.be.revertedWith('No access') - }) - - it('posts sequencer status when there is not status change', async () => { - await scrollValidator.addAccess(eoaValidator.address) - - const currentBlock = await ethers.provider.getBlock('latest') - const futureTimestamp = currentBlock.timestamp + 5000 - - await ethers.provider.send('evm_setNextBlockTimestamp', [futureTimestamp]) - const sequencerStatusRecorderCallData = - scrollUptimeFeedFactory.interface.encodeFunctionData('updateStatus', [ - false, - futureTimestamp, - ]) - - await expect(scrollValidator.connect(eoaValidator).validate(0, 0, 0, 0)) - .to.emit(mockScrollL1CrossDomainMessenger, 'SentMessage') - .withArgs( - scrollValidator.address, // sender - L2_SEQ_STATUS_RECORDER_ADDRESS, // target - 0, // value - 0, // nonce - GAS_LIMIT, // gas limit - sequencerStatusRecorderCallData, // message - ) - }) - - it('post sequencer offline', async () => { - await scrollValidator.addAccess(eoaValidator.address) - - const currentBlock = await ethers.provider.getBlock('latest') - const futureTimestamp = currentBlock.timestamp + 10000 - - await ethers.provider.send('evm_setNextBlockTimestamp', [futureTimestamp]) - const sequencerStatusRecorderCallData = - scrollUptimeFeedFactory.interface.encodeFunctionData('updateStatus', [ - true, - futureTimestamp, - ]) - - await expect(scrollValidator.connect(eoaValidator).validate(0, 0, 1, 1)) - .to.emit(mockScrollL1CrossDomainMessenger, 'SentMessage') - .withArgs( - scrollValidator.address, // sender - L2_SEQ_STATUS_RECORDER_ADDRESS, // target - 0, // value - 0, // nonce - GAS_LIMIT, // gas limit - sequencerStatusRecorderCallData, // message - ) - }) - }) -}) diff --git a/contracts/test/v0.8/automation/IKeeperRegistryMaster.test.ts b/contracts/test/v0.8/automation/IKeeperRegistryMaster.test.ts deleted file mode 100644 index f894aa87cdc..00000000000 --- a/contracts/test/v0.8/automation/IKeeperRegistryMaster.test.ts +++ /dev/null @@ -1,116 +0,0 @@ -import fs from 'fs' -import { ethers } from 'hardhat' -import { assert } from 'chai' -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' -import { KeeperRegistryBase2_1__factory as KeeperRegistryBaseFactory } from '../../../typechain/factories/KeeperRegistryBase2_1__factory' -import { Chainable__factory as ChainableFactory } from '../../../typechain/factories/Chainable__factory' -import { IKeeperRegistryMaster__factory as IKeeperRegistryMasterFactory } from '../../../typechain/factories/IKeeperRegistryMaster__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 = [ - KeeperRegistryFactory.abi, - KeeperRegistryLogicAFactory.abi, - KeeperRegistryLogicBFactory.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('IKeeperRegistryMaster', () => { - it('is up to date', async () => { - const checksum = ethers.utils.id(compositeABIs.join('')) - const knownChecksum = fs - .readFileSync( - 'src/v0.8/automation/interfaces/v2_1/IKeeperRegistryMaster.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, - ...KeeperRegistryBaseFactory.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( - IKeeperRegistryMasterFactory.abi, - IAutomationRegistryConsumerFactory.abi, - ) - }) - - it('satisfies the MigratableKeeperRegistryInterface interface', async () => { - assertSatisfiesInterface( - IKeeperRegistryMasterFactory.abi, - MigratableKeeperRegistryInterfaceFactory.abi, - ) - }) - - it('satisfies the MigratableKeeperRegistryInterfaceV2 interface', async () => { - assertSatisfiesInterface( - IKeeperRegistryMasterFactory.abi, - MigratableKeeperRegistryInterfaceV2Factory.abi, - ) - }) - - it('satisfies the OCR2Abstract interface', async () => { - assertSatisfiesInterface( - IKeeperRegistryMasterFactory.abi, - 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/KeeperRegistrar.test.ts b/contracts/test/v0.8/automation/KeeperRegistrar.test.ts deleted file mode 100644 index 8aef6810109..00000000000 --- a/contracts/test/v0.8/automation/KeeperRegistrar.test.ts +++ /dev/null @@ -1,812 +0,0 @@ -import { ethers } from 'hardhat' -import { assert, expect } from 'chai' -import { evmRevert, evmRevertCustomError } from '../../test-helpers/matchers' -import { getUsers, Personas } from '../../test-helpers/setup' -import { BigNumber, Signer } from 'ethers' -import { LinkToken__factory as LinkTokenFactory } from '../../../typechain/factories/LinkToken__factory' - -import { MockV3Aggregator__factory as MockV3AggregatorFactory } from '../../../typechain/factories/MockV3Aggregator__factory' -import { UpkeepMock__factory as UpkeepMockFactory } from '../../../typechain/factories/UpkeepMock__factory' -import { KeeperRegistry1_2 as KeeperRegistry } from '../../../typechain/KeeperRegistry1_2' -import { KeeperRegistry1_2__factory as KeeperRegistryFactory } from '../../../typechain/factories/KeeperRegistry1_2__factory' -import { KeeperRegistrar } from '../../../typechain/KeeperRegistrar' -import { KeeperRegistrar__factory as KeeperRegistrarFactory } from '../../../typechain/factories/KeeperRegistrar__factory' - -import { MockV3Aggregator } from '../../../typechain/MockV3Aggregator' -import { LinkToken } from '../../../typechain/LinkToken' -import { UpkeepMock } from '../../../typechain/UpkeepMock' -import { toWei } from '../../test-helpers/helpers' - -let linkTokenFactory: LinkTokenFactory -let mockV3AggregatorFactory: MockV3AggregatorFactory -let keeperRegistryFactory: KeeperRegistryFactory -let keeperRegistrar: KeeperRegistrarFactory -let upkeepMockFactory: UpkeepMockFactory - -let personas: Personas - -before(async () => { - personas = (await getUsers()).personas - - linkTokenFactory = await ethers.getContractFactory( - 'src/v0.8/shared/test/helpers/LinkTokenTestHelper.sol:LinkTokenTestHelper', - ) - mockV3AggregatorFactory = (await ethers.getContractFactory( - 'src/v0.8/tests/MockV3Aggregator.sol:MockV3Aggregator', - )) as unknown as MockV3AggregatorFactory - // @ts-ignore bug in autogen file - keeperRegistryFactory = await ethers.getContractFactory('KeeperRegistry1_2') - keeperRegistrar = await ethers.getContractFactory('KeeperRegistrar') - upkeepMockFactory = await ethers.getContractFactory('UpkeepMock') -}) - -const errorMsgs = { - onlyOwner: 'revert Only callable by owner', - onlyAdmin: 'OnlyAdminOrOwner', - hashPayload: 'HashMismatch', - requestNotFound: 'RequestNotFound', -} - -describe('KeeperRegistrar', () => { - const upkeepName = 'SampleUpkeep' - - const linkEth = BigNumber.from(300000000) - const gasWei = BigNumber.from(100) - const executeGas = BigNumber.from(100000) - const source = BigNumber.from(100) - const paymentPremiumPPB = BigNumber.from(250000000) - const flatFeeMicroLink = BigNumber.from(0) - const maxAllowedAutoApprove = 5 - - const blockCountPerTurn = BigNumber.from(3) - 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 maxPerformGas = BigNumber.from(5000000) - const minUpkeepSpend = BigNumber.from('1000000000000000000') - const amount = BigNumber.from('5000000000000000000') - const amount1 = BigNumber.from('6000000000000000000') - const transcoder = ethers.constants.AddressZero - - // 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: LinkToken - let linkEthFeed: MockV3Aggregator - let gasPriceFeed: MockV3Aggregator - let registry: KeeperRegistry - let mock: UpkeepMock - let registrar: KeeperRegistrar - - beforeEach(async () => { - owner = personas.Default - admin = personas.Neil - someAddress = personas.Ned - registrarOwner = personas.Nelly - stranger = personas.Nancy - requestSender = personas.Norbert - - const config = { - paymentPremiumPPB, - flatFeeMicroLink, - blockCountPerTurn, - checkGasLimit, - stalenessSeconds, - gasCeilingMultiplier, - minUpkeepSpend, - maxPerformGas, - fallbackGasPrice, - fallbackLinkPrice, - transcoder, - registrar: ethers.constants.AddressZero, - } - - linkToken = await linkTokenFactory.connect(owner).deploy() - gasPriceFeed = await mockV3AggregatorFactory - .connect(owner) - .deploy(0, gasWei) - linkEthFeed = await mockV3AggregatorFactory - .connect(owner) - .deploy(9, linkEth) - registry = await keeperRegistryFactory - .connect(owner) - .deploy( - linkToken.address, - linkEthFeed.address, - gasPriceFeed.address, - config, - ) - - mock = await upkeepMockFactory.deploy() - - registrar = await keeperRegistrar - .connect(registrarOwner) - .deploy( - linkToken.address, - autoApproveType_DISABLED, - BigNumber.from('0'), - registry.address, - minUpkeepSpend, - ) - - await linkToken - .connect(owner) - .transfer(await requestSender.getAddress(), toWei('1000')) - - config.registrar = registrar.address - await registry.setConfig(config) - }) - - describe('#typeAndVersion', () => { - it('uses the correct type and version', async () => { - const typeAndVersion = await registrar.typeAndVersion() - assert.equal(typeAndVersion, 'KeeperRegistrar 1.1.0') - }) - }) - - describe('#register', () => { - it('reverts if not called by the LINK token', async () => { - await evmRevertCustomError( - registrar - .connect(someAddress) - .register( - upkeepName, - emptyBytes, - mock.address, - executeGas, - await admin.getAddress(), - emptyBytes, - amount, - source, - await requestSender.getAddress(), - ), - registrar, - 'OnlyLink', - ) - }) - - it('reverts if the amount passed in data mismatches actual amount sent', async () => { - await registrar - .connect(registrarOwner) - .setRegistrationConfig( - autoApproveType_ENABLED_ALL, - maxAllowedAutoApprove, - registry.address, - minUpkeepSpend, - ) - - const abiEncodedBytes = registrar.interface.encodeFunctionData( - 'register', - [ - upkeepName, - emptyBytes, - mock.address, - executeGas, - await admin.getAddress(), - emptyBytes, - amount1, - source, - await requestSender.getAddress(), - ], - ) - - await evmRevertCustomError( - linkToken - .connect(requestSender) - .transferAndCall(registrar.address, amount, abiEncodedBytes), - registrar, - 'AmountMismatch', - ) - }) - - it('reverts if the sender passed in data mismatches actual sender', async () => { - const abiEncodedBytes = registrar.interface.encodeFunctionData( - 'register', - [ - upkeepName, - emptyBytes, - mock.address, - executeGas, - await admin.getAddress(), - emptyBytes, - amount, - source, - await admin.getAddress(), // Should have been requestSender.getAddress() - ], - ) - await evmRevertCustomError( - linkToken - .connect(requestSender) - .transferAndCall(registrar.address, amount, abiEncodedBytes), - registrar, - 'SenderMismatch', - ) - }) - - it('reverts if the admin address is 0x0000...', async () => { - const abiEncodedBytes = registrar.interface.encodeFunctionData( - 'register', - [ - upkeepName, - emptyBytes, - mock.address, - executeGas, - '0x0000000000000000000000000000000000000000', - emptyBytes, - amount, - source, - await requestSender.getAddress(), - ], - ) - - await evmRevertCustomError( - linkToken - .connect(requestSender) - .transferAndCall(registrar.address, amount, abiEncodedBytes), - registrar, - '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) - .setRegistrationConfig( - autoApproveType_ENABLED_ALL, - maxAllowedAutoApprove, - registry.address, - minUpkeepSpend, - ) - - //register with auto approve ON - const abiEncodedBytes = registrar.interface.encodeFunctionData( - 'register', - [ - upkeepName, - emptyBytes, - mock.address, - executeGas, - await admin.getAddress(), - emptyBytes, - amount, - source, - 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.executeGas, executeGas.toNumber()) - - 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) - .setRegistrationConfig( - autoApproveType_DISABLED, - maxAllowedAutoApprove, - registry.address, - minUpkeepSpend, - ) - - //register with auto approve OFF - const abiEncodedBytes = registrar.interface.encodeFunctionData( - 'register', - [ - upkeepName, - emptyBytes, - mock.address, - executeGas, - await admin.getAddress(), - emptyBytes, - amount, - source, - 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).setRegistrationConfig( - autoApproveType_ENABLED_ALL, - 1, // maxAllowedAutoApprove - registry.address, - minUpkeepSpend, - ) - - //register within threshold, new upkeep should be registered - let abiEncodedBytes = registrar.interface.encodeFunctionData('register', [ - upkeepName, - emptyBytes, - mock.address, - executeGas, - await admin.getAddress(), - emptyBytes, - amount, - source, - 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, - executeGas.toNumber() + 1, // make unique hash - await admin.getAddress(), - emptyBytes, - amount, - source, - await requestSender.getAddress(), - ]) - await linkToken - .connect(requestSender) - .transferAndCall(registrar.address, amount, abiEncodedBytes) - assert.equal((await registry.getState()).state.numUpkeeps.toNumber(), 1) // Still 1 - - // Now set new max limit to 2. One more upkeep should get auto approved - await registrar.connect(registrarOwner).setRegistrationConfig( - autoApproveType_ENABLED_ALL, - 2, // maxAllowedAutoApprove - registry.address, - minUpkeepSpend, - ) - abiEncodedBytes = registrar.interface.encodeFunctionData('register', [ - upkeepName, - emptyBytes, - mock.address, - executeGas.toNumber() + 2, // make unique hash - await admin.getAddress(), - emptyBytes, - amount, - source, - await requestSender.getAddress(), - ]) - await linkToken - .connect(requestSender) - .transferAndCall(registrar.address, amount, abiEncodedBytes) - assert.equal((await registry.getState()).state.numUpkeeps.toNumber(), 2) // 1 -> 2 - - // One more upkeep should not get registered - abiEncodedBytes = registrar.interface.encodeFunctionData('register', [ - upkeepName, - emptyBytes, - mock.address, - executeGas.toNumber() + 3, // make unique hash - await admin.getAddress(), - emptyBytes, - amount, - source, - await requestSender.getAddress(), - ]) - await linkToken - .connect(requestSender) - .transferAndCall(registrar.address, amount, abiEncodedBytes) - assert.equal((await registry.getState()).state.numUpkeeps.toNumber(), 2) // Still 2 - }) - - 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) - .setRegistrationConfig( - autoApproveType_ENABLED_SENDER_ALLOWLIST, - maxAllowedAutoApprove, - registry.address, - minUpkeepSpend, - ) - - // 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, - executeGas, - await admin.getAddress(), - emptyBytes, - amount, - source, - 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.executeGas, executeGas.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) - .setRegistrationConfig( - autoApproveType_ENABLED_SENDER_ALLOWLIST, - maxAllowedAutoApprove, - registry.address, - minUpkeepSpend, - ) - - // 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, - executeGas, - await admin.getAddress(), - emptyBytes, - amount, - source, - 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('#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('#approve', () => { - let hash: string - - beforeEach(async () => { - await registrar - .connect(registrarOwner) - .setRegistrationConfig( - autoApproveType_DISABLED, - maxAllowedAutoApprove, - registry.address, - minUpkeepSpend, - ) - - //register with auto approve OFF - const abiEncodedBytes = registrar.interface.encodeFunctionData( - 'register', - [ - upkeepName, - emptyBytes, - mock.address, - executeGas, - await admin.getAddress(), - emptyBytes, - amount, - source, - 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, - executeGas, - await admin.getAddress(), - 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, - executeGas, - await admin.getAddress(), - emptyBytes, - '0x000000000000000000000000322813fd9a801c5507c9de605d63cea4f2ce6c44', - ) - await evmRevertCustomError(tx, registrar, errorMsgs.requestNotFound) - }) - - it('reverts if any member of the payload changes', async () => { - let tx = registrar - .connect(registrarOwner) - .approve( - upkeepName, - ethers.Wallet.createRandom().address, - executeGas, - await admin.getAddress(), - emptyBytes, - hash, - ) - await evmRevertCustomError(tx, registrar, errorMsgs.hashPayload) - tx = registrar - .connect(registrarOwner) - .approve( - upkeepName, - mock.address, - 10000, - await admin.getAddress(), - emptyBytes, - hash, - ) - await evmRevertCustomError(tx, registrar, errorMsgs.hashPayload) - tx = registrar - .connect(registrarOwner) - .approve( - upkeepName, - mock.address, - executeGas, - ethers.Wallet.createRandom().address, - emptyBytes, - hash, - ) - await evmRevertCustomError(tx, registrar, errorMsgs.hashPayload) - tx = registrar - .connect(registrarOwner) - .approve( - upkeepName, - mock.address, - executeGas, - await admin.getAddress(), - '0x1234', - hash, - ) - await evmRevertCustomError(tx, registrar, errorMsgs.hashPayload) - }) - - it('approves an existing registration request', async () => { - const tx = await registrar - .connect(registrarOwner) - .approve( - upkeepName, - mock.address, - executeGas, - await admin.getAddress(), - emptyBytes, - 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, - executeGas, - await admin.getAddress(), - emptyBytes, - hash, - ) - const tx = registrar - .connect(registrarOwner) - .approve( - upkeepName, - mock.address, - executeGas, - await admin.getAddress(), - emptyBytes, - hash, - ) - await evmRevertCustomError(tx, registrar, errorMsgs.requestNotFound) - }) - }) - - describe('#cancel', () => { - let hash: string - - beforeEach(async () => { - await registrar - .connect(registrarOwner) - .setRegistrationConfig( - autoApproveType_DISABLED, - maxAllowedAutoApprove, - registry.address, - minUpkeepSpend, - ) - - //register with auto approve OFF - const abiEncodedBytes = registrar.interface.encodeFunctionData( - 'register', - [ - upkeepName, - emptyBytes, - mock.address, - executeGas, - await admin.getAddress(), - emptyBytes, - amount, - source, - 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 evmRevertCustomError(tx, registrar, errorMsgs.onlyAdmin) - }) - - it('reverts if the hash does not exist', async () => { - const tx = registrar - .connect(registrarOwner) - .cancel( - '0x000000000000000000000000322813fd9a801c5507c9de605d63cea4f2ce6c44', - ) - await evmRevertCustomError(tx, registrar, errorMsgs.requestNotFound) - }) - - it('refunds the total request balance to the admin address', 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 evmRevertCustomError(tx, registrar, errorMsgs.requestNotFound) - tx = registrar - .connect(registrarOwner) - .approve( - upkeepName, - mock.address, - executeGas, - await admin.getAddress(), - emptyBytes, - hash, - ) - await evmRevertCustomError(tx, registrar, errorMsgs.requestNotFound) - }) - }) -}) diff --git a/contracts/test/v0.8/automation/KeeperRegistry2_1.test.ts b/contracts/test/v0.8/automation/KeeperRegistry2_1.test.ts deleted file mode 100644 index 05bdabbea54..00000000000 --- a/contracts/test/v0.8/automation/KeeperRegistry2_1.test.ts +++ /dev/null @@ -1,5655 +0,0 @@ -import { ethers } from 'hardhat' -import { assert } from 'chai' -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' -import { AutomationForwarderLogic__factory as AutomationForwarderLogicFactory } from '../../../typechain/factories/AutomationForwarderLogic__factory' - -// const describeMaybe = process.env.SKIP_SLOW ? describe.skip : describe -// const itMaybe = process.env.SKIP_SLOW ? it.skip : it - -////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////// - -/*********************************** REGISTRY v2.1 IS FROZEN ************************************/ - -// We are leaving the original tests enabled, however as 2.1 is still actively being deployed - -describe('KeeperRegistry2_1 - Frozen [ @skip-coverage ]', () => { - it('has not changed', () => { - assert.equal( - ethers.utils.id(KeeperRegistryFactory.bytecode), - '0x05aaa1024d7400e9c4824dde093b96edf5888fa6e6be2c2fc4dca7ae47cc9de9', - 'KeeperRegistry bytecode has changed', - ) - assert.equal( - ethers.utils.id(KeeperRegistryLogicAFactory.bytecode), - '0xdcc8805e88c550b2a25b972bee9f4e4c3649f01e26f8dda6b25d7a9c5da8ab2f', - 'KeeperRegistryLogicA bytecode has changed', - ) - assert.equal( - ethers.utils.id(KeeperRegistryLogicBFactory.bytecode), - '0x891c26ba35b9b13afc9400fac5471d15842828ab717cbdc70ee263210c542563', - 'KeeperRegistryLogicB bytecode has changed', - ) - assert.equal( - ethers.utils.id(AutomationForwarderLogicFactory.bytecode), - '0x6b89065111e9236407329fae3d68b33c311b7d3b6c2ae3dd15c1691a28b1aca7', - 'AutomationForwarderLogic bytecode has changed', - ) - }) -}) - -////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////// - -// copied from AutomationRegistryInterface2_1.sol -// enum UpkeepFailureReason { -// NONE, -// UPKEEP_CANCELLED, -// UPKEEP_PAUSED, -// TARGET_CHECK_REVERTED, -// UPKEEP_NOT_NEEDED, -// PERFORM_DATA_EXCEEDS_LIMIT, -// INSUFFICIENT_BALANCE, -// CHECK_CALLBACK_REVERTED, -// REVERT_DATA_EXCEEDS_LIMIT, -// REGISTRY_PAUSED, -// } -// -// // copied from AutomationRegistryInterface2_1.sol -// enum Mode { -// DEFAULT, -// ARBITRUM, -// OPTIMISM, -// } -// -// // copied from KeeperRegistryBase2_1.sol -// enum Trigger { -// CONDITION, -// LOG, -// } -// -// // 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] -// -// // ----------------------------------------------------------------------------------------------- -// -// // These values should match the constants declared in registry -// let registryConditionalOverhead: BigNumber -// let registryLogOverhead: BigNumber -// let registryPerSignerGasOverhead: BigNumber -// let registryPerPerformByteGasOverhead: BigNumber -// let cancellationDelay: number -// -// // This is the margin for gas that we test for. Gas charged should always be greater -// // than total gas used in tx but should not increase beyond this margin -// const gasCalculationMargin = BigNumber.from(8000) -// -// const linkEth = BigNumber.from(5000000000000000) // 1 Link = 0.005 Eth -// 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') -// const flatFeeMicroLink = BigNumber.from(0) -// -// const randomBytes = '0x1234abcd' -// const emptyBytes = '0x' -// const emptyBytes32 = -// '0x0000000000000000000000000000000000000000000000000000000000000000' -// -// const transmitGasOverhead = 1_000_000 -// const checkGasOverhead = 400_000 -// -// 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 maxCheckDataSize = BigNumber.from(1000) -// const maxPerformDataSize = BigNumber.from(1000) -// const maxRevertDataSize = BigNumber.from(1000) -// const maxPerformGas = BigNumber.from(5000000) -// const minUpkeepSpend = BigNumber.from(0) -// const f = 1 -// const offchainVersion = 1 -// const offchainBytes = '0x' -// const zeroAddress = ethers.constants.AddressZero -// const epochAndRound5_1 = -// '0x0000000000000000000000000000000000000000000000000000000000000501' -// -// let logTriggerConfig: string -// -// // ----------------------------------------------------------------------------------------------- -// -// // Smart contract factories -// let linkTokenFactory: LinkTokenFactory -// let mockV3AggregatorFactory: MockV3AggregatorFactory -// let upkeepMockFactory: UpkeepMockFactory -// let upkeepAutoFunderFactory: UpkeepAutoFunderFactory -// let mockArbGasInfoFactory: MockArbGasInfoFactory -// let mockOVMGasPriceOracleFactory: MockOVMGasPriceOracleFactory -// let streamsLookupUpkeepFactory: StreamsLookupUpkeepFactory -// let personas: Personas -// -// // contracts -// let linkToken: LinkToken -// let linkEthFeed: MockV3Aggregator -// let gasPriceFeed: MockV3Aggregator -// let registry: IKeeperRegistry // default registry, used for most tests -// let arbRegistry: IKeeperRegistry // arbitrum registry -// let opRegistry: IKeeperRegistry // optimism registry -// let mgRegistry: IKeeperRegistry // "migrate registry" used in migration tests -// let blankRegistry: IKeeperRegistry // used to test initial configurations -// let mock: UpkeepMock -// let autoFunderUpkeep: UpkeepAutoFunder -// let ltUpkeep: MockContract -// let transcoder: UpkeepTranscoder -// let mockArbGasInfo: MockArbGasInfo -// let mockOVMGasPriceOracle: MockOVMGasPriceOracle -// let streamsLookupUpkeep: StreamsLookupUpkeep -// let automationUtils: AutomationUtils -// -// function now() { -// return Math.floor(Date.now() / 1000) -// } -// -// async function getUpkeepID(tx: ContractTransaction): Promise { -// const receipt = await tx.wait() -// for (const event of receipt.events || []) { -// if ( -// event.args && -// event.eventSignature == 'UpkeepRegistered(uint256,uint32,address)' -// ) { -// return event.args[0] -// } -// } -// throw new Error('could not find upkeep ID in tx event logs') -// } -// -// const getTriggerType = (upkeepId: BigNumber): Trigger => { -// const hexBytes = ethers.utils.defaultAbiCoder.encode(['uint256'], [upkeepId]) -// const bytes = ethers.utils.arrayify(hexBytes) -// for (let idx = 4; idx < 15; idx++) { -// if (bytes[idx] != 0) { -// return Trigger.CONDITION -// } -// } -// return bytes[15] as Trigger -// } -// -// const encodeConfig = (onchainConfig: OnChainConfig) => { -// return ( -// '0x' + -// automationUtils.interface -// .encodeFunctionData('_onChainConfig', [onchainConfig]) -// .slice(10) -// ) -// } -// -// const encodeBlockTrigger = (conditionalTrigger: ConditionalTrigger) => { -// return ( -// '0x' + -// automationUtils.interface -// .encodeFunctionData('_conditionalTrigger', [conditionalTrigger]) -// .slice(10) -// ) -// } -// -// const encodeLogTrigger = (logTrigger: LogTrigger) => { -// return ( -// '0x' + -// automationUtils.interface -// .encodeFunctionData('_logTrigger', [logTrigger]) -// .slice(10) -// ) -// } -// -// const encodeLog = (log: Log) => { -// return ( -// '0x' + automationUtils.interface.encodeFunctionData('_log', [log]).slice(10) -// ) -// } -// -// const encodeReport = (report: Report) => { -// return ( -// '0x' + -// automationUtils.interface.encodeFunctionData('_report', [report]).slice(10) -// ) -// } -// -// type UpkeepData = { -// Id: BigNumberish -// performGas: BigNumberish -// performData: BytesLike -// trigger: BytesLike -// } -// -// const makeReport = (upkeeps: UpkeepData[]) => { -// const upkeepIds = upkeeps.map((u) => u.Id) -// const performGases = upkeeps.map((u) => u.performGas) -// const triggers = upkeeps.map((u) => u.trigger) -// const performDatas = upkeeps.map((u) => u.performData) -// return encodeReport({ -// fastGasWei: gasWei, -// linkNative: linkEth, -// upkeepIds, -// gasLimits: performGases, -// triggers, -// performDatas, -// }) -// } -// -// const makeLatestBlockReport = async (upkeepsIDs: BigNumberish[]) => { -// const latestBlock = await ethers.provider.getBlock('latest') -// const upkeeps: UpkeepData[] = [] -// for (let i = 0; i < upkeepsIDs.length; i++) { -// upkeeps.push({ -// Id: upkeepsIDs[i], -// performGas, -// trigger: encodeBlockTrigger({ -// blockNum: latestBlock.number, -// blockHash: latestBlock.hash, -// }), -// performData: '0x', -// }) -// } -// return makeReport(upkeeps) -// } -// -// const signReport = ( -// reportContext: string[], -// report: any, -// signers: Wallet[], -// ) => { -// const reportDigest = ethers.utils.keccak256(report) -// const packedArgs = ethers.utils.solidityPack( -// ['bytes32', 'bytes32[3]'], -// [reportDigest, reportContext], -// ) -// const packedDigest = ethers.utils.keccak256(packedArgs) -// -// const signatures = [] -// for (const signer of signers) { -// signatures.push(signer._signingKey().signDigest(packedDigest)) -// } -// const vs = signatures.map((i) => '0' + (i.v - 27).toString(16)).join('') -// return { -// vs: '0x' + vs.padEnd(64, '0'), -// rs: signatures.map((i) => i.r), -// ss: signatures.map((i) => i.s), -// } -// } -// -// const parseUpkeepPerformedLogs = (receipt: ContractReceipt) => { -// const parsedLogs = [] -// for (const rawLog of receipt.logs) { -// try { -// const log = registry.interface.parseLog(rawLog) -// if ( -// log.name == -// registry.interface.events[ -// 'UpkeepPerformed(uint256,bool,uint96,uint256,uint256,bytes)' -// ].name -// ) { -// parsedLogs.push(log as unknown as UpkeepPerformedEvent) -// } -// } catch { -// continue -// } -// } -// return parsedLogs -// } -// -// const parseReorgedUpkeepReportLogs = (receipt: ContractReceipt) => { -// const parsedLogs = [] -// for (const rawLog of receipt.logs) { -// try { -// const log = registry.interface.parseLog(rawLog) -// if ( -// log.name == -// registry.interface.events['ReorgedUpkeepReport(uint256,bytes)'].name -// ) { -// parsedLogs.push(log as unknown as ReorgedUpkeepReportEvent) -// } -// } catch { -// continue -// } -// } -// return parsedLogs -// } -// -// const parseStaleUpkeepReportLogs = (receipt: ContractReceipt) => { -// const parsedLogs = [] -// for (const rawLog of receipt.logs) { -// try { -// const log = registry.interface.parseLog(rawLog) -// if ( -// log.name == -// registry.interface.events['StaleUpkeepReport(uint256,bytes)'].name -// ) { -// parsedLogs.push(log as unknown as StaleUpkeepReportEvent) -// } -// } catch { -// continue -// } -// } -// return parsedLogs -// } -// -// const parseInsufficientFundsUpkeepReportLogs = (receipt: ContractReceipt) => { -// const parsedLogs = [] -// for (const rawLog of receipt.logs) { -// try { -// const log = registry.interface.parseLog(rawLog) -// if ( -// log.name == -// registry.interface.events[ -// 'InsufficientFundsUpkeepReport(uint256,bytes)' -// ].name -// ) { -// parsedLogs.push(log as unknown as InsufficientFundsUpkeepReportEvent) -// } -// } catch { -// continue -// } -// } -// return parsedLogs -// } -// -// const parseCancelledUpkeepReportLogs = (receipt: ContractReceipt) => { -// const parsedLogs = [] -// for (const rawLog of receipt.logs) { -// try { -// const log = registry.interface.parseLog(rawLog) -// if ( -// log.name == -// registry.interface.events['CancelledUpkeepReport(uint256,bytes)'].name -// ) { -// parsedLogs.push(log as unknown as CancelledUpkeepReportEvent) -// } -// } catch { -// continue -// } -// } -// return parsedLogs -// } -// -// describe('KeeperRegistry2_1', () => { -// let owner: Signer -// let keeper1: Signer -// let keeper2: Signer -// let keeper3: Signer -// let keeper4: Signer -// let keeper5: Signer -// let nonkeeper: Signer -// let signer1: Wallet -// let signer2: Wallet -// let signer3: Wallet -// let signer4: Wallet -// let signer5: Wallet -// let admin: Signer -// let payee1: Signer -// let payee2: Signer -// let payee3: Signer -// let payee4: Signer -// let payee5: Signer -// -// let upkeepId: BigNumber // conditional upkeep -// let afUpkeepId: BigNumber // auto funding upkeep -// let logUpkeepId: BigNumber // log trigger upkeepID -// let streamsLookupUpkeepId: BigNumber // streams lookup upkeep -// const numUpkeeps = 4 // see above -// let keeperAddresses: string[] -// let payees: string[] -// let signers: Wallet[] -// let signerAddresses: string[] -// let config: any -// let baseConfig: Parameters -// let upkeepManager: string -// -// before(async () => { -// personas = (await getUsers()).personas -// -// const utilsFactory = await ethers.getContractFactory('AutomationUtils2_1') -// automationUtils = await utilsFactory.deploy() -// -// linkTokenFactory = await ethers.getContractFactory( -// 'src/v0.8/shared/test/helpers/LinkTokenTestHelper.sol:LinkTokenTestHelper', -// ) -// // need full path because there are two contracts with name MockV3Aggregator -// mockV3AggregatorFactory = (await ethers.getContractFactory( -// 'src/v0.8/tests/MockV3Aggregator.sol:MockV3Aggregator', -// )) as unknown as MockV3AggregatorFactory -// upkeepMockFactory = await ethers.getContractFactory('UpkeepMock') -// upkeepAutoFunderFactory = -// await ethers.getContractFactory('UpkeepAutoFunder') -// mockArbGasInfoFactory = await ethers.getContractFactory('MockArbGasInfo') -// mockOVMGasPriceOracleFactory = await ethers.getContractFactory( -// 'MockOVMGasPriceOracle', -// ) -// streamsLookupUpkeepFactory = await ethers.getContractFactory( -// 'StreamsLookupUpkeep', -// ) -// -// owner = personas.Default -// keeper1 = personas.Carol -// keeper2 = personas.Eddy -// keeper3 = personas.Nancy -// keeper4 = personas.Norbert -// keeper5 = personas.Nick -// nonkeeper = personas.Ned -// admin = personas.Neil -// payee1 = personas.Nelly -// payee2 = personas.Norbert -// payee3 = personas.Nick -// payee4 = personas.Eddy -// payee5 = personas.Carol -// upkeepManager = await personas.Norbert.getAddress() -// // signers -// signer1 = new ethers.Wallet( -// '0x7777777000000000000000000000000000000000000000000000000000000001', -// ) -// signer2 = new ethers.Wallet( -// '0x7777777000000000000000000000000000000000000000000000000000000002', -// ) -// signer3 = new ethers.Wallet( -// '0x7777777000000000000000000000000000000000000000000000000000000003', -// ) -// signer4 = new ethers.Wallet( -// '0x7777777000000000000000000000000000000000000000000000000000000004', -// ) -// signer5 = new ethers.Wallet( -// '0x7777777000000000000000000000000000000000000000000000000000000005', -// ) -// -// keeperAddresses = [ -// await keeper1.getAddress(), -// await keeper2.getAddress(), -// await keeper3.getAddress(), -// await keeper4.getAddress(), -// await keeper5.getAddress(), -// ] -// payees = [ -// await payee1.getAddress(), -// await payee2.getAddress(), -// await payee3.getAddress(), -// await payee4.getAddress(), -// await payee5.getAddress(), -// ] -// signers = [signer1, signer2, signer3, signer4, signer5] -// -// // We append 26 random addresses to keepers, payees and signers to get a system of 31 oracles -// // This allows f value of 1 - 10 -// for (let i = 0; i < 26; i++) { -// keeperAddresses.push(randomAddress()) -// payees.push(randomAddress()) -// signers.push(ethers.Wallet.createRandom()) -// } -// signerAddresses = [] -// for (const signer of signers) { -// signerAddresses.push(await signer.getAddress()) -// } -// -// logTriggerConfig = -// '0x' + -// automationUtils.interface -// .encodeFunctionData('_logTriggerConfig', [ -// { -// contractAddress: randomAddress(), -// filterSelector: 0, -// topic0: ethers.utils.randomBytes(32), -// topic1: ethers.utils.randomBytes(32), -// topic2: ethers.utils.randomBytes(32), -// topic3: ethers.utils.randomBytes(32), -// }, -// ]) -// .slice(10) -// }) -// -// const linkForGas = ( -// upkeepGasSpent: BigNumber, -// gasOverhead: BigNumber, -// gasMultiplier: BigNumber, -// premiumPPB: BigNumber, -// flatFee: BigNumber, -// l1CostWei?: BigNumber, -// numUpkeepsBatch?: BigNumber, -// ) => { -// l1CostWei = l1CostWei === undefined ? BigNumber.from(0) : l1CostWei -// numUpkeepsBatch = -// numUpkeepsBatch === undefined ? BigNumber.from(1) : numUpkeepsBatch -// -// const gasSpent = gasOverhead.add(BigNumber.from(upkeepGasSpent)) -// const base = gasWei -// .mul(gasMultiplier) -// .mul(gasSpent) -// .mul(linkDivisibility) -// .div(linkEth) -// const l1Fee = l1CostWei -// .mul(gasMultiplier) -// .div(numUpkeepsBatch) -// .mul(linkDivisibility) -// .div(linkEth) -// const gasPayment = base.add(l1Fee) -// -// const premium = gasWei -// .mul(gasMultiplier) -// .mul(upkeepGasSpent) -// .add(l1CostWei.mul(gasMultiplier).div(numUpkeepsBatch)) -// .mul(linkDivisibility) -// .div(linkEth) -// .mul(premiumPPB) -// .div(paymentPremiumBase) -// .add(BigNumber.from(flatFee).mul('1000000000000')) -// -// return { -// total: gasPayment.add(premium), -// gasPaymemnt: gasPayment, -// premium, -// } -// } -// -// const verifyMaxPayment = async ( -// registry: IKeeperRegistry, -// l1CostWei?: BigNumber, -// ) => { -// type TestCase = { -// name: string -// multiplier: number -// gas: number -// premium: number -// flatFee: number -// } -// -// const tests: TestCase[] = [ -// { -// name: 'no fees', -// multiplier: 1, -// gas: 100000, -// premium: 0, -// flatFee: 0, -// }, -// { -// name: 'basic fees', -// multiplier: 1, -// gas: 100000, -// premium: 250000000, -// flatFee: 1000000, -// }, -// { -// name: 'max fees', -// multiplier: 3, -// gas: 10000000, -// premium: 250000000, -// flatFee: 1000000, -// }, -// ] -// -// const fPlusOne = BigNumber.from(f + 1) -// const totalConditionalOverhead = registryConditionalOverhead -// .add(registryPerSignerGasOverhead.mul(fPlusOne)) -// .add(registryPerPerformByteGasOverhead.mul(maxPerformDataSize)) -// const totalLogOverhead = registryLogOverhead -// .add(registryPerSignerGasOverhead.mul(fPlusOne)) -// .add(registryPerPerformByteGasOverhead.mul(maxPerformDataSize)) -// -// for (const test of tests) { -// await registry.connect(owner).setConfig( -// signerAddresses, -// keeperAddresses, -// f, -// encodeConfig({ -// paymentPremiumPPB: test.premium, -// flatFeeMicroLink: test.flatFee, -// checkGasLimit, -// stalenessSeconds, -// gasCeilingMultiplier: test.multiplier, -// minUpkeepSpend, -// maxCheckDataSize, -// maxPerformDataSize, -// maxRevertDataSize, -// maxPerformGas, -// fallbackGasPrice, -// fallbackLinkPrice, -// transcoder: transcoder.address, -// registrars: [], -// upkeepPrivilegeManager: upkeepManager, -// }), -// offchainVersion, -// offchainBytes, -// ) -// -// const conditionalPrice = await registry.getMaxPaymentForGas( -// Trigger.CONDITION, -// test.gas, -// ) -// expect(conditionalPrice).to.equal( -// linkForGas( -// BigNumber.from(test.gas), -// totalConditionalOverhead, -// BigNumber.from(test.multiplier), -// BigNumber.from(test.premium), -// BigNumber.from(test.flatFee), -// l1CostWei, -// ).total, -// ) -// -// const logPrice = await registry.getMaxPaymentForGas(Trigger.LOG, test.gas) -// expect(logPrice).to.equal( -// linkForGas( -// BigNumber.from(test.gas), -// totalLogOverhead, -// BigNumber.from(test.multiplier), -// BigNumber.from(test.premium), -// BigNumber.from(test.flatFee), -// l1CostWei, -// ).total, -// ) -// } -// } -// -// const verifyConsistentAccounting = async ( -// maxAllowedSpareChange: BigNumber, -// ) => { -// const expectedLinkBalance = (await registry.getState()).state -// .expectedLinkBalance -// const linkTokenBalance = await linkToken.balanceOf(registry.address) -// const upkeepIdBalance = (await registry.getUpkeep(upkeepId)).balance -// let totalKeeperBalance = BigNumber.from(0) -// for (let i = 0; i < keeperAddresses.length; i++) { -// totalKeeperBalance = totalKeeperBalance.add( -// (await registry.getTransmitterInfo(keeperAddresses[i])).balance, -// ) -// } -// const ownerBalance = (await registry.getState()).state.ownerLinkBalance -// assert.isTrue(expectedLinkBalance.eq(linkTokenBalance)) -// assert.isTrue( -// upkeepIdBalance -// .add(totalKeeperBalance) -// .add(ownerBalance) -// .lte(expectedLinkBalance), -// ) -// assert.isTrue( -// expectedLinkBalance -// .sub(upkeepIdBalance) -// .sub(totalKeeperBalance) -// .sub(ownerBalance) -// .lte(maxAllowedSpareChange), -// ) -// } -// -// interface GetTransmitTXOptions { -// numSigners?: number -// startingSignerIndex?: number -// gasLimit?: BigNumberish -// gasPrice?: BigNumberish -// performGas?: BigNumberish -// performData?: string -// checkBlockNum?: number -// checkBlockHash?: string -// logBlockHash?: BytesLike -// txHash?: BytesLike -// logIndex?: number -// timestamp?: number -// } -// -// const getTransmitTx = async ( -// registry: IKeeperRegistry, -// transmitter: Signer, -// upkeepIds: BigNumber[], -// overrides: GetTransmitTXOptions = {}, -// ) => { -// const latestBlock = await ethers.provider.getBlock('latest') -// const configDigest = (await registry.getState()).state.latestConfigDigest -// const config = { -// numSigners: f + 1, -// startingSignerIndex: 0, -// performData: '0x', -// performGas, -// checkBlockNum: latestBlock.number, -// checkBlockHash: latestBlock.hash, -// logIndex: 0, -// txHash: undefined, // assigned uniquely below -// logBlockHash: undefined, // assigned uniquely below -// timestamp: now(), -// gasLimit: undefined, -// gasPrice: undefined, -// } -// Object.assign(config, overrides) -// const upkeeps: UpkeepData[] = [] -// for (let i = 0; i < upkeepIds.length; i++) { -// let trigger: string -// switch (getTriggerType(upkeepIds[i])) { -// case Trigger.CONDITION: -// trigger = encodeBlockTrigger({ -// blockNum: config.checkBlockNum, -// blockHash: config.checkBlockHash, -// }) -// break -// case Trigger.LOG: -// trigger = encodeLogTrigger({ -// logBlockHash: config.logBlockHash || ethers.utils.randomBytes(32), -// txHash: config.txHash || ethers.utils.randomBytes(32), -// logIndex: config.logIndex, -// blockNum: config.checkBlockNum, -// blockHash: config.checkBlockHash, -// }) -// break -// } -// upkeeps.push({ -// Id: upkeepIds[i], -// performGas: config.performGas, -// trigger, -// performData: config.performData, -// }) -// } -// -// const report = makeReport(upkeeps) -// const reportContext = [configDigest, epochAndRound5_1, emptyBytes32] -// const sigs = signReport( -// reportContext, -// report, -// signers.slice( -// config.startingSignerIndex, -// config.startingSignerIndex + config.numSigners, -// ), -// ) -// -// type txOverride = { -// gasLimit?: BigNumberish | Promise -// gasPrice?: BigNumberish | Promise -// } -// const txOverrides: txOverride = {} -// if (config.gasLimit) { -// txOverrides.gasLimit = config.gasLimit -// } -// if (config.gasPrice) { -// txOverrides.gasPrice = config.gasPrice -// } -// -// return registry -// .connect(transmitter) -// .transmit( -// [configDigest, epochAndRound5_1, emptyBytes32], -// report, -// sigs.rs, -// sigs.ss, -// sigs.vs, -// txOverrides, -// ) -// } -// -// const getTransmitTxWithReport = async ( -// registry: IKeeperRegistry, -// transmitter: Signer, -// report: BytesLike, -// ) => { -// const configDigest = (await registry.getState()).state.latestConfigDigest -// const reportContext = [configDigest, epochAndRound5_1, emptyBytes32] -// const sigs = signReport(reportContext, report, signers.slice(0, f + 1)) -// -// return registry -// .connect(transmitter) -// .transmit( -// [configDigest, epochAndRound5_1, emptyBytes32], -// report, -// sigs.rs, -// sigs.ss, -// sigs.vs, -// ) -// } -// -// const setup = async () => { -// linkToken = await linkTokenFactory.connect(owner).deploy() -// gasPriceFeed = await mockV3AggregatorFactory -// .connect(owner) -// .deploy(0, gasWei) -// linkEthFeed = await mockV3AggregatorFactory -// .connect(owner) -// .deploy(9, linkEth) -// const upkeepTranscoderFactory = await ethers.getContractFactory( -// 'UpkeepTranscoder4_0', -// ) -// transcoder = await upkeepTranscoderFactory.connect(owner).deploy() -// mockArbGasInfo = await mockArbGasInfoFactory.connect(owner).deploy() -// mockOVMGasPriceOracle = await mockOVMGasPriceOracleFactory -// .connect(owner) -// .deploy() -// streamsLookupUpkeep = await streamsLookupUpkeepFactory -// .connect(owner) -// .deploy( -// BigNumber.from('10000'), -// BigNumber.from('100'), -// false /* useArbBlock */, -// true /* staging */, -// false /* verify mercury response */, -// ) -// -// const arbOracleCode = await ethers.provider.send('eth_getCode', [ -// mockArbGasInfo.address, -// ]) -// await ethers.provider.send('hardhat_setCode', [ -// '0x000000000000000000000000000000000000006C', -// arbOracleCode, -// ]) -// -// const optOracleCode = await ethers.provider.send('eth_getCode', [ -// mockOVMGasPriceOracle.address, -// ]) -// await ethers.provider.send('hardhat_setCode', [ -// '0x420000000000000000000000000000000000000F', -// optOracleCode, -// ]) -// -// const mockArbSys = await new MockArbSysFactory(owner).deploy() -// const arbSysCode = await ethers.provider.send('eth_getCode', [ -// mockArbSys.address, -// ]) -// await ethers.provider.send('hardhat_setCode', [ -// '0x0000000000000000000000000000000000000064', -// arbSysCode, -// ]) -// -// config = { -// paymentPremiumPPB, -// flatFeeMicroLink, -// checkGasLimit, -// stalenessSeconds, -// gasCeilingMultiplier, -// minUpkeepSpend, -// maxCheckDataSize, -// maxPerformDataSize, -// maxRevertDataSize, -// maxPerformGas, -// fallbackGasPrice, -// fallbackLinkPrice, -// transcoder: transcoder.address, -// registrars: [], -// upkeepPrivilegeManager: upkeepManager, -// } -// -// baseConfig = [ -// signerAddresses, -// keeperAddresses, -// f, -// encodeConfig(config), -// offchainVersion, -// offchainBytes, -// ] -// -// registry = await deployRegistry21( -// owner, -// Mode.DEFAULT, -// linkToken.address, -// linkEthFeed.address, -// gasPriceFeed.address, -// ) -// -// arbRegistry = await deployRegistry21( -// owner, -// Mode.ARBITRUM, -// linkToken.address, -// linkEthFeed.address, -// gasPriceFeed.address, -// ) -// -// opRegistry = await deployRegistry21( -// owner, -// Mode.OPTIMISM, -// linkToken.address, -// linkEthFeed.address, -// gasPriceFeed.address, -// ) -// -// mgRegistry = await deployRegistry21( -// owner, -// Mode.DEFAULT, -// linkToken.address, -// linkEthFeed.address, -// gasPriceFeed.address, -// ) -// -// blankRegistry = await deployRegistry21( -// owner, -// Mode.DEFAULT, -// linkToken.address, -// linkEthFeed.address, -// gasPriceFeed.address, -// ) -// -// registryConditionalOverhead = await registry.getConditionalGasOverhead() -// registryLogOverhead = await registry.getLogGasOverhead() -// registryPerSignerGasOverhead = await registry.getPerSignerGasOverhead() -// registryPerPerformByteGasOverhead = -// await registry.getPerPerformByteGasOverhead() -// cancellationDelay = (await registry.getCancellationDelay()).toNumber() -// -// for (const reg of [registry, arbRegistry, opRegistry, mgRegistry]) { -// await reg.connect(owner).setConfig(...baseConfig) -// await reg.connect(owner).setPayees(payees) -// await linkToken.connect(admin).approve(reg.address, toWei('1000')) -// await linkToken.connect(owner).approve(reg.address, toWei('1000')) -// } -// -// mock = await upkeepMockFactory.deploy() -// await linkToken -// .connect(owner) -// .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') -// upkeepId = await getUpkeepID(tx) -// -// autoFunderUpkeep = await upkeepAutoFunderFactory -// .connect(owner) -// .deploy(linkToken.address, registry.address) -// tx = await registry -// .connect(owner) -// [ -// 'registerUpkeep(address,uint32,address,bytes,bytes)' -// ](autoFunderUpkeep.address, performGas, autoFunderUpkeep.address, randomBytes, '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) -// logUpkeepId = await getUpkeepID(tx) -// -// await autoFunderUpkeep.setUpkeepId(afUpkeepId) -// // Give enough funds for upkeep as well as to the upkeep contract -// await linkToken -// .connect(owner) -// .transfer(autoFunderUpkeep.address, toWei('1000')) -// -// tx = await registry -// .connect(owner) -// [ -// 'registerUpkeep(address,uint32,address,bytes,bytes)' -// ](streamsLookupUpkeep.address, performGas, await admin.getAddress(), randomBytes, '0x') -// streamsLookupUpkeepId = await getUpkeepID(tx) -// } -// -// const getMultipleUpkeepsDeployedAndFunded = async ( -// numPassingConditionalUpkeeps: number, -// numPassingLogUpkeeps: number, -// numFailingUpkeeps: number, -// ) => { -// const passingConditionalUpkeepIds = [] -// const passingLogUpkeepIds = [] -// const failingUpkeepIds = [] -// for (let i = 0; i < numPassingConditionalUpkeeps; i++) { -// const mock = await upkeepMockFactory.deploy() -// await mock.setCanPerform(true) -// 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') -// const condUpkeepId = await getUpkeepID(tx) -// passingConditionalUpkeepIds.push(condUpkeepId) -// -// // Add funds to passing upkeeps -// await registry.connect(admin).addFunds(condUpkeepId, toWei('100')) -// } -// for (let i = 0; i < numPassingLogUpkeeps; i++) { -// const mock = await upkeepMockFactory.deploy() -// await mock.setCanPerform(true) -// 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) -// const logUpkeepId = await getUpkeepID(tx) -// passingLogUpkeepIds.push(logUpkeepId) -// -// // Add funds to passing upkeeps -// await registry.connect(admin).addFunds(logUpkeepId, toWei('100')) -// } -// for (let i = 0; i < numFailingUpkeeps; i++) { -// const mock = await upkeepMockFactory.deploy() -// await mock.setCanPerform(true) -// 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') -// const failingUpkeepId = await getUpkeepID(tx) -// failingUpkeepIds.push(failingUpkeepId) -// } -// return { -// passingConditionalUpkeepIds, -// passingLogUpkeepIds, -// failingUpkeepIds, -// } -// } -// -// beforeEach(async () => { -// await loadFixture(setup) -// }) -// -// describe('#transmit', () => { -// const fArray = [1, 5, 10] -// -// it('reverts when registry is paused', async () => { -// await registry.connect(owner).pause() -// await evmRevert( -// getTransmitTx(registry, keeper1, [upkeepId]), -// 'RegistryPaused()', -// ) -// }) -// -// it('reverts when called by non active transmitter', async () => { -// await evmRevert( -// getTransmitTx(registry, payee1, [upkeepId]), -// 'OnlyActiveTransmitters()', -// ) -// }) -// -// it('reverts when report data lengths mismatches', async () => { -// const upkeepIds = [] -// const gasLimits: BigNumber[] = [] -// const triggers: string[] = [] -// const performDatas = [] -// -// upkeepIds.push(upkeepId) -// gasLimits.push(performGas) -// triggers.push('0x') -// performDatas.push('0x') -// // Push an extra perform data -// performDatas.push('0x') -// -// const report = encodeReport({ -// fastGasWei: 0, -// linkNative: 0, -// upkeepIds, -// gasLimits, -// triggers, -// performDatas, -// }) -// -// await evmRevert( -// getTransmitTxWithReport(registry, keeper1, report), -// 'InvalidReport()', -// ) -// }) -// -// it('returns early when invalid upkeepIds are included in report', async () => { -// const tx = await getTransmitTx(registry, keeper1, [ -// upkeepId.add(BigNumber.from('1')), -// ]) -// -// const receipt = await tx.wait() -// const cancelledUpkeepReportLogs = parseCancelledUpkeepReportLogs(receipt) -// // exactly 1 CancelledUpkeepReport log should be emitted -// assert.equal(cancelledUpkeepReportLogs.length, 1) -// }) -// -// it('returns early when upkeep has insufficient funds', async () => { -// const tx = await getTransmitTx(registry, keeper1, [upkeepId]) -// const receipt = await tx.wait() -// const insufficientFundsUpkeepReportLogs = -// parseInsufficientFundsUpkeepReportLogs(receipt) -// // exactly 1 InsufficientFundsUpkeepReportLogs log should be emitted -// assert.equal(insufficientFundsUpkeepReportLogs.length, 1) -// }) -// -// it('permits retrying log triggers after funds are added', async () => { -// const txHash = ethers.utils.randomBytes(32) -// let tx = await getTransmitTx(registry, keeper1, [logUpkeepId], { -// txHash, -// logIndex: 0, -// }) -// let receipt = await tx.wait() -// const insufficientFundsLogs = -// parseInsufficientFundsUpkeepReportLogs(receipt) -// assert.equal(insufficientFundsLogs.length, 1) -// registry.connect(admin).addFunds(logUpkeepId, toWei('100')) -// tx = await getTransmitTx(registry, keeper1, [logUpkeepId], { -// txHash, -// logIndex: 0, -// }) -// receipt = await tx.wait() -// const performedLogs = parseUpkeepPerformedLogs(receipt) -// assert.equal(performedLogs.length, 1) -// }) -// -// context('When the upkeep is funded', async () => { -// beforeEach(async () => { -// // Fund the upkeep -// await Promise.all([ -// registry.connect(admin).addFunds(upkeepId, toWei('100')), -// registry.connect(admin).addFunds(logUpkeepId, toWei('100')), -// ]) -// }) -// -// it('handles duplicate upkeepIDs', async () => { -// const tests: [string, BigNumber, number, number][] = [ -// // [name, upkeep, num stale, num performed] -// ['conditional', upkeepId, 1, 1], // checkBlocks must be sequential -// ['log-trigger', logUpkeepId, 0, 2], // logs are deduped based on the "trigger ID" -// ] -// for (const [type, id, nStale, nPerformed] of tests) { -// const tx = await getTransmitTx(registry, keeper1, [id, id]) -// const receipt = await tx.wait() -// const staleUpkeepReport = parseStaleUpkeepReportLogs(receipt) -// const upkeepPerformedLogs = parseUpkeepPerformedLogs(receipt) -// assert.equal( -// staleUpkeepReport.length, -// nStale, -// `wrong log count for ${type} upkeep`, -// ) -// assert.equal( -// upkeepPerformedLogs.length, -// nPerformed, -// `wrong log count for ${type} upkeep`, -// ) -// } -// }) -// -// it('handles duplicate log triggers', async () => { -// const logBlockHash = ethers.utils.randomBytes(32) -// const txHash = ethers.utils.randomBytes(32) -// const logIndex = 0 -// const expectedDedupKey = ethers.utils.solidityKeccak256( -// ['uint256', 'bytes32', 'bytes32', 'uint32'], -// [logUpkeepId, logBlockHash, txHash, logIndex], -// ) -// assert.isFalse(await registry.hasDedupKey(expectedDedupKey)) -// const tx = await getTransmitTx( -// registry, -// keeper1, -// [logUpkeepId, logUpkeepId], -// { logBlockHash, txHash, logIndex }, // will result in the same dedup key -// ) -// const receipt = await tx.wait() -// const staleUpkeepReport = parseStaleUpkeepReportLogs(receipt) -// const upkeepPerformedLogs = parseUpkeepPerformedLogs(receipt) -// assert.equal(staleUpkeepReport.length, 1) -// assert.equal(upkeepPerformedLogs.length, 1) -// assert.isTrue(await registry.hasDedupKey(expectedDedupKey)) -// await expect(tx) -// .to.emit(registry, 'DedupKeyAdded') -// .withArgs(expectedDedupKey) -// }) -// -// it('returns early when check block number is less than last perform (block)', async () => { -// // First perform an upkeep to put last perform block number on upkeep state -// const tx = await getTransmitTx(registry, keeper1, [upkeepId]) -// await tx.wait() -// const lastPerformed = (await registry.getUpkeep(upkeepId)) -// .lastPerformedBlockNumber -// const lastPerformBlock = await ethers.provider.getBlock(lastPerformed) -// assert.equal(lastPerformed.toString(), tx.blockNumber?.toString()) -// // Try to transmit a report which has checkBlockNumber = lastPerformed-1, should result in stale report -// const transmitTx = await getTransmitTx(registry, keeper1, [upkeepId], { -// checkBlockNum: lastPerformBlock.number - 1, -// checkBlockHash: lastPerformBlock.parentHash, -// }) -// const receipt = await transmitTx.wait() -// const staleUpkeepReportLogs = parseStaleUpkeepReportLogs(receipt) -// // exactly 1 StaleUpkeepReportLogs log should be emitted -// assert.equal(staleUpkeepReportLogs.length, 1) -// }) -// -// it('handles case when check block hash does not match', async () => { -// const tests: [string, BigNumber][] = [ -// ['conditional', upkeepId], -// ['log-trigger', logUpkeepId], -// ] -// for (const [type, id] of tests) { -// const latestBlock = await ethers.provider.getBlock('latest') -// // Try to transmit a report which has incorrect checkBlockHash -// const tx = await getTransmitTx(registry, keeper1, [id], { -// checkBlockNum: latestBlock.number - 1, -// checkBlockHash: latestBlock.hash, // should be latestBlock.parentHash -// }) -// -// const receipt = await tx.wait() -// const reorgedUpkeepReportLogs = parseReorgedUpkeepReportLogs(receipt) -// // exactly 1 ReorgedUpkeepReportLogs log should be emitted -// assert.equal( -// reorgedUpkeepReportLogs.length, -// 1, -// `wrong log count for ${type} upkeep`, -// ) -// } -// }) -// -// it('handles case when check block number is older than 256 blocks', async () => { -// for (let i = 0; i < 256; i++) { -// await ethers.provider.send('evm_mine', []) -// } -// const tests: [string, BigNumber][] = [ -// ['conditional', upkeepId], -// ['log-trigger', logUpkeepId], -// ] -// for (const [type, id] of tests) { -// const latestBlock = await ethers.provider.getBlock('latest') -// const old = await ethers.provider.getBlock(latestBlock.number - 256) -// // Try to transmit a report which has incorrect checkBlockHash -// const tx = await getTransmitTx(registry, keeper1, [id], { -// checkBlockNum: old.number, -// checkBlockHash: old.hash, -// }) -// -// const receipt = await tx.wait() -// const reorgedUpkeepReportLogs = parseReorgedUpkeepReportLogs(receipt) -// // exactly 1 ReorgedUpkeepReportLogs log should be emitted -// assert.equal( -// reorgedUpkeepReportLogs.length, -// 1, -// `wrong log count for ${type} upkeep`, -// ) -// } -// }) -// -// it('allows bypassing reorg protection with empty blockhash', async () => { -// const tests: [string, BigNumber][] = [ -// ['conditional', upkeepId], -// ['log-trigger', logUpkeepId], -// ] -// for (const [type, id] of tests) { -// const latestBlock = await ethers.provider.getBlock('latest') -// const tx = await getTransmitTx(registry, keeper1, [id], { -// checkBlockNum: latestBlock.number, -// checkBlockHash: emptyBytes32, -// }) -// const receipt = await tx.wait() -// const upkeepPerformedLogs = parseUpkeepPerformedLogs(receipt) -// assert.equal( -// upkeepPerformedLogs.length, -// 1, -// `wrong log count for ${type} upkeep`, -// ) -// } -// }) -// -// it('allows very old trigger block numbers when bypassing reorg protection with empty blockhash', async () => { -// // mine enough blocks so that blockhash(1) is unavailable -// for (let i = 0; i <= 256; i++) { -// await ethers.provider.send('evm_mine', []) -// } -// const tests: [string, BigNumber][] = [ -// ['conditional', upkeepId], -// ['log-trigger', logUpkeepId], -// ] -// for (const [type, id] of tests) { -// const tx = await getTransmitTx(registry, keeper1, [id], { -// checkBlockNum: 1, -// checkBlockHash: emptyBytes32, -// }) -// const receipt = await tx.wait() -// const upkeepPerformedLogs = parseUpkeepPerformedLogs(receipt) -// assert.equal( -// upkeepPerformedLogs.length, -// 1, -// `wrong log count for ${type} upkeep`, -// ) -// } -// }) -// -// it('returns early when future block number is provided as trigger, irrespective of blockhash being present', async () => { -// const tests: [string, BigNumber][] = [ -// ['conditional', upkeepId], -// ['log-trigger', logUpkeepId], -// ] -// for (const [type, id] of tests) { -// const latestBlock = await ethers.provider.getBlock('latest') -// -// // Should fail when blockhash is empty -// let tx = await getTransmitTx(registry, keeper1, [id], { -// checkBlockNum: latestBlock.number + 100, -// checkBlockHash: emptyBytes32, -// }) -// let receipt = await tx.wait() -// let reorgedUpkeepReportLogs = parseReorgedUpkeepReportLogs(receipt) -// // exactly 1 ReorgedUpkeepReportLogs log should be emitted -// assert.equal( -// reorgedUpkeepReportLogs.length, -// 1, -// `wrong log count for ${type} upkeep`, -// ) -// -// // Should also fail when blockhash is not empty -// tx = await getTransmitTx(registry, keeper1, [id], { -// checkBlockNum: latestBlock.number + 100, -// checkBlockHash: latestBlock.hash, -// }) -// receipt = await tx.wait() -// reorgedUpkeepReportLogs = parseReorgedUpkeepReportLogs(receipt) -// // exactly 1 ReorgedUpkeepReportLogs log should be emitted -// assert.equal( -// reorgedUpkeepReportLogs.length, -// 1, -// `wrong log count for ${type} upkeep`, -// ) -// } -// }) -// -// it('returns early when upkeep is cancelled and cancellation delay has gone', async () => { -// const latestBlockReport = await makeLatestBlockReport([upkeepId]) -// await registry.connect(admin).cancelUpkeep(upkeepId) -// -// for (let i = 0; i < cancellationDelay; i++) { -// await ethers.provider.send('evm_mine', []) -// } -// -// const tx = await getTransmitTxWithReport( -// registry, -// keeper1, -// latestBlockReport, -// ) -// -// const receipt = await tx.wait() -// const cancelledUpkeepReportLogs = -// parseCancelledUpkeepReportLogs(receipt) -// // exactly 1 CancelledUpkeepReport log should be emitted -// assert.equal(cancelledUpkeepReportLogs.length, 1) -// }) -// -// it('does not revert if the target cannot execute', async () => { -// await mock.setCanPerform(false) -// const tx = await getTransmitTx(registry, keeper1, [upkeepId]) -// -// const receipt = await tx.wait() -// const upkeepPerformedLogs = parseUpkeepPerformedLogs(receipt) -// // exactly 1 Upkeep Performed should be emitted -// assert.equal(upkeepPerformedLogs.length, 1) -// const upkeepPerformedLog = upkeepPerformedLogs[0] -// -// const success = upkeepPerformedLog.args.success -// assert.equal(success, false) -// }) -// -// it('does not revert if the target runs out of gas', async () => { -// await mock.setCanPerform(false) -// -// const tx = await getTransmitTx(registry, keeper1, [upkeepId], { -// performGas: 10, // too little gas -// }) -// -// const receipt = await tx.wait() -// const upkeepPerformedLogs = parseUpkeepPerformedLogs(receipt) -// // exactly 1 Upkeep Performed should be emitted -// assert.equal(upkeepPerformedLogs.length, 1) -// const upkeepPerformedLog = upkeepPerformedLogs[0] -// -// const success = upkeepPerformedLog.args.success -// assert.equal(success, false) -// }) -// -// it('reverts if not enough gas supplied', async () => { -// await evmRevert( -// getTransmitTx(registry, keeper1, [upkeepId], { -// gasLimit: performGas, -// }), -// ) -// }) -// -// it('executes the data passed to the registry', async () => { -// await mock.setCanPerform(true) -// -// const tx = await getTransmitTx(registry, keeper1, [upkeepId], { -// performData: randomBytes, -// }) -// const receipt = await tx.wait() -// -// const upkeepPerformedWithABI = [ -// 'event UpkeepPerformedWith(bytes upkeepData)', -// ] -// const iface = new ethers.utils.Interface(upkeepPerformedWithABI) -// const parsedLogs = [] -// for (let i = 0; i < receipt.logs.length; i++) { -// const log = receipt.logs[i] -// try { -// parsedLogs.push(iface.parseLog(log)) -// } catch (e) { -// // ignore log -// } -// } -// assert.equal(parsedLogs.length, 1) -// assert.equal(parsedLogs[0].args.upkeepData, randomBytes) -// }) -// -// 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')) -// await mock.setCanPerform(true) -// const registryPremiumBefore = (await registry.getState()).state -// .totalPremium -// const tx = await getTransmitTx(registry, keeper1, [upkeepId], { -// gasPrice, -// }) -// const receipt = await tx.wait() -// const registryPremiumAfter = (await registry.getState()).state -// .totalPremium -// const premium = registryPremiumAfter.sub(registryPremiumBefore) -// -// const upkeepPerformedLogs = parseUpkeepPerformedLogs(receipt) -// // exactly 1 Upkeep Performed should be emitted -// assert.equal(upkeepPerformedLogs.length, 1) -// const upkeepPerformedLog = upkeepPerformedLogs[0] -// -// const gasUsed = upkeepPerformedLog.args.gasUsed -// const gasOverhead = upkeepPerformedLog.args.gasOverhead -// const totalPayment = upkeepPerformedLog.args.totalPayment -// -// assert.equal( -// linkForGas( -// gasUsed, -// gasOverhead, -// BigNumber.from('1'), // Not the config multiplier, but the actual gas used -// paymentPremiumPPB, -// flatFeeMicroLink, -// ).total.toString(), -// totalPayment.toString(), -// ) -// -// assert.equal( -// linkForGas( -// gasUsed, -// gasOverhead, -// BigNumber.from('1'), // Not the config multiplier, but the actual gas used -// paymentPremiumPPB, -// flatFeeMicroLink, -// ).premium.toString(), -// premium.toString(), -// ) -// }) -// -// it('only pays at a rate up to the gas ceiling [ @skip-coverage ]', async () => { -// // Actual multiplier is 2, but we set gasPrice to be 10x -// const gasPrice = gasWei.mul(BigNumber.from('10')) -// await mock.setCanPerform(true) -// -// const tx = await getTransmitTx(registry, keeper1, [upkeepId], { -// gasPrice, -// }) -// const receipt = await tx.wait() -// const upkeepPerformedLogs = parseUpkeepPerformedLogs(receipt) -// // exactly 1 Upkeep Performed should be emitted -// assert.equal(upkeepPerformedLogs.length, 1) -// const upkeepPerformedLog = upkeepPerformedLogs[0] -// -// const gasUsed = upkeepPerformedLog.args.gasUsed -// const gasOverhead = upkeepPerformedLog.args.gasOverhead -// const totalPayment = upkeepPerformedLog.args.totalPayment -// -// assert.equal( -// linkForGas( -// gasUsed, -// gasOverhead, -// gasCeilingMultiplier, // Should be same with exisitng multiplier -// paymentPremiumPPB, -// flatFeeMicroLink, -// ).total.toString(), -// totalPayment.toString(), -// ) -// }) -// -// it('correctly accounts for l payment', async () => { -// await mock.setCanPerform(true) -// // Same as MockArbGasInfo.sol -// const l1CostWeiArb = BigNumber.from(1000000) -// -// let tx = await arbRegistry -// .connect(owner) -// [ -// 'registerUpkeep(address,uint32,address,bytes,bytes)' -// ](mock.address, performGas, await admin.getAddress(), randomBytes, '0x') -// const testUpkeepId = await getUpkeepID(tx) -// await arbRegistry.connect(owner).addFunds(testUpkeepId, toWei('100')) -// -// // Do the thing -// tx = await getTransmitTx( -// arbRegistry, -// keeper1, -// [testUpkeepId], -// -// { gasPrice: gasWei.mul('5') }, // High gas price so that it gets capped -// ) -// const receipt = await tx.wait() -// const upkeepPerformedLogs = parseUpkeepPerformedLogs(receipt) -// // exactly 1 Upkeep Performed should be emitted -// assert.equal(upkeepPerformedLogs.length, 1) -// const upkeepPerformedLog = upkeepPerformedLogs[0] -// -// const gasUsed = upkeepPerformedLog.args.gasUsed -// const gasOverhead = upkeepPerformedLog.args.gasOverhead -// const totalPayment = upkeepPerformedLog.args.totalPayment -// -// assert.equal( -// linkForGas( -// gasUsed, -// gasOverhead, -// gasCeilingMultiplier, -// paymentPremiumPPB, -// flatFeeMicroLink, -// l1CostWeiArb.div(gasCeilingMultiplier), // Dividing by gasCeilingMultiplier as it gets multiplied later -// ).total.toString(), -// totalPayment.toString(), -// ) -// }) -// -// itMaybe('can self fund', async () => { -// const maxPayment = await registry.getMaxPaymentForGas( -// Trigger.CONDITION, -// performGas, -// ) -// -// // First set auto funding amount to 0 and verify that balance is deducted upon performUpkeep -// let initialBalance = toWei('100') -// await registry.connect(owner).addFunds(afUpkeepId, initialBalance) -// await autoFunderUpkeep.setAutoFundLink(0) -// await autoFunderUpkeep.setIsEligible(true) -// await getTransmitTx(registry, keeper1, [afUpkeepId]) -// -// let postUpkeepBalance = (await registry.getUpkeep(afUpkeepId)).balance -// assert.isTrue(postUpkeepBalance.lt(initialBalance)) // Balance should be deducted -// assert.isTrue(postUpkeepBalance.gte(initialBalance.sub(maxPayment))) // Balance should not be deducted more than maxPayment -// -// // Now set auto funding amount to 100 wei and verify that the balance increases -// initialBalance = postUpkeepBalance -// const autoTopupAmount = toWei('100') -// await autoFunderUpkeep.setAutoFundLink(autoTopupAmount) -// await autoFunderUpkeep.setIsEligible(true) -// await getTransmitTx(registry, keeper1, [afUpkeepId]) -// -// postUpkeepBalance = (await registry.getUpkeep(afUpkeepId)).balance -// // Balance should increase by autoTopupAmount and decrease by max maxPayment -// assert.isTrue( -// postUpkeepBalance.gte( -// initialBalance.add(autoTopupAmount).sub(maxPayment), -// ), -// ) -// }) -// -// it('can self cancel', async () => { -// await registry.connect(owner).addFunds(afUpkeepId, toWei('100')) -// -// await autoFunderUpkeep.setIsEligible(true) -// await autoFunderUpkeep.setShouldCancel(true) -// -// let registration = await registry.getUpkeep(afUpkeepId) -// const oldExpiration = registration.maxValidBlocknumber -// -// // Do the thing -// await getTransmitTx(registry, keeper1, [afUpkeepId]) -// -// // Verify upkeep gets cancelled -// registration = await registry.getUpkeep(afUpkeepId) -// const newExpiration = registration.maxValidBlocknumber -// assert.isTrue(newExpiration.lt(oldExpiration)) -// }) -// -// it('reverts when configDigest mismatches', async () => { -// const report = await makeLatestBlockReport([upkeepId]) -// const reportContext = [emptyBytes32, epochAndRound5_1, emptyBytes32] // wrong config digest -// const sigs = signReport(reportContext, report, signers.slice(0, f + 1)) -// await evmRevert( -// registry -// .connect(keeper1) -// .transmit( -// [reportContext[0], reportContext[1], reportContext[2]], -// report, -// sigs.rs, -// sigs.ss, -// sigs.vs, -// ), -// 'ConfigDigestMismatch()', -// ) -// }) -// -// it('reverts with incorrect number of signatures', async () => { -// const configDigest = (await registry.getState()).state -// .latestConfigDigest -// const report = await makeLatestBlockReport([upkeepId]) -// const reportContext = [configDigest, epochAndRound5_1, emptyBytes32] // wrong config digest -// const sigs = signReport(reportContext, report, signers.slice(0, f + 2)) -// await evmRevert( -// registry -// .connect(keeper1) -// .transmit( -// [reportContext[0], reportContext[1], reportContext[2]], -// report, -// sigs.rs, -// sigs.ss, -// sigs.vs, -// ), -// 'IncorrectNumberOfSignatures()', -// ) -// }) -// -// it('reverts with invalid signature for inactive signers', async () => { -// const configDigest = (await registry.getState()).state -// .latestConfigDigest -// const report = await makeLatestBlockReport([upkeepId]) -// const reportContext = [configDigest, epochAndRound5_1, emptyBytes32] // wrong config digest -// const sigs = signReport(reportContext, report, [ -// new ethers.Wallet(ethers.Wallet.createRandom()), -// new ethers.Wallet(ethers.Wallet.createRandom()), -// ]) -// await evmRevert( -// registry -// .connect(keeper1) -// .transmit( -// [reportContext[0], reportContext[1], reportContext[2]], -// report, -// sigs.rs, -// sigs.ss, -// sigs.vs, -// ), -// 'OnlyActiveSigners()', -// ) -// }) -// -// it('reverts with invalid signature for duplicated signers', async () => { -// const configDigest = (await registry.getState()).state -// .latestConfigDigest -// const report = await makeLatestBlockReport([upkeepId]) -// const reportContext = [configDigest, epochAndRound5_1, emptyBytes32] // wrong config digest -// const sigs = signReport(reportContext, report, [signer1, signer1]) -// await evmRevert( -// registry -// .connect(keeper1) -// .transmit( -// [reportContext[0], reportContext[1], reportContext[2]], -// report, -// sigs.rs, -// sigs.ss, -// sigs.vs, -// ), -// 'DuplicateSigners()', -// ) -// }) -// -// itMaybe( -// 'has a large enough gas overhead to cover upkeep that use all its gas [ @skip-coverage ]', -// async () => { -// await registry.connect(owner).setConfigTypeSafe( -// signerAddresses, -// keeperAddresses, -// 10, // maximise f to maximise overhead -// config, -// offchainVersion, -// offchainBytes, -// ) -// 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')) -// -// let performData = '0x' -// for (let i = 0; i < maxPerformDataSize.toNumber(); i++) { -// performData += '11' -// } // max allowed performData -// -// await mock.setCanPerform(true) -// await mock.setPerformGasToBurn(maxPerformGas) -// -// await getTransmitTx(registry, keeper1, [testUpkeepId], { -// gasLimit: maxPerformGas.add(transmitGasOverhead), -// numSigners: 11, -// performData, -// }) // Should not revert -// }, -// ) -// -// itMaybe( -// 'performs upkeep, deducts payment, updates lastPerformed and emits events', -// async () => { -// await mock.setCanPerform(true) -// -// for (const i in fArray) { -// const newF = fArray[i] -// await registry -// .connect(owner) -// .setConfigTypeSafe( -// signerAddresses, -// keeperAddresses, -// newF, -// config, -// offchainVersion, -// offchainBytes, -// ) -// const checkBlock = await ethers.provider.getBlock('latest') -// -// const keeperBefore = await registry.getTransmitterInfo( -// await keeper1.getAddress(), -// ) -// const registrationBefore = await registry.getUpkeep(upkeepId) -// const registryPremiumBefore = (await registry.getState()).state -// .totalPremium -// const keeperLinkBefore = await linkToken.balanceOf( -// await keeper1.getAddress(), -// ) -// const registryLinkBefore = await linkToken.balanceOf( -// registry.address, -// ) -// -// // Do the thing -// const tx = await getTransmitTx(registry, keeper1, [upkeepId], { -// checkBlockNum: checkBlock.number, -// checkBlockHash: checkBlock.hash, -// numSigners: newF + 1, -// }) -// -// const receipt = await tx.wait() -// -// const upkeepPerformedLogs = parseUpkeepPerformedLogs(receipt) -// // exactly 1 Upkeep Performed should be emitted -// assert.equal(upkeepPerformedLogs.length, 1) -// const upkeepPerformedLog = upkeepPerformedLogs[0] -// -// const id = upkeepPerformedLog.args.id -// const success = upkeepPerformedLog.args.success -// const trigger = upkeepPerformedLog.args.trigger -// const gasUsed = upkeepPerformedLog.args.gasUsed -// const gasOverhead = upkeepPerformedLog.args.gasOverhead -// const totalPayment = upkeepPerformedLog.args.totalPayment -// assert.equal(id.toString(), upkeepId.toString()) -// assert.equal(success, true) -// assert.equal( -// trigger, -// encodeBlockTrigger({ -// blockNum: checkBlock.number, -// blockHash: checkBlock.hash, -// }), -// ) -// assert.isTrue(gasUsed.gt(BigNumber.from('0'))) -// assert.isTrue(gasOverhead.gt(BigNumber.from('0'))) -// assert.isTrue(totalPayment.gt(BigNumber.from('0'))) -// -// const keeperAfter = await registry.getTransmitterInfo( -// await keeper1.getAddress(), -// ) -// const registrationAfter = await registry.getUpkeep(upkeepId) -// const keeperLinkAfter = await linkToken.balanceOf( -// await keeper1.getAddress(), -// ) -// const registryLinkAfter = await linkToken.balanceOf( -// registry.address, -// ) -// const registryPremiumAfter = (await registry.getState()).state -// .totalPremium -// const premium = registryPremiumAfter.sub(registryPremiumBefore) -// // Keeper payment is gasPayment + premium / num keepers -// const keeperPayment = totalPayment -// .sub(premium) -// .add(premium.div(BigNumber.from(keeperAddresses.length))) -// -// assert.equal( -// keeperAfter.balance.sub(keeperPayment).toString(), -// keeperBefore.balance.toString(), -// ) -// assert.equal( -// registrationBefore.balance.sub(totalPayment).toString(), -// registrationAfter.balance.toString(), -// ) -// assert.isTrue(keeperLinkAfter.eq(keeperLinkBefore)) -// assert.isTrue(registryLinkBefore.eq(registryLinkAfter)) -// -// // Amount spent should be updated correctly -// assert.equal( -// registrationAfter.amountSpent.sub(totalPayment).toString(), -// registrationBefore.amountSpent.toString(), -// ) -// assert.isTrue( -// registrationAfter.amountSpent -// .sub(registrationBefore.amountSpent) -// .eq(registrationBefore.balance.sub(registrationAfter.balance)), -// ) -// // Last perform block number should be updated -// assert.equal( -// registrationAfter.lastPerformedBlockNumber.toString(), -// tx.blockNumber?.toString(), -// ) -// -// // Latest epoch should be 5 -// assert.equal((await registry.getState()).state.latestEpoch, 5) -// } -// }, -// ) -// -// describeMaybe( -// 'Gas benchmarking conditional upkeeps [ @skip-coverage ]', -// function () { -// const fs = [1, 10] -// fs.forEach(function (newF) { -// it( -// 'When f=' + -// newF + -// ' calculates gas overhead appropriately within a margin for different scenarios', -// async () => { -// // Perform the upkeep once to remove non-zero storage slots and have predictable gas measurement -// let tx = await getTransmitTx(registry, keeper1, [upkeepId]) -// await tx.wait() -// -// // Different test scenarios -// let longBytes = '0x' -// for (let i = 0; i < maxPerformDataSize.toNumber(); i++) { -// longBytes += '11' -// } -// const upkeepSuccessArray = [true, false] -// const performGasArray = [5000, performGas] -// const performDataArray = ['0x', longBytes] -// -// for (const i in upkeepSuccessArray) { -// for (const j in performGasArray) { -// for (const k in performDataArray) { -// const upkeepSuccess = upkeepSuccessArray[i] -// const performGas = performGasArray[j] -// const performData = performDataArray[k] -// -// await mock.setCanPerform(upkeepSuccess) -// await mock.setPerformGasToBurn(performGas) -// await registry -// .connect(owner) -// .setConfigTypeSafe( -// signerAddresses, -// keeperAddresses, -// newF, -// config, -// offchainVersion, -// offchainBytes, -// ) -// tx = await getTransmitTx(registry, keeper1, [upkeepId], { -// numSigners: newF + 1, -// performData, -// }) -// const receipt = await tx.wait() -// const upkeepPerformedLogs = -// parseUpkeepPerformedLogs(receipt) -// // exactly 1 Upkeep Performed should be emitted -// assert.equal(upkeepPerformedLogs.length, 1) -// const upkeepPerformedLog = upkeepPerformedLogs[0] -// -// const upkeepGasUsed = upkeepPerformedLog.args.gasUsed -// const chargedGasOverhead = -// upkeepPerformedLog.args.gasOverhead -// const actualGasOverhead = -// receipt.gasUsed.sub(upkeepGasUsed) -// -// assert.isTrue(upkeepGasUsed.gt(BigNumber.from('0'))) -// assert.isTrue(chargedGasOverhead.gt(BigNumber.from('0'))) -// -// console.log( -// 'Gas Benchmarking conditional upkeeps:', -// 'upkeepSuccess=', -// upkeepSuccess, -// 'performGas=', -// performGas.toString(), -// 'performData length=', -// performData.length / 2 - 1, -// 'sig verification ( f =', -// newF, -// '): calculated overhead: ', -// chargedGasOverhead.toString(), -// ' actual overhead: ', -// actualGasOverhead.toString(), -// ' margin over gasUsed: ', -// chargedGasOverhead.sub(actualGasOverhead).toString(), -// ) -// -// // Overhead should not get capped -// const gasOverheadCap = registryConditionalOverhead -// .add( -// registryPerSignerGasOverhead.mul( -// BigNumber.from(newF + 1), -// ), -// ) -// .add( -// BigNumber.from( -// registryPerPerformByteGasOverhead.toNumber() * -// performData.length, -// ), -// ) -// const gasCapMinusOverhead = -// gasOverheadCap.sub(chargedGasOverhead) -// assert.isTrue( -// gasCapMinusOverhead.gt(BigNumber.from(0)), -// 'Gas overhead got capped. Verify gas overhead variables in test match those in the registry. To not have the overheads capped increase REGISTRY_GAS_OVERHEAD by atleast ' + -// gasCapMinusOverhead.toString(), -// ) -// // total gas charged should be greater than tx gas but within gasCalculationMargin -// assert.isTrue( -// chargedGasOverhead.gt(actualGasOverhead), -// 'Gas overhead calculated is too low, increase account gas variables (ACCOUNTING_FIXED_GAS_OVERHEAD/ACCOUNTING_PER_SIGNER_GAS_OVERHEAD) by atleast ' + -// actualGasOverhead.sub(chargedGasOverhead).toString(), -// ) -// -// assert.isTrue( -// chargedGasOverhead -// .sub(actualGasOverhead) -// .lt(gasCalculationMargin), -// ), -// 'Gas overhead calculated is too high, decrease account gas variables (ACCOUNTING_FIXED_GAS_OVERHEAD/ACCOUNTING_PER_SIGNER_GAS_OVERHEAD) by atleast ' + -// chargedGasOverhead -// .sub(chargedGasOverhead) -// .sub(gasCalculationMargin) -// .toString() -// } -// } -// } -// }, -// ) -// }) -// }, -// ) -// -// describeMaybe( -// 'Gas benchmarking log upkeeps [ @skip-coverage ]', -// function () { -// const fs = [1, 10] -// fs.forEach(function (newF) { -// it( -// 'When f=' + -// newF + -// ' calculates gas overhead appropriately within a margin', -// async () => { -// // Perform the upkeep once to remove non-zero storage slots and have predictable gas measurement -// let tx = await getTransmitTx(registry, keeper1, [logUpkeepId]) -// await tx.wait() -// const performData = '0x' -// await mock.setCanPerform(true) -// await mock.setPerformGasToBurn(performGas) -// await registry.setConfigTypeSafe( -// signerAddresses, -// keeperAddresses, -// newF, -// config, -// offchainVersion, -// offchainBytes, -// ) -// tx = await getTransmitTx(registry, keeper1, [logUpkeepId], { -// numSigners: newF + 1, -// performData, -// }) -// const receipt = await tx.wait() -// const upkeepPerformedLogs = parseUpkeepPerformedLogs(receipt) -// // exactly 1 Upkeep Performed should be emitted -// assert.equal(upkeepPerformedLogs.length, 1) -// const upkeepPerformedLog = upkeepPerformedLogs[0] -// -// const upkeepGasUsed = upkeepPerformedLog.args.gasUsed -// const chargedGasOverhead = upkeepPerformedLog.args.gasOverhead -// const actualGasOverhead = receipt.gasUsed.sub(upkeepGasUsed) -// -// assert.isTrue(upkeepGasUsed.gt(BigNumber.from('0'))) -// assert.isTrue(chargedGasOverhead.gt(BigNumber.from('0'))) -// -// console.log( -// 'Gas Benchmarking log upkeeps:', -// 'upkeepSuccess=', -// true, -// 'performGas=', -// performGas.toString(), -// 'performData length=', -// performData.length / 2 - 1, -// 'sig verification ( f =', -// newF, -// '): calculated overhead: ', -// chargedGasOverhead.toString(), -// ' actual overhead: ', -// actualGasOverhead.toString(), -// ' margin over gasUsed: ', -// chargedGasOverhead.sub(actualGasOverhead).toString(), -// ) -// -// // Overhead should not get capped -// const gasOverheadCap = registryLogOverhead -// .add( -// registryPerSignerGasOverhead.mul(BigNumber.from(newF + 1)), -// ) -// .add( -// BigNumber.from( -// registryPerPerformByteGasOverhead.toNumber() * -// performData.length, -// ), -// ) -// const gasCapMinusOverhead = -// gasOverheadCap.sub(chargedGasOverhead) -// assert.isTrue( -// gasCapMinusOverhead.gt(BigNumber.from(0)), -// 'Gas overhead got capped. Verify gas overhead variables in test match those in the registry. To not have the overheads capped increase REGISTRY_GAS_OVERHEAD by atleast ' + -// gasCapMinusOverhead.toString(), -// ) -// // total gas charged should be greater than tx gas but within gasCalculationMargin -// assert.isTrue( -// chargedGasOverhead.gt(actualGasOverhead), -// 'Gas overhead calculated is too low, increase account gas variables (ACCOUNTING_FIXED_GAS_OVERHEAD/ACCOUNTING_PER_SIGNER_GAS_OVERHEAD) by atleast ' + -// actualGasOverhead.sub(chargedGasOverhead).toString(), -// ) -// -// assert.isTrue( -// chargedGasOverhead -// .sub(actualGasOverhead) -// .lt(gasCalculationMargin), -// ), -// 'Gas overhead calculated is too high, decrease account gas variables (ACCOUNTING_FIXED_GAS_OVERHEAD/ACCOUNTING_PER_SIGNER_GAS_OVERHEAD) by atleast ' + -// chargedGasOverhead -// .sub(chargedGasOverhead) -// .sub(gasCalculationMargin) -// .toString() -// }, -// ) -// }) -// }, -// ) -// }) -// }) -// -// 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 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 tx = await getTransmitTx( -// registry, -// keeper1, -// passingConditionalUpkeepIds.concat( -// passingLogUpkeepIds.concat(failingUpkeepIds), -// ), -// ) -// -// const receipt = await tx.wait() -// const upkeepPerformedLogs = parseUpkeepPerformedLogs(receipt) -// // exactly numPassingUpkeeps Upkeep Performed should be emitted -// assert.equal( -// upkeepPerformedLogs.length, -// numPassingConditionalUpkeeps + numPassingLogUpkeeps, -// ) -// const insufficientFundsLogs = -// parseInsufficientFundsUpkeepReportLogs(receipt) -// // exactly numFailingUpkeeps Upkeep Performed should be emitted -// assert.equal(insufficientFundsLogs.length, numFailingUpkeeps) -// -// 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(), -// ) -// -// // 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) -// } -// -// 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++) { -// // InsufficientFunds log should be emitted -// const id = insufficientFundsLogs[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', -// ) -// } -// -// // Keeper payment is gasPayment + premium / num keepers -// const keeperPayment = netPayment -// .sub(premium) -// .add(premium.div(BigNumber.from(keeperAddresses.length))) -// -// // Keeper should be paid net payment for all passed upkeeps -// assert.equal( -// keeperAfter.balance.sub(keeperPayment).toString(), -// keeperBefore.balance.toString(), -// ) -// -// assert.isTrue(keeperLinkAfter.eq(keeperLinkBefore)) -// assert.isTrue(registryLinkBefore.eq(registryLinkAfter)) -// }, -// ) -// -// 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), -// ), -// ) -// -// await tx.wait() -// -// // Do the actual thing -// -// tx = await getTransmitTx( -// registry, -// keeper1, -// passingConditionalUpkeepIds.concat( -// passingLogUpkeepIds.concat(failingUpkeepIds), -// ), -// ) -// -// const receipt = await tx.wait() -// const upkeepPerformedLogs = parseUpkeepPerformedLogs(receipt) -// // exactly numPassingUpkeeps Upkeep Performed should be emitted -// assert.equal( -// upkeepPerformedLogs.length, -// numPassingConditionalUpkeeps + numPassingLogUpkeeps, -// ) -// -// const gasConditionalOverheadCap = -// registryConditionalOverhead.add( -// registryPerSignerGasOverhead.mul(BigNumber.from(f + 1)), -// ) -// const gasLogOverheadCap = registryLogOverhead.add( -// registryPerSignerGasOverhead.mul(BigNumber.from(f + 1)), -// ) -// -// const overheadCanGetCapped = -// numFailingUpkeeps > 0 && -// numPassingConditionalUpkeeps <= 1 && -// numPassingLogUpkeeps <= 1 -// // Can happen if there are failing upkeeps and only 1 successful upkeep of each type -// let netGasUsedPlusOverhead = BigNumber.from('0') -// -// for (let i = 0; i < numPassingConditionalUpkeeps; i++) { -// const gasUsed = upkeepPerformedLogs[i].args.gasUsed -// const gasOverhead = upkeepPerformedLogs[i].args.gasOverhead -// -// assert.isTrue(gasUsed.gt(BigNumber.from('0'))) -// assert.isTrue(gasOverhead.gt(BigNumber.from('0'))) -// -// // Overhead should not exceed capped -// assert.isTrue(gasOverhead.lte(gasConditionalOverheadCap)) -// -// // Overhead should be same for every upkeep since they have equal performData, hence same caps -// assert.isTrue( -// gasOverhead.eq(upkeepPerformedLogs[0].args.gasOverhead), -// ) -// -// netGasUsedPlusOverhead = netGasUsedPlusOverhead -// .add(gasUsed) -// .add(gasOverhead) -// } -// for (let i = 0; i < numPassingLogUpkeeps; i++) { -// const gasUsed = -// upkeepPerformedLogs[numPassingConditionalUpkeeps + i].args -// .gasUsed -// const gasOverhead = -// upkeepPerformedLogs[numPassingConditionalUpkeeps + i].args -// .gasOverhead -// -// assert.isTrue(gasUsed.gt(BigNumber.from('0'))) -// assert.isTrue(gasOverhead.gt(BigNumber.from('0'))) -// -// // Overhead should not exceed capped -// assert.isTrue(gasOverhead.lte(gasLogOverheadCap)) -// -// // Overhead should be same for every upkeep since they have equal performData, hence same caps -// assert.isTrue( -// gasOverhead.eq( -// upkeepPerformedLogs[numPassingConditionalUpkeeps].args -// .gasOverhead, -// ), -// ) -// -// netGasUsedPlusOverhead = netGasUsedPlusOverhead -// .add(gasUsed) -// .add(gasOverhead) -// } -// -// const overheadsGotCapped = -// (numPassingConditionalUpkeeps > 0 && -// upkeepPerformedLogs[0].args.gasOverhead.eq( -// gasConditionalOverheadCap, -// )) || -// (numPassingLogUpkeeps > 0 && -// upkeepPerformedLogs[ -// numPassingConditionalUpkeeps -// ].args.gasOverhead.eq(gasLogOverheadCap)) -// // Should only get capped in certain scenarios -// if (overheadsGotCapped) { -// assert.isTrue( -// overheadCanGetCapped, -// 'Gas overhead got capped. Verify gas overhead variables in test match those in the registry. To not have the overheads capped increase REGISTRY_GAS_OVERHEAD', -// ) -// } -// -// console.log( -// 'Gas Benchmarking - batching (passedConditionalUpkeeps: ', -// numPassingConditionalUpkeeps, -// 'passedLogUpkeeps:', -// numPassingLogUpkeeps, -// 'failedUpkeeps:', -// numFailingUpkeeps, -// '): ', -// 'overheadsGotCapped', -// overheadsGotCapped, -// numPassingConditionalUpkeeps > 0 -// ? 'calculated conditional overhead' -// : '', -// numPassingConditionalUpkeeps > 0 -// ? upkeepPerformedLogs[0].args.gasOverhead.toString() -// : '', -// numPassingLogUpkeeps > 0 ? 'calculated log overhead' : '', -// numPassingLogUpkeeps > 0 -// ? upkeepPerformedLogs[ -// numPassingConditionalUpkeeps -// ].args.gasOverhead.toString() -// : '', -// ' margin over gasUsed', -// netGasUsedPlusOverhead.sub(receipt.gasUsed).toString(), -// ) -// -// // If overheads dont get capped then total gas charged should be greater than tx gas -// // We don't check whether the net is within gasMargin as the margin changes with numFailedUpkeeps -// // Which is ok, as long as individual gas overhead is capped -// if (!overheadsGotCapped) { -// assert.isTrue( -// netGasUsedPlusOverhead.gt(receipt.gasUsed), -// 'Gas overhead is too low, 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) -// -// // Add funds to passing upkeeps -// await registry.connect(owner).addFunds(testUpkeepId, toWei('10')) -// -// await mock.setCanPerform(true) -// await mock.setPerformGasToBurn(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), -// }) -// }) -// -// it('splits l2 payment among performed upkeeps', async () => { -// const numUpkeeps = 7 -// const upkeepIds: BigNumber[] = [] -// // 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) -// -// // Add funds to passing upkeeps -// await arbRegistry.connect(owner).addFunds(testUpkeepId, toWei('100')) -// } -// -// // Do the thing -// const tx = await getTransmitTx( -// arbRegistry, -// keeper1, -// upkeepIds, -// -// { gasPrice: gasWei.mul('5') }, // High gas price so that it gets capped -// ) -// -// const receipt = await tx.wait() -// const upkeepPerformedLogs = parseUpkeepPerformedLogs(receipt) -// // exactly numPassingUpkeeps Upkeep Performed should be emitted -// assert.equal(upkeepPerformedLogs.length, numUpkeeps) -// -// // Verify the payment calculation in upkeepPerformed[0] -// const upkeepPerformedLog = upkeepPerformedLogs[0] -// -// const gasUsed = upkeepPerformedLog.args.gasUsed -// const gasOverhead = upkeepPerformedLog.args.gasOverhead -// const totalPayment = upkeepPerformedLog.args.totalPayment -// -// assert.equal( -// linkForGas( -// gasUsed, -// gasOverhead, -// gasCeilingMultiplier, -// paymentPremiumPPB, -// flatFeeMicroLink, -// l1CostWeiArb.div(gasCeilingMultiplier), // Dividing by gasCeilingMultiplier as it gets multiplied later -// BigNumber.from(numUpkeeps), -// ).total.toString(), -// totalPayment.toString(), -// ) -// }) -// }, -// ) -// -// describe('#recoverFunds', () => { -// const sent = toWei('7') -// -// beforeEach(async () => { -// await linkToken.connect(admin).approve(registry.address, toWei('100')) -// await linkToken -// .connect(owner) -// .transfer(await keeper1.getAddress(), toWei('1000')) -// -// // 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) -// -// const id1 = await getUpkeepID(tx) -// await registry.connect(admin).addFunds(id1, toWei('5')) -// -// await getTransmitTx(registry, keeper1, [id1]) -// await getTransmitTx(registry, keeper2, [id1]) -// await getTransmitTx(registry, keeper3, [id1]) -// -// await registry -// .connect(payee1) -// .withdrawPayment( -// await keeper1.getAddress(), -// await nonkeeper.getAddress(), -// ) -// -// // transfer funds directly to the registry -// await linkToken.connect(keeper1).transfer(registry.address, sent) -// -// // 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) -// const id2 = await getUpkeepID(tx2) -// await registry.connect(admin).addFunds(id2, toWei('5')) -// -// await getTransmitTx(registry, keeper1, [id2]) -// await getTransmitTx(registry, keeper2, [id2]) -// await getTransmitTx(registry, keeper3, [id2]) -// -// await registry -// .connect(payee2) -// .withdrawPayment( -// await keeper2.getAddress(), -// await nonkeeper.getAddress(), -// ) -// -// // transfer funds using onTokenTransfer -// const data = ethers.utils.defaultAbiCoder.encode(['uint256'], [id2]) -// await linkToken -// .connect(owner) -// .transferAndCall(registry.address, toWei('1'), data) -// -// // withdraw some funds -// await registry.connect(owner).cancelUpkeep(id1) -// await registry -// .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', () => { -// it('calculates the minimum balance appropriately', async () => { -// await mock.setCanCheck(true) -// -// const oneWei = BigNumber.from(1) -// const minBalance = await registry.getMinBalanceForUpkeep(upkeepId) -// const tooLow = minBalance.sub(oneWei) -// -// await registry.connect(admin).addFunds(upkeepId, tooLow) -// let checkUpkeepResult = await registry -// .connect(zeroAddress) -// .callStatic['checkUpkeep(uint256)'](upkeepId) -// -// assert.equal(checkUpkeepResult.upkeepNeeded, false) -// assert.equal( -// checkUpkeepResult.upkeepFailureReason, -// UpkeepFailureReason.INSUFFICIENT_BALANCE, -// ) -// -// await registry.connect(admin).addFunds(upkeepId, oneWei) -// checkUpkeepResult = await registry -// .connect(zeroAddress) -// .callStatic['checkUpkeep(uint256)'](upkeepId) -// assert.equal(checkUpkeepResult.upkeepNeeded, true) -// }) -// -// it('uses maxPerformData size in checkUpkeep but actual performDataSize in transmit', async () => { -// const tx1 = await registry -// .connect(owner) -// [ -// 'registerUpkeep(address,uint32,address,bytes,bytes)' -// ](mock.address, performGas, await admin.getAddress(), randomBytes, '0x') -// const upkeepID1 = await getUpkeepID(tx1) -// const tx2 = await registry -// .connect(owner) -// [ -// 'registerUpkeep(address,uint32,address,bytes,bytes)' -// ](mock.address, performGas, await admin.getAddress(), randomBytes, '0x') -// const upkeepID2 = await getUpkeepID(tx2) -// await mock.setCanCheck(true) -// await mock.setCanPerform(true) -// -// // upkeep 1 is underfunded, 2 is fully funded -// const minBalance1 = ( -// await registry.getMinBalanceForUpkeep(upkeepID1) -// ).sub(1) -// const minBalance2 = await registry.getMinBalanceForUpkeep(upkeepID2) -// await registry.connect(owner).addFunds(upkeepID1, minBalance1) -// await registry.connect(owner).addFunds(upkeepID2, minBalance2) -// -// // upkeep 1 check should return false, 2 should return true -// let checkUpkeepResult = await registry -// .connect(zeroAddress) -// .callStatic['checkUpkeep(uint256)'](upkeepID1) -// assert.equal(checkUpkeepResult.upkeepNeeded, false) -// assert.equal( -// checkUpkeepResult.upkeepFailureReason, -// UpkeepFailureReason.INSUFFICIENT_BALANCE, -// ) -// -// checkUpkeepResult = await registry -// .connect(zeroAddress) -// .callStatic['checkUpkeep(uint256)'](upkeepID2) -// assert.equal(checkUpkeepResult.upkeepNeeded, true) -// -// // upkeep 1 perform should return with insufficient balance using max performData size -// let maxPerformData = '0x' -// for (let i = 0; i < maxPerformDataSize.toNumber(); i++) { -// maxPerformData += '11' -// } -// -// const tx = await getTransmitTx(registry, keeper1, [upkeepID1], { -// gasPrice: gasWei.mul(gasCeilingMultiplier), -// performData: maxPerformData, -// }) -// -// const receipt = await tx.wait() -// const insufficientFundsUpkeepReportLogs = -// parseInsufficientFundsUpkeepReportLogs(receipt) -// // exactly 1 InsufficientFundsUpkeepReportLogs log should be emitted -// assert.equal(insufficientFundsUpkeepReportLogs.length, 1) -// -// // upkeep 1 perform should succeed with empty performData -// await getTransmitTx(registry, keeper1, [upkeepID1], { -// gasPrice: gasWei.mul(gasCeilingMultiplier), -// }), -// // upkeep 2 perform should succeed with max performData size -// await getTransmitTx(registry, keeper1, [upkeepID2], { -// gasPrice: gasWei.mul(gasCeilingMultiplier), -// performData: maxPerformData, -// }) -// }) -// }) -// -// describe('#withdrawFunds', () => { -// let upkeepId2: BigNumber -// -// beforeEach(async () => { -// const tx = await registry -// .connect(owner) -// [ -// 'registerUpkeep(address,uint32,address,bytes,bytes)' -// ](mock.address, performGas, await admin.getAddress(), randomBytes, '0x') -// upkeepId2 = await getUpkeepID(tx) -// -// await registry.connect(admin).addFunds(upkeepId, toWei('100')) -// await registry.connect(admin).addFunds(upkeepId2, toWei('100')) -// -// // Do a perform so that upkeep is charged some amount -// await getTransmitTx(registry, keeper1, [upkeepId]) -// await getTransmitTx(registry, keeper1, [upkeepId2]) -// }) -// -// it('reverts if called on a non existing ID', async () => { -// await evmRevert( -// registry -// .connect(admin) -// .withdrawFunds(upkeepId.add(1), await payee1.getAddress()), -// 'OnlyCallableByAdmin()', -// ) -// }) -// -// it('reverts if called by anyone but the admin', async () => { -// await evmRevert( -// registry -// .connect(owner) -// .withdrawFunds(upkeepId, await payee1.getAddress()), -// 'OnlyCallableByAdmin()', -// ) -// }) -// -// it('reverts if called on an uncanceled upkeep', async () => { -// await evmRevert( -// registry -// .connect(admin) -// .withdrawFunds(upkeepId, await payee1.getAddress()), -// 'UpkeepNotCanceled()', -// ) -// }) -// -// it('reverts if called with the 0 address', async () => { -// await evmRevert( -// registry.connect(admin).withdrawFunds(upkeepId, zeroAddress), -// 'InvalidRecipient()', -// ) -// }) -// -// describe('after the registration is paused, then cancelled', () => { -// it('allows the admin to withdraw', async () => { -// const balance = await registry.getBalance(upkeepId) -// const payee = await payee1.getAddress() -// await registry.connect(admin).pauseUpkeep(upkeepId) -// await registry.connect(owner).cancelUpkeep(upkeepId) -// await expect(() => -// registry.connect(admin).withdrawFunds(upkeepId, payee), -// ).to.changeTokenBalance(linkToken, payee1, balance) -// }) -// }) -// -// describe('after the registration is cancelled', () => { -// beforeEach(async () => { -// await registry.connect(owner).cancelUpkeep(upkeepId) -// await registry.connect(owner).cancelUpkeep(upkeepId2) -// }) -// -// it('can be called successively on two upkeeps', async () => { -// await registry -// .connect(admin) -// .withdrawFunds(upkeepId, await payee1.getAddress()) -// await registry -// .connect(admin) -// .withdrawFunds(upkeepId2, await payee1.getAddress()) -// }) -// -// it('moves the funds out and updates the balance and emits an event', async () => { -// const payee1Before = await linkToken.balanceOf( -// await payee1.getAddress(), -// ) -// const registryBefore = await linkToken.balanceOf(registry.address) -// -// let registration = await registry.getUpkeep(upkeepId) -// const previousBalance = registration.balance -// -// const tx = await registry -// .connect(admin) -// .withdrawFunds(upkeepId, await payee1.getAddress()) -// await expect(tx) -// .to.emit(registry, 'FundsWithdrawn') -// .withArgs(upkeepId, previousBalance, await payee1.getAddress()) -// -// const payee1After = await linkToken.balanceOf(await payee1.getAddress()) -// const registryAfter = await linkToken.balanceOf(registry.address) -// -// assert.isTrue(payee1Before.add(previousBalance).eq(payee1After)) -// assert.isTrue(registryBefore.sub(previousBalance).eq(registryAfter)) -// -// registration = await registry.getUpkeep(upkeepId) -// assert.equal(0, registration.balance.toNumber()) -// }) -// }) -// }) -// -// describe('#simulatePerformUpkeep', () => { -// it('reverts if called by non zero address', async () => { -// await evmRevert( -// registry -// .connect(await owner.getAddress()) -// .callStatic.simulatePerformUpkeep(upkeepId, '0x'), -// 'OnlySimulatedBackend()', -// ) -// }) -// -// it('reverts when registry is paused', async () => { -// await registry.connect(owner).pause() -// await evmRevert( -// registry -// .connect(zeroAddress) -// .callStatic.simulatePerformUpkeep(upkeepId, '0x'), -// 'RegistryPaused()', -// ) -// }) -// -// it('returns false and gasUsed when perform fails', async () => { -// await mock.setCanPerform(false) -// -// const simulatePerformResult = await registry -// .connect(zeroAddress) -// .callStatic.simulatePerformUpkeep(upkeepId, '0x') -// -// assert.equal(simulatePerformResult.success, false) -// assert.isTrue(simulatePerformResult.gasUsed.gt(BigNumber.from('0'))) // Some gas should be used -// }) -// -// it('returns true, gasUsed, and performGas when perform succeeds', async () => { -// await mock.setCanPerform(true) -// -// const simulatePerformResult = await registry -// .connect(zeroAddress) -// .callStatic.simulatePerformUpkeep(upkeepId, '0x') -// -// assert.equal(simulatePerformResult.success, true) -// assert.isTrue(simulatePerformResult.gasUsed.gt(BigNumber.from('0'))) // Some gas should be used -// }) -// -// it('returns correct amount of gasUsed when perform succeeds', async () => { -// await mock.setCanPerform(true) -// await mock.setPerformGasToBurn(performGas) -// -// const simulatePerformResult = await registry -// .connect(zeroAddress) -// .callStatic.simulatePerformUpkeep(upkeepId, '0x') -// -// assert.equal(simulatePerformResult.success, true) -// // Full execute gas should be used, with some performGasBuffer(1000) -// assert.isTrue( -// simulatePerformResult.gasUsed.gt( -// performGas.sub(BigNumber.from('1000')), -// ), -// ) -// }) -// }) -// -// describe('#checkUpkeep', () => { -// it('reverts if called by non zero address', async () => { -// await evmRevert( -// registry -// .connect(await owner.getAddress()) -// .callStatic['checkUpkeep(uint256)'](upkeepId), -// 'OnlySimulatedBackend()', -// ) -// }) -// -// it('returns false and error code if the upkeep is cancelled by admin', async () => { -// await registry.connect(admin).cancelUpkeep(upkeepId) -// -// const checkUpkeepResult = await registry -// .connect(zeroAddress) -// .callStatic['checkUpkeep(uint256)'](upkeepId) -// -// assert.equal(checkUpkeepResult.upkeepNeeded, false) -// assert.equal(checkUpkeepResult.performData, '0x') -// assert.equal( -// checkUpkeepResult.upkeepFailureReason, -// UpkeepFailureReason.UPKEEP_CANCELLED, -// ) -// expect(checkUpkeepResult.gasUsed).to.equal(0) -// expect(checkUpkeepResult.gasLimit).to.equal(performGas) -// }) -// -// it('returns false and error code if the upkeep is cancelled by owner', async () => { -// await registry.connect(owner).cancelUpkeep(upkeepId) -// -// const checkUpkeepResult = await registry -// .connect(zeroAddress) -// .callStatic['checkUpkeep(uint256)'](upkeepId) -// -// assert.equal(checkUpkeepResult.upkeepNeeded, false) -// assert.equal(checkUpkeepResult.performData, '0x') -// assert.equal( -// checkUpkeepResult.upkeepFailureReason, -// UpkeepFailureReason.UPKEEP_CANCELLED, -// ) -// expect(checkUpkeepResult.gasUsed).to.equal(0) -// expect(checkUpkeepResult.gasLimit).to.equal(performGas) -// }) -// -// it('returns false and error code if the registry is paused', async () => { -// await registry.connect(owner).pause() -// -// const checkUpkeepResult = await registry -// .connect(zeroAddress) -// .callStatic['checkUpkeep(uint256)'](upkeepId) -// -// assert.equal(checkUpkeepResult.upkeepNeeded, false) -// assert.equal(checkUpkeepResult.performData, '0x') -// assert.equal( -// checkUpkeepResult.upkeepFailureReason, -// UpkeepFailureReason.REGISTRY_PAUSED, -// ) -// expect(checkUpkeepResult.gasUsed).to.equal(0) -// expect(checkUpkeepResult.gasLimit).to.equal(performGas) -// }) -// -// it('returns false and error code if the upkeep is paused', async () => { -// await registry.connect(admin).pauseUpkeep(upkeepId) -// -// const checkUpkeepResult = await registry -// .connect(zeroAddress) -// .callStatic['checkUpkeep(uint256)'](upkeepId) -// -// assert.equal(checkUpkeepResult.upkeepNeeded, false) -// assert.equal(checkUpkeepResult.performData, '0x') -// assert.equal( -// checkUpkeepResult.upkeepFailureReason, -// UpkeepFailureReason.UPKEEP_PAUSED, -// ) -// expect(checkUpkeepResult.gasUsed).to.equal(0) -// expect(checkUpkeepResult.gasLimit).to.equal(performGas) -// }) -// -// it('returns false and error code if user is out of funds', async () => { -// const checkUpkeepResult = await registry -// .connect(zeroAddress) -// .callStatic['checkUpkeep(uint256)'](upkeepId) -// -// assert.equal(checkUpkeepResult.upkeepNeeded, false) -// assert.equal(checkUpkeepResult.performData, '0x') -// assert.equal( -// checkUpkeepResult.upkeepFailureReason, -// UpkeepFailureReason.INSUFFICIENT_BALANCE, -// ) -// expect(checkUpkeepResult.gasUsed).to.equal(0) -// expect(checkUpkeepResult.gasLimit).to.equal(performGas) -// }) -// -// context('when the registration is funded', () => { -// beforeEach(async () => { -// await linkToken.connect(admin).approve(registry.address, toWei('200')) -// await registry.connect(admin).addFunds(upkeepId, toWei('100')) -// await registry.connect(admin).addFunds(logUpkeepId, toWei('100')) -// }) -// -// it('returns false, error code, and revert data if the target check reverts', async () => { -// await mock.setShouldRevertCheck(true) -// await mock.setCheckRevertReason( -// 'custom revert error, clever way to insert offchain data', -// ) -// const checkUpkeepResult = await registry -// .connect(zeroAddress) -// .callStatic['checkUpkeep(uint256)'](upkeepId) -// assert.equal(checkUpkeepResult.upkeepNeeded, false) -// -// const revertReasonBytes = `0x${checkUpkeepResult.performData.slice(10)}` // remove sighash -// assert.equal( -// ethers.utils.defaultAbiCoder.decode(['string'], revertReasonBytes)[0], -// 'custom revert error, clever way to insert offchain data', -// ) -// assert.equal( -// checkUpkeepResult.upkeepFailureReason, -// UpkeepFailureReason.TARGET_CHECK_REVERTED, -// ) -// assert.isTrue(checkUpkeepResult.gasUsed.gt(BigNumber.from('0'))) // Some gas should be used -// 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'))) -// }) -// -// it('returns false, error code, and no revert data if the target check revert data exceeds maxRevertDataSize', async () => { -// await mock.setShouldRevertCheck(true) -// let longRevertReason = '' -// for (let i = 0; i <= maxRevertDataSize.toNumber(); i++) { -// longRevertReason += 'x' -// } -// await mock.setCheckRevertReason(longRevertReason) -// const checkUpkeepResult = await registry -// .connect(zeroAddress) -// .callStatic['checkUpkeep(uint256)'](upkeepId) -// assert.equal(checkUpkeepResult.upkeepNeeded, false) -// -// assert.equal(checkUpkeepResult.performData, '0x') -// assert.equal( -// checkUpkeepResult.upkeepFailureReason, -// UpkeepFailureReason.REVERT_DATA_EXCEEDS_LIMIT, -// ) -// assert.isTrue(checkUpkeepResult.gasUsed.gt(BigNumber.from('0'))) // Some gas should be used -// expect(checkUpkeepResult.gasLimit).to.equal(performGas) -// }) -// -// it('returns false and error code if the upkeep is not needed', async () => { -// await mock.setCanCheck(false) -// const checkUpkeepResult = await registry -// .connect(zeroAddress) -// .callStatic['checkUpkeep(uint256)'](upkeepId) -// -// assert.equal(checkUpkeepResult.upkeepNeeded, false) -// assert.equal(checkUpkeepResult.performData, '0x') -// assert.equal( -// checkUpkeepResult.upkeepFailureReason, -// UpkeepFailureReason.UPKEEP_NOT_NEEDED, -// ) -// assert.isTrue(checkUpkeepResult.gasUsed.gt(BigNumber.from('0'))) // Some gas should be used -// expect(checkUpkeepResult.gasLimit).to.equal(performGas) -// }) -// -// it('returns false and error code if the performData exceeds limit', async () => { -// let longBytes = '0x' -// for (let i = 0; i < 5000; i++) { -// longBytes += '1' -// } -// await mock.setCanCheck(true) -// await mock.setPerformData(longBytes) -// -// const checkUpkeepResult = await registry -// .connect(zeroAddress) -// .callStatic['checkUpkeep(uint256)'](upkeepId) -// -// assert.equal(checkUpkeepResult.upkeepNeeded, false) -// assert.equal(checkUpkeepResult.performData, '0x') -// assert.equal( -// checkUpkeepResult.upkeepFailureReason, -// UpkeepFailureReason.PERFORM_DATA_EXCEEDS_LIMIT, -// ) -// assert.isTrue(checkUpkeepResult.gasUsed.gt(BigNumber.from('0'))) // Some gas should be used -// expect(checkUpkeepResult.gasLimit).to.equal(performGas) -// }) -// -// it('returns true with gas used if the target can execute', async () => { -// await mock.setCanCheck(true) -// await mock.setPerformData(randomBytes) -// -// const latestBlock = await ethers.provider.getBlock('latest') -// -// const checkUpkeepResult = await registry -// .connect(zeroAddress) -// .callStatic['checkUpkeep(uint256)'](upkeepId, { -// blockTag: latestBlock.number, -// }) -// -// assert.equal(checkUpkeepResult.upkeepNeeded, true) -// assert.equal(checkUpkeepResult.performData, randomBytes) -// assert.equal( -// checkUpkeepResult.upkeepFailureReason, -// UpkeepFailureReason.NONE, -// ) -// 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)) -// }) -// -// it('calls checkLog for log-trigger upkeeps', async () => { -// const log: Log = { -// index: 0, -// timestamp: 0, -// txHash: ethers.utils.randomBytes(32), -// blockNumber: 100, -// blockHash: ethers.utils.randomBytes(32), -// source: randomAddress(), -// topics: [ethers.utils.randomBytes(32), ethers.utils.randomBytes(32)], -// data: ethers.utils.randomBytes(1000), -// } -// -// await ltUpkeep.mock.checkLog.withArgs(log, '0x').returns(true, '0x1234') -// -// const checkData = encodeLog(log) -// -// const checkUpkeepResult = await registry -// .connect(zeroAddress) -// .callStatic['checkUpkeep(uint256,bytes)'](logUpkeepId, checkData) -// -// expect(checkUpkeepResult.upkeepNeeded).to.be.true -// expect(checkUpkeepResult.performData).to.equal('0x1234') -// }) -// -// itMaybe( -// 'has a large enough gas overhead to cover upkeeps that use all their gas [ @skip-coverage ]', -// async () => { -// await mock.setCanCheck(true) -// await mock.setCheckGasToBurn(checkGasLimit) -// const gas = checkGasLimit.add(checkGasOverhead) -// const checkUpkeepResult = await registry -// .connect(zeroAddress) -// .callStatic['checkUpkeep(uint256)'](upkeepId, { -// gasLimit: gas, -// }) -// -// assert.equal(checkUpkeepResult.upkeepNeeded, true) -// }, -// ) -// }) -// }) -// -// describe('#addFunds', () => { -// const amount = toWei('1') -// -// it('reverts if the registration does not exist', async () => { -// await evmRevert( -// registry.connect(keeper1).addFunds(upkeepId.add(1), amount), -// 'UpkeepCancelled()', -// ) -// }) -// -// it('adds to the balance of the registration', async () => { -// await registry.connect(admin).addFunds(upkeepId, amount) -// const registration = await registry.getUpkeep(upkeepId) -// assert.isTrue(amount.eq(registration.balance)) -// }) -// -// it('lets anyone add funds to an upkeep not just admin', async () => { -// await linkToken.connect(owner).transfer(await payee1.getAddress(), amount) -// await linkToken.connect(payee1).approve(registry.address, amount) -// -// await registry.connect(payee1).addFunds(upkeepId, amount) -// const registration = await registry.getUpkeep(upkeepId) -// assert.isTrue(amount.eq(registration.balance)) -// }) -// -// it('emits a log', async () => { -// const tx = await registry.connect(admin).addFunds(upkeepId, amount) -// await expect(tx) -// .to.emit(registry, 'FundsAdded') -// .withArgs(upkeepId, await admin.getAddress(), amount) -// }) -// -// it('reverts if the upkeep is canceled', async () => { -// await registry.connect(admin).cancelUpkeep(upkeepId) -// await evmRevert( -// registry.connect(keeper1).addFunds(upkeepId, amount), -// 'UpkeepCancelled()', -// ) -// }) -// }) -// -// describe('#getActiveUpkeepIDs', () => { -// it('reverts if startIndex is out of bounds ', async () => { -// await evmRevert( -// registry.getActiveUpkeepIDs(numUpkeeps, 0), -// 'IndexOutOfRange()', -// ) -// await evmRevert( -// registry.getActiveUpkeepIDs(numUpkeeps + 1, 0), -// 'IndexOutOfRange()', -// ) -// }) -// -// it('returns upkeep IDs bounded by maxCount', async () => { -// let upkeepIds = await registry.getActiveUpkeepIDs(0, 1) -// assert(upkeepIds.length == 1) -// assert(upkeepIds[0].eq(upkeepId)) -// upkeepIds = await registry.getActiveUpkeepIDs(1, 3) -// assert(upkeepIds.length == 3) -// expect(upkeepIds).to.deep.equal([ -// afUpkeepId, -// logUpkeepId, -// streamsLookupUpkeepId, -// ]) -// }) -// -// it('returns as many ids as possible if maxCount > num available', async () => { -// const upkeepIds = await registry.getActiveUpkeepIDs(1, numUpkeeps + 100) -// assert(upkeepIds.length == numUpkeeps - 1) -// }) -// -// it('returns all upkeep IDs if maxCount is 0', async () => { -// let upkeepIds = await registry.getActiveUpkeepIDs(0, 0) -// assert(upkeepIds.length == numUpkeeps) -// upkeepIds = await registry.getActiveUpkeepIDs(2, 0) -// assert(upkeepIds.length == numUpkeeps - 2) -// }) -// }) -// -// describe('#getMaxPaymentForGas', () => { -// const arbL1PriceinWei = BigNumber.from(1000) // Same as MockArbGasInfo.sol -// const l1CostWeiArb = arbL1PriceinWei.mul(16).mul(maxPerformDataSize) -// const l1CostWeiOpt = BigNumber.from(2000000) // Same as MockOVMGasPriceOracle.sol -// itMaybe('calculates the max fee appropriately', async () => { -// await verifyMaxPayment(registry) -// }) -// -// itMaybe('calculates the max fee appropriately for Arbitrum', async () => { -// await verifyMaxPayment(arbRegistry, l1CostWeiArb) -// }) -// -// itMaybe('calculates the max fee appropriately for Optimism', async () => { -// await verifyMaxPayment(opRegistry, l1CostWeiOpt) -// }) -// -// it('uses the fallback gas price if the feed has issues', async () => { -// const expectedFallbackMaxPayment = linkForGas( -// performGas, -// registryConditionalOverhead -// .add(registryPerSignerGasOverhead.mul(f + 1)) -// .add(maxPerformDataSize.mul(registryPerPerformByteGasOverhead)), -// gasCeilingMultiplier.mul('2'), // fallbackGasPrice is 2x gas price -// paymentPremiumPPB, -// flatFeeMicroLink, -// ).total -// -// // Stale feed -// let roundId = 99 -// const answer = 100 -// let updatedAt = 946684800 // New Years 2000 🥳 -// let startedAt = 946684799 -// await gasPriceFeed -// .connect(owner) -// .updateRoundData(roundId, answer, updatedAt, startedAt) -// -// assert.equal( -// expectedFallbackMaxPayment.toString(), -// ( -// await registry.getMaxPaymentForGas(Trigger.CONDITION, performGas) -// ).toString(), -// ) -// -// // Negative feed price -// roundId = 100 -// updatedAt = now() -// startedAt = 946684799 -// await gasPriceFeed -// .connect(owner) -// .updateRoundData(roundId, -100, updatedAt, startedAt) -// -// assert.equal( -// expectedFallbackMaxPayment.toString(), -// ( -// await registry.getMaxPaymentForGas(Trigger.CONDITION, performGas) -// ).toString(), -// ) -// -// // Zero feed price -// roundId = 101 -// updatedAt = now() -// startedAt = 946684799 -// await gasPriceFeed -// .connect(owner) -// .updateRoundData(roundId, 0, updatedAt, startedAt) -// -// assert.equal( -// expectedFallbackMaxPayment.toString(), -// ( -// await registry.getMaxPaymentForGas(Trigger.CONDITION, performGas) -// ).toString(), -// ) -// }) -// -// it('uses the fallback link price if the feed has issues', async () => { -// const expectedFallbackMaxPayment = linkForGas( -// performGas, -// registryConditionalOverhead -// .add(registryPerSignerGasOverhead.mul(f + 1)) -// .add(maxPerformDataSize.mul(registryPerPerformByteGasOverhead)), -// gasCeilingMultiplier.mul('2'), // fallbackLinkPrice is 1/2 link price, so multiply by 2 -// paymentPremiumPPB, -// flatFeeMicroLink, -// ).total -// -// // Stale feed -// let roundId = 99 -// const answer = 100 -// let updatedAt = 946684800 // New Years 2000 🥳 -// let startedAt = 946684799 -// await linkEthFeed -// .connect(owner) -// .updateRoundData(roundId, answer, updatedAt, startedAt) -// -// assert.equal( -// expectedFallbackMaxPayment.toString(), -// ( -// await registry.getMaxPaymentForGas(Trigger.CONDITION, performGas) -// ).toString(), -// ) -// -// // Negative feed price -// roundId = 100 -// updatedAt = now() -// startedAt = 946684799 -// await linkEthFeed -// .connect(owner) -// .updateRoundData(roundId, -100, updatedAt, startedAt) -// -// assert.equal( -// expectedFallbackMaxPayment.toString(), -// ( -// await registry.getMaxPaymentForGas(Trigger.CONDITION, performGas) -// ).toString(), -// ) -// -// // Zero feed price -// roundId = 101 -// updatedAt = now() -// startedAt = 946684799 -// await linkEthFeed -// .connect(owner) -// .updateRoundData(roundId, 0, updatedAt, startedAt) -// -// assert.equal( -// expectedFallbackMaxPayment.toString(), -// ( -// await registry.getMaxPaymentForGas(Trigger.CONDITION, performGas) -// ).toString(), -// ) -// }) -// }) -// -// describe('#typeAndVersion', () => { -// it('uses the correct type and version', async () => { -// const typeAndVersion = await registry.typeAndVersion() -// assert.equal(typeAndVersion, 'KeeperRegistry 2.1.0') -// }) -// }) -// -// describe('#onTokenTransfer', () => { -// const amount = toWei('1') -// -// it('reverts if not called by the LINK token', async () => { -// const data = ethers.utils.defaultAbiCoder.encode(['uint256'], [upkeepId]) -// -// await evmRevert( -// registry -// .connect(keeper1) -// .onTokenTransfer(await keeper1.getAddress(), amount, data), -// 'OnlyCallableByLINKToken()', -// ) -// }) -// -// it('reverts if not called with more or less than 32 bytes', async () => { -// const longData = ethers.utils.defaultAbiCoder.encode( -// ['uint256', 'uint256'], -// ['33', '34'], -// ) -// const shortData = '0x12345678' -// -// await evmRevert( -// linkToken -// .connect(owner) -// .transferAndCall(registry.address, amount, longData), -// ) -// await evmRevert( -// linkToken -// .connect(owner) -// .transferAndCall(registry.address, amount, shortData), -// ) -// }) -// -// it('reverts if the upkeep is canceled', async () => { -// await registry.connect(admin).cancelUpkeep(upkeepId) -// await evmRevert( -// registry.connect(keeper1).addFunds(upkeepId, amount), -// 'UpkeepCancelled()', -// ) -// }) -// -// it('updates the funds of the job id passed', async () => { -// const data = ethers.utils.defaultAbiCoder.encode(['uint256'], [upkeepId]) -// -// const before = (await registry.getUpkeep(upkeepId)).balance -// await linkToken -// .connect(owner) -// .transferAndCall(registry.address, amount, data) -// const after = (await registry.getUpkeep(upkeepId)).balance -// -// assert.isTrue(before.add(amount).eq(after)) -// }) -// }) -// -// describeMaybe('#setConfig - onchain', () => { -// const payment = BigNumber.from(1) -// const flatFee = BigNumber.from(2) -// 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 newTranscoder = randomAddress() -// const newRegistrars = [randomAddress(), randomAddress()] -// const upkeepManager = 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, -// transcoder: newTranscoder, -// registrars: newRegistrars, -// upkeepPrivilegeManager: upkeepManager, -// } -// -// it('reverts when called by anyone but the proposed owner', async () => { -// await evmRevert( -// registry -// .connect(payee1) -// .setConfigTypeSafe( -// signerAddresses, -// keeperAddresses, -// f, -// newConfig, -// offchainVersion, -// offchainBytes, -// ), -// 'Only callable by owner', -// ) -// }) -// -// it('reverts if signers or transmitters are the zero address', async () => { -// await evmRevert( -// registry -// .connect(owner) -// .setConfigTypeSafe( -// [randomAddress(), randomAddress(), randomAddress(), zeroAddress], -// [ -// randomAddress(), -// randomAddress(), -// randomAddress(), -// randomAddress(), -// ], -// f, -// newConfig, -// offchainVersion, -// offchainBytes, -// ), -// 'InvalidSigner()', -// ) -// -// await evmRevert( -// registry -// .connect(owner) -// .setConfigTypeSafe( -// [ -// randomAddress(), -// randomAddress(), -// randomAddress(), -// randomAddress(), -// ], -// [randomAddress(), randomAddress(), randomAddress(), zeroAddress], -// f, -// newConfig, -// offchainVersion, -// offchainBytes, -// ), -// 'InvalidTransmitter()', -// ) -// }) -// -// it('updates the onchainConfig and configDigest', async () => { -// const old = await registry.getState() -// const oldConfig = old.config -// const oldState = old.state -// assert.isTrue(paymentPremiumPPB.eq(oldConfig.paymentPremiumPPB)) -// assert.isTrue(flatFeeMicroLink.eq(oldConfig.flatFeeMicroLink)) -// assert.isTrue(stalenessSeconds.eq(oldConfig.stalenessSeconds)) -// assert.isTrue(gasCeilingMultiplier.eq(oldConfig.gasCeilingMultiplier)) -// -// await registry -// .connect(owner) -// .setConfigTypeSafe( -// signerAddresses, -// keeperAddresses, -// f, -// newConfig, -// offchainVersion, -// offchainBytes, -// ) -// -// const updated = await registry.getState() -// const updatedConfig = updated.config -// const updatedState = updated.state -// assert.equal(updatedConfig.paymentPremiumPPB, payment.toNumber()) -// 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(), -// ) -// assert.equal( -// updatedConfig.maxPerformDataSize, -// newMaxPerformDataSize.toNumber(), -// ) -// assert.equal( -// updatedConfig.maxRevertDataSize, -// newMaxRevertDataSize.toNumber(), -// ) -// assert.equal(updatedConfig.maxPerformGas, newMaxPerformGas.toNumber()) -// assert.equal(updatedConfig.checkGasLimit, maxGas.toNumber()) -// assert.equal( -// updatedConfig.fallbackGasPrice.toNumber(), -// fbGasEth.toNumber(), -// ) -// assert.equal( -// updatedConfig.fallbackLinkPrice.toNumber(), -// fbLinkEth.toNumber(), -// ) -// assert.equal(updatedState.latestEpoch, 0) -// -// assert(oldState.configCount + 1 == updatedState.configCount) -// assert( -// oldState.latestConfigBlockNumber != -// updatedState.latestConfigBlockNumber, -// ) -// assert(oldState.latestConfigDigest != updatedState.latestConfigDigest) -// -// assert.equal(updatedConfig.transcoder, newTranscoder) -// assert.deepEqual(updatedConfig.registrars, newRegistrars) -// assert.equal(updatedConfig.upkeepPrivilegeManager, upkeepManager) -// }) -// -// it('maintains paused state when config is changed', async () => { -// await registry.pause() -// const old = await registry.getState() -// assert.isTrue(old.state.paused) -// -// await registry -// .connect(owner) -// .setConfigTypeSafe( -// signerAddresses, -// keeperAddresses, -// f, -// newConfig, -// offchainVersion, -// offchainBytes, -// ) -// -// const updated = await registry.getState() -// assert.isTrue(updated.state.paused) -// }) -// -// it('emits an event', async () => { -// const tx = await registry -// .connect(owner) -// .setConfigTypeSafe( -// signerAddresses, -// keeperAddresses, -// f, -// newConfig, -// offchainVersion, -// offchainBytes, -// ) -// await expect(tx).to.emit(registry, 'ConfigSet') -// }) -// }) -// -// describe('#setConfig - offchain', () => { -// let newKeepers: string[] -// -// beforeEach(async () => { -// newKeepers = [ -// await personas.Eddy.getAddress(), -// await personas.Nick.getAddress(), -// await personas.Neil.getAddress(), -// await personas.Carol.getAddress(), -// ] -// }) -// -// it('reverts when called by anyone but the owner', async () => { -// await evmRevert( -// registry -// .connect(payee1) -// .setConfigTypeSafe( -// newKeepers, -// newKeepers, -// f, -// config, -// offchainVersion, -// offchainBytes, -// ), -// 'Only callable by owner', -// ) -// }) -// -// it('reverts if too many keeperAddresses set', async () => { -// for (let i = 0; i < 40; i++) { -// newKeepers.push(randomAddress()) -// } -// await evmRevert( -// registry -// .connect(owner) -// .setConfigTypeSafe( -// newKeepers, -// newKeepers, -// f, -// config, -// offchainVersion, -// offchainBytes, -// ), -// 'TooManyOracles()', -// ) -// }) -// -// it('reverts if f=0', async () => { -// await evmRevert( -// registry -// .connect(owner) -// .setConfigTypeSafe( -// newKeepers, -// newKeepers, -// 0, -// config, -// offchainVersion, -// offchainBytes, -// ), -// 'IncorrectNumberOfFaultyOracles()', -// ) -// }) -// -// it('reverts if signers != transmitters length', async () => { -// const signers = [randomAddress()] -// await evmRevert( -// registry -// .connect(owner) -// .setConfigTypeSafe( -// signers, -// newKeepers, -// f, -// config, -// offchainVersion, -// offchainBytes, -// ), -// 'IncorrectNumberOfSigners()', -// ) -// }) -// -// it('reverts if signers <= 3f', async () => { -// newKeepers.pop() -// await evmRevert( -// registry -// .connect(owner) -// .setConfigTypeSafe( -// newKeepers, -// newKeepers, -// f, -// config, -// offchainVersion, -// offchainBytes, -// ), -// 'IncorrectNumberOfSigners()', -// ) -// }) -// -// it('reverts on repeated signers', async () => { -// const newSigners = [ -// await personas.Eddy.getAddress(), -// await personas.Eddy.getAddress(), -// await personas.Eddy.getAddress(), -// await personas.Eddy.getAddress(), -// ] -// await evmRevert( -// registry -// .connect(owner) -// .setConfigTypeSafe( -// newSigners, -// newKeepers, -// f, -// config, -// offchainVersion, -// offchainBytes, -// ), -// 'RepeatedSigner()', -// ) -// }) -// -// it('reverts on repeated transmitters', async () => { -// const newTransmitters = [ -// await personas.Eddy.getAddress(), -// await personas.Eddy.getAddress(), -// await personas.Eddy.getAddress(), -// await personas.Eddy.getAddress(), -// ] -// await evmRevert( -// registry -// .connect(owner) -// .setConfigTypeSafe( -// newKeepers, -// newTransmitters, -// f, -// config, -// offchainVersion, -// offchainBytes, -// ), -// 'RepeatedTransmitter()', -// ) -// }) -// -// itMaybe('stores new config and emits event', async () => { -// // Perform an upkeep so that totalPremium is updated -// await registry.connect(admin).addFunds(upkeepId, toWei('100')) -// let tx = await getTransmitTx(registry, keeper1, [upkeepId]) -// await tx.wait() -// -// const newOffChainVersion = BigNumber.from('2') -// const newOffChainConfig = '0x1122' -// -// const old = await registry.getState() -// const oldState = old.state -// assert(oldState.totalPremium.gt(BigNumber.from('0'))) -// -// const newSigners = newKeepers -// tx = await registry -// .connect(owner) -// .setConfigTypeSafe( -// newSigners, -// newKeepers, -// f, -// config, -// newOffChainVersion, -// newOffChainConfig, -// ) -// -// const updated = await registry.getState() -// const updatedState = updated.state -// assert(oldState.totalPremium.eq(updatedState.totalPremium)) -// -// // Old signer addresses which are not in new signers should be non active -// for (let i = 0; i < signerAddresses.length; i++) { -// const signer = signerAddresses[i] -// if (!newSigners.includes(signer)) { -// assert((await registry.getSignerInfo(signer)).active == false) -// assert((await registry.getSignerInfo(signer)).index == 0) -// } -// } -// // New signer addresses should be active -// for (let i = 0; i < newSigners.length; i++) { -// const signer = newSigners[i] -// assert((await registry.getSignerInfo(signer)).active == true) -// assert((await registry.getSignerInfo(signer)).index == i) -// } -// // Old transmitter addresses which are not in new transmitter should be non active, update lastCollected but retain other info -// for (let i = 0; i < keeperAddresses.length; i++) { -// const transmitter = keeperAddresses[i] -// if (!newKeepers.includes(transmitter)) { -// assert( -// (await registry.getTransmitterInfo(transmitter)).active == false, -// ) -// assert((await registry.getTransmitterInfo(transmitter)).index == i) -// assert( -// (await registry.getTransmitterInfo(transmitter)).lastCollected.eq( -// oldState.totalPremium.sub( -// oldState.totalPremium.mod(keeperAddresses.length), -// ), -// ), -// ) -// } -// } -// // New transmitter addresses should be active -// for (let i = 0; i < newKeepers.length; i++) { -// const transmitter = newKeepers[i] -// assert((await registry.getTransmitterInfo(transmitter)).active == true) -// assert((await registry.getTransmitterInfo(transmitter)).index == i) -// assert( -// (await registry.getTransmitterInfo(transmitter)).lastCollected.eq( -// oldState.totalPremium, -// ), -// ) -// } -// -// // config digest should be updated -// assert(oldState.configCount + 1 == updatedState.configCount) -// assert( -// oldState.latestConfigBlockNumber != -// updatedState.latestConfigBlockNumber, -// ) -// assert(oldState.latestConfigDigest != updatedState.latestConfigDigest) -// -// //New config should be updated -// assert.deepEqual(updated.signers, newKeepers) -// assert.deepEqual(updated.transmitters, newKeepers) -// -// // Event should have been emitted -// await expect(tx).to.emit(registry, 'ConfigSet') -// }) -// }) -// -// describe('#setPeerRegistryMigrationPermission() / #getPeerRegistryMigrationPermission()', () => { -// const peer = randomAddress() -// it('allows the owner to set the peer registries', async () => { -// let permission = await registry.getPeerRegistryMigrationPermission(peer) -// expect(permission).to.equal(0) -// await registry.setPeerRegistryMigrationPermission(peer, 1) -// permission = await registry.getPeerRegistryMigrationPermission(peer) -// expect(permission).to.equal(1) -// await registry.setPeerRegistryMigrationPermission(peer, 2) -// permission = await registry.getPeerRegistryMigrationPermission(peer) -// expect(permission).to.equal(2) -// await registry.setPeerRegistryMigrationPermission(peer, 0) -// permission = await registry.getPeerRegistryMigrationPermission(peer) -// expect(permission).to.equal(0) -// }) -// it('reverts if passed an unsupported permission', async () => { -// await expect( -// registry.connect(admin).setPeerRegistryMigrationPermission(peer, 10), -// ).to.be.reverted -// }) -// it('reverts if not called by the owner', async () => { -// await expect( -// registry.connect(admin).setPeerRegistryMigrationPermission(peer, 1), -// ).to.be.revertedWith('Only callable by owner') -// }) -// }) -// -// describe('#registerUpkeep', () => { -// it('reverts when registry is paused', async () => { -// await registry.connect(owner).pause() -// await evmRevert( -// registry -// .connect(owner) -// [ -// 'registerUpkeep(address,uint32,address,bytes,bytes)' -// ](mock.address, performGas, await admin.getAddress(), emptyBytes, '0x'), -// 'RegistryPaused()', -// ) -// }) -// -// it('reverts if the target is not a contract', async () => { -// await evmRevert( -// registry -// .connect(owner) -// [ -// 'registerUpkeep(address,uint32,address,bytes,bytes)' -// ](zeroAddress, performGas, await admin.getAddress(), emptyBytes, '0x'), -// 'NotAContract()', -// ) -// }) -// -// it('reverts if called by a non-owner', async () => { -// await evmRevert( -// registry -// .connect(keeper1) -// [ -// 'registerUpkeep(address,uint32,address,bytes,bytes)' -// ](mock.address, performGas, await admin.getAddress(), emptyBytes, '0x'), -// 'OnlyCallableByOwnerOrRegistrar()', -// ) -// }) -// -// it('reverts if execute gas is too low', async () => { -// await evmRevert( -// registry -// .connect(owner) -// [ -// 'registerUpkeep(address,uint32,address,bytes,bytes)' -// ](mock.address, 2299, await admin.getAddress(), emptyBytes, '0x'), -// 'GasLimitOutsideRange()', -// ) -// }) -// -// it('reverts if execute gas is too high', async () => { -// await evmRevert( -// registry -// .connect(owner) -// [ -// 'registerUpkeep(address,uint32,address,bytes,bytes)' -// ](mock.address, 5000001, await admin.getAddress(), emptyBytes, '0x'), -// 'GasLimitOutsideRange()', -// ) -// }) -// -// it('reverts if checkData is too long', async () => { -// let longBytes = '0x' -// for (let i = 0; i < 10000; i++) { -// longBytes += '1' -// } -// await evmRevert( -// registry -// .connect(owner) -// [ -// 'registerUpkeep(address,uint32,address,bytes,bytes)' -// ](mock.address, performGas, await admin.getAddress(), longBytes, '0x'), -// 'CheckDataExceedsLimit()', -// ) -// }) -// -// it('creates a record of the registration', async () => { -// const performGases = [100000, 500000] -// const checkDatas = [emptyBytes, '0x12'] -// -// for (let jdx = 0; jdx < performGases.length; jdx++) { -// const performGas = performGases[jdx] -// for (let kdx = 0; kdx < checkDatas.length; kdx++) { -// const checkData = checkDatas[kdx] -// const tx = await registry -// .connect(owner) -// [ -// 'registerUpkeep(address,uint32,address,bytes,bytes)' -// ](mock.address, performGas, await admin.getAddress(), checkData, '0x') -// -// //confirm the upkeep details and verify emitted events -// const testUpkeepId = await getUpkeepID(tx) -// await expect(tx) -// .to.emit(registry, 'UpkeepRegistered') -// .withArgs(testUpkeepId, performGas, await admin.getAddress()) -// -// await expect(tx) -// .to.emit(registry, 'UpkeepCheckDataSet') -// .withArgs(testUpkeepId, checkData) -// await expect(tx) -// .to.emit(registry, 'UpkeepTriggerConfigSet') -// .withArgs(testUpkeepId, '0x') -// -// const registration = await registry.getUpkeep(testUpkeepId) -// -// assert.equal(mock.address, registration.target) -// assert.notEqual( -// ethers.constants.AddressZero, -// await registry.getForwarder(testUpkeepId), -// ) -// assert.equal( -// performGas.toString(), -// registration.performGas.toString(), -// ) -// assert.equal(await admin.getAddress(), registration.admin) -// assert.equal(0, registration.balance.toNumber()) -// assert.equal(0, registration.amountSpent.toNumber()) -// assert.equal(0, registration.lastPerformedBlockNumber) -// assert.equal(checkData, registration.checkData) -// assert.equal(registration.paused, false) -// assert.equal(registration.offchainConfig, '0x') -// assert(registration.maxValidBlocknumber.eq('0xffffffff')) -// } -// } -// }) -// }) -// -// describe('#pauseUpkeep', () => { -// it('reverts if the registration does not exist', async () => { -// await evmRevert( -// registry.connect(keeper1).pauseUpkeep(upkeepId.add(1)), -// 'OnlyCallableByAdmin()', -// ) -// }) -// -// it('reverts if the upkeep is already canceled', async () => { -// await registry.connect(admin).cancelUpkeep(upkeepId) -// -// await evmRevert( -// registry.connect(admin).pauseUpkeep(upkeepId), -// 'UpkeepCancelled()', -// ) -// }) -// -// it('reverts if the upkeep is already paused', async () => { -// await registry.connect(admin).pauseUpkeep(upkeepId) -// -// await evmRevert( -// registry.connect(admin).pauseUpkeep(upkeepId), -// 'OnlyUnpausedUpkeep()', -// ) -// }) -// -// it('reverts if the caller is not the upkeep admin', async () => { -// await evmRevert( -// registry.connect(keeper1).pauseUpkeep(upkeepId), -// 'OnlyCallableByAdmin()', -// ) -// }) -// -// it('pauses the upkeep and emits an event', async () => { -// const tx = await registry.connect(admin).pauseUpkeep(upkeepId) -// await expect(tx).to.emit(registry, 'UpkeepPaused').withArgs(upkeepId) -// -// const registration = await registry.getUpkeep(upkeepId) -// assert.equal(registration.paused, true) -// }) -// }) -// -// describe('#unpauseUpkeep', () => { -// it('reverts if the registration does not exist', async () => { -// await evmRevert( -// registry.connect(keeper1).unpauseUpkeep(upkeepId.add(1)), -// 'OnlyCallableByAdmin()', -// ) -// }) -// -// it('reverts if the upkeep is already canceled', async () => { -// await registry.connect(owner).cancelUpkeep(upkeepId) -// -// await evmRevert( -// registry.connect(admin).unpauseUpkeep(upkeepId), -// 'UpkeepCancelled()', -// ) -// }) -// -// it('marks the contract as paused', async () => { -// assert.isFalse((await registry.getState()).state.paused) -// -// await registry.connect(owner).pause() -// -// assert.isTrue((await registry.getState()).state.paused) -// }) -// -// it('reverts if the upkeep is not paused', async () => { -// await evmRevert( -// registry.connect(admin).unpauseUpkeep(upkeepId), -// 'OnlyPausedUpkeep()', -// ) -// }) -// -// it('reverts if the caller is not the upkeep admin', async () => { -// await registry.connect(admin).pauseUpkeep(upkeepId) -// -// const registration = await registry.getUpkeep(upkeepId) -// -// assert.equal(registration.paused, true) -// -// await evmRevert( -// registry.connect(keeper1).unpauseUpkeep(upkeepId), -// 'OnlyCallableByAdmin()', -// ) -// }) -// -// it('unpauses the upkeep and emits an event', async () => { -// const originalCount = (await registry.getActiveUpkeepIDs(0, 0)).length -// -// await registry.connect(admin).pauseUpkeep(upkeepId) -// -// const tx = await registry.connect(admin).unpauseUpkeep(upkeepId) -// -// await expect(tx).to.emit(registry, 'UpkeepUnpaused').withArgs(upkeepId) -// -// const registration = await registry.getUpkeep(upkeepId) -// assert.equal(registration.paused, false) -// -// const upkeepIds = await registry.getActiveUpkeepIDs(0, 0) -// assert.equal(upkeepIds.length, originalCount) -// }) -// }) -// -// describe('#setUpkeepCheckData', () => { -// it('reverts if the registration does not exist', async () => { -// await evmRevert( -// registry -// .connect(keeper1) -// .setUpkeepCheckData(upkeepId.add(1), randomBytes), -// 'OnlyCallableByAdmin()', -// ) -// }) -// -// it('reverts if the caller is not upkeep admin', async () => { -// await evmRevert( -// registry.connect(keeper1).setUpkeepCheckData(upkeepId, randomBytes), -// 'OnlyCallableByAdmin()', -// ) -// }) -// -// it('reverts if the upkeep is cancelled', async () => { -// await registry.connect(admin).cancelUpkeep(upkeepId) -// -// await evmRevert( -// registry.connect(admin).setUpkeepCheckData(upkeepId, randomBytes), -// 'UpkeepCancelled()', -// ) -// }) -// -// it('is allowed to update on paused upkeep', async () => { -// await registry.connect(admin).pauseUpkeep(upkeepId) -// await registry.connect(admin).setUpkeepCheckData(upkeepId, randomBytes) -// -// const registration = await registry.getUpkeep(upkeepId) -// assert.equal(randomBytes, registration.checkData) -// }) -// -// it('reverts if new data exceeds limit', async () => { -// let longBytes = '0x' -// for (let i = 0; i < 10000; i++) { -// longBytes += '1' -// } -// -// await evmRevert( -// registry.connect(admin).setUpkeepCheckData(upkeepId, longBytes), -// 'CheckDataExceedsLimit()', -// ) -// }) -// -// it('updates the upkeep check data and emits an event', async () => { -// const tx = await registry -// .connect(admin) -// .setUpkeepCheckData(upkeepId, randomBytes) -// await expect(tx) -// .to.emit(registry, 'UpkeepCheckDataSet') -// .withArgs(upkeepId, randomBytes) -// -// const registration = await registry.getUpkeep(upkeepId) -// assert.equal(randomBytes, registration.checkData) -// }) -// }) -// -// describe('#setUpkeepGasLimit', () => { -// const newGasLimit = BigNumber.from('300000') -// -// it('reverts if the registration does not exist', async () => { -// await evmRevert( -// registry.connect(admin).setUpkeepGasLimit(upkeepId.add(1), newGasLimit), -// 'OnlyCallableByAdmin()', -// ) -// }) -// -// it('reverts if the upkeep is canceled', async () => { -// await registry.connect(admin).cancelUpkeep(upkeepId) -// await evmRevert( -// registry.connect(admin).setUpkeepGasLimit(upkeepId, newGasLimit), -// 'UpkeepCancelled()', -// ) -// }) -// -// it('reverts if called by anyone but the admin', async () => { -// await evmRevert( -// registry.connect(owner).setUpkeepGasLimit(upkeepId, newGasLimit), -// 'OnlyCallableByAdmin()', -// ) -// }) -// -// it('reverts if new gas limit is out of bounds', async () => { -// await evmRevert( -// registry -// .connect(admin) -// .setUpkeepGasLimit(upkeepId, BigNumber.from('100')), -// 'GasLimitOutsideRange()', -// ) -// await evmRevert( -// registry -// .connect(admin) -// .setUpkeepGasLimit(upkeepId, BigNumber.from('6000000')), -// 'GasLimitOutsideRange()', -// ) -// }) -// -// it('updates the gas limit successfully', async () => { -// const initialGasLimit = (await registry.getUpkeep(upkeepId)).performGas -// assert.equal(initialGasLimit, performGas.toNumber()) -// await registry.connect(admin).setUpkeepGasLimit(upkeepId, newGasLimit) -// const updatedGasLimit = (await registry.getUpkeep(upkeepId)).performGas -// assert.equal(updatedGasLimit, newGasLimit.toNumber()) -// }) -// -// it('emits a log', async () => { -// const tx = await registry -// .connect(admin) -// .setUpkeepGasLimit(upkeepId, newGasLimit) -// await expect(tx) -// .to.emit(registry, 'UpkeepGasLimitSet') -// .withArgs(upkeepId, newGasLimit) -// }) -// }) -// -// describe('#setUpkeepOffchainConfig', () => { -// const newConfig = '0xc0ffeec0ffee' -// -// it('reverts if the registration does not exist', async () => { -// await evmRevert( -// registry -// .connect(admin) -// .setUpkeepOffchainConfig(upkeepId.add(1), newConfig), -// 'OnlyCallableByAdmin()', -// ) -// }) -// -// it('reverts if the upkeep is canceled', async () => { -// await registry.connect(admin).cancelUpkeep(upkeepId) -// await evmRevert( -// registry.connect(admin).setUpkeepOffchainConfig(upkeepId, newConfig), -// 'UpkeepCancelled()', -// ) -// }) -// -// it('reverts if called by anyone but the admin', async () => { -// await evmRevert( -// registry.connect(owner).setUpkeepOffchainConfig(upkeepId, newConfig), -// 'OnlyCallableByAdmin()', -// ) -// }) -// -// it('updates the config successfully', async () => { -// const initialConfig = (await registry.getUpkeep(upkeepId)).offchainConfig -// assert.equal(initialConfig, '0x') -// await registry.connect(admin).setUpkeepOffchainConfig(upkeepId, newConfig) -// const updatedConfig = (await registry.getUpkeep(upkeepId)).offchainConfig -// assert.equal(newConfig, updatedConfig) -// }) -// -// it('emits a log', async () => { -// const tx = await registry -// .connect(admin) -// .setUpkeepOffchainConfig(upkeepId, newConfig) -// await expect(tx) -// .to.emit(registry, 'UpkeepOffchainConfigSet') -// .withArgs(upkeepId, newConfig) -// }) -// }) -// -// describe('#setUpkeepTriggerConfig', () => { -// const newConfig = '0xdeadbeef' -// -// it('reverts if the registration does not exist', async () => { -// await evmRevert( -// registry -// .connect(admin) -// .setUpkeepTriggerConfig(upkeepId.add(1), newConfig), -// 'OnlyCallableByAdmin()', -// ) -// }) -// -// it('reverts if the upkeep is canceled', async () => { -// await registry.connect(admin).cancelUpkeep(upkeepId) -// await evmRevert( -// registry.connect(admin).setUpkeepTriggerConfig(upkeepId, newConfig), -// 'UpkeepCancelled()', -// ) -// }) -// -// it('reverts if called by anyone but the admin', async () => { -// await evmRevert( -// registry.connect(owner).setUpkeepTriggerConfig(upkeepId, newConfig), -// 'OnlyCallableByAdmin()', -// ) -// }) -// -// it('emits a log', async () => { -// const tx = await registry -// .connect(admin) -// .setUpkeepTriggerConfig(upkeepId, newConfig) -// await expect(tx) -// .to.emit(registry, 'UpkeepTriggerConfigSet') -// .withArgs(upkeepId, newConfig) -// }) -// }) -// -// describe('#transferUpkeepAdmin', () => { -// it('reverts when called by anyone but the current upkeep admin', async () => { -// await evmRevert( -// registry -// .connect(payee1) -// .transferUpkeepAdmin(upkeepId, await payee2.getAddress()), -// 'OnlyCallableByAdmin()', -// ) -// }) -// -// it('reverts when transferring to self', async () => { -// await evmRevert( -// registry -// .connect(admin) -// .transferUpkeepAdmin(upkeepId, await admin.getAddress()), -// 'ValueNotChanged()', -// ) -// }) -// -// it('reverts when the upkeep is cancelled', async () => { -// await registry.connect(admin).cancelUpkeep(upkeepId) -// -// await evmRevert( -// registry -// .connect(admin) -// .transferUpkeepAdmin(upkeepId, await keeper1.getAddress()), -// 'UpkeepCancelled()', -// ) -// }) -// -// it('allows cancelling transfer by reverting to zero address', async () => { -// await registry -// .connect(admin) -// .transferUpkeepAdmin(upkeepId, await payee1.getAddress()) -// const tx = await registry -// .connect(admin) -// .transferUpkeepAdmin(upkeepId, ethers.constants.AddressZero) -// -// await expect(tx) -// .to.emit(registry, 'UpkeepAdminTransferRequested') -// .withArgs( -// upkeepId, -// await admin.getAddress(), -// ethers.constants.AddressZero, -// ) -// }) -// -// it('does not change the upkeep admin', async () => { -// await registry -// .connect(admin) -// .transferUpkeepAdmin(upkeepId, await payee1.getAddress()) -// -// const upkeep = await registry.getUpkeep(upkeepId) -// assert.equal(await admin.getAddress(), upkeep.admin) -// }) -// -// it('emits an event announcing the new upkeep admin', async () => { -// const tx = await registry -// .connect(admin) -// .transferUpkeepAdmin(upkeepId, await payee1.getAddress()) -// -// await expect(tx) -// .to.emit(registry, 'UpkeepAdminTransferRequested') -// .withArgs(upkeepId, await admin.getAddress(), await payee1.getAddress()) -// }) -// -// it('does not emit an event when called with the same proposed upkeep admin', async () => { -// await registry -// .connect(admin) -// .transferUpkeepAdmin(upkeepId, await payee1.getAddress()) -// -// const tx = await registry -// .connect(admin) -// .transferUpkeepAdmin(upkeepId, await payee1.getAddress()) -// const receipt = await tx.wait() -// assert.equal(0, receipt.logs.length) -// }) -// }) -// -// describe('#acceptUpkeepAdmin', () => { -// beforeEach(async () => { -// // Start admin transfer to payee1 -// await registry -// .connect(admin) -// .transferUpkeepAdmin(upkeepId, await payee1.getAddress()) -// }) -// -// it('reverts when not called by the proposed upkeep admin', async () => { -// await evmRevert( -// registry.connect(payee2).acceptUpkeepAdmin(upkeepId), -// 'OnlyCallableByProposedAdmin()', -// ) -// }) -// -// it('reverts when the upkeep is cancelled', async () => { -// await registry.connect(admin).cancelUpkeep(upkeepId) -// -// await evmRevert( -// registry.connect(payee1).acceptUpkeepAdmin(upkeepId), -// 'UpkeepCancelled()', -// ) -// }) -// -// it('does change the admin', async () => { -// await registry.connect(payee1).acceptUpkeepAdmin(upkeepId) -// -// const upkeep = await registry.getUpkeep(upkeepId) -// assert.equal(await payee1.getAddress(), upkeep.admin) -// }) -// -// it('emits an event announcing the new upkeep admin', async () => { -// const tx = await registry.connect(payee1).acceptUpkeepAdmin(upkeepId) -// await expect(tx) -// .to.emit(registry, 'UpkeepAdminTransferred') -// .withArgs(upkeepId, await admin.getAddress(), await payee1.getAddress()) -// }) -// }) -// -// describe('#withdrawOwnerFunds', () => { -// it('can only be called by owner', async () => { -// await evmRevert( -// registry.connect(keeper1).withdrawOwnerFunds(), -// 'Only callable by owner', -// ) -// }) -// -// itMaybe('withdraws the collected fees to owner', async () => { -// await registry.connect(admin).addFunds(upkeepId, toWei('100')) -// // Very high min spend, whole balance as cancellation fees -// const minUpkeepSpend = toWei('1000') -// await registry.connect(owner).setConfigTypeSafe( -// signerAddresses, -// keeperAddresses, -// f, -// { -// paymentPremiumPPB, -// flatFeeMicroLink, -// checkGasLimit, -// stalenessSeconds, -// gasCeilingMultiplier, -// minUpkeepSpend, -// maxCheckDataSize, -// maxPerformDataSize, -// maxRevertDataSize, -// maxPerformGas, -// fallbackGasPrice, -// fallbackLinkPrice, -// transcoder: transcoder.address, -// registrars: [], -// upkeepPrivilegeManager: upkeepManager, -// }, -// offchainVersion, -// offchainBytes, -// ) -// const upkeepBalance = (await registry.getUpkeep(upkeepId)).balance -// const ownerBefore = await linkToken.balanceOf(await owner.getAddress()) -// -// await registry.connect(owner).cancelUpkeep(upkeepId) -// -// // Transfered to owner balance on registry -// let ownerRegistryBalance = (await registry.getState()).state -// .ownerLinkBalance -// assert.isTrue(ownerRegistryBalance.eq(upkeepBalance)) -// -// // Now withdraw -// await registry.connect(owner).withdrawOwnerFunds() -// -// ownerRegistryBalance = (await registry.getState()).state.ownerLinkBalance -// const ownerAfter = await linkToken.balanceOf(await owner.getAddress()) -// -// // Owner registry balance should be changed to 0 -// assert.isTrue(ownerRegistryBalance.eq(BigNumber.from('0'))) -// -// // Owner should be credited with the balance -// assert.isTrue(ownerBefore.add(upkeepBalance).eq(ownerAfter)) -// }) -// }) -// -// describe('#transferPayeeship', () => { -// it('reverts when called by anyone but the current payee', async () => { -// await evmRevert( -// registry -// .connect(payee2) -// .transferPayeeship( -// await keeper1.getAddress(), -// await payee2.getAddress(), -// ), -// 'OnlyCallableByPayee()', -// ) -// }) -// -// it('reverts when transferring to self', async () => { -// await evmRevert( -// registry -// .connect(payee1) -// .transferPayeeship( -// await keeper1.getAddress(), -// await payee1.getAddress(), -// ), -// 'ValueNotChanged()', -// ) -// }) -// -// it('does not change the payee', async () => { -// await registry -// .connect(payee1) -// .transferPayeeship( -// await keeper1.getAddress(), -// await payee2.getAddress(), -// ) -// -// const info = await registry.getTransmitterInfo(await keeper1.getAddress()) -// assert.equal(await payee1.getAddress(), info.payee) -// }) -// -// it('emits an event announcing the new payee', async () => { -// const tx = await registry -// .connect(payee1) -// .transferPayeeship( -// await keeper1.getAddress(), -// await payee2.getAddress(), -// ) -// await expect(tx) -// .to.emit(registry, 'PayeeshipTransferRequested') -// .withArgs( -// await keeper1.getAddress(), -// await payee1.getAddress(), -// await payee2.getAddress(), -// ) -// }) -// -// it('does not emit an event when called with the same proposal', async () => { -// await registry -// .connect(payee1) -// .transferPayeeship( -// await keeper1.getAddress(), -// await payee2.getAddress(), -// ) -// -// const tx = await registry -// .connect(payee1) -// .transferPayeeship( -// await keeper1.getAddress(), -// await payee2.getAddress(), -// ) -// const receipt = await tx.wait() -// assert.equal(0, receipt.logs.length) -// }) -// }) -// -// describe('#acceptPayeeship', () => { -// beforeEach(async () => { -// await registry -// .connect(payee1) -// .transferPayeeship( -// await keeper1.getAddress(), -// await payee2.getAddress(), -// ) -// }) -// -// it('reverts when called by anyone but the proposed payee', async () => { -// await evmRevert( -// registry.connect(payee1).acceptPayeeship(await keeper1.getAddress()), -// 'OnlyCallableByProposedPayee()', -// ) -// }) -// -// it('emits an event announcing the new payee', async () => { -// const tx = await registry -// .connect(payee2) -// .acceptPayeeship(await keeper1.getAddress()) -// await expect(tx) -// .to.emit(registry, 'PayeeshipTransferred') -// .withArgs( -// await keeper1.getAddress(), -// await payee1.getAddress(), -// await payee2.getAddress(), -// ) -// }) -// -// it('does change the payee', async () => { -// await registry.connect(payee2).acceptPayeeship(await keeper1.getAddress()) -// -// const info = await registry.getTransmitterInfo(await keeper1.getAddress()) -// assert.equal(await payee2.getAddress(), info.payee) -// }) -// }) -// -// describe('#pause', () => { -// it('reverts if called by a non-owner', async () => { -// await evmRevert( -// registry.connect(keeper1).pause(), -// 'Only callable by owner', -// ) -// }) -// -// it('marks the contract as paused', async () => { -// assert.isFalse((await registry.getState()).state.paused) -// -// await registry.connect(owner).pause() -// -// assert.isTrue((await registry.getState()).state.paused) -// }) -// -// it('Does not allow transmits when paused', async () => { -// await registry.connect(owner).pause() -// -// await evmRevert( -// getTransmitTx(registry, keeper1, [upkeepId]), -// 'RegistryPaused()', -// ) -// }) -// -// it('Does not allow creation of new upkeeps when paused', async () => { -// await registry.connect(owner).pause() -// -// await evmRevert( -// registry -// .connect(owner) -// [ -// 'registerUpkeep(address,uint32,address,bytes,bytes)' -// ](mock.address, performGas, await admin.getAddress(), emptyBytes, '0x'), -// 'RegistryPaused()', -// ) -// }) -// }) -// -// describe('#unpause', () => { -// beforeEach(async () => { -// await registry.connect(owner).pause() -// }) -// -// it('reverts if called by a non-owner', async () => { -// await evmRevert( -// registry.connect(keeper1).unpause(), -// 'Only callable by owner', -// ) -// }) -// -// it('marks the contract as not paused', async () => { -// assert.isTrue((await registry.getState()).state.paused) -// -// await registry.connect(owner).unpause() -// -// assert.isFalse((await registry.getState()).state.paused) -// }) -// }) -// -// describe('#migrateUpkeeps() / #receiveUpkeeps()', async () => { -// context('when permissions are set', () => { -// beforeEach(async () => { -// await linkToken.connect(owner).approve(registry.address, toWei('100')) -// await registry.connect(owner).addFunds(upkeepId, toWei('100')) -// await registry.setPeerRegistryMigrationPermission(mgRegistry.address, 1) -// await mgRegistry.setPeerRegistryMigrationPermission(registry.address, 2) -// }) -// -// it('migrates an upkeep', async () => { -// const offchainBytes = '0x987654abcd' -// await registry -// .connect(admin) -// .setUpkeepOffchainConfig(upkeepId, offchainBytes) -// const reg1Upkeep = await registry.getUpkeep(upkeepId) -// const forwarderAddress = await registry.getForwarder(upkeepId) -// expect(reg1Upkeep.balance).to.equal(toWei('100')) -// expect(reg1Upkeep.checkData).to.equal(randomBytes) -// expect(forwarderAddress).to.not.equal(ethers.constants.AddressZero) -// expect(reg1Upkeep.offchainConfig).to.equal(offchainBytes) -// expect((await registry.getState()).state.numUpkeeps).to.equal( -// numUpkeeps, -// ) -// const forwarder = await IAutomationForwarderFactory.connect( -// forwarderAddress, -// owner, -// ) -// expect(await forwarder.getRegistry()).to.equal(registry.address) -// // Set an upkeep admin transfer in progress too -// await registry -// .connect(admin) -// .transferUpkeepAdmin(upkeepId, await payee1.getAddress()) -// -// // migrate -// await registry -// .connect(admin) -// .migrateUpkeeps([upkeepId], mgRegistry.address) -// expect((await registry.getState()).state.numUpkeeps).to.equal( -// numUpkeeps - 1, -// ) -// expect((await mgRegistry.getState()).state.numUpkeeps).to.equal(1) -// expect((await registry.getUpkeep(upkeepId)).balance).to.equal(0) -// expect((await registry.getUpkeep(upkeepId)).checkData).to.equal('0x') -// expect((await mgRegistry.getUpkeep(upkeepId)).balance).to.equal( -// toWei('100'), -// ) -// expect( -// (await mgRegistry.getState()).state.expectedLinkBalance, -// ).to.equal(toWei('100')) -// expect((await mgRegistry.getUpkeep(upkeepId)).checkData).to.equal( -// randomBytes, -// ) -// expect((await mgRegistry.getUpkeep(upkeepId)).offchainConfig).to.equal( -// offchainBytes, -// ) -// expect(await mgRegistry.getForwarder(upkeepId)).to.equal( -// forwarderAddress, -// ) -// // test that registry is updated on forwarder -// expect(await forwarder.getRegistry()).to.equal(mgRegistry.address) -// // migration will delete the upkeep and nullify admin transfer -// await expect( -// registry.connect(payee1).acceptUpkeepAdmin(upkeepId), -// ).to.be.revertedWith('UpkeepCancelled()') -// await expect( -// mgRegistry.connect(payee1).acceptUpkeepAdmin(upkeepId), -// ).to.be.revertedWith('OnlyCallableByProposedAdmin()') -// }) -// -// it('migrates a paused upkeep', async () => { -// expect((await registry.getUpkeep(upkeepId)).balance).to.equal( -// toWei('100'), -// ) -// expect((await registry.getUpkeep(upkeepId)).checkData).to.equal( -// randomBytes, -// ) -// expect((await registry.getState()).state.numUpkeeps).to.equal( -// numUpkeeps, -// ) -// await registry.connect(admin).pauseUpkeep(upkeepId) -// // verify the upkeep is paused -// expect((await registry.getUpkeep(upkeepId)).paused).to.equal(true) -// // migrate -// await registry -// .connect(admin) -// .migrateUpkeeps([upkeepId], mgRegistry.address) -// expect((await registry.getState()).state.numUpkeeps).to.equal( -// numUpkeeps - 1, -// ) -// expect((await mgRegistry.getState()).state.numUpkeeps).to.equal(1) -// expect((await registry.getUpkeep(upkeepId)).balance).to.equal(0) -// expect((await mgRegistry.getUpkeep(upkeepId)).balance).to.equal( -// toWei('100'), -// ) -// expect((await registry.getUpkeep(upkeepId)).checkData).to.equal('0x') -// expect((await mgRegistry.getUpkeep(upkeepId)).checkData).to.equal( -// randomBytes, -// ) -// expect( -// (await mgRegistry.getState()).state.expectedLinkBalance, -// ).to.equal(toWei('100')) -// // verify the upkeep is still paused after migration -// expect((await mgRegistry.getUpkeep(upkeepId)).paused).to.equal(true) -// }) -// -// it('emits an event on both contracts', async () => { -// expect((await registry.getUpkeep(upkeepId)).balance).to.equal( -// toWei('100'), -// ) -// expect((await registry.getUpkeep(upkeepId)).checkData).to.equal( -// randomBytes, -// ) -// expect((await registry.getState()).state.numUpkeeps).to.equal( -// numUpkeeps, -// ) -// const tx = registry -// .connect(admin) -// .migrateUpkeeps([upkeepId], mgRegistry.address) -// await expect(tx) -// .to.emit(registry, 'UpkeepMigrated') -// .withArgs(upkeepId, toWei('100'), mgRegistry.address) -// await expect(tx) -// .to.emit(mgRegistry, 'UpkeepReceived') -// .withArgs(upkeepId, toWei('100'), registry.address) -// }) -// -// it('is only migratable by the admin', async () => { -// await expect( -// registry -// .connect(owner) -// .migrateUpkeeps([upkeepId], mgRegistry.address), -// ).to.be.revertedWith('OnlyCallableByAdmin()') -// await registry -// .connect(admin) -// .migrateUpkeeps([upkeepId], mgRegistry.address) -// }) -// }) -// -// context('when permissions are not set', () => { -// it('reverts', async () => { -// // no permissions -// await registry.setPeerRegistryMigrationPermission(mgRegistry.address, 0) -// await mgRegistry.setPeerRegistryMigrationPermission(registry.address, 0) -// await expect(registry.migrateUpkeeps([upkeepId], mgRegistry.address)).to -// .be.reverted -// // only outgoing permissions -// await registry.setPeerRegistryMigrationPermission(mgRegistry.address, 1) -// await mgRegistry.setPeerRegistryMigrationPermission(registry.address, 0) -// await expect(registry.migrateUpkeeps([upkeepId], mgRegistry.address)).to -// .be.reverted -// // only incoming permissions -// await registry.setPeerRegistryMigrationPermission(mgRegistry.address, 0) -// await mgRegistry.setPeerRegistryMigrationPermission(registry.address, 2) -// await expect(registry.migrateUpkeeps([upkeepId], mgRegistry.address)).to -// .be.reverted -// // permissions opposite direction -// await registry.setPeerRegistryMigrationPermission(mgRegistry.address, 2) -// await mgRegistry.setPeerRegistryMigrationPermission(registry.address, 1) -// await expect(registry.migrateUpkeeps([upkeepId], mgRegistry.address)).to -// .be.reverted -// }) -// }) -// }) -// -// describe('#setPayees', () => { -// const IGNORE_ADDRESS = '0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF' -// -// it('reverts when not called by the owner', async () => { -// await evmRevert( -// registry.connect(keeper1).setPayees(payees), -// 'Only callable by owner', -// ) -// }) -// -// it('reverts with different numbers of payees than transmitters', async () => { -// await evmRevert( -// registry.connect(owner).setPayees([...payees, randomAddress()]), -// 'ParameterLengthError()', -// ) -// }) -// -// it('reverts if the payee is the zero address', async () => { -// await blankRegistry.connect(owner).setConfig(...baseConfig) // used to test initial config -// -// await evmRevert( -// blankRegistry // used to test initial config -// .connect(owner) -// .setPayees([ethers.constants.AddressZero, ...payees.slice(1)]), -// 'InvalidPayee()', -// ) -// }) -// -// itMaybe( -// '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 -// -// for (let i = 0; i < keeperAddresses.length; i++) { -// const payee = ( -// await blankRegistry.getTransmitterInfo(keeperAddresses[i]) -// ).payee // used to test initial config -// assert.equal(payee, zeroAddress) -// } -// -// await blankRegistry.connect(owner).setPayees(payees) // used to test initial config -// -// for (let i = 0; i < keeperAddresses.length; i++) { -// const payee = ( -// await blankRegistry.getTransmitterInfo(keeperAddresses[i]) -// ).payee -// assert.equal(payee, payees[i]) -// } -// }, -// ) -// -// it('does not change the payee if IGNORE_ADDRESS is used as payee', async () => { -// const signers = Array.from({ length: 5 }, randomAddress) -// const keepers = Array.from({ length: 5 }, randomAddress) -// const payees = Array.from({ length: 5 }, randomAddress) -// const newTransmitter = randomAddress() -// const newPayee = randomAddress() -// const ignoreAddresses = new Array(payees.length).fill(IGNORE_ADDRESS) -// const newPayees = [...ignoreAddresses, newPayee] -// // arbitrum registry -// // configure registry with 5 keepers // optimism registry -// await blankRegistry // used to test initial configurations -// .connect(owner) -// .setConfigTypeSafe( -// signers, -// keepers, -// f, -// config, -// offchainVersion, -// offchainBytes, -// ) -// // arbitrum registry -// // set initial payees // optimism registry -// await blankRegistry.connect(owner).setPayees(payees) // used to test initial configurations -// // arbitrum registry -// // add another keeper // optimism registry -// await blankRegistry // used to test initial configurations -// .connect(owner) -// .setConfigTypeSafe( -// [...signers, randomAddress()], -// [...keepers, newTransmitter], -// f, -// config, -// offchainVersion, -// offchainBytes, -// ) -// // arbitrum registry -// // update payee list // optimism registry // arbitrum registry -// await blankRegistry.connect(owner).setPayees(newPayees) // used to test initial configurations // optimism registry -// const ignored = await blankRegistry.getTransmitterInfo(newTransmitter) // used to test initial configurations -// assert.equal(newPayee, ignored.payee) -// assert.equal(true, ignored.active) -// }) -// -// it('reverts if payee is non zero and owner tries to change payee', async () => { -// const newPayees = [randomAddress(), ...payees.slice(1)] -// -// await evmRevert( -// registry.connect(owner).setPayees(newPayees), -// 'InvalidPayee()', -// ) -// }) -// -// it('emits events for every payee added and removed', async () => { -// const tx = await registry.connect(owner).setPayees(payees) -// await expect(tx) -// .to.emit(registry, 'PayeesUpdated') -// .withArgs(keeperAddresses, payees) -// }) -// }) -// -// describe('#cancelUpkeep', () => { -// it('reverts if the ID is not valid', async () => { -// await evmRevert( -// registry.connect(owner).cancelUpkeep(upkeepId.add(1)), -// 'CannotCancel()', -// ) -// }) -// -// it('reverts if called by a non-owner/non-admin', async () => { -// await evmRevert( -// registry.connect(keeper1).cancelUpkeep(upkeepId), -// 'OnlyCallableByOwnerOrAdmin()', -// ) -// }) -// -// describe('when called by the owner', async () => { -// it('sets the registration to invalid immediately', async () => { -// const tx = await registry.connect(owner).cancelUpkeep(upkeepId) -// const receipt = await tx.wait() -// const registration = await registry.getUpkeep(upkeepId) -// assert.equal( -// registration.maxValidBlocknumber.toNumber(), -// receipt.blockNumber, -// ) -// }) -// -// it('emits an event', async () => { -// const tx = await registry.connect(owner).cancelUpkeep(upkeepId) -// const receipt = await tx.wait() -// await expect(tx) -// .to.emit(registry, 'UpkeepCanceled') -// .withArgs(upkeepId, BigNumber.from(receipt.blockNumber)) -// }) -// -// it('immediately prevents upkeep', async () => { -// await registry.connect(owner).cancelUpkeep(upkeepId) -// -// const tx = await getTransmitTx(registry, keeper1, [upkeepId]) -// const receipt = await tx.wait() -// const cancelledUpkeepReportLogs = -// parseCancelledUpkeepReportLogs(receipt) -// // exactly 1 CancelledUpkeepReport log should be emitted -// assert.equal(cancelledUpkeepReportLogs.length, 1) -// }) -// -// it('does not revert if reverts if called multiple times', async () => { -// await registry.connect(owner).cancelUpkeep(upkeepId) -// await evmRevert( -// registry.connect(owner).cancelUpkeep(upkeepId), -// 'CannotCancel()', -// ) -// }) -// -// describe('when called by the owner when the admin has just canceled', () => { -// let oldExpiration: BigNumber -// -// beforeEach(async () => { -// await registry.connect(admin).cancelUpkeep(upkeepId) -// const registration = await registry.getUpkeep(upkeepId) -// oldExpiration = registration.maxValidBlocknumber -// }) -// -// it('allows the owner to cancel it more quickly', async () => { -// await registry.connect(owner).cancelUpkeep(upkeepId) -// -// const registration = await registry.getUpkeep(upkeepId) -// const newExpiration = registration.maxValidBlocknumber -// assert.isTrue(newExpiration.lt(oldExpiration)) -// }) -// }) -// }) -// -// describe('when called by the admin', async () => { -// it('reverts if called again by the admin', async () => { -// await registry.connect(admin).cancelUpkeep(upkeepId) -// -// await evmRevert( -// registry.connect(admin).cancelUpkeep(upkeepId), -// 'CannotCancel()', -// ) -// }) -// -// it('reverts if called by the owner after the timeout', async () => { -// await registry.connect(admin).cancelUpkeep(upkeepId) -// -// for (let i = 0; i < cancellationDelay; i++) { -// await ethers.provider.send('evm_mine', []) -// } -// -// await evmRevert( -// registry.connect(owner).cancelUpkeep(upkeepId), -// 'CannotCancel()', -// ) -// }) -// -// it('sets the registration to invalid in 50 blocks', async () => { -// const tx = await registry.connect(admin).cancelUpkeep(upkeepId) -// const receipt = await tx.wait() -// const registration = await registry.getUpkeep(upkeepId) -// assert.equal( -// registration.maxValidBlocknumber.toNumber(), -// receipt.blockNumber + 50, -// ) -// }) -// -// it('emits an event', async () => { -// const tx = await registry.connect(admin).cancelUpkeep(upkeepId) -// const receipt = await tx.wait() -// await expect(tx) -// .to.emit(registry, 'UpkeepCanceled') -// .withArgs( -// upkeepId, -// BigNumber.from(receipt.blockNumber + cancellationDelay), -// ) -// }) -// -// it('immediately prevents upkeep', async () => { -// await linkToken.connect(owner).approve(registry.address, toWei('100')) -// await registry.connect(owner).addFunds(upkeepId, toWei('100')) -// await registry.connect(admin).cancelUpkeep(upkeepId) -// -// await getTransmitTx(registry, keeper1, [upkeepId]) -// -// for (let i = 0; i < cancellationDelay; i++) { -// await ethers.provider.send('evm_mine', []) -// } -// -// const tx = await getTransmitTx(registry, keeper1, [upkeepId]) -// -// const receipt = await tx.wait() -// const cancelledUpkeepReportLogs = -// parseCancelledUpkeepReportLogs(receipt) -// // exactly 1 CancelledUpkeepReport log should be emitted -// assert.equal(cancelledUpkeepReportLogs.length, 1) -// }) -// -// describeMaybe('when an upkeep has been performed', async () => { -// beforeEach(async () => { -// await linkToken.connect(owner).approve(registry.address, toWei('100')) -// await registry.connect(owner).addFunds(upkeepId, toWei('100')) -// await getTransmitTx(registry, keeper1, [upkeepId]) -// }) -// -// it('deducts a cancellation fee from the upkeep and gives to owner', async () => { -// const minUpkeepSpend = toWei('10') -// -// await registry.connect(owner).setConfigTypeSafe( -// signerAddresses, -// keeperAddresses, -// f, -// { -// paymentPremiumPPB, -// flatFeeMicroLink, -// checkGasLimit, -// stalenessSeconds, -// gasCeilingMultiplier, -// minUpkeepSpend, -// maxCheckDataSize, -// maxPerformDataSize, -// maxRevertDataSize, -// maxPerformGas, -// fallbackGasPrice, -// fallbackLinkPrice, -// transcoder: transcoder.address, -// registrars: [], -// upkeepPrivilegeManager: upkeepManager, -// }, -// offchainVersion, -// offchainBytes, -// ) -// -// const payee1Before = await linkToken.balanceOf( -// await payee1.getAddress(), -// ) -// const upkeepBefore = (await registry.getUpkeep(upkeepId)).balance -// const ownerBefore = (await registry.getState()).state.ownerLinkBalance -// -// const amountSpent = toWei('100').sub(upkeepBefore) -// const cancellationFee = minUpkeepSpend.sub(amountSpent) -// -// await registry.connect(admin).cancelUpkeep(upkeepId) -// -// const payee1After = await linkToken.balanceOf( -// await payee1.getAddress(), -// ) -// const upkeepAfter = (await registry.getUpkeep(upkeepId)).balance -// const ownerAfter = (await registry.getState()).state.ownerLinkBalance -// -// // post upkeep balance should be previous balance minus cancellation fee -// assert.isTrue(upkeepBefore.sub(cancellationFee).eq(upkeepAfter)) -// // payee balance should not change -// assert.isTrue(payee1Before.eq(payee1After)) -// // owner should receive the cancellation fee -// assert.isTrue(ownerAfter.sub(ownerBefore).eq(cancellationFee)) -// }) -// -// it('deducts up to balance as cancellation fee', async () => { -// // Very high min spend, should deduct whole balance as cancellation fees -// const minUpkeepSpend = toWei('1000') -// await registry.connect(owner).setConfigTypeSafe( -// signerAddresses, -// keeperAddresses, -// f, -// { -// paymentPremiumPPB, -// flatFeeMicroLink, -// checkGasLimit, -// stalenessSeconds, -// gasCeilingMultiplier, -// minUpkeepSpend, -// maxCheckDataSize, -// maxPerformDataSize, -// maxRevertDataSize, -// maxPerformGas, -// fallbackGasPrice, -// fallbackLinkPrice, -// transcoder: transcoder.address, -// registrars: [], -// upkeepPrivilegeManager: upkeepManager, -// }, -// offchainVersion, -// offchainBytes, -// ) -// const payee1Before = await linkToken.balanceOf( -// await payee1.getAddress(), -// ) -// const upkeepBefore = (await registry.getUpkeep(upkeepId)).balance -// const ownerBefore = (await registry.getState()).state.ownerLinkBalance -// -// await registry.connect(admin).cancelUpkeep(upkeepId) -// const payee1After = await linkToken.balanceOf( -// await payee1.getAddress(), -// ) -// const ownerAfter = (await registry.getState()).state.ownerLinkBalance -// const upkeepAfter = (await registry.getUpkeep(upkeepId)).balance -// -// // all upkeep balance is deducted for cancellation fee -// assert.equal(0, upkeepAfter.toNumber()) -// // payee balance should not change -// assert.isTrue(payee1After.eq(payee1Before)) -// // all upkeep balance is transferred to the owner -// assert.isTrue(ownerAfter.sub(ownerBefore).eq(upkeepBefore)) -// }) -// -// it('does not deduct cancellation fee if more than minUpkeepSpend is spent', async () => { -// // Very low min spend, already spent in one perform upkeep -// const minUpkeepSpend = BigNumber.from(420) -// await registry.connect(owner).setConfigTypeSafe( -// signerAddresses, -// keeperAddresses, -// f, -// { -// paymentPremiumPPB, -// flatFeeMicroLink, -// checkGasLimit, -// stalenessSeconds, -// gasCeilingMultiplier, -// minUpkeepSpend, -// maxCheckDataSize, -// maxPerformDataSize, -// maxRevertDataSize, -// maxPerformGas, -// fallbackGasPrice, -// fallbackLinkPrice, -// transcoder: transcoder.address, -// registrars: [], -// upkeepPrivilegeManager: upkeepManager, -// }, -// offchainVersion, -// offchainBytes, -// ) -// const payee1Before = await linkToken.balanceOf( -// await payee1.getAddress(), -// ) -// const upkeepBefore = (await registry.getUpkeep(upkeepId)).balance -// const ownerBefore = (await registry.getState()).state.ownerLinkBalance -// -// await registry.connect(admin).cancelUpkeep(upkeepId) -// const payee1After = await linkToken.balanceOf( -// await payee1.getAddress(), -// ) -// const ownerAfter = (await registry.getState()).state.ownerLinkBalance -// const upkeepAfter = (await registry.getUpkeep(upkeepId)).balance -// -// // upkeep does not pay cancellation fee after cancellation because minimum upkeep spent is met -// assert.isTrue(upkeepBefore.eq(upkeepAfter)) -// // owner balance does not change -// assert.isTrue(ownerAfter.eq(ownerBefore)) -// // payee balance does not change -// assert.isTrue(payee1Before.eq(payee1After)) -// }) -// }) -// }) -// }) -// -// describe('#withdrawPayment', () => { -// beforeEach(async () => { -// await linkToken.connect(owner).approve(registry.address, toWei('100')) -// await registry.connect(owner).addFunds(upkeepId, toWei('100')) -// await getTransmitTx(registry, keeper1, [upkeepId]) -// }) -// -// it('reverts if called by anyone but the payee', async () => { -// await evmRevert( -// registry -// .connect(payee2) -// .withdrawPayment( -// await keeper1.getAddress(), -// await nonkeeper.getAddress(), -// ), -// 'OnlyCallableByPayee()', -// ) -// }) -// -// it('reverts if called with the 0 address', async () => { -// await evmRevert( -// registry -// .connect(payee2) -// .withdrawPayment(await keeper1.getAddress(), zeroAddress), -// 'InvalidRecipient()', -// ) -// }) -// -// it('updates the balances', async () => { -// const to = await nonkeeper.getAddress() -// const keeperBefore = await registry.getTransmitterInfo( -// await keeper1.getAddress(), -// ) -// const registrationBefore = (await registry.getUpkeep(upkeepId)).balance -// const toLinkBefore = await linkToken.balanceOf(to) -// const registryLinkBefore = await linkToken.balanceOf(registry.address) -// const registryPremiumBefore = (await registry.getState()).state -// .totalPremium -// const ownerBefore = (await registry.getState()).state.ownerLinkBalance -// -// // Withdrawing for first time, last collected = 0 -// assert.equal(keeperBefore.lastCollected.toString(), '0') -// -// //// Do the thing -// await registry -// .connect(payee1) -// .withdrawPayment(await keeper1.getAddress(), to) -// -// const keeperAfter = await registry.getTransmitterInfo( -// await keeper1.getAddress(), -// ) -// const registrationAfter = (await registry.getUpkeep(upkeepId)).balance -// const toLinkAfter = await linkToken.balanceOf(to) -// const registryLinkAfter = await linkToken.balanceOf(registry.address) -// const registryPremiumAfter = (await registry.getState()).state -// .totalPremium -// const ownerAfter = (await registry.getState()).state.ownerLinkBalance -// -// // registry total premium should not change -// assert.isTrue(registryPremiumBefore.eq(registryPremiumAfter)) -// -// // Last collected should be updated to premium-change -// assert.isTrue( -// keeperAfter.lastCollected.eq( -// registryPremiumBefore.sub( -// registryPremiumBefore.mod(keeperAddresses.length), -// ), -// ), -// ) -// -// // owner balance should remain unchanged -// assert.isTrue(ownerAfter.eq(ownerBefore)) -// -// assert.isTrue(keeperAfter.balance.eq(BigNumber.from(0))) -// assert.isTrue(registrationBefore.eq(registrationAfter)) -// assert.isTrue(toLinkBefore.add(keeperBefore.balance).eq(toLinkAfter)) -// assert.isTrue( -// registryLinkBefore.sub(keeperBefore.balance).eq(registryLinkAfter), -// ) -// }) -// -// it('emits a log announcing the withdrawal', async () => { -// const balance = ( -// await registry.getTransmitterInfo(await keeper1.getAddress()) -// ).balance -// const tx = await registry -// .connect(payee1) -// .withdrawPayment( -// await keeper1.getAddress(), -// await nonkeeper.getAddress(), -// ) -// await expect(tx) -// .to.emit(registry, 'PaymentWithdrawn') -// .withArgs( -// await keeper1.getAddress(), -// balance, -// await nonkeeper.getAddress(), -// await payee1.getAddress(), -// ) -// }) -// }) -// -// describe('#checkCallback', () => { -// it('returns false with appropriate failure reason when target callback reverts', async () => { -// await streamsLookupUpkeep.setShouldRevertCallback(true) -// -// const values: any[] = ['0x1234', '0xabcd'] -// const res = await registry -// .connect(zeroAddress) -// .callStatic.checkCallback(streamsLookupUpkeepId, values, '0x') -// -// assert.isFalse(res.upkeepNeeded) -// assert.equal(res.performData, '0x') -// assert.equal( -// res.upkeepFailureReason, -// UpkeepFailureReason.CHECK_CALLBACK_REVERTED, -// ) -// assert.isTrue(res.gasUsed.gt(BigNumber.from('0'))) // Some gas should be used -// }) -// -// it('returns false with appropriate failure reason when target callback returns big performData', async () => { -// let longBytes = '0x' -// for (let i = 0; i <= maxPerformDataSize.toNumber(); i++) { -// longBytes += '11' -// } -// const values: any[] = [longBytes, longBytes] -// const res = await registry -// .connect(zeroAddress) -// .callStatic.checkCallback(streamsLookupUpkeepId, values, '0x') -// -// assert.isFalse(res.upkeepNeeded) -// assert.equal(res.performData, '0x') -// assert.equal( -// res.upkeepFailureReason, -// UpkeepFailureReason.PERFORM_DATA_EXCEEDS_LIMIT, -// ) -// assert.isTrue(res.gasUsed.gt(BigNumber.from('0'))) // Some gas should be used -// }) -// -// it('returns false with appropriate failure reason when target callback returns false', async () => { -// await streamsLookupUpkeep.setCallbackReturnBool(false) -// const values: any[] = ['0x1234', '0xabcd'] -// const res = await registry -// .connect(zeroAddress) -// .callStatic.checkCallback(streamsLookupUpkeepId, values, '0x') -// -// assert.isFalse(res.upkeepNeeded) -// assert.equal(res.performData, '0x') -// assert.equal( -// res.upkeepFailureReason, -// UpkeepFailureReason.UPKEEP_NOT_NEEDED, -// ) -// assert.isTrue(res.gasUsed.gt(BigNumber.from('0'))) // Some gas should be used -// }) -// -// it('succeeds with upkeep needed', async () => { -// const values: any[] = ['0x1234', '0xabcd'] -// -// const res = await registry -// .connect(zeroAddress) -// .callStatic.checkCallback(streamsLookupUpkeepId, values, '0x') -// const expectedPerformData = ethers.utils.defaultAbiCoder.encode( -// ['bytes[]', 'bytes'], -// [values, '0x'], -// ) -// -// assert.isTrue(res.upkeepNeeded) -// assert.equal(res.performData, expectedPerformData) -// assert.equal(res.upkeepFailureReason, UpkeepFailureReason.NONE) -// assert.isTrue(res.gasUsed.gt(BigNumber.from('0'))) // Some gas should be used -// }) -// }) -// -// describe('#setUpkeepPrivilegeConfig() / #getUpkeepPrivilegeConfig()', () => { -// it('reverts when non manager tries to set privilege config', async () => { -// await evmRevert( -// registry.connect(payee3).setUpkeepPrivilegeConfig(upkeepId, '0x1234'), -// 'OnlyCallableByUpkeepPrivilegeManager()', -// ) -// }) -// -// it('returns empty bytes for upkeep privilege config before setting', async () => { -// const cfg = await registry.getUpkeepPrivilegeConfig(upkeepId) -// assert.equal(cfg, '0x') -// }) -// -// it('allows upkeep manager to set privilege config', async () => { -// const tx = await registry -// .connect(personas.Norbert) -// .setUpkeepPrivilegeConfig(upkeepId, '0x1234') -// await expect(tx) -// .to.emit(registry, 'UpkeepPrivilegeConfigSet') -// .withArgs(upkeepId, '0x1234') -// -// const cfg = await registry.getUpkeepPrivilegeConfig(upkeepId) -// assert.equal(cfg, '0x1234') -// }) -// }) -// -// describe('#setAdminPrivilegeConfig() / #getAdminPrivilegeConfig()', () => { -// const admin = randomAddress() -// -// it('reverts when non manager tries to set privilege config', async () => { -// await evmRevert( -// registry.connect(payee3).setAdminPrivilegeConfig(admin, '0x1234'), -// 'OnlyCallableByUpkeepPrivilegeManager()', -// ) -// }) -// -// it('returns empty bytes for upkeep privilege config before setting', async () => { -// const cfg = await registry.getAdminPrivilegeConfig(admin) -// assert.equal(cfg, '0x') -// }) -// -// it('allows upkeep manager to set privilege config', async () => { -// const tx = await registry -// .connect(personas.Norbert) -// .setAdminPrivilegeConfig(admin, '0x1234') -// await expect(tx) -// .to.emit(registry, 'AdminPrivilegeConfigSet') -// .withArgs(admin, '0x1234') -// -// const cfg = await registry.getAdminPrivilegeConfig(admin) -// assert.equal(cfg, '0x1234') -// }) -// }) -// -// describe('transmitterPremiumSplit [ @skip-coverage ]', () => { -// beforeEach(async () => { -// await linkToken.connect(owner).approve(registry.address, toWei('100')) -// await registry.connect(owner).addFunds(upkeepId, toWei('100')) -// }) -// -// it('splits premium evenly across transmitters', async () => { -// // Do a transmit from keeper1 -// await getTransmitTx(registry, keeper1, [upkeepId]) -// -// const registryPremium = (await registry.getState()).state.totalPremium -// assert.isTrue(registryPremium.gt(BigNumber.from(0))) -// -// const premiumPerTransmitter = registryPremium.div( -// BigNumber.from(keeperAddresses.length), -// ) -// const k1Balance = ( -// await registry.getTransmitterInfo(await keeper1.getAddress()) -// ).balance -// // transmitter should be reimbursed for gas and get the premium -// assert.isTrue(k1Balance.gt(premiumPerTransmitter)) -// const k1GasReimbursement = k1Balance.sub(premiumPerTransmitter) -// -// const k2Balance = ( -// await registry.getTransmitterInfo(await keeper2.getAddress()) -// ).balance -// // non transmitter should get its share of premium -// assert.isTrue(k2Balance.eq(premiumPerTransmitter)) -// -// // Now do a transmit from keeper 2 -// await getTransmitTx(registry, keeper2, [upkeepId]) -// const registryPremiumNew = (await registry.getState()).state.totalPremium -// assert.isTrue(registryPremiumNew.gt(registryPremium)) -// const premiumPerTransmitterNew = registryPremiumNew.div( -// BigNumber.from(keeperAddresses.length), -// ) -// const additionalPremium = premiumPerTransmitterNew.sub( -// premiumPerTransmitter, -// ) -// -// const k1BalanceNew = ( -// await registry.getTransmitterInfo(await keeper1.getAddress()) -// ).balance -// // k1 should get the new premium -// assert.isTrue( -// k1BalanceNew.eq(k1GasReimbursement.add(premiumPerTransmitterNew)), -// ) -// -// const k2BalanceNew = ( -// await registry.getTransmitterInfo(await keeper2.getAddress()) -// ).balance -// // k2 should get gas reimbursement in addition to new premium -// assert.isTrue(k2BalanceNew.gt(k2Balance.add(additionalPremium))) -// }) -// -// it('updates last collected upon payment withdrawn', async () => { -// // Do a transmit from keeper1 -// await getTransmitTx(registry, keeper1, [upkeepId]) -// -// const registryPremium = (await registry.getState()).state.totalPremium -// const k1 = await registry.getTransmitterInfo(await keeper1.getAddress()) -// const k2 = await registry.getTransmitterInfo(await keeper2.getAddress()) -// -// // Withdrawing for first time, last collected = 0 -// assert.isTrue(k1.lastCollected.eq(BigNumber.from(0))) -// assert.isTrue(k2.lastCollected.eq(BigNumber.from(0))) -// -// //// Do the thing -// await registry -// .connect(payee1) -// .withdrawPayment( -// await keeper1.getAddress(), -// await nonkeeper.getAddress(), -// ) -// -// const k1New = await registry.getTransmitterInfo( -// await keeper1.getAddress(), -// ) -// const k2New = await registry.getTransmitterInfo( -// await keeper2.getAddress(), -// ) -// -// // transmitter info lastCollected should be updated for k1, not for k2 -// assert.isTrue( -// k1New.lastCollected.eq( -// registryPremium.sub(registryPremium.mod(keeperAddresses.length)), -// ), -// ) -// 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 -// -// 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 registry.connect(owner).setConfigTypeSafe( -// signerAddresses.slice(2, 15), // only use 2-14th index keepers -// keeperAddresses.slice(2, 15), -// f, -// config, -// offchainVersion, -// offchainBytes, -// ) -// await verifyConsistentAccounting(maxAllowedSpareChange) -// -// await getTransmitTx(registry, keeper3, [upkeepId], { -// startingSignerIndex: 2, -// }) -// maxAllowedSpareChange = maxAllowedSpareChange.add(BigNumber.from('13')) -// await verifyConsistentAccounting(maxAllowedSpareChange) -// -// await registry -// .connect(payee1) -// .withdrawPayment( -// await keeper1.getAddress(), -// await nonkeeper.getAddress(), -// ) -// await verifyConsistentAccounting(maxAllowedSpareChange) -// -// await registry -// .connect(payee3) -// .withdrawPayment( -// await keeper3.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, -// ) -// 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/KeeperRegistryCheckUpkeepGasUsageWrapper.test.ts b/contracts/test/v0.8/automation/KeeperRegistryCheckUpkeepGasUsageWrapper.test.ts deleted file mode 100644 index 9187487a8f2..00000000000 --- a/contracts/test/v0.8/automation/KeeperRegistryCheckUpkeepGasUsageWrapper.test.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { ethers } from 'hardhat' -import { BigNumber, Signer } from 'ethers' -import { assert } from 'chai' -import { KeeperRegistryCheckUpkeepGasUsageWrapper12 as GasWrapper } from '../../../typechain/KeeperRegistryCheckUpkeepGasUsageWrapper12' -import { KeeperRegistryCheckUpkeepGasUsageWrapper1_2__factory as GasWrapperFactory } from '../../../typechain/factories/KeeperRegistryCheckUpkeepGasUsageWrapper1_2__factory' -import { getUsers, Personas } from '../../test-helpers/setup' -import { - deployMockContract, - MockContract, -} from '@ethereum-waffle/mock-contract' -import { KeeperRegistry1_2__factory as KeeperRegistryFactory } from '../../../typechain/factories/KeeperRegistry1_2__factory' - -let personas: Personas -let owner: Signer -let caller: Signer -let nelly: Signer -let registryMockContract: MockContract -let gasWrapper: GasWrapper -let gasWrapperFactory: GasWrapperFactory - -const upkeepId = 123 - -describe('KeeperRegistryCheckUpkeepGasUsageWrapper1_2', () => { - before(async () => { - personas = (await getUsers()).personas - owner = personas.Default - caller = personas.Carol - nelly = personas.Nelly - - registryMockContract = await deployMockContract( - owner as any, - KeeperRegistryFactory.abi, - ) - // @ts-ignore bug in autogen file - gasWrapperFactory = await ethers.getContractFactory( - 'KeeperRegistryCheckUpkeepGasUsageWrapper1_2', - ) - gasWrapper = await gasWrapperFactory - .connect(owner) - .deploy(registryMockContract.address) - await gasWrapper.deployed() - }) - - describe('measureCheckGas()', () => { - it("returns gas used when registry's checkUpkeep executes successfully", async () => { - await registryMockContract.mock.checkUpkeep - .withArgs(upkeepId, await nelly.getAddress()) - .returns( - '0xabcd' /* performData */, - BigNumber.from(1000) /* maxLinkPayment */, - BigNumber.from(2000) /* gasLimit */, - BigNumber.from(3000) /* adjustedGasWei */, - BigNumber.from(4000) /* linkEth */, - ) - - const response = await gasWrapper - .connect(caller) - .callStatic.measureCheckGas( - BigNumber.from(upkeepId), - await nelly.getAddress(), - ) - - assert.isTrue(response[0], 'The checkUpkeepSuccess should be true') - assert.equal( - response[1], - '0xabcd', - 'The performData should be forwarded correctly', - ) - assert.isTrue( - response[2] > BigNumber.from(0), - 'The gasUsed value must be larger than 0', - ) - }) - - it("returns gas used when registry's checkUpkeep reverts", async () => { - await registryMockContract.mock.checkUpkeep - .withArgs(upkeepId, await nelly.getAddress()) - .revertsWithReason('Error') - - const response = await gasWrapper - .connect(caller) - .callStatic.measureCheckGas( - BigNumber.from(upkeepId), - await nelly.getAddress(), - ) - - assert.isFalse(response[0], 'The checkUpkeepSuccess should be false') - assert.equal( - response[1], - '0x', - 'The performData should be forwarded correctly', - ) - assert.isTrue( - response[2] > BigNumber.from(0), - 'The gasUsed value must be larger than 0', - ) - }) - }) - - describe('getKeeperRegistry()', () => { - it('returns the underlying keeper registry', async () => { - const registry = await gasWrapper.connect(caller).getKeeperRegistry() - assert.equal( - registry, - registryMockContract.address, - 'The underlying keeper registry is incorrect', - ) - }) - }) -}) diff --git a/contracts/test/v0.8/automation/UpkeepTranscoder.test.ts b/contracts/test/v0.8/automation/UpkeepTranscoder.test.ts deleted file mode 100644 index fc3a2009567..00000000000 --- a/contracts/test/v0.8/automation/UpkeepTranscoder.test.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { ethers } from 'hardhat' -import { assert } from 'chai' -import { evmRevert, evmRevertCustomError } from '../../test-helpers/matchers' -import { UpkeepTranscoder__factory as UpkeepTranscoderFactory } from '../../../typechain/factories/UpkeepTranscoder__factory' -import { UpkeepTranscoder } from '../../../typechain' - -let upkeepTranscoderFactory: UpkeepTranscoderFactory -let transcoder: UpkeepTranscoder - -before(async () => { - upkeepTranscoderFactory = await ethers.getContractFactory('UpkeepTranscoder') -}) - -describe('UpkeepTranscoder', () => { - const formatV1 = 0 - const formatV2 = 1 - const formatV3 = 2 - - beforeEach(async () => { - transcoder = await upkeepTranscoderFactory.deploy() - }) - - describe('#typeAndVersion', () => { - it('uses the correct type and version', async () => { - const typeAndVersion = await transcoder.typeAndVersion() - assert.equal(typeAndVersion, 'UpkeepTranscoder 1.0.0') - }) - }) - - describe('#transcodeUpkeeps', () => { - const encodedData = '0xc0ffee' - - it('reverts if the from type is not an enum value', async () => { - await evmRevert(transcoder.transcodeUpkeeps(3, 1, encodedData)) - }) - - it('reverts if the from type != to type', async () => { - await evmRevertCustomError( - transcoder.transcodeUpkeeps(1, 2, encodedData), - transcoder, - 'InvalidTranscoding', - ) - }) - - context('when from and to versions equal', () => { - it('returns the data that was passed in', async () => { - let response = await transcoder.transcodeUpkeeps( - formatV1, - formatV1, - encodedData, - ) - assert.equal(encodedData, response) - - response = await transcoder.transcodeUpkeeps( - formatV2, - formatV2, - encodedData, - ) - assert.equal(encodedData, response) - - response = await transcoder.transcodeUpkeeps( - formatV3, - formatV3, - encodedData, - ) - assert.equal(encodedData, response) - }) - }) - }) -}) diff --git a/contracts/test/v0.8/vrf/BatchBlockhashStore.test.ts b/contracts/test/v0.8/vrf/BatchBlockhashStore.test.ts deleted file mode 100644 index ebdc17037ce..00000000000 --- a/contracts/test/v0.8/vrf/BatchBlockhashStore.test.ts +++ /dev/null @@ -1,324 +0,0 @@ -import { assert, expect } from 'chai' -import { Contract, Signer } from 'ethers' -import { ethers } from 'hardhat' -import * as rlp from 'rlp' - -function range(size: number, startAt = 0) { - return [...Array(size).keys()].map((i) => i + startAt) -} - -describe('BatchBlockhashStore', () => { - let blockhashStore: Contract - let batchBHS: Contract - let owner: Signer - - beforeEach(async () => { - const accounts = await ethers.getSigners() - owner = accounts[0] - - const bhFactory = await ethers.getContractFactory( - 'src/v0.8/vrf/dev/BlockhashStore.sol:BlockhashStore', - accounts[0], - ) - - blockhashStore = await bhFactory.deploy() - - const batchBHSFactory = await ethers.getContractFactory( - 'src/v0.8/vrf/BatchBlockhashStore.sol:BatchBlockhashStore', - accounts[0], - ) - - batchBHS = await batchBHSFactory.deploy(blockhashStore.address) - - // Mine some blocks so that we have some blockhashes to store. - for (let i = 0; i < 10; i++) { - await ethers.provider.send('evm_mine', []) - } - }) - - describe('#store', () => { - it('stores batches of blocknumbers', async () => { - const latestBlock = await ethers.provider.send('eth_blockNumber', []) - const bottomBlock = latestBlock - 5 - const numBlocks = 3 - await batchBHS.connect(owner).store(range(numBlocks, bottomBlock)) - - // Mine some blocks to confirm the store batch tx above. - for (let i = 0; i < 2; i++) { - await ethers.provider.send('evm_mine', []) - } - - // check the bhs if it was stored - for (let i = bottomBlock; i < bottomBlock + numBlocks; i++) { - const actualBh = await blockhashStore.connect(owner).getBlockhash(i) - const expectedBh = (await ethers.provider.getBlock(i)).hash - expect(expectedBh).to.equal(actualBh) - } - }) - - it('skips block numbers that are too far back', async () => { - // blockhash(n) fails if n is more than 256 blocks behind the current block in which - // the instruction is executing. - for (let i = 0; i < 256; i++) { - await ethers.provider.send('evm_mine', []) - } - - const gettableBlock = - (await ethers.provider.send('eth_blockNumber', [])) - 1 - - // Store 3 block numbers that are too far back, and one that is close enough. - await batchBHS.connect(owner).store([1, 2, 3, gettableBlock]) - - await ethers.provider.send('evm_mine', []) - - // Only block "250" should be stored - const actualBh = await blockhashStore - .connect(owner) - .getBlockhash(gettableBlock) - const expectedBh = (await ethers.provider.getBlock(gettableBlock)).hash - expect(expectedBh).to.equal(actualBh) - - // others were not stored - for (let i of [1, 2, 3]) { - expect( - blockhashStore.connect(owner).getBlockhash(i), - ).to.be.revertedWith('blockhash not found in store') - } - }) - }) - - describe('#getBlockhashes', () => { - it('fetches blockhashes of a batch of block numbers', async () => { - // Store a bunch of block hashes - const latestBlock = await ethers.provider.send('eth_blockNumber', []) - const bottomBlock = latestBlock - 5 - const numBlocks = 3 - await batchBHS.connect(owner).store(range(numBlocks, bottomBlock)) - - // Mine some blocks to confirm the store batch tx above. - for (let i = 0; i < 2; i++) { - await ethers.provider.send('evm_mine', []) - } - - // fetch the blocks in a batch - const actualBlockhashes = await batchBHS - .connect(owner) - .getBlockhashes(range(numBlocks, bottomBlock)) - let expectedBlockhashes = [] - for (let i = bottomBlock; i < bottomBlock + numBlocks; i++) { - const block = await ethers.provider.send('eth_getBlockByNumber', [ - '0x' + i.toString(16), - false, - ]) - expectedBlockhashes.push(block.hash) - } - assert.deepEqual(actualBlockhashes, expectedBlockhashes) - }) - - it('returns 0x0 for block numbers without an associated blockhash', async () => { - const latestBlock = await ethers.provider.send('eth_blockNumber', []) - const bottomBlock = latestBlock - 5 - const numBlocks = 3 - const blockhashes = await batchBHS - .connect(owner) - .getBlockhashes(range(numBlocks, bottomBlock)) - const expected = [ - '0x0000000000000000000000000000000000000000000000000000000000000000', - '0x0000000000000000000000000000000000000000000000000000000000000000', - '0x0000000000000000000000000000000000000000000000000000000000000000', - ] - assert.deepEqual(blockhashes, expected) - }) - }) - - describe('#storeVerifyHeader', () => { - it('stores batches of blocknumbers using storeVerifyHeader [ @skip-coverage ]', async () => { - // Store a single blockhash and go backwards from there using storeVerifyHeader - const latestBlock = await ethers.provider.send('eth_blockNumber', []) - await batchBHS.connect(owner).store([latestBlock]) - await ethers.provider.send('evm_mine', []) - - const numBlocks = 3 - const startBlock = latestBlock - 1 - const blockNumbers = range( - numBlocks + 1, - startBlock - numBlocks, - ).reverse() - let blockHeaders = [] - let expectedBlockhashes = [] - for (let i of blockNumbers) { - const block = await ethers.provider.send('eth_getBlockByNumber', [ - '0x' + (i + 1).toString(16), - false, - ]) - // eip 1559 header - switch to this if we upgrade hardhat - // and use post-london forks of ethereum. - const encodedHeader = rlp.encode([ - block.parentHash, - block.sha3Uncles, - ethers.utils.arrayify(block.miner), - block.stateRoot, - block.transactionsRoot, - block.receiptsRoot, - block.logsBloom, - block.difficulty == '0x0' ? '0x' : block.difficulty, - block.number, - block.gasLimit, - block.gasUsed == '0x0' ? '0x' : block.gasUsed, - block.timestamp, - block.extraData, - block.mixHash, - block.nonce, - block.baseFeePerGas, - ]) - // // pre-london block header serialization - kept for prosperity - // const encodedHeader = rlp.encode([ - // block.parentHash, - // block.sha3Uncles, - // ethers.utils.arrayify(block.miner), - // block.stateRoot, - // block.transactionsRoot, - // block.receiptsRoot, - // block.logsBloom, - // block.difficulty, - // block.number, - // block.gasLimit, - // block.gasUsed == '0x0' ? '0x' : block.gasUsed, - // block.timestamp, - // block.extraData, - // block.mixHash, - // block.nonce, - // ]) - blockHeaders.push('0x' + encodedHeader.toString('hex')) - expectedBlockhashes.push( - ( - await ethers.provider.send('eth_getBlockByNumber', [ - '0x' + i.toString(16), - false, - ]) - ).hash, - ) - } - await batchBHS - .connect(owner) - .storeVerifyHeader(blockNumbers, blockHeaders) - - // fetch blocks that were just stored and assert correctness - const actualBlockhashes = await batchBHS - .connect(owner) - .getBlockhashes(blockNumbers) - - assert.deepEqual(actualBlockhashes, expectedBlockhashes) - }) - - describe('bad input', () => { - it('reverts on mismatched input array sizes', async () => { - // Store a single blockhash and go backwards from there using storeVerifyHeader - const latestBlock = await ethers.provider.send('eth_blockNumber', []) - await batchBHS.connect(owner).store([latestBlock]) - - await ethers.provider.send('evm_mine', []) - - const numBlocks = 3 - const startBlock = latestBlock - 1 - const blockNumbers = range( - numBlocks + 1, - startBlock - numBlocks, - ).reverse() - let blockHeaders = [] - let expectedBlockhashes = [] - for (let i of blockNumbers) { - const block = await ethers.provider.send('eth_getBlockByNumber', [ - '0x' + (i + 1).toString(16), - false, - ]) - const encodedHeader = rlp.encode([ - block.parentHash, - block.sha3Uncles, - ethers.utils.arrayify(block.miner), - block.stateRoot, - block.transactionsRoot, - block.receiptsRoot, - block.logsBloom, - block.difficulty == '0x0' ? '0x' : block.difficulty, - block.number, - block.gasLimit, - block.gasUsed == '0x0' ? '0x' : block.gasUsed, - block.timestamp, - block.extraData, - block.mixHash, - block.nonce, - block.baseFeePerGas, - ]) - blockHeaders.push('0x' + encodedHeader.toString('hex')) - expectedBlockhashes.push( - ( - await ethers.provider.send('eth_getBlockByNumber', [ - '0x' + i.toString(16), - false, - ]) - ).hash, - ) - } - // remove last element to simulate different input array sizes - blockHeaders.pop() - expect( - batchBHS.connect(owner).storeVerifyHeader(blockNumbers, blockHeaders), - ).to.be.revertedWith('input array arg lengths mismatch') - }) - - it('reverts on bad block header input', async () => { - // Store a single blockhash and go backwards from there using storeVerifyHeader - const latestBlock = await ethers.provider.send('eth_blockNumber', []) - await batchBHS.connect(owner).store([latestBlock]) - - await ethers.provider.send('evm_mine', []) - - const numBlocks = 3 - const startBlock = latestBlock - 1 - const blockNumbers = range( - numBlocks + 1, - startBlock - numBlocks, - ).reverse() - let blockHeaders = [] - let expectedBlockhashes = [] - for (let i of blockNumbers) { - const block = await ethers.provider.send('eth_getBlockByNumber', [ - '0x' + (i + 1).toString(16), - false, - ]) - const encodedHeader = rlp.encode([ - block.parentHash, - block.sha3Uncles, - ethers.utils.arrayify(block.miner), - block.stateRoot, - block.transactionsRoot, - block.receiptsRoot, - block.logsBloom, - block.difficulty == '0x0' ? '0x' : block.difficulty, - block.number, - block.gasLimit, - block.gasUsed, // incorrect: in cases where it's 0x0 it should be 0x instead. - block.timestamp, - block.extraData, - block.mixHash, - block.nonce, - block.baseFeePerGas, - ]) - blockHeaders.push('0x' + encodedHeader.toString('hex')) - expectedBlockhashes.push( - ( - await ethers.provider.send('eth_getBlockByNumber', [ - '0x' + i.toString(16), - false, - ]) - ).hash, - ) - } - expect( - batchBHS.connect(owner).storeVerifyHeader(blockNumbers, blockHeaders), - ).to.be.revertedWith('header has unknown blockhash') - }) - }) - }) -}) diff --git a/contracts/test/v0.8/vrf/VRFCoordinatorV2.test.ts b/contracts/test/v0.8/vrf/VRFCoordinatorV2.test.ts deleted file mode 100644 index 59f3811eedb..00000000000 --- a/contracts/test/v0.8/vrf/VRFCoordinatorV2.test.ts +++ /dev/null @@ -1,1173 +0,0 @@ -import { ethers } from 'hardhat' -import { BigNumber, Contract, Signer } from 'ethers' -import { assert, expect } from 'chai' -import { publicAbi } from '../../test-helpers/helpers' -import { randomAddressString } from 'hardhat/internal/hardhat-network/provider/utils/random' - -describe('VRFCoordinatorV2', () => { - let vrfCoordinatorV2: Contract - let vrfCoordinatorV2TestHelper: Contract - let linkToken: Contract - let blockHashStore: Contract - let mockLinkEth: Contract - let owner: Signer - let subOwner: Signer - let subOwnerAddress: string - let consumer: Signer - let random: Signer - let randomAddress: string - let oracle: Signer - const linkEth = BigNumber.from(300000000) - type config = { - minimumRequestBlockConfirmations: number - maxGasLimit: number - stalenessSeconds: number - gasAfterPaymentCalculation: number - weiPerUnitLink: BigNumber - } - let c: config - - beforeEach(async () => { - const accounts = await ethers.getSigners() - owner = accounts[0] - subOwner = accounts[1] - subOwnerAddress = await subOwner.getAddress() - consumer = accounts[2] - random = accounts[3] - randomAddress = await random.getAddress() - oracle = accounts[4] - const ltFactory = await ethers.getContractFactory( - 'src/v0.8/shared/test/helpers/LinkTokenTestHelper.sol:LinkTokenTestHelper', - accounts[0], - ) - linkToken = await ltFactory.deploy() - const bhFactory = await ethers.getContractFactory( - 'src/v0.8/vrf/dev/BlockhashStore.sol:BlockhashStore', - accounts[0], - ) - blockHashStore = await bhFactory.deploy() - const mockAggregatorV3Factory = await ethers.getContractFactory( - 'src/v0.8/tests/MockV3Aggregator.sol:MockV3Aggregator', - accounts[0], - ) - mockLinkEth = await mockAggregatorV3Factory.deploy(0, linkEth) - const vrfCoordinatorV2Factory = await ethers.getContractFactory( - 'src/v0.8/vrf/VRFCoordinatorV2.sol:VRFCoordinatorV2', - accounts[0], - ) - vrfCoordinatorV2 = await vrfCoordinatorV2Factory.deploy( - linkToken.address, - blockHashStore.address, - mockLinkEth.address, - ) - const vrfCoordinatorV2TestHelperFactory = await ethers.getContractFactory( - 'src/v0.8/vrf/testhelpers/VRFCoordinatorV2TestHelper.sol:VRFCoordinatorV2TestHelper', - accounts[0], - ) - vrfCoordinatorV2TestHelper = await vrfCoordinatorV2TestHelperFactory.deploy( - mockLinkEth.address, - ) - await linkToken.transfer( - subOwnerAddress, - BigNumber.from('1000000000000000000'), - ) // 1 link - await linkToken.transfer( - randomAddress, - BigNumber.from('1000000000000000000'), - ) // 1 link - c = { - minimumRequestBlockConfirmations: 1, - maxGasLimit: 1000000, - stalenessSeconds: 86400, - gasAfterPaymentCalculation: - 21000 + 5000 + 2100 + 20000 + 2 * 2100 - 15000 + 7315, - weiPerUnitLink: BigNumber.from('10000000000000000'), - } - // Note if you try and use an object, ethers - // confuses that with an override object and will error. - // It appears that only arrays work for struct args. - const fc = [0, 0, 0, 0, 0, 0, 0, 0, 0] - await vrfCoordinatorV2 - .connect(owner) - .setConfig( - c.minimumRequestBlockConfirmations, - c.maxGasLimit, - c.stalenessSeconds, - c.gasAfterPaymentCalculation, - c.weiPerUnitLink, - fc, - ) - }) - - it('has a limited public interface [ @skip-coverage ]', async () => { - publicAbi(vrfCoordinatorV2, [ - // Public constants - 'MAX_CONSUMERS', - 'MAX_NUM_WORDS', - 'MAX_REQUEST_CONFIRMATIONS', - // Owner - 'acceptOwnership', - 'transferOwnership', - 'owner', - 'getConfig', - 'getFeeConfig', - 'getFallbackWeiPerUnitLink', - 'getCurrentSubId', - 'setConfig', - 'getRequestConfig', - 'recoverFunds', - 'ownerCancelSubscription', - 'getFeeTier', - 'pendingRequestExists', - 'getTotalBalance', - // Oracle - 'requestRandomWords', - 'getCommitment', // Note we use this to check if a request is already fulfilled. - 'hashOfKey', - 'fulfillRandomWords', - 'registerProvingKey', - 'deregisterProvingKey', - 'oracleWithdraw', - // Subscription management - 'createSubscription', - 'addConsumer', - 'removeConsumer', - 'getSubscription', - 'onTokenTransfer', // Effectively the fundSubscription. - 'cancelSubscription', - 'requestSubscriptionOwnerTransfer', - 'acceptSubscriptionOwnerTransfer', - // Misc - 'typeAndVersion', - 'BLOCKHASH_STORE', - 'LINK', - 'LINK_ETH_FEED', - ]) - }) - - describe('#setConfig', async function () { - it('only owner can set', async function () { - await expect( - vrfCoordinatorV2 - .connect(subOwner) - .setConfig( - c.minimumRequestBlockConfirmations, - c.maxGasLimit, - c.stalenessSeconds, - c.gasAfterPaymentCalculation, - c.weiPerUnitLink, - [0, 0, 0, 0, 0, 0, 0, 0, 0], - ), - ).to.be.revertedWith('Only callable by owner') - // Anyone can read the config. - const resp = await vrfCoordinatorV2.connect(random).getConfig() - assert(resp[0] == c.minimumRequestBlockConfirmations) - assert(resp[1] == c.maxGasLimit) - assert(resp[2] == c.stalenessSeconds) - assert(resp[3].toString() == c.gasAfterPaymentCalculation.toString()) - }) - - it('max req confs', async function () { - await expect( - vrfCoordinatorV2 - .connect(owner) - .setConfig( - 201, - c.maxGasLimit, - c.stalenessSeconds, - c.gasAfterPaymentCalculation, - c.weiPerUnitLink, - [0, 0, 0, 0, 0, 0, 0, 0, 0], - ), - ) - .to.be.revertedWithCustomError( - vrfCoordinatorV2, - 'InvalidRequestConfirmations', - ) - .withArgs(201, 201, 200) - }) - - it('positive fallback price', async function () { - await expect( - vrfCoordinatorV2 - .connect(owner) - .setConfig( - c.minimumRequestBlockConfirmations, - c.maxGasLimit, - c.stalenessSeconds, - c.gasAfterPaymentCalculation, - 0, - [0, 0, 0, 0, 0, 0, 0, 0, 0], - ), - ) - .to.be.revertedWithCustomError(vrfCoordinatorV2, 'InvalidLinkWeiPrice') - .withArgs(0) - await expect( - vrfCoordinatorV2 - .connect(owner) - .setConfig( - c.minimumRequestBlockConfirmations, - c.maxGasLimit, - c.stalenessSeconds, - c.gasAfterPaymentCalculation, - -1, - [0, 0, 0, 0, 0, 0, 0, 0, 0], - ), - ) - .to.be.revertedWithCustomError(vrfCoordinatorV2, 'InvalidLinkWeiPrice') - .withArgs(-1) - }) - }) - - async function createSubscription(): Promise { - // let consumers: string[] = [await consumer.getAddress()]; - const tx = await vrfCoordinatorV2.connect(subOwner).createSubscription() - const receipt = await tx.wait() - const subId = receipt.events[0].args['subId'] - await vrfCoordinatorV2 - .connect(subOwner) - .addConsumer(subId, await consumer.getAddress()) - return subId - } - - async function createSubscriptionWithConsumers( - consumers: string[], - ): Promise { - const tx = await vrfCoordinatorV2.connect(subOwner).createSubscription() - const receipt = await tx.wait() - const subId = receipt.events[0].args['subId'] - for (let i = 0; i < consumers.length; i++) { - await vrfCoordinatorV2.connect(subOwner).addConsumer(subId, consumers[i]) - } - return subId - } - - describe('#createSubscription', async function () { - it('can create a subscription', async function () { - await expect(vrfCoordinatorV2.connect(subOwner).createSubscription()) - .to.emit(vrfCoordinatorV2, 'SubscriptionCreated') - .withArgs(1, subOwnerAddress) - const s = await vrfCoordinatorV2.getSubscription(1) - assert(s.balance.toString() == '0', 'invalid balance') - assert(s.owner == subOwnerAddress, 'invalid address') - }) - it('subscription id increments', async function () { - await expect(vrfCoordinatorV2.connect(subOwner).createSubscription()) - .to.emit(vrfCoordinatorV2, 'SubscriptionCreated') - .withArgs(1, subOwnerAddress) - await expect(vrfCoordinatorV2.connect(subOwner).createSubscription()) - .to.emit(vrfCoordinatorV2, 'SubscriptionCreated') - .withArgs(2, subOwnerAddress) - }) - it('cannot create more than the max', async function () { - const subId = createSubscriptionWithConsumers([]) - for (let i = 0; i < 100; i++) { - await vrfCoordinatorV2 - .connect(subOwner) - .addConsumer(subId, randomAddressString()) - } - await expect( - vrfCoordinatorV2 - .connect(subOwner) - .addConsumer(subId, randomAddressString()), - ).to.be.revertedWithCustomError(vrfCoordinatorV2, `TooManyConsumers`) - }) - }) - - describe('#requestSubscriptionOwnerTransfer', async function () { - let subId: number - beforeEach(async () => { - subId = await createSubscription() - }) - it('rejects non-owner', async function () { - await expect( - vrfCoordinatorV2 - .connect(random) - .requestSubscriptionOwnerTransfer(subId, randomAddress), - ) - .to.be.revertedWithCustomError(vrfCoordinatorV2, `MustBeSubOwner`) - .withArgs(subOwnerAddress) - }) - it('owner can request transfer', async function () { - await expect( - vrfCoordinatorV2 - .connect(subOwner) - .requestSubscriptionOwnerTransfer(subId, randomAddress), - ) - .to.emit(vrfCoordinatorV2, 'SubscriptionOwnerTransferRequested') - .withArgs(subId, subOwnerAddress, randomAddress) - // Same request is a noop - await expect( - vrfCoordinatorV2 - .connect(subOwner) - .requestSubscriptionOwnerTransfer(subId, randomAddress), - ).to.not.emit(vrfCoordinatorV2, 'SubscriptionOwnerTransferRequested') - }) - }) - - describe('#acceptSubscriptionOwnerTransfer', async function () { - let subId: number - beforeEach(async () => { - subId = await createSubscription() - }) - it('subscription must exist', async function () { - await expect( - vrfCoordinatorV2 - .connect(subOwner) - .acceptSubscriptionOwnerTransfer(1203123123), - ).to.be.revertedWithCustomError(vrfCoordinatorV2, `InvalidSubscription`) - }) - it('must be requested owner to accept', async function () { - await expect( - vrfCoordinatorV2 - .connect(subOwner) - .requestSubscriptionOwnerTransfer(subId, randomAddress), - ) - await expect( - vrfCoordinatorV2 - .connect(subOwner) - .acceptSubscriptionOwnerTransfer(subId), - ) - .to.be.revertedWithCustomError(vrfCoordinatorV2, `MustBeRequestedOwner`) - .withArgs(randomAddress) - }) - it('requested owner can accept', async function () { - await expect( - vrfCoordinatorV2 - .connect(subOwner) - .requestSubscriptionOwnerTransfer(subId, randomAddress), - ) - .to.emit(vrfCoordinatorV2, 'SubscriptionOwnerTransferRequested') - .withArgs(subId, subOwnerAddress, randomAddress) - await expect( - vrfCoordinatorV2.connect(random).acceptSubscriptionOwnerTransfer(subId), - ) - .to.emit(vrfCoordinatorV2, 'SubscriptionOwnerTransferred') - .withArgs(subId, subOwnerAddress, randomAddress) - }) - }) - - describe('#addConsumer', async function () { - let subId: number - beforeEach(async () => { - subId = await createSubscription() - }) - it('subscription must exist', async function () { - await expect( - vrfCoordinatorV2 - .connect(subOwner) - .addConsumer(1203123123, randomAddress), - ).to.be.revertedWithCustomError(vrfCoordinatorV2, `InvalidSubscription`) - }) - it('must be owner', async function () { - await expect( - vrfCoordinatorV2.connect(random).addConsumer(subId, randomAddress), - ) - .to.be.revertedWithCustomError(vrfCoordinatorV2, `MustBeSubOwner`) - .withArgs(subOwnerAddress) - }) - it('add is idempotent', async function () { - await vrfCoordinatorV2.connect(subOwner).addConsumer(subId, randomAddress) - await vrfCoordinatorV2.connect(subOwner).addConsumer(subId, randomAddress) - }) - it('cannot add more than maximum', async function () { - // There is one consumer, add another 99 to hit the max - for (let i = 0; i < 99; i++) { - await vrfCoordinatorV2 - .connect(subOwner) - .addConsumer(subId, randomAddressString()) - } - // Adding one more should fail - // await vrfCoordinatorV2.connect(subOwner).addConsumer(subId, randomAddress); - await expect( - vrfCoordinatorV2.connect(subOwner).addConsumer(subId, randomAddress), - ).to.be.revertedWithCustomError(vrfCoordinatorV2, `TooManyConsumers`) - // Same is true if we first create with the maximum - const consumers: string[] = [] - for (let i = 0; i < 100; i++) { - consumers.push(randomAddressString()) - } - subId = await createSubscriptionWithConsumers(consumers) - await expect( - vrfCoordinatorV2.connect(subOwner).addConsumer(subId, randomAddress), - ).to.be.revertedWithCustomError(vrfCoordinatorV2, `TooManyConsumers`) - }) - it('owner can update', async function () { - await expect( - vrfCoordinatorV2.connect(subOwner).addConsumer(subId, randomAddress), - ) - .to.emit(vrfCoordinatorV2, 'SubscriptionConsumerAdded') - .withArgs(subId, randomAddress) - }) - }) - - describe('#removeConsumer', async function () { - let subId: number - beforeEach(async () => { - subId = await createSubscription() - }) - it('subscription must exist', async function () { - await expect( - vrfCoordinatorV2 - .connect(subOwner) - .removeConsumer(1203123123, randomAddress), - ).to.be.revertedWithCustomError(vrfCoordinatorV2, `InvalidSubscription`) - }) - it('must be owner', async function () { - await expect( - vrfCoordinatorV2.connect(random).removeConsumer(subId, randomAddress), - ) - .to.be.revertedWithCustomError(vrfCoordinatorV2, `MustBeSubOwner`) - .withArgs(subOwnerAddress) - }) - it('owner can update', async function () { - const subBefore = await vrfCoordinatorV2.getSubscription(subId) - await vrfCoordinatorV2.connect(subOwner).addConsumer(subId, randomAddress) - await expect( - vrfCoordinatorV2.connect(subOwner).removeConsumer(subId, randomAddress), - ) - .to.emit(vrfCoordinatorV2, 'SubscriptionConsumerRemoved') - .withArgs(subId, randomAddress) - const subAfter = await vrfCoordinatorV2.getSubscription(subId) - // Subscription should NOT contain the removed consumer - assert.deepEqual(subBefore.consumers, subAfter.consumers) - }) - it('can remove all consumers', async function () { - // Testing the handling of zero. - await vrfCoordinatorV2.connect(subOwner).addConsumer(subId, randomAddress) - await vrfCoordinatorV2 - .connect(subOwner) - .removeConsumer(subId, randomAddress) - await vrfCoordinatorV2 - .connect(subOwner) - .removeConsumer(subId, await consumer.getAddress()) - // Should be empty - const subAfter = await vrfCoordinatorV2.getSubscription(subId) - assert.deepEqual(subAfter.consumers, []) - }) - }) - - describe('#cancelSubscription', async function () { - let subId: number - beforeEach(async () => { - subId = await createSubscription() - }) - it('subscription must exist', async function () { - await expect( - vrfCoordinatorV2 - .connect(subOwner) - .cancelSubscription(1203123123, subOwnerAddress), - ).to.be.revertedWithCustomError(vrfCoordinatorV2, `InvalidSubscription`) - }) - it('must be owner', async function () { - await expect( - vrfCoordinatorV2 - .connect(random) - .cancelSubscription(subId, subOwnerAddress), - ) - .to.be.revertedWithCustomError(vrfCoordinatorV2, `MustBeSubOwner`) - .withArgs(subOwnerAddress) - }) - it('can cancel', async function () { - await linkToken - .connect(subOwner) - .transferAndCall( - vrfCoordinatorV2.address, - BigNumber.from('1000'), - ethers.utils.defaultAbiCoder.encode(['uint64'], [subId]), - ) - await expect( - vrfCoordinatorV2 - .connect(subOwner) - .cancelSubscription(subId, randomAddress), - ) - .to.emit(vrfCoordinatorV2, 'SubscriptionCanceled') - .withArgs(subId, randomAddress, BigNumber.from('1000')) - const randomBalance = await linkToken.balanceOf(randomAddress) - assert.equal(randomBalance.toString(), '1000000000000001000') - await expect( - vrfCoordinatorV2.connect(subOwner).getSubscription(subId), - ).to.be.revertedWithCustomError(vrfCoordinatorV2, 'InvalidSubscription') - }) - it('can add same consumer after canceling', async function () { - await linkToken - .connect(subOwner) - .transferAndCall( - vrfCoordinatorV2.address, - BigNumber.from('1000'), - ethers.utils.defaultAbiCoder.encode(['uint64'], [subId]), - ) - await vrfCoordinatorV2.connect(subOwner).addConsumer(subId, randomAddress) - await vrfCoordinatorV2 - .connect(subOwner) - .cancelSubscription(subId, randomAddress) - subId = await createSubscription() - // The cancel should have removed this consumer, so we can add it again. - await vrfCoordinatorV2.connect(subOwner).addConsumer(subId, randomAddress) - }) - it('cannot cancel with pending req', async function () { - await linkToken - .connect(subOwner) - .transferAndCall( - vrfCoordinatorV2.address, - BigNumber.from('1000'), - ethers.utils.defaultAbiCoder.encode(['uint64'], [subId]), - ) - await vrfCoordinatorV2.connect(subOwner).addConsumer(subId, randomAddress) - const testKey = [BigNumber.from('1'), BigNumber.from('2')] - await vrfCoordinatorV2.registerProvingKey(subOwnerAddress, testKey) - await vrfCoordinatorV2.connect(owner).reg - const kh = await vrfCoordinatorV2.hashOfKey(testKey) - await vrfCoordinatorV2.connect(consumer).requestRandomWords( - kh, // keyhash - subId, // subId - 1, // minReqConf - 1000000, // callbackGasLimit - 1, // numWords - ) - // Should revert with outstanding requests - await expect( - vrfCoordinatorV2 - .connect(subOwner) - .cancelSubscription(subId, randomAddress), - ).to.be.revertedWithCustomError(vrfCoordinatorV2, 'PendingRequestExists') - // However the owner is able to cancel - // funds go to the sub owner. - await expect( - vrfCoordinatorV2.connect(owner).ownerCancelSubscription(subId), - ) - .to.emit(vrfCoordinatorV2, 'SubscriptionCanceled') - .withArgs(subId, subOwnerAddress, BigNumber.from('1000')) - }) - }) - - describe('#recoverFunds', async function () { - let subId: number - beforeEach(async () => { - subId = await createSubscription() - }) - - // Note we can't test the oracleWithdraw without fulfilling a request, so leave - // that coverage to the go tests. - it('function that should change internal balance do', async function () { - type bf = [() => Promise, BigNumber] - const balanceChangingFns: Array = [ - [ - async function () { - const s = ethers.utils.defaultAbiCoder.encode(['uint64'], [subId]) - await linkToken - .connect(subOwner) - .transferAndCall( - vrfCoordinatorV2.address, - BigNumber.from('1000'), - s, - ) - }, - BigNumber.from('1000'), - ], - [ - async function () { - await vrfCoordinatorV2 - .connect(subOwner) - .cancelSubscription(subId, randomAddress) - }, - BigNumber.from('-1000'), - ], - ] - for (const [fn, expectedBalanceChange] of balanceChangingFns) { - const startingBalance = await vrfCoordinatorV2.getTotalBalance() - await fn() - const endingBalance = await vrfCoordinatorV2.getTotalBalance() - assert( - endingBalance.sub(startingBalance).toString() == - expectedBalanceChange.toString(), - ) - } - }) - it('only owner can recover', async function () { - await expect( - vrfCoordinatorV2.connect(subOwner).recoverFunds(randomAddress), - ).to.be.revertedWith(`Only callable by owner`) - }) - - it('owner can recover link transferred', async function () { - // Set the internal balance - assert(BigNumber.from('0'), linkToken.balanceOf(randomAddress)) - const s = ethers.utils.defaultAbiCoder.encode(['uint64'], [subId]) - await linkToken - .connect(subOwner) - .transferAndCall(vrfCoordinatorV2.address, BigNumber.from('1000'), s) - // Circumvent internal balance - await linkToken - .connect(subOwner) - .transfer(vrfCoordinatorV2.address, BigNumber.from('1000')) - // Should recover this 1000 - await expect(vrfCoordinatorV2.connect(owner).recoverFunds(randomAddress)) - .to.emit(vrfCoordinatorV2, 'FundsRecovered') - .withArgs(randomAddress, BigNumber.from('1000')) - assert(BigNumber.from('1000'), linkToken.balanceOf(randomAddress)) - }) - }) - - it('subscription lifecycle', async function () { - // Create subscription. - const tx = await vrfCoordinatorV2.connect(subOwner).createSubscription() - const receipt = await tx.wait() - assert(receipt.events[0].event == 'SubscriptionCreated') - assert(receipt.events[0].args['owner'] == subOwnerAddress, 'sub owner') - const subId = receipt.events[0].args['subId'] - await vrfCoordinatorV2 - .connect(subOwner) - .addConsumer(subId, await consumer.getAddress()) - - // Fund the subscription - await expect( - linkToken - .connect(subOwner) - .transferAndCall( - vrfCoordinatorV2.address, - BigNumber.from('1000000000000000000'), - ethers.utils.defaultAbiCoder.encode(['uint64'], [subId]), - ), - ) - .to.emit(vrfCoordinatorV2, 'SubscriptionFunded') - .withArgs(subId, BigNumber.from(0), BigNumber.from('1000000000000000000')) - - // Non-owners cannot change the consumers - await expect( - vrfCoordinatorV2.connect(random).addConsumer(subId, randomAddress), - ) - .to.be.revertedWithCustomError(vrfCoordinatorV2, `MustBeSubOwner`) - .withArgs(subOwnerAddress) - await expect( - vrfCoordinatorV2.connect(random).removeConsumer(subId, randomAddress), - ) - .to.be.revertedWithCustomError(vrfCoordinatorV2, `MustBeSubOwner`) - .withArgs(subOwnerAddress) - - // Non-owners cannot ask to transfer ownership - await expect( - vrfCoordinatorV2 - .connect(random) - .requestSubscriptionOwnerTransfer(subId, randomAddress), - ) - .to.be.revertedWithCustomError(vrfCoordinatorV2, `MustBeSubOwner`) - .withArgs(subOwnerAddress) - - // Owners can request ownership transfership - await expect( - vrfCoordinatorV2 - .connect(subOwner) - .requestSubscriptionOwnerTransfer(subId, randomAddress), - ) - .to.emit(vrfCoordinatorV2, 'SubscriptionOwnerTransferRequested') - .withArgs(subId, subOwnerAddress, randomAddress) - - // Non-requested owners cannot accept - await expect( - vrfCoordinatorV2.connect(subOwner).acceptSubscriptionOwnerTransfer(subId), - ) - .to.be.revertedWithCustomError(vrfCoordinatorV2, `MustBeRequestedOwner`) - .withArgs(randomAddress) - - // Requested owners can accept - await expect( - vrfCoordinatorV2.connect(random).acceptSubscriptionOwnerTransfer(subId), - ) - .to.emit(vrfCoordinatorV2, 'SubscriptionOwnerTransferred') - .withArgs(subId, subOwnerAddress, randomAddress) - - // Transfer it back to subOwner - vrfCoordinatorV2 - .connect(random) - .requestSubscriptionOwnerTransfer(subId, subOwnerAddress) - vrfCoordinatorV2.connect(subOwner).acceptSubscriptionOwnerTransfer(subId) - - // Non-owners cannot cancel - await expect( - vrfCoordinatorV2.connect(random).cancelSubscription(subId, randomAddress), - ) - .to.be.revertedWithCustomError(vrfCoordinatorV2, `MustBeSubOwner`) - .withArgs(subOwnerAddress) - - await expect( - vrfCoordinatorV2 - .connect(subOwner) - .cancelSubscription(subId, randomAddress), - ) - .to.emit(vrfCoordinatorV2, 'SubscriptionCanceled') - .withArgs(subId, randomAddress, BigNumber.from('1000000000000000000')) - const random2Balance = await linkToken.balanceOf(randomAddress) - assert.equal(random2Balance.toString(), '2000000000000000000') - }) - - describe('#requestRandomWords', async function () { - let subId: number - let kh: string - beforeEach(async () => { - subId = await createSubscription() - const testKey = [BigNumber.from('1'), BigNumber.from('2')] - kh = await vrfCoordinatorV2.hashOfKey(testKey) - }) - it('invalid subId', async function () { - await expect( - vrfCoordinatorV2.connect(random).requestRandomWords( - kh, // keyhash - 12301928312, // subId - 1, // minReqConf - 1000, // callbackGasLimit - 1, // numWords - ), - ).to.be.revertedWithCustomError(vrfCoordinatorV2, `InvalidSubscription`) - }) - it('invalid consumer', async function () { - await expect( - vrfCoordinatorV2.connect(random).requestRandomWords( - kh, // keyhash - subId, // subId - 1, // minReqConf - 1000, // callbackGasLimit - 1, // numWords - ), - ) - .to.be.revertedWithCustomError(vrfCoordinatorV2, `InvalidConsumer`) - .withArgs(subId, randomAddress) - }) - it('invalid req confs', async function () { - await expect( - vrfCoordinatorV2.connect(consumer).requestRandomWords( - kh, // keyhash - subId, // subId - 0, // minReqConf - 1000, // callbackGasLimit - 1, // numWords - ), - ) - .to.be.revertedWithCustomError( - vrfCoordinatorV2, - `InvalidRequestConfirmations`, - ) - .withArgs(0, 1, 200) - }) - it('gas limit too high', async function () { - await linkToken.connect(subOwner).transferAndCall( - vrfCoordinatorV2.address, - BigNumber.from('1000000000000000000'), // 1 link > 0.1 min. - ethers.utils.defaultAbiCoder.encode(['uint64'], [subId]), - ) - await expect( - vrfCoordinatorV2.connect(consumer).requestRandomWords( - kh, // keyhash - subId, // subId - 1, // minReqConf - 1000001, // callbackGasLimit - 1, // numWords - ), - ) - .to.be.revertedWithCustomError(vrfCoordinatorV2, `GasLimitTooBig`) - .withArgs(1000001, 1000000) - }) - - it('nonce increments', async function () { - await linkToken.connect(subOwner).transferAndCall( - vrfCoordinatorV2.address, - BigNumber.from('1000000000000000000'), // 1 link > 0.1 min. - ethers.utils.defaultAbiCoder.encode(['uint64'], [subId]), - ) - const r1 = await vrfCoordinatorV2.connect(consumer).requestRandomWords( - kh, // keyhash - subId, // subId - 1, // minReqConf - 1000000, // callbackGasLimit - 1, // numWords - ) - const r1Receipt = await r1.wait() - const seed1 = r1Receipt.events[0].args['requestId'] - const r2 = await vrfCoordinatorV2.connect(consumer).requestRandomWords( - kh, // keyhash - subId, // subId - 1, // minReqConf - 1000000, // callbackGasLimit - 1, // numWords - ) - const r2Receipt = await r2.wait() - const seed2 = r2Receipt.events[0].args['requestId'] - assert(seed2 != seed1) - }) - - it('emits correct log', async function () { - await linkToken.connect(subOwner).transferAndCall( - vrfCoordinatorV2.address, - BigNumber.from('1000000000000000000'), // 1 link > 0.1 min. - ethers.utils.defaultAbiCoder.encode(['uint64'], [subId]), - ) - const reqTx = await vrfCoordinatorV2.connect(consumer).requestRandomWords( - kh, // keyhash - subId, // subId - 1, // minReqConf - 1000, // callbackGasLimit - 1, // numWords - ) - const reqReceipt = await reqTx.wait() - assert(reqReceipt.events.length == 1) - const reqEvent = reqReceipt.events[0] - assert(reqEvent.event == 'RandomWordsRequested', 'wrong event name') - assert( - reqEvent.args['keyHash'] == kh, - `wrong kh ${reqEvent.args['keyHash']} ${kh}`, - ) - assert( - reqEvent.args['subId'].toString() == subId.toString(), - 'wrong subId', - ) - assert( - reqEvent.args['minimumRequestConfirmations'].toString() == - BigNumber.from(1).toString(), - 'wrong minRequestConf', - ) - assert( - reqEvent.args['callbackGasLimit'] == 1000, - 'wrong callbackGasLimit', - ) - assert(reqEvent.args['numWords'] == 1, 'wrong numWords') - assert( - reqEvent.args['sender'] == (await consumer.getAddress()), - 'wrong sender address', - ) - }) - it('add/remove consumer invariant', async function () { - await linkToken.connect(subOwner).transferAndCall( - vrfCoordinatorV2.address, - BigNumber.from('1000000000000000000'), // 1 link > 0.1 min. - ethers.utils.defaultAbiCoder.encode(['uint64'], [subId]), - ) - await vrfCoordinatorV2.connect(subOwner).addConsumer(subId, randomAddress) - await vrfCoordinatorV2 - .connect(subOwner) - .removeConsumer(subId, randomAddress) - await expect( - vrfCoordinatorV2.connect(random).requestRandomWords( - kh, // keyhash - subId, // subId - 1, // minReqConf - 1000, // callbackGasLimit - 1, // numWords - ), - ) - .to.be.revertedWithCustomError(vrfCoordinatorV2, `InvalidConsumer`) - .withArgs(subId, randomAddress) - }) - it('cancel/add subscription invariant', async function () { - await linkToken.connect(subOwner).transferAndCall( - vrfCoordinatorV2.address, - BigNumber.from('1000000000000000000'), // 1 link > 0.1 min. - ethers.utils.defaultAbiCoder.encode(['uint64'], [subId]), - ) - await vrfCoordinatorV2 - .connect(subOwner) - .cancelSubscription(subId, randomAddress) - subId = await createSubscriptionWithConsumers([]) - // Should not succeed because consumer was previously registered - // i.e. cancel should be cleaning up correctly. - await expect( - vrfCoordinatorV2.connect(random).requestRandomWords( - kh, // keyhash - subId, // subId - 1, // minReqConf - 1000, // callbackGasLimit - 1, // numWords - ), - ) - .to.be.revertedWithCustomError(vrfCoordinatorV2, `InvalidConsumer`) - .withArgs(subId, randomAddress) - }) - }) - - describe('#oracleWithdraw', async function () { - it('cannot withdraw with no balance', async function () { - await expect( - vrfCoordinatorV2 - .connect(oracle) - .oracleWithdraw(randomAddressString(), BigNumber.from('100')), - ).to.be.revertedWithCustomError(vrfCoordinatorV2, `InsufficientBalance`) - }) - }) - - describe('#calculatePaymentAmount [ @skip-coverage ]', async function () { - it('output within sensible range', async function () { - // By default, hardhat sends txes with the block limit as their gas limit. - await vrfCoordinatorV2TestHelper - .connect(oracle) - .calculatePaymentAmountTest( - BigNumber.from('0'), // Gas after payment - 0, // Fee PPM - BigNumber.from('1000000000'), // Wei per unit gas (gas price) - ) - const paymentAmount = await vrfCoordinatorV2TestHelper.getPaymentAmount() - // The gas price is 1gwei and the eth/link price is set to 300000000 wei per unit link. - // paymentAmount = 1e18*weiPerUnitGas*(gasAfterPaymentCalculation + startGas - gasleft()) / uint256(weiPerUnitLink); - // So we expect x to be in the range (few thousand gas for the call) - // 1e18*1e9*(1000 gas)/30000000 < x < 1e18*1e9*(5000 gas)/30000000 - // 3.333333333E22 < x < 1.666666667E23 - //const gss = await vrfCoordinatorV2TestHelper.getGasStart(); - assert( - paymentAmount.gt(BigNumber.from('33333333330000000000000')), - 'payment too small', - ) - assert( - paymentAmount.lt(BigNumber.from('166666666600000000000000')), - 'payment too large', - ) - }) - it('payment too large', async function () { - // Set this gas price to be astronomical 1ETH/gas - // That means the payment will be (even for 1gas) - // 1e18*1e18/30000000 - // 3.333333333E28 > 1e27 (all link in existence) - await expect( - vrfCoordinatorV2TestHelper.connect(oracle).calculatePaymentAmountTest( - BigNumber.from('0'), // Gas after payment - 0, // Fee PPM - BigNumber.from('1000000000000000000'), - ), - ).to.be.revertedWithCustomError(vrfCoordinatorV2, `PaymentTooLarge`) - }) - - it('non-positive link wei price should revert', async function () { - const mockAggregatorV3Factory = await ethers.getContractFactory( - 'src/v0.8/tests/MockV3Aggregator.sol:MockV3Aggregator', - owner, - ) - const vrfCoordinatorV2TestHelperFactory = await ethers.getContractFactory( - 'VRFCoordinatorV2TestHelper', - owner, - ) - const mockLinkEthZero = await mockAggregatorV3Factory.deploy(0, 0) - const vrfCoordinatorV2TestHelperZero = - await vrfCoordinatorV2TestHelperFactory.deploy(mockLinkEthZero.address) - await expect( - vrfCoordinatorV2TestHelperZero - .connect(oracle) - .calculatePaymentAmountTest( - BigNumber.from('0'), // Gas after payment - 0, // Fee PPM - BigNumber.from('1000000000000000000'), - ), - ) - .to.be.revertedWithCustomError(vrfCoordinatorV2, `InvalidLinkWeiPrice`) - .withArgs(0) - const mockLinkEthNegative = await mockAggregatorV3Factory.deploy(0, -1) - const vrfCoordinatorV2TestHelperNegative = - await vrfCoordinatorV2TestHelperFactory.deploy( - mockLinkEthNegative.address, - ) - await expect( - vrfCoordinatorV2TestHelperNegative - .connect(owner) - .calculatePaymentAmountTest( - BigNumber.from('0'), // Gas after payment - 0, // Fee PPM - BigNumber.from('1000000000000000000'), - ), - ) - .to.be.revertedWithCustomError(vrfCoordinatorV2, `InvalidLinkWeiPrice`) - .withArgs(-1) - }) - }) - - describe('#keyRegistration', async function () { - it('register key emits log', async function () { - const testKey = [BigNumber.from('1'), BigNumber.from('2')] - const kh = await vrfCoordinatorV2.hashOfKey(testKey) - await expect( - vrfCoordinatorV2.registerProvingKey(subOwnerAddress, testKey), - ) - .to.emit(vrfCoordinatorV2, 'ProvingKeyRegistered') - .withArgs(kh, subOwnerAddress) - const reqConfig = await vrfCoordinatorV2.getRequestConfig() - assert(reqConfig[2].length == 1) // 1 keyhash registered - }) - it('cannot re-register key', async function () { - const testKey = [BigNumber.from('1'), BigNumber.from('2')] - const kh = await vrfCoordinatorV2.hashOfKey(testKey) - await vrfCoordinatorV2.registerProvingKey(subOwnerAddress, testKey) - await expect( - vrfCoordinatorV2.registerProvingKey(subOwnerAddress, testKey), - ) - .to.be.revertedWithCustomError( - vrfCoordinatorV2, - `ProvingKeyAlreadyRegistered`, - ) - .withArgs(kh) - }) - it('deregister key emits log', async function () { - const testKey = [BigNumber.from('1'), BigNumber.from('2')] - const kh = await vrfCoordinatorV2.hashOfKey(testKey) - await vrfCoordinatorV2.registerProvingKey(subOwnerAddress, testKey) - await expect(vrfCoordinatorV2.deregisterProvingKey(testKey)) - .to.emit(vrfCoordinatorV2, 'ProvingKeyDeregistered') - .withArgs(kh, subOwnerAddress) - const reqConfig = await vrfCoordinatorV2.getRequestConfig() - assert(reqConfig[2].length == 0) // 0 keyhash registered - }) - it('cannot deregister unregistered key', async function () { - const testKey = [BigNumber.from('1'), BigNumber.from('2')] - const kh = await vrfCoordinatorV2.hashOfKey(testKey) - await expect(vrfCoordinatorV2.deregisterProvingKey(testKey)) - .to.be.revertedWithCustomError(vrfCoordinatorV2, `NoSuchProvingKey`) - .withArgs(kh) - }) - it('can register after deregister', async function () { - const testKey = [BigNumber.from('1'), BigNumber.from('2')] - await vrfCoordinatorV2.registerProvingKey(subOwnerAddress, testKey) - await vrfCoordinatorV2.deregisterProvingKey(testKey) - await vrfCoordinatorV2.registerProvingKey(randomAddress, testKey) - }) - }) - - describe('#fulfillRandomWords', async function () { - beforeEach(async () => { - const testKey = [BigNumber.from('1'), BigNumber.from('2')] - await vrfCoordinatorV2.registerProvingKey(subOwnerAddress, testKey) - }) - it('unregistered key should fail', async function () { - const proof = [ - [BigNumber.from('1'), BigNumber.from('3')], // pk NOT registered - [BigNumber.from('1'), BigNumber.from('2')], // gamma - BigNumber.from('1'), // c - BigNumber.from('1'), // s - BigNumber.from('1'), // seed - randomAddress, // uWitness - [BigNumber.from('1'), BigNumber.from('2')], // cGammaWitness - [BigNumber.from('1'), BigNumber.from('2')], // sHashWitness - BigNumber.from('1'), - ] // 13 words in proof - const rc = [ - 1, // blockNum - 2, // subId - 3, // callbackGasLimit - 4, // numWords - randomAddress, // sender - ] - await expect( - vrfCoordinatorV2.connect(oracle).fulfillRandomWords(proof, rc), - ) - .to.be.revertedWithCustomError(vrfCoordinatorV2, `NoSuchProvingKey`) - .withArgs( - '0xa15bc60c955c405d20d9149c709e2460f1c2d9a497496a7f46004d1772c3054c', - ) - }) - it('no corresponding request', async function () { - const proof = [ - [BigNumber.from('1'), BigNumber.from('2')], // pk - [BigNumber.from('1'), BigNumber.from('2')], // gamma - BigNumber.from('1'), // c - BigNumber.from('1'), // s - BigNumber.from('1'), // seed - randomAddress, // uWitness - [BigNumber.from('1'), BigNumber.from('2')], // cGammaWitness - [BigNumber.from('1'), BigNumber.from('2')], // sHashWitness - BigNumber.from('1'), - ] // 13 words in proof - const rc = [ - 1, // blockNum - 2, // subId - 3, // callbackGasLimit - 4, // numWords - randomAddress, // sender - ] - await expect( - vrfCoordinatorV2.connect(oracle).fulfillRandomWords(proof, rc), - ).to.be.revertedWithCustomError( - vrfCoordinatorV2, - `NoCorrespondingRequest`, - ) - }) - it('incorrect commitment wrong blocknum', async function () { - const subId = await createSubscription() - await linkToken.connect(subOwner).transferAndCall( - vrfCoordinatorV2.address, - BigNumber.from('1000000000000000000'), // 1 link > 0.1 min. - ethers.utils.defaultAbiCoder.encode(['uint64'], [subId]), - ) - const testKey = [BigNumber.from('1'), BigNumber.from('2')] - const kh = await vrfCoordinatorV2.hashOfKey(testKey) - const tx = await vrfCoordinatorV2.connect(consumer).requestRandomWords( - kh, // keyhash - subId, // subId - 1, // minReqConf - 1000, // callbackGasLimit - 1, // numWords - ) - const reqReceipt = await tx.wait() - // We give it the right proof length and a valid preSeed - // but an invalid commitment - const preSeed = reqReceipt.events[0].args['preSeed'] - const proof = [ - [BigNumber.from('1'), BigNumber.from('2')], - [BigNumber.from('1'), BigNumber.from('2')], - BigNumber.from('1'), - BigNumber.from('1'), - preSeed, - randomAddress, - [BigNumber.from('1'), BigNumber.from('2')], - [BigNumber.from('1'), BigNumber.from('2')], - BigNumber.from('1'), - ] - const rc = [ - reqReceipt.blockNumber + 1, // Wrong blocknumber - subId, - 1000, - 1, - await consumer.getAddress(), - ] - await expect( - vrfCoordinatorV2.connect(oracle).fulfillRandomWords(proof, rc), - ).to.be.revertedWithCustomError(vrfCoordinatorV2, `IncorrectCommitment`) - }) - }) - - describe('#getFeeTier', async function () { - beforeEach(async () => { - await expect( - vrfCoordinatorV2 - .connect(owner) - .setConfig( - c.minimumRequestBlockConfirmations, - c.maxGasLimit, - c.stalenessSeconds, - c.gasAfterPaymentCalculation, - c.weiPerUnitLink, - [10000, 1000, 100, 10, 1, 10, 20, 30, 40], - ), - ) - }) - it('tier1', async function () { - assert((await vrfCoordinatorV2.connect(random).getFeeTier(0)) == 10000) - assert((await vrfCoordinatorV2.connect(random).getFeeTier(5)) == 10000) - assert((await vrfCoordinatorV2.connect(random).getFeeTier(10)) == 10000) - }) - it('tier2', async function () { - assert((await vrfCoordinatorV2.connect(random).getFeeTier(11)) == 1000) - assert((await vrfCoordinatorV2.connect(random).getFeeTier(12)) == 1000) - assert((await vrfCoordinatorV2.connect(random).getFeeTier(20)) == 1000) - }) - it('tier3', async function () { - assert((await vrfCoordinatorV2.connect(random).getFeeTier(21)) == 100) - assert((await vrfCoordinatorV2.connect(random).getFeeTier(30)) == 100) - }) - it('tier4', async function () { - assert((await vrfCoordinatorV2.connect(random).getFeeTier(31)) == 10) - assert((await vrfCoordinatorV2.connect(random).getFeeTier(40)) == 10) - }) - it('tier5', async function () { - assert((await vrfCoordinatorV2.connect(random).getFeeTier(41)) == 1) - assert((await vrfCoordinatorV2.connect(random).getFeeTier(123102)) == 1) - }) - }) - - /* - Note that all the fulfillment happy path testing is done in Go, to make use of the existing go code to produce - proofs offchain. - */ -}) diff --git a/contracts/test/v0.8/vrf/VRFCoordinatorV2Mock.test.ts b/contracts/test/v0.8/vrf/VRFCoordinatorV2Mock.test.ts deleted file mode 100644 index 5bcb2cd5fa0..00000000000 --- a/contracts/test/v0.8/vrf/VRFCoordinatorV2Mock.test.ts +++ /dev/null @@ -1,349 +0,0 @@ -import { assert, expect } from 'chai' -import { BigNumber, Contract, Signer } from 'ethers' -import { ethers } from 'hardhat' - -describe('VRFCoordinatorV2Mock', () => { - let vrfCoordinatorV2Mock: Contract - let vrfConsumerV2: Contract - let linkToken: Contract - let subOwner: Signer - let random: Signer - let subOwnerAddress: string - let pointOneLink = BigNumber.from('100000000000000000') - let oneLink = BigNumber.from('1000000000000000000') - let keyhash = - '0xe90b7bceb6e7df5418fb78d8ee546e97c83a08bbccc01a0644d599ccd2a7c2e0' - let testConsumerAddress = '0x1111000000000000000000000000000000001111' - let testConsumerAddress2 = '0x1111000000000000000000000000000000001110' - - beforeEach(async () => { - const accounts = await ethers.getSigners() - subOwner = accounts[1] - subOwnerAddress = await subOwner.getAddress() - random = accounts[2] - - const vrfCoordinatorV2MockFactory = await ethers.getContractFactory( - 'src/v0.8/vrf/mocks/VRFCoordinatorV2Mock.sol:VRFCoordinatorV2Mock', - accounts[0], - ) - vrfCoordinatorV2Mock = await vrfCoordinatorV2MockFactory.deploy( - pointOneLink, - 1e9, // 0.000000001 LINK per gas - ) - - const ltFactory = await ethers.getContractFactory( - 'src/v0.8/shared/test/helpers/LinkTokenTestHelper.sol:LinkTokenTestHelper', - accounts[0], - ) - linkToken = await ltFactory.deploy() - - const vrfConsumerV2Factory = await ethers.getContractFactory( - 'src/v0.8/vrf/testhelpers/VRFConsumerV2.sol:VRFConsumerV2', - accounts[0], - ) - vrfConsumerV2 = await vrfConsumerV2Factory.deploy( - vrfCoordinatorV2Mock.address, - linkToken.address, - ) - }) - - async function createSubscription(): Promise { - const tx = await vrfCoordinatorV2Mock.connect(subOwner).createSubscription() - const receipt = await tx.wait() - return receipt.events[0].args['subId'] - } - - describe('#createSubscription', async function () { - it('can create a subscription', async function () { - await expect(vrfCoordinatorV2Mock.connect(subOwner).createSubscription()) - .to.emit(vrfCoordinatorV2Mock, 'SubscriptionCreated') - .withArgs(1, subOwnerAddress) - const s = await vrfCoordinatorV2Mock.getSubscription(1) - assert(s.balance.toString() == '0', 'invalid balance') - assert(s.owner == subOwnerAddress, 'invalid address') - }) - it('subscription id increments', async function () { - await expect(vrfCoordinatorV2Mock.connect(subOwner).createSubscription()) - .to.emit(vrfCoordinatorV2Mock, 'SubscriptionCreated') - .withArgs(1, subOwnerAddress) - await expect(vrfCoordinatorV2Mock.connect(subOwner).createSubscription()) - .to.emit(vrfCoordinatorV2Mock, 'SubscriptionCreated') - .withArgs(2, subOwnerAddress) - }) - }) - describe('#addConsumer', async function () { - it('can add a consumer to a subscription', async function () { - let subId = await createSubscription() - await expect( - vrfCoordinatorV2Mock - .connect(subOwner) - .addConsumer(subId, testConsumerAddress), - ) - .to.emit(vrfCoordinatorV2Mock, 'ConsumerAdded') - .withArgs(subId, testConsumerAddress) - let sub = await vrfCoordinatorV2Mock - .connect(subOwner) - .getSubscription(subId) - expect(sub.consumers).to.eql([testConsumerAddress]) - }) - it('cannot add a consumer to a nonexistent subscription', async function () { - await expect( - vrfCoordinatorV2Mock - .connect(subOwner) - .addConsumer(4, testConsumerAddress), - ).to.be.revertedWithCustomError( - vrfCoordinatorV2Mock, - 'InvalidSubscription', - ) - }) - it('cannot add more than the consumer maximum', async function () { - let subId = await createSubscription() - for (let i = 0; i < 100; i++) { - const testIncrementingAddress = BigNumber.from(i) - .add('0x1000000000000000000000000000000000000000') - .toHexString() - await expect( - vrfCoordinatorV2Mock - .connect(subOwner) - .addConsumer(subId, testIncrementingAddress), - ).to.emit(vrfCoordinatorV2Mock, 'ConsumerAdded') - } - await expect( - vrfCoordinatorV2Mock - .connect(subOwner) - .addConsumer(subId, testConsumerAddress), - ).to.be.revertedWithCustomError(vrfCoordinatorV2Mock, 'TooManyConsumers') - }) - }) - describe('#removeConsumer', async function () { - it('can remove a consumer from a subscription', async function () { - let subId = await createSubscription() - for (const addr of [testConsumerAddress, testConsumerAddress2]) { - await expect( - vrfCoordinatorV2Mock.connect(subOwner).addConsumer(subId, addr), - ).to.emit(vrfCoordinatorV2Mock, 'ConsumerAdded') - } - - let sub = await vrfCoordinatorV2Mock - .connect(subOwner) - .getSubscription(subId) - expect(sub.consumers).to.eql([testConsumerAddress, testConsumerAddress2]) - - await expect( - vrfCoordinatorV2Mock - .connect(subOwner) - .removeConsumer(subId, testConsumerAddress), - ) - .to.emit(vrfCoordinatorV2Mock, 'ConsumerRemoved') - .withArgs(subId, testConsumerAddress) - - sub = await vrfCoordinatorV2Mock.connect(subOwner).getSubscription(subId) - expect(sub.consumers).to.eql([testConsumerAddress2]) - }) - it('cannot remove a consumer from a nonexistent subscription', async function () { - await expect( - vrfCoordinatorV2Mock - .connect(subOwner) - .removeConsumer(4, testConsumerAddress), - ).to.be.revertedWithCustomError( - vrfCoordinatorV2Mock, - 'InvalidSubscription', - ) - }) - it('cannot remove a consumer after it is already removed', async function () { - let subId = await createSubscription() - - await expect( - vrfCoordinatorV2Mock - .connect(subOwner) - .addConsumer(subId, testConsumerAddress), - ).to.emit(vrfCoordinatorV2Mock, 'ConsumerAdded') - - await expect( - vrfCoordinatorV2Mock - .connect(subOwner) - .removeConsumer(subId, testConsumerAddress), - ).to.emit(vrfCoordinatorV2Mock, 'ConsumerRemoved') - - await expect( - vrfCoordinatorV2Mock - .connect(subOwner) - .removeConsumer(subId, testConsumerAddress), - ).to.be.revertedWithCustomError(vrfCoordinatorV2Mock, 'InvalidConsumer') - }) - }) - describe('#fundSubscription', async function () { - it('can fund a subscription', async function () { - let subId = await createSubscription() - await expect( - vrfCoordinatorV2Mock.connect(subOwner).fundSubscription(subId, oneLink), - ) - .to.emit(vrfCoordinatorV2Mock, 'SubscriptionFunded') - .withArgs(subId, 0, oneLink) - let sub = await vrfCoordinatorV2Mock - .connect(subOwner) - .getSubscription(subId) - expect(sub.balance).to.equal(oneLink) - }) - it('cannot fund a nonexistent subscription', async function () { - await expect( - vrfCoordinatorV2Mock.connect(subOwner).fundSubscription(4, oneLink), - ).to.be.revertedWithCustomError( - vrfCoordinatorV2Mock, - 'InvalidSubscription', - ) - }) - }) - describe('#cancelSubscription', async function () { - it('can cancel a subscription', async function () { - let subId = await createSubscription() - await expect( - vrfCoordinatorV2Mock.connect(subOwner).getSubscription(subId), - ).to.not.be.reverted - - await expect( - vrfCoordinatorV2Mock - .connect(subOwner) - .cancelSubscription(subId, subOwner.getAddress()), - ).to.emit(vrfCoordinatorV2Mock, 'SubscriptionCanceled') - - await expect( - vrfCoordinatorV2Mock.connect(subOwner).getSubscription(subId), - ).to.be.revertedWithCustomError( - vrfCoordinatorV2Mock, - 'InvalidSubscription', - ) - }) - }) - describe('#fulfillRandomWords', async function () { - it('fails to fulfill without being a valid consumer', async function () { - let subId = await createSubscription() - - await expect( - vrfCoordinatorV2Mock - .connect(subOwner) - .requestRandomWords(keyhash, subId, 3, 500_000, 2), - ).to.be.revertedWithCustomError(vrfCoordinatorV2Mock, 'InvalidConsumer') - }) - it('fails to fulfill with insufficient funds', async function () { - let subId = await createSubscription() - await vrfCoordinatorV2Mock - .connect(subOwner) - .addConsumer(subId, await subOwner.getAddress()) - - await expect( - vrfCoordinatorV2Mock - .connect(subOwner) - .requestRandomWords(keyhash, subId, 3, 500_000, 2), - ) - .to.emit(vrfCoordinatorV2Mock, 'RandomWordsRequested') - .withArgs(keyhash, 1, 100, subId, 3, 500_000, 2, subOwnerAddress) - - await expect( - vrfCoordinatorV2Mock - .connect(random) - .fulfillRandomWords(1, vrfConsumerV2.address), - ).to.be.revertedWithCustomError( - vrfCoordinatorV2Mock, - 'InsufficientBalance', - ) - }) - it('can request and fulfill [ @skip-coverage ]', async function () { - let subId = await createSubscription() - await vrfCoordinatorV2Mock - .connect(subOwner) - .addConsumer(subId, vrfConsumerV2.address) - await expect( - vrfCoordinatorV2Mock.connect(subOwner).fundSubscription(subId, oneLink), - ).to.not.be.reverted - - // Call requestRandomWords from the consumer contract so that the requestId - // member variable on the consumer is appropriately set. - expect( - await vrfConsumerV2 - .connect(subOwner) - .requestRandomness(keyhash, subId, 3, 500_000, 2), - ) - .to.emit(vrfCoordinatorV2Mock, 'RandomWordsRequested') - .withArgs(keyhash, 1, 100, subId, 3, 500_000, 2, vrfConsumerV2.address) - - let tx = await vrfCoordinatorV2Mock - .connect(random) - .fulfillRandomWords(1, vrfConsumerV2.address) - let receipt = await tx.wait() - expect(receipt.events[0].event).to.equal('RandomWordsFulfilled') - expect(receipt.events[0].args['requestId']).to.equal(1) - expect(receipt.events[0].args['outputSeed']).to.equal(1) - expect(receipt.events[0].args['success']).to.equal(true) - assert( - receipt.events[0].args['payment'] - .sub(BigNumber.from('100119403000000000')) - .lt(BigNumber.from('10000000000')), - ) - - // Check that balance was subtracted - let sub = await vrfCoordinatorV2Mock - .connect(random) - .getSubscription(subId) - expect(sub.balance).to.equal( - oneLink.sub(receipt.events[0].args['payment']), - ) - }) - it('Correctly allows for user override of fulfillRandomWords [ @skip-coverage ]', async function () { - let subId = await createSubscription() - await vrfCoordinatorV2Mock - .connect(subOwner) - .addConsumer(subId, vrfConsumerV2.address) - await expect( - vrfCoordinatorV2Mock.connect(subOwner).fundSubscription(subId, oneLink), - ).to.not.be.reverted - - // Call requestRandomWords from the consumer contract so that the requestId - // member variable on the consumer is appropriately set. - expect( - await vrfConsumerV2 - .connect(subOwner) - .requestRandomness(keyhash, subId, 3, 500_000, 2), - ) - .to.emit(vrfCoordinatorV2Mock, 'RandomWordsRequested') - .withArgs(keyhash, 1, 100, subId, 3, 500_000, 2, vrfConsumerV2.address) - - // Call override with incorrect word count. - await expect( - vrfCoordinatorV2Mock - .connect(random) - .fulfillRandomWordsWithOverride( - 1, - vrfConsumerV2.address, - [1, 2, 3, 4, 5], - ), - ).to.be.revertedWithCustomError( - vrfCoordinatorV2Mock, - 'InvalidRandomWords', - ) - - // Call override correctly. - let tx = await vrfCoordinatorV2Mock - .connect(random) - .fulfillRandomWordsWithOverride(1, vrfConsumerV2.address, [2533, 1768]) - let receipt = await tx.wait() - expect(receipt.events[0].event).to.equal('RandomWordsFulfilled') - expect(receipt.events[0].args['requestId']).to.equal(1) - expect(receipt.events[0].args['outputSeed']).to.equal(1) - expect(receipt.events[0].args['success']).to.equal(true) - assert( - receipt.events[0].args['payment'] - .sub(BigNumber.from('100120516000000000')) - .lt(BigNumber.from('10000000000')), - ) - - // Check that balance was subtracted - let sub = await vrfCoordinatorV2Mock - .connect(random) - .getSubscription(subId) - expect(sub.balance).to.equal( - oneLink.sub(receipt.events[0].args['payment']), - ) - }) - }) -}) diff --git a/contracts/test/v0.8/vrf/VRFSubscriptionBalanceMonitor.test.ts b/contracts/test/v0.8/vrf/VRFSubscriptionBalanceMonitor.test.ts deleted file mode 100644 index ea5cdb5f395..00000000000 --- a/contracts/test/v0.8/vrf/VRFSubscriptionBalanceMonitor.test.ts +++ /dev/null @@ -1,638 +0,0 @@ -import { ethers } from 'hardhat' -import { assert, expect } from 'chai' -import type { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' -import { - LinkToken, - VRFSubscriptionBalanceMonitorExposed, -} from '../../../typechain' -import * as h from '../../test-helpers/helpers' -import { BigNumber, Contract } from 'ethers' - -const OWNABLE_ERR = 'Only callable by owner' -const INVALID_WATCHLIST_ERR = `InvalidWatchList` -const PAUSED_ERR = 'Pausable: paused' -const ONLY_KEEPER_ERR = `OnlyKeeperRegistry` - -const zeroLINK = ethers.utils.parseEther('0') -const oneLINK = ethers.utils.parseEther('1') -const twoLINK = ethers.utils.parseEther('2') -const threeLINK = ethers.utils.parseEther('3') -const fiveLINK = ethers.utils.parseEther('5') -const sixLINK = ethers.utils.parseEther('6') -const tenLINK = ethers.utils.parseEther('10') -const oneHundredLINK = ethers.utils.parseEther('100') - -let lt: LinkToken -let coordinator: Contract -let bm: VRFSubscriptionBalanceMonitorExposed -let owner: SignerWithAddress -let stranger: SignerWithAddress -let keeperRegistry: SignerWithAddress - -const sub1 = BigNumber.from(1) -const sub2 = BigNumber.from(2) -const sub3 = BigNumber.from(3) -const sub4 = BigNumber.from(4) -const sub5 = BigNumber.from(5) -const sub6 = BigNumber.from(6) - -const toNums = (bigNums: BigNumber[]) => bigNums.map((n) => n.toNumber()) - -async function assertWatchlistBalances( - balance1: BigNumber, - balance2: BigNumber, - balance3: BigNumber, - balance4: BigNumber, - balance5: BigNumber, - balance6: BigNumber, -) { - await h.assertSubscriptionBalance(coordinator, sub1, balance1, 'sub 1') - await h.assertSubscriptionBalance(coordinator, sub2, balance2, 'sub 2') - await h.assertSubscriptionBalance(coordinator, sub3, balance3, 'sub 3') - await h.assertSubscriptionBalance(coordinator, sub4, balance4, 'sub 4') - await h.assertSubscriptionBalance(coordinator, sub5, balance5, 'sub 5') - await h.assertSubscriptionBalance(coordinator, sub6, balance6, 'sub 6') -} - -describe('VRFSubscriptionBalanceMonitor', () => { - beforeEach(async () => { - const accounts = await ethers.getSigners() - owner = accounts[0] - stranger = accounts[1] - keeperRegistry = accounts[2] - - const bmFactory = await ethers.getContractFactory( - 'VRFSubscriptionBalanceMonitorExposed', - owner, - ) - const ltFactory = await ethers.getContractFactory( - 'src/v0.8/shared/test/helpers/LinkTokenTestHelper.sol:LinkTokenTestHelper', - owner, - ) - - const coordinatorFactory = await ethers.getContractFactory( - 'src/v0.8/vrf/VRFCoordinatorV2.sol:VRFCoordinatorV2', - owner, - ) - - lt = await ltFactory.deploy() - coordinator = await coordinatorFactory.deploy( - lt.address, - lt.address, - lt.address, - ) // we don't use BHS or LinkEthFeed - bm = await bmFactory.deploy( - lt.address, - coordinator.address, - keeperRegistry.address, - 0, - ) - - for (let i = 0; i <= 5; i++) { - await coordinator.connect(owner).createSubscription() - } - - // Transfer LINK to stranger. - await lt.transfer(stranger.address, oneHundredLINK) - - // Fund sub 5. - await lt - .connect(owner) - .transferAndCall( - coordinator.address, - oneHundredLINK, - ethers.utils.defaultAbiCoder.encode(['uint256'], ['5']), - ) - - // Fun sub 6. - await lt - .connect(owner) - .transferAndCall( - coordinator.address, - oneHundredLINK, - ethers.utils.defaultAbiCoder.encode(['uint256'], ['6']), - ) - - await Promise.all([bm.deployed(), coordinator.deployed(), lt.deployed()]) - }) - - afterEach(async () => { - await h.reset() - }) - - describe('add funds', () => { - it('Should allow anyone to add funds', async () => { - await lt.transfer(bm.address, oneLINK) - await lt.connect(stranger).transfer(bm.address, oneLINK) - }) - }) - - describe('withdraw()', () => { - beforeEach(async () => { - const tx = await lt.connect(owner).transfer(bm.address, oneLINK) - await tx.wait() - }) - - it('Should allow the owner to withdraw', async () => { - const beforeBalance = await lt.balanceOf(owner.address) - const tx = await bm.connect(owner).withdraw(oneLINK, owner.address) - await tx.wait() - const afterBalance = await lt.balanceOf(owner.address) - assert.isTrue( - afterBalance.gt(beforeBalance), - 'balance did not increase after withdraw', - ) - }) - - it('Should emit an event', async () => { - const tx = await bm.connect(owner).withdraw(oneLINK, owner.address) - await expect(tx) - .to.emit(bm, 'FundsWithdrawn') - .withArgs(oneLINK, owner.address) - }) - - it('Should allow the owner to withdraw to anyone', async () => { - const beforeBalance = await lt.balanceOf(stranger.address) - const tx = await bm.connect(owner).withdraw(oneLINK, stranger.address) - await tx.wait() - const afterBalance = await lt.balanceOf(stranger.address) - assert.isTrue( - beforeBalance.add(oneLINK).eq(afterBalance), - 'balance did not increase after withdraw', - ) - }) - - it('Should not allow strangers to withdraw', async () => { - const tx = bm.connect(stranger).withdraw(oneLINK, owner.address) - await expect(tx).to.be.revertedWith(OWNABLE_ERR) - }) - }) - - describe('pause() / unpause()', () => { - it('Should allow owner to pause / unpause', async () => { - const pauseTx = await bm.connect(owner).pause() - await pauseTx.wait() - const unpauseTx = await bm.connect(owner).unpause() - await unpauseTx.wait() - }) - - it('Should not allow strangers to pause / unpause', async () => { - const pauseTxStranger = bm.connect(stranger).pause() - await expect(pauseTxStranger).to.be.revertedWith(OWNABLE_ERR) - const pauseTxOwner = await bm.connect(owner).pause() - await pauseTxOwner.wait() - const unpauseTxStranger = bm.connect(stranger).unpause() - await expect(unpauseTxStranger).to.be.revertedWith(OWNABLE_ERR) - }) - }) - - describe('setWatchList() / getWatchList() / getAccountInfo()', () => { - it('Should allow owner to set the watchlist', async () => { - // should start unactive - assert.isFalse((await bm.getSubscriptionInfo(sub1)).isActive) - // add first watchlist - let setTx = await bm - .connect(owner) - .setWatchList([sub1], [oneLINK], [twoLINK]) - await setTx.wait() - let watchList = await bm.getWatchList() - assert.deepEqual(toNums(watchList), toNums([sub1])) - const subInfo = await bm.getSubscriptionInfo(1) - assert.isTrue(subInfo.isActive) - expect(subInfo.minBalanceJuels).to.equal(oneLINK) - expect(subInfo.topUpAmountJuels).to.equal(twoLINK) - // add more to watchlist - setTx = await bm - .connect(owner) - .setWatchList( - [1, 2, 3], - [oneLINK, twoLINK, threeLINK], - [twoLINK, threeLINK, fiveLINK], - ) - await setTx.wait() - watchList = await bm.getWatchList() - assert.deepEqual(toNums(watchList), toNums([sub1, sub2, sub3])) - let subInfo1 = await bm.getSubscriptionInfo(sub1) - let subInfo2 = await bm.getSubscriptionInfo(sub2) - let subInfo3 = await bm.getSubscriptionInfo(sub3) - expect(subInfo1.isActive).to.be.true - expect(subInfo1.minBalanceJuels).to.equal(oneLINK) - expect(subInfo1.topUpAmountJuels).to.equal(twoLINK) - expect(subInfo2.isActive).to.be.true - expect(subInfo2.minBalanceJuels).to.equal(twoLINK) - expect(subInfo2.topUpAmountJuels).to.equal(threeLINK) - expect(subInfo3.isActive).to.be.true - expect(subInfo3.minBalanceJuels).to.equal(threeLINK) - expect(subInfo3.topUpAmountJuels).to.equal(fiveLINK) - // remove some from watchlist - setTx = await bm - .connect(owner) - .setWatchList([sub3, sub1], [threeLINK, oneLINK], [fiveLINK, twoLINK]) - await setTx.wait() - watchList = await bm.getWatchList() - assert.deepEqual(toNums(watchList), toNums([sub3, sub1])) - subInfo1 = await bm.getSubscriptionInfo(sub1) - subInfo2 = await bm.getSubscriptionInfo(sub2) - subInfo3 = await bm.getSubscriptionInfo(sub3) - expect(subInfo1.isActive).to.be.true - expect(subInfo2.isActive).to.be.false - expect(subInfo3.isActive).to.be.true - }) - - it('Should not allow duplicates in the watchlist', async () => { - const errMsg = `DuplicateSubcriptionId` - const setTx = bm - .connect(owner) - .setWatchList( - [sub1, sub2, sub1], - [oneLINK, twoLINK, threeLINK], - [twoLINK, threeLINK, fiveLINK], - ) - await expect(setTx) - .to.be.revertedWithCustomError(bm, errMsg) - .withArgs(sub1) - }) - - it('Should not allow a topUpAmountJuels les than or equal to minBalance in the watchlist', async () => { - const setTx = bm - .connect(owner) - .setWatchList( - [sub1, sub2, sub1], - [oneLINK, twoLINK, threeLINK], - [zeroLINK, twoLINK, threeLINK], - ) - await expect(setTx).to.be.revertedWithCustomError( - bm, - INVALID_WATCHLIST_ERR, - ) - }) - - it('Should not allow strangers to set the watchlist', async () => { - const setTxStranger = bm - .connect(stranger) - .setWatchList([sub1], [oneLINK], [twoLINK]) - await expect(setTxStranger).to.be.revertedWith(OWNABLE_ERR) - }) - - it('Should revert if the list lengths differ', async () => { - let tx = bm.connect(owner).setWatchList([sub1], [], [twoLINK]) - await expect(tx).to.be.revertedWithCustomError(bm, INVALID_WATCHLIST_ERR) - tx = bm.connect(owner).setWatchList([sub1], [oneLINK], []) - await expect(tx).to.be.revertedWithCustomError(bm, INVALID_WATCHLIST_ERR) - tx = bm.connect(owner).setWatchList([], [oneLINK], [twoLINK]) - await expect(tx).to.be.revertedWithCustomError(bm, INVALID_WATCHLIST_ERR) - }) - - it('Should revert if any of the subIDs are zero', async () => { - let tx = bm - .connect(owner) - .setWatchList([sub1, 0], [oneLINK, oneLINK], [twoLINK, twoLINK]) - await expect(tx).to.be.revertedWithCustomError(bm, INVALID_WATCHLIST_ERR) - }) - - it('Should revert if any of the top up amounts are 0', async () => { - const tx = bm - .connect(owner) - .setWatchList([sub1, sub2], [oneLINK, oneLINK], [twoLINK, zeroLINK]) - await expect(tx).to.be.revertedWithCustomError(bm, INVALID_WATCHLIST_ERR) - }) - }) - - describe('getKeeperRegistryAddress() / setKeeperRegistryAddress()', () => { - const newAddress = ethers.Wallet.createRandom().address - - it('Should initialize with the registry address provided to the constructor', async () => { - const address = await bm.s_keeperRegistryAddress() - assert.equal(address, keeperRegistry.address) - }) - - it('Should allow the owner to set the registry address', async () => { - const setTx = await bm.connect(owner).setKeeperRegistryAddress(newAddress) - await setTx.wait() - const address = await bm.s_keeperRegistryAddress() - assert.equal(address, newAddress) - }) - - it('Should not allow strangers to set the registry address', async () => { - const setTx = bm.connect(stranger).setKeeperRegistryAddress(newAddress) - await expect(setTx).to.be.revertedWith(OWNABLE_ERR) - }) - - it('Should emit an event', async () => { - const setTx = await bm.connect(owner).setKeeperRegistryAddress(newAddress) - await expect(setTx) - .to.emit(bm, 'KeeperRegistryAddressUpdated') - .withArgs(keeperRegistry.address, newAddress) - }) - }) - - describe('getMinWaitPeriodSeconds / setMinWaitPeriodSeconds()', () => { - const newWaitPeriod = BigNumber.from(1) - - it('Should initialize with the wait period provided to the constructor', async () => { - const minWaitPeriod = await bm.s_minWaitPeriodSeconds() - expect(minWaitPeriod).to.equal(0) - }) - - it('Should allow owner to set the wait period', async () => { - const setTx = await bm - .connect(owner) - .setMinWaitPeriodSeconds(newWaitPeriod) - await setTx.wait() - const minWaitPeriod = await bm.s_minWaitPeriodSeconds() - expect(minWaitPeriod).to.equal(newWaitPeriod) - }) - - it('Should not allow strangers to set the wait period', async () => { - const setTx = bm.connect(stranger).setMinWaitPeriodSeconds(newWaitPeriod) - await expect(setTx).to.be.revertedWith(OWNABLE_ERR) - }) - - it('Should emit an event', async () => { - const setTx = await bm - .connect(owner) - .setMinWaitPeriodSeconds(newWaitPeriod) - await expect(setTx) - .to.emit(bm, 'MinWaitPeriodUpdated') - .withArgs(0, newWaitPeriod) - }) - }) - - describe('checkUpkeep() / getUnderfundedSubscriptions()', () => { - beforeEach(async () => { - const setTx = await bm.connect(owner).setWatchList( - [ - sub1, // needs funds - sub5, // funded - sub2, // needs funds - sub6, // funded - sub3, // needs funds - ], - new Array(5).fill(oneLINK), - new Array(5).fill(twoLINK), - ) - await setTx.wait() - }) - - it('Should return list of subscriptions that are underfunded', async () => { - const fundTx = await lt.connect(owner).transfer( - bm.address, - sixLINK, // needs 6 total - ) - await fundTx.wait() - const [should, payload] = await bm.checkUpkeep('0x') - assert.isTrue(should) - let [subs] = ethers.utils.defaultAbiCoder.decode(['uint64[]'], payload) - assert.deepEqual(toNums(subs), toNums([sub1, sub2, sub3])) - // checkUpkeep payload should match getUnderfundedSubscriptions() - subs = await bm.getUnderfundedSubscriptions() - assert.deepEqual(toNums(subs), toNums([sub1, sub2, sub3])) - }) - - it('Should return some results even if contract cannot fund all eligible targets', async () => { - const fundTx = await lt.connect(owner).transfer( - bm.address, - fiveLINK, // needs 6 total - ) - await fundTx.wait() - const [should, payload] = await bm.checkUpkeep('0x') - assert.isTrue(should) - const [subs] = ethers.utils.defaultAbiCoder.decode(['uint64[]'], payload) - assert.deepEqual(toNums(subs), toNums([sub1, sub2])) - }) - - it('Should omit subscriptions that have been funded recently', async () => { - const setWaitPdTx = await bm.setMinWaitPeriodSeconds(3600) // 1 hour - const fundTx = await lt.connect(owner).transfer(bm.address, sixLINK) - await Promise.all([setWaitPdTx.wait(), fundTx.wait()]) - const block = await ethers.provider.getBlock('latest') - const setTopUpTx = await bm.setLastTopUpXXXTestOnly( - sub2, - block.timestamp - 100, - ) - await setTopUpTx.wait() - const [should, payload] = await bm.checkUpkeep('0x') - assert.isTrue(should) - const [subs] = ethers.utils.defaultAbiCoder.decode(['uint64[]'], payload) - assert.deepEqual(toNums(subs), toNums([sub1, sub3])) - }) - - it('Should revert when paused', async () => { - const tx = await bm.connect(owner).pause() - await tx.wait() - const ethCall = bm.checkUpkeep('0x') - await expect(ethCall).to.be.revertedWith(PAUSED_ERR) - }) - }) - - describe('performUpkeep()', () => { - let validPayload: string - let invalidPayload: string - - beforeEach(async () => { - validPayload = ethers.utils.defaultAbiCoder.encode( - ['uint64[]'], - [[sub1, sub2, sub3]], - ) - invalidPayload = ethers.utils.defaultAbiCoder.encode( - ['uint64[]'], - [[sub1, sub2, sub4, sub5]], - ) - const setTx = await bm.connect(owner).setWatchList( - [ - sub1, // needs funds - sub5, // funded - sub2, // needs funds - sub6, // funded - sub3, // needs funds - // sub4 - omitted - ], - new Array(5).fill(oneLINK), - new Array(5).fill(twoLINK), - ) - await setTx.wait() - }) - - it('Should revert when paused', async () => { - const pauseTx = await bm.connect(owner).pause() - await pauseTx.wait() - const performTx = bm.connect(keeperRegistry).performUpkeep(validPayload) - await expect(performTx).to.be.revertedWith(PAUSED_ERR) - }) - - context('when partially funded', () => { - it('Should fund as many subscriptions as possible', async () => { - const fundTx = await lt.connect(owner).transfer( - bm.address, - fiveLINK, // only enough LINK to fund 2 subscriptions - ) - await fundTx.wait() - console.log((await lt.balanceOf(bm.address)).toString()) - await assertWatchlistBalances( - zeroLINK, - zeroLINK, - zeroLINK, - zeroLINK, - oneHundredLINK, - oneHundredLINK, - ) - const performTx = await bm - .connect(keeperRegistry) - .performUpkeep(validPayload, { gasLimit: 2_500_000 }) - - await assertWatchlistBalances( - twoLINK, - twoLINK, - zeroLINK, - zeroLINK, - oneHundredLINK, - oneHundredLINK, - ) - await expect(performTx).to.emit(bm, 'TopUpSucceeded').withArgs(sub1) - await expect(performTx).to.emit(bm, 'TopUpSucceeded').withArgs(sub1) - }) - }) - - context('when fully funded', () => { - beforeEach(async () => { - const fundTx = await lt.connect(owner).transfer(bm.address, tenLINK) - await fundTx.wait() - }) - - it('Should fund the appropriate subscriptions', async () => { - await assertWatchlistBalances( - zeroLINK, - zeroLINK, - zeroLINK, - zeroLINK, - oneHundredLINK, - oneHundredLINK, - ) - const performTx = await bm - .connect(keeperRegistry) - .performUpkeep(validPayload, { gasLimit: 2_500_000 }) - await performTx.wait() - await assertWatchlistBalances( - twoLINK, - twoLINK, - twoLINK, - zeroLINK, - oneHundredLINK, - oneHundredLINK, - ) - }) - - it('Should only fund active, underfunded subscriptions', async () => { - await assertWatchlistBalances( - zeroLINK, - zeroLINK, - zeroLINK, - zeroLINK, - oneHundredLINK, - oneHundredLINK, - ) - const performTx = await bm - .connect(keeperRegistry) - .performUpkeep(invalidPayload, { gasLimit: 2_500_000 }) - await performTx.wait() - await assertWatchlistBalances( - twoLINK, - twoLINK, - zeroLINK, - zeroLINK, - oneHundredLINK, - oneHundredLINK, - ) - }) - - it('Should not fund subscriptions that have been funded recently', async () => { - const setWaitPdTx = await bm.setMinWaitPeriodSeconds(3600) // 1 hour - await setWaitPdTx.wait() - const block = await ethers.provider.getBlock('latest') - const setTopUpTx = await bm.setLastTopUpXXXTestOnly( - sub2, - block.timestamp - 100, - ) - await setTopUpTx.wait() - await assertWatchlistBalances( - zeroLINK, - zeroLINK, - zeroLINK, - zeroLINK, - oneHundredLINK, - oneHundredLINK, - ) - const performTx = await bm - .connect(keeperRegistry) - .performUpkeep(validPayload, { gasLimit: 2_500_000 }) - await performTx.wait() - await assertWatchlistBalances( - twoLINK, - zeroLINK, - twoLINK, - zeroLINK, - oneHundredLINK, - oneHundredLINK, - ) - }) - - it('Should only be callable by the keeper registry contract', async () => { - let performTx = bm.connect(owner).performUpkeep(validPayload) - await expect(performTx).to.be.revertedWithCustomError( - bm, - ONLY_KEEPER_ERR, - ) - performTx = bm.connect(stranger).performUpkeep(validPayload) - await expect(performTx).to.be.revertedWithCustomError( - bm, - ONLY_KEEPER_ERR, - ) - }) - - it('Should protect against running out of gas', async () => { - await assertWatchlistBalances( - zeroLINK, - zeroLINK, - zeroLINK, - zeroLINK, - oneHundredLINK, - oneHundredLINK, - ) - const performTx = await bm - .connect(keeperRegistry) - .performUpkeep(validPayload, { gasLimit: 130_000 }) // too little for all 3 transfers - await performTx.wait() - const balance1 = (await coordinator.getSubscription(sub1)).balance - const balance2 = (await coordinator.getSubscription(sub2)).balance - const balance3 = (await coordinator.getSubscription(sub3)).balance - const balances = [balance1, balance2, balance3].map((n) => n.toString()) - expect(balances) - .to.include(twoLINK.toString()) // expect at least 1 transfer - .to.include(zeroLINK.toString()) // expect at least 1 out of funds - }) - }) - }) - - describe('topUp()', () => { - context('when not paused', () => { - it('Should be callable by anyone', async () => { - const users = [owner, keeperRegistry, stranger] - for (let idx = 0; idx < users.length; idx++) { - const user = users[idx] - await bm.connect(user).topUp([]) - } - }) - }) - context('when paused', () => { - it('Should be callable by no one', async () => { - await bm.connect(owner).pause() - const users = [owner, keeperRegistry, stranger] - for (let idx = 0; idx < users.length; idx++) { - const user = users[idx] - const tx = bm.connect(user).topUp([]) - await expect(tx).to.be.revertedWith(PAUSED_ERR) - } - }) - }) - }) -}) diff --git a/contracts/test/v0.8/vrf/VRFV2Wrapper.test.ts b/contracts/test/v0.8/vrf/VRFV2Wrapper.test.ts deleted file mode 100644 index 54c3b5f99b5..00000000000 --- a/contracts/test/v0.8/vrf/VRFV2Wrapper.test.ts +++ /dev/null @@ -1,656 +0,0 @@ -import { assert, expect } from 'chai' -import { BigNumber, BigNumberish, Signer } from 'ethers' -import { ethers } from 'hardhat' -import { reset, toBytes32String } from '../../test-helpers/helpers' -import { bigNumEquals } from '../../test-helpers/matchers' -import { describe } from 'mocha' -import { - LinkToken, - MockV3Aggregator, - MockV3Aggregator__factory, - VRFCoordinatorV2Mock, - VRFV2Wrapper, - VRFV2WrapperConsumerExample, - VRFV2WrapperOutOfGasConsumerExample, - VRFV2WrapperRevertingConsumerExample, -} from '../../../typechain' - -describe('VRFV2Wrapper', () => { - const pointOneLink = BigNumber.from('100000000000000000') - const pointZeroZeroThreeLink = BigNumber.from('3000000000000000') - const oneHundredLink = BigNumber.from('100000000000000000000') - const oneHundredGwei = BigNumber.from('100000000000') - const fiftyGwei = BigNumber.from('50000000000') - - // Configuration - - // This value is the worst-case gas overhead from the wrapper contract under the following - // conditions, plus some wiggle room: - // - 10 words requested - // - Refund issued to consumer - const wrapperGasOverhead = BigNumber.from(60_000) - const coordinatorGasOverhead = BigNumber.from(52_000) - const wrapperPremiumPercentage = 10 - const maxNumWords = 10 - const weiPerUnitLink = pointZeroZeroThreeLink - const flatFee = pointOneLink - - let wrapper: VRFV2Wrapper - let coordinator: VRFCoordinatorV2Mock - let link: LinkToken - let wrongLink: LinkToken - let linkEthFeed: MockV3Aggregator - let consumer: VRFV2WrapperConsumerExample - let consumerWrongLink: VRFV2WrapperConsumerExample - let consumerRevert: VRFV2WrapperRevertingConsumerExample - let consumerOutOfGas: VRFV2WrapperOutOfGasConsumerExample - - let owner: Signer - let requester: Signer - let consumerOwner: Signer - let withdrawRecipient: Signer - - // This should match implementation in VRFV2Wrapper::calculateGasPriceInternal - const calculatePrice = ( - gasLimit: BigNumberish, - _wrapperGasOverhead: BigNumberish = wrapperGasOverhead, - _coordinatorGasOverhead: BigNumberish = coordinatorGasOverhead, - _gasPriceWei: BigNumberish = oneHundredGwei, - _weiPerUnitLink: BigNumberish = weiPerUnitLink, - _wrapperPremium: BigNumberish = wrapperPremiumPercentage, - _flatFee: BigNumberish = flatFee, - ): BigNumber => { - const totalGas = BigNumber.from(0) - .add(gasLimit) - .add(_wrapperGasOverhead) - .add(_coordinatorGasOverhead) - const baseFee = BigNumber.from('1000000000000000000') - .mul(_gasPriceWei) - .mul(totalGas) - .div(_weiPerUnitLink) - const withPremium = baseFee - .mul(BigNumber.from(100).add(_wrapperPremium)) - .div(100) - return withPremium.add(_flatFee) - } - - before(async () => { - await reset() - }) - - beforeEach(async () => { - const accounts = await ethers.getSigners() - owner = accounts[0] - requester = accounts[1] - consumerOwner = accounts[2] - withdrawRecipient = accounts[3] - - const coordinatorFactory = await ethers.getContractFactory( - 'VRFCoordinatorV2Mock', - owner, - ) - coordinator = await coordinatorFactory.deploy( - pointOneLink, - 1e9, // 0.000000001 LINK per gas - ) - - const linkEthFeedFactory = (await ethers.getContractFactory( - 'src/v0.8/tests/MockV3Aggregator.sol:MockV3Aggregator', - owner, - )) as unknown as MockV3Aggregator__factory - linkEthFeed = await linkEthFeedFactory.deploy(18, weiPerUnitLink) // 1 LINK = 0.003 ETH - - const linkFactory = await ethers.getContractFactory( - 'src/v0.8/shared/test/helpers/LinkTokenTestHelper.sol:LinkTokenTestHelper', - owner, - ) - link = await linkFactory.deploy() - wrongLink = await linkFactory.deploy() - - const wrapperFactory = await ethers.getContractFactory( - 'VRFV2Wrapper', - owner, - ) - wrapper = await wrapperFactory.deploy( - link.address, - linkEthFeed.address, - coordinator.address, - ) - - const consumerFactory = await ethers.getContractFactory( - 'VRFV2WrapperConsumerExample', - consumerOwner, - ) - consumer = await consumerFactory.deploy(link.address, wrapper.address) - consumerWrongLink = await consumerFactory.deploy( - wrongLink.address, - wrapper.address, - ) - consumerRevert = await consumerFactory.deploy(link.address, wrapper.address) - - const revertingConsumerFactory = await ethers.getContractFactory( - 'VRFV2WrapperRevertingConsumerExample', - consumerOwner, - ) - consumerRevert = await revertingConsumerFactory.deploy( - link.address, - wrapper.address, - ) - - const outOfGasConsumerFactory = await ethers.getContractFactory( - 'VRFV2WrapperOutOfGasConsumerExample', - consumerOwner, - ) - consumerOutOfGas = await outOfGasConsumerFactory.deploy( - link.address, - wrapper.address, - ) - }) - - const configure = async (): Promise => { - await expect( - wrapper - .connect(owner) - .setConfig( - wrapperGasOverhead, - coordinatorGasOverhead, - wrapperPremiumPercentage, - toBytes32String('keyHash'), - maxNumWords, - ), - ).to.not.be.reverted - } - - const fund = async (address: string, amount: BigNumber): Promise => { - await expect(link.connect(owner).transfer(address, amount)).to.not.be - .reverted - } - - const fundSub = async (): Promise => { - await expect(coordinator.connect(owner).fundSubscription(1, oneHundredLink)) - .to.not.be.reverted - } - - describe('calculatePrice', async () => { - // Note: This is a meta-test for the calculatePrice func above. It is then assumed correct for - // the remainder of the tests - it('can calculate price at 50 gwei, 100k limit', async () => { - const result = calculatePrice( - 100_000, - wrapperGasOverhead, - coordinatorGasOverhead, - fiftyGwei, - weiPerUnitLink, - wrapperPremiumPercentage, - flatFee, - ) - bigNumEquals(BigNumber.from('3986666666666666666'), result) - }) - - it('can calculate price at 50 gwei, 200k limit', async () => { - const result = calculatePrice( - 200_000, - wrapperGasOverhead, - coordinatorGasOverhead, - fiftyGwei, - weiPerUnitLink, - wrapperPremiumPercentage, - flatFee, - ) - bigNumEquals(BigNumber.from('5820000000000000000'), result) - }) - - it('can calculate price at 200 gwei, 100k limit', async () => { - const result = calculatePrice( - 200_000, - wrapperGasOverhead, - coordinatorGasOverhead, - oneHundredGwei, - weiPerUnitLink, - wrapperPremiumPercentage, - flatFee, - ) - bigNumEquals(BigNumber.from('11540000000000000000'), result) - }) - - it('can calculate price at 200 gwei, 100k limit, 25% premium', async () => { - const result = calculatePrice( - 200_000, - wrapperGasOverhead, - coordinatorGasOverhead, - oneHundredGwei, - weiPerUnitLink, - 25, - flatFee, - ) - bigNumEquals(BigNumber.from('13100000000000000000'), result) - }) - }) - - describe('#setConfig/#getConfig', async () => { - it('can be configured', async () => { - await configure() - - const resp = await wrapper.connect(requester).getConfig() - bigNumEquals(BigNumber.from('4000000000000000'), resp[0]) // fallbackWeiPerUnitLink - bigNumEquals(2_700, resp[1]) // stalenessSeconds - bigNumEquals(BigNumber.from('100000'), resp[2]) // fulfillmentFlatFeeLinkPPM - bigNumEquals(wrapperGasOverhead, resp[3]) - bigNumEquals(coordinatorGasOverhead, resp[4]) - bigNumEquals(wrapperPremiumPercentage, resp[5]) - assert.equal(resp[6], toBytes32String('keyHash')) - bigNumEquals(10, resp[7]) - }) - - it('can be reconfigured', async () => { - await configure() - - await expect( - wrapper.connect(owner).setConfig( - 140_000, // wrapperGasOverhead - 195_000, // coordinatorGasOverhead - 9, // wrapperPremiumPercentage - toBytes32String('keyHash2'), // keyHash - 9, // maxNumWords - ), - ).to.not.be.reverted - - const resp = await wrapper.connect(requester).getConfig() - bigNumEquals(BigNumber.from('4000000000000000'), resp[0]) // fallbackWeiPerUnitLink - bigNumEquals(2_700, resp[1]) // stalenessSeconds - bigNumEquals(BigNumber.from('100000'), resp[2]) // fulfillmentFlatFeeLinkPPM - bigNumEquals(140_000, resp[3]) // wrapperGasOverhead - bigNumEquals(195_000, resp[4]) // coordinatorGasOverhead - bigNumEquals(9, resp[5]) // wrapperPremiumPercentage - assert.equal(resp[6], toBytes32String('keyHash2')) // keyHash - bigNumEquals(9, resp[7]) // maxNumWords - }) - - it('cannot be configured by a non-owner', async () => { - await expect( - wrapper.connect(requester).setConfig( - 10_000, // wrapperGasOverhead - 10_000, // coordinatorGasOverhead - 10, // wrapperPremiumPercentage - toBytes32String('keyHash'), // keyHash - 10, // maxNumWords - ), - ).to.be.reverted - }) - }) - describe('#calculatePrice', async () => { - it('cannot calculate price when not configured', async () => { - await expect(wrapper.connect(requester).calculateRequestPrice(100_000)).to - .be.reverted - }) - it('can calculate price at 50 gwei, 100k gas', async () => { - await configure() - const expected = calculatePrice( - 100_000, - wrapperGasOverhead, - coordinatorGasOverhead, - fiftyGwei, - weiPerUnitLink, - wrapperPremiumPercentage, - flatFee, - ) - const resp = await wrapper - .connect(requester) - .calculateRequestPrice(100_000, { gasPrice: fiftyGwei }) - bigNumEquals(expected, resp) - }) - - it('can calculate price at 100 gwei, 100k gas', async () => { - await configure() - const expected = calculatePrice( - 100_000, - wrapperGasOverhead, - coordinatorGasOverhead, - oneHundredGwei, - weiPerUnitLink, - wrapperPremiumPercentage, - flatFee, - ) - const resp = await wrapper - .connect(requester) - .calculateRequestPrice(100_000, { gasPrice: oneHundredGwei }) - bigNumEquals(expected, resp) - }) - - it('can calculate price at 100 gwei, 200k gas', async () => { - await configure() - const expected = calculatePrice( - 200_000, - wrapperGasOverhead, - coordinatorGasOverhead, - oneHundredGwei, - weiPerUnitLink, - wrapperPremiumPercentage, - flatFee, - ) - const resp = await wrapper - .connect(requester) - .calculateRequestPrice(200_000, { gasPrice: oneHundredGwei }) - bigNumEquals(expected, resp) - }) - }) - - describe('#estimatePrice', async () => { - it('cannot estimate price when not configured', async () => { - await expect( - wrapper - .connect(requester) - .estimateRequestPrice(100_000, oneHundredGwei), - ).to.be.reverted - }) - it('can estimate price at 50 gwei, 100k gas', async () => { - await configure() - const expected = calculatePrice( - 100_000, - wrapperGasOverhead, - coordinatorGasOverhead, - fiftyGwei, - weiPerUnitLink, - wrapperPremiumPercentage, - flatFee, - ) - const resp = await wrapper - .connect(requester) - .estimateRequestPrice(100_000, fiftyGwei) - bigNumEquals(expected, resp) - }) - - it('can estimate price at 100 gwei, 100k gas', async () => { - await configure() - const expected = calculatePrice( - 100_000, - wrapperGasOverhead, - coordinatorGasOverhead, - oneHundredGwei, - weiPerUnitLink, - wrapperPremiumPercentage, - flatFee, - ) - const resp = await wrapper - .connect(requester) - .estimateRequestPrice(100_000, oneHundredGwei) - bigNumEquals(expected, resp) - }) - - it('can estimate price at 100 gwei, 200k gas', async () => { - await configure() - const expected = calculatePrice( - 200_000, - wrapperGasOverhead, - coordinatorGasOverhead, - oneHundredGwei, - weiPerUnitLink, - wrapperPremiumPercentage, - flatFee, - ) - const resp = await wrapper - .connect(requester) - .estimateRequestPrice(200_000, oneHundredGwei) - bigNumEquals(expected, resp) - }) - }) - - describe('#onTokenTransfer/#fulfillRandomWords', async () => { - it('cannot request randomness when not configured', async () => { - await expect( - consumer.connect(consumerOwner).makeRequest(80_000, 3, 2, { - gasPrice: oneHundredGwei, - gasLimit: 1_000_000, - }), - ).to.be.reverted - }) - it('can only be called through LinkToken', async () => { - configure() - await expect( - wrongLink - .connect(owner) - .transfer(consumerWrongLink.address, oneHundredLink, { - gasPrice: oneHundredGwei, - gasLimit: 1_000_000, - }), - ).to.not.be.reverted - await expect( - consumerWrongLink.connect(consumerOwner).makeRequest(80_000, 3, 2, { - gasPrice: oneHundredGwei, - gasLimit: 1_000_000, - }), - ).to.be.reverted - }) - it('can request and fulfill randomness', async () => { - await configure() - await fund(consumer.address, oneHundredLink) - await fundSub() - - await expect( - consumer.connect(consumerOwner).makeRequest(100_000, 3, 1, { - gasPrice: oneHundredGwei, - gasLimit: 1_000_000, - }), - ).to.emit(coordinator, 'RandomWordsRequested') - - const price = calculatePrice(100_000) - - // Check that the wrapper has the paid amount - bigNumEquals(price, await link.balanceOf(wrapper.address)) - - const { paid, fulfilled } = await consumer.s_requests(1 /* requestId */) - bigNumEquals(price, paid) - expect(fulfilled).to.be.false - - // fulfill the request - await expect( - coordinator - .connect(owner) - .fulfillRandomWordsWithOverride(1, wrapper.address, [123], { - gasLimit: 1_000_000, - }), - ) - .to.emit(coordinator, 'RandomWordsFulfilled') - .to.emit(consumer, 'WrappedRequestFulfilled') - .withArgs(1, [123], BigNumber.from(price)) - - const expectedBalance = price - const diff = expectedBalance - .sub(await link.balanceOf(wrapper.address)) - .abs() - expect(diff.lt(pointOneLink)).to.be.true - }) - it('does not revert if consumer runs out of gas', async () => { - await configure() - await fund(consumerOutOfGas.address, oneHundredLink) - await fundSub() - - await expect( - consumerOutOfGas.connect(consumerOwner).makeRequest(100_000, 3, 1, { - gasPrice: oneHundredGwei, - gasLimit: 1_000_000, - }), - ).to.emit(coordinator, 'RandomWordsRequested') - - const price = calculatePrice(100_000) - - // Check that the wrapper has the paid amount - bigNumEquals(price, await link.balanceOf(wrapper.address)) - - // fulfill the request - await expect( - coordinator - .connect(owner) - .fulfillRandomWordsWithOverride(1, wrapper.address, [123], { - gasLimit: 1_000_000, - }), - ) - .to.emit(coordinator, 'RandomWordsFulfilled') - .to.emit(wrapper, 'WrapperFulfillmentFailed') - }) - it('does not revert if consumer reverts', async () => { - await configure() - await fund(consumerRevert.address, oneHundredLink) - await fundSub() - - await expect( - consumerRevert.connect(consumerOwner).makeRequest(100_000, 3, 1, { - gasPrice: oneHundredGwei, - gasLimit: 1_000_000, - }), - ).to.emit(coordinator, 'RandomWordsRequested') - - const price = calculatePrice(100_000) - - // Check that the wrapper has the paid amount - bigNumEquals(price, await link.balanceOf(wrapper.address)) - - // fulfill the request - await expect( - coordinator - .connect(owner) - .fulfillRandomWordsWithOverride(1, wrapper.address, [123]), - ) - .to.emit(coordinator, 'RandomWordsFulfilled') - .to.emit(wrapper, 'WrapperFulfillmentFailed') - - const expectedBalance = price - const diff = expectedBalance - .sub(await link.balanceOf(wrapper.address)) - .abs() - - expect(diff.lt(pointOneLink)).to.be.true - }) - }) - describe('#disable/#enable', async () => { - it('can only calculate price when enabled', async () => { - await configure() - - await expect(wrapper.connect(owner).disable()).to.not.be.reverted - await expect( - wrapper.connect(consumerOwner).calculateRequestPrice(100_000, { - gasPrice: oneHundredGwei, - gasLimit: 1_000_000, - }), - ).to.be.reverted - - await expect(wrapper.connect(owner).enable()).to.not.be.reverted - await expect( - wrapper.connect(consumerOwner).calculateRequestPrice(100_000, { - gasPrice: oneHundredGwei, - gasLimit: 1_000_000, - }), - ).to.not.be.reverted - }) - - it('can only estimate price when enabled', async () => { - await configure() - - await expect(wrapper.connect(owner).disable()).to.not.be.reverted - await expect( - wrapper - .connect(consumerOwner) - .estimateRequestPrice(100_000, oneHundredGwei), - ).to.be.reverted - - await expect(wrapper.connect(owner).enable()).to.not.be.reverted - await expect( - wrapper - .connect(consumerOwner) - .estimateRequestPrice(100_000, oneHundredGwei), - ).to.not.be.reverted - }) - - it('can be configured while disabled', async () => { - await expect(wrapper.connect(owner).disable()).to.not.be.reverted - await configure() - }) - - it('can only request randomness when enabled', async () => { - await configure() - await fund(consumer.address, oneHundredLink) - await fundSub() - - await expect(wrapper.connect(owner).disable()).to.not.be.reverted - await expect( - consumer.connect(consumerOwner).makeRequest(100_000, 3, 1, { - gasPrice: oneHundredGwei, - gasLimit: 1_000_000, - }), - ).to.be.reverted - - await expect(wrapper.connect(owner).enable()).to.not.be.reverted - await expect( - consumer.connect(consumerOwner).makeRequest(100_000, 3, 1, { - gasPrice: oneHundredGwei, - gasLimit: 1_000_000, - }), - ).to.not.be.reverted - }) - - it('can fulfill randomness when disabled', async () => { - await configure() - await fund(consumer.address, oneHundredLink) - await fundSub() - - await expect( - consumer.connect(consumerOwner).makeRequest(100_000, 3, 1, { - gasPrice: oneHundredGwei, - gasLimit: 1_000_000, - }), - ).to.not.be.reverted - await expect(wrapper.connect(owner).disable()).to.not.be.reverted - - await expect( - coordinator - .connect(owner) - .fulfillRandomWordsWithOverride(1, wrapper.address, [123], { - gasLimit: 1_000_000, - }), - ) - .to.emit(coordinator, 'RandomWordsFulfilled') - .to.emit(consumer, 'WrappedRequestFulfilled') - }) - }) - - describe('#withdraw', async () => { - it('can withdraw funds to the owner', async () => { - await configure() - await fund(wrapper.address, oneHundredLink) - const recipientAddress = await withdrawRecipient.getAddress() - - // Withdraw half the funds - await expect( - wrapper - .connect(owner) - .withdraw(recipientAddress, oneHundredLink.div(2)), - ).to.not.be.reverted - bigNumEquals( - oneHundredLink.div(2), - await link.balanceOf(recipientAddress), - ) - bigNumEquals(oneHundredLink.div(2), await link.balanceOf(wrapper.address)) - - // Withdraw the rest - await expect( - wrapper - .connect(owner) - .withdraw(recipientAddress, oneHundredLink.div(2)), - ).to.not.be.reverted - bigNumEquals(oneHundredLink, await link.balanceOf(recipientAddress)) - bigNumEquals(0, await link.balanceOf(wrapper.address)) - }) - - it('cannot withdraw funds to non owners', async () => { - await configure() - await fund(wrapper.address, oneHundredLink) - const recipientAddress = await withdrawRecipient.getAddress() - - await expect( - wrapper - .connect(consumerOwner) - .withdraw(recipientAddress, oneHundredLink.div(2)), - ).to.be.reverted - }) - }) -}) diff --git a/core/bridges/cache.go b/core/bridges/cache.go index eb45d4ff624..4b5a6552447 100644 --- a/core/bridges/cache.go +++ b/core/bridges/cache.go @@ -30,8 +30,8 @@ type Cache struct { // service state services.StateMachine - wg sync.WaitGroup - stop chan struct{} + wg sync.WaitGroup + chStop services.StopChan // data state bridgeTypesCache sync.Map @@ -47,7 +47,7 @@ func NewCache(base ORM, lggr logger.Logger, upsertInterval time.Duration) *Cache ORM: base, lggr: lggr.Named(CacheServiceName), interval: upsertInterval, - stop: make(chan struct{}, 1), + chStop: make(chan struct{}), bridgeLastValueCache: make(map[string]BridgeResponse), } } @@ -190,7 +190,7 @@ func (c *Cache) UpsertBridgeResponse(ctx context.Context, dotId string, specId i return nil } -func (c *Cache) Start(context.Context) error { +func (c *Cache) Start(_ context.Context) error { return c.StartOnce(CacheServiceName, func() error { c.wg.Add(1) @@ -202,7 +202,7 @@ func (c *Cache) Start(context.Context) error { func (c *Cache) Close() error { return c.StopOnce(CacheServiceName, func() error { - close(c.stop) + close(c.chStop) c.wg.Wait() return nil @@ -226,7 +226,7 @@ func (c *Cache) run() { select { case <-timer.C: c.doBulkUpsert() - case <-c.stop: + case <-c.chStop: timer.Stop() return @@ -239,7 +239,14 @@ func (c *Cache) doBulkUpsert() { values := maps.Values(c.bridgeLastValueCache) c.mu.RUnlock() - if err := c.ORM.BulkUpsertBridgeResponse(context.Background(), values); err != nil { + if len(values) == 0 { + return + } + + ctx, cancel := c.chStop.NewCtx() + defer cancel() + + if err := c.ORM.BulkUpsertBridgeResponse(ctx, values); err != nil { c.lggr.Warnf("bulk upsert of bridge responses failed: %s", err.Error()) } } diff --git a/core/bridges/mocks/orm.go b/core/bridges/mocks/orm.go index cda12a9045d..e3fc3edee9d 100644 --- a/core/bridges/mocks/orm.go +++ b/core/bridges/mocks/orm.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -20,6 +20,14 @@ type ORM struct { mock.Mock } +type ORM_Expecter struct { + mock *mock.Mock +} + +func (_m *ORM) EXPECT() *ORM_Expecter { + return &ORM_Expecter{mock: &_m.Mock} +} + // BridgeTypes provides a mock function with given fields: ctx, offset, limit func (_m *ORM) BridgeTypes(ctx context.Context, offset int, limit int) ([]bridges.BridgeType, int, error) { ret := _m.Called(ctx, offset, limit) @@ -57,6 +65,36 @@ func (_m *ORM) BridgeTypes(ctx context.Context, offset int, limit int) ([]bridge return r0, r1, r2 } +// ORM_BridgeTypes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BridgeTypes' +type ORM_BridgeTypes_Call struct { + *mock.Call +} + +// BridgeTypes is a helper method to define mock.On call +// - ctx context.Context +// - offset int +// - limit int +func (_e *ORM_Expecter) BridgeTypes(ctx interface{}, offset interface{}, limit interface{}) *ORM_BridgeTypes_Call { + return &ORM_BridgeTypes_Call{Call: _e.mock.On("BridgeTypes", ctx, offset, limit)} +} + +func (_c *ORM_BridgeTypes_Call) Run(run func(ctx context.Context, offset int, limit int)) *ORM_BridgeTypes_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int), args[2].(int)) + }) + return _c +} + +func (_c *ORM_BridgeTypes_Call) Return(_a0 []bridges.BridgeType, _a1 int, _a2 error) *ORM_BridgeTypes_Call { + _c.Call.Return(_a0, _a1, _a2) + return _c +} + +func (_c *ORM_BridgeTypes_Call) RunAndReturn(run func(context.Context, int, int) ([]bridges.BridgeType, int, error)) *ORM_BridgeTypes_Call { + _c.Call.Return(run) + return _c +} + // BulkUpsertBridgeResponse provides a mock function with given fields: ctx, responses func (_m *ORM) BulkUpsertBridgeResponse(ctx context.Context, responses []bridges.BridgeResponse) error { ret := _m.Called(ctx, responses) @@ -75,6 +113,35 @@ func (_m *ORM) BulkUpsertBridgeResponse(ctx context.Context, responses []bridges return r0 } +// ORM_BulkUpsertBridgeResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BulkUpsertBridgeResponse' +type ORM_BulkUpsertBridgeResponse_Call struct { + *mock.Call +} + +// BulkUpsertBridgeResponse is a helper method to define mock.On call +// - ctx context.Context +// - responses []bridges.BridgeResponse +func (_e *ORM_Expecter) BulkUpsertBridgeResponse(ctx interface{}, responses interface{}) *ORM_BulkUpsertBridgeResponse_Call { + return &ORM_BulkUpsertBridgeResponse_Call{Call: _e.mock.On("BulkUpsertBridgeResponse", ctx, responses)} +} + +func (_c *ORM_BulkUpsertBridgeResponse_Call) Run(run func(ctx context.Context, responses []bridges.BridgeResponse)) *ORM_BulkUpsertBridgeResponse_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]bridges.BridgeResponse)) + }) + return _c +} + +func (_c *ORM_BulkUpsertBridgeResponse_Call) Return(_a0 error) *ORM_BulkUpsertBridgeResponse_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_BulkUpsertBridgeResponse_Call) RunAndReturn(run func(context.Context, []bridges.BridgeResponse) error) *ORM_BulkUpsertBridgeResponse_Call { + _c.Call.Return(run) + return _c +} + // CreateBridgeType provides a mock function with given fields: ctx, bt func (_m *ORM) CreateBridgeType(ctx context.Context, bt *bridges.BridgeType) error { ret := _m.Called(ctx, bt) @@ -93,6 +160,35 @@ func (_m *ORM) CreateBridgeType(ctx context.Context, bt *bridges.BridgeType) err return r0 } +// ORM_CreateBridgeType_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateBridgeType' +type ORM_CreateBridgeType_Call struct { + *mock.Call +} + +// CreateBridgeType is a helper method to define mock.On call +// - ctx context.Context +// - bt *bridges.BridgeType +func (_e *ORM_Expecter) CreateBridgeType(ctx interface{}, bt interface{}) *ORM_CreateBridgeType_Call { + return &ORM_CreateBridgeType_Call{Call: _e.mock.On("CreateBridgeType", ctx, bt)} +} + +func (_c *ORM_CreateBridgeType_Call) Run(run func(ctx context.Context, bt *bridges.BridgeType)) *ORM_CreateBridgeType_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*bridges.BridgeType)) + }) + return _c +} + +func (_c *ORM_CreateBridgeType_Call) Return(_a0 error) *ORM_CreateBridgeType_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_CreateBridgeType_Call) RunAndReturn(run func(context.Context, *bridges.BridgeType) error) *ORM_CreateBridgeType_Call { + _c.Call.Return(run) + return _c +} + // CreateExternalInitiator provides a mock function with given fields: ctx, externalInitiator func (_m *ORM) CreateExternalInitiator(ctx context.Context, externalInitiator *bridges.ExternalInitiator) error { ret := _m.Called(ctx, externalInitiator) @@ -111,6 +207,35 @@ func (_m *ORM) CreateExternalInitiator(ctx context.Context, externalInitiator *b return r0 } +// ORM_CreateExternalInitiator_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateExternalInitiator' +type ORM_CreateExternalInitiator_Call struct { + *mock.Call +} + +// CreateExternalInitiator is a helper method to define mock.On call +// - ctx context.Context +// - externalInitiator *bridges.ExternalInitiator +func (_e *ORM_Expecter) CreateExternalInitiator(ctx interface{}, externalInitiator interface{}) *ORM_CreateExternalInitiator_Call { + return &ORM_CreateExternalInitiator_Call{Call: _e.mock.On("CreateExternalInitiator", ctx, externalInitiator)} +} + +func (_c *ORM_CreateExternalInitiator_Call) Run(run func(ctx context.Context, externalInitiator *bridges.ExternalInitiator)) *ORM_CreateExternalInitiator_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*bridges.ExternalInitiator)) + }) + return _c +} + +func (_c *ORM_CreateExternalInitiator_Call) Return(_a0 error) *ORM_CreateExternalInitiator_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_CreateExternalInitiator_Call) RunAndReturn(run func(context.Context, *bridges.ExternalInitiator) error) *ORM_CreateExternalInitiator_Call { + _c.Call.Return(run) + return _c +} + // DeleteBridgeType provides a mock function with given fields: ctx, bt func (_m *ORM) DeleteBridgeType(ctx context.Context, bt *bridges.BridgeType) error { ret := _m.Called(ctx, bt) @@ -129,6 +254,35 @@ func (_m *ORM) DeleteBridgeType(ctx context.Context, bt *bridges.BridgeType) err return r0 } +// ORM_DeleteBridgeType_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteBridgeType' +type ORM_DeleteBridgeType_Call struct { + *mock.Call +} + +// DeleteBridgeType is a helper method to define mock.On call +// - ctx context.Context +// - bt *bridges.BridgeType +func (_e *ORM_Expecter) DeleteBridgeType(ctx interface{}, bt interface{}) *ORM_DeleteBridgeType_Call { + return &ORM_DeleteBridgeType_Call{Call: _e.mock.On("DeleteBridgeType", ctx, bt)} +} + +func (_c *ORM_DeleteBridgeType_Call) Run(run func(ctx context.Context, bt *bridges.BridgeType)) *ORM_DeleteBridgeType_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*bridges.BridgeType)) + }) + return _c +} + +func (_c *ORM_DeleteBridgeType_Call) Return(_a0 error) *ORM_DeleteBridgeType_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_DeleteBridgeType_Call) RunAndReturn(run func(context.Context, *bridges.BridgeType) error) *ORM_DeleteBridgeType_Call { + _c.Call.Return(run) + return _c +} + // DeleteExternalInitiator provides a mock function with given fields: ctx, name func (_m *ORM) DeleteExternalInitiator(ctx context.Context, name string) error { ret := _m.Called(ctx, name) @@ -147,6 +301,35 @@ func (_m *ORM) DeleteExternalInitiator(ctx context.Context, name string) error { return r0 } +// ORM_DeleteExternalInitiator_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteExternalInitiator' +type ORM_DeleteExternalInitiator_Call struct { + *mock.Call +} + +// DeleteExternalInitiator is a helper method to define mock.On call +// - ctx context.Context +// - name string +func (_e *ORM_Expecter) DeleteExternalInitiator(ctx interface{}, name interface{}) *ORM_DeleteExternalInitiator_Call { + return &ORM_DeleteExternalInitiator_Call{Call: _e.mock.On("DeleteExternalInitiator", ctx, name)} +} + +func (_c *ORM_DeleteExternalInitiator_Call) Run(run func(ctx context.Context, name string)) *ORM_DeleteExternalInitiator_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *ORM_DeleteExternalInitiator_Call) Return(_a0 error) *ORM_DeleteExternalInitiator_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_DeleteExternalInitiator_Call) RunAndReturn(run func(context.Context, string) error) *ORM_DeleteExternalInitiator_Call { + _c.Call.Return(run) + return _c +} + // ExternalInitiators provides a mock function with given fields: ctx, offset, limit func (_m *ORM) ExternalInitiators(ctx context.Context, offset int, limit int) ([]bridges.ExternalInitiator, int, error) { ret := _m.Called(ctx, offset, limit) @@ -184,6 +367,36 @@ func (_m *ORM) ExternalInitiators(ctx context.Context, offset int, limit int) ([ return r0, r1, r2 } +// ORM_ExternalInitiators_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExternalInitiators' +type ORM_ExternalInitiators_Call struct { + *mock.Call +} + +// ExternalInitiators is a helper method to define mock.On call +// - ctx context.Context +// - offset int +// - limit int +func (_e *ORM_Expecter) ExternalInitiators(ctx interface{}, offset interface{}, limit interface{}) *ORM_ExternalInitiators_Call { + return &ORM_ExternalInitiators_Call{Call: _e.mock.On("ExternalInitiators", ctx, offset, limit)} +} + +func (_c *ORM_ExternalInitiators_Call) Run(run func(ctx context.Context, offset int, limit int)) *ORM_ExternalInitiators_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int), args[2].(int)) + }) + return _c +} + +func (_c *ORM_ExternalInitiators_Call) Return(_a0 []bridges.ExternalInitiator, _a1 int, _a2 error) *ORM_ExternalInitiators_Call { + _c.Call.Return(_a0, _a1, _a2) + return _c +} + +func (_c *ORM_ExternalInitiators_Call) RunAndReturn(run func(context.Context, int, int) ([]bridges.ExternalInitiator, int, error)) *ORM_ExternalInitiators_Call { + _c.Call.Return(run) + return _c +} + // FindBridge provides a mock function with given fields: ctx, name func (_m *ORM) FindBridge(ctx context.Context, name bridges.BridgeName) (bridges.BridgeType, error) { ret := _m.Called(ctx, name) @@ -212,6 +425,35 @@ func (_m *ORM) FindBridge(ctx context.Context, name bridges.BridgeName) (bridges return r0, r1 } +// ORM_FindBridge_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindBridge' +type ORM_FindBridge_Call struct { + *mock.Call +} + +// FindBridge is a helper method to define mock.On call +// - ctx context.Context +// - name bridges.BridgeName +func (_e *ORM_Expecter) FindBridge(ctx interface{}, name interface{}) *ORM_FindBridge_Call { + return &ORM_FindBridge_Call{Call: _e.mock.On("FindBridge", ctx, name)} +} + +func (_c *ORM_FindBridge_Call) Run(run func(ctx context.Context, name bridges.BridgeName)) *ORM_FindBridge_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(bridges.BridgeName)) + }) + return _c +} + +func (_c *ORM_FindBridge_Call) Return(bt bridges.BridgeType, err error) *ORM_FindBridge_Call { + _c.Call.Return(bt, err) + return _c +} + +func (_c *ORM_FindBridge_Call) RunAndReturn(run func(context.Context, bridges.BridgeName) (bridges.BridgeType, error)) *ORM_FindBridge_Call { + _c.Call.Return(run) + return _c +} + // FindBridges provides a mock function with given fields: ctx, name func (_m *ORM) FindBridges(ctx context.Context, name []bridges.BridgeName) ([]bridges.BridgeType, error) { ret := _m.Called(ctx, name) @@ -242,6 +484,35 @@ func (_m *ORM) FindBridges(ctx context.Context, name []bridges.BridgeName) ([]br return r0, r1 } +// ORM_FindBridges_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindBridges' +type ORM_FindBridges_Call struct { + *mock.Call +} + +// FindBridges is a helper method to define mock.On call +// - ctx context.Context +// - name []bridges.BridgeName +func (_e *ORM_Expecter) FindBridges(ctx interface{}, name interface{}) *ORM_FindBridges_Call { + return &ORM_FindBridges_Call{Call: _e.mock.On("FindBridges", ctx, name)} +} + +func (_c *ORM_FindBridges_Call) Run(run func(ctx context.Context, name []bridges.BridgeName)) *ORM_FindBridges_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]bridges.BridgeName)) + }) + return _c +} + +func (_c *ORM_FindBridges_Call) Return(bts []bridges.BridgeType, err error) *ORM_FindBridges_Call { + _c.Call.Return(bts, err) + return _c +} + +func (_c *ORM_FindBridges_Call) RunAndReturn(run func(context.Context, []bridges.BridgeName) ([]bridges.BridgeType, error)) *ORM_FindBridges_Call { + _c.Call.Return(run) + return _c +} + // FindExternalInitiator provides a mock function with given fields: ctx, eia func (_m *ORM) FindExternalInitiator(ctx context.Context, eia *auth.Token) (*bridges.ExternalInitiator, error) { ret := _m.Called(ctx, eia) @@ -272,6 +543,35 @@ func (_m *ORM) FindExternalInitiator(ctx context.Context, eia *auth.Token) (*bri return r0, r1 } +// ORM_FindExternalInitiator_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindExternalInitiator' +type ORM_FindExternalInitiator_Call struct { + *mock.Call +} + +// FindExternalInitiator is a helper method to define mock.On call +// - ctx context.Context +// - eia *auth.Token +func (_e *ORM_Expecter) FindExternalInitiator(ctx interface{}, eia interface{}) *ORM_FindExternalInitiator_Call { + return &ORM_FindExternalInitiator_Call{Call: _e.mock.On("FindExternalInitiator", ctx, eia)} +} + +func (_c *ORM_FindExternalInitiator_Call) Run(run func(ctx context.Context, eia *auth.Token)) *ORM_FindExternalInitiator_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*auth.Token)) + }) + return _c +} + +func (_c *ORM_FindExternalInitiator_Call) Return(_a0 *bridges.ExternalInitiator, _a1 error) *ORM_FindExternalInitiator_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ORM_FindExternalInitiator_Call) RunAndReturn(run func(context.Context, *auth.Token) (*bridges.ExternalInitiator, error)) *ORM_FindExternalInitiator_Call { + _c.Call.Return(run) + return _c +} + // FindExternalInitiatorByName provides a mock function with given fields: ctx, iname func (_m *ORM) FindExternalInitiatorByName(ctx context.Context, iname string) (bridges.ExternalInitiator, error) { ret := _m.Called(ctx, iname) @@ -300,6 +600,35 @@ func (_m *ORM) FindExternalInitiatorByName(ctx context.Context, iname string) (b return r0, r1 } +// ORM_FindExternalInitiatorByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindExternalInitiatorByName' +type ORM_FindExternalInitiatorByName_Call struct { + *mock.Call +} + +// FindExternalInitiatorByName is a helper method to define mock.On call +// - ctx context.Context +// - iname string +func (_e *ORM_Expecter) FindExternalInitiatorByName(ctx interface{}, iname interface{}) *ORM_FindExternalInitiatorByName_Call { + return &ORM_FindExternalInitiatorByName_Call{Call: _e.mock.On("FindExternalInitiatorByName", ctx, iname)} +} + +func (_c *ORM_FindExternalInitiatorByName_Call) Run(run func(ctx context.Context, iname string)) *ORM_FindExternalInitiatorByName_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *ORM_FindExternalInitiatorByName_Call) Return(exi bridges.ExternalInitiator, err error) *ORM_FindExternalInitiatorByName_Call { + _c.Call.Return(exi, err) + return _c +} + +func (_c *ORM_FindExternalInitiatorByName_Call) RunAndReturn(run func(context.Context, string) (bridges.ExternalInitiator, error)) *ORM_FindExternalInitiatorByName_Call { + _c.Call.Return(run) + return _c +} + // GetCachedResponse provides a mock function with given fields: ctx, dotId, specId, maxElapsed func (_m *ORM) GetCachedResponse(ctx context.Context, dotId string, specId int32, maxElapsed time.Duration) ([]byte, error) { ret := _m.Called(ctx, dotId, specId, maxElapsed) @@ -330,6 +659,37 @@ func (_m *ORM) GetCachedResponse(ctx context.Context, dotId string, specId int32 return r0, r1 } +// ORM_GetCachedResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCachedResponse' +type ORM_GetCachedResponse_Call struct { + *mock.Call +} + +// GetCachedResponse is a helper method to define mock.On call +// - ctx context.Context +// - dotId string +// - specId int32 +// - maxElapsed time.Duration +func (_e *ORM_Expecter) GetCachedResponse(ctx interface{}, dotId interface{}, specId interface{}, maxElapsed interface{}) *ORM_GetCachedResponse_Call { + return &ORM_GetCachedResponse_Call{Call: _e.mock.On("GetCachedResponse", ctx, dotId, specId, maxElapsed)} +} + +func (_c *ORM_GetCachedResponse_Call) Run(run func(ctx context.Context, dotId string, specId int32, maxElapsed time.Duration)) *ORM_GetCachedResponse_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(int32), args[3].(time.Duration)) + }) + return _c +} + +func (_c *ORM_GetCachedResponse_Call) Return(_a0 []byte, _a1 error) *ORM_GetCachedResponse_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ORM_GetCachedResponse_Call) RunAndReturn(run func(context.Context, string, int32, time.Duration) ([]byte, error)) *ORM_GetCachedResponse_Call { + _c.Call.Return(run) + return _c +} + // GetCachedResponseWithFinished provides a mock function with given fields: ctx, dotId, specId, maxElapsed func (_m *ORM) GetCachedResponseWithFinished(ctx context.Context, dotId string, specId int32, maxElapsed time.Duration) ([]byte, time.Time, error) { ret := _m.Called(ctx, dotId, specId, maxElapsed) @@ -367,6 +727,37 @@ func (_m *ORM) GetCachedResponseWithFinished(ctx context.Context, dotId string, return r0, r1, r2 } +// ORM_GetCachedResponseWithFinished_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCachedResponseWithFinished' +type ORM_GetCachedResponseWithFinished_Call struct { + *mock.Call +} + +// GetCachedResponseWithFinished is a helper method to define mock.On call +// - ctx context.Context +// - dotId string +// - specId int32 +// - maxElapsed time.Duration +func (_e *ORM_Expecter) GetCachedResponseWithFinished(ctx interface{}, dotId interface{}, specId interface{}, maxElapsed interface{}) *ORM_GetCachedResponseWithFinished_Call { + return &ORM_GetCachedResponseWithFinished_Call{Call: _e.mock.On("GetCachedResponseWithFinished", ctx, dotId, specId, maxElapsed)} +} + +func (_c *ORM_GetCachedResponseWithFinished_Call) Run(run func(ctx context.Context, dotId string, specId int32, maxElapsed time.Duration)) *ORM_GetCachedResponseWithFinished_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(int32), args[3].(time.Duration)) + }) + return _c +} + +func (_c *ORM_GetCachedResponseWithFinished_Call) Return(_a0 []byte, _a1 time.Time, _a2 error) *ORM_GetCachedResponseWithFinished_Call { + _c.Call.Return(_a0, _a1, _a2) + return _c +} + +func (_c *ORM_GetCachedResponseWithFinished_Call) RunAndReturn(run func(context.Context, string, int32, time.Duration) ([]byte, time.Time, error)) *ORM_GetCachedResponseWithFinished_Call { + _c.Call.Return(run) + return _c +} + // UpdateBridgeType provides a mock function with given fields: ctx, bt, btr func (_m *ORM) UpdateBridgeType(ctx context.Context, bt *bridges.BridgeType, btr *bridges.BridgeTypeRequest) error { ret := _m.Called(ctx, bt, btr) @@ -385,6 +776,36 @@ func (_m *ORM) UpdateBridgeType(ctx context.Context, bt *bridges.BridgeType, btr return r0 } +// ORM_UpdateBridgeType_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateBridgeType' +type ORM_UpdateBridgeType_Call struct { + *mock.Call +} + +// UpdateBridgeType is a helper method to define mock.On call +// - ctx context.Context +// - bt *bridges.BridgeType +// - btr *bridges.BridgeTypeRequest +func (_e *ORM_Expecter) UpdateBridgeType(ctx interface{}, bt interface{}, btr interface{}) *ORM_UpdateBridgeType_Call { + return &ORM_UpdateBridgeType_Call{Call: _e.mock.On("UpdateBridgeType", ctx, bt, btr)} +} + +func (_c *ORM_UpdateBridgeType_Call) Run(run func(ctx context.Context, bt *bridges.BridgeType, btr *bridges.BridgeTypeRequest)) *ORM_UpdateBridgeType_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*bridges.BridgeType), args[2].(*bridges.BridgeTypeRequest)) + }) + return _c +} + +func (_c *ORM_UpdateBridgeType_Call) Return(_a0 error) *ORM_UpdateBridgeType_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_UpdateBridgeType_Call) RunAndReturn(run func(context.Context, *bridges.BridgeType, *bridges.BridgeTypeRequest) error) *ORM_UpdateBridgeType_Call { + _c.Call.Return(run) + return _c +} + // UpsertBridgeResponse provides a mock function with given fields: ctx, dotId, specId, response func (_m *ORM) UpsertBridgeResponse(ctx context.Context, dotId string, specId int32, response []byte) error { ret := _m.Called(ctx, dotId, specId, response) @@ -403,6 +824,37 @@ func (_m *ORM) UpsertBridgeResponse(ctx context.Context, dotId string, specId in return r0 } +// ORM_UpsertBridgeResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpsertBridgeResponse' +type ORM_UpsertBridgeResponse_Call struct { + *mock.Call +} + +// UpsertBridgeResponse is a helper method to define mock.On call +// - ctx context.Context +// - dotId string +// - specId int32 +// - response []byte +func (_e *ORM_Expecter) UpsertBridgeResponse(ctx interface{}, dotId interface{}, specId interface{}, response interface{}) *ORM_UpsertBridgeResponse_Call { + return &ORM_UpsertBridgeResponse_Call{Call: _e.mock.On("UpsertBridgeResponse", ctx, dotId, specId, response)} +} + +func (_c *ORM_UpsertBridgeResponse_Call) Run(run func(ctx context.Context, dotId string, specId int32, response []byte)) *ORM_UpsertBridgeResponse_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(int32), args[3].([]byte)) + }) + return _c +} + +func (_c *ORM_UpsertBridgeResponse_Call) Return(_a0 error) *ORM_UpsertBridgeResponse_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_UpsertBridgeResponse_Call) RunAndReturn(run func(context.Context, string, int32, []byte) error) *ORM_UpsertBridgeResponse_Call { + _c.Call.Return(run) + return _c +} + // WithDataSource provides a mock function with given fields: _a0 func (_m *ORM) WithDataSource(_a0 sqlutil.DataSource) bridges.ORM { ret := _m.Called(_a0) @@ -423,6 +875,34 @@ func (_m *ORM) WithDataSource(_a0 sqlutil.DataSource) bridges.ORM { return r0 } +// ORM_WithDataSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithDataSource' +type ORM_WithDataSource_Call struct { + *mock.Call +} + +// WithDataSource is a helper method to define mock.On call +// - _a0 sqlutil.DataSource +func (_e *ORM_Expecter) WithDataSource(_a0 interface{}) *ORM_WithDataSource_Call { + return &ORM_WithDataSource_Call{Call: _e.mock.On("WithDataSource", _a0)} +} + +func (_c *ORM_WithDataSource_Call) Run(run func(_a0 sqlutil.DataSource)) *ORM_WithDataSource_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(sqlutil.DataSource)) + }) + return _c +} + +func (_c *ORM_WithDataSource_Call) Return(_a0 bridges.ORM) *ORM_WithDataSource_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_WithDataSource_Call) RunAndReturn(run func(sqlutil.DataSource) bridges.ORM) *ORM_WithDataSource_Call { + _c.Call.Return(run) + return _c +} + // NewORM creates a new instance of ORM. 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 NewORM(t interface { diff --git a/core/bridges/orm.go b/core/bridges/orm.go index edacdec85b6..b20c95f161d 100644 --- a/core/bridges/orm.go +++ b/core/bridges/orm.go @@ -13,8 +13,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/auth" ) -//go:generate mockery --quiet --name ORM --output ./mocks --case=underscore - type ORM interface { FindBridge(ctx context.Context, name BridgeName) (bt BridgeType, err error) FindBridges(ctx context.Context, name []BridgeName) (bts []BridgeType, err error) diff --git a/core/capabilities/launcher.go b/core/capabilities/launcher.go new file mode 100644 index 00000000000..267e32055e9 --- /dev/null +++ b/core/capabilities/launcher.go @@ -0,0 +1,532 @@ +package capabilities + +import ( + "context" + "errors" + "fmt" + "strings" + "time" + + "google.golang.org/protobuf/proto" + + "github.com/smartcontractkit/chainlink-common/pkg/capabilities" + "github.com/smartcontractkit/chainlink-common/pkg/capabilities/triggers" + "github.com/smartcontractkit/chainlink-common/pkg/services" + "github.com/smartcontractkit/chainlink-common/pkg/types/core" + + "github.com/smartcontractkit/libocr/ragep2p" + ragetypes "github.com/smartcontractkit/libocr/ragep2p/types" + + "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote" + "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/target" + remotetypes "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/types" + "github.com/smartcontractkit/chainlink/v2/core/capabilities/streams" + kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/capabilities_registry" + "github.com/smartcontractkit/chainlink/v2/core/logger" + p2ptypes "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types" + "github.com/smartcontractkit/chainlink/v2/core/services/registrysyncer" +) + +var defaultStreamConfig = p2ptypes.StreamConfig{ + IncomingMessageBufferSize: 1000000, + OutgoingMessageBufferSize: 1000000, + MaxMessageLenBytes: 100000, + MessageRateLimiter: ragep2p.TokenBucketParams{ + Rate: 100.0, + Capacity: 1000, + }, + BytesRateLimiter: ragep2p.TokenBucketParams{ + Rate: 100000.0, + Capacity: 1000000, + }, +} + +type launcher struct { + services.StateMachine + lggr logger.Logger + peerWrapper p2ptypes.PeerWrapper + dispatcher remotetypes.Dispatcher + registry core.CapabilitiesRegistry + localNode capabilities.Node + subServices []services.Service +} + +func NewLauncher( + lggr logger.Logger, + peerWrapper p2ptypes.PeerWrapper, + dispatcher remotetypes.Dispatcher, + registry core.CapabilitiesRegistry, +) *launcher { + return &launcher{ + lggr: lggr.Named("CapabilitiesLauncher"), + peerWrapper: peerWrapper, + dispatcher: dispatcher, + registry: registry, + subServices: []services.Service{}, + } +} + +func (w *launcher) Start(ctx context.Context) error { + return nil +} + +func (w *launcher) Close() error { + for _, s := range w.subServices { + if err := s.Close(); err != nil { + w.lggr.Errorw("failed to close a sub-service", "name", s.Name(), "error", err) + } + } + + return w.peerWrapper.GetPeer().UpdateConnections(map[ragetypes.PeerID]p2ptypes.StreamConfig{}) +} + +func (w *launcher) Ready() error { + return nil +} + +func (w *launcher) HealthReport() map[string]error { + return nil +} + +func (w *launcher) Name() string { + return "CapabilitiesLauncher" +} + +func (w *launcher) LocalNode(ctx context.Context) (capabilities.Node, error) { + if w.peerWrapper.GetPeer() == nil { + return w.localNode, errors.New("unable to get local node: peerWrapper hasn't started yet") + } + + if w.localNode.WorkflowDON.ID == 0 { + return w.localNode, errors.New("unable to get local node: waiting for initial call from syncer") + } + + return w.localNode, nil +} + +func (w *launcher) updateLocalNode(state registrysyncer.State) { + pid := w.peerWrapper.GetPeer().ID() + + var workflowDON capabilities.DON + capabilityDONs := []capabilities.DON{} + for _, d := range state.IDsToDONs { + for _, p := range d.NodeP2PIds { + if p == pid { + if d.AcceptsWorkflows { + if workflowDON.ID == 0 { + workflowDON = *toDONInfo(d) + w.lggr.Debug("Workflow DON identified: %+v", workflowDON) + } else { + w.lggr.Errorf("Configuration error: node %s belongs to more than one workflowDON", pid) + } + } + + capabilityDONs = append(capabilityDONs, *toDONInfo(d)) + } + } + } + + w.localNode = capabilities.Node{ + PeerID: &pid, + WorkflowDON: workflowDON, + CapabilityDONs: capabilityDONs, + } +} + +func (w *launcher) Launch(ctx context.Context, state registrysyncer.State) error { + w.lggr.Debugw("running capabilities launcher", "state", state) + w.updateLocalNode(state) + + // Let's start by updating the list of Peers + // We do this by creating a new entry for each node belonging + // to a public DON. + // We also add the hardcoded peers determined by the NetworkSetup. + allPeers := make(map[ragetypes.PeerID]p2ptypes.StreamConfig) + + publicDONs := []kcr.CapabilitiesRegistryDONInfo{} + for _, d := range state.IDsToDONs { + if !d.IsPublic { + continue + } + + publicDONs = append(publicDONs, d) + + for _, nid := range d.NodeP2PIds { + allPeers[nid] = defaultStreamConfig + } + } + + // TODO: be a bit smarter about who we connect to; we should ideally only + // be connecting to peers when we need to. + // https://smartcontract-it.atlassian.net/browse/KS-330 + err := w.peerWrapper.GetPeer().UpdateConnections(allPeers) + if err != nil { + return fmt.Errorf("failed to update peer connections: %w", err) + } + + // Next, we need to split the DONs into the following: + // - workflow DONs the current node is a part of. + // These will need remote shims to all remote capabilities on other DONs. + // + // We'll also construct a set to record what DONs the current node is a part of, + // regardless of any modifiers (public/acceptsWorkflows etc). + myID := w.peerWrapper.GetPeer().ID() + myWorkflowDONs := []kcr.CapabilitiesRegistryDONInfo{} + remoteWorkflowDONs := []kcr.CapabilitiesRegistryDONInfo{} + myDONs := map[uint32]bool{} + for _, d := range state.IDsToDONs { + for _, peerID := range d.NodeP2PIds { + if peerID == myID { + myDONs[d.Id] = true + } + } + + if d.AcceptsWorkflows { + if myDONs[d.Id] { + myWorkflowDONs = append(myWorkflowDONs, d) + } else { + remoteWorkflowDONs = append(remoteWorkflowDONs, d) + } + } + } + + // - remote capability DONs (with IsPublic = true) the current node is a part of. + // These need server-side shims. + myCapabilityDONs := []kcr.CapabilitiesRegistryDONInfo{} + remoteCapabilityDONs := []kcr.CapabilitiesRegistryDONInfo{} + for _, d := range publicDONs { + if len(d.CapabilityConfigurations) > 0 { + if myDONs[d.Id] { + myCapabilityDONs = append(myCapabilityDONs, d) + } else { + remoteCapabilityDONs = append(remoteCapabilityDONs, d) + } + } + } + + // Now, if my node is a workflow DON, let's setup any shims + // to external capabilities. + if len(myWorkflowDONs) > 0 { + myDON := myWorkflowDONs[0] + + // NOTE: this is enforced on-chain and so should never happen. + if len(myWorkflowDONs) > 1 { + w.lggr.Error("invariant violation: node is part of more than one workflowDON: this shouldn't happen.") + } + + for _, rcd := range remoteCapabilityDONs { + err := w.addRemoteCapabilities(ctx, myDON, rcd, state) + if err != nil { + return err + } + } + } + + // Finally, if I'm a capability DON, let's enable external access + // to the capability. + if len(myCapabilityDONs) > 0 { + for _, mcd := range myCapabilityDONs { + err := w.exposeCapabilities(ctx, myID, mcd, state, remoteWorkflowDONs) + if err != nil { + return err + } + } + } + + return nil +} + +func (w *launcher) addRemoteCapabilities(ctx context.Context, myDON kcr.CapabilitiesRegistryDONInfo, remoteDON kcr.CapabilitiesRegistryDONInfo, state registrysyncer.State) error { + for _, c := range remoteDON.CapabilityConfigurations { + capability, ok := state.IDsToCapabilities[c.CapabilityId] + if !ok { + return fmt.Errorf("could not find capability matching id %s", c.CapabilityId) + } + + switch toCapabilityType(capability.CapabilityType) { + case capabilities.CapabilityTypeTrigger: + newTriggerFn := func(info capabilities.CapabilityInfo) (capabilityService, error) { + if !strings.HasPrefix(info.ID, "streams-trigger") { + return nil, errors.New("not supported: trigger capability does not have id = streams-trigger") + } + + codec := streams.NewCodec(w.lggr) + + signers, err := signersFor(remoteDON, state) + if err != nil { + return nil, err + } + + aggregator := triggers.NewMercuryRemoteAggregator( + codec, + signers, + int(remoteDON.F+1), + w.lggr, + ) + cfg := &remotetypes.RemoteTriggerConfig{} + cfg.ApplyDefaults() + err = proto.Unmarshal(c.Config, cfg) + if err != nil { + return nil, err + } + // TODO: We need to implement a custom, Mercury-specific + // aggregator here, because there is no guarantee that + // all trigger events in the workflow will have the same + // payloads. As a workaround, we validate the signatures. + // When this is solved, we can move to a generic aggregator + // and remove this. + triggerCap := remote.NewTriggerSubscriber( + cfg, + info, + *toDONInfo(remoteDON), + *toDONInfo(myDON), + w.dispatcher, + aggregator, + w.lggr, + ) + return triggerCap, nil + } + err := w.addToRegistryAndSetDispatcher(ctx, capability, remoteDON, newTriggerFn) + if err != nil { + return fmt.Errorf("failed to add trigger shim: %w", err) + } + case capabilities.CapabilityTypeAction: + w.lggr.Warn("no remote client configured for capability type action, skipping configuration") + case capabilities.CapabilityTypeConsensus: + w.lggr.Warn("no remote client configured for capability type consensus, skipping configuration") + case capabilities.CapabilityTypeTarget: + newTargetFn := func(info capabilities.CapabilityInfo) (capabilityService, error) { + client := target.NewClient( + info, + *toDONInfo(myDON), + w.dispatcher, + defaultTargetRequestTimeout, + w.lggr, + ) + return client, nil + } + + err := w.addToRegistryAndSetDispatcher(ctx, capability, remoteDON, newTargetFn) + if err != nil { + return fmt.Errorf("failed to add target shim: %w", err) + } + default: + w.lggr.Warnf("unknown capability type, skipping configuration: %+v", capability) + } + } + return nil +} + +type capabilityService interface { + capabilities.BaseCapability + remotetypes.Receiver + services.Service +} + +func (w *launcher) addToRegistryAndSetDispatcher(ctx context.Context, capabilityInfo kcr.CapabilitiesRegistryCapabilityInfo, don kcr.CapabilitiesRegistryDONInfo, newCapFn func(info capabilities.CapabilityInfo) (capabilityService, error)) error { + fullCapID := fmt.Sprintf("%s@%s", capabilityInfo.LabelledName, capabilityInfo.Version) + info, err := capabilities.NewRemoteCapabilityInfo( + fullCapID, + toCapabilityType(capabilityInfo.CapabilityType), + fmt.Sprintf("Remote Capability for %s", fullCapID), + toDONInfo(don), + ) + if err != nil { + return fmt.Errorf("failed to create remote capability info: %w", err) + } + w.lggr.Debugw("Adding remote capability to registry", "id", info.ID, "don", info.DON) + capability, err := newCapFn(info) + if err != nil { + return fmt.Errorf("failed to instantiate capability: %w", err) + } + + err = w.registry.Add(ctx, capability) + if err != nil { + // If the capability already exists, then it's either local + // or we've handled this in a previous syncer iteration, + // let's skip and move on to other capabilities. + if errors.Is(err, ErrCapabilityAlreadyExists) { + return nil + } + + return fmt.Errorf("failed to add capability to registry: %w", err) + } + + err = w.dispatcher.SetReceiver( + fullCapID, + don.Id, + capability, + ) + if err != nil { + return err + } + w.lggr.Debugw("Setting receiver for capability", "id", fullCapID, "donID", don.Id) + err = capability.Start(ctx) + if err != nil { + return fmt.Errorf("failed to start capability: %w", err) + } + w.subServices = append(w.subServices, capability) + return nil +} + +var ( + defaultTargetRequestTimeout = time.Minute +) + +func (w *launcher) exposeCapabilities(ctx context.Context, myPeerID p2ptypes.PeerID, don kcr.CapabilitiesRegistryDONInfo, state registrysyncer.State, remoteWorkflowDONs []kcr.CapabilitiesRegistryDONInfo) error { + idsToDONs := map[uint32]capabilities.DON{} + for _, d := range remoteWorkflowDONs { + idsToDONs[d.Id] = *toDONInfo(d) + } + + for _, c := range don.CapabilityConfigurations { + capability, ok := state.IDsToCapabilities[c.CapabilityId] + if !ok { + return fmt.Errorf("could not find capability matching id %s", c.CapabilityId) + } + + switch toCapabilityType(capability.CapabilityType) { + case capabilities.CapabilityTypeTrigger: + newTriggerPublisher := func(capability capabilities.BaseCapability, info capabilities.CapabilityInfo) (receiverService, error) { + cfg := &remotetypes.RemoteTriggerConfig{} + cfg.ApplyDefaults() + err := proto.Unmarshal(c.Config, cfg) + if err != nil { + return nil, err + } + publisher := remote.NewTriggerPublisher( + cfg, + capability.(capabilities.TriggerCapability), + info, + *toDONInfo(don), + idsToDONs, + w.dispatcher, + w.lggr, + ) + return publisher, nil + } + + err := w.addReceiver(ctx, capability, don, newTriggerPublisher) + if err != nil { + return fmt.Errorf("failed to add server-side receiver: %w", err) + } + case capabilities.CapabilityTypeAction: + w.lggr.Warn("no remote client configured for capability type action, skipping configuration") + case capabilities.CapabilityTypeConsensus: + w.lggr.Warn("no remote client configured for capability type consensus, skipping configuration") + case capabilities.CapabilityTypeTarget: + newTargetServer := func(capability capabilities.BaseCapability, info capabilities.CapabilityInfo) (receiverService, error) { + return target.NewServer( + myPeerID, + capability.(capabilities.TargetCapability), + info, + *toDONInfo(don), + idsToDONs, + w.dispatcher, + defaultTargetRequestTimeout, + w.lggr, + ), nil + } + + err := w.addReceiver(ctx, capability, don, newTargetServer) + if err != nil { + return fmt.Errorf("failed to add server-side receiver: %w", err) + } + default: + w.lggr.Warnf("unknown capability type, skipping configuration: %+v", capability) + } + } + return nil +} + +type receiverService interface { + services.Service + remotetypes.Receiver +} + +func (w *launcher) addReceiver(ctx context.Context, capability kcr.CapabilitiesRegistryCapabilityInfo, don kcr.CapabilitiesRegistryDONInfo, newReceiverFn func(capability capabilities.BaseCapability, info capabilities.CapabilityInfo) (receiverService, error)) error { + fullCapID := fmt.Sprintf("%s@%s", capability.LabelledName, capability.Version) + info, err := capabilities.NewRemoteCapabilityInfo( + fullCapID, + toCapabilityType(capability.CapabilityType), + fmt.Sprintf("Remote Capability for %s", fullCapID), + toDONInfo(don), + ) + if err != nil { + return fmt.Errorf("failed to instantiate remote capability for receiver: %w", err) + } + underlying, err := w.registry.Get(ctx, fullCapID) + if err != nil { + return fmt.Errorf("failed to get capability from registry: %w", err) + } + + receiver, err := newReceiverFn(underlying, info) + if err != nil { + return fmt.Errorf("failed to instantiate receiver: %w", err) + } + + w.lggr.Debugw("Enabling external access for capability", "id", fullCapID, "donID", don.Id) + err = w.dispatcher.SetReceiver(fullCapID, don.Id, receiver) + if errors.Is(err, remote.ErrReceiverExists) { + // If a receiver already exists, let's log the error for debug purposes, but + // otherwise short-circuit here. We've handled this capability in a previous iteration. + w.lggr.Debugf("receiver already exists for cap ID %s and don ID %d: %s", fullCapID, don.Id, err) + return nil + } else if err != nil { + return fmt.Errorf("failed to set receiver: %w", err) + } + + err = receiver.Start(ctx) + if err != nil { + return fmt.Errorf("failed to start receiver: %w", err) + } + + w.subServices = append(w.subServices, receiver) + return nil +} + +func signersFor(don kcr.CapabilitiesRegistryDONInfo, state registrysyncer.State) ([][]byte, error) { + s := [][]byte{} + for _, nodeID := range don.NodeP2PIds { + node, ok := state.IDsToNodes[nodeID] + if !ok { + return nil, fmt.Errorf("could not find node for id %s", nodeID) + } + + // NOTE: the capability registry stores signers as [32]byte, + // but we only need the first [20], as the rest is padded. + s = append(s, node.Signer[0:20]) + } + + return s, nil +} + +func toDONInfo(don kcr.CapabilitiesRegistryDONInfo) *capabilities.DON { + peerIDs := []p2ptypes.PeerID{} + for _, p := range don.NodeP2PIds { + peerIDs = append(peerIDs, p) + } + + return &capabilities.DON{ + ID: don.Id, + ConfigVersion: don.ConfigCount, + Members: peerIDs, + F: don.F, + } +} + +func toCapabilityType(capabilityType uint8) capabilities.CapabilityType { + switch capabilityType { + case 0: + return capabilities.CapabilityTypeTrigger + case 1: + return capabilities.CapabilityTypeAction + case 2: + return capabilities.CapabilityTypeConsensus + case 3: + return capabilities.CapabilityTypeTarget + default: + // Not found + return capabilities.CapabilityType(-1) + } +} diff --git a/core/capabilities/launcher_test.go b/core/capabilities/launcher_test.go new file mode 100644 index 00000000000..d314be6069d --- /dev/null +++ b/core/capabilities/launcher_test.go @@ -0,0 +1,831 @@ +package capabilities + +import ( + "context" + "crypto/rand" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + + ragetypes "github.com/smartcontractkit/libocr/ragep2p/types" + + "github.com/smartcontractkit/chainlink-common/pkg/capabilities" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" + "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote" + remoteMocks "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/types/mocks" + kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/capabilities_registry" + "github.com/smartcontractkit/chainlink/v2/core/logger" + p2ptypes "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types" + "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types/mocks" + "github.com/smartcontractkit/chainlink/v2/core/services/registrysyncer" +) + +type mockTrigger struct { + capabilities.CapabilityInfo +} + +func (m *mockTrigger) RegisterTrigger(ctx context.Context, request capabilities.CapabilityRequest) (<-chan capabilities.CapabilityResponse, error) { + return nil, nil +} + +func (m *mockTrigger) UnregisterTrigger(ctx context.Context, request capabilities.CapabilityRequest) error { + return nil +} + +func newMockTrigger(info capabilities.CapabilityInfo) *mockTrigger { + return &mockTrigger{CapabilityInfo: info} +} + +type mockCapability struct { + capabilities.CapabilityInfo +} + +func (m *mockCapability) Execute(ctx context.Context, req capabilities.CapabilityRequest) (<-chan capabilities.CapabilityResponse, error) { + return nil, nil +} + +func (m *mockCapability) RegisterToWorkflow(ctx context.Context, request capabilities.RegisterToWorkflowRequest) error { + return nil +} + +func (m *mockCapability) UnregisterFromWorkflow(ctx context.Context, request capabilities.UnregisterFromWorkflowRequest) error { + return nil +} + +func randomWord() [32]byte { + word := make([]byte, 32) + _, err := rand.Read(word) + if err != nil { + panic(err) + } + return [32]byte(word) +} + +func TestLauncher_WiresUpExternalCapabilities(t *testing.T) { + ctx := tests.Context(t) + lggr := logger.TestLogger(t) + registry := NewRegistry(lggr) + dispatcher := remoteMocks.NewDispatcher(t) + + var pid ragetypes.PeerID + err := pid.UnmarshalText([]byte("12D3KooWBCF1XT5Wi8FzfgNCqRL76Swv8TRU3TiD4QiJm8NMNX7N")) + require.NoError(t, err) + peer := mocks.NewPeer(t) + peer.On("UpdateConnections", mock.Anything).Return(nil) + peer.On("ID").Return(pid) + wrapper := mocks.NewPeerWrapper(t) + wrapper.On("GetPeer").Return(peer) + + nodes := [][32]byte{ + pid, + randomWord(), + randomWord(), + randomWord(), + } + + fullTriggerCapID := "streams-trigger@1.0.0" + mt := newMockTrigger(capabilities.MustNewCapabilityInfo( + fullTriggerCapID, + capabilities.CapabilityTypeTrigger, + "streams trigger", + )) + require.NoError(t, registry.Add(ctx, mt)) + + fullTargetID := "write-chain_evm_1@1.0.0" + mtarg := &mockCapability{ + CapabilityInfo: capabilities.MustNewCapabilityInfo( + fullTargetID, + capabilities.CapabilityTypeTarget, + "write chain", + ), + } + require.NoError(t, registry.Add(ctx, mtarg)) + + triggerCapID := randomWord() + targetCapID := randomWord() + dID := uint32(1) + // The below state describes a Workflow DON (AcceptsWorkflows = true), + // which exposes the streams-trigger and write_chain capabilities. + // We expect a publisher to be wired up with this configuration, and + // no entries should be added to the registry. + state := registrysyncer.State{ + IDsToDONs: map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{ + registrysyncer.DonID(dID): { + Id: dID, + ConfigCount: uint32(0), + F: uint8(1), + IsPublic: true, + AcceptsWorkflows: true, + NodeP2PIds: nodes, + CapabilityConfigurations: []kcr.CapabilitiesRegistryCapabilityConfiguration{ + { + CapabilityId: triggerCapID, + Config: []byte(""), + }, + { + CapabilityId: targetCapID, + Config: []byte(""), + }, + }, + }, + }, + IDsToCapabilities: map[registrysyncer.HashedCapabilityID]kcr.CapabilitiesRegistryCapabilityInfo{ + triggerCapID: { + LabelledName: "streams-trigger", + Version: "1.0.0", + CapabilityType: 0, + }, + targetCapID: { + LabelledName: "write-chain_evm_1", + Version: "1.0.0", + CapabilityType: 3, + }, + }, + IDsToNodes: map[p2ptypes.PeerID]kcr.CapabilitiesRegistryNodeInfo{ + nodes[0]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: nodes[0], + HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, + }, + nodes[1]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: nodes[1], + HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, + }, + nodes[2]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: nodes[2], + HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, + }, + nodes[3]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: nodes[3], + HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, + }, + }, + } + + launcher := NewLauncher( + lggr, + wrapper, + dispatcher, + registry, + ) + + dispatcher.On("SetReceiver", fullTriggerCapID, dID, mock.AnythingOfType("*remote.triggerPublisher")).Return(nil) + dispatcher.On("SetReceiver", fullTargetID, dID, mock.AnythingOfType("*target.server")).Return(nil) + + err = launcher.Launch(ctx, state) + require.NoError(t, err) + defer launcher.Close() +} + +func TestSyncer_IgnoresCapabilitiesForPrivateDON(t *testing.T) { + ctx := tests.Context(t) + lggr := logger.TestLogger(t) + registry := NewRegistry(lggr) + dispatcher := remoteMocks.NewDispatcher(t) + + var pid ragetypes.PeerID + err := pid.UnmarshalText([]byte("12D3KooWBCF1XT5Wi8FzfgNCqRL76Swv8TRU3TiD4QiJm8NMNX7N")) + require.NoError(t, err) + peer := mocks.NewPeer(t) + peer.On("UpdateConnections", mock.Anything).Return(nil) + peer.On("ID").Return(pid) + wrapper := mocks.NewPeerWrapper(t) + wrapper.On("GetPeer").Return(peer) + + nodes := [][32]byte{ + pid, + randomWord(), + randomWord(), + randomWord(), + } + + triggerCapID := randomWord() + targetCapID := randomWord() + dID := uint32(1) + // The below state describes a Workflow DON (AcceptsWorkflows = true), + // which isn't public (IsPublic = false), but hosts the + // the streams-trigger and write_chain capabilities. + // We expect no action to be taken by the syncer. + state := registrysyncer.State{ + IDsToDONs: map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{ + registrysyncer.DonID(dID): { + Id: dID, + ConfigCount: uint32(0), + F: uint8(1), + IsPublic: false, + AcceptsWorkflows: true, + NodeP2PIds: nodes, + CapabilityConfigurations: []kcr.CapabilitiesRegistryCapabilityConfiguration{ + { + CapabilityId: triggerCapID, + Config: []byte(""), + }, + { + CapabilityId: targetCapID, + Config: []byte(""), + }, + }, + }, + }, + IDsToCapabilities: map[registrysyncer.HashedCapabilityID]kcr.CapabilitiesRegistryCapabilityInfo{ + triggerCapID: { + LabelledName: "streams-trigger", + Version: "1.0.0", + CapabilityType: 0, + }, + targetCapID: { + LabelledName: "write-chain_evm_1", + Version: "1.0.0", + CapabilityType: 3, + }, + }, + IDsToNodes: map[p2ptypes.PeerID]kcr.CapabilitiesRegistryNodeInfo{ + nodes[0]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: nodes[0], + HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, + }, + nodes[1]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: nodes[1], + HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, + }, + nodes[2]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: nodes[2], + HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, + }, + nodes[3]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: nodes[3], + HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, + }, + }, + } + + launcher := NewLauncher( + lggr, + wrapper, + dispatcher, + registry, + ) + + // If the DON were public, this would fail with two errors: + // - error fetching the capabilities from the registry since they haven't been added + // - erroneous calls to dispatcher.SetReceiver, since the call hasn't been registered. + err = launcher.Launch(ctx, state) + require.NoError(t, err) + defer launcher.Close() + + // Finally, assert that no services were added. + assert.Len(t, launcher.subServices, 0) +} + +func TestLauncher_WiresUpClientsForPublicWorkflowDON(t *testing.T) { + ctx := tests.Context(t) + lggr := logger.TestLogger(t) + registry := NewRegistry(lggr) + dispatcher := remoteMocks.NewDispatcher(t) + + var pid ragetypes.PeerID + err := pid.UnmarshalText([]byte("12D3KooWBCF1XT5Wi8FzfgNCqRL76Swv8TRU3TiD4QiJm8NMNX7N")) + require.NoError(t, err) + peer := mocks.NewPeer(t) + peer.On("UpdateConnections", mock.Anything).Return(nil) + peer.On("ID").Return(pid) + wrapper := mocks.NewPeerWrapper(t) + wrapper.On("GetPeer").Return(peer) + + workflowDonNodes := [][32]byte{ + pid, + randomWord(), + randomWord(), + randomWord(), + } + + capabilityDonNodes := [][32]byte{ + randomWord(), + randomWord(), + randomWord(), + randomWord(), + } + + fullTriggerCapID := "streams-trigger@1.0.0" + fullTargetID := "write-chain_evm_1@1.0.0" + triggerCapID := randomWord() + targetCapID := randomWord() + dID := uint32(1) + capDonID := uint32(2) + // The below state describes a Workflow DON (AcceptsWorkflows = true), + // which exposes the streams-trigger and write_chain capabilities. + // We expect receivers to be wired up and both capabilities to be added to the registry. + state := registrysyncer.State{ + IDsToDONs: map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{ + registrysyncer.DonID(dID): { + Id: dID, + ConfigCount: uint32(0), + F: uint8(1), + IsPublic: true, + AcceptsWorkflows: true, + NodeP2PIds: workflowDonNodes, + }, + registrysyncer.DonID(capDonID): { + Id: capDonID, + ConfigCount: uint32(0), + F: uint8(1), + IsPublic: true, + AcceptsWorkflows: false, + NodeP2PIds: capabilityDonNodes, + CapabilityConfigurations: []kcr.CapabilitiesRegistryCapabilityConfiguration{ + { + CapabilityId: triggerCapID, + Config: []byte(""), + }, + { + CapabilityId: targetCapID, + Config: []byte(""), + }, + }, + }, + }, + IDsToCapabilities: map[registrysyncer.HashedCapabilityID]kcr.CapabilitiesRegistryCapabilityInfo{ + triggerCapID: { + LabelledName: "streams-trigger", + Version: "1.0.0", + CapabilityType: 0, + }, + targetCapID: { + LabelledName: "write-chain_evm_1", + Version: "1.0.0", + CapabilityType: 3, + }, + }, + IDsToNodes: map[p2ptypes.PeerID]kcr.CapabilitiesRegistryNodeInfo{ + capabilityDonNodes[0]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: capabilityDonNodes[0], + HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, + }, + capabilityDonNodes[1]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: capabilityDonNodes[1], + HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, + }, + capabilityDonNodes[2]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: capabilityDonNodes[2], + HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, + }, + capabilityDonNodes[3]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: capabilityDonNodes[3], + HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, + }, + workflowDonNodes[0]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: workflowDonNodes[0], + }, + workflowDonNodes[1]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: workflowDonNodes[1], + }, + workflowDonNodes[2]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: workflowDonNodes[2], + }, + workflowDonNodes[3]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: workflowDonNodes[3], + }, + }, + } + + launcher := NewLauncher( + lggr, + wrapper, + dispatcher, + registry, + ) + + dispatcher.On("SetReceiver", fullTriggerCapID, capDonID, mock.AnythingOfType("*remote.triggerSubscriber")).Return(nil) + dispatcher.On("SetReceiver", fullTargetID, capDonID, mock.AnythingOfType("*target.client")).Return(nil) + + err = launcher.Launch(ctx, state) + require.NoError(t, err) + defer launcher.Close() + + _, err = registry.Get(ctx, fullTriggerCapID) + require.NoError(t, err) + + _, err = registry.Get(ctx, fullTargetID) + require.NoError(t, err) +} + +func TestLauncher_WiresUpClientsForPublicWorkflowDONButIgnoresPrivateCapabilities(t *testing.T) { + ctx := tests.Context(t) + lggr := logger.TestLogger(t) + registry := NewRegistry(lggr) + dispatcher := remoteMocks.NewDispatcher(t) + + var pid ragetypes.PeerID + err := pid.UnmarshalText([]byte("12D3KooWBCF1XT5Wi8FzfgNCqRL76Swv8TRU3TiD4QiJm8NMNX7N")) + require.NoError(t, err) + peer := mocks.NewPeer(t) + peer.On("UpdateConnections", mock.Anything).Return(nil) + peer.On("ID").Return(pid) + wrapper := mocks.NewPeerWrapper(t) + wrapper.On("GetPeer").Return(peer) + + workflowDonNodes := [][32]byte{ + pid, + randomWord(), + randomWord(), + randomWord(), + } + + capabilityDonNodes := [][32]byte{ + randomWord(), + randomWord(), + randomWord(), + randomWord(), + } + + fullTriggerCapID := "streams-trigger@1.0.0" + triggerCapID := randomWord() + targetCapID := randomWord() + dID := uint32(1) + triggerCapDonID := uint32(2) + targetCapDonID := uint32(3) + // The below state describes a Workflow DON (AcceptsWorkflows = true), + // which exposes the streams-trigger and write_chain capabilities. + // We expect receivers to be wired up and both capabilities to be added to the registry. + state := registrysyncer.State{ + IDsToDONs: map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{ + registrysyncer.DonID(dID): { + Id: dID, + ConfigCount: uint32(0), + F: uint8(1), + IsPublic: true, + AcceptsWorkflows: true, + NodeP2PIds: workflowDonNodes, + }, + registrysyncer.DonID(triggerCapDonID): { + Id: triggerCapDonID, + ConfigCount: uint32(0), + F: uint8(1), + IsPublic: true, + AcceptsWorkflows: false, + NodeP2PIds: capabilityDonNodes, + CapabilityConfigurations: []kcr.CapabilitiesRegistryCapabilityConfiguration{ + { + CapabilityId: triggerCapID, + Config: []byte(""), + }, + }, + }, + registrysyncer.DonID(targetCapDonID): { + Id: targetCapDonID, + ConfigCount: uint32(0), + F: uint8(1), + IsPublic: false, + AcceptsWorkflows: false, + NodeP2PIds: capabilityDonNodes, + CapabilityConfigurations: []kcr.CapabilitiesRegistryCapabilityConfiguration{ + { + CapabilityId: targetCapID, + Config: []byte(""), + }, + }, + }, + }, + IDsToCapabilities: map[registrysyncer.HashedCapabilityID]kcr.CapabilitiesRegistryCapabilityInfo{ + triggerCapID: { + LabelledName: "streams-trigger", + Version: "1.0.0", + CapabilityType: 0, + }, + targetCapID: { + LabelledName: "write-chain_evm_1", + Version: "1.0.0", + CapabilityType: 3, + }, + }, + IDsToNodes: map[p2ptypes.PeerID]kcr.CapabilitiesRegistryNodeInfo{ + capabilityDonNodes[0]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: capabilityDonNodes[0], + HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, + }, + capabilityDonNodes[1]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: capabilityDonNodes[1], + HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, + }, + capabilityDonNodes[2]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: capabilityDonNodes[2], + HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, + }, + capabilityDonNodes[3]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: capabilityDonNodes[3], + HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, + }, + workflowDonNodes[0]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: workflowDonNodes[0], + }, + workflowDonNodes[1]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: workflowDonNodes[1], + }, + workflowDonNodes[2]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: workflowDonNodes[2], + }, + workflowDonNodes[3]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: workflowDonNodes[3], + }, + }, + } + + launcher := NewLauncher( + lggr, + wrapper, + dispatcher, + registry, + ) + + dispatcher.On("SetReceiver", fullTriggerCapID, triggerCapDonID, mock.AnythingOfType("*remote.triggerSubscriber")).Return(nil) + + err = launcher.Launch(ctx, state) + require.NoError(t, err) + defer launcher.Close() + + _, err = registry.Get(ctx, fullTriggerCapID) + require.NoError(t, err) +} + +func toPeerIDs(is [][32]byte) (out []p2ptypes.PeerID) { + for _, i := range is { + out = append(out, i) + } + + return out +} + +func TestLauncher_LocalNode(t *testing.T) { + ctx := tests.Context(t) + lggr := logger.TestLogger(t) + registry := NewRegistry(lggr) + dispatcher := remoteMocks.NewDispatcher(t) + + var pid ragetypes.PeerID + err := pid.UnmarshalText([]byte("12D3KooWBCF1XT5Wi8FzfgNCqRL76Swv8TRU3TiD4QiJm8NMNX7N")) + require.NoError(t, err) + peer := mocks.NewPeer(t) + peer.On("UpdateConnections", mock.Anything).Return(nil) + peer.On("ID").Return(pid) + wrapper := mocks.NewPeerWrapper(t) + wrapper.On("GetPeer").Return(peer) + + workflowDonNodes := [][32]byte{ + pid, + randomWord(), + randomWord(), + randomWord(), + } + + dID := uint32(1) + // The below state describes a Workflow DON (AcceptsWorkflows = true), + // which exposes the streams-trigger and write_chain capabilities. + // We expect receivers to be wired up and both capabilities to be added to the registry. + state := registrysyncer.State{ + IDsToDONs: map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{ + registrysyncer.DonID(dID): { + Id: dID, + ConfigCount: uint32(2), + F: uint8(1), + IsPublic: true, + AcceptsWorkflows: true, + NodeP2PIds: workflowDonNodes, + }, + }, + IDsToNodes: map[p2ptypes.PeerID]kcr.CapabilitiesRegistryNodeInfo{ + workflowDonNodes[0]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: workflowDonNodes[0], + }, + workflowDonNodes[1]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: workflowDonNodes[1], + }, + workflowDonNodes[2]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: workflowDonNodes[2], + }, + workflowDonNodes[3]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: workflowDonNodes[3], + }, + }, + } + + launcher := NewLauncher( + lggr, + wrapper, + dispatcher, + registry, + ) + + err = launcher.Launch(ctx, state) + require.NoError(t, err) + defer launcher.Close() + + node, err := launcher.LocalNode(ctx) + require.NoError(t, err) + + don := capabilities.DON{ + ID: dID, + ConfigVersion: 2, + Members: toPeerIDs(workflowDonNodes), + F: 1, + } + expectedNode := capabilities.Node{ + PeerID: &pid, + WorkflowDON: don, + CapabilityDONs: []capabilities.DON{don}, + } + assert.Equal(t, expectedNode, node) +} + +func TestLauncher_SucceedsEvenIfDispatcherAlreadyHasReceiver(t *testing.T) { + ctx := tests.Context(t) + lggr := logger.TestLogger(t) + registry := NewRegistry(lggr) + dispatcher := remoteMocks.NewDispatcher(t) + + var pid ragetypes.PeerID + err := pid.UnmarshalText([]byte("12D3KooWBCF1XT5Wi8FzfgNCqRL76Swv8TRU3TiD4QiJm8NMNX7N")) + require.NoError(t, err) + peer := mocks.NewPeer(t) + peer.On("UpdateConnections", mock.Anything).Return(nil) + peer.On("ID").Return(pid) + wrapper := mocks.NewPeerWrapper(t) + wrapper.On("GetPeer").Return(peer) + + fullTriggerCapID := "streams-trigger@1.0.0" + mt := newMockTrigger(capabilities.MustNewCapabilityInfo( + fullTriggerCapID, + capabilities.CapabilityTypeTrigger, + "streams trigger", + )) + require.NoError(t, registry.Add(ctx, mt)) + + workflowDonNodes := [][32]byte{ + randomWord(), + randomWord(), + randomWord(), + randomWord(), + } + + capabilityDonNodes := [][32]byte{ + pid, + randomWord(), + randomWord(), + randomWord(), + } + + triggerCapID := randomWord() + dID := uint32(1) + capDonID := uint32(2) + // The below state describes a Capability DON (AcceptsWorkflows = true), + // which exposes the streams-trigger and write_chain capabilities. + // We expect receivers to be wired up. + state := registrysyncer.State{ + IDsToDONs: map[registrysyncer.DonID]kcr.CapabilitiesRegistryDONInfo{ + registrysyncer.DonID(dID): { + Id: dID, + ConfigCount: uint32(0), + F: uint8(1), + IsPublic: true, + AcceptsWorkflows: true, + NodeP2PIds: workflowDonNodes, + }, + registrysyncer.DonID(capDonID): { + Id: capDonID, + ConfigCount: uint32(0), + F: uint8(1), + IsPublic: true, + AcceptsWorkflows: false, + NodeP2PIds: capabilityDonNodes, + CapabilityConfigurations: []kcr.CapabilitiesRegistryCapabilityConfiguration{ + { + CapabilityId: triggerCapID, + Config: []byte(""), + }, + }, + }, + }, + IDsToCapabilities: map[registrysyncer.HashedCapabilityID]kcr.CapabilitiesRegistryCapabilityInfo{ + triggerCapID: { + LabelledName: "streams-trigger", + Version: "1.0.0", + CapabilityType: 0, + }, + }, + IDsToNodes: map[p2ptypes.PeerID]kcr.CapabilitiesRegistryNodeInfo{ + capabilityDonNodes[0]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: capabilityDonNodes[0], + HashedCapabilityIds: [][32]byte{triggerCapID}, + }, + capabilityDonNodes[1]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: capabilityDonNodes[1], + HashedCapabilityIds: [][32]byte{triggerCapID}, + }, + capabilityDonNodes[2]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: capabilityDonNodes[2], + HashedCapabilityIds: [][32]byte{triggerCapID}, + }, + capabilityDonNodes[3]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: capabilityDonNodes[3], + HashedCapabilityIds: [][32]byte{triggerCapID}, + }, + workflowDonNodes[0]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: workflowDonNodes[0], + }, + workflowDonNodes[1]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: workflowDonNodes[1], + }, + workflowDonNodes[2]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: workflowDonNodes[2], + }, + workflowDonNodes[3]: { + NodeOperatorId: 1, + Signer: randomWord(), + P2pId: workflowDonNodes[3], + }, + }, + } + + dispatcher.On("SetReceiver", fullTriggerCapID, capDonID, mock.AnythingOfType("*remote.triggerPublisher")).Return(remote.ErrReceiverExists) + + launcher := NewLauncher( + lggr, + wrapper, + dispatcher, + registry, + ) + + err = launcher.Launch(ctx, state) + require.NoError(t, err) + defer launcher.Close() +} diff --git a/core/capabilities/reader.go b/core/capabilities/reader.go deleted file mode 100644 index a0b7d3d96d8..00000000000 --- a/core/capabilities/reader.go +++ /dev/null @@ -1,157 +0,0 @@ -package capabilities - -import ( - "context" - "encoding/json" - "errors" - "fmt" - - "github.com/smartcontractkit/chainlink-common/pkg/capabilities" - "github.com/smartcontractkit/chainlink-common/pkg/logger" - "github.com/smartcontractkit/chainlink-common/pkg/types" - kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/capabilities_registry" - p2ptypes "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types" - evmrelaytypes "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" -) - -type remoteRegistryReader struct { - r types.ContractReader - peerWrapper p2ptypes.PeerWrapper - lggr logger.Logger -} - -var _ reader = (*remoteRegistryReader)(nil) - -type hashedCapabilityID [32]byte -type donID uint32 - -type state struct { - IDsToDONs map[donID]kcr.CapabilitiesRegistryDONInfo - IDsToNodes map[p2ptypes.PeerID]kcr.CapabilitiesRegistryNodeInfo - IDsToCapabilities map[hashedCapabilityID]kcr.CapabilitiesRegistryCapabilityInfo -} - -func (r *remoteRegistryReader) LocalNode(ctx context.Context) (capabilities.Node, error) { - if r.peerWrapper.GetPeer() == nil { - return capabilities.Node{}, errors.New("unable to get peer: peerWrapper hasn't started yet") - } - - pid := r.peerWrapper.GetPeer().ID() - - readerState, err := r.state(ctx) - if err != nil { - return capabilities.Node{}, fmt.Errorf("failed to get state from registry to determine don ownership: %w", err) - } - - var workflowDON capabilities.DON - capabilityDONs := []capabilities.DON{} - for _, d := range readerState.IDsToDONs { - for _, p := range d.NodeP2PIds { - if p == pid { - if d.AcceptsWorkflows { - if workflowDON.ID == "" { - workflowDON = *toDONInfo(d) - } else { - r.lggr.Errorf("Configuration error: node %s belongs to more than one workflowDON", pid) - } - } - - capabilityDONs = append(capabilityDONs, *toDONInfo(d)) - } - } - } - - return capabilities.Node{ - PeerID: &pid, - WorkflowDON: workflowDON, - CapabilityDONs: capabilityDONs, - }, nil -} - -func (r *remoteRegistryReader) state(ctx context.Context) (state, error) { - dons := []kcr.CapabilitiesRegistryDONInfo{} - err := r.r.GetLatestValue(ctx, "CapabilitiesRegistry", "getDONs", nil, &dons) - if err != nil { - return state{}, err - } - - idsToDONs := map[donID]kcr.CapabilitiesRegistryDONInfo{} - for _, d := range dons { - idsToDONs[donID(d.Id)] = d - } - - caps := []kcr.CapabilitiesRegistryCapabilityInfo{} - err = r.r.GetLatestValue(ctx, "CapabilitiesRegistry", "getCapabilities", nil, &caps) - if err != nil { - return state{}, err - } - - idsToCapabilities := map[hashedCapabilityID]kcr.CapabilitiesRegistryCapabilityInfo{} - for _, c := range caps { - idsToCapabilities[c.HashedId] = c - } - - nodes := []kcr.CapabilitiesRegistryNodeInfo{} - err = r.r.GetLatestValue(ctx, "CapabilitiesRegistry", "getNodes", nil, &nodes) - if err != nil { - return state{}, err - } - - idsToNodes := map[p2ptypes.PeerID]kcr.CapabilitiesRegistryNodeInfo{} - for _, node := range nodes { - idsToNodes[node.P2pId] = node - } - - return state{IDsToDONs: idsToDONs, IDsToCapabilities: idsToCapabilities, IDsToNodes: idsToNodes}, nil -} - -type contractReaderFactory interface { - NewContractReader(context.Context, []byte) (types.ContractReader, error) -} - -func newRemoteRegistryReader(ctx context.Context, lggr logger.Logger, peerWrapper p2ptypes.PeerWrapper, relayer contractReaderFactory, remoteRegistryAddress string) (*remoteRegistryReader, error) { - contractReaderConfig := evmrelaytypes.ChainReaderConfig{ - Contracts: map[string]evmrelaytypes.ChainContractReader{ - "CapabilitiesRegistry": { - ContractABI: kcr.CapabilitiesRegistryABI, - Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ - "getDONs": { - ChainSpecificName: "getDONs", - }, - "getCapabilities": { - ChainSpecificName: "getCapabilities", - }, - "getNodes": { - ChainSpecificName: "getNodes", - }, - }, - }, - }, - } - - contractReaderConfigEncoded, err := json.Marshal(contractReaderConfig) - if err != nil { - return nil, err - } - - cr, err := relayer.NewContractReader(ctx, contractReaderConfigEncoded) - if err != nil { - return nil, err - } - - err = cr.Bind(ctx, []types.BoundContract{ - { - Address: remoteRegistryAddress, - Name: "CapabilitiesRegistry", - }, - }) - if err != nil { - return nil, err - } - - return &remoteRegistryReader{ - r: cr, - peerWrapper: peerWrapper, - lggr: lggr, - }, err -} diff --git a/core/capabilities/registry.go b/core/capabilities/registry.go index 3cfe1d169b7..4cca25d03ca 100644 --- a/core/capabilities/registry.go +++ b/core/capabilities/registry.go @@ -22,6 +22,10 @@ type Registry struct { mu sync.RWMutex } +func (r *Registry) GetLocalNode(_ context.Context) (capabilities.Node, error) { + return capabilities.Node{}, nil +} + // Get gets a capability from the registry. func (r *Registry) Get(_ context.Context, id string) (capabilities.BaseCapability, error) { r.mu.RLock() diff --git a/core/capabilities/remote/dispatcher.go b/core/capabilities/remote/dispatcher.go index b91211b5bf5..c1ee5db2944 100644 --- a/core/capabilities/remote/dispatcher.go +++ b/core/capabilities/remote/dispatcher.go @@ -2,6 +2,7 @@ package remote import ( "context" + "errors" "fmt" sync "sync" "time" @@ -19,6 +20,10 @@ import ( p2ptypes "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types" ) +var ( + ErrReceiverExists = errors.New("receiver already exists") +) + // dispatcher en/decodes messages and routes traffic between peers and capabilities type dispatcher struct { peerWrapper p2ptypes.PeerWrapper @@ -35,7 +40,7 @@ type dispatcher struct { type key struct { capId string - donId string + donId uint32 } var _ services.Service = &dispatcher{} @@ -88,13 +93,13 @@ type receiver struct { ch chan *remotetypes.MessageBody } -func (d *dispatcher) SetReceiver(capabilityId string, donId string, rec remotetypes.Receiver) error { +func (d *dispatcher) SetReceiver(capabilityId string, donId uint32, rec remotetypes.Receiver) error { d.mu.Lock() defer d.mu.Unlock() k := key{capabilityId, donId} _, ok := d.receivers[k] if ok { - return fmt.Errorf("receiver already exists for capability %s and don %s", capabilityId, donId) + return fmt.Errorf("%w: receiver already exists for capability %s and don %d", ErrReceiverExists, capabilityId, donId) } receiverCh := make(chan *remotetypes.MessageBody, receiverBufferSize) @@ -123,7 +128,7 @@ func (d *dispatcher) SetReceiver(capabilityId string, donId string, rec remotety return nil } -func (d *dispatcher) RemoveReceiver(capabilityId string, donId string) { +func (d *dispatcher) RemoveReceiver(capabilityId string, donId uint32) { d.mu.Lock() defer d.mu.Unlock() @@ -181,7 +186,7 @@ func (d *dispatcher) receive() { } receiverQueueUsage := float64(len(receiver.ch)) / receiverBufferSize - capReceiveChannelUsage.WithLabelValues(k.capId, k.donId).Set(receiverQueueUsage) + capReceiveChannelUsage.WithLabelValues(k.capId, fmt.Sprint(k.donId)).Set(receiverQueueUsage) select { case receiver.ch <- body: default: diff --git a/core/capabilities/remote/dispatcher_test.go b/core/capabilities/remote/dispatcher_test.go index 040ee849e08..173972375ab 100644 --- a/core/capabilities/remote/dispatcher_test.go +++ b/core/capabilities/remote/dispatcher_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - commonMocks "github.com/smartcontractkit/chainlink-common/pkg/types/mocks" + commonMocks "github.com/smartcontractkit/chainlink-common/pkg/types/core/mocks" "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote" remotetypes "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/types" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" diff --git a/core/capabilities/remote/target/client.go b/core/capabilities/remote/target/client.go index dbb7c2f8bd8..5b65bf63e44 100644 --- a/core/capabilities/remote/target/client.go +++ b/core/capabilities/remote/target/client.go @@ -42,7 +42,7 @@ var _ services.Service = &client{} func NewClient(remoteCapabilityInfo commoncap.CapabilityInfo, localDonInfo commoncap.DON, dispatcher types.Dispatcher, requestTimeout time.Duration, lggr logger.Logger) *client { return &client{ - lggr: lggr, + lggr: lggr.Named("TargetClient"), remoteCapabilityInfo: remoteCapabilityInfo, localDONInfo: localDonInfo, dispatcher: dispatcher, @@ -130,6 +130,8 @@ func (c *client) Execute(ctx context.Context, capReq commoncap.CapabilityRequest return nil, fmt.Errorf("failed to get message ID for request: %w", err) } + c.lggr.Debugw("executing remote target", "messageID", messageID) + if _, ok := c.messageIDToCallerRequest[messageID]; ok { return nil, fmt.Errorf("request for message ID %s already exists", messageID) } @@ -151,6 +153,8 @@ func (c *client) Receive(ctx context.Context, msg *types.MessageBody) { messageID := GetMessageID(msg) + c.lggr.Debugw("Remote client target receiving message", "messageID", messageID) + req := c.messageIDToCallerRequest[messageID] if req == nil { c.lggr.Warnw("received response for unknown message ID ", "messageID", messageID) diff --git a/core/capabilities/remote/target/client_test.go b/core/capabilities/remote/target/client_test.go index 64b824d74d4..6d26b51b8ae 100644 --- a/core/capabilities/remote/target/client_test.go +++ b/core/capabilities/remote/target/client_test.go @@ -33,9 +33,9 @@ func Test_Client_DonTopologies(t *testing.T) { responseTest := func(t *testing.T, responseCh <-chan commoncap.CapabilityResponse, responseError error) { require.NoError(t, responseError) response := <-responseCh - responseValue, err := response.Value.Unwrap() + mp, err := response.Value.Unwrap() require.NoError(t, err) - assert.Equal(t, "aValue1", responseValue.(string)) + assert.Equal(t, "aValue1", mp.(map[string]any)["response"].(string)) } capability := &TestCapability{} @@ -64,9 +64,9 @@ func Test_Client_TransmissionSchedules(t *testing.T) { responseTest := func(t *testing.T, responseCh <-chan commoncap.CapabilityResponse, responseError error) { require.NoError(t, responseError) response := <-responseCh - responseValue, err := response.Value.Unwrap() + mp, err := response.Value.Unwrap() require.NoError(t, err) - assert.Equal(t, "aValue1", responseValue.(string)) + assert.Equal(t, "aValue1", mp.(map[string]any)["response"].(string)) } capability := &TestCapability{} @@ -130,7 +130,7 @@ func testClient(ctx context.Context, t *testing.T, numWorkflowPeers int, workflo } capDonInfo := commoncap.DON{ - ID: "capability-don", + ID: 1, Members: capabilityPeers, F: capabilityDonF, } @@ -149,7 +149,7 @@ func testClient(ctx context.Context, t *testing.T, numWorkflowPeers int, workflo workflowDonInfo := commoncap.DON{ Members: workflowPeers, - ID: "workflow-don", + ID: 2, } broker := newTestAsyncMessageBroker(t, 100) @@ -259,7 +259,7 @@ func (t *clientTestServer) Receive(_ context.Context, msg *remotetypes.MessageBo for receiver := range t.messageIDToSenders[messageID] { var responseMsg = &remotetypes.MessageBody{ CapabilityId: "cap_id@1.0.0", - CapabilityDonId: "capability-don", + CapabilityDonId: 1, CallerDonId: t.workflowDonInfo.ID, Method: remotetypes.MethodExecute, MessageId: []byte(messageID), diff --git a/core/capabilities/remote/target/endtoend_test.go b/core/capabilities/remote/target/endtoend_test.go index d5305afeb32..c01b8d99a4f 100644 --- a/core/capabilities/remote/target/endtoend_test.go +++ b/core/capabilities/remote/target/endtoend_test.go @@ -74,9 +74,9 @@ func Test_RemoteTargetCapability_TransmissionSchedules(t *testing.T) { responseTest := func(t *testing.T, responseCh <-chan commoncap.CapabilityResponse, responseError error) { require.NoError(t, responseError) response := <-responseCh - responseValue, err := response.Value.Unwrap() + mp, err := response.Value.Unwrap() require.NoError(t, err) - assert.Equal(t, "aValue1", responseValue.(string)) + assert.Equal(t, "aValue1", mp.(map[string]any)["response"].(string)) } transmissionSchedule, err := values.NewMap(map[string]any{ @@ -106,9 +106,9 @@ func Test_RemoteTargetCapability_DonTopologies(t *testing.T) { responseTest := func(t *testing.T, responseCh <-chan commoncap.CapabilityResponse, responseError error) { require.NoError(t, responseError) response := <-responseCh - responseValue, err := response.Value.Unwrap() + mp, err := response.Value.Unwrap() require.NoError(t, err) - assert.Equal(t, "aValue1", responseValue.(string)) + assert.Equal(t, "aValue1", mp.(map[string]any)["response"].(string)) } transmissionSchedule, err := values.NewMap(map[string]any{ @@ -191,7 +191,7 @@ func testRemoteTarget(ctx context.Context, t *testing.T, underlying commoncap.Ta require.NoError(t, capabilityPeerID.UnmarshalText([]byte(NewPeerID()))) capDonInfo := commoncap.DON{ - ID: "capability-don", + ID: 2, Members: capabilityPeers, F: capabilityDonF, } @@ -212,13 +212,13 @@ func testRemoteTarget(ctx context.Context, t *testing.T, underlying commoncap.Ta workflowDonInfo := commoncap.DON{ Members: workflowPeers, - ID: "workflow-don", + ID: 1, F: workflowDonF, } broker := newTestAsyncMessageBroker(t, 1000) - workflowDONs := map[string]commoncap.DON{ + workflowDONs := map[uint32]commoncap.DON{ workflowDonInfo.ID: workflowDonInfo, } @@ -380,10 +380,10 @@ func (t *nodeDispatcher) Send(peerID p2ptypes.PeerID, msgBody *remotetypes.Messa return nil } -func (t *nodeDispatcher) SetReceiver(capabilityId string, donId string, receiver remotetypes.Receiver) error { +func (t *nodeDispatcher) SetReceiver(capabilityId string, donId uint32, receiver remotetypes.Receiver) error { return nil } -func (t *nodeDispatcher) RemoveReceiver(capabilityId string, donId string) {} +func (t *nodeDispatcher) RemoveReceiver(capabilityId string, donId uint32) {} type abstractTestCapability struct { } @@ -409,8 +409,12 @@ func (t TestCapability) Execute(ctx context.Context, request commoncap.Capabilit value := request.Inputs.Underlying["executeValue1"] + response, err := values.NewMap(map[string]any{"response": value}) + if err != nil { + return nil, err + } ch <- commoncap.CapabilityResponse{ - Value: value, + Value: response, } return ch, nil diff --git a/core/capabilities/remote/target/request/client_request.go b/core/capabilities/remote/target/request/client_request.go index b48aa28207a..50a742c2188 100644 --- a/core/capabilities/remote/target/request/client_request.go +++ b/core/capabilities/remote/target/request/client_request.go @@ -8,6 +8,8 @@ import ( "sync" "time" + "google.golang.org/protobuf/proto" + ragep2ptypes "github.com/smartcontractkit/libocr/ragep2p/types" "github.com/smartcontractkit/chainlink-common/pkg/capabilities" @@ -27,6 +29,7 @@ type ClientRequest struct { responseIDCount map[[32]byte]int errorCount map[string]int responseReceived map[p2ptypes.PeerID]bool + lggr logger.Logger requiredIdenticalResponses int @@ -45,7 +48,8 @@ func NewClientRequest(ctx context.Context, lggr logger.Logger, req commoncap.Cap return nil, errors.New("remote capability info missing DON") } - rawRequest, err := pb.MarshalCapabilityRequest(req) + rawRequest, err := proto.MarshalOptions{Deterministic: true}.Marshal(pb.CapabilityRequestToProto(req)) + if err != nil { return nil, fmt.Errorf("failed to marshal capability request: %w", err) } @@ -99,6 +103,7 @@ func NewClientRequest(ctx context.Context, lggr logger.Logger, req commoncap.Cap responseReceived: responseReceived, responseCh: make(chan commoncap.CapabilityResponse, 1), wg: wg, + lggr: lggr, }, nil } @@ -125,10 +130,16 @@ func (c *ClientRequest) OnMessage(_ context.Context, msg *types.MessageBody) err c.mux.Lock() defer c.mux.Unlock() + if c.respSent { + return nil + } + if msg.Sender == nil { return fmt.Errorf("sender missing from message") } + c.lggr.Debugw("OnMessage called for client request", "messageID", msg.MessageId) + sender := remote.ToPeerID(msg.Sender) received, expected := c.responseReceived[sender] @@ -146,6 +157,10 @@ func (c *ClientRequest) OnMessage(_ context.Context, msg *types.MessageBody) err responseID := sha256.Sum256(msg.Payload) c.responseIDCount[responseID]++ + if len(c.responseIDCount) > 1 { + c.lggr.Warn("received multiple different responses for the same request, number of different responses received: %d", len(c.responseIDCount)) + } + if c.responseIDCount[responseID] == c.requiredIdenticalResponses { capabilityResponse, err := pb.UnmarshalCapabilityResponse(msg.Payload) if err != nil { @@ -155,6 +170,7 @@ func (c *ClientRequest) OnMessage(_ context.Context, msg *types.MessageBody) err } } } else { + c.lggr.Warnw("received error response", "error", msg.ErrorMsg) c.errorCount[msg.ErrorMsg]++ if c.errorCount[msg.ErrorMsg] == c.requiredIdenticalResponses { c.sendResponse(commoncap.CapabilityResponse{Err: errors.New(msg.ErrorMsg)}) diff --git a/core/capabilities/remote/target/request/client_request_test.go b/core/capabilities/remote/target/request/client_request_test.go index a053623cd2c..c20c24a5508 100644 --- a/core/capabilities/remote/target/request/client_request_test.go +++ b/core/capabilities/remote/target/request/client_request_test.go @@ -30,7 +30,7 @@ func Test_ClientRequest_MessageValidation(t *testing.T) { } capDonInfo := commoncap.DON{ - ID: "capability-don", + ID: 1, Members: capabilityPeers, F: 1, } @@ -50,7 +50,7 @@ func Test_ClientRequest_MessageValidation(t *testing.T) { workflowDonInfo := commoncap.DON{ Members: workflowPeers, - ID: "workflow-don", + ID: 2, } executeInputs, err := values.NewMap( @@ -75,8 +75,10 @@ func Test_ClientRequest_MessageValidation(t *testing.T) { Config: transmissionSchedule, } + m, err := values.NewMap(map[string]any{"response": "response1"}) + require.NoError(t, err) capabilityResponse := commoncap.CapabilityResponse{ - Value: values.NewString("response1"), + Value: m, Err: nil, } @@ -106,8 +108,10 @@ func Test_ClientRequest_MessageValidation(t *testing.T) { require.NoError(t, err) + nm, err := values.NewMap(map[string]any{"response": "response2"}) + require.NoError(t, err) capabilityResponse2 := commoncap.CapabilityResponse{ - Value: values.NewString("response2"), + Value: nm, Err: nil, } @@ -297,8 +301,9 @@ func Test_ClientRequest_MessageValidation(t *testing.T) { require.NoError(t, err) response := <-request.ResponseChan() + resp := response.Value.Underlying["response"] - assert.Equal(t, response.Value, values.NewString("response1")) + assert.Equal(t, resp, values.NewString("response1")) }) } @@ -306,11 +311,11 @@ type clientRequestTestDispatcher struct { msgs chan *types.MessageBody } -func (t *clientRequestTestDispatcher) SetReceiver(capabilityId string, donId string, receiver types.Receiver) error { +func (t *clientRequestTestDispatcher) SetReceiver(capabilityId string, donId uint32, receiver types.Receiver) error { return nil } -func (t *clientRequestTestDispatcher) RemoveReceiver(capabilityId string, donId string) {} +func (t *clientRequestTestDispatcher) RemoveReceiver(capabilityId string, donId uint32) {} func (t *clientRequestTestDispatcher) Send(peerID p2ptypes.PeerID, msgBody *types.MessageBody) error { t.msgs <- msgBody diff --git a/core/capabilities/remote/target/request/server_request.go b/core/capabilities/remote/target/request/server_request.go index bb84fda4ac0..b8ae05bc316 100644 --- a/core/capabilities/remote/target/request/server_request.go +++ b/core/capabilities/remote/target/request/server_request.go @@ -27,7 +27,7 @@ type ServerRequest struct { capabilityPeerId p2ptypes.PeerID capabilityID string - capabilityDonID string + capabilityDonID uint32 dispatcher types.Dispatcher @@ -47,7 +47,7 @@ type ServerRequest struct { lggr logger.Logger } -func NewServerRequest(capability capabilities.TargetCapability, capabilityID string, capabilityDonID string, capabilityPeerId p2ptypes.PeerID, +func NewServerRequest(capability capabilities.TargetCapability, capabilityID string, capabilityDonID uint32, capabilityPeerId p2ptypes.PeerID, callingDon commoncap.DON, requestMessageID string, dispatcher types.Dispatcher, requestTimeout time.Duration, lggr logger.Logger) *ServerRequest { return &ServerRequest{ @@ -62,7 +62,7 @@ func NewServerRequest(capability capabilities.TargetCapability, capabilityID str callingDon: callingDon, requestMessageID: requestMessageID, requestTimeout: requestTimeout, - lggr: lggr, + lggr: lggr.Named("ServerRequest"), } } @@ -79,6 +79,7 @@ func (e *ServerRequest) OnMessage(ctx context.Context, msg *types.MessageBody) e return fmt.Errorf("failed to add requester to request: %w", err) } + e.lggr.Debugw("OnMessage called for request", "msgId", msg.MessageId, "calls", len(e.requesters), "hasResponse", e.response != nil) if e.minimumRequiredRequestsReceived() && !e.hasResponse() { if err := e.executeRequest(ctx, msg.Payload); err != nil { e.setError(types.Error_INTERNAL_ERROR, err.Error()) @@ -100,13 +101,11 @@ func (e *ServerRequest) Cancel(err types.Error, msg string) error { e.mux.Lock() defer e.mux.Unlock() - if e.hasResponse() { - return fmt.Errorf("request already has response") - } - - e.setError(err, msg) - if err := e.sendResponses(); err != nil { - return fmt.Errorf("failed to send responses: %w", err) + if !e.hasResponse() { + e.setError(err, msg) + if err := e.sendResponses(); err != nil { + return fmt.Errorf("failed to send responses: %w", err) + } } return nil @@ -216,7 +215,7 @@ func (e *ServerRequest) sendResponse(requester p2ptypes.PeerID) error { responseMsg.Payload = e.response.response } - e.lggr.Debugw("Sending response", "receiver", requester) + e.lggr.Debugw("Sending response", "receiver", requester, "msgId", e.requestMessageID) if err := e.dispatcher.Send(requester, &responseMsg); err != nil { return fmt.Errorf("failed to send response to dispatcher: %w", err) } diff --git a/core/capabilities/remote/target/request/server_request_test.go b/core/capabilities/remote/target/request/server_request_test.go index fe3fdd713b5..053cba7064d 100644 --- a/core/capabilities/remote/target/request/server_request_test.go +++ b/core/capabilities/remote/target/request/server_request_test.go @@ -33,7 +33,7 @@ func Test_ServerRequest_MessageValidation(t *testing.T) { callingDon := commoncap.DON{ Members: workflowPeers, - ID: "workflow-don", + ID: 1, F: 1, } @@ -58,7 +58,7 @@ func Test_ServerRequest_MessageValidation(t *testing.T) { require.NoError(t, err) t.Run("Send duplicate message", func(t *testing.T) { - req := request.NewServerRequest(capability, "capabilityID", "capabilityDonID", + req := request.NewServerRequest(capability, "capabilityID", 2, capabilityPeerID, callingDon, "requestMessageID", dispatcher, 10*time.Minute, lggr) err := sendValidRequest(req, workflowPeers, capabilityPeerID, rawRequest) @@ -68,7 +68,7 @@ func Test_ServerRequest_MessageValidation(t *testing.T) { }) t.Run("Send message with non calling don peer", func(t *testing.T) { - req := request.NewServerRequest(capability, "capabilityID", "capabilityDonID", + req := request.NewServerRequest(capability, "capabilityID", 2, capabilityPeerID, callingDon, "requestMessageID", dispatcher, 10*time.Minute, lggr) err := sendValidRequest(req, workflowPeers, capabilityPeerID, rawRequest) @@ -81,8 +81,8 @@ func Test_ServerRequest_MessageValidation(t *testing.T) { Receiver: capabilityPeerID[:], MessageId: []byte("workflowID" + "workflowExecutionID"), CapabilityId: "capabilityID", - CapabilityDonId: "capabilityDonID", - CallerDonId: "workflow-don", + CapabilityDonId: 2, + CallerDonId: 1, Method: types.MethodExecute, Payload: rawRequest, }) @@ -91,7 +91,7 @@ func Test_ServerRequest_MessageValidation(t *testing.T) { }) t.Run("Send message invalid payload", func(t *testing.T) { - req := request.NewServerRequest(capability, "capabilityID", "capabilityDonID", + req := request.NewServerRequest(capability, "capabilityID", 2, capabilityPeerID, callingDon, "requestMessageID", dispatcher, 10*time.Minute, lggr) err := sendValidRequest(req, workflowPeers, capabilityPeerID, rawRequest) @@ -103,8 +103,8 @@ func Test_ServerRequest_MessageValidation(t *testing.T) { Receiver: capabilityPeerID[:], MessageId: []byte("workflowID" + "workflowExecutionID"), CapabilityId: "capabilityID", - CapabilityDonId: "capabilityDonID", - CallerDonId: "workflow-don", + CapabilityDonId: 2, + CallerDonId: 1, Method: types.MethodExecute, Payload: append(rawRequest, []byte("asdf")...), }) @@ -116,7 +116,7 @@ func Test_ServerRequest_MessageValidation(t *testing.T) { t.Run("Send second valid request when capability errors", func(t *testing.T) { dispatcher := &testDispatcher{} - req := request.NewServerRequest(TestErrorCapability{}, "capabilityID", "capabilityDonID", + req := request.NewServerRequest(TestErrorCapability{}, "capabilityID", 2, capabilityPeerID, callingDon, "requestMessageID", dispatcher, 10*time.Minute, lggr) err := sendValidRequest(req, workflowPeers, capabilityPeerID, rawRequest) @@ -128,8 +128,8 @@ func Test_ServerRequest_MessageValidation(t *testing.T) { Receiver: capabilityPeerID[:], MessageId: []byte("workflowID" + "workflowExecutionID"), CapabilityId: "capabilityID", - CapabilityDonId: "capabilityDonID", - CallerDonId: "workflow-don", + CapabilityDonId: 2, + CallerDonId: 1, Method: types.MethodExecute, Payload: rawRequest, }) @@ -143,7 +143,7 @@ func Test_ServerRequest_MessageValidation(t *testing.T) { t.Run("Send second valid request", func(t *testing.T) { dispatcher := &testDispatcher{} - request := request.NewServerRequest(capability, "capabilityID", "capabilityDonID", + request := request.NewServerRequest(capability, "capabilityID", 2, capabilityPeerID, callingDon, "requestMessageID", dispatcher, 10*time.Minute, lggr) err := sendValidRequest(request, workflowPeers, capabilityPeerID, rawRequest) @@ -155,8 +155,8 @@ func Test_ServerRequest_MessageValidation(t *testing.T) { Receiver: capabilityPeerID[:], MessageId: []byte("workflowID" + "workflowExecutionID"), CapabilityId: "capabilityID", - CapabilityDonId: "capabilityDonID", - CallerDonId: "workflow-don", + CapabilityDonId: 2, + CallerDonId: 1, Method: types.MethodExecute, Payload: rawRequest, }) @@ -179,8 +179,8 @@ func sendValidRequest(request serverRequest, workflowPeers []p2ptypes.PeerID, ca Receiver: capabilityPeerID[:], MessageId: []byte("workflowID" + "workflowExecutionID"), CapabilityId: "capabilityID", - CapabilityDonId: "capabilityDonID", - CallerDonId: "workflow-don", + CapabilityDonId: 2, + CallerDonId: 1, Method: types.MethodExecute, Payload: rawRequest, }) @@ -190,11 +190,11 @@ type testDispatcher struct { msgs []*types.MessageBody } -func (t *testDispatcher) SetReceiver(capabilityId string, donId string, receiver types.Receiver) error { +func (t *testDispatcher) SetReceiver(capabilityId string, donId uint32, receiver types.Receiver) error { return nil } -func (t *testDispatcher) RemoveReceiver(capabilityId string, donId string) {} +func (t *testDispatcher) RemoveReceiver(capabilityId string, donId uint32) {} func (t *testDispatcher) Send(peerID p2ptypes.PeerID, msgBody *types.MessageBody) error { t.msgs = append(t.msgs, msgBody) @@ -225,8 +225,12 @@ func (t TestCapability) Execute(ctx context.Context, request commoncap.Capabilit value := request.Inputs.Underlying["executeValue1"] + response, err := values.NewMap(map[string]any{"response": value}) + if err != nil { + return nil, err + } ch <- commoncap.CapabilityResponse{ - Value: value, + Value: response, } return ch, nil diff --git a/core/capabilities/remote/target/server.go b/core/capabilities/remote/target/server.go index a918dd91700..ea9caf81eff 100644 --- a/core/capabilities/remote/target/server.go +++ b/core/capabilities/remote/target/server.go @@ -29,12 +29,15 @@ type server struct { underlying commoncap.TargetCapability capInfo commoncap.CapabilityInfo localDonInfo commoncap.DON - workflowDONs map[string]commoncap.DON + workflowDONs map[uint32]commoncap.DON dispatcher types.Dispatcher - requestIDToRequest map[string]*request.ServerRequest + requestIDToRequest map[string]requestAndMsgID requestTimeout time.Duration + // Used to detect messages with the same message id but different payloads + messageIDToRequestIDsCount map[string]map[string]int + receiveLock sync.Mutex stopCh services.StopChan wg sync.WaitGroup @@ -43,8 +46,13 @@ type server struct { var _ types.Receiver = &server{} var _ services.Service = &server{} +type requestAndMsgID struct { + request *request.ServerRequest + messageID string +} + func NewServer(peerID p2ptypes.PeerID, underlying commoncap.TargetCapability, capInfo commoncap.CapabilityInfo, localDonInfo commoncap.DON, - workflowDONs map[string]commoncap.DON, dispatcher types.Dispatcher, requestTimeout time.Duration, lggr logger.Logger) *server { + workflowDONs map[uint32]commoncap.DON, dispatcher types.Dispatcher, requestTimeout time.Duration, lggr logger.Logger) *server { return &server{ underlying: underlying, peerID: peerID, @@ -53,10 +61,11 @@ func NewServer(peerID p2ptypes.PeerID, underlying commoncap.TargetCapability, ca workflowDONs: workflowDONs, dispatcher: dispatcher, - requestIDToRequest: map[string]*request.ServerRequest{}, - requestTimeout: requestTimeout, + requestIDToRequest: map[string]requestAndMsgID{}, + messageIDToRequestIDsCount: map[string]map[string]int{}, + requestTimeout: requestTimeout, - lggr: lggr, + lggr: lggr.Named("TargetServer"), stopCh: make(services.StopChan), } } @@ -96,12 +105,13 @@ func (r *server) expireRequests() { defer r.receiveLock.Unlock() for requestID, executeReq := range r.requestIDToRequest { - if executeReq.Expired() { - err := executeReq.Cancel(types.Error_TIMEOUT, "request expired") + if executeReq.request.Expired() { + err := executeReq.request.Cancel(types.Error_TIMEOUT, "request expired") if err != nil { r.lggr.Errorw("failed to cancel request", "request", executeReq, "err", err) } delete(r.requestIDToRequest, requestID) + delete(r.messageIDToRequestIDsCount, executeReq.messageID) } } } @@ -110,6 +120,7 @@ func (r *server) Receive(ctx context.Context, msg *types.MessageBody) { r.receiveLock.Lock() defer r.receiveLock.Unlock() + r.lggr.Debugw("received request for msg", "msgId", msg.MessageId) if msg.Method != types.MethodExecute { r.lggr.Errorw("received request for unsupported method type", "method", msg.Method) return @@ -121,6 +132,19 @@ func (r *server) Receive(ctx context.Context, msg *types.MessageBody) { hash := sha256.Sum256(msg.Payload) requestID := messageId + hex.EncodeToString(hash[:]) + if requestIDs, ok := r.messageIDToRequestIDsCount[messageId]; ok { + requestIDs[requestID] = requestIDs[requestID] + 1 + } else { + r.messageIDToRequestIDsCount[messageId] = map[string]int{requestID: 1} + } + + requestIDs := r.messageIDToRequestIDsCount[messageId] + if len(requestIDs) > 1 { + // This is a potential attack vector as well as a situation that will occur if the client is sending non-deterministic payloads + // so a warning is logged + r.lggr.Warnw("received messages with the same id and different payloads", "messageID", messageId, "requestIDToCount", requestIDs) + } + if _, ok := r.requestIDToRequest[requestID]; !ok { callingDon, ok := r.workflowDONs[msg.CallerDonId] if !ok { @@ -128,15 +152,18 @@ func (r *server) Receive(ctx context.Context, msg *types.MessageBody) { return } - r.requestIDToRequest[requestID] = request.NewServerRequest(r.underlying, r.capInfo.ID, r.localDonInfo.ID, r.peerID, - callingDon, messageId, r.dispatcher, r.requestTimeout, r.lggr) + r.requestIDToRequest[requestID] = requestAndMsgID{ + request: request.NewServerRequest(r.underlying, r.capInfo.ID, r.localDonInfo.ID, r.peerID, + callingDon, messageId, r.dispatcher, r.requestTimeout, r.lggr), + messageID: messageId, + } } - req := r.requestIDToRequest[requestID] + reqAndMsgID := r.requestIDToRequest[requestID] - err := req.OnMessage(ctx, msg) + err := reqAndMsgID.request.OnMessage(ctx, msg) if err != nil { - r.lggr.Errorw("request failed to OnMessage new message", "request", req, "err", err) + r.lggr.Errorw("request failed to OnMessage new message", "request", reqAndMsgID, "err", err) } } diff --git a/core/capabilities/remote/target/server_test.go b/core/capabilities/remote/target/server_test.go index 3c12ce813d9..a5aa45efd06 100644 --- a/core/capabilities/remote/target/server_test.go +++ b/core/capabilities/remote/target/server_test.go @@ -112,7 +112,7 @@ func testRemoteTargetServer(ctx context.Context, t *testing.T, } capDonInfo := commoncap.DON{ - ID: "capability-don", + ID: 1, Members: capabilityPeers, F: capabilityDonF, } @@ -131,7 +131,7 @@ func testRemoteTargetServer(ctx context.Context, t *testing.T, workflowDonInfo := commoncap.DON{ Members: workflowPeers, - ID: "workflow-don", + ID: 2, F: workflowDonF, } @@ -141,7 +141,7 @@ func testRemoteTargetServer(ctx context.Context, t *testing.T, require.NoError(t, err) srvcs = append(srvcs, broker) - workflowDONs := map[string]commoncap.DON{ + workflowDONs := map[uint32]commoncap.DON{ workflowDonInfo.ID: workflowDonInfo, } @@ -219,8 +219,8 @@ func (r *serverTestClient) Execute(ctx context.Context, req commoncap.Capability for _, node := range r.capabilityDonInfo.Members { message := &remotetypes.MessageBody{ CapabilityId: "capability-id", - CapabilityDonId: "capability-don", - CallerDonId: "workflow-don", + CapabilityDonId: 1, + CallerDonId: 2, Method: remotetypes.MethodExecute, Payload: rawRequest, MessageId: []byte(messageID), diff --git a/core/capabilities/remote/trigger_publisher.go b/core/capabilities/remote/trigger_publisher.go index 9e7fc893525..7744cfb55ee 100644 --- a/core/capabilities/remote/trigger_publisher.go +++ b/core/capabilities/remote/trigger_publisher.go @@ -25,7 +25,7 @@ type triggerPublisher struct { underlying commoncap.TriggerCapability capInfo commoncap.CapabilityInfo capDonInfo commoncap.DON - workflowDONs map[string]commoncap.DON + workflowDONs map[uint32]commoncap.DON dispatcher types.Dispatcher messageCache *messageCache[registrationKey, p2ptypes.PeerID] registrations map[registrationKey]*pubRegState @@ -36,7 +36,7 @@ type triggerPublisher struct { } type registrationKey struct { - callerDonId string + callerDonId uint32 workflowId string } @@ -48,7 +48,7 @@ type pubRegState struct { var _ types.Receiver = &triggerPublisher{} var _ services.Service = &triggerPublisher{} -func NewTriggerPublisher(config *types.RemoteTriggerConfig, underlying commoncap.TriggerCapability, capInfo commoncap.CapabilityInfo, capDonInfo commoncap.DON, workflowDONs map[string]commoncap.DON, dispatcher types.Dispatcher, lggr logger.Logger) *triggerPublisher { +func NewTriggerPublisher(config *types.RemoteTriggerConfig, underlying commoncap.TriggerCapability, capInfo commoncap.CapabilityInfo, capDonInfo commoncap.DON, workflowDONs map[uint32]commoncap.DON, dispatcher types.Dispatcher, lggr logger.Logger) *triggerPublisher { config.ApplyDefaults() return &triggerPublisher{ config: config, @@ -60,7 +60,7 @@ func NewTriggerPublisher(config *types.RemoteTriggerConfig, underlying commoncap messageCache: NewMessageCache[registrationKey, p2ptypes.PeerID](), registrations: make(map[registrationKey]*pubRegState), stopCh: make(services.StopChan), - lggr: lggr, + lggr: lggr.Named("TriggerPublisher"), } } diff --git a/core/capabilities/remote/trigger_publisher_test.go b/core/capabilities/remote/trigger_publisher_test.go index db792fb5061..ec38b962ced 100644 --- a/core/capabilities/remote/trigger_publisher_test.go +++ b/core/capabilities/remote/trigger_publisher_test.go @@ -29,12 +29,12 @@ func TestTriggerPublisher_Register(t *testing.T) { p2 := p2ptypes.PeerID{} require.NoError(t, p2.UnmarshalText([]byte(peerID2))) capDonInfo := commoncap.DON{ - ID: "capability-don", + ID: 1, Members: []p2ptypes.PeerID{p1}, F: 0, } workflowDonInfo := commoncap.DON{ - ID: "workflow-don", + ID: 2, Members: []p2ptypes.PeerID{p2}, F: 0, } @@ -46,7 +46,7 @@ func TestTriggerPublisher_Register(t *testing.T) { MinResponsesToAggregate: 1, MessageExpiryMs: 100_000, } - workflowDONs := map[string]commoncap.DON{ + workflowDONs := map[uint32]commoncap.DON{ workflowDonInfo.ID: workflowDonInfo, } underlying := &testTrigger{ diff --git a/core/capabilities/remote/trigger_subscriber.go b/core/capabilities/remote/trigger_subscriber.go index b20adc36974..28bdff9c514 100644 --- a/core/capabilities/remote/trigger_subscriber.go +++ b/core/capabilities/remote/trigger_subscriber.go @@ -76,7 +76,7 @@ func NewTriggerSubscriber(config *types.RemoteTriggerConfig, capInfo commoncap.C messageCache: NewMessageCache[triggerEventKey, p2ptypes.PeerID](), registeredWorkflows: make(map[string]*subRegState), stopCh: make(services.StopChan), - lggr: lggr, + lggr: lggr.Named("TriggerSubscriber"), } } diff --git a/core/capabilities/remote/trigger_subscriber_test.go b/core/capabilities/remote/trigger_subscriber_test.go index 3b819f9f3cc..782b29d41f9 100644 --- a/core/capabilities/remote/trigger_subscriber_test.go +++ b/core/capabilities/remote/trigger_subscriber_test.go @@ -18,11 +18,14 @@ import ( ) const ( - peerID1 = "12D3KooWF3dVeJ6YoT5HFnYhmwQWWMoEwVFzJQ5kKCMX3ZityxMC" - peerID2 = "12D3KooWQsmok6aD8PZqt3RnJhQRrNzKHLficq7zYFRp7kZ1hHP8" - workflowID1 = "workflowID1" - triggerEvent1 = "triggerEvent1" - triggerEvent2 = "triggerEvent2" + peerID1 = "12D3KooWF3dVeJ6YoT5HFnYhmwQWWMoEwVFzJQ5kKCMX3ZityxMC" + peerID2 = "12D3KooWQsmok6aD8PZqt3RnJhQRrNzKHLficq7zYFRp7kZ1hHP8" + workflowID1 = "workflowID1" +) + +var ( + triggerEvent1 = map[string]any{"event": "triggerEvent1"} + triggerEvent2 = map[string]any{"event": "triggerEvent2"} ) func TestTriggerSubscriber_RegisterAndReceive(t *testing.T) { @@ -38,12 +41,12 @@ func TestTriggerSubscriber_RegisterAndReceive(t *testing.T) { p2 := p2ptypes.PeerID{} require.NoError(t, p2.UnmarshalText([]byte(peerID2))) capDonInfo := commoncap.DON{ - ID: "capability-don", + ID: 1, Members: []p2ptypes.PeerID{p1}, F: 0, } workflowDonInfo := commoncap.DON{ - ID: "workflow-don", + ID: 2, Members: []p2ptypes.PeerID{p2}, F: 0, } @@ -77,7 +80,7 @@ func TestTriggerSubscriber_RegisterAndReceive(t *testing.T) { <-awaitRegistrationMessageCh // receive trigger event - triggerEventValue, err := values.Wrap(triggerEvent1) + triggerEventValue, err := values.NewMap(triggerEvent1) require.NoError(t, err) capResponse := commoncap.CapabilityResponse{ Value: triggerEventValue, diff --git a/core/capabilities/remote/types/messages.pb.go b/core/capabilities/remote/types/messages.pb.go index 0e51b395993..68d8f4a262c 100644 --- a/core/capabilities/remote/types/messages.pb.go +++ b/core/capabilities/remote/types/messages.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.34.1 // protoc v4.25.1 // source: core/capabilities/remote/types/messages.proto @@ -138,24 +138,24 @@ type MessageBody struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` - Sender []byte `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` - Receiver []byte `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"` - Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - MessageId []byte `protobuf:"bytes,5,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` // scoped to sender - CapabilityId string `protobuf:"bytes,6,opt,name=capability_id,json=capabilityId,proto3" json:"capability_id,omitempty"` - CapabilityDonId string `protobuf:"bytes,7,opt,name=capability_don_id,json=capabilityDonId,proto3" json:"capability_don_id,omitempty"` - CallerDonId string `protobuf:"bytes,8,opt,name=caller_don_id,json=callerDonId,proto3" json:"caller_don_id,omitempty"` - Method string `protobuf:"bytes,9,opt,name=method,proto3" json:"method,omitempty"` - Error Error `protobuf:"varint,10,opt,name=error,proto3,enum=remote.Error" json:"error,omitempty"` - ErrorMsg string `protobuf:"bytes,11,opt,name=errorMsg,proto3" json:"errorMsg,omitempty"` + Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` + Sender []byte `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` + Receiver []byte `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"` + Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + MessageId []byte `protobuf:"bytes,5,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` // scoped to sender + CapabilityId string `protobuf:"bytes,6,opt,name=capability_id,json=capabilityId,proto3" json:"capability_id,omitempty"` + Method string `protobuf:"bytes,9,opt,name=method,proto3" json:"method,omitempty"` + Error Error `protobuf:"varint,10,opt,name=error,proto3,enum=remote.Error" json:"error,omitempty"` + ErrorMsg string `protobuf:"bytes,11,opt,name=errorMsg,proto3" json:"errorMsg,omitempty"` // payload contains a CapabilityRequest or CapabilityResponse Payload []byte `protobuf:"bytes,12,opt,name=payload,proto3" json:"payload,omitempty"` // Types that are assignable to Metadata: // // *MessageBody_TriggerRegistrationMetadata // *MessageBody_TriggerEventMetadata - Metadata isMessageBody_Metadata `protobuf_oneof:"metadata"` + Metadata isMessageBody_Metadata `protobuf_oneof:"metadata"` + CapabilityDonId uint32 `protobuf:"varint,15,opt,name=capability_don_id,json=capabilityDonId,proto3" json:"capability_don_id,omitempty"` + CallerDonId uint32 `protobuf:"varint,16,opt,name=caller_don_id,json=callerDonId,proto3" json:"caller_don_id,omitempty"` } func (x *MessageBody) Reset() { @@ -232,20 +232,6 @@ func (x *MessageBody) GetCapabilityId() string { return "" } -func (x *MessageBody) GetCapabilityDonId() string { - if x != nil { - return x.CapabilityDonId - } - return "" -} - -func (x *MessageBody) GetCallerDonId() string { - if x != nil { - return x.CallerDonId - } - return "" -} - func (x *MessageBody) GetMethod() string { if x != nil { return x.Method @@ -295,6 +281,20 @@ func (x *MessageBody) GetTriggerEventMetadata() *TriggerEventMetadata { return nil } +func (x *MessageBody) GetCapabilityDonId() uint32 { + if x != nil { + return x.CapabilityDonId + } + return 0 +} + +func (x *MessageBody) GetCallerDonId() uint32 { + if x != nil { + return x.CallerDonId + } + return 0 +} + type isMessageBody_Metadata interface { isMessageBody_Metadata() } @@ -494,7 +494,7 @@ var file_core_capabilities_remote_types_messages_proto_rawDesc = []byte{ 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, - 0x62, 0x6f, 0x64, 0x79, 0x22, 0xcd, 0x04, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x62, 0x6f, 0x64, 0x79, 0x22, 0xd9, 0x04, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, @@ -506,12 +506,7 @@ var file_core_capabilities_remote_types_messages_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, - 0x74, 0x79, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, - 0x74, 0x79, 0x5f, 0x64, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x44, 0x6f, 0x6e, 0x49, 0x64, - 0x12, 0x22, 0x0a, 0x0d, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x64, 0x6f, 0x6e, 0x5f, 0x69, - 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x44, - 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x09, + 0x74, 0x79, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x23, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, @@ -530,44 +525,50 @@ var file_core_capabilities_remote_types_messages_proto_rawDesc = []byte{ 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x14, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x0a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x22, 0x52, 0x0a, 0x1b, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x33, 0x0a, 0x16, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x63, 0x65, - 0x69, 0x76, 0x65, 0x64, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x13, 0x6c, 0x61, 0x73, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, - 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x63, 0x0a, 0x14, 0x54, 0x72, 0x69, 0x67, - 0x67, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x12, 0x28, 0x0a, 0x10, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x72, 0x69, 0x67, - 0x67, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x77, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0b, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x64, 0x73, 0x22, 0xe3, 0x01, - 0x0a, 0x13, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x34, 0x0a, 0x15, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x4d, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x15, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x4d, 0x73, 0x12, 0x32, 0x0a, 0x14, 0x72, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x69, 0x72, - 0x79, 0x4d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x14, 0x72, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x69, 0x72, 0x79, 0x4d, 0x73, 0x12, - 0x38, 0x0a, 0x17, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x54, - 0x6f, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x17, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x54, 0x6f, - 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x79, 0x4d, 0x73, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, - 0x79, 0x4d, 0x73, 0x2a, 0x76, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x06, 0x0a, 0x02, - 0x4f, 0x4b, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x43, - 0x41, 0x50, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, - 0x55, 0x4e, 0x44, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, - 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x49, - 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x4e, 0x54, 0x45, 0x52, - 0x4e, 0x41, 0x4c, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x05, 0x42, 0x20, 0x5a, 0x1e, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, - 0x2f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2a, 0x0a, 0x11, 0x63, 0x61, 0x70, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x64, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x0f, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x44, + 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0d, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x64, + 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x63, 0x61, 0x6c, + 0x6c, 0x65, 0x72, 0x44, 0x6f, 0x6e, 0x49, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, + 0x22, 0x52, 0x0a, 0x1b, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x33, 0x0a, 0x16, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, + 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x13, 0x6c, 0x61, 0x73, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x49, 0x64, 0x22, 0x63, 0x0a, 0x14, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x28, 0x0a, 0x10, + 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x77, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x49, 0x64, 0x73, 0x22, 0xe3, 0x01, 0x0a, 0x13, 0x52, 0x65, + 0x6d, 0x6f, 0x74, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x34, 0x0a, 0x15, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x4d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x15, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x66, 0x72, 0x65, 0x73, 0x68, 0x4d, 0x73, 0x12, 0x32, 0x0a, 0x14, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x69, 0x72, 0x79, 0x4d, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x14, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x69, 0x72, 0x79, 0x4d, 0x73, 0x12, 0x38, 0x0a, 0x17, 0x6d, + 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x54, 0x6f, 0x41, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x17, 0x6d, 0x69, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x54, 0x6f, 0x41, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x45, 0x78, 0x70, 0x69, 0x72, 0x79, 0x4d, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x79, 0x4d, 0x73, 0x2a, + 0x76, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x00, + 0x12, 0x15, 0x0a, 0x11, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, + 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x41, 0x50, 0x41, 0x42, + 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, + 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x52, 0x45, 0x51, + 0x55, 0x45, 0x53, 0x54, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, + 0x54, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, + 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x05, 0x42, 0x20, 0x5a, 0x1e, 0x63, 0x6f, 0x72, 0x65, 0x2f, + 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x72, 0x65, 0x6d, + 0x6f, 0x74, 0x65, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/core/capabilities/remote/types/messages.proto b/core/capabilities/remote/types/messages.proto index a576e0e5fa1..4855892f9f4 100644 --- a/core/capabilities/remote/types/messages.proto +++ b/core/capabilities/remote/types/messages.proto @@ -19,14 +19,13 @@ message Message { } message MessageBody { + reserved 7, 8; uint32 version = 1; bytes sender = 2; bytes receiver = 3; int64 timestamp = 4; bytes message_id = 5; // scoped to sender string capability_id = 6; - string capability_don_id = 7; - string caller_don_id = 8; string method = 9; Error error = 10; string errorMsg = 11; @@ -38,6 +37,8 @@ message MessageBody { TriggerEventMetadata trigger_event_metadata = 14; } + uint32 capability_don_id = 15; + uint32 caller_don_id = 16; } message TriggerRegistrationMetadata { diff --git a/core/capabilities/remote/types/mocks/dispatcher.go b/core/capabilities/remote/types/mocks/dispatcher.go index 9ef7cee78d1..a73fa7e362b 100644 --- a/core/capabilities/remote/types/mocks/dispatcher.go +++ b/core/capabilities/remote/types/mocks/dispatcher.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -13,11 +13,48 @@ type Dispatcher struct { mock.Mock } +type Dispatcher_Expecter struct { + mock *mock.Mock +} + +func (_m *Dispatcher) EXPECT() *Dispatcher_Expecter { + return &Dispatcher_Expecter{mock: &_m.Mock} +} + // RemoveReceiver provides a mock function with given fields: capabilityId, donId -func (_m *Dispatcher) RemoveReceiver(capabilityId string, donId string) { +func (_m *Dispatcher) RemoveReceiver(capabilityId string, donId uint32) { _m.Called(capabilityId, donId) } +// Dispatcher_RemoveReceiver_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveReceiver' +type Dispatcher_RemoveReceiver_Call struct { + *mock.Call +} + +// RemoveReceiver is a helper method to define mock.On call +// - capabilityId string +// - donId uint32 +func (_e *Dispatcher_Expecter) RemoveReceiver(capabilityId interface{}, donId interface{}) *Dispatcher_RemoveReceiver_Call { + return &Dispatcher_RemoveReceiver_Call{Call: _e.mock.On("RemoveReceiver", capabilityId, donId)} +} + +func (_c *Dispatcher_RemoveReceiver_Call) Run(run func(capabilityId string, donId uint32)) *Dispatcher_RemoveReceiver_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(uint32)) + }) + return _c +} + +func (_c *Dispatcher_RemoveReceiver_Call) Return() *Dispatcher_RemoveReceiver_Call { + _c.Call.Return() + return _c +} + +func (_c *Dispatcher_RemoveReceiver_Call) RunAndReturn(run func(string, uint32)) *Dispatcher_RemoveReceiver_Call { + _c.Call.Return(run) + return _c +} + // Send provides a mock function with given fields: peerID, msgBody func (_m *Dispatcher) Send(peerID ragep2ptypes.PeerID, msgBody *types.MessageBody) error { ret := _m.Called(peerID, msgBody) @@ -36,8 +73,37 @@ func (_m *Dispatcher) Send(peerID ragep2ptypes.PeerID, msgBody *types.MessageBod return r0 } +// Dispatcher_Send_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Send' +type Dispatcher_Send_Call struct { + *mock.Call +} + +// Send is a helper method to define mock.On call +// - peerID ragep2ptypes.PeerID +// - msgBody *types.MessageBody +func (_e *Dispatcher_Expecter) Send(peerID interface{}, msgBody interface{}) *Dispatcher_Send_Call { + return &Dispatcher_Send_Call{Call: _e.mock.On("Send", peerID, msgBody)} +} + +func (_c *Dispatcher_Send_Call) Run(run func(peerID ragep2ptypes.PeerID, msgBody *types.MessageBody)) *Dispatcher_Send_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(ragep2ptypes.PeerID), args[1].(*types.MessageBody)) + }) + return _c +} + +func (_c *Dispatcher_Send_Call) Return(_a0 error) *Dispatcher_Send_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Dispatcher_Send_Call) RunAndReturn(run func(ragep2ptypes.PeerID, *types.MessageBody) error) *Dispatcher_Send_Call { + _c.Call.Return(run) + return _c +} + // SetReceiver provides a mock function with given fields: capabilityId, donId, receiver -func (_m *Dispatcher) SetReceiver(capabilityId string, donId string, receiver types.Receiver) error { +func (_m *Dispatcher) SetReceiver(capabilityId string, donId uint32, receiver types.Receiver) error { ret := _m.Called(capabilityId, donId, receiver) if len(ret) == 0 { @@ -45,7 +111,7 @@ func (_m *Dispatcher) SetReceiver(capabilityId string, donId string, receiver ty } var r0 error - if rf, ok := ret.Get(0).(func(string, string, types.Receiver) error); ok { + if rf, ok := ret.Get(0).(func(string, uint32, types.Receiver) error); ok { r0 = rf(capabilityId, donId, receiver) } else { r0 = ret.Error(0) @@ -54,6 +120,36 @@ func (_m *Dispatcher) SetReceiver(capabilityId string, donId string, receiver ty return r0 } +// Dispatcher_SetReceiver_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetReceiver' +type Dispatcher_SetReceiver_Call struct { + *mock.Call +} + +// SetReceiver is a helper method to define mock.On call +// - capabilityId string +// - donId uint32 +// - receiver types.Receiver +func (_e *Dispatcher_Expecter) SetReceiver(capabilityId interface{}, donId interface{}, receiver interface{}) *Dispatcher_SetReceiver_Call { + return &Dispatcher_SetReceiver_Call{Call: _e.mock.On("SetReceiver", capabilityId, donId, receiver)} +} + +func (_c *Dispatcher_SetReceiver_Call) Run(run func(capabilityId string, donId uint32, receiver types.Receiver)) *Dispatcher_SetReceiver_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(uint32), args[2].(types.Receiver)) + }) + return _c +} + +func (_c *Dispatcher_SetReceiver_Call) Return(_a0 error) *Dispatcher_SetReceiver_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Dispatcher_SetReceiver_Call) RunAndReturn(run func(string, uint32, types.Receiver) error) *Dispatcher_SetReceiver_Call { + _c.Call.Return(run) + return _c +} + // NewDispatcher creates a new instance of Dispatcher. 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 NewDispatcher(t interface { diff --git a/core/capabilities/remote/types/mocks/receiver.go b/core/capabilities/remote/types/mocks/receiver.go index b2329123537..3aaf346b39e 100644 --- a/core/capabilities/remote/types/mocks/receiver.go +++ b/core/capabilities/remote/types/mocks/receiver.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -14,11 +14,48 @@ type Receiver struct { mock.Mock } +type Receiver_Expecter struct { + mock *mock.Mock +} + +func (_m *Receiver) EXPECT() *Receiver_Expecter { + return &Receiver_Expecter{mock: &_m.Mock} +} + // Receive provides a mock function with given fields: ctx, msg func (_m *Receiver) Receive(ctx context.Context, msg *types.MessageBody) { _m.Called(ctx, msg) } +// Receiver_Receive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Receive' +type Receiver_Receive_Call struct { + *mock.Call +} + +// Receive is a helper method to define mock.On call +// - ctx context.Context +// - msg *types.MessageBody +func (_e *Receiver_Expecter) Receive(ctx interface{}, msg interface{}) *Receiver_Receive_Call { + return &Receiver_Receive_Call{Call: _e.mock.On("Receive", ctx, msg)} +} + +func (_c *Receiver_Receive_Call) Run(run func(ctx context.Context, msg *types.MessageBody)) *Receiver_Receive_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.MessageBody)) + }) + return _c +} + +func (_c *Receiver_Receive_Call) Return() *Receiver_Receive_Call { + _c.Call.Return() + return _c +} + +func (_c *Receiver_Receive_Call) RunAndReturn(run func(context.Context, *types.MessageBody)) *Receiver_Receive_Call { + _c.Call.Return(run) + return _c +} + // NewReceiver creates a new instance of Receiver. 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 NewReceiver(t interface { diff --git a/core/capabilities/remote/types/types.go b/core/capabilities/remote/types/types.go index 9c9cf67aa15..d15e2a2824a 100644 --- a/core/capabilities/remote/types/types.go +++ b/core/capabilities/remote/types/types.go @@ -18,14 +18,12 @@ const ( MethodExecute = "Execute" ) -//go:generate mockery --quiet --name Dispatcher --output ./mocks/ --case=underscore type Dispatcher interface { - SetReceiver(capabilityId string, donId string, receiver Receiver) error - RemoveReceiver(capabilityId string, donId string) + SetReceiver(capabilityId string, donId uint32, receiver Receiver) error + RemoveReceiver(capabilityId string, donId uint32) Send(peerID p2ptypes.PeerID, msgBody *MessageBody) error } -//go:generate mockery --quiet --name Receiver --output ./mocks/ --case=underscore type Receiver interface { Receive(ctx context.Context, msg *MessageBody) } diff --git a/core/capabilities/remote/utils_test.go b/core/capabilities/remote/utils_test.go index b5f97af99ed..8bebf71fb66 100644 --- a/core/capabilities/remote/utils_test.go +++ b/core/capabilities/remote/utils_test.go @@ -22,7 +22,7 @@ import ( const ( capId1 = "cap1" capId2 = "cap2" - donId1 = "donA" + donId1 = uint32(1) payload1 = "hello world" payload2 = "goodbye world" ) @@ -58,7 +58,7 @@ func newKeyPair(t *testing.T) (ed25519.PrivateKey, ragetypes.PeerID) { return privKey, peerID } -func encodeAndSign(t *testing.T, senderPrivKey ed25519.PrivateKey, senderId p2ptypes.PeerID, receiverId p2ptypes.PeerID, capabilityId string, donId string, payload []byte) p2ptypes.Message { +func encodeAndSign(t *testing.T, senderPrivKey ed25519.PrivateKey, senderId p2ptypes.PeerID, receiverId p2ptypes.PeerID, capabilityId string, donId uint32, payload []byte) p2ptypes.Message { body := remotetypes.MessageBody{ Sender: senderId[:], Receiver: receiverId[:], @@ -89,7 +89,7 @@ func TestToPeerID(t *testing.T) { } func TestDefaultModeAggregator_Aggregate(t *testing.T) { - val, err := values.Wrap(triggerEvent1) + val, err := values.NewMap(triggerEvent1) require.NoError(t, err) capResponse1 := commoncap.CapabilityResponse{ Value: val, @@ -98,7 +98,7 @@ func TestDefaultModeAggregator_Aggregate(t *testing.T) { marshaled1, err := pb.MarshalCapabilityResponse(capResponse1) require.NoError(t, err) - val2, err := values.Wrap(triggerEvent2) + val2, err := values.NewMap(triggerEvent2) require.NoError(t, err) capResponse2 := commoncap.CapabilityResponse{ Value: val2, diff --git a/core/capabilities/streams/codec.go b/core/capabilities/streams/codec.go index 21784cdcf40..d2bc451a39f 100644 --- a/core/capabilities/streams/codec.go +++ b/core/capabilities/streams/codec.go @@ -18,36 +18,12 @@ type codec struct { var _ datastreams.ReportCodec = &codec{} -func (c *codec) UnwrapValid(wrapped values.Value, allowedSigners [][]byte, minRequiredSignatures int) ([]datastreams.FeedReport, error) { - signersMap := make(map[common.Address]struct{}) - for _, signer := range allowedSigners { - signersMap[common.BytesToAddress(signer)] = struct{}{} - } - dest := []datastreams.FeedReport{} - err := wrapped.UnwrapTo(&dest) +func (c *codec) Unwrap(wrapped values.Value) ([]datastreams.FeedReport, error) { + dest, err := datastreams.UnwrapFeedReportList(wrapped) if err != nil { return nil, fmt.Errorf("failed to unwrap: %v", err) } for i, report := range dest { - // signatures (report and context are signed together) - sigData := append(crypto.Keccak256(report.FullReport), report.ReportContext...) - fullHash := crypto.Keccak256(sigData) - validated := map[common.Address]struct{}{} - for _, sig := range report.Signatures { - signerPubkey, err2 := crypto.SigToPub(fullHash, sig) - if err2 != nil { - return nil, fmt.Errorf("malformed signer: %v", err2) - } - signerAddr := crypto.PubkeyToAddress(*signerPubkey) - if _, ok := signersMap[signerAddr]; !ok { - c.lggr.Debugw("invalid signer", "signerAddr", signerAddr) - continue - } - validated[signerAddr] = struct{}{} - } - if len(validated) < minRequiredSignatures { - return nil, fmt.Errorf("not enough valid signatures %d, needed %d", len(validated), minRequiredSignatures) - } // decoding fields id, err2 := datastreams.NewFeedID(report.FeedID) if err2 != nil { @@ -68,6 +44,36 @@ func (c *codec) Wrap(reports []datastreams.FeedReport) (values.Value, error) { return values.Wrap(reports) } +func (c *codec) Validate(report datastreams.FeedReport, allowedSigners [][]byte, minRequiredSignatures int) error { + signersMap := make(map[common.Address]struct{}) + for _, signer := range allowedSigners { + signersMap[common.BytesToAddress(signer)] = struct{}{} + } + // signatures (report and context are signed together) + sigData := append(crypto.Keccak256(report.FullReport), report.ReportContext...) + fullHash := crypto.Keccak256(sigData) + validated := map[common.Address]struct{}{} + for _, sig := range report.Signatures { + signerPubkey, err2 := crypto.SigToPub(fullHash, sig) + if err2 != nil { + return fmt.Errorf("malformed signer: %v", err2) + } + signerAddr := crypto.PubkeyToAddress(*signerPubkey) + if _, ok := signersMap[signerAddr]; !ok { + c.lggr.Debugw("invalid signer", "signerAddr", signerAddr) + continue + } + validated[signerAddr] = struct{}{} + if len(validated) >= minRequiredSignatures { + break // early exit + } + } + if len(validated) < minRequiredSignatures { + return fmt.Errorf("not enough valid signatures %d, needed %d", len(validated), minRequiredSignatures) + } + return nil +} + func NewCodec(lggr logger.Logger) *codec { return &codec{lggr: lggr} } diff --git a/core/capabilities/streams/codec_test.go b/core/capabilities/streams/codec_test.go index 542f47c5e9e..e3ada731e43 100644 --- a/core/capabilities/streams/codec_test.go +++ b/core/capabilities/streams/codec_test.go @@ -66,21 +66,25 @@ func TestCodec_WrapUnwrap(t *testing.T) { require.NoError(t, err) // wrong type - _, err = codec.UnwrapValid(values.NewBool(true), nil, 0) + _, err = codec.Unwrap(values.NewBool(true)) require.Error(t, err) - // wrong signatures - _, err = codec.UnwrapValid(wrapped, nil, 1) - require.Error(t, err) - - // success - reports, err := codec.UnwrapValid(wrapped, allowedSigners, 2) + // correct reports byt wrong signatures + unwrapped, err := codec.Unwrap(wrapped) require.NoError(t, err) - require.Equal(t, 2, len(reports)) - require.Equal(t, price1.Bytes(), reports[0].BenchmarkPrice) - require.Equal(t, price2.Bytes(), reports[1].BenchmarkPrice) - require.Equal(t, timestamp1, reports[0].ObservationTimestamp) - require.Equal(t, timestamp2, reports[1].ObservationTimestamp) + require.Equal(t, 2, len(unwrapped)) + require.Equal(t, price1.Bytes(), unwrapped[0].BenchmarkPrice) + require.Equal(t, price2.Bytes(), unwrapped[1].BenchmarkPrice) + require.Equal(t, timestamp1, unwrapped[0].ObservationTimestamp) + require.Equal(t, timestamp2, unwrapped[1].ObservationTimestamp) + for _, report := range unwrapped { + require.Error(t, codec.Validate(report, nil, 1)) + } + + // valid signatures + for _, report := range unwrapped { + require.NoError(t, codec.Validate(report, allowedSigners, 2)) + } } func newFeedID(t *testing.T) ([32]byte, string) { @@ -93,12 +97,14 @@ func newFeedID(t *testing.T) ([32]byte, string) { func newReport(t *testing.T, feedID [32]byte, price *big.Int, timestamp int64) []byte { v3Codec := reportcodec.NewReportCodec(feedID, logger.TestLogger(t)) raw, err := v3Codec.BuildReport(v3.ReportFields{ - BenchmarkPrice: price, - Timestamp: uint32(timestamp), - Bid: big.NewInt(0), - Ask: big.NewInt(0), - LinkFee: big.NewInt(0), - NativeFee: big.NewInt(0), + BenchmarkPrice: price, + Timestamp: uint32(timestamp), + ValidFromTimestamp: uint32(timestamp), + Bid: price, + Ask: price, + LinkFee: price, + NativeFee: price, + ExpiresAt: uint32(timestamp + 1000000), }) require.NoError(t, err) return raw diff --git a/core/capabilities/streams/consensus_agg_test.go b/core/capabilities/streams/consensus_agg_test.go new file mode 100644 index 00000000000..506ad26f86f --- /dev/null +++ b/core/capabilities/streams/consensus_agg_test.go @@ -0,0 +1,123 @@ +package streams_test + +import ( + "testing" + "time" + + "github.com/stretchr/testify/require" + "google.golang.org/protobuf/proto" + + "github.com/smartcontractkit/libocr/commontypes" + + "github.com/smartcontractkit/chainlink-common/pkg/capabilities" + "github.com/smartcontractkit/chainlink-common/pkg/capabilities/consensus/ocr3/datafeeds" + "github.com/smartcontractkit/chainlink-common/pkg/capabilities/datastreams" + "github.com/smartcontractkit/chainlink-common/pkg/values" + "github.com/smartcontractkit/chainlink/v2/core/capabilities/streams" + "github.com/smartcontractkit/chainlink/v2/core/logger" +) + +// Integration/load test that combines Data Feeds Consensus Aggregator and Streams Codec. +// For more meaningful measurements, increase the values of parameters P and T. +func TestStreamsConsensusAggregator(t *testing.T) { + Nt := 10 // trigger DON nodes + Ft := 3 // trigger DON faulty nodes + Nw := 10 // workflow DON nodes + Fw := 3 // workflow DON faulty nodes + P := 40 // feeds + T := 2 // test iterations + + triggerNodes := newNodes(t, Nt) + feeds := newFeedsWithSignedReports(t, triggerNodes, Nt, P, 1) + allowedSigners := make([][]byte, Nt) + for i := 0; i < Nt; i++ { + allowedSigners[i] = triggerNodes[i].bundle.PublicKey() // bad name - see comment on evmKeyring.PublicKey + } + + config := newAggConfig(t, feeds) + lggr := logger.TestLogger(t) + codec := streams.NewCodec(lggr) + agg, err := datafeeds.NewDataFeedsAggregator(*config, codec, lggr) + require.NoError(t, err) + + // init round - empty previous Outcome, empty observations + outcome, err := agg.Aggregate(nil, map[commontypes.OracleID][]values.Value{}, Fw) + require.NoError(t, err) + require.False(t, outcome.ShouldReport) + + // validate metadata + newState := &datafeeds.DataFeedsOutcomeMetadata{} + err = proto.Unmarshal(outcome.Metadata, newState) + require.NoError(t, err) + require.Equal(t, P, len(newState.FeedInfo)) + + // run test aggregations + startTs := time.Now().UnixMilli() + processingTime := int64(0) + for c := 0; c < T; c++ { + obs := newObservations(t, Nw, feeds, Ft+1, allowedSigners) + processingStart := time.Now().UnixMilli() + outcome, err = agg.Aggregate(outcome, obs, Fw) + processingTime += time.Now().UnixMilli() - processingStart + require.NoError(t, err) + } + totalTime := time.Now().UnixMilli() - startTs + lggr.Infow("elapsed", "totalMs", totalTime, "processingMs", processingTime) +} + +func newAggConfig(t *testing.T, feeds []feed) *values.Map { + feedMap := map[string]any{} + for _, feed := range feeds { + feedMap[feed.feedIDStr] = map[string]any{ + "deviation": "0.1", + "heartbeat": 1, + "remappedID": feed.feedIDStr, + } + } + unwrappedConfig := map[string]any{ + "feeds": feedMap, + "allowedPartialStaleness": "0.2", + } + config, err := values.NewMap(unwrappedConfig) + require.NoError(t, err) + return config +} + +func newObservations(t *testing.T, nNodes int, feeds []feed, minRequiredSignatures int, allowedSigners [][]byte) map[commontypes.OracleID][]values.Value { + observations := map[commontypes.OracleID][]values.Value{} + for i := 0; i < nNodes; i++ { + reportList := []datastreams.FeedReport{} + for j := 0; j < len(feeds); j++ { + reportIdx := 0 + signedStreamsReport := datastreams.FeedReport{ + FeedID: feeds[j].feedIDStr, + FullReport: feeds[j].reports[reportIdx].rawReport, + ReportContext: feeds[j].reports[reportIdx].reportCtx, + Signatures: feeds[j].reports[reportIdx].signatures, + } + reportList = append(reportList, signedStreamsReport) + } + + payloadVal, err := values.Wrap(reportList) + require.NoError(t, err) + + meta := datastreams.SignersMetadata{ + Signers: allowedSigners, + MinRequiredSignatures: minRequiredSignatures, + } + metaVal, err := values.Wrap(meta) + require.NoError(t, err) + + triggerEvent := capabilities.TriggerEvent{ + TriggerType: triggerID, + ID: "unused", + Timestamp: "1234", + Metadata: metaVal, + Payload: payloadVal, + } + wrappedEvent, err := values.Wrap(triggerEvent) + require.NoError(t, err) + observations[commontypes.OracleID(i)] = []values.Value{wrappedEvent} + } + return observations +} diff --git a/core/capabilities/streams/trigger_test.go b/core/capabilities/streams/trigger_test.go new file mode 100644 index 00000000000..6d8c9a27c1d --- /dev/null +++ b/core/capabilities/streams/trigger_test.go @@ -0,0 +1,227 @@ +package streams_test + +import ( + "crypto/ed25519" + "crypto/rand" + "math/big" + "strconv" + "testing" + "time" + + "github.com/stretchr/testify/require" + + ocrTypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + + ragetypes "github.com/smartcontractkit/libocr/ragep2p/types" + + "github.com/smartcontractkit/chainlink-common/pkg/capabilities" + "github.com/smartcontractkit/chainlink-common/pkg/capabilities/datastreams" + "github.com/smartcontractkit/chainlink-common/pkg/capabilities/pb" + "github.com/smartcontractkit/chainlink-common/pkg/capabilities/triggers" + "github.com/smartcontractkit/chainlink-common/pkg/values" + "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote" + remotetypes "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/types" + "github.com/smartcontractkit/chainlink/v2/core/capabilities/streams" + "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" + "github.com/smartcontractkit/chainlink/v2/core/logger" + "github.com/smartcontractkit/chainlink/v2/core/services/keystore/chaintype" + "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocr2key" + p2ptypes "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types" +) + +const ( + triggerID = "streams-trigger@1.0.0" + workflowID = "workflowID1" + baseTriggerEventID = "triggerEvent_" + basePrice = 2000000000 + baseTimestamp = 1000000000 +) + +type feed struct { + feedID [32]byte + feedIDStr string + reports []report +} + +type report struct { + rawReport []byte + reportCtx []byte + signatures [][]byte +} + +type node struct { + peerID p2ptypes.PeerID + bundle ocr2key.KeyBundle +} + +// Integration/load test that combines Trigger Subscriber, Streams Trigger Aggregator and Streams Codec. +// It measures time needed to receive and process trigger events from multiple nodes and produce a local aggregated event. +// For more meaningful measurements, increase the values of parameters P and T. +func TestStreamsTrigger(t *testing.T) { + N := 31 // trigger DON nodes + F := 10 // faulty nodes + R := 5 // different reports per feed (i.e. prices and timestamps) + P := 2 // feeds + T := 2 // test iterations + + nodes := newNodes(t, N) + feeds := newFeedsWithSignedReports(t, nodes, N, P, R) + + allowedSigners := make([][]byte, N) + for i := 0; i < N; i++ { + allowedSigners[i] = nodes[i].bundle.PublicKey() // bad name - see comment on evmKeyring.PublicKey + } + lggr := logger.TestLogger(t) + ctx := testutils.Context(t) + codec := streams.NewCodec(lggr) + agg := triggers.NewMercuryRemoteAggregator(codec, allowedSigners, F, lggr) + + capInfo := capabilities.CapabilityInfo{ + ID: triggerID, + } + capMembers := make([]p2ptypes.PeerID, N) + for i := 0; i < N; i++ { + capMembers[i] = nodes[i].peerID + } + capDonInfo := capabilities.DON{ + Members: capMembers, + F: uint8(F), + } + config := &remotetypes.RemoteTriggerConfig{ + MinResponsesToAggregate: uint32(F + 1), + } + subscriber := remote.NewTriggerSubscriber(config, capInfo, capDonInfo, capabilities.DON{}, nil, agg, lggr) + + // register trigger + req := capabilities.CapabilityRequest{ + Metadata: capabilities.RequestMetadata{ + WorkflowID: workflowID, + }, + } + triggerEventCallbackCh, err := subscriber.RegisterTrigger(ctx, req) + require.NoError(t, err) + + // send and process all trigger events + startTs := time.Now().UnixMilli() + processingTime := int64(0) + for c := 0; c < T; c++ { + triggerEventID := baseTriggerEventID + strconv.Itoa(c) + for i := 0; i < N; i++ { // every node ... + reportList := make([]datastreams.FeedReport, P) + for j := 0; j < P; j++ { // ... sends reports for every feed ... + reportIdx := (i + j) % R + signatures := make([][]byte, F+1) + for k := 0; k < F+1; k++ { // ... each signed by F+1 nodes + signatures[k] = feeds[j].reports[reportIdx].signatures[(i+k)%N] + } + signedStreamsReport := datastreams.FeedReport{ + FeedID: feeds[j].feedIDStr, + FullReport: feeds[j].reports[reportIdx].rawReport, + ReportContext: feeds[j].reports[reportIdx].reportCtx, + Signatures: signatures, + } + reportList[j] = signedStreamsReport + } + + msg := newTriggerEvent(t, reportList, triggerEventID, nodes[i].peerID) + + processingStart := time.Now().UnixMilli() + subscriber.Receive(ctx, msg) + processingTime += time.Now().UnixMilli() - processingStart + } + + response := <-triggerEventCallbackCh + validateLatestReports(t, response.Value, P, basePrice+R-1, baseTimestamp+R-1) + } + totalTime := time.Now().UnixMilli() - startTs + lggr.Infow("elapsed", "totalMs", totalTime, "processingMs", processingTime) +} + +func newNodes(t *testing.T, N int) []node { + nodes := make([]node, N) + for i := 0; i < N; i++ { + bundle, err := ocr2key.New(chaintype.EVM) + require.NoError(t, err) + nodes[i].bundle = bundle + nodes[i].peerID = newPeerID(t) + } + return nodes +} + +func newPeerID(t *testing.T) ragetypes.PeerID { + _, privKey, err := ed25519.GenerateKey(rand.Reader) + require.NoError(t, err) + peerID, err := ragetypes.PeerIDFromPrivateKey(privKey) + require.NoError(t, err) + return peerID +} + +func newFeedsWithSignedReports(t *testing.T, nodes []node, N, P, R int) []feed { + feeds := make([]feed, P) + for i := 0; i < P; i++ { + id, idStr := newFeedID(t) + feeds[i].feedID = id + feeds[i].feedIDStr = idStr + feeds[i].reports = make([]report, R) + for j := 0; j < R; j++ { + report := newReport(t, id, big.NewInt(int64(basePrice+j)), int64(baseTimestamp+j)) + feeds[i].reports[j].rawReport = report + reportCtx := ocrTypes.ReportContext{ReportTimestamp: ocrTypes.ReportTimestamp{Epoch: uint32(baseTimestamp + j)}} + feeds[i].reports[j].reportCtx = rawReportContext(reportCtx) + feeds[i].reports[j].signatures = make([][]byte, N) + for k := 0; k < N; k++ { + signature, err := nodes[k].bundle.Sign(reportCtx, report) + require.NoError(t, err) + feeds[i].reports[j].signatures[k] = signature + } + } + } + return feeds +} + +func newTriggerEvent(t *testing.T, reportList []datastreams.FeedReport, triggerEventID string, sender ragetypes.PeerID) *remotetypes.MessageBody { + val, err := values.Wrap(reportList) + require.NoError(t, err) + + triggerEvent := capabilities.TriggerEvent{ + TriggerType: triggerID, + ID: triggerEventID, + Timestamp: strconv.FormatInt(1000, 10), + Metadata: nil, + Payload: val, + } + + eventVal, err := values.WrapMap(triggerEvent) + require.NoError(t, err) + + marshaled, err := pb.MarshalCapabilityResponse( + capabilities.CapabilityResponse{ + Value: eventVal, + }) + require.NoError(t, err) + msg := &remotetypes.MessageBody{ + Sender: sender[:], + Method: remotetypes.MethodTriggerEvent, + Metadata: &remotetypes.MessageBody_TriggerEventMetadata{ + TriggerEventMetadata: &remotetypes.TriggerEventMetadata{ + WorkflowIds: []string{workflowID}, + TriggerEventId: triggerEventID, + }, + }, + Payload: marshaled, + } + return msg +} + +func validateLatestReports(t *testing.T, wrapped values.Value, expectedFeedsLen int, expectedPrice int, expectedTimestamp int) { + triggerEvent := capabilities.TriggerEvent{} + require.NoError(t, wrapped.UnwrapTo(&triggerEvent)) + reports := []datastreams.FeedReport{} + require.NoError(t, triggerEvent.Payload.UnwrapTo(&reports)) + require.Equal(t, expectedFeedsLen, len(reports)) + priceBig := big.NewInt(int64(expectedPrice)) + for _, report := range reports { + require.Equal(t, priceBig.Bytes(), report.BenchmarkPrice) + require.Equal(t, int64(expectedTimestamp), report.ObservationTimestamp) + } +} diff --git a/core/capabilities/syncer.go b/core/capabilities/syncer.go deleted file mode 100644 index 800fb325094..00000000000 --- a/core/capabilities/syncer.go +++ /dev/null @@ -1,913 +0,0 @@ -package capabilities - -import ( - "context" - "errors" - "fmt" - "math/big" - "slices" - "strings" - "sync" - "time" - - "google.golang.org/protobuf/proto" - - "github.com/smartcontractkit/chainlink-common/pkg/capabilities" - "github.com/smartcontractkit/chainlink-common/pkg/capabilities/datastreams" - "github.com/smartcontractkit/chainlink-common/pkg/capabilities/triggers" - "github.com/smartcontractkit/chainlink-common/pkg/services" - "github.com/smartcontractkit/chainlink-common/pkg/types/core" - - "github.com/smartcontractkit/libocr/ragep2p" - ragetypes "github.com/smartcontractkit/libocr/ragep2p/types" - - "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote" - "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/target" - remotetypes "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/types" - "github.com/smartcontractkit/chainlink/v2/core/capabilities/streams" - kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/capabilities_registry" - "github.com/smartcontractkit/chainlink/v2/core/logger" - p2ptypes "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types" -) - -type reader interface { - state(ctx context.Context) (state, error) - LocalNode(ctx context.Context) (capabilities.Node, error) -} - -type registrySyncer struct { - peerWrapper p2ptypes.PeerWrapper - registry core.CapabilitiesRegistry - dispatcher remotetypes.Dispatcher - stopCh services.StopChan - subServices []services.Service - networkSetup HardcodedDonNetworkSetup - reader - - wg sync.WaitGroup - lggr logger.Logger -} - -var _ services.Service = ®istrySyncer{} - -var ( - defaultTickInterval = 12 * time.Second -) - -var defaultStreamConfig = p2ptypes.StreamConfig{ - IncomingMessageBufferSize: 1000000, - OutgoingMessageBufferSize: 1000000, - MaxMessageLenBytes: 100000, - MessageRateLimiter: ragep2p.TokenBucketParams{ - Rate: 100.0, - Capacity: 1000, - }, - BytesRateLimiter: ragep2p.TokenBucketParams{ - Rate: 100000.0, - Capacity: 1000000, - }, -} - -// RegistrySyncer updates local Registry to match its onchain counterpart -func NewRegistrySyncer( - peerWrapper p2ptypes.PeerWrapper, - registry core.CapabilitiesRegistry, - dispatcher remotetypes.Dispatcher, - lggr logger.Logger, - networkSetup HardcodedDonNetworkSetup, - relayer contractReaderFactory, - registryAddress string, -) (*registrySyncer, error) { - stopCh := make(services.StopChan) - ctx, _ := stopCh.NewCtx() - reader, err := newRemoteRegistryReader(ctx, lggr, peerWrapper, relayer, registryAddress) - if err != nil { - return nil, err - } - - return newRegistrySyncer( - stopCh, - peerWrapper, - registry, - dispatcher, - lggr.Named("RegistrySyncer"), - networkSetup, - reader, - ), nil -} - -func newRegistrySyncer( - stopCh services.StopChan, - peerWrapper p2ptypes.PeerWrapper, - registry core.CapabilitiesRegistry, - dispatcher remotetypes.Dispatcher, - lggr logger.Logger, - networkSetup HardcodedDonNetworkSetup, - reader reader, -) *registrySyncer { - return ®istrySyncer{ - stopCh: stopCh, - peerWrapper: peerWrapper, - registry: registry, - dispatcher: dispatcher, - networkSetup: networkSetup, - lggr: lggr, - reader: reader, - } -} - -func (s *registrySyncer) Start(ctx context.Context) error { - // NOTE: Decrease wg.Add and uncomment the line below - // `go s.launch()` to enable the hardcoded syncer. - s.wg.Add(1) - // go s.launch() - go s.syncLoop() - return nil -} - -func (s *registrySyncer) syncLoop() { - defer s.wg.Done() - - ctx, cancel := s.stopCh.NewCtx() - defer cancel() - - ticker := time.NewTicker(defaultTickInterval) - defer ticker.Stop() - - // Sync for a first time outside the loop; this means we'll start a remote - // sync immediately once spinning up syncLoop, as by default a ticker will - // fire for the first time at T+N, where N is the interval. - s.lggr.Debug("starting initial sync with remote registry") - err := s.sync(ctx) - if err != nil { - s.lggr.Errorw("failed to sync with remote registry", "error", err) - } - - for { - select { - case <-s.stopCh: - return - case <-ticker.C: - s.lggr.Debug("starting regular sync with the remote registry") - err := s.sync(ctx) - if err != nil { - s.lggr.Errorw("failed to sync with remote registry", "error", err) - } - } - } -} - -func (s *registrySyncer) sync(ctx context.Context) error { - readerState, err := s.reader.state(ctx) - if err != nil { - return fmt.Errorf("failed to sync with remote registry: %w", err) - } - - // Let's start by updating the list of Peers - // We do this by creating a new entry for each node belonging - // to a public DON. - // We also add the hardcoded peers determined by the NetworkSetup. - allPeers := make(map[ragetypes.PeerID]p2ptypes.StreamConfig) - // TODO: Remove this when we're no longer hard-coding - // a `networkSetup`. - for p, cfg := range s.networkSetup.allPeers { - allPeers[p] = cfg - } - - publicDONs := []kcr.CapabilitiesRegistryDONInfo{} - for _, d := range readerState.IDsToDONs { - if !d.IsPublic { - continue - } - - publicDONs = append(publicDONs, d) - - for _, nid := range d.NodeP2PIds { - allPeers[nid] = defaultStreamConfig - } - } - - // TODO: be a bit smarter about who we connect to; we should ideally only - // be connecting to peers when we need to. - // https://smartcontract-it.atlassian.net/browse/KS-330 - err = s.peerWrapper.GetPeer().UpdateConnections(allPeers) - if err != nil { - return fmt.Errorf("failed to update peer connections: %w", err) - } - - // Next, we need to split the DONs into the following: - // - workflow DONs the current node is a part of. - // These will need remote shims to all remote capabilities on other DONs. - // - // We'll also construct a set to record what DONs the current node is a part of, - // regardless of any modifiers (public/acceptsWorkflows etc). - myID := s.peerWrapper.GetPeer().ID() - myWorkflowDONs := []kcr.CapabilitiesRegistryDONInfo{} - remoteWorkflowDONs := []kcr.CapabilitiesRegistryDONInfo{} - myDONs := map[uint32]bool{} - for _, d := range readerState.IDsToDONs { - for _, peerID := range d.NodeP2PIds { - if peerID == myID { - myDONs[d.Id] = true - } - } - - if d.AcceptsWorkflows { - if myDONs[d.Id] { - myWorkflowDONs = append(myWorkflowDONs, d) - } else { - remoteWorkflowDONs = append(remoteWorkflowDONs, d) - } - } - } - - // - remote capability DONs (with IsPublic = true) the current node is a part of. - // These need server-side shims. - myCapabilityDONs := []kcr.CapabilitiesRegistryDONInfo{} - remoteCapabilityDONs := []kcr.CapabilitiesRegistryDONInfo{} - for _, d := range publicDONs { - if len(d.CapabilityConfigurations) > 0 { - if myDONs[d.Id] { - myCapabilityDONs = append(myCapabilityDONs, d) - } else { - remoteCapabilityDONs = append(remoteCapabilityDONs, d) - } - } - } - - // Now, if my node is a workflow DON, let's setup any shims - // to external capabilities. - if len(myWorkflowDONs) > 0 { - myDON := myWorkflowDONs[0] - - // TODO: this is a bit nasty; figure out how best to handle this. - if len(myWorkflowDONs) > 1 { - s.lggr.Warn("node is part of more than one workflow DON; assigning first DON as caller") - } - - for _, rcd := range remoteCapabilityDONs { - err := s.addRemoteCapabilities(ctx, myDON, rcd, readerState) - if err != nil { - return err - } - } - } - - // Finally, if I'm a capability DON, let's enable external access - // to the capability. - if len(myCapabilityDONs) > 0 { - for _, mcd := range myCapabilityDONs { - err := s.enableExternalAccess(ctx, myID, mcd, readerState, remoteWorkflowDONs) - if err != nil { - return err - } - } - } - - return nil -} - -func signersFor(don kcr.CapabilitiesRegistryDONInfo, state state) ([][]byte, error) { - s := [][]byte{} - for _, nodeID := range don.NodeP2PIds { - node, ok := state.IDsToNodes[nodeID] - if !ok { - return nil, fmt.Errorf("could not find node for id %s", nodeID) - } - - // NOTE: the capability registry stores signers as [32]byte, - // but we only need the first [20], as the rest is padded. - s = append(s, node.Signer[0:20]) - } - - return s, nil -} - -func toDONInfo(don kcr.CapabilitiesRegistryDONInfo) *capabilities.DON { - peerIDs := []p2ptypes.PeerID{} - for _, p := range don.NodeP2PIds { - peerIDs = append(peerIDs, p) - } - - return &capabilities.DON{ - ID: fmt.Sprint(don.Id), - Members: peerIDs, - F: don.F, - } -} - -func toCapabilityType(capabilityType uint8) capabilities.CapabilityType { - switch capabilityType { - case 0: - return capabilities.CapabilityTypeTrigger - case 1: - return capabilities.CapabilityTypeAction - case 2: - return capabilities.CapabilityTypeConsensus - case 3: - return capabilities.CapabilityTypeTarget - default: - // Not found - return capabilities.CapabilityType(-1) - } -} - -func (s *registrySyncer) addRemoteCapabilities(ctx context.Context, myDON kcr.CapabilitiesRegistryDONInfo, remoteDON kcr.CapabilitiesRegistryDONInfo, state state) error { - for _, c := range remoteDON.CapabilityConfigurations { - capability, ok := state.IDsToCapabilities[c.CapabilityId] - if !ok { - return fmt.Errorf("could not find capability matching id %s", c.CapabilityId) - } - - switch toCapabilityType(capability.CapabilityType) { - case capabilities.CapabilityTypeTrigger: - newTriggerFn := func(info capabilities.CapabilityInfo) (capabilityService, error) { - if !strings.HasPrefix(info.ID, "streams-trigger") { - return nil, errors.New("not supported: trigger capability does not have id = streams-trigger") - } - - codec := streams.NewCodec(s.lggr) - - signers, err := signersFor(remoteDON, state) - if err != nil { - return nil, err - } - - aggregator := triggers.NewMercuryRemoteAggregator( - codec, - signers, - int(remoteDON.F+1), - s.lggr, - ) - cfg := &remotetypes.RemoteTriggerConfig{} - cfg.ApplyDefaults() - err = proto.Unmarshal(c.Config, cfg) - if err != nil { - return nil, err - } - // TODO: We need to implement a custom, Mercury-specific - // aggregator here, because there is no guarantee that - // all trigger events in the workflow will have the same - // payloads. As a workaround, we validate the signatures. - // When this is solved, we can move to a generic aggregator - // and remove this. - triggerCap := remote.NewTriggerSubscriber( - cfg, - info, - *toDONInfo(remoteDON), - *toDONInfo(myDON), - s.dispatcher, - aggregator, - s.lggr, - ) - return triggerCap, nil - } - err := s.addToRegistryAndSetDispatcher(ctx, capability, remoteDON, newTriggerFn) - if err != nil { - return fmt.Errorf("failed to add trigger shim: %w", err) - } - case capabilities.CapabilityTypeAction: - s.lggr.Warn("no remote client configured for capability type action, skipping configuration") - case capabilities.CapabilityTypeConsensus: - s.lggr.Warn("no remote client configured for capability type consensus, skipping configuration") - case capabilities.CapabilityTypeTarget: - newTargetFn := func(info capabilities.CapabilityInfo) (capabilityService, error) { - client := target.NewClient( - info, - *toDONInfo(myDON), - s.dispatcher, - defaultTargetRequestTimeout, - s.lggr, - ) - return client, nil - } - - err := s.addToRegistryAndSetDispatcher(ctx, capability, remoteDON, newTargetFn) - if err != nil { - return fmt.Errorf("failed to add target shim: %w", err) - } - default: - s.lggr.Warnf("unknown capability type, skipping configuration: %+v", capability) - } - } - return nil -} - -type capabilityService interface { - capabilities.BaseCapability - remotetypes.Receiver - services.Service -} - -func (s *registrySyncer) addToRegistryAndSetDispatcher(ctx context.Context, capabilityInfo kcr.CapabilitiesRegistryCapabilityInfo, don kcr.CapabilitiesRegistryDONInfo, newCapFn func(info capabilities.CapabilityInfo) (capabilityService, error)) error { - fullCapID := fmt.Sprintf("%s@%s", capabilityInfo.LabelledName, capabilityInfo.Version) - info, err := capabilities.NewRemoteCapabilityInfo( - fullCapID, - toCapabilityType(capabilityInfo.CapabilityType), - fmt.Sprintf("Remote Capability for %s", fullCapID), - toDONInfo(don), - ) - if err != nil { - return err - } - s.lggr.Debugw("Adding remote capability to registry", "id", info.ID, "don", info.DON) - capability, err := newCapFn(info) - if err != nil { - return err - } - - err = s.registry.Add(ctx, capability) - if err != nil { - // If the capability already exists, then it's either local - // or we've handled this in a previous syncer iteration, - // let's skip and move on to other capabilities. - if errors.Is(err, ErrCapabilityAlreadyExists) { - return nil - } - - return err - } - - err = s.dispatcher.SetReceiver( - fullCapID, - fmt.Sprint(don.Id), - capability, - ) - if err != nil { - return err - } - s.lggr.Debugw("Setting receiver for capability", "id", fullCapID, "donID", don.Id) - err = capability.Start(ctx) - if err != nil { - return err - } - s.subServices = append(s.subServices, capability) - return nil -} - -var ( - defaultTargetRequestTimeout = time.Minute -) - -func (s *registrySyncer) enableExternalAccess(ctx context.Context, myPeerID p2ptypes.PeerID, don kcr.CapabilitiesRegistryDONInfo, state state, remoteWorkflowDONs []kcr.CapabilitiesRegistryDONInfo) error { - idsToDONs := map[string]capabilities.DON{} - for _, d := range remoteWorkflowDONs { - idsToDONs[fmt.Sprint(d.Id)] = *toDONInfo(d) - } - - for _, c := range don.CapabilityConfigurations { - capability, ok := state.IDsToCapabilities[c.CapabilityId] - if !ok { - return fmt.Errorf("could not find capability matching id %s", c.CapabilityId) - } - - switch toCapabilityType(capability.CapabilityType) { - case capabilities.CapabilityTypeTrigger: - newTriggerPublisher := func(capability capabilities.BaseCapability, info capabilities.CapabilityInfo) (receiverService, error) { - cfg := &remotetypes.RemoteTriggerConfig{} - cfg.ApplyDefaults() - err := proto.Unmarshal(c.Config, cfg) - if err != nil { - return nil, err - } - publisher := remote.NewTriggerPublisher( - cfg, - capability.(capabilities.TriggerCapability), - info, - *toDONInfo(don), - idsToDONs, - s.dispatcher, - s.lggr, - ) - return publisher, nil - } - - err := s.addReceiver(ctx, capability, don, newTriggerPublisher) - if err != nil { - return fmt.Errorf("failed to add server-side receiver: %w", err) - } - case capabilities.CapabilityTypeAction: - s.lggr.Warn("no remote client configured for capability type action, skipping configuration") - case capabilities.CapabilityTypeConsensus: - s.lggr.Warn("no remote client configured for capability type consensus, skipping configuration") - case capabilities.CapabilityTypeTarget: - newTargetServer := func(capability capabilities.BaseCapability, info capabilities.CapabilityInfo) (receiverService, error) { - return target.NewServer( - myPeerID, - capability.(capabilities.TargetCapability), - info, - *toDONInfo(don), - idsToDONs, - s.dispatcher, - defaultTargetRequestTimeout, - s.lggr, - ), nil - } - - err := s.addReceiver(ctx, capability, don, newTargetServer) - if err != nil { - return fmt.Errorf("failed to add server-side receiver: %w", err) - } - default: - s.lggr.Warnf("unknown capability type, skipping configuration: %+v", capability) - } - } - return nil -} - -type receiverService interface { - services.Service - remotetypes.Receiver -} - -func (s *registrySyncer) addReceiver(ctx context.Context, capability kcr.CapabilitiesRegistryCapabilityInfo, don kcr.CapabilitiesRegistryDONInfo, newReceiverFn func(capability capabilities.BaseCapability, info capabilities.CapabilityInfo) (receiverService, error)) error { - fullCapID := fmt.Sprintf("%s@%s", capability.LabelledName, capability.Version) - info, err := capabilities.NewRemoteCapabilityInfo( - fullCapID, - toCapabilityType(capability.CapabilityType), - fmt.Sprintf("Remote Capability for %s", fullCapID), - toDONInfo(don), - ) - if err != nil { - return err - } - underlying, err := s.registry.Get(ctx, fullCapID) - if err != nil { - return err - } - - receiver, err := newReceiverFn(underlying, info) - if err != nil { - return err - } - - s.lggr.Debugw("Enabling external access for capability", "id", fullCapID, "donID", don.Id) - err = s.dispatcher.SetReceiver(fullCapID, fmt.Sprint(don.Id), receiver) - if err != nil { - return err - } - - err = receiver.Start(ctx) - if err != nil { - return err - } - - s.subServices = append(s.subServices, receiver) - return nil -} - -//func hexStringsToBytes(strs []string) (res [][]byte) { -// for _, s := range strs { -// b, _ := hex.DecodeString(s[2:]) -// res = append(res, b) -// } -// return res -//} - -//const maxRetryCount = 60 - -//// NOTE: this implementation of the Syncer is temporary and will be replaced by one -//// that reads the configuration from chain (KS-117). -//func (s *registrySyncer) launch() { -// ctx, _ := s.stopCh.NewCtx() -// defer s.wg.Done() -// capId := "streams-trigger@1.0.0" -// triggerInfo, err := capabilities.NewRemoteCapabilityInfo( -// capId, -// capabilities.CapabilityTypeTrigger, -// "Remote Trigger", -// &s.networkSetup.TriggerCapabilityDonInfo, -// ) -// if err != nil { -// s.lggr.Errorw("failed to create capability info for streams-trigger", "error", err) -// return -// } -// -// targetCapId := "write_ethereum-testnet-sepolia@1.0.0" -// targetInfo, err := capabilities.NewRemoteCapabilityInfo( -// targetCapId, -// capabilities.CapabilityTypeTarget, -// "Remote Target", -// &s.networkSetup.TargetCapabilityDonInfo, -// ) -// if err != nil { -// s.lggr.Errorw("failed to create capability info for write_ethereum-testnet-sepolia", "error", err) -// return -// } -// -// myId := s.peerWrapper.GetPeer().ID() -// config := &remotetypes.RemoteTriggerConfig{ -// RegistrationRefreshMs: 20000, -// RegistrationExpiryMs: 60000, -// MinResponsesToAggregate: uint32(s.networkSetup.TriggerCapabilityDonInfo.F) + 1, -// } -// err = s.peerWrapper.GetPeer().UpdateConnections(s.networkSetup.allPeers) -// if err != nil { -// s.lggr.Errorw("failed to update connections", "error", err) -// return -// } -// if s.networkSetup.IsWorkflowDon(myId) { -// s.lggr.Info("member of a workflow DON - starting remote subscribers") -// codec := streams.NewCodec(s.lggr) -// aggregator := triggers.NewMercuryRemoteAggregator(codec, hexStringsToBytes(s.networkSetup.triggerDonSigners), int(s.networkSetup.TriggerCapabilityDonInfo.F+1), s.lggr) -// triggerCap := remote.NewTriggerSubscriber(config, triggerInfo, s.networkSetup.TriggerCapabilityDonInfo, s.networkSetup.WorkflowsDonInfo, s.dispatcher, aggregator, s.lggr) -// err = s.registry.Add(ctx, triggerCap) -// if err != nil { -// s.lggr.Errorw("failed to add remote trigger capability to registry", "error", err) -// return -// } -// err = s.dispatcher.SetReceiver(capId, s.networkSetup.TriggerCapabilityDonInfo.ID, triggerCap) -// if err != nil { -// s.lggr.Errorw("workflow DON failed to set receiver for trigger", "capabilityId", capId, "donId", s.networkSetup.TriggerCapabilityDonInfo.ID, "error", err) -// return -// } -// s.subServices = append(s.subServices, triggerCap) -// -// s.lggr.Info("member of a workflow DON - starting remote targets") -// targetCap := target.NewClient(targetInfo, s.networkSetup.WorkflowsDonInfo, s.dispatcher, 60*time.Second, s.lggr) -// err = s.registry.Add(ctx, targetCap) -// if err != nil { -// s.lggr.Errorw("failed to add remote target capability to registry", "error", err) -// return -// } -// err = s.dispatcher.SetReceiver(targetCapId, s.networkSetup.TargetCapabilityDonInfo.ID, targetCap) -// if err != nil { -// s.lggr.Errorw("workflow DON failed to set receiver for target", "capabilityId", capId, "donId", s.networkSetup.TargetCapabilityDonInfo.ID, "error", err) -// return -// } -// s.subServices = append(s.subServices, targetCap) -// } -// if s.networkSetup.IsTriggerDon(myId) { -// s.lggr.Info("member of a capability DON - starting remote publishers") -// -// /*{ -// // ---- This is for local tests only, until a full-blown Syncer is implemented -// // ---- Normally this is set up asynchronously (by the Relayer + job specs in Mercury's case) -// localTrigger := triggers.NewMercuryTriggerService(1000, s.lggr) -// mockMercuryDataProducer := NewMockMercuryDataProducer(localTrigger, s.lggr) -// err = s.registry.Add(ctx, localTrigger) -// if err != nil { -// s.lggr.Errorw("failed to add local trigger capability to registry", "error", err) -// return err -// } -// s.subServices = append(s.subServices, localTrigger) -// s.subServices = append(s.subServices, mockMercuryDataProducer) -// // ---- -// }*/ -// -// count := 0 -// for { -// count++ -// if count > maxRetryCount { -// s.lggr.Error("failed to get Streams Trigger from the Registry") -// return -// } -// underlying, err2 := s.registry.GetTrigger(ctx, capId) -// if err2 != nil { -// // NOTE: it's possible that the jobs are not launched yet at this moment. -// // If not found yet, Syncer won't add to Registry but retry on the next tick. -// s.lggr.Infow("trigger not found yet ...", "capabilityId", capId, "error", err2) -// time.Sleep(1 * time.Second) -// continue -// } -// workflowDONs := map[string]capabilities.DON{ -// s.networkSetup.WorkflowsDonInfo.ID: s.networkSetup.WorkflowsDonInfo, -// } -// triggerCap := remote.NewTriggerPublisher(config, underlying, triggerInfo, s.networkSetup.TriggerCapabilityDonInfo, workflowDONs, s.dispatcher, s.lggr) -// err = s.dispatcher.SetReceiver(capId, s.networkSetup.TriggerCapabilityDonInfo.ID, triggerCap) -// if err != nil { -// s.lggr.Errorw("capability DON failed to set receiver", "capabilityId", capId, "donId", s.networkSetup.TriggerCapabilityDonInfo.ID, "error", err) -// return -// } -// s.subServices = append(s.subServices, triggerCap) -// break -// } -// } -// if s.networkSetup.IsTargetDon(myId) { -// s.lggr.Info("member of a target DON - starting remote shims") -// underlying, err2 := s.registry.GetTarget(ctx, targetCapId) -// if err2 != nil { -// s.lggr.Errorw("target not found yet", "capabilityId", targetCapId, "error", err2) -// return -// } -// workflowDONs := map[string]capabilities.DON{ -// s.networkSetup.WorkflowsDonInfo.ID: s.networkSetup.WorkflowsDonInfo, -// } -// targetCap := target.NewServer(myId, underlying, targetInfo, *targetInfo.DON, workflowDONs, s.dispatcher, 60*time.Second, s.lggr) -// err = s.dispatcher.SetReceiver(targetCapId, s.networkSetup.TargetCapabilityDonInfo.ID, targetCap) -// if err != nil { -// s.lggr.Errorw("capability DON failed to set receiver", "capabilityId", capId, "donId", s.networkSetup.TargetCapabilityDonInfo.ID, "error", err) -// return -// } -// s.subServices = append(s.subServices, targetCap) -// } -// // NOTE: temporary service start - should be managed by capability creation -// for _, srv := range s.subServices { -// err = srv.Start(ctx) -// if err != nil { -// s.lggr.Errorw("failed to start remote trigger caller", "error", err) -// return -// } -// } -// s.lggr.Info("registry syncer started") -//} - -func (s *registrySyncer) Close() error { - close(s.stopCh) - s.wg.Wait() - for _, subService := range s.subServices { - err := subService.Close() - if err != nil { - s.lggr.Errorw("failed to close a sub-service", "name", subService.Name(), "error", err) - } - } - 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" -} - -// HardcodedDonNetworkSetup is a temporary setup for testing purposes -type HardcodedDonNetworkSetup struct { - workflowDonPeers []string - triggerDonPeers []string - targetDonPeers []string - triggerDonSigners []string - allPeers map[ragetypes.PeerID]p2ptypes.StreamConfig - - WorkflowsDonInfo capabilities.DON - TriggerCapabilityDonInfo capabilities.DON - TargetCapabilityDonInfo capabilities.DON -} - -func NewHardcodedDonNetworkSetup() (HardcodedDonNetworkSetup, error) { - result := HardcodedDonNetworkSetup{} - - result.workflowDonPeers = []string{ - "12D3KooWBCF1XT5Wi8FzfgNCqRL76Swv8TRU3TiD4QiJm8NMNX7N", - "12D3KooWG1AyvwmCpZ93J8pBQUE1SuzrjDXnT4BeouncHR3jWLCG", - "12D3KooWGeUKZBRMbx27FUTgBwZa9Ap9Ym92mywwpuqkEtz8XWyv", - "12D3KooW9zYWQv3STmDeNDidyzxsJSTxoCTLicafgfeEz9nhwhC4", - "12D3KooWG1AeBnSJH2mdcDusXQVye2jqodZ6pftTH98HH6xvrE97", - "12D3KooWBf3PrkhNoPEmp7iV291YnPuuTsgEDHTscLajxoDvwHGA", - "12D3KooWP3FrMTFXXRU2tBC8aYvEBgUX6qhcH9q2JZCUi9Wvc2GX", - } - result.triggerDonPeers = []string{ - "12D3KooWBaiTbbRwwt2fbNifiL7Ew9tn3vds9AJE3Nf3eaVBX36m", - "12D3KooWS7JSY9fzSfWgbCE1S3W2LNY6ZVpRuun74moVBkKj6utE", - "12D3KooWMMTDXcWhpVnwrdAer1jnVARTmnr3RyT3v7Djg8ZuoBh9", - "12D3KooWGzVXsKxXsF4zLgxSDM8Gzx1ywq2pZef4PrHMKuVg4K3P", - "12D3KooWSyjmmzjVtCzwN7bXzZQFmWiJRuVcKBerNjVgL7HdLJBW", - "12D3KooWLGz9gzhrNsvyM6XnXS3JRkZoQdEzuAvysovnSChNK5ZK", - "12D3KooWAvZnvknFAfSiUYjATyhzEJLTeKvAzpcLELHi4ogM3GET", - } - result.triggerDonSigners = []string{ - "0x9CcE7293a4Cc2621b61193135A95928735e4795F", - "0x3c775F20bCB2108C1A818741Ce332Bb5fe0dB925", - "0x50314239e2CF05555ceeD53E7F47eB2A8Eab0dbB", - "0xd76A4f98898c3b9A72b244476d7337b50D54BCd8", - "0x656A873f6895b8a03Fb112dE927d43FA54B2c92A", - "0x5d1e87d87bF2e0cD4Ea64F381a2dbF45e5f0a553", - "0x91d9b0062265514f012Eb8fABA59372fD9520f56", - } - result.targetDonPeers = []string{ // "cap-one" - "12D3KooWJrthXtnPHw7xyHFAxo6NxifYTvc8igKYaA6wRRRqtsMb", - "12D3KooWFQekP9sGex4XhqEJav5EScjTpDVtDqJFg1JvrePBCEGJ", - "12D3KooWFLEq4hYtdyKWwe47dXGEbSiHMZhmr5xLSJNhpfiEz8NF", - "12D3KooWN2hztiXNNS1jMQTTvvPRYcarK1C7T3Mdqk4x4gwyo5WS", - } - - result.allPeers = make(map[ragetypes.PeerID]p2ptypes.StreamConfig) - addPeersToDONInfo := func(peers []string, donInfo *capabilities.DON) error { - for _, peerID := range peers { - var p ragetypes.PeerID - err := p.UnmarshalText([]byte(peerID)) - if err != nil { - return err - } - result.allPeers[p] = defaultStreamConfig - donInfo.Members = append(donInfo.Members, p) - } - return nil - } - result.WorkflowsDonInfo = capabilities.DON{ID: "workflowDon1", F: 2} - if err := addPeersToDONInfo(result.workflowDonPeers, &result.WorkflowsDonInfo); err != nil { - return HardcodedDonNetworkSetup{}, fmt.Errorf("failed to add peers to workflow DON info: %w", err) - } - result.TriggerCapabilityDonInfo = capabilities.DON{ID: "capabilityDon1", F: 1} // NOTE: misconfiguration - should be 2 - if err := addPeersToDONInfo(result.triggerDonPeers, &result.TriggerCapabilityDonInfo); err != nil { - return HardcodedDonNetworkSetup{}, fmt.Errorf("failed to add peers to trigger DON info: %w", err) - } - - result.TargetCapabilityDonInfo = capabilities.DON{ID: "targetDon1", F: 1} - if err := addPeersToDONInfo(result.targetDonPeers, &result.TargetCapabilityDonInfo); err != nil { - return HardcodedDonNetworkSetup{}, fmt.Errorf("failed to add peers to target DON info: %w", err) - } - - return result, nil -} - -func (h HardcodedDonNetworkSetup) IsWorkflowDon(id p2ptypes.PeerID) bool { - return slices.Contains(h.workflowDonPeers, id.String()) -} - -func (h HardcodedDonNetworkSetup) IsTriggerDon(id p2ptypes.PeerID) bool { - return slices.Contains(h.triggerDonPeers, id.String()) -} - -func (h HardcodedDonNetworkSetup) IsTargetDon(id p2ptypes.PeerID) bool { - return slices.Contains(h.targetDonPeers, id.String()) -} - -type mockMercuryDataProducer struct { - trigger *triggers.MercuryTriggerService - wg sync.WaitGroup - closeCh chan struct{} - lggr logger.Logger -} - -var _ services.Service = &mockMercuryDataProducer{} - -func NewMockMercuryDataProducer(trigger *triggers.MercuryTriggerService, lggr logger.Logger) *mockMercuryDataProducer { - return &mockMercuryDataProducer{ - trigger: trigger, - closeCh: make(chan struct{}), - lggr: lggr, - } -} - -func (m *mockMercuryDataProducer) Start(ctx context.Context) error { - m.wg.Add(1) - go m.loop() - return nil -} - -func (m *mockMercuryDataProducer) loop() { - defer m.wg.Done() - - sleepSec := 60 - ticker := time.NewTicker(time.Duration(sleepSec) * time.Second) - defer ticker.Stop() - - prices := []*big.Int{big.NewInt(300000), big.NewInt(40000), big.NewInt(5000000)} - - for range ticker.C { - for i := range prices { - prices[i].Add(prices[i], big.NewInt(1)) - } - - reports := []datastreams.FeedReport{ - { - FeedID: "0x0003fbba4fce42f65d6032b18aee53efdf526cc734ad296cb57565979d883bdd", - FullReport: []byte{0x11, 0xaa, 0xbb, 0xcc}, - BenchmarkPrice: prices[0].Bytes(), - ObservationTimestamp: time.Now().Unix(), - }, - { - FeedID: "0x0003c317fec7fad514c67aacc6366bf2f007ce37100e3cddcacd0ccaa1f3746d", - FullReport: []byte{0x22, 0xaa, 0xbb, 0xcc}, - BenchmarkPrice: prices[1].Bytes(), - ObservationTimestamp: time.Now().Unix(), - }, - { - FeedID: "0x0003da6ab44ea9296674d80fe2b041738189103d6b4ea9a4d34e2f891fa93d12", - FullReport: []byte{0x33, 0xaa, 0xbb, 0xcc}, - BenchmarkPrice: prices[2].Bytes(), - ObservationTimestamp: time.Now().Unix(), - }, - } - - m.lggr.Infow("New set of Mercury reports", "timestamp", time.Now().Unix(), "payload", reports) - err := m.trigger.ProcessReport(reports) - if err != nil { - m.lggr.Errorw("failed to process Mercury reports", "err", err, "timestamp", time.Now().Unix(), "payload", reports) - } - } -} - -func (m *mockMercuryDataProducer) Close() error { - close(m.closeCh) - m.wg.Wait() - return nil -} - -func (m *mockMercuryDataProducer) HealthReport() map[string]error { - return nil -} - -func (m *mockMercuryDataProducer) Ready() error { - return nil -} - -func (m *mockMercuryDataProducer) Name() string { - return "mockMercuryDataProducer" -} diff --git a/core/capabilities/syncer_test.go b/core/capabilities/syncer_test.go deleted file mode 100644 index 2c5f871bdb8..00000000000 --- a/core/capabilities/syncer_test.go +++ /dev/null @@ -1,613 +0,0 @@ -package capabilities - -import ( - "context" - "fmt" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" - - ragetypes "github.com/smartcontractkit/libocr/ragep2p/types" - - "github.com/smartcontractkit/chainlink-common/pkg/capabilities" - "github.com/smartcontractkit/chainlink-common/pkg/services" - commonMocks "github.com/smartcontractkit/chainlink-common/pkg/types/mocks" - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" - remoteMocks "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/types/mocks" - kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/capabilities_registry" - "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" - "github.com/smartcontractkit/chainlink/v2/core/logger" - p2ptypes "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types" - "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types/mocks" -) - -func TestSyncer_CleanStartClose(t *testing.T) { - lggr := logger.TestLogger(t) - ctx := testutils.Context(t) - var pid ragetypes.PeerID - err := pid.UnmarshalText([]byte("12D3KooWBCF1XT5Wi8FzfgNCqRL76Swv8TRU3TiD4QiJm8NMNX7N")) - require.NoError(t, err) - peer := mocks.NewPeer(t) - peer.On("UpdateConnections", mock.Anything).Return(nil) - peer.On("ID").Return(pid) - wrapper := mocks.NewPeerWrapper(t) - wrapper.On("GetPeer").Return(peer) - registry := commonMocks.NewCapabilitiesRegistry(t) - dispatcher := remoteMocks.NewDispatcher(t) - - networkSetup, err := NewHardcodedDonNetworkSetup() - require.NoError(t, err) - mr := &mockReader{} - syncer := newRegistrySyncer(make(services.StopChan), wrapper, registry, dispatcher, lggr, networkSetup, mr) - require.NoError(t, err) - require.NoError(t, syncer.Start(ctx)) - require.NoError(t, syncer.Close()) -} - -type mockReader struct { - s state - err error -} - -func (m mockReader) state(ctx context.Context) (state, error) { - return m.s, m.err -} - -func (m mockReader) LocalNode(ctx context.Context) (capabilities.Node, error) { - return capabilities.Node{}, nil -} - -type mockTrigger struct { - capabilities.CapabilityInfo -} - -func (m *mockTrigger) RegisterTrigger(ctx context.Context, request capabilities.CapabilityRequest) (<-chan capabilities.CapabilityResponse, error) { - return nil, nil -} - -func (m *mockTrigger) UnregisterTrigger(ctx context.Context, request capabilities.CapabilityRequest) error { - return nil -} - -func newMockTrigger(info capabilities.CapabilityInfo) *mockTrigger { - return &mockTrigger{CapabilityInfo: info} -} - -type mockCapability struct { - capabilities.CapabilityInfo -} - -func (m *mockCapability) Execute(ctx context.Context, req capabilities.CapabilityRequest) (<-chan capabilities.CapabilityResponse, error) { - return nil, nil -} - -func (m *mockCapability) RegisterToWorkflow(ctx context.Context, request capabilities.RegisterToWorkflowRequest) error { - return nil -} - -func (m *mockCapability) UnregisterFromWorkflow(ctx context.Context, request capabilities.UnregisterFromWorkflowRequest) error { - return nil -} - -func TestSyncer_WiresUpExternalCapabilities(t *testing.T) { - ctx := tests.Context(t) - lggr := logger.TestLogger(t) - registry := NewRegistry(lggr) - dispatcher := remoteMocks.NewDispatcher(t) - - var pid ragetypes.PeerID - err := pid.UnmarshalText([]byte("12D3KooWBCF1XT5Wi8FzfgNCqRL76Swv8TRU3TiD4QiJm8NMNX7N")) - require.NoError(t, err) - peer := mocks.NewPeer(t) - peer.On("UpdateConnections", mock.Anything).Return(nil) - peer.On("ID").Return(pid) - wrapper := mocks.NewPeerWrapper(t) - wrapper.On("GetPeer").Return(peer) - - nodes := [][32]byte{ - pid, - randomWord(), - randomWord(), - randomWord(), - } - - fullTriggerCapID := "streams-trigger@1.0.0" - mt := newMockTrigger(capabilities.MustNewCapabilityInfo( - fullTriggerCapID, - capabilities.CapabilityTypeTrigger, - "streams trigger", - )) - require.NoError(t, registry.Add(ctx, mt)) - - fullTargetID := "write-chain_evm_1@1.0.0" - mtarg := &mockCapability{ - CapabilityInfo: capabilities.MustNewCapabilityInfo( - fullTargetID, - capabilities.CapabilityTypeTarget, - "write chain", - ), - } - require.NoError(t, registry.Add(ctx, mtarg)) - - triggerCapID := randomWord() - targetCapID := randomWord() - dID := uint32(1) - // The below state describes a Workflow DON (AcceptsWorkflows = true), - // which exposes the streams-trigger and write_chain capabilities. - // We expect a publisher to be wired up with this configuration, and - // no entries should be added to the registry. - mr := &mockReader{ - s: state{ - IDsToDONs: map[donID]kcr.CapabilitiesRegistryDONInfo{ - donID(dID): { - Id: dID, - ConfigCount: uint32(0), - F: uint8(1), - IsPublic: true, - AcceptsWorkflows: true, - NodeP2PIds: nodes, - CapabilityConfigurations: []kcr.CapabilitiesRegistryCapabilityConfiguration{ - { - CapabilityId: triggerCapID, - Config: []byte(""), - }, - { - CapabilityId: targetCapID, - Config: []byte(""), - }, - }, - }, - }, - IDsToCapabilities: map[hashedCapabilityID]kcr.CapabilitiesRegistryCapabilityInfo{ - triggerCapID: { - LabelledName: "streams-trigger", - Version: "1.0.0", - CapabilityType: 0, - }, - targetCapID: { - LabelledName: "write-chain_evm_1", - Version: "1.0.0", - CapabilityType: 3, - }, - }, - IDsToNodes: map[p2ptypes.PeerID]kcr.CapabilitiesRegistryNodeInfo{ - nodes[0]: { - NodeOperatorId: 1, - Signer: randomWord(), - P2pId: nodes[0], - HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, - }, - nodes[1]: { - NodeOperatorId: 1, - Signer: randomWord(), - P2pId: nodes[1], - HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, - }, - nodes[2]: { - NodeOperatorId: 1, - Signer: randomWord(), - P2pId: nodes[2], - HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, - }, - nodes[3]: { - NodeOperatorId: 1, - Signer: randomWord(), - P2pId: nodes[3], - HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, - }, - }, - }, - } - syncer := newRegistrySyncer(make(services.StopChan), wrapper, registry, dispatcher, lggr, HardcodedDonNetworkSetup{}, mr) - require.NoError(t, err) - - dispatcher.On("SetReceiver", fullTriggerCapID, fmt.Sprint(dID), mock.AnythingOfType("*remote.triggerPublisher")).Return(nil) - dispatcher.On("SetReceiver", fullTargetID, fmt.Sprint(dID), mock.AnythingOfType("*target.server")).Return(nil) - - err = syncer.sync(ctx) - require.NoError(t, err) - defer syncer.Close() -} - -func TestSyncer_IgnoresCapabilitiesForPrivateDON(t *testing.T) { - ctx := tests.Context(t) - lggr := logger.TestLogger(t) - registry := NewRegistry(lggr) - dispatcher := remoteMocks.NewDispatcher(t) - - var pid ragetypes.PeerID - err := pid.UnmarshalText([]byte("12D3KooWBCF1XT5Wi8FzfgNCqRL76Swv8TRU3TiD4QiJm8NMNX7N")) - require.NoError(t, err) - peer := mocks.NewPeer(t) - peer.On("UpdateConnections", mock.Anything).Return(nil) - peer.On("ID").Return(pid) - wrapper := mocks.NewPeerWrapper(t) - wrapper.On("GetPeer").Return(peer) - - nodes := [][32]byte{ - pid, - randomWord(), - randomWord(), - randomWord(), - } - - triggerCapID := randomWord() - targetCapID := randomWord() - dID := uint32(1) - // The below state describes a Workflow DON (AcceptsWorkflows = true), - // which isn't public (IsPublic = false), but hosts the - // the streams-trigger and write_chain capabilities. - // We expect no action to be taken by the syncer. - mr := &mockReader{ - s: state{ - IDsToDONs: map[donID]kcr.CapabilitiesRegistryDONInfo{ - donID(dID): { - Id: dID, - ConfigCount: uint32(0), - F: uint8(1), - IsPublic: false, - AcceptsWorkflows: true, - NodeP2PIds: nodes, - CapabilityConfigurations: []kcr.CapabilitiesRegistryCapabilityConfiguration{ - { - CapabilityId: triggerCapID, - Config: []byte(""), - }, - { - CapabilityId: targetCapID, - Config: []byte(""), - }, - }, - }, - }, - IDsToCapabilities: map[hashedCapabilityID]kcr.CapabilitiesRegistryCapabilityInfo{ - triggerCapID: { - LabelledName: "streams-trigger", - Version: "1.0.0", - CapabilityType: 0, - }, - targetCapID: { - LabelledName: "write-chain_evm_1", - Version: "1.0.0", - CapabilityType: 3, - }, - }, - IDsToNodes: map[p2ptypes.PeerID]kcr.CapabilitiesRegistryNodeInfo{ - nodes[0]: { - NodeOperatorId: 1, - Signer: randomWord(), - P2pId: nodes[0], - HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, - }, - nodes[1]: { - NodeOperatorId: 1, - Signer: randomWord(), - P2pId: nodes[1], - HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, - }, - nodes[2]: { - NodeOperatorId: 1, - Signer: randomWord(), - P2pId: nodes[2], - HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, - }, - nodes[3]: { - NodeOperatorId: 1, - Signer: randomWord(), - P2pId: nodes[3], - HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, - }, - }, - }, - } - syncer := newRegistrySyncer(make(services.StopChan), wrapper, registry, dispatcher, lggr, HardcodedDonNetworkSetup{}, mr) - require.NoError(t, err) - - // If the DON were public, this would fail with two errors: - // - error fetching the capabilities from the registry since they haven't been added - // - erroneous calls to dispatcher.SetReceiver, since the call hasn't been registered. - err = syncer.sync(ctx) - require.NoError(t, err) - defer syncer.Close() - - // Finally, assert that no services were added. - assert.Len(t, syncer.subServices, 0) -} - -func TestSyncer_WiresUpClientsForPublicWorkflowDON(t *testing.T) { - ctx := tests.Context(t) - lggr := logger.TestLogger(t) - registry := NewRegistry(lggr) - dispatcher := remoteMocks.NewDispatcher(t) - - var pid ragetypes.PeerID - err := pid.UnmarshalText([]byte("12D3KooWBCF1XT5Wi8FzfgNCqRL76Swv8TRU3TiD4QiJm8NMNX7N")) - require.NoError(t, err) - peer := mocks.NewPeer(t) - peer.On("UpdateConnections", mock.Anything).Return(nil) - peer.On("ID").Return(pid) - wrapper := mocks.NewPeerWrapper(t) - wrapper.On("GetPeer").Return(peer) - - workflowDonNodes := [][32]byte{ - pid, - randomWord(), - randomWord(), - randomWord(), - } - - capabilityDonNodes := [][32]byte{ - randomWord(), - randomWord(), - randomWord(), - randomWord(), - } - - fullTriggerCapID := "streams-trigger@1.0.0" - fullTargetID := "write-chain_evm_1@1.0.0" - triggerCapID := randomWord() - targetCapID := randomWord() - dID := uint32(1) - capDonID := uint32(2) - // The below state describes a Workflow DON (AcceptsWorkflows = true), - // which exposes the streams-trigger and write_chain capabilities. - // We expect receivers to be wired up and both capabilities to be added to the registry. - mr := &mockReader{ - s: state{ - IDsToDONs: map[donID]kcr.CapabilitiesRegistryDONInfo{ - donID(dID): { - Id: dID, - ConfigCount: uint32(0), - F: uint8(1), - IsPublic: true, - AcceptsWorkflows: true, - NodeP2PIds: workflowDonNodes, - }, - donID(capDonID): { - Id: capDonID, - ConfigCount: uint32(0), - F: uint8(1), - IsPublic: true, - AcceptsWorkflows: false, - NodeP2PIds: capabilityDonNodes, - CapabilityConfigurations: []kcr.CapabilitiesRegistryCapabilityConfiguration{ - { - CapabilityId: triggerCapID, - Config: []byte(""), - }, - { - CapabilityId: targetCapID, - Config: []byte(""), - }, - }, - }, - }, - IDsToCapabilities: map[hashedCapabilityID]kcr.CapabilitiesRegistryCapabilityInfo{ - triggerCapID: { - LabelledName: "streams-trigger", - Version: "1.0.0", - CapabilityType: 0, - }, - targetCapID: { - LabelledName: "write-chain_evm_1", - Version: "1.0.0", - CapabilityType: 3, - }, - }, - IDsToNodes: map[p2ptypes.PeerID]kcr.CapabilitiesRegistryNodeInfo{ - capabilityDonNodes[0]: { - NodeOperatorId: 1, - Signer: randomWord(), - P2pId: capabilityDonNodes[0], - HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, - }, - capabilityDonNodes[1]: { - NodeOperatorId: 1, - Signer: randomWord(), - P2pId: capabilityDonNodes[1], - HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, - }, - capabilityDonNodes[2]: { - NodeOperatorId: 1, - Signer: randomWord(), - P2pId: capabilityDonNodes[2], - HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, - }, - capabilityDonNodes[3]: { - NodeOperatorId: 1, - Signer: randomWord(), - P2pId: capabilityDonNodes[3], - HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, - }, - workflowDonNodes[0]: { - NodeOperatorId: 1, - Signer: randomWord(), - P2pId: workflowDonNodes[0], - }, - workflowDonNodes[1]: { - NodeOperatorId: 1, - Signer: randomWord(), - P2pId: workflowDonNodes[1], - }, - workflowDonNodes[2]: { - NodeOperatorId: 1, - Signer: randomWord(), - P2pId: workflowDonNodes[2], - }, - workflowDonNodes[3]: { - NodeOperatorId: 1, - Signer: randomWord(), - P2pId: workflowDonNodes[3], - }, - }, - }, - } - syncer := newRegistrySyncer(make(services.StopChan), wrapper, registry, dispatcher, lggr, HardcodedDonNetworkSetup{}, mr) - require.NoError(t, err) - - dispatcher.On("SetReceiver", fullTriggerCapID, fmt.Sprint(capDonID), mock.AnythingOfType("*remote.triggerSubscriber")).Return(nil) - dispatcher.On("SetReceiver", fullTargetID, fmt.Sprint(capDonID), mock.AnythingOfType("*target.client")).Return(nil) - - err = syncer.sync(ctx) - require.NoError(t, err) - defer syncer.Close() - - _, err = registry.Get(ctx, fullTriggerCapID) - require.NoError(t, err) - - _, err = registry.Get(ctx, fullTargetID) - require.NoError(t, err) -} - -func TestSyncer_WiresUpClientsForPublicWorkflowDONButIgnoresPrivateCapabilities(t *testing.T) { - ctx := tests.Context(t) - lggr := logger.TestLogger(t) - registry := NewRegistry(lggr) - dispatcher := remoteMocks.NewDispatcher(t) - - var pid ragetypes.PeerID - err := pid.UnmarshalText([]byte("12D3KooWBCF1XT5Wi8FzfgNCqRL76Swv8TRU3TiD4QiJm8NMNX7N")) - require.NoError(t, err) - peer := mocks.NewPeer(t) - peer.On("UpdateConnections", mock.Anything).Return(nil) - peer.On("ID").Return(pid) - wrapper := mocks.NewPeerWrapper(t) - wrapper.On("GetPeer").Return(peer) - - workflowDonNodes := [][32]byte{ - pid, - randomWord(), - randomWord(), - randomWord(), - } - - capabilityDonNodes := [][32]byte{ - randomWord(), - randomWord(), - randomWord(), - randomWord(), - } - - fullTriggerCapID := "streams-trigger@1.0.0" - triggerCapID := randomWord() - targetCapID := randomWord() - dID := uint32(1) - triggerCapDonID := uint32(2) - targetCapDonID := uint32(3) - // The below state describes a Workflow DON (AcceptsWorkflows = true), - // which exposes the streams-trigger and write_chain capabilities. - // We expect receivers to be wired up and both capabilities to be added to the registry. - mr := &mockReader{ - s: state{ - IDsToDONs: map[donID]kcr.CapabilitiesRegistryDONInfo{ - donID(dID): { - Id: dID, - ConfigCount: uint32(0), - F: uint8(1), - IsPublic: true, - AcceptsWorkflows: true, - NodeP2PIds: workflowDonNodes, - }, - donID(triggerCapDonID): { - Id: triggerCapDonID, - ConfigCount: uint32(0), - F: uint8(1), - IsPublic: true, - AcceptsWorkflows: false, - NodeP2PIds: capabilityDonNodes, - CapabilityConfigurations: []kcr.CapabilitiesRegistryCapabilityConfiguration{ - { - CapabilityId: triggerCapID, - Config: []byte(""), - }, - }, - }, - donID(targetCapDonID): { - Id: targetCapDonID, - ConfigCount: uint32(0), - F: uint8(1), - IsPublic: false, - AcceptsWorkflows: false, - NodeP2PIds: capabilityDonNodes, - CapabilityConfigurations: []kcr.CapabilitiesRegistryCapabilityConfiguration{ - { - CapabilityId: targetCapID, - Config: []byte(""), - }, - }, - }, - }, - IDsToCapabilities: map[hashedCapabilityID]kcr.CapabilitiesRegistryCapabilityInfo{ - triggerCapID: { - LabelledName: "streams-trigger", - Version: "1.0.0", - CapabilityType: 0, - }, - targetCapID: { - LabelledName: "write-chain_evm_1", - Version: "1.0.0", - CapabilityType: 3, - }, - }, - IDsToNodes: map[p2ptypes.PeerID]kcr.CapabilitiesRegistryNodeInfo{ - capabilityDonNodes[0]: { - NodeOperatorId: 1, - Signer: randomWord(), - P2pId: capabilityDonNodes[0], - HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, - }, - capabilityDonNodes[1]: { - NodeOperatorId: 1, - Signer: randomWord(), - P2pId: capabilityDonNodes[1], - HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, - }, - capabilityDonNodes[2]: { - NodeOperatorId: 1, - Signer: randomWord(), - P2pId: capabilityDonNodes[2], - HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, - }, - capabilityDonNodes[3]: { - NodeOperatorId: 1, - Signer: randomWord(), - P2pId: capabilityDonNodes[3], - HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, - }, - workflowDonNodes[0]: { - NodeOperatorId: 1, - Signer: randomWord(), - P2pId: workflowDonNodes[0], - }, - workflowDonNodes[1]: { - NodeOperatorId: 1, - Signer: randomWord(), - P2pId: workflowDonNodes[1], - }, - workflowDonNodes[2]: { - NodeOperatorId: 1, - Signer: randomWord(), - P2pId: workflowDonNodes[2], - }, - workflowDonNodes[3]: { - NodeOperatorId: 1, - Signer: randomWord(), - P2pId: workflowDonNodes[3], - }, - }, - }, - } - syncer := newRegistrySyncer(make(services.StopChan), wrapper, registry, dispatcher, lggr, HardcodedDonNetworkSetup{}, mr) - require.NoError(t, err) - - dispatcher.On("SetReceiver", fullTriggerCapID, fmt.Sprint(triggerCapDonID), mock.AnythingOfType("*remote.triggerSubscriber")).Return(nil) - - err = syncer.sync(ctx) - require.NoError(t, err) - defer syncer.Close() - - _, err = registry.Get(ctx, fullTriggerCapID) - require.NoError(t, err) -} diff --git a/core/capabilities/targets/mocks/chain_reader.go b/core/capabilities/targets/mocks/chain_reader.go index 14748c16bb8..9c1c85ff60c 100644 --- a/core/capabilities/targets/mocks/chain_reader.go +++ b/core/capabilities/targets/mocks/chain_reader.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -6,6 +6,7 @@ import ( context "context" query "github.com/smartcontractkit/chainlink-common/pkg/types/query" + primitives "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives" mock "github.com/stretchr/testify/mock" types "github.com/smartcontractkit/chainlink-common/pkg/types" @@ -16,6 +17,73 @@ type ChainReader struct { mock.Mock } +type ChainReader_Expecter struct { + mock *mock.Mock +} + +func (_m *ChainReader) EXPECT() *ChainReader_Expecter { + return &ChainReader_Expecter{mock: &_m.Mock} +} + +// BatchGetLatestValues provides a mock function with given fields: ctx, request +func (_m *ChainReader) BatchGetLatestValues(ctx context.Context, request types.BatchGetLatestValuesRequest) (types.BatchGetLatestValuesResult, error) { + ret := _m.Called(ctx, request) + + if len(ret) == 0 { + panic("no return value specified for BatchGetLatestValues") + } + + var r0 types.BatchGetLatestValuesResult + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, types.BatchGetLatestValuesRequest) (types.BatchGetLatestValuesResult, error)); ok { + return rf(ctx, request) + } + if rf, ok := ret.Get(0).(func(context.Context, types.BatchGetLatestValuesRequest) types.BatchGetLatestValuesResult); ok { + r0 = rf(ctx, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(types.BatchGetLatestValuesResult) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, types.BatchGetLatestValuesRequest) error); ok { + r1 = rf(ctx, request) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ChainReader_BatchGetLatestValues_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BatchGetLatestValues' +type ChainReader_BatchGetLatestValues_Call struct { + *mock.Call +} + +// BatchGetLatestValues is a helper method to define mock.On call +// - ctx context.Context +// - request types.BatchGetLatestValuesRequest +func (_e *ChainReader_Expecter) BatchGetLatestValues(ctx interface{}, request interface{}) *ChainReader_BatchGetLatestValues_Call { + return &ChainReader_BatchGetLatestValues_Call{Call: _e.mock.On("BatchGetLatestValues", ctx, request)} +} + +func (_c *ChainReader_BatchGetLatestValues_Call) Run(run func(ctx context.Context, request types.BatchGetLatestValuesRequest)) *ChainReader_BatchGetLatestValues_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.BatchGetLatestValuesRequest)) + }) + return _c +} + +func (_c *ChainReader_BatchGetLatestValues_Call) Return(_a0 types.BatchGetLatestValuesResult, _a1 error) *ChainReader_BatchGetLatestValues_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ChainReader_BatchGetLatestValues_Call) RunAndReturn(run func(context.Context, types.BatchGetLatestValuesRequest) (types.BatchGetLatestValuesResult, error)) *ChainReader_BatchGetLatestValues_Call { + _c.Call.Return(run) + return _c +} + // Bind provides a mock function with given fields: ctx, bindings func (_m *ChainReader) Bind(ctx context.Context, bindings []types.BoundContract) error { ret := _m.Called(ctx, bindings) @@ -34,6 +102,35 @@ func (_m *ChainReader) Bind(ctx context.Context, bindings []types.BoundContract) return r0 } +// ChainReader_Bind_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Bind' +type ChainReader_Bind_Call struct { + *mock.Call +} + +// Bind is a helper method to define mock.On call +// - ctx context.Context +// - bindings []types.BoundContract +func (_e *ChainReader_Expecter) Bind(ctx interface{}, bindings interface{}) *ChainReader_Bind_Call { + return &ChainReader_Bind_Call{Call: _e.mock.On("Bind", ctx, bindings)} +} + +func (_c *ChainReader_Bind_Call) Run(run func(ctx context.Context, bindings []types.BoundContract)) *ChainReader_Bind_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]types.BoundContract)) + }) + return _c +} + +func (_c *ChainReader_Bind_Call) Return(_a0 error) *ChainReader_Bind_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ChainReader_Bind_Call) RunAndReturn(run func(context.Context, []types.BoundContract) error) *ChainReader_Bind_Call { + _c.Call.Return(run) + return _c +} + // Close provides a mock function with given fields: func (_m *ChainReader) Close() error { ret := _m.Called() @@ -52,17 +149,44 @@ func (_m *ChainReader) Close() error { return r0 } -// GetLatestValue provides a mock function with given fields: ctx, contractName, method, params, returnVal -func (_m *ChainReader) GetLatestValue(ctx context.Context, contractName string, method string, params interface{}, returnVal interface{}) error { - ret := _m.Called(ctx, contractName, method, params, returnVal) +// ChainReader_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type ChainReader_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *ChainReader_Expecter) Close() *ChainReader_Close_Call { + return &ChainReader_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *ChainReader_Close_Call) Run(run func()) *ChainReader_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ChainReader_Close_Call) Return(_a0 error) *ChainReader_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ChainReader_Close_Call) RunAndReturn(run func() error) *ChainReader_Close_Call { + _c.Call.Return(run) + return _c +} + +// GetLatestValue provides a mock function with given fields: ctx, contractName, method, confidenceLevel, params, returnVal +func (_m *ChainReader) GetLatestValue(ctx context.Context, contractName string, method string, confidenceLevel primitives.ConfidenceLevel, params interface{}, returnVal interface{}) error { + ret := _m.Called(ctx, contractName, method, confidenceLevel, params, returnVal) if len(ret) == 0 { panic("no return value specified for GetLatestValue") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, interface{}, interface{}) error); ok { - r0 = rf(ctx, contractName, method, params, returnVal) + if rf, ok := ret.Get(0).(func(context.Context, string, string, primitives.ConfidenceLevel, interface{}, interface{}) error); ok { + r0 = rf(ctx, contractName, method, confidenceLevel, params, returnVal) } else { r0 = ret.Error(0) } @@ -70,6 +194,39 @@ func (_m *ChainReader) GetLatestValue(ctx context.Context, contractName string, return r0 } +// ChainReader_GetLatestValue_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLatestValue' +type ChainReader_GetLatestValue_Call struct { + *mock.Call +} + +// GetLatestValue is a helper method to define mock.On call +// - ctx context.Context +// - contractName string +// - method string +// - confidenceLevel primitives.ConfidenceLevel +// - params interface{} +// - returnVal interface{} +func (_e *ChainReader_Expecter) GetLatestValue(ctx interface{}, contractName interface{}, method interface{}, confidenceLevel interface{}, params interface{}, returnVal interface{}) *ChainReader_GetLatestValue_Call { + return &ChainReader_GetLatestValue_Call{Call: _e.mock.On("GetLatestValue", ctx, contractName, method, confidenceLevel, params, returnVal)} +} + +func (_c *ChainReader_GetLatestValue_Call) Run(run func(ctx context.Context, contractName string, method string, confidenceLevel primitives.ConfidenceLevel, params interface{}, returnVal interface{})) *ChainReader_GetLatestValue_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(primitives.ConfidenceLevel), args[4].(interface{}), args[5].(interface{})) + }) + return _c +} + +func (_c *ChainReader_GetLatestValue_Call) Return(_a0 error) *ChainReader_GetLatestValue_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ChainReader_GetLatestValue_Call) RunAndReturn(run func(context.Context, string, string, primitives.ConfidenceLevel, interface{}, interface{}) error) *ChainReader_GetLatestValue_Call { + _c.Call.Return(run) + return _c +} + // HealthReport provides a mock function with given fields: func (_m *ChainReader) HealthReport() map[string]error { ret := _m.Called() @@ -90,6 +247,33 @@ func (_m *ChainReader) HealthReport() map[string]error { return r0 } +// ChainReader_HealthReport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HealthReport' +type ChainReader_HealthReport_Call struct { + *mock.Call +} + +// HealthReport is a helper method to define mock.On call +func (_e *ChainReader_Expecter) HealthReport() *ChainReader_HealthReport_Call { + return &ChainReader_HealthReport_Call{Call: _e.mock.On("HealthReport")} +} + +func (_c *ChainReader_HealthReport_Call) Run(run func()) *ChainReader_HealthReport_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ChainReader_HealthReport_Call) Return(_a0 map[string]error) *ChainReader_HealthReport_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ChainReader_HealthReport_Call) RunAndReturn(run func() map[string]error) *ChainReader_HealthReport_Call { + _c.Call.Return(run) + return _c +} + // Name provides a mock function with given fields: func (_m *ChainReader) Name() string { ret := _m.Called() @@ -108,6 +292,33 @@ func (_m *ChainReader) Name() string { return r0 } +// ChainReader_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type ChainReader_Name_Call struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *ChainReader_Expecter) Name() *ChainReader_Name_Call { + return &ChainReader_Name_Call{Call: _e.mock.On("Name")} +} + +func (_c *ChainReader_Name_Call) Run(run func()) *ChainReader_Name_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ChainReader_Name_Call) Return(_a0 string) *ChainReader_Name_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ChainReader_Name_Call) RunAndReturn(run func() string) *ChainReader_Name_Call { + _c.Call.Return(run) + return _c +} + // QueryKey provides a mock function with given fields: ctx, contractName, filter, limitAndSort, sequenceDataType func (_m *ChainReader) QueryKey(ctx context.Context, contractName string, filter query.KeyFilter, limitAndSort query.LimitAndSort, sequenceDataType interface{}) ([]types.Sequence, error) { ret := _m.Called(ctx, contractName, filter, limitAndSort, sequenceDataType) @@ -138,6 +349,38 @@ func (_m *ChainReader) QueryKey(ctx context.Context, contractName string, filter return r0, r1 } +// ChainReader_QueryKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryKey' +type ChainReader_QueryKey_Call struct { + *mock.Call +} + +// QueryKey is a helper method to define mock.On call +// - ctx context.Context +// - contractName string +// - filter query.KeyFilter +// - limitAndSort query.LimitAndSort +// - sequenceDataType interface{} +func (_e *ChainReader_Expecter) QueryKey(ctx interface{}, contractName interface{}, filter interface{}, limitAndSort interface{}, sequenceDataType interface{}) *ChainReader_QueryKey_Call { + return &ChainReader_QueryKey_Call{Call: _e.mock.On("QueryKey", ctx, contractName, filter, limitAndSort, sequenceDataType)} +} + +func (_c *ChainReader_QueryKey_Call) Run(run func(ctx context.Context, contractName string, filter query.KeyFilter, limitAndSort query.LimitAndSort, sequenceDataType interface{})) *ChainReader_QueryKey_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(query.KeyFilter), args[3].(query.LimitAndSort), args[4].(interface{})) + }) + return _c +} + +func (_c *ChainReader_QueryKey_Call) Return(_a0 []types.Sequence, _a1 error) *ChainReader_QueryKey_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ChainReader_QueryKey_Call) RunAndReturn(run func(context.Context, string, query.KeyFilter, query.LimitAndSort, interface{}) ([]types.Sequence, error)) *ChainReader_QueryKey_Call { + _c.Call.Return(run) + return _c +} + // Ready provides a mock function with given fields: func (_m *ChainReader) Ready() error { ret := _m.Called() @@ -156,6 +399,33 @@ func (_m *ChainReader) Ready() error { return r0 } +// ChainReader_Ready_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ready' +type ChainReader_Ready_Call struct { + *mock.Call +} + +// Ready is a helper method to define mock.On call +func (_e *ChainReader_Expecter) Ready() *ChainReader_Ready_Call { + return &ChainReader_Ready_Call{Call: _e.mock.On("Ready")} +} + +func (_c *ChainReader_Ready_Call) Run(run func()) *ChainReader_Ready_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ChainReader_Ready_Call) Return(_a0 error) *ChainReader_Ready_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ChainReader_Ready_Call) RunAndReturn(run func() error) *ChainReader_Ready_Call { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *ChainReader) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -174,6 +444,34 @@ func (_m *ChainReader) Start(_a0 context.Context) error { return r0 } +// ChainReader_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type ChainReader_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *ChainReader_Expecter) Start(_a0 interface{}) *ChainReader_Start_Call { + return &ChainReader_Start_Call{Call: _e.mock.On("Start", _a0)} +} + +func (_c *ChainReader_Start_Call) Run(run func(_a0 context.Context)) *ChainReader_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *ChainReader_Start_Call) Return(_a0 error) *ChainReader_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ChainReader_Start_Call) RunAndReturn(run func(context.Context) error) *ChainReader_Start_Call { + _c.Call.Return(run) + return _c +} + // NewChainReader creates a new instance of ChainReader. 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 NewChainReader(t interface { diff --git a/core/capabilities/targets/mocks/chain_writer.go b/core/capabilities/targets/mocks/chain_writer.go index 408c83ca534..28eac87b21c 100644 --- a/core/capabilities/targets/mocks/chain_writer.go +++ b/core/capabilities/targets/mocks/chain_writer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -9,8 +9,6 @@ import ( mock "github.com/stretchr/testify/mock" types "github.com/smartcontractkit/chainlink-common/pkg/types" - - uuid "github.com/google/uuid" ) // ChainWriter is an autogenerated mock type for the ChainWriter type @@ -18,6 +16,59 @@ type ChainWriter struct { mock.Mock } +type ChainWriter_Expecter struct { + mock *mock.Mock +} + +func (_m *ChainWriter) EXPECT() *ChainWriter_Expecter { + return &ChainWriter_Expecter{mock: &_m.Mock} +} + +// Close provides a mock function with given fields: +func (_m *ChainWriter) 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 +} + +// ChainWriter_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type ChainWriter_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *ChainWriter_Expecter) Close() *ChainWriter_Close_Call { + return &ChainWriter_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *ChainWriter_Close_Call) Run(run func()) *ChainWriter_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ChainWriter_Close_Call) Return(_a0 error) *ChainWriter_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ChainWriter_Close_Call) RunAndReturn(run func() error) *ChainWriter_Close_Call { + _c.Call.Return(run) + return _c +} + // GetFeeComponents provides a mock function with given fields: ctx func (_m *ChainWriter) GetFeeComponents(ctx context.Context) (*types.ChainFeeComponents, error) { ret := _m.Called(ctx) @@ -48,8 +99,36 @@ func (_m *ChainWriter) GetFeeComponents(ctx context.Context) (*types.ChainFeeCom return r0, r1 } +// ChainWriter_GetFeeComponents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFeeComponents' +type ChainWriter_GetFeeComponents_Call struct { + *mock.Call +} + +// GetFeeComponents is a helper method to define mock.On call +// - ctx context.Context +func (_e *ChainWriter_Expecter) GetFeeComponents(ctx interface{}) *ChainWriter_GetFeeComponents_Call { + return &ChainWriter_GetFeeComponents_Call{Call: _e.mock.On("GetFeeComponents", ctx)} +} + +func (_c *ChainWriter_GetFeeComponents_Call) Run(run func(ctx context.Context)) *ChainWriter_GetFeeComponents_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *ChainWriter_GetFeeComponents_Call) Return(_a0 *types.ChainFeeComponents, _a1 error) *ChainWriter_GetFeeComponents_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ChainWriter_GetFeeComponents_Call) RunAndReturn(run func(context.Context) (*types.ChainFeeComponents, error)) *ChainWriter_GetFeeComponents_Call { + _c.Call.Return(run) + return _c +} + // GetTransactionStatus provides a mock function with given fields: ctx, transactionID -func (_m *ChainWriter) GetTransactionStatus(ctx context.Context, transactionID uuid.UUID) (types.TransactionStatus, error) { +func (_m *ChainWriter) GetTransactionStatus(ctx context.Context, transactionID string) (types.TransactionStatus, error) { ret := _m.Called(ctx, transactionID) if len(ret) == 0 { @@ -58,16 +137,16 @@ func (_m *ChainWriter) GetTransactionStatus(ctx context.Context, transactionID u var r0 types.TransactionStatus var r1 error - if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) (types.TransactionStatus, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, string) (types.TransactionStatus, error)); ok { return rf(ctx, transactionID) } - if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) types.TransactionStatus); ok { + if rf, ok := ret.Get(0).(func(context.Context, string) types.TransactionStatus); ok { r0 = rf(ctx, transactionID) } else { r0 = ret.Get(0).(types.TransactionStatus) } - if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, transactionID) } else { r1 = ret.Error(1) @@ -76,6 +155,218 @@ func (_m *ChainWriter) GetTransactionStatus(ctx context.Context, transactionID u return r0, r1 } +// ChainWriter_GetTransactionStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTransactionStatus' +type ChainWriter_GetTransactionStatus_Call struct { + *mock.Call +} + +// GetTransactionStatus is a helper method to define mock.On call +// - ctx context.Context +// - transactionID string +func (_e *ChainWriter_Expecter) GetTransactionStatus(ctx interface{}, transactionID interface{}) *ChainWriter_GetTransactionStatus_Call { + return &ChainWriter_GetTransactionStatus_Call{Call: _e.mock.On("GetTransactionStatus", ctx, transactionID)} +} + +func (_c *ChainWriter_GetTransactionStatus_Call) Run(run func(ctx context.Context, transactionID string)) *ChainWriter_GetTransactionStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *ChainWriter_GetTransactionStatus_Call) Return(_a0 types.TransactionStatus, _a1 error) *ChainWriter_GetTransactionStatus_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ChainWriter_GetTransactionStatus_Call) RunAndReturn(run func(context.Context, string) (types.TransactionStatus, error)) *ChainWriter_GetTransactionStatus_Call { + _c.Call.Return(run) + return _c +} + +// HealthReport provides a mock function with given fields: +func (_m *ChainWriter) 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 +} + +// ChainWriter_HealthReport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HealthReport' +type ChainWriter_HealthReport_Call struct { + *mock.Call +} + +// HealthReport is a helper method to define mock.On call +func (_e *ChainWriter_Expecter) HealthReport() *ChainWriter_HealthReport_Call { + return &ChainWriter_HealthReport_Call{Call: _e.mock.On("HealthReport")} +} + +func (_c *ChainWriter_HealthReport_Call) Run(run func()) *ChainWriter_HealthReport_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ChainWriter_HealthReport_Call) Return(_a0 map[string]error) *ChainWriter_HealthReport_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ChainWriter_HealthReport_Call) RunAndReturn(run func() map[string]error) *ChainWriter_HealthReport_Call { + _c.Call.Return(run) + return _c +} + +// Name provides a mock function with given fields: +func (_m *ChainWriter) 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 +} + +// ChainWriter_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type ChainWriter_Name_Call struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *ChainWriter_Expecter) Name() *ChainWriter_Name_Call { + return &ChainWriter_Name_Call{Call: _e.mock.On("Name")} +} + +func (_c *ChainWriter_Name_Call) Run(run func()) *ChainWriter_Name_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ChainWriter_Name_Call) Return(_a0 string) *ChainWriter_Name_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ChainWriter_Name_Call) RunAndReturn(run func() string) *ChainWriter_Name_Call { + _c.Call.Return(run) + return _c +} + +// Ready provides a mock function with given fields: +func (_m *ChainWriter) 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 +} + +// ChainWriter_Ready_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ready' +type ChainWriter_Ready_Call struct { + *mock.Call +} + +// Ready is a helper method to define mock.On call +func (_e *ChainWriter_Expecter) Ready() *ChainWriter_Ready_Call { + return &ChainWriter_Ready_Call{Call: _e.mock.On("Ready")} +} + +func (_c *ChainWriter_Ready_Call) Run(run func()) *ChainWriter_Ready_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ChainWriter_Ready_Call) Return(_a0 error) *ChainWriter_Ready_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ChainWriter_Ready_Call) RunAndReturn(run func() error) *ChainWriter_Ready_Call { + _c.Call.Return(run) + return _c +} + +// Start provides a mock function with given fields: _a0 +func (_m *ChainWriter) 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 +} + +// ChainWriter_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type ChainWriter_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *ChainWriter_Expecter) Start(_a0 interface{}) *ChainWriter_Start_Call { + return &ChainWriter_Start_Call{Call: _e.mock.On("Start", _a0)} +} + +func (_c *ChainWriter_Start_Call) Run(run func(_a0 context.Context)) *ChainWriter_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *ChainWriter_Start_Call) Return(_a0 error) *ChainWriter_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ChainWriter_Start_Call) RunAndReturn(run func(context.Context) error) *ChainWriter_Start_Call { + _c.Call.Return(run) + return _c +} + // SubmitTransaction provides a mock function with given fields: ctx, contractName, method, args, transactionID, toAddress, meta, value func (_m *ChainWriter) SubmitTransaction(ctx context.Context, contractName string, method string, args interface{}, transactionID string, toAddress string, meta *types.TxMeta, value *big.Int) error { ret := _m.Called(ctx, contractName, method, args, transactionID, toAddress, meta, value) @@ -94,6 +385,41 @@ func (_m *ChainWriter) SubmitTransaction(ctx context.Context, contractName strin return r0 } +// ChainWriter_SubmitTransaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SubmitTransaction' +type ChainWriter_SubmitTransaction_Call struct { + *mock.Call +} + +// SubmitTransaction is a helper method to define mock.On call +// - ctx context.Context +// - contractName string +// - method string +// - args interface{} +// - transactionID string +// - toAddress string +// - meta *types.TxMeta +// - value *big.Int +func (_e *ChainWriter_Expecter) SubmitTransaction(ctx interface{}, contractName interface{}, method interface{}, args interface{}, transactionID interface{}, toAddress interface{}, meta interface{}, value interface{}) *ChainWriter_SubmitTransaction_Call { + return &ChainWriter_SubmitTransaction_Call{Call: _e.mock.On("SubmitTransaction", ctx, contractName, method, args, transactionID, toAddress, meta, value)} +} + +func (_c *ChainWriter_SubmitTransaction_Call) Run(run func(ctx context.Context, contractName string, method string, args interface{}, transactionID string, toAddress string, meta *types.TxMeta, value *big.Int)) *ChainWriter_SubmitTransaction_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(interface{}), args[4].(string), args[5].(string), args[6].(*types.TxMeta), args[7].(*big.Int)) + }) + return _c +} + +func (_c *ChainWriter_SubmitTransaction_Call) Return(_a0 error) *ChainWriter_SubmitTransaction_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ChainWriter_SubmitTransaction_Call) RunAndReturn(run func(context.Context, string, string, interface{}, string, string, *types.TxMeta, *big.Int) error) *ChainWriter_SubmitTransaction_Call { + _c.Call.Return(run) + return _c +} + // NewChainWriter creates a new instance of ChainWriter. 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 NewChainWriter(t interface { diff --git a/core/capabilities/targets/write_target.go b/core/capabilities/targets/write_target.go index de65cb85199..da2de59a8a4 100644 --- a/core/capabilities/targets/write_target.go +++ b/core/capabilities/targets/write_target.go @@ -12,6 +12,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/capabilities" "github.com/smartcontractkit/chainlink-common/pkg/capabilities/consensus/ocr3/types" commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives" "github.com/smartcontractkit/chainlink-common/pkg/values" "github.com/smartcontractkit/chainlink/v2/core/logger" ) @@ -29,6 +30,8 @@ type WriteTarget struct { forwarderAddress string capabilities.CapabilityInfo lggr logger.Logger + + bound bool } func NewWriteTarget(lggr logger.Logger, id string, cr commontypes.ContractReader, cw commontypes.ChainWriter, forwarderAddress string) *WriteTarget { @@ -46,6 +49,7 @@ func NewWriteTarget(lggr logger.Logger, id string, cr commontypes.ContractReader forwarderAddress, info, logger, + false, } } @@ -73,6 +77,21 @@ func success() <-chan capabilities.CapabilityResponse { } func (cap *WriteTarget) Execute(ctx context.Context, request capabilities.CapabilityRequest) (<-chan capabilities.CapabilityResponse, error) { + // Bind to the contract address on the write path. + // Bind() requires a connection to the node's RPCs and + // cannot be run during initialization. + if !cap.bound { + cap.lggr.Debugw("Binding to forwarder address") + err := cap.cr.Bind(ctx, []commontypes.BoundContract{{ + Address: cap.forwarderAddress, + Name: "forwarder", + }}) + if err != nil { + return nil, err + } + cap.bound = true + } + cap.lggr.Debugw("Execute", "request", request) reqConfig, err := parseConfig(request.Config) @@ -112,7 +131,7 @@ func (cap *WriteTarget) Execute(ctx context.Context, request capabilities.Capabi ReportId: inputs.ID, } var transmitter common.Address - if err = cap.cr.GetLatestValue(ctx, "forwarder", "getTransmitter", queryInputs, &transmitter); err != nil { + if err = cap.cr.GetLatestValue(ctx, "forwarder", "getTransmitter", primitives.Unconfirmed, queryInputs, &transmitter); err != nil { return nil, err } if transmitter != common.HexToAddress("0x0") { diff --git a/core/capabilities/targets/write_target_test.go b/core/capabilities/targets/write_target_test.go index 9f243389f27..e1184331778 100644 --- a/core/capabilities/targets/write_target_test.go +++ b/core/capabilities/targets/write_target_test.go @@ -11,6 +11,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/capabilities" + "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-common/pkg/values" "github.com/smartcontractkit/chainlink/v2/core/capabilities/targets" "github.com/smartcontractkit/chainlink/v2/core/capabilities/targets/mocks" @@ -18,9 +19,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/logger" ) -//go:generate mockery --quiet --name ChainWriter --srcpkg=github.com/smartcontractkit/chainlink-common/pkg/types --output ./mocks/ --case=underscore -//go:generate mockery --quiet --name ChainReader --srcpkg=github.com/smartcontractkit/chainlink-common/pkg/types --output ./mocks/ --case=underscore - func TestWriteTarget(t *testing.T) { lggr := logger.TestLogger(t) ctx := context.Background() @@ -47,8 +45,15 @@ func TestWriteTarget(t *testing.T) { }) require.NoError(t, err) - cr.On("GetLatestValue", mock.Anything, "forwarder", "getTransmitter", mock.Anything, mock.Anything).Return(nil).Run(func(args mock.Arguments) { - transmitter := args.Get(4).(*common.Address) + cr.On("Bind", mock.Anything, []types.BoundContract{ + { + Address: forwarderAddr, + Name: "forwarder", + }, + }).Return(nil) + + cr.On("GetLatestValue", mock.Anything, "forwarder", "getTransmitter", mock.Anything, mock.Anything, mock.Anything).Return(nil).Run(func(args mock.Arguments) { + transmitter := args.Get(5).(*common.Address) *transmitter = common.HexToAddress("0x0") }).Once() @@ -100,7 +105,7 @@ func TestWriteTarget(t *testing.T) { Config: config, Inputs: validInputs, } - cr.On("GetLatestValue", mock.Anything, "forwarder", "getTransmitter", mock.Anything, mock.Anything).Return(errors.New("reader error")) + cr.On("GetLatestValue", mock.Anything, "forwarder", "getTransmitter", mock.Anything, mock.Anything, mock.Anything).Return(errors.New("reader error")) _, err = writeTarget.Execute(ctx, req) require.Error(t, err) diff --git a/core/capabilities/transmission/local_target_capability.go b/core/capabilities/transmission/local_target_capability.go index c040e6ed432..1240d3a0e7f 100644 --- a/core/capabilities/transmission/local_target_capability.go +++ b/core/capabilities/transmission/local_target_capability.go @@ -14,19 +14,21 @@ import ( type LocalTargetCapability struct { lggr logger.Logger capabilities.TargetCapability - localNode capabilities.Node + localNode capabilities.Node + capabilityID string } -func NewLocalTargetCapability(lggr logger.Logger, localDON capabilities.Node, underlying capabilities.TargetCapability) *LocalTargetCapability { +func NewLocalTargetCapability(lggr logger.Logger, capabilityID string, localDON capabilities.Node, underlying capabilities.TargetCapability) *LocalTargetCapability { return &LocalTargetCapability{ TargetCapability: underlying, + capabilityID: capabilityID, lggr: lggr, localNode: localDON, } } func (l *LocalTargetCapability) Execute(ctx context.Context, req capabilities.CapabilityRequest) (<-chan capabilities.CapabilityResponse, error) { - if l.localNode.PeerID == nil || l.localNode.WorkflowDON.ID == "" { + if l.localNode.PeerID == nil || l.localNode.WorkflowDON.ID == 0 { l.lggr.Debugf("empty DON info, executing immediately") return l.TargetCapability.Execute(ctx, req) } @@ -38,7 +40,7 @@ func (l *LocalTargetCapability) Execute(ctx context.Context, req capabilities.Ca peerIDToTransmissionDelay, err := GetPeerIDToTransmissionDelay(l.localNode.WorkflowDON.Members, req) if err != nil { - return nil, fmt.Errorf("failed to get peer ID to transmission delay map: %w", err) + return nil, fmt.Errorf("capability id: %s failed to get peer ID to transmission delay map: %w", l.capabilityID, err) } delay, existsForPeerID := peerIDToTransmissionDelay[*l.localNode.PeerID] diff --git a/core/capabilities/transmission/local_target_capability_test.go b/core/capabilities/transmission/local_target_capability_test.go index ded4b5c30f1..93bf708ccef 100644 --- a/core/capabilities/transmission/local_target_capability_test.go +++ b/core/capabilities/transmission/local_target_capability_test.go @@ -134,12 +134,12 @@ func TestScheduledExecutionStrategy_LocalDON(t *testing.T) { } localDON := capabilities.Node{ WorkflowDON: capabilities.DON{ - ID: "1", + ID: 1, Members: ids, }, PeerID: &ids[tc.position], } - localTargetCapability := NewLocalTargetCapability(log, localDON, mt) + localTargetCapability := NewLocalTargetCapability(log, "capabilityID", localDON, mt) _, err = localTargetCapability.Execute(tests.Context(t), req) diff --git a/core/chainlink.Dockerfile b/core/chainlink.Dockerfile index 48f6da73612..753172a1a9f 100644 --- a/core/chainlink.Dockerfile +++ b/core/chainlink.Dockerfile @@ -1,5 +1,5 @@ # Build image: Chainlink binary -FROM golang:1.21-bullseye as buildgo +FROM golang:1.22-bullseye as buildgo RUN go version WORKDIR /chainlink @@ -31,7 +31,7 @@ RUN go list -m -f "{{.Dir}}" github.com/smartcontractkit/chainlink-feeds | xargs RUN go list -m -f "{{.Dir}}" github.com/smartcontractkit/chainlink-solana | xargs -I % ln -s % /chainlink-solana # Build image: Plugins -FROM golang:1.21-bullseye as buildplugins +FROM golang:1.22-bullseye as buildplugins RUN go version WORKDIR /chainlink-feeds diff --git a/core/chains/evm/client/chain_client.go b/core/chains/evm/client/chain_client.go index 8d1dcb6cc8c..75973469140 100644 --- a/core/chains/evm/client/chain_client.go +++ b/core/chains/evm/client/chain_client.go @@ -25,8 +25,6 @@ const BALANCE_OF_ADDRESS_FUNCTION_SELECTOR = "0x70a08231" var _ Client = (*chainClient)(nil) -//go:generate mockery --quiet --name Client --output ./mocks/ --case=underscore - // Client is the interface used to interact with an ethereum node. type Client interface { Dial(ctx context.Context) error @@ -60,6 +58,9 @@ 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 - returns the latest finalized block as it's returned from an RPC. + // CAUTION: Using this method might cause local finality violations. It's highly recommended + // to use HeadTracker to get latest finalized block. LatestFinalizedBlock(ctx context.Context) (head *evmtypes.Head, err error) SendTransactionReturnCode(ctx context.Context, tx *types.Transaction, fromAddress common.Address) (commonclient.SendTxReturnCode, error) @@ -132,6 +133,7 @@ func NewChainClient( chainID *big.Int, chainType chaintype.ChainType, clientErrors evmconfig.ClientErrors, + deathDeclarationDelay time.Duration, ) Client { multiNode := commonclient.NewMultiNode( lggr, @@ -146,6 +148,7 @@ func NewChainClient( return ClassifySendError(err, clientErrors, logger.Sugared(logger.Nop()), tx, common.Address{}, chainType.IsL2()) }, 0, // use the default value provided by the implementation + deathDeclarationDelay, ) return &chainClient{ multiNode: multiNode, @@ -306,12 +309,7 @@ func (c *chainClient) SubscribeFilterLogs(ctx context.Context, q ethereum.Filter } func (c *chainClient) SubscribeNewHead(ctx context.Context, ch chan<- *evmtypes.Head) (ethereum.Subscription, error) { - csf := newChainIDSubForwarder(c.ConfiguredChainID(), ch) - err := csf.start(c.multiNode.Subscribe(ctx, csf.srcCh, "newHeads")) - if err != nil { - return nil, err - } - return csf, nil + return c.multiNode.SubscribeNewHead(ctx, ch) } func (c *chainClient) SuggestGasPrice(ctx context.Context) (p *big.Int, err error) { diff --git a/core/chains/evm/client/chain_client_test.go b/core/chains/evm/client/chain_client_test.go index f18ec539677..33955c16451 100644 --- a/core/chains/evm/client/chain_client_test.go +++ b/core/chains/evm/client/chain_client_test.go @@ -751,7 +751,7 @@ func newMockRpc(t *testing.T) *mocks.RPCClient { mockRpc.On("Close").Return(nil).Once() mockRpc.On("ChainID", mock.Anything).Return(testutils.FixtureChainID, nil).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("SubscribeNewHead", mock.Anything, mock.Anything).Return(client.NewMockSubscription(), nil).Maybe() mockRpc.On("SetAliveLoopSub", mock.Anything).Return().Maybe() return mockRpc } @@ -777,6 +777,7 @@ func TestChainClient_BatchCallContext(t *testing.T) { } mockRpc := newMockRpc(t) + mockRpc.On("GetInterceptedChainInfo").Return(commonclient.ChainInfo{}, commonclient.ChainInfo{}).Maybe() mockRpc.On("BatchCallContext", mock.Anything, b).Run(func(args mock.Arguments) { reqs := args.Get(1).([]rpc.BatchElem) for i := 0; i < len(reqs); i++ { diff --git a/core/chains/evm/client/chain_id_sub_test.go b/core/chains/evm/client/chain_id_sub_test.go deleted file mode 100644 index f959376acca..00000000000 --- a/core/chains/evm/client/chain_id_sub_test.go +++ /dev/null @@ -1,105 +0,0 @@ -package client - -import ( - "errors" - "math/big" - "testing" - - "github.com/stretchr/testify/assert" - - evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" - ubig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" -) - -func TestChainIDSubForwarder(t *testing.T) { - t.Parallel() - - chainID := big.NewInt(123) - - t.Run("unsubscribe forwarder", func(t *testing.T) { - t.Parallel() - - ch := make(chan *evmtypes.Head) - forwarder := newChainIDSubForwarder(chainID, ch) - sub := NewMockSubscription() - err := forwarder.start(sub, nil) - assert.NoError(t, err) - forwarder.Unsubscribe() - - assert.True(t, sub.unsubscribed) - _, ok := <-sub.Err() - assert.False(t, ok) - _, ok = <-forwarder.Err() - assert.False(t, ok) - }) - - t.Run("unsubscribe forwarder with error", func(t *testing.T) { - t.Parallel() - - ch := make(chan *evmtypes.Head) - forwarder := newChainIDSubForwarder(chainID, ch) - sub := NewMockSubscription() - err := forwarder.start(sub, nil) - assert.NoError(t, err) - sub.Errors <- errors.New("boo") - forwarder.Unsubscribe() - - assert.True(t, sub.unsubscribed) - _, ok := <-sub.Err() - assert.False(t, ok) - _, ok = <-forwarder.Err() - assert.False(t, ok) - }) - - t.Run("unsubscribe forwarder with message", func(t *testing.T) { - t.Parallel() - - ch := make(chan *evmtypes.Head) - forwarder := newChainIDSubForwarder(chainID, ch) - sub := NewMockSubscription() - err := forwarder.start(sub, nil) - assert.NoError(t, err) - forwarder.srcCh <- &evmtypes.Head{} - forwarder.Unsubscribe() - - assert.True(t, sub.unsubscribed) - _, ok := <-sub.Err() - assert.False(t, ok) - _, ok = <-forwarder.Err() - assert.False(t, ok) - }) - - t.Run("non nil error parameter", func(t *testing.T) { - t.Parallel() - - ch := make(chan *evmtypes.Head) - forwarder := newChainIDSubForwarder(chainID, ch) - sub := NewMockSubscription() - errIn := errors.New("foo") - errOut := forwarder.start(sub, errIn) - assert.Equal(t, errIn, errOut) - }) - - t.Run("forwarding", func(t *testing.T) { - t.Parallel() - - ch := make(chan *evmtypes.Head) - forwarder := newChainIDSubForwarder(chainID, ch) - sub := NewMockSubscription() - err := forwarder.start(sub, nil) - assert.NoError(t, err) - - head := &evmtypes.Head{ - ID: 1, - } - forwarder.srcCh <- head - receivedHead := <-ch - assert.Equal(t, head, receivedHead) - assert.Equal(t, ubig.New(chainID), receivedHead.EVMChainID) - - expectedErr := errors.New("error") - sub.Errors <- expectedErr - receivedErr := <-forwarder.Err() - assert.Equal(t, expectedErr, receivedErr) - }) -} diff --git a/core/chains/evm/client/config_builder.go b/core/chains/evm/client/config_builder.go index ae41d40dd33..19e0f14fd67 100644 --- a/core/chains/evm/client/config_builder.go +++ b/core/chains/evm/client/config_builder.go @@ -38,6 +38,9 @@ func NewClientConfigs( noNewHeadsThreshold time.Duration, finalityDepth *uint32, finalityTagEnabled *bool, + finalizedBlockOffset *uint32, + enforceRepeatableRead *bool, + deathDeclarationDelay time.Duration, ) (commonclient.ChainConfig, evmconfig.NodePool, []*toml.Node, error) { nodes, err := parseNodeConfigs(nodeCfgs) @@ -45,21 +48,24 @@ func NewClientConfigs( return nil, nil, nil, err } nodePool := toml.NodePool{ - SelectionMode: selectionMode, - LeaseDuration: commonconfig.MustNewDuration(leaseDuration), - PollFailureThreshold: pollFailureThreshold, - PollInterval: commonconfig.MustNewDuration(pollInterval), - SyncThreshold: syncThreshold, - NodeIsSyncingEnabled: nodeIsSyncingEnabled, + SelectionMode: selectionMode, + LeaseDuration: commonconfig.MustNewDuration(leaseDuration), + PollFailureThreshold: pollFailureThreshold, + PollInterval: commonconfig.MustNewDuration(pollInterval), + SyncThreshold: syncThreshold, + NodeIsSyncingEnabled: nodeIsSyncingEnabled, + EnforceRepeatableRead: enforceRepeatableRead, + DeathDeclarationDelay: commonconfig.MustNewDuration(deathDeclarationDelay), } nodePoolCfg := &evmconfig.NodePoolConfig{C: nodePool} chainConfig := &evmconfig.EVMConfig{ C: &toml.EVMConfig{ Chain: toml.Chain{ - ChainType: chaintype.NewChainTypeConfig(chainType), - FinalityDepth: finalityDepth, - FinalityTagEnabled: finalityTagEnabled, - NoNewHeadsThreshold: commonconfig.MustNewDuration(noNewHeadsThreshold), + ChainType: chaintype.NewChainTypeConfig(chainType), + FinalityDepth: finalityDepth, + FinalityTagEnabled: finalityTagEnabled, + NoNewHeadsThreshold: commonconfig.MustNewDuration(noNewHeadsThreshold), + FinalizedBlockOffset: finalizedBlockOffset, }, }, } diff --git a/core/chains/evm/client/config_builder_test.go b/core/chains/evm/client/config_builder_test.go index 0e24161b27b..7c08bf18c1d 100644 --- a/core/chains/evm/client/config_builder_test.go +++ b/core/chains/evm/client/config_builder_test.go @@ -23,6 +23,9 @@ func TestClientConfigBuilder(t *testing.T) { syncThreshold := ptr(uint32(5)) nodeIsSyncingEnabled := ptr(false) chainTypeStr := "" + finalizedBlockOffset := ptr[uint32](16) + enforceRepeatableRead := ptr(true) + deathDeclarationDelay := time.Second * 3 nodeConfigs := []client.NodeConfig{ { Name: ptr("foo"), @@ -34,7 +37,8 @@ func TestClientConfigBuilder(t *testing.T) { finalityTagEnabled := ptr(true) noNewHeadsThreshold := time.Second chainCfg, nodePool, nodes, err := client.NewClientConfigs(selectionMode, leaseDuration, chainTypeStr, nodeConfigs, - pollFailureThreshold, pollInterval, syncThreshold, nodeIsSyncingEnabled, noNewHeadsThreshold, finalityDepth, finalityTagEnabled) + pollFailureThreshold, pollInterval, syncThreshold, nodeIsSyncingEnabled, noNewHeadsThreshold, finalityDepth, + finalityTagEnabled, finalizedBlockOffset, enforceRepeatableRead, deathDeclarationDelay) require.NoError(t, err) // Validate node pool configs @@ -44,6 +48,8 @@ func TestClientConfigBuilder(t *testing.T) { require.Equal(t, pollInterval, nodePool.PollInterval()) require.Equal(t, *syncThreshold, nodePool.SyncThreshold()) require.Equal(t, *nodeIsSyncingEnabled, nodePool.NodeIsSyncingEnabled()) + require.Equal(t, *enforceRepeatableRead, nodePool.EnforceRepeatableRead()) + require.Equal(t, deathDeclarationDelay, nodePool.DeathDeclarationDelay()) // Validate node configs require.Equal(t, *nodeConfigs[0].Name, *nodes[0].Name) @@ -54,6 +60,7 @@ func TestClientConfigBuilder(t *testing.T) { require.Equal(t, noNewHeadsThreshold, chainCfg.NodeNoNewHeadsThreshold()) require.Equal(t, *finalityDepth, chainCfg.FinalityDepth()) require.Equal(t, *finalityTagEnabled, chainCfg.FinalityTagEnabled()) + require.Equal(t, *finalizedBlockOffset, chainCfg.FinalizedBlockOffset()) // let combiler tell us, when we do not have sufficient data to create evm client _ = client.NewEvmClient(nodePool, chainCfg, nil, logger.Test(t), big.NewInt(10), nodes, chaintype.ChainType(chainTypeStr)) diff --git a/core/chains/evm/client/evm_client.go b/core/chains/evm/client/evm_client.go index 4d309440590..fd7fa5868a4 100644 --- a/core/chains/evm/client/evm_client.go +++ b/core/chains/evm/client/evm_client.go @@ -35,5 +35,5 @@ func NewEvmClient(cfg evmconfig.NodePool, chainCfg commonclient.ChainConfig, cli } return NewChainClient(lggr, cfg.SelectionMode(), cfg.LeaseDuration(), chainCfg.NodeNoNewHeadsThreshold(), - primaries, sendonlys, chainID, chainType, clientErrors) + primaries, sendonlys, chainID, chainType, clientErrors, cfg.DeathDeclarationDelay()) } diff --git a/core/chains/evm/client/evm_client_test.go b/core/chains/evm/client/evm_client_test.go index 29113d4c3c9..9ad25f96025 100644 --- a/core/chains/evm/client/evm_client_test.go +++ b/core/chains/evm/client/evm_client_test.go @@ -24,6 +24,9 @@ func TestNewEvmClient(t *testing.T) { syncThreshold := ptr(uint32(5)) nodeIsSyncingEnabled := ptr(false) chainTypeStr := "" + finalizedBlockOffset := ptr[uint32](16) + enforceRepeatableRead := ptr(true) + deathDeclarationDelay := time.Second * 3 nodeConfigs := []client.NodeConfig{ { Name: ptr("foo"), @@ -34,7 +37,8 @@ func TestNewEvmClient(t *testing.T) { finalityDepth := ptr(uint32(10)) finalityTagEnabled := ptr(true) chainCfg, nodePool, nodes, err := client.NewClientConfigs(selectionMode, leaseDuration, chainTypeStr, nodeConfigs, - pollFailureThreshold, pollInterval, syncThreshold, nodeIsSyncingEnabled, noNewHeadsThreshold, finalityDepth, finalityTagEnabled) + pollFailureThreshold, pollInterval, syncThreshold, nodeIsSyncingEnabled, noNewHeadsThreshold, finalityDepth, + finalityTagEnabled, finalizedBlockOffset, enforceRepeatableRead, deathDeclarationDelay) require.NoError(t, err) client := client.NewEvmClient(nodePool, chainCfg, nil, logger.Test(t), testutils.FixtureChainID, nodes, chaintype.ChainType(chainTypeStr)) diff --git a/core/chains/evm/client/helpers_test.go b/core/chains/evm/client/helpers_test.go index 391d580c1f6..e1017a5564f 100644 --- a/core/chains/evm/client/helpers_test.go +++ b/core/chains/evm/client/helpers_test.go @@ -87,6 +87,8 @@ type TestNodePoolConfig struct { NodeIsSyncingEnabledVal bool NodeFinalizedBlockPollInterval time.Duration NodeErrors config.ClientErrors + EnforceRepeatableReadVal bool + NodeDeathDeclarationDelay time.Duration } func (tc TestNodePoolConfig) PollFailureThreshold() uint32 { return tc.NodePollFailureThreshold } @@ -109,6 +111,14 @@ func (tc TestNodePoolConfig) Errors() config.ClientErrors { return tc.NodeErrors } +func (tc TestNodePoolConfig) EnforceRepeatableRead() bool { + return tc.EnforceRepeatableReadVal +} + +func (tc TestNodePoolConfig) DeathDeclarationDelay() time.Duration { + return tc.NodeDeathDeclarationDelay +} + func NewChainClientWithTestNode( t *testing.T, nodeCfg commonclient.NodeConfig, @@ -150,7 +160,7 @@ func NewChainClientWithTestNode( var chainType chaintype.ChainType clientErrors := NewTestClientErrors() - c := NewChainClient(lggr, nodeCfg.SelectionMode(), leaseDuration, noNewHeadsThreshold, primaries, sendonlys, chainID, chainType, &clientErrors) + c := NewChainClient(lggr, nodeCfg.SelectionMode(), leaseDuration, noNewHeadsThreshold, primaries, sendonlys, chainID, chainType, &clientErrors, 0) t.Cleanup(c.Close) return c, nil } @@ -165,7 +175,7 @@ func NewChainClientWithEmptyNode( lggr := logger.Test(t) var chainType chaintype.ChainType - c := NewChainClient(lggr, selectionMode, leaseDuration, noNewHeadsThreshold, nil, nil, chainID, chainType, nil) + c := NewChainClient(lggr, selectionMode, leaseDuration, noNewHeadsThreshold, nil, nil, chainID, chainType, nil, 0) t.Cleanup(c.Close) return c } @@ -191,7 +201,7 @@ func NewChainClientWithMockedRpc( cfg, clientMocks.ChainConfig{NoNewHeadsThresholdVal: noNewHeadsThreshold}, lggr, *parsed, nil, "eth-primary-node-0", 1, chainID, 1, rpc, "EVM") primaries := []commonclient.Node[*big.Int, *evmtypes.Head, RPCClient]{n} clientErrors := NewTestClientErrors() - c := NewChainClient(lggr, selectionMode, leaseDuration, noNewHeadsThreshold, primaries, nil, chainID, chainType, &clientErrors) + c := NewChainClient(lggr, selectionMode, leaseDuration, noNewHeadsThreshold, primaries, nil, chainID, chainType, &clientErrors, 0) t.Cleanup(c.Close) return c } diff --git a/core/chains/evm/client/mocks/batch_sender.go b/core/chains/evm/client/mocks/batch_sender.go deleted file mode 100644 index f6a3601ceab..00000000000 --- a/core/chains/evm/client/mocks/batch_sender.go +++ /dev/null @@ -1,47 +0,0 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package mocks - -import ( - context "context" - - rpc "github.com/ethereum/go-ethereum/rpc" - mock "github.com/stretchr/testify/mock" -) - -// BatchSender is an autogenerated mock type for the BatchSender type -type BatchSender struct { - mock.Mock -} - -// BatchCallContext provides a mock function with given fields: ctx, b -func (_m *BatchSender) BatchCallContext(ctx context.Context, b []rpc.BatchElem) error { - ret := _m.Called(ctx, b) - - if len(ret) == 0 { - panic("no return value specified for BatchCallContext") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, []rpc.BatchElem) error); ok { - r0 = rf(ctx, b) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// NewBatchSender creates a new instance of BatchSender. 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 NewBatchSender(t interface { - mock.TestingT - Cleanup(func()) -}) *BatchSender { - mock := &BatchSender{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/chains/evm/client/mocks/client.go b/core/chains/evm/client/mocks/client.go index 58d51526626..7b5220033bc 100644 --- a/core/chains/evm/client/mocks/client.go +++ b/core/chains/evm/client/mocks/client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -31,6 +31,14 @@ type Client struct { mock.Mock } +type Client_Expecter struct { + mock *mock.Mock +} + +func (_m *Client) EXPECT() *Client_Expecter { + return &Client_Expecter{mock: &_m.Mock} +} + // BalanceAt provides a mock function with given fields: ctx, account, blockNumber func (_m *Client) BalanceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (*big.Int, error) { ret := _m.Called(ctx, account, blockNumber) @@ -61,6 +69,36 @@ func (_m *Client) BalanceAt(ctx context.Context, account common.Address, blockNu return r0, r1 } +// Client_BalanceAt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BalanceAt' +type Client_BalanceAt_Call struct { + *mock.Call +} + +// BalanceAt is a helper method to define mock.On call +// - ctx context.Context +// - account common.Address +// - blockNumber *big.Int +func (_e *Client_Expecter) BalanceAt(ctx interface{}, account interface{}, blockNumber interface{}) *Client_BalanceAt_Call { + return &Client_BalanceAt_Call{Call: _e.mock.On("BalanceAt", ctx, account, blockNumber)} +} + +func (_c *Client_BalanceAt_Call) Run(run func(ctx context.Context, account common.Address, blockNumber *big.Int)) *Client_BalanceAt_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(*big.Int)) + }) + return _c +} + +func (_c *Client_BalanceAt_Call) Return(_a0 *big.Int, _a1 error) *Client_BalanceAt_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_BalanceAt_Call) RunAndReturn(run func(context.Context, common.Address, *big.Int) (*big.Int, error)) *Client_BalanceAt_Call { + _c.Call.Return(run) + return _c +} + // BatchCallContext provides a mock function with given fields: ctx, b func (_m *Client) BatchCallContext(ctx context.Context, b []rpc.BatchElem) error { ret := _m.Called(ctx, b) @@ -79,6 +117,35 @@ func (_m *Client) BatchCallContext(ctx context.Context, b []rpc.BatchElem) error return r0 } +// Client_BatchCallContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BatchCallContext' +type Client_BatchCallContext_Call struct { + *mock.Call +} + +// BatchCallContext is a helper method to define mock.On call +// - ctx context.Context +// - b []rpc.BatchElem +func (_e *Client_Expecter) BatchCallContext(ctx interface{}, b interface{}) *Client_BatchCallContext_Call { + return &Client_BatchCallContext_Call{Call: _e.mock.On("BatchCallContext", ctx, b)} +} + +func (_c *Client_BatchCallContext_Call) Run(run func(ctx context.Context, b []rpc.BatchElem)) *Client_BatchCallContext_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]rpc.BatchElem)) + }) + return _c +} + +func (_c *Client_BatchCallContext_Call) Return(_a0 error) *Client_BatchCallContext_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_BatchCallContext_Call) RunAndReturn(run func(context.Context, []rpc.BatchElem) error) *Client_BatchCallContext_Call { + _c.Call.Return(run) + return _c +} + // BatchCallContextAll provides a mock function with given fields: ctx, b func (_m *Client) BatchCallContextAll(ctx context.Context, b []rpc.BatchElem) error { ret := _m.Called(ctx, b) @@ -97,6 +164,35 @@ func (_m *Client) BatchCallContextAll(ctx context.Context, b []rpc.BatchElem) er return r0 } +// Client_BatchCallContextAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BatchCallContextAll' +type Client_BatchCallContextAll_Call struct { + *mock.Call +} + +// BatchCallContextAll is a helper method to define mock.On call +// - ctx context.Context +// - b []rpc.BatchElem +func (_e *Client_Expecter) BatchCallContextAll(ctx interface{}, b interface{}) *Client_BatchCallContextAll_Call { + return &Client_BatchCallContextAll_Call{Call: _e.mock.On("BatchCallContextAll", ctx, b)} +} + +func (_c *Client_BatchCallContextAll_Call) Run(run func(ctx context.Context, b []rpc.BatchElem)) *Client_BatchCallContextAll_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]rpc.BatchElem)) + }) + return _c +} + +func (_c *Client_BatchCallContextAll_Call) Return(_a0 error) *Client_BatchCallContextAll_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_BatchCallContextAll_Call) RunAndReturn(run func(context.Context, []rpc.BatchElem) error) *Client_BatchCallContextAll_Call { + _c.Call.Return(run) + return _c +} + // BlockByHash provides a mock function with given fields: ctx, hash func (_m *Client) BlockByHash(ctx context.Context, hash common.Hash) (*types.Block, error) { ret := _m.Called(ctx, hash) @@ -127,6 +223,35 @@ func (_m *Client) BlockByHash(ctx context.Context, hash common.Hash) (*types.Blo return r0, r1 } +// Client_BlockByHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockByHash' +type Client_BlockByHash_Call struct { + *mock.Call +} + +// BlockByHash is a helper method to define mock.On call +// - ctx context.Context +// - hash common.Hash +func (_e *Client_Expecter) BlockByHash(ctx interface{}, hash interface{}) *Client_BlockByHash_Call { + return &Client_BlockByHash_Call{Call: _e.mock.On("BlockByHash", ctx, hash)} +} + +func (_c *Client_BlockByHash_Call) Run(run func(ctx context.Context, hash common.Hash)) *Client_BlockByHash_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Hash)) + }) + return _c +} + +func (_c *Client_BlockByHash_Call) Return(_a0 *types.Block, _a1 error) *Client_BlockByHash_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_BlockByHash_Call) RunAndReturn(run func(context.Context, common.Hash) (*types.Block, error)) *Client_BlockByHash_Call { + _c.Call.Return(run) + return _c +} + // BlockByNumber provides a mock function with given fields: ctx, number func (_m *Client) BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error) { ret := _m.Called(ctx, number) @@ -157,6 +282,35 @@ func (_m *Client) BlockByNumber(ctx context.Context, number *big.Int) (*types.Bl return r0, r1 } +// Client_BlockByNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockByNumber' +type Client_BlockByNumber_Call struct { + *mock.Call +} + +// BlockByNumber is a helper method to define mock.On call +// - ctx context.Context +// - number *big.Int +func (_e *Client_Expecter) BlockByNumber(ctx interface{}, number interface{}) *Client_BlockByNumber_Call { + return &Client_BlockByNumber_Call{Call: _e.mock.On("BlockByNumber", ctx, number)} +} + +func (_c *Client_BlockByNumber_Call) Run(run func(ctx context.Context, number *big.Int)) *Client_BlockByNumber_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*big.Int)) + }) + return _c +} + +func (_c *Client_BlockByNumber_Call) Return(_a0 *types.Block, _a1 error) *Client_BlockByNumber_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_BlockByNumber_Call) RunAndReturn(run func(context.Context, *big.Int) (*types.Block, error)) *Client_BlockByNumber_Call { + _c.Call.Return(run) + return _c +} + // CallContext provides a mock function with given fields: ctx, result, method, args func (_m *Client) CallContext(ctx context.Context, result interface{}, method string, args ...interface{}) error { var _ca []interface{} @@ -178,6 +332,44 @@ func (_m *Client) CallContext(ctx context.Context, result interface{}, method st return r0 } +// Client_CallContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CallContext' +type Client_CallContext_Call struct { + *mock.Call +} + +// CallContext is a helper method to define mock.On call +// - ctx context.Context +// - result interface{} +// - method string +// - args ...interface{} +func (_e *Client_Expecter) CallContext(ctx interface{}, result interface{}, method interface{}, args ...interface{}) *Client_CallContext_Call { + return &Client_CallContext_Call{Call: _e.mock.On("CallContext", + append([]interface{}{ctx, result, method}, args...)...)} +} + +func (_c *Client_CallContext_Call) Run(run func(ctx context.Context, result interface{}, method string, args ...interface{})) *Client_CallContext_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-3) + for i, a := range args[3:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(args[0].(context.Context), args[1].(interface{}), args[2].(string), variadicArgs...) + }) + return _c +} + +func (_c *Client_CallContext_Call) Return(_a0 error) *Client_CallContext_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_CallContext_Call) RunAndReturn(run func(context.Context, interface{}, string, ...interface{}) error) *Client_CallContext_Call { + _c.Call.Return(run) + return _c +} + // CallContract provides a mock function with given fields: ctx, msg, blockNumber func (_m *Client) CallContract(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int) ([]byte, error) { ret := _m.Called(ctx, msg, blockNumber) @@ -208,6 +400,36 @@ func (_m *Client) CallContract(ctx context.Context, msg ethereum.CallMsg, blockN return r0, r1 } +// Client_CallContract_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CallContract' +type Client_CallContract_Call struct { + *mock.Call +} + +// CallContract is a helper method to define mock.On call +// - ctx context.Context +// - msg ethereum.CallMsg +// - blockNumber *big.Int +func (_e *Client_Expecter) CallContract(ctx interface{}, msg interface{}, blockNumber interface{}) *Client_CallContract_Call { + return &Client_CallContract_Call{Call: _e.mock.On("CallContract", ctx, msg, blockNumber)} +} + +func (_c *Client_CallContract_Call) Run(run func(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int)) *Client_CallContract_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ethereum.CallMsg), args[2].(*big.Int)) + }) + return _c +} + +func (_c *Client_CallContract_Call) Return(_a0 []byte, _a1 error) *Client_CallContract_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_CallContract_Call) RunAndReturn(run func(context.Context, ethereum.CallMsg, *big.Int) ([]byte, error)) *Client_CallContract_Call { + _c.Call.Return(run) + return _c +} + // ChainID provides a mock function with given fields: func (_m *Client) ChainID() (*big.Int, error) { ret := _m.Called() @@ -238,6 +460,33 @@ func (_m *Client) ChainID() (*big.Int, error) { return r0, r1 } +// Client_ChainID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChainID' +type Client_ChainID_Call struct { + *mock.Call +} + +// ChainID is a helper method to define mock.On call +func (_e *Client_Expecter) ChainID() *Client_ChainID_Call { + return &Client_ChainID_Call{Call: _e.mock.On("ChainID")} +} + +func (_c *Client_ChainID_Call) Run(run func()) *Client_ChainID_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Client_ChainID_Call) Return(_a0 *big.Int, _a1 error) *Client_ChainID_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_ChainID_Call) RunAndReturn(run func() (*big.Int, error)) *Client_ChainID_Call { + _c.Call.Return(run) + return _c +} + // CheckTxValidity provides a mock function with given fields: ctx, from, to, data func (_m *Client) CheckTxValidity(ctx context.Context, from common.Address, to common.Address, data []byte) *client.SendError { ret := _m.Called(ctx, from, to, data) @@ -258,11 +507,69 @@ func (_m *Client) CheckTxValidity(ctx context.Context, from common.Address, to c return r0 } +// Client_CheckTxValidity_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckTxValidity' +type Client_CheckTxValidity_Call struct { + *mock.Call +} + +// CheckTxValidity is a helper method to define mock.On call +// - ctx context.Context +// - from common.Address +// - to common.Address +// - data []byte +func (_e *Client_Expecter) CheckTxValidity(ctx interface{}, from interface{}, to interface{}, data interface{}) *Client_CheckTxValidity_Call { + return &Client_CheckTxValidity_Call{Call: _e.mock.On("CheckTxValidity", ctx, from, to, data)} +} + +func (_c *Client_CheckTxValidity_Call) Run(run func(ctx context.Context, from common.Address, to common.Address, data []byte)) *Client_CheckTxValidity_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(common.Address), args[3].([]byte)) + }) + return _c +} + +func (_c *Client_CheckTxValidity_Call) Return(_a0 *client.SendError) *Client_CheckTxValidity_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_CheckTxValidity_Call) RunAndReturn(run func(context.Context, common.Address, common.Address, []byte) *client.SendError) *Client_CheckTxValidity_Call { + _c.Call.Return(run) + return _c +} + // Close provides a mock function with given fields: func (_m *Client) Close() { _m.Called() } +// Client_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type Client_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *Client_Expecter) Close() *Client_Close_Call { + return &Client_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *Client_Close_Call) Run(run func()) *Client_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Client_Close_Call) Return() *Client_Close_Call { + _c.Call.Return() + return _c +} + +func (_c *Client_Close_Call) RunAndReturn(run func()) *Client_Close_Call { + _c.Call.Return(run) + return _c +} + // CodeAt provides a mock function with given fields: ctx, account, blockNumber func (_m *Client) CodeAt(ctx context.Context, account common.Address, blockNumber *big.Int) ([]byte, error) { ret := _m.Called(ctx, account, blockNumber) @@ -293,6 +600,36 @@ func (_m *Client) CodeAt(ctx context.Context, account common.Address, blockNumbe return r0, r1 } +// Client_CodeAt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CodeAt' +type Client_CodeAt_Call struct { + *mock.Call +} + +// CodeAt is a helper method to define mock.On call +// - ctx context.Context +// - account common.Address +// - blockNumber *big.Int +func (_e *Client_Expecter) CodeAt(ctx interface{}, account interface{}, blockNumber interface{}) *Client_CodeAt_Call { + return &Client_CodeAt_Call{Call: _e.mock.On("CodeAt", ctx, account, blockNumber)} +} + +func (_c *Client_CodeAt_Call) Run(run func(ctx context.Context, account common.Address, blockNumber *big.Int)) *Client_CodeAt_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(*big.Int)) + }) + return _c +} + +func (_c *Client_CodeAt_Call) Return(_a0 []byte, _a1 error) *Client_CodeAt_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_CodeAt_Call) RunAndReturn(run func(context.Context, common.Address, *big.Int) ([]byte, error)) *Client_CodeAt_Call { + _c.Call.Return(run) + return _c +} + // ConfiguredChainID provides a mock function with given fields: func (_m *Client) ConfiguredChainID() *big.Int { ret := _m.Called() @@ -313,6 +650,33 @@ func (_m *Client) ConfiguredChainID() *big.Int { return r0 } +// Client_ConfiguredChainID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ConfiguredChainID' +type Client_ConfiguredChainID_Call struct { + *mock.Call +} + +// ConfiguredChainID is a helper method to define mock.On call +func (_e *Client_Expecter) ConfiguredChainID() *Client_ConfiguredChainID_Call { + return &Client_ConfiguredChainID_Call{Call: _e.mock.On("ConfiguredChainID")} +} + +func (_c *Client_ConfiguredChainID_Call) Run(run func()) *Client_ConfiguredChainID_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Client_ConfiguredChainID_Call) Return(_a0 *big.Int) *Client_ConfiguredChainID_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_ConfiguredChainID_Call) RunAndReturn(run func() *big.Int) *Client_ConfiguredChainID_Call { + _c.Call.Return(run) + return _c +} + // Dial provides a mock function with given fields: ctx func (_m *Client) Dial(ctx context.Context) error { ret := _m.Called(ctx) @@ -331,6 +695,34 @@ func (_m *Client) Dial(ctx context.Context) error { return r0 } +// Client_Dial_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Dial' +type Client_Dial_Call struct { + *mock.Call +} + +// Dial is a helper method to define mock.On call +// - ctx context.Context +func (_e *Client_Expecter) Dial(ctx interface{}) *Client_Dial_Call { + return &Client_Dial_Call{Call: _e.mock.On("Dial", ctx)} +} + +func (_c *Client_Dial_Call) Run(run func(ctx context.Context)) *Client_Dial_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Client_Dial_Call) Return(_a0 error) *Client_Dial_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_Dial_Call) RunAndReturn(run func(context.Context) error) *Client_Dial_Call { + _c.Call.Return(run) + return _c +} + // EstimateGas provides a mock function with given fields: ctx, call func (_m *Client) EstimateGas(ctx context.Context, call ethereum.CallMsg) (uint64, error) { ret := _m.Called(ctx, call) @@ -359,6 +751,35 @@ func (_m *Client) EstimateGas(ctx context.Context, call ethereum.CallMsg) (uint6 return r0, r1 } +// Client_EstimateGas_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EstimateGas' +type Client_EstimateGas_Call struct { + *mock.Call +} + +// EstimateGas is a helper method to define mock.On call +// - ctx context.Context +// - call ethereum.CallMsg +func (_e *Client_Expecter) EstimateGas(ctx interface{}, call interface{}) *Client_EstimateGas_Call { + return &Client_EstimateGas_Call{Call: _e.mock.On("EstimateGas", ctx, call)} +} + +func (_c *Client_EstimateGas_Call) Run(run func(ctx context.Context, call ethereum.CallMsg)) *Client_EstimateGas_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ethereum.CallMsg)) + }) + return _c +} + +func (_c *Client_EstimateGas_Call) Return(_a0 uint64, _a1 error) *Client_EstimateGas_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_EstimateGas_Call) RunAndReturn(run func(context.Context, ethereum.CallMsg) (uint64, error)) *Client_EstimateGas_Call { + _c.Call.Return(run) + return _c +} + // FilterLogs provides a mock function with given fields: ctx, q func (_m *Client) FilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]types.Log, error) { ret := _m.Called(ctx, q) @@ -389,6 +810,35 @@ func (_m *Client) FilterLogs(ctx context.Context, q ethereum.FilterQuery) ([]typ return r0, r1 } +// Client_FilterLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterLogs' +type Client_FilterLogs_Call struct { + *mock.Call +} + +// FilterLogs is a helper method to define mock.On call +// - ctx context.Context +// - q ethereum.FilterQuery +func (_e *Client_Expecter) FilterLogs(ctx interface{}, q interface{}) *Client_FilterLogs_Call { + return &Client_FilterLogs_Call{Call: _e.mock.On("FilterLogs", ctx, q)} +} + +func (_c *Client_FilterLogs_Call) Run(run func(ctx context.Context, q ethereum.FilterQuery)) *Client_FilterLogs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ethereum.FilterQuery)) + }) + return _c +} + +func (_c *Client_FilterLogs_Call) Return(_a0 []types.Log, _a1 error) *Client_FilterLogs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_FilterLogs_Call) RunAndReturn(run func(context.Context, ethereum.FilterQuery) ([]types.Log, error)) *Client_FilterLogs_Call { + _c.Call.Return(run) + return _c +} + // HeadByHash provides a mock function with given fields: ctx, n func (_m *Client) HeadByHash(ctx context.Context, n common.Hash) (*evmtypes.Head, error) { ret := _m.Called(ctx, n) @@ -419,6 +869,35 @@ func (_m *Client) HeadByHash(ctx context.Context, n common.Hash) (*evmtypes.Head return r0, r1 } +// Client_HeadByHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HeadByHash' +type Client_HeadByHash_Call struct { + *mock.Call +} + +// HeadByHash is a helper method to define mock.On call +// - ctx context.Context +// - n common.Hash +func (_e *Client_Expecter) HeadByHash(ctx interface{}, n interface{}) *Client_HeadByHash_Call { + return &Client_HeadByHash_Call{Call: _e.mock.On("HeadByHash", ctx, n)} +} + +func (_c *Client_HeadByHash_Call) Run(run func(ctx context.Context, n common.Hash)) *Client_HeadByHash_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Hash)) + }) + return _c +} + +func (_c *Client_HeadByHash_Call) Return(_a0 *evmtypes.Head, _a1 error) *Client_HeadByHash_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_HeadByHash_Call) RunAndReturn(run func(context.Context, common.Hash) (*evmtypes.Head, error)) *Client_HeadByHash_Call { + _c.Call.Return(run) + return _c +} + // HeadByNumber provides a mock function with given fields: ctx, n func (_m *Client) HeadByNumber(ctx context.Context, n *big.Int) (*evmtypes.Head, error) { ret := _m.Called(ctx, n) @@ -449,6 +928,35 @@ func (_m *Client) HeadByNumber(ctx context.Context, n *big.Int) (*evmtypes.Head, return r0, r1 } +// Client_HeadByNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HeadByNumber' +type Client_HeadByNumber_Call struct { + *mock.Call +} + +// HeadByNumber is a helper method to define mock.On call +// - ctx context.Context +// - n *big.Int +func (_e *Client_Expecter) HeadByNumber(ctx interface{}, n interface{}) *Client_HeadByNumber_Call { + return &Client_HeadByNumber_Call{Call: _e.mock.On("HeadByNumber", ctx, n)} +} + +func (_c *Client_HeadByNumber_Call) Run(run func(ctx context.Context, n *big.Int)) *Client_HeadByNumber_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*big.Int)) + }) + return _c +} + +func (_c *Client_HeadByNumber_Call) Return(_a0 *evmtypes.Head, _a1 error) *Client_HeadByNumber_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_HeadByNumber_Call) RunAndReturn(run func(context.Context, *big.Int) (*evmtypes.Head, error)) *Client_HeadByNumber_Call { + _c.Call.Return(run) + return _c +} + // HeaderByHash provides a mock function with given fields: ctx, h func (_m *Client) HeaderByHash(ctx context.Context, h common.Hash) (*types.Header, error) { ret := _m.Called(ctx, h) @@ -479,6 +987,35 @@ func (_m *Client) HeaderByHash(ctx context.Context, h common.Hash) (*types.Heade return r0, r1 } +// Client_HeaderByHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HeaderByHash' +type Client_HeaderByHash_Call struct { + *mock.Call +} + +// HeaderByHash is a helper method to define mock.On call +// - ctx context.Context +// - h common.Hash +func (_e *Client_Expecter) HeaderByHash(ctx interface{}, h interface{}) *Client_HeaderByHash_Call { + return &Client_HeaderByHash_Call{Call: _e.mock.On("HeaderByHash", ctx, h)} +} + +func (_c *Client_HeaderByHash_Call) Run(run func(ctx context.Context, h common.Hash)) *Client_HeaderByHash_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Hash)) + }) + return _c +} + +func (_c *Client_HeaderByHash_Call) Return(_a0 *types.Header, _a1 error) *Client_HeaderByHash_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_HeaderByHash_Call) RunAndReturn(run func(context.Context, common.Hash) (*types.Header, error)) *Client_HeaderByHash_Call { + _c.Call.Return(run) + return _c +} + // HeaderByNumber provides a mock function with given fields: ctx, n func (_m *Client) HeaderByNumber(ctx context.Context, n *big.Int) (*types.Header, error) { ret := _m.Called(ctx, n) @@ -509,6 +1046,35 @@ func (_m *Client) HeaderByNumber(ctx context.Context, n *big.Int) (*types.Header return r0, r1 } +// Client_HeaderByNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HeaderByNumber' +type Client_HeaderByNumber_Call struct { + *mock.Call +} + +// HeaderByNumber is a helper method to define mock.On call +// - ctx context.Context +// - n *big.Int +func (_e *Client_Expecter) HeaderByNumber(ctx interface{}, n interface{}) *Client_HeaderByNumber_Call { + return &Client_HeaderByNumber_Call{Call: _e.mock.On("HeaderByNumber", ctx, n)} +} + +func (_c *Client_HeaderByNumber_Call) Run(run func(ctx context.Context, n *big.Int)) *Client_HeaderByNumber_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*big.Int)) + }) + return _c +} + +func (_c *Client_HeaderByNumber_Call) Return(_a0 *types.Header, _a1 error) *Client_HeaderByNumber_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_HeaderByNumber_Call) RunAndReturn(run func(context.Context, *big.Int) (*types.Header, error)) *Client_HeaderByNumber_Call { + _c.Call.Return(run) + return _c +} + // IsL2 provides a mock function with given fields: func (_m *Client) IsL2() bool { ret := _m.Called() @@ -527,6 +1093,33 @@ func (_m *Client) IsL2() bool { return r0 } +// Client_IsL2_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsL2' +type Client_IsL2_Call struct { + *mock.Call +} + +// IsL2 is a helper method to define mock.On call +func (_e *Client_Expecter) IsL2() *Client_IsL2_Call { + return &Client_IsL2_Call{Call: _e.mock.On("IsL2")} +} + +func (_c *Client_IsL2_Call) Run(run func()) *Client_IsL2_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Client_IsL2_Call) Return(_a0 bool) *Client_IsL2_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_IsL2_Call) RunAndReturn(run func() bool) *Client_IsL2_Call { + _c.Call.Return(run) + return _c +} + // LINKBalance provides a mock function with given fields: ctx, address, linkAddress func (_m *Client) LINKBalance(ctx context.Context, address common.Address, linkAddress common.Address) (*assets.Link, error) { ret := _m.Called(ctx, address, linkAddress) @@ -557,6 +1150,36 @@ func (_m *Client) LINKBalance(ctx context.Context, address common.Address, linkA return r0, r1 } +// Client_LINKBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LINKBalance' +type Client_LINKBalance_Call struct { + *mock.Call +} + +// LINKBalance is a helper method to define mock.On call +// - ctx context.Context +// - address common.Address +// - linkAddress common.Address +func (_e *Client_Expecter) LINKBalance(ctx interface{}, address interface{}, linkAddress interface{}) *Client_LINKBalance_Call { + return &Client_LINKBalance_Call{Call: _e.mock.On("LINKBalance", ctx, address, linkAddress)} +} + +func (_c *Client_LINKBalance_Call) Run(run func(ctx context.Context, address common.Address, linkAddress common.Address)) *Client_LINKBalance_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(common.Address)) + }) + return _c +} + +func (_c *Client_LINKBalance_Call) Return(_a0 *assets.Link, _a1 error) *Client_LINKBalance_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_LINKBalance_Call) RunAndReturn(run func(context.Context, common.Address, common.Address) (*assets.Link, error)) *Client_LINKBalance_Call { + _c.Call.Return(run) + return _c +} + // LatestBlockHeight provides a mock function with given fields: ctx func (_m *Client) LatestBlockHeight(ctx context.Context) (*big.Int, error) { ret := _m.Called(ctx) @@ -587,6 +1210,34 @@ func (_m *Client) LatestBlockHeight(ctx context.Context) (*big.Int, error) { return r0, r1 } +// Client_LatestBlockHeight_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LatestBlockHeight' +type Client_LatestBlockHeight_Call struct { + *mock.Call +} + +// LatestBlockHeight is a helper method to define mock.On call +// - ctx context.Context +func (_e *Client_Expecter) LatestBlockHeight(ctx interface{}) *Client_LatestBlockHeight_Call { + return &Client_LatestBlockHeight_Call{Call: _e.mock.On("LatestBlockHeight", ctx)} +} + +func (_c *Client_LatestBlockHeight_Call) Run(run func(ctx context.Context)) *Client_LatestBlockHeight_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Client_LatestBlockHeight_Call) Return(_a0 *big.Int, _a1 error) *Client_LatestBlockHeight_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_LatestBlockHeight_Call) RunAndReturn(run func(context.Context) (*big.Int, error)) *Client_LatestBlockHeight_Call { + _c.Call.Return(run) + return _c +} + // LatestFinalizedBlock provides a mock function with given fields: ctx func (_m *Client) LatestFinalizedBlock(ctx context.Context) (*evmtypes.Head, error) { ret := _m.Called(ctx) @@ -617,6 +1268,34 @@ func (_m *Client) LatestFinalizedBlock(ctx context.Context) (*evmtypes.Head, err return r0, r1 } +// Client_LatestFinalizedBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LatestFinalizedBlock' +type Client_LatestFinalizedBlock_Call struct { + *mock.Call +} + +// LatestFinalizedBlock is a helper method to define mock.On call +// - ctx context.Context +func (_e *Client_Expecter) LatestFinalizedBlock(ctx interface{}) *Client_LatestFinalizedBlock_Call { + return &Client_LatestFinalizedBlock_Call{Call: _e.mock.On("LatestFinalizedBlock", ctx)} +} + +func (_c *Client_LatestFinalizedBlock_Call) Run(run func(ctx context.Context)) *Client_LatestFinalizedBlock_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Client_LatestFinalizedBlock_Call) Return(head *evmtypes.Head, err error) *Client_LatestFinalizedBlock_Call { + _c.Call.Return(head, err) + return _c +} + +func (_c *Client_LatestFinalizedBlock_Call) RunAndReturn(run func(context.Context) (*evmtypes.Head, error)) *Client_LatestFinalizedBlock_Call { + _c.Call.Return(run) + return _c +} + // NodeStates provides a mock function with given fields: func (_m *Client) NodeStates() map[string]string { ret := _m.Called() @@ -637,6 +1316,33 @@ func (_m *Client) NodeStates() map[string]string { return r0 } +// Client_NodeStates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NodeStates' +type Client_NodeStates_Call struct { + *mock.Call +} + +// NodeStates is a helper method to define mock.On call +func (_e *Client_Expecter) NodeStates() *Client_NodeStates_Call { + return &Client_NodeStates_Call{Call: _e.mock.On("NodeStates")} +} + +func (_c *Client_NodeStates_Call) Run(run func()) *Client_NodeStates_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Client_NodeStates_Call) Return(_a0 map[string]string) *Client_NodeStates_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_NodeStates_Call) RunAndReturn(run func() map[string]string) *Client_NodeStates_Call { + _c.Call.Return(run) + return _c +} + // PendingCallContract provides a mock function with given fields: ctx, msg func (_m *Client) PendingCallContract(ctx context.Context, msg ethereum.CallMsg) ([]byte, error) { ret := _m.Called(ctx, msg) @@ -667,6 +1373,35 @@ func (_m *Client) PendingCallContract(ctx context.Context, msg ethereum.CallMsg) return r0, r1 } +// Client_PendingCallContract_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PendingCallContract' +type Client_PendingCallContract_Call struct { + *mock.Call +} + +// PendingCallContract is a helper method to define mock.On call +// - ctx context.Context +// - msg ethereum.CallMsg +func (_e *Client_Expecter) PendingCallContract(ctx interface{}, msg interface{}) *Client_PendingCallContract_Call { + return &Client_PendingCallContract_Call{Call: _e.mock.On("PendingCallContract", ctx, msg)} +} + +func (_c *Client_PendingCallContract_Call) Run(run func(ctx context.Context, msg ethereum.CallMsg)) *Client_PendingCallContract_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ethereum.CallMsg)) + }) + return _c +} + +func (_c *Client_PendingCallContract_Call) Return(_a0 []byte, _a1 error) *Client_PendingCallContract_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_PendingCallContract_Call) RunAndReturn(run func(context.Context, ethereum.CallMsg) ([]byte, error)) *Client_PendingCallContract_Call { + _c.Call.Return(run) + return _c +} + // PendingCodeAt provides a mock function with given fields: ctx, account func (_m *Client) PendingCodeAt(ctx context.Context, account common.Address) ([]byte, error) { ret := _m.Called(ctx, account) @@ -697,6 +1432,35 @@ func (_m *Client) PendingCodeAt(ctx context.Context, account common.Address) ([] return r0, r1 } +// Client_PendingCodeAt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PendingCodeAt' +type Client_PendingCodeAt_Call struct { + *mock.Call +} + +// PendingCodeAt is a helper method to define mock.On call +// - ctx context.Context +// - account common.Address +func (_e *Client_Expecter) PendingCodeAt(ctx interface{}, account interface{}) *Client_PendingCodeAt_Call { + return &Client_PendingCodeAt_Call{Call: _e.mock.On("PendingCodeAt", ctx, account)} +} + +func (_c *Client_PendingCodeAt_Call) Run(run func(ctx context.Context, account common.Address)) *Client_PendingCodeAt_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address)) + }) + return _c +} + +func (_c *Client_PendingCodeAt_Call) Return(_a0 []byte, _a1 error) *Client_PendingCodeAt_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_PendingCodeAt_Call) RunAndReturn(run func(context.Context, common.Address) ([]byte, error)) *Client_PendingCodeAt_Call { + _c.Call.Return(run) + return _c +} + // PendingNonceAt provides a mock function with given fields: ctx, account func (_m *Client) PendingNonceAt(ctx context.Context, account common.Address) (uint64, error) { ret := _m.Called(ctx, account) @@ -725,6 +1489,35 @@ func (_m *Client) PendingNonceAt(ctx context.Context, account common.Address) (u return r0, r1 } +// Client_PendingNonceAt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PendingNonceAt' +type Client_PendingNonceAt_Call struct { + *mock.Call +} + +// PendingNonceAt is a helper method to define mock.On call +// - ctx context.Context +// - account common.Address +func (_e *Client_Expecter) PendingNonceAt(ctx interface{}, account interface{}) *Client_PendingNonceAt_Call { + return &Client_PendingNonceAt_Call{Call: _e.mock.On("PendingNonceAt", ctx, account)} +} + +func (_c *Client_PendingNonceAt_Call) Run(run func(ctx context.Context, account common.Address)) *Client_PendingNonceAt_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address)) + }) + return _c +} + +func (_c *Client_PendingNonceAt_Call) Return(_a0 uint64, _a1 error) *Client_PendingNonceAt_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_PendingNonceAt_Call) RunAndReturn(run func(context.Context, common.Address) (uint64, error)) *Client_PendingNonceAt_Call { + _c.Call.Return(run) + return _c +} + // SendTransaction provides a mock function with given fields: ctx, tx func (_m *Client) SendTransaction(ctx context.Context, tx *types.Transaction) error { ret := _m.Called(ctx, tx) @@ -743,6 +1536,35 @@ func (_m *Client) SendTransaction(ctx context.Context, tx *types.Transaction) er return r0 } +// Client_SendTransaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendTransaction' +type Client_SendTransaction_Call struct { + *mock.Call +} + +// SendTransaction is a helper method to define mock.On call +// - ctx context.Context +// - tx *types.Transaction +func (_e *Client_Expecter) SendTransaction(ctx interface{}, tx interface{}) *Client_SendTransaction_Call { + return &Client_SendTransaction_Call{Call: _e.mock.On("SendTransaction", ctx, tx)} +} + +func (_c *Client_SendTransaction_Call) Run(run func(ctx context.Context, tx *types.Transaction)) *Client_SendTransaction_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.Transaction)) + }) + return _c +} + +func (_c *Client_SendTransaction_Call) Return(_a0 error) *Client_SendTransaction_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Client_SendTransaction_Call) RunAndReturn(run func(context.Context, *types.Transaction) error) *Client_SendTransaction_Call { + _c.Call.Return(run) + return _c +} + // SendTransactionReturnCode provides a mock function with given fields: ctx, tx, fromAddress func (_m *Client) SendTransactionReturnCode(ctx context.Context, tx *types.Transaction, fromAddress common.Address) (commonclient.SendTxReturnCode, error) { ret := _m.Called(ctx, tx, fromAddress) @@ -771,6 +1593,36 @@ func (_m *Client) SendTransactionReturnCode(ctx context.Context, tx *types.Trans return r0, r1 } +// Client_SendTransactionReturnCode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendTransactionReturnCode' +type Client_SendTransactionReturnCode_Call struct { + *mock.Call +} + +// SendTransactionReturnCode is a helper method to define mock.On call +// - ctx context.Context +// - tx *types.Transaction +// - fromAddress common.Address +func (_e *Client_Expecter) SendTransactionReturnCode(ctx interface{}, tx interface{}, fromAddress interface{}) *Client_SendTransactionReturnCode_Call { + return &Client_SendTransactionReturnCode_Call{Call: _e.mock.On("SendTransactionReturnCode", ctx, tx, fromAddress)} +} + +func (_c *Client_SendTransactionReturnCode_Call) Run(run func(ctx context.Context, tx *types.Transaction, fromAddress common.Address)) *Client_SendTransactionReturnCode_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.Transaction), args[2].(common.Address)) + }) + return _c +} + +func (_c *Client_SendTransactionReturnCode_Call) Return(_a0 commonclient.SendTxReturnCode, _a1 error) *Client_SendTransactionReturnCode_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_SendTransactionReturnCode_Call) RunAndReturn(run func(context.Context, *types.Transaction, common.Address) (commonclient.SendTxReturnCode, error)) *Client_SendTransactionReturnCode_Call { + _c.Call.Return(run) + return _c +} + // SequenceAt provides a mock function with given fields: ctx, account, blockNumber func (_m *Client) SequenceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (evmtypes.Nonce, error) { ret := _m.Called(ctx, account, blockNumber) @@ -799,6 +1651,36 @@ func (_m *Client) SequenceAt(ctx context.Context, account common.Address, blockN return r0, r1 } +// Client_SequenceAt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SequenceAt' +type Client_SequenceAt_Call struct { + *mock.Call +} + +// SequenceAt is a helper method to define mock.On call +// - ctx context.Context +// - account common.Address +// - blockNumber *big.Int +func (_e *Client_Expecter) SequenceAt(ctx interface{}, account interface{}, blockNumber interface{}) *Client_SequenceAt_Call { + return &Client_SequenceAt_Call{Call: _e.mock.On("SequenceAt", ctx, account, blockNumber)} +} + +func (_c *Client_SequenceAt_Call) Run(run func(ctx context.Context, account common.Address, blockNumber *big.Int)) *Client_SequenceAt_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(*big.Int)) + }) + return _c +} + +func (_c *Client_SequenceAt_Call) Return(_a0 evmtypes.Nonce, _a1 error) *Client_SequenceAt_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_SequenceAt_Call) RunAndReturn(run func(context.Context, common.Address, *big.Int) (evmtypes.Nonce, error)) *Client_SequenceAt_Call { + _c.Call.Return(run) + return _c +} + // SubscribeFilterLogs provides a mock function with given fields: ctx, q, ch func (_m *Client) SubscribeFilterLogs(ctx context.Context, q ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error) { ret := _m.Called(ctx, q, ch) @@ -829,6 +1711,36 @@ func (_m *Client) SubscribeFilterLogs(ctx context.Context, q ethereum.FilterQuer return r0, r1 } +// Client_SubscribeFilterLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SubscribeFilterLogs' +type Client_SubscribeFilterLogs_Call struct { + *mock.Call +} + +// SubscribeFilterLogs is a helper method to define mock.On call +// - ctx context.Context +// - q ethereum.FilterQuery +// - ch chan<- types.Log +func (_e *Client_Expecter) SubscribeFilterLogs(ctx interface{}, q interface{}, ch interface{}) *Client_SubscribeFilterLogs_Call { + return &Client_SubscribeFilterLogs_Call{Call: _e.mock.On("SubscribeFilterLogs", ctx, q, ch)} +} + +func (_c *Client_SubscribeFilterLogs_Call) Run(run func(ctx context.Context, q ethereum.FilterQuery, ch chan<- types.Log)) *Client_SubscribeFilterLogs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ethereum.FilterQuery), args[2].(chan<- types.Log)) + }) + return _c +} + +func (_c *Client_SubscribeFilterLogs_Call) Return(_a0 ethereum.Subscription, _a1 error) *Client_SubscribeFilterLogs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_SubscribeFilterLogs_Call) RunAndReturn(run func(context.Context, ethereum.FilterQuery, chan<- types.Log) (ethereum.Subscription, error)) *Client_SubscribeFilterLogs_Call { + _c.Call.Return(run) + return _c +} + // SubscribeNewHead provides a mock function with given fields: ctx, ch func (_m *Client) SubscribeNewHead(ctx context.Context, ch chan<- *evmtypes.Head) (ethereum.Subscription, error) { ret := _m.Called(ctx, ch) @@ -859,6 +1771,35 @@ func (_m *Client) SubscribeNewHead(ctx context.Context, ch chan<- *evmtypes.Head return r0, r1 } +// Client_SubscribeNewHead_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SubscribeNewHead' +type Client_SubscribeNewHead_Call struct { + *mock.Call +} + +// SubscribeNewHead is a helper method to define mock.On call +// - ctx context.Context +// - ch chan<- *evmtypes.Head +func (_e *Client_Expecter) SubscribeNewHead(ctx interface{}, ch interface{}) *Client_SubscribeNewHead_Call { + return &Client_SubscribeNewHead_Call{Call: _e.mock.On("SubscribeNewHead", ctx, ch)} +} + +func (_c *Client_SubscribeNewHead_Call) Run(run func(ctx context.Context, ch chan<- *evmtypes.Head)) *Client_SubscribeNewHead_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(chan<- *evmtypes.Head)) + }) + return _c +} + +func (_c *Client_SubscribeNewHead_Call) Return(_a0 ethereum.Subscription, _a1 error) *Client_SubscribeNewHead_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_SubscribeNewHead_Call) RunAndReturn(run func(context.Context, chan<- *evmtypes.Head) (ethereum.Subscription, error)) *Client_SubscribeNewHead_Call { + _c.Call.Return(run) + return _c +} + // SuggestGasPrice provides a mock function with given fields: ctx func (_m *Client) SuggestGasPrice(ctx context.Context) (*big.Int, error) { ret := _m.Called(ctx) @@ -889,6 +1830,34 @@ func (_m *Client) SuggestGasPrice(ctx context.Context) (*big.Int, error) { return r0, r1 } +// Client_SuggestGasPrice_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuggestGasPrice' +type Client_SuggestGasPrice_Call struct { + *mock.Call +} + +// SuggestGasPrice is a helper method to define mock.On call +// - ctx context.Context +func (_e *Client_Expecter) SuggestGasPrice(ctx interface{}) *Client_SuggestGasPrice_Call { + return &Client_SuggestGasPrice_Call{Call: _e.mock.On("SuggestGasPrice", ctx)} +} + +func (_c *Client_SuggestGasPrice_Call) Run(run func(ctx context.Context)) *Client_SuggestGasPrice_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Client_SuggestGasPrice_Call) Return(_a0 *big.Int, _a1 error) *Client_SuggestGasPrice_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_SuggestGasPrice_Call) RunAndReturn(run func(context.Context) (*big.Int, error)) *Client_SuggestGasPrice_Call { + _c.Call.Return(run) + return _c +} + // SuggestGasTipCap provides a mock function with given fields: ctx func (_m *Client) SuggestGasTipCap(ctx context.Context) (*big.Int, error) { ret := _m.Called(ctx) @@ -919,6 +1888,34 @@ func (_m *Client) SuggestGasTipCap(ctx context.Context) (*big.Int, error) { return r0, r1 } +// Client_SuggestGasTipCap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuggestGasTipCap' +type Client_SuggestGasTipCap_Call struct { + *mock.Call +} + +// SuggestGasTipCap is a helper method to define mock.On call +// - ctx context.Context +func (_e *Client_Expecter) SuggestGasTipCap(ctx interface{}) *Client_SuggestGasTipCap_Call { + return &Client_SuggestGasTipCap_Call{Call: _e.mock.On("SuggestGasTipCap", ctx)} +} + +func (_c *Client_SuggestGasTipCap_Call) Run(run func(ctx context.Context)) *Client_SuggestGasTipCap_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Client_SuggestGasTipCap_Call) Return(_a0 *big.Int, _a1 error) *Client_SuggestGasTipCap_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_SuggestGasTipCap_Call) RunAndReturn(run func(context.Context) (*big.Int, error)) *Client_SuggestGasTipCap_Call { + _c.Call.Return(run) + return _c +} + // TokenBalance provides a mock function with given fields: ctx, address, contractAddress func (_m *Client) TokenBalance(ctx context.Context, address common.Address, contractAddress common.Address) (*big.Int, error) { ret := _m.Called(ctx, address, contractAddress) @@ -949,6 +1946,36 @@ func (_m *Client) TokenBalance(ctx context.Context, address common.Address, cont return r0, r1 } +// Client_TokenBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TokenBalance' +type Client_TokenBalance_Call struct { + *mock.Call +} + +// TokenBalance is a helper method to define mock.On call +// - ctx context.Context +// - address common.Address +// - contractAddress common.Address +func (_e *Client_Expecter) TokenBalance(ctx interface{}, address interface{}, contractAddress interface{}) *Client_TokenBalance_Call { + return &Client_TokenBalance_Call{Call: _e.mock.On("TokenBalance", ctx, address, contractAddress)} +} + +func (_c *Client_TokenBalance_Call) Run(run func(ctx context.Context, address common.Address, contractAddress common.Address)) *Client_TokenBalance_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(common.Address)) + }) + return _c +} + +func (_c *Client_TokenBalance_Call) Return(_a0 *big.Int, _a1 error) *Client_TokenBalance_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_TokenBalance_Call) RunAndReturn(run func(context.Context, common.Address, common.Address) (*big.Int, error)) *Client_TokenBalance_Call { + _c.Call.Return(run) + return _c +} + // TransactionByHash provides a mock function with given fields: ctx, txHash func (_m *Client) TransactionByHash(ctx context.Context, txHash common.Hash) (*types.Transaction, error) { ret := _m.Called(ctx, txHash) @@ -979,6 +2006,35 @@ func (_m *Client) TransactionByHash(ctx context.Context, txHash common.Hash) (*t return r0, r1 } +// Client_TransactionByHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransactionByHash' +type Client_TransactionByHash_Call struct { + *mock.Call +} + +// TransactionByHash is a helper method to define mock.On call +// - ctx context.Context +// - txHash common.Hash +func (_e *Client_Expecter) TransactionByHash(ctx interface{}, txHash interface{}) *Client_TransactionByHash_Call { + return &Client_TransactionByHash_Call{Call: _e.mock.On("TransactionByHash", ctx, txHash)} +} + +func (_c *Client_TransactionByHash_Call) Run(run func(ctx context.Context, txHash common.Hash)) *Client_TransactionByHash_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Hash)) + }) + return _c +} + +func (_c *Client_TransactionByHash_Call) Return(_a0 *types.Transaction, _a1 error) *Client_TransactionByHash_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_TransactionByHash_Call) RunAndReturn(run func(context.Context, common.Hash) (*types.Transaction, error)) *Client_TransactionByHash_Call { + _c.Call.Return(run) + return _c +} + // TransactionReceipt provides a mock function with given fields: ctx, txHash func (_m *Client) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error) { ret := _m.Called(ctx, txHash) @@ -1009,6 +2065,35 @@ func (_m *Client) TransactionReceipt(ctx context.Context, txHash common.Hash) (* return r0, r1 } +// Client_TransactionReceipt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransactionReceipt' +type Client_TransactionReceipt_Call struct { + *mock.Call +} + +// TransactionReceipt is a helper method to define mock.On call +// - ctx context.Context +// - txHash common.Hash +func (_e *Client_Expecter) TransactionReceipt(ctx interface{}, txHash interface{}) *Client_TransactionReceipt_Call { + return &Client_TransactionReceipt_Call{Call: _e.mock.On("TransactionReceipt", ctx, txHash)} +} + +func (_c *Client_TransactionReceipt_Call) Run(run func(ctx context.Context, txHash common.Hash)) *Client_TransactionReceipt_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Hash)) + }) + return _c +} + +func (_c *Client_TransactionReceipt_Call) Return(_a0 *types.Receipt, _a1 error) *Client_TransactionReceipt_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Client_TransactionReceipt_Call) RunAndReturn(run func(context.Context, common.Hash) (*types.Receipt, error)) *Client_TransactionReceipt_Call { + _c.Call.Return(run) + return _c +} + // NewClient creates a new instance of Client. 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 NewClient(t interface { diff --git a/core/chains/evm/client/mocks/rpc_client.go b/core/chains/evm/client/mocks/rpc_client.go index 980a215ccfe..fa866af29e0 100644 --- a/core/chains/evm/client/mocks/rpc_client.go +++ b/core/chains/evm/client/mocks/rpc_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -9,6 +9,8 @@ import ( common "github.com/ethereum/go-ethereum/common" + commonclient "github.com/smartcontractkit/chainlink/v2/common/client" + commontypes "github.com/smartcontractkit/chainlink/v2/common/types" context "context" @@ -31,6 +33,14 @@ type RPCClient struct { mock.Mock } +type RPCClient_Expecter struct { + mock *mock.Mock +} + +func (_m *RPCClient) EXPECT() *RPCClient_Expecter { + return &RPCClient_Expecter{mock: &_m.Mock} +} + // BalanceAt provides a mock function with given fields: ctx, accountAddress, blockNumber func (_m *RPCClient) BalanceAt(ctx context.Context, accountAddress common.Address, blockNumber *big.Int) (*big.Int, error) { ret := _m.Called(ctx, accountAddress, blockNumber) @@ -61,6 +71,36 @@ func (_m *RPCClient) BalanceAt(ctx context.Context, accountAddress common.Addres return r0, r1 } +// RPCClient_BalanceAt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BalanceAt' +type RPCClient_BalanceAt_Call struct { + *mock.Call +} + +// BalanceAt is a helper method to define mock.On call +// - ctx context.Context +// - accountAddress common.Address +// - blockNumber *big.Int +func (_e *RPCClient_Expecter) BalanceAt(ctx interface{}, accountAddress interface{}, blockNumber interface{}) *RPCClient_BalanceAt_Call { + return &RPCClient_BalanceAt_Call{Call: _e.mock.On("BalanceAt", ctx, accountAddress, blockNumber)} +} + +func (_c *RPCClient_BalanceAt_Call) Run(run func(ctx context.Context, accountAddress common.Address, blockNumber *big.Int)) *RPCClient_BalanceAt_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(*big.Int)) + }) + return _c +} + +func (_c *RPCClient_BalanceAt_Call) Return(_a0 *big.Int, _a1 error) *RPCClient_BalanceAt_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RPCClient_BalanceAt_Call) RunAndReturn(run func(context.Context, common.Address, *big.Int) (*big.Int, error)) *RPCClient_BalanceAt_Call { + _c.Call.Return(run) + return _c +} + // BatchCallContext provides a mock function with given fields: ctx, b func (_m *RPCClient) BatchCallContext(ctx context.Context, b []rpc.BatchElem) error { ret := _m.Called(ctx, b) @@ -79,6 +119,35 @@ func (_m *RPCClient) BatchCallContext(ctx context.Context, b []rpc.BatchElem) er return r0 } +// RPCClient_BatchCallContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BatchCallContext' +type RPCClient_BatchCallContext_Call struct { + *mock.Call +} + +// BatchCallContext is a helper method to define mock.On call +// - ctx context.Context +// - b []rpc.BatchElem +func (_e *RPCClient_Expecter) BatchCallContext(ctx interface{}, b interface{}) *RPCClient_BatchCallContext_Call { + return &RPCClient_BatchCallContext_Call{Call: _e.mock.On("BatchCallContext", ctx, b)} +} + +func (_c *RPCClient_BatchCallContext_Call) Run(run func(ctx context.Context, b []rpc.BatchElem)) *RPCClient_BatchCallContext_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]rpc.BatchElem)) + }) + return _c +} + +func (_c *RPCClient_BatchCallContext_Call) Return(_a0 error) *RPCClient_BatchCallContext_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *RPCClient_BatchCallContext_Call) RunAndReturn(run func(context.Context, []rpc.BatchElem) error) *RPCClient_BatchCallContext_Call { + _c.Call.Return(run) + return _c +} + // BlockByHash provides a mock function with given fields: ctx, hash func (_m *RPCClient) BlockByHash(ctx context.Context, hash common.Hash) (*types.Head, error) { ret := _m.Called(ctx, hash) @@ -109,6 +178,35 @@ func (_m *RPCClient) BlockByHash(ctx context.Context, hash common.Hash) (*types. return r0, r1 } +// RPCClient_BlockByHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockByHash' +type RPCClient_BlockByHash_Call struct { + *mock.Call +} + +// BlockByHash is a helper method to define mock.On call +// - ctx context.Context +// - hash common.Hash +func (_e *RPCClient_Expecter) BlockByHash(ctx interface{}, hash interface{}) *RPCClient_BlockByHash_Call { + return &RPCClient_BlockByHash_Call{Call: _e.mock.On("BlockByHash", ctx, hash)} +} + +func (_c *RPCClient_BlockByHash_Call) Run(run func(ctx context.Context, hash common.Hash)) *RPCClient_BlockByHash_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Hash)) + }) + return _c +} + +func (_c *RPCClient_BlockByHash_Call) Return(_a0 *types.Head, _a1 error) *RPCClient_BlockByHash_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RPCClient_BlockByHash_Call) RunAndReturn(run func(context.Context, common.Hash) (*types.Head, error)) *RPCClient_BlockByHash_Call { + _c.Call.Return(run) + return _c +} + // BlockByHashGeth provides a mock function with given fields: ctx, hash func (_m *RPCClient) BlockByHashGeth(ctx context.Context, hash common.Hash) (*coretypes.Block, error) { ret := _m.Called(ctx, hash) @@ -139,6 +237,35 @@ func (_m *RPCClient) BlockByHashGeth(ctx context.Context, hash common.Hash) (*co return r0, r1 } +// RPCClient_BlockByHashGeth_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockByHashGeth' +type RPCClient_BlockByHashGeth_Call struct { + *mock.Call +} + +// BlockByHashGeth is a helper method to define mock.On call +// - ctx context.Context +// - hash common.Hash +func (_e *RPCClient_Expecter) BlockByHashGeth(ctx interface{}, hash interface{}) *RPCClient_BlockByHashGeth_Call { + return &RPCClient_BlockByHashGeth_Call{Call: _e.mock.On("BlockByHashGeth", ctx, hash)} +} + +func (_c *RPCClient_BlockByHashGeth_Call) Run(run func(ctx context.Context, hash common.Hash)) *RPCClient_BlockByHashGeth_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Hash)) + }) + return _c +} + +func (_c *RPCClient_BlockByHashGeth_Call) Return(b *coretypes.Block, err error) *RPCClient_BlockByHashGeth_Call { + _c.Call.Return(b, err) + return _c +} + +func (_c *RPCClient_BlockByHashGeth_Call) RunAndReturn(run func(context.Context, common.Hash) (*coretypes.Block, error)) *RPCClient_BlockByHashGeth_Call { + _c.Call.Return(run) + return _c +} + // BlockByNumber provides a mock function with given fields: ctx, number func (_m *RPCClient) BlockByNumber(ctx context.Context, number *big.Int) (*types.Head, error) { ret := _m.Called(ctx, number) @@ -169,6 +296,35 @@ func (_m *RPCClient) BlockByNumber(ctx context.Context, number *big.Int) (*types return r0, r1 } +// RPCClient_BlockByNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockByNumber' +type RPCClient_BlockByNumber_Call struct { + *mock.Call +} + +// BlockByNumber is a helper method to define mock.On call +// - ctx context.Context +// - number *big.Int +func (_e *RPCClient_Expecter) BlockByNumber(ctx interface{}, number interface{}) *RPCClient_BlockByNumber_Call { + return &RPCClient_BlockByNumber_Call{Call: _e.mock.On("BlockByNumber", ctx, number)} +} + +func (_c *RPCClient_BlockByNumber_Call) Run(run func(ctx context.Context, number *big.Int)) *RPCClient_BlockByNumber_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*big.Int)) + }) + return _c +} + +func (_c *RPCClient_BlockByNumber_Call) Return(_a0 *types.Head, _a1 error) *RPCClient_BlockByNumber_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RPCClient_BlockByNumber_Call) RunAndReturn(run func(context.Context, *big.Int) (*types.Head, error)) *RPCClient_BlockByNumber_Call { + _c.Call.Return(run) + return _c +} + // BlockByNumberGeth provides a mock function with given fields: ctx, number func (_m *RPCClient) BlockByNumberGeth(ctx context.Context, number *big.Int) (*coretypes.Block, error) { ret := _m.Called(ctx, number) @@ -199,6 +355,35 @@ func (_m *RPCClient) BlockByNumberGeth(ctx context.Context, number *big.Int) (*c return r0, r1 } +// RPCClient_BlockByNumberGeth_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockByNumberGeth' +type RPCClient_BlockByNumberGeth_Call struct { + *mock.Call +} + +// BlockByNumberGeth is a helper method to define mock.On call +// - ctx context.Context +// - number *big.Int +func (_e *RPCClient_Expecter) BlockByNumberGeth(ctx interface{}, number interface{}) *RPCClient_BlockByNumberGeth_Call { + return &RPCClient_BlockByNumberGeth_Call{Call: _e.mock.On("BlockByNumberGeth", ctx, number)} +} + +func (_c *RPCClient_BlockByNumberGeth_Call) Run(run func(ctx context.Context, number *big.Int)) *RPCClient_BlockByNumberGeth_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*big.Int)) + }) + return _c +} + +func (_c *RPCClient_BlockByNumberGeth_Call) Return(b *coretypes.Block, err error) *RPCClient_BlockByNumberGeth_Call { + _c.Call.Return(b, err) + return _c +} + +func (_c *RPCClient_BlockByNumberGeth_Call) RunAndReturn(run func(context.Context, *big.Int) (*coretypes.Block, error)) *RPCClient_BlockByNumberGeth_Call { + _c.Call.Return(run) + return _c +} + // CallContext provides a mock function with given fields: ctx, result, method, args func (_m *RPCClient) CallContext(ctx context.Context, result interface{}, method string, args ...interface{}) error { var _ca []interface{} @@ -220,6 +405,44 @@ func (_m *RPCClient) CallContext(ctx context.Context, result interface{}, method return r0 } +// RPCClient_CallContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CallContext' +type RPCClient_CallContext_Call struct { + *mock.Call +} + +// CallContext is a helper method to define mock.On call +// - ctx context.Context +// - result interface{} +// - method string +// - args ...interface{} +func (_e *RPCClient_Expecter) CallContext(ctx interface{}, result interface{}, method interface{}, args ...interface{}) *RPCClient_CallContext_Call { + return &RPCClient_CallContext_Call{Call: _e.mock.On("CallContext", + append([]interface{}{ctx, result, method}, args...)...)} +} + +func (_c *RPCClient_CallContext_Call) Run(run func(ctx context.Context, result interface{}, method string, args ...interface{})) *RPCClient_CallContext_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-3) + for i, a := range args[3:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(args[0].(context.Context), args[1].(interface{}), args[2].(string), variadicArgs...) + }) + return _c +} + +func (_c *RPCClient_CallContext_Call) Return(_a0 error) *RPCClient_CallContext_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *RPCClient_CallContext_Call) RunAndReturn(run func(context.Context, interface{}, string, ...interface{}) error) *RPCClient_CallContext_Call { + _c.Call.Return(run) + return _c +} + // CallContract provides a mock function with given fields: ctx, msg, blockNumber func (_m *RPCClient) CallContract(ctx context.Context, msg interface{}, blockNumber *big.Int) ([]byte, error) { ret := _m.Called(ctx, msg, blockNumber) @@ -250,6 +473,36 @@ func (_m *RPCClient) CallContract(ctx context.Context, msg interface{}, blockNum return r0, r1 } +// RPCClient_CallContract_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CallContract' +type RPCClient_CallContract_Call struct { + *mock.Call +} + +// CallContract is a helper method to define mock.On call +// - ctx context.Context +// - msg interface{} +// - blockNumber *big.Int +func (_e *RPCClient_Expecter) CallContract(ctx interface{}, msg interface{}, blockNumber interface{}) *RPCClient_CallContract_Call { + return &RPCClient_CallContract_Call{Call: _e.mock.On("CallContract", ctx, msg, blockNumber)} +} + +func (_c *RPCClient_CallContract_Call) Run(run func(ctx context.Context, msg interface{}, blockNumber *big.Int)) *RPCClient_CallContract_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(interface{}), args[2].(*big.Int)) + }) + return _c +} + +func (_c *RPCClient_CallContract_Call) Return(rpcErr []byte, extractErr error) *RPCClient_CallContract_Call { + _c.Call.Return(rpcErr, extractErr) + return _c +} + +func (_c *RPCClient_CallContract_Call) RunAndReturn(run func(context.Context, interface{}, *big.Int) ([]byte, error)) *RPCClient_CallContract_Call { + _c.Call.Return(run) + return _c +} + // ChainID provides a mock function with given fields: ctx func (_m *RPCClient) ChainID(ctx context.Context) (*big.Int, error) { ret := _m.Called(ctx) @@ -280,6 +533,34 @@ func (_m *RPCClient) ChainID(ctx context.Context) (*big.Int, error) { return r0, r1 } +// RPCClient_ChainID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChainID' +type RPCClient_ChainID_Call struct { + *mock.Call +} + +// ChainID is a helper method to define mock.On call +// - ctx context.Context +func (_e *RPCClient_Expecter) ChainID(ctx interface{}) *RPCClient_ChainID_Call { + return &RPCClient_ChainID_Call{Call: _e.mock.On("ChainID", ctx)} +} + +func (_c *RPCClient_ChainID_Call) Run(run func(ctx context.Context)) *RPCClient_ChainID_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *RPCClient_ChainID_Call) Return(_a0 *big.Int, _a1 error) *RPCClient_ChainID_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RPCClient_ChainID_Call) RunAndReturn(run func(context.Context) (*big.Int, error)) *RPCClient_ChainID_Call { + _c.Call.Return(run) + return _c +} + // ClientVersion provides a mock function with given fields: _a0 func (_m *RPCClient) ClientVersion(_a0 context.Context) (string, error) { ret := _m.Called(_a0) @@ -308,11 +589,66 @@ func (_m *RPCClient) ClientVersion(_a0 context.Context) (string, error) { return r0, r1 } +// RPCClient_ClientVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClientVersion' +type RPCClient_ClientVersion_Call struct { + *mock.Call +} + +// ClientVersion is a helper method to define mock.On call +// - _a0 context.Context +func (_e *RPCClient_Expecter) ClientVersion(_a0 interface{}) *RPCClient_ClientVersion_Call { + return &RPCClient_ClientVersion_Call{Call: _e.mock.On("ClientVersion", _a0)} +} + +func (_c *RPCClient_ClientVersion_Call) Run(run func(_a0 context.Context)) *RPCClient_ClientVersion_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *RPCClient_ClientVersion_Call) Return(_a0 string, _a1 error) *RPCClient_ClientVersion_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RPCClient_ClientVersion_Call) RunAndReturn(run func(context.Context) (string, error)) *RPCClient_ClientVersion_Call { + _c.Call.Return(run) + return _c +} + // Close provides a mock function with given fields: func (_m *RPCClient) Close() { _m.Called() } +// RPCClient_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type RPCClient_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *RPCClient_Expecter) Close() *RPCClient_Close_Call { + return &RPCClient_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *RPCClient_Close_Call) Run(run func()) *RPCClient_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *RPCClient_Close_Call) Return() *RPCClient_Close_Call { + _c.Call.Return() + return _c +} + +func (_c *RPCClient_Close_Call) RunAndReturn(run func()) *RPCClient_Close_Call { + _c.Call.Return(run) + return _c +} + // CodeAt provides a mock function with given fields: ctx, account, blockNumber func (_m *RPCClient) CodeAt(ctx context.Context, account common.Address, blockNumber *big.Int) ([]byte, error) { ret := _m.Called(ctx, account, blockNumber) @@ -343,6 +679,36 @@ func (_m *RPCClient) CodeAt(ctx context.Context, account common.Address, blockNu return r0, r1 } +// RPCClient_CodeAt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CodeAt' +type RPCClient_CodeAt_Call struct { + *mock.Call +} + +// CodeAt is a helper method to define mock.On call +// - ctx context.Context +// - account common.Address +// - blockNumber *big.Int +func (_e *RPCClient_Expecter) CodeAt(ctx interface{}, account interface{}, blockNumber interface{}) *RPCClient_CodeAt_Call { + return &RPCClient_CodeAt_Call{Call: _e.mock.On("CodeAt", ctx, account, blockNumber)} +} + +func (_c *RPCClient_CodeAt_Call) Run(run func(ctx context.Context, account common.Address, blockNumber *big.Int)) *RPCClient_CodeAt_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(*big.Int)) + }) + return _c +} + +func (_c *RPCClient_CodeAt_Call) Return(_a0 []byte, _a1 error) *RPCClient_CodeAt_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RPCClient_CodeAt_Call) RunAndReturn(run func(context.Context, common.Address, *big.Int) ([]byte, error)) *RPCClient_CodeAt_Call { + _c.Call.Return(run) + return _c +} + // Dial provides a mock function with given fields: ctx func (_m *RPCClient) Dial(ctx context.Context) error { ret := _m.Called(ctx) @@ -361,6 +727,34 @@ func (_m *RPCClient) Dial(ctx context.Context) error { return r0 } +// RPCClient_Dial_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Dial' +type RPCClient_Dial_Call struct { + *mock.Call +} + +// Dial is a helper method to define mock.On call +// - ctx context.Context +func (_e *RPCClient_Expecter) Dial(ctx interface{}) *RPCClient_Dial_Call { + return &RPCClient_Dial_Call{Call: _e.mock.On("Dial", ctx)} +} + +func (_c *RPCClient_Dial_Call) Run(run func(ctx context.Context)) *RPCClient_Dial_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *RPCClient_Dial_Call) Return(_a0 error) *RPCClient_Dial_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *RPCClient_Dial_Call) RunAndReturn(run func(context.Context) error) *RPCClient_Dial_Call { + _c.Call.Return(run) + return _c +} + // DialHTTP provides a mock function with given fields: func (_m *RPCClient) DialHTTP() error { ret := _m.Called() @@ -379,11 +773,65 @@ func (_m *RPCClient) DialHTTP() error { return r0 } +// RPCClient_DialHTTP_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DialHTTP' +type RPCClient_DialHTTP_Call struct { + *mock.Call +} + +// DialHTTP is a helper method to define mock.On call +func (_e *RPCClient_Expecter) DialHTTP() *RPCClient_DialHTTP_Call { + return &RPCClient_DialHTTP_Call{Call: _e.mock.On("DialHTTP")} +} + +func (_c *RPCClient_DialHTTP_Call) Run(run func()) *RPCClient_DialHTTP_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *RPCClient_DialHTTP_Call) Return(_a0 error) *RPCClient_DialHTTP_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *RPCClient_DialHTTP_Call) RunAndReturn(run func() error) *RPCClient_DialHTTP_Call { + _c.Call.Return(run) + return _c +} + // DisconnectAll provides a mock function with given fields: func (_m *RPCClient) DisconnectAll() { _m.Called() } +// RPCClient_DisconnectAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DisconnectAll' +type RPCClient_DisconnectAll_Call struct { + *mock.Call +} + +// DisconnectAll is a helper method to define mock.On call +func (_e *RPCClient_Expecter) DisconnectAll() *RPCClient_DisconnectAll_Call { + return &RPCClient_DisconnectAll_Call{Call: _e.mock.On("DisconnectAll")} +} + +func (_c *RPCClient_DisconnectAll_Call) Run(run func()) *RPCClient_DisconnectAll_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *RPCClient_DisconnectAll_Call) Return() *RPCClient_DisconnectAll_Call { + _c.Call.Return() + return _c +} + +func (_c *RPCClient_DisconnectAll_Call) RunAndReturn(run func()) *RPCClient_DisconnectAll_Call { + _c.Call.Return(run) + return _c +} + // EstimateGas provides a mock function with given fields: ctx, call func (_m *RPCClient) EstimateGas(ctx context.Context, call interface{}) (uint64, error) { ret := _m.Called(ctx, call) @@ -412,6 +860,35 @@ func (_m *RPCClient) EstimateGas(ctx context.Context, call interface{}) (uint64, return r0, r1 } +// RPCClient_EstimateGas_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EstimateGas' +type RPCClient_EstimateGas_Call struct { + *mock.Call +} + +// EstimateGas is a helper method to define mock.On call +// - ctx context.Context +// - call interface{} +func (_e *RPCClient_Expecter) EstimateGas(ctx interface{}, call interface{}) *RPCClient_EstimateGas_Call { + return &RPCClient_EstimateGas_Call{Call: _e.mock.On("EstimateGas", ctx, call)} +} + +func (_c *RPCClient_EstimateGas_Call) Run(run func(ctx context.Context, call interface{})) *RPCClient_EstimateGas_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(interface{})) + }) + return _c +} + +func (_c *RPCClient_EstimateGas_Call) Return(gas uint64, err error) *RPCClient_EstimateGas_Call { + _c.Call.Return(gas, err) + return _c +} + +func (_c *RPCClient_EstimateGas_Call) RunAndReturn(run func(context.Context, interface{}) (uint64, error)) *RPCClient_EstimateGas_Call { + _c.Call.Return(run) + return _c +} + // FilterEvents provides a mock function with given fields: ctx, query func (_m *RPCClient) FilterEvents(ctx context.Context, query ethereum.FilterQuery) ([]coretypes.Log, error) { ret := _m.Called(ctx, query) @@ -442,6 +919,90 @@ func (_m *RPCClient) FilterEvents(ctx context.Context, query ethereum.FilterQuer return r0, r1 } +// RPCClient_FilterEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterEvents' +type RPCClient_FilterEvents_Call struct { + *mock.Call +} + +// FilterEvents is a helper method to define mock.On call +// - ctx context.Context +// - query ethereum.FilterQuery +func (_e *RPCClient_Expecter) FilterEvents(ctx interface{}, query interface{}) *RPCClient_FilterEvents_Call { + return &RPCClient_FilterEvents_Call{Call: _e.mock.On("FilterEvents", ctx, query)} +} + +func (_c *RPCClient_FilterEvents_Call) Run(run func(ctx context.Context, query ethereum.FilterQuery)) *RPCClient_FilterEvents_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ethereum.FilterQuery)) + }) + return _c +} + +func (_c *RPCClient_FilterEvents_Call) Return(_a0 []coretypes.Log, _a1 error) *RPCClient_FilterEvents_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RPCClient_FilterEvents_Call) RunAndReturn(run func(context.Context, ethereum.FilterQuery) ([]coretypes.Log, error)) *RPCClient_FilterEvents_Call { + _c.Call.Return(run) + return _c +} + +// GetInterceptedChainInfo provides a mock function with given fields: +func (_m *RPCClient) GetInterceptedChainInfo() (commonclient.ChainInfo, commonclient.ChainInfo) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetInterceptedChainInfo") + } + + var r0 commonclient.ChainInfo + var r1 commonclient.ChainInfo + if rf, ok := ret.Get(0).(func() (commonclient.ChainInfo, commonclient.ChainInfo)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() commonclient.ChainInfo); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(commonclient.ChainInfo) + } + + if rf, ok := ret.Get(1).(func() commonclient.ChainInfo); ok { + r1 = rf() + } else { + r1 = ret.Get(1).(commonclient.ChainInfo) + } + + return r0, r1 +} + +// RPCClient_GetInterceptedChainInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetInterceptedChainInfo' +type RPCClient_GetInterceptedChainInfo_Call struct { + *mock.Call +} + +// GetInterceptedChainInfo is a helper method to define mock.On call +func (_e *RPCClient_Expecter) GetInterceptedChainInfo() *RPCClient_GetInterceptedChainInfo_Call { + return &RPCClient_GetInterceptedChainInfo_Call{Call: _e.mock.On("GetInterceptedChainInfo")} +} + +func (_c *RPCClient_GetInterceptedChainInfo_Call) Run(run func()) *RPCClient_GetInterceptedChainInfo_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *RPCClient_GetInterceptedChainInfo_Call) Return(latest commonclient.ChainInfo, highestUserObservations commonclient.ChainInfo) *RPCClient_GetInterceptedChainInfo_Call { + _c.Call.Return(latest, highestUserObservations) + return _c +} + +func (_c *RPCClient_GetInterceptedChainInfo_Call) RunAndReturn(run func() (commonclient.ChainInfo, commonclient.ChainInfo)) *RPCClient_GetInterceptedChainInfo_Call { + _c.Call.Return(run) + return _c +} + // HeaderByHash provides a mock function with given fields: ctx, h func (_m *RPCClient) HeaderByHash(ctx context.Context, h common.Hash) (*coretypes.Header, error) { ret := _m.Called(ctx, h) @@ -472,6 +1033,35 @@ func (_m *RPCClient) HeaderByHash(ctx context.Context, h common.Hash) (*coretype return r0, r1 } +// RPCClient_HeaderByHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HeaderByHash' +type RPCClient_HeaderByHash_Call struct { + *mock.Call +} + +// HeaderByHash is a helper method to define mock.On call +// - ctx context.Context +// - h common.Hash +func (_e *RPCClient_Expecter) HeaderByHash(ctx interface{}, h interface{}) *RPCClient_HeaderByHash_Call { + return &RPCClient_HeaderByHash_Call{Call: _e.mock.On("HeaderByHash", ctx, h)} +} + +func (_c *RPCClient_HeaderByHash_Call) Run(run func(ctx context.Context, h common.Hash)) *RPCClient_HeaderByHash_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Hash)) + }) + return _c +} + +func (_c *RPCClient_HeaderByHash_Call) Return(head *coretypes.Header, err error) *RPCClient_HeaderByHash_Call { + _c.Call.Return(head, err) + return _c +} + +func (_c *RPCClient_HeaderByHash_Call) RunAndReturn(run func(context.Context, common.Hash) (*coretypes.Header, error)) *RPCClient_HeaderByHash_Call { + _c.Call.Return(run) + return _c +} + // HeaderByNumber provides a mock function with given fields: ctx, n func (_m *RPCClient) HeaderByNumber(ctx context.Context, n *big.Int) (*coretypes.Header, error) { ret := _m.Called(ctx, n) @@ -502,6 +1092,35 @@ func (_m *RPCClient) HeaderByNumber(ctx context.Context, n *big.Int) (*coretypes return r0, r1 } +// RPCClient_HeaderByNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HeaderByNumber' +type RPCClient_HeaderByNumber_Call struct { + *mock.Call +} + +// HeaderByNumber is a helper method to define mock.On call +// - ctx context.Context +// - n *big.Int +func (_e *RPCClient_Expecter) HeaderByNumber(ctx interface{}, n interface{}) *RPCClient_HeaderByNumber_Call { + return &RPCClient_HeaderByNumber_Call{Call: _e.mock.On("HeaderByNumber", ctx, n)} +} + +func (_c *RPCClient_HeaderByNumber_Call) Run(run func(ctx context.Context, n *big.Int)) *RPCClient_HeaderByNumber_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*big.Int)) + }) + return _c +} + +func (_c *RPCClient_HeaderByNumber_Call) Return(head *coretypes.Header, err error) *RPCClient_HeaderByNumber_Call { + _c.Call.Return(head, err) + return _c +} + +func (_c *RPCClient_HeaderByNumber_Call) RunAndReturn(run func(context.Context, *big.Int) (*coretypes.Header, error)) *RPCClient_HeaderByNumber_Call { + _c.Call.Return(run) + return _c +} + // IsSyncing provides a mock function with given fields: ctx func (_m *RPCClient) IsSyncing(ctx context.Context) (bool, error) { ret := _m.Called(ctx) @@ -530,6 +1149,34 @@ func (_m *RPCClient) IsSyncing(ctx context.Context) (bool, error) { return r0, r1 } +// RPCClient_IsSyncing_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsSyncing' +type RPCClient_IsSyncing_Call struct { + *mock.Call +} + +// IsSyncing is a helper method to define mock.On call +// - ctx context.Context +func (_e *RPCClient_Expecter) IsSyncing(ctx interface{}) *RPCClient_IsSyncing_Call { + return &RPCClient_IsSyncing_Call{Call: _e.mock.On("IsSyncing", ctx)} +} + +func (_c *RPCClient_IsSyncing_Call) Run(run func(ctx context.Context)) *RPCClient_IsSyncing_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *RPCClient_IsSyncing_Call) Return(_a0 bool, _a1 error) *RPCClient_IsSyncing_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RPCClient_IsSyncing_Call) RunAndReturn(run func(context.Context) (bool, error)) *RPCClient_IsSyncing_Call { + _c.Call.Return(run) + return _c +} + // LINKBalance provides a mock function with given fields: ctx, accountAddress, linkAddress func (_m *RPCClient) LINKBalance(ctx context.Context, accountAddress common.Address, linkAddress common.Address) (*assets.Link, error) { ret := _m.Called(ctx, accountAddress, linkAddress) @@ -560,6 +1207,36 @@ func (_m *RPCClient) LINKBalance(ctx context.Context, accountAddress common.Addr return r0, r1 } +// RPCClient_LINKBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LINKBalance' +type RPCClient_LINKBalance_Call struct { + *mock.Call +} + +// LINKBalance is a helper method to define mock.On call +// - ctx context.Context +// - accountAddress common.Address +// - linkAddress common.Address +func (_e *RPCClient_Expecter) LINKBalance(ctx interface{}, accountAddress interface{}, linkAddress interface{}) *RPCClient_LINKBalance_Call { + return &RPCClient_LINKBalance_Call{Call: _e.mock.On("LINKBalance", ctx, accountAddress, linkAddress)} +} + +func (_c *RPCClient_LINKBalance_Call) Run(run func(ctx context.Context, accountAddress common.Address, linkAddress common.Address)) *RPCClient_LINKBalance_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(common.Address)) + }) + return _c +} + +func (_c *RPCClient_LINKBalance_Call) Return(_a0 *assets.Link, _a1 error) *RPCClient_LINKBalance_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RPCClient_LINKBalance_Call) RunAndReturn(run func(context.Context, common.Address, common.Address) (*assets.Link, error)) *RPCClient_LINKBalance_Call { + _c.Call.Return(run) + return _c +} + // LatestBlockHeight provides a mock function with given fields: _a0 func (_m *RPCClient) LatestBlockHeight(_a0 context.Context) (*big.Int, error) { ret := _m.Called(_a0) @@ -590,6 +1267,34 @@ func (_m *RPCClient) LatestBlockHeight(_a0 context.Context) (*big.Int, error) { return r0, r1 } +// RPCClient_LatestBlockHeight_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LatestBlockHeight' +type RPCClient_LatestBlockHeight_Call struct { + *mock.Call +} + +// LatestBlockHeight is a helper method to define mock.On call +// - _a0 context.Context +func (_e *RPCClient_Expecter) LatestBlockHeight(_a0 interface{}) *RPCClient_LatestBlockHeight_Call { + return &RPCClient_LatestBlockHeight_Call{Call: _e.mock.On("LatestBlockHeight", _a0)} +} + +func (_c *RPCClient_LatestBlockHeight_Call) Run(run func(_a0 context.Context)) *RPCClient_LatestBlockHeight_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *RPCClient_LatestBlockHeight_Call) Return(_a0 *big.Int, _a1 error) *RPCClient_LatestBlockHeight_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RPCClient_LatestBlockHeight_Call) RunAndReturn(run func(context.Context) (*big.Int, error)) *RPCClient_LatestBlockHeight_Call { + _c.Call.Return(run) + return _c +} + // LatestFinalizedBlock provides a mock function with given fields: ctx func (_m *RPCClient) LatestFinalizedBlock(ctx context.Context) (*types.Head, error) { ret := _m.Called(ctx) @@ -620,6 +1325,34 @@ func (_m *RPCClient) LatestFinalizedBlock(ctx context.Context) (*types.Head, err return r0, r1 } +// RPCClient_LatestFinalizedBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LatestFinalizedBlock' +type RPCClient_LatestFinalizedBlock_Call struct { + *mock.Call +} + +// LatestFinalizedBlock is a helper method to define mock.On call +// - ctx context.Context +func (_e *RPCClient_Expecter) LatestFinalizedBlock(ctx interface{}) *RPCClient_LatestFinalizedBlock_Call { + return &RPCClient_LatestFinalizedBlock_Call{Call: _e.mock.On("LatestFinalizedBlock", ctx)} +} + +func (_c *RPCClient_LatestFinalizedBlock_Call) Run(run func(ctx context.Context)) *RPCClient_LatestFinalizedBlock_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *RPCClient_LatestFinalizedBlock_Call) Return(_a0 *types.Head, _a1 error) *RPCClient_LatestFinalizedBlock_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RPCClient_LatestFinalizedBlock_Call) RunAndReturn(run func(context.Context) (*types.Head, error)) *RPCClient_LatestFinalizedBlock_Call { + _c.Call.Return(run) + return _c +} + // 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) @@ -650,6 +1383,35 @@ func (_m *RPCClient) PendingCallContract(ctx context.Context, msg interface{}) ( return r0, r1 } +// RPCClient_PendingCallContract_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PendingCallContract' +type RPCClient_PendingCallContract_Call struct { + *mock.Call +} + +// PendingCallContract is a helper method to define mock.On call +// - ctx context.Context +// - msg interface{} +func (_e *RPCClient_Expecter) PendingCallContract(ctx interface{}, msg interface{}) *RPCClient_PendingCallContract_Call { + return &RPCClient_PendingCallContract_Call{Call: _e.mock.On("PendingCallContract", ctx, msg)} +} + +func (_c *RPCClient_PendingCallContract_Call) Run(run func(ctx context.Context, msg interface{})) *RPCClient_PendingCallContract_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(interface{})) + }) + return _c +} + +func (_c *RPCClient_PendingCallContract_Call) Return(rpcErr []byte, extractErr error) *RPCClient_PendingCallContract_Call { + _c.Call.Return(rpcErr, extractErr) + return _c +} + +func (_c *RPCClient_PendingCallContract_Call) RunAndReturn(run func(context.Context, interface{}) ([]byte, error)) *RPCClient_PendingCallContract_Call { + _c.Call.Return(run) + return _c +} + // PendingCodeAt provides a mock function with given fields: ctx, account func (_m *RPCClient) PendingCodeAt(ctx context.Context, account common.Address) ([]byte, error) { ret := _m.Called(ctx, account) @@ -680,6 +1442,35 @@ func (_m *RPCClient) PendingCodeAt(ctx context.Context, account common.Address) return r0, r1 } +// RPCClient_PendingCodeAt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PendingCodeAt' +type RPCClient_PendingCodeAt_Call struct { + *mock.Call +} + +// PendingCodeAt is a helper method to define mock.On call +// - ctx context.Context +// - account common.Address +func (_e *RPCClient_Expecter) PendingCodeAt(ctx interface{}, account interface{}) *RPCClient_PendingCodeAt_Call { + return &RPCClient_PendingCodeAt_Call{Call: _e.mock.On("PendingCodeAt", ctx, account)} +} + +func (_c *RPCClient_PendingCodeAt_Call) Run(run func(ctx context.Context, account common.Address)) *RPCClient_PendingCodeAt_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address)) + }) + return _c +} + +func (_c *RPCClient_PendingCodeAt_Call) Return(b []byte, err error) *RPCClient_PendingCodeAt_Call { + _c.Call.Return(b, err) + return _c +} + +func (_c *RPCClient_PendingCodeAt_Call) RunAndReturn(run func(context.Context, common.Address) ([]byte, error)) *RPCClient_PendingCodeAt_Call { + _c.Call.Return(run) + return _c +} + // PendingSequenceAt provides a mock function with given fields: ctx, addr func (_m *RPCClient) PendingSequenceAt(ctx context.Context, addr common.Address) (types.Nonce, error) { ret := _m.Called(ctx, addr) @@ -708,6 +1499,35 @@ func (_m *RPCClient) PendingSequenceAt(ctx context.Context, addr common.Address) return r0, r1 } +// RPCClient_PendingSequenceAt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PendingSequenceAt' +type RPCClient_PendingSequenceAt_Call struct { + *mock.Call +} + +// PendingSequenceAt is a helper method to define mock.On call +// - ctx context.Context +// - addr common.Address +func (_e *RPCClient_Expecter) PendingSequenceAt(ctx interface{}, addr interface{}) *RPCClient_PendingSequenceAt_Call { + return &RPCClient_PendingSequenceAt_Call{Call: _e.mock.On("PendingSequenceAt", ctx, addr)} +} + +func (_c *RPCClient_PendingSequenceAt_Call) Run(run func(ctx context.Context, addr common.Address)) *RPCClient_PendingSequenceAt_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address)) + }) + return _c +} + +func (_c *RPCClient_PendingSequenceAt_Call) Return(_a0 types.Nonce, _a1 error) *RPCClient_PendingSequenceAt_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RPCClient_PendingSequenceAt_Call) RunAndReturn(run func(context.Context, common.Address) (types.Nonce, error)) *RPCClient_PendingSequenceAt_Call { + _c.Call.Return(run) + return _c +} + // SendEmptyTransaction provides a mock function with given fields: ctx, newTxAttempt, seq, gasLimit, fee, fromAddress func (_m *RPCClient) SendEmptyTransaction(ctx context.Context, newTxAttempt func(types.Nonce, uint32, *evmassets.Wei, common.Address) (interface{}, error), seq types.Nonce, gasLimit uint32, fee *evmassets.Wei, fromAddress common.Address) (string, error) { ret := _m.Called(ctx, newTxAttempt, seq, gasLimit, fee, fromAddress) @@ -736,6 +1556,39 @@ func (_m *RPCClient) SendEmptyTransaction(ctx context.Context, newTxAttempt func return r0, r1 } +// RPCClient_SendEmptyTransaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendEmptyTransaction' +type RPCClient_SendEmptyTransaction_Call struct { + *mock.Call +} + +// SendEmptyTransaction is a helper method to define mock.On call +// - ctx context.Context +// - newTxAttempt func(types.Nonce , uint32 , *evmassets.Wei , common.Address)(interface{} , error) +// - seq types.Nonce +// - gasLimit uint32 +// - fee *evmassets.Wei +// - fromAddress common.Address +func (_e *RPCClient_Expecter) SendEmptyTransaction(ctx interface{}, newTxAttempt interface{}, seq interface{}, gasLimit interface{}, fee interface{}, fromAddress interface{}) *RPCClient_SendEmptyTransaction_Call { + return &RPCClient_SendEmptyTransaction_Call{Call: _e.mock.On("SendEmptyTransaction", ctx, newTxAttempt, seq, gasLimit, fee, fromAddress)} +} + +func (_c *RPCClient_SendEmptyTransaction_Call) Run(run func(ctx context.Context, newTxAttempt func(types.Nonce, uint32, *evmassets.Wei, common.Address) (interface{}, error), seq types.Nonce, gasLimit uint32, fee *evmassets.Wei, fromAddress common.Address)) *RPCClient_SendEmptyTransaction_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(func(types.Nonce, uint32, *evmassets.Wei, common.Address) (interface{}, error)), args[2].(types.Nonce), args[3].(uint32), args[4].(*evmassets.Wei), args[5].(common.Address)) + }) + return _c +} + +func (_c *RPCClient_SendEmptyTransaction_Call) Return(txhash string, err error) *RPCClient_SendEmptyTransaction_Call { + _c.Call.Return(txhash, err) + return _c +} + +func (_c *RPCClient_SendEmptyTransaction_Call) RunAndReturn(run func(context.Context, func(types.Nonce, uint32, *evmassets.Wei, common.Address) (interface{}, error), types.Nonce, uint32, *evmassets.Wei, common.Address) (string, error)) *RPCClient_SendEmptyTransaction_Call { + _c.Call.Return(run) + return _c +} + // SendTransaction provides a mock function with given fields: ctx, tx func (_m *RPCClient) SendTransaction(ctx context.Context, tx *coretypes.Transaction) error { ret := _m.Called(ctx, tx) @@ -754,6 +1607,35 @@ func (_m *RPCClient) SendTransaction(ctx context.Context, tx *coretypes.Transact return r0 } +// RPCClient_SendTransaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendTransaction' +type RPCClient_SendTransaction_Call struct { + *mock.Call +} + +// SendTransaction is a helper method to define mock.On call +// - ctx context.Context +// - tx *coretypes.Transaction +func (_e *RPCClient_Expecter) SendTransaction(ctx interface{}, tx interface{}) *RPCClient_SendTransaction_Call { + return &RPCClient_SendTransaction_Call{Call: _e.mock.On("SendTransaction", ctx, tx)} +} + +func (_c *RPCClient_SendTransaction_Call) Run(run func(ctx context.Context, tx *coretypes.Transaction)) *RPCClient_SendTransaction_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*coretypes.Transaction)) + }) + return _c +} + +func (_c *RPCClient_SendTransaction_Call) Return(_a0 error) *RPCClient_SendTransaction_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *RPCClient_SendTransaction_Call) RunAndReturn(run func(context.Context, *coretypes.Transaction) error) *RPCClient_SendTransaction_Call { + _c.Call.Return(run) + return _c +} + // SequenceAt provides a mock function with given fields: ctx, accountAddress, blockNumber func (_m *RPCClient) SequenceAt(ctx context.Context, accountAddress common.Address, blockNumber *big.Int) (types.Nonce, error) { ret := _m.Called(ctx, accountAddress, blockNumber) @@ -782,11 +1664,69 @@ func (_m *RPCClient) SequenceAt(ctx context.Context, accountAddress common.Addre return r0, r1 } +// RPCClient_SequenceAt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SequenceAt' +type RPCClient_SequenceAt_Call struct { + *mock.Call +} + +// SequenceAt is a helper method to define mock.On call +// - ctx context.Context +// - accountAddress common.Address +// - blockNumber *big.Int +func (_e *RPCClient_Expecter) SequenceAt(ctx interface{}, accountAddress interface{}, blockNumber interface{}) *RPCClient_SequenceAt_Call { + return &RPCClient_SequenceAt_Call{Call: _e.mock.On("SequenceAt", ctx, accountAddress, blockNumber)} +} + +func (_c *RPCClient_SequenceAt_Call) Run(run func(ctx context.Context, accountAddress common.Address, blockNumber *big.Int)) *RPCClient_SequenceAt_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(*big.Int)) + }) + return _c +} + +func (_c *RPCClient_SequenceAt_Call) Return(_a0 types.Nonce, _a1 error) *RPCClient_SequenceAt_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RPCClient_SequenceAt_Call) RunAndReturn(run func(context.Context, common.Address, *big.Int) (types.Nonce, error)) *RPCClient_SequenceAt_Call { + _c.Call.Return(run) + return _c +} + // SetAliveLoopSub provides a mock function with given fields: _a0 func (_m *RPCClient) SetAliveLoopSub(_a0 commontypes.Subscription) { _m.Called(_a0) } +// RPCClient_SetAliveLoopSub_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetAliveLoopSub' +type RPCClient_SetAliveLoopSub_Call struct { + *mock.Call +} + +// SetAliveLoopSub is a helper method to define mock.On call +// - _a0 commontypes.Subscription +func (_e *RPCClient_Expecter) SetAliveLoopSub(_a0 interface{}) *RPCClient_SetAliveLoopSub_Call { + return &RPCClient_SetAliveLoopSub_Call{Call: _e.mock.On("SetAliveLoopSub", _a0)} +} + +func (_c *RPCClient_SetAliveLoopSub_Call) Run(run func(_a0 commontypes.Subscription)) *RPCClient_SetAliveLoopSub_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(commontypes.Subscription)) + }) + return _c +} + +func (_c *RPCClient_SetAliveLoopSub_Call) Return() *RPCClient_SetAliveLoopSub_Call { + _c.Call.Return() + return _c +} + +func (_c *RPCClient_SetAliveLoopSub_Call) RunAndReturn(run func(commontypes.Subscription)) *RPCClient_SetAliveLoopSub_Call { + _c.Call.Return(run) + return _c +} + // SimulateTransaction provides a mock function with given fields: ctx, tx func (_m *RPCClient) SimulateTransaction(ctx context.Context, tx *coretypes.Transaction) error { ret := _m.Called(ctx, tx) @@ -805,37 +1745,33 @@ func (_m *RPCClient) SimulateTransaction(ctx context.Context, tx *coretypes.Tran return r0 } -// Subscribe provides a mock function with given fields: ctx, channel, args -func (_m *RPCClient) Subscribe(ctx context.Context, channel chan<- *types.Head, args ...interface{}) (commontypes.Subscription, error) { - var _ca []interface{} - _ca = append(_ca, ctx, channel) - _ca = append(_ca, args...) - ret := _m.Called(_ca...) +// RPCClient_SimulateTransaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SimulateTransaction' +type RPCClient_SimulateTransaction_Call struct { + *mock.Call +} - if len(ret) == 0 { - panic("no return value specified for Subscribe") - } +// SimulateTransaction is a helper method to define mock.On call +// - ctx context.Context +// - tx *coretypes.Transaction +func (_e *RPCClient_Expecter) SimulateTransaction(ctx interface{}, tx interface{}) *RPCClient_SimulateTransaction_Call { + return &RPCClient_SimulateTransaction_Call{Call: _e.mock.On("SimulateTransaction", ctx, tx)} +} - var r0 commontypes.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, chan<- *types.Head, ...interface{}) (commontypes.Subscription, error)); ok { - return rf(ctx, channel, args...) - } - if rf, ok := ret.Get(0).(func(context.Context, chan<- *types.Head, ...interface{}) commontypes.Subscription); ok { - r0 = rf(ctx, channel, args...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(commontypes.Subscription) - } - } +func (_c *RPCClient_SimulateTransaction_Call) Run(run func(ctx context.Context, tx *coretypes.Transaction)) *RPCClient_SimulateTransaction_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*coretypes.Transaction)) + }) + return _c +} - if rf, ok := ret.Get(1).(func(context.Context, chan<- *types.Head, ...interface{}) error); ok { - r1 = rf(ctx, channel, args...) - } else { - r1 = ret.Error(1) - } +func (_c *RPCClient_SimulateTransaction_Call) Return(_a0 error) *RPCClient_SimulateTransaction_Call { + _c.Call.Return(_a0) + return _c +} - return r0, r1 +func (_c *RPCClient_SimulateTransaction_Call) RunAndReturn(run func(context.Context, *coretypes.Transaction) error) *RPCClient_SimulateTransaction_Call { + _c.Call.Return(run) + return _c } // SubscribeFilterLogs provides a mock function with given fields: ctx, q, ch @@ -868,6 +1804,95 @@ func (_m *RPCClient) SubscribeFilterLogs(ctx context.Context, q ethereum.FilterQ return r0, r1 } +// RPCClient_SubscribeFilterLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SubscribeFilterLogs' +type RPCClient_SubscribeFilterLogs_Call struct { + *mock.Call +} + +// SubscribeFilterLogs is a helper method to define mock.On call +// - ctx context.Context +// - q ethereum.FilterQuery +// - ch chan<- coretypes.Log +func (_e *RPCClient_Expecter) SubscribeFilterLogs(ctx interface{}, q interface{}, ch interface{}) *RPCClient_SubscribeFilterLogs_Call { + return &RPCClient_SubscribeFilterLogs_Call{Call: _e.mock.On("SubscribeFilterLogs", ctx, q, ch)} +} + +func (_c *RPCClient_SubscribeFilterLogs_Call) Run(run func(ctx context.Context, q ethereum.FilterQuery, ch chan<- coretypes.Log)) *RPCClient_SubscribeFilterLogs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ethereum.FilterQuery), args[2].(chan<- coretypes.Log)) + }) + return _c +} + +func (_c *RPCClient_SubscribeFilterLogs_Call) Return(s ethereum.Subscription, err error) *RPCClient_SubscribeFilterLogs_Call { + _c.Call.Return(s, err) + return _c +} + +func (_c *RPCClient_SubscribeFilterLogs_Call) RunAndReturn(run func(context.Context, ethereum.FilterQuery, chan<- coretypes.Log) (ethereum.Subscription, error)) *RPCClient_SubscribeFilterLogs_Call { + _c.Call.Return(run) + return _c +} + +// SubscribeNewHead provides a mock function with given fields: ctx, channel +func (_m *RPCClient) SubscribeNewHead(ctx context.Context, channel chan<- *types.Head) (commontypes.Subscription, error) { + ret := _m.Called(ctx, channel) + + if len(ret) == 0 { + panic("no return value specified for SubscribeNewHead") + } + + var r0 commontypes.Subscription + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, chan<- *types.Head) (commontypes.Subscription, error)); ok { + return rf(ctx, channel) + } + if rf, ok := ret.Get(0).(func(context.Context, chan<- *types.Head) commontypes.Subscription); ok { + r0 = rf(ctx, channel) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(commontypes.Subscription) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, chan<- *types.Head) error); ok { + r1 = rf(ctx, channel) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RPCClient_SubscribeNewHead_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SubscribeNewHead' +type RPCClient_SubscribeNewHead_Call struct { + *mock.Call +} + +// SubscribeNewHead is a helper method to define mock.On call +// - ctx context.Context +// - channel chan<- *types.Head +func (_e *RPCClient_Expecter) SubscribeNewHead(ctx interface{}, channel interface{}) *RPCClient_SubscribeNewHead_Call { + return &RPCClient_SubscribeNewHead_Call{Call: _e.mock.On("SubscribeNewHead", ctx, channel)} +} + +func (_c *RPCClient_SubscribeNewHead_Call) Run(run func(ctx context.Context, channel chan<- *types.Head)) *RPCClient_SubscribeNewHead_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(chan<- *types.Head)) + }) + return _c +} + +func (_c *RPCClient_SubscribeNewHead_Call) Return(_a0 commontypes.Subscription, _a1 error) *RPCClient_SubscribeNewHead_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RPCClient_SubscribeNewHead_Call) RunAndReturn(run func(context.Context, chan<- *types.Head) (commontypes.Subscription, error)) *RPCClient_SubscribeNewHead_Call { + _c.Call.Return(run) + return _c +} + // SubscribersCount provides a mock function with given fields: func (_m *RPCClient) SubscribersCount() int32 { ret := _m.Called() @@ -886,6 +1911,33 @@ func (_m *RPCClient) SubscribersCount() int32 { return r0 } +// RPCClient_SubscribersCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SubscribersCount' +type RPCClient_SubscribersCount_Call struct { + *mock.Call +} + +// SubscribersCount is a helper method to define mock.On call +func (_e *RPCClient_Expecter) SubscribersCount() *RPCClient_SubscribersCount_Call { + return &RPCClient_SubscribersCount_Call{Call: _e.mock.On("SubscribersCount")} +} + +func (_c *RPCClient_SubscribersCount_Call) Run(run func()) *RPCClient_SubscribersCount_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *RPCClient_SubscribersCount_Call) Return(_a0 int32) *RPCClient_SubscribersCount_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *RPCClient_SubscribersCount_Call) RunAndReturn(run func() int32) *RPCClient_SubscribersCount_Call { + _c.Call.Return(run) + return _c +} + // SuggestGasPrice provides a mock function with given fields: ctx func (_m *RPCClient) SuggestGasPrice(ctx context.Context) (*big.Int, error) { ret := _m.Called(ctx) @@ -916,6 +1968,34 @@ func (_m *RPCClient) SuggestGasPrice(ctx context.Context) (*big.Int, error) { return r0, r1 } +// RPCClient_SuggestGasPrice_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuggestGasPrice' +type RPCClient_SuggestGasPrice_Call struct { + *mock.Call +} + +// SuggestGasPrice is a helper method to define mock.On call +// - ctx context.Context +func (_e *RPCClient_Expecter) SuggestGasPrice(ctx interface{}) *RPCClient_SuggestGasPrice_Call { + return &RPCClient_SuggestGasPrice_Call{Call: _e.mock.On("SuggestGasPrice", ctx)} +} + +func (_c *RPCClient_SuggestGasPrice_Call) Run(run func(ctx context.Context)) *RPCClient_SuggestGasPrice_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *RPCClient_SuggestGasPrice_Call) Return(p *big.Int, err error) *RPCClient_SuggestGasPrice_Call { + _c.Call.Return(p, err) + return _c +} + +func (_c *RPCClient_SuggestGasPrice_Call) RunAndReturn(run func(context.Context) (*big.Int, error)) *RPCClient_SuggestGasPrice_Call { + _c.Call.Return(run) + return _c +} + // SuggestGasTipCap provides a mock function with given fields: ctx func (_m *RPCClient) SuggestGasTipCap(ctx context.Context) (*big.Int, error) { ret := _m.Called(ctx) @@ -946,6 +2026,34 @@ func (_m *RPCClient) SuggestGasTipCap(ctx context.Context) (*big.Int, error) { return r0, r1 } +// RPCClient_SuggestGasTipCap_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SuggestGasTipCap' +type RPCClient_SuggestGasTipCap_Call struct { + *mock.Call +} + +// SuggestGasTipCap is a helper method to define mock.On call +// - ctx context.Context +func (_e *RPCClient_Expecter) SuggestGasTipCap(ctx interface{}) *RPCClient_SuggestGasTipCap_Call { + return &RPCClient_SuggestGasTipCap_Call{Call: _e.mock.On("SuggestGasTipCap", ctx)} +} + +func (_c *RPCClient_SuggestGasTipCap_Call) Run(run func(ctx context.Context)) *RPCClient_SuggestGasTipCap_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *RPCClient_SuggestGasTipCap_Call) Return(t *big.Int, err error) *RPCClient_SuggestGasTipCap_Call { + _c.Call.Return(t, err) + return _c +} + +func (_c *RPCClient_SuggestGasTipCap_Call) RunAndReturn(run func(context.Context) (*big.Int, error)) *RPCClient_SuggestGasTipCap_Call { + _c.Call.Return(run) + return _c +} + // TokenBalance provides a mock function with given fields: ctx, accountAddress, tokenAddress func (_m *RPCClient) TokenBalance(ctx context.Context, accountAddress common.Address, tokenAddress common.Address) (*big.Int, error) { ret := _m.Called(ctx, accountAddress, tokenAddress) @@ -976,6 +2084,36 @@ func (_m *RPCClient) TokenBalance(ctx context.Context, accountAddress common.Add return r0, r1 } +// RPCClient_TokenBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TokenBalance' +type RPCClient_TokenBalance_Call struct { + *mock.Call +} + +// TokenBalance is a helper method to define mock.On call +// - ctx context.Context +// - accountAddress common.Address +// - tokenAddress common.Address +func (_e *RPCClient_Expecter) TokenBalance(ctx interface{}, accountAddress interface{}, tokenAddress interface{}) *RPCClient_TokenBalance_Call { + return &RPCClient_TokenBalance_Call{Call: _e.mock.On("TokenBalance", ctx, accountAddress, tokenAddress)} +} + +func (_c *RPCClient_TokenBalance_Call) Run(run func(ctx context.Context, accountAddress common.Address, tokenAddress common.Address)) *RPCClient_TokenBalance_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(common.Address)) + }) + return _c +} + +func (_c *RPCClient_TokenBalance_Call) Return(_a0 *big.Int, _a1 error) *RPCClient_TokenBalance_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RPCClient_TokenBalance_Call) RunAndReturn(run func(context.Context, common.Address, common.Address) (*big.Int, error)) *RPCClient_TokenBalance_Call { + _c.Call.Return(run) + return _c +} + // TransactionByHash provides a mock function with given fields: ctx, txHash func (_m *RPCClient) TransactionByHash(ctx context.Context, txHash common.Hash) (*coretypes.Transaction, error) { ret := _m.Called(ctx, txHash) @@ -1006,6 +2144,35 @@ func (_m *RPCClient) TransactionByHash(ctx context.Context, txHash common.Hash) return r0, r1 } +// RPCClient_TransactionByHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransactionByHash' +type RPCClient_TransactionByHash_Call struct { + *mock.Call +} + +// TransactionByHash is a helper method to define mock.On call +// - ctx context.Context +// - txHash common.Hash +func (_e *RPCClient_Expecter) TransactionByHash(ctx interface{}, txHash interface{}) *RPCClient_TransactionByHash_Call { + return &RPCClient_TransactionByHash_Call{Call: _e.mock.On("TransactionByHash", ctx, txHash)} +} + +func (_c *RPCClient_TransactionByHash_Call) Run(run func(ctx context.Context, txHash common.Hash)) *RPCClient_TransactionByHash_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Hash)) + }) + return _c +} + +func (_c *RPCClient_TransactionByHash_Call) Return(_a0 *coretypes.Transaction, _a1 error) *RPCClient_TransactionByHash_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RPCClient_TransactionByHash_Call) RunAndReturn(run func(context.Context, common.Hash) (*coretypes.Transaction, error)) *RPCClient_TransactionByHash_Call { + _c.Call.Return(run) + return _c +} + // TransactionReceipt provides a mock function with given fields: ctx, txHash func (_m *RPCClient) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error) { ret := _m.Called(ctx, txHash) @@ -1036,6 +2203,35 @@ func (_m *RPCClient) TransactionReceipt(ctx context.Context, txHash common.Hash) return r0, r1 } +// RPCClient_TransactionReceipt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransactionReceipt' +type RPCClient_TransactionReceipt_Call struct { + *mock.Call +} + +// TransactionReceipt is a helper method to define mock.On call +// - ctx context.Context +// - txHash common.Hash +func (_e *RPCClient_Expecter) TransactionReceipt(ctx interface{}, txHash interface{}) *RPCClient_TransactionReceipt_Call { + return &RPCClient_TransactionReceipt_Call{Call: _e.mock.On("TransactionReceipt", ctx, txHash)} +} + +func (_c *RPCClient_TransactionReceipt_Call) Run(run func(ctx context.Context, txHash common.Hash)) *RPCClient_TransactionReceipt_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Hash)) + }) + return _c +} + +func (_c *RPCClient_TransactionReceipt_Call) Return(_a0 *types.Receipt, _a1 error) *RPCClient_TransactionReceipt_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *RPCClient_TransactionReceipt_Call) RunAndReturn(run func(context.Context, common.Hash) (*types.Receipt, error)) *RPCClient_TransactionReceipt_Call { + _c.Call.Return(run) + return _c +} + // TransactionReceiptGeth provides a mock function with given fields: ctx, txHash func (_m *RPCClient) TransactionReceiptGeth(ctx context.Context, txHash common.Hash) (*coretypes.Receipt, error) { ret := _m.Called(ctx, txHash) @@ -1066,11 +2262,67 @@ func (_m *RPCClient) TransactionReceiptGeth(ctx context.Context, txHash common.H return r0, r1 } +// RPCClient_TransactionReceiptGeth_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransactionReceiptGeth' +type RPCClient_TransactionReceiptGeth_Call struct { + *mock.Call +} + +// TransactionReceiptGeth is a helper method to define mock.On call +// - ctx context.Context +// - txHash common.Hash +func (_e *RPCClient_Expecter) TransactionReceiptGeth(ctx interface{}, txHash interface{}) *RPCClient_TransactionReceiptGeth_Call { + return &RPCClient_TransactionReceiptGeth_Call{Call: _e.mock.On("TransactionReceiptGeth", ctx, txHash)} +} + +func (_c *RPCClient_TransactionReceiptGeth_Call) Run(run func(ctx context.Context, txHash common.Hash)) *RPCClient_TransactionReceiptGeth_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Hash)) + }) + return _c +} + +func (_c *RPCClient_TransactionReceiptGeth_Call) Return(r *coretypes.Receipt, err error) *RPCClient_TransactionReceiptGeth_Call { + _c.Call.Return(r, err) + return _c +} + +func (_c *RPCClient_TransactionReceiptGeth_Call) RunAndReturn(run func(context.Context, common.Hash) (*coretypes.Receipt, error)) *RPCClient_TransactionReceiptGeth_Call { + _c.Call.Return(run) + return _c +} + // UnsubscribeAllExceptAliveLoop provides a mock function with given fields: func (_m *RPCClient) UnsubscribeAllExceptAliveLoop() { _m.Called() } +// RPCClient_UnsubscribeAllExceptAliveLoop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnsubscribeAllExceptAliveLoop' +type RPCClient_UnsubscribeAllExceptAliveLoop_Call struct { + *mock.Call +} + +// UnsubscribeAllExceptAliveLoop is a helper method to define mock.On call +func (_e *RPCClient_Expecter) UnsubscribeAllExceptAliveLoop() *RPCClient_UnsubscribeAllExceptAliveLoop_Call { + return &RPCClient_UnsubscribeAllExceptAliveLoop_Call{Call: _e.mock.On("UnsubscribeAllExceptAliveLoop")} +} + +func (_c *RPCClient_UnsubscribeAllExceptAliveLoop_Call) Run(run func()) *RPCClient_UnsubscribeAllExceptAliveLoop_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *RPCClient_UnsubscribeAllExceptAliveLoop_Call) Return() *RPCClient_UnsubscribeAllExceptAliveLoop_Call { + _c.Call.Return() + return _c +} + +func (_c *RPCClient_UnsubscribeAllExceptAliveLoop_Call) RunAndReturn(run func()) *RPCClient_UnsubscribeAllExceptAliveLoop_Call { + _c.Call.Return(run) + return _c +} + // NewRPCClient creates a new instance of RPCClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewRPCClient(t interface { diff --git a/core/chains/evm/client/mocks/tx_sender.go b/core/chains/evm/client/mocks/tx_sender.go deleted file mode 100644 index 6c44544508b..00000000000 --- a/core/chains/evm/client/mocks/tx_sender.go +++ /dev/null @@ -1,80 +0,0 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package mocks - -import ( - big "math/big" - - context "context" - - mock "github.com/stretchr/testify/mock" - - types "github.com/ethereum/go-ethereum/core/types" -) - -// TxSender is an autogenerated mock type for the TxSender type -type TxSender struct { - mock.Mock -} - -// ChainID provides a mock function with given fields: _a0 -func (_m *TxSender) ChainID(_a0 context.Context) (*big.Int, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for ChainID") - } - - var r0 *big.Int - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*big.Int, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(context.Context) *big.Int); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*big.Int) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SendTransaction provides a mock function with given fields: ctx, tx -func (_m *TxSender) SendTransaction(ctx context.Context, tx *types.Transaction) error { - ret := _m.Called(ctx, tx) - - if len(ret) == 0 { - panic("no return value specified for SendTransaction") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, *types.Transaction) error); ok { - r0 = rf(ctx, tx) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// NewTxSender creates a new instance of TxSender. 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 NewTxSender(t interface { - mock.TestingT - Cleanup(func()) -}) *TxSender { - mock := &TxSender{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/chains/evm/client/rpc_client.go b/core/chains/evm/client/rpc_client.go index 5b64900a0cb..9ab5fd135b4 100644 --- a/core/chains/evm/client/rpc_client.go +++ b/core/chains/evm/client/rpc_client.go @@ -75,8 +75,6 @@ var ( ) // RPCClient includes all the necessary generalized RPC methods along with any additional chain-specific methods. -// -//go:generate mockery --quiet --name RPCClient --output ./mocks --case=underscore type RPCClient interface { commonclient.RPC[ *big.Int, @@ -101,6 +99,7 @@ type RPCClient interface { SuggestGasPrice(ctx context.Context) (p *big.Int, err error) SuggestGasTipCap(ctx context.Context) (t *big.Int, err error) TransactionReceiptGeth(ctx context.Context, txHash common.Hash) (r *types.Receipt, err error) + GetInterceptedChainInfo() (latest, highestUserObservations commonclient.ChainInfo) } type rawclient struct { @@ -132,6 +131,11 @@ type rpcClient struct { // this rpcClient. Closing and replacing should be serialized through // stateMu since it can happen on state transitions as well as rpcClient Close. chStopInFlight chan struct{} + + // intercepted values seen by callers of the rpcClient excluding health check calls. Need to ensure MultiNode provides repeatable read guarantee + highestUserObservations commonclient.ChainInfo + // most recent chain info observed during current lifecycle (reseted on DisconnectAll) + latestChainInfo commonclient.ChainInfo } // NewRPCCLient returns a new *rpcClient as commonclient.RPC @@ -289,21 +293,32 @@ func (r *rpcClient) getRPCDomain() string { } // registerSub adds the sub to the rpcClient list -func (r *rpcClient) registerSub(sub ethereum.Subscription) { +func (r *rpcClient) registerSub(sub ethereum.Subscription, stopInFLightCh chan struct{}) error { r.stateMu.Lock() defer r.stateMu.Unlock() + // ensure that the `sub` belongs to current life cycle of the `rpcClient` and it should not be killed due to + // previous `DisconnectAll` call. + select { + case <-stopInFLightCh: + sub.Unsubscribe() + return fmt.Errorf("failed to register subscription - all in-flight requests were canceled") + default: + } + // TODO: BCI-3358 - delete sub when caller unsubscribes. r.subs = append(r.subs, sub) + return nil } -// disconnectAll disconnects all clients connected to the rpcClient -// WARNING: NOT THREAD-SAFE -// This must be called from within the r.stateMu lock +// DisconnectAll disconnects all clients connected to the rpcClient func (r *rpcClient) DisconnectAll() { + r.stateMu.Lock() + defer r.stateMu.Unlock() if r.ws.rpc != nil { r.ws.rpc.Close() } r.cancelInflightRequests() r.unsubscribeAll() + r.latestChainInfo = commonclient.ChainInfo{} } // unsubscribeAll unsubscribes all subscriptions @@ -388,24 +403,35 @@ func (r *rpcClient) BatchCallContext(ctx context.Context, b []rpc.BatchElem) err return err } -func (r *rpcClient) Subscribe(ctx context.Context, channel chan<- *evmtypes.Head, args ...interface{}) (commontypes.Subscription, error) { - ctx, cancel, ws, _ := r.makeLiveQueryCtxAndSafeGetClients(ctx) +func (r *rpcClient) SubscribeNewHead(ctx context.Context, channel chan<- *evmtypes.Head) (_ commontypes.Subscription, err error) { + ctx, cancel, chStopInFlight, ws, _ := r.acquireQueryCtx(ctx) defer cancel() + args := []interface{}{"newHeads"} lggr := r.newRqLggr().With("args", args) lggr.Debug("RPC call: evmclient.Client#EthSubscribe") start := time.Now() - var sub commontypes.Subscription - sub, err := ws.rpc.EthSubscribe(ctx, channel, args...) - if err == nil { - sub = newSubscriptionErrorWrapper(sub, r.rpcClientErrorPrefix()) - r.registerSub(sub) + defer func() { + duration := time.Since(start) + r.logResult(lggr, err, duration, r.getRPCDomain(), "EthSubscribe") + err = r.wrapWS(err) + }() + subForwarder := newSubForwarder(channel, func(head *evmtypes.Head) *evmtypes.Head { + head.EVMChainID = ubig.New(r.chainID) + r.onNewHead(ctx, chStopInFlight, head) + return head + }, r.wrapRPCClientError) + err = subForwarder.start(ws.rpc.EthSubscribe(ctx, subForwarder.srcCh, args...)) + if err != nil { + return } - duration := time.Since(start) - r.logResult(lggr, err, duration, r.getRPCDomain(), "EthSubscribe") + err = r.registerSub(subForwarder, chStopInFlight) + if err != nil { + return + } - return sub, r.wrapWS(err) + return subForwarder, nil } // GethClient wrappers @@ -513,7 +539,7 @@ func (r *rpcClient) HeaderByHash(ctx context.Context, hash common.Hash) (header return } -func (r *rpcClient) LatestFinalizedBlock(ctx context.Context) (head *evmtypes.Head, err error) { +func (r *rpcClient) LatestFinalizedBlock(ctx context.Context) (*evmtypes.Head, error) { return r.blockByNumber(ctx, rpc.FinalizedBlockNumber.String()) } @@ -523,7 +549,25 @@ func (r *rpcClient) BlockByNumber(ctx context.Context, number *big.Int) (head *e } func (r *rpcClient) blockByNumber(ctx context.Context, number string) (head *evmtypes.Head, err error) { - err = r.CallContext(ctx, &head, "eth_getBlockByNumber", number, false) + ctx, cancel, chStopInFlight, ws, http := r.acquireQueryCtx(ctx) + defer cancel() + const method = "eth_getBlockByNumber" + args := []interface{}{number, false} + lggr := r.newRqLggr().With( + "method", method, + "args", args, + ) + + lggr.Debug("RPC call: evmclient.Client#CallContext") + start := time.Now() + if http != nil { + err = r.wrapHTTP(http.rpc.CallContext(ctx, &head, method, args...)) + } else { + err = r.wrapWS(ws.rpc.CallContext(ctx, &head, method, args...)) + } + duration := time.Since(start) + + r.logResult(lggr, err, duration, r.getRPCDomain(), "CallContext") if err != nil { return nil, err } @@ -532,6 +576,14 @@ func (r *rpcClient) blockByNumber(ctx context.Context, number string) (head *evm return } head.EVMChainID = ubig.New(r.chainID) + + switch number { + case rpc.FinalizedBlockNumber.String(): + r.onNewFinalizedHead(ctx, chStopInFlight, head) + case rpc.LatestBlockNumber.String(): + r.onNewHead(ctx, chStopInFlight, head) + } + return } @@ -958,24 +1010,30 @@ func (r *rpcClient) ClientVersion(ctx context.Context) (version string, err erro return } -func (r *rpcClient) SubscribeFilterLogs(ctx context.Context, q ethereum.FilterQuery, ch chan<- types.Log) (sub ethereum.Subscription, err error) { - ctx, cancel, ws, _ := r.makeLiveQueryCtxAndSafeGetClients(ctx) +func (r *rpcClient) SubscribeFilterLogs(ctx context.Context, q ethereum.FilterQuery, ch chan<- types.Log) (_ ethereum.Subscription, err error) { + ctx, cancel, chStopInFlight, ws, _ := r.acquireQueryCtx(ctx) defer cancel() lggr := r.newRqLggr().With("q", q) lggr.Debug("RPC call: evmclient.Client#SubscribeFilterLogs") start := time.Now() - sub, err = ws.geth.SubscribeFilterLogs(ctx, q, ch) - if err == nil { - sub = newSubscriptionErrorWrapper(sub, r.rpcClientErrorPrefix()) - r.registerSub(sub) + defer func() { + duration := time.Since(start) + r.logResult(lggr, err, duration, r.getRPCDomain(), "SubscribeFilterLogs") + err = r.wrapWS(err) + }() + sub := newSubForwarder(ch, nil, r.wrapRPCClientError) + err = sub.start(ws.geth.SubscribeFilterLogs(ctx, q, sub.srcCh)) + if err != nil { + return } - err = r.wrapWS(err) - duration := time.Since(start) - r.logResult(lggr, err, duration, r.getRPCDomain(), "SubscribeFilterLogs") + err = r.registerSub(sub, chStopInFlight) + if err != nil { + return + } - return + return sub, nil } func (r *rpcClient) SuggestGasTipCap(ctx context.Context) (tipCap *big.Int, err error) { @@ -1060,17 +1118,23 @@ func (r *rpcClient) wrapHTTP(err error) error { // makeLiveQueryCtxAndSafeGetClients wraps makeQueryCtx func (r *rpcClient) makeLiveQueryCtxAndSafeGetClients(parentCtx context.Context) (ctx context.Context, cancel context.CancelFunc, ws rawclient, http *rawclient) { + ctx, cancel, _, ws, http = r.acquireQueryCtx(parentCtx) + return +} + +func (r *rpcClient) acquireQueryCtx(parentCtx context.Context) (ctx context.Context, cancel context.CancelFunc, + chStopInFlight chan struct{}, ws rawclient, http *rawclient) { // Need to wrap in mutex because state transition can cancel and replace the // context r.stateMu.RLock() - cancelCh := r.chStopInFlight + chStopInFlight = r.chStopInFlight ws = r.ws if r.http != nil { cp := *r.http http = &cp } r.stateMu.RUnlock() - ctx, cancel = makeQueryCtx(parentCtx, cancelCh) + ctx, cancel = makeQueryCtx(parentCtx, chStopInFlight) return } @@ -1134,6 +1198,49 @@ func Name(r *rpcClient) string { return r.name } +func (r *rpcClient) onNewHead(ctx context.Context, requestCh <-chan struct{}, head *evmtypes.Head) { + if head == nil { + return + } + + r.stateMu.Lock() + defer r.stateMu.Unlock() + if !commonclient.CtxIsHeathCheckRequest(ctx) { + r.highestUserObservations.BlockNumber = max(r.highestUserObservations.BlockNumber, head.Number) + r.highestUserObservations.TotalDifficulty = commonclient.MaxTotalDifficulty(r.highestUserObservations.TotalDifficulty, head.TotalDifficulty) + } + select { + case <-requestCh: // no need to update latestChainInfo, as rpcClient already started new life cycle + return + default: + r.latestChainInfo.BlockNumber = head.Number + r.latestChainInfo.TotalDifficulty = head.TotalDifficulty + } +} + +func (r *rpcClient) onNewFinalizedHead(ctx context.Context, requestCh <-chan struct{}, head *evmtypes.Head) { + if head == nil { + return + } + r.stateMu.Lock() + defer r.stateMu.Unlock() + if !commonclient.CtxIsHeathCheckRequest(ctx) { + r.highestUserObservations.FinalizedBlockNumber = max(r.highestUserObservations.FinalizedBlockNumber, head.Number) + } + select { + case <-requestCh: // no need to update latestChainInfo, as rpcClient already started new life cycle + return + default: + r.latestChainInfo.FinalizedBlockNumber = head.Number + } +} + +func (r *rpcClient) GetInterceptedChainInfo() (latest, highestUserObservations commonclient.ChainInfo) { + r.stateMu.RLock() + defer r.stateMu.RUnlock() + return r.latestChainInfo, r.highestUserObservations +} + func ToBlockNumArg(number *big.Int) string { if number == nil { return "latest" diff --git a/core/chains/evm/client/rpc_client_test.go b/core/chains/evm/client/rpc_client_test.go new file mode 100644 index 00000000000..682c4352457 --- /dev/null +++ b/core/chains/evm/client/rpc_client_test.go @@ -0,0 +1,300 @@ +package client_test + +import ( + "context" + "encoding/json" + "fmt" + "math/big" + "net/url" + "testing" + + "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/core/types" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/tidwall/gjson" + "go.uber.org/zap" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" + + "github.com/smartcontractkit/chainlink-common/pkg/logger" + + commonclient "github.com/smartcontractkit/chainlink/v2/common/client" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/testutils" + evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" +) + +func makeNewHeadWSMessage(head *evmtypes.Head) string { + asJSON, err := json.Marshal(head) + if err != nil { + panic(fmt.Errorf("failed to marshal head: %w", err)) + } + return fmt.Sprintf(`{"jsonrpc":"2.0","method":"eth_subscription","params":{"subscription":"0x00","result":%s}}`, string(asJSON)) +} + +func TestRPCClient_SubscribeNewHead(t *testing.T) { + t.Parallel() + ctx, cancel := context.WithTimeout(tests.Context(t), tests.WaitTimeout(t)) + defer cancel() + + chainId := big.NewInt(123456) + lggr := logger.Test(t) + + serverCallBack := func(method string, params gjson.Result) (resp testutils.JSONRPCResponse) { + if method == "eth_unsubscribe" { + resp.Result = "true" + return + } + assert.Equal(t, "eth_subscribe", method) + if assert.True(t, params.IsArray()) && assert.Equal(t, "newHeads", params.Array()[0].String()) { + resp.Result = `"0x00"` + } + return + } + t.Run("Updates chain info on new blocks", func(t *testing.T) { + server := testutils.NewWSServer(t, chainId, serverCallBack) + wsURL := server.WSURL() + + rpc := client.NewRPCClient(lggr, *wsURL, nil, "rpc", 1, chainId, commonclient.Primary) + defer rpc.Close() + require.NoError(t, rpc.Dial(ctx)) + // set to default values + latest, highestUserObservations := rpc.GetInterceptedChainInfo() + assert.Equal(t, int64(0), latest.BlockNumber) + assert.Equal(t, int64(0), latest.FinalizedBlockNumber) + assert.Nil(t, latest.TotalDifficulty) + assert.Equal(t, int64(0), highestUserObservations.BlockNumber) + assert.Equal(t, int64(0), highestUserObservations.FinalizedBlockNumber) + assert.Nil(t, highestUserObservations.TotalDifficulty) + + ch := make(chan *evmtypes.Head) + sub, err := rpc.SubscribeNewHead(tests.Context(t), ch) + require.NoError(t, err) + defer sub.Unsubscribe() + go server.MustWriteBinaryMessageSync(t, makeNewHeadWSMessage(&evmtypes.Head{Number: 256, TotalDifficulty: big.NewInt(1000)})) + // received 256 head + <-ch + go server.MustWriteBinaryMessageSync(t, makeNewHeadWSMessage(&evmtypes.Head{Number: 128, TotalDifficulty: big.NewInt(500)})) + // received 128 head + <-ch + + latest, highestUserObservations = rpc.GetInterceptedChainInfo() + assert.Equal(t, int64(128), latest.BlockNumber) + assert.Equal(t, int64(0), latest.FinalizedBlockNumber) + assert.Equal(t, big.NewInt(500), latest.TotalDifficulty) + + assertHighestUserObservations := func(highestUserObservations commonclient.ChainInfo) { + assert.Equal(t, int64(256), highestUserObservations.BlockNumber) + assert.Equal(t, int64(0), highestUserObservations.FinalizedBlockNumber) + assert.Equal(t, big.NewInt(1000), highestUserObservations.TotalDifficulty) + } + + assertHighestUserObservations(highestUserObservations) + + // DisconnectAll resets latest + rpc.DisconnectAll() + + latest, highestUserObservations = rpc.GetInterceptedChainInfo() + assert.Equal(t, int64(0), latest.BlockNumber) + assert.Equal(t, int64(0), latest.FinalizedBlockNumber) + assert.Nil(t, latest.TotalDifficulty) + + assertHighestUserObservations(highestUserObservations) + }) + t.Run("App layer observations are not affected by new block if health check flag is present", func(t *testing.T) { + server := testutils.NewWSServer(t, chainId, serverCallBack) + wsURL := server.WSURL() + + rpc := client.NewRPCClient(lggr, *wsURL, nil, "rpc", 1, chainId, commonclient.Primary) + defer rpc.Close() + require.NoError(t, rpc.Dial(ctx)) + ch := make(chan *evmtypes.Head) + sub, err := rpc.SubscribeNewHead(commonclient.CtxAddHealthCheckFlag(tests.Context(t)), ch) + require.NoError(t, err) + defer sub.Unsubscribe() + go server.MustWriteBinaryMessageSync(t, makeNewHeadWSMessage(&evmtypes.Head{Number: 256, TotalDifficulty: big.NewInt(1000)})) + // received 256 head + <-ch + + latest, highestUserObservations := rpc.GetInterceptedChainInfo() + assert.Equal(t, int64(256), latest.BlockNumber) + assert.Equal(t, int64(0), latest.FinalizedBlockNumber) + assert.Equal(t, big.NewInt(1000), latest.TotalDifficulty) + + assert.Equal(t, int64(0), highestUserObservations.BlockNumber) + assert.Equal(t, int64(0), highestUserObservations.FinalizedBlockNumber) + assert.Equal(t, (*big.Int)(nil), highestUserObservations.TotalDifficulty) + }) + t.Run("Block's chain ID matched configured", func(t *testing.T) { + server := testutils.NewWSServer(t, chainId, serverCallBack) + wsURL := server.WSURL() + rpc := client.NewRPCClient(lggr, *wsURL, nil, "rpc", 1, chainId, commonclient.Primary) + defer rpc.Close() + require.NoError(t, rpc.Dial(ctx)) + ch := make(chan *evmtypes.Head) + sub, err := rpc.SubscribeNewHead(tests.Context(t), ch) + require.NoError(t, err) + defer sub.Unsubscribe() + go server.MustWriteBinaryMessageSync(t, makeNewHeadWSMessage(&evmtypes.Head{Number: 256})) + head := <-ch + require.Equal(t, chainId, head.ChainID()) + }) + t.Run("Failed SubscribeNewHead returns and logs proper error", func(t *testing.T) { + server := testutils.NewWSServer(t, chainId, func(reqMethod string, reqParams gjson.Result) (resp testutils.JSONRPCResponse) { + return resp + }) + wsURL := server.WSURL() + observedLggr, observed := logger.TestObserved(t, zap.DebugLevel) + rpc := client.NewRPCClient(observedLggr, *wsURL, nil, "rpc", 1, chainId, commonclient.Primary) + require.NoError(t, rpc.Dial(ctx)) + server.Close() + _, err := rpc.SubscribeNewHead(ctx, make(chan *evmtypes.Head)) + require.ErrorContains(t, err, "RPCClient returned error (rpc)") + tests.AssertLogEventually(t, observed, "evmclient.Client#EthSubscribe RPC call failure") + }) + t.Run("Subscription error is properly wrapper", func(t *testing.T) { + server := testutils.NewWSServer(t, chainId, serverCallBack) + wsURL := server.WSURL() + rpc := client.NewRPCClient(lggr, *wsURL, nil, "rpc", 1, chainId, commonclient.Primary) + defer rpc.Close() + require.NoError(t, rpc.Dial(ctx)) + sub, err := rpc.SubscribeNewHead(ctx, make(chan *evmtypes.Head)) + require.NoError(t, err) + go server.MustWriteBinaryMessageSync(t, "invalid msg") + select { + case err = <-sub.Err(): + require.ErrorContains(t, err, "RPCClient returned error (rpc): invalid character") + case <-ctx.Done(): + t.Errorf("Expected subscription to return an error, but test timeout instead") + } + }) +} + +func TestRPCClient_SubscribeFilterLogs(t *testing.T) { + t.Parallel() + + chainId := big.NewInt(123456) + lggr := logger.Test(t) + ctx, cancel := context.WithTimeout(tests.Context(t), tests.WaitTimeout(t)) + defer cancel() + t.Run("Failed SubscribeFilterLogs logs and returns proper error", func(t *testing.T) { + server := testutils.NewWSServer(t, chainId, func(reqMethod string, reqParams gjson.Result) (resp testutils.JSONRPCResponse) { + return resp + }) + wsURL := server.WSURL() + observedLggr, observed := logger.TestObserved(t, zap.DebugLevel) + rpc := client.NewRPCClient(observedLggr, *wsURL, nil, "rpc", 1, chainId, commonclient.Primary) + require.NoError(t, rpc.Dial(ctx)) + server.Close() + _, err := rpc.SubscribeFilterLogs(ctx, ethereum.FilterQuery{}, make(chan types.Log)) + require.ErrorContains(t, err, "RPCClient returned error (rpc)") + tests.AssertLogEventually(t, observed, "evmclient.Client#SubscribeFilterLogs RPC call failure") + }) + t.Run("Subscription error is properly wrapper", func(t *testing.T) { + server := testutils.NewWSServer(t, chainId, func(method string, params gjson.Result) (resp testutils.JSONRPCResponse) { + assert.Equal(t, "eth_subscribe", method) + if assert.True(t, params.IsArray()) && assert.Equal(t, "logs", params.Array()[0].String()) { + resp.Result = `"0x00"` + resp.Notify = "{}" + } + return resp + }) + wsURL := server.WSURL() + rpc := client.NewRPCClient(lggr, *wsURL, nil, "rpc", 1, chainId, commonclient.Primary) + defer rpc.Close() + require.NoError(t, rpc.Dial(ctx)) + sub, err := rpc.SubscribeFilterLogs(ctx, ethereum.FilterQuery{}, make(chan types.Log)) + require.NoError(t, err) + go server.MustWriteBinaryMessageSync(t, "invalid msg") + errorCtx, cancel := context.WithTimeout(ctx, tests.DefaultWaitTimeout) + defer cancel() + select { + case err = <-sub.Err(): + require.ErrorContains(t, err, "RPCClient returned error (rpc): invalid character") + case <-errorCtx.Done(): + t.Errorf("Expected subscription to return an error, but test timeout instead") + } + }) +} + +func TestRPCClient_LatestFinalizedBlock(t *testing.T) { + t.Parallel() + ctx, cancel := context.WithTimeout(tests.Context(t), tests.WaitTimeout(t)) + defer cancel() + + chainId := big.NewInt(123456) + lggr := logger.Test(t) + + type rpcServer struct { + Head *evmtypes.Head + URL *url.URL + } + createRPCServer := func() *rpcServer { + server := &rpcServer{} + server.URL = testutils.NewWSServer(t, chainId, func(method string, params gjson.Result) (resp testutils.JSONRPCResponse) { + assert.Equal(t, "eth_getBlockByNumber", method) + if assert.True(t, params.IsArray()) && assert.Equal(t, "finalized", params.Array()[0].String()) { + head := server.Head + jsonHead, err := json.Marshal(head) + if err != nil { + panic(fmt.Errorf("failed to marshal head: %w", err)) + } + resp.Result = string(jsonHead) + } + + return + }).WSURL() + + return server + } + + server := createRPCServer() + rpc := client.NewRPCClient(lggr, *server.URL, nil, "rpc", 1, chainId, commonclient.Primary) + require.NoError(t, rpc.Dial(ctx)) + defer rpc.Close() + server.Head = &evmtypes.Head{Number: 128} + // updates chain info + _, err := rpc.LatestFinalizedBlock(ctx) + require.NoError(t, err) + latest, highestUserObservations := rpc.GetInterceptedChainInfo() + + assert.Equal(t, int64(0), highestUserObservations.BlockNumber) + assert.Equal(t, int64(128), highestUserObservations.FinalizedBlockNumber) + + assert.Equal(t, int64(0), latest.BlockNumber) + assert.Equal(t, int64(128), latest.FinalizedBlockNumber) + + // lower block number does not update highestUserObservations + server.Head = &evmtypes.Head{Number: 127} + _, err = rpc.LatestFinalizedBlock(ctx) + require.NoError(t, err) + latest, highestUserObservations = rpc.GetInterceptedChainInfo() + + assert.Equal(t, int64(0), highestUserObservations.BlockNumber) + assert.Equal(t, int64(128), highestUserObservations.FinalizedBlockNumber) + + assert.Equal(t, int64(0), latest.BlockNumber) + assert.Equal(t, int64(127), latest.FinalizedBlockNumber) + + // health check flg prevents change in highestUserObservations + server.Head = &evmtypes.Head{Number: 256} + _, err = rpc.LatestFinalizedBlock(commonclient.CtxAddHealthCheckFlag(ctx)) + require.NoError(t, err) + latest, highestUserObservations = rpc.GetInterceptedChainInfo() + + assert.Equal(t, int64(0), highestUserObservations.BlockNumber) + assert.Equal(t, int64(128), highestUserObservations.FinalizedBlockNumber) + + assert.Equal(t, int64(0), latest.BlockNumber) + assert.Equal(t, int64(256), latest.FinalizedBlockNumber) + + // DisconnectAll resets latest ChainInfo + rpc.DisconnectAll() + latest, highestUserObservations = rpc.GetInterceptedChainInfo() + assert.Equal(t, int64(0), highestUserObservations.BlockNumber) + assert.Equal(t, int64(128), highestUserObservations.FinalizedBlockNumber) + + assert.Equal(t, int64(0), latest.BlockNumber) + assert.Equal(t, int64(0), latest.FinalizedBlockNumber) +} diff --git a/core/chains/evm/client/sub_error_wrapper.go b/core/chains/evm/client/sub_error_wrapper.go deleted file mode 100644 index 689991ce70f..00000000000 --- a/core/chains/evm/client/sub_error_wrapper.go +++ /dev/null @@ -1,77 +0,0 @@ -package client - -import ( - "fmt" - - commontypes "github.com/smartcontractkit/chainlink/v2/common/types" -) - -// subErrorWrapper - adds specified prefix to a subscription error -type subErrorWrapper struct { - sub commontypes.Subscription - errorPrefix string - - done chan struct{} - unSub chan struct{} - errorCh chan error -} - -func newSubscriptionErrorWrapper(sub commontypes.Subscription, errorPrefix string) *subErrorWrapper { - s := &subErrorWrapper{ - sub: sub, - errorPrefix: errorPrefix, - done: make(chan struct{}), - unSub: make(chan struct{}), - errorCh: make(chan error), - } - - go func() { - for { - select { - // sub.Err channel is closed by sub.Unsubscribe - case err, ok := <-sub.Err(): - if !ok { - // might only happen if someone terminated wrapped subscription - // in any case - do our best to release resources - // we can't call Unsubscribe on root sub as this might cause panic - close(s.errorCh) - close(s.done) - return - } - - select { - case s.errorCh <- fmt.Errorf("%s: %w", s.errorPrefix, err): - case <-s.unSub: - s.close() - return - } - case <-s.unSub: - s.close() - return - } - } - }() - - return s -} - -func (s *subErrorWrapper) close() { - s.sub.Unsubscribe() - close(s.errorCh) - close(s.done) -} - -func (s *subErrorWrapper) Unsubscribe() { - select { - // already unsubscribed - case <-s.done: - // signal unsubscribe - case s.unSub <- struct{}{}: - // wait for unsubscribe to complete - <-s.done - } -} - -func (s *subErrorWrapper) Err() <-chan error { - return s.errorCh -} diff --git a/core/chains/evm/client/sub_error_wrapper_test.go b/core/chains/evm/client/sub_error_wrapper_test.go deleted file mode 100644 index 5dd81069572..00000000000 --- a/core/chains/evm/client/sub_error_wrapper_test.go +++ /dev/null @@ -1,74 +0,0 @@ -package client - -import ( - "fmt" - "testing" - - "github.com/stretchr/testify/assert" - - "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" -) - -func TestSubscriptionErrorWrapper(t *testing.T) { - t.Parallel() - t.Run("Unsubscribe wrapper releases resources", func(t *testing.T) { - t.Parallel() - - mockedSub := NewMockSubscription() - const prefix = "RPC returned error" - wrapper := newSubscriptionErrorWrapper(mockedSub, prefix) - wrapper.Unsubscribe() - - // mock's resources were relased - assert.True(t, mockedSub.unsubscribed) - _, ok := <-mockedSub.Err() - assert.False(t, ok) - // wrapper's channels are closed - _, ok = <-wrapper.Err() - assert.False(t, ok) - // subsequence unsubscribe does not causes panic - wrapper.Unsubscribe() - }) - t.Run("Unsubscribe interrupts error delivery", func(t *testing.T) { - t.Parallel() - sub := NewMockSubscription() - const prefix = "RPC returned error" - wrapper := newSubscriptionErrorWrapper(sub, prefix) - sub.Errors <- fmt.Errorf("error") - - wrapper.Unsubscribe() - _, ok := <-wrapper.Err() - assert.False(t, ok) - }) - t.Run("Successfully wraps error", func(t *testing.T) { - t.Parallel() - sub := NewMockSubscription() - const prefix = "RPC returned error" - wrapper := newSubscriptionErrorWrapper(sub, prefix) - sub.Errors <- fmt.Errorf("root error") - - err, ok := <-wrapper.Err() - assert.True(t, ok) - assert.Equal(t, "RPC returned error: root error", err.Error()) - - wrapper.Unsubscribe() - _, ok = <-wrapper.Err() - assert.False(t, ok) - }) - t.Run("Unsubscribe on root does not cause panic", func(t *testing.T) { - t.Parallel() - mockedSub := NewMockSubscription() - wrapper := newSubscriptionErrorWrapper(mockedSub, "") - - mockedSub.Unsubscribe() - // mock's resources were released - assert.True(t, mockedSub.unsubscribed) - _, ok := <-mockedSub.Err() - assert.False(t, ok) - // wrapper's channels are eventually closed - tests.AssertEventually(t, func() bool { - _, ok = <-wrapper.Err() - return !ok - }) - }) -} diff --git a/core/chains/evm/client/chain_id_sub.go b/core/chains/evm/client/sub_forwarder.go similarity index 51% rename from core/chains/evm/client/chain_id_sub.go rename to core/chains/evm/client/sub_forwarder.go index c3162b300c7..93e9b106b4a 100644 --- a/core/chains/evm/client/chain_id_sub.go +++ b/core/chains/evm/client/sub_forwarder.go @@ -1,42 +1,40 @@ package client import ( - "math/big" - "github.com/ethereum/go-ethereum" - - evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" - ubig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" ) -var _ ethereum.Subscription = &chainIDSubForwarder{} +var _ ethereum.Subscription = &subForwarder[any]{} -// chainIDSubForwarder wraps a head subscription in order to intercept and augment each head with chainID before forwarding. -type chainIDSubForwarder struct { - chainID *big.Int - destCh chan<- *evmtypes.Head +// subForwarder wraps a subscription in order to intercept and augment each result before forwarding. +type subForwarder[T any] struct { + destCh chan<- T - srcCh chan *evmtypes.Head + srcCh chan T srcSub ethereum.Subscription + interceptResult func(T) T + interceptError func(error) error + done chan struct{} err chan error unSub chan struct{} } -func newChainIDSubForwarder(chainID *big.Int, ch chan<- *evmtypes.Head) *chainIDSubForwarder { - return &chainIDSubForwarder{ - chainID: chainID, - destCh: ch, - srcCh: make(chan *evmtypes.Head), - done: make(chan struct{}), - err: make(chan error), - unSub: make(chan struct{}, 1), +func newSubForwarder[T any](destCh chan<- T, interceptResult func(T) T, interceptError func(error) error) *subForwarder[T] { + return &subForwarder[T]{ + interceptResult: interceptResult, + interceptError: interceptError, + destCh: destCh, + srcCh: make(chan T), + done: make(chan struct{}), + err: make(chan error), + unSub: make(chan struct{}, 1), } } // start spawns the forwarding loop for sub. -func (c *chainIDSubForwarder) start(sub ethereum.Subscription, err error) error { +func (c *subForwarder[T]) start(sub ethereum.Subscription, err error) error { if err != nil { close(c.srcCh) return err @@ -48,7 +46,7 @@ func (c *chainIDSubForwarder) start(sub ethereum.Subscription, err error) error // forwardLoop receives from src, adds the chainID, and then sends to dest. // It also handles Unsubscribing, which may interrupt either forwarding operation. -func (c *chainIDSubForwarder) forwardLoop() { +func (c *subForwarder[T]) forwardLoop() { // the error channel must be closed when unsubscribing defer close(c.err) defer close(c.done) @@ -56,6 +54,9 @@ func (c *chainIDSubForwarder) forwardLoop() { for { select { case err := <-c.srcSub.Err(): + if c.interceptError != nil { + err = c.interceptError(err) + } select { case c.err <- err: case <-c.unSub: @@ -64,7 +65,9 @@ func (c *chainIDSubForwarder) forwardLoop() { return case h := <-c.srcCh: - h.EVMChainID = ubig.New(c.chainID) + if c.interceptResult != nil { + h = c.interceptResult(h) + } select { case c.destCh <- h: case <-c.unSub: @@ -79,7 +82,7 @@ func (c *chainIDSubForwarder) forwardLoop() { } } -func (c *chainIDSubForwarder) Unsubscribe() { +func (c *subForwarder[T]) Unsubscribe() { // tell forwardLoop to unsubscribe select { case c.unSub <- struct{}{}: @@ -90,6 +93,6 @@ func (c *chainIDSubForwarder) Unsubscribe() { <-c.done } -func (c *chainIDSubForwarder) Err() <-chan error { +func (c *subForwarder[T]) Err() <-chan error { return c.err } diff --git a/core/chains/evm/client/sub_forwarder_test.go b/core/chains/evm/client/sub_forwarder_test.go new file mode 100644 index 00000000000..1bc0122603b --- /dev/null +++ b/core/chains/evm/client/sub_forwarder_test.go @@ -0,0 +1,190 @@ +package client + +import ( + "errors" + "fmt" + "math/big" + "testing" + + "github.com/ethereum/go-ethereum" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" + + commontypes "github.com/smartcontractkit/chainlink/v2/common/types" + evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" + ubig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" +) + +func TestChainIDSubForwarder(t *testing.T) { + t.Parallel() + + newChainIDSubForwarder := func(chainID *big.Int, ch chan<- *evmtypes.Head) *subForwarder[*evmtypes.Head] { + return newSubForwarder(ch, func(head *evmtypes.Head) *evmtypes.Head { + head.EVMChainID = ubig.New(chainID) + return head + }, nil) + } + + chainID := big.NewInt(123) + + t.Run("unsubscribe forwarder", func(t *testing.T) { + t.Parallel() + + ch := make(chan *evmtypes.Head) + forwarder := newChainIDSubForwarder(chainID, ch) + sub := NewMockSubscription() + err := forwarder.start(sub, nil) + assert.NoError(t, err) + forwarder.Unsubscribe() + + assert.True(t, sub.unsubscribed) + _, ok := <-sub.Err() + assert.False(t, ok) + _, ok = <-forwarder.Err() + assert.False(t, ok) + }) + + t.Run("unsubscribe forwarder with error", func(t *testing.T) { + t.Parallel() + + ch := make(chan *evmtypes.Head) + forwarder := newChainIDSubForwarder(chainID, ch) + sub := NewMockSubscription() + err := forwarder.start(sub, nil) + assert.NoError(t, err) + sub.Errors <- errors.New("boo") + forwarder.Unsubscribe() + + assert.True(t, sub.unsubscribed) + _, ok := <-sub.Err() + assert.False(t, ok) + _, ok = <-forwarder.Err() + assert.False(t, ok) + }) + + t.Run("unsubscribe forwarder with message", func(t *testing.T) { + t.Parallel() + + ch := make(chan *evmtypes.Head) + forwarder := newChainIDSubForwarder(chainID, ch) + sub := NewMockSubscription() + err := forwarder.start(sub, nil) + assert.NoError(t, err) + forwarder.srcCh <- &evmtypes.Head{} + forwarder.Unsubscribe() + + assert.True(t, sub.unsubscribed) + _, ok := <-sub.Err() + assert.False(t, ok) + _, ok = <-forwarder.Err() + assert.False(t, ok) + }) + + t.Run("non nil error parameter", func(t *testing.T) { + t.Parallel() + + ch := make(chan *evmtypes.Head) + forwarder := newChainIDSubForwarder(chainID, ch) + sub := NewMockSubscription() + errIn := errors.New("foo") + errOut := forwarder.start(sub, errIn) + assert.Equal(t, errIn, errOut) + }) + + t.Run("forwarding", func(t *testing.T) { + t.Parallel() + + ch := make(chan *evmtypes.Head) + forwarder := newChainIDSubForwarder(chainID, ch) + sub := NewMockSubscription() + err := forwarder.start(sub, nil) + assert.NoError(t, err) + + head := &evmtypes.Head{ + ID: 1, + } + forwarder.srcCh <- head + receivedHead := <-ch + assert.Equal(t, head, receivedHead) + assert.Equal(t, ubig.New(chainID), receivedHead.EVMChainID) + + expectedErr := errors.New("error") + sub.Errors <- expectedErr + receivedErr := <-forwarder.Err() + assert.Equal(t, expectedErr, receivedErr) + }) +} + +func TestSubscriptionErrorWrapper(t *testing.T) { + t.Parallel() + newSubscriptionErrorWrapper := func(t *testing.T, sub commontypes.Subscription, errorPrefix string) ethereum.Subscription { + ch := make(chan *evmtypes.Head) + result := newSubForwarder(ch, nil, func(err error) error { + return fmt.Errorf("%s: %w", errorPrefix, err) + }) + require.NoError(t, result.start(sub, nil)) + return result + } + t.Run("Unsubscribe wrapper releases resources", func(t *testing.T) { + t.Parallel() + + mockedSub := NewMockSubscription() + const prefix = "RPC returned error" + wrapper := newSubscriptionErrorWrapper(t, mockedSub, prefix) + wrapper.Unsubscribe() + + // mock's resources were released + assert.True(t, mockedSub.unsubscribed) + _, ok := <-mockedSub.Err() + assert.False(t, ok) + // wrapper's channels are closed + _, ok = <-wrapper.Err() + assert.False(t, ok) + // subsequence unsubscribe does not causes panic + wrapper.Unsubscribe() + }) + t.Run("Unsubscribe interrupts error delivery", func(t *testing.T) { + t.Parallel() + sub := NewMockSubscription() + const prefix = "RPC returned error" + wrapper := newSubscriptionErrorWrapper(t, sub, prefix) + sub.Errors <- fmt.Errorf("error") + + wrapper.Unsubscribe() + _, ok := <-wrapper.Err() + assert.False(t, ok) + }) + t.Run("Successfully wraps error", func(t *testing.T) { + t.Parallel() + sub := NewMockSubscription() + const prefix = "RPC returned error" + wrapper := newSubscriptionErrorWrapper(t, sub, prefix) + sub.Errors <- fmt.Errorf("root error") + + err, ok := <-wrapper.Err() + assert.True(t, ok) + assert.Equal(t, "RPC returned error: root error", err.Error()) + + wrapper.Unsubscribe() + _, ok = <-wrapper.Err() + assert.False(t, ok) + }) + t.Run("Unsubscribe on root does not cause panic", func(t *testing.T) { + t.Parallel() + mockedSub := NewMockSubscription() + wrapper := newSubscriptionErrorWrapper(t, mockedSub, "") + + mockedSub.Unsubscribe() + // mock's resources were released + assert.True(t, mockedSub.unsubscribed) + _, ok := <-mockedSub.Err() + assert.False(t, ok) + // wrapper's channels are eventually closed + tests.AssertEventually(t, func() bool { + _, ok = <-wrapper.Err() + return !ok + }) + }) +} diff --git a/core/chains/evm/config/chain_scoped.go b/core/chains/evm/config/chain_scoped.go index 8064e2de207..db598e3e82b 100644 --- a/core/chains/evm/config/chain_scoped.go +++ b/core/chains/evm/config/chain_scoped.go @@ -179,3 +179,7 @@ func (e *EVMConfig) OperatorFactoryAddress() string { func (e *EVMConfig) LogPrunePageSize() uint32 { return *e.C.LogPrunePageSize } + +func (e *EVMConfig) FinalizedBlockOffset() uint32 { + return *e.C.FinalizedBlockOffset +} diff --git a/core/chains/evm/config/chain_scoped_node_pool.go b/core/chains/evm/config/chain_scoped_node_pool.go index 50269366829..a4974366486 100644 --- a/core/chains/evm/config/chain_scoped_node_pool.go +++ b/core/chains/evm/config/chain_scoped_node_pool.go @@ -38,6 +38,12 @@ func (n *NodePoolConfig) FinalizedBlockPollInterval() time.Duration { return n.C.FinalizedBlockPollInterval.Duration() } -func (n *NodePoolConfig) Errors() ClientErrors { - return &clientErrorsConfig{c: n.C.Errors} +func (n *NodePoolConfig) Errors() ClientErrors { return &clientErrorsConfig{c: n.C.Errors} } + +func (n *NodePoolConfig) EnforceRepeatableRead() bool { + return *n.C.EnforceRepeatableRead +} + +func (n *NodePoolConfig) DeathDeclarationDelay() time.Duration { + return n.C.DeathDeclarationDelay.Duration() } diff --git a/core/chains/evm/config/config.go b/core/chains/evm/config/config.go index b44c112e204..ea0d52f5705 100644 --- a/core/chains/evm/config/config.go +++ b/core/chains/evm/config/config.go @@ -45,6 +45,7 @@ type EVM interface { OperatorFactoryAddress() string RPCDefaultBatchSize() uint32 NodeNoNewHeadsThreshold() time.Duration + FinalizedBlockOffset() uint32 IsEnabled() bool TOMLString() (string, error) @@ -113,7 +114,6 @@ type AutoPurgeConfig interface { DetectionApiUrl() *url.URL } -//go:generate mockery --quiet --name GasEstimator --output ./mocks/ --case=underscore type GasEstimator interface { BlockHistory() BlockHistory LimitJobType() LimitJobType @@ -170,11 +170,11 @@ type NodePool interface { NodeIsSyncingEnabled() bool FinalizedBlockPollInterval() time.Duration Errors() ClientErrors + EnforceRepeatableRead() bool + DeathDeclarationDelay() time.Duration } // TODO BCF-2509 does the chainscopedconfig really need the entire app config? -// -//go:generate mockery --quiet --name ChainScopedConfig --output ./mocks/ --case=underscore type ChainScopedConfig interface { EVM() EVM } diff --git a/core/chains/evm/config/config_test.go b/core/chains/evm/config/config_test.go index 26ac2db0852..ba362bda981 100644 --- a/core/chains/evm/config/config_test.go +++ b/core/chains/evm/config/config_test.go @@ -326,6 +326,8 @@ func TestNodePoolConfig(t *testing.T) { require.Equal(t, time.Duration(10000000000), cfg.EVM().NodePool().PollInterval()) require.Equal(t, uint32(5), cfg.EVM().NodePool().PollFailureThreshold()) require.Equal(t, false, cfg.EVM().NodePool().NodeIsSyncingEnabled()) + require.Equal(t, false, cfg.EVM().NodePool().EnforceRepeatableRead()) + require.Equal(t, time.Duration(10000000000), cfg.EVM().NodePool().DeathDeclarationDelay()) } func TestClientErrorsConfig(t *testing.T) { diff --git a/core/chains/evm/config/mocks/chain_scoped_config.go b/core/chains/evm/config/mocks/chain_scoped_config.go index 7f5f9666ae6..da6101c44a5 100644 --- a/core/chains/evm/config/mocks/chain_scoped_config.go +++ b/core/chains/evm/config/mocks/chain_scoped_config.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -12,6 +12,14 @@ type ChainScopedConfig struct { mock.Mock } +type ChainScopedConfig_Expecter struct { + mock *mock.Mock +} + +func (_m *ChainScopedConfig) EXPECT() *ChainScopedConfig_Expecter { + return &ChainScopedConfig_Expecter{mock: &_m.Mock} +} + // EVM provides a mock function with given fields: func (_m *ChainScopedConfig) EVM() config.EVM { ret := _m.Called() @@ -32,6 +40,33 @@ func (_m *ChainScopedConfig) EVM() config.EVM { return r0 } +// ChainScopedConfig_EVM_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EVM' +type ChainScopedConfig_EVM_Call struct { + *mock.Call +} + +// EVM is a helper method to define mock.On call +func (_e *ChainScopedConfig_Expecter) EVM() *ChainScopedConfig_EVM_Call { + return &ChainScopedConfig_EVM_Call{Call: _e.mock.On("EVM")} +} + +func (_c *ChainScopedConfig_EVM_Call) Run(run func()) *ChainScopedConfig_EVM_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ChainScopedConfig_EVM_Call) Return(_a0 config.EVM) *ChainScopedConfig_EVM_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ChainScopedConfig_EVM_Call) RunAndReturn(run func() config.EVM) *ChainScopedConfig_EVM_Call { + _c.Call.Return(run) + return _c +} + // NewChainScopedConfig creates a new instance of ChainScopedConfig. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewChainScopedConfig(t interface { diff --git a/core/chains/evm/config/mocks/gas_estimator.go b/core/chains/evm/config/mocks/gas_estimator.go index 549f16fe558..b8e813e8068 100644 --- a/core/chains/evm/config/mocks/gas_estimator.go +++ b/core/chains/evm/config/mocks/gas_estimator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -16,6 +16,14 @@ type GasEstimator struct { mock.Mock } +type GasEstimator_Expecter struct { + mock *mock.Mock +} + +func (_m *GasEstimator) EXPECT() *GasEstimator_Expecter { + return &GasEstimator_Expecter{mock: &_m.Mock} +} + // BlockHistory provides a mock function with given fields: func (_m *GasEstimator) BlockHistory() config.BlockHistory { ret := _m.Called() @@ -36,6 +44,33 @@ func (_m *GasEstimator) BlockHistory() config.BlockHistory { return r0 } +// GasEstimator_BlockHistory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockHistory' +type GasEstimator_BlockHistory_Call struct { + *mock.Call +} + +// BlockHistory is a helper method to define mock.On call +func (_e *GasEstimator_Expecter) BlockHistory() *GasEstimator_BlockHistory_Call { + return &GasEstimator_BlockHistory_Call{Call: _e.mock.On("BlockHistory")} +} + +func (_c *GasEstimator_BlockHistory_Call) Run(run func()) *GasEstimator_BlockHistory_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GasEstimator_BlockHistory_Call) Return(_a0 config.BlockHistory) *GasEstimator_BlockHistory_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GasEstimator_BlockHistory_Call) RunAndReturn(run func() config.BlockHistory) *GasEstimator_BlockHistory_Call { + _c.Call.Return(run) + return _c +} + // BumpMin provides a mock function with given fields: func (_m *GasEstimator) BumpMin() *assets.Wei { ret := _m.Called() @@ -56,6 +91,33 @@ func (_m *GasEstimator) BumpMin() *assets.Wei { return r0 } +// GasEstimator_BumpMin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BumpMin' +type GasEstimator_BumpMin_Call struct { + *mock.Call +} + +// BumpMin is a helper method to define mock.On call +func (_e *GasEstimator_Expecter) BumpMin() *GasEstimator_BumpMin_Call { + return &GasEstimator_BumpMin_Call{Call: _e.mock.On("BumpMin")} +} + +func (_c *GasEstimator_BumpMin_Call) Run(run func()) *GasEstimator_BumpMin_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GasEstimator_BumpMin_Call) Return(_a0 *assets.Wei) *GasEstimator_BumpMin_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GasEstimator_BumpMin_Call) RunAndReturn(run func() *assets.Wei) *GasEstimator_BumpMin_Call { + _c.Call.Return(run) + return _c +} + // BumpPercent provides a mock function with given fields: func (_m *GasEstimator) BumpPercent() uint16 { ret := _m.Called() @@ -74,6 +136,33 @@ func (_m *GasEstimator) BumpPercent() uint16 { return r0 } +// GasEstimator_BumpPercent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BumpPercent' +type GasEstimator_BumpPercent_Call struct { + *mock.Call +} + +// BumpPercent is a helper method to define mock.On call +func (_e *GasEstimator_Expecter) BumpPercent() *GasEstimator_BumpPercent_Call { + return &GasEstimator_BumpPercent_Call{Call: _e.mock.On("BumpPercent")} +} + +func (_c *GasEstimator_BumpPercent_Call) Run(run func()) *GasEstimator_BumpPercent_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GasEstimator_BumpPercent_Call) Return(_a0 uint16) *GasEstimator_BumpPercent_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GasEstimator_BumpPercent_Call) RunAndReturn(run func() uint16) *GasEstimator_BumpPercent_Call { + _c.Call.Return(run) + return _c +} + // BumpThreshold provides a mock function with given fields: func (_m *GasEstimator) BumpThreshold() uint64 { ret := _m.Called() @@ -92,6 +181,33 @@ func (_m *GasEstimator) BumpThreshold() uint64 { return r0 } +// GasEstimator_BumpThreshold_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BumpThreshold' +type GasEstimator_BumpThreshold_Call struct { + *mock.Call +} + +// BumpThreshold is a helper method to define mock.On call +func (_e *GasEstimator_Expecter) BumpThreshold() *GasEstimator_BumpThreshold_Call { + return &GasEstimator_BumpThreshold_Call{Call: _e.mock.On("BumpThreshold")} +} + +func (_c *GasEstimator_BumpThreshold_Call) Run(run func()) *GasEstimator_BumpThreshold_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GasEstimator_BumpThreshold_Call) Return(_a0 uint64) *GasEstimator_BumpThreshold_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GasEstimator_BumpThreshold_Call) RunAndReturn(run func() uint64) *GasEstimator_BumpThreshold_Call { + _c.Call.Return(run) + return _c +} + // BumpTxDepth provides a mock function with given fields: func (_m *GasEstimator) BumpTxDepth() uint32 { ret := _m.Called() @@ -110,6 +226,33 @@ func (_m *GasEstimator) BumpTxDepth() uint32 { return r0 } +// GasEstimator_BumpTxDepth_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BumpTxDepth' +type GasEstimator_BumpTxDepth_Call struct { + *mock.Call +} + +// BumpTxDepth is a helper method to define mock.On call +func (_e *GasEstimator_Expecter) BumpTxDepth() *GasEstimator_BumpTxDepth_Call { + return &GasEstimator_BumpTxDepth_Call{Call: _e.mock.On("BumpTxDepth")} +} + +func (_c *GasEstimator_BumpTxDepth_Call) Run(run func()) *GasEstimator_BumpTxDepth_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GasEstimator_BumpTxDepth_Call) Return(_a0 uint32) *GasEstimator_BumpTxDepth_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GasEstimator_BumpTxDepth_Call) RunAndReturn(run func() uint32) *GasEstimator_BumpTxDepth_Call { + _c.Call.Return(run) + return _c +} + // EIP1559DynamicFees provides a mock function with given fields: func (_m *GasEstimator) EIP1559DynamicFees() bool { ret := _m.Called() @@ -128,6 +271,33 @@ func (_m *GasEstimator) EIP1559DynamicFees() bool { return r0 } +// GasEstimator_EIP1559DynamicFees_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EIP1559DynamicFees' +type GasEstimator_EIP1559DynamicFees_Call struct { + *mock.Call +} + +// EIP1559DynamicFees is a helper method to define mock.On call +func (_e *GasEstimator_Expecter) EIP1559DynamicFees() *GasEstimator_EIP1559DynamicFees_Call { + return &GasEstimator_EIP1559DynamicFees_Call{Call: _e.mock.On("EIP1559DynamicFees")} +} + +func (_c *GasEstimator_EIP1559DynamicFees_Call) Run(run func()) *GasEstimator_EIP1559DynamicFees_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GasEstimator_EIP1559DynamicFees_Call) Return(_a0 bool) *GasEstimator_EIP1559DynamicFees_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GasEstimator_EIP1559DynamicFees_Call) RunAndReturn(run func() bool) *GasEstimator_EIP1559DynamicFees_Call { + _c.Call.Return(run) + return _c +} + // FeeCapDefault provides a mock function with given fields: func (_m *GasEstimator) FeeCapDefault() *assets.Wei { ret := _m.Called() @@ -148,6 +318,33 @@ func (_m *GasEstimator) FeeCapDefault() *assets.Wei { return r0 } +// GasEstimator_FeeCapDefault_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FeeCapDefault' +type GasEstimator_FeeCapDefault_Call struct { + *mock.Call +} + +// FeeCapDefault is a helper method to define mock.On call +func (_e *GasEstimator_Expecter) FeeCapDefault() *GasEstimator_FeeCapDefault_Call { + return &GasEstimator_FeeCapDefault_Call{Call: _e.mock.On("FeeCapDefault")} +} + +func (_c *GasEstimator_FeeCapDefault_Call) Run(run func()) *GasEstimator_FeeCapDefault_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GasEstimator_FeeCapDefault_Call) Return(_a0 *assets.Wei) *GasEstimator_FeeCapDefault_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GasEstimator_FeeCapDefault_Call) RunAndReturn(run func() *assets.Wei) *GasEstimator_FeeCapDefault_Call { + _c.Call.Return(run) + return _c +} + // LimitDefault provides a mock function with given fields: func (_m *GasEstimator) LimitDefault() uint64 { ret := _m.Called() @@ -166,6 +363,33 @@ func (_m *GasEstimator) LimitDefault() uint64 { return r0 } +// GasEstimator_LimitDefault_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LimitDefault' +type GasEstimator_LimitDefault_Call struct { + *mock.Call +} + +// LimitDefault is a helper method to define mock.On call +func (_e *GasEstimator_Expecter) LimitDefault() *GasEstimator_LimitDefault_Call { + return &GasEstimator_LimitDefault_Call{Call: _e.mock.On("LimitDefault")} +} + +func (_c *GasEstimator_LimitDefault_Call) Run(run func()) *GasEstimator_LimitDefault_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GasEstimator_LimitDefault_Call) Return(_a0 uint64) *GasEstimator_LimitDefault_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GasEstimator_LimitDefault_Call) RunAndReturn(run func() uint64) *GasEstimator_LimitDefault_Call { + _c.Call.Return(run) + return _c +} + // LimitJobType provides a mock function with given fields: func (_m *GasEstimator) LimitJobType() config.LimitJobType { ret := _m.Called() @@ -186,6 +410,33 @@ func (_m *GasEstimator) LimitJobType() config.LimitJobType { return r0 } +// GasEstimator_LimitJobType_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LimitJobType' +type GasEstimator_LimitJobType_Call struct { + *mock.Call +} + +// LimitJobType is a helper method to define mock.On call +func (_e *GasEstimator_Expecter) LimitJobType() *GasEstimator_LimitJobType_Call { + return &GasEstimator_LimitJobType_Call{Call: _e.mock.On("LimitJobType")} +} + +func (_c *GasEstimator_LimitJobType_Call) Run(run func()) *GasEstimator_LimitJobType_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GasEstimator_LimitJobType_Call) Return(_a0 config.LimitJobType) *GasEstimator_LimitJobType_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GasEstimator_LimitJobType_Call) RunAndReturn(run func() config.LimitJobType) *GasEstimator_LimitJobType_Call { + _c.Call.Return(run) + return _c +} + // LimitMax provides a mock function with given fields: func (_m *GasEstimator) LimitMax() uint64 { ret := _m.Called() @@ -204,6 +455,33 @@ func (_m *GasEstimator) LimitMax() uint64 { return r0 } +// GasEstimator_LimitMax_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LimitMax' +type GasEstimator_LimitMax_Call struct { + *mock.Call +} + +// LimitMax is a helper method to define mock.On call +func (_e *GasEstimator_Expecter) LimitMax() *GasEstimator_LimitMax_Call { + return &GasEstimator_LimitMax_Call{Call: _e.mock.On("LimitMax")} +} + +func (_c *GasEstimator_LimitMax_Call) Run(run func()) *GasEstimator_LimitMax_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GasEstimator_LimitMax_Call) Return(_a0 uint64) *GasEstimator_LimitMax_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GasEstimator_LimitMax_Call) RunAndReturn(run func() uint64) *GasEstimator_LimitMax_Call { + _c.Call.Return(run) + return _c +} + // LimitMultiplier provides a mock function with given fields: func (_m *GasEstimator) LimitMultiplier() float32 { ret := _m.Called() @@ -222,6 +500,33 @@ func (_m *GasEstimator) LimitMultiplier() float32 { return r0 } +// GasEstimator_LimitMultiplier_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LimitMultiplier' +type GasEstimator_LimitMultiplier_Call struct { + *mock.Call +} + +// LimitMultiplier is a helper method to define mock.On call +func (_e *GasEstimator_Expecter) LimitMultiplier() *GasEstimator_LimitMultiplier_Call { + return &GasEstimator_LimitMultiplier_Call{Call: _e.mock.On("LimitMultiplier")} +} + +func (_c *GasEstimator_LimitMultiplier_Call) Run(run func()) *GasEstimator_LimitMultiplier_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GasEstimator_LimitMultiplier_Call) Return(_a0 float32) *GasEstimator_LimitMultiplier_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GasEstimator_LimitMultiplier_Call) RunAndReturn(run func() float32) *GasEstimator_LimitMultiplier_Call { + _c.Call.Return(run) + return _c +} + // LimitTransfer provides a mock function with given fields: func (_m *GasEstimator) LimitTransfer() uint64 { ret := _m.Called() @@ -240,6 +545,33 @@ func (_m *GasEstimator) LimitTransfer() uint64 { return r0 } +// GasEstimator_LimitTransfer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LimitTransfer' +type GasEstimator_LimitTransfer_Call struct { + *mock.Call +} + +// LimitTransfer is a helper method to define mock.On call +func (_e *GasEstimator_Expecter) LimitTransfer() *GasEstimator_LimitTransfer_Call { + return &GasEstimator_LimitTransfer_Call{Call: _e.mock.On("LimitTransfer")} +} + +func (_c *GasEstimator_LimitTransfer_Call) Run(run func()) *GasEstimator_LimitTransfer_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GasEstimator_LimitTransfer_Call) Return(_a0 uint64) *GasEstimator_LimitTransfer_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GasEstimator_LimitTransfer_Call) RunAndReturn(run func() uint64) *GasEstimator_LimitTransfer_Call { + _c.Call.Return(run) + return _c +} + // Mode provides a mock function with given fields: func (_m *GasEstimator) Mode() string { ret := _m.Called() @@ -258,6 +590,33 @@ func (_m *GasEstimator) Mode() string { return r0 } +// GasEstimator_Mode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Mode' +type GasEstimator_Mode_Call struct { + *mock.Call +} + +// Mode is a helper method to define mock.On call +func (_e *GasEstimator_Expecter) Mode() *GasEstimator_Mode_Call { + return &GasEstimator_Mode_Call{Call: _e.mock.On("Mode")} +} + +func (_c *GasEstimator_Mode_Call) Run(run func()) *GasEstimator_Mode_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GasEstimator_Mode_Call) Return(_a0 string) *GasEstimator_Mode_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GasEstimator_Mode_Call) RunAndReturn(run func() string) *GasEstimator_Mode_Call { + _c.Call.Return(run) + return _c +} + // PriceDefault provides a mock function with given fields: func (_m *GasEstimator) PriceDefault() *assets.Wei { ret := _m.Called() @@ -278,6 +637,33 @@ func (_m *GasEstimator) PriceDefault() *assets.Wei { return r0 } +// GasEstimator_PriceDefault_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PriceDefault' +type GasEstimator_PriceDefault_Call struct { + *mock.Call +} + +// PriceDefault is a helper method to define mock.On call +func (_e *GasEstimator_Expecter) PriceDefault() *GasEstimator_PriceDefault_Call { + return &GasEstimator_PriceDefault_Call{Call: _e.mock.On("PriceDefault")} +} + +func (_c *GasEstimator_PriceDefault_Call) Run(run func()) *GasEstimator_PriceDefault_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GasEstimator_PriceDefault_Call) Return(_a0 *assets.Wei) *GasEstimator_PriceDefault_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GasEstimator_PriceDefault_Call) RunAndReturn(run func() *assets.Wei) *GasEstimator_PriceDefault_Call { + _c.Call.Return(run) + return _c +} + // PriceMax provides a mock function with given fields: func (_m *GasEstimator) PriceMax() *assets.Wei { ret := _m.Called() @@ -298,6 +684,33 @@ func (_m *GasEstimator) PriceMax() *assets.Wei { return r0 } +// GasEstimator_PriceMax_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PriceMax' +type GasEstimator_PriceMax_Call struct { + *mock.Call +} + +// PriceMax is a helper method to define mock.On call +func (_e *GasEstimator_Expecter) PriceMax() *GasEstimator_PriceMax_Call { + return &GasEstimator_PriceMax_Call{Call: _e.mock.On("PriceMax")} +} + +func (_c *GasEstimator_PriceMax_Call) Run(run func()) *GasEstimator_PriceMax_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GasEstimator_PriceMax_Call) Return(_a0 *assets.Wei) *GasEstimator_PriceMax_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GasEstimator_PriceMax_Call) RunAndReturn(run func() *assets.Wei) *GasEstimator_PriceMax_Call { + _c.Call.Return(run) + return _c +} + // PriceMaxKey provides a mock function with given fields: _a0 func (_m *GasEstimator) PriceMaxKey(_a0 common.Address) *assets.Wei { ret := _m.Called(_a0) @@ -318,6 +731,34 @@ func (_m *GasEstimator) PriceMaxKey(_a0 common.Address) *assets.Wei { return r0 } +// GasEstimator_PriceMaxKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PriceMaxKey' +type GasEstimator_PriceMaxKey_Call struct { + *mock.Call +} + +// PriceMaxKey is a helper method to define mock.On call +// - _a0 common.Address +func (_e *GasEstimator_Expecter) PriceMaxKey(_a0 interface{}) *GasEstimator_PriceMaxKey_Call { + return &GasEstimator_PriceMaxKey_Call{Call: _e.mock.On("PriceMaxKey", _a0)} +} + +func (_c *GasEstimator_PriceMaxKey_Call) Run(run func(_a0 common.Address)) *GasEstimator_PriceMaxKey_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(common.Address)) + }) + return _c +} + +func (_c *GasEstimator_PriceMaxKey_Call) Return(_a0 *assets.Wei) *GasEstimator_PriceMaxKey_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GasEstimator_PriceMaxKey_Call) RunAndReturn(run func(common.Address) *assets.Wei) *GasEstimator_PriceMaxKey_Call { + _c.Call.Return(run) + return _c +} + // PriceMin provides a mock function with given fields: func (_m *GasEstimator) PriceMin() *assets.Wei { ret := _m.Called() @@ -338,6 +779,33 @@ func (_m *GasEstimator) PriceMin() *assets.Wei { return r0 } +// GasEstimator_PriceMin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PriceMin' +type GasEstimator_PriceMin_Call struct { + *mock.Call +} + +// PriceMin is a helper method to define mock.On call +func (_e *GasEstimator_Expecter) PriceMin() *GasEstimator_PriceMin_Call { + return &GasEstimator_PriceMin_Call{Call: _e.mock.On("PriceMin")} +} + +func (_c *GasEstimator_PriceMin_Call) Run(run func()) *GasEstimator_PriceMin_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GasEstimator_PriceMin_Call) Return(_a0 *assets.Wei) *GasEstimator_PriceMin_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GasEstimator_PriceMin_Call) RunAndReturn(run func() *assets.Wei) *GasEstimator_PriceMin_Call { + _c.Call.Return(run) + return _c +} + // TipCapDefault provides a mock function with given fields: func (_m *GasEstimator) TipCapDefault() *assets.Wei { ret := _m.Called() @@ -358,6 +826,33 @@ func (_m *GasEstimator) TipCapDefault() *assets.Wei { return r0 } +// GasEstimator_TipCapDefault_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TipCapDefault' +type GasEstimator_TipCapDefault_Call struct { + *mock.Call +} + +// TipCapDefault is a helper method to define mock.On call +func (_e *GasEstimator_Expecter) TipCapDefault() *GasEstimator_TipCapDefault_Call { + return &GasEstimator_TipCapDefault_Call{Call: _e.mock.On("TipCapDefault")} +} + +func (_c *GasEstimator_TipCapDefault_Call) Run(run func()) *GasEstimator_TipCapDefault_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GasEstimator_TipCapDefault_Call) Return(_a0 *assets.Wei) *GasEstimator_TipCapDefault_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GasEstimator_TipCapDefault_Call) RunAndReturn(run func() *assets.Wei) *GasEstimator_TipCapDefault_Call { + _c.Call.Return(run) + return _c +} + // TipCapMin provides a mock function with given fields: func (_m *GasEstimator) TipCapMin() *assets.Wei { ret := _m.Called() @@ -378,6 +873,33 @@ func (_m *GasEstimator) TipCapMin() *assets.Wei { return r0 } +// GasEstimator_TipCapMin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TipCapMin' +type GasEstimator_TipCapMin_Call struct { + *mock.Call +} + +// TipCapMin is a helper method to define mock.On call +func (_e *GasEstimator_Expecter) TipCapMin() *GasEstimator_TipCapMin_Call { + return &GasEstimator_TipCapMin_Call{Call: _e.mock.On("TipCapMin")} +} + +func (_c *GasEstimator_TipCapMin_Call) Run(run func()) *GasEstimator_TipCapMin_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GasEstimator_TipCapMin_Call) Return(_a0 *assets.Wei) *GasEstimator_TipCapMin_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GasEstimator_TipCapMin_Call) RunAndReturn(run func() *assets.Wei) *GasEstimator_TipCapMin_Call { + _c.Call.Return(run) + return _c +} + // NewGasEstimator creates a new instance of GasEstimator. 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 NewGasEstimator(t interface { diff --git a/core/chains/evm/config/toml/config.go b/core/chains/evm/config/toml/config.go index d35f9bd0a3b..3e35bb4b55c 100644 --- a/core/chains/evm/config/toml/config.go +++ b/core/chains/evm/config/toml/config.go @@ -358,6 +358,7 @@ type Chain struct { OperatorFactoryAddress *types.EIP55Address RPCDefaultBatchSize *uint32 RPCBlockQueryDelay *uint16 + FinalizedBlockOffset *uint32 Transactions Transactions `toml:",omitempty"` BalanceMonitor BalanceMonitor `toml:",omitempty"` @@ -389,6 +390,11 @@ func (c *Chain) ValidateConfig() (err error) { Msg: "must be greater than or equal to 1"}) } + if *c.FinalizedBlockOffset > *c.HeadTracker.HistoryDepth { + err = multierr.Append(err, commonconfig.ErrInvalid{Name: "HeadTracker.HistoryDepth", Value: *c.HeadTracker.HistoryDepth, + Msg: "must be greater than or equal to FinalizedBlockOffset"}) + } + // AutoPurge configs depend on ChainType so handling validation on per chain basis if c.Transactions.AutoPurge.Enabled != nil && *c.Transactions.AutoPurge.Enabled { chainType := c.ChainType.ChainType() @@ -842,6 +848,8 @@ type NodePool struct { NodeIsSyncingEnabled *bool FinalizedBlockPollInterval *commonconfig.Duration Errors ClientErrors `toml:",omitempty"` + EnforceRepeatableRead *bool + DeathDeclarationDelay *commonconfig.Duration } func (p *NodePool) setFrom(f *NodePool) { @@ -866,6 +874,14 @@ func (p *NodePool) setFrom(f *NodePool) { if v := f.FinalizedBlockPollInterval; v != nil { p.FinalizedBlockPollInterval = v } + + if v := f.EnforceRepeatableRead; v != nil { + p.EnforceRepeatableRead = v + } + + if v := f.DeathDeclarationDelay; v != nil { + p.DeathDeclarationDelay = v + } p.Errors.setFrom(&f.Errors) } diff --git a/core/chains/evm/config/toml/defaults.go b/core/chains/evm/config/toml/defaults.go index e006babfb68..38eef40bf76 100644 --- a/core/chains/evm/config/toml/defaults.go +++ b/core/chains/evm/config/toml/defaults.go @@ -161,6 +161,9 @@ func (c *Chain) SetFrom(f *Chain) { if v := f.RPCBlockQueryDelay; v != nil { c.RPCBlockQueryDelay = v } + if v := f.FinalizedBlockOffset; v != nil { + c.FinalizedBlockOffset = v + } c.Transactions.setFrom(&f.Transactions) c.BalanceMonitor.setFrom(&f.BalanceMonitor) diff --git a/core/chains/evm/config/toml/defaults/Scroll_Mainnet.toml b/core/chains/evm/config/toml/defaults/Scroll_Mainnet.toml index 47895e6a6d5..4a887b504df 100644 --- a/core/chains/evm/config/toml/defaults/Scroll_Mainnet.toml +++ b/core/chains/evm/config/toml/defaults/Scroll_Mainnet.toml @@ -1,20 +1,22 @@ ChainID = '534352' FinalityDepth = 10 +FinalityTagEnabled = true ChainType = 'scroll' -LogPollInterval = '3s' +LogPollInterval = '5s' MinIncomingConfirmations = 1 # Scroll only emits blocks when a new tx is received, so this method of liveness detection is not useful NoNewHeadsThreshold = '0' -OCR.ContractConfirmations = 1 [GasEstimator] -Mode = 'SuggestedPrice' -# Scroll uses the SuggestedPrice estimator; we don't want to place any limits on the minimum gas price -PriceMin = '0' +EIP1559DynamicFees = true +PriceMin = '1 wei' +BumpMin = '1 gwei' [GasEstimator.BlockHistory] -# Force an error if someone enables the estimator by accident; we never want to run the block history estimator on Scroll -BlockHistorySize = 0 +BlockHistorySize = 24 [HeadTracker] HistoryDepth = 50 + +[OCR] +ContractConfirmations = 1 diff --git a/core/chains/evm/config/toml/defaults/Scroll_Sepolia.toml b/core/chains/evm/config/toml/defaults/Scroll_Sepolia.toml index d2626a86bd4..b2e1cfbd733 100644 --- a/core/chains/evm/config/toml/defaults/Scroll_Sepolia.toml +++ b/core/chains/evm/config/toml/defaults/Scroll_Sepolia.toml @@ -1,20 +1,22 @@ ChainID = '534351' FinalityDepth = 10 +FinalityTagEnabled = true ChainType = 'scroll' -LogPollInterval = '3s' +LogPollInterval = '5s' MinIncomingConfirmations = 1 # Scroll only emits blocks when a new tx is received, so this method of liveness detection is not useful NoNewHeadsThreshold = '0' -OCR.ContractConfirmations = 1 [GasEstimator] -Mode = 'SuggestedPrice' -# Scroll uses the SuggestedPrice estimator; we don't want to place any limits on the minimum gas price -PriceMin = '0' +EIP1559DynamicFees = true +PriceMin = '1 wei' +BumpMin = '1 gwei' [GasEstimator.BlockHistory] -# Force an error if someone enables the estimator by accident; we never want to run the block history estimator on Scroll -BlockHistorySize = 0 +BlockHistorySize = 24 [HeadTracker] HistoryDepth = 50 + +[OCR] +ContractConfirmations = 1 diff --git a/core/chains/evm/config/toml/defaults/fallback.toml b/core/chains/evm/config/toml/defaults/fallback.toml index 5a16aca091c..a11e646e08b 100644 --- a/core/chains/evm/config/toml/defaults/fallback.toml +++ b/core/chains/evm/config/toml/defaults/fallback.toml @@ -14,6 +14,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '3m' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -68,6 +69,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 4 diff --git a/core/chains/evm/forwarders/forwarder_manager.go b/core/chains/evm/forwarders/forwarder_manager.go index 3624cdf7a2b..6436988ba82 100644 --- a/core/chains/evm/forwarders/forwarder_manager.go +++ b/core/chains/evm/forwarders/forwarder_manager.go @@ -16,8 +16,6 @@ import ( "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" evmlogpoller "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" @@ -276,10 +274,12 @@ func (f *FwdMgr) runLoop() { ctx, cancel := f.stopCh.NewCtx() defer cancel() - tick := time.After(0) - for ; ; tick = time.After(utils.WithJitter(time.Minute)) { + ticker := services.NewTicker(time.Minute) + defer ticker.Stop() + + for { select { - case <-tick: + case <-ticker.C: if err := f.logpoller.Ready(); err != nil { f.logger.Warnw("Skipping log syncing", "err", err) continue diff --git a/core/chains/evm/forwarders/forwarder_manager_test.go b/core/chains/evm/forwarders/forwarder_manager_test.go index be8513f5925..c3fae5292a2 100644 --- a/core/chains/evm/forwarders/forwarder_manager_test.go +++ b/core/chains/evm/forwarders/forwarder_manager_test.go @@ -23,6 +23,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/forwarders" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/headtracker" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" ubig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" @@ -75,7 +76,8 @@ func TestFwdMgr_MaybeForwardTransaction(t *testing.T) { RpcBatchSize: 2, KeepFinalizedBlocksDepth: 1000, } - lp := logpoller.NewLogPoller(logpoller.NewORM(testutils.FixtureChainID, db, lggr), evmClient, lggr, lpOpts) + ht := headtracker.NewSimulatedHeadTracker(evmClient, lpOpts.UseFinalityTag, lpOpts.FinalityDepth) + lp := logpoller.NewLogPoller(logpoller.NewORM(testutils.FixtureChainID, db, lggr), evmClient, lggr, ht, lpOpts) fwdMgr := forwarders.NewFwdMgr(db, evmClient, lp, lggr, evmcfg.EVM()) fwdMgr.ORM = forwarders.NewORM(db) @@ -136,7 +138,8 @@ func TestFwdMgr_AccountUnauthorizedToForward_SkipsForwarding(t *testing.T) { RpcBatchSize: 2, KeepFinalizedBlocksDepth: 1000, } - lp := logpoller.NewLogPoller(logpoller.NewORM(testutils.FixtureChainID, db, lggr), evmClient, lggr, lpOpts) + ht := headtracker.NewSimulatedHeadTracker(evmClient, lpOpts.UseFinalityTag, lpOpts.FinalityDepth) + lp := logpoller.NewLogPoller(logpoller.NewORM(testutils.FixtureChainID, db, lggr), evmClient, lggr, ht, lpOpts) fwdMgr := forwarders.NewFwdMgr(db, evmClient, lp, lggr, evmcfg.EVM()) fwdMgr.ORM = forwarders.NewORM(db) @@ -201,7 +204,8 @@ func TestFwdMgr_InvalidForwarderForOCR2FeedsStates(t *testing.T) { RpcBatchSize: 2, KeepFinalizedBlocksDepth: 1000, } - lp := logpoller.NewLogPoller(logpoller.NewORM(testutils.FixtureChainID, db, lggr), evmClient, lggr, lpOpts) + ht := headtracker.NewSimulatedHeadTracker(evmClient, lpOpts.UseFinalityTag, lpOpts.FinalityDepth) + lp := logpoller.NewLogPoller(logpoller.NewORM(testutils.FixtureChainID, db, lggr), evmClient, lggr, ht, lpOpts) fwdMgr := forwarders.NewFwdMgr(db, evmClient, lp, lggr, evmcfg.EVM()) fwdMgr.ORM = forwarders.NewORM(db) diff --git a/core/chains/evm/forwarders/mocks/orm.go b/core/chains/evm/forwarders/mocks/orm.go index 04e252fa7d4..636d6e7a875 100644 --- a/core/chains/evm/forwarders/mocks/orm.go +++ b/core/chains/evm/forwarders/mocks/orm.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -20,6 +20,14 @@ type ORM struct { mock.Mock } +type ORM_Expecter struct { + mock *mock.Mock +} + +func (_m *ORM) EXPECT() *ORM_Expecter { + return &ORM_Expecter{mock: &_m.Mock} +} + // 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) @@ -48,6 +56,36 @@ func (_m *ORM) CreateForwarder(ctx context.Context, addr common.Address, evmChai return r0, r1 } +// ORM_CreateForwarder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateForwarder' +type ORM_CreateForwarder_Call struct { + *mock.Call +} + +// CreateForwarder is a helper method to define mock.On call +// - ctx context.Context +// - addr common.Address +// - evmChainId big.Big +func (_e *ORM_Expecter) CreateForwarder(ctx interface{}, addr interface{}, evmChainId interface{}) *ORM_CreateForwarder_Call { + return &ORM_CreateForwarder_Call{Call: _e.mock.On("CreateForwarder", ctx, addr, evmChainId)} +} + +func (_c *ORM_CreateForwarder_Call) Run(run func(ctx context.Context, addr common.Address, evmChainId big.Big)) *ORM_CreateForwarder_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(big.Big)) + }) + return _c +} + +func (_c *ORM_CreateForwarder_Call) Return(fwd forwarders.Forwarder, err error) *ORM_CreateForwarder_Call { + _c.Call.Return(fwd, err) + return _c +} + +func (_c *ORM_CreateForwarder_Call) RunAndReturn(run func(context.Context, common.Address, big.Big) (forwarders.Forwarder, error)) *ORM_CreateForwarder_Call { + _c.Call.Return(run) + return _c +} + // 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) @@ -66,6 +104,36 @@ func (_m *ORM) DeleteForwarder(ctx context.Context, id int64, cleanup func(sqlut return r0 } +// ORM_DeleteForwarder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteForwarder' +type ORM_DeleteForwarder_Call struct { + *mock.Call +} + +// DeleteForwarder is a helper method to define mock.On call +// - ctx context.Context +// - id int64 +// - cleanup func(sqlutil.DataSource , int64 , common.Address) error +func (_e *ORM_Expecter) DeleteForwarder(ctx interface{}, id interface{}, cleanup interface{}) *ORM_DeleteForwarder_Call { + return &ORM_DeleteForwarder_Call{Call: _e.mock.On("DeleteForwarder", ctx, id, cleanup)} +} + +func (_c *ORM_DeleteForwarder_Call) Run(run func(ctx context.Context, id int64, cleanup func(sqlutil.DataSource, int64, common.Address) error)) *ORM_DeleteForwarder_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64), args[2].(func(sqlutil.DataSource, int64, common.Address) error)) + }) + return _c +} + +func (_c *ORM_DeleteForwarder_Call) Return(_a0 error) *ORM_DeleteForwarder_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_DeleteForwarder_Call) RunAndReturn(run func(context.Context, int64, func(sqlutil.DataSource, int64, common.Address) error) error) *ORM_DeleteForwarder_Call { + _c.Call.Return(run) + return _c +} + // 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) @@ -103,6 +171,36 @@ func (_m *ORM) FindForwarders(ctx context.Context, offset int, limit int) ([]for return r0, r1, r2 } +// ORM_FindForwarders_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindForwarders' +type ORM_FindForwarders_Call struct { + *mock.Call +} + +// FindForwarders is a helper method to define mock.On call +// - ctx context.Context +// - offset int +// - limit int +func (_e *ORM_Expecter) FindForwarders(ctx interface{}, offset interface{}, limit interface{}) *ORM_FindForwarders_Call { + return &ORM_FindForwarders_Call{Call: _e.mock.On("FindForwarders", ctx, offset, limit)} +} + +func (_c *ORM_FindForwarders_Call) Run(run func(ctx context.Context, offset int, limit int)) *ORM_FindForwarders_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int), args[2].(int)) + }) + return _c +} + +func (_c *ORM_FindForwarders_Call) Return(_a0 []forwarders.Forwarder, _a1 int, _a2 error) *ORM_FindForwarders_Call { + _c.Call.Return(_a0, _a1, _a2) + return _c +} + +func (_c *ORM_FindForwarders_Call) RunAndReturn(run func(context.Context, int, int) ([]forwarders.Forwarder, int, error)) *ORM_FindForwarders_Call { + _c.Call.Return(run) + return _c +} + // 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) @@ -133,6 +231,35 @@ func (_m *ORM) FindForwardersByChain(ctx context.Context, evmChainId big.Big) ([ return r0, r1 } +// ORM_FindForwardersByChain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindForwardersByChain' +type ORM_FindForwardersByChain_Call struct { + *mock.Call +} + +// FindForwardersByChain is a helper method to define mock.On call +// - ctx context.Context +// - evmChainId big.Big +func (_e *ORM_Expecter) FindForwardersByChain(ctx interface{}, evmChainId interface{}) *ORM_FindForwardersByChain_Call { + return &ORM_FindForwardersByChain_Call{Call: _e.mock.On("FindForwardersByChain", ctx, evmChainId)} +} + +func (_c *ORM_FindForwardersByChain_Call) Run(run func(ctx context.Context, evmChainId big.Big)) *ORM_FindForwardersByChain_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(big.Big)) + }) + return _c +} + +func (_c *ORM_FindForwardersByChain_Call) Return(_a0 []forwarders.Forwarder, _a1 error) *ORM_FindForwardersByChain_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ORM_FindForwardersByChain_Call) RunAndReturn(run func(context.Context, big.Big) ([]forwarders.Forwarder, error)) *ORM_FindForwardersByChain_Call { + _c.Call.Return(run) + return _c +} + // 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) @@ -163,6 +290,36 @@ func (_m *ORM) FindForwardersInListByChain(ctx context.Context, evmChainId big.B return r0, r1 } +// ORM_FindForwardersInListByChain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindForwardersInListByChain' +type ORM_FindForwardersInListByChain_Call struct { + *mock.Call +} + +// FindForwardersInListByChain is a helper method to define mock.On call +// - ctx context.Context +// - evmChainId big.Big +// - addrs []common.Address +func (_e *ORM_Expecter) FindForwardersInListByChain(ctx interface{}, evmChainId interface{}, addrs interface{}) *ORM_FindForwardersInListByChain_Call { + return &ORM_FindForwardersInListByChain_Call{Call: _e.mock.On("FindForwardersInListByChain", ctx, evmChainId, addrs)} +} + +func (_c *ORM_FindForwardersInListByChain_Call) Run(run func(ctx context.Context, evmChainId big.Big, addrs []common.Address)) *ORM_FindForwardersInListByChain_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(big.Big), args[2].([]common.Address)) + }) + return _c +} + +func (_c *ORM_FindForwardersInListByChain_Call) Return(_a0 []forwarders.Forwarder, _a1 error) *ORM_FindForwardersInListByChain_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ORM_FindForwardersInListByChain_Call) RunAndReturn(run func(context.Context, big.Big, []common.Address) ([]forwarders.Forwarder, error)) *ORM_FindForwardersInListByChain_Call { + _c.Call.Return(run) + return _c +} + // NewORM creates a new instance of ORM. 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 NewORM(t interface { diff --git a/core/chains/evm/forwarders/orm.go b/core/chains/evm/forwarders/orm.go index 8076cba4831..900899da23d 100644 --- a/core/chains/evm/forwarders/orm.go +++ b/core/chains/evm/forwarders/orm.go @@ -13,8 +13,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" ) -//go:generate mockery --quiet --name ORM --output ./mocks/ --case=underscore - type ORM interface { CreateForwarder(ctx context.Context, addr common.Address, evmChainId big.Big) (fwd Forwarder, err error) FindForwarders(ctx context.Context, offset, limit int) ([]Forwarder, int, error) diff --git a/core/chains/evm/gas/arbitrum_estimator.go b/core/chains/evm/gas/arbitrum_estimator.go index 0cd4bbcdd0b..6a11932878b 100644 --- a/core/chains/evm/gas/arbitrum_estimator.go +++ b/core/chains/evm/gas/arbitrum_estimator.go @@ -11,8 +11,6 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/services" - "github.com/smartcontractkit/chainlink-common/pkg/utils" - feetypes "github.com/smartcontractkit/chainlink/v2/common/fee/types" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/gas/rollups" @@ -168,27 +166,31 @@ func (a *arbitrumEstimator) getPricesInArbGas() (perL2Tx uint32, perL1CalldataUn func (a *arbitrumEstimator) run() { defer close(a.chDone) - t := a.refreshPricesInArbGas() + a.refreshPricesInArbGas() close(a.chInitialised) + t := services.TickerConfig{ + Initial: a.pollPeriod, + JitterPct: services.DefaultJitter, + }.NewTicker(a.pollPeriod) + defer t.Stop() + for { select { case <-a.chStop: return case ch := <-a.chForceRefetch: - t.Stop() - t = a.refreshPricesInArbGas() + a.refreshPricesInArbGas() + t.Reset() close(ch) case <-t.C: - t = a.refreshPricesInArbGas() + a.refreshPricesInArbGas() } } } // refreshPricesInArbGas calls getPricesInArbGas() and caches the refreshed prices. -func (a *arbitrumEstimator) refreshPricesInArbGas() (t *time.Timer) { - t = time.NewTimer(utils.WithJitter(a.pollPeriod)) - +func (a *arbitrumEstimator) refreshPricesInArbGas() { perL2Tx, perL1CalldataUnit, err := a.l1Oracle.GetPricesInArbGas() if err != nil { a.logger.Warnw("Failed to refresh prices", "err", err) @@ -201,5 +203,4 @@ func (a *arbitrumEstimator) refreshPricesInArbGas() (t *time.Timer) { a.perL2Tx = perL2Tx a.perL1CalldataUnit = perL1CalldataUnit a.getPricesInArbGasMu.Unlock() - return } diff --git a/core/chains/evm/gas/arbitrum_estimator_test.go b/core/chains/evm/gas/arbitrum_estimator_test.go index 289025fcdab..cbc6d5d37f4 100644 --- a/core/chains/evm/gas/arbitrum_estimator_test.go +++ b/core/chains/evm/gas/arbitrum_estimator_test.go @@ -55,10 +55,11 @@ func TestArbitrumEstimator(t *testing.T) { t.Run("calling GetLegacyGas on unstarted estimator returns error", func(t *testing.T) { feeEstimatorClient := mocks.NewFeeEstimatorClient(t) - l1Oracle := rollups.NewArbitrumL1GasOracle(logger.Test(t), feeEstimatorClient) + l1Oracle, err := rollups.NewArbitrumL1GasOracle(logger.Test(t), feeEstimatorClient) + require.NoError(t, err) o := gas.NewArbitrumEstimator(logger.Test(t), &arbConfig{}, feeEstimatorClient, l1Oracle) - _, _, err := o.GetLegacyGas(tests.Context(t), calldata, gasLimit, maxGasPrice) + _, _, err = o.GetLegacyGas(tests.Context(t), calldata, gasLimit, maxGasPrice) assert.EqualError(t, err, "estimator is not started") }) @@ -68,7 +69,8 @@ func TestArbitrumEstimator(t *testing.T) { zeros.Write(common.BigToHash(big.NewInt(123455)).Bytes()) t.Run("calling GetLegacyGas on started estimator returns estimates", func(t *testing.T) { feeEstimatorClient := mocks.NewFeeEstimatorClient(t) - l1Oracle := rollups.NewArbitrumL1GasOracle(logger.Test(t), feeEstimatorClient) + l1Oracle, err := rollups.NewArbitrumL1GasOracle(logger.Test(t), feeEstimatorClient) + require.NoError(t, err) feeEstimatorClient.On("CallContext", mock.Anything, mock.Anything, "eth_gasPrice").Return(nil).Run(func(args mock.Arguments) { res := args.Get(1).(*hexutil.Big) @@ -93,7 +95,8 @@ func TestArbitrumEstimator(t *testing.T) { t.Run("gas price is lower than user specified max gas price", func(t *testing.T) { feeEstimatorClient := mocks.NewFeeEstimatorClient(t) - l1Oracle := rollups.NewArbitrumL1GasOracle(logger.Test(t), feeEstimatorClient) + l1Oracle, err := rollups.NewArbitrumL1GasOracle(logger.Test(t), feeEstimatorClient) + require.NoError(t, err) o := gas.NewArbitrumEstimator(logger.Test(t), &arbConfig{}, feeEstimatorClient, l1Oracle) @@ -119,7 +122,8 @@ func TestArbitrumEstimator(t *testing.T) { t.Run("gas price is lower than global max gas price", func(t *testing.T) { feeEstimatorClient := mocks.NewFeeEstimatorClient(t) - l1Oracle := rollups.NewArbitrumL1GasOracle(logger.Test(t), feeEstimatorClient) + l1Oracle, err := rollups.NewArbitrumL1GasOracle(logger.Test(t), feeEstimatorClient) + require.NoError(t, err) o := gas.NewArbitrumEstimator(logger.Test(t), &arbConfig{}, feeEstimatorClient, l1Oracle) @@ -144,16 +148,18 @@ func TestArbitrumEstimator(t *testing.T) { t.Run("calling BumpLegacyGas on unstarted arbitrum estimator returns error", func(t *testing.T) { feeEstimatorClient := mocks.NewFeeEstimatorClient(t) - l1Oracle := rollups.NewArbitrumL1GasOracle(logger.Test(t), feeEstimatorClient) + l1Oracle, err := rollups.NewArbitrumL1GasOracle(logger.Test(t), feeEstimatorClient) + require.NoError(t, err) o := gas.NewArbitrumEstimator(logger.Test(t), &arbConfig{}, feeEstimatorClient, l1Oracle) - _, _, err := o.BumpLegacyGas(tests.Context(t), assets.NewWeiI(42), gasLimit, assets.NewWeiI(10), nil) + _, _, err = o.BumpLegacyGas(tests.Context(t), assets.NewWeiI(42), gasLimit, assets.NewWeiI(10), nil) assert.EqualError(t, err, "estimator is not started") }) t.Run("calling GetLegacyGas on started estimator if initial call failed returns error", func(t *testing.T) { feeEstimatorClient := mocks.NewFeeEstimatorClient(t) - l1Oracle := rollups.NewArbitrumL1GasOracle(logger.Test(t), feeEstimatorClient) + l1Oracle, err := rollups.NewArbitrumL1GasOracle(logger.Test(t), feeEstimatorClient) + require.NoError(t, err) o := gas.NewArbitrumEstimator(logger.Test(t), &arbConfig{}, feeEstimatorClient, l1Oracle) @@ -168,35 +174,38 @@ func TestArbitrumEstimator(t *testing.T) { servicetest.RunHealthy(t, o) - _, _, err := o.GetLegacyGas(tests.Context(t), calldata, gasLimit, maxGasPrice) + _, _, err = o.GetLegacyGas(tests.Context(t), calldata, gasLimit, maxGasPrice) assert.EqualError(t, err, "failed to estimate gas; gas price not set") }) t.Run("calling GetDynamicFee always returns error", func(t *testing.T) { feeEstimatorClient := mocks.NewFeeEstimatorClient(t) - l1Oracle := rollups.NewArbitrumL1GasOracle(logger.Test(t), feeEstimatorClient) + l1Oracle, err := rollups.NewArbitrumL1GasOracle(logger.Test(t), feeEstimatorClient) + require.NoError(t, err) o := gas.NewArbitrumEstimator(logger.Test(t), &arbConfig{}, feeEstimatorClient, l1Oracle) - _, err := o.GetDynamicFee(tests.Context(t), maxGasPrice) + _, err = o.GetDynamicFee(tests.Context(t), maxGasPrice) assert.EqualError(t, err, "dynamic fees are not implemented for this estimator") }) t.Run("calling BumpDynamicFee always returns error", func(t *testing.T) { feeEstimatorClient := mocks.NewFeeEstimatorClient(t) - l1Oracle := rollups.NewArbitrumL1GasOracle(logger.Test(t), feeEstimatorClient) + l1Oracle, err := rollups.NewArbitrumL1GasOracle(logger.Test(t), feeEstimatorClient) + require.NoError(t, err) o := gas.NewArbitrumEstimator(logger.Test(t), &arbConfig{}, feeEstimatorClient, l1Oracle) fee := gas.DynamicFee{ FeeCap: assets.NewWeiI(42), TipCap: assets.NewWeiI(5), } - _, err := o.BumpDynamicFee(tests.Context(t), fee, maxGasPrice, nil) + _, err = o.BumpDynamicFee(tests.Context(t), fee, maxGasPrice, nil) assert.EqualError(t, err, "dynamic fees are not implemented for this estimator") }) t.Run("limit computes", func(t *testing.T) { feeEstimatorClient := mocks.NewFeeEstimatorClient(t) - l1Oracle := rollups.NewArbitrumL1GasOracle(logger.Test(t), feeEstimatorClient) + l1Oracle, err := rollups.NewArbitrumL1GasOracle(logger.Test(t), feeEstimatorClient) + require.NoError(t, err) feeEstimatorClient.On("CallContext", mock.Anything, mock.Anything, "eth_gasPrice").Return(nil).Run(func(args mock.Arguments) { res := args.Get(1).(*hexutil.Big) @@ -232,7 +241,8 @@ func TestArbitrumEstimator(t *testing.T) { t.Run("limit exceeds max", func(t *testing.T) { feeEstimatorClient := mocks.NewFeeEstimatorClient(t) - l1Oracle := rollups.NewArbitrumL1GasOracle(logger.Test(t), feeEstimatorClient) + l1Oracle, err := rollups.NewArbitrumL1GasOracle(logger.Test(t), feeEstimatorClient) + require.NoError(t, err) feeEstimatorClient.On("CallContext", mock.Anything, mock.Anything, "eth_gasPrice").Return(nil).Run(func(args mock.Arguments) { res := args.Get(1).(*hexutil.Big) diff --git a/core/chains/evm/gas/block_history_estimator.go b/core/chains/evm/gas/block_history_estimator.go index 16a66e1c8be..4075b46f901 100644 --- a/core/chains/evm/gas/block_history_estimator.go +++ b/core/chains/evm/gas/block_history_estimator.go @@ -91,7 +91,6 @@ type estimatorGasEstimatorConfig interface { bumpConfig } -//go:generate mockery --quiet --name Config --output ./mocks/ --case=underscore type BlockHistoryEstimator struct { services.StateMachine ethClient feeEstimatorClient diff --git a/core/chains/evm/gas/block_history_estimator_test.go b/core/chains/evm/gas/block_history_estimator_test.go index 714d82aa8c6..c2f4a2219cb 100644 --- a/core/chains/evm/gas/block_history_estimator_test.go +++ b/core/chains/evm/gas/block_history_estimator_test.go @@ -1506,6 +1506,15 @@ func TestBlockHistoryEstimator_IsUsable(t *testing.T) { cfg.ChainTypeF = "" assert.Equal(t, true, bhe.IsUsable(tx, block, cfg.ChainType(), geCfg.PriceMin(), logger.Test(t))) }) + + t.Run("returns false if transaction is of type 0x7e only on Scroll", func(t *testing.T) { + cfg.ChainTypeF = string(chaintype.ChainScroll) + tx := evmtypes.Transaction{Type: 0x7e, GasPrice: assets.NewWeiI(10), GasLimit: 42, Hash: utils.NewHash()} + assert.Equal(t, false, bhe.IsUsable(tx, block, cfg.ChainType(), geCfg.PriceMin(), logger.Test(t))) + + cfg.ChainTypeF = "" + assert.Equal(t, true, bhe.IsUsable(tx, block, cfg.ChainType(), geCfg.PriceMin(), logger.Test(t))) + }) } func TestBlockHistoryEstimator_EffectiveTipCap(t *testing.T) { diff --git a/core/chains/evm/gas/chain_specific.go b/core/chains/evm/gas/chain_specific.go index fba2eda66a0..4be7d1972f8 100644 --- a/core/chains/evm/gas/chain_specific.go +++ b/core/chains/evm/gas/chain_specific.go @@ -19,7 +19,7 @@ func chainSpecificIsUsable(tx evmtypes.Transaction, baseFee *assets.Wei, chainTy return false } } - if chainType == chaintype.ChainOptimismBedrock || chainType == chaintype.ChainKroma { + if chainType == chaintype.ChainOptimismBedrock || chainType == chaintype.ChainKroma || chainType == chaintype.ChainScroll { // This is a special deposit transaction type introduced in Bedrock upgrade. // This is a system transaction that it will occur at least one time per block. // We should discard this type before even processing it to avoid flooding the diff --git a/core/chains/evm/gas/mocks/config.go b/core/chains/evm/gas/mocks/config.go index 5daac211762..95c3eda171d 100644 --- a/core/chains/evm/gas/mocks/config.go +++ b/core/chains/evm/gas/mocks/config.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -13,6 +13,14 @@ type Config struct { mock.Mock } +type Config_Expecter struct { + mock *mock.Mock +} + +func (_m *Config) EXPECT() *Config_Expecter { + return &Config_Expecter{mock: &_m.Mock} +} + // ChainType provides a mock function with given fields: func (_m *Config) ChainType() chaintype.ChainType { ret := _m.Called() @@ -31,6 +39,33 @@ func (_m *Config) ChainType() chaintype.ChainType { return r0 } +// Config_ChainType_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChainType' +type Config_ChainType_Call struct { + *mock.Call +} + +// ChainType is a helper method to define mock.On call +func (_e *Config_Expecter) ChainType() *Config_ChainType_Call { + return &Config_ChainType_Call{Call: _e.mock.On("ChainType")} +} + +func (_c *Config_ChainType_Call) Run(run func()) *Config_ChainType_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Config_ChainType_Call) Return(_a0 chaintype.ChainType) *Config_ChainType_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Config_ChainType_Call) RunAndReturn(run func() chaintype.ChainType) *Config_ChainType_Call { + _c.Call.Return(run) + return _c +} + // FinalityDepth provides a mock function with given fields: func (_m *Config) FinalityDepth() uint32 { ret := _m.Called() @@ -49,6 +84,33 @@ func (_m *Config) FinalityDepth() uint32 { return r0 } +// Config_FinalityDepth_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FinalityDepth' +type Config_FinalityDepth_Call struct { + *mock.Call +} + +// FinalityDepth is a helper method to define mock.On call +func (_e *Config_Expecter) FinalityDepth() *Config_FinalityDepth_Call { + return &Config_FinalityDepth_Call{Call: _e.mock.On("FinalityDepth")} +} + +func (_c *Config_FinalityDepth_Call) Run(run func()) *Config_FinalityDepth_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Config_FinalityDepth_Call) Return(_a0 uint32) *Config_FinalityDepth_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Config_FinalityDepth_Call) RunAndReturn(run func() uint32) *Config_FinalityDepth_Call { + _c.Call.Return(run) + return _c +} + // FinalityTagEnabled provides a mock function with given fields: func (_m *Config) FinalityTagEnabled() bool { ret := _m.Called() @@ -67,6 +129,33 @@ func (_m *Config) FinalityTagEnabled() bool { return r0 } +// Config_FinalityTagEnabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FinalityTagEnabled' +type Config_FinalityTagEnabled_Call struct { + *mock.Call +} + +// FinalityTagEnabled is a helper method to define mock.On call +func (_e *Config_Expecter) FinalityTagEnabled() *Config_FinalityTagEnabled_Call { + return &Config_FinalityTagEnabled_Call{Call: _e.mock.On("FinalityTagEnabled")} +} + +func (_c *Config_FinalityTagEnabled_Call) Run(run func()) *Config_FinalityTagEnabled_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Config_FinalityTagEnabled_Call) Return(_a0 bool) *Config_FinalityTagEnabled_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Config_FinalityTagEnabled_Call) RunAndReturn(run func() bool) *Config_FinalityTagEnabled_Call { + _c.Call.Return(run) + return _c +} + // 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/gas/mocks/eth_client.go b/core/chains/evm/gas/mocks/eth_client.go deleted file mode 100644 index a8cc5afa8d9..00000000000 --- a/core/chains/evm/gas/mocks/eth_client.go +++ /dev/null @@ -1,61 +0,0 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package mocks - -import ( - context "context" - big "math/big" - - ethereum "github.com/ethereum/go-ethereum" - - mock "github.com/stretchr/testify/mock" -) - -// ETHClient is an autogenerated mock type for the ethClient type -type ETHClient struct { - mock.Mock -} - -// CallContract provides a mock function with given fields: ctx, msg, blockNumber -func (_m *ETHClient) CallContract(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int) ([]byte, error) { - ret := _m.Called(ctx, msg, blockNumber) - - if len(ret) == 0 { - panic("no return value specified for CallContract") - } - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, ethereum.CallMsg, *big.Int) ([]byte, error)); ok { - return rf(ctx, msg, blockNumber) - } - if rf, ok := ret.Get(0).(func(context.Context, ethereum.CallMsg, *big.Int) []byte); ok { - r0 = rf(ctx, msg, blockNumber) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, ethereum.CallMsg, *big.Int) error); ok { - r1 = rf(ctx, msg, blockNumber) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NewETHClient creates a new instance of ETHClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewETHClient(t interface { - mock.TestingT - Cleanup(func()) -}) *ETHClient { - mock := ÐClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/chains/evm/gas/mocks/evm_estimator.go b/core/chains/evm/gas/mocks/evm_estimator.go index 1213a71742d..12e2f934c48 100644 --- a/core/chains/evm/gas/mocks/evm_estimator.go +++ b/core/chains/evm/gas/mocks/evm_estimator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -23,6 +23,14 @@ type EvmEstimator struct { mock.Mock } +type EvmEstimator_Expecter struct { + mock *mock.Mock +} + +func (_m *EvmEstimator) EXPECT() *EvmEstimator_Expecter { + return &EvmEstimator_Expecter{mock: &_m.Mock} +} + // BumpDynamicFee provides a mock function with given fields: ctx, original, maxGasPriceWei, attempts func (_m *EvmEstimator) BumpDynamicFee(ctx context.Context, original gas.DynamicFee, maxGasPriceWei *assets.Wei, attempts []gas.EvmPriorAttempt) (gas.DynamicFee, error) { ret := _m.Called(ctx, original, maxGasPriceWei, attempts) @@ -51,6 +59,37 @@ func (_m *EvmEstimator) BumpDynamicFee(ctx context.Context, original gas.Dynamic return r0, r1 } +// EvmEstimator_BumpDynamicFee_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BumpDynamicFee' +type EvmEstimator_BumpDynamicFee_Call struct { + *mock.Call +} + +// BumpDynamicFee is a helper method to define mock.On call +// - ctx context.Context +// - original gas.DynamicFee +// - maxGasPriceWei *assets.Wei +// - attempts []gas.EvmPriorAttempt +func (_e *EvmEstimator_Expecter) BumpDynamicFee(ctx interface{}, original interface{}, maxGasPriceWei interface{}, attempts interface{}) *EvmEstimator_BumpDynamicFee_Call { + return &EvmEstimator_BumpDynamicFee_Call{Call: _e.mock.On("BumpDynamicFee", ctx, original, maxGasPriceWei, attempts)} +} + +func (_c *EvmEstimator_BumpDynamicFee_Call) Run(run func(ctx context.Context, original gas.DynamicFee, maxGasPriceWei *assets.Wei, attempts []gas.EvmPriorAttempt)) *EvmEstimator_BumpDynamicFee_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(gas.DynamicFee), args[2].(*assets.Wei), args[3].([]gas.EvmPriorAttempt)) + }) + return _c +} + +func (_c *EvmEstimator_BumpDynamicFee_Call) Return(bumped gas.DynamicFee, err error) *EvmEstimator_BumpDynamicFee_Call { + _c.Call.Return(bumped, err) + return _c +} + +func (_c *EvmEstimator_BumpDynamicFee_Call) RunAndReturn(run func(context.Context, gas.DynamicFee, *assets.Wei, []gas.EvmPriorAttempt) (gas.DynamicFee, error)) *EvmEstimator_BumpDynamicFee_Call { + _c.Call.Return(run) + return _c +} + // BumpLegacyGas provides a mock function with given fields: ctx, originalGasPrice, gasLimit, maxGasPriceWei, attempts 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) @@ -88,6 +127,38 @@ func (_m *EvmEstimator) BumpLegacyGas(ctx context.Context, originalGasPrice *ass return r0, r1, r2 } +// EvmEstimator_BumpLegacyGas_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BumpLegacyGas' +type EvmEstimator_BumpLegacyGas_Call struct { + *mock.Call +} + +// BumpLegacyGas is a helper method to define mock.On call +// - ctx context.Context +// - originalGasPrice *assets.Wei +// - gasLimit uint64 +// - maxGasPriceWei *assets.Wei +// - attempts []gas.EvmPriorAttempt +func (_e *EvmEstimator_Expecter) BumpLegacyGas(ctx interface{}, originalGasPrice interface{}, gasLimit interface{}, maxGasPriceWei interface{}, attempts interface{}) *EvmEstimator_BumpLegacyGas_Call { + return &EvmEstimator_BumpLegacyGas_Call{Call: _e.mock.On("BumpLegacyGas", ctx, originalGasPrice, gasLimit, maxGasPriceWei, attempts)} +} + +func (_c *EvmEstimator_BumpLegacyGas_Call) Run(run func(ctx context.Context, originalGasPrice *assets.Wei, gasLimit uint64, maxGasPriceWei *assets.Wei, attempts []gas.EvmPriorAttempt)) *EvmEstimator_BumpLegacyGas_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*assets.Wei), args[2].(uint64), args[3].(*assets.Wei), args[4].([]gas.EvmPriorAttempt)) + }) + return _c +} + +func (_c *EvmEstimator_BumpLegacyGas_Call) Return(bumpedGasPrice *assets.Wei, chainSpecificGasLimit uint64, err error) *EvmEstimator_BumpLegacyGas_Call { + _c.Call.Return(bumpedGasPrice, chainSpecificGasLimit, err) + return _c +} + +func (_c *EvmEstimator_BumpLegacyGas_Call) RunAndReturn(run func(context.Context, *assets.Wei, uint64, *assets.Wei, []gas.EvmPriorAttempt) (*assets.Wei, uint64, error)) *EvmEstimator_BumpLegacyGas_Call { + _c.Call.Return(run) + return _c +} + // Close provides a mock function with given fields: func (_m *EvmEstimator) Close() error { ret := _m.Called() @@ -106,6 +177,33 @@ func (_m *EvmEstimator) Close() error { return r0 } +// EvmEstimator_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type EvmEstimator_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *EvmEstimator_Expecter) Close() *EvmEstimator_Close_Call { + return &EvmEstimator_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *EvmEstimator_Close_Call) Run(run func()) *EvmEstimator_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *EvmEstimator_Close_Call) Return(_a0 error) *EvmEstimator_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvmEstimator_Close_Call) RunAndReturn(run func() error) *EvmEstimator_Close_Call { + _c.Call.Return(run) + return _c +} + // GetDynamicFee provides a mock function with given fields: ctx, maxGasPriceWei func (_m *EvmEstimator) GetDynamicFee(ctx context.Context, maxGasPriceWei *assets.Wei) (gas.DynamicFee, error) { ret := _m.Called(ctx, maxGasPriceWei) @@ -134,6 +232,35 @@ func (_m *EvmEstimator) GetDynamicFee(ctx context.Context, maxGasPriceWei *asset return r0, r1 } +// EvmEstimator_GetDynamicFee_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDynamicFee' +type EvmEstimator_GetDynamicFee_Call struct { + *mock.Call +} + +// GetDynamicFee is a helper method to define mock.On call +// - ctx context.Context +// - maxGasPriceWei *assets.Wei +func (_e *EvmEstimator_Expecter) GetDynamicFee(ctx interface{}, maxGasPriceWei interface{}) *EvmEstimator_GetDynamicFee_Call { + return &EvmEstimator_GetDynamicFee_Call{Call: _e.mock.On("GetDynamicFee", ctx, maxGasPriceWei)} +} + +func (_c *EvmEstimator_GetDynamicFee_Call) Run(run func(ctx context.Context, maxGasPriceWei *assets.Wei)) *EvmEstimator_GetDynamicFee_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*assets.Wei)) + }) + return _c +} + +func (_c *EvmEstimator_GetDynamicFee_Call) Return(fee gas.DynamicFee, err error) *EvmEstimator_GetDynamicFee_Call { + _c.Call.Return(fee, err) + return _c +} + +func (_c *EvmEstimator_GetDynamicFee_Call) RunAndReturn(run func(context.Context, *assets.Wei) (gas.DynamicFee, error)) *EvmEstimator_GetDynamicFee_Call { + _c.Call.Return(run) + return _c +} + // GetLegacyGas provides a mock function with given fields: ctx, calldata, gasLimit, maxGasPriceWei, opts 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)) @@ -178,6 +305,45 @@ func (_m *EvmEstimator) GetLegacyGas(ctx context.Context, calldata []byte, gasLi return r0, r1, r2 } +// EvmEstimator_GetLegacyGas_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLegacyGas' +type EvmEstimator_GetLegacyGas_Call struct { + *mock.Call +} + +// GetLegacyGas is a helper method to define mock.On call +// - ctx context.Context +// - calldata []byte +// - gasLimit uint64 +// - maxGasPriceWei *assets.Wei +// - opts ...types.Opt +func (_e *EvmEstimator_Expecter) GetLegacyGas(ctx interface{}, calldata interface{}, gasLimit interface{}, maxGasPriceWei interface{}, opts ...interface{}) *EvmEstimator_GetLegacyGas_Call { + return &EvmEstimator_GetLegacyGas_Call{Call: _e.mock.On("GetLegacyGas", + append([]interface{}{ctx, calldata, gasLimit, maxGasPriceWei}, opts...)...)} +} + +func (_c *EvmEstimator_GetLegacyGas_Call) Run(run func(ctx context.Context, calldata []byte, gasLimit uint64, maxGasPriceWei *assets.Wei, opts ...types.Opt)) *EvmEstimator_GetLegacyGas_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]types.Opt, len(args)-4) + for i, a := range args[4:] { + if a != nil { + variadicArgs[i] = a.(types.Opt) + } + } + run(args[0].(context.Context), args[1].([]byte), args[2].(uint64), args[3].(*assets.Wei), variadicArgs...) + }) + return _c +} + +func (_c *EvmEstimator_GetLegacyGas_Call) Return(gasPrice *assets.Wei, chainSpecificGasLimit uint64, err error) *EvmEstimator_GetLegacyGas_Call { + _c.Call.Return(gasPrice, chainSpecificGasLimit, err) + return _c +} + +func (_c *EvmEstimator_GetLegacyGas_Call) RunAndReturn(run func(context.Context, []byte, uint64, *assets.Wei, ...types.Opt) (*assets.Wei, uint64, error)) *EvmEstimator_GetLegacyGas_Call { + _c.Call.Return(run) + return _c +} + // HealthReport provides a mock function with given fields: func (_m *EvmEstimator) HealthReport() map[string]error { ret := _m.Called() @@ -198,6 +364,33 @@ func (_m *EvmEstimator) HealthReport() map[string]error { return r0 } +// EvmEstimator_HealthReport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HealthReport' +type EvmEstimator_HealthReport_Call struct { + *mock.Call +} + +// HealthReport is a helper method to define mock.On call +func (_e *EvmEstimator_Expecter) HealthReport() *EvmEstimator_HealthReport_Call { + return &EvmEstimator_HealthReport_Call{Call: _e.mock.On("HealthReport")} +} + +func (_c *EvmEstimator_HealthReport_Call) Run(run func()) *EvmEstimator_HealthReport_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *EvmEstimator_HealthReport_Call) Return(_a0 map[string]error) *EvmEstimator_HealthReport_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvmEstimator_HealthReport_Call) RunAndReturn(run func() map[string]error) *EvmEstimator_HealthReport_Call { + _c.Call.Return(run) + return _c +} + // L1Oracle provides a mock function with given fields: func (_m *EvmEstimator) L1Oracle() rollups.L1Oracle { ret := _m.Called() @@ -218,6 +411,33 @@ func (_m *EvmEstimator) L1Oracle() rollups.L1Oracle { return r0 } +// EvmEstimator_L1Oracle_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'L1Oracle' +type EvmEstimator_L1Oracle_Call struct { + *mock.Call +} + +// L1Oracle is a helper method to define mock.On call +func (_e *EvmEstimator_Expecter) L1Oracle() *EvmEstimator_L1Oracle_Call { + return &EvmEstimator_L1Oracle_Call{Call: _e.mock.On("L1Oracle")} +} + +func (_c *EvmEstimator_L1Oracle_Call) Run(run func()) *EvmEstimator_L1Oracle_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *EvmEstimator_L1Oracle_Call) Return(_a0 rollups.L1Oracle) *EvmEstimator_L1Oracle_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvmEstimator_L1Oracle_Call) RunAndReturn(run func() rollups.L1Oracle) *EvmEstimator_L1Oracle_Call { + _c.Call.Return(run) + return _c +} + // Name provides a mock function with given fields: func (_m *EvmEstimator) Name() string { ret := _m.Called() @@ -236,11 +456,67 @@ func (_m *EvmEstimator) Name() string { return r0 } +// EvmEstimator_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type EvmEstimator_Name_Call struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *EvmEstimator_Expecter) Name() *EvmEstimator_Name_Call { + return &EvmEstimator_Name_Call{Call: _e.mock.On("Name")} +} + +func (_c *EvmEstimator_Name_Call) Run(run func()) *EvmEstimator_Name_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *EvmEstimator_Name_Call) Return(_a0 string) *EvmEstimator_Name_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvmEstimator_Name_Call) RunAndReturn(run func() string) *EvmEstimator_Name_Call { + _c.Call.Return(run) + return _c +} + // OnNewLongestChain provides a mock function with given fields: ctx, head func (_m *EvmEstimator) OnNewLongestChain(ctx context.Context, head *evmtypes.Head) { _m.Called(ctx, head) } +// EvmEstimator_OnNewLongestChain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnNewLongestChain' +type EvmEstimator_OnNewLongestChain_Call struct { + *mock.Call +} + +// OnNewLongestChain is a helper method to define mock.On call +// - ctx context.Context +// - head *evmtypes.Head +func (_e *EvmEstimator_Expecter) OnNewLongestChain(ctx interface{}, head interface{}) *EvmEstimator_OnNewLongestChain_Call { + return &EvmEstimator_OnNewLongestChain_Call{Call: _e.mock.On("OnNewLongestChain", ctx, head)} +} + +func (_c *EvmEstimator_OnNewLongestChain_Call) Run(run func(ctx context.Context, head *evmtypes.Head)) *EvmEstimator_OnNewLongestChain_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*evmtypes.Head)) + }) + return _c +} + +func (_c *EvmEstimator_OnNewLongestChain_Call) Return() *EvmEstimator_OnNewLongestChain_Call { + _c.Call.Return() + return _c +} + +func (_c *EvmEstimator_OnNewLongestChain_Call) RunAndReturn(run func(context.Context, *evmtypes.Head)) *EvmEstimator_OnNewLongestChain_Call { + _c.Call.Return(run) + return _c +} + // Ready provides a mock function with given fields: func (_m *EvmEstimator) Ready() error { ret := _m.Called() @@ -259,6 +535,33 @@ func (_m *EvmEstimator) Ready() error { return r0 } +// EvmEstimator_Ready_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ready' +type EvmEstimator_Ready_Call struct { + *mock.Call +} + +// Ready is a helper method to define mock.On call +func (_e *EvmEstimator_Expecter) Ready() *EvmEstimator_Ready_Call { + return &EvmEstimator_Ready_Call{Call: _e.mock.On("Ready")} +} + +func (_c *EvmEstimator_Ready_Call) Run(run func()) *EvmEstimator_Ready_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *EvmEstimator_Ready_Call) Return(_a0 error) *EvmEstimator_Ready_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvmEstimator_Ready_Call) RunAndReturn(run func() error) *EvmEstimator_Ready_Call { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *EvmEstimator) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -277,6 +580,34 @@ func (_m *EvmEstimator) Start(_a0 context.Context) error { return r0 } +// EvmEstimator_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type EvmEstimator_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *EvmEstimator_Expecter) Start(_a0 interface{}) *EvmEstimator_Start_Call { + return &EvmEstimator_Start_Call{Call: _e.mock.On("Start", _a0)} +} + +func (_c *EvmEstimator_Start_Call) Run(run func(_a0 context.Context)) *EvmEstimator_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *EvmEstimator_Start_Call) Return(_a0 error) *EvmEstimator_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvmEstimator_Start_Call) RunAndReturn(run func(context.Context) error) *EvmEstimator_Start_Call { + _c.Call.Return(run) + return _c +} + // NewEvmEstimator creates a new instance of EvmEstimator. 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 NewEvmEstimator(t interface { diff --git a/core/chains/evm/gas/mocks/evm_fee_estimator.go b/core/chains/evm/gas/mocks/evm_fee_estimator.go index 5179a2560d0..a9adc261ce3 100644 --- a/core/chains/evm/gas/mocks/evm_fee_estimator.go +++ b/core/chains/evm/gas/mocks/evm_fee_estimator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -25,6 +25,14 @@ type EvmFeeEstimator struct { mock.Mock } +type EvmFeeEstimator_Expecter struct { + mock *mock.Mock +} + +func (_m *EvmFeeEstimator) EXPECT() *EvmFeeEstimator_Expecter { + return &EvmFeeEstimator_Expecter{mock: &_m.Mock} +} + // BumpFee provides a mock function with given fields: ctx, originalFee, feeLimit, maxFeePrice, attempts 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) @@ -60,6 +68,38 @@ func (_m *EvmFeeEstimator) BumpFee(ctx context.Context, originalFee gas.EvmFee, return r0, r1, r2 } +// EvmFeeEstimator_BumpFee_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BumpFee' +type EvmFeeEstimator_BumpFee_Call struct { + *mock.Call +} + +// BumpFee is a helper method to define mock.On call +// - ctx context.Context +// - originalFee gas.EvmFee +// - feeLimit uint64 +// - maxFeePrice *assets.Wei +// - attempts []gas.EvmPriorAttempt +func (_e *EvmFeeEstimator_Expecter) BumpFee(ctx interface{}, originalFee interface{}, feeLimit interface{}, maxFeePrice interface{}, attempts interface{}) *EvmFeeEstimator_BumpFee_Call { + return &EvmFeeEstimator_BumpFee_Call{Call: _e.mock.On("BumpFee", ctx, originalFee, feeLimit, maxFeePrice, attempts)} +} + +func (_c *EvmFeeEstimator_BumpFee_Call) Run(run func(ctx context.Context, originalFee gas.EvmFee, feeLimit uint64, maxFeePrice *assets.Wei, attempts []gas.EvmPriorAttempt)) *EvmFeeEstimator_BumpFee_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(gas.EvmFee), args[2].(uint64), args[3].(*assets.Wei), args[4].([]gas.EvmPriorAttempt)) + }) + return _c +} + +func (_c *EvmFeeEstimator_BumpFee_Call) Return(bumpedFee gas.EvmFee, chainSpecificFeeLimit uint64, err error) *EvmFeeEstimator_BumpFee_Call { + _c.Call.Return(bumpedFee, chainSpecificFeeLimit, err) + return _c +} + +func (_c *EvmFeeEstimator_BumpFee_Call) RunAndReturn(run func(context.Context, gas.EvmFee, uint64, *assets.Wei, []gas.EvmPriorAttempt) (gas.EvmFee, uint64, error)) *EvmFeeEstimator_BumpFee_Call { + _c.Call.Return(run) + return _c +} + // Close provides a mock function with given fields: func (_m *EvmFeeEstimator) Close() error { ret := _m.Called() @@ -78,6 +118,33 @@ func (_m *EvmFeeEstimator) Close() error { return r0 } +// EvmFeeEstimator_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type EvmFeeEstimator_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *EvmFeeEstimator_Expecter) Close() *EvmFeeEstimator_Close_Call { + return &EvmFeeEstimator_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *EvmFeeEstimator_Close_Call) Run(run func()) *EvmFeeEstimator_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *EvmFeeEstimator_Close_Call) Return(_a0 error) *EvmFeeEstimator_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvmFeeEstimator_Close_Call) RunAndReturn(run func() error) *EvmFeeEstimator_Close_Call { + _c.Call.Return(run) + return _c +} + // GetFee provides a mock function with given fields: ctx, calldata, feeLimit, maxFeePrice, opts 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)) @@ -120,6 +187,45 @@ func (_m *EvmFeeEstimator) GetFee(ctx context.Context, calldata []byte, feeLimit return r0, r1, r2 } +// EvmFeeEstimator_GetFee_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFee' +type EvmFeeEstimator_GetFee_Call struct { + *mock.Call +} + +// GetFee is a helper method to define mock.On call +// - ctx context.Context +// - calldata []byte +// - feeLimit uint64 +// - maxFeePrice *assets.Wei +// - opts ...types.Opt +func (_e *EvmFeeEstimator_Expecter) GetFee(ctx interface{}, calldata interface{}, feeLimit interface{}, maxFeePrice interface{}, opts ...interface{}) *EvmFeeEstimator_GetFee_Call { + return &EvmFeeEstimator_GetFee_Call{Call: _e.mock.On("GetFee", + append([]interface{}{ctx, calldata, feeLimit, maxFeePrice}, opts...)...)} +} + +func (_c *EvmFeeEstimator_GetFee_Call) Run(run func(ctx context.Context, calldata []byte, feeLimit uint64, maxFeePrice *assets.Wei, opts ...types.Opt)) *EvmFeeEstimator_GetFee_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]types.Opt, len(args)-4) + for i, a := range args[4:] { + if a != nil { + variadicArgs[i] = a.(types.Opt) + } + } + run(args[0].(context.Context), args[1].([]byte), args[2].(uint64), args[3].(*assets.Wei), variadicArgs...) + }) + return _c +} + +func (_c *EvmFeeEstimator_GetFee_Call) Return(fee gas.EvmFee, chainSpecificFeeLimit uint64, err error) *EvmFeeEstimator_GetFee_Call { + _c.Call.Return(fee, chainSpecificFeeLimit, err) + return _c +} + +func (_c *EvmFeeEstimator_GetFee_Call) RunAndReturn(run func(context.Context, []byte, uint64, *assets.Wei, ...types.Opt) (gas.EvmFee, uint64, error)) *EvmFeeEstimator_GetFee_Call { + _c.Call.Return(run) + return _c +} + // 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 uint64, maxFeePrice *assets.Wei, opts ...types.Opt) (*big.Int, error) { _va := make([]interface{}, len(opts)) @@ -157,6 +263,46 @@ func (_m *EvmFeeEstimator) GetMaxCost(ctx context.Context, amount assets.Eth, ca return r0, r1 } +// EvmFeeEstimator_GetMaxCost_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMaxCost' +type EvmFeeEstimator_GetMaxCost_Call struct { + *mock.Call +} + +// GetMaxCost is a helper method to define mock.On call +// - ctx context.Context +// - amount assets.Eth +// - calldata []byte +// - feeLimit uint64 +// - maxFeePrice *assets.Wei +// - opts ...types.Opt +func (_e *EvmFeeEstimator_Expecter) GetMaxCost(ctx interface{}, amount interface{}, calldata interface{}, feeLimit interface{}, maxFeePrice interface{}, opts ...interface{}) *EvmFeeEstimator_GetMaxCost_Call { + return &EvmFeeEstimator_GetMaxCost_Call{Call: _e.mock.On("GetMaxCost", + append([]interface{}{ctx, amount, calldata, feeLimit, maxFeePrice}, opts...)...)} +} + +func (_c *EvmFeeEstimator_GetMaxCost_Call) Run(run func(ctx context.Context, amount assets.Eth, calldata []byte, feeLimit uint64, maxFeePrice *assets.Wei, opts ...types.Opt)) *EvmFeeEstimator_GetMaxCost_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]types.Opt, len(args)-5) + for i, a := range args[5:] { + if a != nil { + variadicArgs[i] = a.(types.Opt) + } + } + run(args[0].(context.Context), args[1].(assets.Eth), args[2].([]byte), args[3].(uint64), args[4].(*assets.Wei), variadicArgs...) + }) + return _c +} + +func (_c *EvmFeeEstimator_GetMaxCost_Call) Return(_a0 *big.Int, _a1 error) *EvmFeeEstimator_GetMaxCost_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EvmFeeEstimator_GetMaxCost_Call) RunAndReturn(run func(context.Context, assets.Eth, []byte, uint64, *assets.Wei, ...types.Opt) (*big.Int, error)) *EvmFeeEstimator_GetMaxCost_Call { + _c.Call.Return(run) + return _c +} + // HealthReport provides a mock function with given fields: func (_m *EvmFeeEstimator) HealthReport() map[string]error { ret := _m.Called() @@ -177,6 +323,33 @@ func (_m *EvmFeeEstimator) HealthReport() map[string]error { return r0 } +// EvmFeeEstimator_HealthReport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HealthReport' +type EvmFeeEstimator_HealthReport_Call struct { + *mock.Call +} + +// HealthReport is a helper method to define mock.On call +func (_e *EvmFeeEstimator_Expecter) HealthReport() *EvmFeeEstimator_HealthReport_Call { + return &EvmFeeEstimator_HealthReport_Call{Call: _e.mock.On("HealthReport")} +} + +func (_c *EvmFeeEstimator_HealthReport_Call) Run(run func()) *EvmFeeEstimator_HealthReport_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *EvmFeeEstimator_HealthReport_Call) Return(_a0 map[string]error) *EvmFeeEstimator_HealthReport_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvmFeeEstimator_HealthReport_Call) RunAndReturn(run func() map[string]error) *EvmFeeEstimator_HealthReport_Call { + _c.Call.Return(run) + return _c +} + // L1Oracle provides a mock function with given fields: func (_m *EvmFeeEstimator) L1Oracle() rollups.L1Oracle { ret := _m.Called() @@ -197,6 +370,33 @@ func (_m *EvmFeeEstimator) L1Oracle() rollups.L1Oracle { return r0 } +// EvmFeeEstimator_L1Oracle_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'L1Oracle' +type EvmFeeEstimator_L1Oracle_Call struct { + *mock.Call +} + +// L1Oracle is a helper method to define mock.On call +func (_e *EvmFeeEstimator_Expecter) L1Oracle() *EvmFeeEstimator_L1Oracle_Call { + return &EvmFeeEstimator_L1Oracle_Call{Call: _e.mock.On("L1Oracle")} +} + +func (_c *EvmFeeEstimator_L1Oracle_Call) Run(run func()) *EvmFeeEstimator_L1Oracle_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *EvmFeeEstimator_L1Oracle_Call) Return(_a0 rollups.L1Oracle) *EvmFeeEstimator_L1Oracle_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvmFeeEstimator_L1Oracle_Call) RunAndReturn(run func() rollups.L1Oracle) *EvmFeeEstimator_L1Oracle_Call { + _c.Call.Return(run) + return _c +} + // Name provides a mock function with given fields: func (_m *EvmFeeEstimator) Name() string { ret := _m.Called() @@ -215,11 +415,67 @@ func (_m *EvmFeeEstimator) Name() string { return r0 } +// EvmFeeEstimator_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type EvmFeeEstimator_Name_Call struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *EvmFeeEstimator_Expecter) Name() *EvmFeeEstimator_Name_Call { + return &EvmFeeEstimator_Name_Call{Call: _e.mock.On("Name")} +} + +func (_c *EvmFeeEstimator_Name_Call) Run(run func()) *EvmFeeEstimator_Name_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *EvmFeeEstimator_Name_Call) Return(_a0 string) *EvmFeeEstimator_Name_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvmFeeEstimator_Name_Call) RunAndReturn(run func() string) *EvmFeeEstimator_Name_Call { + _c.Call.Return(run) + return _c +} + // OnNewLongestChain provides a mock function with given fields: ctx, head func (_m *EvmFeeEstimator) OnNewLongestChain(ctx context.Context, head *evmtypes.Head) { _m.Called(ctx, head) } +// EvmFeeEstimator_OnNewLongestChain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnNewLongestChain' +type EvmFeeEstimator_OnNewLongestChain_Call struct { + *mock.Call +} + +// OnNewLongestChain is a helper method to define mock.On call +// - ctx context.Context +// - head *evmtypes.Head +func (_e *EvmFeeEstimator_Expecter) OnNewLongestChain(ctx interface{}, head interface{}) *EvmFeeEstimator_OnNewLongestChain_Call { + return &EvmFeeEstimator_OnNewLongestChain_Call{Call: _e.mock.On("OnNewLongestChain", ctx, head)} +} + +func (_c *EvmFeeEstimator_OnNewLongestChain_Call) Run(run func(ctx context.Context, head *evmtypes.Head)) *EvmFeeEstimator_OnNewLongestChain_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*evmtypes.Head)) + }) + return _c +} + +func (_c *EvmFeeEstimator_OnNewLongestChain_Call) Return() *EvmFeeEstimator_OnNewLongestChain_Call { + _c.Call.Return() + return _c +} + +func (_c *EvmFeeEstimator_OnNewLongestChain_Call) RunAndReturn(run func(context.Context, *evmtypes.Head)) *EvmFeeEstimator_OnNewLongestChain_Call { + _c.Call.Return(run) + return _c +} + // Ready provides a mock function with given fields: func (_m *EvmFeeEstimator) Ready() error { ret := _m.Called() @@ -238,6 +494,33 @@ func (_m *EvmFeeEstimator) Ready() error { return r0 } +// EvmFeeEstimator_Ready_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ready' +type EvmFeeEstimator_Ready_Call struct { + *mock.Call +} + +// Ready is a helper method to define mock.On call +func (_e *EvmFeeEstimator_Expecter) Ready() *EvmFeeEstimator_Ready_Call { + return &EvmFeeEstimator_Ready_Call{Call: _e.mock.On("Ready")} +} + +func (_c *EvmFeeEstimator_Ready_Call) Run(run func()) *EvmFeeEstimator_Ready_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *EvmFeeEstimator_Ready_Call) Return(_a0 error) *EvmFeeEstimator_Ready_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvmFeeEstimator_Ready_Call) RunAndReturn(run func() error) *EvmFeeEstimator_Ready_Call { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *EvmFeeEstimator) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -256,6 +539,34 @@ func (_m *EvmFeeEstimator) Start(_a0 context.Context) error { return r0 } +// EvmFeeEstimator_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type EvmFeeEstimator_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *EvmFeeEstimator_Expecter) Start(_a0 interface{}) *EvmFeeEstimator_Start_Call { + return &EvmFeeEstimator_Start_Call{Call: _e.mock.On("Start", _a0)} +} + +func (_c *EvmFeeEstimator_Start_Call) Run(run func(_a0 context.Context)) *EvmFeeEstimator_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *EvmFeeEstimator_Start_Call) Return(_a0 error) *EvmFeeEstimator_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvmFeeEstimator_Start_Call) RunAndReturn(run func(context.Context) error) *EvmFeeEstimator_Start_Call { + _c.Call.Return(run) + return _c +} + // NewEvmFeeEstimator creates a new instance of EvmFeeEstimator. 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 NewEvmFeeEstimator(t interface { diff --git a/core/chains/evm/gas/mocks/fee_estimator_client.go b/core/chains/evm/gas/mocks/fee_estimator_client.go index d81120e2ed4..8e10107597f 100644 --- a/core/chains/evm/gas/mocks/fee_estimator_client.go +++ b/core/chains/evm/gas/mocks/fee_estimator_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -20,6 +20,14 @@ type FeeEstimatorClient struct { mock.Mock } +type FeeEstimatorClient_Expecter struct { + mock *mock.Mock +} + +func (_m *FeeEstimatorClient) EXPECT() *FeeEstimatorClient_Expecter { + return &FeeEstimatorClient_Expecter{mock: &_m.Mock} +} + // BatchCallContext provides a mock function with given fields: ctx, b func (_m *FeeEstimatorClient) BatchCallContext(ctx context.Context, b []rpc.BatchElem) error { ret := _m.Called(ctx, b) @@ -38,6 +46,35 @@ func (_m *FeeEstimatorClient) BatchCallContext(ctx context.Context, b []rpc.Batc return r0 } +// FeeEstimatorClient_BatchCallContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BatchCallContext' +type FeeEstimatorClient_BatchCallContext_Call struct { + *mock.Call +} + +// BatchCallContext is a helper method to define mock.On call +// - ctx context.Context +// - b []rpc.BatchElem +func (_e *FeeEstimatorClient_Expecter) BatchCallContext(ctx interface{}, b interface{}) *FeeEstimatorClient_BatchCallContext_Call { + return &FeeEstimatorClient_BatchCallContext_Call{Call: _e.mock.On("BatchCallContext", ctx, b)} +} + +func (_c *FeeEstimatorClient_BatchCallContext_Call) Run(run func(ctx context.Context, b []rpc.BatchElem)) *FeeEstimatorClient_BatchCallContext_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]rpc.BatchElem)) + }) + return _c +} + +func (_c *FeeEstimatorClient_BatchCallContext_Call) Return(_a0 error) *FeeEstimatorClient_BatchCallContext_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *FeeEstimatorClient_BatchCallContext_Call) RunAndReturn(run func(context.Context, []rpc.BatchElem) error) *FeeEstimatorClient_BatchCallContext_Call { + _c.Call.Return(run) + return _c +} + // CallContext provides a mock function with given fields: ctx, result, method, args func (_m *FeeEstimatorClient) CallContext(ctx context.Context, result interface{}, method string, args ...interface{}) error { var _ca []interface{} @@ -59,6 +96,44 @@ func (_m *FeeEstimatorClient) CallContext(ctx context.Context, result interface{ return r0 } +// FeeEstimatorClient_CallContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CallContext' +type FeeEstimatorClient_CallContext_Call struct { + *mock.Call +} + +// CallContext is a helper method to define mock.On call +// - ctx context.Context +// - result interface{} +// - method string +// - args ...interface{} +func (_e *FeeEstimatorClient_Expecter) CallContext(ctx interface{}, result interface{}, method interface{}, args ...interface{}) *FeeEstimatorClient_CallContext_Call { + return &FeeEstimatorClient_CallContext_Call{Call: _e.mock.On("CallContext", + append([]interface{}{ctx, result, method}, args...)...)} +} + +func (_c *FeeEstimatorClient_CallContext_Call) Run(run func(ctx context.Context, result interface{}, method string, args ...interface{})) *FeeEstimatorClient_CallContext_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-3) + for i, a := range args[3:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(args[0].(context.Context), args[1].(interface{}), args[2].(string), variadicArgs...) + }) + return _c +} + +func (_c *FeeEstimatorClient_CallContext_Call) Return(_a0 error) *FeeEstimatorClient_CallContext_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *FeeEstimatorClient_CallContext_Call) RunAndReturn(run func(context.Context, interface{}, string, ...interface{}) error) *FeeEstimatorClient_CallContext_Call { + _c.Call.Return(run) + return _c +} + // CallContract provides a mock function with given fields: ctx, msg, blockNumber func (_m *FeeEstimatorClient) CallContract(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int) ([]byte, error) { ret := _m.Called(ctx, msg, blockNumber) @@ -89,6 +164,36 @@ func (_m *FeeEstimatorClient) CallContract(ctx context.Context, msg ethereum.Cal return r0, r1 } +// FeeEstimatorClient_CallContract_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CallContract' +type FeeEstimatorClient_CallContract_Call struct { + *mock.Call +} + +// CallContract is a helper method to define mock.On call +// - ctx context.Context +// - msg ethereum.CallMsg +// - blockNumber *big.Int +func (_e *FeeEstimatorClient_Expecter) CallContract(ctx interface{}, msg interface{}, blockNumber interface{}) *FeeEstimatorClient_CallContract_Call { + return &FeeEstimatorClient_CallContract_Call{Call: _e.mock.On("CallContract", ctx, msg, blockNumber)} +} + +func (_c *FeeEstimatorClient_CallContract_Call) Run(run func(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int)) *FeeEstimatorClient_CallContract_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ethereum.CallMsg), args[2].(*big.Int)) + }) + return _c +} + +func (_c *FeeEstimatorClient_CallContract_Call) Return(_a0 []byte, _a1 error) *FeeEstimatorClient_CallContract_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FeeEstimatorClient_CallContract_Call) RunAndReturn(run func(context.Context, ethereum.CallMsg, *big.Int) ([]byte, error)) *FeeEstimatorClient_CallContract_Call { + _c.Call.Return(run) + return _c +} + // ConfiguredChainID provides a mock function with given fields: func (_m *FeeEstimatorClient) ConfiguredChainID() *big.Int { ret := _m.Called() @@ -109,6 +214,33 @@ func (_m *FeeEstimatorClient) ConfiguredChainID() *big.Int { return r0 } +// FeeEstimatorClient_ConfiguredChainID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ConfiguredChainID' +type FeeEstimatorClient_ConfiguredChainID_Call struct { + *mock.Call +} + +// ConfiguredChainID is a helper method to define mock.On call +func (_e *FeeEstimatorClient_Expecter) ConfiguredChainID() *FeeEstimatorClient_ConfiguredChainID_Call { + return &FeeEstimatorClient_ConfiguredChainID_Call{Call: _e.mock.On("ConfiguredChainID")} +} + +func (_c *FeeEstimatorClient_ConfiguredChainID_Call) Run(run func()) *FeeEstimatorClient_ConfiguredChainID_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *FeeEstimatorClient_ConfiguredChainID_Call) Return(_a0 *big.Int) *FeeEstimatorClient_ConfiguredChainID_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *FeeEstimatorClient_ConfiguredChainID_Call) RunAndReturn(run func() *big.Int) *FeeEstimatorClient_ConfiguredChainID_Call { + _c.Call.Return(run) + return _c +} + // HeadByNumber provides a mock function with given fields: ctx, n func (_m *FeeEstimatorClient) HeadByNumber(ctx context.Context, n *big.Int) (*types.Head, error) { ret := _m.Called(ctx, n) @@ -139,6 +271,35 @@ func (_m *FeeEstimatorClient) HeadByNumber(ctx context.Context, n *big.Int) (*ty return r0, r1 } +// FeeEstimatorClient_HeadByNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HeadByNumber' +type FeeEstimatorClient_HeadByNumber_Call struct { + *mock.Call +} + +// HeadByNumber is a helper method to define mock.On call +// - ctx context.Context +// - n *big.Int +func (_e *FeeEstimatorClient_Expecter) HeadByNumber(ctx interface{}, n interface{}) *FeeEstimatorClient_HeadByNumber_Call { + return &FeeEstimatorClient_HeadByNumber_Call{Call: _e.mock.On("HeadByNumber", ctx, n)} +} + +func (_c *FeeEstimatorClient_HeadByNumber_Call) Run(run func(ctx context.Context, n *big.Int)) *FeeEstimatorClient_HeadByNumber_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*big.Int)) + }) + return _c +} + +func (_c *FeeEstimatorClient_HeadByNumber_Call) Return(_a0 *types.Head, _a1 error) *FeeEstimatorClient_HeadByNumber_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FeeEstimatorClient_HeadByNumber_Call) RunAndReturn(run func(context.Context, *big.Int) (*types.Head, error)) *FeeEstimatorClient_HeadByNumber_Call { + _c.Call.Return(run) + return _c +} + // NewFeeEstimatorClient creates a new instance of FeeEstimatorClient. 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 NewFeeEstimatorClient(t interface { diff --git a/core/chains/evm/gas/mocks/rpc_client.go b/core/chains/evm/gas/mocks/rpc_client.go deleted file mode 100644 index 826fd66c463..00000000000 --- a/core/chains/evm/gas/mocks/rpc_client.go +++ /dev/null @@ -1,49 +0,0 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package mocks - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" -) - -// RPCClient is an autogenerated mock type for the rpcClient type -type RPCClient struct { - mock.Mock -} - -// CallContext provides a mock function with given fields: ctx, result, method, args -func (_m *RPCClient) CallContext(ctx context.Context, result interface{}, method string, args ...interface{}) error { - var _ca []interface{} - _ca = append(_ca, ctx, result, method) - _ca = append(_ca, args...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for CallContext") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, interface{}, string, ...interface{}) error); ok { - r0 = rf(ctx, result, method, args...) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// NewRPCClient creates a new instance of RPCClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewRPCClient(t interface { - mock.TestingT - Cleanup(func()) -}) *RPCClient { - mock := &RPCClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/chains/evm/gas/models.go b/core/chains/evm/gas/models.go index 320834cabab..1ff8b66b1d0 100644 --- a/core/chains/evm/gas/models.go +++ b/core/chains/evm/gas/models.go @@ -27,8 +27,6 @@ import ( ) // EvmFeeEstimator provides a unified interface that wraps EvmEstimator and can determine if legacy or dynamic fee estimation should be used -// -//go:generate mockery --quiet --name EvmFeeEstimator --output ./mocks/ --case=underscore type EvmFeeEstimator interface { services.Service headtracker.HeadTrackable[*evmtypes.Head, common.Hash] @@ -42,7 +40,6 @@ type EvmFeeEstimator interface { GetMaxCost(ctx context.Context, amount assets.Eth, calldata []byte, feeLimit uint64, maxFeePrice *assets.Wei, opts ...feetypes.Opt) (*big.Int, error) } -//go:generate mockery --quiet --name feeEstimatorClient --output ./mocks/ --case=underscore --structname FeeEstimatorClient type feeEstimatorClient interface { CallContract(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int) ([]byte, error) BatchCallContext(ctx context.Context, b []rpc.BatchElem) error @@ -52,7 +49,7 @@ type feeEstimatorClient interface { } // NewEstimator returns the estimator for a given config -func NewEstimator(lggr logger.Logger, ethClient feeEstimatorClient, cfg Config, geCfg evmconfig.GasEstimator) EvmFeeEstimator { +func NewEstimator(lggr logger.Logger, ethClient feeEstimatorClient, cfg Config, geCfg evmconfig.GasEstimator) (EvmFeeEstimator, error) { bh := geCfg.BlockHistory() s := geCfg.Mode() lggr.Infow(fmt.Sprintf("Initializing EVM gas estimator in mode: %s", s), @@ -79,13 +76,21 @@ func NewEstimator(lggr logger.Logger, ethClient feeEstimatorClient, cfg Config, // create l1Oracle only if it is supported for the chain var l1Oracle rollups.L1Oracle if rollups.IsRollupWithL1Support(cfg.ChainType()) { - l1Oracle = rollups.NewL1GasOracle(lggr, ethClient, cfg.ChainType()) + var err error + l1Oracle, err = rollups.NewL1GasOracle(lggr, ethClient, cfg.ChainType()) + if err != nil { + return nil, fmt.Errorf("failed to initialize L1 oracle: %w", err) + } } var newEstimator func(logger.Logger) EvmEstimator switch s { case "Arbitrum": + arbOracle, err := rollups.NewArbitrumL1GasOracle(lggr, ethClient) + if err != nil { + return nil, fmt.Errorf("failed to initialize Arbitrum L1 oracle: %w", err) + } newEstimator = func(l logger.Logger) EvmEstimator { - return NewArbitrumEstimator(lggr, geCfg, ethClient, rollups.NewArbitrumL1GasOracle(lggr, ethClient)) + return NewArbitrumEstimator(lggr, geCfg, ethClient, arbOracle) } case "BlockHistory": newEstimator = func(l logger.Logger) EvmEstimator { @@ -105,7 +110,7 @@ func NewEstimator(lggr logger.Logger, ethClient feeEstimatorClient, cfg Config, return NewFixedPriceEstimator(geCfg, ethClient, bh, lggr, l1Oracle) } } - return NewEvmFeeEstimator(lggr, newEstimator, df, geCfg) + return NewEvmFeeEstimator(lggr, newEstimator, df, geCfg), nil } // DynamicFee encompasses both FeeCap and TipCap for EIP1559 transactions @@ -124,8 +129,6 @@ type EvmPriorAttempt struct { } // Estimator provides an interface for estimating gas price and limit -// -//go:generate mockery --quiet --name EvmEstimator --output ./mocks/ --case=underscore type EvmEstimator interface { headtracker.HeadTrackable[*evmtypes.Head, common.Hash] services.Service @@ -335,8 +338,6 @@ func (e *evmFeeEstimator) BumpFee(ctx context.Context, originalFee EvmFee, feeLi } // Config defines an interface for configuration in the gas package -// -//go:generate mockery --quiet --name Config --output ./mocks/ --case=underscore type Config interface { ChainType() chaintype.ChainType FinalityDepth() uint32 diff --git a/core/chains/evm/gas/models_test.go b/core/chains/evm/gas/models_test.go index 059d0ed3d05..92ea901596f 100644 --- a/core/chains/evm/gas/models_test.go +++ b/core/chains/evm/gas/models_test.go @@ -65,7 +65,8 @@ func TestWrappedEvmEstimator(t *testing.T) { assert.Nil(t, l1Oracle) // expect l1Oracle - oracle := rollups.NewL1GasOracle(lggr, nil, chaintype.ChainOptimismBedrock) + oracle, err := rollups.NewL1GasOracle(lggr, nil, chaintype.ChainOptimismBedrock) + require.NoError(t, err) // cast oracle to L1Oracle interface estimator = gas.NewEvmFeeEstimator(lggr, getEst, false, geCfg) diff --git a/core/chains/evm/gas/rollups/arbitrum_l1_oracle.go b/core/chains/evm/gas/rollups/arbitrum_l1_oracle.go index 9e15cfe4c93..c01244db70c 100644 --- a/core/chains/evm/gas/rollups/arbitrum_l1_oracle.go +++ b/core/chains/evm/gas/rollups/arbitrum_l1_oracle.go @@ -13,11 +13,10 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" + gethtypes "github.com/ethereum/go-ethereum/core/types" + "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/services" - "github.com/smartcontractkit/chainlink-common/pkg/utils" - - gethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/smartcontractkit/chainlink/v2/common/client" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" @@ -71,7 +70,7 @@ const ( ArbGasInfo_getPricesInArbGas = "02199f34" ) -func NewArbitrumL1GasOracle(lggr logger.Logger, ethClient l1OracleClient) *arbitrumL1Oracle { +func NewArbitrumL1GasOracle(lggr logger.Logger, ethClient l1OracleClient) (*arbitrumL1Oracle, error) { var l1GasPriceAddress, gasPriceMethod, l1GasCostAddress, gasCostMethod string var l1GasPriceMethodAbi, l1GasCostMethodAbi abi.ABI var gasPriceErr, gasCostErr error @@ -84,10 +83,10 @@ func NewArbitrumL1GasOracle(lggr logger.Logger, ethClient l1OracleClient) *arbit l1GasCostMethodAbi, gasCostErr = abi.JSON(strings.NewReader(GasEstimateL1ComponentAbiString)) if gasPriceErr != nil { - panic("Failed to parse L1 gas price method ABI for chain: arbitrum") + return nil, fmt.Errorf("failed to parse L1 gas price method ABI for chain: arbitrum: %w", gasPriceErr) } if gasCostErr != nil { - panic("Failed to parse L1 gas cost method ABI for chain: arbitrum") + return nil, fmt.Errorf("failed to parse L1 gas cost method ABI for chain: arbitrum: %w", gasCostErr) } return &arbitrumL1Oracle{ @@ -106,7 +105,7 @@ func NewArbitrumL1GasOracle(lggr logger.Logger, ethClient l1OracleClient) *arbit chInitialised: make(chan struct{}), chStop: make(chan struct{}), chDone: make(chan struct{}), - } + }, nil } func (o *arbitrumL1Oracle) Name() string { @@ -135,41 +134,45 @@ func (o *arbitrumL1Oracle) HealthReport() map[string]error { func (o *arbitrumL1Oracle) run() { defer close(o.chDone) - t := o.refresh() + o.refresh() close(o.chInitialised) + t := services.TickerConfig{ + Initial: o.pollPeriod, + JitterPct: services.DefaultJitter, + }.NewTicker(o.pollPeriod) + defer t.Stop() + for { select { case <-o.chStop: return case <-t.C: - t = o.refresh() + o.refresh() } } } -func (o *arbitrumL1Oracle) refresh() (t *time.Timer) { - t, err := o.refreshWithError() +func (o *arbitrumL1Oracle) refresh() { + err := o.refreshWithError() if err != nil { + o.logger.Criticalw("Failed to refresh gas price", "err", err) o.SvcErrBuffer.Append(err) } - return } -func (o *arbitrumL1Oracle) refreshWithError() (t *time.Timer, err error) { - t = time.NewTimer(utils.WithJitter(o.pollPeriod)) - +func (o *arbitrumL1Oracle) refreshWithError() error { ctx, cancel := o.chStop.CtxCancel(evmclient.ContextWithDefaultTimeout()) defer cancel() price, err := o.fetchL1GasPrice(ctx) if err != nil { - return t, err + return err } o.l1GasPriceMu.Lock() defer o.l1GasPriceMu.Unlock() o.l1GasPrice = priceEntry{price: assets.NewWei(price), timestamp: time.Now()} - return + return nil } func (o *arbitrumL1Oracle) fetchL1GasPrice(ctx context.Context) (price *big.Int, err error) { diff --git a/core/chains/evm/gas/rollups/l1_oracle.go b/core/chains/evm/gas/rollups/l1_oracle.go index 97cc673154b..f707fab6841 100644 --- a/core/chains/evm/gas/rollups/l1_oracle.go +++ b/core/chains/evm/gas/rollups/l1_oracle.go @@ -21,8 +21,6 @@ import ( // L1Oracle provides interface for fetching L1-specific fee components if the chain is an L2. // For example, on Optimistic Rollups, this oracle can return rollup-specific l1BaseFee -// -//go:generate mockery --quiet --name L1Oracle --output ./mocks/ --case=underscore type L1Oracle interface { services.Service @@ -30,7 +28,6 @@ type L1Oracle interface { GetGasCost(ctx context.Context, tx *types.Transaction, blockNum *big.Int) (*assets.Wei, error) } -//go:generate mockery --quiet --name l1OracleClient --output ./mocks/ --case=underscore --structname L1OracleClient type l1OracleClient interface { CallContract(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int) ([]byte, error) BatchCallContext(ctx context.Context, b []rpc.BatchElem) error @@ -52,20 +49,24 @@ func IsRollupWithL1Support(chainType chaintype.ChainType) bool { return slices.Contains(supportedChainTypes, chainType) } -func NewL1GasOracle(lggr logger.Logger, ethClient l1OracleClient, chainType chaintype.ChainType) L1Oracle { +func NewL1GasOracle(lggr logger.Logger, ethClient l1OracleClient, chainType chaintype.ChainType) (L1Oracle, error) { if !IsRollupWithL1Support(chainType) { - return nil + return nil, nil } var l1Oracle L1Oracle + var err error switch chainType { case chaintype.ChainOptimismBedrock, chaintype.ChainKroma, chaintype.ChainScroll: - l1Oracle = NewOpStackL1GasOracle(lggr, ethClient, chainType) + l1Oracle, err = NewOpStackL1GasOracle(lggr, ethClient, chainType) case chaintype.ChainArbitrum: - l1Oracle = NewArbitrumL1GasOracle(lggr, ethClient) + l1Oracle, err = NewArbitrumL1GasOracle(lggr, ethClient) case chaintype.ChainZkSync: l1Oracle = NewZkSyncL1GasOracle(lggr, ethClient) default: - panic(fmt.Sprintf("Received unspported chaintype %s", chainType)) + return nil, fmt.Errorf("received unsupported chaintype %s", chainType) } - return l1Oracle + if err != nil { + return nil, fmt.Errorf("failed to initialize L1 oracle for chaintype %s: %w", chainType, err) + } + return l1Oracle, nil } diff --git a/core/chains/evm/gas/rollups/l1_oracle_abi.go b/core/chains/evm/gas/rollups/l1_oracle_abi.go index dc18e43c98e..fa5d9c85391 100644 --- a/core/chains/evm/gas/rollups/l1_oracle_abi.go +++ b/core/chains/evm/gas/rollups/l1_oracle_abi.go @@ -12,6 +12,10 @@ const GasEstimateL1ComponentAbiString = `[{"inputs":[{"internalType":"address"," const L1BaseFeeAbiString = `[{"inputs":[],"name":"l1BaseFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]` const GetL1FeeAbiString = `[{"inputs":[{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"getL1Fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]` -// ABIs for OP Stack Ecotone GasPriceOracle methods needed to calculated encoded gas price +// ABIs for OP Stack GasPriceOracle methods needed to calculated encoded gas price const OPIsEcotoneAbiString = `[{"inputs":[],"name":"isEcotone","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]` -const OPGetL1GasUsedAbiString = `[{"inputs":[{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"getL1GasUsed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]` +const OPIsFjordAbiString = `[{"inputs":[],"name":"isFjord","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]` +const OPBaseFeeScalarAbiString = `[{"inputs":[],"name":"baseFeeScalar","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"}]` +const OPBlobBaseFeeAbiString = `[{"inputs":[],"name":"blobBaseFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]` +const OPBlobBaseFeeScalarAbiString = `[{"inputs":[],"name":"blobBaseFeeScalar","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"}]` +const OPDecimalsAbiString = `[{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"}]` diff --git a/core/chains/evm/gas/rollups/l1_oracle_test.go b/core/chains/evm/gas/rollups/l1_oracle_test.go index 800a3558d12..7a28523d396 100644 --- a/core/chains/evm/gas/rollups/l1_oracle_test.go +++ b/core/chains/evm/gas/rollups/l1_oracle_test.go @@ -2,7 +2,6 @@ package rollups import ( "encoding/hex" - "errors" "math/big" "strings" "testing" @@ -31,7 +30,9 @@ func TestL1Oracle(t *testing.T) { t.Run("Unsupported ChainType returns nil", func(t *testing.T) { ethClient := mocks.NewL1OracleClient(t) - assert.Nil(t, NewL1GasOracle(logger.Test(t), ethClient, chaintype.ChainCelo)) + oracle, err := NewL1GasOracle(logger.Test(t), ethClient, chaintype.ChainCelo) + require.NoError(t, err) + assert.Nil(t, oracle) }) } @@ -41,9 +42,10 @@ func TestL1Oracle_GasPrice(t *testing.T) { t.Run("Calling GasPrice on unstarted L1Oracle returns error", func(t *testing.T) { ethClient := mocks.NewL1OracleClient(t) - oracle := NewL1GasOracle(logger.Test(t), ethClient, chaintype.ChainOptimismBedrock) + oracle, err := NewL1GasOracle(logger.Test(t), ethClient, chaintype.ChainOptimismBedrock) + require.NoError(t, err) - _, err := oracle.GasPrice(tests.Context(t)) + _, err = oracle.GasPrice(tests.Context(t)) assert.EqualError(t, err, "L1GasOracle is not started; cannot estimate gas") }) @@ -63,7 +65,8 @@ func TestL1Oracle_GasPrice(t *testing.T) { assert.Nil(t, blockNumber) }).Return(common.BigToHash(l1BaseFee).Bytes(), nil) - oracle := NewL1GasOracle(logger.Test(t), ethClient, chaintype.ChainArbitrum) + oracle, err := NewL1GasOracle(logger.Test(t), ethClient, chaintype.ChainArbitrum) + require.NoError(t, err) servicetest.RunHealthy(t, oracle) gasPrice, err := oracle.GasPrice(tests.Context(t)) @@ -78,19 +81,7 @@ func TestL1Oracle_GasPrice(t *testing.T) { l1GasPriceMethodAbi, err := abi.JSON(strings.NewReader(L1BaseFeeAbiString)) require.NoError(t, err) - isEcotoneAbiString, err := abi.JSON(strings.NewReader(OPIsEcotoneAbiString)) - require.NoError(t, err) - - ethClient := mocks.NewL1OracleClient(t) - ethClient.On("CallContract", mock.Anything, mock.IsType(ethereum.CallMsg{}), mock.IsType(&big.Int{})).Run(func(args mock.Arguments) { - callMsg := args.Get(1).(ethereum.CallMsg) - blockNumber := args.Get(2).(*big.Int) - var payload []byte - payload, err = isEcotoneAbiString.Pack("isEcotone") - require.NoError(t, err) - require.Equal(t, payload, callMsg.Data) - assert.Nil(t, blockNumber) - }).Return(nil, errors.New("not ecotone")).Once() + ethClient := setupUpgradeCheck(t, KromaGasOracleAddress, false, false) // Ecotone, Fjord disabled ethClient.On("CallContract", mock.Anything, mock.IsType(ethereum.CallMsg{}), mock.IsType(&big.Int{})).Run(func(args mock.Arguments) { callMsg := args.Get(1).(ethereum.CallMsg) @@ -102,7 +93,8 @@ func TestL1Oracle_GasPrice(t *testing.T) { assert.Nil(t, blockNumber) }).Return(common.BigToHash(l1BaseFee).Bytes(), nil) - oracle := newOpStackL1GasOracle(logger.Test(t), ethClient, chaintype.ChainKroma, KromaGasOracleAddress) + oracle, err := NewL1GasOracle(logger.Test(t), ethClient, chaintype.ChainKroma) + require.NoError(t, err) servicetest.RunHealthy(t, oracle) gasPrice, err := oracle.GasPrice(tests.Context(t)) @@ -117,19 +109,7 @@ func TestL1Oracle_GasPrice(t *testing.T) { l1GasPriceMethodAbi, err := abi.JSON(strings.NewReader(L1BaseFeeAbiString)) require.NoError(t, err) - isEcotoneAbiString, err := abi.JSON(strings.NewReader(OPIsEcotoneAbiString)) - require.NoError(t, err) - - ethClient := mocks.NewL1OracleClient(t) - ethClient.On("CallContract", mock.Anything, mock.IsType(ethereum.CallMsg{}), mock.IsType(&big.Int{})).Run(func(args mock.Arguments) { - callMsg := args.Get(1).(ethereum.CallMsg) - blockNumber := args.Get(2).(*big.Int) - var payload []byte - payload, err = isEcotoneAbiString.Pack("isEcotone") - require.NoError(t, err) - require.Equal(t, payload, callMsg.Data) - assert.Nil(t, blockNumber) - }).Return(nil, errors.New("not ecotone")).Once() + ethClient := setupUpgradeCheck(t, OPGasOracleAddress, false, false) // Ecotone, Fjord disabled ethClient.On("CallContract", mock.Anything, mock.IsType(ethereum.CallMsg{}), mock.IsType(&big.Int{})).Run(func(args mock.Arguments) { callMsg := args.Get(1).(ethereum.CallMsg) @@ -141,7 +121,8 @@ func TestL1Oracle_GasPrice(t *testing.T) { assert.Nil(t, blockNumber) }).Return(common.BigToHash(l1BaseFee).Bytes(), nil) - oracle := newOpStackL1GasOracle(logger.Test(t), ethClient, chaintype.ChainOptimismBedrock, OPGasOracleAddress) + oracle, err := NewL1GasOracle(logger.Test(t), ethClient, chaintype.ChainOptimismBedrock) + require.NoError(t, err) servicetest.RunHealthy(t, oracle) gasPrice, err := oracle.GasPrice(tests.Context(t)) @@ -155,19 +136,7 @@ func TestL1Oracle_GasPrice(t *testing.T) { l1GasPriceMethodAbi, err := abi.JSON(strings.NewReader(L1BaseFeeAbiString)) require.NoError(t, err) - isEcotoneAbiString, err := abi.JSON(strings.NewReader(OPIsEcotoneAbiString)) - require.NoError(t, err) - - ethClient := mocks.NewL1OracleClient(t) - ethClient.On("CallContract", mock.Anything, mock.IsType(ethereum.CallMsg{}), mock.IsType(&big.Int{})).Run(func(args mock.Arguments) { - callMsg := args.Get(1).(ethereum.CallMsg) - blockNumber := args.Get(2).(*big.Int) - var payload []byte - payload, err = isEcotoneAbiString.Pack("isEcotone") - require.NoError(t, err) - require.Equal(t, payload, callMsg.Data) - assert.Nil(t, blockNumber) - }).Return(nil, errors.New("not ecotone")).Once() + ethClient := setupUpgradeCheck(t, ScrollGasOracleAddress, false, false) // Ecotone, Fjord disabled ethClient.On("CallContract", mock.Anything, mock.IsType(ethereum.CallMsg{}), mock.IsType(&big.Int{})).Run(func(args mock.Arguments) { callMsg := args.Get(1).(ethereum.CallMsg) @@ -179,9 +148,9 @@ func TestL1Oracle_GasPrice(t *testing.T) { assert.Nil(t, blockNumber) }).Return(common.BigToHash(l1BaseFee).Bytes(), nil) - oracle := NewL1GasOracle(logger.Test(t), ethClient, chaintype.ChainScroll) - require.NoError(t, oracle.Start(tests.Context(t))) - t.Cleanup(func() { assert.NoError(t, oracle.Close()) }) + oracle, err := NewL1GasOracle(logger.Test(t), ethClient, chaintype.ChainScroll) + require.NoError(t, err) + servicetest.RunHealthy(t, oracle) gasPrice, err := oracle.GasPrice(tests.Context(t)) require.NoError(t, err) @@ -216,9 +185,9 @@ func TestL1Oracle_GasPrice(t *testing.T) { assert.Nil(t, blockNumber) }).Return(common.BigToHash(gasPerPubByteL2).Bytes(), nil) - oracle := NewL1GasOracle(logger.Test(t), ethClient, chaintype.ChainZkSync) - require.NoError(t, oracle.Start(tests.Context(t))) - t.Cleanup(func() { assert.NoError(t, oracle.Close()) }) + oracle, err := NewL1GasOracle(logger.Test(t), ethClient, chaintype.ChainZkSync) + require.NoError(t, err) + servicetest.RunHealthy(t, oracle) gasPrice, err := oracle.GasPrice(tests.Context(t)) require.NoError(t, err) @@ -260,7 +229,8 @@ func TestL1Oracle_GetGasCost(t *testing.T) { require.Equal(t, blockNum, blockNumber) }).Return(result, nil) - oracle := NewL1GasOracle(logger.Test(t), ethClient, chaintype.ChainArbitrum) + oracle, err := NewL1GasOracle(logger.Test(t), ethClient, chaintype.ChainArbitrum) + require.NoError(t, err) gasCost, err := oracle.GetGasCost(tests.Context(t), tx, blockNum) require.NoError(t, err) @@ -272,9 +242,10 @@ func TestL1Oracle_GetGasCost(t *testing.T) { tx := types.NewTx(&types.LegacyTx{}) ethClient := mocks.NewL1OracleClient(t) - oracle := NewL1GasOracle(logger.Test(t), ethClient, chaintype.ChainKroma) + oracle, err := NewL1GasOracle(logger.Test(t), ethClient, chaintype.ChainKroma) + require.NoError(t, err) - _, err := oracle.GetGasCost(tests.Context(t), tx, blockNum) + _, err = oracle.GetGasCost(tests.Context(t), tx, blockNum) require.Error(t, err, "L1 gas cost not supported for this chain: kroma") }) @@ -306,7 +277,8 @@ func TestL1Oracle_GetGasCost(t *testing.T) { require.Equal(t, blockNum, blockNumber) }).Return(common.BigToHash(l1GasCost).Bytes(), nil) - oracle := NewL1GasOracle(logger.Test(t), ethClient, chaintype.ChainOptimismBedrock) + oracle, err := NewL1GasOracle(logger.Test(t), ethClient, chaintype.ChainOptimismBedrock) + require.NoError(t, err) gasCost, err := oracle.GetGasCost(tests.Context(t), tx, blockNum) require.NoError(t, err) @@ -341,7 +313,8 @@ func TestL1Oracle_GetGasCost(t *testing.T) { require.Equal(t, blockNum, blockNumber) }).Return(common.BigToHash(l1GasCost).Bytes(), nil) - oracle := NewL1GasOracle(logger.Test(t), ethClient, chaintype.ChainScroll) + oracle, err := NewL1GasOracle(logger.Test(t), ethClient, chaintype.ChainScroll) + require.NoError(t, err) gasCost, err := oracle.GetGasCost(tests.Context(t), tx, blockNum) require.NoError(t, err) diff --git a/core/chains/evm/gas/rollups/mocks/da_price_reader.go b/core/chains/evm/gas/rollups/mocks/da_price_reader.go deleted file mode 100644 index 4157eb1494c..00000000000 --- a/core/chains/evm/gas/rollups/mocks/da_price_reader.go +++ /dev/null @@ -1,59 +0,0 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package mocks - -import ( - context "context" - big "math/big" - - mock "github.com/stretchr/testify/mock" -) - -// DAPriceReader is an autogenerated mock type for the daPriceReader type -type DAPriceReader struct { - mock.Mock -} - -// GetDAGasPrice provides a mock function with given fields: ctx -func (_m *DAPriceReader) GetDAGasPrice(ctx context.Context) (*big.Int, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetDAGasPrice") - } - - var r0 *big.Int - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (*big.Int, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) *big.Int); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*big.Int) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NewDAPriceReader creates a new instance of DAPriceReader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewDAPriceReader(t interface { - mock.TestingT - Cleanup(func()) -}) *DAPriceReader { - mock := &DAPriceReader{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/chains/evm/gas/rollups/mocks/l1_oracle.go b/core/chains/evm/gas/rollups/mocks/l1_oracle.go index 79d4d64ecdf..e82cb4ee903 100644 --- a/core/chains/evm/gas/rollups/mocks/l1_oracle.go +++ b/core/chains/evm/gas/rollups/mocks/l1_oracle.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -19,6 +19,14 @@ type L1Oracle struct { mock.Mock } +type L1Oracle_Expecter struct { + mock *mock.Mock +} + +func (_m *L1Oracle) EXPECT() *L1Oracle_Expecter { + return &L1Oracle_Expecter{mock: &_m.Mock} +} + // Close provides a mock function with given fields: func (_m *L1Oracle) Close() error { ret := _m.Called() @@ -37,6 +45,33 @@ func (_m *L1Oracle) Close() error { return r0 } +// L1Oracle_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type L1Oracle_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *L1Oracle_Expecter) Close() *L1Oracle_Close_Call { + return &L1Oracle_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *L1Oracle_Close_Call) Run(run func()) *L1Oracle_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *L1Oracle_Close_Call) Return(_a0 error) *L1Oracle_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *L1Oracle_Close_Call) RunAndReturn(run func() error) *L1Oracle_Close_Call { + _c.Call.Return(run) + return _c +} + // GasPrice provides a mock function with given fields: ctx func (_m *L1Oracle) GasPrice(ctx context.Context) (*assets.Wei, error) { ret := _m.Called(ctx) @@ -67,6 +102,34 @@ func (_m *L1Oracle) GasPrice(ctx context.Context) (*assets.Wei, error) { return r0, r1 } +// L1Oracle_GasPrice_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GasPrice' +type L1Oracle_GasPrice_Call struct { + *mock.Call +} + +// GasPrice is a helper method to define mock.On call +// - ctx context.Context +func (_e *L1Oracle_Expecter) GasPrice(ctx interface{}) *L1Oracle_GasPrice_Call { + return &L1Oracle_GasPrice_Call{Call: _e.mock.On("GasPrice", ctx)} +} + +func (_c *L1Oracle_GasPrice_Call) Run(run func(ctx context.Context)) *L1Oracle_GasPrice_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *L1Oracle_GasPrice_Call) Return(_a0 *assets.Wei, _a1 error) *L1Oracle_GasPrice_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *L1Oracle_GasPrice_Call) RunAndReturn(run func(context.Context) (*assets.Wei, error)) *L1Oracle_GasPrice_Call { + _c.Call.Return(run) + return _c +} + // GetGasCost provides a mock function with given fields: ctx, tx, blockNum func (_m *L1Oracle) GetGasCost(ctx context.Context, tx *types.Transaction, blockNum *big.Int) (*assets.Wei, error) { ret := _m.Called(ctx, tx, blockNum) @@ -97,6 +160,36 @@ func (_m *L1Oracle) GetGasCost(ctx context.Context, tx *types.Transaction, block return r0, r1 } +// L1Oracle_GetGasCost_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGasCost' +type L1Oracle_GetGasCost_Call struct { + *mock.Call +} + +// GetGasCost is a helper method to define mock.On call +// - ctx context.Context +// - tx *types.Transaction +// - blockNum *big.Int +func (_e *L1Oracle_Expecter) GetGasCost(ctx interface{}, tx interface{}, blockNum interface{}) *L1Oracle_GetGasCost_Call { + return &L1Oracle_GetGasCost_Call{Call: _e.mock.On("GetGasCost", ctx, tx, blockNum)} +} + +func (_c *L1Oracle_GetGasCost_Call) Run(run func(ctx context.Context, tx *types.Transaction, blockNum *big.Int)) *L1Oracle_GetGasCost_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.Transaction), args[2].(*big.Int)) + }) + return _c +} + +func (_c *L1Oracle_GetGasCost_Call) Return(_a0 *assets.Wei, _a1 error) *L1Oracle_GetGasCost_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *L1Oracle_GetGasCost_Call) RunAndReturn(run func(context.Context, *types.Transaction, *big.Int) (*assets.Wei, error)) *L1Oracle_GetGasCost_Call { + _c.Call.Return(run) + return _c +} + // HealthReport provides a mock function with given fields: func (_m *L1Oracle) HealthReport() map[string]error { ret := _m.Called() @@ -117,6 +210,33 @@ func (_m *L1Oracle) HealthReport() map[string]error { return r0 } +// L1Oracle_HealthReport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HealthReport' +type L1Oracle_HealthReport_Call struct { + *mock.Call +} + +// HealthReport is a helper method to define mock.On call +func (_e *L1Oracle_Expecter) HealthReport() *L1Oracle_HealthReport_Call { + return &L1Oracle_HealthReport_Call{Call: _e.mock.On("HealthReport")} +} + +func (_c *L1Oracle_HealthReport_Call) Run(run func()) *L1Oracle_HealthReport_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *L1Oracle_HealthReport_Call) Return(_a0 map[string]error) *L1Oracle_HealthReport_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *L1Oracle_HealthReport_Call) RunAndReturn(run func() map[string]error) *L1Oracle_HealthReport_Call { + _c.Call.Return(run) + return _c +} + // Name provides a mock function with given fields: func (_m *L1Oracle) Name() string { ret := _m.Called() @@ -135,6 +255,33 @@ func (_m *L1Oracle) Name() string { return r0 } +// L1Oracle_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type L1Oracle_Name_Call struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *L1Oracle_Expecter) Name() *L1Oracle_Name_Call { + return &L1Oracle_Name_Call{Call: _e.mock.On("Name")} +} + +func (_c *L1Oracle_Name_Call) Run(run func()) *L1Oracle_Name_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *L1Oracle_Name_Call) Return(_a0 string) *L1Oracle_Name_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *L1Oracle_Name_Call) RunAndReturn(run func() string) *L1Oracle_Name_Call { + _c.Call.Return(run) + return _c +} + // Ready provides a mock function with given fields: func (_m *L1Oracle) Ready() error { ret := _m.Called() @@ -153,6 +300,33 @@ func (_m *L1Oracle) Ready() error { return r0 } +// L1Oracle_Ready_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ready' +type L1Oracle_Ready_Call struct { + *mock.Call +} + +// Ready is a helper method to define mock.On call +func (_e *L1Oracle_Expecter) Ready() *L1Oracle_Ready_Call { + return &L1Oracle_Ready_Call{Call: _e.mock.On("Ready")} +} + +func (_c *L1Oracle_Ready_Call) Run(run func()) *L1Oracle_Ready_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *L1Oracle_Ready_Call) Return(_a0 error) *L1Oracle_Ready_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *L1Oracle_Ready_Call) RunAndReturn(run func() error) *L1Oracle_Ready_Call { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *L1Oracle) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -171,6 +345,34 @@ func (_m *L1Oracle) Start(_a0 context.Context) error { return r0 } +// L1Oracle_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type L1Oracle_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *L1Oracle_Expecter) Start(_a0 interface{}) *L1Oracle_Start_Call { + return &L1Oracle_Start_Call{Call: _e.mock.On("Start", _a0)} +} + +func (_c *L1Oracle_Start_Call) Run(run func(_a0 context.Context)) *L1Oracle_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *L1Oracle_Start_Call) Return(_a0 error) *L1Oracle_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *L1Oracle_Start_Call) RunAndReturn(run func(context.Context) error) *L1Oracle_Start_Call { + _c.Call.Return(run) + return _c +} + // NewL1Oracle creates a new instance of L1Oracle. 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 NewL1Oracle(t interface { diff --git a/core/chains/evm/gas/rollups/mocks/l1_oracle_client.go b/core/chains/evm/gas/rollups/mocks/l1_oracle_client.go index 146f2cd6809..1b678b8843a 100644 --- a/core/chains/evm/gas/rollups/mocks/l1_oracle_client.go +++ b/core/chains/evm/gas/rollups/mocks/l1_oracle_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -18,6 +18,14 @@ type L1OracleClient struct { mock.Mock } +type L1OracleClient_Expecter struct { + mock *mock.Mock +} + +func (_m *L1OracleClient) EXPECT() *L1OracleClient_Expecter { + return &L1OracleClient_Expecter{mock: &_m.Mock} +} + // BatchCallContext provides a mock function with given fields: ctx, b func (_m *L1OracleClient) BatchCallContext(ctx context.Context, b []rpc.BatchElem) error { ret := _m.Called(ctx, b) @@ -36,6 +44,35 @@ func (_m *L1OracleClient) BatchCallContext(ctx context.Context, b []rpc.BatchEle return r0 } +// L1OracleClient_BatchCallContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BatchCallContext' +type L1OracleClient_BatchCallContext_Call struct { + *mock.Call +} + +// BatchCallContext is a helper method to define mock.On call +// - ctx context.Context +// - b []rpc.BatchElem +func (_e *L1OracleClient_Expecter) BatchCallContext(ctx interface{}, b interface{}) *L1OracleClient_BatchCallContext_Call { + return &L1OracleClient_BatchCallContext_Call{Call: _e.mock.On("BatchCallContext", ctx, b)} +} + +func (_c *L1OracleClient_BatchCallContext_Call) Run(run func(ctx context.Context, b []rpc.BatchElem)) *L1OracleClient_BatchCallContext_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]rpc.BatchElem)) + }) + return _c +} + +func (_c *L1OracleClient_BatchCallContext_Call) Return(_a0 error) *L1OracleClient_BatchCallContext_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *L1OracleClient_BatchCallContext_Call) RunAndReturn(run func(context.Context, []rpc.BatchElem) error) *L1OracleClient_BatchCallContext_Call { + _c.Call.Return(run) + return _c +} + // CallContract provides a mock function with given fields: ctx, msg, blockNumber func (_m *L1OracleClient) CallContract(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int) ([]byte, error) { ret := _m.Called(ctx, msg, blockNumber) @@ -66,6 +103,36 @@ func (_m *L1OracleClient) CallContract(ctx context.Context, msg ethereum.CallMsg return r0, r1 } +// L1OracleClient_CallContract_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CallContract' +type L1OracleClient_CallContract_Call struct { + *mock.Call +} + +// CallContract is a helper method to define mock.On call +// - ctx context.Context +// - msg ethereum.CallMsg +// - blockNumber *big.Int +func (_e *L1OracleClient_Expecter) CallContract(ctx interface{}, msg interface{}, blockNumber interface{}) *L1OracleClient_CallContract_Call { + return &L1OracleClient_CallContract_Call{Call: _e.mock.On("CallContract", ctx, msg, blockNumber)} +} + +func (_c *L1OracleClient_CallContract_Call) Run(run func(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int)) *L1OracleClient_CallContract_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ethereum.CallMsg), args[2].(*big.Int)) + }) + return _c +} + +func (_c *L1OracleClient_CallContract_Call) Return(_a0 []byte, _a1 error) *L1OracleClient_CallContract_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *L1OracleClient_CallContract_Call) RunAndReturn(run func(context.Context, ethereum.CallMsg, *big.Int) ([]byte, error)) *L1OracleClient_CallContract_Call { + _c.Call.Return(run) + return _c +} + // NewL1OracleClient creates a new instance of L1OracleClient. 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 NewL1OracleClient(t interface { diff --git a/core/chains/evm/gas/rollups/op_l1_oracle.go b/core/chains/evm/gas/rollups/op_l1_oracle.go index 1977d139f9c..6805cd7095b 100644 --- a/core/chains/evm/gas/rollups/op_l1_oracle.go +++ b/core/chains/evm/gas/rollups/op_l1_oracle.go @@ -14,11 +14,10 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/rpc" + gethtypes "github.com/ethereum/go-ethereum/core/types" + "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/services" - "github.com/smartcontractkit/chainlink-common/pkg/utils" - - gethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/smartcontractkit/chainlink/v2/common/client" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" @@ -27,64 +26,76 @@ import ( ) // Reads L2-specific precompiles and caches the l1GasPrice set by the L2. -type OptimismL1Oracle struct { +type optimismL1Oracle struct { services.StateMachine client l1OracleClient pollPeriod time.Duration logger logger.SugaredLogger chainType chaintype.ChainType - l1OracleAddress string - gasPriceMethod string - l1GasPriceMethodAbi abi.ABI - l1GasPriceMu sync.RWMutex - l1GasPrice priceEntry - - gasCostMethod string - l1GasCostMethodAbi abi.ABI + l1OracleAddress string + l1GasPriceMu sync.RWMutex + l1GasPrice priceEntry + isEcotone bool + isFjord bool + upgradeCheckTs time.Time chInitialised chan struct{} chStop services.StopChan chDone chan struct{} - isEcotoneMethodAbi abi.ABI - - l1BaseFeeCalldata []byte - isEcotoneCalldata []byte - getL1GasUsedCalldata []byte - getL1FeeCalldata []byte - - isEcotone bool - isEcotoneCheckTs int64 + getL1FeeMethodAbi abi.ABI + l1BaseFeeCalldata []byte + baseFeeScalarCalldata []byte + blobBaseFeeCalldata []byte + blobBaseFeeScalarCalldata []byte + decimalsCalldata []byte + isEcotoneCalldata []byte + isEcotoneMethodAbi abi.ABI + isFjordCalldata []byte + isFjordMethodAbi abi.ABI } const ( - // OPStackGasOracle_isEcotone fetches if the OP Stack GasPriceOracle contract has upgraded to Ecotone - OPStackGasOracle_isEcotone = "isEcotone" - // OPStackGasOracle_getL1GasUsed fetches the l1 gas used for given tx bytes - OPStackGasOracle_getL1GasUsed = "getL1GasUsed" - // OPStackGasOracle_isEcotonePollingPeriod is the interval to poll if chain has upgraded to Ecotone - // Set to poll every 4 hours - OPStackGasOracle_isEcotonePollingPeriod = 14400 - // OPStackGasOracleAddress is the address of the precompiled contract that exists on OP stack chain. - // OPStackGasOracle_l1BaseFee fetches the l1 base fee set in the OP Stack GasPriceOracle contract - // OPStackGasOracle_l1BaseFee is a hex encoded call to: - // `function l1BaseFee() external view returns (uint256);` - OPStackGasOracle_l1BaseFee = "l1BaseFee" - // OPStackGasOracle_getL1Fee fetches the l1 fee for given tx bytes - // OPStackGasOracle_getL1Fee is a hex encoded call to: + // upgradePollingPeriod is the interval to poll if chain has been upgraded + upgradePollingPeriod = 4 * time.Hour + // isEcotone fetches if the OP Stack GasPriceOracle contract has upgraded to Ecotone + isEcotoneMethod = "isEcotone" + // isFjord fetches if the OP Stack GasPriceOracle contract has upgraded to Fjord + isFjordMethod = "isFjord" + // getL1Fee fetches the l1 fee for given tx bytes + // getL1Fee is a hex encoded call to: // `function getL1Fee(bytes) external view returns (uint256);` - OPStackGasOracle_getL1Fee = "getL1Fee" - // This is the case for Optimism and Base. + getL1FeeMethod = "getL1Fee" + // l1BaseFee fetches the l1 base fee set in the OP Stack GasPriceOracle contract + // l1BaseFee is a hex encoded call to: + // `function l1BaseFee() external view returns (uint256);` + l1BaseFeeMethod = "l1BaseFee" + // baseFeeScalar fetches the l1 base fee scalar for gas price calculation + // baseFeeScalar is a hex encoded call to: + // `function baseFeeScalar() public view returns (uint32);` + baseFeeScalarMethod = "baseFeeScalar" + // blobBaseFee fetches the l1 blob base fee for gas price calculation + // blobBaseFee is a hex encoded call to: + // `function blobBaseFee() public view returns (uint256);` + blobBaseFeeMethod = "blobBaseFee" + // blobBaseFeeScalar fetches the l1 blob base fee scalar for gas price calculation + // blobBaseFeeScalar is a hex encoded call to: + // `function blobBaseFeeScalar() public view returns (uint32);` + blobBaseFeeScalarMethod = "blobBaseFeeScalar" + // decimals fetches the number of decimals used in the scalar for gas price calculation + // decimals is a hex encoded call to: + // `function decimals() public pure returns (uint256);` + decimalsMethod = "decimals" + // OPGasOracleAddress is the address of the precompiled contract that exists on Optimism and Base. OPGasOracleAddress = "0x420000000000000000000000000000000000000F" - // GasOracleAddress is the address of the precompiled contract that exists on Kroma chain. - // This is the case for Kroma. + // KromaGasOracleAddress is the address of the precompiled contract that exists on Kroma. KromaGasOracleAddress = "0x4200000000000000000000000000000000000005" - // ScrollGasOracleAddress is the address of the precompiled contract that exists on Scroll chain. + // ScrollGasOracleAddress is the address of the precompiled contract that exists on Scroll. ScrollGasOracleAddress = "0x5300000000000000000000000000000000000002" ) -func NewOpStackL1GasOracle(lggr logger.Logger, ethClient l1OracleClient, chainType chaintype.ChainType) *OptimismL1Oracle { +func NewOpStackL1GasOracle(lggr logger.Logger, ethClient l1OracleClient, chainType chaintype.ChainType) (*optimismL1Oracle, error) { var precompileAddress string switch chainType { case chaintype.ChainOptimismBedrock: @@ -94,106 +105,128 @@ func NewOpStackL1GasOracle(lggr logger.Logger, ethClient l1OracleClient, chainTy case chaintype.ChainScroll: precompileAddress = ScrollGasOracleAddress default: - panic(fmt.Sprintf("Received unspported chaintype %s", chainType)) + return nil, fmt.Errorf("received unsupported chaintype %s", chainType) } return newOpStackL1GasOracle(lggr, ethClient, chainType, precompileAddress) } -func newOpStackL1GasOracle(lggr logger.Logger, ethClient l1OracleClient, chainType chaintype.ChainType, precompileAddress string) *OptimismL1Oracle { - var l1OracleAddress, gasPriceMethod, gasCostMethod string - var l1GasPriceMethodAbi, l1GasCostMethodAbi abi.ABI - var gasPriceErr, gasCostErr error - - l1OracleAddress = precompileAddress - gasPriceMethod = OPStackGasOracle_l1BaseFee - l1GasPriceMethodAbi, gasPriceErr = abi.JSON(strings.NewReader(L1BaseFeeAbiString)) - gasCostMethod = OPStackGasOracle_getL1Fee - l1GasCostMethodAbi, gasCostErr = abi.JSON(strings.NewReader(GetL1FeeAbiString)) - - if gasPriceErr != nil { - panic(fmt.Sprintf("Failed to parse L1 gas price method ABI for chain: %s", chainType)) - } - if gasCostErr != nil { - panic(fmt.Sprintf("Failed to parse L1 gas cost method ABI for chain: %s", chainType)) +func newOpStackL1GasOracle(lggr logger.Logger, ethClient l1OracleClient, chainType chaintype.ChainType, precompileAddress string) (*optimismL1Oracle, error) { + getL1FeeMethodAbi, err := abi.JSON(strings.NewReader(GetL1FeeAbiString)) + if err != nil { + return nil, fmt.Errorf("failed to parse L1 gas cost method ABI for chain: %s", chainType) } // encode calldata for each method; these calldata will remain the same for each call, we can encode them just once + // Encode calldata for l1BaseFee method l1BaseFeeMethodAbi, err := abi.JSON(strings.NewReader(L1BaseFeeAbiString)) if err != nil { - panic(fmt.Errorf("failed to parse GasPriceOracle %s() method ABI for chain: %s; %w", OPStackGasOracle_l1BaseFee, chainType, err)) + return nil, fmt.Errorf("failed to parse GasPriceOracle %s() method ABI for chain: %s; %w", l1BaseFeeMethod, chainType, err) } - l1BaseFeeCalldata, err := l1BaseFeeMethodAbi.Pack(OPStackGasOracle_l1BaseFee) + l1BaseFeeCalldata, err := l1BaseFeeMethodAbi.Pack(l1BaseFeeMethod) if err != nil { - panic(fmt.Errorf("failed to parse GasPriceOracle %s() calldata for chain: %s; %w", OPStackGasOracle_l1BaseFee, chainType, err)) + return nil, fmt.Errorf("failed to parse GasPriceOracle %s() calldata for chain: %s; %w", l1BaseFeeMethod, chainType, err) } + // Encode calldata for isEcotone method isEcotoneMethodAbi, err := abi.JSON(strings.NewReader(OPIsEcotoneAbiString)) if err != nil { - panic(fmt.Errorf("failed to parse GasPriceOracle %s() method ABI for chain: %s; %w", OPStackGasOracle_isEcotone, chainType, err)) + return nil, fmt.Errorf("failed to parse GasPriceOracle %s() method ABI for chain: %s; %w", isEcotoneMethod, chainType, err) } - isEcotoneCalldata, err := isEcotoneMethodAbi.Pack(OPStackGasOracle_isEcotone) + isEcotoneCalldata, err := isEcotoneMethodAbi.Pack(isEcotoneMethod) if err != nil { - panic(fmt.Errorf("failed to parse GasPriceOracle %s() calldata for chain: %s; %w", OPStackGasOracle_isEcotone, chainType, err)) + return nil, fmt.Errorf("failed to parse GasPriceOracle %s() calldata for chain: %s; %w", isEcotoneMethod, chainType, err) } - getL1GasUsedMethodAbi, err := abi.JSON(strings.NewReader(OPGetL1GasUsedAbiString)) + // Encode calldata for isFjord method + isFjordMethodAbi, err := abi.JSON(strings.NewReader(OPIsFjordAbiString)) if err != nil { - panic(fmt.Errorf("failed to parse GasPriceOracle %s() method ABI for chain: %s; %w", OPStackGasOracle_getL1GasUsed, chainType, err)) + return nil, fmt.Errorf("failed to parse GasPriceOracle %s() method ABI for chain: %s; %w", isFjordMethod, chainType, err) } - getL1GasUsedCalldata, err := getL1GasUsedMethodAbi.Pack(OPStackGasOracle_getL1GasUsed, []byte{0x1}) + isFjordCalldata, err := isFjordMethodAbi.Pack(isFjordMethod) if err != nil { - panic(fmt.Errorf("failed to parse GasPriceOracle %s() calldata for chain: %s; %w", OPStackGasOracle_getL1GasUsed, chainType, err)) + return nil, fmt.Errorf("failed to parse GasPriceOracle %s() calldata for chain: %s; %w", isFjordMethod, chainType, err) } - getL1FeeMethodAbi, err := abi.JSON(strings.NewReader(GetL1FeeAbiString)) + // Encode calldata for baseFeeScalar method + baseFeeScalarMethodAbi, err := abi.JSON(strings.NewReader(OPBaseFeeScalarAbiString)) if err != nil { - panic(fmt.Errorf("failed to parse GasPriceOracle %s() method ABI for chain: %s; %w", OPStackGasOracle_getL1Fee, chainType, err)) + return nil, fmt.Errorf("failed to parse GasPriceOracle %s() method ABI for chain: %s; %w", baseFeeScalarMethod, chainType, err) } - getL1FeeCalldata, err := getL1FeeMethodAbi.Pack(OPStackGasOracle_getL1Fee, []byte{0x1}) + baseFeeScalarCalldata, err := baseFeeScalarMethodAbi.Pack(baseFeeScalarMethod) if err != nil { - panic(fmt.Errorf("failed to parse GasPriceOracle %s() calldata for chain: %s; %w", OPStackGasOracle_getL1Fee, chainType, err)) + return nil, fmt.Errorf("failed to parse GasPriceOracle %s() calldata for chain: %s; %w", baseFeeScalarMethod, chainType, err) } - return &OptimismL1Oracle{ + // Encode calldata for blobBaseFee method + blobBaseFeeMethodAbi, err := abi.JSON(strings.NewReader(OPBlobBaseFeeAbiString)) + if err != nil { + return nil, fmt.Errorf("failed to parse GasPriceOracle %s() method ABI for chain: %s; %w", blobBaseFeeMethod, chainType, err) + } + blobBaseFeeCalldata, err := blobBaseFeeMethodAbi.Pack(blobBaseFeeMethod) + if err != nil { + return nil, fmt.Errorf("failed to parse GasPriceOracle %s() calldata for chain: %s; %w", blobBaseFeeMethod, chainType, err) + } + + // Encode calldata for blobBaseFeeScalar method + blobBaseFeeScalarMethodAbi, err := abi.JSON(strings.NewReader(OPBlobBaseFeeScalarAbiString)) + if err != nil { + return nil, fmt.Errorf("failed to parse GasPriceOracle %s() method ABI for chain: %s; %w", blobBaseFeeScalarMethod, chainType, err) + } + blobBaseFeeScalarCalldata, err := blobBaseFeeScalarMethodAbi.Pack(blobBaseFeeScalarMethod) + if err != nil { + return nil, fmt.Errorf("failed to parse GasPriceOracle %s() calldata for chain: %s; %w", blobBaseFeeScalarMethod, chainType, err) + } + + // Encode calldata for decimals method + decimalsMethodAbi, err := abi.JSON(strings.NewReader(OPDecimalsAbiString)) + if err != nil { + return nil, fmt.Errorf("failed to parse GasPriceOracle %s() method ABI for chain: %s; %w", decimalsMethod, chainType, err) + } + decimalsCalldata, err := decimalsMethodAbi.Pack(decimalsMethod) + if err != nil { + return nil, fmt.Errorf("failed to parse GasPriceOracle %s() calldata for chain: %s; %w", decimalsMethod, chainType, err) + } + + return &optimismL1Oracle{ client: ethClient, pollPeriod: PollPeriod, - logger: logger.Sugared(logger.Named(lggr, "L1GasOracle(optimismBedrock)")), + logger: logger.Sugared(logger.Named(lggr, fmt.Sprintf("L1GasOracle(%s)", chainType))), chainType: chainType, - l1OracleAddress: l1OracleAddress, - gasPriceMethod: gasPriceMethod, - l1GasPriceMethodAbi: l1GasPriceMethodAbi, - gasCostMethod: gasCostMethod, - l1GasCostMethodAbi: l1GasCostMethodAbi, + l1OracleAddress: precompileAddress, + isEcotone: false, + isFjord: false, + upgradeCheckTs: time.Time{}, chInitialised: make(chan struct{}), chStop: make(chan struct{}), chDone: make(chan struct{}), - isEcotoneMethodAbi: isEcotoneMethodAbi, - - l1BaseFeeCalldata: l1BaseFeeCalldata, - isEcotoneCalldata: isEcotoneCalldata, - getL1GasUsedCalldata: getL1GasUsedCalldata, - getL1FeeCalldata: getL1FeeCalldata, - - isEcotone: false, - isEcotoneCheckTs: 0, - } + getL1FeeMethodAbi: getL1FeeMethodAbi, + l1BaseFeeCalldata: l1BaseFeeCalldata, + baseFeeScalarCalldata: baseFeeScalarCalldata, + blobBaseFeeCalldata: blobBaseFeeCalldata, + blobBaseFeeScalarCalldata: blobBaseFeeScalarCalldata, + decimalsCalldata: decimalsCalldata, + isEcotoneCalldata: isEcotoneCalldata, + isEcotoneMethodAbi: isEcotoneMethodAbi, + isFjordCalldata: isFjordCalldata, + isFjordMethodAbi: isFjordMethodAbi, + }, nil } -func (o *OptimismL1Oracle) Name() string { +func (o *optimismL1Oracle) Name() string { return o.logger.Name() } -func (o *OptimismL1Oracle) Start(ctx context.Context) error { +func (o *optimismL1Oracle) Start(ctx context.Context) error { return o.StartOnce(o.Name(), func() error { go o.run() <-o.chInitialised return nil }) } -func (o *OptimismL1Oracle) Close() error { +func (o *optimismL1Oracle) Close() error { return o.StopOnce(o.Name(), func() error { close(o.chStop) <-o.chDone @@ -201,51 +234,55 @@ func (o *OptimismL1Oracle) Close() error { }) } -func (o *OptimismL1Oracle) HealthReport() map[string]error { +func (o *optimismL1Oracle) HealthReport() map[string]error { return map[string]error{o.Name(): o.Healthy()} } -func (o *OptimismL1Oracle) run() { +func (o *optimismL1Oracle) run() { defer close(o.chDone) - t := o.refresh() + o.refresh() close(o.chInitialised) + t := services.TickerConfig{ + Initial: o.pollPeriod, + JitterPct: services.DefaultJitter, + }.NewTicker(o.pollPeriod) + defer t.Stop() + for { select { case <-o.chStop: return case <-t.C: - t = o.refresh() + o.refresh() } } } -func (o *OptimismL1Oracle) refresh() (t *time.Timer) { - t, err := o.refreshWithError() +func (o *optimismL1Oracle) refresh() { + err := o.refreshWithError() if err != nil { + o.logger.Criticalw("Failed to refresh gas price", "err", err) o.SvcErrBuffer.Append(err) } - return } -func (o *OptimismL1Oracle) refreshWithError() (t *time.Timer, err error) { - t = time.NewTimer(utils.WithJitter(o.pollPeriod)) - +func (o *optimismL1Oracle) refreshWithError() error { ctx, cancel := o.chStop.CtxCancel(evmclient.ContextWithDefaultTimeout()) defer cancel() price, err := o.GetDAGasPrice(ctx) if err != nil { - return t, err + return err } o.l1GasPriceMu.Lock() defer o.l1GasPriceMu.Unlock() o.l1GasPrice = priceEntry{price: assets.NewWei(price), timestamp: time.Now()} - return + return nil } -func (o *OptimismL1Oracle) GasPrice(_ context.Context) (l1GasPrice *assets.Wei, err error) { +func (o *optimismL1Oracle) GasPrice(_ context.Context) (l1GasPrice *assets.Wei, err error) { var timestamp time.Time ok := o.IfStarted(func() { o.l1GasPriceMu.RLock() @@ -269,7 +306,7 @@ func (o *OptimismL1Oracle) GasPrice(_ context.Context) (l1GasPrice *assets.Wei, // Gets the L1 gas cost for the provided transaction at the specified block num // If block num is not provided, the value on the latest block num is used -func (o *OptimismL1Oracle) GetGasCost(ctx context.Context, tx *gethtypes.Transaction, blockNum *big.Int) (*assets.Wei, error) { +func (o *optimismL1Oracle) GetGasCost(ctx context.Context, tx *gethtypes.Transaction, blockNum *big.Int) (*assets.Wei, error) { ctx, cancel := context.WithTimeout(ctx, client.QueryTimeout) defer cancel() var callData, b []byte @@ -282,7 +319,7 @@ func (o *OptimismL1Oracle) GetGasCost(ctx context.Context, tx *gethtypes.Transac if encodedtx, err = tx.MarshalBinary(); err != nil { return nil, fmt.Errorf("failed to marshal tx for gas cost estimation: %w", err) } - if callData, err = o.l1GasCostMethodAbi.Pack(o.gasCostMethod, encodedtx); err != nil { + if callData, err = o.getL1FeeMethodAbi.Pack(getL1FeeMethod, encodedtx); err != nil { return nil, fmt.Errorf("failed to pack calldata for %s L1 gas cost estimation method: %w", o.chainType, err) } @@ -308,54 +345,89 @@ func (o *OptimismL1Oracle) GetGasCost(ctx context.Context, tx *gethtypes.Transac return assets.NewWei(l1GasCost), nil } -func (o *OptimismL1Oracle) GetDAGasPrice(ctx context.Context) (*big.Int, error) { - isEcotone, err := o.checkIsEcotone(ctx) +func (o *optimismL1Oracle) GetDAGasPrice(ctx context.Context) (*big.Int, error) { + err := o.checkForUpgrade(ctx) if err != nil { return nil, err } - - o.logger.Infof("Chain isEcotone result: %t", isEcotone) - - if isEcotone { - return o.getEcotoneGasPrice(ctx) + if o.isFjord || o.isEcotone { + return o.getEcotoneFjordGasPrice(ctx) } return o.getV1GasPrice(ctx) } -func (o *OptimismL1Oracle) checkIsEcotone(ctx context.Context) (bool, error) { - // if chain is already Ecotone, NOOP - if o.isEcotone { - return true, nil +// Checks oracle flags for Ecotone and Fjord upgrades +func (o *optimismL1Oracle) checkForUpgrade(ctx context.Context) error { + // if chain is already Fjord (the latest upgrade), NOOP + // need to continue to check if not on latest upgrade + if o.isFjord { + return nil } // if time since last check has not exceeded polling period, NOOP - if time.Now().Unix()-o.isEcotoneCheckTs < OPStackGasOracle_isEcotonePollingPeriod { - return false, nil + if time.Since(o.upgradeCheckTs) < upgradePollingPeriod { + return nil } - o.isEcotoneCheckTs = time.Now().Unix() - - l1OracleAddress := common.HexToAddress(o.l1OracleAddress) - // confirmed with OP team that isEcotone() is the canonical way to check if the chain has upgraded - b, err := o.client.CallContract(ctx, ethereum.CallMsg{ - To: &l1OracleAddress, - Data: o.isEcotoneCalldata, - }, nil) - - // if the chain has not upgraded to Ecotone, the isEcotone call will revert, this would be expected - if err != nil { - o.logger.Infof("isEcotone() call failed, this can happen if chain has not upgraded: %v", err) - return false, nil + o.upgradeCheckTs = time.Now() + rpcBatchCalls := []rpc.BatchElem{ + { + Method: "eth_call", + Args: []any{ + map[string]interface{}{ + "from": common.Address{}, + "to": o.l1OracleAddress, + "data": hexutil.Bytes(o.isFjordCalldata), + }, + "latest", + }, + Result: new(string), + }, + { + Method: "eth_call", + Args: []any{ + map[string]interface{}{ + "from": common.Address{}, + "to": o.l1OracleAddress, + "data": hexutil.Bytes(o.isEcotoneCalldata), + }, + "latest", + }, + Result: new(string), + }, } - - res, err := o.isEcotoneMethodAbi.Unpack(OPStackGasOracle_isEcotone, b) + err := o.client.BatchCallContext(ctx, rpcBatchCalls) if err != nil { - return false, fmt.Errorf("failed to unpack isEcotone() return data: %w", err) + return fmt.Errorf("check upgrade batch call failed: %w", err) + } + // These calls are expected to revert if chain has not upgraded. Ignore non-nil Error field. + if rpcBatchCalls[0].Error == nil { + result := *(rpcBatchCalls[0].Result.(*string)) + if b, decodeErr := hexutil.Decode(result); decodeErr == nil { + if res, unpackErr := o.isFjordMethodAbi.Unpack(isFjordMethod, b); unpackErr == nil { + o.isFjord = res[0].(bool) + } else { + o.logger.Errorw("failed to unpack results", "method", isFjordMethod, "hex", result, "error", unpackErr) + } + } else { + o.logger.Errorw("failed to decode bytes", "method", isFjordMethod, "hex", result, "error", decodeErr) + } + } + if rpcBatchCalls[1].Error == nil { + result := *(rpcBatchCalls[1].Result.(*string)) + if b, decodeErr := hexutil.Decode(result); decodeErr == nil { + if res, unpackErr := o.isEcotoneMethodAbi.Unpack(isEcotoneMethod, b); unpackErr == nil { + o.isEcotone = res[0].(bool) + } else { + o.logger.Errorw("failed to unpack results", "method", isEcotoneMethod, "hex", result, "error", unpackErr) + } + } else { + o.logger.Errorw("failed to decode bytes", "method", isEcotoneMethod, "hex", result, "error", decodeErr) + } } - o.isEcotone = res[0].(bool) - return o.isEcotone, nil + return nil } -func (o *OptimismL1Oracle) getV1GasPrice(ctx context.Context) (*big.Int, error) { +func (o *optimismL1Oracle) getV1GasPrice(ctx context.Context) (*big.Int, error) { l1OracleAddress := common.HexToAddress(o.l1OracleAddress) b, err := o.client.CallContract(ctx, ethereum.CallMsg{ To: &l1OracleAddress, @@ -371,7 +443,9 @@ func (o *OptimismL1Oracle) getV1GasPrice(ctx context.Context) (*big.Int, error) return new(big.Int).SetBytes(b), nil } -func (o *OptimismL1Oracle) getEcotoneGasPrice(ctx context.Context) (*big.Int, error) { +// Returns the scaled gas price using baseFeeScalar, l1BaseFee, blobBaseFeeScalar, and blobBaseFee fields from the oracle +// Confirmed the same calculation is used to determine gas price for both Ecotone and Fjord +func (o *optimismL1Oracle) getEcotoneFjordGasPrice(ctx context.Context) (*big.Int, error) { rpcBatchCalls := []rpc.BatchElem{ { Method: "eth_call", @@ -379,7 +453,43 @@ func (o *OptimismL1Oracle) getEcotoneGasPrice(ctx context.Context) (*big.Int, er map[string]interface{}{ "from": common.Address{}, "to": o.l1OracleAddress, - "data": hexutil.Bytes(o.getL1GasUsedCalldata), + "data": hexutil.Bytes(o.l1BaseFeeCalldata), + }, + "latest", + }, + Result: new(string), + }, + { + Method: "eth_call", + Args: []any{ + map[string]interface{}{ + "from": common.Address{}, + "to": o.l1OracleAddress, + "data": hexutil.Bytes(o.baseFeeScalarCalldata), + }, + "latest", + }, + Result: new(string), + }, + { + Method: "eth_call", + Args: []any{ + map[string]interface{}{ + "from": common.Address{}, + "to": o.l1OracleAddress, + "data": hexutil.Bytes(o.blobBaseFeeCalldata), + }, + "latest", + }, + Result: new(string), + }, + { + Method: "eth_call", + Args: []any{ + map[string]interface{}{ + "from": common.Address{}, + "to": o.l1OracleAddress, + "data": hexutil.Bytes(o.blobBaseFeeScalarCalldata), }, "latest", }, @@ -391,7 +501,7 @@ func (o *OptimismL1Oracle) getEcotoneGasPrice(ctx context.Context) (*big.Int, er map[string]interface{}{ "from": common.Address{}, "to": o.l1OracleAddress, - "data": hexutil.Bytes(o.getL1FeeCalldata), + "data": hexutil.Bytes(o.decimalsCalldata), }, "latest", }, @@ -401,31 +511,75 @@ func (o *OptimismL1Oracle) getEcotoneGasPrice(ctx context.Context) (*big.Int, er err := o.client.BatchCallContext(ctx, rpcBatchCalls) if err != nil { - return nil, fmt.Errorf("getEcotoneGasPrice batch call failed: %w", err) + return nil, fmt.Errorf("fetch gas price parameters batch call failed: %w", err) } if rpcBatchCalls[0].Error != nil { - return nil, fmt.Errorf("%s call failed in a batch: %w", OPStackGasOracle_getL1GasUsed, err) + return nil, fmt.Errorf("%s call failed in a batch: %w", l1BaseFeeMethod, err) } if rpcBatchCalls[1].Error != nil { - return nil, fmt.Errorf("%s call failed in a batch: %w", OPStackGasOracle_getL1Fee, err) + return nil, fmt.Errorf("%s call failed in a batch: %w", baseFeeScalarMethod, err) + } + if rpcBatchCalls[2].Error != nil { + return nil, fmt.Errorf("%s call failed in a batch: %w", blobBaseFeeMethod, err) + } + if rpcBatchCalls[3].Error != nil { + return nil, fmt.Errorf("%s call failed in a batch: %w", blobBaseFeeScalarMethod, err) + } + if rpcBatchCalls[4].Error != nil { + return nil, fmt.Errorf("%s call failed in a batch: %w", decimalsMethod, err) } - l1GasUsedResult := *(rpcBatchCalls[0].Result.(*string)) - l1FeeResult := *(rpcBatchCalls[1].Result.(*string)) + // Extract values from responses + l1BaseFeeResult := *(rpcBatchCalls[0].Result.(*string)) + baseFeeScalarResult := *(rpcBatchCalls[1].Result.(*string)) + blobBaseFeeResult := *(rpcBatchCalls[2].Result.(*string)) + blobBaseFeeScalarResult := *(rpcBatchCalls[3].Result.(*string)) + decimalsResult := *(rpcBatchCalls[4].Result.(*string)) - l1GasUsedBytes, err := hexutil.Decode(l1GasUsedResult) + // Decode the responses into bytes + l1BaseFeeBytes, err := hexutil.Decode(l1BaseFeeResult) + if err != nil { + return nil, fmt.Errorf("failed to decode %s rpc result: %w", l1BaseFeeMethod, err) + } + baseFeeScalarBytes, err := hexutil.Decode(baseFeeScalarResult) if err != nil { - return nil, fmt.Errorf("failed to decode %s rpc result: %w", OPStackGasOracle_getL1GasUsed, err) + return nil, fmt.Errorf("failed to decode %s rpc result: %w", baseFeeScalarMethod, err) } - l1FeeBytes, err := hexutil.Decode(l1FeeResult) + blobBaseFeeBytes, err := hexutil.Decode(blobBaseFeeResult) if err != nil { - return nil, fmt.Errorf("failed to decode %s rpc result: %w", OPStackGasOracle_getL1Fee, err) + return nil, fmt.Errorf("failed to decode %s rpc result: %w", blobBaseFeeMethod, err) } + blobBaseFeeScalarBytes, err := hexutil.Decode(blobBaseFeeScalarResult) + if err != nil { + return nil, fmt.Errorf("failed to decode %s rpc result: %w", blobBaseFeeScalarMethod, err) + } + decimalsBytes, err := hexutil.Decode(decimalsResult) + if err != nil { + return nil, fmt.Errorf("failed to decode %s rpc result: %w", decimalsMethod, err) + } + + // Convert bytes to big int for calculations + l1BaseFee := new(big.Int).SetBytes(l1BaseFeeBytes) + baseFeeScalar := new(big.Int).SetBytes(baseFeeScalarBytes) + blobBaseFee := new(big.Int).SetBytes(blobBaseFeeBytes) + blobBaseFeeScalar := new(big.Int).SetBytes(blobBaseFeeScalarBytes) + decimals := new(big.Int).SetBytes(decimalsBytes) + + o.logger.Debugw("gas price parameters", "l1BaseFee", l1BaseFee, "baseFeeScalar", baseFeeScalar, "blobBaseFee", blobBaseFee, "blobBaseFeeScalar", blobBaseFeeScalar, "decimals", decimals) + + // Scaled gas price = baseFee * 16 * baseFeeScalar + blobBaseFee * blobBaseFeeScalar + scaledBaseFee := new(big.Int).Mul(l1BaseFee, baseFeeScalar) + scaledBaseFee = new(big.Int).Mul(scaledBaseFee, big.NewInt(16)) + scaledBlobBaseFee := new(big.Int).Mul(blobBaseFee, blobBaseFeeScalar) + scaledGasPrice := new(big.Int).Add(scaledBaseFee, scaledBlobBaseFee) - l1GasUsed := new(big.Int).SetBytes(l1GasUsedBytes) - l1Fee := new(big.Int).SetBytes(l1FeeBytes) + // Gas price = scaled gas price / (16 * 10 ^ decimals) + // This formula is extracted from the gas cost methods in the precompile contract + // Note: The Fjord calculation in the contract uses estimated size instead of gas used which is why we have to scale down by (16 * 10 ^ decimals) as well + // Ecotone: https://github.com/ethereum-optimism/optimism/blob/71b93116738ee98c9f8713b1a5dfe626ce06c1b2/packages/contracts-bedrock/src/L2/GasPriceOracle.sol#L192 + // Fjord: https://github.com/ethereum-optimism/optimism/blob/71b93116738ee98c9f8713b1a5dfe626ce06c1b2/packages/contracts-bedrock/src/L2/GasPriceOracle.sol#L229-L230 + scale := new(big.Int).Exp(big.NewInt(10), decimals, nil) + scale = new(big.Int).Mul(scale, big.NewInt(16)) - // for the same tx byte, l1Fee / l1GasUsed will give the l1 gas price - // note this price is per l1 gas, not l1 data byte - return new(big.Int).Div(l1Fee, l1GasUsed), nil + return new(big.Int).Div(scaledGasPrice, scale), nil } diff --git a/core/chains/evm/gas/rollups/op_l1_oracle_test.go b/core/chains/evm/gas/rollups/op_l1_oracle_test.go index 86fdbe0a62d..f5f009f1ea6 100644 --- a/core/chains/evm/gas/rollups/op_l1_oracle_test.go +++ b/core/chains/evm/gas/rollups/op_l1_oracle_test.go @@ -22,26 +22,28 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/gas/rollups/mocks" ) -func TestDAPriceReader_ReadV1GasPrice(t *testing.T) { +func TestOPL1Oracle_ReadV1GasPrice(t *testing.T) { t.Parallel() testCases := []struct { name string isEcotoneError bool - returnBadData bool + isFjordError bool }{ { - name: "calling isEcotone returns false, fetches l1BaseFee", + name: "calling isEcotone and isFjord returns false, fetches l1BaseFee", isEcotoneError: false, + isFjordError: false, }, { - name: "calling isEcotone when chain has not made Ecotone upgrade, fetches l1BaseFee", - isEcotoneError: true, + name: "calling isEcotone returns false and IsFjord errors when chain has not made Fjord upgrade, fetches l1BaseFee", + isEcotoneError: false, + isFjordError: true, }, { - name: "calling isEcotone returns bad data, returns error", - isEcotoneError: false, - returnBadData: true, + name: "calling isEcotone and isFjord when chain has not made Ecotone upgrade, fetches l1BaseFee", + isEcotoneError: true, + isFjordError: true, }, } @@ -52,117 +54,252 @@ func TestDAPriceReader_ReadV1GasPrice(t *testing.T) { l1BaseFeeMethodAbi, err := abi.JSON(strings.NewReader(L1BaseFeeAbiString)) require.NoError(t, err) - l1BaseFeeCalldata, err := l1BaseFeeMethodAbi.Pack(OPStackGasOracle_l1BaseFee) + l1BaseFeeCalldata, err := l1BaseFeeMethodAbi.Pack(l1BaseFeeMethod) require.NoError(t, err) + // IsFjord calldata + isFjordMethodAbi, err := abi.JSON(strings.NewReader(OPIsFjordAbiString)) + require.NoError(t, err) + isFjordCalldata, err := isFjordMethodAbi.Pack(isFjordMethod) + require.NoError(t, err) + + // IsEcotone calldata isEcotoneMethodAbi, err := abi.JSON(strings.NewReader(OPIsEcotoneAbiString)) require.NoError(t, err) - isEcotoneCalldata, err := isEcotoneMethodAbi.Pack(OPStackGasOracle_isEcotone) + isEcotoneCalldata, err := isEcotoneMethodAbi.Pack(isEcotoneMethod) require.NoError(t, err) ethClient := mocks.NewL1OracleClient(t) - call := ethClient.On("CallContract", mock.Anything, mock.IsType(ethereum.CallMsg{}), mock.IsType(&big.Int{})).Run(func(args mock.Arguments) { + ethClient.On("BatchCallContext", mock.Anything, mock.IsType([]rpc.BatchElem{})).Run(func(args mock.Arguments) { + rpcElements := args.Get(1).([]rpc.BatchElem) + require.Equal(t, 2, len(rpcElements)) + for _, rE := range rpcElements { + require.Equal(t, "eth_call", rE.Method) + require.Equal(t, oracleAddress, rE.Args[0].(map[string]interface{})["to"]) + require.Equal(t, "latest", rE.Args[1]) + } + require.Equal(t, hexutil.Bytes(isFjordCalldata), rpcElements[0].Args[0].(map[string]interface{})["data"]) + require.Equal(t, hexutil.Bytes(isEcotoneCalldata), rpcElements[1].Args[0].(map[string]interface{})["data"]) + isUpgraded := "0x0000000000000000000000000000000000000000000000000000000000000000" + if tc.isFjordError { + rpcElements[0].Error = fmt.Errorf("test error") + } else { + rpcElements[0].Result = &isUpgraded + } + if tc.isEcotoneError { + rpcElements[1].Error = fmt.Errorf("test error") + } else { + rpcElements[1].Result = &isUpgraded + } + }).Return(nil).Once() + + ethClient.On("CallContract", mock.Anything, mock.IsType(ethereum.CallMsg{}), mock.IsType(&big.Int{})).Run(func(args mock.Arguments) { callMsg := args.Get(1).(ethereum.CallMsg) blockNumber := args.Get(2).(*big.Int) - require.Equal(t, isEcotoneCalldata, callMsg.Data) + require.Equal(t, l1BaseFeeCalldata, callMsg.Data) require.Equal(t, oracleAddress, callMsg.To.String()) assert.Nil(t, blockNumber) - }) - - if tc.returnBadData { - call.Return([]byte{0x2, 0x2}, nil).Once() - } else if tc.isEcotoneError { - call.Return(nil, fmt.Errorf("test error")).Once() - } else { - call.Return(isEcotoneMethodAbi.Methods["isEcotone"].Outputs.Pack(false)).Once() - } - - if !tc.returnBadData { - ethClient.On("CallContract", mock.Anything, mock.IsType(ethereum.CallMsg{}), mock.IsType(&big.Int{})).Run(func(args mock.Arguments) { - callMsg := args.Get(1).(ethereum.CallMsg) - blockNumber := args.Get(2).(*big.Int) - require.Equal(t, l1BaseFeeCalldata, callMsg.Data) - require.Equal(t, oracleAddress, callMsg.To.String()) - assert.Nil(t, blockNumber) - }).Return(common.BigToHash(l1BaseFee).Bytes(), nil).Once() - } - - oracle := newOpStackL1GasOracle(logger.Test(t), ethClient, chaintype.ChainOptimismBedrock, oracleAddress) + }).Return(common.BigToHash(l1BaseFee).Bytes(), nil).Once() + + oracle, err := newOpStackL1GasOracle(logger.Test(t), ethClient, chaintype.ChainOptimismBedrock, oracleAddress) + require.NoError(t, err) gasPrice, err := oracle.GetDAGasPrice(tests.Context(t)) - if tc.returnBadData { - assert.Error(t, err) - } else { - require.NoError(t, err) - assert.Equal(t, l1BaseFee, gasPrice) - } + require.NoError(t, err) + assert.Equal(t, l1BaseFee, gasPrice) }) } } -func setupIsEcotone(t *testing.T, oracleAddress string) *mocks.L1OracleClient { +func setupUpgradeCheck(t *testing.T, oracleAddress string, isFjord, isEcotone bool) *mocks.L1OracleClient { + trueHex := "0x0000000000000000000000000000000000000000000000000000000000000001" + falseHex := "0x0000000000000000000000000000000000000000000000000000000000000000" + boolToHexMap := map[bool]*string{ + true: &trueHex, + false: &falseHex, + } + // IsFjord calldata + isFjordMethodAbi, err := abi.JSON(strings.NewReader(OPIsFjordAbiString)) + require.NoError(t, err) + isFjordCalldata, err := isFjordMethodAbi.Pack(isFjordMethod) + require.NoError(t, err) + + // IsEcotone calldata isEcotoneMethodAbi, err := abi.JSON(strings.NewReader(OPIsEcotoneAbiString)) require.NoError(t, err) - isEcotoneCalldata, err := isEcotoneMethodAbi.Pack(OPStackGasOracle_isEcotone) + isEcotoneCalldata, err := isEcotoneMethodAbi.Pack(isEcotoneMethod) require.NoError(t, err) ethClient := mocks.NewL1OracleClient(t) - ethClient.On("CallContract", mock.Anything, mock.IsType(ethereum.CallMsg{}), mock.IsType(&big.Int{})).Run(func(args mock.Arguments) { - callMsg := args.Get(1).(ethereum.CallMsg) - blockNumber := args.Get(2).(*big.Int) - require.Equal(t, isEcotoneCalldata, callMsg.Data) - require.Equal(t, oracleAddress, callMsg.To.String()) - assert.Nil(t, blockNumber) - }).Return(isEcotoneMethodAbi.Methods["isEcotone"].Outputs.Pack(true)).Once() + ethClient.On("BatchCallContext", mock.Anything, mock.IsType([]rpc.BatchElem{})).Run(func(args mock.Arguments) { + rpcElements := args.Get(1).([]rpc.BatchElem) + require.Equal(t, 2, len(rpcElements)) + for _, rE := range rpcElements { + require.Equal(t, "eth_call", rE.Method) + require.Equal(t, oracleAddress, rE.Args[0].(map[string]interface{})["to"]) + require.Equal(t, "latest", rE.Args[1]) + } + require.Equal(t, hexutil.Bytes(isFjordCalldata), rpcElements[0].Args[0].(map[string]interface{})["data"]) + require.Equal(t, hexutil.Bytes(isEcotoneCalldata), rpcElements[1].Args[0].(map[string]interface{})["data"]) + + rpcElements[0].Result = boolToHexMap[isFjord] + rpcElements[1].Result = boolToHexMap[isEcotone] + }).Return(nil).Once() return ethClient } -func TestDAPriceReader_ReadEcotoneGasPrice(t *testing.T) { - l1BaseFee := big.NewInt(100) +func mockBatchContractCall(t *testing.T, ethClient *mocks.L1OracleClient, oracleAddress string, baseFeeVal, baseFeeScalarVal, blobBaseFeeVal, blobBaseFeeScalarVal, decimalsVal *big.Int) { + // L1 base fee calldata + l1BaseFeeMethodAbi, err := abi.JSON(strings.NewReader(L1BaseFeeAbiString)) + require.NoError(t, err) + l1BaseFeeCalldata, err := l1BaseFeeMethodAbi.Pack(l1BaseFeeMethod) + require.NoError(t, err) + + // L1 base fee scalar calldata + l1BaseFeeScalarMethodAbi, err := abi.JSON(strings.NewReader(OPBaseFeeScalarAbiString)) + require.NoError(t, err) + l1BaseFeeScalarCalldata, err := l1BaseFeeScalarMethodAbi.Pack(baseFeeScalarMethod) + require.NoError(t, err) + + // Blob base fee calldata + blobBaseFeeMethodAbi, err := abi.JSON(strings.NewReader(OPBlobBaseFeeAbiString)) + require.NoError(t, err) + blobBaseFeeCalldata, err := blobBaseFeeMethodAbi.Pack(blobBaseFeeMethod) + require.NoError(t, err) + + // Blob base fee scalar calldata + blobBaseFeeScalarMethodAbi, err := abi.JSON(strings.NewReader(OPBlobBaseFeeScalarAbiString)) + require.NoError(t, err) + blobBaseFeeScalarCalldata, err := blobBaseFeeScalarMethodAbi.Pack(blobBaseFeeScalarMethod) + require.NoError(t, err) + + // Decimals calldata + decimalsMethodAbi, err := abi.JSON(strings.NewReader(OPDecimalsAbiString)) + require.NoError(t, err) + decimalsCalldata, err := decimalsMethodAbi.Pack(decimalsMethod) + require.NoError(t, err) + + ethClient.On("BatchCallContext", mock.Anything, mock.IsType([]rpc.BatchElem{})).Run(func(args mock.Arguments) { + rpcElements := args.Get(1).([]rpc.BatchElem) + require.Equal(t, 5, len(rpcElements)) + + for _, rE := range rpcElements { + require.Equal(t, "eth_call", rE.Method) + require.Equal(t, oracleAddress, rE.Args[0].(map[string]interface{})["to"]) + require.Equal(t, "latest", rE.Args[1]) + } + + require.Equal(t, hexutil.Bytes(l1BaseFeeCalldata), rpcElements[0].Args[0].(map[string]interface{})["data"]) + require.Equal(t, hexutil.Bytes(l1BaseFeeScalarCalldata), rpcElements[1].Args[0].(map[string]interface{})["data"]) + require.Equal(t, hexutil.Bytes(blobBaseFeeCalldata), rpcElements[2].Args[0].(map[string]interface{})["data"]) + require.Equal(t, hexutil.Bytes(blobBaseFeeScalarCalldata), rpcElements[3].Args[0].(map[string]interface{})["data"]) + require.Equal(t, hexutil.Bytes(decimalsCalldata), rpcElements[4].Args[0].(map[string]interface{})["data"]) + + res1 := common.BigToHash(baseFeeVal).Hex() + res2 := common.BigToHash(baseFeeScalarVal).Hex() + res3 := common.BigToHash(blobBaseFeeVal).Hex() + res4 := common.BigToHash(blobBaseFeeScalarVal).Hex() + res5 := common.BigToHash(decimalsVal).Hex() + rpcElements[0].Result = &res1 + rpcElements[1].Result = &res2 + rpcElements[2].Result = &res3 + rpcElements[3].Result = &res4 + rpcElements[4].Result = &res5 + }).Return(nil).Once() +} + +func TestOPL1Oracle_CalculateEcotoneGasPrice(t *testing.T) { + baseFee := big.NewInt(100000000) + blobBaseFee := big.NewInt(25000000) + baseFeeScalar := big.NewInt(10) + blobBaseFeeScalar := big.NewInt(5) + decimals := big.NewInt(6) oracleAddress := common.HexToAddress("0x1234").String() t.Parallel() t.Run("correctly fetches weighted gas price if chain has upgraded to Ecotone", func(t *testing.T) { - ethClient := setupIsEcotone(t, oracleAddress) - getL1GasUsedMethodAbi, err := abi.JSON(strings.NewReader(OPGetL1GasUsedAbiString)) + ethClient := setupUpgradeCheck(t, oracleAddress, false, true) + mockBatchContractCall(t, ethClient, oracleAddress, baseFee, baseFeeScalar, blobBaseFee, blobBaseFeeScalar, decimals) + + oracle, err := newOpStackL1GasOracle(logger.Test(t), ethClient, chaintype.ChainOptimismBedrock, oracleAddress) require.NoError(t, err) - getL1GasUsedCalldata, err := getL1GasUsedMethodAbi.Pack(OPStackGasOracle_getL1GasUsed, []byte{0x1}) + gasPrice, err := oracle.GetDAGasPrice(tests.Context(t)) require.NoError(t, err) + scaledGasPrice := big.NewInt(16125000000) // baseFee * scalar * 16 + blobBaseFee * scalar + scale := big.NewInt(16000000) // Scaled by 16 * 10 ^ decimals + expectedGasPrice := new(big.Int).Div(scaledGasPrice, scale) + assert.Equal(t, expectedGasPrice, gasPrice) + }) - getL1FeeMethodAbi, err := abi.JSON(strings.NewReader(GetL1FeeAbiString)) + t.Run("fetching Ecotone price but rpc returns bad data", func(t *testing.T) { + ethClient := setupUpgradeCheck(t, oracleAddress, false, true) + ethClient.On("BatchCallContext", mock.Anything, mock.IsType([]rpc.BatchElem{})).Run(func(args mock.Arguments) { + rpcElements := args.Get(1).([]rpc.BatchElem) + var badData = "zzz" + rpcElements[0].Result = &badData + rpcElements[1].Result = &badData + }).Return(nil).Once() + + oracle, err := newOpStackL1GasOracle(logger.Test(t), ethClient, chaintype.ChainOptimismBedrock, oracleAddress) require.NoError(t, err) - getL1FeeCalldata, err := getL1FeeMethodAbi.Pack(OPStackGasOracle_getL1Fee, []byte{0x1}) + _, err = oracle.GetDAGasPrice(tests.Context(t)) + assert.Error(t, err) + }) + + t.Run("fetching Ecotone price but rpc parent call errors", func(t *testing.T) { + ethClient := setupUpgradeCheck(t, oracleAddress, false, true) + ethClient.On("BatchCallContext", mock.Anything, mock.IsType([]rpc.BatchElem{})).Return(fmt.Errorf("revert")).Once() + + oracle, err := newOpStackL1GasOracle(logger.Test(t), ethClient, chaintype.ChainOptimismBedrock, oracleAddress) require.NoError(t, err) + _, err = oracle.GetDAGasPrice(tests.Context(t)) + assert.Error(t, err) + }) + t.Run("fetching Ecotone price but one of the sub rpc call errors", func(t *testing.T) { + ethClient := setupUpgradeCheck(t, oracleAddress, false, true) ethClient.On("BatchCallContext", mock.Anything, mock.IsType([]rpc.BatchElem{})).Run(func(args mock.Arguments) { rpcElements := args.Get(1).([]rpc.BatchElem) - require.Equal(t, 2, len(rpcElements)) + res := common.BigToHash(baseFee).Hex() + rpcElements[0].Result = &res + rpcElements[1].Error = fmt.Errorf("revert") + }).Return(nil).Once() - for _, rE := range rpcElements { - require.Equal(t, "eth_call", rE.Method) - require.Equal(t, oracleAddress, rE.Args[0].(map[string]interface{})["to"]) - require.Equal(t, "latest", rE.Args[1]) - } + oracle, err := newOpStackL1GasOracle(logger.Test(t), ethClient, chaintype.ChainOptimismBedrock, oracleAddress) + require.NoError(t, err) + _, err = oracle.GetDAGasPrice(tests.Context(t)) + assert.Error(t, err) + }) +} - require.Equal(t, hexutil.Bytes(getL1GasUsedCalldata), rpcElements[0].Args[0].(map[string]interface{})["data"]) - require.Equal(t, hexutil.Bytes(getL1FeeCalldata), rpcElements[1].Args[0].(map[string]interface{})["data"]) +func TestOPL1Oracle_CalculateFjordGasPrice(t *testing.T) { + baseFee := big.NewInt(100000000) + blobBaseFee := big.NewInt(25000000) + baseFeeScalar := big.NewInt(10) + blobBaseFeeScalar := big.NewInt(5) + decimals := big.NewInt(6) + oracleAddress := common.HexToAddress("0x1234").String() - res1 := common.BigToHash(big.NewInt(1)).Hex() - res2 := common.BigToHash(l1BaseFee).Hex() - rpcElements[0].Result = &res1 - rpcElements[1].Result = &res2 - }).Return(nil).Once() + t.Parallel() - oracle := newOpStackL1GasOracle(logger.Test(t), ethClient, chaintype.ChainOptimismBedrock, oracleAddress) + t.Run("correctly fetches gas price if chain has upgraded to Fjord", func(t *testing.T) { + ethClient := setupUpgradeCheck(t, oracleAddress, true, true) + mockBatchContractCall(t, ethClient, oracleAddress, baseFee, baseFeeScalar, blobBaseFee, blobBaseFeeScalar, decimals) + + oracle, err := newOpStackL1GasOracle(logger.Test(t), ethClient, chaintype.ChainOptimismBedrock, oracleAddress) + require.NoError(t, err) gasPrice, err := oracle.GetDAGasPrice(tests.Context(t)) require.NoError(t, err) - assert.Equal(t, l1BaseFee, gasPrice) + scaledGasPrice := big.NewInt(16125000000) // baseFee * scalar * 16 + blobBaseFee * scalar + scale := big.NewInt(16000000) // Scaled by 16 * 10 ^ decimals + expectedGasPrice := new(big.Int).Div(scaledGasPrice, scale) + assert.Equal(t, expectedGasPrice, gasPrice) }) - t.Run("fetching Ecotone price but rpc returns bad data", func(t *testing.T) { - ethClient := setupIsEcotone(t, oracleAddress) + t.Run("fetching Fjord price but rpc returns bad data", func(t *testing.T) { + ethClient := setupUpgradeCheck(t, oracleAddress, true, true) ethClient.On("BatchCallContext", mock.Anything, mock.IsType([]rpc.BatchElem{})).Run(func(args mock.Arguments) { rpcElements := args.Get(1).([]rpc.BatchElem) var badData = "zzz" @@ -170,31 +307,34 @@ func TestDAPriceReader_ReadEcotoneGasPrice(t *testing.T) { rpcElements[1].Result = &badData }).Return(nil).Once() - oracle := newOpStackL1GasOracle(logger.Test(t), ethClient, chaintype.ChainOptimismBedrock, oracleAddress) - _, err := oracle.GetDAGasPrice(tests.Context(t)) + oracle, err := newOpStackL1GasOracle(logger.Test(t), ethClient, chaintype.ChainOptimismBedrock, oracleAddress) + require.NoError(t, err) + _, err = oracle.GetDAGasPrice(tests.Context(t)) assert.Error(t, err) }) - t.Run("fetching Ecotone price but rpc parent call errors", func(t *testing.T) { - ethClient := setupIsEcotone(t, oracleAddress) + t.Run("fetching Fjord price but rpc parent call errors", func(t *testing.T) { + ethClient := setupUpgradeCheck(t, oracleAddress, true, true) ethClient.On("BatchCallContext", mock.Anything, mock.IsType([]rpc.BatchElem{})).Return(fmt.Errorf("revert")).Once() - oracle := newOpStackL1GasOracle(logger.Test(t), ethClient, chaintype.ChainOptimismBedrock, oracleAddress) - _, err := oracle.GetDAGasPrice(tests.Context(t)) + oracle, err := newOpStackL1GasOracle(logger.Test(t), ethClient, chaintype.ChainOptimismBedrock, oracleAddress) + require.NoError(t, err) + _, err = oracle.GetDAGasPrice(tests.Context(t)) assert.Error(t, err) }) - t.Run("fetching Ecotone price but one of the sub rpc call errors", func(t *testing.T) { - ethClient := setupIsEcotone(t, oracleAddress) + t.Run("fetching Fjord price but one of the sub rpc call errors", func(t *testing.T) { + ethClient := setupUpgradeCheck(t, oracleAddress, true, true) ethClient.On("BatchCallContext", mock.Anything, mock.IsType([]rpc.BatchElem{})).Run(func(args mock.Arguments) { rpcElements := args.Get(1).([]rpc.BatchElem) - res := common.BigToHash(l1BaseFee).Hex() + res := common.BigToHash(baseFee).Hex() rpcElements[0].Result = &res rpcElements[1].Error = fmt.Errorf("revert") }).Return(nil).Once() - oracle := newOpStackL1GasOracle(logger.Test(t), ethClient, chaintype.ChainOptimismBedrock, oracleAddress) - _, err := oracle.GetDAGasPrice(tests.Context(t)) + oracle, err := newOpStackL1GasOracle(logger.Test(t), ethClient, chaintype.ChainOptimismBedrock, oracleAddress) + require.NoError(t, err) + _, err = oracle.GetDAGasPrice(tests.Context(t)) assert.Error(t, err) }) } diff --git a/core/chains/evm/gas/rollups/zkSync_l1_oracle.go b/core/chains/evm/gas/rollups/zkSync_l1_oracle.go index 00ee91b3f8a..31d93bc587d 100644 --- a/core/chains/evm/gas/rollups/zkSync_l1_oracle.go +++ b/core/chains/evm/gas/rollups/zkSync_l1_oracle.go @@ -120,6 +120,7 @@ func (o *zkSyncL1Oracle) run() { func (o *zkSyncL1Oracle) refresh() (t *time.Timer) { t, err := o.refreshWithError() if err != nil { + o.logger.Criticalw("Failed to refresh gas price", "err", err) o.SvcErrBuffer.Append(err) } return @@ -185,7 +186,7 @@ func (o *zkSyncL1Oracle) GasPrice(_ context.Context) (l1GasPrice *assets.Wei, er func (o *zkSyncL1Oracle) GetGasCost(ctx context.Context, tx *gethtypes.Transaction, blockNum *big.Int) (*assets.Wei, error) { //Unused method, so not implemented // And its not possible to know gas consumption of a transaction before its executed, since zkSync only posts the state difference - panic("unimplemented") + return nil, fmt.Errorf("unimplemented") } // GetL2GasPrice calls SystemContract.gasPrice() on the zksync system precompile contract. diff --git a/core/chains/evm/gas/suggested_price_estimator.go b/core/chains/evm/gas/suggested_price_estimator.go index 2c8798d6320..e8afee642af 100644 --- a/core/chains/evm/gas/suggested_price_estimator.go +++ b/core/chains/evm/gas/suggested_price_estimator.go @@ -12,7 +12,6 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/services" - "github.com/smartcontractkit/chainlink-common/pkg/utils" bigmath "github.com/smartcontractkit/chainlink-common/pkg/utils/big_math" "github.com/smartcontractkit/chainlink/v2/common/fee" @@ -101,26 +100,29 @@ func (o *SuggestedPriceEstimator) HealthReport() map[string]error { func (o *SuggestedPriceEstimator) run() { defer close(o.chDone) - t := o.refreshPrice() + o.refreshPrice() close(o.chInitialised) + t := services.TickerConfig{ + Initial: o.pollPeriod, + JitterPct: services.DefaultJitter, + }.NewTicker(o.pollPeriod) + for { select { case <-o.chStop: return case ch := <-o.chForceRefetch: - t.Stop() - t = o.refreshPrice() + o.refreshPrice() + t.Reset() close(ch) case <-t.C: - t = o.refreshPrice() + o.refreshPrice() } } } -func (o *SuggestedPriceEstimator) refreshPrice() (t *time.Timer) { - t = time.NewTimer(utils.WithJitter(o.pollPeriod)) - +func (o *SuggestedPriceEstimator) refreshPrice() { var res hexutil.Big ctx, cancel := o.chStop.CtxCancel(evmclient.ContextWithDefaultTimeout()) defer cancel() @@ -136,7 +138,6 @@ func (o *SuggestedPriceEstimator) refreshPrice() (t *time.Timer) { o.gasPriceMu.Lock() defer o.gasPriceMu.Unlock() o.GasPrice = bi - return } // Uses the force refetch chan to trigger a price update and blocks until complete diff --git a/core/chains/evm/headtracker/head_broadcaster_test.go b/core/chains/evm/headtracker/head_broadcaster_test.go index 2da41de8774..7ac61ab34b0 100644 --- a/core/chains/evm/headtracker/head_broadcaster_test.go +++ b/core/chains/evm/headtracker/head_broadcaster_test.go @@ -60,8 +60,7 @@ func TestHeadBroadcaster_Subscribe(t *testing.T) { chchHeaders <- args.Get(1).(chan<- *evmtypes.Head) }). Return(sub, nil) - // 2 for initial and 2 for backfill - ethClient.On("HeadByNumber", mock.Anything, mock.Anything).Return(testutils.Head(1), nil).Times(4) + ethClient.On("HeadByNumber", mock.Anything, mock.Anything).Return(testutils.Head(1), nil) sub.On("Unsubscribe").Return() sub.On("Err").Return(nil) diff --git a/core/chains/evm/headtracker/head_listener_test.go b/core/chains/evm/headtracker/head_listener_test.go index 2e1a9c81d5e..29b090bbffe 100644 --- a/core/chains/evm/headtracker/head_listener_test.go +++ b/core/chains/evm/headtracker/head_listener_test.go @@ -70,7 +70,7 @@ func Test_HeadListener_HappyPath(t *testing.T) { done := func() { doneAwaiter.ItHappened() } - go hl.ListenForNewHeads(handler, done) + go hl.ListenForNewHeads(func() {}, handler, done) subscribeAwaiter.AwaitOrFail(t, tests.WaitTimeout(t)) require.Eventually(t, hl.Connected, tests.WaitTimeout(t), tests.TestInterval) @@ -129,7 +129,7 @@ func Test_HeadListener_NotReceivingHeads(t *testing.T) { done := func() { doneAwaiter.ItHappened() } - go hl.ListenForNewHeads(handler, done) + go hl.ListenForNewHeads(func() {}, handler, done) subscribeAwaiter.AwaitOrFail(t, tests.WaitTimeout(t)) @@ -190,7 +190,7 @@ func Test_HeadListener_SubscriptionErr(t *testing.T) { subscribeAwaiter.ItHappened() }) go func() { - hl.ListenForNewHeads(hnh, done) + hl.ListenForNewHeads(func() {}, hnh, done) }() // Put a head on the channel to ensure we test all code paths diff --git a/core/chains/evm/headtracker/head_saver_test.go b/core/chains/evm/headtracker/head_saver_test.go index 9be9f838d08..43e79235e90 100644 --- a/core/chains/evm/headtracker/head_saver_test.go +++ b/core/chains/evm/headtracker/head_saver_test.go @@ -47,6 +47,7 @@ type config struct { finalityDepth uint32 blockEmissionIdleWarningThreshold time.Duration finalityTagEnabled bool + finalizedBlockOffset uint32 } func (c *config) FinalityDepth() uint32 { return c.finalityDepth } @@ -58,6 +59,10 @@ func (c *config) FinalityTagEnabled() bool { return c.finalityTagEnabled } +func (c *config) FinalizedBlockOffset() uint32 { + return c.finalizedBlockOffset +} + type saverOpts struct { headTrackerConfig *headTrackerConfig } diff --git a/core/chains/evm/headtracker/head_tracker.go b/core/chains/evm/headtracker/head_tracker.go index 357c4dae99a..d6c2cdc64e7 100644 --- a/core/chains/evm/headtracker/head_tracker.go +++ b/core/chains/evm/headtracker/head_tracker.go @@ -49,7 +49,10 @@ 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, latestFinalized *evmtypes.Head) (err error) { +func (*nullTracker) Backfill(ctx context.Context, headWithChain *evmtypes.Head) (err error) { return nil } func (*nullTracker) LatestChain() *evmtypes.Head { return nil } +func (*nullTracker) LatestAndFinalizedBlock(ctx context.Context) (latest, finalized *evmtypes.Head, err error) { + return nil, nil, nil +} diff --git a/core/chains/evm/headtracker/head_tracker_test.go b/core/chains/evm/headtracker/head_tracker_test.go index 4da8d27c552..21ff1b1a929 100644 --- a/core/chains/evm/headtracker/head_tracker_test.go +++ b/core/chains/evm/headtracker/head_tracker_test.go @@ -3,6 +3,7 @@ package headtracker_test import ( "context" "errors" + "fmt" "math/big" "slices" "sync" @@ -20,17 +21,19 @@ import ( "go.uber.org/zap/zaptest/observer" "golang.org/x/exp/maps" + "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/mailbox/mailboxtest" + "github.com/jmoiron/sqlx" commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" - "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/services" "github.com/smartcontractkit/chainlink-common/pkg/utils/mailbox" - "github.com/smartcontractkit/chainlink-common/pkg/utils/mailbox/mailboxtest" "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" htmocks "github.com/smartcontractkit/chainlink/v2/common/headtracker/mocks" commontypes "github.com/smartcontractkit/chainlink/v2/common/headtracker/types" + "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/evmtest" evmclient "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" evmclimocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client/mocks" @@ -60,6 +63,12 @@ func TestHeadTracker_New(t *testing.T) { ethClient.On("HeadByNumber", mock.Anything, (*big.Int)(nil)).Return(testutils.Head(0), nil) // finalized ethClient.On("HeadByNumber", mock.Anything, big.NewInt(0)).Return(testutils.Head(0), nil) + mockEth := &testutils.MockEth{ + EthClient: ethClient, + } + ethClient.On("SubscribeNewHead", mock.Anything, mock.Anything). + Maybe(). + Return(mockEth.NewSub(t), nil) orm := headtracker.NewORM(*testutils.FixtureChainID, db) assert.Nil(t, orm.IdempotentInsertHead(tests.Context(t), testutils.Head(1))) @@ -71,9 +80,10 @@ func TestHeadTracker_New(t *testing.T) { ht := createHeadTracker(t, ethClient, evmcfg.EVM(), evmcfg.EVM().HeadTracker(), orm) ht.Start(t) - latest := ht.headSaver.LatestChain() - require.NotNil(t, latest) - assert.Equal(t, last.Number, latest.Number) + tests.AssertEventually(t, func() bool { + latest := ht.headSaver.LatestChain() + return latest != nil && last.Number == latest.Number + }) } func TestHeadTracker_MarkFinalized_MarksAndTrimsTable(t *testing.T) { @@ -126,7 +136,8 @@ func TestHeadTracker_Get(t *testing.T) { {"nil no initial", nil, nil, big.NewInt(0)}, } - for _, test := range cases { + for i := range cases { + test := cases[i] t.Run(test.name, func(t *testing.T) { db := pgtest.NewSqlxDB(t) config := testutils.NewTestChainScopedConfig(t, nil) @@ -146,9 +157,9 @@ func TestHeadTracker_Get(t *testing.T) { }, func(ctx context.Context, ch chan<- *evmtypes.Head) error { return nil }, ) - ethClient.On("HeadByNumber", mock.Anything, (*big.Int)(nil)).Return(testutils.Head(0), nil) + ethClient.On("HeadByNumber", mock.Anything, (*big.Int)(nil)).Return(testutils.Head(0), nil).Maybe() - fnCall := ethClient.On("HeadByNumber", mock.Anything, mock.Anything) + fnCall := ethClient.On("HeadByNumber", mock.Anything, mock.Anything).Maybe() fnCall.RunFn = func(args mock.Arguments) { num := args.Get(1).(*big.Int) fnCall.ReturnArguments = mock.Arguments{testutils.Head(num.Int64()), nil} @@ -166,7 +177,10 @@ func TestHeadTracker_Get(t *testing.T) { assert.NoError(t, err) } - assert.Equal(t, test.want, ht.headSaver.LatestChain().ToInt()) + tests.AssertEventually(t, func() bool { + latest := ht.headSaver.LatestChain().ToInt() + return latest != nil && test.want.Cmp(latest) == 0 + }) }) } } @@ -226,19 +240,12 @@ func TestHeadTracker_Start(t *testing.T) { } }) orm := headtracker.NewORM(*testutils.FixtureChainID, db) - ethClient := testutils.NewEthClientMockWithDefaultChain(t) + ethClient := evmtest.NewEthClientMockWithDefaultChain(t) + mockEth := &testutils.MockEth{EthClient: ethClient} + sub := mockEth.NewSub(t) + ethClient.On("SubscribeNewHead", mock.Anything, mock.Anything).Return(sub, nil).Maybe() return createHeadTracker(t, ethClient, config.EVM(), config.EVM().HeadTracker(), orm) } - - t.Run("Fail start if context was canceled", func(t *testing.T) { - ctx, cancel := context.WithCancel(tests.Context(t)) - ht := newHeadTracker(t, opts{}) - ht.ethClient.On("HeadByNumber", mock.Anything, (*big.Int)(nil)).Run(func(args mock.Arguments) { - cancel() - }).Return(testutils.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, opts{}) ht.ethClient.On("HeadByNumber", mock.Anything, (*big.Int)(nil)).Return(testutils.Head(0), errors.New("failed to get init head")) @@ -268,20 +275,6 @@ func TestHeadTracker_Start(t *testing.T) { ht.Start(t) tests.AssertLogEventually(t, ht.observer, "Error handling initial head") }) - t.Run("Logs error if finality gap is too big", func(t *testing.T) { - ht := newHeadTracker(t, opts{FinalityTagEnable: ptr(true), FinalityTagBypass: ptr(false), MaxAllowedFinalityDepth: ptr(uint32(10))}) - head := testutils.Head(1000) - ht.ethClient.On("HeadByNumber", mock.Anything, (*big.Int)(nil)).Return(head, nil).Once() - ht.ethClient.On("LatestFinalizedBlock", mock.Anything).Return(testutils.Head(989), nil).Once() - ht.ethClient.On("SubscribeNewHead", mock.Anything, mock.Anything).Return(nil, errors.New("failed to connect")).Maybe() - ht.Start(t) - tests.AssertEventually(t, func() bool { - // must exactly match the error passed to logger - field := zap.String("err", "failed to calculate latest finalized head: gap between latest finalized block (989) and current head (1000) is too large (> 10)") - filtered := ht.observer.FilterMessage("Error handling initial head").FilterField(field) - return filtered.Len() > 0 - }) - }) t.Run("Happy path (finality tag)", func(t *testing.T) { head := testutils.Head(1000) ht := newHeadTracker(t, opts{FinalityTagEnable: ptr(true), FinalityTagBypass: ptr(false)}) @@ -337,7 +330,6 @@ func TestHeadTracker_Start(t *testing.T) { func TestHeadTracker_CallsHeadTrackableCallbacks(t *testing.T) { t.Parallel() - g := gomega.NewWithT(t) db := pgtest.NewSqlxDB(t) config := testutils.NewTestChainScopedConfig(t, nil) @@ -367,7 +359,7 @@ func TestHeadTracker_CallsHeadTrackableCallbacks(t *testing.T) { headers := <-chchHeaders headers.TrySend(&evmtypes.Head{Number: 1, Hash: utils.NewHash(), EVMChainID: ubig.New(testutils.FixtureChainID)}) - g.Eventually(checker.OnNewLongestChainCount).Should(gomega.Equal(int32(1))) + tests.AssertEventually(t, func() bool { return checker.OnNewLongestChainCount() == 1 }) ht.Stop(t) assert.Equal(t, int32(1), checker.OnNewLongestChainCount()) @@ -877,10 +869,23 @@ func TestHeadTracker_Backfill(t *testing.T) { ctx := tests.Context(t) type opts struct { - Heads []evmtypes.Head + Heads []evmtypes.Head + FinalityTagEnabled bool + FinalizedBlockOffset uint32 + FinalityDepth uint32 + MaxAllowedFinalityDepth uint32 } newHeadTrackerUniverse := func(t *testing.T, opts opts) *headTrackerUniverse { - evmcfg := testutils.NewTestChainScopedConfig(t, nil) + evmcfg := testutils.NewTestChainScopedConfig(t, func(c *toml.EVMConfig) { + c.FinalityTagEnabled = ptr(opts.FinalityTagEnabled) + c.FinalizedBlockOffset = ptr(opts.FinalizedBlockOffset) + c.FinalityDepth = ptr(opts.FinalityDepth) + c.HeadTracker.FinalityTagBypass = ptr(false) + if opts.MaxAllowedFinalityDepth > 0 { + c.HeadTracker.MaxAllowedFinalityDepth = ptr(opts.MaxAllowedFinalityDepth) + } + }) + db := pgtest.NewSqlxDB(t) orm := headtracker.NewORM(*testutils.FixtureChainID, db) for i := range opts.Heads { @@ -894,26 +899,44 @@ func TestHeadTracker_Backfill(t *testing.T) { return ht } + t.Run("returns error if failed to get latestFinalized block", func(t *testing.T) { + htu := newHeadTrackerUniverse(t, opts{FinalityTagEnabled: true}) + const expectedError = "failed to fetch latest finalized block" + htu.ethClient.On("LatestFinalizedBlock", mock.Anything).Return(nil, errors.New(expectedError)).Once() + + err := htu.headTracker.Backfill(ctx, &h12) + require.ErrorContains(t, err, expectedError) + }) t.Run("returns error if latestFinalized is not valid", func(t *testing.T) { - htu := newHeadTrackerUniverse(t, opts{}) + htu := newHeadTrackerUniverse(t, opts{FinalityTagEnabled: true}) + htu.ethClient.On("LatestFinalizedBlock", mock.Anything).Return(nil, nil).Once() - err := htu.headTracker.Backfill(ctx, &h12, nil) - require.EqualError(t, err, "can not perform backfill without a valid latestFinalized head") + err := htu.headTracker.Backfill(ctx, &h12) + require.EqualError(t, err, "failed to calculate finalized block: failed to get valid latest finalized block") + }) + t.Run("Returns error if finality gap is too big", func(t *testing.T) { + htu := newHeadTrackerUniverse(t, opts{FinalityTagEnabled: true, MaxAllowedFinalityDepth: 2}) + htu.ethClient.On("LatestFinalizedBlock", mock.Anything).Return(&h9, nil).Once() + + err := htu.headTracker.Backfill(ctx, &h12) + require.EqualError(t, err, "gap between latest finalized block (9) and current head (12) is too large (> 2)") }) t.Run("Returns error if finalized head is ahead of canonical", func(t *testing.T) { - htu := newHeadTrackerUniverse(t, opts{}) + htu := newHeadTrackerUniverse(t, opts{FinalityTagEnabled: true}) + htu.ethClient.On("LatestFinalizedBlock", mock.Anything).Return(&h14Orphaned, nil).Once() - err := htu.headTracker.Backfill(ctx, &h12, &h14Orphaned) + err := htu.headTracker.Backfill(ctx, &h12) 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}) + htu := newHeadTrackerUniverse(t, opts{Heads: heads, FinalityTagEnabled: true}) + htu.ethClient.On("LatestFinalizedBlock", mock.Anything).Return(&h14Orphaned, nil).Once() - err := htu.headTracker.Backfill(ctx, &h15, &h14Orphaned) + err := htu.headTracker.Backfill(ctx, &h15) 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}) + htu := newHeadTrackerUniverse(t, opts{Heads: heads, FinalityTagEnabled: true}) assertFinalized := func(expectedFinalized bool, msg string, heads ...evmtypes.Head) { for _, h := range heads { @@ -922,18 +945,20 @@ func TestHeadTracker_Backfill(t *testing.T) { } } - err := htu.headTracker.Backfill(ctx, &h15, &h14) + htu.ethClient.On("LatestFinalizedBlock", mock.Anything).Return(&h14, nil).Once() + err := htu.headTracker.Backfill(ctx, &h15) 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) }) t.Run("fetches a missing head", func(t *testing.T) { - htu := newHeadTrackerUniverse(t, opts{Heads: heads}) + htu := newHeadTrackerUniverse(t, opts{Heads: heads, FinalityTagEnabled: true}) + htu.ethClient.On("LatestFinalizedBlock", mock.Anything).Return(&h9, nil).Once() htu.ethClient.On("HeadByHash", mock.Anything, head10.Hash). Return(&head10, nil) - err := htu.headTracker.Backfill(ctx, &h12, &h9) + err := htu.headTracker.Backfill(ctx, &h12) require.NoError(t, err) h := htu.headSaver.Chain(h12.Hash) @@ -950,16 +975,16 @@ func TestHeadTracker_Backfill(t *testing.T) { require.NoError(t, err) assert.Equal(t, int64(10), writtenHead.Number) }) - t.Run("fetches only heads that are missing", func(t *testing.T) { - htu := newHeadTrackerUniverse(t, opts{Heads: heads}) + htu := newHeadTrackerUniverse(t, opts{Heads: heads, FinalityTagEnabled: true}) + htu.ethClient.On("LatestFinalizedBlock", mock.Anything).Return(&head8, nil).Once() htu.ethClient.On("HeadByHash", mock.Anything, head10.Hash). Return(&head10, nil) htu.ethClient.On("HeadByHash", mock.Anything, head8.Hash). Return(&head8, nil) - err := htu.headTracker.Backfill(ctx, &h15, &head8) + err := htu.headTracker.Backfill(ctx, &h15) require.NoError(t, err) h := htu.headSaver.Chain(h15.Hash) @@ -971,7 +996,8 @@ func TestHeadTracker_Backfill(t *testing.T) { }) t.Run("abandons backfill and returns error if the eth node returns not found", func(t *testing.T) { - htu := newHeadTrackerUniverse(t, opts{Heads: heads}) + htu := newHeadTrackerUniverse(t, opts{Heads: heads, FinalityTagEnabled: true}) + htu.ethClient.On("LatestFinalizedBlock", mock.Anything).Return(&head8, nil).Once() htu.ethClient.On("HeadByHash", mock.Anything, head10.Hash). Return(&head10, nil). Once() @@ -979,9 +1005,9 @@ func TestHeadTracker_Backfill(t *testing.T) { Return(nil, ethereum.NotFound). Once() - err := htu.headTracker.Backfill(ctx, &h12, &head8) + err := htu.headTracker.Backfill(ctx, &h12) require.Error(t, err) - require.EqualError(t, err, "fetchAndSaveHead failed: not found") + require.ErrorContains(t, err, "fetchAndSaveHead failed: not found") h := htu.headSaver.Chain(h12.Hash) @@ -991,7 +1017,8 @@ func TestHeadTracker_Backfill(t *testing.T) { }) t.Run("abandons backfill and returns error if the context time budget is exceeded", func(t *testing.T) { - htu := newHeadTrackerUniverse(t, opts{Heads: heads}) + htu := newHeadTrackerUniverse(t, opts{Heads: heads, FinalityTagEnabled: true}) + htu.ethClient.On("LatestFinalizedBlock", mock.Anything).Return(&head8, nil).Once() htu.ethClient.On("HeadByHash", mock.Anything, head10.Hash). Return(&head10, nil) lctx, cancel := context.WithCancel(ctx) @@ -1000,9 +1027,9 @@ func TestHeadTracker_Backfill(t *testing.T) { cancel() }) - err := htu.headTracker.Backfill(lctx, &h12, &head8) + err := htu.headTracker.Backfill(lctx, &h12) require.Error(t, err) - require.EqualError(t, err, "fetchAndSaveHead failed: context canceled") + require.ErrorContains(t, err, "fetchAndSaveHead failed: context canceled") h := htu.headSaver.Chain(h12.Hash) @@ -1010,17 +1037,17 @@ func TestHeadTracker_Backfill(t *testing.T) { assert.Equal(t, 4, int(h.ChainLength())) assert.Equal(t, int64(9), h.EarliestInChain().BlockNumber()) }) - t.Run("abandons backfill and returns error when fetching a block by hash fails, indicating a reorg", func(t *testing.T) { - htu := newHeadTrackerUniverse(t, opts{}) + htu := newHeadTrackerUniverse(t, opts{FinalityTagEnabled: true}) + htu.ethClient.On("LatestFinalizedBlock", mock.Anything).Return(&h11, nil).Once() 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() - err := htu.headTracker.Backfill(ctx, &h15, &h11) + err := htu.headTracker.Backfill(ctx, &h15) require.Error(t, err) - require.EqualError(t, err, "fetchAndSaveHead failed: not found") + require.ErrorContains(t, err, "fetchAndSaveHead failed: not found") h := htu.headSaver.Chain(h14.Hash) @@ -1029,9 +1056,10 @@ func TestHeadTracker_Backfill(t *testing.T) { 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}}) + htu := newHeadTrackerUniverse(t, opts{Heads: []evmtypes.Head{h15}, FinalityTagEnabled: true}) finalizedH15 := h15 // copy h15 to have different addresses - err := htu.headTracker.Backfill(ctx, &h15, &finalizedH15) + htu.ethClient.On("LatestFinalizedBlock", mock.Anything).Return(&finalizedH15, nil).Once() + err := htu.headTracker.Backfill(ctx, &h15) require.NoError(t, err) h := htu.headSaver.LatestChain() @@ -1042,12 +1070,215 @@ func TestHeadTracker_Backfill(t *testing.T) { assert.Equal(t, h15.BlockNumber(), h.BlockNumber()) assert.Equal(t, h15.Hash, h.Hash) }) + t.Run("marks block as finalized according to FinalizedBlockOffset (finality tag)", func(t *testing.T) { + htu := newHeadTrackerUniverse(t, opts{Heads: []evmtypes.Head{h15}, FinalityTagEnabled: true, FinalizedBlockOffset: 2}) + htu.ethClient.On("LatestFinalizedBlock", mock.Anything).Return(&h14, nil).Once() + // calculateLatestFinalizedBlock fetches blocks at LatestFinalized - FinalizedBlockOffset + htu.ethClient.On("HeadByNumber", mock.Anything, big.NewInt(h12.Number)).Return(&h12, nil).Once() + // backfill from 15 to 12 + htu.ethClient.On("HeadByHash", mock.Anything, h12.Hash).Return(&h12, nil).Once() + htu.ethClient.On("HeadByHash", mock.Anything, h13.Hash).Return(&h13, nil).Once() + htu.ethClient.On("HeadByHash", mock.Anything, h14.Hash).Return(&h14, nil).Once() + err := htu.headTracker.Backfill(ctx, &h15) + require.NoError(t, err) + + h := htu.headSaver.LatestChain() + // h - must contain 15, 14, 13, 12 and only 12 is finalized + assert.Equal(t, 4, int(h.ChainLength())) + for ; h.Hash != h12.Hash; h = h.Parent { + assert.False(t, h.IsFinalized) + } + + assert.True(t, h.IsFinalized) + assert.Equal(t, h12.BlockNumber(), h.BlockNumber()) + assert.Equal(t, h12.Hash, h.Hash) + }) + t.Run("marks block as finalized according to FinalizedBlockOffset (finality depth)", func(t *testing.T) { + htu := newHeadTrackerUniverse(t, opts{Heads: []evmtypes.Head{h15}, FinalityDepth: 1, FinalizedBlockOffset: 2}) + htu.ethClient.On("HeadByNumber", mock.Anything, big.NewInt(12)).Return(&h12, nil).Once() + + // backfill from 15 to 12 + 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(&h12, nil).Once() + err := htu.headTracker.Backfill(ctx, &h15) + require.NoError(t, err) + + h := htu.headSaver.LatestChain() + // h - must contain 15, 14, 13, 12 and only 12 is finalized + assert.Equal(t, 4, int(h.ChainLength())) + for ; h.Hash != h12.Hash; h = h.Parent { + assert.False(t, h.IsFinalized) + } + + assert.True(t, h.IsFinalized) + assert.Equal(t, h12.BlockNumber(), h.BlockNumber()) + assert.Equal(t, h12.Hash, h.Hash) + }) + t.Run("marks block as finalized according to FinalizedBlockOffset even with instant finality", func(t *testing.T) { + htu := newHeadTrackerUniverse(t, opts{Heads: []evmtypes.Head{h15}, FinalityDepth: 0, FinalizedBlockOffset: 2}) + htu.ethClient.On("HeadByNumber", mock.Anything, big.NewInt(13)).Return(&h13, nil).Once() + + // backfill from 15 to 13 + htu.ethClient.On("HeadByHash", mock.Anything, h14.Hash).Return(&h14, nil).Once() + htu.ethClient.On("HeadByHash", mock.Anything, h13.Hash).Return(&h13, nil).Once() + err := htu.headTracker.Backfill(ctx, &h15) + require.NoError(t, err) + + h := htu.headSaver.LatestChain() + // h - must contain 15, 14, 13, only 13 is finalized + assert.Equal(t, 3, int(h.ChainLength())) + for ; h.Hash != h13.Hash; h = h.Parent { + assert.False(t, h.IsFinalized) + } + + assert.True(t, h.IsFinalized) + assert.Equal(t, h13.BlockNumber(), h.BlockNumber()) + assert.Equal(t, h13.Hash, h.Hash) + }) +} + +func TestHeadTracker_LatestAndFinalizedBlock(t *testing.T) { + t.Parallel() + + ctx := tests.Context(t) + + h11 := testutils.Head(11) + h11.ParentHash = utils.NewHash() + + h12 := testutils.Head(12) + h12.ParentHash = h11.Hash + + h13 := testutils.Head(13) + h13.ParentHash = h12.Hash + + type opts struct { + Heads []evmtypes.Head + FinalityTagEnabled bool + FinalizedBlockOffset uint32 + FinalityDepth uint32 + } + + newHeadTrackerUniverse := func(t *testing.T, opts opts) *headTrackerUniverse { + evmcfg := testutils.NewTestChainScopedConfig(t, func(c *toml.EVMConfig) { + c.FinalityTagEnabled = ptr(opts.FinalityTagEnabled) + c.FinalizedBlockOffset = ptr(opts.FinalizedBlockOffset) + c.FinalityDepth = ptr(opts.FinalityDepth) + }) + + db := pgtest.NewSqlxDB(t) + orm := headtracker.NewORM(*testutils.FixtureChainID, db) + for i := range opts.Heads { + require.NoError(t, orm.IdempotentInsertHead(tests.Context(t), &opts.Heads[i])) + } + ethClient := evmtest.NewEthClientMock(t) + ethClient.On("ConfiguredChainID", mock.Anything).Return(testutils.FixtureChainID, nil) + ht := createHeadTracker(t, ethClient, evmcfg.EVM(), evmcfg.EVM().HeadTracker(), orm) + _, err := ht.headSaver.Load(tests.Context(t), 0) + require.NoError(t, err) + return ht + } + t.Run("returns error if failed to get latest block", func(t *testing.T) { + htu := newHeadTrackerUniverse(t, opts{FinalityTagEnabled: true}) + const expectedError = "failed to fetch latest block" + htu.ethClient.On("HeadByNumber", mock.Anything, (*big.Int)(nil)).Return(nil, errors.New(expectedError)).Once() + + _, _, err := htu.headTracker.LatestAndFinalizedBlock(ctx) + require.ErrorContains(t, err, expectedError) + }) + t.Run("returns error if latest block is invalid", func(t *testing.T) { + htu := newHeadTrackerUniverse(t, opts{FinalityTagEnabled: true}) + htu.ethClient.On("HeadByNumber", mock.Anything, (*big.Int)(nil)).Return(nil, nil).Once() + + _, _, err := htu.headTracker.LatestAndFinalizedBlock(ctx) + require.ErrorContains(t, err, "expected latest block to be valid") + }) + t.Run("returns error if failed to get latest finalized (finality tag)", func(t *testing.T) { + htu := newHeadTrackerUniverse(t, opts{FinalityTagEnabled: true}) + htu.ethClient.On("HeadByNumber", mock.Anything, (*big.Int)(nil)).Return(h13, nil).Once() + const expectedError = "failed to get latest finalized block" + htu.ethClient.On("LatestFinalizedBlock", mock.Anything).Return(nil, fmt.Errorf(expectedError)).Once() + + _, _, err := htu.headTracker.LatestAndFinalizedBlock(ctx) + require.ErrorContains(t, err, expectedError) + }) + t.Run("returns error if latest finalized block is not valid (finality tag)", func(t *testing.T) { + htu := newHeadTrackerUniverse(t, opts{FinalityTagEnabled: true}) + htu.ethClient.On("HeadByNumber", mock.Anything, (*big.Int)(nil)).Return(h13, nil).Once() + htu.ethClient.On("LatestFinalizedBlock", mock.Anything).Return(nil, nil).Once() + + _, _, err := htu.headTracker.LatestAndFinalizedBlock(ctx) + require.ErrorContains(t, err, "failed to get valid latest finalized block") + }) + t.Run("returns latest finalized block as is if FinalizedBlockOffset is 0 (finality tag)", func(t *testing.T) { + htu := newHeadTrackerUniverse(t, opts{FinalityTagEnabled: true}) + htu.ethClient.On("HeadByNumber", mock.Anything, (*big.Int)(nil)).Return(h13, nil).Once() + htu.ethClient.On("LatestFinalizedBlock", mock.Anything).Return(h11, nil).Once() + + actualL, actualLF, err := htu.headTracker.LatestAndFinalizedBlock(ctx) + require.NoError(t, err) + assert.Equal(t, actualL, h13) + assert.Equal(t, actualLF, h11) + }) + t.Run("returns latest finalized block with offset from cache (finality tag)", func(t *testing.T) { + htu := newHeadTrackerUniverse(t, opts{FinalityTagEnabled: true, FinalizedBlockOffset: 1, Heads: []evmtypes.Head{*h13, *h12, *h11}}) + htu.ethClient.On("HeadByNumber", mock.Anything, (*big.Int)(nil)).Return(h13, nil).Once() + htu.ethClient.On("LatestFinalizedBlock", mock.Anything).Return(h12, nil).Once() + + actualL, actualLF, err := htu.headTracker.LatestAndFinalizedBlock(ctx) + require.NoError(t, err) + assert.Equal(t, actualL.Number, h13.Number) + assert.Equal(t, actualLF.Number, h11.Number) + }) + t.Run("returns latest finalized block with offset from RPC (finality tag)", func(t *testing.T) { + htu := newHeadTrackerUniverse(t, opts{FinalityTagEnabled: true, FinalizedBlockOffset: 2, Heads: []evmtypes.Head{*h13, *h12, *h11}}) + htu.ethClient.On("HeadByNumber", mock.Anything, (*big.Int)(nil)).Return(h13, nil).Once() + htu.ethClient.On("LatestFinalizedBlock", mock.Anything).Return(h12, nil).Once() + h10 := testutils.Head(10) + htu.ethClient.On("HeadByNumber", mock.Anything, big.NewInt(10)).Return(h10, nil).Once() + + actualL, actualLF, err := htu.headTracker.LatestAndFinalizedBlock(ctx) + require.NoError(t, err) + assert.Equal(t, actualL.Number, h13.Number) + assert.Equal(t, actualLF.Number, h10.Number) + }) + t.Run("returns current head for both latest and finalized for FD = 0 (finality depth)", func(t *testing.T) { + htu := newHeadTrackerUniverse(t, opts{}) + htu.ethClient.On("HeadByNumber", mock.Anything, (*big.Int)(nil)).Return(h13, nil).Once() + + actualL, actualLF, err := htu.headTracker.LatestAndFinalizedBlock(ctx) + require.NoError(t, err) + assert.Equal(t, actualL.Number, h13.Number) + assert.Equal(t, actualLF.Number, h13.Number) + }) + t.Run("returns latest finalized block with offset from cache (finality depth)", func(t *testing.T) { + htu := newHeadTrackerUniverse(t, opts{FinalityDepth: 1, FinalizedBlockOffset: 1, Heads: []evmtypes.Head{*h13, *h12, *h11}}) + htu.ethClient.On("HeadByNumber", mock.Anything, (*big.Int)(nil)).Return(h13, nil).Once() + + actualL, actualLF, err := htu.headTracker.LatestAndFinalizedBlock(ctx) + require.NoError(t, err) + assert.Equal(t, actualL.Number, h13.Number) + assert.Equal(t, actualLF.Number, h11.Number) + }) + t.Run("returns latest finalized block with offset from RPC (finality depth)", func(t *testing.T) { + htu := newHeadTrackerUniverse(t, opts{FinalityDepth: 1, FinalizedBlockOffset: 2, Heads: []evmtypes.Head{*h13, *h12, *h11}}) + htu.ethClient.On("HeadByNumber", mock.Anything, (*big.Int)(nil)).Return(h13, nil).Once() + h10 := testutils.Head(10) + htu.ethClient.On("HeadByNumber", mock.Anything, big.NewInt(10)).Return(h10, nil).Once() + + actualL, actualLF, err := htu.headTracker.LatestAndFinalizedBlock(ctx) + require.NoError(t, err) + assert.Equal(t, actualL.Number, h13.Number) + assert.Equal(t, actualLF.Number, h10.Number) + }) } // BenchmarkHeadTracker_Backfill - benchmarks HeadTracker's Backfill with focus on efficiency after initial // backfill on start up func BenchmarkHeadTracker_Backfill(b *testing.B) { - evmcfg := testutils.NewTestChainScopedConfig(b, nil) + evmcfg := testutils.NewTestChainScopedConfig(b, func(c *toml.EVMConfig) { + c.FinalityTagEnabled = ptr(true) + }) db := pgtest.NewSqlxDB(b) chainID := big.NewInt(evmclient.NullClientChainID) orm := headtracker.NewORM(*chainID, db) @@ -1068,15 +1299,17 @@ func BenchmarkHeadTracker_Backfill(b *testing.B) { number := hash.Big().Int64() return makeBlock(number), nil }) + ethClient.On("LatestFinalizedBlock", mock.Anything).Return(finalized, nil).Once() // run initial backfill to populate the database - err := ht.headTracker.Backfill(ctx, latest, finalized) + err := ht.headTracker.Backfill(ctx, latest) require.NoError(b, err) b.ResetTimer() // focus benchmark on processing of a new latest block for i := 0; i < b.N; i++ { latest = makeBlock(int64(finalityDepth + i)) finalized = makeBlock(int64(i + 1)) - err := ht.headTracker.Backfill(ctx, latest, finalized) + ethClient.On("LatestFinalizedBlock", mock.Anything).Return(finalized, nil).Once() + err := ht.headTracker.Backfill(ctx, latest) require.NoError(b, err) } } @@ -1129,8 +1362,8 @@ type headTrackerUniverse struct { ethClient *evmclimocks.Client } -func (u *headTrackerUniverse) Backfill(ctx context.Context, head, finalizedHead *evmtypes.Head) error { - return u.headTracker.Backfill(ctx, head, finalizedHead) +func (u *headTrackerUniverse) Backfill(ctx context.Context, head *evmtypes.Head) error { + return u.headTracker.Backfill(ctx, head) } func (u *headTrackerUniverse) Start(t *testing.T) { diff --git a/core/chains/evm/headtracker/simulated_head_tracker.go b/core/chains/evm/headtracker/simulated_head_tracker.go new file mode 100644 index 00000000000..e1e550de992 --- /dev/null +++ b/core/chains/evm/headtracker/simulated_head_tracker.go @@ -0,0 +1,53 @@ +package headtracker + +import ( + "context" + "fmt" + "math/big" + + evmclient "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" + evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" +) + +// simulatedHeadTracker - simplified version of HeadTracker that works with simulated backed +type simulatedHeadTracker struct { + ec evmclient.Client + useFinalityTag bool + finalityDepth int64 +} + +func NewSimulatedHeadTracker(ec evmclient.Client, useFinalityTag bool, finalityDepth int64) *simulatedHeadTracker { + return &simulatedHeadTracker{ + ec: ec, + useFinalityTag: useFinalityTag, + finalityDepth: finalityDepth, + } +} + +func (ht *simulatedHeadTracker) LatestAndFinalizedBlock(ctx context.Context) (*evmtypes.Head, *evmtypes.Head, error) { + latest, err := ht.ec.HeadByNumber(ctx, nil) + if err != nil { + return nil, nil, err + } + + if latest == nil { + return nil, nil, fmt.Errorf("expected latest block to be valid") + } + + var finalizedBlock *evmtypes.Head + if ht.useFinalityTag { + finalizedBlock, err = ht.ec.LatestFinalizedBlock(ctx) + } else { + finalizedBlock, err = ht.ec.HeadByNumber(ctx, big.NewInt(max(latest.Number-ht.finalityDepth, 0))) + } + + if err != nil { + return nil, nil, fmt.Errorf("simulatedHeadTracker failed to get finalized block") + } + + if finalizedBlock == nil { + return nil, nil, fmt.Errorf("expected finalized block to be valid") + } + + return latest, finalizedBlock, nil +} diff --git a/core/chains/evm/keystore/eth.go b/core/chains/evm/keystore/eth.go index 1e2b0c439bc..ff71e0a4f18 100644 --- a/core/chains/evm/keystore/eth.go +++ b/core/chains/evm/keystore/eth.go @@ -9,8 +9,6 @@ import ( ) // 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) diff --git a/core/chains/evm/keystore/mocks/eth.go b/core/chains/evm/keystore/mocks/eth.go index 9c11551e2c2..d0563702b7b 100644 --- a/core/chains/evm/keystore/mocks/eth.go +++ b/core/chains/evm/keystore/mocks/eth.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -18,6 +18,14 @@ type Eth struct { mock.Mock } +type Eth_Expecter struct { + mock *mock.Mock +} + +func (_m *Eth) EXPECT() *Eth_Expecter { + return &Eth_Expecter{mock: &_m.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) @@ -36,6 +44,36 @@ func (_m *Eth) CheckEnabled(ctx context.Context, address common.Address, chainID return r0 } +// Eth_CheckEnabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckEnabled' +type Eth_CheckEnabled_Call struct { + *mock.Call +} + +// CheckEnabled is a helper method to define mock.On call +// - ctx context.Context +// - address common.Address +// - chainID *big.Int +func (_e *Eth_Expecter) CheckEnabled(ctx interface{}, address interface{}, chainID interface{}) *Eth_CheckEnabled_Call { + return &Eth_CheckEnabled_Call{Call: _e.mock.On("CheckEnabled", ctx, address, chainID)} +} + +func (_c *Eth_CheckEnabled_Call) Run(run func(ctx context.Context, address common.Address, chainID *big.Int)) *Eth_CheckEnabled_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(*big.Int)) + }) + return _c +} + +func (_c *Eth_CheckEnabled_Call) Return(_a0 error) *Eth_CheckEnabled_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Eth_CheckEnabled_Call) RunAndReturn(run func(context.Context, common.Address, *big.Int) error) *Eth_CheckEnabled_Call { + _c.Call.Return(run) + return _c +} + // 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) @@ -66,6 +104,35 @@ func (_m *Eth) EnabledAddressesForChain(ctx context.Context, chainID *big.Int) ( return r0, r1 } +// Eth_EnabledAddressesForChain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnabledAddressesForChain' +type Eth_EnabledAddressesForChain_Call struct { + *mock.Call +} + +// EnabledAddressesForChain is a helper method to define mock.On call +// - ctx context.Context +// - chainID *big.Int +func (_e *Eth_Expecter) EnabledAddressesForChain(ctx interface{}, chainID interface{}) *Eth_EnabledAddressesForChain_Call { + return &Eth_EnabledAddressesForChain_Call{Call: _e.mock.On("EnabledAddressesForChain", ctx, chainID)} +} + +func (_c *Eth_EnabledAddressesForChain_Call) Run(run func(ctx context.Context, chainID *big.Int)) *Eth_EnabledAddressesForChain_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*big.Int)) + }) + return _c +} + +func (_c *Eth_EnabledAddressesForChain_Call) Return(addresses []common.Address, err error) *Eth_EnabledAddressesForChain_Call { + _c.Call.Return(addresses, err) + return _c +} + +func (_c *Eth_EnabledAddressesForChain_Call) RunAndReturn(run func(context.Context, *big.Int) ([]common.Address, error)) *Eth_EnabledAddressesForChain_Call { + _c.Call.Return(run) + return _c +} + // 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) @@ -96,6 +163,37 @@ func (_m *Eth) SignTx(ctx context.Context, fromAddress common.Address, tx *types return r0, r1 } +// Eth_SignTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SignTx' +type Eth_SignTx_Call struct { + *mock.Call +} + +// SignTx is a helper method to define mock.On call +// - ctx context.Context +// - fromAddress common.Address +// - tx *types.Transaction +// - chainID *big.Int +func (_e *Eth_Expecter) SignTx(ctx interface{}, fromAddress interface{}, tx interface{}, chainID interface{}) *Eth_SignTx_Call { + return &Eth_SignTx_Call{Call: _e.mock.On("SignTx", ctx, fromAddress, tx, chainID)} +} + +func (_c *Eth_SignTx_Call) Run(run func(ctx context.Context, fromAddress common.Address, tx *types.Transaction, chainID *big.Int)) *Eth_SignTx_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(*types.Transaction), args[3].(*big.Int)) + }) + return _c +} + +func (_c *Eth_SignTx_Call) Return(_a0 *types.Transaction, _a1 error) *Eth_SignTx_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Eth_SignTx_Call) RunAndReturn(run func(context.Context, common.Address, *types.Transaction, *big.Int) (*types.Transaction, error)) *Eth_SignTx_Call { + _c.Call.Return(run) + return _c +} + // SubscribeToKeyChanges provides a mock function with given fields: ctx func (_m *Eth) SubscribeToKeyChanges(ctx context.Context) (chan struct{}, func()) { ret := _m.Called(ctx) @@ -128,6 +226,34 @@ func (_m *Eth) SubscribeToKeyChanges(ctx context.Context) (chan struct{}, func() return r0, r1 } +// Eth_SubscribeToKeyChanges_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SubscribeToKeyChanges' +type Eth_SubscribeToKeyChanges_Call struct { + *mock.Call +} + +// SubscribeToKeyChanges is a helper method to define mock.On call +// - ctx context.Context +func (_e *Eth_Expecter) SubscribeToKeyChanges(ctx interface{}) *Eth_SubscribeToKeyChanges_Call { + return &Eth_SubscribeToKeyChanges_Call{Call: _e.mock.On("SubscribeToKeyChanges", ctx)} +} + +func (_c *Eth_SubscribeToKeyChanges_Call) Run(run func(ctx context.Context)) *Eth_SubscribeToKeyChanges_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Eth_SubscribeToKeyChanges_Call) Return(ch chan struct{}, unsub func()) *Eth_SubscribeToKeyChanges_Call { + _c.Call.Return(ch, unsub) + return _c +} + +func (_c *Eth_SubscribeToKeyChanges_Call) RunAndReturn(run func(context.Context) (chan struct{}, func())) *Eth_SubscribeToKeyChanges_Call { + _c.Call.Return(run) + return _c +} + // 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 { diff --git a/core/chains/evm/log/broadcaster.go b/core/chains/evm/log/broadcaster.go index 148c36148c2..e7f02d1199c 100644 --- a/core/chains/evm/log/broadcaster.go +++ b/core/chains/evm/log/broadcaster.go @@ -26,8 +26,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" ) -//go:generate mockery --quiet --name Broadcaster --output ./mocks/ --case=underscore --structname Broadcaster --filename broadcaster.go - type ( // The Broadcaster manages log subscription requests for the Chainlink node. Instead // of creating a new subscription for each request, it multiplexes all subscriptions diff --git a/core/chains/evm/log/mocks/abigen_contract.go b/core/chains/evm/log/mocks/abigen_contract.go index 3ab5e350505..b247afc36fc 100644 --- a/core/chains/evm/log/mocks/abigen_contract.go +++ b/core/chains/evm/log/mocks/abigen_contract.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -16,6 +16,14 @@ type AbigenContract struct { mock.Mock } +type AbigenContract_Expecter struct { + mock *mock.Mock +} + +func (_m *AbigenContract) EXPECT() *AbigenContract_Expecter { + return &AbigenContract_Expecter{mock: &_m.Mock} +} + // Address provides a mock function with given fields: func (_m *AbigenContract) Address() common.Address { ret := _m.Called() @@ -36,6 +44,33 @@ func (_m *AbigenContract) Address() common.Address { return r0 } +// AbigenContract_Address_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Address' +type AbigenContract_Address_Call struct { + *mock.Call +} + +// Address is a helper method to define mock.On call +func (_e *AbigenContract_Expecter) Address() *AbigenContract_Address_Call { + return &AbigenContract_Address_Call{Call: _e.mock.On("Address")} +} + +func (_c *AbigenContract_Address_Call) Run(run func()) *AbigenContract_Address_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *AbigenContract_Address_Call) Return(_a0 common.Address) *AbigenContract_Address_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *AbigenContract_Address_Call) RunAndReturn(run func() common.Address) *AbigenContract_Address_Call { + _c.Call.Return(run) + return _c +} + // ParseLog provides a mock function with given fields: _a0 func (_m *AbigenContract) ParseLog(_a0 types.Log) (generated.AbigenLog, error) { ret := _m.Called(_a0) @@ -66,6 +101,34 @@ func (_m *AbigenContract) ParseLog(_a0 types.Log) (generated.AbigenLog, error) { return r0, r1 } +// AbigenContract_ParseLog_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseLog' +type AbigenContract_ParseLog_Call struct { + *mock.Call +} + +// ParseLog is a helper method to define mock.On call +// - _a0 types.Log +func (_e *AbigenContract_Expecter) ParseLog(_a0 interface{}) *AbigenContract_ParseLog_Call { + return &AbigenContract_ParseLog_Call{Call: _e.mock.On("ParseLog", _a0)} +} + +func (_c *AbigenContract_ParseLog_Call) Run(run func(_a0 types.Log)) *AbigenContract_ParseLog_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *AbigenContract_ParseLog_Call) Return(_a0 generated.AbigenLog, _a1 error) *AbigenContract_ParseLog_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *AbigenContract_ParseLog_Call) RunAndReturn(run func(types.Log) (generated.AbigenLog, error)) *AbigenContract_ParseLog_Call { + _c.Call.Return(run) + return _c +} + // NewAbigenContract creates a new instance of AbigenContract. 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 NewAbigenContract(t interface { diff --git a/core/chains/evm/log/mocks/broadcast.go b/core/chains/evm/log/mocks/broadcast.go index 1f1817474ec..8ce800976e8 100644 --- a/core/chains/evm/log/mocks/broadcast.go +++ b/core/chains/evm/log/mocks/broadcast.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -17,6 +17,14 @@ type Broadcast struct { mock.Mock } +type Broadcast_Expecter struct { + mock *mock.Mock +} + +func (_m *Broadcast) EXPECT() *Broadcast_Expecter { + return &Broadcast_Expecter{mock: &_m.Mock} +} + // DecodedLog provides a mock function with given fields: func (_m *Broadcast) DecodedLog() interface{} { ret := _m.Called() @@ -37,6 +45,33 @@ func (_m *Broadcast) DecodedLog() interface{} { return r0 } +// Broadcast_DecodedLog_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DecodedLog' +type Broadcast_DecodedLog_Call struct { + *mock.Call +} + +// DecodedLog is a helper method to define mock.On call +func (_e *Broadcast_Expecter) DecodedLog() *Broadcast_DecodedLog_Call { + return &Broadcast_DecodedLog_Call{Call: _e.mock.On("DecodedLog")} +} + +func (_c *Broadcast_DecodedLog_Call) Run(run func()) *Broadcast_DecodedLog_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Broadcast_DecodedLog_Call) Return(_a0 interface{}) *Broadcast_DecodedLog_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Broadcast_DecodedLog_Call) RunAndReturn(run func() interface{}) *Broadcast_DecodedLog_Call { + _c.Call.Return(run) + return _c +} + // EVMChainID provides a mock function with given fields: func (_m *Broadcast) EVMChainID() big.Int { ret := _m.Called() @@ -55,6 +90,33 @@ func (_m *Broadcast) EVMChainID() big.Int { return r0 } +// Broadcast_EVMChainID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EVMChainID' +type Broadcast_EVMChainID_Call struct { + *mock.Call +} + +// EVMChainID is a helper method to define mock.On call +func (_e *Broadcast_Expecter) EVMChainID() *Broadcast_EVMChainID_Call { + return &Broadcast_EVMChainID_Call{Call: _e.mock.On("EVMChainID")} +} + +func (_c *Broadcast_EVMChainID_Call) Run(run func()) *Broadcast_EVMChainID_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Broadcast_EVMChainID_Call) Return(_a0 big.Int) *Broadcast_EVMChainID_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Broadcast_EVMChainID_Call) RunAndReturn(run func() big.Int) *Broadcast_EVMChainID_Call { + _c.Call.Return(run) + return _c +} + // JobID provides a mock function with given fields: func (_m *Broadcast) JobID() int32 { ret := _m.Called() @@ -73,6 +135,33 @@ func (_m *Broadcast) JobID() int32 { return r0 } +// Broadcast_JobID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'JobID' +type Broadcast_JobID_Call struct { + *mock.Call +} + +// JobID is a helper method to define mock.On call +func (_e *Broadcast_Expecter) JobID() *Broadcast_JobID_Call { + return &Broadcast_JobID_Call{Call: _e.mock.On("JobID")} +} + +func (_c *Broadcast_JobID_Call) Run(run func()) *Broadcast_JobID_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Broadcast_JobID_Call) Return(_a0 int32) *Broadcast_JobID_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Broadcast_JobID_Call) RunAndReturn(run func() int32) *Broadcast_JobID_Call { + _c.Call.Return(run) + return _c +} + // LatestBlockHash provides a mock function with given fields: func (_m *Broadcast) LatestBlockHash() common.Hash { ret := _m.Called() @@ -93,6 +182,33 @@ func (_m *Broadcast) LatestBlockHash() common.Hash { return r0 } +// Broadcast_LatestBlockHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LatestBlockHash' +type Broadcast_LatestBlockHash_Call struct { + *mock.Call +} + +// LatestBlockHash is a helper method to define mock.On call +func (_e *Broadcast_Expecter) LatestBlockHash() *Broadcast_LatestBlockHash_Call { + return &Broadcast_LatestBlockHash_Call{Call: _e.mock.On("LatestBlockHash")} +} + +func (_c *Broadcast_LatestBlockHash_Call) Run(run func()) *Broadcast_LatestBlockHash_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Broadcast_LatestBlockHash_Call) Return(_a0 common.Hash) *Broadcast_LatestBlockHash_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Broadcast_LatestBlockHash_Call) RunAndReturn(run func() common.Hash) *Broadcast_LatestBlockHash_Call { + _c.Call.Return(run) + return _c +} + // LatestBlockNumber provides a mock function with given fields: func (_m *Broadcast) LatestBlockNumber() uint64 { ret := _m.Called() @@ -111,6 +227,33 @@ func (_m *Broadcast) LatestBlockNumber() uint64 { return r0 } +// Broadcast_LatestBlockNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LatestBlockNumber' +type Broadcast_LatestBlockNumber_Call struct { + *mock.Call +} + +// LatestBlockNumber is a helper method to define mock.On call +func (_e *Broadcast_Expecter) LatestBlockNumber() *Broadcast_LatestBlockNumber_Call { + return &Broadcast_LatestBlockNumber_Call{Call: _e.mock.On("LatestBlockNumber")} +} + +func (_c *Broadcast_LatestBlockNumber_Call) Run(run func()) *Broadcast_LatestBlockNumber_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Broadcast_LatestBlockNumber_Call) Return(_a0 uint64) *Broadcast_LatestBlockNumber_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Broadcast_LatestBlockNumber_Call) RunAndReturn(run func() uint64) *Broadcast_LatestBlockNumber_Call { + _c.Call.Return(run) + return _c +} + // RawLog provides a mock function with given fields: func (_m *Broadcast) RawLog() types.Log { ret := _m.Called() @@ -129,6 +272,33 @@ func (_m *Broadcast) RawLog() types.Log { return r0 } +// Broadcast_RawLog_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RawLog' +type Broadcast_RawLog_Call struct { + *mock.Call +} + +// RawLog is a helper method to define mock.On call +func (_e *Broadcast_Expecter) RawLog() *Broadcast_RawLog_Call { + return &Broadcast_RawLog_Call{Call: _e.mock.On("RawLog")} +} + +func (_c *Broadcast_RawLog_Call) Run(run func()) *Broadcast_RawLog_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Broadcast_RawLog_Call) Return(_a0 types.Log) *Broadcast_RawLog_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Broadcast_RawLog_Call) RunAndReturn(run func() types.Log) *Broadcast_RawLog_Call { + _c.Call.Return(run) + return _c +} + // ReceiptsRoot provides a mock function with given fields: func (_m *Broadcast) ReceiptsRoot() common.Hash { ret := _m.Called() @@ -149,6 +319,33 @@ func (_m *Broadcast) ReceiptsRoot() common.Hash { return r0 } +// Broadcast_ReceiptsRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReceiptsRoot' +type Broadcast_ReceiptsRoot_Call struct { + *mock.Call +} + +// ReceiptsRoot is a helper method to define mock.On call +func (_e *Broadcast_Expecter) ReceiptsRoot() *Broadcast_ReceiptsRoot_Call { + return &Broadcast_ReceiptsRoot_Call{Call: _e.mock.On("ReceiptsRoot")} +} + +func (_c *Broadcast_ReceiptsRoot_Call) Run(run func()) *Broadcast_ReceiptsRoot_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Broadcast_ReceiptsRoot_Call) Return(_a0 common.Hash) *Broadcast_ReceiptsRoot_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Broadcast_ReceiptsRoot_Call) RunAndReturn(run func() common.Hash) *Broadcast_ReceiptsRoot_Call { + _c.Call.Return(run) + return _c +} + // StateRoot provides a mock function with given fields: func (_m *Broadcast) StateRoot() common.Hash { ret := _m.Called() @@ -169,6 +366,33 @@ func (_m *Broadcast) StateRoot() common.Hash { return r0 } +// Broadcast_StateRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StateRoot' +type Broadcast_StateRoot_Call struct { + *mock.Call +} + +// StateRoot is a helper method to define mock.On call +func (_e *Broadcast_Expecter) StateRoot() *Broadcast_StateRoot_Call { + return &Broadcast_StateRoot_Call{Call: _e.mock.On("StateRoot")} +} + +func (_c *Broadcast_StateRoot_Call) Run(run func()) *Broadcast_StateRoot_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Broadcast_StateRoot_Call) Return(_a0 common.Hash) *Broadcast_StateRoot_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Broadcast_StateRoot_Call) RunAndReturn(run func() common.Hash) *Broadcast_StateRoot_Call { + _c.Call.Return(run) + return _c +} + // String provides a mock function with given fields: func (_m *Broadcast) String() string { ret := _m.Called() @@ -187,6 +411,33 @@ func (_m *Broadcast) String() string { return r0 } +// Broadcast_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String' +type Broadcast_String_Call struct { + *mock.Call +} + +// String is a helper method to define mock.On call +func (_e *Broadcast_Expecter) String() *Broadcast_String_Call { + return &Broadcast_String_Call{Call: _e.mock.On("String")} +} + +func (_c *Broadcast_String_Call) Run(run func()) *Broadcast_String_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Broadcast_String_Call) Return(_a0 string) *Broadcast_String_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Broadcast_String_Call) RunAndReturn(run func() string) *Broadcast_String_Call { + _c.Call.Return(run) + return _c +} + // TransactionsRoot provides a mock function with given fields: func (_m *Broadcast) TransactionsRoot() common.Hash { ret := _m.Called() @@ -207,6 +458,33 @@ func (_m *Broadcast) TransactionsRoot() common.Hash { return r0 } +// Broadcast_TransactionsRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransactionsRoot' +type Broadcast_TransactionsRoot_Call struct { + *mock.Call +} + +// TransactionsRoot is a helper method to define mock.On call +func (_e *Broadcast_Expecter) TransactionsRoot() *Broadcast_TransactionsRoot_Call { + return &Broadcast_TransactionsRoot_Call{Call: _e.mock.On("TransactionsRoot")} +} + +func (_c *Broadcast_TransactionsRoot_Call) Run(run func()) *Broadcast_TransactionsRoot_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Broadcast_TransactionsRoot_Call) Return(_a0 common.Hash) *Broadcast_TransactionsRoot_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Broadcast_TransactionsRoot_Call) RunAndReturn(run func() common.Hash) *Broadcast_TransactionsRoot_Call { + _c.Call.Return(run) + return _c +} + // NewBroadcast creates a new instance of Broadcast. 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 NewBroadcast(t interface { diff --git a/core/chains/evm/log/mocks/broadcaster.go b/core/chains/evm/log/mocks/broadcaster.go index 221456c508b..a2dc15cc4fd 100644 --- a/core/chains/evm/log/mocks/broadcaster.go +++ b/core/chains/evm/log/mocks/broadcaster.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -18,11 +18,47 @@ type Broadcaster struct { mock.Mock } +type Broadcaster_Expecter struct { + mock *mock.Mock +} + +func (_m *Broadcaster) EXPECT() *Broadcaster_Expecter { + return &Broadcaster_Expecter{mock: &_m.Mock} +} + // AddDependents provides a mock function with given fields: n func (_m *Broadcaster) AddDependents(n int) { _m.Called(n) } +// Broadcaster_AddDependents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddDependents' +type Broadcaster_AddDependents_Call struct { + *mock.Call +} + +// AddDependents is a helper method to define mock.On call +// - n int +func (_e *Broadcaster_Expecter) AddDependents(n interface{}) *Broadcaster_AddDependents_Call { + return &Broadcaster_AddDependents_Call{Call: _e.mock.On("AddDependents", n)} +} + +func (_c *Broadcaster_AddDependents_Call) Run(run func(n int)) *Broadcaster_AddDependents_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int)) + }) + return _c +} + +func (_c *Broadcaster_AddDependents_Call) Return() *Broadcaster_AddDependents_Call { + _c.Call.Return() + return _c +} + +func (_c *Broadcaster_AddDependents_Call) RunAndReturn(run func(int)) *Broadcaster_AddDependents_Call { + _c.Call.Return(run) + return _c +} + // AwaitDependents provides a mock function with given fields: func (_m *Broadcaster) AwaitDependents() <-chan struct{} { ret := _m.Called() @@ -43,6 +79,33 @@ func (_m *Broadcaster) AwaitDependents() <-chan struct{} { return r0 } +// Broadcaster_AwaitDependents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AwaitDependents' +type Broadcaster_AwaitDependents_Call struct { + *mock.Call +} + +// AwaitDependents is a helper method to define mock.On call +func (_e *Broadcaster_Expecter) AwaitDependents() *Broadcaster_AwaitDependents_Call { + return &Broadcaster_AwaitDependents_Call{Call: _e.mock.On("AwaitDependents")} +} + +func (_c *Broadcaster_AwaitDependents_Call) Run(run func()) *Broadcaster_AwaitDependents_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Broadcaster_AwaitDependents_Call) Return(_a0 <-chan struct{}) *Broadcaster_AwaitDependents_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Broadcaster_AwaitDependents_Call) RunAndReturn(run func() <-chan struct{}) *Broadcaster_AwaitDependents_Call { + _c.Call.Return(run) + return _c +} + // Close provides a mock function with given fields: func (_m *Broadcaster) Close() error { ret := _m.Called() @@ -61,11 +124,65 @@ func (_m *Broadcaster) Close() error { return r0 } +// Broadcaster_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type Broadcaster_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *Broadcaster_Expecter) Close() *Broadcaster_Close_Call { + return &Broadcaster_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *Broadcaster_Close_Call) Run(run func()) *Broadcaster_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Broadcaster_Close_Call) Return(_a0 error) *Broadcaster_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Broadcaster_Close_Call) RunAndReturn(run func() error) *Broadcaster_Close_Call { + _c.Call.Return(run) + return _c +} + // DependentReady provides a mock function with given fields: func (_m *Broadcaster) DependentReady() { _m.Called() } +// Broadcaster_DependentReady_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DependentReady' +type Broadcaster_DependentReady_Call struct { + *mock.Call +} + +// DependentReady is a helper method to define mock.On call +func (_e *Broadcaster_Expecter) DependentReady() *Broadcaster_DependentReady_Call { + return &Broadcaster_DependentReady_Call{Call: _e.mock.On("DependentReady")} +} + +func (_c *Broadcaster_DependentReady_Call) Run(run func()) *Broadcaster_DependentReady_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Broadcaster_DependentReady_Call) Return() *Broadcaster_DependentReady_Call { + _c.Call.Return() + return _c +} + +func (_c *Broadcaster_DependentReady_Call) RunAndReturn(run func()) *Broadcaster_DependentReady_Call { + _c.Call.Return(run) + return _c +} + // HealthReport provides a mock function with given fields: func (_m *Broadcaster) HealthReport() map[string]error { ret := _m.Called() @@ -86,6 +203,33 @@ func (_m *Broadcaster) HealthReport() map[string]error { return r0 } +// Broadcaster_HealthReport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HealthReport' +type Broadcaster_HealthReport_Call struct { + *mock.Call +} + +// HealthReport is a helper method to define mock.On call +func (_e *Broadcaster_Expecter) HealthReport() *Broadcaster_HealthReport_Call { + return &Broadcaster_HealthReport_Call{Call: _e.mock.On("HealthReport")} +} + +func (_c *Broadcaster_HealthReport_Call) Run(run func()) *Broadcaster_HealthReport_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Broadcaster_HealthReport_Call) Return(_a0 map[string]error) *Broadcaster_HealthReport_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Broadcaster_HealthReport_Call) RunAndReturn(run func() map[string]error) *Broadcaster_HealthReport_Call { + _c.Call.Return(run) + return _c +} + // IsConnected provides a mock function with given fields: func (_m *Broadcaster) IsConnected() bool { ret := _m.Called() @@ -104,6 +248,33 @@ func (_m *Broadcaster) IsConnected() bool { return r0 } +// Broadcaster_IsConnected_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsConnected' +type Broadcaster_IsConnected_Call struct { + *mock.Call +} + +// IsConnected is a helper method to define mock.On call +func (_e *Broadcaster_Expecter) IsConnected() *Broadcaster_IsConnected_Call { + return &Broadcaster_IsConnected_Call{Call: _e.mock.On("IsConnected")} +} + +func (_c *Broadcaster_IsConnected_Call) Run(run func()) *Broadcaster_IsConnected_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Broadcaster_IsConnected_Call) Return(_a0 bool) *Broadcaster_IsConnected_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Broadcaster_IsConnected_Call) RunAndReturn(run func() bool) *Broadcaster_IsConnected_Call { + _c.Call.Return(run) + return _c +} + // MarkConsumed provides a mock function with given fields: ctx, ds, lb func (_m *Broadcaster) MarkConsumed(ctx context.Context, ds sqlutil.DataSource, lb log.Broadcast) error { ret := _m.Called(ctx, ds, lb) @@ -122,6 +293,36 @@ func (_m *Broadcaster) MarkConsumed(ctx context.Context, ds sqlutil.DataSource, return r0 } +// Broadcaster_MarkConsumed_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MarkConsumed' +type Broadcaster_MarkConsumed_Call struct { + *mock.Call +} + +// MarkConsumed is a helper method to define mock.On call +// - ctx context.Context +// - ds sqlutil.DataSource +// - lb log.Broadcast +func (_e *Broadcaster_Expecter) MarkConsumed(ctx interface{}, ds interface{}, lb interface{}) *Broadcaster_MarkConsumed_Call { + return &Broadcaster_MarkConsumed_Call{Call: _e.mock.On("MarkConsumed", ctx, ds, lb)} +} + +func (_c *Broadcaster_MarkConsumed_Call) Run(run func(ctx context.Context, ds sqlutil.DataSource, lb log.Broadcast)) *Broadcaster_MarkConsumed_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(sqlutil.DataSource), args[2].(log.Broadcast)) + }) + return _c +} + +func (_c *Broadcaster_MarkConsumed_Call) Return(_a0 error) *Broadcaster_MarkConsumed_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Broadcaster_MarkConsumed_Call) RunAndReturn(run func(context.Context, sqlutil.DataSource, log.Broadcast) error) *Broadcaster_MarkConsumed_Call { + _c.Call.Return(run) + return _c +} + // Name provides a mock function with given fields: func (_m *Broadcaster) Name() string { ret := _m.Called() @@ -140,11 +341,67 @@ func (_m *Broadcaster) Name() string { return r0 } +// Broadcaster_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type Broadcaster_Name_Call struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *Broadcaster_Expecter) Name() *Broadcaster_Name_Call { + return &Broadcaster_Name_Call{Call: _e.mock.On("Name")} +} + +func (_c *Broadcaster_Name_Call) Run(run func()) *Broadcaster_Name_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Broadcaster_Name_Call) Return(_a0 string) *Broadcaster_Name_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Broadcaster_Name_Call) RunAndReturn(run func() string) *Broadcaster_Name_Call { + _c.Call.Return(run) + return _c +} + // OnNewLongestChain provides a mock function with given fields: ctx, head func (_m *Broadcaster) OnNewLongestChain(ctx context.Context, head *types.Head) { _m.Called(ctx, head) } +// Broadcaster_OnNewLongestChain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnNewLongestChain' +type Broadcaster_OnNewLongestChain_Call struct { + *mock.Call +} + +// OnNewLongestChain is a helper method to define mock.On call +// - ctx context.Context +// - head *types.Head +func (_e *Broadcaster_Expecter) OnNewLongestChain(ctx interface{}, head interface{}) *Broadcaster_OnNewLongestChain_Call { + return &Broadcaster_OnNewLongestChain_Call{Call: _e.mock.On("OnNewLongestChain", ctx, head)} +} + +func (_c *Broadcaster_OnNewLongestChain_Call) Run(run func(ctx context.Context, head *types.Head)) *Broadcaster_OnNewLongestChain_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.Head)) + }) + return _c +} + +func (_c *Broadcaster_OnNewLongestChain_Call) Return() *Broadcaster_OnNewLongestChain_Call { + _c.Call.Return() + return _c +} + +func (_c *Broadcaster_OnNewLongestChain_Call) RunAndReturn(run func(context.Context, *types.Head)) *Broadcaster_OnNewLongestChain_Call { + _c.Call.Return(run) + return _c +} + // Ready provides a mock function with given fields: func (_m *Broadcaster) Ready() error { ret := _m.Called() @@ -163,6 +420,33 @@ func (_m *Broadcaster) Ready() error { return r0 } +// Broadcaster_Ready_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ready' +type Broadcaster_Ready_Call struct { + *mock.Call +} + +// Ready is a helper method to define mock.On call +func (_e *Broadcaster_Expecter) Ready() *Broadcaster_Ready_Call { + return &Broadcaster_Ready_Call{Call: _e.mock.On("Ready")} +} + +func (_c *Broadcaster_Ready_Call) Run(run func()) *Broadcaster_Ready_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Broadcaster_Ready_Call) Return(_a0 error) *Broadcaster_Ready_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Broadcaster_Ready_Call) RunAndReturn(run func() error) *Broadcaster_Ready_Call { + _c.Call.Return(run) + return _c +} + // Register provides a mock function with given fields: listener, opts func (_m *Broadcaster) Register(listener log.Listener, opts log.ListenerOpts) func() { ret := _m.Called(listener, opts) @@ -183,11 +467,69 @@ func (_m *Broadcaster) Register(listener log.Listener, opts log.ListenerOpts) fu return r0 } +// Broadcaster_Register_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Register' +type Broadcaster_Register_Call struct { + *mock.Call +} + +// Register is a helper method to define mock.On call +// - listener log.Listener +// - opts log.ListenerOpts +func (_e *Broadcaster_Expecter) Register(listener interface{}, opts interface{}) *Broadcaster_Register_Call { + return &Broadcaster_Register_Call{Call: _e.mock.On("Register", listener, opts)} +} + +func (_c *Broadcaster_Register_Call) Run(run func(listener log.Listener, opts log.ListenerOpts)) *Broadcaster_Register_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(log.Listener), args[1].(log.ListenerOpts)) + }) + return _c +} + +func (_c *Broadcaster_Register_Call) Return(unsubscribe func()) *Broadcaster_Register_Call { + _c.Call.Return(unsubscribe) + return _c +} + +func (_c *Broadcaster_Register_Call) RunAndReturn(run func(log.Listener, log.ListenerOpts) func()) *Broadcaster_Register_Call { + _c.Call.Return(run) + return _c +} + // ReplayFromBlock provides a mock function with given fields: number, forceBroadcast func (_m *Broadcaster) ReplayFromBlock(number int64, forceBroadcast bool) { _m.Called(number, forceBroadcast) } +// Broadcaster_ReplayFromBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReplayFromBlock' +type Broadcaster_ReplayFromBlock_Call struct { + *mock.Call +} + +// ReplayFromBlock is a helper method to define mock.On call +// - number int64 +// - forceBroadcast bool +func (_e *Broadcaster_Expecter) ReplayFromBlock(number interface{}, forceBroadcast interface{}) *Broadcaster_ReplayFromBlock_Call { + return &Broadcaster_ReplayFromBlock_Call{Call: _e.mock.On("ReplayFromBlock", number, forceBroadcast)} +} + +func (_c *Broadcaster_ReplayFromBlock_Call) Run(run func(number int64, forceBroadcast bool)) *Broadcaster_ReplayFromBlock_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64), args[1].(bool)) + }) + return _c +} + +func (_c *Broadcaster_ReplayFromBlock_Call) Return() *Broadcaster_ReplayFromBlock_Call { + _c.Call.Return() + return _c +} + +func (_c *Broadcaster_ReplayFromBlock_Call) RunAndReturn(run func(int64, bool)) *Broadcaster_ReplayFromBlock_Call { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *Broadcaster) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -206,6 +548,34 @@ func (_m *Broadcaster) Start(_a0 context.Context) error { return r0 } +// Broadcaster_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type Broadcaster_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *Broadcaster_Expecter) Start(_a0 interface{}) *Broadcaster_Start_Call { + return &Broadcaster_Start_Call{Call: _e.mock.On("Start", _a0)} +} + +func (_c *Broadcaster_Start_Call) Run(run func(_a0 context.Context)) *Broadcaster_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Broadcaster_Start_Call) Return(_a0 error) *Broadcaster_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Broadcaster_Start_Call) RunAndReturn(run func(context.Context) error) *Broadcaster_Start_Call { + _c.Call.Return(run) + return _c +} + // WasAlreadyConsumed provides a mock function with given fields: ctx, lb func (_m *Broadcaster) WasAlreadyConsumed(ctx context.Context, lb log.Broadcast) (bool, error) { ret := _m.Called(ctx, lb) @@ -234,6 +604,35 @@ func (_m *Broadcaster) WasAlreadyConsumed(ctx context.Context, lb log.Broadcast) return r0, r1 } +// Broadcaster_WasAlreadyConsumed_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WasAlreadyConsumed' +type Broadcaster_WasAlreadyConsumed_Call struct { + *mock.Call +} + +// WasAlreadyConsumed is a helper method to define mock.On call +// - ctx context.Context +// - lb log.Broadcast +func (_e *Broadcaster_Expecter) WasAlreadyConsumed(ctx interface{}, lb interface{}) *Broadcaster_WasAlreadyConsumed_Call { + return &Broadcaster_WasAlreadyConsumed_Call{Call: _e.mock.On("WasAlreadyConsumed", ctx, lb)} +} + +func (_c *Broadcaster_WasAlreadyConsumed_Call) Run(run func(ctx context.Context, lb log.Broadcast)) *Broadcaster_WasAlreadyConsumed_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(log.Broadcast)) + }) + return _c +} + +func (_c *Broadcaster_WasAlreadyConsumed_Call) Return(_a0 bool, _a1 error) *Broadcaster_WasAlreadyConsumed_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Broadcaster_WasAlreadyConsumed_Call) RunAndReturn(run func(context.Context, log.Broadcast) (bool, error)) *Broadcaster_WasAlreadyConsumed_Call { + _c.Call.Return(run) + return _c +} + // NewBroadcaster creates a new instance of Broadcaster. 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 NewBroadcaster(t interface { diff --git a/core/chains/evm/log/models.go b/core/chains/evm/log/models.go index e14c45cb505..c4f0de9c5d2 100644 --- a/core/chains/evm/log/models.go +++ b/core/chains/evm/log/models.go @@ -10,8 +10,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" ) -//go:generate mockery --quiet --name Broadcast --output ./mocks/ --case=underscore --structname Broadcast --filename broadcast.go - type ( // The Broadcast type wraps a types.Log but provides additional functionality // for determining whether or not the log has been consumed and for marking @@ -100,8 +98,6 @@ func NewLogBroadcast(rawLog types.Log, evmChainID big.Int, decodedLog interface{ } } -//go:generate mockery --quiet --name AbigenContract --output ./mocks --case=underscore - type AbigenContract interface { Address() common.Address ParseLog(log types.Log) (generated.AbigenLog, error) diff --git a/core/chains/evm/logpoller/helper_test.go b/core/chains/evm/logpoller/helper_test.go index 3b2a10df6c8..3f589d84d56 100644 --- a/core/chains/evm/logpoller/helper_test.go +++ b/core/chains/evm/logpoller/helper_test.go @@ -23,6 +23,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/headtracker" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/log_emitter" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -68,10 +69,11 @@ func SetupTH(t testing.TB, opts logpoller.Opts) TestHarness { head := esc.Backend().Blockchain().CurrentHeader() esc.Backend().Blockchain().SetFinalized(head) + headTracker := headtracker.NewSimulatedHeadTracker(esc, opts.UseFinalityTag, opts.FinalityDepth) if opts.PollPeriod == 0 { opts.PollPeriod = 1 * time.Hour } - lp := logpoller.NewLogPoller(o, esc, lggr, opts) + lp := logpoller.NewLogPoller(o, esc, lggr, headTracker, opts) emitterAddress1, _, emitter1, err := log_emitter.DeployLogEmitter(owner, ec) require.NoError(t, err) emitterAddress2, _, emitter2, err := log_emitter.DeployLogEmitter(owner, ec) diff --git a/core/chains/evm/logpoller/log_poller.go b/core/chains/evm/logpoller/log_poller.go index 1c8996a46ec..dee5d1d1a5d 100644 --- a/core/chains/evm/logpoller/log_poller.go +++ b/core/chains/evm/logpoller/log_poller.go @@ -27,12 +27,12 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/types/query" "github.com/smartcontractkit/chainlink-common/pkg/utils" "github.com/smartcontractkit/chainlink-common/pkg/utils/mathutil" + "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" ) -//go:generate mockery --quiet --name LogPoller --output ./mocks/ --case=underscore --structname LogPoller --filename log_poller.go type LogPoller interface { services.Service Healthy() error @@ -88,6 +88,10 @@ type Client interface { ConfiguredChainID() *big.Int } +type HeadTracker interface { + LatestAndFinalizedBlock(ctx context.Context) (latest, finalized *evmtypes.Head, err error) +} + var ( _ LogPollerTest = &logPoller{} ErrReplayRequestAborted = pkgerrors.New("aborted, replay request cancelled") @@ -100,6 +104,7 @@ type logPoller struct { services.StateMachine ec Client orm ORM + headTracker HeadTracker lggr logger.SugaredLogger pollPeriod time.Duration // poll period set by block production rate useFinalityTag bool // indicates whether logPoller should use chain's finality or pick a fixed depth for finality @@ -150,11 +155,12 @@ type Opts struct { // // How fast that can be done depends largely on network speed and DB, but even for the fastest // support chain, polygon, which has 2s block times, we need RPCs roughly with <= 500ms latency -func NewLogPoller(orm ORM, ec Client, lggr logger.Logger, opts Opts) *logPoller { +func NewLogPoller(orm ORM, ec Client, lggr logger.Logger, headTracker HeadTracker, opts Opts) *logPoller { return &logPoller{ stopCh: make(chan struct{}), ec: ec, orm: orm, + headTracker: headTracker, lggr: logger.Sugared(logger.Named(lggr, "LogPoller")), replayStart: make(chan int64), replayComplete: make(chan error), @@ -552,9 +558,14 @@ func (lp *logPoller) run() { defer lp.wg.Done() ctx, cancel := lp.stopCh.NewCtx() defer cancel() - logPollTick := time.After(0) + logPollTicker := services.NewTicker(lp.pollPeriod) + defer logPollTicker.Stop() // stagger these somewhat, so they don't all run back-to-back - backupLogPollTick := time.After(100 * time.Millisecond) + backupLogPollTicker := services.TickerConfig{ + Initial: 100 * time.Millisecond, + JitterPct: services.DefaultJitter, + }.NewTicker(time.Duration(lp.backupPollerBlockDelay) * lp.pollPeriod) + defer backupLogPollTicker.Stop() filtersLoaded := false for { @@ -563,8 +574,7 @@ func (lp *logPoller) run() { return case fromBlockReq := <-lp.replayStart: lp.handleReplayRequest(ctx, fromBlockReq, filtersLoaded) - case <-logPollTick: - logPollTick = time.After(utils.WithJitter(lp.pollPeriod)) + case <-logPollTicker.C: if !filtersLoaded { if err := lp.loadFilters(ctx); err != nil { lp.lggr.Errorw("Failed loading filters in main logpoller loop, retrying later", "err", err) @@ -602,7 +612,7 @@ func (lp *logPoller) run() { start = lastProcessed.BlockNumber + 1 } lp.PollAndSaveLogs(ctx, start) - case <-backupLogPollTick: + case <-backupLogPollTicker.C: if lp.backupPollerBlockDelay == 0 { continue // backup poller is disabled } @@ -614,7 +624,6 @@ func (lp *logPoller) run() { // frequently than the primary log poller (instead of roughly once per block it runs once roughly once every // lp.backupPollerDelay blocks--with default settings about 100x less frequently). - backupLogPollTick = time.After(utils.WithJitter(time.Duration(lp.backupPollerBlockDelay) * lp.pollPeriod)) if !filtersLoaded { lp.lggr.Warnw("Backup log poller ran before filters loaded, skipping") continue @@ -1007,33 +1016,15 @@ func (lp *logPoller) PollAndSaveLogs(ctx context.Context, currentBlockNumber int } } -// Returns information about latestBlock, latestFinalizedBlockNumber -// If finality tag is not enabled, latestFinalizedBlockNumber is calculated as latestBlockNumber - lp.finalityDepth (configured param) -// Otherwise, we return last finalized block number returned from chain +// Returns information about latestBlock, latestFinalizedBlockNumber provided by HeadTracker func (lp *logPoller) latestBlocks(ctx context.Context) (*evmtypes.Head, int64, error) { - // If finality is not enabled, we can only fetch the latest block - if !lp.useFinalityTag { - // Example: - // finalityDepth = 2 - // Blocks: 1->2->3->4->5(latestBlock) - // latestFinalizedBlockNumber would be 3 - latestBlock, err := lp.ec.HeadByNumber(ctx, nil) - if err != nil { - return nil, 0, err - } - // If chain has fewer blocks than finalityDepth, return 0 - return latestBlock, mathutil.Max(latestBlock.Number-lp.finalityDepth, 0), nil - } - - // If finality is enabled, we need to get the latest and finalized blocks. - blocks, err := lp.batchFetchBlocks(ctx, []string{rpc.LatestBlockNumber.String(), rpc.FinalizedBlockNumber.String()}, 2) + latest, finalized, err := lp.headTracker.LatestAndFinalizedBlock(ctx) if err != nil { - return nil, 0, err + return nil, 0, fmt.Errorf("failed to get latest and latest finalized block from HeadTracker: %w", err) } - latest := blocks[0] - finalized := blocks[1] - lp.lggr.Debugw("Latest blocks read from chain", "latest", latest.Number, "finalized", finalized.Number) - return latest, finalized.Number, nil + + lp.lggr.Debugw("Latest blocks read from chain", "latest", latest.Number, "finalized", finalized.BlockNumber()) + return latest, finalized.BlockNumber(), nil } // Find the first place where our chain and their chain have the same block, @@ -1285,11 +1276,12 @@ func (lp *logPoller) fillRemainingBlocksFromRPC( logPollerBlocks := make(map[uint64]LogPollerBlock) for _, head := range evmBlocks { logPollerBlocks[uint64(head.Number)] = LogPollerBlock{ - EvmChainId: head.EVMChainID, - BlockHash: head.Hash, - BlockNumber: head.Number, - BlockTimestamp: head.Timestamp, - CreatedAt: head.Timestamp, + EvmChainId: head.EVMChainID, + BlockHash: head.Hash, + BlockNumber: head.Number, + BlockTimestamp: head.Timestamp, + FinalizedBlockNumber: head.Number, // always finalized; only matters if this block is returned by LatestBlock() + CreatedAt: head.Timestamp, } } return logPollerBlocks, nil diff --git a/core/chains/evm/logpoller/log_poller_internal_test.go b/core/chains/evm/logpoller/log_poller_internal_test.go index bc295105874..448710b93f3 100644 --- a/core/chains/evm/logpoller/log_poller_internal_test.go +++ b/core/chains/evm/logpoller/log_poller_internal_test.go @@ -5,7 +5,6 @@ import ( "errors" "fmt" "math/big" - "reflect" "strings" "sync" "testing" @@ -22,10 +21,13 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/zap/zapcore" + "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" + "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/services" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" + htMocks "github.com/smartcontractkit/chainlink/v2/common/headtracker/mocks" evmclimocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client/mocks" evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils" @@ -73,7 +75,7 @@ func TestLogPoller_RegisterFilter(t *testing.T) { RpcBatchSize: 2, KeepFinalizedBlocksDepth: 1000, } - lp := NewLogPoller(orm, nil, lggr, lpOpts) + lp := NewLogPoller(orm, nil, lggr, nil, lpOpts) // We expect a zero Filter if nothing registered yet. f := lp.Filter(nil, nil, nil) @@ -208,8 +210,10 @@ func TestLogPoller_BackupPollerStartup(t *testing.T) { db := pgtest.NewSqlxDB(t) orm := NewORM(chainID, db, lggr) latestBlock := int64(4) + const finalityDepth = 2 - head := evmtypes.Head{Number: latestBlock} + head := &evmtypes.Head{Number: latestBlock} + finalizedHead := &evmtypes.Head{Number: latestBlock - finalityDepth} events := []common.Hash{EmitterABI.Events["Log1"].ID} log1 := types.Log{ Index: 0, @@ -222,20 +226,22 @@ func TestLogPoller_BackupPollerStartup(t *testing.T) { } ec := evmclimocks.NewClient(t) - ec.On("HeadByNumber", mock.Anything, mock.Anything).Return(&head, nil) ec.On("FilterLogs", mock.Anything, mock.Anything).Return([]types.Log{log1}, nil) ec.On("ConfiguredChainID").Return(chainID, nil) + headTracker := htMocks.NewHeadTracker[*evmtypes.Head, common.Hash](t) + headTracker.On("LatestAndFinalizedBlock", mock.Anything).Return(head, finalizedHead, nil) + ctx := testutils.Context(t) lpOpts := Opts{ PollPeriod: time.Hour, - FinalityDepth: 2, + FinalityDepth: finalityDepth, BackfillBatchSize: 3, RpcBatchSize: 2, KeepFinalizedBlocksDepth: 1000, BackupPollerBlockDelay: 0, } - lp := NewLogPoller(orm, ec, lggr, lpOpts) + lp := NewLogPoller(orm, ec, lggr, headTracker, lpOpts) lp.BackupPollAndSaveLogs(ctx) assert.Equal(t, int64(0), lp.backupPollerNextBlock) assert.Equal(t, 1, observedLogs.FilterMessageSnippet("ran before first successful log poller run").Len()) @@ -309,7 +315,14 @@ func TestLogPoller_Replay(t *testing.T) { KeepFinalizedBlocksDepth: 20, BackupPollerBlockDelay: 0, } - lp := NewLogPoller(orm, ec, lggr, lpOpts) + headTracker := htMocks.NewHeadTracker[*evmtypes.Head, common.Hash](t) + + headTracker.On("LatestAndFinalizedBlock", mock.Anything).Return(func(ctx context.Context) (*evmtypes.Head, *evmtypes.Head, error) { + headCopy := head + finalized := &evmtypes.Head{Number: headCopy.Number - lpOpts.FinalityDepth} + return &headCopy, finalized, nil + }) + lp := NewLogPoller(orm, ec, lggr, headTracker, lpOpts) { ctx := testutils.Context(t) @@ -533,10 +546,6 @@ func (lp *logPoller) reset() { func Test_latestBlockAndFinalityDepth(t *testing.T) { lggr := logger.Test(t) - chainID := testutils.FixtureChainID - db := pgtest.NewSqlxDB(t) - orm := NewORM(chainID, db, lggr) - ctx := testutils.Context(t) lpOpts := Opts{ PollPeriod: time.Hour, @@ -545,71 +554,27 @@ func Test_latestBlockAndFinalityDepth(t *testing.T) { KeepFinalizedBlocksDepth: 20, } - t.Run("pick latest block from chain and use finality from config with finality disabled", func(t *testing.T) { - head := evmtypes.Head{Number: 4} - - lpOpts.UseFinalityTag = false - lpOpts.FinalityDepth = int64(3) - ec := evmclimocks.NewClient(t) - ec.On("HeadByNumber", mock.Anything, mock.Anything).Return(&head, nil) + t.Run("headTracker returns an error", func(t *testing.T) { + headTracker := htMocks.NewHeadTracker[*evmtypes.Head, common.Hash](t) + const expectedError = "finalized block is not available yet" + headTracker.On("LatestAndFinalizedBlock", mock.Anything).Return(&evmtypes.Head{}, &evmtypes.Head{}, fmt.Errorf(expectedError)) - lp := NewLogPoller(orm, ec, lggr, lpOpts) - 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) + lp := NewLogPoller(nil, nil, lggr, headTracker, lpOpts) + _, _, err := lp.latestBlocks(tests.Context(t)) + require.ErrorContains(t, err, expectedError) }) - - t.Run("finality tags in use", func(t *testing.T) { - t.Run("client returns data properly", func(t *testing.T) { - expectedLatestBlockNumber := int64(20) - expectedLastFinalizedBlockNumber := int64(12) - ec := evmclimocks.NewClient(t) - ec.On("BatchCallContext", mock.Anything, mock.MatchedBy(func(b []rpc.BatchElem) bool { - return len(b) == 2 && - reflect.DeepEqual(b[0].Args, []interface{}{"latest", false}) && - reflect.DeepEqual(b[1].Args, []interface{}{"finalized", false}) - })).Return(nil).Run(func(args mock.Arguments) { - elems := args.Get(1).([]rpc.BatchElem) - // Latest block details - *(elems[0].Result.(*evmtypes.Head)) = evmtypes.Head{Number: expectedLatestBlockNumber, Hash: utils.RandomBytes32()} - // Finalized block details - *(elems[1].Result.(*evmtypes.Head)) = evmtypes.Head{Number: expectedLastFinalizedBlockNumber, Hash: utils.RandomBytes32()} - }) - - lpOpts.UseFinalityTag = true - lp := NewLogPoller(orm, ec, lggr, lpOpts) - - latestBlock, lastFinalizedBlockNumber, err := lp.latestBlocks(ctx) - require.NoError(t, err) - require.Equal(t, expectedLatestBlockNumber, latestBlock.Number) - require.Equal(t, expectedLastFinalizedBlockNumber, lastFinalizedBlockNumber) - }) - - t.Run("client returns error for at least one of the calls", func(t *testing.T) { - ec := evmclimocks.NewClient(t) - ec.On("BatchCallContext", mock.Anything, mock.Anything).Return(nil).Run(func(args mock.Arguments) { - elems := args.Get(1).([]rpc.BatchElem) - // Latest block details - *(elems[0].Result.(*evmtypes.Head)) = evmtypes.Head{Number: 10} - // Finalized block details - elems[1].Error = fmt.Errorf("some error") - }) - - lpOpts.UseFinalityTag = true - lp := NewLogPoller(orm, ec, lggr, lpOpts) - _, _, err := lp.latestBlocks(ctx) - require.Error(t, err) - }) - - t.Run("BatchCall returns an error", func(t *testing.T) { - ec := evmclimocks.NewClient(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(ctx) - require.Error(t, err) - }) + t.Run("headTracker returns valid chain", func(t *testing.T) { + headTracker := htMocks.NewHeadTracker[*evmtypes.Head, common.Hash](t) + finalizedBlock := &evmtypes.Head{Number: 2, IsFinalized: true} + head := &evmtypes.Head{Number: 10} + headTracker.On("LatestAndFinalizedBlock", mock.Anything).Return(head, finalizedBlock, nil) + + lp := NewLogPoller(nil, nil, lggr, headTracker, lpOpts) + latestBlock, finalizedBlockNumber, err := lp.latestBlocks(tests.Context(t)) + require.NoError(t, err) + require.NotNil(t, latestBlock) + assert.Equal(t, head.BlockNumber(), latestBlock.BlockNumber()) + assert.Equal(t, finalizedBlock.Number, finalizedBlockNumber) }) } @@ -653,7 +618,7 @@ func Test_FetchBlocks(t *testing.T) { errors.New("Received unfinalized block 9 while expecting finalized block (latestFinalizedBlockNumber = 5)"), }} - lp := NewLogPoller(orm, ec, lggr, lpOpts) + lp := NewLogPoller(orm, ec, lggr, nil, lpOpts) for _, tc := range cases { for _, lp.useFinalityTag = range []bool{false, true} { blockValidationReq := latestBlock @@ -693,7 +658,7 @@ func benchmarkFilter(b *testing.B, nFilters, nAddresses, nEvents int) { RpcBatchSize: 2, KeepFinalizedBlocksDepth: 1000, } - lp := NewLogPoller(nil, nil, lggr, lpOpts) + lp := NewLogPoller(nil, nil, lggr, nil, lpOpts) for i := 0; i < nFilters; i++ { var addresses []common.Address var events []common.Hash diff --git a/core/chains/evm/logpoller/log_poller_test.go b/core/chains/evm/logpoller/log_poller_test.go index 6ef16921503..860b588c771 100644 --- a/core/chains/evm/logpoller/log_poller_test.go +++ b/core/chains/evm/logpoller/log_poller_test.go @@ -28,7 +28,9 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" commonutils "github.com/smartcontractkit/chainlink-common/pkg/utils" + htMocks "github.com/smartcontractkit/chainlink/v2/common/headtracker/mocks" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/headtracker" "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/chains/evm/utils" @@ -717,7 +719,9 @@ func TestLogPoller_SynchronizedWithGeth(t *testing.T) { RpcBatchSize: 2, KeepFinalizedBlocksDepth: 1000, } - lp := logpoller.NewLogPoller(orm, client.NewSimulatedBackendClient(t, ec, chainID), lggr, lpOpts) + simulatedClient := client.NewSimulatedBackendClient(t, ec, chainID) + ht := headtracker.NewSimulatedHeadTracker(simulatedClient, lpOpts.UseFinalityTag, lpOpts.FinalityDepth) + lp := logpoller.NewLogPoller(orm, simulatedClient, lggr, ht, lpOpts) for i := 0; i < finalityDepth; i++ { // Have enough blocks that we could reorg the full finalityDepth-1. ec.Commit() } @@ -1338,6 +1342,7 @@ func TestLogPoller_GetBlocks_Range(t *testing.T) { require.NoError(t, err) assert.Equal(t, 1, len(blocks)) assert.Equal(t, 1, int(blocks[0].BlockNumber)) + assert.Equal(t, 1, int(blocks[0].FinalizedBlockNumber)) // LP fails to return block 2 because it hasn't been finalized yet blockNums = []uint64{2} @@ -1356,6 +1361,7 @@ func TestLogPoller_GetBlocks_Range(t *testing.T) { require.NoError(t, err) assert.Equal(t, 1, len(rpcBlocks)) assert.Equal(t, 2, int(rpcBlocks[0].BlockNumber)) + assert.Equal(t, 2, int(rpcBlocks[0].FinalizedBlockNumber)) th.Client.Commit() // commit block #5 so that #3 becomes finalized @@ -1370,6 +1376,7 @@ func TestLogPoller_GetBlocks_Range(t *testing.T) { assert.Equal(t, 2, len(rpcBlocks2)) assert.Equal(t, 1, int(rpcBlocks2[0].BlockNumber)) assert.Equal(t, 3, int(rpcBlocks2[1].BlockNumber)) + assert.Equal(t, 3, int(rpcBlocks2[1].FinalizedBlockNumber)) // after calling PollAndSaveLogs, block 3 (latest finalized block) is persisted in DB th.LogPoller.PollAndSaveLogs(testutils.Context(t), 1) @@ -1383,6 +1390,7 @@ func TestLogPoller_GetBlocks_Range(t *testing.T) { assert.Equal(t, 1, len(lpBlocks)) assert.Equal(t, rpcBlocks[0].BlockNumber, lpBlocks[0].BlockNumber) assert.Equal(t, rpcBlocks[0].BlockHash, lpBlocks[0].BlockHash) + assert.Equal(t, rpcBlocks[0].FinalizedBlockNumber, lpBlocks[0].FinalizedBlockNumber) // getBlocksRange return multiple blocks blockNums = []uint64{1, 2} @@ -1392,6 +1400,7 @@ func TestLogPoller_GetBlocks_Range(t *testing.T) { assert.NotEmpty(t, blocks[0].BlockHash) assert.Equal(t, 2, int(blocks[1].BlockNumber)) assert.NotEmpty(t, blocks[1].BlockHash) + assert.Equal(t, 2, int(blocks[1].FinalizedBlockNumber)) // getBlocksRange return blocks in requested order blockNums = []uint64{2, 1} @@ -1493,7 +1502,7 @@ func TestLogPoller_DBErrorHandling(t *testing.T) { RpcBatchSize: 2, KeepFinalizedBlocksDepth: 1000, } - lp := logpoller.NewLogPoller(o, client.NewSimulatedBackendClient(t, ec, chainID2), lggr, lpOpts) + lp := logpoller.NewLogPoller(o, client.NewSimulatedBackendClient(t, ec, chainID2), lggr, nil, lpOpts) err = lp.Replay(ctx, 5) // block number too high require.ErrorContains(t, err, "Invalid replay block number") @@ -1548,7 +1557,8 @@ func TestTooManyLogResults(t *testing.T) { RpcBatchSize: 10, KeepFinalizedBlocksDepth: 1000, } - lp := logpoller.NewLogPoller(o, ec, lggr, lpOpts) + headTracker := htMocks.NewHeadTracker[*evmtypes.Head, common.Hash](t) + lp := logpoller.NewLogPoller(o, ec, lggr, headTracker, lpOpts) expected := []int64{10, 5, 2, 1} clientErr := client.JsonError{ @@ -1557,9 +1567,13 @@ func TestTooManyLogResults(t *testing.T) { Message: "query returned more than 10000 results. Try with this block range [0x100E698, 0x100E6D4].", } + // Simulate currentBlock = 300 + head := &evmtypes.Head{Number: 300} + finalized := &evmtypes.Head{Number: head.Number - lpOpts.FinalityDepth} + headTracker.On("LatestAndFinalizedBlock", mock.Anything).Return(head, finalized, nil).Once() call1 := ec.On("HeadByNumber", mock.Anything, mock.Anything).Return(func(ctx context.Context, blockNumber *big.Int) (*evmtypes.Head, error) { if blockNumber == nil { - return &evmtypes.Head{Number: 300}, nil // Simulate currentBlock = 300 + require.FailNow(t, "unexpected call to get current head") } return &evmtypes.Head{Number: blockNumber.Int64()}, nil }) @@ -1601,9 +1615,12 @@ func TestTooManyLogResults(t *testing.T) { // Now jump to block 500, but return error no matter how small the block range gets. // Should exit the loop with a critical error instead of hanging. + head = &evmtypes.Head{Number: 500} + finalized = &evmtypes.Head{Number: head.Number - lpOpts.FinalityDepth} + headTracker.On("LatestAndFinalizedBlock", mock.Anything).Return(head, finalized, nil).Once() call1.On("HeadByNumber", mock.Anything, mock.Anything).Return(func(ctx context.Context, blockNumber *big.Int) (*evmtypes.Head, error) { if blockNumber == nil { - return &evmtypes.Head{Number: 500}, nil // Simulate currentBlock = 300 + require.FailNow(t, "unexpected call to get current head") } return &evmtypes.Head{Number: blockNumber.Int64()}, nil }) @@ -1938,7 +1955,7 @@ func TestFindLCA(t *testing.T) { KeepFinalizedBlocksDepth: 1000, } - lp := logpoller.NewLogPoller(orm, ec, lggr, lpOpts) + lp := logpoller.NewLogPoller(orm, ec, lggr, nil, lpOpts) t.Run("Fails, if failed to select oldest block", func(t *testing.T) { _, err := lp.FindLCA(ctx) require.ErrorContains(t, err, "failed to select the latest block") diff --git a/core/chains/evm/logpoller/mocks/log_poller.go b/core/chains/evm/logpoller/mocks/log_poller.go index 3c8f445df57..4ce68839d16 100644 --- a/core/chains/evm/logpoller/mocks/log_poller.go +++ b/core/chains/evm/logpoller/mocks/log_poller.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -23,6 +23,14 @@ type LogPoller struct { mock.Mock } +type LogPoller_Expecter struct { + mock *mock.Mock +} + +func (_m *LogPoller) EXPECT() *LogPoller_Expecter { + return &LogPoller_Expecter{mock: &_m.Mock} +} + // Close provides a mock function with given fields: func (_m *LogPoller) Close() error { ret := _m.Called() @@ -41,6 +49,33 @@ func (_m *LogPoller) Close() error { return r0 } +// LogPoller_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type LogPoller_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *LogPoller_Expecter) Close() *LogPoller_Close_Call { + return &LogPoller_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *LogPoller_Close_Call) Run(run func()) *LogPoller_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *LogPoller_Close_Call) Return(_a0 error) *LogPoller_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LogPoller_Close_Call) RunAndReturn(run func() error) *LogPoller_Close_Call { + _c.Call.Return(run) + return _c +} + // DeleteLogsAndBlocksAfter provides a mock function with given fields: ctx, start func (_m *LogPoller) DeleteLogsAndBlocksAfter(ctx context.Context, start int64) error { ret := _m.Called(ctx, start) @@ -59,6 +94,35 @@ func (_m *LogPoller) DeleteLogsAndBlocksAfter(ctx context.Context, start int64) return r0 } +// LogPoller_DeleteLogsAndBlocksAfter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteLogsAndBlocksAfter' +type LogPoller_DeleteLogsAndBlocksAfter_Call struct { + *mock.Call +} + +// DeleteLogsAndBlocksAfter is a helper method to define mock.On call +// - ctx context.Context +// - start int64 +func (_e *LogPoller_Expecter) DeleteLogsAndBlocksAfter(ctx interface{}, start interface{}) *LogPoller_DeleteLogsAndBlocksAfter_Call { + return &LogPoller_DeleteLogsAndBlocksAfter_Call{Call: _e.mock.On("DeleteLogsAndBlocksAfter", ctx, start)} +} + +func (_c *LogPoller_DeleteLogsAndBlocksAfter_Call) Run(run func(ctx context.Context, start int64)) *LogPoller_DeleteLogsAndBlocksAfter_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64)) + }) + return _c +} + +func (_c *LogPoller_DeleteLogsAndBlocksAfter_Call) Return(_a0 error) *LogPoller_DeleteLogsAndBlocksAfter_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LogPoller_DeleteLogsAndBlocksAfter_Call) RunAndReturn(run func(context.Context, int64) error) *LogPoller_DeleteLogsAndBlocksAfter_Call { + _c.Call.Return(run) + return _c +} + // FilteredLogs provides a mock function with given fields: ctx, filter, limitAndSort, queryName func (_m *LogPoller) FilteredLogs(ctx context.Context, filter query.KeyFilter, limitAndSort query.LimitAndSort, queryName string) ([]logpoller.Log, error) { ret := _m.Called(ctx, filter, limitAndSort, queryName) @@ -89,6 +153,37 @@ func (_m *LogPoller) FilteredLogs(ctx context.Context, filter query.KeyFilter, l return r0, r1 } +// LogPoller_FilteredLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilteredLogs' +type LogPoller_FilteredLogs_Call struct { + *mock.Call +} + +// FilteredLogs is a helper method to define mock.On call +// - ctx context.Context +// - filter query.KeyFilter +// - limitAndSort query.LimitAndSort +// - queryName string +func (_e *LogPoller_Expecter) FilteredLogs(ctx interface{}, filter interface{}, limitAndSort interface{}, queryName interface{}) *LogPoller_FilteredLogs_Call { + return &LogPoller_FilteredLogs_Call{Call: _e.mock.On("FilteredLogs", ctx, filter, limitAndSort, queryName)} +} + +func (_c *LogPoller_FilteredLogs_Call) Run(run func(ctx context.Context, filter query.KeyFilter, limitAndSort query.LimitAndSort, queryName string)) *LogPoller_FilteredLogs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(query.KeyFilter), args[2].(query.LimitAndSort), args[3].(string)) + }) + return _c +} + +func (_c *LogPoller_FilteredLogs_Call) Return(_a0 []logpoller.Log, _a1 error) *LogPoller_FilteredLogs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LogPoller_FilteredLogs_Call) RunAndReturn(run func(context.Context, query.KeyFilter, query.LimitAndSort, string) ([]logpoller.Log, error)) *LogPoller_FilteredLogs_Call { + _c.Call.Return(run) + return _c +} + // FindLCA provides a mock function with given fields: ctx func (_m *LogPoller) FindLCA(ctx context.Context) (*logpoller.LogPollerBlock, error) { ret := _m.Called(ctx) @@ -119,6 +214,34 @@ func (_m *LogPoller) FindLCA(ctx context.Context) (*logpoller.LogPollerBlock, er return r0, r1 } +// LogPoller_FindLCA_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindLCA' +type LogPoller_FindLCA_Call struct { + *mock.Call +} + +// FindLCA is a helper method to define mock.On call +// - ctx context.Context +func (_e *LogPoller_Expecter) FindLCA(ctx interface{}) *LogPoller_FindLCA_Call { + return &LogPoller_FindLCA_Call{Call: _e.mock.On("FindLCA", ctx)} +} + +func (_c *LogPoller_FindLCA_Call) Run(run func(ctx context.Context)) *LogPoller_FindLCA_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *LogPoller_FindLCA_Call) Return(_a0 *logpoller.LogPollerBlock, _a1 error) *LogPoller_FindLCA_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LogPoller_FindLCA_Call) RunAndReturn(run func(context.Context) (*logpoller.LogPollerBlock, error)) *LogPoller_FindLCA_Call { + _c.Call.Return(run) + return _c +} + // 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) @@ -149,6 +272,35 @@ func (_m *LogPoller) GetBlocksRange(ctx context.Context, numbers []uint64) ([]lo return r0, r1 } +// LogPoller_GetBlocksRange_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBlocksRange' +type LogPoller_GetBlocksRange_Call struct { + *mock.Call +} + +// GetBlocksRange is a helper method to define mock.On call +// - ctx context.Context +// - numbers []uint64 +func (_e *LogPoller_Expecter) GetBlocksRange(ctx interface{}, numbers interface{}) *LogPoller_GetBlocksRange_Call { + return &LogPoller_GetBlocksRange_Call{Call: _e.mock.On("GetBlocksRange", ctx, numbers)} +} + +func (_c *LogPoller_GetBlocksRange_Call) Run(run func(ctx context.Context, numbers []uint64)) *LogPoller_GetBlocksRange_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]uint64)) + }) + return _c +} + +func (_c *LogPoller_GetBlocksRange_Call) Return(_a0 []logpoller.LogPollerBlock, _a1 error) *LogPoller_GetBlocksRange_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LogPoller_GetBlocksRange_Call) RunAndReturn(run func(context.Context, []uint64) ([]logpoller.LogPollerBlock, error)) *LogPoller_GetBlocksRange_Call { + _c.Call.Return(run) + return _c +} + // GetFilters provides a mock function with given fields: func (_m *LogPoller) GetFilters() map[string]logpoller.Filter { ret := _m.Called() @@ -169,6 +321,33 @@ func (_m *LogPoller) GetFilters() map[string]logpoller.Filter { return r0 } +// LogPoller_GetFilters_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFilters' +type LogPoller_GetFilters_Call struct { + *mock.Call +} + +// GetFilters is a helper method to define mock.On call +func (_e *LogPoller_Expecter) GetFilters() *LogPoller_GetFilters_Call { + return &LogPoller_GetFilters_Call{Call: _e.mock.On("GetFilters")} +} + +func (_c *LogPoller_GetFilters_Call) Run(run func()) *LogPoller_GetFilters_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *LogPoller_GetFilters_Call) Return(_a0 map[string]logpoller.Filter) *LogPoller_GetFilters_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LogPoller_GetFilters_Call) RunAndReturn(run func() map[string]logpoller.Filter) *LogPoller_GetFilters_Call { + _c.Call.Return(run) + return _c +} + // HasFilter provides a mock function with given fields: name func (_m *LogPoller) HasFilter(name string) bool { ret := _m.Called(name) @@ -187,6 +366,34 @@ func (_m *LogPoller) HasFilter(name string) bool { return r0 } +// LogPoller_HasFilter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasFilter' +type LogPoller_HasFilter_Call struct { + *mock.Call +} + +// HasFilter is a helper method to define mock.On call +// - name string +func (_e *LogPoller_Expecter) HasFilter(name interface{}) *LogPoller_HasFilter_Call { + return &LogPoller_HasFilter_Call{Call: _e.mock.On("HasFilter", name)} +} + +func (_c *LogPoller_HasFilter_Call) Run(run func(name string)) *LogPoller_HasFilter_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *LogPoller_HasFilter_Call) Return(_a0 bool) *LogPoller_HasFilter_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LogPoller_HasFilter_Call) RunAndReturn(run func(string) bool) *LogPoller_HasFilter_Call { + _c.Call.Return(run) + return _c +} + // HealthReport provides a mock function with given fields: func (_m *LogPoller) HealthReport() map[string]error { ret := _m.Called() @@ -207,6 +414,33 @@ func (_m *LogPoller) HealthReport() map[string]error { return r0 } +// LogPoller_HealthReport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HealthReport' +type LogPoller_HealthReport_Call struct { + *mock.Call +} + +// HealthReport is a helper method to define mock.On call +func (_e *LogPoller_Expecter) HealthReport() *LogPoller_HealthReport_Call { + return &LogPoller_HealthReport_Call{Call: _e.mock.On("HealthReport")} +} + +func (_c *LogPoller_HealthReport_Call) Run(run func()) *LogPoller_HealthReport_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *LogPoller_HealthReport_Call) Return(_a0 map[string]error) *LogPoller_HealthReport_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LogPoller_HealthReport_Call) RunAndReturn(run func() map[string]error) *LogPoller_HealthReport_Call { + _c.Call.Return(run) + return _c +} + // Healthy provides a mock function with given fields: func (_m *LogPoller) Healthy() error { ret := _m.Called() @@ -225,6 +459,33 @@ func (_m *LogPoller) Healthy() error { return r0 } +// LogPoller_Healthy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Healthy' +type LogPoller_Healthy_Call struct { + *mock.Call +} + +// Healthy is a helper method to define mock.On call +func (_e *LogPoller_Expecter) Healthy() *LogPoller_Healthy_Call { + return &LogPoller_Healthy_Call{Call: _e.mock.On("Healthy")} +} + +func (_c *LogPoller_Healthy_Call) Run(run func()) *LogPoller_Healthy_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *LogPoller_Healthy_Call) Return(_a0 error) *LogPoller_Healthy_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LogPoller_Healthy_Call) RunAndReturn(run func() error) *LogPoller_Healthy_Call { + _c.Call.Return(run) + return _c +} + // 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 types.Confirmations) ([]logpoller.Log, error) { ret := _m.Called(ctx, eventSig, address, topicIndex, topicValues, confs) @@ -255,6 +516,39 @@ func (_m *LogPoller) IndexedLogs(ctx context.Context, eventSig common.Hash, addr return r0, r1 } +// LogPoller_IndexedLogs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IndexedLogs' +type LogPoller_IndexedLogs_Call struct { + *mock.Call +} + +// IndexedLogs is a helper method to define mock.On call +// - ctx context.Context +// - eventSig common.Hash +// - address common.Address +// - topicIndex int +// - topicValues []common.Hash +// - confs types.Confirmations +func (_e *LogPoller_Expecter) IndexedLogs(ctx interface{}, eventSig interface{}, address interface{}, topicIndex interface{}, topicValues interface{}, confs interface{}) *LogPoller_IndexedLogs_Call { + return &LogPoller_IndexedLogs_Call{Call: _e.mock.On("IndexedLogs", ctx, eventSig, address, topicIndex, topicValues, confs)} +} + +func (_c *LogPoller_IndexedLogs_Call) Run(run func(ctx context.Context, eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, confs types.Confirmations)) *LogPoller_IndexedLogs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Hash), args[2].(common.Address), args[3].(int), args[4].([]common.Hash), args[5].(types.Confirmations)) + }) + return _c +} + +func (_c *LogPoller_IndexedLogs_Call) Return(_a0 []logpoller.Log, _a1 error) *LogPoller_IndexedLogs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LogPoller_IndexedLogs_Call) RunAndReturn(run func(context.Context, common.Hash, common.Address, int, []common.Hash, types.Confirmations) ([]logpoller.Log, error)) *LogPoller_IndexedLogs_Call { + _c.Call.Return(run) + return _c +} + // 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) @@ -285,6 +579,40 @@ func (_m *LogPoller) IndexedLogsByBlockRange(ctx context.Context, start int64, e return r0, r1 } +// LogPoller_IndexedLogsByBlockRange_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IndexedLogsByBlockRange' +type LogPoller_IndexedLogsByBlockRange_Call struct { + *mock.Call +} + +// IndexedLogsByBlockRange is a helper method to define mock.On call +// - ctx context.Context +// - start int64 +// - end int64 +// - eventSig common.Hash +// - address common.Address +// - topicIndex int +// - topicValues []common.Hash +func (_e *LogPoller_Expecter) IndexedLogsByBlockRange(ctx interface{}, start interface{}, end interface{}, eventSig interface{}, address interface{}, topicIndex interface{}, topicValues interface{}) *LogPoller_IndexedLogsByBlockRange_Call { + return &LogPoller_IndexedLogsByBlockRange_Call{Call: _e.mock.On("IndexedLogsByBlockRange", ctx, start, end, eventSig, address, topicIndex, topicValues)} +} + +func (_c *LogPoller_IndexedLogsByBlockRange_Call) Run(run func(ctx context.Context, start int64, end int64, eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash)) *LogPoller_IndexedLogsByBlockRange_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64), args[2].(int64), args[3].(common.Hash), args[4].(common.Address), args[5].(int), args[6].([]common.Hash)) + }) + return _c +} + +func (_c *LogPoller_IndexedLogsByBlockRange_Call) Return(_a0 []logpoller.Log, _a1 error) *LogPoller_IndexedLogsByBlockRange_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LogPoller_IndexedLogsByBlockRange_Call) RunAndReturn(run func(context.Context, int64, int64, common.Hash, common.Address, int, []common.Hash) ([]logpoller.Log, error)) *LogPoller_IndexedLogsByBlockRange_Call { + _c.Call.Return(run) + return _c +} + // 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) @@ -315,6 +643,37 @@ func (_m *LogPoller) IndexedLogsByTxHash(ctx context.Context, eventSig common.Ha return r0, r1 } +// LogPoller_IndexedLogsByTxHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IndexedLogsByTxHash' +type LogPoller_IndexedLogsByTxHash_Call struct { + *mock.Call +} + +// IndexedLogsByTxHash is a helper method to define mock.On call +// - ctx context.Context +// - eventSig common.Hash +// - address common.Address +// - txHash common.Hash +func (_e *LogPoller_Expecter) IndexedLogsByTxHash(ctx interface{}, eventSig interface{}, address interface{}, txHash interface{}) *LogPoller_IndexedLogsByTxHash_Call { + return &LogPoller_IndexedLogsByTxHash_Call{Call: _e.mock.On("IndexedLogsByTxHash", ctx, eventSig, address, txHash)} +} + +func (_c *LogPoller_IndexedLogsByTxHash_Call) Run(run func(ctx context.Context, eventSig common.Hash, address common.Address, txHash common.Hash)) *LogPoller_IndexedLogsByTxHash_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Hash), args[2].(common.Address), args[3].(common.Hash)) + }) + return _c +} + +func (_c *LogPoller_IndexedLogsByTxHash_Call) Return(_a0 []logpoller.Log, _a1 error) *LogPoller_IndexedLogsByTxHash_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LogPoller_IndexedLogsByTxHash_Call) RunAndReturn(run func(context.Context, common.Hash, common.Address, common.Hash) ([]logpoller.Log, error)) *LogPoller_IndexedLogsByTxHash_Call { + _c.Call.Return(run) + return _c +} + // 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 types.Confirmations) ([]logpoller.Log, error) { ret := _m.Called(ctx, eventSig, address, topicIndex, topicValues, after, confs) @@ -345,6 +704,40 @@ func (_m *LogPoller) IndexedLogsCreatedAfter(ctx context.Context, eventSig commo return r0, r1 } +// LogPoller_IndexedLogsCreatedAfter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IndexedLogsCreatedAfter' +type LogPoller_IndexedLogsCreatedAfter_Call struct { + *mock.Call +} + +// IndexedLogsCreatedAfter is a helper method to define mock.On call +// - ctx context.Context +// - eventSig common.Hash +// - address common.Address +// - topicIndex int +// - topicValues []common.Hash +// - after time.Time +// - confs types.Confirmations +func (_e *LogPoller_Expecter) IndexedLogsCreatedAfter(ctx interface{}, eventSig interface{}, address interface{}, topicIndex interface{}, topicValues interface{}, after interface{}, confs interface{}) *LogPoller_IndexedLogsCreatedAfter_Call { + return &LogPoller_IndexedLogsCreatedAfter_Call{Call: _e.mock.On("IndexedLogsCreatedAfter", ctx, eventSig, address, topicIndex, topicValues, after, confs)} +} + +func (_c *LogPoller_IndexedLogsCreatedAfter_Call) Run(run func(ctx context.Context, eventSig common.Hash, address common.Address, topicIndex int, topicValues []common.Hash, after time.Time, confs types.Confirmations)) *LogPoller_IndexedLogsCreatedAfter_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Hash), args[2].(common.Address), args[3].(int), args[4].([]common.Hash), args[5].(time.Time), args[6].(types.Confirmations)) + }) + return _c +} + +func (_c *LogPoller_IndexedLogsCreatedAfter_Call) Return(_a0 []logpoller.Log, _a1 error) *LogPoller_IndexedLogsCreatedAfter_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LogPoller_IndexedLogsCreatedAfter_Call) RunAndReturn(run func(context.Context, common.Hash, common.Address, int, []common.Hash, time.Time, types.Confirmations) ([]logpoller.Log, error)) *LogPoller_IndexedLogsCreatedAfter_Call { + _c.Call.Return(run) + return _c +} + // 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 types.Confirmations) ([]logpoller.Log, error) { ret := _m.Called(ctx, eventSig, address, topicIndex, topicValueMin, confs) @@ -375,6 +768,39 @@ func (_m *LogPoller) IndexedLogsTopicGreaterThan(ctx context.Context, eventSig c return r0, r1 } +// LogPoller_IndexedLogsTopicGreaterThan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IndexedLogsTopicGreaterThan' +type LogPoller_IndexedLogsTopicGreaterThan_Call struct { + *mock.Call +} + +// IndexedLogsTopicGreaterThan is a helper method to define mock.On call +// - ctx context.Context +// - eventSig common.Hash +// - address common.Address +// - topicIndex int +// - topicValueMin common.Hash +// - confs types.Confirmations +func (_e *LogPoller_Expecter) IndexedLogsTopicGreaterThan(ctx interface{}, eventSig interface{}, address interface{}, topicIndex interface{}, topicValueMin interface{}, confs interface{}) *LogPoller_IndexedLogsTopicGreaterThan_Call { + return &LogPoller_IndexedLogsTopicGreaterThan_Call{Call: _e.mock.On("IndexedLogsTopicGreaterThan", ctx, eventSig, address, topicIndex, topicValueMin, confs)} +} + +func (_c *LogPoller_IndexedLogsTopicGreaterThan_Call) Run(run func(ctx context.Context, eventSig common.Hash, address common.Address, topicIndex int, topicValueMin common.Hash, confs types.Confirmations)) *LogPoller_IndexedLogsTopicGreaterThan_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Hash), args[2].(common.Address), args[3].(int), args[4].(common.Hash), args[5].(types.Confirmations)) + }) + return _c +} + +func (_c *LogPoller_IndexedLogsTopicGreaterThan_Call) Return(_a0 []logpoller.Log, _a1 error) *LogPoller_IndexedLogsTopicGreaterThan_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LogPoller_IndexedLogsTopicGreaterThan_Call) RunAndReturn(run func(context.Context, common.Hash, common.Address, int, common.Hash, types.Confirmations) ([]logpoller.Log, error)) *LogPoller_IndexedLogsTopicGreaterThan_Call { + _c.Call.Return(run) + return _c +} + // 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 types.Confirmations) ([]logpoller.Log, error) { ret := _m.Called(ctx, eventSig, address, topicIndex, topicValueMin, topicValueMax, confs) @@ -405,6 +831,40 @@ func (_m *LogPoller) IndexedLogsTopicRange(ctx context.Context, eventSig common. return r0, r1 } +// LogPoller_IndexedLogsTopicRange_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IndexedLogsTopicRange' +type LogPoller_IndexedLogsTopicRange_Call struct { + *mock.Call +} + +// IndexedLogsTopicRange is a helper method to define mock.On call +// - ctx context.Context +// - eventSig common.Hash +// - address common.Address +// - topicIndex int +// - topicValueMin common.Hash +// - topicValueMax common.Hash +// - confs types.Confirmations +func (_e *LogPoller_Expecter) IndexedLogsTopicRange(ctx interface{}, eventSig interface{}, address interface{}, topicIndex interface{}, topicValueMin interface{}, topicValueMax interface{}, confs interface{}) *LogPoller_IndexedLogsTopicRange_Call { + return &LogPoller_IndexedLogsTopicRange_Call{Call: _e.mock.On("IndexedLogsTopicRange", ctx, eventSig, address, topicIndex, topicValueMin, topicValueMax, confs)} +} + +func (_c *LogPoller_IndexedLogsTopicRange_Call) Run(run func(ctx context.Context, eventSig common.Hash, address common.Address, topicIndex int, topicValueMin common.Hash, topicValueMax common.Hash, confs types.Confirmations)) *LogPoller_IndexedLogsTopicRange_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Hash), args[2].(common.Address), args[3].(int), args[4].(common.Hash), args[5].(common.Hash), args[6].(types.Confirmations)) + }) + return _c +} + +func (_c *LogPoller_IndexedLogsTopicRange_Call) Return(_a0 []logpoller.Log, _a1 error) *LogPoller_IndexedLogsTopicRange_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LogPoller_IndexedLogsTopicRange_Call) RunAndReturn(run func(context.Context, common.Hash, common.Address, int, common.Hash, common.Hash, types.Confirmations) ([]logpoller.Log, error)) *LogPoller_IndexedLogsTopicRange_Call { + _c.Call.Return(run) + return _c +} + // 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 types.Confirmations) ([]logpoller.Log, error) { ret := _m.Called(ctx, address, eventSigA, eventSigB, topicIndex, fromBlock, toBlock, confs) @@ -435,6 +895,41 @@ func (_m *LogPoller) IndexedLogsWithSigsExcluding(ctx context.Context, address c return r0, r1 } +// LogPoller_IndexedLogsWithSigsExcluding_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IndexedLogsWithSigsExcluding' +type LogPoller_IndexedLogsWithSigsExcluding_Call struct { + *mock.Call +} + +// IndexedLogsWithSigsExcluding is a helper method to define mock.On call +// - ctx context.Context +// - address common.Address +// - eventSigA common.Hash +// - eventSigB common.Hash +// - topicIndex int +// - fromBlock int64 +// - toBlock int64 +// - confs types.Confirmations +func (_e *LogPoller_Expecter) IndexedLogsWithSigsExcluding(ctx interface{}, address interface{}, eventSigA interface{}, eventSigB interface{}, topicIndex interface{}, fromBlock interface{}, toBlock interface{}, confs interface{}) *LogPoller_IndexedLogsWithSigsExcluding_Call { + return &LogPoller_IndexedLogsWithSigsExcluding_Call{Call: _e.mock.On("IndexedLogsWithSigsExcluding", ctx, address, eventSigA, eventSigB, topicIndex, fromBlock, toBlock, confs)} +} + +func (_c *LogPoller_IndexedLogsWithSigsExcluding_Call) Run(run func(ctx context.Context, address common.Address, eventSigA common.Hash, eventSigB common.Hash, topicIndex int, fromBlock int64, toBlock int64, confs types.Confirmations)) *LogPoller_IndexedLogsWithSigsExcluding_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(common.Hash), args[3].(common.Hash), args[4].(int), args[5].(int64), args[6].(int64), args[7].(types.Confirmations)) + }) + return _c +} + +func (_c *LogPoller_IndexedLogsWithSigsExcluding_Call) Return(_a0 []logpoller.Log, _a1 error) *LogPoller_IndexedLogsWithSigsExcluding_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LogPoller_IndexedLogsWithSigsExcluding_Call) RunAndReturn(run func(context.Context, common.Address, common.Hash, common.Hash, int, int64, int64, types.Confirmations) ([]logpoller.Log, error)) *LogPoller_IndexedLogsWithSigsExcluding_Call { + _c.Call.Return(run) + return _c +} + // LatestBlock provides a mock function with given fields: ctx func (_m *LogPoller) LatestBlock(ctx context.Context) (logpoller.LogPollerBlock, error) { ret := _m.Called(ctx) @@ -463,6 +958,34 @@ func (_m *LogPoller) LatestBlock(ctx context.Context) (logpoller.LogPollerBlock, return r0, r1 } +// LogPoller_LatestBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LatestBlock' +type LogPoller_LatestBlock_Call struct { + *mock.Call +} + +// LatestBlock is a helper method to define mock.On call +// - ctx context.Context +func (_e *LogPoller_Expecter) LatestBlock(ctx interface{}) *LogPoller_LatestBlock_Call { + return &LogPoller_LatestBlock_Call{Call: _e.mock.On("LatestBlock", ctx)} +} + +func (_c *LogPoller_LatestBlock_Call) Run(run func(ctx context.Context)) *LogPoller_LatestBlock_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *LogPoller_LatestBlock_Call) Return(_a0 logpoller.LogPollerBlock, _a1 error) *LogPoller_LatestBlock_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LogPoller_LatestBlock_Call) RunAndReturn(run func(context.Context) (logpoller.LogPollerBlock, error)) *LogPoller_LatestBlock_Call { + _c.Call.Return(run) + return _c +} + // 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 types.Confirmations) (int64, error) { ret := _m.Called(ctx, fromBlock, eventSigs, addresses, confs) @@ -491,6 +1014,38 @@ func (_m *LogPoller) LatestBlockByEventSigsAddrsWithConfs(ctx context.Context, f return r0, r1 } +// LogPoller_LatestBlockByEventSigsAddrsWithConfs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LatestBlockByEventSigsAddrsWithConfs' +type LogPoller_LatestBlockByEventSigsAddrsWithConfs_Call struct { + *mock.Call +} + +// LatestBlockByEventSigsAddrsWithConfs is a helper method to define mock.On call +// - ctx context.Context +// - fromBlock int64 +// - eventSigs []common.Hash +// - addresses []common.Address +// - confs types.Confirmations +func (_e *LogPoller_Expecter) LatestBlockByEventSigsAddrsWithConfs(ctx interface{}, fromBlock interface{}, eventSigs interface{}, addresses interface{}, confs interface{}) *LogPoller_LatestBlockByEventSigsAddrsWithConfs_Call { + return &LogPoller_LatestBlockByEventSigsAddrsWithConfs_Call{Call: _e.mock.On("LatestBlockByEventSigsAddrsWithConfs", ctx, fromBlock, eventSigs, addresses, confs)} +} + +func (_c *LogPoller_LatestBlockByEventSigsAddrsWithConfs_Call) Run(run func(ctx context.Context, fromBlock int64, eventSigs []common.Hash, addresses []common.Address, confs types.Confirmations)) *LogPoller_LatestBlockByEventSigsAddrsWithConfs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64), args[2].([]common.Hash), args[3].([]common.Address), args[4].(types.Confirmations)) + }) + return _c +} + +func (_c *LogPoller_LatestBlockByEventSigsAddrsWithConfs_Call) Return(_a0 int64, _a1 error) *LogPoller_LatestBlockByEventSigsAddrsWithConfs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LogPoller_LatestBlockByEventSigsAddrsWithConfs_Call) RunAndReturn(run func(context.Context, int64, []common.Hash, []common.Address, types.Confirmations) (int64, error)) *LogPoller_LatestBlockByEventSigsAddrsWithConfs_Call { + _c.Call.Return(run) + return _c +} + // 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 types.Confirmations) (*logpoller.Log, error) { ret := _m.Called(ctx, eventSig, address, confs) @@ -521,6 +1076,37 @@ func (_m *LogPoller) LatestLogByEventSigWithConfs(ctx context.Context, eventSig return r0, r1 } +// LogPoller_LatestLogByEventSigWithConfs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LatestLogByEventSigWithConfs' +type LogPoller_LatestLogByEventSigWithConfs_Call struct { + *mock.Call +} + +// LatestLogByEventSigWithConfs is a helper method to define mock.On call +// - ctx context.Context +// - eventSig common.Hash +// - address common.Address +// - confs types.Confirmations +func (_e *LogPoller_Expecter) LatestLogByEventSigWithConfs(ctx interface{}, eventSig interface{}, address interface{}, confs interface{}) *LogPoller_LatestLogByEventSigWithConfs_Call { + return &LogPoller_LatestLogByEventSigWithConfs_Call{Call: _e.mock.On("LatestLogByEventSigWithConfs", ctx, eventSig, address, confs)} +} + +func (_c *LogPoller_LatestLogByEventSigWithConfs_Call) Run(run func(ctx context.Context, eventSig common.Hash, address common.Address, confs types.Confirmations)) *LogPoller_LatestLogByEventSigWithConfs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Hash), args[2].(common.Address), args[3].(types.Confirmations)) + }) + return _c +} + +func (_c *LogPoller_LatestLogByEventSigWithConfs_Call) Return(_a0 *logpoller.Log, _a1 error) *LogPoller_LatestLogByEventSigWithConfs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LogPoller_LatestLogByEventSigWithConfs_Call) RunAndReturn(run func(context.Context, common.Hash, common.Address, types.Confirmations) (*logpoller.Log, error)) *LogPoller_LatestLogByEventSigWithConfs_Call { + _c.Call.Return(run) + return _c +} + // 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 types.Confirmations) ([]logpoller.Log, error) { ret := _m.Called(ctx, fromBlock, eventSigs, addresses, confs) @@ -551,6 +1137,38 @@ func (_m *LogPoller) LatestLogEventSigsAddrsWithConfs(ctx context.Context, fromB return r0, r1 } +// LogPoller_LatestLogEventSigsAddrsWithConfs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LatestLogEventSigsAddrsWithConfs' +type LogPoller_LatestLogEventSigsAddrsWithConfs_Call struct { + *mock.Call +} + +// LatestLogEventSigsAddrsWithConfs is a helper method to define mock.On call +// - ctx context.Context +// - fromBlock int64 +// - eventSigs []common.Hash +// - addresses []common.Address +// - confs types.Confirmations +func (_e *LogPoller_Expecter) LatestLogEventSigsAddrsWithConfs(ctx interface{}, fromBlock interface{}, eventSigs interface{}, addresses interface{}, confs interface{}) *LogPoller_LatestLogEventSigsAddrsWithConfs_Call { + return &LogPoller_LatestLogEventSigsAddrsWithConfs_Call{Call: _e.mock.On("LatestLogEventSigsAddrsWithConfs", ctx, fromBlock, eventSigs, addresses, confs)} +} + +func (_c *LogPoller_LatestLogEventSigsAddrsWithConfs_Call) Run(run func(ctx context.Context, fromBlock int64, eventSigs []common.Hash, addresses []common.Address, confs types.Confirmations)) *LogPoller_LatestLogEventSigsAddrsWithConfs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64), args[2].([]common.Hash), args[3].([]common.Address), args[4].(types.Confirmations)) + }) + return _c +} + +func (_c *LogPoller_LatestLogEventSigsAddrsWithConfs_Call) Return(_a0 []logpoller.Log, _a1 error) *LogPoller_LatestLogEventSigsAddrsWithConfs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LogPoller_LatestLogEventSigsAddrsWithConfs_Call) RunAndReturn(run func(context.Context, int64, []common.Hash, []common.Address, types.Confirmations) ([]logpoller.Log, error)) *LogPoller_LatestLogEventSigsAddrsWithConfs_Call { + _c.Call.Return(run) + return _c +} + // 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) @@ -581,6 +1199,38 @@ func (_m *LogPoller) Logs(ctx context.Context, start int64, end int64, eventSig return r0, r1 } +// LogPoller_Logs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Logs' +type LogPoller_Logs_Call struct { + *mock.Call +} + +// Logs is a helper method to define mock.On call +// - ctx context.Context +// - start int64 +// - end int64 +// - eventSig common.Hash +// - address common.Address +func (_e *LogPoller_Expecter) Logs(ctx interface{}, start interface{}, end interface{}, eventSig interface{}, address interface{}) *LogPoller_Logs_Call { + return &LogPoller_Logs_Call{Call: _e.mock.On("Logs", ctx, start, end, eventSig, address)} +} + +func (_c *LogPoller_Logs_Call) Run(run func(ctx context.Context, start int64, end int64, eventSig common.Hash, address common.Address)) *LogPoller_Logs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64), args[2].(int64), args[3].(common.Hash), args[4].(common.Address)) + }) + return _c +} + +func (_c *LogPoller_Logs_Call) Return(_a0 []logpoller.Log, _a1 error) *LogPoller_Logs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LogPoller_Logs_Call) RunAndReturn(run func(context.Context, int64, int64, common.Hash, common.Address) ([]logpoller.Log, error)) *LogPoller_Logs_Call { + _c.Call.Return(run) + return _c +} + // 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 types.Confirmations) ([]logpoller.Log, error) { ret := _m.Called(ctx, eventSig, address, _a3, confs) @@ -611,6 +1261,38 @@ func (_m *LogPoller) LogsCreatedAfter(ctx context.Context, eventSig common.Hash, return r0, r1 } +// LogPoller_LogsCreatedAfter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LogsCreatedAfter' +type LogPoller_LogsCreatedAfter_Call struct { + *mock.Call +} + +// LogsCreatedAfter is a helper method to define mock.On call +// - ctx context.Context +// - eventSig common.Hash +// - address common.Address +// - _a3 time.Time +// - confs types.Confirmations +func (_e *LogPoller_Expecter) LogsCreatedAfter(ctx interface{}, eventSig interface{}, address interface{}, _a3 interface{}, confs interface{}) *LogPoller_LogsCreatedAfter_Call { + return &LogPoller_LogsCreatedAfter_Call{Call: _e.mock.On("LogsCreatedAfter", ctx, eventSig, address, _a3, confs)} +} + +func (_c *LogPoller_LogsCreatedAfter_Call) Run(run func(ctx context.Context, eventSig common.Hash, address common.Address, _a3 time.Time, confs types.Confirmations)) *LogPoller_LogsCreatedAfter_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Hash), args[2].(common.Address), args[3].(time.Time), args[4].(types.Confirmations)) + }) + return _c +} + +func (_c *LogPoller_LogsCreatedAfter_Call) Return(_a0 []logpoller.Log, _a1 error) *LogPoller_LogsCreatedAfter_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LogPoller_LogsCreatedAfter_Call) RunAndReturn(run func(context.Context, common.Hash, common.Address, time.Time, types.Confirmations) ([]logpoller.Log, error)) *LogPoller_LogsCreatedAfter_Call { + _c.Call.Return(run) + return _c +} + // 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 types.Confirmations) ([]logpoller.Log, error) { ret := _m.Called(ctx, eventSig, address, wordIndexMin, wordIndexMax, wordValue, confs) @@ -641,6 +1323,40 @@ func (_m *LogPoller) LogsDataWordBetween(ctx context.Context, eventSig common.Ha return r0, r1 } +// LogPoller_LogsDataWordBetween_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LogsDataWordBetween' +type LogPoller_LogsDataWordBetween_Call struct { + *mock.Call +} + +// LogsDataWordBetween is a helper method to define mock.On call +// - ctx context.Context +// - eventSig common.Hash +// - address common.Address +// - wordIndexMin int +// - wordIndexMax int +// - wordValue common.Hash +// - confs types.Confirmations +func (_e *LogPoller_Expecter) LogsDataWordBetween(ctx interface{}, eventSig interface{}, address interface{}, wordIndexMin interface{}, wordIndexMax interface{}, wordValue interface{}, confs interface{}) *LogPoller_LogsDataWordBetween_Call { + return &LogPoller_LogsDataWordBetween_Call{Call: _e.mock.On("LogsDataWordBetween", ctx, eventSig, address, wordIndexMin, wordIndexMax, wordValue, confs)} +} + +func (_c *LogPoller_LogsDataWordBetween_Call) Run(run func(ctx context.Context, eventSig common.Hash, address common.Address, wordIndexMin int, wordIndexMax int, wordValue common.Hash, confs types.Confirmations)) *LogPoller_LogsDataWordBetween_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Hash), args[2].(common.Address), args[3].(int), args[4].(int), args[5].(common.Hash), args[6].(types.Confirmations)) + }) + return _c +} + +func (_c *LogPoller_LogsDataWordBetween_Call) Return(_a0 []logpoller.Log, _a1 error) *LogPoller_LogsDataWordBetween_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LogPoller_LogsDataWordBetween_Call) RunAndReturn(run func(context.Context, common.Hash, common.Address, int, int, common.Hash, types.Confirmations) ([]logpoller.Log, error)) *LogPoller_LogsDataWordBetween_Call { + _c.Call.Return(run) + return _c +} + // 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 types.Confirmations) ([]logpoller.Log, error) { ret := _m.Called(ctx, eventSig, address, wordIndex, wordValueMin, confs) @@ -671,6 +1387,39 @@ func (_m *LogPoller) LogsDataWordGreaterThan(ctx context.Context, eventSig commo return r0, r1 } +// LogPoller_LogsDataWordGreaterThan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LogsDataWordGreaterThan' +type LogPoller_LogsDataWordGreaterThan_Call struct { + *mock.Call +} + +// LogsDataWordGreaterThan is a helper method to define mock.On call +// - ctx context.Context +// - eventSig common.Hash +// - address common.Address +// - wordIndex int +// - wordValueMin common.Hash +// - confs types.Confirmations +func (_e *LogPoller_Expecter) LogsDataWordGreaterThan(ctx interface{}, eventSig interface{}, address interface{}, wordIndex interface{}, wordValueMin interface{}, confs interface{}) *LogPoller_LogsDataWordGreaterThan_Call { + return &LogPoller_LogsDataWordGreaterThan_Call{Call: _e.mock.On("LogsDataWordGreaterThan", ctx, eventSig, address, wordIndex, wordValueMin, confs)} +} + +func (_c *LogPoller_LogsDataWordGreaterThan_Call) Run(run func(ctx context.Context, eventSig common.Hash, address common.Address, wordIndex int, wordValueMin common.Hash, confs types.Confirmations)) *LogPoller_LogsDataWordGreaterThan_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Hash), args[2].(common.Address), args[3].(int), args[4].(common.Hash), args[5].(types.Confirmations)) + }) + return _c +} + +func (_c *LogPoller_LogsDataWordGreaterThan_Call) Return(_a0 []logpoller.Log, _a1 error) *LogPoller_LogsDataWordGreaterThan_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LogPoller_LogsDataWordGreaterThan_Call) RunAndReturn(run func(context.Context, common.Hash, common.Address, int, common.Hash, types.Confirmations) ([]logpoller.Log, error)) *LogPoller_LogsDataWordGreaterThan_Call { + _c.Call.Return(run) + return _c +} + // 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 types.Confirmations) ([]logpoller.Log, error) { ret := _m.Called(ctx, eventSig, address, wordIndex, wordValueMin, wordValueMax, confs) @@ -701,6 +1450,40 @@ func (_m *LogPoller) LogsDataWordRange(ctx context.Context, eventSig common.Hash return r0, r1 } +// LogPoller_LogsDataWordRange_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LogsDataWordRange' +type LogPoller_LogsDataWordRange_Call struct { + *mock.Call +} + +// LogsDataWordRange is a helper method to define mock.On call +// - ctx context.Context +// - eventSig common.Hash +// - address common.Address +// - wordIndex int +// - wordValueMin common.Hash +// - wordValueMax common.Hash +// - confs types.Confirmations +func (_e *LogPoller_Expecter) LogsDataWordRange(ctx interface{}, eventSig interface{}, address interface{}, wordIndex interface{}, wordValueMin interface{}, wordValueMax interface{}, confs interface{}) *LogPoller_LogsDataWordRange_Call { + return &LogPoller_LogsDataWordRange_Call{Call: _e.mock.On("LogsDataWordRange", ctx, eventSig, address, wordIndex, wordValueMin, wordValueMax, confs)} +} + +func (_c *LogPoller_LogsDataWordRange_Call) Run(run func(ctx context.Context, eventSig common.Hash, address common.Address, wordIndex int, wordValueMin common.Hash, wordValueMax common.Hash, confs types.Confirmations)) *LogPoller_LogsDataWordRange_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Hash), args[2].(common.Address), args[3].(int), args[4].(common.Hash), args[5].(common.Hash), args[6].(types.Confirmations)) + }) + return _c +} + +func (_c *LogPoller_LogsDataWordRange_Call) Return(_a0 []logpoller.Log, _a1 error) *LogPoller_LogsDataWordRange_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LogPoller_LogsDataWordRange_Call) RunAndReturn(run func(context.Context, common.Hash, common.Address, int, common.Hash, common.Hash, types.Confirmations) ([]logpoller.Log, error)) *LogPoller_LogsDataWordRange_Call { + _c.Call.Return(run) + return _c +} + // 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) @@ -731,6 +1514,38 @@ func (_m *LogPoller) LogsWithSigs(ctx context.Context, start int64, end int64, e return r0, r1 } +// LogPoller_LogsWithSigs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LogsWithSigs' +type LogPoller_LogsWithSigs_Call struct { + *mock.Call +} + +// LogsWithSigs is a helper method to define mock.On call +// - ctx context.Context +// - start int64 +// - end int64 +// - eventSigs []common.Hash +// - address common.Address +func (_e *LogPoller_Expecter) LogsWithSigs(ctx interface{}, start interface{}, end interface{}, eventSigs interface{}, address interface{}) *LogPoller_LogsWithSigs_Call { + return &LogPoller_LogsWithSigs_Call{Call: _e.mock.On("LogsWithSigs", ctx, start, end, eventSigs, address)} +} + +func (_c *LogPoller_LogsWithSigs_Call) Run(run func(ctx context.Context, start int64, end int64, eventSigs []common.Hash, address common.Address)) *LogPoller_LogsWithSigs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64), args[2].(int64), args[3].([]common.Hash), args[4].(common.Address)) + }) + return _c +} + +func (_c *LogPoller_LogsWithSigs_Call) Return(_a0 []logpoller.Log, _a1 error) *LogPoller_LogsWithSigs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LogPoller_LogsWithSigs_Call) RunAndReturn(run func(context.Context, int64, int64, []common.Hash, common.Address) ([]logpoller.Log, error)) *LogPoller_LogsWithSigs_Call { + _c.Call.Return(run) + return _c +} + // Name provides a mock function with given fields: func (_m *LogPoller) Name() string { ret := _m.Called() @@ -749,6 +1564,33 @@ func (_m *LogPoller) Name() string { return r0 } +// LogPoller_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type LogPoller_Name_Call struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *LogPoller_Expecter) Name() *LogPoller_Name_Call { + return &LogPoller_Name_Call{Call: _e.mock.On("Name")} +} + +func (_c *LogPoller_Name_Call) Run(run func()) *LogPoller_Name_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *LogPoller_Name_Call) Return(_a0 string) *LogPoller_Name_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LogPoller_Name_Call) RunAndReturn(run func() string) *LogPoller_Name_Call { + _c.Call.Return(run) + return _c +} + // Ready provides a mock function with given fields: func (_m *LogPoller) Ready() error { ret := _m.Called() @@ -767,6 +1609,33 @@ func (_m *LogPoller) Ready() error { return r0 } +// LogPoller_Ready_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ready' +type LogPoller_Ready_Call struct { + *mock.Call +} + +// Ready is a helper method to define mock.On call +func (_e *LogPoller_Expecter) Ready() *LogPoller_Ready_Call { + return &LogPoller_Ready_Call{Call: _e.mock.On("Ready")} +} + +func (_c *LogPoller_Ready_Call) Run(run func()) *LogPoller_Ready_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *LogPoller_Ready_Call) Return(_a0 error) *LogPoller_Ready_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LogPoller_Ready_Call) RunAndReturn(run func() error) *LogPoller_Ready_Call { + _c.Call.Return(run) + return _c +} + // 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) @@ -785,6 +1654,35 @@ func (_m *LogPoller) RegisterFilter(ctx context.Context, filter logpoller.Filter return r0 } +// LogPoller_RegisterFilter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterFilter' +type LogPoller_RegisterFilter_Call struct { + *mock.Call +} + +// RegisterFilter is a helper method to define mock.On call +// - ctx context.Context +// - filter logpoller.Filter +func (_e *LogPoller_Expecter) RegisterFilter(ctx interface{}, filter interface{}) *LogPoller_RegisterFilter_Call { + return &LogPoller_RegisterFilter_Call{Call: _e.mock.On("RegisterFilter", ctx, filter)} +} + +func (_c *LogPoller_RegisterFilter_Call) Run(run func(ctx context.Context, filter logpoller.Filter)) *LogPoller_RegisterFilter_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(logpoller.Filter)) + }) + return _c +} + +func (_c *LogPoller_RegisterFilter_Call) Return(_a0 error) *LogPoller_RegisterFilter_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LogPoller_RegisterFilter_Call) RunAndReturn(run func(context.Context, logpoller.Filter) error) *LogPoller_RegisterFilter_Call { + _c.Call.Return(run) + return _c +} + // Replay provides a mock function with given fields: ctx, fromBlock func (_m *LogPoller) Replay(ctx context.Context, fromBlock int64) error { ret := _m.Called(ctx, fromBlock) @@ -803,11 +1701,68 @@ func (_m *LogPoller) Replay(ctx context.Context, fromBlock int64) error { return r0 } +// LogPoller_Replay_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Replay' +type LogPoller_Replay_Call struct { + *mock.Call +} + +// Replay is a helper method to define mock.On call +// - ctx context.Context +// - fromBlock int64 +func (_e *LogPoller_Expecter) Replay(ctx interface{}, fromBlock interface{}) *LogPoller_Replay_Call { + return &LogPoller_Replay_Call{Call: _e.mock.On("Replay", ctx, fromBlock)} +} + +func (_c *LogPoller_Replay_Call) Run(run func(ctx context.Context, fromBlock int64)) *LogPoller_Replay_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64)) + }) + return _c +} + +func (_c *LogPoller_Replay_Call) Return(_a0 error) *LogPoller_Replay_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LogPoller_Replay_Call) RunAndReturn(run func(context.Context, int64) error) *LogPoller_Replay_Call { + _c.Call.Return(run) + return _c +} + // ReplayAsync provides a mock function with given fields: fromBlock func (_m *LogPoller) ReplayAsync(fromBlock int64) { _m.Called(fromBlock) } +// LogPoller_ReplayAsync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReplayAsync' +type LogPoller_ReplayAsync_Call struct { + *mock.Call +} + +// ReplayAsync is a helper method to define mock.On call +// - fromBlock int64 +func (_e *LogPoller_Expecter) ReplayAsync(fromBlock interface{}) *LogPoller_ReplayAsync_Call { + return &LogPoller_ReplayAsync_Call{Call: _e.mock.On("ReplayAsync", fromBlock)} +} + +func (_c *LogPoller_ReplayAsync_Call) Run(run func(fromBlock int64)) *LogPoller_ReplayAsync_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64)) + }) + return _c +} + +func (_c *LogPoller_ReplayAsync_Call) Return() *LogPoller_ReplayAsync_Call { + _c.Call.Return() + return _c +} + +func (_c *LogPoller_ReplayAsync_Call) RunAndReturn(run func(int64)) *LogPoller_ReplayAsync_Call { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *LogPoller) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -826,6 +1781,34 @@ func (_m *LogPoller) Start(_a0 context.Context) error { return r0 } +// LogPoller_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type LogPoller_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *LogPoller_Expecter) Start(_a0 interface{}) *LogPoller_Start_Call { + return &LogPoller_Start_Call{Call: _e.mock.On("Start", _a0)} +} + +func (_c *LogPoller_Start_Call) Run(run func(_a0 context.Context)) *LogPoller_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *LogPoller_Start_Call) Return(_a0 error) *LogPoller_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LogPoller_Start_Call) RunAndReturn(run func(context.Context) error) *LogPoller_Start_Call { + _c.Call.Return(run) + return _c +} + // 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) @@ -844,6 +1827,35 @@ func (_m *LogPoller) UnregisterFilter(ctx context.Context, name string) error { return r0 } +// LogPoller_UnregisterFilter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnregisterFilter' +type LogPoller_UnregisterFilter_Call struct { + *mock.Call +} + +// UnregisterFilter is a helper method to define mock.On call +// - ctx context.Context +// - name string +func (_e *LogPoller_Expecter) UnregisterFilter(ctx interface{}, name interface{}) *LogPoller_UnregisterFilter_Call { + return &LogPoller_UnregisterFilter_Call{Call: _e.mock.On("UnregisterFilter", ctx, name)} +} + +func (_c *LogPoller_UnregisterFilter_Call) Run(run func(ctx context.Context, name string)) *LogPoller_UnregisterFilter_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *LogPoller_UnregisterFilter_Call) Return(_a0 error) *LogPoller_UnregisterFilter_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LogPoller_UnregisterFilter_Call) RunAndReturn(run func(context.Context, string) error) *LogPoller_UnregisterFilter_Call { + _c.Call.Return(run) + return _c +} + // NewLogPoller creates a new instance of LogPoller. 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 NewLogPoller(t interface { diff --git a/core/chains/evm/logpoller/orm.go b/core/chains/evm/logpoller/orm.go index b9a1ca39f4a..1d249760736 100644 --- a/core/chains/evm/logpoller/orm.go +++ b/core/chains/evm/logpoller/orm.go @@ -394,9 +394,6 @@ func (o *DSORM) insertLogsWithinTx(ctx context.Context, logs []Log, tx sqlutil.D ON CONFLICT DO NOTHING` _, err := o.ds.NamedExecContext(ctx, query, logs[start:end]) - if err != nil { - return err - } 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 diff --git a/core/chains/evm/mocks/balance_monitor.go b/core/chains/evm/mocks/balance_monitor.go index 7c55cd78ebd..a0e4e845343 100644 --- a/core/chains/evm/mocks/balance_monitor.go +++ b/core/chains/evm/mocks/balance_monitor.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -18,6 +18,14 @@ type BalanceMonitor struct { mock.Mock } +type BalanceMonitor_Expecter struct { + mock *mock.Mock +} + +func (_m *BalanceMonitor) EXPECT() *BalanceMonitor_Expecter { + return &BalanceMonitor_Expecter{mock: &_m.Mock} +} + // Close provides a mock function with given fields: func (_m *BalanceMonitor) Close() error { ret := _m.Called() @@ -36,6 +44,33 @@ func (_m *BalanceMonitor) Close() error { return r0 } +// BalanceMonitor_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type BalanceMonitor_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *BalanceMonitor_Expecter) Close() *BalanceMonitor_Close_Call { + return &BalanceMonitor_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *BalanceMonitor_Close_Call) Run(run func()) *BalanceMonitor_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BalanceMonitor_Close_Call) Return(_a0 error) *BalanceMonitor_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BalanceMonitor_Close_Call) RunAndReturn(run func() error) *BalanceMonitor_Close_Call { + _c.Call.Return(run) + return _c +} + // GetEthBalance provides a mock function with given fields: _a0 func (_m *BalanceMonitor) GetEthBalance(_a0 common.Address) *assets.Eth { ret := _m.Called(_a0) @@ -56,6 +91,34 @@ func (_m *BalanceMonitor) GetEthBalance(_a0 common.Address) *assets.Eth { return r0 } +// BalanceMonitor_GetEthBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEthBalance' +type BalanceMonitor_GetEthBalance_Call struct { + *mock.Call +} + +// GetEthBalance is a helper method to define mock.On call +// - _a0 common.Address +func (_e *BalanceMonitor_Expecter) GetEthBalance(_a0 interface{}) *BalanceMonitor_GetEthBalance_Call { + return &BalanceMonitor_GetEthBalance_Call{Call: _e.mock.On("GetEthBalance", _a0)} +} + +func (_c *BalanceMonitor_GetEthBalance_Call) Run(run func(_a0 common.Address)) *BalanceMonitor_GetEthBalance_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(common.Address)) + }) + return _c +} + +func (_c *BalanceMonitor_GetEthBalance_Call) Return(_a0 *assets.Eth) *BalanceMonitor_GetEthBalance_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BalanceMonitor_GetEthBalance_Call) RunAndReturn(run func(common.Address) *assets.Eth) *BalanceMonitor_GetEthBalance_Call { + _c.Call.Return(run) + return _c +} + // HealthReport provides a mock function with given fields: func (_m *BalanceMonitor) HealthReport() map[string]error { ret := _m.Called() @@ -76,6 +139,33 @@ func (_m *BalanceMonitor) HealthReport() map[string]error { return r0 } +// BalanceMonitor_HealthReport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HealthReport' +type BalanceMonitor_HealthReport_Call struct { + *mock.Call +} + +// HealthReport is a helper method to define mock.On call +func (_e *BalanceMonitor_Expecter) HealthReport() *BalanceMonitor_HealthReport_Call { + return &BalanceMonitor_HealthReport_Call{Call: _e.mock.On("HealthReport")} +} + +func (_c *BalanceMonitor_HealthReport_Call) Run(run func()) *BalanceMonitor_HealthReport_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BalanceMonitor_HealthReport_Call) Return(_a0 map[string]error) *BalanceMonitor_HealthReport_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BalanceMonitor_HealthReport_Call) RunAndReturn(run func() map[string]error) *BalanceMonitor_HealthReport_Call { + _c.Call.Return(run) + return _c +} + // Name provides a mock function with given fields: func (_m *BalanceMonitor) Name() string { ret := _m.Called() @@ -94,11 +184,67 @@ func (_m *BalanceMonitor) Name() string { return r0 } +// BalanceMonitor_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type BalanceMonitor_Name_Call struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *BalanceMonitor_Expecter) Name() *BalanceMonitor_Name_Call { + return &BalanceMonitor_Name_Call{Call: _e.mock.On("Name")} +} + +func (_c *BalanceMonitor_Name_Call) Run(run func()) *BalanceMonitor_Name_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BalanceMonitor_Name_Call) Return(_a0 string) *BalanceMonitor_Name_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BalanceMonitor_Name_Call) RunAndReturn(run func() string) *BalanceMonitor_Name_Call { + _c.Call.Return(run) + return _c +} + // OnNewLongestChain provides a mock function with given fields: ctx, head func (_m *BalanceMonitor) OnNewLongestChain(ctx context.Context, head *types.Head) { _m.Called(ctx, head) } +// BalanceMonitor_OnNewLongestChain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnNewLongestChain' +type BalanceMonitor_OnNewLongestChain_Call struct { + *mock.Call +} + +// OnNewLongestChain is a helper method to define mock.On call +// - ctx context.Context +// - head *types.Head +func (_e *BalanceMonitor_Expecter) OnNewLongestChain(ctx interface{}, head interface{}) *BalanceMonitor_OnNewLongestChain_Call { + return &BalanceMonitor_OnNewLongestChain_Call{Call: _e.mock.On("OnNewLongestChain", ctx, head)} +} + +func (_c *BalanceMonitor_OnNewLongestChain_Call) Run(run func(ctx context.Context, head *types.Head)) *BalanceMonitor_OnNewLongestChain_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.Head)) + }) + return _c +} + +func (_c *BalanceMonitor_OnNewLongestChain_Call) Return() *BalanceMonitor_OnNewLongestChain_Call { + _c.Call.Return() + return _c +} + +func (_c *BalanceMonitor_OnNewLongestChain_Call) RunAndReturn(run func(context.Context, *types.Head)) *BalanceMonitor_OnNewLongestChain_Call { + _c.Call.Return(run) + return _c +} + // Ready provides a mock function with given fields: func (_m *BalanceMonitor) Ready() error { ret := _m.Called() @@ -117,6 +263,33 @@ func (_m *BalanceMonitor) Ready() error { return r0 } +// BalanceMonitor_Ready_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ready' +type BalanceMonitor_Ready_Call struct { + *mock.Call +} + +// Ready is a helper method to define mock.On call +func (_e *BalanceMonitor_Expecter) Ready() *BalanceMonitor_Ready_Call { + return &BalanceMonitor_Ready_Call{Call: _e.mock.On("Ready")} +} + +func (_c *BalanceMonitor_Ready_Call) Run(run func()) *BalanceMonitor_Ready_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BalanceMonitor_Ready_Call) Return(_a0 error) *BalanceMonitor_Ready_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BalanceMonitor_Ready_Call) RunAndReturn(run func() error) *BalanceMonitor_Ready_Call { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *BalanceMonitor) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -135,6 +308,34 @@ func (_m *BalanceMonitor) Start(_a0 context.Context) error { return r0 } +// BalanceMonitor_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type BalanceMonitor_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *BalanceMonitor_Expecter) Start(_a0 interface{}) *BalanceMonitor_Start_Call { + return &BalanceMonitor_Start_Call{Call: _e.mock.On("Start", _a0)} +} + +func (_c *BalanceMonitor_Start_Call) Run(run func(_a0 context.Context)) *BalanceMonitor_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *BalanceMonitor_Start_Call) Return(_a0 error) *BalanceMonitor_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BalanceMonitor_Start_Call) RunAndReturn(run func(context.Context) error) *BalanceMonitor_Start_Call { + _c.Call.Return(run) + return _c +} + // NewBalanceMonitor creates a new instance of BalanceMonitor. 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 NewBalanceMonitor(t interface { diff --git a/core/chains/evm/monitor/balance.go b/core/chains/evm/monitor/balance.go index 5ef41b63be1..b8194a38af9 100644 --- a/core/chains/evm/monitor/balance.go +++ b/core/chains/evm/monitor/balance.go @@ -24,7 +24,6 @@ import ( evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" ) -//go:generate mockery --quiet --name BalanceMonitor --output ../mocks/ --case=underscore type ( // BalanceMonitor checks the balance for each key on every new head BalanceMonitor interface { diff --git a/core/chains/evm/txmgr/config.go b/core/chains/evm/txmgr/config.go index c34de17369e..b53f99840b9 100644 --- a/core/chains/evm/txmgr/config.go +++ b/core/chains/evm/txmgr/config.go @@ -12,8 +12,6 @@ import ( // ChainConfig encompasses config used by txmgr package // Unless otherwise specified, these should support changing at runtime -// -//go:generate mockery --quiet --recursive --name ChainConfig --output ./mocks/ --case=underscore --structname Config --filename config.go type ChainConfig interface { ChainType() chaintype.ChainType FinalityDepth() uint32 diff --git a/core/chains/evm/txmgr/evm_tx_store.go b/core/chains/evm/txmgr/evm_tx_store.go index fd38eb7a8c9..e83a83907e4 100644 --- a/core/chains/evm/txmgr/evm_tx_store.go +++ b/core/chains/evm/txmgr/evm_tx_store.go @@ -40,8 +40,6 @@ var ( ) // EvmTxStore combines the txmgr tx store interface and the interface needed for the API to read from the tx DB -// -//go:generate mockery --quiet --name EvmTxStore --output ./mocks/ --case=underscore type EvmTxStore interface { // redeclare TxStore for mockery txmgrtypes.TxStore[common.Address, *big.Int, common.Hash, common.Hash, *evmtypes.Receipt, evmtypes.Nonce, gas.EvmFee] @@ -1706,9 +1704,7 @@ func (o *evmTxStore) UpdateTxUnstartedToInProgress(ctx context.Context, etx *Tx, pqErr.ConstraintName == "eth_tx_attempts_eth_tx_id_fkey" { return txmgr.ErrTxRemoved } - if err != nil { - return pkgerrors.Wrap(err, "UpdateTxUnstartedToInProgress failed to create eth_tx_attempt") - } + return pkgerrors.Wrap(err, "UpdateTxUnstartedToInProgress failed to create eth_tx_attempt") } dbAttempt.ToTxAttempt(attempt) var dbEtx DbEthTx diff --git a/core/chains/evm/txmgr/mocks/config.go b/core/chains/evm/txmgr/mocks/config.go index 5ec00e960ab..887bd175469 100644 --- a/core/chains/evm/txmgr/mocks/config.go +++ b/core/chains/evm/txmgr/mocks/config.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -12,6 +12,14 @@ type Config struct { mock.Mock } +type Config_Expecter struct { + mock *mock.Mock +} + +func (_m *Config) EXPECT() *Config_Expecter { + return &Config_Expecter{mock: &_m.Mock} +} + // ChainType provides a mock function with given fields: func (_m *Config) ChainType() chaintype.ChainType { ret := _m.Called() @@ -30,6 +38,33 @@ func (_m *Config) ChainType() chaintype.ChainType { return r0 } +// Config_ChainType_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChainType' +type Config_ChainType_Call struct { + *mock.Call +} + +// ChainType is a helper method to define mock.On call +func (_e *Config_Expecter) ChainType() *Config_ChainType_Call { + return &Config_ChainType_Call{Call: _e.mock.On("ChainType")} +} + +func (_c *Config_ChainType_Call) Run(run func()) *Config_ChainType_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Config_ChainType_Call) Return(_a0 chaintype.ChainType) *Config_ChainType_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Config_ChainType_Call) RunAndReturn(run func() chaintype.ChainType) *Config_ChainType_Call { + _c.Call.Return(run) + return _c +} + // FinalityDepth provides a mock function with given fields: func (_m *Config) FinalityDepth() uint32 { ret := _m.Called() @@ -48,6 +83,33 @@ func (_m *Config) FinalityDepth() uint32 { return r0 } +// Config_FinalityDepth_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FinalityDepth' +type Config_FinalityDepth_Call struct { + *mock.Call +} + +// FinalityDepth is a helper method to define mock.On call +func (_e *Config_Expecter) FinalityDepth() *Config_FinalityDepth_Call { + return &Config_FinalityDepth_Call{Call: _e.mock.On("FinalityDepth")} +} + +func (_c *Config_FinalityDepth_Call) Run(run func()) *Config_FinalityDepth_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Config_FinalityDepth_Call) Return(_a0 uint32) *Config_FinalityDepth_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Config_FinalityDepth_Call) RunAndReturn(run func() uint32) *Config_FinalityDepth_Call { + _c.Call.Return(run) + return _c +} + // FinalityTagEnabled provides a mock function with given fields: func (_m *Config) FinalityTagEnabled() bool { ret := _m.Called() @@ -66,6 +128,33 @@ func (_m *Config) FinalityTagEnabled() bool { return r0 } +// Config_FinalityTagEnabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FinalityTagEnabled' +type Config_FinalityTagEnabled_Call struct { + *mock.Call +} + +// FinalityTagEnabled is a helper method to define mock.On call +func (_e *Config_Expecter) FinalityTagEnabled() *Config_FinalityTagEnabled_Call { + return &Config_FinalityTagEnabled_Call{Call: _e.mock.On("FinalityTagEnabled")} +} + +func (_c *Config_FinalityTagEnabled_Call) Run(run func()) *Config_FinalityTagEnabled_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Config_FinalityTagEnabled_Call) Return(_a0 bool) *Config_FinalityTagEnabled_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Config_FinalityTagEnabled_Call) RunAndReturn(run func() bool) *Config_FinalityTagEnabled_Call { + _c.Call.Return(run) + return _c +} + // NonceAutoSync provides a mock function with given fields: func (_m *Config) NonceAutoSync() bool { ret := _m.Called() @@ -84,6 +173,33 @@ func (_m *Config) NonceAutoSync() bool { return r0 } +// Config_NonceAutoSync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NonceAutoSync' +type Config_NonceAutoSync_Call struct { + *mock.Call +} + +// NonceAutoSync is a helper method to define mock.On call +func (_e *Config_Expecter) NonceAutoSync() *Config_NonceAutoSync_Call { + return &Config_NonceAutoSync_Call{Call: _e.mock.On("NonceAutoSync")} +} + +func (_c *Config_NonceAutoSync_Call) Run(run func()) *Config_NonceAutoSync_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Config_NonceAutoSync_Call) Return(_a0 bool) *Config_NonceAutoSync_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Config_NonceAutoSync_Call) RunAndReturn(run func() bool) *Config_NonceAutoSync_Call { + _c.Call.Return(run) + return _c +} + // RPCDefaultBatchSize provides a mock function with given fields: func (_m *Config) RPCDefaultBatchSize() uint32 { ret := _m.Called() @@ -102,6 +218,33 @@ func (_m *Config) RPCDefaultBatchSize() uint32 { return r0 } +// Config_RPCDefaultBatchSize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RPCDefaultBatchSize' +type Config_RPCDefaultBatchSize_Call struct { + *mock.Call +} + +// RPCDefaultBatchSize is a helper method to define mock.On call +func (_e *Config_Expecter) RPCDefaultBatchSize() *Config_RPCDefaultBatchSize_Call { + return &Config_RPCDefaultBatchSize_Call{Call: _e.mock.On("RPCDefaultBatchSize")} +} + +func (_c *Config_RPCDefaultBatchSize_Call) Run(run func()) *Config_RPCDefaultBatchSize_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Config_RPCDefaultBatchSize_Call) Return(_a0 uint32) *Config_RPCDefaultBatchSize_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Config_RPCDefaultBatchSize_Call) RunAndReturn(run func() uint32) *Config_RPCDefaultBatchSize_Call { + _c.Call.Return(run) + return _c +} + // 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/txmgr/mocks/evm_tx_store.go b/core/chains/evm/txmgr/mocks/evm_tx_store.go index 465681247e2..b28e55ec324 100644 --- a/core/chains/evm/txmgr/mocks/evm_tx_store.go +++ b/core/chains/evm/txmgr/mocks/evm_tx_store.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -28,6 +28,14 @@ type EvmTxStore struct { mock.Mock } +type EvmTxStore_Expecter struct { + mock *mock.Mock +} + +func (_m *EvmTxStore) EXPECT() *EvmTxStore_Expecter { + return &EvmTxStore_Expecter{mock: &_m.Mock} +} + // Abandon provides a mock function with given fields: ctx, id, addr func (_m *EvmTxStore) Abandon(ctx context.Context, id *big.Int, addr common.Address) error { ret := _m.Called(ctx, id, addr) @@ -46,6 +54,36 @@ func (_m *EvmTxStore) Abandon(ctx context.Context, id *big.Int, addr common.Addr return r0 } +// EvmTxStore_Abandon_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Abandon' +type EvmTxStore_Abandon_Call struct { + *mock.Call +} + +// Abandon is a helper method to define mock.On call +// - ctx context.Context +// - id *big.Int +// - addr common.Address +func (_e *EvmTxStore_Expecter) Abandon(ctx interface{}, id interface{}, addr interface{}) *EvmTxStore_Abandon_Call { + return &EvmTxStore_Abandon_Call{Call: _e.mock.On("Abandon", ctx, id, addr)} +} + +func (_c *EvmTxStore_Abandon_Call) Run(run func(ctx context.Context, id *big.Int, addr common.Address)) *EvmTxStore_Abandon_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*big.Int), args[2].(common.Address)) + }) + return _c +} + +func (_c *EvmTxStore_Abandon_Call) Return(_a0 error) *EvmTxStore_Abandon_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvmTxStore_Abandon_Call) RunAndReturn(run func(context.Context, *big.Int, common.Address) error) *EvmTxStore_Abandon_Call { + _c.Call.Return(run) + return _c +} + // CheckTxQueueCapacity provides a mock function with given fields: ctx, fromAddress, maxQueuedTransactions, chainID func (_m *EvmTxStore) CheckTxQueueCapacity(ctx context.Context, fromAddress common.Address, maxQueuedTransactions uint64, chainID *big.Int) error { ret := _m.Called(ctx, fromAddress, maxQueuedTransactions, chainID) @@ -64,11 +102,69 @@ func (_m *EvmTxStore) CheckTxQueueCapacity(ctx context.Context, fromAddress comm return r0 } +// EvmTxStore_CheckTxQueueCapacity_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckTxQueueCapacity' +type EvmTxStore_CheckTxQueueCapacity_Call struct { + *mock.Call +} + +// CheckTxQueueCapacity is a helper method to define mock.On call +// - ctx context.Context +// - fromAddress common.Address +// - maxQueuedTransactions uint64 +// - chainID *big.Int +func (_e *EvmTxStore_Expecter) CheckTxQueueCapacity(ctx interface{}, fromAddress interface{}, maxQueuedTransactions interface{}, chainID interface{}) *EvmTxStore_CheckTxQueueCapacity_Call { + return &EvmTxStore_CheckTxQueueCapacity_Call{Call: _e.mock.On("CheckTxQueueCapacity", ctx, fromAddress, maxQueuedTransactions, chainID)} +} + +func (_c *EvmTxStore_CheckTxQueueCapacity_Call) Run(run func(ctx context.Context, fromAddress common.Address, maxQueuedTransactions uint64, chainID *big.Int)) *EvmTxStore_CheckTxQueueCapacity_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(uint64), args[3].(*big.Int)) + }) + return _c +} + +func (_c *EvmTxStore_CheckTxQueueCapacity_Call) Return(err error) *EvmTxStore_CheckTxQueueCapacity_Call { + _c.Call.Return(err) + return _c +} + +func (_c *EvmTxStore_CheckTxQueueCapacity_Call) RunAndReturn(run func(context.Context, common.Address, uint64, *big.Int) error) *EvmTxStore_CheckTxQueueCapacity_Call { + _c.Call.Return(run) + return _c +} + // Close provides a mock function with given fields: func (_m *EvmTxStore) Close() { _m.Called() } +// EvmTxStore_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type EvmTxStore_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *EvmTxStore_Expecter) Close() *EvmTxStore_Close_Call { + return &EvmTxStore_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *EvmTxStore_Close_Call) Run(run func()) *EvmTxStore_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *EvmTxStore_Close_Call) Return() *EvmTxStore_Close_Call { + _c.Call.Return() + return _c +} + +func (_c *EvmTxStore_Close_Call) RunAndReturn(run func()) *EvmTxStore_Close_Call { + _c.Call.Return(run) + return _c +} + // CountTransactionsByState provides a mock function with given fields: ctx, state, chainID func (_m *EvmTxStore) CountTransactionsByState(ctx context.Context, state types.TxState, chainID *big.Int) (uint32, error) { ret := _m.Called(ctx, state, chainID) @@ -97,6 +193,36 @@ func (_m *EvmTxStore) CountTransactionsByState(ctx context.Context, state types. return r0, r1 } +// EvmTxStore_CountTransactionsByState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CountTransactionsByState' +type EvmTxStore_CountTransactionsByState_Call struct { + *mock.Call +} + +// CountTransactionsByState is a helper method to define mock.On call +// - ctx context.Context +// - state types.TxState +// - chainID *big.Int +func (_e *EvmTxStore_Expecter) CountTransactionsByState(ctx interface{}, state interface{}, chainID interface{}) *EvmTxStore_CountTransactionsByState_Call { + return &EvmTxStore_CountTransactionsByState_Call{Call: _e.mock.On("CountTransactionsByState", ctx, state, chainID)} +} + +func (_c *EvmTxStore_CountTransactionsByState_Call) Run(run func(ctx context.Context, state types.TxState, chainID *big.Int)) *EvmTxStore_CountTransactionsByState_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.TxState), args[2].(*big.Int)) + }) + return _c +} + +func (_c *EvmTxStore_CountTransactionsByState_Call) Return(count uint32, err error) *EvmTxStore_CountTransactionsByState_Call { + _c.Call.Return(count, err) + return _c +} + +func (_c *EvmTxStore_CountTransactionsByState_Call) RunAndReturn(run func(context.Context, types.TxState, *big.Int) (uint32, error)) *EvmTxStore_CountTransactionsByState_Call { + _c.Call.Return(run) + return _c +} + // CountUnconfirmedTransactions provides a mock function with given fields: ctx, fromAddress, chainID func (_m *EvmTxStore) CountUnconfirmedTransactions(ctx context.Context, fromAddress common.Address, chainID *big.Int) (uint32, error) { ret := _m.Called(ctx, fromAddress, chainID) @@ -125,6 +251,36 @@ func (_m *EvmTxStore) CountUnconfirmedTransactions(ctx context.Context, fromAddr return r0, r1 } +// EvmTxStore_CountUnconfirmedTransactions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CountUnconfirmedTransactions' +type EvmTxStore_CountUnconfirmedTransactions_Call struct { + *mock.Call +} + +// CountUnconfirmedTransactions is a helper method to define mock.On call +// - ctx context.Context +// - fromAddress common.Address +// - chainID *big.Int +func (_e *EvmTxStore_Expecter) CountUnconfirmedTransactions(ctx interface{}, fromAddress interface{}, chainID interface{}) *EvmTxStore_CountUnconfirmedTransactions_Call { + return &EvmTxStore_CountUnconfirmedTransactions_Call{Call: _e.mock.On("CountUnconfirmedTransactions", ctx, fromAddress, chainID)} +} + +func (_c *EvmTxStore_CountUnconfirmedTransactions_Call) Run(run func(ctx context.Context, fromAddress common.Address, chainID *big.Int)) *EvmTxStore_CountUnconfirmedTransactions_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(*big.Int)) + }) + return _c +} + +func (_c *EvmTxStore_CountUnconfirmedTransactions_Call) Return(count uint32, err error) *EvmTxStore_CountUnconfirmedTransactions_Call { + _c.Call.Return(count, err) + return _c +} + +func (_c *EvmTxStore_CountUnconfirmedTransactions_Call) RunAndReturn(run func(context.Context, common.Address, *big.Int) (uint32, error)) *EvmTxStore_CountUnconfirmedTransactions_Call { + _c.Call.Return(run) + return _c +} + // CountUnstartedTransactions provides a mock function with given fields: ctx, fromAddress, chainID func (_m *EvmTxStore) CountUnstartedTransactions(ctx context.Context, fromAddress common.Address, chainID *big.Int) (uint32, error) { ret := _m.Called(ctx, fromAddress, chainID) @@ -153,6 +309,36 @@ func (_m *EvmTxStore) CountUnstartedTransactions(ctx context.Context, fromAddres return r0, r1 } +// EvmTxStore_CountUnstartedTransactions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CountUnstartedTransactions' +type EvmTxStore_CountUnstartedTransactions_Call struct { + *mock.Call +} + +// CountUnstartedTransactions is a helper method to define mock.On call +// - ctx context.Context +// - fromAddress common.Address +// - chainID *big.Int +func (_e *EvmTxStore_Expecter) CountUnstartedTransactions(ctx interface{}, fromAddress interface{}, chainID interface{}) *EvmTxStore_CountUnstartedTransactions_Call { + return &EvmTxStore_CountUnstartedTransactions_Call{Call: _e.mock.On("CountUnstartedTransactions", ctx, fromAddress, chainID)} +} + +func (_c *EvmTxStore_CountUnstartedTransactions_Call) Run(run func(ctx context.Context, fromAddress common.Address, chainID *big.Int)) *EvmTxStore_CountUnstartedTransactions_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(*big.Int)) + }) + return _c +} + +func (_c *EvmTxStore_CountUnstartedTransactions_Call) Return(count uint32, err error) *EvmTxStore_CountUnstartedTransactions_Call { + _c.Call.Return(count, err) + return _c +} + +func (_c *EvmTxStore_CountUnstartedTransactions_Call) RunAndReturn(run func(context.Context, common.Address, *big.Int) (uint32, error)) *EvmTxStore_CountUnstartedTransactions_Call { + _c.Call.Return(run) + return _c +} + // CreateTransaction provides a mock function with given fields: ctx, txRequest, chainID func (_m *EvmTxStore) CreateTransaction(ctx context.Context, txRequest types.TxRequest[common.Address, common.Hash], chainID *big.Int) (types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error) { ret := _m.Called(ctx, txRequest, chainID) @@ -181,6 +367,36 @@ func (_m *EvmTxStore) CreateTransaction(ctx context.Context, txRequest types.TxR return r0, r1 } +// EvmTxStore_CreateTransaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateTransaction' +type EvmTxStore_CreateTransaction_Call struct { + *mock.Call +} + +// CreateTransaction is a helper method to define mock.On call +// - ctx context.Context +// - txRequest types.TxRequest[common.Address,common.Hash] +// - chainID *big.Int +func (_e *EvmTxStore_Expecter) CreateTransaction(ctx interface{}, txRequest interface{}, chainID interface{}) *EvmTxStore_CreateTransaction_Call { + return &EvmTxStore_CreateTransaction_Call{Call: _e.mock.On("CreateTransaction", ctx, txRequest, chainID)} +} + +func (_c *EvmTxStore_CreateTransaction_Call) Run(run func(ctx context.Context, txRequest types.TxRequest[common.Address, common.Hash], chainID *big.Int)) *EvmTxStore_CreateTransaction_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.TxRequest[common.Address, common.Hash]), args[2].(*big.Int)) + }) + return _c +} + +func (_c *EvmTxStore_CreateTransaction_Call) Return(tx types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], err error) *EvmTxStore_CreateTransaction_Call { + _c.Call.Return(tx, err) + return _c +} + +func (_c *EvmTxStore_CreateTransaction_Call) RunAndReturn(run func(context.Context, types.TxRequest[common.Address, common.Hash], *big.Int) (types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)) *EvmTxStore_CreateTransaction_Call { + _c.Call.Return(run) + return _c +} + // DeleteInProgressAttempt provides a mock function with given fields: ctx, attempt func (_m *EvmTxStore) DeleteInProgressAttempt(ctx context.Context, attempt types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]) error { ret := _m.Called(ctx, attempt) @@ -199,6 +415,35 @@ func (_m *EvmTxStore) DeleteInProgressAttempt(ctx context.Context, attempt types return r0 } +// EvmTxStore_DeleteInProgressAttempt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteInProgressAttempt' +type EvmTxStore_DeleteInProgressAttempt_Call struct { + *mock.Call +} + +// DeleteInProgressAttempt is a helper method to define mock.On call +// - ctx context.Context +// - attempt types.TxAttempt[*big.Int,common.Address,common.Hash,common.Hash,evmtypes.Nonce,gas.EvmFee] +func (_e *EvmTxStore_Expecter) DeleteInProgressAttempt(ctx interface{}, attempt interface{}) *EvmTxStore_DeleteInProgressAttempt_Call { + return &EvmTxStore_DeleteInProgressAttempt_Call{Call: _e.mock.On("DeleteInProgressAttempt", ctx, attempt)} +} + +func (_c *EvmTxStore_DeleteInProgressAttempt_Call) Run(run func(ctx context.Context, attempt types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee])) *EvmTxStore_DeleteInProgressAttempt_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee])) + }) + return _c +} + +func (_c *EvmTxStore_DeleteInProgressAttempt_Call) Return(_a0 error) *EvmTxStore_DeleteInProgressAttempt_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvmTxStore_DeleteInProgressAttempt_Call) RunAndReturn(run func(context.Context, types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]) error) *EvmTxStore_DeleteInProgressAttempt_Call { + _c.Call.Return(run) + return _c +} + // FindEarliestUnconfirmedBroadcastTime provides a mock function with given fields: ctx, chainID func (_m *EvmTxStore) FindEarliestUnconfirmedBroadcastTime(ctx context.Context, chainID *big.Int) (null.Time, error) { ret := _m.Called(ctx, chainID) @@ -227,6 +472,35 @@ func (_m *EvmTxStore) FindEarliestUnconfirmedBroadcastTime(ctx context.Context, return r0, r1 } +// EvmTxStore_FindEarliestUnconfirmedBroadcastTime_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindEarliestUnconfirmedBroadcastTime' +type EvmTxStore_FindEarliestUnconfirmedBroadcastTime_Call struct { + *mock.Call +} + +// FindEarliestUnconfirmedBroadcastTime is a helper method to define mock.On call +// - ctx context.Context +// - chainID *big.Int +func (_e *EvmTxStore_Expecter) FindEarliestUnconfirmedBroadcastTime(ctx interface{}, chainID interface{}) *EvmTxStore_FindEarliestUnconfirmedBroadcastTime_Call { + return &EvmTxStore_FindEarliestUnconfirmedBroadcastTime_Call{Call: _e.mock.On("FindEarliestUnconfirmedBroadcastTime", ctx, chainID)} +} + +func (_c *EvmTxStore_FindEarliestUnconfirmedBroadcastTime_Call) Run(run func(ctx context.Context, chainID *big.Int)) *EvmTxStore_FindEarliestUnconfirmedBroadcastTime_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*big.Int)) + }) + return _c +} + +func (_c *EvmTxStore_FindEarliestUnconfirmedBroadcastTime_Call) Return(_a0 null.Time, _a1 error) *EvmTxStore_FindEarliestUnconfirmedBroadcastTime_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EvmTxStore_FindEarliestUnconfirmedBroadcastTime_Call) RunAndReturn(run func(context.Context, *big.Int) (null.Time, error)) *EvmTxStore_FindEarliestUnconfirmedBroadcastTime_Call { + _c.Call.Return(run) + return _c +} + // FindEarliestUnconfirmedTxAttemptBlock provides a mock function with given fields: ctx, chainID func (_m *EvmTxStore) FindEarliestUnconfirmedTxAttemptBlock(ctx context.Context, chainID *big.Int) (null.Int, error) { ret := _m.Called(ctx, chainID) @@ -255,6 +529,35 @@ func (_m *EvmTxStore) FindEarliestUnconfirmedTxAttemptBlock(ctx context.Context, return r0, r1 } +// EvmTxStore_FindEarliestUnconfirmedTxAttemptBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindEarliestUnconfirmedTxAttemptBlock' +type EvmTxStore_FindEarliestUnconfirmedTxAttemptBlock_Call struct { + *mock.Call +} + +// FindEarliestUnconfirmedTxAttemptBlock is a helper method to define mock.On call +// - ctx context.Context +// - chainID *big.Int +func (_e *EvmTxStore_Expecter) FindEarliestUnconfirmedTxAttemptBlock(ctx interface{}, chainID interface{}) *EvmTxStore_FindEarliestUnconfirmedTxAttemptBlock_Call { + return &EvmTxStore_FindEarliestUnconfirmedTxAttemptBlock_Call{Call: _e.mock.On("FindEarliestUnconfirmedTxAttemptBlock", ctx, chainID)} +} + +func (_c *EvmTxStore_FindEarliestUnconfirmedTxAttemptBlock_Call) Run(run func(ctx context.Context, chainID *big.Int)) *EvmTxStore_FindEarliestUnconfirmedTxAttemptBlock_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*big.Int)) + }) + return _c +} + +func (_c *EvmTxStore_FindEarliestUnconfirmedTxAttemptBlock_Call) Return(_a0 null.Int, _a1 error) *EvmTxStore_FindEarliestUnconfirmedTxAttemptBlock_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EvmTxStore_FindEarliestUnconfirmedTxAttemptBlock_Call) RunAndReturn(run func(context.Context, *big.Int) (null.Int, error)) *EvmTxStore_FindEarliestUnconfirmedTxAttemptBlock_Call { + _c.Call.Return(run) + return _c +} + // FindLatestSequence provides a mock function with given fields: ctx, fromAddress, chainId func (_m *EvmTxStore) FindLatestSequence(ctx context.Context, fromAddress common.Address, chainId *big.Int) (evmtypes.Nonce, error) { ret := _m.Called(ctx, fromAddress, chainId) @@ -283,6 +586,36 @@ func (_m *EvmTxStore) FindLatestSequence(ctx context.Context, fromAddress common return r0, r1 } +// EvmTxStore_FindLatestSequence_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindLatestSequence' +type EvmTxStore_FindLatestSequence_Call struct { + *mock.Call +} + +// FindLatestSequence is a helper method to define mock.On call +// - ctx context.Context +// - fromAddress common.Address +// - chainId *big.Int +func (_e *EvmTxStore_Expecter) FindLatestSequence(ctx interface{}, fromAddress interface{}, chainId interface{}) *EvmTxStore_FindLatestSequence_Call { + return &EvmTxStore_FindLatestSequence_Call{Call: _e.mock.On("FindLatestSequence", ctx, fromAddress, chainId)} +} + +func (_c *EvmTxStore_FindLatestSequence_Call) Run(run func(ctx context.Context, fromAddress common.Address, chainId *big.Int)) *EvmTxStore_FindLatestSequence_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(*big.Int)) + }) + return _c +} + +func (_c *EvmTxStore_FindLatestSequence_Call) Return(_a0 evmtypes.Nonce, _a1 error) *EvmTxStore_FindLatestSequence_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EvmTxStore_FindLatestSequence_Call) RunAndReturn(run func(context.Context, common.Address, *big.Int) (evmtypes.Nonce, error)) *EvmTxStore_FindLatestSequence_Call { + _c.Call.Return(run) + return _c +} + // FindNextUnstartedTransactionFromAddress provides a mock function with given fields: ctx, fromAddress, chainID func (_m *EvmTxStore) FindNextUnstartedTransactionFromAddress(ctx context.Context, fromAddress common.Address, chainID *big.Int) (*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error) { ret := _m.Called(ctx, fromAddress, chainID) @@ -313,6 +646,36 @@ func (_m *EvmTxStore) FindNextUnstartedTransactionFromAddress(ctx context.Contex return r0, r1 } +// EvmTxStore_FindNextUnstartedTransactionFromAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindNextUnstartedTransactionFromAddress' +type EvmTxStore_FindNextUnstartedTransactionFromAddress_Call struct { + *mock.Call +} + +// FindNextUnstartedTransactionFromAddress is a helper method to define mock.On call +// - ctx context.Context +// - fromAddress common.Address +// - chainID *big.Int +func (_e *EvmTxStore_Expecter) FindNextUnstartedTransactionFromAddress(ctx interface{}, fromAddress interface{}, chainID interface{}) *EvmTxStore_FindNextUnstartedTransactionFromAddress_Call { + return &EvmTxStore_FindNextUnstartedTransactionFromAddress_Call{Call: _e.mock.On("FindNextUnstartedTransactionFromAddress", ctx, fromAddress, chainID)} +} + +func (_c *EvmTxStore_FindNextUnstartedTransactionFromAddress_Call) Run(run func(ctx context.Context, fromAddress common.Address, chainID *big.Int)) *EvmTxStore_FindNextUnstartedTransactionFromAddress_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(*big.Int)) + }) + return _c +} + +func (_c *EvmTxStore_FindNextUnstartedTransactionFromAddress_Call) Return(_a0 *types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], _a1 error) *EvmTxStore_FindNextUnstartedTransactionFromAddress_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EvmTxStore_FindNextUnstartedTransactionFromAddress_Call) RunAndReturn(run func(context.Context, common.Address, *big.Int) (*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)) *EvmTxStore_FindNextUnstartedTransactionFromAddress_Call { + _c.Call.Return(run) + return _c +} + // FindTransactionsConfirmedInBlockRange provides a mock function with given fields: ctx, highBlockNumber, lowBlockNumber, chainID func (_m *EvmTxStore) FindTransactionsConfirmedInBlockRange(ctx context.Context, highBlockNumber int64, lowBlockNumber int64, chainID *big.Int) ([]*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error) { ret := _m.Called(ctx, highBlockNumber, lowBlockNumber, chainID) @@ -343,6 +706,37 @@ func (_m *EvmTxStore) FindTransactionsConfirmedInBlockRange(ctx context.Context, return r0, r1 } +// EvmTxStore_FindTransactionsConfirmedInBlockRange_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTransactionsConfirmedInBlockRange' +type EvmTxStore_FindTransactionsConfirmedInBlockRange_Call struct { + *mock.Call +} + +// FindTransactionsConfirmedInBlockRange is a helper method to define mock.On call +// - ctx context.Context +// - highBlockNumber int64 +// - lowBlockNumber int64 +// - chainID *big.Int +func (_e *EvmTxStore_Expecter) FindTransactionsConfirmedInBlockRange(ctx interface{}, highBlockNumber interface{}, lowBlockNumber interface{}, chainID interface{}) *EvmTxStore_FindTransactionsConfirmedInBlockRange_Call { + return &EvmTxStore_FindTransactionsConfirmedInBlockRange_Call{Call: _e.mock.On("FindTransactionsConfirmedInBlockRange", ctx, highBlockNumber, lowBlockNumber, chainID)} +} + +func (_c *EvmTxStore_FindTransactionsConfirmedInBlockRange_Call) Run(run func(ctx context.Context, highBlockNumber int64, lowBlockNumber int64, chainID *big.Int)) *EvmTxStore_FindTransactionsConfirmedInBlockRange_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64), args[2].(int64), args[3].(*big.Int)) + }) + return _c +} + +func (_c *EvmTxStore_FindTransactionsConfirmedInBlockRange_Call) Return(etxs []*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], err error) *EvmTxStore_FindTransactionsConfirmedInBlockRange_Call { + _c.Call.Return(etxs, err) + return _c +} + +func (_c *EvmTxStore_FindTransactionsConfirmedInBlockRange_Call) RunAndReturn(run func(context.Context, int64, int64, *big.Int) ([]*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)) *EvmTxStore_FindTransactionsConfirmedInBlockRange_Call { + _c.Call.Return(run) + return _c +} + // FindTxAttempt provides a mock function with given fields: ctx, hash func (_m *EvmTxStore) FindTxAttempt(ctx context.Context, hash common.Hash) (*types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error) { ret := _m.Called(ctx, hash) @@ -373,6 +767,35 @@ func (_m *EvmTxStore) FindTxAttempt(ctx context.Context, hash common.Hash) (*typ return r0, r1 } +// EvmTxStore_FindTxAttempt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxAttempt' +type EvmTxStore_FindTxAttempt_Call struct { + *mock.Call +} + +// FindTxAttempt is a helper method to define mock.On call +// - ctx context.Context +// - hash common.Hash +func (_e *EvmTxStore_Expecter) FindTxAttempt(ctx interface{}, hash interface{}) *EvmTxStore_FindTxAttempt_Call { + return &EvmTxStore_FindTxAttempt_Call{Call: _e.mock.On("FindTxAttempt", ctx, hash)} +} + +func (_c *EvmTxStore_FindTxAttempt_Call) Run(run func(ctx context.Context, hash common.Hash)) *EvmTxStore_FindTxAttempt_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Hash)) + }) + return _c +} + +func (_c *EvmTxStore_FindTxAttempt_Call) Return(_a0 *types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], _a1 error) *EvmTxStore_FindTxAttempt_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EvmTxStore_FindTxAttempt_Call) RunAndReturn(run func(context.Context, common.Hash) (*types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)) *EvmTxStore_FindTxAttempt_Call { + _c.Call.Return(run) + return _c +} + // FindTxAttemptConfirmedByTxIDs provides a mock function with given fields: ctx, ids func (_m *EvmTxStore) FindTxAttemptConfirmedByTxIDs(ctx context.Context, ids []int64) ([]types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error) { ret := _m.Called(ctx, ids) @@ -403,6 +826,35 @@ func (_m *EvmTxStore) FindTxAttemptConfirmedByTxIDs(ctx context.Context, ids []i return r0, r1 } +// EvmTxStore_FindTxAttemptConfirmedByTxIDs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxAttemptConfirmedByTxIDs' +type EvmTxStore_FindTxAttemptConfirmedByTxIDs_Call struct { + *mock.Call +} + +// FindTxAttemptConfirmedByTxIDs is a helper method to define mock.On call +// - ctx context.Context +// - ids []int64 +func (_e *EvmTxStore_Expecter) FindTxAttemptConfirmedByTxIDs(ctx interface{}, ids interface{}) *EvmTxStore_FindTxAttemptConfirmedByTxIDs_Call { + return &EvmTxStore_FindTxAttemptConfirmedByTxIDs_Call{Call: _e.mock.On("FindTxAttemptConfirmedByTxIDs", ctx, ids)} +} + +func (_c *EvmTxStore_FindTxAttemptConfirmedByTxIDs_Call) Run(run func(ctx context.Context, ids []int64)) *EvmTxStore_FindTxAttemptConfirmedByTxIDs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]int64)) + }) + return _c +} + +func (_c *EvmTxStore_FindTxAttemptConfirmedByTxIDs_Call) Return(_a0 []types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], _a1 error) *EvmTxStore_FindTxAttemptConfirmedByTxIDs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EvmTxStore_FindTxAttemptConfirmedByTxIDs_Call) RunAndReturn(run func(context.Context, []int64) ([]types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)) *EvmTxStore_FindTxAttemptConfirmedByTxIDs_Call { + _c.Call.Return(run) + return _c +} + // FindTxAttemptsConfirmedMissingReceipt provides a mock function with given fields: ctx, chainID func (_m *EvmTxStore) FindTxAttemptsConfirmedMissingReceipt(ctx context.Context, chainID *big.Int) ([]types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error) { ret := _m.Called(ctx, chainID) @@ -433,6 +885,35 @@ func (_m *EvmTxStore) FindTxAttemptsConfirmedMissingReceipt(ctx context.Context, return r0, r1 } +// EvmTxStore_FindTxAttemptsConfirmedMissingReceipt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxAttemptsConfirmedMissingReceipt' +type EvmTxStore_FindTxAttemptsConfirmedMissingReceipt_Call struct { + *mock.Call +} + +// FindTxAttemptsConfirmedMissingReceipt is a helper method to define mock.On call +// - ctx context.Context +// - chainID *big.Int +func (_e *EvmTxStore_Expecter) FindTxAttemptsConfirmedMissingReceipt(ctx interface{}, chainID interface{}) *EvmTxStore_FindTxAttemptsConfirmedMissingReceipt_Call { + return &EvmTxStore_FindTxAttemptsConfirmedMissingReceipt_Call{Call: _e.mock.On("FindTxAttemptsConfirmedMissingReceipt", ctx, chainID)} +} + +func (_c *EvmTxStore_FindTxAttemptsConfirmedMissingReceipt_Call) Run(run func(ctx context.Context, chainID *big.Int)) *EvmTxStore_FindTxAttemptsConfirmedMissingReceipt_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*big.Int)) + }) + return _c +} + +func (_c *EvmTxStore_FindTxAttemptsConfirmedMissingReceipt_Call) Return(attempts []types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], err error) *EvmTxStore_FindTxAttemptsConfirmedMissingReceipt_Call { + _c.Call.Return(attempts, err) + return _c +} + +func (_c *EvmTxStore_FindTxAttemptsConfirmedMissingReceipt_Call) RunAndReturn(run func(context.Context, *big.Int) ([]types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)) *EvmTxStore_FindTxAttemptsConfirmedMissingReceipt_Call { + _c.Call.Return(run) + return _c +} + // FindTxAttemptsRequiringReceiptFetch provides a mock function with given fields: ctx, chainID func (_m *EvmTxStore) FindTxAttemptsRequiringReceiptFetch(ctx context.Context, chainID *big.Int) ([]types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error) { ret := _m.Called(ctx, chainID) @@ -463,6 +944,35 @@ func (_m *EvmTxStore) FindTxAttemptsRequiringReceiptFetch(ctx context.Context, c return r0, r1 } +// EvmTxStore_FindTxAttemptsRequiringReceiptFetch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxAttemptsRequiringReceiptFetch' +type EvmTxStore_FindTxAttemptsRequiringReceiptFetch_Call struct { + *mock.Call +} + +// FindTxAttemptsRequiringReceiptFetch is a helper method to define mock.On call +// - ctx context.Context +// - chainID *big.Int +func (_e *EvmTxStore_Expecter) FindTxAttemptsRequiringReceiptFetch(ctx interface{}, chainID interface{}) *EvmTxStore_FindTxAttemptsRequiringReceiptFetch_Call { + return &EvmTxStore_FindTxAttemptsRequiringReceiptFetch_Call{Call: _e.mock.On("FindTxAttemptsRequiringReceiptFetch", ctx, chainID)} +} + +func (_c *EvmTxStore_FindTxAttemptsRequiringReceiptFetch_Call) Run(run func(ctx context.Context, chainID *big.Int)) *EvmTxStore_FindTxAttemptsRequiringReceiptFetch_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*big.Int)) + }) + return _c +} + +func (_c *EvmTxStore_FindTxAttemptsRequiringReceiptFetch_Call) Return(attempts []types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], err error) *EvmTxStore_FindTxAttemptsRequiringReceiptFetch_Call { + _c.Call.Return(attempts, err) + return _c +} + +func (_c *EvmTxStore_FindTxAttemptsRequiringReceiptFetch_Call) RunAndReturn(run func(context.Context, *big.Int) ([]types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)) *EvmTxStore_FindTxAttemptsRequiringReceiptFetch_Call { + _c.Call.Return(run) + return _c +} + // FindTxAttemptsRequiringResend provides a mock function with given fields: ctx, olderThan, maxInFlightTransactions, chainID, address func (_m *EvmTxStore) FindTxAttemptsRequiringResend(ctx context.Context, olderThan time.Time, maxInFlightTransactions uint32, chainID *big.Int, address common.Address) ([]types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error) { ret := _m.Called(ctx, olderThan, maxInFlightTransactions, chainID, address) @@ -493,6 +1003,38 @@ func (_m *EvmTxStore) FindTxAttemptsRequiringResend(ctx context.Context, olderTh return r0, r1 } +// EvmTxStore_FindTxAttemptsRequiringResend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxAttemptsRequiringResend' +type EvmTxStore_FindTxAttemptsRequiringResend_Call struct { + *mock.Call +} + +// FindTxAttemptsRequiringResend is a helper method to define mock.On call +// - ctx context.Context +// - olderThan time.Time +// - maxInFlightTransactions uint32 +// - chainID *big.Int +// - address common.Address +func (_e *EvmTxStore_Expecter) FindTxAttemptsRequiringResend(ctx interface{}, olderThan interface{}, maxInFlightTransactions interface{}, chainID interface{}, address interface{}) *EvmTxStore_FindTxAttemptsRequiringResend_Call { + return &EvmTxStore_FindTxAttemptsRequiringResend_Call{Call: _e.mock.On("FindTxAttemptsRequiringResend", ctx, olderThan, maxInFlightTransactions, chainID, address)} +} + +func (_c *EvmTxStore_FindTxAttemptsRequiringResend_Call) Run(run func(ctx context.Context, olderThan time.Time, maxInFlightTransactions uint32, chainID *big.Int, address common.Address)) *EvmTxStore_FindTxAttemptsRequiringResend_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(time.Time), args[2].(uint32), args[3].(*big.Int), args[4].(common.Address)) + }) + return _c +} + +func (_c *EvmTxStore_FindTxAttemptsRequiringResend_Call) Return(attempts []types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], err error) *EvmTxStore_FindTxAttemptsRequiringResend_Call { + _c.Call.Return(attempts, err) + return _c +} + +func (_c *EvmTxStore_FindTxAttemptsRequiringResend_Call) RunAndReturn(run func(context.Context, time.Time, uint32, *big.Int, common.Address) ([]types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)) *EvmTxStore_FindTxAttemptsRequiringResend_Call { + _c.Call.Return(run) + return _c +} + // FindTxByHash provides a mock function with given fields: ctx, hash func (_m *EvmTxStore) FindTxByHash(ctx context.Context, hash common.Hash) (*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error) { ret := _m.Called(ctx, hash) @@ -523,6 +1065,35 @@ func (_m *EvmTxStore) FindTxByHash(ctx context.Context, hash common.Hash) (*type return r0, r1 } +// EvmTxStore_FindTxByHash_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxByHash' +type EvmTxStore_FindTxByHash_Call struct { + *mock.Call +} + +// FindTxByHash is a helper method to define mock.On call +// - ctx context.Context +// - hash common.Hash +func (_e *EvmTxStore_Expecter) FindTxByHash(ctx interface{}, hash interface{}) *EvmTxStore_FindTxByHash_Call { + return &EvmTxStore_FindTxByHash_Call{Call: _e.mock.On("FindTxByHash", ctx, hash)} +} + +func (_c *EvmTxStore_FindTxByHash_Call) Run(run func(ctx context.Context, hash common.Hash)) *EvmTxStore_FindTxByHash_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Hash)) + }) + return _c +} + +func (_c *EvmTxStore_FindTxByHash_Call) Return(_a0 *types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], _a1 error) *EvmTxStore_FindTxByHash_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *EvmTxStore_FindTxByHash_Call) RunAndReturn(run func(context.Context, common.Hash) (*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)) *EvmTxStore_FindTxByHash_Call { + _c.Call.Return(run) + return _c +} + // FindTxWithAttempts provides a mock function with given fields: ctx, etxID func (_m *EvmTxStore) FindTxWithAttempts(ctx context.Context, etxID int64) (types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error) { ret := _m.Called(ctx, etxID) @@ -551,6 +1122,35 @@ func (_m *EvmTxStore) FindTxWithAttempts(ctx context.Context, etxID int64) (type return r0, r1 } +// EvmTxStore_FindTxWithAttempts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxWithAttempts' +type EvmTxStore_FindTxWithAttempts_Call struct { + *mock.Call +} + +// FindTxWithAttempts is a helper method to define mock.On call +// - ctx context.Context +// - etxID int64 +func (_e *EvmTxStore_Expecter) FindTxWithAttempts(ctx interface{}, etxID interface{}) *EvmTxStore_FindTxWithAttempts_Call { + return &EvmTxStore_FindTxWithAttempts_Call{Call: _e.mock.On("FindTxWithAttempts", ctx, etxID)} +} + +func (_c *EvmTxStore_FindTxWithAttempts_Call) Run(run func(ctx context.Context, etxID int64)) *EvmTxStore_FindTxWithAttempts_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64)) + }) + return _c +} + +func (_c *EvmTxStore_FindTxWithAttempts_Call) Return(etx types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], err error) *EvmTxStore_FindTxWithAttempts_Call { + _c.Call.Return(etx, err) + return _c +} + +func (_c *EvmTxStore_FindTxWithAttempts_Call) RunAndReturn(run func(context.Context, int64) (types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)) *EvmTxStore_FindTxWithAttempts_Call { + _c.Call.Return(run) + return _c +} + // FindTxWithIdempotencyKey provides a mock function with given fields: ctx, idempotencyKey, chainID func (_m *EvmTxStore) FindTxWithIdempotencyKey(ctx context.Context, idempotencyKey string, chainID *big.Int) (*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error) { ret := _m.Called(ctx, idempotencyKey, chainID) @@ -581,6 +1181,36 @@ func (_m *EvmTxStore) FindTxWithIdempotencyKey(ctx context.Context, idempotencyK return r0, r1 } +// EvmTxStore_FindTxWithIdempotencyKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxWithIdempotencyKey' +type EvmTxStore_FindTxWithIdempotencyKey_Call struct { + *mock.Call +} + +// FindTxWithIdempotencyKey is a helper method to define mock.On call +// - ctx context.Context +// - idempotencyKey string +// - chainID *big.Int +func (_e *EvmTxStore_Expecter) FindTxWithIdempotencyKey(ctx interface{}, idempotencyKey interface{}, chainID interface{}) *EvmTxStore_FindTxWithIdempotencyKey_Call { + return &EvmTxStore_FindTxWithIdempotencyKey_Call{Call: _e.mock.On("FindTxWithIdempotencyKey", ctx, idempotencyKey, chainID)} +} + +func (_c *EvmTxStore_FindTxWithIdempotencyKey_Call) Run(run func(ctx context.Context, idempotencyKey string, chainID *big.Int)) *EvmTxStore_FindTxWithIdempotencyKey_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(*big.Int)) + }) + return _c +} + +func (_c *EvmTxStore_FindTxWithIdempotencyKey_Call) Return(tx *types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], err error) *EvmTxStore_FindTxWithIdempotencyKey_Call { + _c.Call.Return(tx, err) + return _c +} + +func (_c *EvmTxStore_FindTxWithIdempotencyKey_Call) RunAndReturn(run func(context.Context, string, *big.Int) (*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)) *EvmTxStore_FindTxWithIdempotencyKey_Call { + _c.Call.Return(run) + return _c +} + // FindTxWithSequence provides a mock function with given fields: ctx, fromAddress, seq func (_m *EvmTxStore) FindTxWithSequence(ctx context.Context, fromAddress common.Address, seq evmtypes.Nonce) (*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error) { ret := _m.Called(ctx, fromAddress, seq) @@ -611,6 +1241,36 @@ func (_m *EvmTxStore) FindTxWithSequence(ctx context.Context, fromAddress common return r0, r1 } +// EvmTxStore_FindTxWithSequence_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxWithSequence' +type EvmTxStore_FindTxWithSequence_Call struct { + *mock.Call +} + +// FindTxWithSequence is a helper method to define mock.On call +// - ctx context.Context +// - fromAddress common.Address +// - seq evmtypes.Nonce +func (_e *EvmTxStore_Expecter) FindTxWithSequence(ctx interface{}, fromAddress interface{}, seq interface{}) *EvmTxStore_FindTxWithSequence_Call { + return &EvmTxStore_FindTxWithSequence_Call{Call: _e.mock.On("FindTxWithSequence", ctx, fromAddress, seq)} +} + +func (_c *EvmTxStore_FindTxWithSequence_Call) Run(run func(ctx context.Context, fromAddress common.Address, seq evmtypes.Nonce)) *EvmTxStore_FindTxWithSequence_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(evmtypes.Nonce)) + }) + return _c +} + +func (_c *EvmTxStore_FindTxWithSequence_Call) Return(etx *types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], err error) *EvmTxStore_FindTxWithSequence_Call { + _c.Call.Return(etx, err) + return _c +} + +func (_c *EvmTxStore_FindTxWithSequence_Call) RunAndReturn(run func(context.Context, common.Address, evmtypes.Nonce) (*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)) *EvmTxStore_FindTxWithSequence_Call { + _c.Call.Return(run) + return _c +} + // FindTxesByMetaFieldAndStates provides a mock function with given fields: ctx, metaField, metaValue, states, chainID func (_m *EvmTxStore) FindTxesByMetaFieldAndStates(ctx context.Context, metaField string, metaValue string, states []types.TxState, chainID *big.Int) ([]*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error) { ret := _m.Called(ctx, metaField, metaValue, states, chainID) @@ -641,6 +1301,38 @@ func (_m *EvmTxStore) FindTxesByMetaFieldAndStates(ctx context.Context, metaFiel return r0, r1 } +// EvmTxStore_FindTxesByMetaFieldAndStates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxesByMetaFieldAndStates' +type EvmTxStore_FindTxesByMetaFieldAndStates_Call struct { + *mock.Call +} + +// FindTxesByMetaFieldAndStates is a helper method to define mock.On call +// - ctx context.Context +// - metaField string +// - metaValue string +// - states []types.TxState +// - chainID *big.Int +func (_e *EvmTxStore_Expecter) FindTxesByMetaFieldAndStates(ctx interface{}, metaField interface{}, metaValue interface{}, states interface{}, chainID interface{}) *EvmTxStore_FindTxesByMetaFieldAndStates_Call { + return &EvmTxStore_FindTxesByMetaFieldAndStates_Call{Call: _e.mock.On("FindTxesByMetaFieldAndStates", ctx, metaField, metaValue, states, chainID)} +} + +func (_c *EvmTxStore_FindTxesByMetaFieldAndStates_Call) Run(run func(ctx context.Context, metaField string, metaValue string, states []types.TxState, chainID *big.Int)) *EvmTxStore_FindTxesByMetaFieldAndStates_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].([]types.TxState), args[4].(*big.Int)) + }) + return _c +} + +func (_c *EvmTxStore_FindTxesByMetaFieldAndStates_Call) Return(tx []*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], err error) *EvmTxStore_FindTxesByMetaFieldAndStates_Call { + _c.Call.Return(tx, err) + return _c +} + +func (_c *EvmTxStore_FindTxesByMetaFieldAndStates_Call) RunAndReturn(run func(context.Context, string, string, []types.TxState, *big.Int) ([]*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)) *EvmTxStore_FindTxesByMetaFieldAndStates_Call { + _c.Call.Return(run) + return _c +} + // FindTxesPendingCallback provides a mock function with given fields: ctx, blockNum, chainID func (_m *EvmTxStore) FindTxesPendingCallback(ctx context.Context, blockNum int64, chainID *big.Int) ([]types.ReceiptPlus[*evmtypes.Receipt], error) { ret := _m.Called(ctx, blockNum, chainID) @@ -671,6 +1363,36 @@ func (_m *EvmTxStore) FindTxesPendingCallback(ctx context.Context, blockNum int6 return r0, r1 } +// EvmTxStore_FindTxesPendingCallback_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxesPendingCallback' +type EvmTxStore_FindTxesPendingCallback_Call struct { + *mock.Call +} + +// FindTxesPendingCallback is a helper method to define mock.On call +// - ctx context.Context +// - blockNum int64 +// - chainID *big.Int +func (_e *EvmTxStore_Expecter) FindTxesPendingCallback(ctx interface{}, blockNum interface{}, chainID interface{}) *EvmTxStore_FindTxesPendingCallback_Call { + return &EvmTxStore_FindTxesPendingCallback_Call{Call: _e.mock.On("FindTxesPendingCallback", ctx, blockNum, chainID)} +} + +func (_c *EvmTxStore_FindTxesPendingCallback_Call) Run(run func(ctx context.Context, blockNum int64, chainID *big.Int)) *EvmTxStore_FindTxesPendingCallback_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64), args[2].(*big.Int)) + }) + return _c +} + +func (_c *EvmTxStore_FindTxesPendingCallback_Call) Return(receiptsPlus []types.ReceiptPlus[*evmtypes.Receipt], err error) *EvmTxStore_FindTxesPendingCallback_Call { + _c.Call.Return(receiptsPlus, err) + return _c +} + +func (_c *EvmTxStore_FindTxesPendingCallback_Call) RunAndReturn(run func(context.Context, int64, *big.Int) ([]types.ReceiptPlus[*evmtypes.Receipt], error)) *EvmTxStore_FindTxesPendingCallback_Call { + _c.Call.Return(run) + return _c +} + // FindTxesWithAttemptsAndReceiptsByIdsAndState provides a mock function with given fields: ctx, ids, states, chainID func (_m *EvmTxStore) FindTxesWithAttemptsAndReceiptsByIdsAndState(ctx context.Context, ids []int64, states []types.TxState, chainID *big.Int) ([]*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error) { ret := _m.Called(ctx, ids, states, chainID) @@ -701,6 +1423,37 @@ func (_m *EvmTxStore) FindTxesWithAttemptsAndReceiptsByIdsAndState(ctx context.C return r0, r1 } +// EvmTxStore_FindTxesWithAttemptsAndReceiptsByIdsAndState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxesWithAttemptsAndReceiptsByIdsAndState' +type EvmTxStore_FindTxesWithAttemptsAndReceiptsByIdsAndState_Call struct { + *mock.Call +} + +// FindTxesWithAttemptsAndReceiptsByIdsAndState is a helper method to define mock.On call +// - ctx context.Context +// - ids []int64 +// - states []types.TxState +// - chainID *big.Int +func (_e *EvmTxStore_Expecter) FindTxesWithAttemptsAndReceiptsByIdsAndState(ctx interface{}, ids interface{}, states interface{}, chainID interface{}) *EvmTxStore_FindTxesWithAttemptsAndReceiptsByIdsAndState_Call { + return &EvmTxStore_FindTxesWithAttemptsAndReceiptsByIdsAndState_Call{Call: _e.mock.On("FindTxesWithAttemptsAndReceiptsByIdsAndState", ctx, ids, states, chainID)} +} + +func (_c *EvmTxStore_FindTxesWithAttemptsAndReceiptsByIdsAndState_Call) Run(run func(ctx context.Context, ids []int64, states []types.TxState, chainID *big.Int)) *EvmTxStore_FindTxesWithAttemptsAndReceiptsByIdsAndState_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]int64), args[2].([]types.TxState), args[3].(*big.Int)) + }) + return _c +} + +func (_c *EvmTxStore_FindTxesWithAttemptsAndReceiptsByIdsAndState_Call) Return(tx []*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], err error) *EvmTxStore_FindTxesWithAttemptsAndReceiptsByIdsAndState_Call { + _c.Call.Return(tx, err) + return _c +} + +func (_c *EvmTxStore_FindTxesWithAttemptsAndReceiptsByIdsAndState_Call) RunAndReturn(run func(context.Context, []int64, []types.TxState, *big.Int) ([]*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)) *EvmTxStore_FindTxesWithAttemptsAndReceiptsByIdsAndState_Call { + _c.Call.Return(run) + return _c +} + // FindTxesWithMetaFieldByReceiptBlockNum provides a mock function with given fields: ctx, metaField, blockNum, chainID func (_m *EvmTxStore) FindTxesWithMetaFieldByReceiptBlockNum(ctx context.Context, metaField string, blockNum int64, chainID *big.Int) ([]*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error) { ret := _m.Called(ctx, metaField, blockNum, chainID) @@ -731,8 +1484,39 @@ func (_m *EvmTxStore) FindTxesWithMetaFieldByReceiptBlockNum(ctx context.Context return r0, r1 } -// FindTxesWithMetaFieldByStates provides a mock function with given fields: ctx, metaField, states, chainID -func (_m *EvmTxStore) FindTxesWithMetaFieldByStates(ctx context.Context, metaField string, states []types.TxState, chainID *big.Int) ([]*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error) { +// EvmTxStore_FindTxesWithMetaFieldByReceiptBlockNum_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxesWithMetaFieldByReceiptBlockNum' +type EvmTxStore_FindTxesWithMetaFieldByReceiptBlockNum_Call struct { + *mock.Call +} + +// FindTxesWithMetaFieldByReceiptBlockNum is a helper method to define mock.On call +// - ctx context.Context +// - metaField string +// - blockNum int64 +// - chainID *big.Int +func (_e *EvmTxStore_Expecter) FindTxesWithMetaFieldByReceiptBlockNum(ctx interface{}, metaField interface{}, blockNum interface{}, chainID interface{}) *EvmTxStore_FindTxesWithMetaFieldByReceiptBlockNum_Call { + return &EvmTxStore_FindTxesWithMetaFieldByReceiptBlockNum_Call{Call: _e.mock.On("FindTxesWithMetaFieldByReceiptBlockNum", ctx, metaField, blockNum, chainID)} +} + +func (_c *EvmTxStore_FindTxesWithMetaFieldByReceiptBlockNum_Call) Run(run func(ctx context.Context, metaField string, blockNum int64, chainID *big.Int)) *EvmTxStore_FindTxesWithMetaFieldByReceiptBlockNum_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(int64), args[3].(*big.Int)) + }) + return _c +} + +func (_c *EvmTxStore_FindTxesWithMetaFieldByReceiptBlockNum_Call) Return(tx []*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], err error) *EvmTxStore_FindTxesWithMetaFieldByReceiptBlockNum_Call { + _c.Call.Return(tx, err) + return _c +} + +func (_c *EvmTxStore_FindTxesWithMetaFieldByReceiptBlockNum_Call) RunAndReturn(run func(context.Context, string, int64, *big.Int) ([]*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)) *EvmTxStore_FindTxesWithMetaFieldByReceiptBlockNum_Call { + _c.Call.Return(run) + return _c +} + +// FindTxesWithMetaFieldByStates provides a mock function with given fields: ctx, metaField, states, chainID +func (_m *EvmTxStore) FindTxesWithMetaFieldByStates(ctx context.Context, metaField string, states []types.TxState, chainID *big.Int) ([]*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error) { ret := _m.Called(ctx, metaField, states, chainID) if len(ret) == 0 { @@ -761,6 +1545,37 @@ func (_m *EvmTxStore) FindTxesWithMetaFieldByStates(ctx context.Context, metaFie return r0, r1 } +// EvmTxStore_FindTxesWithMetaFieldByStates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxesWithMetaFieldByStates' +type EvmTxStore_FindTxesWithMetaFieldByStates_Call struct { + *mock.Call +} + +// FindTxesWithMetaFieldByStates is a helper method to define mock.On call +// - ctx context.Context +// - metaField string +// - states []types.TxState +// - chainID *big.Int +func (_e *EvmTxStore_Expecter) FindTxesWithMetaFieldByStates(ctx interface{}, metaField interface{}, states interface{}, chainID interface{}) *EvmTxStore_FindTxesWithMetaFieldByStates_Call { + return &EvmTxStore_FindTxesWithMetaFieldByStates_Call{Call: _e.mock.On("FindTxesWithMetaFieldByStates", ctx, metaField, states, chainID)} +} + +func (_c *EvmTxStore_FindTxesWithMetaFieldByStates_Call) Run(run func(ctx context.Context, metaField string, states []types.TxState, chainID *big.Int)) *EvmTxStore_FindTxesWithMetaFieldByStates_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].([]types.TxState), args[3].(*big.Int)) + }) + return _c +} + +func (_c *EvmTxStore_FindTxesWithMetaFieldByStates_Call) Return(tx []*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], err error) *EvmTxStore_FindTxesWithMetaFieldByStates_Call { + _c.Call.Return(tx, err) + return _c +} + +func (_c *EvmTxStore_FindTxesWithMetaFieldByStates_Call) RunAndReturn(run func(context.Context, string, []types.TxState, *big.Int) ([]*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)) *EvmTxStore_FindTxesWithMetaFieldByStates_Call { + _c.Call.Return(run) + return _c +} + // FindTxsByStateAndFromAddresses provides a mock function with given fields: ctx, addresses, state, chainID func (_m *EvmTxStore) FindTxsByStateAndFromAddresses(ctx context.Context, addresses []common.Address, state types.TxState, chainID *big.Int) ([]*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error) { ret := _m.Called(ctx, addresses, state, chainID) @@ -791,6 +1606,37 @@ func (_m *EvmTxStore) FindTxsByStateAndFromAddresses(ctx context.Context, addres return r0, r1 } +// EvmTxStore_FindTxsByStateAndFromAddresses_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxsByStateAndFromAddresses' +type EvmTxStore_FindTxsByStateAndFromAddresses_Call struct { + *mock.Call +} + +// FindTxsByStateAndFromAddresses is a helper method to define mock.On call +// - ctx context.Context +// - addresses []common.Address +// - state types.TxState +// - chainID *big.Int +func (_e *EvmTxStore_Expecter) FindTxsByStateAndFromAddresses(ctx interface{}, addresses interface{}, state interface{}, chainID interface{}) *EvmTxStore_FindTxsByStateAndFromAddresses_Call { + return &EvmTxStore_FindTxsByStateAndFromAddresses_Call{Call: _e.mock.On("FindTxsByStateAndFromAddresses", ctx, addresses, state, chainID)} +} + +func (_c *EvmTxStore_FindTxsByStateAndFromAddresses_Call) Run(run func(ctx context.Context, addresses []common.Address, state types.TxState, chainID *big.Int)) *EvmTxStore_FindTxsByStateAndFromAddresses_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]common.Address), args[2].(types.TxState), args[3].(*big.Int)) + }) + return _c +} + +func (_c *EvmTxStore_FindTxsByStateAndFromAddresses_Call) Return(txs []*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], err error) *EvmTxStore_FindTxsByStateAndFromAddresses_Call { + _c.Call.Return(txs, err) + return _c +} + +func (_c *EvmTxStore_FindTxsByStateAndFromAddresses_Call) RunAndReturn(run func(context.Context, []common.Address, types.TxState, *big.Int) ([]*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)) *EvmTxStore_FindTxsByStateAndFromAddresses_Call { + _c.Call.Return(run) + return _c +} + // FindTxsRequiringGasBump provides a mock function with given fields: ctx, address, blockNum, gasBumpThreshold, depth, chainID func (_m *EvmTxStore) FindTxsRequiringGasBump(ctx context.Context, address common.Address, blockNum int64, gasBumpThreshold int64, depth int64, chainID *big.Int) ([]*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error) { ret := _m.Called(ctx, address, blockNum, gasBumpThreshold, depth, chainID) @@ -821,6 +1667,39 @@ func (_m *EvmTxStore) FindTxsRequiringGasBump(ctx context.Context, address commo return r0, r1 } +// EvmTxStore_FindTxsRequiringGasBump_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxsRequiringGasBump' +type EvmTxStore_FindTxsRequiringGasBump_Call struct { + *mock.Call +} + +// FindTxsRequiringGasBump is a helper method to define mock.On call +// - ctx context.Context +// - address common.Address +// - blockNum int64 +// - gasBumpThreshold int64 +// - depth int64 +// - chainID *big.Int +func (_e *EvmTxStore_Expecter) FindTxsRequiringGasBump(ctx interface{}, address interface{}, blockNum interface{}, gasBumpThreshold interface{}, depth interface{}, chainID interface{}) *EvmTxStore_FindTxsRequiringGasBump_Call { + return &EvmTxStore_FindTxsRequiringGasBump_Call{Call: _e.mock.On("FindTxsRequiringGasBump", ctx, address, blockNum, gasBumpThreshold, depth, chainID)} +} + +func (_c *EvmTxStore_FindTxsRequiringGasBump_Call) Run(run func(ctx context.Context, address common.Address, blockNum int64, gasBumpThreshold int64, depth int64, chainID *big.Int)) *EvmTxStore_FindTxsRequiringGasBump_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(int64), args[3].(int64), args[4].(int64), args[5].(*big.Int)) + }) + return _c +} + +func (_c *EvmTxStore_FindTxsRequiringGasBump_Call) Return(etxs []*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], err error) *EvmTxStore_FindTxsRequiringGasBump_Call { + _c.Call.Return(etxs, err) + return _c +} + +func (_c *EvmTxStore_FindTxsRequiringGasBump_Call) RunAndReturn(run func(context.Context, common.Address, int64, int64, int64, *big.Int) ([]*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)) *EvmTxStore_FindTxsRequiringGasBump_Call { + _c.Call.Return(run) + return _c +} + // FindTxsRequiringResubmissionDueToInsufficientFunds provides a mock function with given fields: ctx, address, chainID func (_m *EvmTxStore) FindTxsRequiringResubmissionDueToInsufficientFunds(ctx context.Context, address common.Address, chainID *big.Int) ([]*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error) { ret := _m.Called(ctx, address, chainID) @@ -851,6 +1730,36 @@ func (_m *EvmTxStore) FindTxsRequiringResubmissionDueToInsufficientFunds(ctx con return r0, r1 } +// EvmTxStore_FindTxsRequiringResubmissionDueToInsufficientFunds_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTxsRequiringResubmissionDueToInsufficientFunds' +type EvmTxStore_FindTxsRequiringResubmissionDueToInsufficientFunds_Call struct { + *mock.Call +} + +// FindTxsRequiringResubmissionDueToInsufficientFunds is a helper method to define mock.On call +// - ctx context.Context +// - address common.Address +// - chainID *big.Int +func (_e *EvmTxStore_Expecter) FindTxsRequiringResubmissionDueToInsufficientFunds(ctx interface{}, address interface{}, chainID interface{}) *EvmTxStore_FindTxsRequiringResubmissionDueToInsufficientFunds_Call { + return &EvmTxStore_FindTxsRequiringResubmissionDueToInsufficientFunds_Call{Call: _e.mock.On("FindTxsRequiringResubmissionDueToInsufficientFunds", ctx, address, chainID)} +} + +func (_c *EvmTxStore_FindTxsRequiringResubmissionDueToInsufficientFunds_Call) Run(run func(ctx context.Context, address common.Address, chainID *big.Int)) *EvmTxStore_FindTxsRequiringResubmissionDueToInsufficientFunds_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(*big.Int)) + }) + return _c +} + +func (_c *EvmTxStore_FindTxsRequiringResubmissionDueToInsufficientFunds_Call) Return(etxs []*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], err error) *EvmTxStore_FindTxsRequiringResubmissionDueToInsufficientFunds_Call { + _c.Call.Return(etxs, err) + return _c +} + +func (_c *EvmTxStore_FindTxsRequiringResubmissionDueToInsufficientFunds_Call) RunAndReturn(run func(context.Context, common.Address, *big.Int) ([]*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)) *EvmTxStore_FindTxsRequiringResubmissionDueToInsufficientFunds_Call { + _c.Call.Return(run) + return _c +} + // GetAbandonedTransactionsByBatch provides a mock function with given fields: ctx, chainID, enabledAddrs, offset, limit func (_m *EvmTxStore) GetAbandonedTransactionsByBatch(ctx context.Context, chainID *big.Int, enabledAddrs []common.Address, offset uint, limit uint) ([]*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error) { ret := _m.Called(ctx, chainID, enabledAddrs, offset, limit) @@ -881,6 +1790,38 @@ func (_m *EvmTxStore) GetAbandonedTransactionsByBatch(ctx context.Context, chain return r0, r1 } +// EvmTxStore_GetAbandonedTransactionsByBatch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAbandonedTransactionsByBatch' +type EvmTxStore_GetAbandonedTransactionsByBatch_Call struct { + *mock.Call +} + +// GetAbandonedTransactionsByBatch is a helper method to define mock.On call +// - ctx context.Context +// - chainID *big.Int +// - enabledAddrs []common.Address +// - offset uint +// - limit uint +func (_e *EvmTxStore_Expecter) GetAbandonedTransactionsByBatch(ctx interface{}, chainID interface{}, enabledAddrs interface{}, offset interface{}, limit interface{}) *EvmTxStore_GetAbandonedTransactionsByBatch_Call { + return &EvmTxStore_GetAbandonedTransactionsByBatch_Call{Call: _e.mock.On("GetAbandonedTransactionsByBatch", ctx, chainID, enabledAddrs, offset, limit)} +} + +func (_c *EvmTxStore_GetAbandonedTransactionsByBatch_Call) Run(run func(ctx context.Context, chainID *big.Int, enabledAddrs []common.Address, offset uint, limit uint)) *EvmTxStore_GetAbandonedTransactionsByBatch_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*big.Int), args[2].([]common.Address), args[3].(uint), args[4].(uint)) + }) + return _c +} + +func (_c *EvmTxStore_GetAbandonedTransactionsByBatch_Call) Return(txs []*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], err error) *EvmTxStore_GetAbandonedTransactionsByBatch_Call { + _c.Call.Return(txs, err) + return _c +} + +func (_c *EvmTxStore_GetAbandonedTransactionsByBatch_Call) RunAndReturn(run func(context.Context, *big.Int, []common.Address, uint, uint) ([]*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)) *EvmTxStore_GetAbandonedTransactionsByBatch_Call { + _c.Call.Return(run) + return _c +} + // GetInProgressTxAttempts provides a mock function with given fields: ctx, address, chainID func (_m *EvmTxStore) GetInProgressTxAttempts(ctx context.Context, address common.Address, chainID *big.Int) ([]types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error) { ret := _m.Called(ctx, address, chainID) @@ -911,6 +1852,36 @@ func (_m *EvmTxStore) GetInProgressTxAttempts(ctx context.Context, address commo return r0, r1 } +// EvmTxStore_GetInProgressTxAttempts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetInProgressTxAttempts' +type EvmTxStore_GetInProgressTxAttempts_Call struct { + *mock.Call +} + +// GetInProgressTxAttempts is a helper method to define mock.On call +// - ctx context.Context +// - address common.Address +// - chainID *big.Int +func (_e *EvmTxStore_Expecter) GetInProgressTxAttempts(ctx interface{}, address interface{}, chainID interface{}) *EvmTxStore_GetInProgressTxAttempts_Call { + return &EvmTxStore_GetInProgressTxAttempts_Call{Call: _e.mock.On("GetInProgressTxAttempts", ctx, address, chainID)} +} + +func (_c *EvmTxStore_GetInProgressTxAttempts_Call) Run(run func(ctx context.Context, address common.Address, chainID *big.Int)) *EvmTxStore_GetInProgressTxAttempts_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(*big.Int)) + }) + return _c +} + +func (_c *EvmTxStore_GetInProgressTxAttempts_Call) Return(attempts []types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], err error) *EvmTxStore_GetInProgressTxAttempts_Call { + _c.Call.Return(attempts, err) + return _c +} + +func (_c *EvmTxStore_GetInProgressTxAttempts_Call) RunAndReturn(run func(context.Context, common.Address, *big.Int) ([]types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)) *EvmTxStore_GetInProgressTxAttempts_Call { + _c.Call.Return(run) + return _c +} + // GetTxByID provides a mock function with given fields: ctx, id func (_m *EvmTxStore) GetTxByID(ctx context.Context, id int64) (*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error) { ret := _m.Called(ctx, id) @@ -941,6 +1912,35 @@ func (_m *EvmTxStore) GetTxByID(ctx context.Context, id int64) (*types.Tx[*big.I return r0, r1 } +// EvmTxStore_GetTxByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTxByID' +type EvmTxStore_GetTxByID_Call struct { + *mock.Call +} + +// GetTxByID is a helper method to define mock.On call +// - ctx context.Context +// - id int64 +func (_e *EvmTxStore_Expecter) GetTxByID(ctx interface{}, id interface{}) *EvmTxStore_GetTxByID_Call { + return &EvmTxStore_GetTxByID_Call{Call: _e.mock.On("GetTxByID", ctx, id)} +} + +func (_c *EvmTxStore_GetTxByID_Call) Run(run func(ctx context.Context, id int64)) *EvmTxStore_GetTxByID_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64)) + }) + return _c +} + +func (_c *EvmTxStore_GetTxByID_Call) Return(tx *types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], err error) *EvmTxStore_GetTxByID_Call { + _c.Call.Return(tx, err) + return _c +} + +func (_c *EvmTxStore_GetTxByID_Call) RunAndReturn(run func(context.Context, int64) (*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)) *EvmTxStore_GetTxByID_Call { + _c.Call.Return(run) + return _c +} + // GetTxInProgress provides a mock function with given fields: ctx, fromAddress func (_m *EvmTxStore) GetTxInProgress(ctx context.Context, fromAddress common.Address) (*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error) { ret := _m.Called(ctx, fromAddress) @@ -971,6 +1971,35 @@ func (_m *EvmTxStore) GetTxInProgress(ctx context.Context, fromAddress common.Ad return r0, r1 } +// EvmTxStore_GetTxInProgress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTxInProgress' +type EvmTxStore_GetTxInProgress_Call struct { + *mock.Call +} + +// GetTxInProgress is a helper method to define mock.On call +// - ctx context.Context +// - fromAddress common.Address +func (_e *EvmTxStore_Expecter) GetTxInProgress(ctx interface{}, fromAddress interface{}) *EvmTxStore_GetTxInProgress_Call { + return &EvmTxStore_GetTxInProgress_Call{Call: _e.mock.On("GetTxInProgress", ctx, fromAddress)} +} + +func (_c *EvmTxStore_GetTxInProgress_Call) Run(run func(ctx context.Context, fromAddress common.Address)) *EvmTxStore_GetTxInProgress_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address)) + }) + return _c +} + +func (_c *EvmTxStore_GetTxInProgress_Call) Return(etx *types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], err error) *EvmTxStore_GetTxInProgress_Call { + _c.Call.Return(etx, err) + return _c +} + +func (_c *EvmTxStore_GetTxInProgress_Call) RunAndReturn(run func(context.Context, common.Address) (*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], error)) *EvmTxStore_GetTxInProgress_Call { + _c.Call.Return(run) + return _c +} + // HasInProgressTransaction provides a mock function with given fields: ctx, account, chainID func (_m *EvmTxStore) HasInProgressTransaction(ctx context.Context, account common.Address, chainID *big.Int) (bool, error) { ret := _m.Called(ctx, account, chainID) @@ -999,6 +2028,36 @@ func (_m *EvmTxStore) HasInProgressTransaction(ctx context.Context, account comm return r0, r1 } +// EvmTxStore_HasInProgressTransaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasInProgressTransaction' +type EvmTxStore_HasInProgressTransaction_Call struct { + *mock.Call +} + +// HasInProgressTransaction is a helper method to define mock.On call +// - ctx context.Context +// - account common.Address +// - chainID *big.Int +func (_e *EvmTxStore_Expecter) HasInProgressTransaction(ctx interface{}, account interface{}, chainID interface{}) *EvmTxStore_HasInProgressTransaction_Call { + return &EvmTxStore_HasInProgressTransaction_Call{Call: _e.mock.On("HasInProgressTransaction", ctx, account, chainID)} +} + +func (_c *EvmTxStore_HasInProgressTransaction_Call) Run(run func(ctx context.Context, account common.Address, chainID *big.Int)) *EvmTxStore_HasInProgressTransaction_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(*big.Int)) + }) + return _c +} + +func (_c *EvmTxStore_HasInProgressTransaction_Call) Return(exists bool, err error) *EvmTxStore_HasInProgressTransaction_Call { + _c.Call.Return(exists, err) + return _c +} + +func (_c *EvmTxStore_HasInProgressTransaction_Call) RunAndReturn(run func(context.Context, common.Address, *big.Int) (bool, error)) *EvmTxStore_HasInProgressTransaction_Call { + _c.Call.Return(run) + return _c +} + // IsTxFinalized provides a mock function with given fields: ctx, blockHeight, txID, chainID func (_m *EvmTxStore) IsTxFinalized(ctx context.Context, blockHeight int64, txID int64, chainID *big.Int) (bool, error) { ret := _m.Called(ctx, blockHeight, txID, chainID) @@ -1027,6 +2086,37 @@ func (_m *EvmTxStore) IsTxFinalized(ctx context.Context, blockHeight int64, txID return r0, r1 } +// EvmTxStore_IsTxFinalized_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsTxFinalized' +type EvmTxStore_IsTxFinalized_Call struct { + *mock.Call +} + +// IsTxFinalized is a helper method to define mock.On call +// - ctx context.Context +// - blockHeight int64 +// - txID int64 +// - chainID *big.Int +func (_e *EvmTxStore_Expecter) IsTxFinalized(ctx interface{}, blockHeight interface{}, txID interface{}, chainID interface{}) *EvmTxStore_IsTxFinalized_Call { + return &EvmTxStore_IsTxFinalized_Call{Call: _e.mock.On("IsTxFinalized", ctx, blockHeight, txID, chainID)} +} + +func (_c *EvmTxStore_IsTxFinalized_Call) Run(run func(ctx context.Context, blockHeight int64, txID int64, chainID *big.Int)) *EvmTxStore_IsTxFinalized_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64), args[2].(int64), args[3].(*big.Int)) + }) + return _c +} + +func (_c *EvmTxStore_IsTxFinalized_Call) Return(finalized bool, err error) *EvmTxStore_IsTxFinalized_Call { + _c.Call.Return(finalized, err) + return _c +} + +func (_c *EvmTxStore_IsTxFinalized_Call) RunAndReturn(run func(context.Context, int64, int64, *big.Int) (bool, error)) *EvmTxStore_IsTxFinalized_Call { + _c.Call.Return(run) + return _c +} + // LoadTxAttempts provides a mock function with given fields: ctx, etx func (_m *EvmTxStore) LoadTxAttempts(ctx context.Context, etx *types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]) error { ret := _m.Called(ctx, etx) @@ -1045,6 +2135,35 @@ func (_m *EvmTxStore) LoadTxAttempts(ctx context.Context, etx *types.Tx[*big.Int return r0 } +// EvmTxStore_LoadTxAttempts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadTxAttempts' +type EvmTxStore_LoadTxAttempts_Call struct { + *mock.Call +} + +// LoadTxAttempts is a helper method to define mock.On call +// - ctx context.Context +// - etx *types.Tx[*big.Int,common.Address,common.Hash,common.Hash,evmtypes.Nonce,gas.EvmFee] +func (_e *EvmTxStore_Expecter) LoadTxAttempts(ctx interface{}, etx interface{}) *EvmTxStore_LoadTxAttempts_Call { + return &EvmTxStore_LoadTxAttempts_Call{Call: _e.mock.On("LoadTxAttempts", ctx, etx)} +} + +func (_c *EvmTxStore_LoadTxAttempts_Call) Run(run func(ctx context.Context, etx *types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee])) *EvmTxStore_LoadTxAttempts_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee])) + }) + return _c +} + +func (_c *EvmTxStore_LoadTxAttempts_Call) Return(_a0 error) *EvmTxStore_LoadTxAttempts_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvmTxStore_LoadTxAttempts_Call) RunAndReturn(run func(context.Context, *types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]) error) *EvmTxStore_LoadTxAttempts_Call { + _c.Call.Return(run) + return _c +} + // MarkAllConfirmedMissingReceipt provides a mock function with given fields: ctx, chainID func (_m *EvmTxStore) MarkAllConfirmedMissingReceipt(ctx context.Context, chainID *big.Int) error { ret := _m.Called(ctx, chainID) @@ -1063,6 +2182,35 @@ func (_m *EvmTxStore) MarkAllConfirmedMissingReceipt(ctx context.Context, chainI return r0 } +// EvmTxStore_MarkAllConfirmedMissingReceipt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MarkAllConfirmedMissingReceipt' +type EvmTxStore_MarkAllConfirmedMissingReceipt_Call struct { + *mock.Call +} + +// MarkAllConfirmedMissingReceipt is a helper method to define mock.On call +// - ctx context.Context +// - chainID *big.Int +func (_e *EvmTxStore_Expecter) MarkAllConfirmedMissingReceipt(ctx interface{}, chainID interface{}) *EvmTxStore_MarkAllConfirmedMissingReceipt_Call { + return &EvmTxStore_MarkAllConfirmedMissingReceipt_Call{Call: _e.mock.On("MarkAllConfirmedMissingReceipt", ctx, chainID)} +} + +func (_c *EvmTxStore_MarkAllConfirmedMissingReceipt_Call) Run(run func(ctx context.Context, chainID *big.Int)) *EvmTxStore_MarkAllConfirmedMissingReceipt_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*big.Int)) + }) + return _c +} + +func (_c *EvmTxStore_MarkAllConfirmedMissingReceipt_Call) Return(err error) *EvmTxStore_MarkAllConfirmedMissingReceipt_Call { + _c.Call.Return(err) + return _c +} + +func (_c *EvmTxStore_MarkAllConfirmedMissingReceipt_Call) RunAndReturn(run func(context.Context, *big.Int) error) *EvmTxStore_MarkAllConfirmedMissingReceipt_Call { + _c.Call.Return(run) + return _c +} + // MarkOldTxesMissingReceiptAsErrored provides a mock function with given fields: ctx, blockNum, finalityDepth, chainID func (_m *EvmTxStore) MarkOldTxesMissingReceiptAsErrored(ctx context.Context, blockNum int64, finalityDepth uint32, chainID *big.Int) error { ret := _m.Called(ctx, blockNum, finalityDepth, chainID) @@ -1081,6 +2229,37 @@ func (_m *EvmTxStore) MarkOldTxesMissingReceiptAsErrored(ctx context.Context, bl return r0 } +// EvmTxStore_MarkOldTxesMissingReceiptAsErrored_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MarkOldTxesMissingReceiptAsErrored' +type EvmTxStore_MarkOldTxesMissingReceiptAsErrored_Call struct { + *mock.Call +} + +// MarkOldTxesMissingReceiptAsErrored is a helper method to define mock.On call +// - ctx context.Context +// - blockNum int64 +// - finalityDepth uint32 +// - chainID *big.Int +func (_e *EvmTxStore_Expecter) MarkOldTxesMissingReceiptAsErrored(ctx interface{}, blockNum interface{}, finalityDepth interface{}, chainID interface{}) *EvmTxStore_MarkOldTxesMissingReceiptAsErrored_Call { + return &EvmTxStore_MarkOldTxesMissingReceiptAsErrored_Call{Call: _e.mock.On("MarkOldTxesMissingReceiptAsErrored", ctx, blockNum, finalityDepth, chainID)} +} + +func (_c *EvmTxStore_MarkOldTxesMissingReceiptAsErrored_Call) Run(run func(ctx context.Context, blockNum int64, finalityDepth uint32, chainID *big.Int)) *EvmTxStore_MarkOldTxesMissingReceiptAsErrored_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64), args[2].(uint32), args[3].(*big.Int)) + }) + return _c +} + +func (_c *EvmTxStore_MarkOldTxesMissingReceiptAsErrored_Call) Return(_a0 error) *EvmTxStore_MarkOldTxesMissingReceiptAsErrored_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvmTxStore_MarkOldTxesMissingReceiptAsErrored_Call) RunAndReturn(run func(context.Context, int64, uint32, *big.Int) error) *EvmTxStore_MarkOldTxesMissingReceiptAsErrored_Call { + _c.Call.Return(run) + return _c +} + // PreloadTxes provides a mock function with given fields: ctx, attempts func (_m *EvmTxStore) PreloadTxes(ctx context.Context, attempts []types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]) error { ret := _m.Called(ctx, attempts) @@ -1099,6 +2278,35 @@ func (_m *EvmTxStore) PreloadTxes(ctx context.Context, attempts []types.TxAttemp return r0 } +// EvmTxStore_PreloadTxes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PreloadTxes' +type EvmTxStore_PreloadTxes_Call struct { + *mock.Call +} + +// PreloadTxes is a helper method to define mock.On call +// - ctx context.Context +// - attempts []types.TxAttempt[*big.Int,common.Address,common.Hash,common.Hash,evmtypes.Nonce,gas.EvmFee] +func (_e *EvmTxStore_Expecter) PreloadTxes(ctx interface{}, attempts interface{}) *EvmTxStore_PreloadTxes_Call { + return &EvmTxStore_PreloadTxes_Call{Call: _e.mock.On("PreloadTxes", ctx, attempts)} +} + +func (_c *EvmTxStore_PreloadTxes_Call) Run(run func(ctx context.Context, attempts []types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee])) *EvmTxStore_PreloadTxes_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee])) + }) + return _c +} + +func (_c *EvmTxStore_PreloadTxes_Call) Return(_a0 error) *EvmTxStore_PreloadTxes_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvmTxStore_PreloadTxes_Call) RunAndReturn(run func(context.Context, []types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]) error) *EvmTxStore_PreloadTxes_Call { + _c.Call.Return(run) + return _c +} + // PruneUnstartedTxQueue provides a mock function with given fields: ctx, queueSize, subject func (_m *EvmTxStore) PruneUnstartedTxQueue(ctx context.Context, queueSize uint32, subject uuid.UUID) ([]int64, error) { ret := _m.Called(ctx, queueSize, subject) @@ -1129,6 +2337,36 @@ func (_m *EvmTxStore) PruneUnstartedTxQueue(ctx context.Context, queueSize uint3 return r0, r1 } +// EvmTxStore_PruneUnstartedTxQueue_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PruneUnstartedTxQueue' +type EvmTxStore_PruneUnstartedTxQueue_Call struct { + *mock.Call +} + +// PruneUnstartedTxQueue is a helper method to define mock.On call +// - ctx context.Context +// - queueSize uint32 +// - subject uuid.UUID +func (_e *EvmTxStore_Expecter) PruneUnstartedTxQueue(ctx interface{}, queueSize interface{}, subject interface{}) *EvmTxStore_PruneUnstartedTxQueue_Call { + return &EvmTxStore_PruneUnstartedTxQueue_Call{Call: _e.mock.On("PruneUnstartedTxQueue", ctx, queueSize, subject)} +} + +func (_c *EvmTxStore_PruneUnstartedTxQueue_Call) Run(run func(ctx context.Context, queueSize uint32, subject uuid.UUID)) *EvmTxStore_PruneUnstartedTxQueue_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint32), args[2].(uuid.UUID)) + }) + return _c +} + +func (_c *EvmTxStore_PruneUnstartedTxQueue_Call) Return(ids []int64, err error) *EvmTxStore_PruneUnstartedTxQueue_Call { + _c.Call.Return(ids, err) + return _c +} + +func (_c *EvmTxStore_PruneUnstartedTxQueue_Call) RunAndReturn(run func(context.Context, uint32, uuid.UUID) ([]int64, error)) *EvmTxStore_PruneUnstartedTxQueue_Call { + _c.Call.Return(run) + return _c +} + // ReapTxHistory provides a mock function with given fields: ctx, minBlockNumberToKeep, timeThreshold, chainID func (_m *EvmTxStore) ReapTxHistory(ctx context.Context, minBlockNumberToKeep int64, timeThreshold time.Time, chainID *big.Int) error { ret := _m.Called(ctx, minBlockNumberToKeep, timeThreshold, chainID) @@ -1147,6 +2385,37 @@ func (_m *EvmTxStore) ReapTxHistory(ctx context.Context, minBlockNumberToKeep in return r0 } +// EvmTxStore_ReapTxHistory_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReapTxHistory' +type EvmTxStore_ReapTxHistory_Call struct { + *mock.Call +} + +// ReapTxHistory is a helper method to define mock.On call +// - ctx context.Context +// - minBlockNumberToKeep int64 +// - timeThreshold time.Time +// - chainID *big.Int +func (_e *EvmTxStore_Expecter) ReapTxHistory(ctx interface{}, minBlockNumberToKeep interface{}, timeThreshold interface{}, chainID interface{}) *EvmTxStore_ReapTxHistory_Call { + return &EvmTxStore_ReapTxHistory_Call{Call: _e.mock.On("ReapTxHistory", ctx, minBlockNumberToKeep, timeThreshold, chainID)} +} + +func (_c *EvmTxStore_ReapTxHistory_Call) Run(run func(ctx context.Context, minBlockNumberToKeep int64, timeThreshold time.Time, chainID *big.Int)) *EvmTxStore_ReapTxHistory_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64), args[2].(time.Time), args[3].(*big.Int)) + }) + return _c +} + +func (_c *EvmTxStore_ReapTxHistory_Call) Return(_a0 error) *EvmTxStore_ReapTxHistory_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvmTxStore_ReapTxHistory_Call) RunAndReturn(run func(context.Context, int64, time.Time, *big.Int) error) *EvmTxStore_ReapTxHistory_Call { + _c.Call.Return(run) + return _c +} + // SaveConfirmedMissingReceiptAttempt provides a mock function with given fields: ctx, timeout, attempt, broadcastAt func (_m *EvmTxStore) SaveConfirmedMissingReceiptAttempt(ctx context.Context, timeout time.Duration, attempt *types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], broadcastAt time.Time) error { ret := _m.Called(ctx, timeout, attempt, broadcastAt) @@ -1165,6 +2434,37 @@ func (_m *EvmTxStore) SaveConfirmedMissingReceiptAttempt(ctx context.Context, ti return r0 } +// EvmTxStore_SaveConfirmedMissingReceiptAttempt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveConfirmedMissingReceiptAttempt' +type EvmTxStore_SaveConfirmedMissingReceiptAttempt_Call struct { + *mock.Call +} + +// SaveConfirmedMissingReceiptAttempt is a helper method to define mock.On call +// - ctx context.Context +// - timeout time.Duration +// - attempt *types.TxAttempt[*big.Int,common.Address,common.Hash,common.Hash,evmtypes.Nonce,gas.EvmFee] +// - broadcastAt time.Time +func (_e *EvmTxStore_Expecter) SaveConfirmedMissingReceiptAttempt(ctx interface{}, timeout interface{}, attempt interface{}, broadcastAt interface{}) *EvmTxStore_SaveConfirmedMissingReceiptAttempt_Call { + return &EvmTxStore_SaveConfirmedMissingReceiptAttempt_Call{Call: _e.mock.On("SaveConfirmedMissingReceiptAttempt", ctx, timeout, attempt, broadcastAt)} +} + +func (_c *EvmTxStore_SaveConfirmedMissingReceiptAttempt_Call) Run(run func(ctx context.Context, timeout time.Duration, attempt *types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], broadcastAt time.Time)) *EvmTxStore_SaveConfirmedMissingReceiptAttempt_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(time.Duration), args[2].(*types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]), args[3].(time.Time)) + }) + return _c +} + +func (_c *EvmTxStore_SaveConfirmedMissingReceiptAttempt_Call) Return(_a0 error) *EvmTxStore_SaveConfirmedMissingReceiptAttempt_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvmTxStore_SaveConfirmedMissingReceiptAttempt_Call) RunAndReturn(run func(context.Context, time.Duration, *types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], time.Time) error) *EvmTxStore_SaveConfirmedMissingReceiptAttempt_Call { + _c.Call.Return(run) + return _c +} + // SaveFetchedReceipts provides a mock function with given fields: ctx, r, state, errorMsg, chainID func (_m *EvmTxStore) SaveFetchedReceipts(ctx context.Context, r []*evmtypes.Receipt, state types.TxState, errorMsg *string, chainID *big.Int) error { ret := _m.Called(ctx, r, state, errorMsg, chainID) @@ -1183,6 +2483,38 @@ func (_m *EvmTxStore) SaveFetchedReceipts(ctx context.Context, r []*evmtypes.Rec return r0 } +// EvmTxStore_SaveFetchedReceipts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveFetchedReceipts' +type EvmTxStore_SaveFetchedReceipts_Call struct { + *mock.Call +} + +// SaveFetchedReceipts is a helper method to define mock.On call +// - ctx context.Context +// - r []*evmtypes.Receipt +// - state types.TxState +// - errorMsg *string +// - chainID *big.Int +func (_e *EvmTxStore_Expecter) SaveFetchedReceipts(ctx interface{}, r interface{}, state interface{}, errorMsg interface{}, chainID interface{}) *EvmTxStore_SaveFetchedReceipts_Call { + return &EvmTxStore_SaveFetchedReceipts_Call{Call: _e.mock.On("SaveFetchedReceipts", ctx, r, state, errorMsg, chainID)} +} + +func (_c *EvmTxStore_SaveFetchedReceipts_Call) Run(run func(ctx context.Context, r []*evmtypes.Receipt, state types.TxState, errorMsg *string, chainID *big.Int)) *EvmTxStore_SaveFetchedReceipts_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]*evmtypes.Receipt), args[2].(types.TxState), args[3].(*string), args[4].(*big.Int)) + }) + return _c +} + +func (_c *EvmTxStore_SaveFetchedReceipts_Call) Return(_a0 error) *EvmTxStore_SaveFetchedReceipts_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvmTxStore_SaveFetchedReceipts_Call) RunAndReturn(run func(context.Context, []*evmtypes.Receipt, types.TxState, *string, *big.Int) error) *EvmTxStore_SaveFetchedReceipts_Call { + _c.Call.Return(run) + return _c +} + // SaveInProgressAttempt provides a mock function with given fields: ctx, attempt func (_m *EvmTxStore) SaveInProgressAttempt(ctx context.Context, attempt *types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]) error { ret := _m.Called(ctx, attempt) @@ -1201,6 +2533,35 @@ func (_m *EvmTxStore) SaveInProgressAttempt(ctx context.Context, attempt *types. return r0 } +// EvmTxStore_SaveInProgressAttempt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveInProgressAttempt' +type EvmTxStore_SaveInProgressAttempt_Call struct { + *mock.Call +} + +// SaveInProgressAttempt is a helper method to define mock.On call +// - ctx context.Context +// - attempt *types.TxAttempt[*big.Int,common.Address,common.Hash,common.Hash,evmtypes.Nonce,gas.EvmFee] +func (_e *EvmTxStore_Expecter) SaveInProgressAttempt(ctx interface{}, attempt interface{}) *EvmTxStore_SaveInProgressAttempt_Call { + return &EvmTxStore_SaveInProgressAttempt_Call{Call: _e.mock.On("SaveInProgressAttempt", ctx, attempt)} +} + +func (_c *EvmTxStore_SaveInProgressAttempt_Call) Run(run func(ctx context.Context, attempt *types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee])) *EvmTxStore_SaveInProgressAttempt_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee])) + }) + return _c +} + +func (_c *EvmTxStore_SaveInProgressAttempt_Call) Return(_a0 error) *EvmTxStore_SaveInProgressAttempt_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvmTxStore_SaveInProgressAttempt_Call) RunAndReturn(run func(context.Context, *types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]) error) *EvmTxStore_SaveInProgressAttempt_Call { + _c.Call.Return(run) + return _c +} + // SaveInsufficientFundsAttempt provides a mock function with given fields: ctx, timeout, attempt, broadcastAt func (_m *EvmTxStore) SaveInsufficientFundsAttempt(ctx context.Context, timeout time.Duration, attempt *types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], broadcastAt time.Time) error { ret := _m.Called(ctx, timeout, attempt, broadcastAt) @@ -1219,6 +2580,37 @@ func (_m *EvmTxStore) SaveInsufficientFundsAttempt(ctx context.Context, timeout return r0 } +// EvmTxStore_SaveInsufficientFundsAttempt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveInsufficientFundsAttempt' +type EvmTxStore_SaveInsufficientFundsAttempt_Call struct { + *mock.Call +} + +// SaveInsufficientFundsAttempt is a helper method to define mock.On call +// - ctx context.Context +// - timeout time.Duration +// - attempt *types.TxAttempt[*big.Int,common.Address,common.Hash,common.Hash,evmtypes.Nonce,gas.EvmFee] +// - broadcastAt time.Time +func (_e *EvmTxStore_Expecter) SaveInsufficientFundsAttempt(ctx interface{}, timeout interface{}, attempt interface{}, broadcastAt interface{}) *EvmTxStore_SaveInsufficientFundsAttempt_Call { + return &EvmTxStore_SaveInsufficientFundsAttempt_Call{Call: _e.mock.On("SaveInsufficientFundsAttempt", ctx, timeout, attempt, broadcastAt)} +} + +func (_c *EvmTxStore_SaveInsufficientFundsAttempt_Call) Run(run func(ctx context.Context, timeout time.Duration, attempt *types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], broadcastAt time.Time)) *EvmTxStore_SaveInsufficientFundsAttempt_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(time.Duration), args[2].(*types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]), args[3].(time.Time)) + }) + return _c +} + +func (_c *EvmTxStore_SaveInsufficientFundsAttempt_Call) Return(_a0 error) *EvmTxStore_SaveInsufficientFundsAttempt_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvmTxStore_SaveInsufficientFundsAttempt_Call) RunAndReturn(run func(context.Context, time.Duration, *types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], time.Time) error) *EvmTxStore_SaveInsufficientFundsAttempt_Call { + _c.Call.Return(run) + return _c +} + // SaveReplacementInProgressAttempt provides a mock function with given fields: ctx, oldAttempt, replacementAttempt func (_m *EvmTxStore) SaveReplacementInProgressAttempt(ctx context.Context, oldAttempt types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], replacementAttempt *types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]) error { ret := _m.Called(ctx, oldAttempt, replacementAttempt) @@ -1237,6 +2629,36 @@ func (_m *EvmTxStore) SaveReplacementInProgressAttempt(ctx context.Context, oldA return r0 } +// EvmTxStore_SaveReplacementInProgressAttempt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveReplacementInProgressAttempt' +type EvmTxStore_SaveReplacementInProgressAttempt_Call struct { + *mock.Call +} + +// SaveReplacementInProgressAttempt is a helper method to define mock.On call +// - ctx context.Context +// - oldAttempt types.TxAttempt[*big.Int,common.Address,common.Hash,common.Hash,evmtypes.Nonce,gas.EvmFee] +// - replacementAttempt *types.TxAttempt[*big.Int,common.Address,common.Hash,common.Hash,evmtypes.Nonce,gas.EvmFee] +func (_e *EvmTxStore_Expecter) SaveReplacementInProgressAttempt(ctx interface{}, oldAttempt interface{}, replacementAttempt interface{}) *EvmTxStore_SaveReplacementInProgressAttempt_Call { + return &EvmTxStore_SaveReplacementInProgressAttempt_Call{Call: _e.mock.On("SaveReplacementInProgressAttempt", ctx, oldAttempt, replacementAttempt)} +} + +func (_c *EvmTxStore_SaveReplacementInProgressAttempt_Call) Run(run func(ctx context.Context, oldAttempt types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], replacementAttempt *types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee])) *EvmTxStore_SaveReplacementInProgressAttempt_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]), args[2].(*types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee])) + }) + return _c +} + +func (_c *EvmTxStore_SaveReplacementInProgressAttempt_Call) Return(_a0 error) *EvmTxStore_SaveReplacementInProgressAttempt_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvmTxStore_SaveReplacementInProgressAttempt_Call) RunAndReturn(run func(context.Context, types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], *types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]) error) *EvmTxStore_SaveReplacementInProgressAttempt_Call { + _c.Call.Return(run) + return _c +} + // SaveSentAttempt provides a mock function with given fields: ctx, timeout, attempt, broadcastAt func (_m *EvmTxStore) SaveSentAttempt(ctx context.Context, timeout time.Duration, attempt *types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], broadcastAt time.Time) error { ret := _m.Called(ctx, timeout, attempt, broadcastAt) @@ -1255,6 +2677,37 @@ func (_m *EvmTxStore) SaveSentAttempt(ctx context.Context, timeout time.Duration return r0 } +// EvmTxStore_SaveSentAttempt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveSentAttempt' +type EvmTxStore_SaveSentAttempt_Call struct { + *mock.Call +} + +// SaveSentAttempt is a helper method to define mock.On call +// - ctx context.Context +// - timeout time.Duration +// - attempt *types.TxAttempt[*big.Int,common.Address,common.Hash,common.Hash,evmtypes.Nonce,gas.EvmFee] +// - broadcastAt time.Time +func (_e *EvmTxStore_Expecter) SaveSentAttempt(ctx interface{}, timeout interface{}, attempt interface{}, broadcastAt interface{}) *EvmTxStore_SaveSentAttempt_Call { + return &EvmTxStore_SaveSentAttempt_Call{Call: _e.mock.On("SaveSentAttempt", ctx, timeout, attempt, broadcastAt)} +} + +func (_c *EvmTxStore_SaveSentAttempt_Call) Run(run func(ctx context.Context, timeout time.Duration, attempt *types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], broadcastAt time.Time)) *EvmTxStore_SaveSentAttempt_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(time.Duration), args[2].(*types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]), args[3].(time.Time)) + }) + return _c +} + +func (_c *EvmTxStore_SaveSentAttempt_Call) Return(_a0 error) *EvmTxStore_SaveSentAttempt_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvmTxStore_SaveSentAttempt_Call) RunAndReturn(run func(context.Context, time.Duration, *types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], time.Time) error) *EvmTxStore_SaveSentAttempt_Call { + _c.Call.Return(run) + return _c +} + // SetBroadcastBeforeBlockNum provides a mock function with given fields: ctx, blockNum, chainID func (_m *EvmTxStore) SetBroadcastBeforeBlockNum(ctx context.Context, blockNum int64, chainID *big.Int) error { ret := _m.Called(ctx, blockNum, chainID) @@ -1273,6 +2726,36 @@ func (_m *EvmTxStore) SetBroadcastBeforeBlockNum(ctx context.Context, blockNum i return r0 } +// EvmTxStore_SetBroadcastBeforeBlockNum_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetBroadcastBeforeBlockNum' +type EvmTxStore_SetBroadcastBeforeBlockNum_Call struct { + *mock.Call +} + +// SetBroadcastBeforeBlockNum is a helper method to define mock.On call +// - ctx context.Context +// - blockNum int64 +// - chainID *big.Int +func (_e *EvmTxStore_Expecter) SetBroadcastBeforeBlockNum(ctx interface{}, blockNum interface{}, chainID interface{}) *EvmTxStore_SetBroadcastBeforeBlockNum_Call { + return &EvmTxStore_SetBroadcastBeforeBlockNum_Call{Call: _e.mock.On("SetBroadcastBeforeBlockNum", ctx, blockNum, chainID)} +} + +func (_c *EvmTxStore_SetBroadcastBeforeBlockNum_Call) Run(run func(ctx context.Context, blockNum int64, chainID *big.Int)) *EvmTxStore_SetBroadcastBeforeBlockNum_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64), args[2].(*big.Int)) + }) + return _c +} + +func (_c *EvmTxStore_SetBroadcastBeforeBlockNum_Call) Return(_a0 error) *EvmTxStore_SetBroadcastBeforeBlockNum_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvmTxStore_SetBroadcastBeforeBlockNum_Call) RunAndReturn(run func(context.Context, int64, *big.Int) error) *EvmTxStore_SetBroadcastBeforeBlockNum_Call { + _c.Call.Return(run) + return _c +} + // Transactions provides a mock function with given fields: ctx, offset, limit func (_m *EvmTxStore) Transactions(ctx context.Context, offset int, limit int) ([]types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], int, error) { ret := _m.Called(ctx, offset, limit) @@ -1310,6 +2793,36 @@ func (_m *EvmTxStore) Transactions(ctx context.Context, offset int, limit int) ( return r0, r1, r2 } +// EvmTxStore_Transactions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Transactions' +type EvmTxStore_Transactions_Call struct { + *mock.Call +} + +// Transactions is a helper method to define mock.On call +// - ctx context.Context +// - offset int +// - limit int +func (_e *EvmTxStore_Expecter) Transactions(ctx interface{}, offset interface{}, limit interface{}) *EvmTxStore_Transactions_Call { + return &EvmTxStore_Transactions_Call{Call: _e.mock.On("Transactions", ctx, offset, limit)} +} + +func (_c *EvmTxStore_Transactions_Call) Run(run func(ctx context.Context, offset int, limit int)) *EvmTxStore_Transactions_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int), args[2].(int)) + }) + return _c +} + +func (_c *EvmTxStore_Transactions_Call) Return(_a0 []types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], _a1 int, _a2 error) *EvmTxStore_Transactions_Call { + _c.Call.Return(_a0, _a1, _a2) + return _c +} + +func (_c *EvmTxStore_Transactions_Call) RunAndReturn(run func(context.Context, int, int) ([]types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], int, error)) *EvmTxStore_Transactions_Call { + _c.Call.Return(run) + return _c +} + // TransactionsWithAttempts provides a mock function with given fields: ctx, offset, limit func (_m *EvmTxStore) TransactionsWithAttempts(ctx context.Context, offset int, limit int) ([]types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], int, error) { ret := _m.Called(ctx, offset, limit) @@ -1347,6 +2860,36 @@ func (_m *EvmTxStore) TransactionsWithAttempts(ctx context.Context, offset int, return r0, r1, r2 } +// EvmTxStore_TransactionsWithAttempts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransactionsWithAttempts' +type EvmTxStore_TransactionsWithAttempts_Call struct { + *mock.Call +} + +// TransactionsWithAttempts is a helper method to define mock.On call +// - ctx context.Context +// - offset int +// - limit int +func (_e *EvmTxStore_Expecter) TransactionsWithAttempts(ctx interface{}, offset interface{}, limit interface{}) *EvmTxStore_TransactionsWithAttempts_Call { + return &EvmTxStore_TransactionsWithAttempts_Call{Call: _e.mock.On("TransactionsWithAttempts", ctx, offset, limit)} +} + +func (_c *EvmTxStore_TransactionsWithAttempts_Call) Run(run func(ctx context.Context, offset int, limit int)) *EvmTxStore_TransactionsWithAttempts_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int), args[2].(int)) + }) + return _c +} + +func (_c *EvmTxStore_TransactionsWithAttempts_Call) Return(_a0 []types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], _a1 int, _a2 error) *EvmTxStore_TransactionsWithAttempts_Call { + _c.Call.Return(_a0, _a1, _a2) + return _c +} + +func (_c *EvmTxStore_TransactionsWithAttempts_Call) RunAndReturn(run func(context.Context, int, int) ([]types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], int, error)) *EvmTxStore_TransactionsWithAttempts_Call { + _c.Call.Return(run) + return _c +} + // TxAttempts provides a mock function with given fields: ctx, offset, limit func (_m *EvmTxStore) TxAttempts(ctx context.Context, offset int, limit int) ([]types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], int, error) { ret := _m.Called(ctx, offset, limit) @@ -1384,6 +2927,36 @@ func (_m *EvmTxStore) TxAttempts(ctx context.Context, offset int, limit int) ([] return r0, r1, r2 } +// EvmTxStore_TxAttempts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TxAttempts' +type EvmTxStore_TxAttempts_Call struct { + *mock.Call +} + +// TxAttempts is a helper method to define mock.On call +// - ctx context.Context +// - offset int +// - limit int +func (_e *EvmTxStore_Expecter) TxAttempts(ctx interface{}, offset interface{}, limit interface{}) *EvmTxStore_TxAttempts_Call { + return &EvmTxStore_TxAttempts_Call{Call: _e.mock.On("TxAttempts", ctx, offset, limit)} +} + +func (_c *EvmTxStore_TxAttempts_Call) Run(run func(ctx context.Context, offset int, limit int)) *EvmTxStore_TxAttempts_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int), args[2].(int)) + }) + return _c +} + +func (_c *EvmTxStore_TxAttempts_Call) Return(_a0 []types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], _a1 int, _a2 error) *EvmTxStore_TxAttempts_Call { + _c.Call.Return(_a0, _a1, _a2) + return _c +} + +func (_c *EvmTxStore_TxAttempts_Call) RunAndReturn(run func(context.Context, int, int) ([]types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], int, error)) *EvmTxStore_TxAttempts_Call { + _c.Call.Return(run) + return _c +} + // UpdateBroadcastAts provides a mock function with given fields: ctx, now, etxIDs func (_m *EvmTxStore) UpdateBroadcastAts(ctx context.Context, now time.Time, etxIDs []int64) error { ret := _m.Called(ctx, now, etxIDs) @@ -1402,6 +2975,36 @@ func (_m *EvmTxStore) UpdateBroadcastAts(ctx context.Context, now time.Time, etx return r0 } +// EvmTxStore_UpdateBroadcastAts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateBroadcastAts' +type EvmTxStore_UpdateBroadcastAts_Call struct { + *mock.Call +} + +// UpdateBroadcastAts is a helper method to define mock.On call +// - ctx context.Context +// - now time.Time +// - etxIDs []int64 +func (_e *EvmTxStore_Expecter) UpdateBroadcastAts(ctx interface{}, now interface{}, etxIDs interface{}) *EvmTxStore_UpdateBroadcastAts_Call { + return &EvmTxStore_UpdateBroadcastAts_Call{Call: _e.mock.On("UpdateBroadcastAts", ctx, now, etxIDs)} +} + +func (_c *EvmTxStore_UpdateBroadcastAts_Call) Run(run func(ctx context.Context, now time.Time, etxIDs []int64)) *EvmTxStore_UpdateBroadcastAts_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(time.Time), args[2].([]int64)) + }) + return _c +} + +func (_c *EvmTxStore_UpdateBroadcastAts_Call) Return(_a0 error) *EvmTxStore_UpdateBroadcastAts_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvmTxStore_UpdateBroadcastAts_Call) RunAndReturn(run func(context.Context, time.Time, []int64) error) *EvmTxStore_UpdateBroadcastAts_Call { + _c.Call.Return(run) + return _c +} + // UpdateTxAttemptInProgressToBroadcast provides a mock function with given fields: ctx, etx, attempt, NewAttemptState func (_m *EvmTxStore) UpdateTxAttemptInProgressToBroadcast(ctx context.Context, etx *types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], attempt types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], NewAttemptState types.TxAttemptState) error { ret := _m.Called(ctx, etx, attempt, NewAttemptState) @@ -1420,6 +3023,37 @@ func (_m *EvmTxStore) UpdateTxAttemptInProgressToBroadcast(ctx context.Context, return r0 } +// EvmTxStore_UpdateTxAttemptInProgressToBroadcast_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateTxAttemptInProgressToBroadcast' +type EvmTxStore_UpdateTxAttemptInProgressToBroadcast_Call struct { + *mock.Call +} + +// UpdateTxAttemptInProgressToBroadcast is a helper method to define mock.On call +// - ctx context.Context +// - etx *types.Tx[*big.Int,common.Address,common.Hash,common.Hash,evmtypes.Nonce,gas.EvmFee] +// - attempt types.TxAttempt[*big.Int,common.Address,common.Hash,common.Hash,evmtypes.Nonce,gas.EvmFee] +// - NewAttemptState types.TxAttemptState +func (_e *EvmTxStore_Expecter) UpdateTxAttemptInProgressToBroadcast(ctx interface{}, etx interface{}, attempt interface{}, NewAttemptState interface{}) *EvmTxStore_UpdateTxAttemptInProgressToBroadcast_Call { + return &EvmTxStore_UpdateTxAttemptInProgressToBroadcast_Call{Call: _e.mock.On("UpdateTxAttemptInProgressToBroadcast", ctx, etx, attempt, NewAttemptState)} +} + +func (_c *EvmTxStore_UpdateTxAttemptInProgressToBroadcast_Call) Run(run func(ctx context.Context, etx *types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], attempt types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], NewAttemptState types.TxAttemptState)) *EvmTxStore_UpdateTxAttemptInProgressToBroadcast_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]), args[2].(types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]), args[3].(types.TxAttemptState)) + }) + return _c +} + +func (_c *EvmTxStore_UpdateTxAttemptInProgressToBroadcast_Call) Return(_a0 error) *EvmTxStore_UpdateTxAttemptInProgressToBroadcast_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvmTxStore_UpdateTxAttemptInProgressToBroadcast_Call) RunAndReturn(run func(context.Context, *types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], types.TxAttemptState) error) *EvmTxStore_UpdateTxAttemptInProgressToBroadcast_Call { + _c.Call.Return(run) + return _c +} + // UpdateTxCallbackCompleted provides a mock function with given fields: ctx, pipelineTaskRunRid, chainId func (_m *EvmTxStore) UpdateTxCallbackCompleted(ctx context.Context, pipelineTaskRunRid uuid.UUID, chainId *big.Int) error { ret := _m.Called(ctx, pipelineTaskRunRid, chainId) @@ -1438,6 +3072,36 @@ func (_m *EvmTxStore) UpdateTxCallbackCompleted(ctx context.Context, pipelineTas return r0 } +// EvmTxStore_UpdateTxCallbackCompleted_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateTxCallbackCompleted' +type EvmTxStore_UpdateTxCallbackCompleted_Call struct { + *mock.Call +} + +// UpdateTxCallbackCompleted is a helper method to define mock.On call +// - ctx context.Context +// - pipelineTaskRunRid uuid.UUID +// - chainId *big.Int +func (_e *EvmTxStore_Expecter) UpdateTxCallbackCompleted(ctx interface{}, pipelineTaskRunRid interface{}, chainId interface{}) *EvmTxStore_UpdateTxCallbackCompleted_Call { + return &EvmTxStore_UpdateTxCallbackCompleted_Call{Call: _e.mock.On("UpdateTxCallbackCompleted", ctx, pipelineTaskRunRid, chainId)} +} + +func (_c *EvmTxStore_UpdateTxCallbackCompleted_Call) Run(run func(ctx context.Context, pipelineTaskRunRid uuid.UUID, chainId *big.Int)) *EvmTxStore_UpdateTxCallbackCompleted_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(*big.Int)) + }) + return _c +} + +func (_c *EvmTxStore_UpdateTxCallbackCompleted_Call) Return(_a0 error) *EvmTxStore_UpdateTxCallbackCompleted_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvmTxStore_UpdateTxCallbackCompleted_Call) RunAndReturn(run func(context.Context, uuid.UUID, *big.Int) error) *EvmTxStore_UpdateTxCallbackCompleted_Call { + _c.Call.Return(run) + return _c +} + // UpdateTxFatalError provides a mock function with given fields: ctx, etx func (_m *EvmTxStore) UpdateTxFatalError(ctx context.Context, etx *types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]) error { ret := _m.Called(ctx, etx) @@ -1456,6 +3120,35 @@ func (_m *EvmTxStore) UpdateTxFatalError(ctx context.Context, etx *types.Tx[*big return r0 } +// EvmTxStore_UpdateTxFatalError_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateTxFatalError' +type EvmTxStore_UpdateTxFatalError_Call struct { + *mock.Call +} + +// UpdateTxFatalError is a helper method to define mock.On call +// - ctx context.Context +// - etx *types.Tx[*big.Int,common.Address,common.Hash,common.Hash,evmtypes.Nonce,gas.EvmFee] +func (_e *EvmTxStore_Expecter) UpdateTxFatalError(ctx interface{}, etx interface{}) *EvmTxStore_UpdateTxFatalError_Call { + return &EvmTxStore_UpdateTxFatalError_Call{Call: _e.mock.On("UpdateTxFatalError", ctx, etx)} +} + +func (_c *EvmTxStore_UpdateTxFatalError_Call) Run(run func(ctx context.Context, etx *types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee])) *EvmTxStore_UpdateTxFatalError_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee])) + }) + return _c +} + +func (_c *EvmTxStore_UpdateTxFatalError_Call) Return(_a0 error) *EvmTxStore_UpdateTxFatalError_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvmTxStore_UpdateTxFatalError_Call) RunAndReturn(run func(context.Context, *types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]) error) *EvmTxStore_UpdateTxFatalError_Call { + _c.Call.Return(run) + return _c +} + // UpdateTxForRebroadcast provides a mock function with given fields: ctx, etx, etxAttempt func (_m *EvmTxStore) UpdateTxForRebroadcast(ctx context.Context, etx types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], etxAttempt types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]) error { ret := _m.Called(ctx, etx, etxAttempt) @@ -1474,6 +3167,36 @@ func (_m *EvmTxStore) UpdateTxForRebroadcast(ctx context.Context, etx types.Tx[* return r0 } +// EvmTxStore_UpdateTxForRebroadcast_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateTxForRebroadcast' +type EvmTxStore_UpdateTxForRebroadcast_Call struct { + *mock.Call +} + +// UpdateTxForRebroadcast is a helper method to define mock.On call +// - ctx context.Context +// - etx types.Tx[*big.Int,common.Address,common.Hash,common.Hash,evmtypes.Nonce,gas.EvmFee] +// - etxAttempt types.TxAttempt[*big.Int,common.Address,common.Hash,common.Hash,evmtypes.Nonce,gas.EvmFee] +func (_e *EvmTxStore_Expecter) UpdateTxForRebroadcast(ctx interface{}, etx interface{}, etxAttempt interface{}) *EvmTxStore_UpdateTxForRebroadcast_Call { + return &EvmTxStore_UpdateTxForRebroadcast_Call{Call: _e.mock.On("UpdateTxForRebroadcast", ctx, etx, etxAttempt)} +} + +func (_c *EvmTxStore_UpdateTxForRebroadcast_Call) Run(run func(ctx context.Context, etx types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], etxAttempt types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee])) *EvmTxStore_UpdateTxForRebroadcast_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]), args[2].(types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee])) + }) + return _c +} + +func (_c *EvmTxStore_UpdateTxForRebroadcast_Call) Return(_a0 error) *EvmTxStore_UpdateTxForRebroadcast_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvmTxStore_UpdateTxForRebroadcast_Call) RunAndReturn(run func(context.Context, types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]) error) *EvmTxStore_UpdateTxForRebroadcast_Call { + _c.Call.Return(run) + return _c +} + // UpdateTxUnstartedToInProgress provides a mock function with given fields: ctx, etx, attempt func (_m *EvmTxStore) UpdateTxUnstartedToInProgress(ctx context.Context, etx *types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], attempt *types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]) error { ret := _m.Called(ctx, etx, attempt) @@ -1492,6 +3215,36 @@ func (_m *EvmTxStore) UpdateTxUnstartedToInProgress(ctx context.Context, etx *ty return r0 } +// EvmTxStore_UpdateTxUnstartedToInProgress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateTxUnstartedToInProgress' +type EvmTxStore_UpdateTxUnstartedToInProgress_Call struct { + *mock.Call +} + +// UpdateTxUnstartedToInProgress is a helper method to define mock.On call +// - ctx context.Context +// - etx *types.Tx[*big.Int,common.Address,common.Hash,common.Hash,evmtypes.Nonce,gas.EvmFee] +// - attempt *types.TxAttempt[*big.Int,common.Address,common.Hash,common.Hash,evmtypes.Nonce,gas.EvmFee] +func (_e *EvmTxStore_Expecter) UpdateTxUnstartedToInProgress(ctx interface{}, etx interface{}, attempt interface{}) *EvmTxStore_UpdateTxUnstartedToInProgress_Call { + return &EvmTxStore_UpdateTxUnstartedToInProgress_Call{Call: _e.mock.On("UpdateTxUnstartedToInProgress", ctx, etx, attempt)} +} + +func (_c *EvmTxStore_UpdateTxUnstartedToInProgress_Call) Run(run func(ctx context.Context, etx *types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], attempt *types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee])) *EvmTxStore_UpdateTxUnstartedToInProgress_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]), args[2].(*types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee])) + }) + return _c +} + +func (_c *EvmTxStore_UpdateTxUnstartedToInProgress_Call) Return(_a0 error) *EvmTxStore_UpdateTxUnstartedToInProgress_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvmTxStore_UpdateTxUnstartedToInProgress_Call) RunAndReturn(run func(context.Context, *types.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee], *types.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]) error) *EvmTxStore_UpdateTxUnstartedToInProgress_Call { + _c.Call.Return(run) + return _c +} + // UpdateTxsUnconfirmed provides a mock function with given fields: ctx, ids func (_m *EvmTxStore) UpdateTxsUnconfirmed(ctx context.Context, ids []int64) error { ret := _m.Called(ctx, ids) @@ -1510,6 +3263,35 @@ func (_m *EvmTxStore) UpdateTxsUnconfirmed(ctx context.Context, ids []int64) err return r0 } +// EvmTxStore_UpdateTxsUnconfirmed_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateTxsUnconfirmed' +type EvmTxStore_UpdateTxsUnconfirmed_Call struct { + *mock.Call +} + +// UpdateTxsUnconfirmed is a helper method to define mock.On call +// - ctx context.Context +// - ids []int64 +func (_e *EvmTxStore_Expecter) UpdateTxsUnconfirmed(ctx interface{}, ids interface{}) *EvmTxStore_UpdateTxsUnconfirmed_Call { + return &EvmTxStore_UpdateTxsUnconfirmed_Call{Call: _e.mock.On("UpdateTxsUnconfirmed", ctx, ids)} +} + +func (_c *EvmTxStore_UpdateTxsUnconfirmed_Call) Run(run func(ctx context.Context, ids []int64)) *EvmTxStore_UpdateTxsUnconfirmed_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]int64)) + }) + return _c +} + +func (_c *EvmTxStore_UpdateTxsUnconfirmed_Call) Return(_a0 error) *EvmTxStore_UpdateTxsUnconfirmed_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *EvmTxStore_UpdateTxsUnconfirmed_Call) RunAndReturn(run func(context.Context, []int64) error) *EvmTxStore_UpdateTxsUnconfirmed_Call { + _c.Call.Return(run) + return _c +} + // NewEvmTxStore creates a new instance of EvmTxStore. 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 NewEvmTxStore(t interface { diff --git a/core/chains/evm/txmgr/tracker_test.go b/core/chains/evm/txmgr/tracker_test.go index 904a10d48c3..3e5ab6ed2ef 100644 --- a/core/chains/evm/txmgr/tracker_test.go +++ b/core/chains/evm/txmgr/tracker_test.go @@ -2,6 +2,7 @@ package txmgr_test import ( "math/big" + "slices" "testing" "time" @@ -19,8 +20,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" ) -const waitTime = 5 * time.Millisecond - func newTestEvmTrackerSetup(t *testing.T) (*txmgr.Tracker, txmgr.TestEvmTxStore, keystore.Eth, []common.Address) { db := pgtest.NewSqlxDB(t) txStore := cltest.NewTestTxStore(t, db) @@ -81,11 +80,12 @@ func TestEvmTracker_AddressTracking(t *testing.T) { require.NoError(t, err) }(tracker) - time.Sleep(waitTime) - addrs := tracker.GetAbandonedAddresses() - require.NotContains(t, addrs, inProgressAddr) - require.NotContains(t, addrs, unstartedAddr) - require.Contains(t, addrs, unconfirmedAddr) + require.Eventually(t, func() bool { + addrs := tracker.GetAbandonedAddresses() + return !slices.Contains(addrs, inProgressAddr) && + !slices.Contains(addrs, unstartedAddr) && + slices.Contains(addrs, unconfirmedAddr) + }, tests.WaitTimeout(t), 100*time.Millisecond) }) /* TODO: finalized tx state https://smartcontract-it.atlassian.net/browse/BCI-2920 @@ -137,12 +137,15 @@ func TestEvmTracker_ExceedingTTL(t *testing.T) { require.NoError(t, err) }(tracker) - time.Sleep(100 * waitTime) - require.NotContains(t, tracker.GetAbandonedAddresses(), addr1, addr2) + require.Eventually(t, func() bool { + addrs := tracker.GetAbandonedAddresses() + return !slices.Contains(addrs, addr1) && !slices.Contains(addrs, addr2) + }, tests.WaitTimeout(t), 100*time.Millisecond) - fatalTxes, err := txStore.GetFatalTransactions(ctx) - require.NoError(t, err) - require.True(t, containsID(fatalTxes, tx1.ID)) - require.True(t, containsID(fatalTxes, tx2.ID)) + require.Eventually(t, func() bool { + fatalTxes, err := txStore.GetFatalTransactions(ctx) + require.NoError(t, err) + return containsID(fatalTxes, tx1.ID) && containsID(fatalTxes, tx2.ID) + }, tests.WaitTimeout(t), 100*time.Millisecond) }) } diff --git a/core/chains/evm/txmgr/txmgr_test.go b/core/chains/evm/txmgr/txmgr_test.go index dac0ef29cd8..40df5616c99 100644 --- a/core/chains/evm/txmgr/txmgr_test.go +++ b/core/chains/evm/txmgr/txmgr_test.go @@ -35,6 +35,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/forwarders" "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/headtracker" "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" @@ -59,7 +60,9 @@ func makeTestEvmTxm( RpcBatchSize: 2, KeepFinalizedBlocksDepth: 1000, } - lp := logpoller.NewLogPoller(logpoller.NewORM(testutils.FixtureChainID, db, lggr), ethClient, lggr, lpOpts) + + ht := headtracker.NewSimulatedHeadTracker(ethClient, lpOpts.UseFinalityTag, lpOpts.FinalityDepth) + lp := logpoller.NewLogPoller(logpoller.NewORM(testutils.FixtureChainID, db, lggr), ethClient, lggr, ht, lpOpts) // logic for building components (from evm/evm_txm.go) ------- lggr.Infow("Initializing EVM transaction manager", @@ -97,7 +100,8 @@ func TestTxm_SendNativeToken_DoesNotSendToZero(t *testing.T) { keyStore := cltest.NewKeyStore(t, db).Eth() ethClient := testutils.NewEthClientMockWithDefaultChain(t) - estimator := gas.NewEstimator(logger.Test(t), ethClient, config, evmConfig.GasEstimator()) + estimator, err := gas.NewEstimator(logger.Test(t), ethClient, config, evmConfig.GasEstimator()) + require.NoError(t, err) txm, err := makeTestEvmTxm(t, db, ethClient, estimator, evmConfig, evmConfig.GasEstimator(), evmConfig.Transactions(), dbConfig, dbConfig.Listener(), keyStore) require.NoError(t, err) @@ -122,7 +126,8 @@ func TestTxm_CreateTransaction(t *testing.T) { ethClient := testutils.NewEthClientMockWithDefaultChain(t) - estimator := gas.NewEstimator(logger.Test(t), ethClient, config, evmConfig.GasEstimator()) + estimator, err := gas.NewEstimator(logger.Test(t), ethClient, config, evmConfig.GasEstimator()) + require.NoError(t, err) txm, err := makeTestEvmTxm(t, db, ethClient, estimator, evmConfig, evmConfig.GasEstimator(), evmConfig.Transactions(), dbConfig, dbConfig.Listener(), kst.Eth()) require.NoError(t, err) @@ -403,7 +408,8 @@ func TestTxm_CreateTransaction_OutOfEth(t *testing.T) { config, dbConfig, evmConfig := txmgr.MakeTestConfigs(t) ethClient := testutils.NewEthClientMockWithDefaultChain(t) - estimator := gas.NewEstimator(logger.Test(t), ethClient, config, evmConfig.GasEstimator()) + estimator, err := gas.NewEstimator(logger.Test(t), ethClient, config, evmConfig.GasEstimator()) + require.NoError(t, err) txm, err := makeTestEvmTxm(t, db, ethClient, estimator, evmConfig, evmConfig.GasEstimator(), evmConfig.Transactions(), dbConfig, dbConfig.Listener(), etKeyStore) require.NoError(t, err) @@ -494,7 +500,8 @@ func TestTxm_Lifecycle(t *testing.T) { keyChangeCh := make(chan struct{}) unsub := cltest.NewAwaiter() kst.On("SubscribeToKeyChanges", mock.Anything).Return(keyChangeCh, unsub.ItHappened) - estimator := gas.NewEstimator(logger.Test(t), ethClient, config, evmConfig.GasEstimator()) + estimator, err := gas.NewEstimator(logger.Test(t), ethClient, config, evmConfig.GasEstimator()) + require.NoError(t, err) txm, err := makeTestEvmTxm(t, db, ethClient, estimator, evmConfig, evmConfig.GasEstimator(), evmConfig.Transactions(), dbConfig, dbConfig.Listener(), kst) require.NoError(t, err) @@ -549,7 +556,8 @@ func TestTxm_Reset(t *testing.T) { ethClient.On("PendingNonceAt", mock.Anything, addr).Return(uint64(128), nil).Maybe() ethClient.On("PendingNonceAt", mock.Anything, addr2).Return(uint64(44), nil).Maybe() - estimator := gas.NewEstimator(logger.Test(t), ethClient, cfg.EVM(), cfg.EVM().GasEstimator()) + estimator, err := gas.NewEstimator(logger.Test(t), ethClient, cfg.EVM(), cfg.EVM().GasEstimator()) + require.NoError(t, err) txm, err := makeTestEvmTxm(t, db, ethClient, estimator, cfg.EVM(), cfg.EVM().GasEstimator(), cfg.EVM().Transactions(), gcfg.Database(), gcfg.Database().Listener(), kst.Eth()) require.NoError(t, err) @@ -603,11 +611,11 @@ func TestTxm_GetTransactionStatus(t *testing.T) { ethClient.On("PendingNonceAt", mock.Anything, mock.Anything).Return(uint64(0), nil).Maybe() feeEstimator := gasmocks.NewEvmFeeEstimator(t) feeEstimator.On("Start", mock.Anything).Return(nil).Once() + feeEstimator.On("Close", mock.Anything).Return(nil).Once() feeEstimator.On("OnNewLongestChain", mock.Anything, mock.Anything).Once() txm, err := makeTestEvmTxm(t, db, ethClient, feeEstimator, cfg.EVM(), cfg.EVM().GasEstimator(), cfg.EVM().Transactions(), gcfg.Database(), gcfg.Database().Listener(), ethKeyStore) require.NoError(t, err) - err = txm.Start(ctx) - require.NoError(t, err) + servicetest.Run(t, txm) head := &evmtypes.Head{ Hash: utils.NewHash(), diff --git a/core/chains/evm/types/models.go b/core/chains/evm/types/models.go index 2af5b81ccf8..a9e5cd5841b 100644 --- a/core/chains/evm/types/models.go +++ b/core/chains/evm/types/models.go @@ -118,16 +118,23 @@ func (h *Head) IsInChain(blockHash common.Hash) bool { // HashAtHeight returns the hash of the block at the given height, if it is in the chain. // If not in chain, returns the zero hash func (h *Head) HashAtHeight(blockNum int64) common.Hash { - for { + headAtHeight, err := h.HeadAtHeight(blockNum) + if err != nil { + return common.Hash{} + } + + return headAtHeight.BlockHash() +} + +func (h *Head) HeadAtHeight(blockNum int64) (commontypes.Head[common.Hash], error) { + for h != nil { if h.Number == blockNum { - return h.Hash - } - if h.Parent == nil { - break + return h, nil } + h = h.Parent } - return common.Hash{} + return nil, fmt.Errorf("failed to find head at height %d", blockNum) } // ChainLength returns the length of the chain followed by recursively looking up parents diff --git a/core/chains/evm/types/models_test.go b/core/chains/evm/types/models_test.go index db7b876bb64..6018d68f962 100644 --- a/core/chains/evm/types/models_test.go +++ b/core/chains/evm/types/models_test.go @@ -247,6 +247,26 @@ func TestHead_EarliestInChain(t *testing.T) { assert.Equal(t, int64(1), head.EarliestInChain().BlockNumber()) } +func TestHead_HeadAtHeight(t *testing.T) { + expectedResult := &evmtypes.Head{ + Hash: common.BigToHash(big.NewInt(10)), + Number: 2, + Parent: &evmtypes.Head{ + Number: 1, + }, + } + head := evmtypes.Head{ + Number: 3, + Parent: expectedResult, + } + + headAtHeight, err := head.HeadAtHeight(2) + require.NoError(t, err) + assert.Equal(t, expectedResult, headAtHeight) + _, err = head.HeadAtHeight(0) + assert.Error(t, err, "expected to get an error if head is not in the chain") +} + func TestHead_IsInChain(t *testing.T) { hash1 := utils.NewHash() hash2 := utils.NewHash() diff --git a/core/chains/legacyevm/chain.go b/core/chains/legacyevm/chain.go index 1c94e3d7dfa..129c0318820 100644 --- a/core/chains/legacyevm/chain.go +++ b/core/chains/legacyevm/chain.go @@ -33,7 +33,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/logger" ) -//go:generate mockery --quiet --name Chain --output ./mocks/ --case=underscore type Chain interface { types.ChainService @@ -64,8 +63,6 @@ type LegacyChains struct { } // LegacyChainContainer is container for EVM chains. -// -//go:generate mockery --quiet --name LegacyChainContainer --output ./mocks/ --case=underscore type LegacyChainContainer interface { Get(id string) (Chain, error) Len() int @@ -245,7 +242,7 @@ 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, opts.DS, l), client, l, lpOpts) + logPoller = logpoller.NewLogPoller(logpoller.NewObservedORM(chainID, opts.DS, l), client, l, headTracker, lpOpts) } } diff --git a/core/chains/legacyevm/evm_txm.go b/core/chains/legacyevm/evm_txm.go index df1f4248ce2..cecfd4ffafe 100644 --- a/core/chains/legacyevm/evm_txm.go +++ b/core/chains/legacyevm/evm_txm.go @@ -43,7 +43,9 @@ func newEvmTxm( // build estimator from factory if opts.GenGasEstimator == nil { - estimator = gas.NewEstimator(lggr, client, cfg, cfg.GasEstimator()) + if estimator, err = gas.NewEstimator(lggr, client, cfg, cfg.GasEstimator()); err != nil { + return nil, nil, fmt.Errorf("failed to initialize estimator: %w", err) + } } else { estimator = opts.GenGasEstimator(chainID) } diff --git a/core/chains/legacyevm/mocks/chain.go b/core/chains/legacyevm/mocks/chain.go index 8f313ee45ef..777212108cf 100644 --- a/core/chains/legacyevm/mocks/chain.go +++ b/core/chains/legacyevm/mocks/chain.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -38,6 +38,14 @@ type Chain struct { mock.Mock } +type Chain_Expecter struct { + mock *mock.Mock +} + +func (_m *Chain) EXPECT() *Chain_Expecter { + return &Chain_Expecter{mock: &_m.Mock} +} + // BalanceMonitor provides a mock function with given fields: func (_m *Chain) BalanceMonitor() monitor.BalanceMonitor { ret := _m.Called() @@ -58,6 +66,33 @@ func (_m *Chain) BalanceMonitor() monitor.BalanceMonitor { return r0 } +// Chain_BalanceMonitor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BalanceMonitor' +type Chain_BalanceMonitor_Call struct { + *mock.Call +} + +// BalanceMonitor is a helper method to define mock.On call +func (_e *Chain_Expecter) BalanceMonitor() *Chain_BalanceMonitor_Call { + return &Chain_BalanceMonitor_Call{Call: _e.mock.On("BalanceMonitor")} +} + +func (_c *Chain_BalanceMonitor_Call) Run(run func()) *Chain_BalanceMonitor_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Chain_BalanceMonitor_Call) Return(_a0 monitor.BalanceMonitor) *Chain_BalanceMonitor_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Chain_BalanceMonitor_Call) RunAndReturn(run func() monitor.BalanceMonitor) *Chain_BalanceMonitor_Call { + _c.Call.Return(run) + return _c +} + // Client provides a mock function with given fields: func (_m *Chain) Client() client.Client { ret := _m.Called() @@ -78,6 +113,33 @@ func (_m *Chain) Client() client.Client { return r0 } +// Chain_Client_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Client' +type Chain_Client_Call struct { + *mock.Call +} + +// Client is a helper method to define mock.On call +func (_e *Chain_Expecter) Client() *Chain_Client_Call { + return &Chain_Client_Call{Call: _e.mock.On("Client")} +} + +func (_c *Chain_Client_Call) Run(run func()) *Chain_Client_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Chain_Client_Call) Return(_a0 client.Client) *Chain_Client_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Chain_Client_Call) RunAndReturn(run func() client.Client) *Chain_Client_Call { + _c.Call.Return(run) + return _c +} + // Close provides a mock function with given fields: func (_m *Chain) Close() error { ret := _m.Called() @@ -96,6 +158,33 @@ func (_m *Chain) Close() error { return r0 } +// Chain_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type Chain_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *Chain_Expecter) Close() *Chain_Close_Call { + return &Chain_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *Chain_Close_Call) Run(run func()) *Chain_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Chain_Close_Call) Return(_a0 error) *Chain_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Chain_Close_Call) RunAndReturn(run func() error) *Chain_Close_Call { + _c.Call.Return(run) + return _c +} + // Config provides a mock function with given fields: func (_m *Chain) Config() config.ChainScopedConfig { ret := _m.Called() @@ -116,6 +205,33 @@ func (_m *Chain) Config() config.ChainScopedConfig { return r0 } +// Chain_Config_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Config' +type Chain_Config_Call struct { + *mock.Call +} + +// Config is a helper method to define mock.On call +func (_e *Chain_Expecter) Config() *Chain_Config_Call { + return &Chain_Config_Call{Call: _e.mock.On("Config")} +} + +func (_c *Chain_Config_Call) Run(run func()) *Chain_Config_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Chain_Config_Call) Return(_a0 config.ChainScopedConfig) *Chain_Config_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Chain_Config_Call) RunAndReturn(run func() config.ChainScopedConfig) *Chain_Config_Call { + _c.Call.Return(run) + return _c +} + // GasEstimator provides a mock function with given fields: func (_m *Chain) GasEstimator() gas.EvmFeeEstimator { ret := _m.Called() @@ -136,6 +252,33 @@ func (_m *Chain) GasEstimator() gas.EvmFeeEstimator { return r0 } +// Chain_GasEstimator_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GasEstimator' +type Chain_GasEstimator_Call struct { + *mock.Call +} + +// GasEstimator is a helper method to define mock.On call +func (_e *Chain_Expecter) GasEstimator() *Chain_GasEstimator_Call { + return &Chain_GasEstimator_Call{Call: _e.mock.On("GasEstimator")} +} + +func (_c *Chain_GasEstimator_Call) Run(run func()) *Chain_GasEstimator_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Chain_GasEstimator_Call) Return(_a0 gas.EvmFeeEstimator) *Chain_GasEstimator_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Chain_GasEstimator_Call) RunAndReturn(run func() gas.EvmFeeEstimator) *Chain_GasEstimator_Call { + _c.Call.Return(run) + return _c +} + // GetChainStatus provides a mock function with given fields: ctx func (_m *Chain) GetChainStatus(ctx context.Context) (types.ChainStatus, error) { ret := _m.Called(ctx) @@ -164,6 +307,34 @@ func (_m *Chain) GetChainStatus(ctx context.Context) (types.ChainStatus, error) return r0, r1 } +// Chain_GetChainStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetChainStatus' +type Chain_GetChainStatus_Call struct { + *mock.Call +} + +// GetChainStatus is a helper method to define mock.On call +// - ctx context.Context +func (_e *Chain_Expecter) GetChainStatus(ctx interface{}) *Chain_GetChainStatus_Call { + return &Chain_GetChainStatus_Call{Call: _e.mock.On("GetChainStatus", ctx)} +} + +func (_c *Chain_GetChainStatus_Call) Run(run func(ctx context.Context)) *Chain_GetChainStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Chain_GetChainStatus_Call) Return(_a0 types.ChainStatus, _a1 error) *Chain_GetChainStatus_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Chain_GetChainStatus_Call) RunAndReturn(run func(context.Context) (types.ChainStatus, error)) *Chain_GetChainStatus_Call { + _c.Call.Return(run) + return _c +} + // HeadBroadcaster provides a mock function with given fields: func (_m *Chain) HeadBroadcaster() headtracker.HeadBroadcaster[*evmtypes.Head, common.Hash] { ret := _m.Called() @@ -184,6 +355,33 @@ func (_m *Chain) HeadBroadcaster() headtracker.HeadBroadcaster[*evmtypes.Head, c return r0 } +// Chain_HeadBroadcaster_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HeadBroadcaster' +type Chain_HeadBroadcaster_Call struct { + *mock.Call +} + +// HeadBroadcaster is a helper method to define mock.On call +func (_e *Chain_Expecter) HeadBroadcaster() *Chain_HeadBroadcaster_Call { + return &Chain_HeadBroadcaster_Call{Call: _e.mock.On("HeadBroadcaster")} +} + +func (_c *Chain_HeadBroadcaster_Call) Run(run func()) *Chain_HeadBroadcaster_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Chain_HeadBroadcaster_Call) Return(_a0 headtracker.HeadBroadcaster[*evmtypes.Head, common.Hash]) *Chain_HeadBroadcaster_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Chain_HeadBroadcaster_Call) RunAndReturn(run func() headtracker.HeadBroadcaster[*evmtypes.Head, common.Hash]) *Chain_HeadBroadcaster_Call { + _c.Call.Return(run) + return _c +} + // HeadTracker provides a mock function with given fields: func (_m *Chain) HeadTracker() headtracker.HeadTracker[*evmtypes.Head, common.Hash] { ret := _m.Called() @@ -204,6 +402,33 @@ func (_m *Chain) HeadTracker() headtracker.HeadTracker[*evmtypes.Head, common.Ha return r0 } +// Chain_HeadTracker_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HeadTracker' +type Chain_HeadTracker_Call struct { + *mock.Call +} + +// HeadTracker is a helper method to define mock.On call +func (_e *Chain_Expecter) HeadTracker() *Chain_HeadTracker_Call { + return &Chain_HeadTracker_Call{Call: _e.mock.On("HeadTracker")} +} + +func (_c *Chain_HeadTracker_Call) Run(run func()) *Chain_HeadTracker_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Chain_HeadTracker_Call) Return(_a0 headtracker.HeadTracker[*evmtypes.Head, common.Hash]) *Chain_HeadTracker_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Chain_HeadTracker_Call) RunAndReturn(run func() headtracker.HeadTracker[*evmtypes.Head, common.Hash]) *Chain_HeadTracker_Call { + _c.Call.Return(run) + return _c +} + // HealthReport provides a mock function with given fields: func (_m *Chain) HealthReport() map[string]error { ret := _m.Called() @@ -224,6 +449,33 @@ func (_m *Chain) HealthReport() map[string]error { return r0 } +// Chain_HealthReport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HealthReport' +type Chain_HealthReport_Call struct { + *mock.Call +} + +// HealthReport is a helper method to define mock.On call +func (_e *Chain_Expecter) HealthReport() *Chain_HealthReport_Call { + return &Chain_HealthReport_Call{Call: _e.mock.On("HealthReport")} +} + +func (_c *Chain_HealthReport_Call) Run(run func()) *Chain_HealthReport_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Chain_HealthReport_Call) Return(_a0 map[string]error) *Chain_HealthReport_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Chain_HealthReport_Call) RunAndReturn(run func() map[string]error) *Chain_HealthReport_Call { + _c.Call.Return(run) + return _c +} + // ID provides a mock function with given fields: func (_m *Chain) ID() *big.Int { ret := _m.Called() @@ -244,6 +496,33 @@ func (_m *Chain) ID() *big.Int { return r0 } +// Chain_ID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ID' +type Chain_ID_Call struct { + *mock.Call +} + +// ID is a helper method to define mock.On call +func (_e *Chain_Expecter) ID() *Chain_ID_Call { + return &Chain_ID_Call{Call: _e.mock.On("ID")} +} + +func (_c *Chain_ID_Call) Run(run func()) *Chain_ID_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Chain_ID_Call) Return(_a0 *big.Int) *Chain_ID_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Chain_ID_Call) RunAndReturn(run func() *big.Int) *Chain_ID_Call { + _c.Call.Return(run) + return _c +} + // ListNodeStatuses provides a mock function with given fields: ctx, pageSize, pageToken func (_m *Chain) ListNodeStatuses(ctx context.Context, pageSize int32, pageToken string) ([]types.NodeStatus, string, int, error) { ret := _m.Called(ctx, pageSize, pageToken) @@ -288,6 +567,36 @@ func (_m *Chain) ListNodeStatuses(ctx context.Context, pageSize int32, pageToken return r0, r1, r2, r3 } +// Chain_ListNodeStatuses_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListNodeStatuses' +type Chain_ListNodeStatuses_Call struct { + *mock.Call +} + +// ListNodeStatuses is a helper method to define mock.On call +// - ctx context.Context +// - pageSize int32 +// - pageToken string +func (_e *Chain_Expecter) ListNodeStatuses(ctx interface{}, pageSize interface{}, pageToken interface{}) *Chain_ListNodeStatuses_Call { + return &Chain_ListNodeStatuses_Call{Call: _e.mock.On("ListNodeStatuses", ctx, pageSize, pageToken)} +} + +func (_c *Chain_ListNodeStatuses_Call) Run(run func(ctx context.Context, pageSize int32, pageToken string)) *Chain_ListNodeStatuses_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int32), args[2].(string)) + }) + return _c +} + +func (_c *Chain_ListNodeStatuses_Call) Return(stats []types.NodeStatus, nextPageToken string, total int, err error) *Chain_ListNodeStatuses_Call { + _c.Call.Return(stats, nextPageToken, total, err) + return _c +} + +func (_c *Chain_ListNodeStatuses_Call) RunAndReturn(run func(context.Context, int32, string) ([]types.NodeStatus, string, int, error)) *Chain_ListNodeStatuses_Call { + _c.Call.Return(run) + return _c +} + // LogBroadcaster provides a mock function with given fields: func (_m *Chain) LogBroadcaster() log.Broadcaster { ret := _m.Called() @@ -308,6 +617,33 @@ func (_m *Chain) LogBroadcaster() log.Broadcaster { return r0 } +// Chain_LogBroadcaster_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LogBroadcaster' +type Chain_LogBroadcaster_Call struct { + *mock.Call +} + +// LogBroadcaster is a helper method to define mock.On call +func (_e *Chain_Expecter) LogBroadcaster() *Chain_LogBroadcaster_Call { + return &Chain_LogBroadcaster_Call{Call: _e.mock.On("LogBroadcaster")} +} + +func (_c *Chain_LogBroadcaster_Call) Run(run func()) *Chain_LogBroadcaster_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Chain_LogBroadcaster_Call) Return(_a0 log.Broadcaster) *Chain_LogBroadcaster_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Chain_LogBroadcaster_Call) RunAndReturn(run func() log.Broadcaster) *Chain_LogBroadcaster_Call { + _c.Call.Return(run) + return _c +} + // LogPoller provides a mock function with given fields: func (_m *Chain) LogPoller() logpoller.LogPoller { ret := _m.Called() @@ -328,6 +664,33 @@ func (_m *Chain) LogPoller() logpoller.LogPoller { return r0 } +// Chain_LogPoller_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LogPoller' +type Chain_LogPoller_Call struct { + *mock.Call +} + +// LogPoller is a helper method to define mock.On call +func (_e *Chain_Expecter) LogPoller() *Chain_LogPoller_Call { + return &Chain_LogPoller_Call{Call: _e.mock.On("LogPoller")} +} + +func (_c *Chain_LogPoller_Call) Run(run func()) *Chain_LogPoller_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Chain_LogPoller_Call) Return(_a0 logpoller.LogPoller) *Chain_LogPoller_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Chain_LogPoller_Call) RunAndReturn(run func() logpoller.LogPoller) *Chain_LogPoller_Call { + _c.Call.Return(run) + return _c +} + // Logger provides a mock function with given fields: func (_m *Chain) Logger() logger.Logger { ret := _m.Called() @@ -348,6 +711,33 @@ func (_m *Chain) Logger() logger.Logger { return r0 } +// Chain_Logger_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Logger' +type Chain_Logger_Call struct { + *mock.Call +} + +// Logger is a helper method to define mock.On call +func (_e *Chain_Expecter) Logger() *Chain_Logger_Call { + return &Chain_Logger_Call{Call: _e.mock.On("Logger")} +} + +func (_c *Chain_Logger_Call) Run(run func()) *Chain_Logger_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Chain_Logger_Call) Return(_a0 logger.Logger) *Chain_Logger_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Chain_Logger_Call) RunAndReturn(run func() logger.Logger) *Chain_Logger_Call { + _c.Call.Return(run) + return _c +} + // Name provides a mock function with given fields: func (_m *Chain) Name() string { ret := _m.Called() @@ -366,6 +756,33 @@ func (_m *Chain) Name() string { return r0 } +// Chain_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type Chain_Name_Call struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *Chain_Expecter) Name() *Chain_Name_Call { + return &Chain_Name_Call{Call: _e.mock.On("Name")} +} + +func (_c *Chain_Name_Call) Run(run func()) *Chain_Name_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Chain_Name_Call) Return(_a0 string) *Chain_Name_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Chain_Name_Call) RunAndReturn(run func() string) *Chain_Name_Call { + _c.Call.Return(run) + return _c +} + // Ready provides a mock function with given fields: func (_m *Chain) Ready() error { ret := _m.Called() @@ -384,6 +801,33 @@ func (_m *Chain) Ready() error { return r0 } +// Chain_Ready_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ready' +type Chain_Ready_Call struct { + *mock.Call +} + +// Ready is a helper method to define mock.On call +func (_e *Chain_Expecter) Ready() *Chain_Ready_Call { + return &Chain_Ready_Call{Call: _e.mock.On("Ready")} +} + +func (_c *Chain_Ready_Call) Run(run func()) *Chain_Ready_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Chain_Ready_Call) Return(_a0 error) *Chain_Ready_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Chain_Ready_Call) RunAndReturn(run func() error) *Chain_Ready_Call { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *Chain) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -402,6 +846,34 @@ func (_m *Chain) Start(_a0 context.Context) error { return r0 } +// Chain_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type Chain_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *Chain_Expecter) Start(_a0 interface{}) *Chain_Start_Call { + return &Chain_Start_Call{Call: _e.mock.On("Start", _a0)} +} + +func (_c *Chain_Start_Call) Run(run func(_a0 context.Context)) *Chain_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Chain_Start_Call) Return(_a0 error) *Chain_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Chain_Start_Call) RunAndReturn(run func(context.Context) error) *Chain_Start_Call { + _c.Call.Return(run) + return _c +} + // Transact provides a mock function with given fields: ctx, from, to, amount, balanceCheck func (_m *Chain) Transact(ctx context.Context, from string, to string, amount *big.Int, balanceCheck bool) error { ret := _m.Called(ctx, from, to, amount, balanceCheck) @@ -420,6 +892,38 @@ func (_m *Chain) Transact(ctx context.Context, from string, to string, amount *b return r0 } +// Chain_Transact_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Transact' +type Chain_Transact_Call struct { + *mock.Call +} + +// Transact is a helper method to define mock.On call +// - ctx context.Context +// - from string +// - to string +// - amount *big.Int +// - balanceCheck bool +func (_e *Chain_Expecter) Transact(ctx interface{}, from interface{}, to interface{}, amount interface{}, balanceCheck interface{}) *Chain_Transact_Call { + return &Chain_Transact_Call{Call: _e.mock.On("Transact", ctx, from, to, amount, balanceCheck)} +} + +func (_c *Chain_Transact_Call) Run(run func(ctx context.Context, from string, to string, amount *big.Int, balanceCheck bool)) *Chain_Transact_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(*big.Int), args[4].(bool)) + }) + return _c +} + +func (_c *Chain_Transact_Call) Return(_a0 error) *Chain_Transact_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Chain_Transact_Call) RunAndReturn(run func(context.Context, string, string, *big.Int, bool) error) *Chain_Transact_Call { + _c.Call.Return(run) + return _c +} + // TxManager provides a mock function with given fields: func (_m *Chain) TxManager() txmgr.TxManager[*big.Int, *evmtypes.Head, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee] { ret := _m.Called() @@ -440,6 +944,33 @@ func (_m *Chain) TxManager() txmgr.TxManager[*big.Int, *evmtypes.Head, common.Ad return r0 } +// Chain_TxManager_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TxManager' +type Chain_TxManager_Call struct { + *mock.Call +} + +// TxManager is a helper method to define mock.On call +func (_e *Chain_Expecter) TxManager() *Chain_TxManager_Call { + return &Chain_TxManager_Call{Call: _e.mock.On("TxManager")} +} + +func (_c *Chain_TxManager_Call) Run(run func()) *Chain_TxManager_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Chain_TxManager_Call) Return(_a0 txmgr.TxManager[*big.Int, *evmtypes.Head, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]) *Chain_TxManager_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Chain_TxManager_Call) RunAndReturn(run func() txmgr.TxManager[*big.Int, *evmtypes.Head, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]) *Chain_TxManager_Call { + _c.Call.Return(run) + return _c +} + // NewChain creates a new instance of Chain. 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 NewChain(t interface { diff --git a/core/chains/legacyevm/mocks/legacy_chain_container.go b/core/chains/legacyevm/mocks/legacy_chain_container.go index 527544de60d..4f9716e0a98 100644 --- a/core/chains/legacyevm/mocks/legacy_chain_container.go +++ b/core/chains/legacyevm/mocks/legacy_chain_container.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -14,6 +14,14 @@ type LegacyChainContainer struct { mock.Mock } +type LegacyChainContainer_Expecter struct { + mock *mock.Mock +} + +func (_m *LegacyChainContainer) EXPECT() *LegacyChainContainer_Expecter { + return &LegacyChainContainer_Expecter{mock: &_m.Mock} +} + // ChainNodeConfigs provides a mock function with given fields: func (_m *LegacyChainContainer) ChainNodeConfigs() types.Configs { ret := _m.Called() @@ -34,6 +42,33 @@ func (_m *LegacyChainContainer) ChainNodeConfigs() types.Configs { return r0 } +// LegacyChainContainer_ChainNodeConfigs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChainNodeConfigs' +type LegacyChainContainer_ChainNodeConfigs_Call struct { + *mock.Call +} + +// ChainNodeConfigs is a helper method to define mock.On call +func (_e *LegacyChainContainer_Expecter) ChainNodeConfigs() *LegacyChainContainer_ChainNodeConfigs_Call { + return &LegacyChainContainer_ChainNodeConfigs_Call{Call: _e.mock.On("ChainNodeConfigs")} +} + +func (_c *LegacyChainContainer_ChainNodeConfigs_Call) Run(run func()) *LegacyChainContainer_ChainNodeConfigs_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *LegacyChainContainer_ChainNodeConfigs_Call) Return(_a0 types.Configs) *LegacyChainContainer_ChainNodeConfigs_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LegacyChainContainer_ChainNodeConfigs_Call) RunAndReturn(run func() types.Configs) *LegacyChainContainer_ChainNodeConfigs_Call { + _c.Call.Return(run) + return _c +} + // Get provides a mock function with given fields: id func (_m *LegacyChainContainer) Get(id string) (legacyevm.Chain, error) { ret := _m.Called(id) @@ -64,6 +99,34 @@ func (_m *LegacyChainContainer) Get(id string) (legacyevm.Chain, error) { return r0, r1 } +// LegacyChainContainer_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type LegacyChainContainer_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - id string +func (_e *LegacyChainContainer_Expecter) Get(id interface{}) *LegacyChainContainer_Get_Call { + return &LegacyChainContainer_Get_Call{Call: _e.mock.On("Get", id)} +} + +func (_c *LegacyChainContainer_Get_Call) Run(run func(id string)) *LegacyChainContainer_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *LegacyChainContainer_Get_Call) Return(_a0 legacyevm.Chain, _a1 error) *LegacyChainContainer_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LegacyChainContainer_Get_Call) RunAndReturn(run func(string) (legacyevm.Chain, error)) *LegacyChainContainer_Get_Call { + _c.Call.Return(run) + return _c +} + // Len provides a mock function with given fields: func (_m *LegacyChainContainer) Len() int { ret := _m.Called() @@ -82,6 +145,33 @@ func (_m *LegacyChainContainer) Len() int { return r0 } +// LegacyChainContainer_Len_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Len' +type LegacyChainContainer_Len_Call struct { + *mock.Call +} + +// Len is a helper method to define mock.On call +func (_e *LegacyChainContainer_Expecter) Len() *LegacyChainContainer_Len_Call { + return &LegacyChainContainer_Len_Call{Call: _e.mock.On("Len")} +} + +func (_c *LegacyChainContainer_Len_Call) Run(run func()) *LegacyChainContainer_Len_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *LegacyChainContainer_Len_Call) Return(_a0 int) *LegacyChainContainer_Len_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LegacyChainContainer_Len_Call) RunAndReturn(run func() int) *LegacyChainContainer_Len_Call { + _c.Call.Return(run) + return _c +} + // List provides a mock function with given fields: ids func (_m *LegacyChainContainer) List(ids ...string) ([]legacyevm.Chain, error) { _va := make([]interface{}, len(ids)) @@ -118,6 +208,41 @@ func (_m *LegacyChainContainer) List(ids ...string) ([]legacyevm.Chain, error) { return r0, r1 } +// LegacyChainContainer_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' +type LegacyChainContainer_List_Call struct { + *mock.Call +} + +// List is a helper method to define mock.On call +// - ids ...string +func (_e *LegacyChainContainer_Expecter) List(ids ...interface{}) *LegacyChainContainer_List_Call { + return &LegacyChainContainer_List_Call{Call: _e.mock.On("List", + append([]interface{}{}, ids...)...)} +} + +func (_c *LegacyChainContainer_List_Call) Run(run func(ids ...string)) *LegacyChainContainer_List_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]string, len(args)-0) + for i, a := range args[0:] { + if a != nil { + variadicArgs[i] = a.(string) + } + } + run(variadicArgs...) + }) + return _c +} + +func (_c *LegacyChainContainer_List_Call) Return(_a0 []legacyevm.Chain, _a1 error) *LegacyChainContainer_List_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LegacyChainContainer_List_Call) RunAndReturn(run func(...string) ([]legacyevm.Chain, error)) *LegacyChainContainer_List_Call { + _c.Call.Return(run) + return _c +} + // Slice provides a mock function with given fields: func (_m *LegacyChainContainer) Slice() []legacyevm.Chain { ret := _m.Called() @@ -138,6 +263,33 @@ func (_m *LegacyChainContainer) Slice() []legacyevm.Chain { return r0 } +// LegacyChainContainer_Slice_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Slice' +type LegacyChainContainer_Slice_Call struct { + *mock.Call +} + +// Slice is a helper method to define mock.On call +func (_e *LegacyChainContainer_Expecter) Slice() *LegacyChainContainer_Slice_Call { + return &LegacyChainContainer_Slice_Call{Call: _e.mock.On("Slice")} +} + +func (_c *LegacyChainContainer_Slice_Call) Run(run func()) *LegacyChainContainer_Slice_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *LegacyChainContainer_Slice_Call) Return(_a0 []legacyevm.Chain) *LegacyChainContainer_Slice_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LegacyChainContainer_Slice_Call) RunAndReturn(run func() []legacyevm.Chain) *LegacyChainContainer_Slice_Call { + _c.Call.Return(run) + return _c +} + // NewLegacyChainContainer creates a new instance of LegacyChainContainer. 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 NewLegacyChainContainer(t interface { diff --git a/core/cmd/app.go b/core/cmd/app.go index 378f7e8bd64..1ccb3da9a01 100644 --- a/core/cmd/app.go +++ b/core/cmd/app.go @@ -194,8 +194,7 @@ func NewApp(s *Shell) *cli.App { keysCommand("Cosmos", NewCosmosKeysClient(s)), keysCommand("Solana", NewSolanaKeysClient(s)), keysCommand("StarkNet", NewStarkNetKeysClient(s)), - keysCommand("DKGSign", NewDKGSignKeysClient(s)), - keysCommand("DKGEncrypt", NewDKGEncryptKeysClient(s)), + keysCommand("Aptos", NewAptosKeysClient(s)), initVRFKeysSubCmd(s), }, diff --git a/core/cmd/aptos_keys_commands.go b/core/cmd/aptos_keys_commands.go new file mode 100644 index 00000000000..cabad347510 --- /dev/null +++ b/core/cmd/aptos_keys_commands.go @@ -0,0 +1,57 @@ +package cmd + +import ( + "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/aptoskey" + "github.com/smartcontractkit/chainlink/v2/core/web/presenters" +) + +type AptosKeyPresenter struct { + JAID + presenters.AptosKeyResource +} + +// RenderTable implements TableRenderer +func (p AptosKeyPresenter) RenderTable(rt RendererTable) error { + headers := []string{"ID", "Aptos Public Key"} + rows := [][]string{p.ToRow()} + + if _, err := rt.Write([]byte("🔑 Aptos Keys\n")); err != nil { + return err + } + renderList(headers, rows, rt.Writer) + + return utils.JustError(rt.Write([]byte("\n"))) +} + +func (p *AptosKeyPresenter) ToRow() []string { + row := []string{ + p.ID, + p.PubKey, + } + + return row +} + +type AptosKeyPresenters []AptosKeyPresenter + +// RenderTable implements TableRenderer +func (ps AptosKeyPresenters) RenderTable(rt RendererTable) error { + headers := []string{"ID", "Aptos Public Key"} + rows := [][]string{} + + for _, p := range ps { + rows = append(rows, p.ToRow()) + } + + if _, err := rt.Write([]byte("🔑 Aptos Keys\n")); err != nil { + return err + } + renderList(headers, rows, rt.Writer) + + return utils.JustError(rt.Write([]byte("\n"))) +} + +func NewAptosKeysClient(s *Shell) KeysClient { + return newKeysClient[aptoskey.Key, AptosKeyPresenter, AptosKeyPresenters]("Aptos", s) +} diff --git a/core/cmd/aptos_keys_commands_test.go b/core/cmd/aptos_keys_commands_test.go new file mode 100644 index 00000000000..c88a8e539a8 --- /dev/null +++ b/core/cmd/aptos_keys_commands_test.go @@ -0,0 +1,175 @@ +package cmd_test + +import ( + "bytes" + "context" + "flag" + "fmt" + "os" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/urfave/cli" + + "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink/v2/core/cmd" + "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" + "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/aptoskey" + "github.com/smartcontractkit/chainlink/v2/core/web/presenters" +) + +func TestAptosKeyPresenter_RenderTable(t *testing.T) { + t.Parallel() + + var ( + id = "1" + pubKey = "somepubkey" + buffer = bytes.NewBufferString("") + r = cmd.RendererTable{Writer: buffer} + ) + + p := cmd.AptosKeyPresenter{ + JAID: cmd.JAID{ID: id}, + AptosKeyResource: presenters.AptosKeyResource{ + JAID: presenters.NewJAID(id), + PubKey: pubKey, + }, + } + + // Render a single resource + require.NoError(t, p.RenderTable(r)) + + output := buffer.String() + assert.Contains(t, output, id) + assert.Contains(t, output, pubKey) + + // Render many resources + buffer.Reset() + ps := cmd.AptosKeyPresenters{p} + require.NoError(t, ps.RenderTable(r)) + + output = buffer.String() + assert.Contains(t, output, id) + assert.Contains(t, output, pubKey) +} + +func TestShell_AptosKeys(t *testing.T) { + app := startNewApplicationV2(t, nil) + ks := app.GetKeyStore().Aptos() + cleanup := func() { + ctx := context.Background() + keys, err := ks.GetAll() + require.NoError(t, err) + for _, key := range keys { + require.NoError(t, utils.JustError(ks.Delete(ctx, key.ID()))) + } + requireAptosKeyCount(t, app, 0) + } + + t.Run("ListAptosKeys", func(tt *testing.T) { + defer cleanup() + ctx := testutils.Context(t) + client, r := app.NewShellAndRenderer() + key, err := app.GetKeyStore().Aptos().Create(ctx) + require.NoError(t, err) + requireAptosKeyCount(t, app, 1) + assert.Nil(t, cmd.NewAptosKeysClient(client).ListKeys(cltest.EmptyCLIContext())) + require.Equal(t, 1, len(r.Renders)) + keys := *r.Renders[0].(*cmd.AptosKeyPresenters) + assert.True(t, key.PublicKeyStr() == keys[0].PubKey) + }) + + t.Run("CreateAptosKey", func(tt *testing.T) { + defer cleanup() + client, _ := app.NewShellAndRenderer() + require.NoError(t, cmd.NewAptosKeysClient(client).CreateKey(nilContext)) + keys, err := app.GetKeyStore().Aptos().GetAll() + require.NoError(t, err) + require.Len(t, keys, 1) + }) + + t.Run("DeleteAptosKey", func(tt *testing.T) { + defer cleanup() + ctx := testutils.Context(t) + client, _ := app.NewShellAndRenderer() + key, err := app.GetKeyStore().Aptos().Create(ctx) + require.NoError(t, err) + requireAptosKeyCount(t, app, 1) + set := flag.NewFlagSet("test", 0) + flagSetApplyFromAction(cmd.NewAptosKeysClient(client).DeleteKey, set, "aptos") + + require.NoError(tt, set.Set("yes", "true")) + + strID := key.ID() + err = set.Parse([]string{strID}) + require.NoError(t, err) + c := cli.NewContext(nil, set, nil) + err = cmd.NewAptosKeysClient(client).DeleteKey(c) + require.NoError(t, err) + requireAptosKeyCount(t, app, 0) + }) + + t.Run("ImportExportAptosKey", func(tt *testing.T) { + defer cleanup() + defer deleteKeyExportFile(t) + ctx := testutils.Context(t) + client, _ := app.NewShellAndRenderer() + + _, err := app.GetKeyStore().Aptos().Create(ctx) + require.NoError(t, err) + + keys := requireAptosKeyCount(t, app, 1) + key := keys[0] + keyName := keyNameForTest(t) + + // Export test invalid id + set := flag.NewFlagSet("test Aptos export", 0) + flagSetApplyFromAction(cmd.NewAptosKeysClient(client).ExportKey, set, "aptos") + + require.NoError(tt, set.Parse([]string{"0"})) + require.NoError(tt, set.Set("new-password", "../internal/fixtures/incorrect_password.txt")) + require.NoError(tt, set.Set("output", keyName)) + + c := cli.NewContext(nil, set, nil) + err = cmd.NewAptosKeysClient(client).ExportKey(c) + require.Error(t, err, "Error exporting") + require.Error(t, utils.JustError(os.Stat(keyName))) + + // Export test + set = flag.NewFlagSet("test Aptos export", 0) + flagSetApplyFromAction(cmd.NewAptosKeysClient(client).ExportKey, set, "aptos") + + require.NoError(tt, set.Parse([]string{fmt.Sprint(key.ID())})) + require.NoError(tt, set.Set("new-password", "../internal/fixtures/incorrect_password.txt")) + require.NoError(tt, set.Set("output", keyName)) + + c = cli.NewContext(nil, set, nil) + + require.NoError(t, cmd.NewAptosKeysClient(client).ExportKey(c)) + require.NoError(t, utils.JustError(os.Stat(keyName))) + + require.NoError(t, utils.JustError(app.GetKeyStore().Aptos().Delete(ctx, key.ID()))) + requireAptosKeyCount(t, app, 0) + + set = flag.NewFlagSet("test Aptos import", 0) + flagSetApplyFromAction(cmd.NewAptosKeysClient(client).ImportKey, set, "aptos") + + require.NoError(tt, set.Parse([]string{keyName})) + require.NoError(tt, set.Set("old-password", "../internal/fixtures/incorrect_password.txt")) + c = cli.NewContext(nil, set, nil) + require.NoError(t, cmd.NewAptosKeysClient(client).ImportKey(c)) + + requireAptosKeyCount(t, app, 1) + }) +} + +func requireAptosKeyCount(t *testing.T, app chainlink.Application, length int) []aptoskey.Key { + t.Helper() + keys, err := app.GetKeyStore().Aptos().GetAll() + require.NoError(t, err) + require.Len(t, keys, length) + return keys +} diff --git a/core/cmd/dkgencrypt_keys_commands.go b/core/cmd/dkgencrypt_keys_commands.go deleted file mode 100644 index ddcc80a33be..00000000000 --- a/core/cmd/dkgencrypt_keys_commands.go +++ /dev/null @@ -1,60 +0,0 @@ -package cmd - -import ( - "github.com/smartcontractkit/chainlink-common/pkg/utils" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/dkgsignkey" - "github.com/smartcontractkit/chainlink/v2/core/web/presenters" -) - -type DKGEncryptKeyPresenter struct { - JAID - presenters.DKGEncryptKeyResource -} - -var _ TableRenderer = DKGEncryptKeyPresenter{} -var _ TableRenderer = DKGEncryptKeyPresenters{} - -// RenderTable implements TableRenderer -func (p DKGEncryptKeyPresenter) RenderTable(rt RendererTable) error { - headers := []string{"ID", "Public key"} - rows := [][]string{p.ToRow()} - - if _, err := rt.Write([]byte("🔑 DKGEncrypt Keys\n")); err != nil { - return err - } - renderList(headers, rows, rt.Writer) - - return utils.JustError(rt.Write([]byte("\n"))) -} - -func (p *DKGEncryptKeyPresenter) ToRow() []string { - row := []string{ - p.ID, - p.PublicKey, - } - - return row -} - -type DKGEncryptKeyPresenters []DKGEncryptKeyPresenter - -// RenderTable implements TableRenderer -func (ps DKGEncryptKeyPresenters) RenderTable(rt RendererTable) error { - headers := []string{"ID", "Public key"} - rows := [][]string{} - - for _, p := range ps { - rows = append(rows, p.ToRow()) - } - - if _, err := rt.Write([]byte("🔑 DKGEncrypt Keys\n")); err != nil { - return err - } - renderList(headers, rows, rt.Writer) - - return utils.JustError(rt.Write([]byte("\n"))) -} - -func NewDKGEncryptKeysClient(s *Shell) KeysClient { - return newKeysClient[dkgsignkey.Key, DKGEncryptKeyPresenter, DKGEncryptKeyPresenters]("DKGEncrypt", s) -} diff --git a/core/cmd/dkgencrypt_keys_commands_test.go b/core/cmd/dkgencrypt_keys_commands_test.go deleted file mode 100644 index 7b0de4f7774..00000000000 --- a/core/cmd/dkgencrypt_keys_commands_test.go +++ /dev/null @@ -1,178 +0,0 @@ -package cmd_test - -import ( - "bytes" - "context" - "flag" - "fmt" - "os" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/urfave/cli" - - "github.com/smartcontractkit/chainlink-common/pkg/utils" - "github.com/smartcontractkit/chainlink/v2/core/cmd" - "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" - "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/dkgencryptkey" - "github.com/smartcontractkit/chainlink/v2/core/web/presenters" -) - -func TestDKGEncryptKeyPresenter_RenderTable(t *testing.T) { - t.Parallel() - - var ( - id = "1" - pubKey = "somepubkey" - buffer = bytes.NewBufferString("") - r = cmd.RendererTable{Writer: buffer} - ) - - p := cmd.DKGEncryptKeyPresenter{ - JAID: cmd.JAID{ID: id}, - DKGEncryptKeyResource: presenters.DKGEncryptKeyResource{ - JAID: presenters.NewJAID(id), - PublicKey: pubKey, - }, - } - - // Render a single resource - require.NoError(t, p.RenderTable(r)) - - output := buffer.String() - assert.Contains(t, output, id) - assert.Contains(t, output, pubKey) - - // Render many resources - buffer.Reset() - ps := cmd.DKGEncryptKeyPresenters{p} - require.NoError(t, ps.RenderTable(r)) - - output = buffer.String() - assert.Contains(t, output, id) - assert.Contains(t, output, pubKey) -} - -func TestShell_DKGEncryptKeys(t *testing.T) { - app := startNewApplicationV2(t, nil) - ks := app.GetKeyStore().DKGEncrypt() - cleanup := func() { - ctx := context.Background() - keys, err := ks.GetAll() - assert.NoError(t, err) - for _, key := range keys { - assert.NoError(t, utils.JustError(ks.Delete(ctx, key.ID()))) - } - requireDKGEncryptKeyCount(t, app, 0) - } - - t.Run("ListDKGEncryptKeys", func(tt *testing.T) { - defer cleanup() - ctx := testutils.Context(t) - client, r := app.NewShellAndRenderer() - key, err := app.GetKeyStore().DKGEncrypt().Create(ctx) - assert.NoError(tt, err) - requireDKGEncryptKeyCount(t, app, 1) - assert.Nil(t, cmd.NewDKGEncryptKeysClient(client).ListKeys(cltest.EmptyCLIContext())) - assert.Equal(t, 1, len(r.Renders)) - keys := *r.Renders[0].(*cmd.DKGEncryptKeyPresenters) - assert.True(t, key.PublicKeyString() == keys[0].PublicKey) - }) - - t.Run("CreateDKGEncryptKey", func(tt *testing.T) { - defer cleanup() - client, _ := app.NewShellAndRenderer() - assert.NoError(tt, cmd.NewDKGEncryptKeysClient(client).CreateKey(nilContext)) - keys, err := app.GetKeyStore().DKGEncrypt().GetAll() - assert.NoError(tt, err) - assert.Len(t, keys, 1) - }) - - t.Run("DeleteDKGEncryptKey", func(tt *testing.T) { - defer cleanup() - ctx := testutils.Context(t) - client, _ := app.NewShellAndRenderer() - key, err := app.GetKeyStore().DKGEncrypt().Create(ctx) - assert.NoError(tt, err) - requireDKGEncryptKeyCount(tt, app, 1) - set := flag.NewFlagSet("test", 0) - flagSetApplyFromAction(cmd.NewDKGEncryptKeysClient(client).DeleteKey, set, "") - - require.NoError(tt, set.Set("yes", "true")) - - strID := key.ID() - err = set.Parse([]string{strID}) - require.NoError(t, err) - c := cli.NewContext(nil, set, nil) - err = cmd.NewDKGEncryptKeysClient(client).DeleteKey(c) - assert.NoError(tt, err) - requireDKGEncryptKeyCount(tt, app, 0) - }) - - t.Run("ImportExportDKGEncryptKey", func(tt *testing.T) { - defer cleanup() - defer deleteKeyExportFile(tt) - ctx := testutils.Context(t) - client, _ := app.NewShellAndRenderer() - - _, err := app.GetKeyStore().DKGEncrypt().Create(ctx) - require.NoError(tt, err) - - keys := requireDKGEncryptKeyCount(tt, app, 1) - key := keys[0] - t.Log("key id:", key.ID()) - keyName := keyNameForTest(t) - - // Export test invalid id - set := flag.NewFlagSet("test DKGEncrypt export", 0) - flagSetApplyFromAction(cmd.NewDKGEncryptKeysClient(client).ExportKey, set, "") - - require.NoError(tt, set.Parse([]string{"0"})) - require.NoError(tt, set.Set("new-password", "../internal/fixtures/incorrect_password.txt")) - require.NoError(tt, set.Set("output", keyName)) - - c := cli.NewContext(nil, set, nil) - err = cmd.NewDKGEncryptKeysClient(client).ExportKey(c) - require.Error(tt, err, "Error exporting") - require.Error(tt, utils.JustError(os.Stat(keyName))) - - // Export test - set = flag.NewFlagSet("test DKGEncrypt export", 0) - flagSetApplyFromAction(cmd.NewDKGEncryptKeysClient(client).ExportKey, set, "") - - require.NoError(tt, set.Parse([]string{fmt.Sprint(key.ID())})) - require.NoError(tt, set.Set("new-password", "../internal/fixtures/incorrect_password.txt")) - require.NoError(tt, set.Set("output", keyName)) - - c = cli.NewContext(nil, set, nil) - - require.NoError(tt, cmd.NewDKGEncryptKeysClient(client).ExportKey(c)) - require.NoError(tt, utils.JustError(os.Stat(keyName))) - - require.NoError(tt, utils.JustError(app.GetKeyStore().DKGEncrypt().Delete(ctx, key.ID()))) - requireDKGEncryptKeyCount(tt, app, 0) - - //Import test - set = flag.NewFlagSet("test DKGEncrypt import", 0) - flagSetApplyFromAction(cmd.NewDKGEncryptKeysClient(client).ImportKey, set, "") - - require.NoError(tt, set.Parse([]string{keyName})) - require.NoError(tt, set.Set("old-password", "../internal/fixtures/incorrect_password.txt")) - - c = cli.NewContext(nil, set, nil) - require.NoError(tt, cmd.NewDKGEncryptKeysClient(client).ImportKey(c)) - - requireDKGEncryptKeyCount(tt, app, 1) - }) -} - -func requireDKGEncryptKeyCount(t *testing.T, app chainlink.Application, length int) []dkgencryptkey.Key { - t.Helper() - keys, err := app.GetKeyStore().DKGEncrypt().GetAll() - require.NoError(t, err) - require.Len(t, keys, length) - return keys -} diff --git a/core/cmd/dkgsign_keys_commands.go b/core/cmd/dkgsign_keys_commands.go deleted file mode 100644 index b0435450e32..00000000000 --- a/core/cmd/dkgsign_keys_commands.go +++ /dev/null @@ -1,60 +0,0 @@ -package cmd - -import ( - "github.com/smartcontractkit/chainlink-common/pkg/utils" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/dkgsignkey" - "github.com/smartcontractkit/chainlink/v2/core/web/presenters" -) - -type DKGSignKeyPresenter struct { - JAID - presenters.DKGSignKeyResource -} - -var _ TableRenderer = DKGSignKeyPresenter{} -var _ TableRenderer = DKGSignKeyPresenters{} - -// RenderTable implements TableRenderer -func (p DKGSignKeyPresenter) RenderTable(rt RendererTable) error { - headers := []string{"ID", "Public key"} - rows := [][]string{p.ToRow()} - - if _, err := rt.Write([]byte("🔑 DKGSign Keys\n")); err != nil { - return err - } - renderList(headers, rows, rt.Writer) - - return utils.JustError(rt.Write([]byte("\n"))) -} - -func (p *DKGSignKeyPresenter) ToRow() []string { - row := []string{ - p.ID, - p.PublicKey, - } - - return row -} - -type DKGSignKeyPresenters []DKGSignKeyPresenter - -// RenderTable implements TableRenderer -func (ps DKGSignKeyPresenters) RenderTable(rt RendererTable) error { - headers := []string{"ID", "Public key"} - rows := [][]string{} - - for _, p := range ps { - rows = append(rows, p.ToRow()) - } - - if _, err := rt.Write([]byte("🔑 DKGSign Keys\n")); err != nil { - return err - } - renderList(headers, rows, rt.Writer) - - return utils.JustError(rt.Write([]byte("\n"))) -} - -func NewDKGSignKeysClient(s *Shell) KeysClient { - return newKeysClient[dkgsignkey.Key, DKGSignKeyPresenter, DKGSignKeyPresenters]("DKGSign", s) -} diff --git a/core/cmd/dkgsign_keys_commands_test.go b/core/cmd/dkgsign_keys_commands_test.go deleted file mode 100644 index 777e8a0a3c3..00000000000 --- a/core/cmd/dkgsign_keys_commands_test.go +++ /dev/null @@ -1,176 +0,0 @@ -package cmd_test - -import ( - "bytes" - "context" - "flag" - "fmt" - "os" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/urfave/cli" - - "github.com/smartcontractkit/chainlink-common/pkg/utils" - "github.com/smartcontractkit/chainlink/v2/core/cmd" - "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" - "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/dkgsignkey" - "github.com/smartcontractkit/chainlink/v2/core/web/presenters" -) - -func TestDKGSignKeyPresenter_RenderTable(t *testing.T) { - t.Parallel() - - var ( - id = "1" - pubKey = "somepubkey" - buffer = bytes.NewBufferString("") - r = cmd.RendererTable{Writer: buffer} - ) - - p := cmd.DKGSignKeyPresenter{ - JAID: cmd.JAID{ID: id}, - DKGSignKeyResource: presenters.DKGSignKeyResource{ - JAID: presenters.NewJAID(id), - PublicKey: pubKey, - }, - } - - // Render a single resource - require.NoError(t, p.RenderTable(r)) - - output := buffer.String() - assert.Contains(t, output, id) - assert.Contains(t, output, pubKey) - - // Render many resources - buffer.Reset() - ps := cmd.DKGSignKeyPresenters{p} - require.NoError(t, ps.RenderTable(r)) - - output = buffer.String() - assert.Contains(t, output, id) - assert.Contains(t, output, pubKey) -} - -func TestShell_DKGSignKeys(t *testing.T) { - app := startNewApplicationV2(t, nil) - ks := app.GetKeyStore().DKGSign() - cleanup := func() { - ctx := context.Background() - keys, err := ks.GetAll() - assert.NoError(t, err) - for _, key := range keys { - assert.NoError(t, utils.JustError(ks.Delete(ctx, key.ID()))) - } - requireDKGSignKeyCount(t, app, 0) - } - - t.Run("ListDKGSignKeys", func(tt *testing.T) { - defer cleanup() - ctx := testutils.Context(t) - client, r := app.NewShellAndRenderer() - key, err := app.GetKeyStore().DKGSign().Create(ctx) - assert.NoError(tt, err) - requireDKGSignKeyCount(t, app, 1) - assert.Nil(t, cmd.NewDKGSignKeysClient(client).ListKeys(cltest.EmptyCLIContext())) - assert.Equal(t, 1, len(r.Renders)) - keys := *r.Renders[0].(*cmd.DKGSignKeyPresenters) - assert.True(t, key.PublicKeyString() == keys[0].PublicKey) - }) - - t.Run("CreateDKGSignKey", func(tt *testing.T) { - defer cleanup() - client, _ := app.NewShellAndRenderer() - assert.NoError(tt, cmd.NewDKGSignKeysClient(client).CreateKey(nilContext)) - keys, err := app.GetKeyStore().DKGSign().GetAll() - assert.NoError(tt, err) - assert.Len(t, keys, 1) - }) - - t.Run("DeleteDKGSignKey", func(tt *testing.T) { - defer cleanup() - ctx := testutils.Context(t) - client, _ := app.NewShellAndRenderer() - key, err := app.GetKeyStore().DKGSign().Create(ctx) - assert.NoError(tt, err) - requireDKGSignKeyCount(tt, app, 1) - set := flag.NewFlagSet("test", 0) - flagSetApplyFromAction(cmd.NewDKGSignKeysClient(client).DeleteKey, set, "") - - require.NoError(tt, set.Set("yes", "true")) - strID := key.ID() - err = set.Parse([]string{strID}) - require.NoError(t, err) - c := cli.NewContext(nil, set, nil) - err = cmd.NewDKGSignKeysClient(client).DeleteKey(c) - assert.NoError(tt, err) - requireDKGSignKeyCount(tt, app, 0) - }) - - t.Run("ImportExportDKGSignKey", func(tt *testing.T) { - defer cleanup() - defer deleteKeyExportFile(tt) - ctx := testutils.Context(t) - client, _ := app.NewShellAndRenderer() - - _, err := app.GetKeyStore().DKGSign().Create(ctx) - require.NoError(tt, err) - - keys := requireDKGSignKeyCount(tt, app, 1) - key := keys[0] - t.Log("key id:", key.ID()) - keyName := keyNameForTest(t) - - // Export test invalid id - set := flag.NewFlagSet("test DKGSign export", 0) - flagSetApplyFromAction(cmd.NewDKGSignKeysClient(client).ExportKey, set, "") - - require.NoError(tt, set.Parse([]string{"0"})) - require.NoError(tt, set.Set("new-password", "../internal/fixtures/incorrect_password.txt")) - require.NoError(tt, set.Set("output", keyName)) - - c := cli.NewContext(nil, set, nil) - err = cmd.NewDKGSignKeysClient(client).ExportKey(c) - require.Error(tt, err) - require.Error(tt, utils.JustError(os.Stat(keyName))) - - // Export test - set = flag.NewFlagSet("test DKGSign export", 0) - flagSetApplyFromAction(cmd.NewDKGSignKeysClient(client).ExportKey, set, "") - - require.NoError(tt, set.Parse([]string{fmt.Sprint(key.ID())})) - require.NoError(tt, set.Set("new-password", "../internal/fixtures/incorrect_password.txt")) - require.NoError(tt, set.Set("output", keyName)) - - c = cli.NewContext(nil, set, nil) - - require.NoError(tt, cmd.NewDKGSignKeysClient(client).ExportKey(c)) - require.NoError(tt, utils.JustError(os.Stat(keyName))) - - require.NoError(tt, utils.JustError(app.GetKeyStore().DKGSign().Delete(ctx, key.ID()))) - requireDKGSignKeyCount(tt, app, 0) - - set = flag.NewFlagSet("test DKGSign import", 0) - flagSetApplyFromAction(cmd.NewDKGSignKeysClient(client).ImportKey, set, "") - - require.NoError(tt, set.Parse([]string{keyName})) - require.NoError(tt, set.Set("old-password", "../internal/fixtures/incorrect_password.txt")) - - c = cli.NewContext(nil, set, nil) - require.NoError(tt, cmd.NewDKGSignKeysClient(client).ImportKey(c)) - - requireDKGSignKeyCount(tt, app, 1) - }) -} - -func requireDKGSignKeyCount(t *testing.T, app chainlink.Application, length int) []dkgsignkey.Key { - t.Helper() - keys, err := app.GetKeyStore().DKGSign().GetAll() - require.NoError(t, err) - require.Len(t, keys, length) - return keys -} diff --git a/core/cmd/mocks/prompter.go b/core/cmd/mocks/prompter.go index 38c1d327fb3..f13deacdbc9 100644 --- a/core/cmd/mocks/prompter.go +++ b/core/cmd/mocks/prompter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -9,6 +9,14 @@ type Prompter struct { mock.Mock } +type Prompter_Expecter struct { + mock *mock.Mock +} + +func (_m *Prompter) EXPECT() *Prompter_Expecter { + return &Prompter_Expecter{mock: &_m.Mock} +} + // IsTerminal provides a mock function with given fields: func (_m *Prompter) IsTerminal() bool { ret := _m.Called() @@ -27,6 +35,33 @@ func (_m *Prompter) IsTerminal() bool { return r0 } +// Prompter_IsTerminal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsTerminal' +type Prompter_IsTerminal_Call struct { + *mock.Call +} + +// IsTerminal is a helper method to define mock.On call +func (_e *Prompter_Expecter) IsTerminal() *Prompter_IsTerminal_Call { + return &Prompter_IsTerminal_Call{Call: _e.mock.On("IsTerminal")} +} + +func (_c *Prompter_IsTerminal_Call) Run(run func()) *Prompter_IsTerminal_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Prompter_IsTerminal_Call) Return(_a0 bool) *Prompter_IsTerminal_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Prompter_IsTerminal_Call) RunAndReturn(run func() bool) *Prompter_IsTerminal_Call { + _c.Call.Return(run) + return _c +} + // PasswordPrompt provides a mock function with given fields: _a0 func (_m *Prompter) PasswordPrompt(_a0 string) string { ret := _m.Called(_a0) @@ -45,6 +80,34 @@ func (_m *Prompter) PasswordPrompt(_a0 string) string { return r0 } +// Prompter_PasswordPrompt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PasswordPrompt' +type Prompter_PasswordPrompt_Call struct { + *mock.Call +} + +// PasswordPrompt is a helper method to define mock.On call +// - _a0 string +func (_e *Prompter_Expecter) PasswordPrompt(_a0 interface{}) *Prompter_PasswordPrompt_Call { + return &Prompter_PasswordPrompt_Call{Call: _e.mock.On("PasswordPrompt", _a0)} +} + +func (_c *Prompter_PasswordPrompt_Call) Run(run func(_a0 string)) *Prompter_PasswordPrompt_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *Prompter_PasswordPrompt_Call) Return(_a0 string) *Prompter_PasswordPrompt_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Prompter_PasswordPrompt_Call) RunAndReturn(run func(string) string) *Prompter_PasswordPrompt_Call { + _c.Call.Return(run) + return _c +} + // Prompt provides a mock function with given fields: _a0 func (_m *Prompter) Prompt(_a0 string) string { ret := _m.Called(_a0) @@ -63,6 +126,34 @@ func (_m *Prompter) Prompt(_a0 string) string { return r0 } +// Prompter_Prompt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Prompt' +type Prompter_Prompt_Call struct { + *mock.Call +} + +// Prompt is a helper method to define mock.On call +// - _a0 string +func (_e *Prompter_Expecter) Prompt(_a0 interface{}) *Prompter_Prompt_Call { + return &Prompter_Prompt_Call{Call: _e.mock.On("Prompt", _a0)} +} + +func (_c *Prompter_Prompt_Call) Run(run func(_a0 string)) *Prompter_Prompt_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *Prompter_Prompt_Call) Return(_a0 string) *Prompter_Prompt_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Prompter_Prompt_Call) RunAndReturn(run func(string) string) *Prompter_Prompt_Call { + _c.Call.Return(run) + return _c +} + // NewPrompter creates a new instance of Prompter. 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 NewPrompter(t interface { diff --git a/core/cmd/ocr2vrf_configure_commands.go b/core/cmd/ocr2vrf_configure_commands.go deleted file mode 100644 index 7f5b0321480..00000000000 --- a/core/cmd/ocr2vrf_configure_commands.go +++ /dev/null @@ -1,509 +0,0 @@ -package cmd - -import ( - "context" - "encoding/hex" - "fmt" - "math/big" - "time" - - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/ethclient" - "github.com/pelletier/go-toml" - "github.com/pkg/errors" - "github.com/urfave/cli" - - "github.com/jmoiron/sqlx" - - "github.com/smartcontractkit/chainlink/v2/core/chains/evm/forwarders" - 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/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" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/chaintype" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocr2key" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" - "github.com/smartcontractkit/chainlink/v2/core/static" - "github.com/smartcontractkit/chainlink/v2/core/utils" -) - -type SetupOCR2VRFNodePayload struct { - OnChainPublicKey string - OffChainPublicKey string - ConfigPublicKey string - PeerID string - Transmitter string - DkgEncrypt string - DkgSign string - SendingKeys []string -} - -type dkgTemplateArgs struct { - contractID string - ocrKeyBundleID string - p2pv2BootstrapperPeerID string - p2pv2BootstrapperPort string - transmitterID string - useForwarder bool - chainID int64 - encryptionPublicKey string - keyID string - signingPublicKey string -} - -type ocr2vrfTemplateArgs struct { - dkgTemplateArgs - vrfBeaconAddress string - vrfCoordinatorAddress string - linkEthFeedAddress string - sendingKeys []string -} - -const DKGTemplate = ` -# DKGSpec -type = "offchainreporting2" -schemaVersion = 1 -name = "ocr2" -maxTaskDuration = "30s" -contractID = "%s" -ocrKeyBundleID = "%s" -relay = "evm" -pluginType = "dkg" -transmitterID = "%s" -forwardingAllowed = %t -%s - -[relayConfig] -chainID = %d - -[pluginConfig] -EncryptionPublicKey = "%s" -KeyID = "%s" -SigningPublicKey = "%s" -` - -const OCR2VRFTemplate = ` -type = "offchainreporting2" -schemaVersion = 1 -name = "ocr2vrf-chainID-%d" -maxTaskDuration = "30s" -contractID = "%s" -ocrKeyBundleID = "%s" -relay = "evm" -pluginType = "ocr2vrf" -transmitterID = "%s" -forwardingAllowed = %t -%s - -[relayConfig] -chainID = %d -sendingKeys = [%s] - -[pluginConfig] -dkgEncryptionPublicKey = "%s" -dkgSigningPublicKey = "%s" -dkgKeyID = "%s" -dkgContractAddress = "%s" - -vrfCoordinatorAddress = "%s" -linkEthFeedAddress = "%s" -` - -const BootstrapTemplate = ` -type = "bootstrap" -schemaVersion = 1 -name = "bootstrap-chainID-%d" -id = "1" -contractID = "%s" -relay = "evm" - -[relayConfig] -chainID = %d -` - -const forwarderAdditionalEOACount = 4 - -func (s *Shell) ConfigureOCR2VRFNode(c *cli.Context, owner *bind.TransactOpts, ec *ethclient.Client) (*SetupOCR2VRFNodePayload, error) { - ctx := s.ctx() - lggr := logger.Sugared(s.Logger.Named("ConfigureOCR2VRFNode")) - lggr.Infow( - fmt.Sprintf("Configuring Chainlink Node for job type %s %s at commit %s", c.String("job-type"), static.Version, static.Sha), - "Version", static.Version, "SHA", static.Sha) - - var pwd, vrfpwd *string - if passwordFile := c.String("password"); passwordFile != "" { - p, err := utils.PasswordFromFile(passwordFile) - if err != nil { - return nil, errors.Wrap(err, "error reading password from file") - } - pwd = &p - } - if vrfPasswordFile := c.String("vrfpassword"); len(vrfPasswordFile) != 0 { - p, err := utils.PasswordFromFile(vrfPasswordFile) - if err != nil { - return nil, errors.Wrapf(err, "error reading VRF password from vrfpassword file \"%s\"", vrfPasswordFile) - } - vrfpwd = &p - } - - s.Config.SetPasswords(pwd, vrfpwd) - - err := s.Config.Validate() - if err != nil { - return nil, s.errorOut(errors.Wrap(err, "config validation failed")) - } - - cfg := s.Config - ldb := pg.NewLockedDB(cfg.AppID(), cfg.Database(), cfg.Database().Lock(), lggr) - - if err = ldb.Open(ctx); err != nil { - return nil, s.errorOut(errors.Wrap(err, "opening db")) - } - defer lggr.ErrorIfFn(ldb.Close, "Error closing db") - - app, err := s.AppFactory.NewApplication(ctx, s.Config, lggr, ldb.DB()) - if err != nil { - return nil, s.errorOut(errors.Wrap(err, "fatal error instantiating application")) - } - - chainID := c.Int64("chainID") - - // Initialize keystore and generate keys. - keyStore := app.GetKeyStore() - err = setupKeystore(ctx, s, app, keyStore) - if err != nil { - return nil, s.errorOut(err) - } - - // Start application. - err = app.Start(ctx) - if err != nil { - return nil, s.errorOut(err) - } - - // Close application. - defer lggr.ErrorIfFn(app.Stop, "Failed to Stop application") - - // Initialize transmitter settings. - var sendingKeys []string - var sendingKeysAddresses []common.Address - useForwarder := c.Bool("use-forwarder") - ethKeys, err := app.GetKeyStore().Eth().EnabledKeysForChain(ctx, big.NewInt(chainID)) - if err != nil { - return nil, s.errorOut(err) - } - transmitterID := ethKeys[0].Address.String() - - // Populate sendingKeys with current ETH keys. - for _, k := range ethKeys { - sendingKeys = append(sendingKeys, k.Address.String()) - sendingKeysAddresses = append(sendingKeysAddresses, k.Address) - } - - if useForwarder { - // Add extra sending keys if using a forwarder. - sendingKeys, sendingKeysAddresses, err = s.appendForwarders(ctx, chainID, app.GetKeyStore().Eth(), sendingKeys, sendingKeysAddresses) - if err != nil { - return nil, err - } - err = s.authorizeForwarder(c, ldb.DB(), chainID, ec, owner, sendingKeysAddresses) - if err != nil { - return nil, err - } - } - - // Get all configuration parameters. - keyID := c.String("keyID") - dkgEncrypt, _ := app.GetKeyStore().DKGEncrypt().GetAll() - dkgSign, _ := app.GetKeyStore().DKGSign().GetAll() - dkgEncryptKey := dkgEncrypt[0].PublicKeyString() - dkgSignKey := dkgSign[0].PublicKeyString() - p2p, _ := app.GetKeyStore().P2P().GetAll() - ocr2List, _ := app.GetKeyStore().OCR2().GetAll() - peerID := p2p[0].PeerID().Raw() - if !c.Bool("isBootstrapper") { - peerID = c.String("bootstrapperPeerID") - } - - // Find the EVM OCR2 bundle. - var ocr2 ocr2key.KeyBundle - for _, ocr2Item := range ocr2List { - if ocr2Item.ChainType() == chaintype.EVM { - ocr2 = ocr2Item - } - } - if ocr2 == nil { - return nil, s.errorOut(errors.Wrap(job.ErrNoSuchKeyBundle, "evm OCR2 key bundle not found")) - } - offChainPublicKey := ocr2.OffchainPublicKey() - configPublicKey := ocr2.ConfigEncryptionPublicKey() - - if c.Bool("isBootstrapper") { - // Set up bootstrapper job if bootstrapper. - err = createBootstrapperJob(ctx, lggr, c, app) - } else if c.String("job-type") == "DKG" { - // Set up DKG job. - err = createDKGJob(ctx, lggr, app, dkgTemplateArgs{ - contractID: c.String("contractID"), - ocrKeyBundleID: ocr2.ID(), - p2pv2BootstrapperPeerID: peerID, - p2pv2BootstrapperPort: c.String("bootstrapPort"), - transmitterID: transmitterID, - useForwarder: useForwarder, - chainID: chainID, - encryptionPublicKey: dkgEncryptKey, - keyID: keyID, - signingPublicKey: dkgSignKey, - }) - } else if c.String("job-type") == "OCR2VRF" { - // Set up OCR2VRF job. - err = createOCR2VRFJob(ctx, lggr, app, ocr2vrfTemplateArgs{ - dkgTemplateArgs: dkgTemplateArgs{ - contractID: c.String("dkg-address"), - ocrKeyBundleID: ocr2.ID(), - p2pv2BootstrapperPeerID: peerID, - p2pv2BootstrapperPort: c.String("bootstrapPort"), - transmitterID: transmitterID, - useForwarder: useForwarder, - chainID: chainID, - encryptionPublicKey: dkgEncryptKey, - keyID: keyID, - signingPublicKey: dkgSignKey, - }, - vrfBeaconAddress: c.String("vrf-beacon-address"), - vrfCoordinatorAddress: c.String("vrf-coordinator-address"), - linkEthFeedAddress: c.String("link-eth-feed-address"), - sendingKeys: sendingKeys, - }) - } else { - err = fmt.Errorf("unknown job type: %s", c.String("job-type")) - } - - if err != nil { - return nil, err - } - - return &SetupOCR2VRFNodePayload{ - OnChainPublicKey: ocr2.OnChainPublicKey(), - OffChainPublicKey: hex.EncodeToString(offChainPublicKey[:]), - ConfigPublicKey: hex.EncodeToString(configPublicKey[:]), - PeerID: p2p[0].PeerID().Raw(), - Transmitter: transmitterID, - DkgEncrypt: dkgEncryptKey, - DkgSign: dkgSignKey, - SendingKeys: sendingKeys, - }, nil -} - -func (s *Shell) appendForwarders(ctx context.Context, chainID int64, ks keystore.Eth, sendingKeys []string, sendingKeysAddresses []common.Address) ([]string, []common.Address, error) { - for i := 0; i < forwarderAdditionalEOACount; i++ { - // Create the sending key in the keystore. - k, err := ks.Create(ctx) - if err != nil { - return nil, nil, err - } - - // Enable the sending key for the current chain. - err = ks.Enable(ctx, k.Address, big.NewInt(chainID)) - if err != nil { - return nil, nil, err - } - - sendingKeys = append(sendingKeys, k.Address.String()) - sendingKeysAddresses = append(sendingKeysAddresses, k.Address) - } - - return sendingKeys, sendingKeysAddresses, nil -} - -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") - - // We have to set the authorized senders on-chain here, otherwise the job spawner will fail as the - // forwarder will not be recognized. - ctx, cancel := context.WithTimeout(ctx, 300*time.Second) - defer cancel() - f, err := authorized_forwarder.NewAuthorizedForwarder(common.HexToAddress(forwarderAddress), ec) - if err != nil { - return err - } - tx, err := f.SetAuthorizedSenders(owner, sendingKeysAddresses) - if err != nil { - return err - } - _, err = bind.WaitMined(ctx, ec, tx) - if err != nil { - return err - } - - // Create forwarder for management in forwarder_manager.go. - orm := forwarders.NewORM(db) - _, err = orm.CreateForwarder(ctx, common.HexToAddress(forwarderAddress), *ubig.NewI(chainID)) - if err != nil { - return err - } - - return nil -} - -func setupKeystore(ctx context.Context, cli *Shell, app chainlink.Application, keyStore keystore.Master) error { - if err := cli.KeyStoreAuthenticator.authenticate(ctx, keyStore, cli.Config.Password()); err != nil { - return errors.Wrap(err, "error authenticating keystore") - } - - if cli.Config.EVMEnabled() { - chains, err := app.GetRelayers().LegacyEVMChains().List() - if err != nil { - return fmt.Errorf("failed to get legacy evm chains") - } - for _, ch := range chains { - if err = keyStore.Eth().EnsureKeys(ctx, ch.ID()); err != nil { - return errors.Wrap(err, "failed to ensure keystore keys") - } - } - } - - var enabledChains []chaintype.ChainType - if cli.Config.EVMEnabled() { - enabledChains = append(enabledChains, chaintype.EVM) - } - if cli.Config.CosmosEnabled() { - enabledChains = append(enabledChains, chaintype.Cosmos) - } - if cli.Config.SolanaEnabled() { - enabledChains = append(enabledChains, chaintype.Solana) - } - if cli.Config.StarkNetEnabled() { - enabledChains = append(enabledChains, chaintype.StarkNet) - } - - if err := keyStore.OCR2().EnsureKeys(ctx, enabledChains...); err != nil { - return errors.Wrap(err, "failed to ensure ocr key") - } - - if err := keyStore.DKGSign().EnsureKey(ctx); err != nil { - return errors.Wrap(err, "failed to ensure dkgsign key") - } - - if err := keyStore.DKGEncrypt().EnsureKey(ctx); err != nil { - return errors.Wrap(err, "failed to ensure dkgencrypt key") - } - - if err := keyStore.P2P().EnsureKey(ctx); err != nil { - return errors.Wrap(err, "failed to ensure p2p key") - } - - return nil -} - -func createBootstrapperJob(ctx context.Context, lggr logger.Logger, c *cli.Context, app chainlink.Application) error { - sp := fmt.Sprintf(BootstrapTemplate, - c.Int64("chainID"), - c.String("contractID"), - c.Int64("chainID"), - ) - var jb job.Job - err := toml.Unmarshal([]byte(sp), &jb) - if err != nil { - return errors.Wrap(err, "failed to unmarshal job spec") - } - var os job.BootstrapSpec - err = toml.Unmarshal([]byte(sp), &os) - if err != nil { - return errors.Wrap(err, "failed to unmarshal job spec") - } - jb.BootstrapSpec = &os - - err = app.AddJobV2(ctx, &jb) - if err != nil { - return errors.Wrap(err, "failed to add job") - } - lggr.Info("bootstrap spec:", sp) - - // Give a cooldown - time.Sleep(time.Second) - - return nil -} - -func createDKGJob(ctx context.Context, lggr logger.Logger, app chainlink.Application, args dkgTemplateArgs) error { - sp := fmt.Sprintf(DKGTemplate, - args.contractID, - args.ocrKeyBundleID, - args.transmitterID, - args.useForwarder, - fmt.Sprintf(`p2pv2Bootstrappers = ["%s@127.0.0.1:%s"]`, args.p2pv2BootstrapperPeerID, args.p2pv2BootstrapperPort), - args.chainID, - args.encryptionPublicKey, - args.keyID, - args.signingPublicKey, - ) - - var jb job.Job - err := toml.Unmarshal([]byte(sp), &jb) - if err != nil { - return errors.Wrap(err, "failed to unmarshal job spec") - } - var os job.OCR2OracleSpec - err = toml.Unmarshal([]byte(sp), &os) - if err != nil { - return errors.Wrap(err, "failed to unmarshal job spec") - } - jb.OCR2OracleSpec = &os - - err = app.AddJobV2(ctx, &jb) - if err != nil { - return errors.Wrap(err, "failed to add job") - } - lggr.Info("dkg spec:", sp) - - return nil -} - -func createOCR2VRFJob(ctx context.Context, lggr logger.Logger, app chainlink.Application, args ocr2vrfTemplateArgs) error { - var sendingKeysString = fmt.Sprintf(`"%s"`, args.sendingKeys[0]) - for x := 1; x < len(args.sendingKeys); x++ { - sendingKeysString = fmt.Sprintf(`%s,"%s"`, sendingKeysString, args.sendingKeys[x]) - } - sp := fmt.Sprintf(OCR2VRFTemplate, - args.chainID, - args.vrfBeaconAddress, - args.ocrKeyBundleID, - args.transmitterID, - args.useForwarder, - fmt.Sprintf(`p2pv2Bootstrappers = ["%s@127.0.0.1:%s"]`, args.p2pv2BootstrapperPeerID, args.p2pv2BootstrapperPort), - args.chainID, - sendingKeysString, - args.encryptionPublicKey, - args.signingPublicKey, - args.keyID, - args.contractID, - args.vrfCoordinatorAddress, - args.linkEthFeedAddress, - ) - - var jb job.Job - err := toml.Unmarshal([]byte(sp), &jb) - if err != nil { - return errors.Wrap(err, "failed to unmarshal job spec") - } - var os job.OCR2OracleSpec - err = toml.Unmarshal([]byte(sp), &os) - if err != nil { - return errors.Wrap(err, "failed to unmarshal job spec") - } - jb.OCR2OracleSpec = &os - - err = app.AddJobV2(ctx, &jb) - if err != nil { - return errors.Wrap(err, "failed to add job") - } - lggr.Info("ocr2vrf spec:", sp) - - return nil -} diff --git a/core/cmd/prompter.go b/core/cmd/prompter.go index 6e98fd9272b..84f930c6243 100644 --- a/core/cmd/prompter.go +++ b/core/cmd/prompter.go @@ -11,8 +11,6 @@ import ( "golang.org/x/term" ) -//go:generate mockery --quiet --name Prompter --output ./mocks/ --case=underscore - // Prompter implements the Prompt function to be used to display at // the console. type Prompter interface { diff --git a/core/cmd/shell.go b/core/cmd/shell.go index e12b069277b..3d055bb03a9 100644 --- a/core/cmd/shell.go +++ b/core/cmd/shell.go @@ -184,7 +184,7 @@ func (n ChainlinkAppFactory) NewApplication(ctx context.Context, cfg chainlink.G } // evm always enabled for backward compatibility // TODO BCF-2510 this needs to change in order to clear the path for EVM extraction - initOps := []chainlink.CoreRelayerChainInitFunc{chainlink.InitEVM(ctx, relayerFactory, evmFactoryCfg)} + initOps := []chainlink.CoreRelayerChainInitFunc{chainlink.InitDummy(ctx, relayerFactory), chainlink.InitEVM(ctx, relayerFactory, evmFactoryCfg)} if cfg.CosmosEnabled() { cosmosCfg := chainlink.CosmosFactoryConfig{ @@ -248,6 +248,9 @@ func handleNodeVersioning(ctx context.Context, db *sqlx.DB, appLggr logger.Logge var err error // Set up the versioning Configs verORM := versioning.NewORM(db, appLggr) + ibhr := services.NewStartUpHealthReport(healthReportPort, appLggr) + ibhr.Start() + defer ibhr.Stop() if static.Version != static.Unset { var appv, dbv *semver.Version @@ -312,9 +315,6 @@ func takeBackupIfVersionUpgrade(dbUrl url.URL, rootDir string, cfg periodicbacku //Because backups can take a long time we must start a "fake" health report to prevent //node shutdown because of healthcheck fail/timeout - ibhr := services.NewInBackupHealthReport(healthReportPort, lggr) - ibhr.Start() - defer ibhr.Stop() err = databaseBackup.RunBackup(appv.String()) return err } diff --git a/core/cmd/shell_local.go b/core/cmd/shell_local.go index 780105d9868..e19cc485d8b 100644 --- a/core/cmd/shell_local.go +++ b/core/cmd/shell_local.go @@ -173,6 +173,10 @@ func initLocalSubCmds(s *Shell, safe bool) []cli.Command { Name: "dangerWillRobinson", Usage: "set to true to enable dropping non-test databases", }, + cli.BoolFlag{ + Name: "force", + Usage: "set to true to force the reset by dropping any existing connections to the database", + }, }, }, { @@ -186,6 +190,10 @@ func initLocalSubCmds(s *Shell, safe bool) []cli.Command { Name: "user-only", Usage: "only include test user fixture", }, + cli.BoolFlag{ + Name: "force", + Usage: "set to true to force the reset by dropping any existing connections to the database", + }, }, }, { @@ -748,7 +756,7 @@ func (s *Shell) ResetDatabase(c *cli.Context) error { } dangerMode := c.Bool("dangerWillRobinson") - + force := c.Bool("force") dbname := parsed.Path[1:] if !dangerMode && !strings.HasSuffix(dbname, "_test") { return s.errorOut(fmt.Errorf("cannot reset database named `%s`. This command can only be run against databases with a name that ends in `_test`, to prevent accidental data loss. If you REALLY want to reset this database, pass in the -dangerWillRobinson option", dbname)) @@ -756,11 +764,11 @@ func (s *Shell) ResetDatabase(c *cli.Context) error { lggr := s.Logger lggr.Infof("Resetting database: %#v", parsed.String()) lggr.Debugf("Dropping and recreating database: %#v", parsed.String()) - if err := dropAndCreateDB(parsed); err != nil { + if err := dropAndCreateDB(parsed, force); err != nil { return s.errorOut(err) } lggr.Debugf("Migrating database: %#v", parsed.String()) - if err := migrateDB(ctx, cfg, lggr); err != nil { + if err := migrateDB(ctx, cfg); err != nil { return s.errorOut(err) } schema, err := dumpSchema(parsed) @@ -769,7 +777,7 @@ func (s *Shell) ResetDatabase(c *cli.Context) error { } lggr.Debugf("Testing rollback and re-migrate for database: %#v", parsed.String()) var baseVersionID int64 = 54 - if err := downAndUpDB(ctx, cfg, lggr, baseVersionID); err != nil { + if err := downAndUpDB(ctx, cfg, baseVersionID); err != nil { return s.errorOut(err) } if err := checkSchema(parsed, schema); err != nil { @@ -923,7 +931,7 @@ func (s *Shell) MigrateDatabase(_ *cli.Context) error { } s.Logger.Infof("Migrating database: %#v", parsed.String()) - if err := migrateDB(ctx, cfg, s.Logger); err != nil { + if err := migrateDB(ctx, cfg); err != nil { return s.errorOut(err) } return nil @@ -1079,7 +1087,7 @@ func newConnection(cfg dbConfig) (*sqlx.DB, error) { return pg.NewConnection(parsed.String(), cfg.Dialect(), cfg) } -func dropAndCreateDB(parsed url.URL) (err error) { +func dropAndCreateDB(parsed url.URL, force bool) (err error) { // Cannot drop the database if we are connected to it, so we must connect // to a different one. template1 should be present on all postgres installations dbname := parsed.Path[1:] @@ -1093,7 +1101,13 @@ func dropAndCreateDB(parsed url.URL) (err error) { err = multierr.Append(err, cerr) } }() - + if force { + // supports pg < 13. https://stackoverflow.com/questions/17449420/postgresql-unable-to-drop-database-because-of-some-auto-connections-to-db + _, err = db.Exec(fmt.Sprintf("SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname = '%s';", dbname)) + if err != nil { + return fmt.Errorf("unable to terminate connections to postgres database: %v", err) + } + } _, err = db.Exec(fmt.Sprintf(`DROP DATABASE IF EXISTS "%s"`, dbname)) if err != nil { return fmt.Errorf("unable to drop postgres database: %v", err) @@ -1117,7 +1131,7 @@ func dropAndCreatePristineDB(db *sqlx.DB, template string) (err error) { return nil } -func migrateDB(ctx context.Context, config dbConfig, lggr logger.Logger) error { +func migrateDB(ctx context.Context, config dbConfig) error { db, err := newConnection(config) if err != nil { return fmt.Errorf("failed to initialize orm: %v", err) @@ -1129,7 +1143,7 @@ func migrateDB(ctx context.Context, config dbConfig, lggr logger.Logger) error { return db.Close() } -func downAndUpDB(ctx context.Context, cfg dbConfig, lggr logger.Logger, baseVersionID int64) error { +func downAndUpDB(ctx context.Context, cfg dbConfig, baseVersionID int64) error { db, err := newConnection(cfg) if err != nil { return fmt.Errorf("failed to initialize orm: %v", err) diff --git a/core/config/app_config.go b/core/config/app_config.go index 869477218db..112e242636f 100644 --- a/core/config/app_config.go +++ b/core/config/app_config.go @@ -25,6 +25,7 @@ type AppConfig interface { CosmosEnabled() bool SolanaEnabled() bool StarkNetEnabled() bool + AptosEnabled() bool Validate() error ValidateDB() error diff --git a/core/config/docs/chains-evm.toml b/core/config/docs/chains-evm.toml index a222d5269d7..38c8cb8354f 100644 --- a/core/config/docs/chains-evm.toml +++ b/core/config/docs/chains-evm.toml @@ -85,6 +85,18 @@ RPCDefaultBatchSize = 250 # Default # available from the connected node via RPC, due to race conditions in the code of the remote ETH node. In this case you will get false # "zero" blocks that are missing transactions. RPCBlockQueryDelay = 1 # Default +# FinalizedBlockOffset defines the number of blocks by which the latest finalized block will be shifted/delayed. +# For example, suppose RPC returns block 100 as the latest finalized. In that case, the CL Node will treat block `100 - FinalizedBlockOffset` as the latest finalized block and `latest - FinalityDepth - FinalizedBlockOffset` in case of `FinalityTagEnabled = false.` +# With `EnforceRepeatableRead = true,` RPC is considered healthy only if its most recent finalized block is larger or equal to the highest finalized block observed by the CL Node minus `FinalizedBlockOffset.` +# Higher values of `FinalizedBlockOffset` with `EnforceRepeatableRead = true` reduce the number of false `FinalizedBlockOutOfSync` declarations on healthy RPCs that are slightly lagging behind due to network delays. +# This may increase the number of healthy RPCs and reduce the probability that the CL Node will not have any healthy alternatives to the active RPC. +# CAUTION: Setting this to values higher than 0 may delay transaction creation in products (e.g., CCIP, Automation) that base their decision on finalized on-chain events. +# PoS chains with `FinalityTagEnabled=true` and batched (epochs) blocks finalization (e.g., Ethereum Mainnet) must be treated with special care as a minor increase in the `FinalizedBlockOffset` may lead to significant delays. +# For example, let's say that `FinalizedBlockOffset = 1` and blocks are finalized in batches of 32. +# The latest finalized block on chain is 64, so block 63 is the latest finalized for CL Node. +# Block 64 will be treated as finalized by CL Node only when chain's latest finalized block is 65. As chain finalizes blocks in batches of 32, +# CL Node has to wait for a whole new batch to be finalized to treat block 64 as finalized. +FinalizedBlockOffset = 0 # Default [EVM.Transactions] # ForwardersEnabled enables or disables sending transactions through forwarder contracts. @@ -368,7 +380,17 @@ NodeIsSyncingEnabled = false # Default # # Set to 0 to disable. FinalizedBlockPollInterval = '5s' # Default - +# EnforceRepeatableRead defines if Core should only use RPCs whose most recently finalized block is greater or equal to +# `highest finalized block - FinalizedBlockOffset`. In other words, exclude RPCs lagging on latest finalized +# block. +# +# Set false to disable +EnforceRepeatableRead = false # Default +# DeathDeclarationDelay defines the minimum duration an RPC must be in unhealthy state before producing an error log message. +# Larger values might be helpful to reduce the noisiness of health checks like `EnforceRepeatableRead = true', which might be falsely +# trigger declaration of `FinalizedBlockOutOfSync` due to insignificant network delays in broadcasting of the finalized state among RPCs. +# RPC will not be picked to handle a request even if this option is set to a nonzero value. +DeathDeclarationDelay = '10s' # Default # **ADVANCED** # Errors enable the node to provide custom regex patterns to match against error messages from RPCs. [EVM.NodePool.Errors] diff --git a/core/config/docs/core.toml b/core/config/docs/core.toml index 265609b064c..d1b922cf291 100644 --- a/core/config/docs/core.toml +++ b/core/config/docs/core.toml @@ -605,6 +605,11 @@ env = 'test' # Example [Mercury] +# VerboseLogging enables detailed logging of mercury/LLO operations. These logs +# can be expensive since they may serialize large structs, so they are disabled +# by default. +VerboseLogging = false # Default + # Mercury.Cache controls settings for the price retrieval cache querying a mercury server [Mercury.Cache] # LatestReportTTL controls how "stale" we will allow a price to be e.g. if diff --git a/core/config/mercury_config.go b/core/config/mercury_config.go index f16fc4661a5..d1b4b142e20 100644 --- a/core/config/mercury_config.go +++ b/core/config/mercury_config.go @@ -27,4 +27,5 @@ type Mercury interface { Cache() MercuryCache TLS() MercuryTLS Transmitter() MercuryTransmitter + VerboseLogging() bool } diff --git a/core/config/mocks/telemetry_ingress.go b/core/config/mocks/telemetry_ingress.go index fb01cc29cd0..32dc4498a71 100644 --- a/core/config/mocks/telemetry_ingress.go +++ b/core/config/mocks/telemetry_ingress.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -14,6 +14,14 @@ type TelemetryIngress struct { mock.Mock } +type TelemetryIngress_Expecter struct { + mock *mock.Mock +} + +func (_m *TelemetryIngress) EXPECT() *TelemetryIngress_Expecter { + return &TelemetryIngress_Expecter{mock: &_m.Mock} +} + // BufferSize provides a mock function with given fields: func (_m *TelemetryIngress) BufferSize() uint { ret := _m.Called() @@ -32,6 +40,33 @@ func (_m *TelemetryIngress) BufferSize() uint { return r0 } +// TelemetryIngress_BufferSize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BufferSize' +type TelemetryIngress_BufferSize_Call struct { + *mock.Call +} + +// BufferSize is a helper method to define mock.On call +func (_e *TelemetryIngress_Expecter) BufferSize() *TelemetryIngress_BufferSize_Call { + return &TelemetryIngress_BufferSize_Call{Call: _e.mock.On("BufferSize")} +} + +func (_c *TelemetryIngress_BufferSize_Call) Run(run func()) *TelemetryIngress_BufferSize_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *TelemetryIngress_BufferSize_Call) Return(_a0 uint) *TelemetryIngress_BufferSize_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *TelemetryIngress_BufferSize_Call) RunAndReturn(run func() uint) *TelemetryIngress_BufferSize_Call { + _c.Call.Return(run) + return _c +} + // Endpoints provides a mock function with given fields: func (_m *TelemetryIngress) Endpoints() []config.TelemetryIngressEndpoint { ret := _m.Called() @@ -52,6 +87,33 @@ func (_m *TelemetryIngress) Endpoints() []config.TelemetryIngressEndpoint { return r0 } +// TelemetryIngress_Endpoints_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Endpoints' +type TelemetryIngress_Endpoints_Call struct { + *mock.Call +} + +// Endpoints is a helper method to define mock.On call +func (_e *TelemetryIngress_Expecter) Endpoints() *TelemetryIngress_Endpoints_Call { + return &TelemetryIngress_Endpoints_Call{Call: _e.mock.On("Endpoints")} +} + +func (_c *TelemetryIngress_Endpoints_Call) Run(run func()) *TelemetryIngress_Endpoints_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *TelemetryIngress_Endpoints_Call) Return(_a0 []config.TelemetryIngressEndpoint) *TelemetryIngress_Endpoints_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *TelemetryIngress_Endpoints_Call) RunAndReturn(run func() []config.TelemetryIngressEndpoint) *TelemetryIngress_Endpoints_Call { + _c.Call.Return(run) + return _c +} + // Logging provides a mock function with given fields: func (_m *TelemetryIngress) Logging() bool { ret := _m.Called() @@ -70,6 +132,33 @@ func (_m *TelemetryIngress) Logging() bool { return r0 } +// TelemetryIngress_Logging_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Logging' +type TelemetryIngress_Logging_Call struct { + *mock.Call +} + +// Logging is a helper method to define mock.On call +func (_e *TelemetryIngress_Expecter) Logging() *TelemetryIngress_Logging_Call { + return &TelemetryIngress_Logging_Call{Call: _e.mock.On("Logging")} +} + +func (_c *TelemetryIngress_Logging_Call) Run(run func()) *TelemetryIngress_Logging_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *TelemetryIngress_Logging_Call) Return(_a0 bool) *TelemetryIngress_Logging_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *TelemetryIngress_Logging_Call) RunAndReturn(run func() bool) *TelemetryIngress_Logging_Call { + _c.Call.Return(run) + return _c +} + // MaxBatchSize provides a mock function with given fields: func (_m *TelemetryIngress) MaxBatchSize() uint { ret := _m.Called() @@ -88,6 +177,33 @@ func (_m *TelemetryIngress) MaxBatchSize() uint { return r0 } +// TelemetryIngress_MaxBatchSize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MaxBatchSize' +type TelemetryIngress_MaxBatchSize_Call struct { + *mock.Call +} + +// MaxBatchSize is a helper method to define mock.On call +func (_e *TelemetryIngress_Expecter) MaxBatchSize() *TelemetryIngress_MaxBatchSize_Call { + return &TelemetryIngress_MaxBatchSize_Call{Call: _e.mock.On("MaxBatchSize")} +} + +func (_c *TelemetryIngress_MaxBatchSize_Call) Run(run func()) *TelemetryIngress_MaxBatchSize_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *TelemetryIngress_MaxBatchSize_Call) Return(_a0 uint) *TelemetryIngress_MaxBatchSize_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *TelemetryIngress_MaxBatchSize_Call) RunAndReturn(run func() uint) *TelemetryIngress_MaxBatchSize_Call { + _c.Call.Return(run) + return _c +} + // SendInterval provides a mock function with given fields: func (_m *TelemetryIngress) SendInterval() time.Duration { ret := _m.Called() @@ -106,6 +222,33 @@ func (_m *TelemetryIngress) SendInterval() time.Duration { return r0 } +// TelemetryIngress_SendInterval_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendInterval' +type TelemetryIngress_SendInterval_Call struct { + *mock.Call +} + +// SendInterval is a helper method to define mock.On call +func (_e *TelemetryIngress_Expecter) SendInterval() *TelemetryIngress_SendInterval_Call { + return &TelemetryIngress_SendInterval_Call{Call: _e.mock.On("SendInterval")} +} + +func (_c *TelemetryIngress_SendInterval_Call) Run(run func()) *TelemetryIngress_SendInterval_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *TelemetryIngress_SendInterval_Call) Return(_a0 time.Duration) *TelemetryIngress_SendInterval_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *TelemetryIngress_SendInterval_Call) RunAndReturn(run func() time.Duration) *TelemetryIngress_SendInterval_Call { + _c.Call.Return(run) + return _c +} + // SendTimeout provides a mock function with given fields: func (_m *TelemetryIngress) SendTimeout() time.Duration { ret := _m.Called() @@ -124,6 +267,33 @@ func (_m *TelemetryIngress) SendTimeout() time.Duration { return r0 } +// TelemetryIngress_SendTimeout_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendTimeout' +type TelemetryIngress_SendTimeout_Call struct { + *mock.Call +} + +// SendTimeout is a helper method to define mock.On call +func (_e *TelemetryIngress_Expecter) SendTimeout() *TelemetryIngress_SendTimeout_Call { + return &TelemetryIngress_SendTimeout_Call{Call: _e.mock.On("SendTimeout")} +} + +func (_c *TelemetryIngress_SendTimeout_Call) Run(run func()) *TelemetryIngress_SendTimeout_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *TelemetryIngress_SendTimeout_Call) Return(_a0 time.Duration) *TelemetryIngress_SendTimeout_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *TelemetryIngress_SendTimeout_Call) RunAndReturn(run func() time.Duration) *TelemetryIngress_SendTimeout_Call { + _c.Call.Return(run) + return _c +} + // UniConn provides a mock function with given fields: func (_m *TelemetryIngress) UniConn() bool { ret := _m.Called() @@ -142,6 +312,33 @@ func (_m *TelemetryIngress) UniConn() bool { return r0 } +// TelemetryIngress_UniConn_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UniConn' +type TelemetryIngress_UniConn_Call struct { + *mock.Call +} + +// UniConn is a helper method to define mock.On call +func (_e *TelemetryIngress_Expecter) UniConn() *TelemetryIngress_UniConn_Call { + return &TelemetryIngress_UniConn_Call{Call: _e.mock.On("UniConn")} +} + +func (_c *TelemetryIngress_UniConn_Call) Run(run func()) *TelemetryIngress_UniConn_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *TelemetryIngress_UniConn_Call) Return(_a0 bool) *TelemetryIngress_UniConn_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *TelemetryIngress_UniConn_Call) RunAndReturn(run func() bool) *TelemetryIngress_UniConn_Call { + _c.Call.Return(run) + return _c +} + // UseBatchSend provides a mock function with given fields: func (_m *TelemetryIngress) UseBatchSend() bool { ret := _m.Called() @@ -160,6 +357,33 @@ func (_m *TelemetryIngress) UseBatchSend() bool { return r0 } +// TelemetryIngress_UseBatchSend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UseBatchSend' +type TelemetryIngress_UseBatchSend_Call struct { + *mock.Call +} + +// UseBatchSend is a helper method to define mock.On call +func (_e *TelemetryIngress_Expecter) UseBatchSend() *TelemetryIngress_UseBatchSend_Call { + return &TelemetryIngress_UseBatchSend_Call{Call: _e.mock.On("UseBatchSend")} +} + +func (_c *TelemetryIngress_UseBatchSend_Call) Run(run func()) *TelemetryIngress_UseBatchSend_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *TelemetryIngress_UseBatchSend_Call) Return(_a0 bool) *TelemetryIngress_UseBatchSend_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *TelemetryIngress_UseBatchSend_Call) RunAndReturn(run func() bool) *TelemetryIngress_UseBatchSend_Call { + _c.Call.Return(run) + return _c +} + // NewTelemetryIngress creates a new instance of TelemetryIngress. 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 NewTelemetryIngress(t interface { diff --git a/core/config/mocks/telemetry_ingress_endpoint.go b/core/config/mocks/telemetry_ingress_endpoint.go index e5f8c3106eb..4a6651f1315 100644 --- a/core/config/mocks/telemetry_ingress_endpoint.go +++ b/core/config/mocks/telemetry_ingress_endpoint.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -13,6 +13,14 @@ type TelemetryIngressEndpoint struct { mock.Mock } +type TelemetryIngressEndpoint_Expecter struct { + mock *mock.Mock +} + +func (_m *TelemetryIngressEndpoint) EXPECT() *TelemetryIngressEndpoint_Expecter { + return &TelemetryIngressEndpoint_Expecter{mock: &_m.Mock} +} + // ChainID provides a mock function with given fields: func (_m *TelemetryIngressEndpoint) ChainID() string { ret := _m.Called() @@ -31,6 +39,33 @@ func (_m *TelemetryIngressEndpoint) ChainID() string { return r0 } +// TelemetryIngressEndpoint_ChainID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChainID' +type TelemetryIngressEndpoint_ChainID_Call struct { + *mock.Call +} + +// ChainID is a helper method to define mock.On call +func (_e *TelemetryIngressEndpoint_Expecter) ChainID() *TelemetryIngressEndpoint_ChainID_Call { + return &TelemetryIngressEndpoint_ChainID_Call{Call: _e.mock.On("ChainID")} +} + +func (_c *TelemetryIngressEndpoint_ChainID_Call) Run(run func()) *TelemetryIngressEndpoint_ChainID_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *TelemetryIngressEndpoint_ChainID_Call) Return(_a0 string) *TelemetryIngressEndpoint_ChainID_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *TelemetryIngressEndpoint_ChainID_Call) RunAndReturn(run func() string) *TelemetryIngressEndpoint_ChainID_Call { + _c.Call.Return(run) + return _c +} + // Network provides a mock function with given fields: func (_m *TelemetryIngressEndpoint) Network() string { ret := _m.Called() @@ -49,6 +84,33 @@ func (_m *TelemetryIngressEndpoint) Network() string { return r0 } +// TelemetryIngressEndpoint_Network_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Network' +type TelemetryIngressEndpoint_Network_Call struct { + *mock.Call +} + +// Network is a helper method to define mock.On call +func (_e *TelemetryIngressEndpoint_Expecter) Network() *TelemetryIngressEndpoint_Network_Call { + return &TelemetryIngressEndpoint_Network_Call{Call: _e.mock.On("Network")} +} + +func (_c *TelemetryIngressEndpoint_Network_Call) Run(run func()) *TelemetryIngressEndpoint_Network_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *TelemetryIngressEndpoint_Network_Call) Return(_a0 string) *TelemetryIngressEndpoint_Network_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *TelemetryIngressEndpoint_Network_Call) RunAndReturn(run func() string) *TelemetryIngressEndpoint_Network_Call { + _c.Call.Return(run) + return _c +} + // ServerPubKey provides a mock function with given fields: func (_m *TelemetryIngressEndpoint) ServerPubKey() string { ret := _m.Called() @@ -67,6 +129,33 @@ func (_m *TelemetryIngressEndpoint) ServerPubKey() string { return r0 } +// TelemetryIngressEndpoint_ServerPubKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ServerPubKey' +type TelemetryIngressEndpoint_ServerPubKey_Call struct { + *mock.Call +} + +// ServerPubKey is a helper method to define mock.On call +func (_e *TelemetryIngressEndpoint_Expecter) ServerPubKey() *TelemetryIngressEndpoint_ServerPubKey_Call { + return &TelemetryIngressEndpoint_ServerPubKey_Call{Call: _e.mock.On("ServerPubKey")} +} + +func (_c *TelemetryIngressEndpoint_ServerPubKey_Call) Run(run func()) *TelemetryIngressEndpoint_ServerPubKey_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *TelemetryIngressEndpoint_ServerPubKey_Call) Return(_a0 string) *TelemetryIngressEndpoint_ServerPubKey_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *TelemetryIngressEndpoint_ServerPubKey_Call) RunAndReturn(run func() string) *TelemetryIngressEndpoint_ServerPubKey_Call { + _c.Call.Return(run) + return _c +} + // URL provides a mock function with given fields: func (_m *TelemetryIngressEndpoint) URL() *url.URL { ret := _m.Called() @@ -87,6 +176,33 @@ func (_m *TelemetryIngressEndpoint) URL() *url.URL { return r0 } +// TelemetryIngressEndpoint_URL_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'URL' +type TelemetryIngressEndpoint_URL_Call struct { + *mock.Call +} + +// URL is a helper method to define mock.On call +func (_e *TelemetryIngressEndpoint_Expecter) URL() *TelemetryIngressEndpoint_URL_Call { + return &TelemetryIngressEndpoint_URL_Call{Call: _e.mock.On("URL")} +} + +func (_c *TelemetryIngressEndpoint_URL_Call) Run(run func()) *TelemetryIngressEndpoint_URL_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *TelemetryIngressEndpoint_URL_Call) Return(_a0 *url.URL) *TelemetryIngressEndpoint_URL_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *TelemetryIngressEndpoint_URL_Call) RunAndReturn(run func() *url.URL) *TelemetryIngressEndpoint_URL_Call { + _c.Call.Return(run) + return _c +} + // NewTelemetryIngressEndpoint creates a new instance of TelemetryIngressEndpoint. 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 NewTelemetryIngressEndpoint(t interface { diff --git a/core/config/telemetry_ingress_config.go b/core/config/telemetry_ingress_config.go index a4923391011..dde42c2d355 100644 --- a/core/config/telemetry_ingress_config.go +++ b/core/config/telemetry_ingress_config.go @@ -5,8 +5,6 @@ import ( "time" ) -//go:generate mockery --quiet --name TelemetryIngress --output ./mocks/ --case=underscore --filename telemetry_ingress.go - type TelemetryIngress interface { Logging() bool UniConn() bool @@ -18,7 +16,6 @@ type TelemetryIngress interface { Endpoints() []TelemetryIngressEndpoint } -//go:generate mockery --quiet --name TelemetryIngressEndpoint --output ./mocks/ --case=underscore --filename telemetry_ingress_endpoint.go type TelemetryIngressEndpoint interface { Network() string ChainID() string diff --git a/core/config/toml/types.go b/core/config/toml/types.go index c8b983b7c26..f827f086225 100644 --- a/core/config/toml/types.go +++ b/core/config/toml/types.go @@ -1324,15 +1324,19 @@ func (m *MercuryTransmitter) setFrom(f *MercuryTransmitter) { } type Mercury struct { - Cache MercuryCache `toml:",omitempty"` - TLS MercuryTLS `toml:",omitempty"` - Transmitter MercuryTransmitter `toml:",omitempty"` + Cache MercuryCache `toml:",omitempty"` + TLS MercuryTLS `toml:",omitempty"` + Transmitter MercuryTransmitter `toml:",omitempty"` + VerboseLogging *bool `toml:",omitempty"` } func (m *Mercury) setFrom(f *Mercury) { m.Cache.setFrom(&f.Cache) m.TLS.setFrom(&f.TLS) m.Transmitter.setFrom(&f.Transmitter) + if v := f.VerboseLogging; v != nil { + m.VerboseLogging = v + } } func (m *Mercury) ValidateConfig() (err error) { diff --git a/core/gethwrappers/functions/generated/functions_coordinator/functions_coordinator.go b/core/gethwrappers/functions/generated/functions_coordinator/functions_coordinator.go index 286cb1befd6..d05570282bf 100644 --- a/core/gethwrappers/functions/generated/functions_coordinator/functions_coordinator.go +++ b/core/gethwrappers/functions/generated/functions_coordinator/functions_coordinator.go @@ -43,6 +43,7 @@ type FunctionsBillingConfig struct { RequestTimeoutSeconds uint32 DonFeeCentsUsd uint16 OperationFeeCentsUsd uint16 + TransmitTxSizeBytes uint16 } type FunctionsResponseCommitment struct { @@ -74,8 +75,8 @@ 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: "0x60a06040523480156200001157600080fd5b506040516200603a3803806200603a8339810160408190526200003491620004db565b83838383833380600081620000905760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000c357620000c3816200014e565b5050506001600160a01b038116620000ee57604051632530e88560e11b815260040160405180910390fd5b6001600160a01b03908116608052600c80546001600160601b03166c0100000000000000000000000085841602179055600d80546001600160a01b0319169183169190911790556200014083620001f9565b505050505050505062000742565b336001600160a01b03821603620001a85760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000087565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b620002036200039e565b80516008805460208401516040808601516060870151608088015160a089015160c08a015160e08b015160ff16600160f81b026001600160f81b036001600160401b03909216600160b81b02919091166001600160b81b0361ffff938416600160a81b0261ffff60a81b1964ffffffffff909616600160801b029590951666ffffffffffffff60801b1963ffffffff9788166c010000000000000000000000000263ffffffff60601b19998916680100000000000000000299909916600160401b600160801b03199b8916640100000000026001600160401b0319909d169e89169e909e179b909b17999099169b909b1795909517979097169590951717969096161792909217909255610100840151610120850151909316600160e01b026001600160e01b0390931692909217600955610140830151600a80546101608601518416620100000263ffffffff19919091169290931691909117919091179055517f2e2c8535dcc25459d519f2300c114d2d2128bf6399722d04eca078461a3bf33a906200039390839062000639565b60405180910390a150565b620003a8620003aa565b565b6000546001600160a01b03163314620003a85760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640162000087565b80516001600160a01b03811681146200041e57600080fd5b919050565b60405161018081016001600160401b03811182821017156200045557634e487b7160e01b600052604160045260246000fd5b60405290565b805163ffffffff811681146200041e57600080fd5b805164ffffffffff811681146200041e57600080fd5b805161ffff811681146200041e57600080fd5b80516001600160401b03811681146200041e57600080fd5b805160ff811681146200041e57600080fd5b80516001600160e01b03811681146200041e57600080fd5b6000806000808486036101e0811215620004f457600080fd5b620004ff8662000406565b945061018080601f19830112156200051657600080fd5b6200052062000423565b915062000530602088016200045b565b825262000540604088016200045b565b602083015262000553606088016200045b565b604083015262000566608088016200045b565b60608301526200057960a0880162000470565b60808301526200058c60c0880162000486565b60a08301526200059f60e0880162000499565b60c0830152610100620005b4818901620004b1565b60e0840152610120620005c9818a01620004c3565b828501526101409150620005df828a016200045b565b90840152610160620005f389820162000486565b8285015262000604838a0162000486565b90840152509093506200061d90506101a0860162000406565b91506200062e6101c0860162000406565b905092959194509250565b815163ffffffff1681526101808101602083015162000660602084018263ffffffff169052565b50604083015162000679604084018263ffffffff169052565b50606083015162000692606084018263ffffffff169052565b506080830151620006ac608084018264ffffffffff169052565b5060a0830151620006c360a084018261ffff169052565b5060c0830151620006df60c08401826001600160401b03169052565b5060e0830151620006f560e084018260ff169052565b50610100838101516001600160e01b0316908301526101208084015163ffffffff16908301526101408084015161ffff908116918401919091526101609384015116929091019190915290565b6080516158b2620007886000396000818161079c01528181610c7d01528181610f110152818161102701528181611b2d015281816129eb015261398401526158b26000f3fe608060405234801561001057600080fd5b50600436106101a35760003560e01c80638da5cb5b116100ee578063d227d24511610097578063e4ddcea611610071578063e4ddcea6146105d5578063f2f22ef1146105eb578063f2fde38b146105f3578063f6ea41f61461060657600080fd5b8063d227d2451461058a578063d328a91e146105ba578063e3d0e712146105c257600080fd5b8063b1dc65a4116100c8578063b1dc65a414610396578063ba9c924d146103a9578063c3f909d4146103bc57600080fd5b80638da5cb5b1461032e578063a631571e14610356578063afcb95d71461037657600080fd5b80637d4807871161015057806381f1b9381161012a57806381f1b938146102a657806381ff7048146102ae57806385b214cf1461031b57600080fd5b80637d480787146102765780637f15e1661461027e578063814118341461029157600080fd5b806366316d8d1161018157806366316d8d1461023c5780637212762f1461024f57806379ba50971461026e57600080fd5b8063083a5466146101a8578063181f5a77146101bd578063626f458c1461020f575b600080fd5b6101bb6101b636600461402b565b61060e565b005b6101f96040518060400160405280601c81526020017f46756e6374696f6e7320436f6f7264696e61746f722076312e332e300000000081525081565b60405161020691906140db565b60405180910390f35b61022261021d366004614248565b610663565b60405168ffffffffffffffffff9091168152602001610206565b6101bb61024a3660046142cf565b6106a0565b610257610859565b6040805192835260ff909116602083015201610206565b6101bb610a6c565b6101bb610b69565b6101bb61028c36600461402b565b610d69565b610299610db9565b6040516102069190614359565b6101f9610e28565b6102f860015460025463ffffffff74010000000000000000000000000000000000000000830481169378010000000000000000000000000000000000000000000000009093041691565b6040805163ffffffff948516815293909216602084015290820152606001610206565b6101bb61032936600461436c565b610ef9565b60005460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610206565b610369610364366004614385565b610fb6565b60405161020691906144da565b604080516001815260006020820181905291810191909152606001610206565b6101bb6103a436600461452e565b611247565b6101bb6103b7366004614699565b61185e565b61057d6040805161018081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810182905261010081018290526101208101829052610140810182905261016081019190915250604080516101808101825260085463ffffffff80821683526401000000008204811660208401526801000000000000000082048116938301939093526c01000000000000000000000000810483166060830152700100000000000000000000000000000000810464ffffffffff1660808301527501000000000000000000000000000000000000000000810461ffff90811660a084015277010000000000000000000000000000000000000000000000820467ffffffffffffffff1660c08401527f010000000000000000000000000000000000000000000000000000000000000090910460ff1660e08301526009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff81166101008401527c01000000000000000000000000000000000000000000000000000000009004909216610120820152600a5480831661014083015262010000900490911661016082015290565b6040516102069190614785565b61059d6105983660046148a2565b611b29565b6040516bffffffffffffffffffffffff9091168152602001610206565b6101f9611c97565b6101bb6105d03660046149aa565b611cee565b6105dd61286a565b604051908152602001610206565b6102226129ae565b6101bb610601366004614a77565b6129d3565b6102226129e7565b610616612a78565b6000819003610651576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f61065e828483614b27565b505050565b600a5460009061069a9060649061067d9061ffff16612afb565b6106879190614ca0565b6bffffffffffffffffffffffff16612b48565b92915050565b6106a8612be7565b806bffffffffffffffffffffffff166000036106e25750336000908152600b60205260409020546bffffffffffffffffffffffff1661073c565b336000908152600b60205260409020546bffffffffffffffffffffffff8083169116101561073c576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600b6020526040812080548392906107699084906bffffffffffffffffffffffff16614ccb565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055506107be7f000000000000000000000000000000000000000000000000000000000000000090565b6040517f66316d8d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526bffffffffffffffffffffffff8416602483015291909116906366316d8d90604401600060405180830381600087803b15801561083d57600080fd5b505af1158015610851573d6000803e3d6000fd5b505050505050565b600080600080600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156108cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f09190614d11565b5093505092505080426109039190614d61565b600854640100000000900463ffffffff161080156109305750600854640100000000900463ffffffff1615155b1561098d57505060085477010000000000000000000000000000000000000000000000810467ffffffffffffffff16937f010000000000000000000000000000000000000000000000000000000000000090910460ff1692509050565b600082136109cf576040517f56b22ab8000000000000000000000000000000000000000000000000000000008152600481018390526024015b60405180910390fd5b600d54604080517f313ce5670000000000000000000000000000000000000000000000000000000081529051849273ffffffffffffffffffffffffffffffffffffffff169163313ce5679160048083019260209291908290030181865afa158015610a3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a629190614d74565b9350935050509091565b60015473ffffffffffffffffffffffffffffffffffffffff163314610aed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016109c6565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610b71612dae565b610b79612be7565b6000610b83610db9565b905060005b8151811015610d65576000600b6000848481518110610ba957610ba9614d91565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252810191909152604001600020546bffffffffffffffffffffffff1690508015610d54576000600b6000858581518110610c0857610c08614d91565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550610c9f7f000000000000000000000000000000000000000000000000000000000000000090565b73ffffffffffffffffffffffffffffffffffffffff166366316d8d848481518110610ccc57610ccc614d91565b6020026020010151836040518363ffffffff1660e01b8152600401610d2192919073ffffffffffffffffffffffffffffffffffffffff9290921682526bffffffffffffffffffffffff16602082015260400190565b600060405180830381600087803b158015610d3b57600080fd5b505af1158015610d4f573d6000803e3d6000fd5b505050505b50610d5e81614dc0565b9050610b88565b5050565b610d71612a78565b6000819003610dac576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e61065e828483614b27565b60606006805480602002602001604051908101604052809291908181526020018280548015610e1e57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610df3575b5050505050905090565b6060600f8054610e3790614a94565b9050600003610e72576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f8054610e7f90614a94565b80601f0160208091040260200160405190810160405280929190818152602001828054610eab90614a94565b8015610e1e5780601f10610ecd57610100808354040283529160200191610e1e565b820191906000526020600020905b815481529060010190602001808311610edb57509395945050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610f68576040517fc41a5b0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526007602052604080822091909155517f8a4b97add3359bd6bcf5e82874363670eb5ad0f7615abddbd0ed0a3a98f0f41690610fab9083815260200190565b60405180910390a150565b6040805161016081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101919091523373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461107e576040517fc41a5b0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061109161108c84614e1a565b612db6565b90925090506110a66060840160408501614a77565b825173ffffffffffffffffffffffffffffffffffffffff91909116907fbf50768ccf13bd0110ca6d53a9c4f1f3271abdd4c24a56878863ed25b20598ff326110f460c0880160a08901614f07565b61110661016089016101408a01614a77565b6111108980614f24565b6111226101208c016101008d01614f89565b60208c01356111386101008e0160e08f01614fa4565b6040518061016001604052808e6000015181526020018e6020015173ffffffffffffffffffffffffffffffffffffffff1681526020018e604001516bffffffffffffffffffffffff1681526020018e6060015173ffffffffffffffffffffffffffffffffffffffff1681526020018e6080015167ffffffffffffffff1681526020018e60a0015163ffffffff1681526020018d68ffffffffffffffffff1681526020018e60e0015168ffffffffffffffffff1681526020018e610100015164ffffffffff1681526020018e610120015164ffffffffff1681526020018e610140015163ffffffff1681525060405161123899989796959493929190614fc1565b60405180910390a3505b919050565b6000806112548989613168565b915091508115611265575050611854565b604080518b3580825262ffffff6020808f0135600881901c9290921690840152909290917fb04e63db38c49950639fa09d29872f21f5d49d614f3a969d8adf3d4b52e41a62910160405180910390a16112c28b8b8b8b8b8b6132f1565b6003546000906002906112e09060ff80821691610100900416615077565b6112ea9190615090565b6112f5906001615077565b60ff169050888114611363576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f77726f6e67206e756d626572206f66207369676e61747572657300000000000060448201526064016109c6565b8887146113f2576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f7265706f727420727320616e64207373206d757374206265206f66206571756160448201527f6c206c656e67746800000000000000000000000000000000000000000000000060648201526084016109c6565b3360009081526004602090815260408083208151808301909252805460ff80821684529293919291840191610100909104166002811115611435576114356150b2565b6002811115611446576114466150b2565b9052509050600281602001516002811115611463576114636150b2565b141580156114ac57506006816000015160ff168154811061148657611486614d91565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff163314155b15611513576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f756e617574686f72697a6564207472616e736d6974746572000000000000000060448201526064016109c6565b5050505061151f613fca565b60008a8a6040516115319291906150e1565b604051908190038120611548918e906020016150f1565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120838301909252600080845290830152915060005b898110156118445760006001848984602081106115b1576115b1614d91565b6115be91901a601b615077565b8e8e868181106115d0576115d0614d91565b905060200201358d8d878181106115e9576115e9614d91565b9050602002013560405160008152602001604052604051611626949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa158015611648573d6000803e3d6000fd5b5050604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081015173ffffffffffffffffffffffffffffffffffffffff811660009081526004602090815290849020838501909452835460ff808216855292965092945084019161010090041660028111156116c8576116c86150b2565b60028111156116d9576116d96150b2565b90525092506001836020015160028111156116f6576116f66150b2565b1461175d576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f61646472657373206e6f7420617574686f72697a656420746f207369676e000060448201526064016109c6565b8251600090869060ff16601f811061177757611777614d91565b602002015173ffffffffffffffffffffffffffffffffffffffff16146117f9576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6e6f6e2d756e69717565207369676e617475726500000000000000000000000060448201526064016109c6565b8085846000015160ff16601f811061181357611813614d91565b73ffffffffffffffffffffffffffffffffffffffff90921660209290920201525061183d81614dc0565b9050611592565b505050611850826133a8565b5050505b5050505050505050565b611866612dae565b80516008805460208401516040808601516060870151608088015160a089015160c08a015160e08b015160ff167f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff67ffffffffffffffff90921677010000000000000000000000000000000000000000000000029190911676ffffffffffffffffffffffffffffffffffffffffffffff61ffff9384167501000000000000000000000000000000000000000000027fffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffffff64ffffffffff90961670010000000000000000000000000000000002959095167fffffffffffffffffff00000000000000ffffffffffffffffffffffffffffffff63ffffffff9788166c01000000000000000000000000027fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff9989166801000000000000000002999099167fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff9b8916640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000909d169e89169e909e179b909b17999099169b909b17959095179790971695909517179690961617929092179092556101008401516101208501519093167c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff90931692909217600955610140830151600a8054610160860151841662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000919091169290931691909117919091179055517f2e2c8535dcc25459d519f2300c114d2d2128bf6399722d04eca078461a3bf33a90610fab908390614785565b60007f00000000000000000000000000000000000000000000000000000000000000006040517f10fc49c100000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8816600482015263ffffffff8516602482015273ffffffffffffffffffffffffffffffffffffffff91909116906310fc49c19060440160006040518083038186803b158015611bc957600080fd5b505afa158015611bdd573d6000803e3d6000fd5b5050505066038d7ea4c68000821115611c22576040517f8129bbcd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611c2c6129e7565b90506000611c6f87878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061066392505050565b90506000611c7b6129ae565b9050611c8a86868486856134f7565b9998505050505050505050565b6060600e8054611ca690614a94565b9050600003611ce1576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e8054610e7f90614a94565b855185518560ff16601f831115611d61576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f746f6f206d616e79207369676e6572730000000000000000000000000000000060448201526064016109c6565b80600003611dcb576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f66206d75737420626520706f736974697665000000000000000000000000000060448201526064016109c6565b818314611e59576040517f89a61989000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f6f7261636c6520616464726573736573206f7574206f6620726567697374726160448201527f74696f6e0000000000000000000000000000000000000000000000000000000060648201526084016109c6565b611e64816003615105565b8311611ecc576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f6661756c74792d6f7261636c65206620746f6f2068696768000000000000000060448201526064016109c6565b611ed4612a78565b6040805160c0810182528a8152602081018a905260ff89169181018290526060810188905267ffffffffffffffff8716608082015260a0810186905290611f1b9088613673565b600554156120d057600554600090611f3590600190614d61565b9050600060058281548110611f4c57611f4c614d91565b60009182526020822001546006805473ffffffffffffffffffffffffffffffffffffffff90921693509084908110611f8657611f86614d91565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff85811684526004909252604080842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000908116909155929091168084529220805490911690556005805491925090806120065761200661511c565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055019055600680548061206f5761206f61511c565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905501905550611f1b915050565b60005b815151811015612687578151805160009190839081106120f5576120f5614d91565b602002602001015173ffffffffffffffffffffffffffffffffffffffff160361217a576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f7369676e6572206d757374206e6f7420626520656d707479000000000000000060448201526064016109c6565b600073ffffffffffffffffffffffffffffffffffffffff16826020015182815181106121a8576121a8614d91565b602002602001015173ffffffffffffffffffffffffffffffffffffffff160361222d576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f7472616e736d6974746572206d757374206e6f7420626520656d70747900000060448201526064016109c6565b6000600460008460000151848151811061224957612249614d91565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002054610100900460ff166002811115612293576122936150b2565b146122fa576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f7265706561746564207369676e6572206164647265737300000000000000000060448201526064016109c6565b6040805180820190915260ff8216815260016020820152825180516004916000918590811061232b5761232b614d91565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252818101929092526040016000208251815460ff9091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082168117835592840151919283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000016176101008360028111156123cc576123cc6150b2565b0217905550600091506123dc9050565b60046000846020015184815181106123f6576123f6614d91565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002054610100900460ff166002811115612440576124406150b2565b146124a7576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f7265706561746564207472616e736d697474657220616464726573730000000060448201526064016109c6565b6040805180820190915260ff8216815260208101600281525060046000846020015184815181106124da576124da614d91565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252818101929092526040016000208251815460ff9091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082168117835592840151919283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000161761010083600281111561257b5761257b6150b2565b02179055505082518051600592508390811061259957612599614d91565b602090810291909101810151825460018101845560009384529282902090920180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909316929092179091558201518051600691908390811061261557612615614d91565b60209081029190910181015182546001810184556000938452919092200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790558061267f81614dc0565b9150506120d3565b506040810151600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff909216919091179055600180547fffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff8116780100000000000000000000000000000000000000000000000063ffffffff438116820292909217808555920481169291829160149161273f9184917401000000000000000000000000000000000000000090041661514b565b92506101000a81548163ffffffff021916908363ffffffff16021790555061279e4630600160149054906101000a900463ffffffff1663ffffffff16856000015186602001518760400151886060015189608001518a60a0015161368c565b600281905582518051600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010060ff9093169290920291909117905560015460208501516040808701516060880151608089015160a08a015193517f1591690b8638f5fb2dbec82ac741805ac5da8b45dc5263f4875b0496fdce4e0598612855988b9891977401000000000000000000000000000000000000000090920463ffffffff16969095919491939192615168565b60405180910390a15050505050505050505050565b6000806000600c8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156128da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128fe9190614d11565b5093505092505080426129119190614d61565b600854640100000000900463ffffffff1610801561293e5750600854640100000000900463ffffffff1615155b1561296b5750506009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16919050565b600082136129a8576040517f43d4cf66000000000000000000000000000000000000000000000000000000008152600481018390526024016109c6565b50919050565b600a546000906129ce9060649061067d9062010000900461ffff16612afb565b905090565b6129db612a78565b6129e481613737565b50565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632a905ccc6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612a54573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129ce9190615209565b60005473ffffffffffffffffffffffffffffffffffffffff163314612af9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016109c6565b565b6000806000612b08610859565b9092509050612b4082612b1c836012615077565b612b2790600a615346565b612b319087615105565b612b3b9190615355565b61382c565b949350505050565b600068ffffffffffffffffff821115612be3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203760448201527f322062697473000000000000000000000000000000000000000000000000000060648201526084016109c6565b5090565b600c546bffffffffffffffffffffffff16600003612c0157565b6000612c0b610db9565b80519091506000819003612c4b576040517f30274b3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c54600090612c6a9083906bffffffffffffffffffffffff16614ca0565b9050806bffffffffffffffffffffffff16600003612c8757505050565b60005b82811015612d505781600b6000868481518110612ca957612ca9614d91565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a90046bffffffffffffffffffffffff16612d119190615369565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555080612d4990614dc0565b9050612c8a565b50612d5b828261538e565b600c8054600090612d7b9084906bffffffffffffffffffffffff16614ccb565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505050565b612af9612a78565b6040805161016081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081018290526101008101829052610120810182905261014081019190915260085461010083015160009161ffff7501000000000000000000000000000000000000000000909104811691161115612e74576040517fdada758700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612e838460000151610663565b9050612e8d6129ae565b91506000612ea68560e001513a848860800151876134f7565b9050806bffffffffffffffffffffffff1685606001516bffffffffffffffffffffffff161015612f02576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600954600090612f38907c0100000000000000000000000000000000000000000000000000000000900463ffffffff16426153b6565b905060003087604001518860a001518960c001516001612f5891906153c9565b8a5180516020918201206101008d015160e08e015160405161300c98979695948c918c9132910173ffffffffffffffffffffffffffffffffffffffff9a8b168152988a1660208a015267ffffffffffffffff97881660408a0152959096166060880152608087019390935261ffff9190911660a086015263ffffffff90811660c08601526bffffffffffffffffffffffff9190911660e0850152919091166101008301529091166101208201526101400190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201206101608401835280845230848301526bffffffffffffffffffffffff8716848401528a83015173ffffffffffffffffffffffffffffffffffffffff16606085015260a0808c015167ffffffffffffffff1660808087019190915260e0808e015163ffffffff90811693880193909352908d015168ffffffffffffffffff90811660c08801528a169086015260085468010000000000000000810482166101008701526c010000000000000000000000009004811661012086015286166101408501529151929850909250613118918891016144da565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181528151602092830120600093845260079092529091205550929491935090915050565b600061319c6040518060a0016040528060608152602001606081526020016060815260200160608152602001606081525090565b6000808080806131ae888a018a6154c5565b84519499509297509095509350915060ff168015806131ce575084518114155b806131da575083518114155b806131e6575082518114155b806131f2575081518114155b15613259576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4669656c6473206d75737420626520657175616c206c656e677468000000000060448201526064016109c6565b60005b818110156132bf5761329587828151811061327957613279614d91565b6020026020010151600090815260076020526040902054151590565b6132bf576132a4600183614d61565b81036132af57600198505b6132b881614dc0565b905061325c565b50506040805160a0810182529586526020860194909452928401919091526060830152608082015290505b9250929050565b60006132fe826020615105565b613309856020615105565b613315886101446153b6565b61331f91906153b6565b61332991906153b6565b6133349060006153b6565b905036811461339f576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f63616c6c64617461206c656e677468206d69736d61746368000000000000000060448201526064016109c6565b50505050505050565b80515160ff1660005b8181101561065e57600061345a846000015183815181106133d4576133d4614d91565b6020026020010151856020015184815181106133f2576133f2614d91565b60200260200101518660400151858151811061341057613410614d91565b60200260200101518760600151868151811061342e5761342e614d91565b60200260200101518860800151878151811061344c5761344c614d91565b6020026020010151886138ca565b90506000816006811115613470576134706150b2565b148061348d5750600181600681111561348b5761348b6150b2565b145b156134e65783518051839081106134a6576134a6614d91565b60209081029190910181015160405133815290917fc708e0440951fd63499c0f7a73819b469ee5dd3ecc356c0ab4eb7f18389009d9910160405180910390a25b506134f081614dc0565b90506133b1565b600854600090700100000000000000000000000000000000900464ffffffffff1685101561354057600854700100000000000000000000000000000000900464ffffffffff1694505b6008546000906127109061355a9063ffffffff1688615105565b6135649190615355565b61356e90876153b6565b60085490915060009088906135a79063ffffffff6c0100000000000000000000000082048116916801000000000000000090041661514b565b6135b1919061514b565b63ffffffff16905060006135fb6000368080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613d8e92505050565b9050600061361c8261360d8587615105565b61361791906153b6565b613ed0565b905060008668ffffffffffffffffff168868ffffffffffffffffff168a68ffffffffffffffffff1661364e9190615369565b6136589190615369565b90506136648183615369565b9b9a5050505050505050505050565b600061367d610db9565b511115610d6557610d65612be7565b6000808a8a8a8a8a8a8a8a8a6040516020016136b099989796959493929190615597565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101207dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e01000000000000000000000000000000000000000000000000000000000000179150509998505050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff8216036137b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016109c6565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60006bffffffffffffffffffffffff821115612be3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203960448201527f362062697473000000000000000000000000000000000000000000000000000060648201526084016109c6565b600080848060200190518101906138e19190615663565b905060003a8261012001518361010001516138fc919061572b565b64ffffffffff1661390d9190615105565b905060008460ff166139556000368080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613d8e92505050565b61395f9190615355565b9050600061397061361783856153b6565b9050600061397d3a613ed0565b90506000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663330605298e8e868b60c0015168ffffffffffffffffff168c60e0015168ffffffffffffffffff168a6139ec9190615369565b6139f69190615369565b336040518061016001604052808f6000015181526020018f6020015173ffffffffffffffffffffffffffffffffffffffff1681526020018f604001516bffffffffffffffffffffffff1681526020018f6060015173ffffffffffffffffffffffffffffffffffffffff1681526020018f6080015167ffffffffffffffff1681526020018f60a0015163ffffffff168152602001600068ffffffffffffffffff1681526020018f60e0015168ffffffffffffffffff1681526020018f610100015164ffffffffff1681526020018f610120015164ffffffffff1681526020018f610140015163ffffffff168152506040518763ffffffff1660e01b8152600401613b0496959493929190615749565b60408051808303816000875af1158015613b22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b4691906157c5565b90925090506000826006811115613b5f57613b5f6150b2565b1480613b7c57506001826006811115613b7a57613b7a6150b2565b145b15613d7d5760008e815260076020526040812055613b9a8185615369565b336000908152600b602052604081208054909190613bc79084906bffffffffffffffffffffffff16615369565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508660e0015168ffffffffffffffffff16600c60008282829054906101000a90046bffffffffffffffffffffffff16613c2d9190615369565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508660c0015168ffffffffffffffffff16600b6000613c77613eef565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160009081208054909190613cbd9084906bffffffffffffffffffffffff16615369565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508d7f08a4a0761e3c98d288cb4af9342660f49550d83139fb3b762b70d34bed6273688487848b60e0015160008d60c00151604051613d74969594939291906bffffffffffffffffffffffff9687168152602081019590955292909416604084015268ffffffffffffffffff9081166060840152928316608083015290911660a082015260c00190565b60405180910390a25b509c9b505050505050505050505050565b600046613d9a81613f60565b15613e1657606c73ffffffffffffffffffffffffffffffffffffffff1663c6f7de0e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613deb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e0f91906157f8565b9392505050565b613e1f81613f83565b15613ec75773420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff166349948e0e8460405180608001604052806048815260200161585e60489139604051602001613e7f929190615811565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401613eaa91906140db565b602060405180830381865afa158015613deb573d6000803e3d6000fd5b50600092915050565b600061069a613edd61286a565b612b3184670de0b6b3a7640000615105565b60003073ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613f3c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129ce9190615840565b600061a4b1821480613f74575062066eed82145b8061069a57505062066eee1490565b6000600a821480613f9557506101a482145b80613fa2575062aa37dc82145b80613fae575061210582145b80613fbb575062014a3382145b8061069a57505062014a341490565b604051806103e00160405280601f906020820280368337509192915050565b60008083601f840112613ffb57600080fd5b50813567ffffffffffffffff81111561401357600080fd5b6020830191508360208285010111156132ea57600080fd5b6000806020838503121561403e57600080fd5b823567ffffffffffffffff81111561405557600080fd5b61406185828601613fe9565b90969095509350505050565b60005b83811015614088578181015183820152602001614070565b50506000910152565b600081518084526140a981602086016020860161406d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000613e0f6020830184614091565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610180810167ffffffffffffffff81118282101715614141576141416140ee565b60405290565b604051610160810167ffffffffffffffff81118282101715614141576141416140ee565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156141b2576141b26140ee565b604052919050565b600082601f8301126141cb57600080fd5b813567ffffffffffffffff8111156141e5576141e56140ee565b61421660207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161416b565b81815284602083860101111561422b57600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561425a57600080fd5b813567ffffffffffffffff81111561427157600080fd5b612b40848285016141ba565b73ffffffffffffffffffffffffffffffffffffffff811681146129e457600080fd5b80356112428161427d565b6bffffffffffffffffffffffff811681146129e457600080fd5b8035611242816142aa565b600080604083850312156142e257600080fd5b82356142ed8161427d565b915060208301356142fd816142aa565b809150509250929050565b600081518084526020808501945080840160005b8381101561434e57815173ffffffffffffffffffffffffffffffffffffffff168752958201959082019060010161431c565b509495945050505050565b602081526000613e0f6020830184614308565b60006020828403121561437e57600080fd5b5035919050565b60006020828403121561439757600080fd5b813567ffffffffffffffff8111156143ae57600080fd5b82016101608185031215613e0f57600080fd5b8051825260208101516143ec602084018273ffffffffffffffffffffffffffffffffffffffff169052565b50604081015161440c60408401826bffffffffffffffffffffffff169052565b506060810151614434606084018273ffffffffffffffffffffffffffffffffffffffff169052565b506080810151614450608084018267ffffffffffffffff169052565b5060a081015161446860a084018263ffffffff169052565b5060c081015161448560c084018268ffffffffffffffffff169052565b5060e08101516144a260e084018268ffffffffffffffffff169052565b506101008181015164ffffffffff9081169184019190915261012080830151909116908301526101409081015163ffffffff16910152565b610160810161069a82846143c1565b60008083601f8401126144fb57600080fd5b50813567ffffffffffffffff81111561451357600080fd5b6020830191508360208260051b85010111156132ea57600080fd5b60008060008060008060008060e0898b03121561454a57600080fd5b606089018a81111561455b57600080fd5b8998503567ffffffffffffffff8082111561457557600080fd5b6145818c838d01613fe9565b909950975060808b013591508082111561459a57600080fd5b6145a68c838d016144e9565b909750955060a08b01359150808211156145bf57600080fd5b506145cc8b828c016144e9565b999c989b50969995989497949560c00135949350505050565b63ffffffff811681146129e457600080fd5b8035611242816145e5565b64ffffffffff811681146129e457600080fd5b803561124281614602565b803561ffff8116811461124257600080fd5b67ffffffffffffffff811681146129e457600080fd5b803561124281614632565b60ff811681146129e457600080fd5b803561124281614653565b80357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8116811461124257600080fd5b600061018082840312156146ac57600080fd5b6146b461411d565b6146bd836145f7565b81526146cb602084016145f7565b60208201526146dc604084016145f7565b60408201526146ed606084016145f7565b60608201526146fe60808401614615565b608082015261470f60a08401614620565b60a082015261472060c08401614648565b60c082015261473160e08401614662565b60e082015261010061474481850161466d565b908201526101206147568482016145f7565b90820152610140614768848201614620565b9082015261016061477a848201614620565b908201529392505050565b815163ffffffff168152610180810160208301516147ab602084018263ffffffff169052565b5060408301516147c3604084018263ffffffff169052565b5060608301516147db606084018263ffffffff169052565b5060808301516147f4608084018264ffffffffff169052565b5060a083015161480a60a084018261ffff169052565b5060c083015161482660c084018267ffffffffffffffff169052565b5060e083015161483b60e084018260ff169052565b50610100838101517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16908301526101208084015163ffffffff16908301526101408084015161ffff908116918401919091526101608085015191821681850152905b505092915050565b6000806000806000608086880312156148ba57600080fd5b85356148c581614632565b9450602086013567ffffffffffffffff8111156148e157600080fd5b6148ed88828901613fe9565b9095509350506040860135614901816145e5565b949793965091946060013592915050565b600067ffffffffffffffff82111561492c5761492c6140ee565b5060051b60200190565b600082601f83011261494757600080fd5b8135602061495c61495783614912565b61416b565b82815260059290921b8401810191818101908684111561497b57600080fd5b8286015b8481101561499f5780356149928161427d565b835291830191830161497f565b509695505050505050565b60008060008060008060c087890312156149c357600080fd5b863567ffffffffffffffff808211156149db57600080fd5b6149e78a838b01614936565b975060208901359150808211156149fd57600080fd5b614a098a838b01614936565b9650614a1760408a01614662565b95506060890135915080821115614a2d57600080fd5b614a398a838b016141ba565b9450614a4760808a01614648565b935060a0890135915080821115614a5d57600080fd5b50614a6a89828a016141ba565b9150509295509295509295565b600060208284031215614a8957600080fd5b8135613e0f8161427d565b600181811c90821680614aa857607f821691505b6020821081036129a8577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b601f82111561065e57600081815260208120601f850160051c81016020861015614b085750805b601f850160051c820191505b8181101561085157828155600101614b14565b67ffffffffffffffff831115614b3f57614b3f6140ee565b614b5383614b4d8354614a94565b83614ae1565b6000601f841160018114614ba55760008515614b6f5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355614c3b565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b82811015614bf45786850135825560209485019460019092019101614bd4565b5086821015614c2f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006bffffffffffffffffffffffff80841680614cbf57614cbf614c42565b92169190910492915050565b6bffffffffffffffffffffffff828116828216039080821115614cf057614cf0614c71565b5092915050565b805169ffffffffffffffffffff8116811461124257600080fd5b600080600080600060a08688031215614d2957600080fd5b614d3286614cf7565b9450602086015193506040860151925060608601519150614d5560808701614cf7565b90509295509295909350565b8181038181111561069a5761069a614c71565b600060208284031215614d8657600080fd5b8151613e0f81614653565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614df157614df1614c71565b5060010190565b68ffffffffffffffffff811681146129e457600080fd5b803561124281614df8565b60006101608236031215614e2d57600080fd5b614e35614147565b823567ffffffffffffffff811115614e4c57600080fd5b614e58368286016141ba565b82525060208301356020820152614e716040840161429f565b6040820152614e82606084016142c4565b6060820152614e9360808401614e0f565b6080820152614ea460a08401614648565b60a0820152614eb560c08401614648565b60c0820152614ec660e084016145f7565b60e0820152610100614ed9818501614620565b90820152610120614eeb848201614648565b90820152610140614efd84820161429f565b9082015292915050565b600060208284031215614f1957600080fd5b8135613e0f81614632565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614f5957600080fd5b83018035915067ffffffffffffffff821115614f7457600080fd5b6020019150368190038213156132ea57600080fd5b600060208284031215614f9b57600080fd5b613e0f82614620565b600060208284031215614fb657600080fd5b8135613e0f816145e5565b73ffffffffffffffffffffffffffffffffffffffff8a8116825267ffffffffffffffff8a166020830152881660408201526102406060820181905281018690526000610260878982850137600083890182015261ffff8716608084015260a0830186905263ffffffff851660c0840152601f88017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016830101905061506960e08301846143c1565b9a9950505050505050505050565b60ff818116838216019081111561069a5761069a614c71565b600060ff8316806150a3576150a3614c42565b8060ff84160491505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8183823760009101908152919050565b828152606082602083013760800192915050565b808202811582820484141761069a5761069a614c71565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b63ffffffff818116838216019080821115614cf057614cf0614c71565b600061012063ffffffff808d1684528b6020850152808b166040850152508060608401526151988184018a614308565b905082810360808401526151ac8189614308565b905060ff871660a084015282810360c08401526151c98187614091565b905067ffffffffffffffff851660e08401528281036101008401526151ee8185614091565b9c9b505050505050505050505050565b805161124281614df8565b60006020828403121561521b57600080fd5b8151613e0f81614df8565b600181815b8085111561527f57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561526557615265614c71565b8085161561527257918102915b93841c939080029061522b565b509250929050565b6000826152965750600161069a565b816152a35750600061069a565b81600181146152b957600281146152c3576152df565b600191505061069a565b60ff8411156152d4576152d4614c71565b50506001821b61069a565b5060208310610133831016604e8410600b8410161715615302575081810a61069a565b61530c8383615226565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561533e5761533e614c71565b029392505050565b6000613e0f60ff841683615287565b60008261536457615364614c42565b500490565b6bffffffffffffffffffffffff818116838216019080821115614cf057614cf0614c71565b6bffffffffffffffffffffffff81811683821602808216919082811461489a5761489a614c71565b8082018082111561069a5761069a614c71565b67ffffffffffffffff818116838216019080821115614cf057614cf0614c71565b600082601f8301126153fb57600080fd5b8135602061540b61495783614912565b82815260059290921b8401810191818101908684111561542a57600080fd5b8286015b8481101561499f578035835291830191830161542e565b600082601f83011261545657600080fd5b8135602061546661495783614912565b82815260059290921b8401810191818101908684111561548557600080fd5b8286015b8481101561499f57803567ffffffffffffffff8111156154a95760008081fd5b6154b78986838b01016141ba565b845250918301918301615489565b600080600080600060a086880312156154dd57600080fd5b853567ffffffffffffffff808211156154f557600080fd5b61550189838a016153ea565b9650602088013591508082111561551757600080fd5b61552389838a01615445565b9550604088013591508082111561553957600080fd5b61554589838a01615445565b9450606088013591508082111561555b57600080fd5b61556789838a01615445565b9350608088013591508082111561557d57600080fd5b5061558a88828901615445565b9150509295509295909350565b60006101208b835273ffffffffffffffffffffffffffffffffffffffff8b16602084015267ffffffffffffffff808b1660408501528160608501526155de8285018b614308565b915083820360808501526155f2828a614308565b915060ff881660a085015283820360c085015261560f8288614091565b90861660e085015283810361010085015290506151ee8185614091565b80516112428161427d565b8051611242816142aa565b805161124281614632565b8051611242816145e5565b805161124281614602565b6000610160828403121561567657600080fd5b61567e614147565b8251815261568e6020840161562c565b602082015261569f60408401615637565b60408201526156b06060840161562c565b60608201526156c160808401615642565b60808201526156d260a0840161564d565b60a08201526156e360c084016151fe565b60c08201526156f460e084016151fe565b60e0820152610100615707818501615658565b90820152610120615719848201615658565b9082015261014061477a84820161564d565b64ffffffffff818116838216019080821115614cf057614cf0614c71565b600061020080835261575d8184018a614091565b905082810360208401526157718189614091565b6bffffffffffffffffffffffff88811660408601528716606085015273ffffffffffffffffffffffffffffffffffffffff8616608085015291506157ba905060a08301846143c1565b979650505050505050565b600080604083850312156157d857600080fd5b8251600781106157e757600080fd5b60208401519092506142fd816142aa565b60006020828403121561580a57600080fd5b5051919050565b6000835161582381846020880161406d565b83519083019061583781836020880161406d565b01949350505050565b60006020828403121561585257600080fd5b8151613e0f8161427d56fe307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666a164736f6c6343000813000a", + 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\":\"uint16\",\"name\":\"transmitTxSizeBytes\",\"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\"},{\"internalType\":\"uint16\",\"name\":\"transmitTxSizeBytes\",\"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\":\"uint16\",\"name\":\"transmitTxSizeBytes\",\"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\":\"uint16\",\"name\":\"transmitTxSizeBytes\",\"type\":\"uint16\"}],\"internalType\":\"structFunctionsBillingConfig\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"updateConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x60a06040523480156200001157600080fd5b5060405162006047380380620060478339810160408190526200003491620004f2565b83838383833380600081620000905760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000c357620000c3816200014e565b5050506001600160a01b038116620000ee57604051632530e88560e11b815260040160405180910390fd5b6001600160a01b03908116608052600c80546001600160601b03166c0100000000000000000000000085841602179055600d80546001600160a01b0319169183169190911790556200014083620001f9565b505050505050505062000779565b336001600160a01b03821603620001a85760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000087565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b62000203620003b5565b80516008805460208401516040808601516060870151608088015160a089015160c08a015160e08b015163ffffffff9a8b166001600160401b031990991698909817640100000000978b16880217600160401b600160801b03191668010000000000000000958b169590950263ffffffff60601b1916949094176c01000000000000000000000000938a16939093029290921766ffffffffffffff60801b1916600160801b64ffffffffff9092169190910261ffff60a81b191617600160a81b61ffff92831602176001600160b81b0316600160b81b6001600160401b03909316929092026001600160f81b031691909117600160f81b60ff90951694909402939093179093556101008501516101208601516001600160e01b03909116600160e01b919095160293909317600955610140840151600a805461016087015161018088015193851663ffffffff199092169190911762010000918516919091021761ffff60201b19169190921690930292909217909155517f9832846a11905a128363408ace5f9803f449fcb017d3cf7e22a50c6e332931b290620003aa90839062000663565b60405180910390a150565b620003bf620003c1565b565b6000546001600160a01b03163314620003bf5760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640162000087565b80516001600160a01b03811681146200043557600080fd5b919050565b6040516101a081016001600160401b03811182821017156200046c57634e487b7160e01b600052604160045260246000fd5b60405290565b805163ffffffff811681146200043557600080fd5b805164ffffffffff811681146200043557600080fd5b805161ffff811681146200043557600080fd5b80516001600160401b03811681146200043557600080fd5b805160ff811681146200043557600080fd5b80516001600160e01b03811681146200043557600080fd5b6000806000808486036102008112156200050b57600080fd5b62000516866200041d565b94506101a080601f19830112156200052d57600080fd5b620005376200043a565b9150620005476020880162000472565b8252620005576040880162000472565b60208301526200056a6060880162000472565b60408301526200057d6080880162000472565b60608301526200059060a0880162000487565b6080830152620005a360c088016200049d565b60a0830152620005b660e08801620004b0565b60c0830152610100620005cb818901620004c8565b60e0840152610120620005e0818a01620004da565b828501526101409150620005f6828a0162000472565b908401526101606200060a8982016200049d565b82850152610180915062000620828a016200049d565b90840152620006318883016200049d565b90830152509250620006476101c086016200041d565b9150620006586101e086016200041d565b905092959194509250565b815163ffffffff1681526101a0810160208301516200068a602084018263ffffffff169052565b506040830151620006a3604084018263ffffffff169052565b506060830151620006bc606084018263ffffffff169052565b506080830151620006d6608084018264ffffffffff169052565b5060a0830151620006ed60a084018261ffff169052565b5060c08301516200070960c08401826001600160401b03169052565b5060e08301516200071f60e084018260ff169052565b50610100838101516001600160e01b0316908301526101208084015163ffffffff16908301526101408084015161ffff90811691840191909152610160808501518216908401526101809384015116929091019190915290565b608051615888620007bf600039600081816107af01528181610c9001528181610f240152818161103a01528181611b7101528181612a2f015261397801526158886000f3fe608060405234801561001057600080fd5b50600436106101a35760003560e01c80638da5cb5b116100ee578063d227d24511610097578063e4ddcea611610071578063e4ddcea6146105e8578063f2f22ef1146105fe578063f2fde38b14610606578063f6ea41f61461061957600080fd5b8063d227d2451461059d578063d328a91e146105cd578063e3d0e712146105d557600080fd5b8063b1dc65a4116100c8578063b1dc65a414610396578063c074ef21146103a9578063c3f909d4146103bc57600080fd5b80638da5cb5b1461032e578063a631571e14610356578063afcb95d71461037657600080fd5b80637d4807871161015057806381f1b9381161012a57806381f1b938146102a657806381ff7048146102ae57806385b214cf1461031b57600080fd5b80637d480787146102765780637f15e1661461027e578063814118341461029157600080fd5b806366316d8d1161018157806366316d8d1461023c5780637212762f1461024f57806379ba50971461026e57600080fd5b8063083a5466146101a8578063181f5a77146101bd578063626f458c1461020f575b600080fd5b6101bb6101b6366004614029565b610621565b005b6101f96040518060400160405280601c81526020017f46756e6374696f6e7320436f6f7264696e61746f722076312e332e310000000081525081565b60405161020691906140cf565b60405180910390f35b61022261021d36600461423c565b610676565b60405168ffffffffffffffffff9091168152602001610206565b6101bb61024a3660046142c3565b6106b3565b61025761086c565b6040805192835260ff909116602083015201610206565b6101bb610a7f565b6101bb610b7c565b6101bb61028c366004614029565b610d7c565b610299610dcc565b604051610206919061434d565b6101f9610e3b565b6102f860015460025463ffffffff74010000000000000000000000000000000000000000830481169378010000000000000000000000000000000000000000000000009093041691565b6040805163ffffffff948516815293909216602084015290820152606001610206565b6101bb610329366004614360565b610f0c565b60005460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610206565b610369610364366004614379565b610fc9565b60405161020691906144ce565b604080516001815260006020820181905291810191909152606001610206565b6101bb6103a4366004614522565b61125a565b6101bb6103b736600461468d565b611871565b610590604080516101a081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810182905261018081019190915250604080516101a08101825260085463ffffffff8082168352640100000000808304821660208501526801000000000000000083048216948401949094526c01000000000000000000000000820481166060840152700100000000000000000000000000000000820464ffffffffff1660808401527501000000000000000000000000000000000000000000820461ffff90811660a085015277010000000000000000000000000000000000000000000000830467ffffffffffffffff1660c08501527f010000000000000000000000000000000000000000000000000000000000000090920460ff1660e08401526009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff81166101008501527c0100000000000000000000000000000000000000000000000000000000900416610120830152600a5480821661014084015262010000810482166101608401529290920490911661018082015290565b604051610206919061478b565b6105b06105ab3660046148b5565b611b6d565b6040516bffffffffffffffffffffffff9091168152602001610206565b6101f9611cdb565b6101bb6105e33660046149bd565b611d32565b6105f06128ae565b604051908152602001610206565b6102226129f2565b6101bb610614366004614a8a565b612a17565b610222612a2b565b610629612abc565b6000819003610664576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f610671828483614b3a565b505050565b600a546000906106ad906064906106909061ffff16612b3f565b61069a9190614cb3565b6bffffffffffffffffffffffff16612b8c565b92915050565b6106bb612c2b565b806bffffffffffffffffffffffff166000036106f55750336000908152600b60205260409020546bffffffffffffffffffffffff1661074f565b336000908152600b60205260409020546bffffffffffffffffffffffff8083169116101561074f576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600b60205260408120805483929061077c9084906bffffffffffffffffffffffff16614cde565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055506107d17f000000000000000000000000000000000000000000000000000000000000000090565b6040517f66316d8d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526bffffffffffffffffffffffff8416602483015291909116906366316d8d90604401600060405180830381600087803b15801561085057600080fd5b505af1158015610864573d6000803e3d6000fd5b505050505050565b600080600080600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156108df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109039190614d24565b5093505092505080426109169190614d74565b600854640100000000900463ffffffff161080156109435750600854640100000000900463ffffffff1615155b156109a057505060085477010000000000000000000000000000000000000000000000810467ffffffffffffffff16937f010000000000000000000000000000000000000000000000000000000000000090910460ff1692509050565b600082136109e2576040517f56b22ab8000000000000000000000000000000000000000000000000000000008152600481018390526024015b60405180910390fd5b600d54604080517f313ce5670000000000000000000000000000000000000000000000000000000081529051849273ffffffffffffffffffffffffffffffffffffffff169163313ce5679160048083019260209291908290030181865afa158015610a51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a759190614d87565b9350935050509091565b60015473ffffffffffffffffffffffffffffffffffffffff163314610b00576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016109d9565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610b84612df2565b610b8c612c2b565b6000610b96610dcc565b905060005b8151811015610d78576000600b6000848481518110610bbc57610bbc614da4565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252810191909152604001600020546bffffffffffffffffffffffff1690508015610d67576000600b6000858581518110610c1b57610c1b614da4565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550610cb27f000000000000000000000000000000000000000000000000000000000000000090565b73ffffffffffffffffffffffffffffffffffffffff166366316d8d848481518110610cdf57610cdf614da4565b6020026020010151836040518363ffffffff1660e01b8152600401610d3492919073ffffffffffffffffffffffffffffffffffffffff9290921682526bffffffffffffffffffffffff16602082015260400190565b600060405180830381600087803b158015610d4e57600080fd5b505af1158015610d62573d6000803e3d6000fd5b505050505b50610d7181614dd3565b9050610b9b565b5050565b610d84612abc565b6000819003610dbf576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e610671828483614b3a565b60606006805480602002602001604051908101604052809291908181526020018280548015610e3157602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610e06575b5050505050905090565b6060600f8054610e4a90614aa7565b9050600003610e85576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f8054610e9290614aa7565b80601f0160208091040260200160405190810160405280929190818152602001828054610ebe90614aa7565b8015610e315780601f10610ee057610100808354040283529160200191610e31565b820191906000526020600020905b815481529060010190602001808311610eee57509395945050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610f7b576040517fc41a5b0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526007602052604080822091909155517f8a4b97add3359bd6bcf5e82874363670eb5ad0f7615abddbd0ed0a3a98f0f41690610fbe9083815260200190565b60405180910390a150565b6040805161016081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101919091523373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614611091576040517fc41a5b0900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006110a461109f84614e2d565b612dfa565b90925090506110b96060840160408501614a8a565b825173ffffffffffffffffffffffffffffffffffffffff91909116907fbf50768ccf13bd0110ca6d53a9c4f1f3271abdd4c24a56878863ed25b20598ff3261110760c0880160a08901614f1a565b61111961016089016101408a01614a8a565b6111238980614f37565b6111356101208c016101008d01614f9c565b60208c013561114b6101008e0160e08f01614fb7565b6040518061016001604052808e6000015181526020018e6020015173ffffffffffffffffffffffffffffffffffffffff1681526020018e604001516bffffffffffffffffffffffff1681526020018e6060015173ffffffffffffffffffffffffffffffffffffffff1681526020018e6080015167ffffffffffffffff1681526020018e60a0015163ffffffff1681526020018d68ffffffffffffffffff1681526020018e60e0015168ffffffffffffffffff1681526020018e610100015164ffffffffff1681526020018e610120015164ffffffffff1681526020018e610140015163ffffffff1681525060405161124b99989796959493929190614fd4565b60405180910390a3505b919050565b60008061126789896131ac565b915091508115611278575050611867565b604080518b3580825262ffffff6020808f0135600881901c9290921690840152909290917fb04e63db38c49950639fa09d29872f21f5d49d614f3a969d8adf3d4b52e41a62910160405180910390a16112d58b8b8b8b8b8b613335565b6003546000906002906112f39060ff8082169161010090041661508a565b6112fd91906150a3565b61130890600161508a565b60ff169050888114611376576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f77726f6e67206e756d626572206f66207369676e61747572657300000000000060448201526064016109d9565b888714611405576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f7265706f727420727320616e64207373206d757374206265206f66206571756160448201527f6c206c656e67746800000000000000000000000000000000000000000000000060648201526084016109d9565b3360009081526004602090815260408083208151808301909252805460ff80821684529293919291840191610100909104166002811115611448576114486150c5565b6002811115611459576114596150c5565b9052509050600281602001516002811115611476576114766150c5565b141580156114bf57506006816000015160ff168154811061149957611499614da4565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff163314155b15611526576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f756e617574686f72697a6564207472616e736d6974746572000000000000000060448201526064016109d9565b50505050611532613fc8565b60008a8a6040516115449291906150f4565b60405190819003812061155b918e90602001615104565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181528282528051602091820120838301909252600080845290830152915060005b898110156118575760006001848984602081106115c4576115c4614da4565b6115d191901a601b61508a565b8e8e868181106115e3576115e3614da4565b905060200201358d8d878181106115fc576115fc614da4565b9050602002013560405160008152602001604052604051611639949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa15801561165b573d6000803e3d6000fd5b5050604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081015173ffffffffffffffffffffffffffffffffffffffff811660009081526004602090815290849020838501909452835460ff808216855292965092945084019161010090041660028111156116db576116db6150c5565b60028111156116ec576116ec6150c5565b9052509250600183602001516002811115611709576117096150c5565b14611770576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f61646472657373206e6f7420617574686f72697a656420746f207369676e000060448201526064016109d9565b8251600090869060ff16601f811061178a5761178a614da4565b602002015173ffffffffffffffffffffffffffffffffffffffff161461180c576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6e6f6e2d756e69717565207369676e617475726500000000000000000000000060448201526064016109d9565b8085846000015160ff16601f811061182657611826614da4565b73ffffffffffffffffffffffffffffffffffffffff90921660209290920201525061185081614dd3565b90506115a5565b505050611863826133ec565b5050505b5050505050505050565b611879612df2565b80516008805460208401516040808601516060870151608088015160a089015160c08a015160e08b015163ffffffff9a8b167fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000090991698909817640100000000978b168802177fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff1668010000000000000000958b16959095027fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff16949094176c01000000000000000000000000938a1693909302929092177fffffffffffffffffff00000000000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000064ffffffffff909216919091027fffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffffff1617750100000000000000000000000000000000000000000061ffff928316021776ffffffffffffffffffffffffffffffffffffffffffffff167701000000000000000000000000000000000000000000000067ffffffffffffffff909316929092027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff16919091177f010000000000000000000000000000000000000000000000000000000000000060ff90951694909402939093179093556101008501516101208601517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff9091167c0100000000000000000000000000000000000000000000000000000000919095160293909317600955610140840151600a80546101608701516101808801519385167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000909216919091176201000091851691909102177fffffffffffffffffffffffffffffffffffffffffffffffffffff0000ffffffff169190921690930292909217909155517f9832846a11905a128363408ace5f9803f449fcb017d3cf7e22a50c6e332931b290610fbe90839061478b565b60007f00000000000000000000000000000000000000000000000000000000000000006040517f10fc49c100000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8816600482015263ffffffff8516602482015273ffffffffffffffffffffffffffffffffffffffff91909116906310fc49c19060440160006040518083038186803b158015611c0d57600080fd5b505afa158015611c21573d6000803e3d6000fd5b5050505066038d7ea4c68000821115611c66576040517f8129bbcd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611c70612a2b565b90506000611cb387878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061067692505050565b90506000611cbf6129f2565b9050611cce868684868561353b565b9998505050505050505050565b6060600e8054611cea90614aa7565b9050600003611d25576040517f4f42be3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600e8054610e9290614aa7565b855185518560ff16601f831115611da5576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f746f6f206d616e79207369676e6572730000000000000000000000000000000060448201526064016109d9565b80600003611e0f576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f66206d75737420626520706f736974697665000000000000000000000000000060448201526064016109d9565b818314611e9d576040517f89a61989000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f6f7261636c6520616464726573736573206f7574206f6620726567697374726160448201527f74696f6e0000000000000000000000000000000000000000000000000000000060648201526084016109d9565b611ea8816003615118565b8311611f10576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f6661756c74792d6f7261636c65206620746f6f2068696768000000000000000060448201526064016109d9565b611f18612abc565b6040805160c0810182528a8152602081018a905260ff89169181018290526060810188905267ffffffffffffffff8716608082015260a0810186905290611f5f9088613699565b6005541561211457600554600090611f7990600190614d74565b9050600060058281548110611f9057611f90614da4565b60009182526020822001546006805473ffffffffffffffffffffffffffffffffffffffff90921693509084908110611fca57611fca614da4565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff85811684526004909252604080842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00009081169091559290911680845292208054909116905560058054919250908061204a5761204a61512f565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905501905560068054806120b3576120b361512f565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905501905550611f5f915050565b60005b8151518110156126cb5781518051600091908390811061213957612139614da4565b602002602001015173ffffffffffffffffffffffffffffffffffffffff16036121be576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f7369676e6572206d757374206e6f7420626520656d707479000000000000000060448201526064016109d9565b600073ffffffffffffffffffffffffffffffffffffffff16826020015182815181106121ec576121ec614da4565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1603612271576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f7472616e736d6974746572206d757374206e6f7420626520656d70747900000060448201526064016109d9565b6000600460008460000151848151811061228d5761228d614da4565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002054610100900460ff1660028111156122d7576122d76150c5565b1461233e576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f7265706561746564207369676e6572206164647265737300000000000000000060448201526064016109d9565b6040805180820190915260ff8216815260016020820152825180516004916000918590811061236f5761236f614da4565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252818101929092526040016000208251815460ff9091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082168117835592840151919283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001617610100836002811115612410576124106150c5565b0217905550600091506124209050565b600460008460200151848151811061243a5761243a614da4565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002054610100900460ff166002811115612484576124846150c5565b146124eb576040517f89a6198900000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f7265706561746564207472616e736d697474657220616464726573730000000060448201526064016109d9565b6040805180820190915260ff82168152602081016002815250600460008460200151848151811061251e5761251e614da4565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252818101929092526040016000208251815460ff9091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082168117835592840151919283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000016176101008360028111156125bf576125bf6150c5565b0217905550508251805160059250839081106125dd576125dd614da4565b602090810291909101810151825460018101845560009384529282902090920180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909316929092179091558201518051600691908390811061265957612659614da4565b60209081029190910181015182546001810184556000938452919092200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055806126c381614dd3565b915050612117565b506040810151600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff909216919091179055600180547fffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff8116780100000000000000000000000000000000000000000000000063ffffffff43811682029290921780855592048116929182916014916127839184917401000000000000000000000000000000000000000090041661515e565b92506101000a81548163ffffffff021916908363ffffffff1602179055506127e24630600160149054906101000a900463ffffffff1663ffffffff16856000015186602001518760400151886060015189608001518a60a001516136b2565b600281905582518051600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010060ff9093169290920291909117905560015460208501516040808701516060880151608089015160a08a015193517f1591690b8638f5fb2dbec82ac741805ac5da8b45dc5263f4875b0496fdce4e0598612899988b9891977401000000000000000000000000000000000000000090920463ffffffff1696909591949193919261517b565b60405180910390a15050505050505050505050565b6000806000600c8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa15801561291e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129429190614d24565b5093505092505080426129559190614d74565b600854640100000000900463ffffffff161080156129825750600854640100000000900463ffffffff1615155b156129af5750506009547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16919050565b600082136129ec576040517f43d4cf66000000000000000000000000000000000000000000000000000000008152600481018390526024016109d9565b50919050565b600a54600090612a12906064906106909062010000900461ffff16612b3f565b905090565b612a1f612abc565b612a288161375d565b50565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632a905ccc6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612a98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a12919061520c565b60005473ffffffffffffffffffffffffffffffffffffffff163314612b3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016109d9565b565b6000806000612b4c61086c565b9092509050612b8482612b6083601261508a565b612b6b90600a615349565b612b759087615118565b612b7f9190615358565b613852565b949350505050565b600068ffffffffffffffffff821115612c27576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203760448201527f322062697473000000000000000000000000000000000000000000000000000060648201526084016109d9565b5090565b600c546bffffffffffffffffffffffff16600003612c4557565b6000612c4f610dcc565b80519091506000819003612c8f576040517f30274b3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c54600090612cae9083906bffffffffffffffffffffffff16614cb3565b9050806bffffffffffffffffffffffff16600003612ccb57505050565b60005b82811015612d945781600b6000868481518110612ced57612ced614da4565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a90046bffffffffffffffffffffffff16612d55919061536c565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555080612d8d90614dd3565b9050612cce565b50612d9f8282615391565b600c8054600090612dbf9084906bffffffffffffffffffffffff16614cde565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505050565b612b3d612abc565b6040805161016081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081018290526101008101829052610120810182905261014081019190915260085461010083015160009161ffff7501000000000000000000000000000000000000000000909104811691161115612eb8576040517fdada758700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612ec78460000151610676565b9050612ed16129f2565b91506000612eea8560e001513a8488608001518761353b565b9050806bffffffffffffffffffffffff1685606001516bffffffffffffffffffffffff161015612f46576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600954600090612f7c907c0100000000000000000000000000000000000000000000000000000000900463ffffffff16426153b9565b905060003087604001518860a001518960c001516001612f9c91906153cc565b8a5180516020918201206101008d015160e08e015160405161305098979695948c918c9132910173ffffffffffffffffffffffffffffffffffffffff9a8b168152988a1660208a015267ffffffffffffffff97881660408a0152959096166060880152608087019390935261ffff9190911660a086015263ffffffff90811660c08601526bffffffffffffffffffffffff9190911660e0850152919091166101008301529091166101208201526101400190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201206101608401835280845230848301526bffffffffffffffffffffffff8716848401528a83015173ffffffffffffffffffffffffffffffffffffffff16606085015260a0808c015167ffffffffffffffff1660808087019190915260e0808e015163ffffffff90811693880193909352908d015168ffffffffffffffffff90811660c08801528a169086015260085468010000000000000000810482166101008701526c01000000000000000000000000900481166101208601528616610140850152915192985090925061315c918891016144ce565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181528151602092830120600093845260079092529091205550929491935090915050565b60006131e06040518060a0016040528060608152602001606081526020016060815260200160608152602001606081525090565b6000808080806131f2888a018a6154c8565b84519499509297509095509350915060ff16801580613212575084518114155b8061321e575083518114155b8061322a575082518114155b80613236575081518114155b1561329d576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f4669656c6473206d75737420626520657175616c206c656e677468000000000060448201526064016109d9565b60005b81811015613303576132d98782815181106132bd576132bd614da4565b6020026020010151600090815260076020526040902054151590565b613303576132e8600183614d74565b81036132f357600198505b6132fc81614dd3565b90506132a0565b50506040805160a0810182529586526020860194909452928401919091526060830152608082015290505b9250929050565b6000613342826020615118565b61334d856020615118565b613359886101446153b9565b61336391906153b9565b61336d91906153b9565b6133789060006153b9565b90503681146133e3576040517f660bd4ba00000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f63616c6c64617461206c656e677468206d69736d61746368000000000000000060448201526064016109d9565b50505050505050565b80515160ff1660005b8181101561067157600061349e8460000151838151811061341857613418614da4565b60200260200101518560200151848151811061343657613436614da4565b60200260200101518660400151858151811061345457613454614da4565b60200260200101518760600151868151811061347257613472614da4565b60200260200101518860800151878151811061349057613490614da4565b6020026020010151886138f0565b905060008160068111156134b4576134b46150c5565b14806134d1575060018160068111156134cf576134cf6150c5565b145b1561352a5783518051839081106134ea576134ea614da4565b60209081029190910181015160405133815290917fc708e0440951fd63499c0f7a73819b469ee5dd3ecc356c0ab4eb7f18389009d9910160405180910390a25b5061353481614dd3565b90506133f5565b600854600090700100000000000000000000000000000000900464ffffffffff1685101561358457600854700100000000000000000000000000000000900464ffffffffff1694505b60085460009087906135ba9063ffffffff6c0100000000000000000000000082048116916801000000000000000090041661515e565b6135c4919061515e565b600a5463ffffffff9190911691506000906135ea90640100000000900461ffff16613d82565b90506000816135f9848a615118565b61360391906153b9565b600854909150600090612710906136209063ffffffff1684615118565b61362a9190615358565b61363490836153b9565b9050600061364182613ece565b905060008768ffffffffffffffffff168968ffffffffffffffffff168b68ffffffffffffffffff16613673919061536c565b61367d919061536c565b9050613689818361536c565b9c9b505050505050505050505050565b60006136a3610dcc565b511115610d7857610d78612c2b565b6000808a8a8a8a8a8a8a8a8a6040516020016136d69998979695949392919061559a565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101207dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e01000000000000000000000000000000000000000000000000000000000000179150509998505050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff8216036137dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016109d9565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60006bffffffffffffffffffffffff821115612c27576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203960448201527f362062697473000000000000000000000000000000000000000000000000000060648201526084016109d9565b600080848060200190518101906139079190615666565b905060003a826101200151836101000151613922919061572e565b64ffffffffff166139339190615118565b9050600060ff851661394436613d82565b61394e9190615358565b9050600061396461395f83856153b9565b613ece565b905060006139713a613ece565b90506000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663330605298e8e868b60c0015168ffffffffffffffffff168c60e0015168ffffffffffffffffff168a6139e0919061536c565b6139ea919061536c565b336040518061016001604052808f6000015181526020018f6020015173ffffffffffffffffffffffffffffffffffffffff1681526020018f604001516bffffffffffffffffffffffff1681526020018f6060015173ffffffffffffffffffffffffffffffffffffffff1681526020018f6080015167ffffffffffffffff1681526020018f60a0015163ffffffff168152602001600068ffffffffffffffffff1681526020018f60e0015168ffffffffffffffffff1681526020018f610100015164ffffffffff1681526020018f610120015164ffffffffff1681526020018f610140015163ffffffff168152506040518763ffffffff1660e01b8152600401613af89695949392919061574c565b60408051808303816000875af1158015613b16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b3a91906157c8565b90925090506000826006811115613b5357613b536150c5565b1480613b7057506001826006811115613b6e57613b6e6150c5565b145b15613d715760008e815260076020526040812055613b8e818561536c565b336000908152600b602052604081208054909190613bbb9084906bffffffffffffffffffffffff1661536c565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508660e0015168ffffffffffffffffff16600c60008282829054906101000a90046bffffffffffffffffffffffff16613c21919061536c565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508660c0015168ffffffffffffffffff16600b6000613c6b613eed565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160009081208054909190613cb19084906bffffffffffffffffffffffff1661536c565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508d7f08a4a0761e3c98d288cb4af9342660f49550d83139fb3b762b70d34bed6273688487848b60e0015160008d60c00151604051613d68969594939291906bffffffffffffffffffffffff9687168152602081019590955292909416604084015268ffffffffffffffffff9081166060840152928316608083015290911660a082015260c00190565b60405180910390a25b509c9b505050505050505050505050565b600046613d8e81613f5e565b15613e23576000606c73ffffffffffffffffffffffffffffffffffffffff166341b247a86040518163ffffffff1660e01b815260040160c060405180830381865afa158015613de1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e0591906157fb565b50505050915050608c84613e1991906153b9565b612b849082615118565b613e2c81613f81565b15613ec5576040517ff1c7a58b0000000000000000000000000000000000000000000000000000000081526004810184905273420000000000000000000000000000000000000f9063f1c7a58b90602401602060405180830381865afa158015613e9a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ebe9190615845565b9392505050565b50600092915050565b60006106ad613edb6128ae565b612b7584670de0b6b3a7640000615118565b60003073ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613f3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a12919061585e565b600061a4b1821480613f72575062066eed82145b806106ad57505062066eee1490565b6000600a821480613f9357506101a482145b80613fa0575062aa37dc82145b80613fac575061210582145b80613fb9575062014a3382145b806106ad57505062014a341490565b604051806103e00160405280601f906020820280368337509192915050565b60008083601f840112613ff957600080fd5b50813567ffffffffffffffff81111561401157600080fd5b60208301915083602082850101111561332e57600080fd5b6000806020838503121561403c57600080fd5b823567ffffffffffffffff81111561405357600080fd5b61405f85828601613fe7565b90969095509350505050565b6000815180845260005b8181101561409157602081850181015186830182015201614075565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000613ebe602083018461406b565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516101a0810167ffffffffffffffff81118282101715614135576141356140e2565b60405290565b604051610160810167ffffffffffffffff81118282101715614135576141356140e2565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156141a6576141a66140e2565b604052919050565b600082601f8301126141bf57600080fd5b813567ffffffffffffffff8111156141d9576141d96140e2565b61420a60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161415f565b81815284602083860101111561421f57600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561424e57600080fd5b813567ffffffffffffffff81111561426557600080fd5b612b84848285016141ae565b73ffffffffffffffffffffffffffffffffffffffff81168114612a2857600080fd5b803561125581614271565b6bffffffffffffffffffffffff81168114612a2857600080fd5b80356112558161429e565b600080604083850312156142d657600080fd5b82356142e181614271565b915060208301356142f18161429e565b809150509250929050565b600081518084526020808501945080840160005b8381101561434257815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101614310565b509495945050505050565b602081526000613ebe60208301846142fc565b60006020828403121561437257600080fd5b5035919050565b60006020828403121561438b57600080fd5b813567ffffffffffffffff8111156143a257600080fd5b82016101608185031215613ebe57600080fd5b8051825260208101516143e0602084018273ffffffffffffffffffffffffffffffffffffffff169052565b50604081015161440060408401826bffffffffffffffffffffffff169052565b506060810151614428606084018273ffffffffffffffffffffffffffffffffffffffff169052565b506080810151614444608084018267ffffffffffffffff169052565b5060a081015161445c60a084018263ffffffff169052565b5060c081015161447960c084018268ffffffffffffffffff169052565b5060e081015161449660e084018268ffffffffffffffffff169052565b506101008181015164ffffffffff9081169184019190915261012080830151909116908301526101409081015163ffffffff16910152565b61016081016106ad82846143b5565b60008083601f8401126144ef57600080fd5b50813567ffffffffffffffff81111561450757600080fd5b6020830191508360208260051b850101111561332e57600080fd5b60008060008060008060008060e0898b03121561453e57600080fd5b606089018a81111561454f57600080fd5b8998503567ffffffffffffffff8082111561456957600080fd5b6145758c838d01613fe7565b909950975060808b013591508082111561458e57600080fd5b61459a8c838d016144dd565b909750955060a08b01359150808211156145b357600080fd5b506145c08b828c016144dd565b999c989b50969995989497949560c00135949350505050565b63ffffffff81168114612a2857600080fd5b8035611255816145d9565b64ffffffffff81168114612a2857600080fd5b8035611255816145f6565b803561ffff8116811461125557600080fd5b67ffffffffffffffff81168114612a2857600080fd5b803561125581614626565b60ff81168114612a2857600080fd5b803561125581614647565b80357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8116811461125557600080fd5b60006101a082840312156146a057600080fd5b6146a8614111565b6146b1836145eb565b81526146bf602084016145eb565b60208201526146d0604084016145eb565b60408201526146e1606084016145eb565b60608201526146f260808401614609565b608082015261470360a08401614614565b60a082015261471460c0840161463c565b60c082015261472560e08401614656565b60e0820152610100614738818501614661565b9082015261012061474a8482016145eb565b9082015261014061475c848201614614565b9082015261016061476e848201614614565b90820152610180614780848201614614565b908201529392505050565b815163ffffffff1681526101a0810160208301516147b1602084018263ffffffff169052565b5060408301516147c9604084018263ffffffff169052565b5060608301516147e1606084018263ffffffff169052565b5060808301516147fa608084018264ffffffffff169052565b5060a083015161481060a084018261ffff169052565b5060c083015161482c60c084018267ffffffffffffffff169052565b5060e083015161484160e084018260ff169052565b50610100838101517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16908301526101208084015163ffffffff16908301526101408084015161ffff90811691840191909152610160808501518216908401526101808085015191821681850152905b505092915050565b6000806000806000608086880312156148cd57600080fd5b85356148d881614626565b9450602086013567ffffffffffffffff8111156148f457600080fd5b61490088828901613fe7565b9095509350506040860135614914816145d9565b949793965091946060013592915050565b600067ffffffffffffffff82111561493f5761493f6140e2565b5060051b60200190565b600082601f83011261495a57600080fd5b8135602061496f61496a83614925565b61415f565b82815260059290921b8401810191818101908684111561498e57600080fd5b8286015b848110156149b25780356149a581614271565b8352918301918301614992565b509695505050505050565b60008060008060008060c087890312156149d657600080fd5b863567ffffffffffffffff808211156149ee57600080fd5b6149fa8a838b01614949565b97506020890135915080821115614a1057600080fd5b614a1c8a838b01614949565b9650614a2a60408a01614656565b95506060890135915080821115614a4057600080fd5b614a4c8a838b016141ae565b9450614a5a60808a0161463c565b935060a0890135915080821115614a7057600080fd5b50614a7d89828a016141ae565b9150509295509295509295565b600060208284031215614a9c57600080fd5b8135613ebe81614271565b600181811c90821680614abb57607f821691505b6020821081036129ec577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b601f82111561067157600081815260208120601f850160051c81016020861015614b1b5750805b601f850160051c820191505b8181101561086457828155600101614b27565b67ffffffffffffffff831115614b5257614b526140e2565b614b6683614b608354614aa7565b83614af4565b6000601f841160018114614bb85760008515614b825750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355614c4e565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b82811015614c075786850135825560209485019460019092019101614be7565b5086821015614c42577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006bffffffffffffffffffffffff80841680614cd257614cd2614c55565b92169190910492915050565b6bffffffffffffffffffffffff828116828216039080821115614d0357614d03614c84565b5092915050565b805169ffffffffffffffffffff8116811461125557600080fd5b600080600080600060a08688031215614d3c57600080fd5b614d4586614d0a565b9450602086015193506040860151925060608601519150614d6860808701614d0a565b90509295509295909350565b818103818111156106ad576106ad614c84565b600060208284031215614d9957600080fd5b8151613ebe81614647565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614e0457614e04614c84565b5060010190565b68ffffffffffffffffff81168114612a2857600080fd5b803561125581614e0b565b60006101608236031215614e4057600080fd5b614e4861413b565b823567ffffffffffffffff811115614e5f57600080fd5b614e6b368286016141ae565b82525060208301356020820152614e8460408401614293565b6040820152614e95606084016142b8565b6060820152614ea660808401614e22565b6080820152614eb760a0840161463c565b60a0820152614ec860c0840161463c565b60c0820152614ed960e084016145eb565b60e0820152610100614eec818501614614565b90820152610120614efe84820161463c565b90820152610140614f10848201614293565b9082015292915050565b600060208284031215614f2c57600080fd5b8135613ebe81614626565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614f6c57600080fd5b83018035915067ffffffffffffffff821115614f8757600080fd5b60200191503681900382131561332e57600080fd5b600060208284031215614fae57600080fd5b613ebe82614614565b600060208284031215614fc957600080fd5b8135613ebe816145d9565b73ffffffffffffffffffffffffffffffffffffffff8a8116825267ffffffffffffffff8a166020830152881660408201526102406060820181905281018690526000610260878982850137600083890182015261ffff8716608084015260a0830186905263ffffffff851660c0840152601f88017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016830101905061507c60e08301846143b5565b9a9950505050505050505050565b60ff81811683821601908111156106ad576106ad614c84565b600060ff8316806150b6576150b6614c55565b8060ff84160491505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8183823760009101908152919050565b828152606082602083013760800192915050565b80820281158282048414176106ad576106ad614c84565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b63ffffffff818116838216019080821115614d0357614d03614c84565b600061012063ffffffff808d1684528b6020850152808b166040850152508060608401526151ab8184018a6142fc565b905082810360808401526151bf81896142fc565b905060ff871660a084015282810360c08401526151dc818761406b565b905067ffffffffffffffff851660e0840152828103610100840152613689818561406b565b805161125581614e0b565b60006020828403121561521e57600080fd5b8151613ebe81614e0b565b600181815b8085111561528257817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561526857615268614c84565b8085161561527557918102915b93841c939080029061522e565b509250929050565b600082615299575060016106ad565b816152a6575060006106ad565b81600181146152bc57600281146152c6576152e2565b60019150506106ad565b60ff8411156152d7576152d7614c84565b50506001821b6106ad565b5060208310610133831016604e8410600b8410161715615305575081810a6106ad565b61530f8383615229565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561534157615341614c84565b029392505050565b6000613ebe60ff84168361528a565b60008261536757615367614c55565b500490565b6bffffffffffffffffffffffff818116838216019080821115614d0357614d03614c84565b6bffffffffffffffffffffffff8181168382160280821691908281146148ad576148ad614c84565b808201808211156106ad576106ad614c84565b67ffffffffffffffff818116838216019080821115614d0357614d03614c84565b600082601f8301126153fe57600080fd5b8135602061540e61496a83614925565b82815260059290921b8401810191818101908684111561542d57600080fd5b8286015b848110156149b25780358352918301918301615431565b600082601f83011261545957600080fd5b8135602061546961496a83614925565b82815260059290921b8401810191818101908684111561548857600080fd5b8286015b848110156149b257803567ffffffffffffffff8111156154ac5760008081fd5b6154ba8986838b01016141ae565b84525091830191830161548c565b600080600080600060a086880312156154e057600080fd5b853567ffffffffffffffff808211156154f857600080fd5b61550489838a016153ed565b9650602088013591508082111561551a57600080fd5b61552689838a01615448565b9550604088013591508082111561553c57600080fd5b61554889838a01615448565b9450606088013591508082111561555e57600080fd5b61556a89838a01615448565b9350608088013591508082111561558057600080fd5b5061558d88828901615448565b9150509295509295909350565b60006101208b835273ffffffffffffffffffffffffffffffffffffffff8b16602084015267ffffffffffffffff808b1660408501528160608501526155e18285018b6142fc565b915083820360808501526155f5828a6142fc565b915060ff881660a085015283820360c0850152615612828861406b565b90861660e08501528381036101008501529050613689818561406b565b805161125581614271565b80516112558161429e565b805161125581614626565b8051611255816145d9565b8051611255816145f6565b6000610160828403121561567957600080fd5b61568161413b565b825181526156916020840161562f565b60208201526156a26040840161563a565b60408201526156b36060840161562f565b60608201526156c460808401615645565b60808201526156d560a08401615650565b60a08201526156e660c08401615201565b60c08201526156f760e08401615201565b60e082015261010061570a81850161565b565b9082015261012061571c84820161565b565b90820152610140614780848201615650565b64ffffffffff818116838216019080821115614d0357614d03614c84565b60006102008083526157608184018a61406b565b90508281036020840152615774818961406b565b6bffffffffffffffffffffffff88811660408601528716606085015273ffffffffffffffffffffffffffffffffffffffff8616608085015291506157bd905060a08301846143b5565b979650505050505050565b600080604083850312156157db57600080fd5b8251600781106157ea57600080fd5b60208401519092506142f18161429e565b60008060008060008060c0878903121561581457600080fd5b865195506020870151945060408701519350606087015192506080870151915060a087015190509295509295509295565b60006020828403121561585757600080fd5b5051919050565b60006020828403121561587057600080fd5b8151613ebe8161427156fea164736f6c6343000813000a", } var FunctionsCoordinatorABI = FunctionsCoordinatorMetaData.ABI @@ -1873,7 +1874,7 @@ func (FunctionsCoordinatorConfigSet) Topic() common.Hash { } func (FunctionsCoordinatorConfigUpdated) Topic() common.Hash { - return common.HexToHash("0x2e2c8535dcc25459d519f2300c114d2d2128bf6399722d04eca078461a3bf33a") + return common.HexToHash("0x9832846a11905a128363408ace5f9803f449fcb017d3cf7e22a50c6e332931b2") } func (FunctionsCoordinatorOracleRequest) Topic() common.Hash { 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 70ac49d79d3..83ea4d13b64 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 @@ -4,7 +4,7 @@ functions_allow_list: ../../../contracts/solc/v0.8.19/functions/v1_X/TermsOfServ 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 97a625c7ce8c8c167faad5e532a5894a52af5dee722b2da7e7528f5eaa32a0fe +functions_coordinator: ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsCoordinator.abi ../../../contracts/solc/v0.8.19/functions/v1_X/FunctionsCoordinator.bin 02133ef8399900d3b6fd1cd908d3d16f7e4b57b6ebea05ee79962e8d57f71144 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/batch_vrf_coordinator_v2/batch_vrf_coordinator_v2.go b/core/gethwrappers/generated/batch_vrf_coordinator_v2/batch_vrf_coordinator_v2.go index 3a1ec957b93..b4e88c5ecb6 100644 --- a/core/gethwrappers/generated/batch_vrf_coordinator_v2/batch_vrf_coordinator_v2.go +++ b/core/gethwrappers/generated/batch_vrf_coordinator_v2/batch_vrf_coordinator_v2.go @@ -52,7 +52,7 @@ type VRFTypesRequestCommitment struct { var BatchVRFCoordinatorV2MetaData = &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\":\"contractVRFCoordinatorV2\",\"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\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"internalType\":\"structVRFTypes.RequestCommitment[]\",\"name\":\"rcs\",\"type\":\"tuple[]\"}],\"name\":\"fulfillRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60a060405234801561001057600080fd5b50604051610bbb380380610bbb83398101604081905261002f91610044565b60601b6001600160601b031916608052610074565b60006020828403121561005657600080fd5b81516001600160a01b038116811461006d57600080fd5b9392505050565b60805160601c610b23610098600039600081816055015261011d0152610b236000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806308b2da0a1461003b5780633b2bcbf114610050575b600080fd5b61004e61004936600461057f565b6100a0565b005b6100777f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b805182511461010f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f696e70757420617272617920617267206c656e67746873206d69736d61746368604482015260640160405180910390fd5b60005b8251811015610330577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663af198b97848381518110610169576101696109f5565b6020026020010151848481518110610183576101836109f5565b60200260200101516040518363ffffffff1660e01b81526004016101a89291906107d3565b602060405180830381600087803b1580156101c257600080fd5b505af1925050508015610210575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261020d918101906106e1565b60015b61031c5761021c610a53565b806308c379a014156102a15750610231610a6e565b8061023c57506102a3565b6000610260858481518110610253576102536109f5565b6020026020010151610335565b9050807f4dcab4ce0e741a040f7e0f9b880557f8de685a9520d4bfac272a81c3c3802b2e8360405161029291906107c0565b60405180910390a2505061031e565b505b3d8080156102cd576040519150601f19603f3d011682016040523d82523d6000602084013e6102d2565b606091505b5060006102ea858481518110610253576102536109f5565b9050807fbfd42bb5a1bf8153ea750f66ea4944f23f7b9ae51d0462177b9769aa652b61b58360405161029291906107c0565b505b8061032881610995565b915050610112565b505050565b60008061034583600001516103a4565b9050808360800151604051602001610367929190918252602082015260400190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101209392505050565b6000816040516020016103b791906107ac565b604051602081830303815290604052805190602001209050919050565b803573ffffffffffffffffffffffffffffffffffffffff811681146103f857600080fd5b919050565b600082601f83011261040e57600080fd5b8135602061041b826108df565b60408051610429838261094a565b848152838101925086840160a0808702890186018a101561044957600080fd5b6000805b888110156104cb5782848d031215610463578182fd5b855161046e81610903565b61047785610567565b8152610484898601610567565b89820152610493878601610553565b8782015260606104a4818701610553565b9082015260806104b58682016103d4565b908201528752958701959282019260010161044d565b50929a9950505050505050505050565b600082601f8301126104ec57600080fd5b6040516040810181811067ffffffffffffffff8211171561050f5761050f610a24565b806040525080838560408601111561052657600080fd5b60005b6002811015610548578135835260209283019290910190600101610529565b509195945050505050565b803563ffffffff811681146103f857600080fd5b803567ffffffffffffffff811681146103f857600080fd5b6000806040838503121561059257600080fd5b823567ffffffffffffffff808211156105aa57600080fd5b818501915085601f8301126105be57600080fd5b813560206105cb826108df565b6040516105d8828261094a565b83815282810191508583016101a0808602880185018c10156105f957600080fd5b600097505b858810156106b15780828d03121561061557600080fd5b61061d6108d0565b6106278d846104db565b81526106368d604085016104db565b86820152608080840135604083015260a080850135606084015260c08501358284015261066560e086016103d4565b90830152506101006106798e8583016104db565b60c083015261068c8e61014086016104db565b60e08301526101808401359082015284526001979097019692840192908101906105fe565b509097505050860135925050808211156106ca57600080fd5b506106d7858286016103fd565b9150509250929050565b6000602082840312156106f357600080fd5b81516bffffffffffffffffffffffff8116811461070f57600080fd5b9392505050565b8060005b600281101561073957815184526020938401939091019060010161071a565b50505050565b60008151808452602060005b8281101561076657848101820151868201830152810161074b565b828111156107775760008284880101525b50807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401168601019250505092915050565b604081016107ba8284610716565b92915050565b60208152600061070f602083018461073f565b6000610240820190506107e7828551610716565b60208401516107f96040840182610716565b5060408401516080830152606084015160a0830152608084015160c083015273ffffffffffffffffffffffffffffffffffffffff60a08501511660e083015260c084015161010061084c81850183610716565b60e08601519150610861610140850183610716565b85015161018084015250825167ffffffffffffffff9081166101a08401526020840151166101c0830152604083015163ffffffff9081166101e0840152606084015116610200830152608083015173ffffffffffffffffffffffffffffffffffffffff1661022083015261070f565b6040516108dc81610929565b90565b600067ffffffffffffffff8211156108f9576108f9610a24565b5060051b60200190565b60a0810181811067ffffffffffffffff8211171561092357610923610a24565b60405250565b610120810167ffffffffffffffff8111828210171561092357610923610a24565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f830116810181811067ffffffffffffffff8211171561098e5761098e610a24565b6040525050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156109ee577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600060033d11156108dc5760046000803e5060005160e01c90565b600060443d1015610a7c5790565b6040517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc803d016004833e81513d67ffffffffffffffff8160248401118184111715610aca57505050505090565b8285019150815181811115610ae25750505050505090565b843d8701016020828501011115610afc5750505050505090565b610b0b6020828601018761094a565b50909594505050505056fea164736f6c6343000806000a", + Bin: "0x60a060405234801561001057600080fd5b50604051610b6e380380610b6e83398101604081905261002f91610044565b60601b6001600160601b031916608052610074565b60006020828403121561005657600080fd5b81516001600160a01b038116811461006d57600080fd5b9392505050565b60805160601c610ad6610098600039600081816055015261011b0152610ad66000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806308b2da0a1461003b5780633b2bcbf114610050575b600080fd5b61004e6100493660046104ae565b6100a0565b005b6100777f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b8051821461010e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f696e70757420617272617920617267206c656e67746873206d69736d61746368604482015260640160405180910390fd5b60005b8281101561033c577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663af198b97858584818110610167576101676109a7565b90506101a00201848481518110610180576101806109a7565b60200260200101516040518363ffffffff1660e01b81526004016101a59291906107b9565b602060405180830381600087803b1580156101bf57600080fd5b505af192505050801561020d575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261020a918101906106c5565b60015b61032857610219610a05565b806308c379a014156102ad575061022e610a21565b8061023957506102af565b600061026c868685818110610250576102506109a7565b90506101a002018036038101906102679190610621565b610342565b9050807f4dcab4ce0e741a040f7e0f9b880557f8de685a9520d4bfac272a81c3c3802b2e8360405161029e91906107a6565b60405180910390a2505061032a565b505b3d8080156102d9576040519150601f19603f3d011682016040523d82523d6000602084013e6102de565b606091505b5060006102f6868685818110610250576102506109a7565b9050807fbfd42bb5a1bf8153ea750f66ea4944f23f7b9ae51d0462177b9769aa652b61b58360405161029e91906107a6565b505b8061033481610947565b915050610111565b50505050565b60008061035283600001516103b1565b9050808360800151604051602001610374929190918252602082015260400190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101209392505050565b6000816040516020016103c49190610775565b604051602081830303815290604052805190602001209050919050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461040557600080fd5b919050565b600082601f83011261041b57600080fd5b6040516040810181811067ffffffffffffffff8211171561043e5761043e6109d6565b806040525080838560408601111561045557600080fd5b60005b6002811015610477578135835260209283019290910190600101610458565b509195945050505050565b803563ffffffff8116811461040557600080fd5b803567ffffffffffffffff8116811461040557600080fd5b600080600060408085870312156104c457600080fd5b843567ffffffffffffffff808211156104dc57600080fd5b818701915087601f8301126104f057600080fd5b8135818111156104ff57600080fd5b602089816101a08402860101111561051657600080fd5b80840197508196508089013593508284111561053157600080fd5b838901935089601f85011261054557600080fd5b8335915082821115610559576105596109d6565b8451925061056c818360051b01846108fc565b81835280830184820160a0808502870184018d101561058a57600080fd5b60009650865b8581101561060e5781838f0312156105a6578788fd5b88516105b1816108d6565b6105ba84610496565b81526105c7868501610496565b868201526105d68a8501610482565b8a82015260606105e7818601610482565b9082015260806105f88582016103e1565b9082015284529284019291810191600101610590565b5050505050508093505050509250925092565b60006101a0828403121561063457600080fd5b61063c6108ac565b610646848461040a565b8152610655846040850161040a565b60208201526080830135604082015260a0830135606082015260c0830135608082015261068460e084016103e1565b60a08201526101006106988582860161040a565b60c08301526106ab85610140860161040a565b60e083015261018084013581830152508091505092915050565b6000602082840312156106d757600080fd5b81516bffffffffffffffffffffffff811681146106f357600080fd5b9392505050565b6040818337600060408301525050565b6000815180845260005b8181101561073057602081850181015186830182015201610714565b81811115610742576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60408101818360005b600281101561079d57815183526020928301929091019060010161077e565b50505092915050565b6020815260006106f3602083018461070a565b61024081016040848337604082016000815260408086018237506080848101359083015260a0808501359083015260c0808501359083015273ffffffffffffffffffffffffffffffffffffffff61081260e086016103e1565b1660e08301526101006108298184018287016106fa565b5061014061083b8184018287016106fa565b506101808481013590830152825167ffffffffffffffff9081166101a08401526020840151166101c0830152604083015163ffffffff9081166101e0840152606084015116610200830152608083015173ffffffffffffffffffffffffffffffffffffffff166102208301526106f3565b604051610120810167ffffffffffffffff811182821017156108d0576108d06109d6565b60405290565b60a0810181811067ffffffffffffffff821117156108f6576108f66109d6565b60405250565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f830116810181811067ffffffffffffffff82111715610940576109406109d6565b6040525050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156109a0577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600060033d1115610a1e5760046000803e5060005160e01c5b90565b600060443d1015610a2f5790565b6040517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc803d016004833e81513d67ffffffffffffffff8160248401118184111715610a7d57505050505090565b8285019150815181811115610a955750505050505090565b843d8701016020828501011115610aaf5750505050505090565b610abe602082860101876108fc565b50909594505050505056fea164736f6c6343000806000a", } var BatchVRFCoordinatorV2ABI = BatchVRFCoordinatorV2MetaData.ABI 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 49056ab784c..dae0d163f91 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 @@ -53,7 +53,7 @@ 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\":\"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: "0x60a060405234801561001057600080fd5b50604051610cc4380380610cc483398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b608051610c33610091600039600081816040015261011d0152610c336000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80633b2bcbf11461003b5780636abb17211461008b575b600080fd5b6100627f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b61009e61009936600461073a565b6100a0565b005b805182511461010f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f696e70757420617272617920617267206c656e67746873206d69736d61746368604482015260640160405180910390fd5b60005b8251811015610321577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663301f42e984838151811061016957610169610899565b602002602001015184848151811061018357610183610899565b602002602001015160006040518463ffffffff1660e01b81526004016101ab939291906109d0565b6020604051808303816000875af1925050508015610204575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261020191810190610a8a565b60015b61030f57610210610abf565b806308c379a0036102945750610224610adb565b8061022f5750610296565b600061025385848151811061024657610246610899565b6020026020010151610326565b9050807f4dcab4ce0e741a040f7e0f9b880557f8de685a9520d4bfac272a81c3c3802b2e836040516102859190610b83565b60405180910390a25050610311565b505b3d8080156102c0576040519150601f19603f3d011682016040523d82523d6000602084013e6102c5565b606091505b5060006102dd85848151811061024657610246610899565b9050807fbfd42bb5a1bf8153ea750f66ea4944f23f7b9ae51d0462177b9769aa652b61b5836040516102859190610b83565b505b61031a81610b96565b9050610112565b505050565b6000806103368360000151610395565b9050808360800151604051602001610358929190918252602082015260400190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101209392505050565b6000816040516020016103a89190610bf5565b604051602081830303815290604052805190602001209050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60c0810181811067ffffffffffffffff82111715610414576104146103c5565b60405250565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f830116810181811067ffffffffffffffff8211171561045e5761045e6103c5565b6040525050565b604051610120810167ffffffffffffffff81118282101715610489576104896103c5565b60405290565b600067ffffffffffffffff8211156104a9576104a96103c5565b5060051b60200190565b600082601f8301126104c457600080fd5b6040516040810181811067ffffffffffffffff821117156104e7576104e76103c5565b80604052508060408401858111156104fe57600080fd5b845b81811015610518578035835260209283019201610500565b509195945050505050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461054757600080fd5b919050565b803563ffffffff8116811461054757600080fd5b600082601f83011261057157600080fd5b813567ffffffffffffffff81111561058b5761058b6103c5565b6040516105c060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f850116018261041a565b8181528460208386010111156105d557600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f83011261060357600080fd5b813560206106108261048f565b6040805161061e838261041a565b84815260059490941b860183019383810192508785111561063e57600080fd5b8387015b8581101561072e57803567ffffffffffffffff808211156106635760008081fd5b818a01915060c0807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0848e0301121561069c5760008081fd5b85516106a7816103f4565b8884013583811681146106ba5760008081fd5b8152838701358982015260606106d181860161054c565b8883015260806106e281870161054c565b8284015260a091506106f5828701610523565b9083015291840135918383111561070c5760008081fd5b61071a8e8b85880101610560565b908201528752505050928401928401610642565b50979650505050505050565b6000806040838503121561074d57600080fd5b823567ffffffffffffffff8082111561076557600080fd5b818501915085601f83011261077957600080fd5b813560206107868261048f565b604051610793828261041a565b8381526101a0938402860183019383820192508a8511156107b357600080fd5b958301955b8487101561086b5780878c0312156107d05760008081fd5b6107d8610465565b6107e28c896104b3565b81526107f18c60408a016104b3565b85820152608080890135604083015260a0808a0135606084015260c0808b01358385015260e09250610824838c01610523565b8285015261010091506108398f838d016104b3565b9084015261084b8e6101408c016104b3565b9183019190915261018089013590820152835295860195918301916107b8565b509650508601359250508082111561088257600080fd5b5061088f858286016105f2565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b8060005b60028110156108eb5781518452602093840193909101906001016108cc565b50505050565b6000815180845260005b81811015610917576020818501810151868301820152016108fb565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b67ffffffffffffffff8151168252602081015160208301526000604082015163ffffffff8082166040860152806060850151166060860152505073ffffffffffffffffffffffffffffffffffffffff608083015116608084015260a082015160c060a08501526109c860c08501826108f1565b949350505050565b60006101e06109e08387516108c8565b60208601516109f260408501826108c8565b5060408601516080840152606086015160a0840152608086015160c084015273ffffffffffffffffffffffffffffffffffffffff60a08701511660e084015260c0860151610100610a45818601836108c8565b60e08801519150610a5a6101408601836108c8565b870151610180850152506101a08301819052610a7881840186610955565b9150506109c86101c083018415159052565b600060208284031215610a9c57600080fd5b81516bffffffffffffffffffffffff81168114610ab857600080fd5b9392505050565b600060033d1115610ad85760046000803e5060005160e01c5b90565b600060443d1015610ae95790565b6040517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc803d016004833e81513d67ffffffffffffffff8160248401118184111715610b3757505050505090565b8285019150815181811115610b4f5750505050505090565b843d8701016020828501011115610b695750505050505090565b610b786020828601018761041a565b509095945050505050565b602081526000610ab860208301846108f1565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610bee577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b60408101818360005b6002811015610c1d578151835260209283019290910190600101610bfe565b5050509291505056fea164736f6c6343000813000a", + Bin: "0x60a060405234801561001057600080fd5b50604051610ba2380380610ba283398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b608051610b11610091600039600081816040015261011a0152610b116000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80633b2bcbf11461003b5780636abb17211461008b575b600080fd5b6100627f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b61009e6100993660046103dc565b6100a0565b005b82811461010d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f696e70757420617272617920617267206c656e67746873206d69736d61746368604482015260640160405180910390fd5b60005b83811015610336577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663301f42e9868684818110610166576101666104a5565b90506101a0020185858581811061017f5761017f6104a5565b905060200281019061019191906104d4565b60006040518463ffffffff1660e01b81526004016101b19392919061069b565b6020604051808303816000875af192505050801561020a575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526102079181019061074c565b60015b61032457610216610781565b806308c379a0036102a9575061022a610817565b8061023557506102ab565b600061026887878581811061024c5761024c6104a5565b90506101a002018036038101906102639190610959565b61033d565b9050807f4dcab4ce0e741a040f7e0f9b880557f8de685a9520d4bfac272a81c3c3802b2e8360405161029a9190610a61565b60405180910390a25050610326565b505b3d8080156102d5576040519150601f19603f3d011682016040523d82523d6000602084013e6102da565b606091505b5060006102f287878581811061024c5761024c6104a5565b9050807fbfd42bb5a1bf8153ea750f66ea4944f23f7b9ae51d0462177b9769aa652b61b58360405161029a9190610a61565b505b61032f81610a74565b9050610110565b5050505050565b60008061034d83600001516103ac565b905080836080015160405160200161036f929190918252602082015260400190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101209392505050565b6000816040516020016103bf9190610ad3565b604051602081830303815290604052805190602001209050919050565b600080600080604085870312156103f257600080fd5b843567ffffffffffffffff8082111561040a57600080fd5b818701915087601f83011261041e57600080fd5b81358181111561042d57600080fd5b8860206101a08302850101111561044357600080fd5b60209283019650945090860135908082111561045e57600080fd5b818701915087601f83011261047257600080fd5b81358181111561048157600080fd5b8860208260051b850101111561049657600080fd5b95989497505060200194505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4183360301811261050857600080fd5b9190910192915050565b60408183375050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461053f57600080fd5b919050565b803563ffffffff8116811461053f57600080fd5b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b6000813567ffffffffffffffff8082168083146105bd57600080fd5b8552602084810135908601526105d560408501610544565b915063ffffffff8083166040870152806105f160608701610544565b1660608701525073ffffffffffffffffffffffffffffffffffffffff6106196080860161051b565b16608086015260a084013591507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301821261065657600080fd5b602091840191820191358181111561066d57600080fd5b80360383131561067c57600080fd5b60c060a087015261069160c087018285610558565b9695505050505050565b60006101e06040868437604080870160408501376080860135608084015260a086013560a084015260c086013560c084015273ffffffffffffffffffffffffffffffffffffffff6106ee60e0880161051b565b1660e084015261010060408188018286013750610140610712818501828901610512565b50610180808701358185015250806101a0840152610732818401866105a1565b9150506107446101c083018415159052565b949350505050565b60006020828403121561075e57600080fd5b81516bffffffffffffffffffffffff8116811461077a57600080fd5b9392505050565b600060033d111561079a5760046000803e5060005160e01c5b90565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f830116810181811067ffffffffffffffff821117156108105761081061079d565b6040525050565b600060443d10156108255790565b6040517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc803d016004833e81513d67ffffffffffffffff816024840111818411171561087357505050505090565b828501915081518181111561088b5750505050505090565b843d87010160208285010111156108a55750505050505090565b6108b4602082860101876107cc565b509095945050505050565b604051610120810167ffffffffffffffff811182821017156108e3576108e361079d565b60405290565b600082601f8301126108fa57600080fd5b6040516040810181811067ffffffffffffffff8211171561091d5761091d61079d565b806040525080604084018581111561093457600080fd5b845b8181101561094e578035835260209283019201610936565b509195945050505050565b60006101a0828403121561096c57600080fd5b6109746108bf565b61097e84846108e9565b815261098d84604085016108e9565b60208201526080830135604082015260a0830135606082015260c083013560808201526109bc60e0840161051b565b60a08201526101006109d0858286016108e9565b60c08301526109e38561014086016108e9565b60e083015261018084013581830152508091505092915050565b6000815180845260005b81811015610a2357602081850181015186830182015201610a07565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b60208152600061077a60208301846109fd565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610acc577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b60408101818360005b6002811015610afb578151835260209283019290910190600101610adc565b5050509291505056fea164736f6c6343000813000a", } var BatchVRFCoordinatorV2PlusABI = BatchVRFCoordinatorV2PlusMetaData.ABI diff --git a/core/gethwrappers/generated/chain_reader_tester/chain_reader_tester.go b/core/gethwrappers/generated/chain_reader_tester/chain_reader_tester.go index 17923820796..751df822696 100644 --- a/core/gethwrappers/generated/chain_reader_tester/chain_reader_tester.go +++ b/core/gethwrappers/generated/chain_reader_tester/chain_reader_tester.go @@ -52,8 +52,8 @@ type TestStruct struct { } var ChainReaderTesterMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"int32\",\"name\":\"field\",\"type\":\"int32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"differentField\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"oracleId\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8[32]\",\"name\":\"oracleIds\",\"type\":\"uint8[32]\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"Account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"Accounts\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"int192\",\"name\":\"bigField\",\"type\":\"int192\"},{\"components\":[{\"internalType\":\"bytes2\",\"name\":\"FixedBytes\",\"type\":\"bytes2\"},{\"components\":[{\"internalType\":\"int64\",\"name\":\"IntVal\",\"type\":\"int64\"},{\"internalType\":\"string\",\"name\":\"S\",\"type\":\"string\"}],\"internalType\":\"structInnerTestStruct\",\"name\":\"Inner\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"structMidLevelTestStruct\",\"name\":\"nestedStruct\",\"type\":\"tuple\"}],\"name\":\"Triggered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"fieldHash\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"field\",\"type\":\"string\"}],\"name\":\"TriggeredEventWithDynamicTopic\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"int32\",\"name\":\"field1\",\"type\":\"int32\"},{\"indexed\":true,\"internalType\":\"int32\",\"name\":\"field2\",\"type\":\"int32\"},{\"indexed\":true,\"internalType\":\"int32\",\"name\":\"field3\",\"type\":\"int32\"}],\"name\":\"TriggeredWithFourTopics\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"int32\",\"name\":\"field\",\"type\":\"int32\"},{\"internalType\":\"string\",\"name\":\"differentField\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"oracleId\",\"type\":\"uint8\"},{\"internalType\":\"uint8[32]\",\"name\":\"oracleIds\",\"type\":\"uint8[32]\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"},{\"internalType\":\"int192\",\"name\":\"bigField\",\"type\":\"int192\"},{\"components\":[{\"internalType\":\"bytes2\",\"name\":\"FixedBytes\",\"type\":\"bytes2\"},{\"components\":[{\"internalType\":\"int64\",\"name\":\"IntVal\",\"type\":\"int64\"},{\"internalType\":\"string\",\"name\":\"S\",\"type\":\"string\"}],\"internalType\":\"structInnerTestStruct\",\"name\":\"Inner\",\"type\":\"tuple\"}],\"internalType\":\"structMidLevelTestStruct\",\"name\":\"nestedStruct\",\"type\":\"tuple\"}],\"name\":\"addTestStruct\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDifferentPrimitiveValue\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"i\",\"type\":\"uint256\"}],\"name\":\"getElementAtIndex\",\"outputs\":[{\"components\":[{\"internalType\":\"int32\",\"name\":\"Field\",\"type\":\"int32\"},{\"internalType\":\"string\",\"name\":\"DifferentField\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"OracleId\",\"type\":\"uint8\"},{\"internalType\":\"uint8[32]\",\"name\":\"OracleIds\",\"type\":\"uint8[32]\"},{\"internalType\":\"address\",\"name\":\"Account\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"Accounts\",\"type\":\"address[]\"},{\"internalType\":\"int192\",\"name\":\"BigField\",\"type\":\"int192\"},{\"components\":[{\"internalType\":\"bytes2\",\"name\":\"FixedBytes\",\"type\":\"bytes2\"},{\"components\":[{\"internalType\":\"int64\",\"name\":\"IntVal\",\"type\":\"int64\"},{\"internalType\":\"string\",\"name\":\"S\",\"type\":\"string\"}],\"internalType\":\"structInnerTestStruct\",\"name\":\"Inner\",\"type\":\"tuple\"}],\"internalType\":\"structMidLevelTestStruct\",\"name\":\"NestedStruct\",\"type\":\"tuple\"}],\"internalType\":\"structTestStruct\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPrimitiveValue\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSliceValue\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"\",\"type\":\"uint64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int32\",\"name\":\"field\",\"type\":\"int32\"},{\"internalType\":\"string\",\"name\":\"differentField\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"oracleId\",\"type\":\"uint8\"},{\"internalType\":\"uint8[32]\",\"name\":\"oracleIds\",\"type\":\"uint8[32]\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"},{\"internalType\":\"int192\",\"name\":\"bigField\",\"type\":\"int192\"},{\"components\":[{\"internalType\":\"bytes2\",\"name\":\"FixedBytes\",\"type\":\"bytes2\"},{\"components\":[{\"internalType\":\"int64\",\"name\":\"IntVal\",\"type\":\"int64\"},{\"internalType\":\"string\",\"name\":\"S\",\"type\":\"string\"}],\"internalType\":\"structInnerTestStruct\",\"name\":\"Inner\",\"type\":\"tuple\"}],\"internalType\":\"structMidLevelTestStruct\",\"name\":\"nestedStruct\",\"type\":\"tuple\"}],\"name\":\"returnSeen\",\"outputs\":[{\"components\":[{\"internalType\":\"int32\",\"name\":\"Field\",\"type\":\"int32\"},{\"internalType\":\"string\",\"name\":\"DifferentField\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"OracleId\",\"type\":\"uint8\"},{\"internalType\":\"uint8[32]\",\"name\":\"OracleIds\",\"type\":\"uint8[32]\"},{\"internalType\":\"address\",\"name\":\"Account\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"Accounts\",\"type\":\"address[]\"},{\"internalType\":\"int192\",\"name\":\"BigField\",\"type\":\"int192\"},{\"components\":[{\"internalType\":\"bytes2\",\"name\":\"FixedBytes\",\"type\":\"bytes2\"},{\"components\":[{\"internalType\":\"int64\",\"name\":\"IntVal\",\"type\":\"int64\"},{\"internalType\":\"string\",\"name\":\"S\",\"type\":\"string\"}],\"internalType\":\"structInnerTestStruct\",\"name\":\"Inner\",\"type\":\"tuple\"}],\"internalType\":\"structMidLevelTestStruct\",\"name\":\"NestedStruct\",\"type\":\"tuple\"}],\"internalType\":\"structTestStruct\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int32\",\"name\":\"field\",\"type\":\"int32\"},{\"internalType\":\"string\",\"name\":\"differentField\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"oracleId\",\"type\":\"uint8\"},{\"internalType\":\"uint8[32]\",\"name\":\"oracleIds\",\"type\":\"uint8[32]\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"},{\"internalType\":\"int192\",\"name\":\"bigField\",\"type\":\"int192\"},{\"components\":[{\"internalType\":\"bytes2\",\"name\":\"FixedBytes\",\"type\":\"bytes2\"},{\"components\":[{\"internalType\":\"int64\",\"name\":\"IntVal\",\"type\":\"int64\"},{\"internalType\":\"string\",\"name\":\"S\",\"type\":\"string\"}],\"internalType\":\"structInnerTestStruct\",\"name\":\"Inner\",\"type\":\"tuple\"}],\"internalType\":\"structMidLevelTestStruct\",\"name\":\"nestedStruct\",\"type\":\"tuple\"}],\"name\":\"triggerEvent\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"field\",\"type\":\"string\"}],\"name\":\"triggerEventWithDynamicTopic\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int32\",\"name\":\"field1\",\"type\":\"int32\"},{\"internalType\":\"int32\",\"name\":\"field2\",\"type\":\"int32\"},{\"internalType\":\"int32\",\"name\":\"field3\",\"type\":\"int32\"}],\"name\":\"triggerWithFourTopics\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b50600180548082018255600082905260048082047fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6908101805460086003958616810261010090810a8088026001600160401b0391820219909416939093179093558654808801909755848704909301805496909516909202900a91820291021990921691909117905561176c806100a96000396000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c80637f002d6711610076578063dbfd73321161005b578063dbfd73321461013e578063ef4e1ced14610151578063f6f871c81461015857600080fd5b80637f002d671461010e578063ab5e0b381461012157600080fd5b80632c45576f146100a85780633272b66c146100d157806349eac2ac146100e6578063679004a4146100f9575b600080fd5b6100bb6100b6366004610baa565b61016b565b6040516100c89190610d09565b60405180910390f35b6100e46100df366004610e48565b610446565b005b6100e46100f4366004610f5d565b61049b565b61010161079e565b6040516100c8919061104f565b6100e461011c366004610f5d565b61082a565b6107c65b60405167ffffffffffffffff90911681526020016100c8565b6100e461014c36600461109d565b610881565b6003610125565b6100bb610166366004610f5d565b6108be565b6101736109c7565b60006101806001846110e0565b815481106101905761019061111a565b6000918252602091829020604080516101008101909152600a90920201805460030b825260018101805492939192918401916101cb90611149565b80601f01602080910402602001604051908101604052809291908181526020018280546101f790611149565b80156102445780601f1061021957610100808354040283529160200191610244565b820191906000526020600020905b81548152906001019060200180831161022757829003601f168201915b5050509183525050600282015460ff166020808301919091526040805161040081018083529190930192916003850191826000855b825461010083900a900460ff1681526020600192830181810494850194909303909202910180841161027957505050928452505050600482015473ffffffffffffffffffffffffffffffffffffffff16602080830191909152600583018054604080518285028101850182528281529401939283018282801561033257602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610307575b5050509183525050600682015460170b6020808301919091526040805180820182526007808601805460f01b7fffff0000000000000000000000000000000000000000000000000000000000001683528351808501855260088801805490930b815260098801805495909701969395919486830194919392840191906103b790611149565b80601f01602080910402602001604051908101604052809291908181526020018280546103e390611149565b80156104305780601f1061040557610100808354040283529160200191610430565b820191906000526020600020905b81548152906001019060200180831161041357829003601f168201915b5050509190925250505090525090525092915050565b8181604051610456929190611196565b60405180910390207f3d969732b1bbbb9f1d7eb9f3f14e4cb50a74d950b3ef916a397b85dfbab93c67838360405161048f9291906111ef565b60405180910390a25050565b60006040518061010001604052808c60030b81526020018b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509082525060ff8a166020808301919091526040805161040081810183529190930192918b9183908390808284376000920191909152505050815273ffffffffffffffffffffffffffffffffffffffff8816602080830191909152604080518883028181018401835289825291909301929189918991829190850190849080828437600092019190915250505090825250601785900b602082015260400161058d846112ec565b905281546001808201845560009384526020938490208351600a9093020180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff9093169290921782559282015191929091908201906105f39082611446565b5060408201516002820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff90921691909117905560608201516106419060038301906020610a16565b5060808201516004820180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691909117905560a082015180516106a8916005840191602090910190610aa9565b5060c08201516006820180547fffffffffffffffff0000000000000000000000000000000000000000000000001677ffffffffffffffffffffffffffffffffffffffffffffffff90921691909117905560e082015180516007830180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001660f09290921c91909117815560208083015180516008860180547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff90921691909117815591810151909190600986019061078b9082611446565b5050505050505050505050505050505050565b6060600180548060200260200160405190810160405280929190818152602001828054801561082057602002820191906000526020600020906000905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff16815260200190600801906020826007010492830192600103820291508084116107db5790505b5050505050905090565b8960030b7f7188419dcd8b51877b71766f075f3626586c0ff190e7d056aa65ce9acb649a3d8a8a8a8a8a8a8a8a8a60405161086d999897969594939291906116a5565b60405180910390a250505050505050505050565b8060030b8260030b8460030b7f91c80dc390f3d041b3a04b0099b19634499541ea26972250986ee4b24a12fac560405160405180910390a4505050565b6108c66109c7565b6040518061010001604052808c60030b81526020018b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509082525060ff8a166020808301919091526040805161040081810183529190930192918b9183908390808284376000920191909152505050815273ffffffffffffffffffffffffffffffffffffffff8816602080830191909152604080518883028181018401835289825291909301929189918991829190850190849080828437600092019190915250505090825250601785900b60208201526040016109b6846112ec565b90529b9a5050505050505050505050565b60408051610100810182526000808252606060208301819052928201529081016109ef610b23565b8152600060208201819052606060408301819052820152608001610a11610b42565b905290565b600183019183908215610a995791602002820160005b83821115610a6a57835183826101000a81548160ff021916908360ff1602179055509260200192600101602081600001049283019260010302610a2c565b8015610a975782816101000a81549060ff0219169055600101602081600001049283019260010302610a6a565b505b50610aa5929150610b95565b5090565b828054828255906000526020600020908101928215610a99579160200282015b82811115610a9957825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602090920191600190910190610ac9565b6040518061040001604052806020906020820280368337509192915050565b604051806040016040528060007dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001610a116040518060400160405280600060070b8152602001606081525090565b5b80821115610aa55760008155600101610b96565b600060208284031215610bbc57600080fd5b5035919050565b6000815180845260005b81811015610be957602081850181015186830182015201610bcd565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b8060005b6020808210610c3a5750610c51565b825160ff1685529384019390910190600101610c2b565b50505050565b600081518084526020808501945080840160005b83811015610c9d57815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101610c6b565b509495945050505050565b7fffff00000000000000000000000000000000000000000000000000000000000081511682526000602082015160406020850152805160070b60408501526020810151905060406060850152610d016080850182610bc3565b949350505050565b60208152610d1d60208201835160030b9052565b600060208301516104e0806040850152610d3b610500850183610bc3565b91506040850151610d51606086018260ff169052565b506060850151610d646080860182610c27565b50608085015173ffffffffffffffffffffffffffffffffffffffff1661048085015260a08501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe085840381016104a0870152610dc18483610c57565b935060c08701519150610dda6104c087018360170b9052565b60e0870151915080868503018387015250610df58382610ca8565b9695505050505050565b60008083601f840112610e1157600080fd5b50813567ffffffffffffffff811115610e2957600080fd5b602083019150836020828501011115610e4157600080fd5b9250929050565b60008060208385031215610e5b57600080fd5b823567ffffffffffffffff811115610e7257600080fd5b610e7e85828601610dff565b90969095509350505050565b8035600381900b8114610e9c57600080fd5b919050565b803560ff81168114610e9c57600080fd5b806104008101831015610ec457600080fd5b92915050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610e9c57600080fd5b60008083601f840112610f0057600080fd5b50813567ffffffffffffffff811115610f1857600080fd5b6020830191508360208260051b8501011115610e4157600080fd5b8035601781900b8114610e9c57600080fd5b600060408284031215610f5757600080fd5b50919050565b6000806000806000806000806000806104e08b8d031215610f7d57600080fd5b610f868b610e8a565b995060208b013567ffffffffffffffff80821115610fa357600080fd5b610faf8e838f01610dff565b909b509950899150610fc360408e01610ea1565b9850610fd28e60608f01610eb2565b9750610fe16104608e01610eca565b96506104808d0135915080821115610ff857600080fd5b6110048e838f01610eee565b90965094508491506110196104a08e01610f33565b93506104c08d013591508082111561103057600080fd5b5061103d8d828e01610f45565b9150509295989b9194979a5092959850565b6020808252825182820181905260009190848201906040850190845b8181101561109157835167ffffffffffffffff168352928401929184019160010161106b565b50909695505050505050565b6000806000606084860312156110b257600080fd5b6110bb84610e8a565b92506110c960208501610e8a565b91506110d760408501610e8a565b90509250925092565b81810381811115610ec4577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600181811c9082168061115d57607f821691505b602082108103610f57577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b8183823760009101908152919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b602081526000610d016020830184866111a6565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff8111828210171561125557611255611203565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156112a2576112a2611203565b604052919050565b80357fffff00000000000000000000000000000000000000000000000000000000000081168114610e9c57600080fd5b8035600781900b8114610e9c57600080fd5b6000604082360312156112fe57600080fd5b611306611232565b61130f836112aa565b815260208084013567ffffffffffffffff8082111561132d57600080fd5b81860191506040823603121561134257600080fd5b61134a611232565b611353836112da565b8152838301358281111561136657600080fd5b929092019136601f84011261137a57600080fd5b82358281111561138c5761138c611203565b6113bc857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161125b565b925080835236858286010111156113d257600080fd5b8085850186850137600090830185015280840191909152918301919091525092915050565b601f82111561144157600081815260208120601f850160051c8101602086101561141e5750805b601f850160051c820191505b8181101561143d5782815560010161142a565b5050505b505050565b815167ffffffffffffffff81111561146057611460611203565b6114748161146e8454611149565b846113f7565b602080601f8311600181146114c757600084156114915750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b17855561143d565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015611514578886015182559484019460019091019084016114f5565b508582101561155057878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b8183526000602080850194508260005b85811015610c9d5773ffffffffffffffffffffffffffffffffffffffff61159683610eca565b1687529582019590820190600101611570565b7fffff0000000000000000000000000000000000000000000000000000000000006115d3826112aa565b168252600060208201357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc183360301811261160d57600080fd5b60406020850152820161161f816112da565b60070b604085015260208101357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe182360301811261165c57600080fd5b0160208101903567ffffffffffffffff81111561167857600080fd5b80360382131561168757600080fd5b6040606086015261169c6080860182846111a6565b95945050505050565b60006104c08083526116ba8184018c8e6111a6565b9050602060ff808c1682860152604085018b60005b848110156116f457836116e183610ea1565b16835291840191908401906001016116cf565b505050505073ffffffffffffffffffffffffffffffffffffffff881661044084015282810361046084015261172a818789611560565b905061173c61048084018660170b9052565b8281036104a084015261174f81856115a9565b9c9b50505050505050505050505056fea164736f6c6343000813000a", + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"int32\",\"name\":\"field\",\"type\":\"int32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"differentField\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"oracleId\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8[32]\",\"name\":\"oracleIds\",\"type\":\"uint8[32]\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"Account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"Accounts\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"int192\",\"name\":\"bigField\",\"type\":\"int192\"},{\"components\":[{\"internalType\":\"bytes2\",\"name\":\"FixedBytes\",\"type\":\"bytes2\"},{\"components\":[{\"internalType\":\"int64\",\"name\":\"IntVal\",\"type\":\"int64\"},{\"internalType\":\"string\",\"name\":\"S\",\"type\":\"string\"}],\"internalType\":\"structInnerTestStruct\",\"name\":\"Inner\",\"type\":\"tuple\"}],\"indexed\":false,\"internalType\":\"structMidLevelTestStruct\",\"name\":\"nestedStruct\",\"type\":\"tuple\"}],\"name\":\"Triggered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"fieldHash\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"field\",\"type\":\"string\"}],\"name\":\"TriggeredEventWithDynamicTopic\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"int32\",\"name\":\"field1\",\"type\":\"int32\"},{\"indexed\":true,\"internalType\":\"int32\",\"name\":\"field2\",\"type\":\"int32\"},{\"indexed\":true,\"internalType\":\"int32\",\"name\":\"field3\",\"type\":\"int32\"}],\"name\":\"TriggeredWithFourTopics\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"int32\",\"name\":\"field\",\"type\":\"int32\"},{\"internalType\":\"string\",\"name\":\"differentField\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"oracleId\",\"type\":\"uint8\"},{\"internalType\":\"uint8[32]\",\"name\":\"oracleIds\",\"type\":\"uint8[32]\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"},{\"internalType\":\"int192\",\"name\":\"bigField\",\"type\":\"int192\"},{\"components\":[{\"internalType\":\"bytes2\",\"name\":\"FixedBytes\",\"type\":\"bytes2\"},{\"components\":[{\"internalType\":\"int64\",\"name\":\"IntVal\",\"type\":\"int64\"},{\"internalType\":\"string\",\"name\":\"S\",\"type\":\"string\"}],\"internalType\":\"structInnerTestStruct\",\"name\":\"Inner\",\"type\":\"tuple\"}],\"internalType\":\"structMidLevelTestStruct\",\"name\":\"nestedStruct\",\"type\":\"tuple\"}],\"name\":\"addTestStruct\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAlterablePrimitiveValue\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDifferentPrimitiveValue\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"i\",\"type\":\"uint256\"}],\"name\":\"getElementAtIndex\",\"outputs\":[{\"components\":[{\"internalType\":\"int32\",\"name\":\"Field\",\"type\":\"int32\"},{\"internalType\":\"string\",\"name\":\"DifferentField\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"OracleId\",\"type\":\"uint8\"},{\"internalType\":\"uint8[32]\",\"name\":\"OracleIds\",\"type\":\"uint8[32]\"},{\"internalType\":\"address\",\"name\":\"Account\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"Accounts\",\"type\":\"address[]\"},{\"internalType\":\"int192\",\"name\":\"BigField\",\"type\":\"int192\"},{\"components\":[{\"internalType\":\"bytes2\",\"name\":\"FixedBytes\",\"type\":\"bytes2\"},{\"components\":[{\"internalType\":\"int64\",\"name\":\"IntVal\",\"type\":\"int64\"},{\"internalType\":\"string\",\"name\":\"S\",\"type\":\"string\"}],\"internalType\":\"structInnerTestStruct\",\"name\":\"Inner\",\"type\":\"tuple\"}],\"internalType\":\"structMidLevelTestStruct\",\"name\":\"NestedStruct\",\"type\":\"tuple\"}],\"internalType\":\"structTestStruct\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPrimitiveValue\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSliceValue\",\"outputs\":[{\"internalType\":\"uint64[]\",\"name\":\"\",\"type\":\"uint64[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int32\",\"name\":\"field\",\"type\":\"int32\"},{\"internalType\":\"string\",\"name\":\"differentField\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"oracleId\",\"type\":\"uint8\"},{\"internalType\":\"uint8[32]\",\"name\":\"oracleIds\",\"type\":\"uint8[32]\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"},{\"internalType\":\"int192\",\"name\":\"bigField\",\"type\":\"int192\"},{\"components\":[{\"internalType\":\"bytes2\",\"name\":\"FixedBytes\",\"type\":\"bytes2\"},{\"components\":[{\"internalType\":\"int64\",\"name\":\"IntVal\",\"type\":\"int64\"},{\"internalType\":\"string\",\"name\":\"S\",\"type\":\"string\"}],\"internalType\":\"structInnerTestStruct\",\"name\":\"Inner\",\"type\":\"tuple\"}],\"internalType\":\"structMidLevelTestStruct\",\"name\":\"nestedStruct\",\"type\":\"tuple\"}],\"name\":\"returnSeen\",\"outputs\":[{\"components\":[{\"internalType\":\"int32\",\"name\":\"Field\",\"type\":\"int32\"},{\"internalType\":\"string\",\"name\":\"DifferentField\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"OracleId\",\"type\":\"uint8\"},{\"internalType\":\"uint8[32]\",\"name\":\"OracleIds\",\"type\":\"uint8[32]\"},{\"internalType\":\"address\",\"name\":\"Account\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"Accounts\",\"type\":\"address[]\"},{\"internalType\":\"int192\",\"name\":\"BigField\",\"type\":\"int192\"},{\"components\":[{\"internalType\":\"bytes2\",\"name\":\"FixedBytes\",\"type\":\"bytes2\"},{\"components\":[{\"internalType\":\"int64\",\"name\":\"IntVal\",\"type\":\"int64\"},{\"internalType\":\"string\",\"name\":\"S\",\"type\":\"string\"}],\"internalType\":\"structInnerTestStruct\",\"name\":\"Inner\",\"type\":\"tuple\"}],\"internalType\":\"structMidLevelTestStruct\",\"name\":\"NestedStruct\",\"type\":\"tuple\"}],\"internalType\":\"structTestStruct\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"value\",\"type\":\"uint64\"}],\"name\":\"setAlterablePrimitiveValue\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int32\",\"name\":\"field\",\"type\":\"int32\"},{\"internalType\":\"string\",\"name\":\"differentField\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"oracleId\",\"type\":\"uint8\"},{\"internalType\":\"uint8[32]\",\"name\":\"oracleIds\",\"type\":\"uint8[32]\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"},{\"internalType\":\"int192\",\"name\":\"bigField\",\"type\":\"int192\"},{\"components\":[{\"internalType\":\"bytes2\",\"name\":\"FixedBytes\",\"type\":\"bytes2\"},{\"components\":[{\"internalType\":\"int64\",\"name\":\"IntVal\",\"type\":\"int64\"},{\"internalType\":\"string\",\"name\":\"S\",\"type\":\"string\"}],\"internalType\":\"structInnerTestStruct\",\"name\":\"Inner\",\"type\":\"tuple\"}],\"internalType\":\"structMidLevelTestStruct\",\"name\":\"nestedStruct\",\"type\":\"tuple\"}],\"name\":\"triggerEvent\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"field\",\"type\":\"string\"}],\"name\":\"triggerEventWithDynamicTopic\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int32\",\"name\":\"field1\",\"type\":\"int32\"},{\"internalType\":\"int32\",\"name\":\"field2\",\"type\":\"int32\"},{\"internalType\":\"int32\",\"name\":\"field3\",\"type\":\"int32\"}],\"name\":\"triggerWithFourTopics\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b50600180548082018255600082905260048082047fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6908101805460086003958616810261010090810a8088026001600160401b0391820219909416939093179093558654808801909755848704909301805496909516909202900a91820291021990921691909117905561181e806100a96000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80637f002d6711610081578063ef4e1ced1161005b578063ef4e1ced146101c0578063f6f871c8146101c7578063fbe9fbf6146101da57600080fd5b80637f002d671461017d578063ab5e0b3814610190578063dbfd7332146101ad57600080fd5b806349eac2ac116100b257806349eac2ac1461010c578063679004a41461011f5780636c9a43b61461013457600080fd5b80632c45576f146100ce5780633272b66c146100f7575b600080fd5b6100e16100dc366004610c2b565b6101ec565b6040516100ee9190610d8a565b60405180910390f35b61010a610105366004610ec9565b6104c7565b005b61010a61011a366004610fde565b61051c565b61012761081f565b6040516100ee91906110d0565b61010a61014236600461111e565b600280547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff92909216919091179055565b61010a61018b366004610fde565b6108ab565b6107c65b60405167ffffffffffffffff90911681526020016100ee565b61010a6101bb36600461114f565b610902565b6003610194565b6100e16101d5366004610fde565b61093f565b60025467ffffffffffffffff16610194565b6101f4610a48565b6000610201600184611192565b81548110610211576102116111cc565b6000918252602091829020604080516101008101909152600a90920201805460030b8252600181018054929391929184019161024c906111fb565b80601f0160208091040260200160405190810160405280929190818152602001828054610278906111fb565b80156102c55780601f1061029a576101008083540402835291602001916102c5565b820191906000526020600020905b8154815290600101906020018083116102a857829003601f168201915b5050509183525050600282015460ff166020808301919091526040805161040081018083529190930192916003850191826000855b825461010083900a900460ff168152602060019283018181049485019490930390920291018084116102fa57505050928452505050600482015473ffffffffffffffffffffffffffffffffffffffff1660208083019190915260058301805460408051828502810185018252828152940193928301828280156103b357602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610388575b5050509183525050600682015460170b6020808301919091526040805180820182526007808601805460f01b7fffff0000000000000000000000000000000000000000000000000000000000001683528351808501855260088801805490930b81526009880180549590970196939591948683019491939284019190610438906111fb565b80601f0160208091040260200160405190810160405280929190818152602001828054610464906111fb565b80156104b15780601f10610486576101008083540402835291602001916104b1565b820191906000526020600020905b81548152906001019060200180831161049457829003601f168201915b5050509190925250505090525090525092915050565b81816040516104d7929190611248565b60405180910390207f3d969732b1bbbb9f1d7eb9f3f14e4cb50a74d950b3ef916a397b85dfbab93c6783836040516105109291906112a1565b60405180910390a25050565b60006040518061010001604052808c60030b81526020018b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509082525060ff8a166020808301919091526040805161040081810183529190930192918b9183908390808284376000920191909152505050815273ffffffffffffffffffffffffffffffffffffffff8816602080830191909152604080518883028181018401835289825291909301929189918991829190850190849080828437600092019190915250505090825250601785900b602082015260400161060e8461139e565b905281546001808201845560009384526020938490208351600a9093020180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff90931692909217825592820151919290919082019061067490826114f8565b5060408201516002820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff90921691909117905560608201516106c29060038301906020610a97565b5060808201516004820180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90921691909117905560a08201518051610729916005840191602090910190610b2a565b5060c08201516006820180547fffffffffffffffff0000000000000000000000000000000000000000000000001677ffffffffffffffffffffffffffffffffffffffffffffffff90921691909117905560e082015180516007830180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001660f09290921c91909117815560208083015180516008860180547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff90921691909117815591810151909190600986019061080c90826114f8565b5050505050505050505050505050505050565b606060018054806020026020016040519081016040528092919081815260200182805480156108a157602002820191906000526020600020906000905b82829054906101000a900467ffffffffffffffff1667ffffffffffffffff168152602001906008019060208260070104928301926001038202915080841161085c5790505b5050505050905090565b8960030b7f7188419dcd8b51877b71766f075f3626586c0ff190e7d056aa65ce9acb649a3d8a8a8a8a8a8a8a8a8a6040516108ee99989796959493929190611757565b60405180910390a250505050505050505050565b8060030b8260030b8460030b7f91c80dc390f3d041b3a04b0099b19634499541ea26972250986ee4b24a12fac560405160405180910390a4505050565b610947610a48565b6040518061010001604052808c60030b81526020018b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509082525060ff8a166020808301919091526040805161040081810183529190930192918b9183908390808284376000920191909152505050815273ffffffffffffffffffffffffffffffffffffffff8816602080830191909152604080518883028181018401835289825291909301929189918991829190850190849080828437600092019190915250505090825250601785900b6020820152604001610a378461139e565b90529b9a5050505050505050505050565b6040805161010081018252600080825260606020830181905292820152908101610a70610ba4565b8152600060208201819052606060408301819052820152608001610a92610bc3565b905290565b600183019183908215610b1a5791602002820160005b83821115610aeb57835183826101000a81548160ff021916908360ff1602179055509260200192600101602081600001049283019260010302610aad565b8015610b185782816101000a81549060ff0219169055600101602081600001049283019260010302610aeb565b505b50610b26929150610c16565b5090565b828054828255906000526020600020908101928215610b1a579160200282015b82811115610b1a57825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602090920191600190910190610b4a565b6040518061040001604052806020906020820280368337509192915050565b604051806040016040528060007dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001610a926040518060400160405280600060070b8152602001606081525090565b5b80821115610b265760008155600101610c17565b600060208284031215610c3d57600080fd5b5035919050565b6000815180845260005b81811015610c6a57602081850181015186830182015201610c4e565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b8060005b6020808210610cbb5750610cd2565b825160ff1685529384019390910190600101610cac565b50505050565b600081518084526020808501945080840160005b83811015610d1e57815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101610cec565b509495945050505050565b7fffff00000000000000000000000000000000000000000000000000000000000081511682526000602082015160406020850152805160070b60408501526020810151905060406060850152610d826080850182610c44565b949350505050565b60208152610d9e60208201835160030b9052565b600060208301516104e0806040850152610dbc610500850183610c44565b91506040850151610dd2606086018260ff169052565b506060850151610de56080860182610ca8565b50608085015173ffffffffffffffffffffffffffffffffffffffff1661048085015260a08501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe085840381016104a0870152610e428483610cd8565b935060c08701519150610e5b6104c087018360170b9052565b60e0870151915080868503018387015250610e768382610d29565b9695505050505050565b60008083601f840112610e9257600080fd5b50813567ffffffffffffffff811115610eaa57600080fd5b602083019150836020828501011115610ec257600080fd5b9250929050565b60008060208385031215610edc57600080fd5b823567ffffffffffffffff811115610ef357600080fd5b610eff85828601610e80565b90969095509350505050565b8035600381900b8114610f1d57600080fd5b919050565b803560ff81168114610f1d57600080fd5b806104008101831015610f4557600080fd5b92915050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610f1d57600080fd5b60008083601f840112610f8157600080fd5b50813567ffffffffffffffff811115610f9957600080fd5b6020830191508360208260051b8501011115610ec257600080fd5b8035601781900b8114610f1d57600080fd5b600060408284031215610fd857600080fd5b50919050565b6000806000806000806000806000806104e08b8d031215610ffe57600080fd5b6110078b610f0b565b995060208b013567ffffffffffffffff8082111561102457600080fd5b6110308e838f01610e80565b909b50995089915061104460408e01610f22565b98506110538e60608f01610f33565b97506110626104608e01610f4b565b96506104808d013591508082111561107957600080fd5b6110858e838f01610f6f565b909650945084915061109a6104a08e01610fb4565b93506104c08d01359150808211156110b157600080fd5b506110be8d828e01610fc6565b9150509295989b9194979a5092959850565b6020808252825182820181905260009190848201906040850190845b8181101561111257835167ffffffffffffffff16835292840192918401916001016110ec565b50909695505050505050565b60006020828403121561113057600080fd5b813567ffffffffffffffff8116811461114857600080fd5b9392505050565b60008060006060848603121561116457600080fd5b61116d84610f0b565b925061117b60208501610f0b565b915061118960408501610f0b565b90509250925092565b81810381811115610f45577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600181811c9082168061120f57607f821691505b602082108103610fd8577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b8183823760009101908152919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b602081526000610d82602083018486611258565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715611307576113076112b5565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715611354576113546112b5565b604052919050565b80357fffff00000000000000000000000000000000000000000000000000000000000081168114610f1d57600080fd5b8035600781900b8114610f1d57600080fd5b6000604082360312156113b057600080fd5b6113b86112e4565b6113c18361135c565b815260208084013567ffffffffffffffff808211156113df57600080fd5b8186019150604082360312156113f457600080fd5b6113fc6112e4565b6114058361138c565b8152838301358281111561141857600080fd5b929092019136601f84011261142c57600080fd5b82358281111561143e5761143e6112b5565b61146e857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161130d565b9250808352368582860101111561148457600080fd5b8085850186850137600090830185015280840191909152918301919091525092915050565b601f8211156114f357600081815260208120601f850160051c810160208610156114d05750805b601f850160051c820191505b818110156114ef578281556001016114dc565b5050505b505050565b815167ffffffffffffffff811115611512576115126112b5565b6115268161152084546111fb565b846114a9565b602080601f83116001811461157957600084156115435750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556114ef565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156115c6578886015182559484019460019091019084016115a7565b508582101561160257878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b8183526000602080850194508260005b85811015610d1e5773ffffffffffffffffffffffffffffffffffffffff61164883610f4b565b1687529582019590820190600101611622565b7fffff0000000000000000000000000000000000000000000000000000000000006116858261135c565b168252600060208201357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc18336030181126116bf57600080fd5b6040602085015282016116d18161138c565b60070b604085015260208101357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe182360301811261170e57600080fd5b0160208101903567ffffffffffffffff81111561172a57600080fd5b80360382131561173957600080fd5b6040606086015261174e608086018284611258565b95945050505050565b60006104c080835261176c8184018c8e611258565b9050602060ff808c1682860152604085018b60005b848110156117a6578361179383610f22565b1683529184019190840190600101611781565b505050505073ffffffffffffffffffffffffffffffffffffffff88166104408401528281036104608401526117dc818789611612565b90506117ee61048084018660170b9052565b8281036104a0840152611801818561165b565b9c9b50505050505050505050505056fea164736f6c6343000813000a", } var ChainReaderTesterABI = ChainReaderTesterMetaData.ABI @@ -192,6 +192,28 @@ func (_ChainReaderTester *ChainReaderTesterTransactorRaw) Transact(opts *bind.Tr return _ChainReaderTester.Contract.contract.Transact(opts, method, params...) } +func (_ChainReaderTester *ChainReaderTesterCaller) GetAlterablePrimitiveValue(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _ChainReaderTester.contract.Call(opts, &out, "getAlterablePrimitiveValue") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +func (_ChainReaderTester *ChainReaderTesterSession) GetAlterablePrimitiveValue() (uint64, error) { + return _ChainReaderTester.Contract.GetAlterablePrimitiveValue(&_ChainReaderTester.CallOpts) +} + +func (_ChainReaderTester *ChainReaderTesterCallerSession) GetAlterablePrimitiveValue() (uint64, error) { + return _ChainReaderTester.Contract.GetAlterablePrimitiveValue(&_ChainReaderTester.CallOpts) +} + func (_ChainReaderTester *ChainReaderTesterCaller) GetDifferentPrimitiveValue(opts *bind.CallOpts) (uint64, error) { var out []interface{} err := _ChainReaderTester.contract.Call(opts, &out, "getDifferentPrimitiveValue") @@ -314,6 +336,18 @@ func (_ChainReaderTester *ChainReaderTesterTransactorSession) AddTestStruct(fiel return _ChainReaderTester.Contract.AddTestStruct(&_ChainReaderTester.TransactOpts, field, differentField, oracleId, oracleIds, account, accounts, bigField, nestedStruct) } +func (_ChainReaderTester *ChainReaderTesterTransactor) SetAlterablePrimitiveValue(opts *bind.TransactOpts, value uint64) (*types.Transaction, error) { + return _ChainReaderTester.contract.Transact(opts, "setAlterablePrimitiveValue", value) +} + +func (_ChainReaderTester *ChainReaderTesterSession) SetAlterablePrimitiveValue(value uint64) (*types.Transaction, error) { + return _ChainReaderTester.Contract.SetAlterablePrimitiveValue(&_ChainReaderTester.TransactOpts, value) +} + +func (_ChainReaderTester *ChainReaderTesterTransactorSession) SetAlterablePrimitiveValue(value uint64) (*types.Transaction, error) { + return _ChainReaderTester.Contract.SetAlterablePrimitiveValue(&_ChainReaderTester.TransactOpts, value) +} + func (_ChainReaderTester *ChainReaderTesterTransactor) TriggerEvent(opts *bind.TransactOpts, field int32, differentField string, oracleId uint8, oracleIds [32]uint8, account common.Address, accounts []common.Address, bigField *big.Int, nestedStruct MidLevelTestStruct) (*types.Transaction, error) { return _ChainReaderTester.contract.Transact(opts, "triggerEvent", field, differentField, oracleId, oracleIds, account, accounts, bigField, nestedStruct) } @@ -788,6 +822,8 @@ func (_ChainReaderTester *ChainReaderTester) Address() common.Address { } type ChainReaderTesterInterface interface { + GetAlterablePrimitiveValue(opts *bind.CallOpts) (uint64, error) + GetDifferentPrimitiveValue(opts *bind.CallOpts) (uint64, error) GetElementAtIndex(opts *bind.CallOpts, i *big.Int) (TestStruct, error) @@ -800,6 +836,8 @@ type ChainReaderTesterInterface interface { AddTestStruct(opts *bind.TransactOpts, field int32, differentField string, oracleId uint8, oracleIds [32]uint8, account common.Address, accounts []common.Address, bigField *big.Int, nestedStruct MidLevelTestStruct) (*types.Transaction, error) + SetAlterablePrimitiveValue(opts *bind.TransactOpts, value uint64) (*types.Transaction, error) + TriggerEvent(opts *bind.TransactOpts, field int32, differentField string, oracleId uint8, oracleIds [32]uint8, account common.Address, accounts []common.Address, bigField *big.Int, nestedStruct MidLevelTestStruct) (*types.Transaction, error) TriggerEventWithDynamicTopic(opts *bind.TransactOpts, field string) (*types.Transaction, error) diff --git a/core/gethwrappers/generated/counter/counter.go b/core/gethwrappers/generated/counter/counter.go new file mode 100644 index 00000000000..aaa625666df --- /dev/null +++ b/core/gethwrappers/generated/counter/counter.go @@ -0,0 +1,274 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package counter + +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 +) + +var CounterMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"name\":\"AlwaysRevert\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"alwaysRevert\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"alwaysRevertWithString\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"increment\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x60806040526000805534801561001457600080fd5b506101af806100246000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c8063a7bc8cbc11610050578063a7bc8cbc14610091578063d09de08a14610099578063d826f88f146100a157600080fd5b806306661abd1461006c5780639fb3785314610087575b600080fd5b61007560005481565b60405190815260200160405180910390f35b61008f6100aa565b005b61008f6100dc565b610075610142565b61008f60008055565b6040517f8bba4aff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f616c776179732072657665727400000000000000000000000000000000000000604482015260640160405180910390fd5b600060016000808282546101569190610163565b9091555050600054919050565b6000821982111561019d577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b50019056fea164736f6c6343000806000a", +} + +var CounterABI = CounterMetaData.ABI + +var CounterBin = CounterMetaData.Bin + +func DeployCounter(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Counter, error) { + parsed, err := CounterMetaData.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(CounterBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &Counter{address: address, abi: *parsed, CounterCaller: CounterCaller{contract: contract}, CounterTransactor: CounterTransactor{contract: contract}, CounterFilterer: CounterFilterer{contract: contract}}, nil +} + +type Counter struct { + address common.Address + abi abi.ABI + CounterCaller + CounterTransactor + CounterFilterer +} + +type CounterCaller struct { + contract *bind.BoundContract +} + +type CounterTransactor struct { + contract *bind.BoundContract +} + +type CounterFilterer struct { + contract *bind.BoundContract +} + +type CounterSession struct { + Contract *Counter + CallOpts bind.CallOpts + TransactOpts bind.TransactOpts +} + +type CounterCallerSession struct { + Contract *CounterCaller + CallOpts bind.CallOpts +} + +type CounterTransactorSession struct { + Contract *CounterTransactor + TransactOpts bind.TransactOpts +} + +type CounterRaw struct { + Contract *Counter +} + +type CounterCallerRaw struct { + Contract *CounterCaller +} + +type CounterTransactorRaw struct { + Contract *CounterTransactor +} + +func NewCounter(address common.Address, backend bind.ContractBackend) (*Counter, error) { + abi, err := abi.JSON(strings.NewReader(CounterABI)) + if err != nil { + return nil, err + } + contract, err := bindCounter(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Counter{address: address, abi: abi, CounterCaller: CounterCaller{contract: contract}, CounterTransactor: CounterTransactor{contract: contract}, CounterFilterer: CounterFilterer{contract: contract}}, nil +} + +func NewCounterCaller(address common.Address, caller bind.ContractCaller) (*CounterCaller, error) { + contract, err := bindCounter(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &CounterCaller{contract: contract}, nil +} + +func NewCounterTransactor(address common.Address, transactor bind.ContractTransactor) (*CounterTransactor, error) { + contract, err := bindCounter(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &CounterTransactor{contract: contract}, nil +} + +func NewCounterFilterer(address common.Address, filterer bind.ContractFilterer) (*CounterFilterer, error) { + contract, err := bindCounter(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &CounterFilterer{contract: contract}, nil +} + +func bindCounter(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := CounterMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +func (_Counter *CounterRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Counter.Contract.CounterCaller.contract.Call(opts, result, method, params...) +} + +func (_Counter *CounterRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Counter.Contract.CounterTransactor.contract.Transfer(opts) +} + +func (_Counter *CounterRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Counter.Contract.CounterTransactor.contract.Transact(opts, method, params...) +} + +func (_Counter *CounterCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Counter.Contract.contract.Call(opts, result, method, params...) +} + +func (_Counter *CounterTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Counter.Contract.contract.Transfer(opts) +} + +func (_Counter *CounterTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Counter.Contract.contract.Transact(opts, method, params...) +} + +func (_Counter *CounterCaller) AlwaysRevert(opts *bind.CallOpts) error { + var out []interface{} + err := _Counter.contract.Call(opts, &out, "alwaysRevert") + + if err != nil { + return err + } + + return err + +} + +func (_Counter *CounterSession) AlwaysRevert() error { + return _Counter.Contract.AlwaysRevert(&_Counter.CallOpts) +} + +func (_Counter *CounterCallerSession) AlwaysRevert() error { + return _Counter.Contract.AlwaysRevert(&_Counter.CallOpts) +} + +func (_Counter *CounterCaller) AlwaysRevertWithString(opts *bind.CallOpts) error { + var out []interface{} + err := _Counter.contract.Call(opts, &out, "alwaysRevertWithString") + + if err != nil { + return err + } + + return err + +} + +func (_Counter *CounterSession) AlwaysRevertWithString() error { + return _Counter.Contract.AlwaysRevertWithString(&_Counter.CallOpts) +} + +func (_Counter *CounterCallerSession) AlwaysRevertWithString() error { + return _Counter.Contract.AlwaysRevertWithString(&_Counter.CallOpts) +} + +func (_Counter *CounterCaller) Count(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Counter.contract.Call(opts, &out, "count") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_Counter *CounterSession) Count() (*big.Int, error) { + return _Counter.Contract.Count(&_Counter.CallOpts) +} + +func (_Counter *CounterCallerSession) Count() (*big.Int, error) { + return _Counter.Contract.Count(&_Counter.CallOpts) +} + +func (_Counter *CounterTransactor) Increment(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Counter.contract.Transact(opts, "increment") +} + +func (_Counter *CounterSession) Increment() (*types.Transaction, error) { + return _Counter.Contract.Increment(&_Counter.TransactOpts) +} + +func (_Counter *CounterTransactorSession) Increment() (*types.Transaction, error) { + return _Counter.Contract.Increment(&_Counter.TransactOpts) +} + +func (_Counter *CounterTransactor) Reset(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Counter.contract.Transact(opts, "reset") +} + +func (_Counter *CounterSession) Reset() (*types.Transaction, error) { + return _Counter.Contract.Reset(&_Counter.TransactOpts) +} + +func (_Counter *CounterTransactorSession) Reset() (*types.Transaction, error) { + return _Counter.Contract.Reset(&_Counter.TransactOpts) +} + +func (_Counter *Counter) Address() common.Address { + return _Counter.address +} + +type CounterInterface interface { + AlwaysRevert(opts *bind.CallOpts) error + + AlwaysRevertWithString(opts *bind.CallOpts) error + + Count(opts *bind.CallOpts) (*big.Int, error) + + Increment(opts *bind.TransactOpts) (*types.Transaction, error) + + Reset(opts *bind.TransactOpts) (*types.Transaction, error) + + Address() common.Address +} diff --git a/core/gethwrappers/generated/mock_ethusd_aggregator_wrapper/mock_ethusd_aggregator_wrapper.go b/core/gethwrappers/generated/mock_ethusd_aggregator_wrapper/mock_ethusd_aggregator_wrapper.go new file mode 100644 index 00000000000..c10f916c5e7 --- /dev/null +++ b/core/gethwrappers/generated/mock_ethusd_aggregator_wrapper/mock_ethusd_aggregator_wrapper.go @@ -0,0 +1,377 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package mock_ethusd_aggregator_wrapper + +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 +) + +var MockETHUSDAggregatorMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"int256\",\"name\":\"_answer\",\"type\":\"int256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"answer\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"description\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint80\",\"name\":\"\",\"type\":\"uint80\"}],\"name\":\"getRoundData\",\"outputs\":[{\"internalType\":\"uint80\",\"name\":\"roundId\",\"type\":\"uint80\"},{\"internalType\":\"int256\",\"name\":\"ans\",\"type\":\"int256\"},{\"internalType\":\"uint256\",\"name\":\"startedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"updatedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint80\",\"name\":\"answeredInRound\",\"type\":\"uint80\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestRoundData\",\"outputs\":[{\"internalType\":\"uint80\",\"name\":\"roundId\",\"type\":\"uint80\"},{\"internalType\":\"int256\",\"name\":\"ans\",\"type\":\"int256\"},{\"internalType\":\"uint256\",\"name\":\"startedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"updatedAt\",\"type\":\"uint256\"},{\"internalType\":\"uint80\",\"name\":\"answeredInRound\",\"type\":\"uint80\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_blockTimestampDeduction\",\"type\":\"uint256\"}],\"name\":\"setBlockTimestampDeduction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}]", + Bin: "0x6080604052600060015534801561001557600080fd5b506040516103333803806103338339810160408190526100349161003c565b600055610055565b60006020828403121561004e57600080fd5b5051919050565b6102cf806100646000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c806385bb7d691161005b57806385bb7d69146100e65780639a6fc8f5146100ef578063f0ad37df14610139578063feaf968c1461014e57600080fd5b8063313ce5671461008257806354fd4d50146100965780637284e416146100a7575b600080fd5b604051600881526020015b60405180910390f35b60015b60405190815260200161008d565b604080518082018252601481527f4d6f636b45544855534441676772656761746f720000000000000000000000006020820152905161008d91906101ca565b61009960005481565b6101026100fd366004610236565b610156565b6040805169ffffffffffffffffffff968716815260208101959095528401929092526060830152909116608082015260a00161008d565b61014c610147366004610269565b600155565b005b610102610186565b6000806000806000600160005461016b6101b5565b6101736101b5565b9299919850965090945060019350915050565b6000806000806000600160005461019b6101b5565b6101a36101b5565b92989197509550909350600192509050565b6000600154426101c59190610282565b905090565b600060208083528351808285015260005b818110156101f7578581018301518582016040015282016101db565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b60006020828403121561024857600080fd5b813569ffffffffffffffffffff8116811461026257600080fd5b9392505050565b60006020828403121561027b57600080fd5b5035919050565b818103818111156102bc577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b9291505056fea164736f6c6343000813000a", +} + +var MockETHUSDAggregatorABI = MockETHUSDAggregatorMetaData.ABI + +var MockETHUSDAggregatorBin = MockETHUSDAggregatorMetaData.Bin + +func DeployMockETHUSDAggregator(auth *bind.TransactOpts, backend bind.ContractBackend, _answer *big.Int) (common.Address, *types.Transaction, *MockETHUSDAggregator, error) { + parsed, err := MockETHUSDAggregatorMetaData.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(MockETHUSDAggregatorBin), backend, _answer) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &MockETHUSDAggregator{address: address, abi: *parsed, MockETHUSDAggregatorCaller: MockETHUSDAggregatorCaller{contract: contract}, MockETHUSDAggregatorTransactor: MockETHUSDAggregatorTransactor{contract: contract}, MockETHUSDAggregatorFilterer: MockETHUSDAggregatorFilterer{contract: contract}}, nil +} + +type MockETHUSDAggregator struct { + address common.Address + abi abi.ABI + MockETHUSDAggregatorCaller + MockETHUSDAggregatorTransactor + MockETHUSDAggregatorFilterer +} + +type MockETHUSDAggregatorCaller struct { + contract *bind.BoundContract +} + +type MockETHUSDAggregatorTransactor struct { + contract *bind.BoundContract +} + +type MockETHUSDAggregatorFilterer struct { + contract *bind.BoundContract +} + +type MockETHUSDAggregatorSession struct { + Contract *MockETHUSDAggregator + CallOpts bind.CallOpts + TransactOpts bind.TransactOpts +} + +type MockETHUSDAggregatorCallerSession struct { + Contract *MockETHUSDAggregatorCaller + CallOpts bind.CallOpts +} + +type MockETHUSDAggregatorTransactorSession struct { + Contract *MockETHUSDAggregatorTransactor + TransactOpts bind.TransactOpts +} + +type MockETHUSDAggregatorRaw struct { + Contract *MockETHUSDAggregator +} + +type MockETHUSDAggregatorCallerRaw struct { + Contract *MockETHUSDAggregatorCaller +} + +type MockETHUSDAggregatorTransactorRaw struct { + Contract *MockETHUSDAggregatorTransactor +} + +func NewMockETHUSDAggregator(address common.Address, backend bind.ContractBackend) (*MockETHUSDAggregator, error) { + abi, err := abi.JSON(strings.NewReader(MockETHUSDAggregatorABI)) + if err != nil { + return nil, err + } + contract, err := bindMockETHUSDAggregator(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &MockETHUSDAggregator{address: address, abi: abi, MockETHUSDAggregatorCaller: MockETHUSDAggregatorCaller{contract: contract}, MockETHUSDAggregatorTransactor: MockETHUSDAggregatorTransactor{contract: contract}, MockETHUSDAggregatorFilterer: MockETHUSDAggregatorFilterer{contract: contract}}, nil +} + +func NewMockETHUSDAggregatorCaller(address common.Address, caller bind.ContractCaller) (*MockETHUSDAggregatorCaller, error) { + contract, err := bindMockETHUSDAggregator(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &MockETHUSDAggregatorCaller{contract: contract}, nil +} + +func NewMockETHUSDAggregatorTransactor(address common.Address, transactor bind.ContractTransactor) (*MockETHUSDAggregatorTransactor, error) { + contract, err := bindMockETHUSDAggregator(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &MockETHUSDAggregatorTransactor{contract: contract}, nil +} + +func NewMockETHUSDAggregatorFilterer(address common.Address, filterer bind.ContractFilterer) (*MockETHUSDAggregatorFilterer, error) { + contract, err := bindMockETHUSDAggregator(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &MockETHUSDAggregatorFilterer{contract: contract}, nil +} + +func bindMockETHUSDAggregator(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := MockETHUSDAggregatorMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +func (_MockETHUSDAggregator *MockETHUSDAggregatorRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _MockETHUSDAggregator.Contract.MockETHUSDAggregatorCaller.contract.Call(opts, result, method, params...) +} + +func (_MockETHUSDAggregator *MockETHUSDAggregatorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MockETHUSDAggregator.Contract.MockETHUSDAggregatorTransactor.contract.Transfer(opts) +} + +func (_MockETHUSDAggregator *MockETHUSDAggregatorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _MockETHUSDAggregator.Contract.MockETHUSDAggregatorTransactor.contract.Transact(opts, method, params...) +} + +func (_MockETHUSDAggregator *MockETHUSDAggregatorCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _MockETHUSDAggregator.Contract.contract.Call(opts, result, method, params...) +} + +func (_MockETHUSDAggregator *MockETHUSDAggregatorTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MockETHUSDAggregator.Contract.contract.Transfer(opts) +} + +func (_MockETHUSDAggregator *MockETHUSDAggregatorTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _MockETHUSDAggregator.Contract.contract.Transact(opts, method, params...) +} + +func (_MockETHUSDAggregator *MockETHUSDAggregatorCaller) Answer(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _MockETHUSDAggregator.contract.Call(opts, &out, "answer") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_MockETHUSDAggregator *MockETHUSDAggregatorSession) Answer() (*big.Int, error) { + return _MockETHUSDAggregator.Contract.Answer(&_MockETHUSDAggregator.CallOpts) +} + +func (_MockETHUSDAggregator *MockETHUSDAggregatorCallerSession) Answer() (*big.Int, error) { + return _MockETHUSDAggregator.Contract.Answer(&_MockETHUSDAggregator.CallOpts) +} + +func (_MockETHUSDAggregator *MockETHUSDAggregatorCaller) Decimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _MockETHUSDAggregator.contract.Call(opts, &out, "decimals") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +func (_MockETHUSDAggregator *MockETHUSDAggregatorSession) Decimals() (uint8, error) { + return _MockETHUSDAggregator.Contract.Decimals(&_MockETHUSDAggregator.CallOpts) +} + +func (_MockETHUSDAggregator *MockETHUSDAggregatorCallerSession) Decimals() (uint8, error) { + return _MockETHUSDAggregator.Contract.Decimals(&_MockETHUSDAggregator.CallOpts) +} + +func (_MockETHUSDAggregator *MockETHUSDAggregatorCaller) Description(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _MockETHUSDAggregator.contract.Call(opts, &out, "description") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +func (_MockETHUSDAggregator *MockETHUSDAggregatorSession) Description() (string, error) { + return _MockETHUSDAggregator.Contract.Description(&_MockETHUSDAggregator.CallOpts) +} + +func (_MockETHUSDAggregator *MockETHUSDAggregatorCallerSession) Description() (string, error) { + return _MockETHUSDAggregator.Contract.Description(&_MockETHUSDAggregator.CallOpts) +} + +func (_MockETHUSDAggregator *MockETHUSDAggregatorCaller) GetRoundData(opts *bind.CallOpts, arg0 *big.Int) (GetRoundData, + + error) { + var out []interface{} + err := _MockETHUSDAggregator.contract.Call(opts, &out, "getRoundData", arg0) + + outstruct := new(GetRoundData) + if err != nil { + return *outstruct, err + } + + outstruct.RoundId = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.Ans = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.StartedAt = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + outstruct.UpdatedAt = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + outstruct.AnsweredInRound = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int) + + return *outstruct, err + +} + +func (_MockETHUSDAggregator *MockETHUSDAggregatorSession) GetRoundData(arg0 *big.Int) (GetRoundData, + + error) { + return _MockETHUSDAggregator.Contract.GetRoundData(&_MockETHUSDAggregator.CallOpts, arg0) +} + +func (_MockETHUSDAggregator *MockETHUSDAggregatorCallerSession) GetRoundData(arg0 *big.Int) (GetRoundData, + + error) { + return _MockETHUSDAggregator.Contract.GetRoundData(&_MockETHUSDAggregator.CallOpts, arg0) +} + +func (_MockETHUSDAggregator *MockETHUSDAggregatorCaller) LatestRoundData(opts *bind.CallOpts) (LatestRoundData, + + error) { + var out []interface{} + err := _MockETHUSDAggregator.contract.Call(opts, &out, "latestRoundData") + + outstruct := new(LatestRoundData) + if err != nil { + return *outstruct, err + } + + outstruct.RoundId = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.Ans = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.StartedAt = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + outstruct.UpdatedAt = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + outstruct.AnsweredInRound = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int) + + return *outstruct, err + +} + +func (_MockETHUSDAggregator *MockETHUSDAggregatorSession) LatestRoundData() (LatestRoundData, + + error) { + return _MockETHUSDAggregator.Contract.LatestRoundData(&_MockETHUSDAggregator.CallOpts) +} + +func (_MockETHUSDAggregator *MockETHUSDAggregatorCallerSession) LatestRoundData() (LatestRoundData, + + error) { + return _MockETHUSDAggregator.Contract.LatestRoundData(&_MockETHUSDAggregator.CallOpts) +} + +func (_MockETHUSDAggregator *MockETHUSDAggregatorCaller) Version(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _MockETHUSDAggregator.contract.Call(opts, &out, "version") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_MockETHUSDAggregator *MockETHUSDAggregatorSession) Version() (*big.Int, error) { + return _MockETHUSDAggregator.Contract.Version(&_MockETHUSDAggregator.CallOpts) +} + +func (_MockETHUSDAggregator *MockETHUSDAggregatorCallerSession) Version() (*big.Int, error) { + return _MockETHUSDAggregator.Contract.Version(&_MockETHUSDAggregator.CallOpts) +} + +func (_MockETHUSDAggregator *MockETHUSDAggregatorTransactor) SetBlockTimestampDeduction(opts *bind.TransactOpts, _blockTimestampDeduction *big.Int) (*types.Transaction, error) { + return _MockETHUSDAggregator.contract.Transact(opts, "setBlockTimestampDeduction", _blockTimestampDeduction) +} + +func (_MockETHUSDAggregator *MockETHUSDAggregatorSession) SetBlockTimestampDeduction(_blockTimestampDeduction *big.Int) (*types.Transaction, error) { + return _MockETHUSDAggregator.Contract.SetBlockTimestampDeduction(&_MockETHUSDAggregator.TransactOpts, _blockTimestampDeduction) +} + +func (_MockETHUSDAggregator *MockETHUSDAggregatorTransactorSession) SetBlockTimestampDeduction(_blockTimestampDeduction *big.Int) (*types.Transaction, error) { + return _MockETHUSDAggregator.Contract.SetBlockTimestampDeduction(&_MockETHUSDAggregator.TransactOpts, _blockTimestampDeduction) +} + +type GetRoundData struct { + RoundId *big.Int + Ans *big.Int + StartedAt *big.Int + UpdatedAt *big.Int + AnsweredInRound *big.Int +} +type LatestRoundData struct { + RoundId *big.Int + Ans *big.Int + StartedAt *big.Int + UpdatedAt *big.Int + AnsweredInRound *big.Int +} + +func (_MockETHUSDAggregator *MockETHUSDAggregator) Address() common.Address { + return _MockETHUSDAggregator.address +} + +type MockETHUSDAggregatorInterface interface { + Answer(opts *bind.CallOpts) (*big.Int, error) + + Decimals(opts *bind.CallOpts) (uint8, error) + + Description(opts *bind.CallOpts) (string, error) + + GetRoundData(opts *bind.CallOpts, arg0 *big.Int) (GetRoundData, + + error) + + LatestRoundData(opts *bind.CallOpts) (LatestRoundData, + + error) + + Version(opts *bind.CallOpts) (*big.Int, error) + + SetBlockTimestampDeduction(opts *bind.TransactOpts, _blockTimestampDeduction *big.Int) (*types.Transaction, error) + + Address() common.Address +} diff --git a/core/gethwrappers/generated/solidity_vrf_v08_verifier_wrapper/solidity_vrf_v08_verifier_wrapper.go b/core/gethwrappers/generated/solidity_vrf_v08_verifier_wrapper/solidity_vrf_v08_verifier_wrapper.go index 6eaf2b996fa..17f516b1ad4 100644 --- a/core/gethwrappers/generated/solidity_vrf_v08_verifier_wrapper/solidity_vrf_v08_verifier_wrapper.go +++ b/core/gethwrappers/generated/solidity_vrf_v08_verifier_wrapper/solidity_vrf_v08_verifier_wrapper.go @@ -42,7 +42,7 @@ type VRFProof struct { var VRFV08TestHelperMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"p1\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"p2\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256\",\"name\":\"invZ\",\"type\":\"uint256\"}],\"name\":\"affineECAdd_\",\"outputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"\",\"type\":\"uint256[2]\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"base\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"exponent\",\"type\":\"uint256\"}],\"name\":\"bigModExp_\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"x\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256\",\"name\":\"scalar\",\"type\":\"uint256\"},{\"internalType\":\"uint256[2]\",\"name\":\"q\",\"type\":\"uint256[2]\"}],\"name\":\"ecmulVerify_\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"b\",\"type\":\"bytes\"}],\"name\":\"fieldHash_\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"pk\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256\",\"name\":\"x\",\"type\":\"uint256\"}],\"name\":\"hashToCurve_\",\"outputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"\",\"type\":\"uint256[2]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"p\",\"type\":\"uint256[2]\"}],\"name\":\"isOnCurve_\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"c\",\"type\":\"uint256\"},{\"internalType\":\"uint256[2]\",\"name\":\"p1\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"cp1Witness\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256\",\"name\":\"s\",\"type\":\"uint256\"},{\"internalType\":\"uint256[2]\",\"name\":\"p2\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"sp2Witness\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256\",\"name\":\"zInv\",\"type\":\"uint256\"}],\"name\":\"linearCombination_\",\"outputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"\",\"type\":\"uint256[2]\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"px\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"py\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"qx\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"qy\",\"type\":\"uint256\"}],\"name\":\"projectiveECAdd_\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"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\"},{\"internalType\":\"uint256\",\"name\":\"seed\",\"type\":\"uint256\"}],\"name\":\"randomValueFromVRFProof_\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"output\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"hash\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"pk\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"gamma\",\"type\":\"uint256[2]\"},{\"internalType\":\"address\",\"name\":\"uWitness\",\"type\":\"address\"},{\"internalType\":\"uint256[2]\",\"name\":\"v\",\"type\":\"uint256[2]\"}],\"name\":\"scalarFromCurvePoints_\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"x\",\"type\":\"uint256\"}],\"name\":\"squareRoot_\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"c\",\"type\":\"uint256\"},{\"internalType\":\"uint256[2]\",\"name\":\"p\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256\",\"name\":\"s\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"lcWitness\",\"type\":\"address\"}],\"name\":\"verifyLinearCombinationWithGenerator_\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"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\"}],\"name\":\"verifyVRFProof_\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"x\",\"type\":\"uint256\"}],\"name\":\"ySquared_\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b50611b34806100206000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80639d6f03371161008c578063b481e26011610066578063b481e260146101fc578063ef3b10ec1461020f578063fd7e4af914610224578063fe54f2a21461023757600080fd5b80639d6f0337146101c3578063a5e9508f146101d6578063aa7b2fbb146101e957600080fd5b80637f8f50a8116100c85780637f8f50a81461014c5780638af046ea1461015f57806391d5f6911461017257806395e6ee921461019557600080fd5b8063244f896d146100ef57806335452450146101185780635de600421461012b575b600080fd5b6101026100fd366004611549565b61024a565b60405161010f9190611a03565b60405180910390f35b610102610126366004611619565b610267565b61013e6101393660046118e1565b610282565b60405190815260200161010f565b61013e61015a3660046114df565b61028e565b61013e61016d366004611809565b6102a7565b61018561018036600461189a565b6102b2565b604051901515815260200161010f565b6101a86101a3366004611903565b6102c9565b6040805193845260208401929092529082015260600161010f565b61013e6101d1366004611809565b6102ea565b61013e6101e4366004611751565b6102f5565b6101856101f7366004611644565b610301565b61013e61020a366004611682565b61030e565b61022261021d366004611587565b610319565b005b6101856102323660046114c3565b610335565b610102610245366004611822565b610340565b6102526113cd565b61025d848484610363565b90505b9392505050565b61026f6113cd565b6102798383610497565b90505b92915050565b600061027983836104fb565b600061029d86868686866105ef565b9695505050505050565b600061027c8261064d565b60006102c085858585610687565b95945050505050565b60008060006102da8787878761082a565b9250925092509450945094915050565b600061027c826109c0565b60006102798383610a18565b600061025d848484610aa1565b600061027c82610c2e565b61032a898989898989898989610c88565b505050505050505050565b600061027c82610f5f565b6103486113cd565b610357888888888888886110ba565b98975050505050505050565b61036b6113cd565b83516020808601518551918601516000938493849361038c9390919061082a565b919450925090507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f858209600114610425576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f696e765a206d75737420626520696e7665727365206f66207a0000000000000060448201526064015b60405180910390fd5b60405180604001604052807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f8061045e5761045e611ac9565b87860981526020017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f8785099052979650505050505050565b61049f6113cd565b6104cc600184846040516020016104b8939291906119e2565b604051602081830303815290604052611242565b90505b6104d881610f5f565b61027c5780516040805160208101929092526104f491016104b8565b90506104cf565b6000806105066113eb565b6020808252818101819052604082015260608101859052608081018490527ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f60a0820152610552611409565b60208160c08460057ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa9250826105e5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6269674d6f64457870206661696c757265210000000000000000000000000000604482015260640161041c565b5195945050505050565b60006002868686858760405160200161060d96959493929190611970565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101209695505050505050565b600061027c8260026106807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f6001611a4f565b901c6104fb565b600073ffffffffffffffffffffffffffffffffffffffff8216610706576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f626164207769746e657373000000000000000000000000000000000000000000604482015260640161041c565b60208401516000906001161561071d57601c610720565b601b5b905060007ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd03641418587600060200201510986517ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141918203925060009190890987516040805160008082526020820180845287905260ff88169282019290925260608101929092526080820183905291925060019060a0016020604051602081039080840390855afa1580156107d7573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015173ffffffffffffffffffffffffffffffffffffffff9081169088161495505050505050949350505050565b60008080600180827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f897ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f038808905060007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f8b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f038a08905060006108d2838385856112aa565b90985090506108e388828e88611302565b90985090506108f488828c87611302565b909850905060006109078d878b85611302565b9098509050610918888286866112aa565b909850905061092988828e89611302565b90985090508181146109ac577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f818a0998507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f82890997507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f81830996506109b0565b8196505b5050505050509450945094915050565b6000807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f80848509840990507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f600782089392505050565b6000610a4c8360000151846020015185604001518660600151868860a001518960c001518a60e001518b6101000151610c88565b60038360200151604051602001610a64929190611a11565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101209392505050565b600082610b0a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f7a65726f207363616c6172000000000000000000000000000000000000000000604482015260640161041c565b83516020850151600090610b2090600290611a8e565b15610b2c57601c610b2f565b601b5b905060007ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd03641418387096040805160008082526020820180845281905260ff86169282019290925260608101869052608081018390529192509060019060a0016020604051602081039080840390855afa158015610baf573d6000803e3d6000fd5b505050602060405103519050600086604051602001610bce919061195e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052805160209091012073ffffffffffffffffffffffffffffffffffffffff92831692169190911498975050505050505050565b805160208201205b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f8110610c8357604080516020808201939093528151808203840181529082019091528051910120610c36565b919050565b610c9189610f5f565b610cf7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f7075626c6963206b6579206973206e6f74206f6e206375727665000000000000604482015260640161041c565b610d0088610f5f565b610d66576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f67616d6d61206973206e6f74206f6e2063757276650000000000000000000000604482015260640161041c565b610d6f83610f5f565b610dd5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f6347616d6d615769746e657373206973206e6f74206f6e206375727665000000604482015260640161041c565b610dde82610f5f565b610e44576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f73486173685769746e657373206973206e6f74206f6e20637572766500000000604482015260640161041c565b610e50878a8887610687565b610eb6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f6164647228632a706b2b732a6729213d5f755769746e65737300000000000000604482015260640161041c565b6000610ec28a87610497565b90506000610ed5898b878b8689896110ba565b90506000610ee6838d8d8a866105ef565b9050808a14610f51576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f696e76616c69642070726f6f6600000000000000000000000000000000000000604482015260640161041c565b505050505050505050505050565b80516000907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f11610fec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f696e76616c696420782d6f7264696e6174650000000000000000000000000000604482015260640161041c565b60208201517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f11611079576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f696e76616c696420792d6f7264696e6174650000000000000000000000000000604482015260640161041c565b60208201517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f9080096110b38360005b60200201516109c0565b1492915050565b6110c26113cd565b825186517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f9081900691061415611155576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f706f696e747320696e2073756d206d7573742062652064697374696e63740000604482015260640161041c565b611160878988610aa1565b6111c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4669727374206d756c20636865636b206661696c656400000000000000000000604482015260640161041c565b6111d1848685610aa1565b611237576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f5365636f6e64206d756c20636865636b206661696c6564000000000000000000604482015260640161041c565b610357868484610363565b61124a6113cd565b61125382610c2e565b81526112686112638260006110a9565b61064d565b602082018190526002900660011415610c83576020810180517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f039052919050565b6000807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f8487097ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f8487099097909650945050505050565b600080807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f878509905060007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f87877ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f030990507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f8183087ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f86890990999098509650505050505050565b60405180604001604052806002906020820280368337509192915050565b6040518060c001604052806006906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610c8357600080fd5b600082601f83011261145c57600080fd5b6040516040810181811067ffffffffffffffff8211171561147f5761147f611af8565b806040525080838560408601111561149657600080fd5b60005b60028110156114b8578135835260209283019290910190600101611499565b509195945050505050565b6000604082840312156114d557600080fd5b610279838361144b565b600080600080600061012086880312156114f857600080fd5b611502878761144b565b9450611511876040880161144b565b9350611520876080880161144b565b925061152e60c08701611427565b915061153d8760e0880161144b565b90509295509295909350565b600080600060a0848603121561155e57600080fd5b611568858561144b565b9250611577856040860161144b565b9150608084013590509250925092565b60008060008060008060008060006101a08a8c0312156115a657600080fd5b6115b08b8b61144b565b98506115bf8b60408c0161144b565b975060808a0135965060a08a0135955060c08a013594506115e260e08b01611427565b93506115f28b6101008c0161144b565b92506116028b6101408c0161144b565b91506101808a013590509295985092959850929598565b6000806060838503121561162c57600080fd5b611636848461144b565b946040939093013593505050565b600080600060a0848603121561165957600080fd5b611663858561144b565b925060408401359150611679856060860161144b565b90509250925092565b60006020828403121561169457600080fd5b813567ffffffffffffffff808211156116ac57600080fd5b818401915084601f8301126116c057600080fd5b8135818111156116d2576116d2611af8565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561171857611718611af8565b8160405282815287602084870101111561173157600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000808284036101c081121561176657600080fd5b6101a08082121561177657600080fd5b61177e611a25565b915061178a868661144b565b8252611799866040870161144b565b60208301526080850135604083015260a0850135606083015260c085013560808301526117c860e08601611427565b60a08301526101006117dc8782880161144b565b60c08401526117ef87610140880161144b565b60e084015261018086013590830152909593013593505050565b60006020828403121561181b57600080fd5b5035919050565b6000806000806000806000610160888a03121561183e57600080fd5b8735965061184f8960208a0161144b565b955061185e8960608a0161144b565b945060a088013593506118748960c08a0161144b565b9250611884896101008a0161144b565b9150610140880135905092959891949750929550565b60008060008060a085870312156118b057600080fd5b843593506118c1866020870161144b565b9250606085013591506118d660808601611427565b905092959194509250565b600080604083850312156118f457600080fd5b50508035926020909101359150565b6000806000806080858703121561191957600080fd5b5050823594602084013594506040840135936060013592509050565b8060005b6002811015611958578151845260209384019390910190600101611939565b50505050565b6119688183611935565b604001919050565b8681526119806020820187611935565b61198d6060820186611935565b61199a60a0820185611935565b6119a760e0820184611935565b60609190911b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166101208201526101340195945050505050565b8381526119f26020820184611935565b606081019190915260800192915050565b6040810161027c8284611935565b828152606081016102606020830184611935565b604051610120810167ffffffffffffffff81118282101715611a4957611a49611af8565b60405290565b60008219821115611a89577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b600082611ac4577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a", + Bin: "0x608060405234801561001057600080fd5b50611b51806100206000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80639d6f03371161008c578063b481e26011610066578063b481e260146101fc578063ef3b10ec1461020f578063fd7e4af914610224578063fe54f2a21461023757600080fd5b80639d6f0337146101c3578063a5e9508f146101d6578063aa7b2fbb146101e957600080fd5b80637f8f50a8116100c85780637f8f50a81461014c5780638af046ea1461015f57806391d5f6911461017257806395e6ee921461019557600080fd5b8063244f896d146100ef57806335452450146101185780635de600421461012b575b600080fd5b6101026100fd3660046115ed565b61024a565b60405161010f9190611a21565b60405180910390f35b6101026101263660046116bd565b610265565b61013e6101393660046118ff565b610280565b60405190815260200161010f565b61013e61015a366004611583565b61028c565b61013e61016d366004611827565b6102a5565b6101856101803660046118b8565b6102b0565b604051901515815260200161010f565b6101a86101a3366004611921565b6102c7565b6040805193845260208401929092529082015260600161010f565b61013e6101d1366004611827565b6102e8565b61013e6101e43660046117f5565b6102f3565b6101856101f73660046116e8565b6102ff565b61013e61020a366004611726565b61030c565b61022261021d36600461162b565b610317565b005b610185610232366004611567565b610333565b610102610245366004611840565b61033e565b610252611456565b61025d848484610361565b949350505050565b61026d611456565b6102778383610495565b90505b92915050565b600061027783836104f9565b600061029b86868686866105ed565b9695505050505050565b600061027a8261064b565b60006102be85858585610685565b95945050505050565b60008060006102d887878787610828565b9250925092509450945094915050565b600061027a826109be565b60006102778383610a16565b600061025d848484610b2a565b600061027a82610cb7565b610328898989898989898989610d11565b505050505050505050565b600061027a82610fe8565b610346611456565b61035588888888888888611143565b98975050505050505050565b610369611456565b83516020808601518551918601516000938493849361038a93909190610828565b919450925090507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f858209600114610423576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f696e765a206d75737420626520696e7665727365206f66207a0000000000000060448201526064015b60405180910390fd5b60405180604001604052807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f8061045c5761045c611ae6565b87860981526020017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f8785099052979650505050505050565b61049d611456565b6104ca600184846040516020016104b693929190611a00565b6040516020818303038152906040526112cb565b90505b6104d681610fe8565b61027a5780516040805160208101929092526104f291016104b6565b90506104cd565b600080610504611474565b6020808252818101819052604082015260608101859052608081018490527ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f60a0820152610550611492565b60208160c08460057ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa9250826105e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6269674d6f64457870206661696c757265210000000000000000000000000000604482015260640161041a565b5195945050505050565b60006002868686858760405160200161060b9695949392919061198e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101209695505050505050565b600061027a82600261067e7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f6001611a6c565b901c6104f9565b600073ffffffffffffffffffffffffffffffffffffffff8216610704576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f626164207769746e657373000000000000000000000000000000000000000000604482015260640161041a565b60208401516000906001161561071b57601c61071e565b601b5b905060007ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd03641418587600060200201510986517ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141918203925060009190890987516040805160008082526020820180845287905260ff88169282019290925260608101929092526080820183905291925060019060a0016020604051602081039080840390855afa1580156107d5573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015173ffffffffffffffffffffffffffffffffffffffff9081169088161495505050505050949350505050565b60008080600180827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f897ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f038808905060007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f8b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f038a08905060006108d083838585611333565b90985090506108e188828e8861138b565b90985090506108f288828c8761138b565b909850905060006109058d878b8561138b565b909850905061091688828686611333565b909850905061092788828e8961138b565b90985090508181146109aa577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f818a0998507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f82890997507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f81830996506109ae565b8196505b5050505050509450945094915050565b6000807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f80848509840990507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f600782089392505050565b604080518082018252600091610ad69190859060029083908390808284376000920191909152505060408051808201825291508087019060029083908390808284376000920191909152505050608086013560a087013586610a7f6101008a0160e08b0161154c565b604080518082018252906101008c019060029083908390808284376000920191909152505060408051808201825291506101408d0190600290839083908082843760009201919091525050506101808c0135610d11565b600383604001604051602001610aed929190611a52565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101209392505050565b600082610b93576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f7a65726f207363616c6172000000000000000000000000000000000000000000604482015260640161041a565b83516020850151600090610ba990600290611aab565b15610bb557601c610bb8565b601b5b905060007ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd03641418387096040805160008082526020820180845281905260ff86169282019290925260608101869052608081018390529192509060019060a0016020604051602081039080840390855afa158015610c38573d6000803e3d6000fd5b505050602060405103519050600086604051602001610c57919061197c565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052805160209091012073ffffffffffffffffffffffffffffffffffffffff92831692169190911498975050505050505050565b805160208201205b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f8110610d0c57604080516020808201939093528151808203840181529082019091528051910120610cbf565b919050565b610d1a89610fe8565b610d80576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f7075626c6963206b6579206973206e6f74206f6e206375727665000000000000604482015260640161041a565b610d8988610fe8565b610def576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f67616d6d61206973206e6f74206f6e2063757276650000000000000000000000604482015260640161041a565b610df883610fe8565b610e5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f6347616d6d615769746e657373206973206e6f74206f6e206375727665000000604482015260640161041a565b610e6782610fe8565b610ecd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f73486173685769746e657373206973206e6f74206f6e20637572766500000000604482015260640161041a565b610ed9878a8887610685565b610f3f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f6164647228632a706b2b732a6729213d5f755769746e65737300000000000000604482015260640161041a565b6000610f4b8a87610495565b90506000610f5e898b878b868989611143565b90506000610f6f838d8d8a866105ed565b9050808a14610fda576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f696e76616c69642070726f6f6600000000000000000000000000000000000000604482015260640161041a565b505050505050505050505050565b80516000907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f11611075576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f696e76616c696420782d6f7264696e6174650000000000000000000000000000604482015260640161041a565b60208201517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f11611102576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f696e76616c696420792d6f7264696e6174650000000000000000000000000000604482015260640161041a565b60208201517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f90800961113c8360005b60200201516109be565b1492915050565b61114b611456565b825186517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f90819006910614156111de576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f706f696e747320696e2073756d206d7573742062652064697374696e63740000604482015260640161041a565b6111e9878988610b2a565b61124f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4669727374206d756c20636865636b206661696c656400000000000000000000604482015260640161041a565b61125a848685610b2a565b6112c0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f5365636f6e64206d756c20636865636b206661696c6564000000000000000000604482015260640161041a565b610355868484610361565b6112d3611456565b6112dc82610cb7565b81526112f16112ec826000611132565b61064b565b602082018190526002900660011415610d0c576020810180517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f039052919050565b6000807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f8487097ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f8487099097909650945050505050565b600080807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f878509905060007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f87877ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f030990507ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f8183087ffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f86890990999098509650505050505050565b60405180604001604052806002906020820280368337509192915050565b6040518060c001604052806006906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610d0c57600080fd5b600082601f8301126114e557600080fd5b6040516040810181811067ffffffffffffffff8211171561150857611508611b15565b806040525080838560408601111561151f57600080fd5b60005b6002811015611541578135835260209283019290910190600101611522565b509195945050505050565b60006020828403121561155e57600080fd5b610277826114b0565b60006040828403121561157957600080fd5b61027783836114d4565b6000806000806000610120868803121561159c57600080fd5b6115a687876114d4565b94506115b587604088016114d4565b93506115c487608088016114d4565b92506115d260c087016114b0565b91506115e18760e088016114d4565b90509295509295909350565b600080600060a0848603121561160257600080fd5b61160c85856114d4565b925061161b85604086016114d4565b9150608084013590509250925092565b60008060008060008060008060006101a08a8c03121561164a57600080fd5b6116548b8b6114d4565b98506116638b60408c016114d4565b975060808a0135965060a08a0135955060c08a0135945061168660e08b016114b0565b93506116968b6101008c016114d4565b92506116a68b6101408c016114d4565b91506101808a013590509295985092959850929598565b600080606083850312156116d057600080fd5b6116da84846114d4565b946040939093013593505050565b600080600060a084860312156116fd57600080fd5b61170785856114d4565b92506040840135915061171d85606086016114d4565b90509250925092565b60006020828403121561173857600080fd5b813567ffffffffffffffff8082111561175057600080fd5b818401915084601f83011261176457600080fd5b81358181111561177657611776611b15565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156117bc576117bc611b15565b816040528281528760208487010111156117d557600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000808284036101c081121561180a57600080fd5b6101a08082121561181a57600080fd5b9395938601359450505050565b60006020828403121561183957600080fd5b5035919050565b6000806000806000806000610160888a03121561185c57600080fd5b8735965061186d8960208a016114d4565b955061187c8960608a016114d4565b945060a088013593506118928960c08a016114d4565b92506118a2896101008a016114d4565b9150610140880135905092959891949750929550565b60008060008060a085870312156118ce57600080fd5b843593506118df86602087016114d4565b9250606085013591506118f4608086016114b0565b905092959194509250565b6000806040838503121561191257600080fd5b50508035926020909101359150565b6000806000806080858703121561193757600080fd5b5050823594602084013594506040840135936060013592509050565b8060005b6002811015611976578151845260209384019390910190600101611957565b50505050565b6119868183611953565b604001919050565b86815261199e6020820187611953565b6119ab6060820186611953565b6119b860a0820185611953565b6119c560e0820184611953565b60609190911b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166101208201526101340195945050505050565b838152611a106020820184611953565b606081019190915260800192915050565b60408101818360005b6002811015611a49578151835260209283019290910190600101611a2a565b50505092915050565b828152606081016040836020840137600081529392505050565b60008219821115611aa6577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b600082611ae1577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a", } var VRFV08TestHelperABI = VRFV08TestHelperMetaData.ABI diff --git a/core/gethwrappers/generated/vrf_coordinator_test_v2/vrf_coordinator_test_v2.go b/core/gethwrappers/generated/vrf_coordinator_test_v2/vrf_coordinator_test_v2.go index cb4e2cea016..4d9c044bff3 100644 --- a/core/gethwrappers/generated/vrf_coordinator_test_v2/vrf_coordinator_test_v2.go +++ b/core/gethwrappers/generated/vrf_coordinator_test_v2/vrf_coordinator_test_v2.go @@ -64,7 +64,7 @@ type VRFProof struct { var VRFCoordinatorTestV2MetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"blockhashStore\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"linkEthFeed\",\"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\":\"uint32\",\"name\":\"have\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"want\",\"type\":\"uint32\"}],\"name\":\"GasLimitTooBig\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IncorrectCommitment\",\"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\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"InvalidConsumer\",\"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\":[{\"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\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier1\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier2\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier3\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier4\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier5\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"reqsForTier2\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"reqsForTier3\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"reqsForTier4\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"reqsForTier5\",\"type\":\"uint24\"}],\"indexed\":false,\"internalType\":\"structVRFCoordinatorTestV2.FeeConfig\",\"name\":\"feeConfig\",\"type\":\"tuple\"}],\"name\":\"ConfigSet\",\"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\":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\":true,\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"}],\"name\":\"ProvingKeyDeregistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"}],\"name\":\"ProvingKeyRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outputSeed\",\"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\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"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\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RandomWordsRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"SubscriptionCanceled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"SubscriptionConsumerAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"SubscriptionConsumerRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"SubscriptionCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"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\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"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\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"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_ETH_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\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"}],\"name\":\"acceptSubscriptionOwnerTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"addConsumer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"cancelSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"createSubscription\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"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\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"internalType\":\"structVRFCoordinatorTestV2.RequestCommitment\",\"name\":\"rc\",\"type\":\"tuple\"}],\"name\":\"fulfillRandomWords\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"name\":\"getCommitment\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"minimumRequestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"stalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasAfterPaymentCalculation\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurrentSubId\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFallbackWeiPerUnitLink\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFeeConfig\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier1\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier2\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier3\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier4\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier5\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"reqsForTier2\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"reqsForTier3\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"reqsForTier4\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"reqsForTier5\",\"type\":\"uint24\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"reqCount\",\"type\":\"uint64\"}],\"name\":\"getFeeTier\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"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\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"}],\"name\":\"getSubscription\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"balance\",\"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\":[],\"name\":\"getTotalBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"onTokenTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"oracleWithdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"}],\"name\":\"ownerCancelSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"}],\"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\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"internalType\":\"uint256[2]\",\"name\":\"publicProvingKey\",\"type\":\"uint256[2]\"}],\"name\":\"registerProvingKey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"removeConsumer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"}],\"name\":\"requestRandomWords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"requestSubscriptionOwnerTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier1\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier2\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier3\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier4\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier5\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"reqsForTier2\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"reqsForTier3\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"reqsForTier4\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"reqsForTier5\",\"type\":\"uint24\"}],\"internalType\":\"structVRFCoordinatorTestV2.FeeConfig\",\"name\":\"feeConfig\",\"type\":\"tuple\"}],\"name\":\"setConfig\",\"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\"}]", - Bin: "0x60e06040523480156200001157600080fd5b5060405162005755380380620057558339810160408190526200003491620001b1565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be81620000e8565b5050506001600160601b0319606093841b811660805290831b811660a052911b1660c052620001fb565b6001600160a01b038116331415620001435760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b0381168114620001ac57600080fd5b919050565b600080600060608486031215620001c757600080fd5b620001d28462000194565b9250620001e26020850162000194565b9150620001f26040850162000194565b90509250925092565b60805160601c60a05160601c60c05160601c6154f0620002656000396000818161051901526138180152600081816106030152613c0401526000818161036d015281816114df0152818161233c01528181612d7301528181612eaf01526134d401526154f06000f3fe608060405234801561001057600080fd5b506004361061025b5760003560e01c80636f64f03f11610145578063ad178361116100bd578063d2f9f9a71161008c578063e72f6e3011610071578063e72f6e30146106e0578063e82ad7d4146106f3578063f2fde38b1461071657600080fd5b8063d2f9f9a7146106ba578063d7ae1d30146106cd57600080fd5b8063ad178361146105fe578063af198b9714610625578063c3f909d414610655578063caf70c4a146106a757600080fd5b80638da5cb5b11610114578063a21a23e4116100f9578063a21a23e4146105c0578063a47c7696146105c8578063a4c0ed36146105eb57600080fd5b80638da5cb5b1461059c5780639f87fad7146105ad57600080fd5b80636f64f03f1461055b5780637341c10c1461056e57806379ba509714610581578063823597401461058957600080fd5b8063356dac71116101d85780635fbbc0d2116101a757806366316d8d1161018c57806366316d8d14610501578063689c45171461051457806369bcdb7d1461053b57600080fd5b80635fbbc0d2146103f357806364d51a2a146104f957600080fd5b8063356dac71146103a757806340d6bb82146103af5780634cb48a54146103cd5780635d3b1d30146103e057600080fd5b806308821d581161022f57806315c48b841161021457806315c48b841461030e578063181f5a77146103295780631b6b6d231461036857600080fd5b806308821d58146102cf57806312b58349146102e257600080fd5b80620122911461026057806302bcc5b61461028057806304c357cb1461029557806306bfa637146102a8575b600080fd5b610268610729565b6040516102779392919061503a565b60405180910390f35b61029361028e366004614e86565b6107a5565b005b6102936102a3366004614ea1565b610837565b60055467ffffffffffffffff165b60405167ffffffffffffffff9091168152602001610277565b6102936102dd366004614b97565b6109eb565b6005546801000000000000000090046bffffffffffffffffffffffff165b604051908152602001610277565b61031660c881565b60405161ffff9091168152602001610277565b604080518082018252601681527f565246436f6f7264696e61746f72563220312e302e3000000000000000000000602082015290516102779190614fe5565b61038f7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610277565b600a54610300565b6103b86101f481565b60405163ffffffff9091168152602001610277565b6102936103db366004614d30565b610bb0565b6103006103ee366004614c0a565b610fa7565b600c546040805163ffffffff80841682526401000000008404811660208301526801000000000000000084048116928201929092526c010000000000000000000000008304821660608201527001000000000000000000000000000000008304909116608082015262ffffff740100000000000000000000000000000000000000008304811660a0830152770100000000000000000000000000000000000000000000008304811660c08301527a0100000000000000000000000000000000000000000000000000008304811660e08301527d01000000000000000000000000000000000000000000000000000000000090920490911661010082015261012001610277565b610316606481565b61029361050f366004614b4f565b61138a565b61038f7f000000000000000000000000000000000000000000000000000000000000000081565b610300610549366004614e6d565b60009081526009602052604090205490565b610293610569366004614a94565b6115d9565b61029361057c366004614ea1565b611709565b610293611956565b610293610597366004614e86565b611a1f565b6000546001600160a01b031661038f565b6102936105bb366004614ea1565b611be5565b6102b6611fe4565b6105db6105d6366004614e86565b6121c7565b60405161027794939291906151d8565b6102936105f9366004614ac8565b6122ea565b61038f7f000000000000000000000000000000000000000000000000000000000000000081565b610638610633366004614c68565b612541565b6040516bffffffffffffffffffffffff9091168152602001610277565b600b546040805161ffff8316815263ffffffff6201000084048116602083015267010000000000000084048116928201929092526b010000000000000000000000909204166060820152608001610277565b6103006106b5366004614bb3565b6129db565b6103b86106c8366004614e86565b612a0b565b6102936106db366004614ea1565b612c00565b6102936106ee366004614a79565b612d3a565b610706610701366004614e86565b612f77565b6040519015158152602001610277565b610293610724366004614a79565b61319a565b600b546007805460408051602080840282018101909252828152600094859460609461ffff8316946201000090930463ffffffff1693919283919083018282801561079357602002820191906000526020600020905b81548152602001906001019080831161077f575b50505050509050925092509250909192565b6107ad6131ab565b67ffffffffffffffff81166000908152600360205260409020546001600160a01b0316610806576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff81166000908152600360205260409020546108349082906001600160a01b0316613207565b50565b67ffffffffffffffff821660009081526003602052604090205482906001600160a01b031680610893576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b038216146108e5576040517fd8a3fb520000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024015b60405180910390fd5b600b546601000000000000900460ff161561092c576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff84166000908152600360205260409020600101546001600160a01b038481169116146109e55767ffffffffffffffff841660008181526003602090815260409182902060010180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0388169081179091558251338152918201527f69436ea6df009049404f564eff6622cd00522b0bd6a89efd9e52a355c4a879be91015b60405180910390a25b50505050565b6109f36131ab565b604080518082018252600091610a229190849060029083908390808284376000920191909152506129db915050565b6000818152600660205260409020549091506001600160a01b031680610a77576040517f77f5b84c000000000000000000000000000000000000000000000000000000008152600481018390526024016108dc565b600082815260066020526040812080547fffffffffffffffffffffffff00000000000000000000000000000000000000001690555b600754811015610b67578260078281548110610aca57610aca615485565b90600052602060002001541415610b55576007805460009190610aef9060019061533f565b81548110610aff57610aff615485565b906000526020600020015490508060078381548110610b2057610b20615485565b6000918252602090912001556007805480610b3d57610b3d615456565b60019003818190600052602060002001600090559055505b80610b5f81615383565b915050610aac565b50806001600160a01b03167f72be339577868f868798bac2c93e52d6f034fef4689a9848996c14ebb7416c0d83604051610ba391815260200190565b60405180910390a2505050565b610bb86131ab565b60c861ffff87161115610c0b576040517fa738697600000000000000000000000000000000000000000000000000000000815261ffff871660048201819052602482015260c860448201526064016108dc565b60008213610c48576040517f43d4cf66000000000000000000000000000000000000000000000000000000008152600481018390526024016108dc565b6040805160a0808201835261ffff891680835263ffffffff89811660208086018290526000868801528a831660608088018290528b85166080988901819052600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000001690971762010000909502949094177fffffffffffffffffffffffffffffffffff000000000000000000ffffffffffff166701000000000000009092027fffffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffff16919091176b010000000000000000000000909302929092179093558651600c80549489015189890151938a0151978a0151968a015160c08b015160e08c01516101008d01519588167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009099169890981764010000000093881693909302929092177fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff1668010000000000000000958716959095027fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff16949094176c0100000000000000000000000098861698909802979097177fffffffffffffffffff00000000000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000096909416959095027fffffffffffffffffff000000ffffffffffffffffffffffffffffffffffffffff16929092177401000000000000000000000000000000000000000062ffffff92831602177fffffff000000000000ffffffffffffffffffffffffffffffffffffffffffffff1677010000000000000000000000000000000000000000000000958216959095027fffffff000000ffffffffffffffffffffffffffffffffffffffffffffffffffff16949094177a01000000000000000000000000000000000000000000000000000092851692909202919091177cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167d0100000000000000000000000000000000000000000000000000000000009390911692909202919091178155600a84905590517fc21e3bd2e0b339d2848f0dd956947a88966c242c0c0c582a33137a5c1ceb5cb291610f97918991899189918991899190615099565b60405180910390a1505050505050565b600b546000906601000000000000900460ff1615610ff1576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff85166000908152600360205260409020546001600160a01b031661104a576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260026020908152604080832067ffffffffffffffff808a16855292529091205416806110ba576040517ff0019fe600000000000000000000000000000000000000000000000000000000815267ffffffffffffffff871660048201523360248201526044016108dc565b600b5461ffff90811690861610806110d6575060c861ffff8616115b1561112657600b546040517fa738697600000000000000000000000000000000000000000000000000000000815261ffff8088166004830152909116602482015260c860448201526064016108dc565b600b5463ffffffff620100009091048116908516111561118d57600b546040517ff5d7e01e00000000000000000000000000000000000000000000000000000000815263ffffffff80871660048301526201000090920490911660248201526044016108dc565b6101f463ffffffff841611156111df576040517f47386bec00000000000000000000000000000000000000000000000000000000815263ffffffff841660048201526101f460248201526044016108dc565b60006111ec82600161529b565b6040805160208082018c9052338284015267ffffffffffffffff808c16606084015284166080808401919091528351808403909101815260a08301845280519082012060c083018d905260e080840182905284518085039091018152610100909301909352815191012091925060009182916040805160208101849052439181019190915267ffffffffffffffff8c16606082015263ffffffff808b166080830152891660a08201523360c0820152919350915060e00160408051808303601f19018152828252805160209182012060008681526009835283902055848352820183905261ffff8a169082015263ffffffff808916606083015287166080820152339067ffffffffffffffff8b16908c907f63373d1c4696214b898952999c9aaec57dac1ee2723cec59bea6888f489a97729060a00160405180910390a45033600090815260026020908152604080832067ffffffffffffffff808d16855292529091208054919093167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009091161790915591505095945050505050565b600b546601000000000000900460ff16156113d1576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600860205260409020546bffffffffffffffffffffffff8083169116101561142b576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260086020526040812080548392906114589084906bffffffffffffffffffffffff16615356565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555080600560088282829054906101000a90046bffffffffffffffffffffffff166114af9190615356565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb83836040518363ffffffff1660e01b815260040161154d9291906001600160a01b039290921682526bffffffffffffffffffffffff16602082015260400190565b602060405180830381600087803b15801561156757600080fd5b505af115801561157b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061159f9190614bcf565b6115d5576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b6115e16131ab565b6040805180820182526000916116109190849060029083908390808284376000920191909152506129db915050565b6000818152600660205260409020549091506001600160a01b031615611665576040517f4a0b8fa7000000000000000000000000000000000000000000000000000000008152600481018290526024016108dc565b600081815260066020908152604080832080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0388169081179091556007805460018101825594527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688909301849055518381527fe729ae16526293f74ade739043022254f1489f616295a25bf72dfb4511ed73b89101610ba3565b67ffffffffffffffff821660009081526003602052604090205482906001600160a01b031680611765576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b038216146117b2576040517fd8a3fb520000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016108dc565b600b546601000000000000900460ff16156117f9576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff841660009081526003602052604090206002015460641415611850576040517f05a48e0f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038316600090815260026020908152604080832067ffffffffffffffff8089168552925290912054161561188a576109e5565b6001600160a01b038316600081815260026020818152604080842067ffffffffffffffff8a1680865290835281852080547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000166001908117909155600384528286209094018054948501815585529382902090920180547fffffffffffffffffffffffff00000000000000000000000000000000000000001685179055905192835290917f43dc749a04ac8fb825cbd514f7c0e13f13bc6f2ee66043b76629d51776cff8e091016109dc565b6001546001600160a01b031633146119b05760405162461bcd60e51b815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016108dc565b60008054337fffffffffffffffffffffffff0000000000000000000000000000000000000000808316821784556001805490911690556040516001600160a01b0390921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b600b546601000000000000900460ff1615611a66576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff81166000908152600360205260409020546001600160a01b0316611abf576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff81166000908152600360205260409020600101546001600160a01b03163314611b475767ffffffffffffffff8116600090815260036020526040908190206001015490517fd084e9750000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016108dc565b67ffffffffffffffff81166000818152600360209081526040918290208054337fffffffffffffffffffffffff0000000000000000000000000000000000000000808316821784556001909301805490931690925583516001600160a01b03909116808252928101919091529092917f6f1dc65165ffffedfd8e507b4a0f1fcfdada045ed11f6c26ba27cedfe87802f0910160405180910390a25050565b67ffffffffffffffff821660009081526003602052604090205482906001600160a01b031680611c41576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b03821614611c8e576040517fd8a3fb520000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016108dc565b600b546601000000000000900460ff1615611cd5576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038316600090815260026020908152604080832067ffffffffffffffff808916855292529091205416611d56576040517ff0019fe600000000000000000000000000000000000000000000000000000000815267ffffffffffffffff851660048201526001600160a01b03841660248201526044016108dc565b67ffffffffffffffff8416600090815260036020908152604080832060020180548251818502810185019093528083529192909190830182828015611dc457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611da6575b50505050509050600060018251611ddb919061533f565b905060005b8251811015611f5357856001600160a01b0316838281518110611e0557611e05615485565b60200260200101516001600160a01b03161415611f41576000838381518110611e3057611e30615485565b6020026020010151905080600360008a67ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206002018381548110611e7657611e76615485565b600091825260208083209190910180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03949094169390931790925567ffffffffffffffff8a168152600390915260409020600201805480611ee357611ee3615456565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905501905550611f53565b80611f4b81615383565b915050611de0565b506001600160a01b038516600081815260026020908152604080832067ffffffffffffffff8b168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001690555192835290917f182bff9831466789164ca77075fffd84916d35a8180ba73c27e45634549b445b91015b60405180910390a2505050505050565b600b546000906601000000000000900460ff161561202e576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005805467ffffffffffffffff16906000612048836153bc565b82546101009290920a67ffffffffffffffff81810219909316918316021790915560055416905060008060405190808252806020026020018201604052801561209b578160200160208202803683370190505b506040805180820182526000808252602080830182815267ffffffffffffffff888116808552600484528685209551865493516bffffffffffffffffffffffff9091167fffffffffffffffffffffffff0000000000000000000000000000000000000000948516176c01000000000000000000000000919093160291909117909455845160608101865233815280830184815281870188815295855260038452959093208351815483166001600160a01b039182161782559551600182018054909316961695909517905591518051949550909361217f92600285019201906147d3565b505060405133815267ffffffffffffffff841691507f464722b4166576d3dcbba877b999bc35cf911f4eaf434b7eba68fa113951d0bf9060200160405180910390a250905090565b67ffffffffffffffff8116600090815260036020526040812054819081906060906001600160a01b0316612227576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff80861660009081526004602090815260408083205460038352928190208054600290910180548351818602810186019094528084526bffffffffffffffffffffffff8616966c01000000000000000000000000909604909516946001600160a01b039092169390929183918301828280156122d457602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116122b6575b5050505050905093509350935093509193509193565b600b546601000000000000900460ff1615612331576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614612393576040517f44b0e3c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602081146123cd576040517f8129bbcd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006123db82840184614e86565b67ffffffffffffffff81166000908152600360205260409020549091506001600160a01b0316612437576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8116600090815260046020526040812080546bffffffffffffffffffffffff169186919061246e83856152c7565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555084600560088282829054906101000a90046bffffffffffffffffffffffff166124c591906152c7565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508167ffffffffffffffff167fd39ec07f4e209f627a4c427971473820dc129761ba28de8906bd56f57101d4f882878461252c9190615283565b60408051928352602083019190915201611fd4565b600b546000906601000000000000900460ff161561258b576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005a9050600080600061259f878761362c565b9250925092506000866060015163ffffffff1667ffffffffffffffff8111156125ca576125ca6154b4565b6040519080825280602002602001820160405280156125f3578160200160208202803683370190505b50905060005b876060015163ffffffff168110156126675760408051602081018590529081018290526060016040516020818303038152906040528051906020012060001c82828151811061264a5761264a615485565b60209081029190910101528061265f81615383565b9150506125f9565b506000838152600960205260408082208290555181907f1fe543e300000000000000000000000000000000000000000000000000000000906126af908790869060240161518a565b60408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090941693909317909252600b80547fffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffff166601000000000000179055908a015160808b015191925060009161275f9163ffffffff169084613936565b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffff1690556020808c01805167ffffffffffffffff9081166000908152600490935260408084205492518216845290922080549394506c01000000000000000000000000918290048316936001939192600c926127e392869290041661529b565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550600061283a8a600b600001600b9054906101000a900463ffffffff1663ffffffff1661283485612a0b565b3a613984565b6020808e015167ffffffffffffffff166000908152600490915260409020549091506bffffffffffffffffffffffff808316911610156128a6576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6020808d015167ffffffffffffffff16600090815260049091526040812080548392906128e29084906bffffffffffffffffffffffff16615356565b82546101009290920a6bffffffffffffffffffffffff81810219909316918316021790915560008b8152600660209081526040808320546001600160a01b03168352600890915281208054859450909261293e918591166152c7565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550877f7dffc5ae5ee4e2e4df1651cf6ad329a73cebdb728f37ea0187b9b17e036756e48883866040516129c1939291909283526bffffffffffffffffffffffff9190911660208301521515604082015260600190565b60405180910390a299505050505050505050505b92915050565b6000816040516020016129ee9190614fd7565b604051602081830303815290604052805190602001209050919050565b6040805161012081018252600c5463ffffffff80821683526401000000008204811660208401526801000000000000000082048116938301939093526c010000000000000000000000008104831660608301527001000000000000000000000000000000008104909216608082015262ffffff740100000000000000000000000000000000000000008304811660a08301819052770100000000000000000000000000000000000000000000008404821660c08401527a0100000000000000000000000000000000000000000000000000008404821660e08401527d0100000000000000000000000000000000000000000000000000000000009093041661010082015260009167ffffffffffffffff841611612b29575192915050565b8267ffffffffffffffff168160a0015162ffffff16108015612b5e57508060c0015162ffffff168367ffffffffffffffff1611155b15612b6d576020015192915050565b8267ffffffffffffffff168160c0015162ffffff16108015612ba257508060e0015162ffffff168367ffffffffffffffff1611155b15612bb1576040015192915050565b8267ffffffffffffffff168160e0015162ffffff16108015612be7575080610100015162ffffff168367ffffffffffffffff1611155b15612bf6576060015192915050565b6080015192915050565b67ffffffffffffffff821660009081526003602052604090205482906001600160a01b031680612c5c576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b03821614612ca9576040517fd8a3fb520000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016108dc565b600b546601000000000000900460ff1615612cf0576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612cf984612f77565b15612d30576040517fb42f66e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109e58484613207565b612d426131ab565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b158015612dbd57600080fd5b505afa158015612dd1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612df59190614bf1565b6005549091506801000000000000000090046bffffffffffffffffffffffff1681811115612e59576040517fa99da30200000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016108dc565b81811015612f72576000612e6d828461533f565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b038681166004830152602482018390529192507f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb90604401602060405180830381600087803b158015612ef557600080fd5b505af1158015612f09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f2d9190614bcf565b50604080516001600160a01b0386168152602081018390527f59bfc682b673f8cbf945f1e454df9334834abf7dfe7f92237ca29ecb9b436600910160405180910390a1505b505050565b67ffffffffffffffff81166000908152600360209081526040808320815160608101835281546001600160a01b039081168252600183015416818501526002820180548451818702810187018652818152879693958601939092919083018282801561300c57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612fee575b505050505081525050905060005b8160400151518110156131905760005b60075481101561317d5760006131466007838154811061304c5761304c615485565b90600052602060002001548560400151858151811061306d5761306d615485565b602002602001015188600260008960400151898151811061309057613090615485565b6020908102919091018101516001600160a01b03168252818101929092526040908101600090812067ffffffffffffffff808f16835293522054166040805160208082018790526001600160a01b03959095168183015267ffffffffffffffff9384166060820152919092166080808301919091528251808303909101815260a08201835280519084012060c082019490945260e080820185905282518083039091018152610100909101909152805191012091565b506000818152600960205260409020549091501561316a5750600195945050505050565b508061317581615383565b91505061302a565b508061318881615383565b91505061301a565b5060009392505050565b6131a26131ab565b61083481613a8c565b6000546001600160a01b031633146132055760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016108dc565b565b600b546601000000000000900460ff161561324e576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff82166000908152600360209081526040808320815160608101835281546001600160a01b039081168252600183015416818501526002820180548451818702810187018652818152929593948601938301828280156132df57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116132c1575b5050509190925250505067ffffffffffffffff80851660009081526004602090815260408083208151808301909252546bffffffffffffffffffffffff81168083526c01000000000000000000000000909104909416918101919091529293505b8360400151518110156133d957600260008560400151838151811061336757613367615485565b6020908102919091018101516001600160a01b03168252818101929092526040908101600090812067ffffffffffffffff8a168252909252902080547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000169055806133d181615383565b915050613340565b5067ffffffffffffffff8516600090815260036020526040812080547fffffffffffffffffffffffff000000000000000000000000000000000000000090811682556001820180549091169055906134346002830182614850565b505067ffffffffffffffff8516600090815260046020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055600580548291906008906134a49084906801000000000000000090046bffffffffffffffffffffffff16615356565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb85836bffffffffffffffffffffffff166040518363ffffffff1660e01b81526004016135429291906001600160a01b03929092168252602082015260400190565b602060405180830381600087803b15801561355c57600080fd5b505af1158015613570573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135949190614bcf565b6135ca576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080516001600160a01b03861681526bffffffffffffffffffffffff8316602082015267ffffffffffffffff8716917fe8ed5b475a5b5987aa9165e8731bb78043f39eee32ec5a1169a89e27fcd49815910160405180910390a25050505050565b600080600061363e85600001516129db565b6000818152600660205260409020549093506001600160a01b031680613693576040517f77f5b84c000000000000000000000000000000000000000000000000000000008152600481018590526024016108dc565b60808601516040516136b2918691602001918252602082015260400190565b60408051601f1981840301815291815281516020928301206000818152600990935291205490935080613711576040517f3688124a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b85516020808801516040808a015160608b015160808c0151925161377d968b96909594910195865267ffffffffffffffff948516602087015292909316604085015263ffffffff90811660608501529190911660808301526001600160a01b031660a082015260c00190565b6040516020818303038152906040528051906020012081146137cb576040517fd529142c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b855167ffffffffffffffff1640806138e25786516040517fe9413d3800000000000000000000000000000000000000000000000000000000815267ffffffffffffffff90911660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e9413d389060240160206040518083038186803b15801561386257600080fd5b505afa158015613876573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061389a9190614bf1565b9050806138e25786516040517f175dadad00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff90911660048201526024016108dc565b6000886080015182604051602001613904929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c90506139298982613b4e565b9450505050509250925092565b60005a61138881101561394857600080fd5b61138881039050846040820482031161396057600080fd5b50823b61396c57600080fd5b60008083516020850160008789f190505b9392505050565b60008061398f613bb9565b9050600081136139ce576040517f43d4cf66000000000000000000000000000000000000000000000000000000008152600481018290526024016108dc565b6000815a6139dc8989615283565b6139e6919061533f565b6139f886670de0b6b3a7640000615302565b613a029190615302565b613a0c91906152ee565b90506000613a2563ffffffff871664e8d4a51000615302565b9050613a3d816b033b2e3c9fd0803ce800000061533f565b821115613a76576040517fe80fa38100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613a808183615283565b98975050505050505050565b6001600160a01b038116331415613ae55760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016108dc565b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000613b828360000151846020015185604001518660600151868860a001518960c001518a60e001518b6101000151613cc0565b60038360200151604051602001613b9a929190615176565b60408051601f1981840301815291905280516020909101209392505050565b600b54604080517ffeaf968c0000000000000000000000000000000000000000000000000000000081529051600092670100000000000000900463ffffffff169182151591849182917f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169163feaf968c9160048083019260a0929190829003018186803b158015613c5257600080fd5b505afa158015613c66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c8a9190614ecb565b509450909250849150508015613cae5750613ca5824261533f565b8463ffffffff16105b15613cb85750600a545b949350505050565b613cc989613efb565b613d155760405162461bcd60e51b815260206004820152601a60248201527f7075626c6963206b6579206973206e6f74206f6e20637572766500000000000060448201526064016108dc565b613d1e88613efb565b613d6a5760405162461bcd60e51b815260206004820152601560248201527f67616d6d61206973206e6f74206f6e206375727665000000000000000000000060448201526064016108dc565b613d7383613efb565b613dbf5760405162461bcd60e51b815260206004820152601d60248201527f6347616d6d615769746e657373206973206e6f74206f6e20637572766500000060448201526064016108dc565b613dc882613efb565b613e145760405162461bcd60e51b815260206004820152601c60248201527f73486173685769746e657373206973206e6f74206f6e2063757276650000000060448201526064016108dc565b613e20878a8887613fd4565b613e6c5760405162461bcd60e51b815260206004820152601960248201527f6164647228632a706b2b732a6729213d5f755769746e6573730000000000000060448201526064016108dc565b6000613e788a87614125565b90506000613e8b898b878b868989614189565b90506000613e9c838d8d8a866142a9565b9050808a14613eed5760405162461bcd60e51b815260206004820152600d60248201527f696e76616c69642070726f6f660000000000000000000000000000000000000060448201526064016108dc565b505050505050505050505050565b80516000906401000003d01911613f545760405162461bcd60e51b815260206004820152601260248201527f696e76616c696420782d6f7264696e617465000000000000000000000000000060448201526064016108dc565b60208201516401000003d01911613fad5760405162461bcd60e51b815260206004820152601260248201527f696e76616c696420792d6f7264696e617465000000000000000000000000000060448201526064016108dc565b60208201516401000003d019908009613fcd8360005b60200201516142e9565b1492915050565b60006001600160a01b03821661402c5760405162461bcd60e51b815260206004820152600b60248201527f626164207769746e65737300000000000000000000000000000000000000000060448201526064016108dc565b60208401516000906001161561404357601c614046565b601b5b905060007ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd03641418587600060200201510986517ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141918203925060009190890987516040805160008082526020820180845287905260ff88169282019290925260608101929092526080820183905291925060019060a0016020604051602081039080840390855afa1580156140fd573d6000803e3d6000fd5b5050604051601f1901516001600160a01b039081169088161495505050505050949350505050565b61412d61486e565b61415a6001848460405160200161414693929190614fb6565b60405160208183030381529060405261430d565b90505b61416681613efb565b6129d55780516040805160208101929092526141829101614146565b905061415d565b61419161486e565b825186516401000003d01990819006910614156141f05760405162461bcd60e51b815260206004820152601e60248201527f706f696e747320696e2073756d206d7573742062652064697374696e6374000060448201526064016108dc565b6141fb87898861435c565b6142475760405162461bcd60e51b815260206004820152601660248201527f4669727374206d756c20636865636b206661696c65640000000000000000000060448201526064016108dc565b61425284868561435c565b61429e5760405162461bcd60e51b815260206004820152601760248201527f5365636f6e64206d756c20636865636b206661696c656400000000000000000060448201526064016108dc565b613a808684846144a4565b6000600286868685876040516020016142c796959493929190614f44565b60408051601f1981840301815291905280516020909101209695505050505050565b6000806401000003d01980848509840990506401000003d019600782089392505050565b61431561486e565b61431e8261456b565b815261433361432e826000613fc3565b6145a6565b602082018190526002900660011415614357576020810180516401000003d0190390525b919050565b6000826143ab5760405162461bcd60e51b815260206004820152600b60248201527f7a65726f207363616c617200000000000000000000000000000000000000000060448201526064016108dc565b835160208501516000906143c1906002906153e4565b156143cd57601c6143d0565b601b5b905060007ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd03641418387096040805160008082526020820180845281905260ff86169282019290925260608101869052608081018390529192509060019060a0016020604051602081039080840390855afa158015614450573d6000803e3d6000fd5b50505060206040510351905060008660405160200161446f9190614f32565b60408051601f1981840301815291905280516020909101206001600160a01b0392831692169190911498975050505050505050565b6144ac61486e565b8351602080860151855191860151600093849384936144cd939091906145c6565b919450925090506401000003d01985820960011461452d5760405162461bcd60e51b815260206004820152601960248201527f696e765a206d75737420626520696e7665727365206f66207a0000000000000060448201526064016108dc565b60405180604001604052806401000003d0198061454c5761454c615427565b87860981526020016401000003d0198785099052979650505050505050565b805160208201205b6401000003d019811061435757604080516020808201939093528151808203840181529082019091528051910120614573565b60006129d58260026145bf6401000003d0196001615283565b901c6146a6565b60008080600180826401000003d019896401000003d019038808905060006401000003d0198b6401000003d019038a089050600061460683838585614766565b909850905061461788828e8861478a565b909850905061462888828c8761478a565b9098509050600061463b8d878b8561478a565b909850905061464c88828686614766565b909850905061465d88828e8961478a565b9098509050818114614692576401000003d019818a0998506401000003d01982890997506401000003d0198183099650614696565b8196505b5050505050509450945094915050565b6000806146b161488c565b6020808252818101819052604082015260608101859052608081018490526401000003d01960a08201526146e36148aa565b60208160c08460057ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa92508261475c5760405162461bcd60e51b815260206004820152601260248201527f6269674d6f64457870206661696c75726521000000000000000000000000000060448201526064016108dc565b5195945050505050565b6000806401000003d0198487096401000003d0198487099097909650945050505050565b600080806401000003d019878509905060006401000003d01987876401000003d019030990506401000003d0198183086401000003d01986890990999098509650505050505050565b828054828255906000526020600020908101928215614840579160200282015b8281111561484057825182547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b039091161782556020909201916001909101906147f3565b5061484c9291506148c8565b5090565b508054600082559060005260206000209081019061083491906148c8565b60405180604001604052806002906020820280368337509192915050565b6040518060c001604052806006906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b5b8082111561484c57600081556001016148c9565b80356001600160a01b038116811461435757600080fd5b80604081018310156129d557600080fd5b600082601f83011261491657600080fd5b6040516040810181811067ffffffffffffffff82111715614939576149396154b4565b806040525080838560408601111561495057600080fd5b60005b6002811015614972578135835260209283019290910190600101614953565b509195945050505050565b600060a0828403121561498f57600080fd5b60405160a0810181811067ffffffffffffffff821117156149b2576149b26154b4565b6040529050806149c183614a47565b81526149cf60208401614a47565b60208201526149e060408401614a33565b60408201526149f160608401614a33565b6060820152614a02608084016148dd565b60808201525092915050565b803561ffff8116811461435757600080fd5b803562ffffff8116811461435757600080fd5b803563ffffffff8116811461435757600080fd5b803567ffffffffffffffff8116811461435757600080fd5b805169ffffffffffffffffffff8116811461435757600080fd5b600060208284031215614a8b57600080fd5b61397d826148dd565b60008060608385031215614aa757600080fd5b614ab0836148dd565b9150614abf84602085016148f4565b90509250929050565b60008060008060608587031215614ade57600080fd5b614ae7856148dd565b935060208501359250604085013567ffffffffffffffff80821115614b0b57600080fd5b818701915087601f830112614b1f57600080fd5b813581811115614b2e57600080fd5b886020828501011115614b4057600080fd5b95989497505060200194505050565b60008060408385031215614b6257600080fd5b614b6b836148dd565b915060208301356bffffffffffffffffffffffff81168114614b8c57600080fd5b809150509250929050565b600060408284031215614ba957600080fd5b61397d83836148f4565b600060408284031215614bc557600080fd5b61397d8383614905565b600060208284031215614be157600080fd5b8151801515811461397d57600080fd5b600060208284031215614c0357600080fd5b5051919050565b600080600080600060a08688031215614c2257600080fd5b85359450614c3260208701614a47565b9350614c4060408701614a0e565b9250614c4e60608701614a33565b9150614c5c60808701614a33565b90509295509295909350565b600080828403610240811215614c7d57600080fd5b6101a080821215614c8d57600080fd5b614c95615259565b9150614ca18686614905565b8252614cb08660408701614905565b60208301526080850135604083015260a0850135606083015260c08501356080830152614cdf60e086016148dd565b60a0830152610100614cf387828801614905565b60c0840152614d06876101408801614905565b60e08401526101808601358184015250819350614d258682870161497d565b925050509250929050565b6000806000806000808688036101c0811215614d4b57600080fd5b614d5488614a0e565b9650614d6260208901614a33565b9550614d7060408901614a33565b9450614d7e60608901614a33565b935060808801359250610120807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6083011215614db957600080fd5b614dc1615259565b9150614dcf60a08a01614a33565b8252614ddd60c08a01614a33565b6020830152614dee60e08a01614a33565b6040830152610100614e01818b01614a33565b6060840152614e11828b01614a33565b6080840152614e236101408b01614a20565b60a0840152614e356101608b01614a20565b60c0840152614e476101808b01614a20565b60e0840152614e596101a08b01614a20565b818401525050809150509295509295509295565b600060208284031215614e7f57600080fd5b5035919050565b600060208284031215614e9857600080fd5b61397d82614a47565b60008060408385031215614eb457600080fd5b614ebd83614a47565b9150614abf602084016148dd565b600080600080600060a08688031215614ee357600080fd5b614eec86614a5f565b9450602086015193506040860151925060608601519150614c5c60808701614a5f565b8060005b60028110156109e5578151845260209384019390910190600101614f13565b614f3c8183614f0f565b604001919050565b868152614f546020820187614f0f565b614f616060820186614f0f565b614f6e60a0820185614f0f565b614f7b60e0820184614f0f565b60609190911b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166101208201526101340195945050505050565b838152614fc66020820184614f0f565b606081019190915260800192915050565b604081016129d58284614f0f565b600060208083528351808285015260005b8181101561501257858101830151858201604001528201614ff6565b81811115615024576000604083870101525b50601f01601f1916929092016040019392505050565b60006060820161ffff86168352602063ffffffff86168185015260606040850152818551808452608086019150828701935060005b8181101561508b5784518352938301939183019160010161506f565b509098975050505050505050565b60006101c08201905061ffff8816825263ffffffff808816602084015280871660408401528086166060840152846080840152835481811660a08501526150ed60c08501838360201c1663ffffffff169052565b61510460e08501838360401c1663ffffffff169052565b61511c6101008501838360601c1663ffffffff169052565b6151346101208501838360801c1663ffffffff169052565b62ffffff60a082901c811661014086015260b882901c811661016086015260d082901c1661018085015260e81c6101a090930192909252979650505050505050565b8281526060810161397d6020830184614f0f565b6000604082018483526020604081850152818551808452606086019150828701935060005b818110156151cb578451835293830193918301916001016151af565b5090979650505050505050565b6000608082016bffffffffffffffffffffffff87168352602067ffffffffffffffff8716818501526001600160a01b0380871660408601526080606086015282865180855260a087019150838801945060005b8181101561524957855184168352948401949184019160010161522b565b50909a9950505050505050505050565b604051610120810167ffffffffffffffff8111828210171561527d5761527d6154b4565b60405290565b60008219821115615296576152966153f8565b500190565b600067ffffffffffffffff8083168185168083038211156152be576152be6153f8565b01949350505050565b60006bffffffffffffffffffffffff8083168185168083038211156152be576152be6153f8565b6000826152fd576152fd615427565b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561533a5761533a6153f8565b500290565b600082821015615351576153516153f8565b500390565b60006bffffffffffffffffffffffff8381169083168181101561537b5761537b6153f8565b039392505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156153b5576153b56153f8565b5060010190565b600067ffffffffffffffff808316818114156153da576153da6153f8565b6001019392505050565b6000826153f3576153f3615427565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a", + Bin: "0x60e06040523480156200001157600080fd5b506040516200583d3803806200583d8339810160408190526200003491620001b1565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be81620000e8565b5050506001600160601b0319606093841b811660805290831b811660a052911b1660c052620001fb565b6001600160a01b038116331415620001435760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b0381168114620001ac57600080fd5b919050565b600080600060608486031215620001c757600080fd5b620001d28462000194565b9250620001e26020850162000194565b9150620001f26040850162000194565b90509250925092565b60805160601c60a05160601c60c05160601c6155d8620002656000396000818161051901526138f10152600081816106030152613da201526000818161036d015281816114df0152818161233c01528181612e2101528181612f5d015261358201526155d86000f3fe608060405234801561001057600080fd5b506004361061025b5760003560e01c80636f64f03f11610145578063ad178361116100bd578063d2f9f9a71161008c578063e72f6e3011610071578063e72f6e30146106e0578063e82ad7d4146106f3578063f2fde38b1461071657600080fd5b8063d2f9f9a7146106ba578063d7ae1d30146106cd57600080fd5b8063ad178361146105fe578063af198b9714610625578063c3f909d414610655578063caf70c4a146106a757600080fd5b80638da5cb5b11610114578063a21a23e4116100f9578063a21a23e4146105c0578063a47c7696146105c8578063a4c0ed36146105eb57600080fd5b80638da5cb5b1461059c5780639f87fad7146105ad57600080fd5b80636f64f03f1461055b5780637341c10c1461056e57806379ba509714610581578063823597401461058957600080fd5b8063356dac71116101d85780635fbbc0d2116101a757806366316d8d1161018c57806366316d8d14610501578063689c45171461051457806369bcdb7d1461053b57600080fd5b80635fbbc0d2146103f357806364d51a2a146104f957600080fd5b8063356dac71146103a757806340d6bb82146103af5780634cb48a54146103cd5780635d3b1d30146103e057600080fd5b806308821d581161022f57806315c48b841161021457806315c48b841461030e578063181f5a77146103295780631b6b6d231461036857600080fd5b806308821d58146102cf57806312b58349146102e257600080fd5b80620122911461026057806302bcc5b61461028057806304c357cb1461029557806306bfa637146102a8575b600080fd5b610268610729565b6040516102779392919061511c565b60405180910390f35b61029361028e366004614f45565b6107a5565b005b6102936102a3366004614f60565b610837565b60055467ffffffffffffffff165b60405167ffffffffffffffff9091168152602001610277565b6102936102dd366004614c33565b6109eb565b6005546801000000000000000090046bffffffffffffffffffffffff165b604051908152602001610277565b61031660c881565b60405161ffff9091168152602001610277565b604080518082018252601681527f565246436f6f7264696e61746f72563220312e302e30000000000000000000006020820152905161027791906150c7565b61038f7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610277565b600a54610300565b6103b86101f481565b60405163ffffffff9091168152602001610277565b6102936103db366004614dd4565b610bb0565b6103006103ee366004614d12565b610fa7565b600c546040805163ffffffff80841682526401000000008404811660208301526801000000000000000084048116928201929092526c010000000000000000000000008304821660608201527001000000000000000000000000000000008304909116608082015262ffffff740100000000000000000000000000000000000000008304811660a0830152770100000000000000000000000000000000000000000000008304811660c08301527a0100000000000000000000000000000000000000000000000000008304811660e08301527d01000000000000000000000000000000000000000000000000000000000090920490911661010082015261012001610277565b610316606481565b61029361050f366004614beb565b61138a565b61038f7f000000000000000000000000000000000000000000000000000000000000000081565b610300610549366004614f11565b60009081526009602052604090205490565b610293610569366004614b30565b6115d9565b61029361057c366004614f60565b611709565b610293611956565b610293610597366004614f45565b611a1f565b6000546001600160a01b031661038f565b6102936105bb366004614f60565b611be5565b6102b6611fe4565b6105db6105d6366004614f45565b6121c7565b60405161027794939291906152c0565b6102936105f9366004614b64565b6122ea565b61038f7f000000000000000000000000000000000000000000000000000000000000000081565b610638610633366004614d70565b612541565b6040516bffffffffffffffffffffffff9091168152602001610277565b600b546040805161ffff8316815263ffffffff6201000084048116602083015267010000000000000084048116928201929092526b010000000000000000000000909204166060820152608001610277565b6103006106b5366004614c4f565b612a89565b6103b86106c8366004614f45565b612ab9565b6102936106db366004614f60565b612cae565b6102936106ee366004614b0e565b612de8565b610706610701366004614f45565b613025565b6040519015158152602001610277565b610293610724366004614b0e565b613248565b600b546007805460408051602080840282018101909252828152600094859460609461ffff8316946201000090930463ffffffff1693919283919083018282801561079357602002820191906000526020600020905b81548152602001906001019080831161077f575b50505050509050925092509250909192565b6107ad613259565b67ffffffffffffffff81166000908152600360205260409020546001600160a01b0316610806576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff81166000908152600360205260409020546108349082906001600160a01b03166132b5565b50565b67ffffffffffffffff821660009081526003602052604090205482906001600160a01b031680610893576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b038216146108e5576040517fd8a3fb520000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024015b60405180910390fd5b600b546601000000000000900460ff161561092c576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff84166000908152600360205260409020600101546001600160a01b038481169116146109e55767ffffffffffffffff841660008181526003602090815260409182902060010180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0388169081179091558251338152918201527f69436ea6df009049404f564eff6622cd00522b0bd6a89efd9e52a355c4a879be91015b60405180910390a25b50505050565b6109f3613259565b604080518082018252600091610a22919084906002908390839080828437600092019190915250612a89915050565b6000818152600660205260409020549091506001600160a01b031680610a77576040517f77f5b84c000000000000000000000000000000000000000000000000000000008152600481018390526024016108dc565b600082815260066020526040812080547fffffffffffffffffffffffff00000000000000000000000000000000000000001690555b600754811015610b67578260078281548110610aca57610aca61556d565b90600052602060002001541415610b55576007805460009190610aef90600190615427565b81548110610aff57610aff61556d565b906000526020600020015490508060078381548110610b2057610b2061556d565b6000918252602090912001556007805480610b3d57610b3d61553e565b60019003818190600052602060002001600090559055505b80610b5f8161546b565b915050610aac565b50806001600160a01b03167f72be339577868f868798bac2c93e52d6f034fef4689a9848996c14ebb7416c0d83604051610ba391815260200190565b60405180910390a2505050565b610bb8613259565b60c861ffff87161115610c0b576040517fa738697600000000000000000000000000000000000000000000000000000000815261ffff871660048201819052602482015260c860448201526064016108dc565b60008213610c48576040517f43d4cf66000000000000000000000000000000000000000000000000000000008152600481018390526024016108dc565b6040805160a0808201835261ffff891680835263ffffffff89811660208086018290526000868801528a831660608088018290528b85166080988901819052600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000001690971762010000909502949094177fffffffffffffffffffffffffffffffffff000000000000000000ffffffffffff166701000000000000009092027fffffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffff16919091176b010000000000000000000000909302929092179093558651600c80549489015189890151938a0151978a0151968a015160c08b015160e08c01516101008d01519588167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009099169890981764010000000093881693909302929092177fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff1668010000000000000000958716959095027fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff16949094176c0100000000000000000000000098861698909802979097177fffffffffffffffffff00000000000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000096909416959095027fffffffffffffffffff000000ffffffffffffffffffffffffffffffffffffffff16929092177401000000000000000000000000000000000000000062ffffff92831602177fffffff000000000000ffffffffffffffffffffffffffffffffffffffffffffff1677010000000000000000000000000000000000000000000000958216959095027fffffff000000ffffffffffffffffffffffffffffffffffffffffffffffffffff16949094177a01000000000000000000000000000000000000000000000000000092851692909202919091177cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167d0100000000000000000000000000000000000000000000000000000000009390911692909202919091178155600a84905590517fc21e3bd2e0b339d2848f0dd956947a88966c242c0c0c582a33137a5c1ceb5cb291610f9791899189918991899189919061517b565b60405180910390a1505050505050565b600b546000906601000000000000900460ff1615610ff1576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff85166000908152600360205260409020546001600160a01b031661104a576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260026020908152604080832067ffffffffffffffff808a16855292529091205416806110ba576040517ff0019fe600000000000000000000000000000000000000000000000000000000815267ffffffffffffffff871660048201523360248201526044016108dc565b600b5461ffff90811690861610806110d6575060c861ffff8616115b1561112657600b546040517fa738697600000000000000000000000000000000000000000000000000000000815261ffff8088166004830152909116602482015260c860448201526064016108dc565b600b5463ffffffff620100009091048116908516111561118d57600b546040517ff5d7e01e00000000000000000000000000000000000000000000000000000000815263ffffffff80871660048301526201000090920490911660248201526044016108dc565b6101f463ffffffff841611156111df576040517f47386bec00000000000000000000000000000000000000000000000000000000815263ffffffff841660048201526101f460248201526044016108dc565b60006111ec826001615383565b6040805160208082018c9052338284015267ffffffffffffffff808c16606084015284166080808401919091528351808403909101815260a08301845280519082012060c083018d905260e080840182905284518085039091018152610100909301909352815191012091925060009182916040805160208101849052439181019190915267ffffffffffffffff8c16606082015263ffffffff808b166080830152891660a08201523360c0820152919350915060e00160408051808303601f19018152828252805160209182012060008681526009835283902055848352820183905261ffff8a169082015263ffffffff808916606083015287166080820152339067ffffffffffffffff8b16908c907f63373d1c4696214b898952999c9aaec57dac1ee2723cec59bea6888f489a97729060a00160405180910390a45033600090815260026020908152604080832067ffffffffffffffff808d16855292529091208054919093167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009091161790915591505095945050505050565b600b546601000000000000900460ff16156113d1576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600860205260409020546bffffffffffffffffffffffff8083169116101561142b576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260086020526040812080548392906114589084906bffffffffffffffffffffffff1661543e565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555080600560088282829054906101000a90046bffffffffffffffffffffffff166114af919061543e565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb83836040518363ffffffff1660e01b815260040161154d9291906001600160a01b039290921682526bffffffffffffffffffffffff16602082015260400190565b602060405180830381600087803b15801561156757600080fd5b505af115801561157b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061159f9190614cd7565b6115d5576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b6115e1613259565b604080518082018252600091611610919084906002908390839080828437600092019190915250612a89915050565b6000818152600660205260409020549091506001600160a01b031615611665576040517f4a0b8fa7000000000000000000000000000000000000000000000000000000008152600481018290526024016108dc565b600081815260066020908152604080832080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0388169081179091556007805460018101825594527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688909301849055518381527fe729ae16526293f74ade739043022254f1489f616295a25bf72dfb4511ed73b89101610ba3565b67ffffffffffffffff821660009081526003602052604090205482906001600160a01b031680611765576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b038216146117b2576040517fd8a3fb520000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016108dc565b600b546601000000000000900460ff16156117f9576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff841660009081526003602052604090206002015460641415611850576040517f05a48e0f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038316600090815260026020908152604080832067ffffffffffffffff8089168552925290912054161561188a576109e5565b6001600160a01b038316600081815260026020818152604080842067ffffffffffffffff8a1680865290835281852080547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000166001908117909155600384528286209094018054948501815585529382902090920180547fffffffffffffffffffffffff00000000000000000000000000000000000000001685179055905192835290917f43dc749a04ac8fb825cbd514f7c0e13f13bc6f2ee66043b76629d51776cff8e091016109dc565b6001546001600160a01b031633146119b05760405162461bcd60e51b815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016108dc565b60008054337fffffffffffffffffffffffff0000000000000000000000000000000000000000808316821784556001805490911690556040516001600160a01b0390921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b600b546601000000000000900460ff1615611a66576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff81166000908152600360205260409020546001600160a01b0316611abf576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff81166000908152600360205260409020600101546001600160a01b03163314611b475767ffffffffffffffff8116600090815260036020526040908190206001015490517fd084e9750000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016108dc565b67ffffffffffffffff81166000818152600360209081526040918290208054337fffffffffffffffffffffffff0000000000000000000000000000000000000000808316821784556001909301805490931690925583516001600160a01b03909116808252928101919091529092917f6f1dc65165ffffedfd8e507b4a0f1fcfdada045ed11f6c26ba27cedfe87802f0910160405180910390a25050565b67ffffffffffffffff821660009081526003602052604090205482906001600160a01b031680611c41576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b03821614611c8e576040517fd8a3fb520000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016108dc565b600b546601000000000000900460ff1615611cd5576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038316600090815260026020908152604080832067ffffffffffffffff808916855292529091205416611d56576040517ff0019fe600000000000000000000000000000000000000000000000000000000815267ffffffffffffffff851660048201526001600160a01b03841660248201526044016108dc565b67ffffffffffffffff8416600090815260036020908152604080832060020180548251818502810185019093528083529192909190830182828015611dc457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611da6575b50505050509050600060018251611ddb9190615427565b905060005b8251811015611f5357856001600160a01b0316838281518110611e0557611e0561556d565b60200260200101516001600160a01b03161415611f41576000838381518110611e3057611e3061556d565b6020026020010151905080600360008a67ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206002018381548110611e7657611e7661556d565b600091825260208083209190910180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03949094169390931790925567ffffffffffffffff8a168152600390915260409020600201805480611ee357611ee361553e565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905501905550611f53565b80611f4b8161546b565b915050611de0565b506001600160a01b038516600081815260026020908152604080832067ffffffffffffffff8b168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001690555192835290917f182bff9831466789164ca77075fffd84916d35a8180ba73c27e45634549b445b91015b60405180910390a2505050505050565b600b546000906601000000000000900460ff161561202e576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005805467ffffffffffffffff16906000612048836154a4565b82546101009290920a67ffffffffffffffff81810219909316918316021790915560055416905060008060405190808252806020026020018201604052801561209b578160200160208202803683370190505b506040805180820182526000808252602080830182815267ffffffffffffffff888116808552600484528685209551865493516bffffffffffffffffffffffff9091167fffffffffffffffffffffffff0000000000000000000000000000000000000000948516176c01000000000000000000000000919093160291909117909455845160608101865233815280830184815281870188815295855260038452959093208351815483166001600160a01b039182161782559551600182018054909316961695909517905591518051949550909361217f9260028501920190614971565b505060405133815267ffffffffffffffff841691507f464722b4166576d3dcbba877b999bc35cf911f4eaf434b7eba68fa113951d0bf9060200160405180910390a250905090565b67ffffffffffffffff8116600090815260036020526040812054819081906060906001600160a01b0316612227576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff80861660009081526004602090815260408083205460038352928190208054600290910180548351818602810186019094528084526bffffffffffffffffffffffff8616966c01000000000000000000000000909604909516946001600160a01b039092169390929183918301828280156122d457602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116122b6575b5050505050905093509350935093509193509193565b600b546601000000000000900460ff1615612331576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614612393576040517f44b0e3c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602081146123cd576040517f8129bbcd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006123db82840184614f45565b67ffffffffffffffff81166000908152600360205260409020549091506001600160a01b0316612437576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8116600090815260046020526040812080546bffffffffffffffffffffffff169186919061246e83856153af565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555084600560088282829054906101000a90046bffffffffffffffffffffffff166124c591906153af565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508167ffffffffffffffff167fd39ec07f4e209f627a4c427971473820dc129761ba28de8906bd56f57101d4f882878461252c919061536b565b60408051928352602083019190915201611fd4565b600b546000906601000000000000900460ff161561258b576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005a9050600080600061259f87876136da565b9194509250905060006125b86080880160608901614f2a565b63ffffffff1667ffffffffffffffff8111156125d6576125d661559c565b6040519080825280602002602001820160405280156125ff578160200160208202803683370190505b50905060005b6126156080890160608a01614f2a565b63ffffffff1681101561267e5760408051602081018590529081018290526060016040516020818303038152906040528051906020012060001c8282815181106126615761266161556d565b6020908102919091010152806126768161546b565b915050612605565b506000838152600960205260408082208290555181907f1fe543e300000000000000000000000000000000000000000000000000000000906126c69087908690602401615272565b60408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090941693909317909252600b80547fffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffff166601000000000000179055915060009061278b9061276f9060608d01908d01614f2a565b63ffffffff1661278560a08d0160808e01614b0e565b84613a4b565b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffff169055905060006004816127ca60408e0160208f01614f45565b67ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020600001600c9054906101000a900467ffffffffffffffff1690506001600460008d602001602081019061281f9190614f45565b67ffffffffffffffff9081168252602082019290925260400160002080549091600c9161285e9185916c01000000000000000000000000900416615383565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060006128b58a600b600001600b9054906101000a900463ffffffff1663ffffffff166128af85612ab9565b3a613a97565b9050806bffffffffffffffffffffffff16600460008e60200160208101906128dd9190614f45565b67ffffffffffffffff1681526020810191909152604001600020546bffffffffffffffffffffffff16101561293e576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600460008e60200160208101906129569190614f45565b67ffffffffffffffff1681526020810191909152604001600090812080549091906129909084906bffffffffffffffffffffffff1661543e565b82546101009290920a6bffffffffffffffffffffffff81810219909316918316021790915560008b8152600660209081526040808320546001600160a01b0316835260089091528120805485945090926129ec918591166153af565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550877f7dffc5ae5ee4e2e4df1651cf6ad329a73cebdb728f37ea0187b9b17e036756e4888386604051612a6f939291909283526bffffffffffffffffffffffff9190911660208301521515604082015260600190565b60405180910390a299505050505050505050505b92915050565b600081604051602001612a9c9190615096565b604051602081830303815290604052805190602001209050919050565b6040805161012081018252600c5463ffffffff80821683526401000000008204811660208401526801000000000000000082048116938301939093526c010000000000000000000000008104831660608301527001000000000000000000000000000000008104909216608082015262ffffff740100000000000000000000000000000000000000008304811660a08301819052770100000000000000000000000000000000000000000000008404821660c08401527a0100000000000000000000000000000000000000000000000000008404821660e08401527d0100000000000000000000000000000000000000000000000000000000009093041661010082015260009167ffffffffffffffff841611612bd7575192915050565b8267ffffffffffffffff168160a0015162ffffff16108015612c0c57508060c0015162ffffff168367ffffffffffffffff1611155b15612c1b576020015192915050565b8267ffffffffffffffff168160c0015162ffffff16108015612c5057508060e0015162ffffff168367ffffffffffffffff1611155b15612c5f576040015192915050565b8267ffffffffffffffff168160e0015162ffffff16108015612c95575080610100015162ffffff168367ffffffffffffffff1611155b15612ca4576060015192915050565b6080015192915050565b67ffffffffffffffff821660009081526003602052604090205482906001600160a01b031680612d0a576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b03821614612d57576040517fd8a3fb520000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016108dc565b600b546601000000000000900460ff1615612d9e576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612da784613025565b15612dde576040517fb42f66e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109e584846132b5565b612df0613259565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b158015612e6b57600080fd5b505afa158015612e7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ea39190614cf9565b6005549091506801000000000000000090046bffffffffffffffffffffffff1681811115612f07576040517fa99da30200000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016108dc565b81811015613020576000612f1b8284615427565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b038681166004830152602482018390529192507f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb90604401602060405180830381600087803b158015612fa357600080fd5b505af1158015612fb7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fdb9190614cd7565b50604080516001600160a01b0386168152602081018390527f59bfc682b673f8cbf945f1e454df9334834abf7dfe7f92237ca29ecb9b436600910160405180910390a1505b505050565b67ffffffffffffffff81166000908152600360209081526040808320815160608101835281546001600160a01b03908116825260018301541681850152600282018054845181870281018701865281815287969395860193909291908301828280156130ba57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161309c575b505050505081525050905060005b81604001515181101561323e5760005b60075481101561322b5760006131f4600783815481106130fa576130fa61556d565b90600052602060002001548560400151858151811061311b5761311b61556d565b602002602001015188600260008960400151898151811061313e5761313e61556d565b6020908102919091018101516001600160a01b03168252818101929092526040908101600090812067ffffffffffffffff808f16835293522054166040805160208082018790526001600160a01b03959095168183015267ffffffffffffffff9384166060820152919092166080808301919091528251808303909101815260a08201835280519084012060c082019490945260e080820185905282518083039091018152610100909101909152805191012091565b50600081815260096020526040902054909150156132185750600195945050505050565b50806132238161546b565b9150506130d8565b50806132368161546b565b9150506130c8565b5060009392505050565b613250613259565b61083481613b9f565b6000546001600160a01b031633146132b35760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016108dc565b565b600b546601000000000000900460ff16156132fc576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff82166000908152600360209081526040808320815160608101835281546001600160a01b0390811682526001830154168185015260028201805484518187028101870186528181529295939486019383018282801561338d57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161336f575b5050509190925250505067ffffffffffffffff80851660009081526004602090815260408083208151808301909252546bffffffffffffffffffffffff81168083526c01000000000000000000000000909104909416918101919091529293505b8360400151518110156134875760026000856040015183815181106134155761341561556d565b6020908102919091018101516001600160a01b03168252818101929092526040908101600090812067ffffffffffffffff8a168252909252902080547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001690558061347f8161546b565b9150506133ee565b5067ffffffffffffffff8516600090815260036020526040812080547fffffffffffffffffffffffff000000000000000000000000000000000000000090811682556001820180549091169055906134e260028301826149ee565b505067ffffffffffffffff8516600090815260046020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055600580548291906008906135529084906801000000000000000090046bffffffffffffffffffffffff1661543e565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb85836bffffffffffffffffffffffff166040518363ffffffff1660e01b81526004016135f09291906001600160a01b03929092168252602082015260400190565b602060405180830381600087803b15801561360a57600080fd5b505af115801561361e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136429190614cd7565b613678576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080516001600160a01b03861681526bffffffffffffffffffffffff8316602082015267ffffffffffffffff8716917fe8ed5b475a5b5987aa9165e8731bb78043f39eee32ec5a1169a89e27fcd49815910160405180910390a25050505050565b6040805180820182526000918291829161370d919087906002908390839080828437600092019190915250612a89915050565b6000818152600660205260409020549093506001600160a01b031680613762576040517f77f5b84c000000000000000000000000000000000000000000000000000000008152600481018590526024016108dc565b838660c00135604051602001613782929190918252602082015260400190565b60408051601f19818403018152918152815160209283012060008181526009909352912054909350806137e1576040517f3688124a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b836137ef6020880188614f45565b6137ff6040890160208a01614f45565b61380f60608a0160408b01614f2a565b61381f60808b0160608c01614f2a565b61382f60a08c0160808d01614b0e565b60408051602081019790975267ffffffffffffffff9586169087015293909216606085015263ffffffff90811660808501521660a08301526001600160a01b031660c082015260e0016040516020818303038152906040528051906020012081146138c6576040517fd529142c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006138d56020880188614f45565b67ffffffffffffffff1640905080613a06576001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663e9413d3861392360208a018a614f45565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815267ffffffffffffffff909116600482015260240160206040518083038186803b15801561397b57600080fd5b505afa15801561398f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139b39190614cf9565b905080613a06576139c76020880188614f45565b6040517f175dadad00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff90911660048201526024016108dc565b6040805160c08a013560208083019190915281830184905282518083038401815260609092019092528051910120613a3e8982613c61565b9450505050509250925092565b60005a611388811015613a5d57600080fd5b611388810390508460408204820311613a7557600080fd5b50823b613a8157600080fd5b60008083516020850160008789f1949350505050565b600080613aa2613d57565b905060008113613ae1576040517f43d4cf66000000000000000000000000000000000000000000000000000000008152600481018290526024016108dc565b6000815a613aef898961536b565b613af99190615427565b613b0b86670de0b6b3a76400006153ea565b613b1591906153ea565b613b1f91906153d6565b90506000613b3863ffffffff871664e8d4a510006153ea565b9050613b50816b033b2e3c9fd0803ce8000000615427565b821115613b89576040517fe80fa38100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613b93818361536b565b98975050505050505050565b6001600160a01b038116331415613bf85760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016108dc565b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b604080518082018252600091613d219190859060029083908390808284376000920191909152505060408051808201825291508087019060029083908390808284376000920191909152505050608086013560a087013586613cca6101008a0160e08b01614b0e565b604080518082018252906101008c019060029083908390808284376000920191909152505060408051808201825291506101408d0190600290839083908082843760009201919091525050506101808c0135613e5e565b600383604001604051602001613d38929190615258565b60408051601f1981840301815291905280516020909101209392505050565b600b54604080517ffeaf968c0000000000000000000000000000000000000000000000000000000081529051600092670100000000000000900463ffffffff169182151591849182917f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169163feaf968c9160048083019260a0929190829003018186803b158015613df057600080fd5b505afa158015613e04573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613e289190614f8a565b509450909250849150508015613e4c5750613e438242615427565b8463ffffffff16105b15613e565750600a545b949350505050565b613e6789614099565b613eb35760405162461bcd60e51b815260206004820152601a60248201527f7075626c6963206b6579206973206e6f74206f6e20637572766500000000000060448201526064016108dc565b613ebc88614099565b613f085760405162461bcd60e51b815260206004820152601560248201527f67616d6d61206973206e6f74206f6e206375727665000000000000000000000060448201526064016108dc565b613f1183614099565b613f5d5760405162461bcd60e51b815260206004820152601d60248201527f6347616d6d615769746e657373206973206e6f74206f6e20637572766500000060448201526064016108dc565b613f6682614099565b613fb25760405162461bcd60e51b815260206004820152601c60248201527f73486173685769746e657373206973206e6f74206f6e2063757276650000000060448201526064016108dc565b613fbe878a8887614172565b61400a5760405162461bcd60e51b815260206004820152601960248201527f6164647228632a706b2b732a6729213d5f755769746e6573730000000000000060448201526064016108dc565b60006140168a876142c3565b90506000614029898b878b868989614327565b9050600061403a838d8d8a86614447565b9050808a1461408b5760405162461bcd60e51b815260206004820152600d60248201527f696e76616c69642070726f6f660000000000000000000000000000000000000060448201526064016108dc565b505050505050505050505050565b80516000906401000003d019116140f25760405162461bcd60e51b815260206004820152601260248201527f696e76616c696420782d6f7264696e617465000000000000000000000000000060448201526064016108dc565b60208201516401000003d0191161414b5760405162461bcd60e51b815260206004820152601260248201527f696e76616c696420792d6f7264696e617465000000000000000000000000000060448201526064016108dc565b60208201516401000003d01990800961416b8360005b6020020151614487565b1492915050565b60006001600160a01b0382166141ca5760405162461bcd60e51b815260206004820152600b60248201527f626164207769746e65737300000000000000000000000000000000000000000060448201526064016108dc565b6020840151600090600116156141e157601c6141e4565b601b5b905060007ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd03641418587600060200201510986517ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141918203925060009190890987516040805160008082526020820180845287905260ff88169282019290925260608101929092526080820183905291925060019060a0016020604051602081039080840390855afa15801561429b573d6000803e3d6000fd5b5050604051601f1901516001600160a01b039081169088161495505050505050949350505050565b6142cb614a0c565b6142f8600184846040516020016142e493929190615075565b6040516020818303038152906040526144ab565b90505b61430481614099565b612a8357805160408051602081019290925261432091016142e4565b90506142fb565b61432f614a0c565b825186516401000003d019908190069106141561438e5760405162461bcd60e51b815260206004820152601e60248201527f706f696e747320696e2073756d206d7573742062652064697374696e6374000060448201526064016108dc565b6143998789886144fa565b6143e55760405162461bcd60e51b815260206004820152601660248201527f4669727374206d756c20636865636b206661696c65640000000000000000000060448201526064016108dc565b6143f08486856144fa565b61443c5760405162461bcd60e51b815260206004820152601760248201527f5365636f6e64206d756c20636865636b206661696c656400000000000000000060448201526064016108dc565b613b93868484614642565b60006002868686858760405160200161446596959493929190615003565b60408051601f1981840301815291905280516020909101209695505050505050565b6000806401000003d01980848509840990506401000003d019600782089392505050565b6144b3614a0c565b6144bc82614709565b81526144d16144cc826000614161565b614744565b6020820181905260029006600114156144f5576020810180516401000003d0190390525b919050565b6000826145495760405162461bcd60e51b815260206004820152600b60248201527f7a65726f207363616c617200000000000000000000000000000000000000000060448201526064016108dc565b8351602085015160009061455f906002906154cc565b1561456b57601c61456e565b601b5b905060007ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd03641418387096040805160008082526020820180845281905260ff86169282019290925260608101869052608081018390529192509060019060a0016020604051602081039080840390855afa1580156145ee573d6000803e3d6000fd5b50505060206040510351905060008660405160200161460d9190614ff1565b60408051601f1981840301815291905280516020909101206001600160a01b0392831692169190911498975050505050505050565b61464a614a0c565b83516020808601518551918601516000938493849361466b93909190614764565b919450925090506401000003d0198582096001146146cb5760405162461bcd60e51b815260206004820152601960248201527f696e765a206d75737420626520696e7665727365206f66207a0000000000000060448201526064016108dc565b60405180604001604052806401000003d019806146ea576146ea61550f565b87860981526020016401000003d0198785099052979650505050505050565b805160208201205b6401000003d01981106144f557604080516020808201939093528151808203840181529082019091528051910120614711565b6000612a8382600261475d6401000003d019600161536b565b901c614844565b60008080600180826401000003d019896401000003d019038808905060006401000003d0198b6401000003d019038a08905060006147a483838585614904565b90985090506147b588828e88614928565b90985090506147c688828c87614928565b909850905060006147d98d878b85614928565b90985090506147ea88828686614904565b90985090506147fb88828e89614928565b9098509050818114614830576401000003d019818a0998506401000003d01982890997506401000003d0198183099650614834565b8196505b5050505050509450945094915050565b60008061484f614a2a565b6020808252818101819052604082015260608101859052608081018490526401000003d01960a0820152614881614a48565b60208160c08460057ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa9250826148fa5760405162461bcd60e51b815260206004820152601260248201527f6269674d6f64457870206661696c75726521000000000000000000000000000060448201526064016108dc565b5195945050505050565b6000806401000003d0198487096401000003d0198487099097909650945050505050565b600080806401000003d019878509905060006401000003d01987876401000003d019030990506401000003d0198183086401000003d01986890990999098509650505050505050565b8280548282559060005260206000209081019282156149de579160200282015b828111156149de57825182547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03909116178255602090920191600190910190614991565b506149ea929150614a66565b5090565b50805460008255906000526020600020908101906108349190614a66565b60405180604001604052806002906020820280368337509192915050565b6040518060c001604052806006906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b5b808211156149ea5760008155600101614a67565b80356001600160a01b03811681146144f557600080fd5b8060408101831015612a8357600080fd5b803561ffff811681146144f557600080fd5b803562ffffff811681146144f557600080fd5b803563ffffffff811681146144f557600080fd5b803567ffffffffffffffff811681146144f557600080fd5b805169ffffffffffffffffffff811681146144f557600080fd5b600060208284031215614b2057600080fd5b614b2982614a7b565b9392505050565b60008060608385031215614b4357600080fd5b614b4c83614a7b565b9150614b5b8460208501614a92565b90509250929050565b60008060008060608587031215614b7a57600080fd5b614b8385614a7b565b935060208501359250604085013567ffffffffffffffff80821115614ba757600080fd5b818701915087601f830112614bbb57600080fd5b813581811115614bca57600080fd5b886020828501011115614bdc57600080fd5b95989497505060200194505050565b60008060408385031215614bfe57600080fd5b614c0783614a7b565b915060208301356bffffffffffffffffffffffff81168114614c2857600080fd5b809150509250929050565b600060408284031215614c4557600080fd5b614b298383614a92565b600060408284031215614c6157600080fd5b82601f830112614c7057600080fd5b6040516040810181811067ffffffffffffffff82111715614c9357614c9361559c565b8060405250808385604086011115614caa57600080fd5b60005b6002811015614ccc578135835260209283019290910190600101614cad565b509195945050505050565b600060208284031215614ce957600080fd5b81518015158114614b2957600080fd5b600060208284031215614d0b57600080fd5b5051919050565b600080600080600060a08688031215614d2a57600080fd5b85359450614d3a60208701614adc565b9350614d4860408701614aa3565b9250614d5660608701614ac8565b9150614d6460808701614ac8565b90509295509295909350565b600080828403610240811215614d8557600080fd5b6101a080821215614d9557600080fd5b84935060a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe6083011215614dc857600080fd5b92959390920193505050565b6000806000806000808688036101c0811215614def57600080fd5b614df888614aa3565b9650614e0660208901614ac8565b9550614e1460408901614ac8565b9450614e2260608901614ac8565b935060808801359250610120807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6083011215614e5d57600080fd5b614e65615341565b9150614e7360a08a01614ac8565b8252614e8160c08a01614ac8565b6020830152614e9260e08a01614ac8565b6040830152610100614ea5818b01614ac8565b6060840152614eb5828b01614ac8565b6080840152614ec76101408b01614ab5565b60a0840152614ed96101608b01614ab5565b60c0840152614eeb6101808b01614ab5565b60e0840152614efd6101a08b01614ab5565b818401525050809150509295509295509295565b600060208284031215614f2357600080fd5b5035919050565b600060208284031215614f3c57600080fd5b614b2982614ac8565b600060208284031215614f5757600080fd5b614b2982614adc565b60008060408385031215614f7357600080fd5b614f7c83614adc565b9150614b5b60208401614a7b565b600080600080600060a08688031215614fa257600080fd5b614fab86614af4565b9450602086015193506040860151925060608601519150614d6460808701614af4565b8060005b60028110156109e5578151845260209384019390910190600101614fd2565b614ffb8183614fce565b604001919050565b8681526150136020820187614fce565b6150206060820186614fce565b61502d60a0820185614fce565b61503a60e0820184614fce565b60609190911b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166101208201526101340195945050505050565b8381526150856020820184614fce565b606081019190915260800192915050565b60408101818360005b60028110156150be57815183526020928301929091019060010161509f565b50505092915050565b600060208083528351808285015260005b818110156150f4578581018301518582016040015282016150d8565b81811115615106576000604083870101525b50601f01601f1916929092016040019392505050565b60006060820161ffff86168352602063ffffffff86168185015260606040850152818551808452608086019150828701935060005b8181101561516d57845183529383019391830191600101615151565b509098975050505050505050565b60006101c08201905061ffff8816825263ffffffff808816602084015280871660408401528086166060840152846080840152835481811660a08501526151cf60c08501838360201c1663ffffffff169052565b6151e660e08501838360401c1663ffffffff169052565b6151fe6101008501838360601c1663ffffffff169052565b6152166101208501838360801c1663ffffffff169052565b62ffffff60a082901c811661014086015260b882901c811661016086015260d082901c1661018085015260e81c6101a090930192909252979650505050505050565b828152606081016040836020840137600081529392505050565b6000604082018483526020604081850152818551808452606086019150828701935060005b818110156152b357845183529383019391830191600101615297565b5090979650505050505050565b6000608082016bffffffffffffffffffffffff87168352602067ffffffffffffffff8716818501526001600160a01b0380871660408601526080606086015282865180855260a087019150838801945060005b81811015615331578551841683529484019491840191600101615313565b50909a9950505050505050505050565b604051610120810167ffffffffffffffff811182821017156153655761536561559c565b60405290565b6000821982111561537e5761537e6154e0565b500190565b600067ffffffffffffffff8083168185168083038211156153a6576153a66154e0565b01949350505050565b60006bffffffffffffffffffffffff8083168185168083038211156153a6576153a66154e0565b6000826153e5576153e561550f565b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615615422576154226154e0565b500290565b600082821015615439576154396154e0565b500390565b60006bffffffffffffffffffffffff83811690831681811015615463576154636154e0565b039392505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561549d5761549d6154e0565b5060010190565b600067ffffffffffffffff808316818114156154c2576154c26154e0565b6001019392505050565b6000826154db576154db61550f565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a", } var VRFCoordinatorTestV2ABI = VRFCoordinatorTestV2MetaData.ABI diff --git a/core/gethwrappers/generated/vrf_coordinator_v2/vrf_coordinator_v2.go b/core/gethwrappers/generated/vrf_coordinator_v2/vrf_coordinator_v2.go index 6ec5d08ad1e..8f5a324585d 100644 --- a/core/gethwrappers/generated/vrf_coordinator_v2/vrf_coordinator_v2.go +++ b/core/gethwrappers/generated/vrf_coordinator_v2/vrf_coordinator_v2.go @@ -64,7 +64,7 @@ type VRFProof struct { var VRFCoordinatorV2MetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"blockhashStore\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"linkEthFeed\",\"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\":\"uint32\",\"name\":\"have\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"want\",\"type\":\"uint32\"}],\"name\":\"GasLimitTooBig\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IncorrectCommitment\",\"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\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"InvalidConsumer\",\"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\":[{\"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\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier1\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier2\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier3\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier4\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier5\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"reqsForTier2\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"reqsForTier3\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"reqsForTier4\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"reqsForTier5\",\"type\":\"uint24\"}],\"indexed\":false,\"internalType\":\"structVRFCoordinatorV2.FeeConfig\",\"name\":\"feeConfig\",\"type\":\"tuple\"}],\"name\":\"ConfigSet\",\"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\":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\":true,\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"}],\"name\":\"ProvingKeyDeregistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"}],\"name\":\"ProvingKeyRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"outputSeed\",\"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\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"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\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RandomWordsRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"SubscriptionCanceled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"SubscriptionConsumerAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"SubscriptionConsumerRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"SubscriptionCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"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\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"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\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"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_ETH_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\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"}],\"name\":\"acceptSubscriptionOwnerTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"addConsumer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"cancelSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"createSubscription\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"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\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"internalType\":\"structVRFCoordinatorV2.RequestCommitment\",\"name\":\"rc\",\"type\":\"tuple\"}],\"name\":\"fulfillRandomWords\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"name\":\"getCommitment\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"minimumRequestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"maxGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"stalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"gasAfterPaymentCalculation\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurrentSubId\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFallbackWeiPerUnitLink\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFeeConfig\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier1\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier2\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier3\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier4\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier5\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"reqsForTier2\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"reqsForTier3\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"reqsForTier4\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"reqsForTier5\",\"type\":\"uint24\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"reqCount\",\"type\":\"uint64\"}],\"name\":\"getFeeTier\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"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\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"}],\"name\":\"getSubscription\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"balance\",\"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\":[],\"name\":\"getTotalBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"onTokenTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"oracleWithdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"}],\"name\":\"ownerCancelSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"}],\"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\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"internalType\":\"uint256[2]\",\"name\":\"publicProvingKey\",\"type\":\"uint256[2]\"}],\"name\":\"registerProvingKey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"removeConsumer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"}],\"name\":\"requestRandomWords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"requestSubscriptionOwnerTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier1\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier2\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier3\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier4\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier5\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"reqsForTier2\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"reqsForTier3\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"reqsForTier4\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"reqsForTier5\",\"type\":\"uint24\"}],\"internalType\":\"structVRFCoordinatorV2.FeeConfig\",\"name\":\"feeConfig\",\"type\":\"tuple\"}],\"name\":\"setConfig\",\"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\"}]", - Bin: "0x60e06040523480156200001157600080fd5b5060405162005b4838038062005b488339810160408190526200003491620001b1565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be81620000e8565b5050506001600160601b0319606093841b811660805290831b811660a052911b1660c052620001fb565b6001600160a01b038116331415620001435760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b0381168114620001ac57600080fd5b919050565b600080600060608486031215620001c757600080fd5b620001d28462000194565b9250620001e26020850162000194565b9150620001f26040850162000194565b90509250925092565b60805160601c60a05160601c60c05160601c6158e3620002656000396000818161051901526138e70152600081816106030152613e4501526000818161036d015281816114da0152818161237701528181612dae01528181612eea015261350f01526158e36000f3fe608060405234801561001057600080fd5b506004361061025b5760003560e01c80636f64f03f11610145578063ad178361116100bd578063d2f9f9a71161008c578063e72f6e3011610071578063e72f6e30146106e0578063e82ad7d4146106f3578063f2fde38b1461071657600080fd5b8063d2f9f9a7146106ba578063d7ae1d30146106cd57600080fd5b8063ad178361146105fe578063af198b9714610625578063c3f909d414610655578063caf70c4a146106a757600080fd5b80638da5cb5b11610114578063a21a23e4116100f9578063a21a23e4146105c0578063a47c7696146105c8578063a4c0ed36146105eb57600080fd5b80638da5cb5b1461059c5780639f87fad7146105ad57600080fd5b80636f64f03f1461055b5780637341c10c1461056e57806379ba509714610581578063823597401461058957600080fd5b8063356dac71116101d85780635fbbc0d2116101a757806366316d8d1161018c57806366316d8d14610501578063689c45171461051457806369bcdb7d1461053b57600080fd5b80635fbbc0d2146103f357806364d51a2a146104f957600080fd5b8063356dac71146103a757806340d6bb82146103af5780634cb48a54146103cd5780635d3b1d30146103e057600080fd5b806308821d581161022f57806315c48b841161021457806315c48b841461030e578063181f5a77146103295780631b6b6d231461036857600080fd5b806308821d58146102cf57806312b58349146102e257600080fd5b80620122911461026057806302bcc5b61461028057806304c357cb1461029557806306bfa637146102a8575b600080fd5b610268610729565b604051610277939291906153c2565b60405180910390f35b61029361028e3660046151f5565b6107a5565b005b6102936102a3366004615210565b610837565b60055467ffffffffffffffff165b60405167ffffffffffffffff9091168152602001610277565b6102936102dd366004614f06565b6109eb565b6005546801000000000000000090046bffffffffffffffffffffffff165b604051908152602001610277565b61031660c881565b60405161ffff9091168152602001610277565b604080518082018252601681527f565246436f6f7264696e61746f72563220312e302e30000000000000000000006020820152905161027791906153af565b61038f7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610277565b600a54610300565b6103b86101f481565b60405163ffffffff9091168152602001610277565b6102936103db36600461509f565b610bb0565b6103006103ee366004614f79565b610fa7565b600c546040805163ffffffff80841682526401000000008404811660208301526801000000000000000084048116928201929092526c010000000000000000000000008304821660608201527001000000000000000000000000000000008304909116608082015262ffffff740100000000000000000000000000000000000000008304811660a0830152770100000000000000000000000000000000000000000000008304811660c08301527a0100000000000000000000000000000000000000000000000000008304811660e08301527d01000000000000000000000000000000000000000000000000000000000090920490911661010082015261012001610277565b610316606481565b61029361050f366004614ebe565b611385565b61038f7f000000000000000000000000000000000000000000000000000000000000000081565b6103006105493660046151dc565b60009081526009602052604090205490565b610293610569366004614e03565b6115d4565b61029361057c366004615210565b611704565b610293611951565b6102936105973660046151f5565b611a1a565b6000546001600160a01b031661038f565b6102936105bb366004615210565b611be0565b6102b661201f565b6105db6105d63660046151f5565b612202565b6040516102779493929190615560565b6102936105f9366004614e37565b612325565b61038f7f000000000000000000000000000000000000000000000000000000000000000081565b610638610633366004614fd7565b61257c565b6040516bffffffffffffffffffffffff9091168152602001610277565b600b546040805161ffff8316815263ffffffff6201000084048116602083015267010000000000000084048116928201929092526b010000000000000000000000909204166060820152608001610277565b6103006106b5366004614f22565b612a16565b6103b86106c83660046151f5565b612a46565b6102936106db366004615210565b612c3b565b6102936106ee366004614de8565b612d75565b6107066107013660046151f5565b612fb2565b6040519015158152602001610277565b610293610724366004614de8565b6131d5565b600b546007805460408051602080840282018101909252828152600094859460609461ffff8316946201000090930463ffffffff1693919283919083018282801561079357602002820191906000526020600020905b81548152602001906001019080831161077f575b50505050509050925092509250909192565b6107ad6131e6565b67ffffffffffffffff81166000908152600360205260409020546001600160a01b0316610806576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff81166000908152600360205260409020546108349082906001600160a01b0316613242565b50565b67ffffffffffffffff821660009081526003602052604090205482906001600160a01b031680610893576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b038216146108e5576040517fd8a3fb520000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024015b60405180910390fd5b600b546601000000000000900460ff161561092c576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff84166000908152600360205260409020600101546001600160a01b038481169116146109e55767ffffffffffffffff841660008181526003602090815260409182902060010180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0388169081179091558251338152918201527f69436ea6df009049404f564eff6622cd00522b0bd6a89efd9e52a355c4a879be91015b60405180910390a25b50505050565b6109f36131e6565b604080518082018252600091610a22919084906002908390839080828437600092019190915250612a16915050565b6000818152600660205260409020549091506001600160a01b031680610a77576040517f77f5b84c000000000000000000000000000000000000000000000000000000008152600481018390526024016108dc565b600082815260066020526040812080547fffffffffffffffffffffffff00000000000000000000000000000000000000001690555b600754811015610b67578260078281548110610aca57610aca615830565b90600052602060002001541415610b55576007805460009190610aef906001906156be565b81548110610aff57610aff615830565b906000526020600020015490508060078381548110610b2057610b20615830565b6000918252602090912001556007805480610b3d57610b3d615801565b60019003818190600052602060002001600090559055505b80610b5f8161572e565b915050610aac565b50806001600160a01b03167f72be339577868f868798bac2c93e52d6f034fef4689a9848996c14ebb7416c0d83604051610ba391815260200190565b60405180910390a2505050565b610bb86131e6565b60c861ffff87161115610c0b576040517fa738697600000000000000000000000000000000000000000000000000000000815261ffff871660048201819052602482015260c860448201526064016108dc565b60008213610c48576040517f43d4cf66000000000000000000000000000000000000000000000000000000008152600481018390526024016108dc565b6040805160a0808201835261ffff891680835263ffffffff89811660208086018290526000868801528a831660608088018290528b85166080988901819052600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000001690971762010000909502949094177fffffffffffffffffffffffffffffffffff000000000000000000ffffffffffff166701000000000000009092027fffffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffff16919091176b010000000000000000000000909302929092179093558651600c80549489015189890151938a0151978a0151968a015160c08b015160e08c01516101008d01519588167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009099169890981764010000000093881693909302929092177fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff1668010000000000000000958716959095027fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff16949094176c0100000000000000000000000098861698909802979097177fffffffffffffffffff00000000000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000096909416959095027fffffffffffffffffff000000ffffffffffffffffffffffffffffffffffffffff16929092177401000000000000000000000000000000000000000062ffffff92831602177fffffff000000000000ffffffffffffffffffffffffffffffffffffffffffffff1677010000000000000000000000000000000000000000000000958216959095027fffffff000000ffffffffffffffffffffffffffffffffffffffffffffffffffff16949094177a01000000000000000000000000000000000000000000000000000092851692909202919091177cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167d0100000000000000000000000000000000000000000000000000000000009390911692909202919091178155600a84905590517fc21e3bd2e0b339d2848f0dd956947a88966c242c0c0c582a33137a5c1ceb5cb291610f97918991899189918991899190615421565b60405180910390a1505050505050565b600b546000906601000000000000900460ff1615610ff1576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff85166000908152600360205260409020546001600160a01b031661104a576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260026020908152604080832067ffffffffffffffff808a16855292529091205416806110ba576040517ff0019fe600000000000000000000000000000000000000000000000000000000815267ffffffffffffffff871660048201523360248201526044016108dc565b600b5461ffff90811690861610806110d6575060c861ffff8616115b1561112657600b546040517fa738697600000000000000000000000000000000000000000000000000000000815261ffff8088166004830152909116602482015260c860448201526064016108dc565b600b5463ffffffff620100009091048116908516111561118d57600b546040517ff5d7e01e00000000000000000000000000000000000000000000000000000000815263ffffffff80871660048301526201000090920490911660248201526044016108dc565b6101f463ffffffff841611156111df576040517f47386bec00000000000000000000000000000000000000000000000000000000815263ffffffff841660048201526101f460248201526044016108dc565b60006111ec826001615623565b6040805160208082018c9052338284015267ffffffffffffffff808c16606084015284166080808401919091528351808403909101815260a08301845280519082012060c083018d905260e080840182905284518085039091018152610100909301909352815191012091925081611262613667565b60408051602081019390935282015267ffffffffffffffff8a16606082015263ffffffff8089166080830152871660a08201523360c082015260e00160408051808303601f19018152828252805160209182012060008681526009835283902055848352820183905261ffff8a169082015263ffffffff808916606083015287166080820152339067ffffffffffffffff8b16908c907f63373d1c4696214b898952999c9aaec57dac1ee2723cec59bea6888f489a97729060a00160405180910390a45033600090815260026020908152604080832067ffffffffffffffff808d16855292529091208054919093167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009091161790915591505095945050505050565b600b546601000000000000900460ff16156113cc576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600860205260409020546bffffffffffffffffffffffff80831691161015611426576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260086020526040812080548392906114539084906bffffffffffffffffffffffff166156d5565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555080600560088282829054906101000a90046bffffffffffffffffffffffff166114aa91906156d5565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb83836040518363ffffffff1660e01b81526004016115489291906001600160a01b039290921682526bffffffffffffffffffffffff16602082015260400190565b602060405180830381600087803b15801561156257600080fd5b505af1158015611576573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061159a9190614f3e565b6115d0576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b6115dc6131e6565b60408051808201825260009161160b919084906002908390839080828437600092019190915250612a16915050565b6000818152600660205260409020549091506001600160a01b031615611660576040517f4a0b8fa7000000000000000000000000000000000000000000000000000000008152600481018290526024016108dc565b600081815260066020908152604080832080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0388169081179091556007805460018101825594527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688909301849055518381527fe729ae16526293f74ade739043022254f1489f616295a25bf72dfb4511ed73b89101610ba3565b67ffffffffffffffff821660009081526003602052604090205482906001600160a01b031680611760576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b038216146117ad576040517fd8a3fb520000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016108dc565b600b546601000000000000900460ff16156117f4576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff84166000908152600360205260409020600201546064141561184b576040517f05a48e0f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038316600090815260026020908152604080832067ffffffffffffffff80891685529252909120541615611885576109e5565b6001600160a01b038316600081815260026020818152604080842067ffffffffffffffff8a1680865290835281852080547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000166001908117909155600384528286209094018054948501815585529382902090920180547fffffffffffffffffffffffff00000000000000000000000000000000000000001685179055905192835290917f43dc749a04ac8fb825cbd514f7c0e13f13bc6f2ee66043b76629d51776cff8e091016109dc565b6001546001600160a01b031633146119ab5760405162461bcd60e51b815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016108dc565b60008054337fffffffffffffffffffffffff0000000000000000000000000000000000000000808316821784556001805490911690556040516001600160a01b0390921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b600b546601000000000000900460ff1615611a61576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff81166000908152600360205260409020546001600160a01b0316611aba576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff81166000908152600360205260409020600101546001600160a01b03163314611b425767ffffffffffffffff8116600090815260036020526040908190206001015490517fd084e9750000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016108dc565b67ffffffffffffffff81166000818152600360209081526040918290208054337fffffffffffffffffffffffff0000000000000000000000000000000000000000808316821784556001909301805490931690925583516001600160a01b03909116808252928101919091529092917f6f1dc65165ffffedfd8e507b4a0f1fcfdada045ed11f6c26ba27cedfe87802f0910160405180910390a25050565b67ffffffffffffffff821660009081526003602052604090205482906001600160a01b031680611c3c576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b03821614611c89576040517fd8a3fb520000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016108dc565b600b546601000000000000900460ff1615611cd0576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611cd984612fb2565b15611d10576040517fb42f66e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038316600090815260026020908152604080832067ffffffffffffffff808916855292529091205416611d91576040517ff0019fe600000000000000000000000000000000000000000000000000000000815267ffffffffffffffff851660048201526001600160a01b03841660248201526044016108dc565b67ffffffffffffffff8416600090815260036020908152604080832060020180548251818502810185019093528083529192909190830182828015611dff57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611de1575b50505050509050600060018251611e1691906156be565b905060005b8251811015611f8e57856001600160a01b0316838281518110611e4057611e40615830565b60200260200101516001600160a01b03161415611f7c576000838381518110611e6b57611e6b615830565b6020026020010151905080600360008a67ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206002018381548110611eb157611eb1615830565b600091825260208083209190910180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03949094169390931790925567ffffffffffffffff8a168152600390915260409020600201805480611f1e57611f1e615801565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905501905550611f8e565b80611f868161572e565b915050611e1b565b506001600160a01b038516600081815260026020908152604080832067ffffffffffffffff8b168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001690555192835290917f182bff9831466789164ca77075fffd84916d35a8180ba73c27e45634549b445b91015b60405180910390a2505050505050565b600b546000906601000000000000900460ff1615612069576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005805467ffffffffffffffff1690600061208383615767565b82546101009290920a67ffffffffffffffff8181021990931691831602179091556005541690506000806040519080825280602002602001820160405280156120d6578160200160208202803683370190505b506040805180820182526000808252602080830182815267ffffffffffffffff888116808552600484528685209551865493516bffffffffffffffffffffffff9091167fffffffffffffffffffffffff0000000000000000000000000000000000000000948516176c01000000000000000000000000919093160291909117909455845160608101865233815280830184815281870188815295855260038452959093208351815483166001600160a01b03918216178255955160018201805490931696169590951790559151805194955090936121ba9260028501920190614b42565b505060405133815267ffffffffffffffff841691507f464722b4166576d3dcbba877b999bc35cf911f4eaf434b7eba68fa113951d0bf9060200160405180910390a250905090565b67ffffffffffffffff8116600090815260036020526040812054819081906060906001600160a01b0316612262576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff80861660009081526004602090815260408083205460038352928190208054600290910180548351818602810186019094528084526bffffffffffffffffffffffff8616966c01000000000000000000000000909604909516946001600160a01b0390921693909291839183018282801561230f57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116122f1575b5050505050905093509350935093509193509193565b600b546601000000000000900460ff161561236c576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146123ce576040517f44b0e3c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60208114612408576040517f8129bbcd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612416828401846151f5565b67ffffffffffffffff81166000908152600360205260409020549091506001600160a01b0316612472576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8116600090815260046020526040812080546bffffffffffffffffffffffff16918691906124a98385615646565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555084600560088282829054906101000a90046bffffffffffffffffffffffff166125009190615646565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508167ffffffffffffffff167fd39ec07f4e209f627a4c427971473820dc129761ba28de8906bd56f57101d4f8828784612567919061560b565b6040805192835260208301919091520161200f565b600b546000906601000000000000900460ff16156125c6576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005a905060008060006125da87876136f7565b9250925092506000866060015163ffffffff1667ffffffffffffffff8111156126055761260561585f565b60405190808252806020026020018201604052801561262e578160200160208202803683370190505b50905060005b876060015163ffffffff168110156126a25760408051602081018590529081018290526060016040516020818303038152906040528051906020012060001c82828151811061268557612685615830565b60209081029190910101528061269a8161572e565b915050612634565b506000838152600960205260408082208290555181907f1fe543e300000000000000000000000000000000000000000000000000000000906126ea9087908690602401615512565b60408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090941693909317909252600b80547fffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffff166601000000000000179055908a015160808b015191925060009161279a9163ffffffff169084613a05565b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffff1690556020808c01805167ffffffffffffffff9081166000908152600490935260408084205492518216845290922080549394506c01000000000000000000000000918290048316936001939192600c9261281e928692900416615623565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060006128758a600b600001600b9054906101000a900463ffffffff1663ffffffff1661286f85612a46565b3a613a53565b6020808e015167ffffffffffffffff166000908152600490915260409020549091506bffffffffffffffffffffffff808316911610156128e1576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6020808d015167ffffffffffffffff166000908152600490915260408120805483929061291d9084906bffffffffffffffffffffffff166156d5565b82546101009290920a6bffffffffffffffffffffffff81810219909316918316021790915560008b8152600660209081526040808320546001600160a01b03168352600890915281208054859450909261297991859116615646565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550877f7dffc5ae5ee4e2e4df1651cf6ad329a73cebdb728f37ea0187b9b17e036756e48883866040516129fc939291909283526bffffffffffffffffffffffff9190911660208301521515604082015260600190565b60405180910390a299505050505050505050505b92915050565b600081604051602001612a2991906153a1565b604051602081830303815290604052805190602001209050919050565b6040805161012081018252600c5463ffffffff80821683526401000000008204811660208401526801000000000000000082048116938301939093526c010000000000000000000000008104831660608301527001000000000000000000000000000000008104909216608082015262ffffff740100000000000000000000000000000000000000008304811660a08301819052770100000000000000000000000000000000000000000000008404821660c08401527a0100000000000000000000000000000000000000000000000000008404821660e08401527d0100000000000000000000000000000000000000000000000000000000009093041661010082015260009167ffffffffffffffff841611612b64575192915050565b8267ffffffffffffffff168160a0015162ffffff16108015612b9957508060c0015162ffffff168367ffffffffffffffff1611155b15612ba8576020015192915050565b8267ffffffffffffffff168160c0015162ffffff16108015612bdd57508060e0015162ffffff168367ffffffffffffffff1611155b15612bec576040015192915050565b8267ffffffffffffffff168160e0015162ffffff16108015612c22575080610100015162ffffff168367ffffffffffffffff1611155b15612c31576060015192915050565b6080015192915050565b67ffffffffffffffff821660009081526003602052604090205482906001600160a01b031680612c97576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b03821614612ce4576040517fd8a3fb520000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016108dc565b600b546601000000000000900460ff1615612d2b576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612d3484612fb2565b15612d6b576040517fb42f66e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109e58484613242565b612d7d6131e6565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b158015612df857600080fd5b505afa158015612e0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e309190614f60565b6005549091506801000000000000000090046bffffffffffffffffffffffff1681811115612e94576040517fa99da30200000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016108dc565b81811015612fad576000612ea882846156be565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b038681166004830152602482018390529192507f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb90604401602060405180830381600087803b158015612f3057600080fd5b505af1158015612f44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f689190614f3e565b50604080516001600160a01b0386168152602081018390527f59bfc682b673f8cbf945f1e454df9334834abf7dfe7f92237ca29ecb9b436600910160405180910390a1505b505050565b67ffffffffffffffff81166000908152600360209081526040808320815160608101835281546001600160a01b039081168252600183015416818501526002820180548451818702810187018652818152879693958601939092919083018282801561304757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613029575b505050505081525050905060005b8160400151518110156131cb5760005b6007548110156131b85760006131816007838154811061308757613087615830565b9060005260206000200154856040015185815181106130a8576130a8615830565b60200260200101518860026000896040015189815181106130cb576130cb615830565b6020908102919091018101516001600160a01b03168252818101929092526040908101600090812067ffffffffffffffff808f16835293522054166040805160208082018790526001600160a01b03959095168183015267ffffffffffffffff9384166060820152919092166080808301919091528251808303909101815260a08201835280519084012060c082019490945260e080820185905282518083039091018152610100909101909152805191012091565b50600081815260096020526040902054909150156131a55750600195945050505050565b50806131b08161572e565b915050613065565b50806131c38161572e565b915050613055565b5060009392505050565b6131dd6131e6565b61083481613bab565b6000546001600160a01b031633146132405760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016108dc565b565b600b546601000000000000900460ff1615613289576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff82166000908152600360209081526040808320815160608101835281546001600160a01b0390811682526001830154168185015260028201805484518187028101870186528181529295939486019383018282801561331a57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116132fc575b5050509190925250505067ffffffffffffffff80851660009081526004602090815260408083208151808301909252546bffffffffffffffffffffffff81168083526c01000000000000000000000000909104909416918101919091529293505b8360400151518110156134145760026000856040015183815181106133a2576133a2615830565b6020908102919091018101516001600160a01b03168252818101929092526040908101600090812067ffffffffffffffff8a168252909252902080547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001690558061340c8161572e565b91505061337b565b5067ffffffffffffffff8516600090815260036020526040812080547fffffffffffffffffffffffff0000000000000000000000000000000000000000908116825560018201805490911690559061346f6002830182614bbf565b505067ffffffffffffffff8516600090815260046020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055600580548291906008906134df9084906801000000000000000090046bffffffffffffffffffffffff166156d5565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb85836bffffffffffffffffffffffff166040518363ffffffff1660e01b815260040161357d9291906001600160a01b03929092168252602082015260400190565b602060405180830381600087803b15801561359757600080fd5b505af11580156135ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135cf9190614f3e565b613605576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080516001600160a01b03861681526bffffffffffffffffffffffff8316602082015267ffffffffffffffff8716917fe8ed5b475a5b5987aa9165e8731bb78043f39eee32ec5a1169a89e27fcd49815910160405180910390a25050505050565b60004661367381613c6d565b156136f05760646001600160a01b031663a3b1b31d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156136b257600080fd5b505afa1580156136c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136ea9190614f60565b91505090565b4391505090565b60008060006137098560000151612a16565b6000818152600660205260409020549093506001600160a01b03168061375e576040517f77f5b84c000000000000000000000000000000000000000000000000000000008152600481018590526024016108dc565b608086015160405161377d918691602001918252602082015260400190565b60408051601f19818403018152918152815160209283012060008181526009909352912054909350806137dc576040517f3688124a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b85516020808801516040808a015160608b015160808c01519251613848968b96909594910195865267ffffffffffffffff948516602087015292909316604085015263ffffffff90811660608501529190911660808301526001600160a01b031660a082015260c00190565b604051602081830303815290604052805190602001208114613896576040517fd529142c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006138a58760000151613c90565b9050806139b15786516040517fe9413d3800000000000000000000000000000000000000000000000000000000815267ffffffffffffffff90911660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e9413d389060240160206040518083038186803b15801561393157600080fd5b505afa158015613945573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139699190614f60565b9050806139b15786516040517f175dadad00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff90911660048201526024016108dc565b60008860800151826040516020016139d3929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c90506139f88982613d8f565b9450505050509250925092565b60005a611388811015613a1757600080fd5b611388810390508460408204820311613a2f57600080fd5b50823b613a3b57600080fd5b60008083516020850160008789f190505b9392505050565b600080613a5e613dfa565b905060008113613a9d576040517f43d4cf66000000000000000000000000000000000000000000000000000000008152600481018290526024016108dc565b6000613adf6000368080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613f0192505050565b9050600082825a613af08b8b61560b565b613afa91906156be565b613b049088615681565b613b0e919061560b565b613b2090670de0b6b3a7640000615681565b613b2a919061566d565b90506000613b4363ffffffff881664e8d4a51000615681565b9050613b5b816b033b2e3c9fd0803ce80000006156be565b821115613b94576040517fe80fa38100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613b9e818361560b565b9998505050505050505050565b6001600160a01b038116331415613c045760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016108dc565b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600061a4b1821480613c81575062066eed82145b80612a1057505062066eee1490565b600046613c9c81613c6d565b15613d7f576101008367ffffffffffffffff16613cb7613667565b613cc191906156be565b1180613cde5750613cd0613667565b8367ffffffffffffffff1610155b15613cec5750600092915050565b6040517f2b407a8200000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84166004820152606490632b407a82906024015b60206040518083038186803b158015613d4757600080fd5b505afa158015613d5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a4c9190614f60565b505067ffffffffffffffff164090565b6000613dc38360000151846020015185604001518660600151868860a001518960c001518a60e001518b6101000151613fdc565b60038360200151604051602001613ddb9291906154fe565b60408051601f1981840301815291905280516020909101209392505050565b600b54604080517ffeaf968c0000000000000000000000000000000000000000000000000000000081529051600092670100000000000000900463ffffffff169182151591849182917f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169163feaf968c9160048083019260a0929190829003018186803b158015613e9357600080fd5b505afa158015613ea7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ecb919061523a565b509450909250849150508015613eef5750613ee682426156be565b8463ffffffff16105b15613ef95750600a545b949350505050565b600046613f0d81613c6d565b15613f4c57606c6001600160a01b031663c6f7de0e6040518163ffffffff1660e01b815260040160206040518083038186803b158015613d4757600080fd5b613f5581614217565b15613fd35773420000000000000000000000000000000000000f6001600160a01b03166349948e0e8460405180608001604052806048815260200161588f60489139604051602001613fa89291906152df565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401613d2f91906153af565b50600092915050565b613fe58961425e565b6140315760405162461bcd60e51b815260206004820152601a60248201527f7075626c6963206b6579206973206e6f74206f6e20637572766500000000000060448201526064016108dc565b61403a8861425e565b6140865760405162461bcd60e51b815260206004820152601560248201527f67616d6d61206973206e6f74206f6e206375727665000000000000000000000060448201526064016108dc565b61408f8361425e565b6140db5760405162461bcd60e51b815260206004820152601d60248201527f6347616d6d615769746e657373206973206e6f74206f6e20637572766500000060448201526064016108dc565b6140e48261425e565b6141305760405162461bcd60e51b815260206004820152601c60248201527f73486173685769746e657373206973206e6f74206f6e2063757276650000000060448201526064016108dc565b61413c878a8887614337565b6141885760405162461bcd60e51b815260206004820152601960248201527f6164647228632a706b2b732a6729213d5f755769746e6573730000000000000060448201526064016108dc565b60006141948a87614488565b905060006141a7898b878b8689896144ec565b905060006141b8838d8d8a86614618565b9050808a146142095760405162461bcd60e51b815260206004820152600d60248201527f696e76616c69642070726f6f660000000000000000000000000000000000000060448201526064016108dc565b505050505050505050505050565b6000600a82148061422957506101a482145b80614236575062aa37dc82145b80614242575061210582145b8061424f575062014a3382145b80612a1057505062014a341490565b80516000906401000003d019116142b75760405162461bcd60e51b815260206004820152601260248201527f696e76616c696420782d6f7264696e617465000000000000000000000000000060448201526064016108dc565b60208201516401000003d019116143105760405162461bcd60e51b815260206004820152601260248201527f696e76616c696420792d6f7264696e617465000000000000000000000000000060448201526064016108dc565b60208201516401000003d0199080096143308360005b6020020151614658565b1492915050565b60006001600160a01b03821661438f5760405162461bcd60e51b815260206004820152600b60248201527f626164207769746e65737300000000000000000000000000000000000000000060448201526064016108dc565b6020840151600090600116156143a657601c6143a9565b601b5b905060007ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd03641418587600060200201510986517ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141918203925060009190890987516040805160008082526020820180845287905260ff88169282019290925260608101929092526080820183905291925060019060a0016020604051602081039080840390855afa158015614460573d6000803e3d6000fd5b5050604051601f1901516001600160a01b039081169088161495505050505050949350505050565b614490614bdd565b6144bd600184846040516020016144a993929190615380565b60405160208183030381529060405261467c565b90505b6144c98161425e565b612a105780516040805160208101929092526144e591016144a9565b90506144c0565b6144f4614bdd565b825186516401000003d01990819006910614156145535760405162461bcd60e51b815260206004820152601e60248201527f706f696e747320696e2073756d206d7573742062652064697374696e6374000060448201526064016108dc565b61455e8789886146cb565b6145aa5760405162461bcd60e51b815260206004820152601660248201527f4669727374206d756c20636865636b206661696c65640000000000000000000060448201526064016108dc565b6145b58486856146cb565b6146015760405162461bcd60e51b815260206004820152601760248201527f5365636f6e64206d756c20636865636b206661696c656400000000000000000060448201526064016108dc565b61460c868484614813565b98975050505050505050565b6000600286868685876040516020016146369695949392919061530e565b60408051601f1981840301815291905280516020909101209695505050505050565b6000806401000003d01980848509840990506401000003d019600782089392505050565b614684614bdd565b61468d826148da565b81526146a261469d826000614326565b614915565b6020820181905260029006600114156146c6576020810180516401000003d0190390525b919050565b60008261471a5760405162461bcd60e51b815260206004820152600b60248201527f7a65726f207363616c617200000000000000000000000000000000000000000060448201526064016108dc565b835160208501516000906147309060029061578f565b1561473c57601c61473f565b601b5b905060007ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd03641418387096040805160008082526020820180845281905260ff86169282019290925260608101869052608081018390529192509060019060a0016020604051602081039080840390855afa1580156147bf573d6000803e3d6000fd5b5050506020604051035190506000866040516020016147de91906152cd565b60408051601f1981840301815291905280516020909101206001600160a01b0392831692169190911498975050505050505050565b61481b614bdd565b83516020808601518551918601516000938493849361483c93909190614935565b919450925090506401000003d01985820960011461489c5760405162461bcd60e51b815260206004820152601960248201527f696e765a206d75737420626520696e7665727365206f66207a0000000000000060448201526064016108dc565b60405180604001604052806401000003d019806148bb576148bb6157d2565b87860981526020016401000003d0198785099052979650505050505050565b805160208201205b6401000003d01981106146c6576040805160208082019390935281518082038401815290820190915280519101206148e2565b6000612a1082600261492e6401000003d019600161560b565b901c614a15565b60008080600180826401000003d019896401000003d019038808905060006401000003d0198b6401000003d019038a089050600061497583838585614ad5565b909850905061498688828e88614af9565b909850905061499788828c87614af9565b909850905060006149aa8d878b85614af9565b90985090506149bb88828686614ad5565b90985090506149cc88828e89614af9565b9098509050818114614a01576401000003d019818a0998506401000003d01982890997506401000003d0198183099650614a05565b8196505b5050505050509450945094915050565b600080614a20614bfb565b6020808252818101819052604082015260608101859052608081018490526401000003d01960a0820152614a52614c19565b60208160c08460057ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa925082614acb5760405162461bcd60e51b815260206004820152601260248201527f6269674d6f64457870206661696c75726521000000000000000000000000000060448201526064016108dc565b5195945050505050565b6000806401000003d0198487096401000003d0198487099097909650945050505050565b600080806401000003d019878509905060006401000003d01987876401000003d019030990506401000003d0198183086401000003d01986890990999098509650505050505050565b828054828255906000526020600020908101928215614baf579160200282015b82811115614baf57825182547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03909116178255602090920191600190910190614b62565b50614bbb929150614c37565b5090565b50805460008255906000526020600020908101906108349190614c37565b60405180604001604052806002906020820280368337509192915050565b6040518060c001604052806006906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b5b80821115614bbb5760008155600101614c38565b80356001600160a01b03811681146146c657600080fd5b8060408101831015612a1057600080fd5b600082601f830112614c8557600080fd5b6040516040810181811067ffffffffffffffff82111715614ca857614ca861585f565b8060405250808385604086011115614cbf57600080fd5b60005b6002811015614ce1578135835260209283019290910190600101614cc2565b509195945050505050565b600060a08284031215614cfe57600080fd5b60405160a0810181811067ffffffffffffffff82111715614d2157614d2161585f565b604052905080614d3083614db6565b8152614d3e60208401614db6565b6020820152614d4f60408401614da2565b6040820152614d6060608401614da2565b6060820152614d7160808401614c4c565b60808201525092915050565b803561ffff811681146146c657600080fd5b803562ffffff811681146146c657600080fd5b803563ffffffff811681146146c657600080fd5b803567ffffffffffffffff811681146146c657600080fd5b805169ffffffffffffffffffff811681146146c657600080fd5b600060208284031215614dfa57600080fd5b613a4c82614c4c565b60008060608385031215614e1657600080fd5b614e1f83614c4c565b9150614e2e8460208501614c63565b90509250929050565b60008060008060608587031215614e4d57600080fd5b614e5685614c4c565b935060208501359250604085013567ffffffffffffffff80821115614e7a57600080fd5b818701915087601f830112614e8e57600080fd5b813581811115614e9d57600080fd5b886020828501011115614eaf57600080fd5b95989497505060200194505050565b60008060408385031215614ed157600080fd5b614eda83614c4c565b915060208301356bffffffffffffffffffffffff81168114614efb57600080fd5b809150509250929050565b600060408284031215614f1857600080fd5b613a4c8383614c63565b600060408284031215614f3457600080fd5b613a4c8383614c74565b600060208284031215614f5057600080fd5b81518015158114613a4c57600080fd5b600060208284031215614f7257600080fd5b5051919050565b600080600080600060a08688031215614f9157600080fd5b85359450614fa160208701614db6565b9350614faf60408701614d7d565b9250614fbd60608701614da2565b9150614fcb60808701614da2565b90509295509295909350565b600080828403610240811215614fec57600080fd5b6101a080821215614ffc57600080fd5b6150046155e1565b91506150108686614c74565b825261501f8660408701614c74565b60208301526080850135604083015260a0850135606083015260c0850135608083015261504e60e08601614c4c565b60a083015261010061506287828801614c74565b60c0840152615075876101408801614c74565b60e0840152610180860135818401525081935061509486828701614cec565b925050509250929050565b6000806000806000808688036101c08112156150ba57600080fd5b6150c388614d7d565b96506150d160208901614da2565b95506150df60408901614da2565b94506150ed60608901614da2565b935060808801359250610120807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff608301121561512857600080fd5b6151306155e1565b915061513e60a08a01614da2565b825261514c60c08a01614da2565b602083015261515d60e08a01614da2565b6040830152610100615170818b01614da2565b6060840152615180828b01614da2565b60808401526151926101408b01614d8f565b60a08401526151a46101608b01614d8f565b60c08401526151b66101808b01614d8f565b60e08401526151c86101a08b01614d8f565b818401525050809150509295509295509295565b6000602082840312156151ee57600080fd5b5035919050565b60006020828403121561520757600080fd5b613a4c82614db6565b6000806040838503121561522357600080fd5b61522c83614db6565b9150614e2e60208401614c4c565b600080600080600060a0868803121561525257600080fd5b61525b86614dce565b9450602086015193506040860151925060608601519150614fcb60808701614dce565b8060005b60028110156109e5578151845260209384019390910190600101615282565b600081518084526152b9816020860160208601615702565b601f01601f19169290920160200192915050565b6152d7818361527e565b604001919050565b600083516152f1818460208801615702565b835190830190615305818360208801615702565b01949350505050565b86815261531e602082018761527e565b61532b606082018661527e565b61533860a082018561527e565b61534560e082018461527e565b60609190911b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166101208201526101340195945050505050565b838152615390602082018461527e565b606081019190915260800192915050565b60408101612a10828461527e565b602081526000613a4c60208301846152a1565b60006060820161ffff86168352602063ffffffff86168185015260606040850152818551808452608086019150828701935060005b81811015615413578451835293830193918301916001016153f7565b509098975050505050505050565b60006101c08201905061ffff8816825263ffffffff808816602084015280871660408401528086166060840152846080840152835481811660a085015261547560c08501838360201c1663ffffffff169052565b61548c60e08501838360401c1663ffffffff169052565b6154a46101008501838360601c1663ffffffff169052565b6154bc6101208501838360801c1663ffffffff169052565b62ffffff60a082901c811661014086015260b882901c811661016086015260d082901c1661018085015260e81c6101a090930192909252979650505050505050565b82815260608101613a4c602083018461527e565b6000604082018483526020604081850152818551808452606086019150828701935060005b8181101561555357845183529383019391830191600101615537565b5090979650505050505050565b6000608082016bffffffffffffffffffffffff87168352602067ffffffffffffffff8716818501526001600160a01b0380871660408601526080606086015282865180855260a087019150838801945060005b818110156155d15785518416835294840194918401916001016155b3565b50909a9950505050505050505050565b604051610120810167ffffffffffffffff811182821017156156055761560561585f565b60405290565b6000821982111561561e5761561e6157a3565b500190565b600067ffffffffffffffff808316818516808303821115615305576153056157a3565b60006bffffffffffffffffffffffff808316818516808303821115615305576153056157a3565b60008261567c5761567c6157d2565b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156156b9576156b96157a3565b500290565b6000828210156156d0576156d06157a3565b500390565b60006bffffffffffffffffffffffff838116908316818110156156fa576156fa6157a3565b039392505050565b60005b8381101561571d578181015183820152602001615705565b838111156109e55750506000910152565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415615760576157606157a3565b5060010190565b600067ffffffffffffffff80831681811415615785576157856157a3565b6001019392505050565b60008261579e5761579e6157d2565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfe307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666a164736f6c6343000806000a", + Bin: "0x60e06040523480156200001157600080fd5b5060405162005b9538038062005b958339810160408190526200003491620001b1565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be81620000e8565b5050506001600160601b0319606093841b811660805290831b811660a052911b1660c052620001fb565b6001600160a01b038116331415620001435760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b0381168114620001ac57600080fd5b919050565b600080600060608486031215620001c757600080fd5b620001d28462000194565b9250620001e26020850162000194565b9150620001f26040850162000194565b90509250925092565b60805160601c60a05160601c60c05160601c615930620002656000396000818161051901526139090152600081816106030152613ee801526000818161036d015281816114da0152818161237701528181612dae01528181612eea015261350f01526159306000f3fe608060405234801561001057600080fd5b506004361061025b5760003560e01c80636f64f03f11610145578063ad178361116100bd578063d2f9f9a71161008c578063e72f6e3011610071578063e72f6e30146106e0578063e82ad7d4146106f3578063f2fde38b1461071657600080fd5b8063d2f9f9a7146106ba578063d7ae1d30146106cd57600080fd5b8063ad178361146105fe578063af198b9714610625578063c3f909d414610655578063caf70c4a146106a757600080fd5b80638da5cb5b11610114578063a21a23e4116100f9578063a21a23e4146105c0578063a47c7696146105c8578063a4c0ed36146105eb57600080fd5b80638da5cb5b1461059c5780639f87fad7146105ad57600080fd5b80636f64f03f1461055b5780637341c10c1461056e57806379ba509714610581578063823597401461058957600080fd5b8063356dac71116101d85780635fbbc0d2116101a757806366316d8d1161018c57806366316d8d14610501578063689c45171461051457806369bcdb7d1461053b57600080fd5b80635fbbc0d2146103f357806364d51a2a146104f957600080fd5b8063356dac71146103a757806340d6bb82146103af5780634cb48a54146103cd5780635d3b1d30146103e057600080fd5b806308821d581161022f57806315c48b841161021457806315c48b841461030e578063181f5a77146103295780631b6b6d231461036857600080fd5b806308821d58146102cf57806312b58349146102e257600080fd5b80620122911461026057806302bcc5b61461028057806304c357cb1461029557806306bfa637146102a8575b600080fd5b610268610729565b604051610277939291906153e6565b60405180910390f35b61029361028e3660046151f6565b6107a5565b005b6102936102a3366004615211565b610837565b60055467ffffffffffffffff165b60405167ffffffffffffffff9091168152602001610277565b6102936102dd366004614ea0565b6109eb565b6005546801000000000000000090046bffffffffffffffffffffffff165b604051908152602001610277565b61031660c881565b60405161ffff9091168152602001610277565b604080518082018252601681527f565246436f6f7264696e61746f72563220312e302e30000000000000000000006020820152905161027791906153d3565b61038f7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610277565b600a54610300565b6103b86101f481565b60405163ffffffff9091168152602001610277565b6102936103db3660046150a0565b610bb0565b6103006103ee366004614f7f565b610fa7565b600c546040805163ffffffff80841682526401000000008404811660208301526801000000000000000084048116928201929092526c010000000000000000000000008304821660608201527001000000000000000000000000000000008304909116608082015262ffffff740100000000000000000000000000000000000000008304811660a0830152770100000000000000000000000000000000000000000000008304811660c08301527a0100000000000000000000000000000000000000000000000000008304811660e08301527d01000000000000000000000000000000000000000000000000000000000090920490911661010082015261012001610277565b610316606481565b61029361050f366004614e58565b611385565b61038f7f000000000000000000000000000000000000000000000000000000000000000081565b6103006105493660046151dd565b60009081526009602052604090205490565b610293610569366004614d9d565b6115d4565b61029361057c366004615211565b611704565b610293611951565b6102936105973660046151f6565b611a1a565b6000546001600160a01b031661038f565b6102936105bb366004615211565b611be0565b6102b661201f565b6105db6105d63660046151f6565b612202565b604051610277949392919061558a565b6102936105f9366004614dd1565b612325565b61038f7f000000000000000000000000000000000000000000000000000000000000000081565b610638610633366004614fdd565b61257c565b6040516bffffffffffffffffffffffff9091168152602001610277565b600b546040805161ffff8316815263ffffffff6201000084048116602083015267010000000000000084048116928201929092526b010000000000000000000000909204166060820152608001610277565b6103006106b5366004614ebc565b612a16565b6103b86106c83660046151f6565b612a46565b6102936106db366004615211565b612c3b565b6102936106ee366004614d82565b612d75565b6107066107013660046151f6565b612fb2565b6040519015158152602001610277565b610293610724366004614d82565b6131d5565b600b546007805460408051602080840282018101909252828152600094859460609461ffff8316946201000090930463ffffffff1693919283919083018282801561079357602002820191906000526020600020905b81548152602001906001019080831161077f575b50505050509050925092509250909192565b6107ad6131e6565b67ffffffffffffffff81166000908152600360205260409020546001600160a01b0316610806576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff81166000908152600360205260409020546108349082906001600160a01b0316613242565b50565b67ffffffffffffffff821660009081526003602052604090205482906001600160a01b031680610893576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b038216146108e5576040517fd8a3fb520000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024015b60405180910390fd5b600b546601000000000000900460ff161561092c576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff84166000908152600360205260409020600101546001600160a01b038481169116146109e55767ffffffffffffffff841660008181526003602090815260409182902060010180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0388169081179091558251338152918201527f69436ea6df009049404f564eff6622cd00522b0bd6a89efd9e52a355c4a879be91015b60405180910390a25b50505050565b6109f36131e6565b604080518082018252600091610a22919084906002908390839080828437600092019190915250612a16915050565b6000818152600660205260409020549091506001600160a01b031680610a77576040517f77f5b84c000000000000000000000000000000000000000000000000000000008152600481018390526024016108dc565b600082815260066020526040812080547fffffffffffffffffffffffff00000000000000000000000000000000000000001690555b600754811015610b67578260078281548110610aca57610aca61587d565b90600052602060002001541415610b55576007805460009190610aef9060019061570b565b81548110610aff57610aff61587d565b906000526020600020015490508060078381548110610b2057610b2061587d565b6000918252602090912001556007805480610b3d57610b3d61584e565b60019003818190600052602060002001600090559055505b80610b5f8161577b565b915050610aac565b50806001600160a01b03167f72be339577868f868798bac2c93e52d6f034fef4689a9848996c14ebb7416c0d83604051610ba391815260200190565b60405180910390a2505050565b610bb86131e6565b60c861ffff87161115610c0b576040517fa738697600000000000000000000000000000000000000000000000000000000815261ffff871660048201819052602482015260c860448201526064016108dc565b60008213610c48576040517f43d4cf66000000000000000000000000000000000000000000000000000000008152600481018390526024016108dc565b6040805160a0808201835261ffff891680835263ffffffff89811660208086018290526000868801528a831660608088018290528b85166080988901819052600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000001690971762010000909502949094177fffffffffffffffffffffffffffffffffff000000000000000000ffffffffffff166701000000000000009092027fffffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffff16919091176b010000000000000000000000909302929092179093558651600c80549489015189890151938a0151978a0151968a015160c08b015160e08c01516101008d01519588167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009099169890981764010000000093881693909302929092177fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff1668010000000000000000958716959095027fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff16949094176c0100000000000000000000000098861698909802979097177fffffffffffffffffff00000000000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000096909416959095027fffffffffffffffffff000000ffffffffffffffffffffffffffffffffffffffff16929092177401000000000000000000000000000000000000000062ffffff92831602177fffffff000000000000ffffffffffffffffffffffffffffffffffffffffffffff1677010000000000000000000000000000000000000000000000958216959095027fffffff000000ffffffffffffffffffffffffffffffffffffffffffffffffffff16949094177a01000000000000000000000000000000000000000000000000000092851692909202919091177cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167d0100000000000000000000000000000000000000000000000000000000009390911692909202919091178155600a84905590517fc21e3bd2e0b339d2848f0dd956947a88966c242c0c0c582a33137a5c1ceb5cb291610f97918991899189918991899190615445565b60405180910390a1505050505050565b600b546000906601000000000000900460ff1615610ff1576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff85166000908152600360205260409020546001600160a01b031661104a576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260026020908152604080832067ffffffffffffffff808a16855292529091205416806110ba576040517ff0019fe600000000000000000000000000000000000000000000000000000000815267ffffffffffffffff871660048201523360248201526044016108dc565b600b5461ffff90811690861610806110d6575060c861ffff8616115b1561112657600b546040517fa738697600000000000000000000000000000000000000000000000000000000815261ffff8088166004830152909116602482015260c860448201526064016108dc565b600b5463ffffffff620100009091048116908516111561118d57600b546040517ff5d7e01e00000000000000000000000000000000000000000000000000000000815263ffffffff80871660048301526201000090920490911660248201526044016108dc565b6101f463ffffffff841611156111df576040517f47386bec00000000000000000000000000000000000000000000000000000000815263ffffffff841660048201526101f460248201526044016108dc565b60006111ec826001615670565b6040805160208082018c9052338284015267ffffffffffffffff808c16606084015284166080808401919091528351808403909101815260a08301845280519082012060c083018d905260e080840182905284518085039091018152610100909301909352815191012091925081611262613667565b60408051602081019390935282015267ffffffffffffffff8a16606082015263ffffffff8089166080830152871660a08201523360c082015260e00160408051808303601f19018152828252805160209182012060008681526009835283902055848352820183905261ffff8a169082015263ffffffff808916606083015287166080820152339067ffffffffffffffff8b16908c907f63373d1c4696214b898952999c9aaec57dac1ee2723cec59bea6888f489a97729060a00160405180910390a45033600090815260026020908152604080832067ffffffffffffffff808d16855292529091208054919093167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009091161790915591505095945050505050565b600b546601000000000000900460ff16156113cc576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600860205260409020546bffffffffffffffffffffffff80831691161015611426576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260086020526040812080548392906114539084906bffffffffffffffffffffffff16615722565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555080600560088282829054906101000a90046bffffffffffffffffffffffff166114aa9190615722565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb83836040518363ffffffff1660e01b81526004016115489291906001600160a01b039290921682526bffffffffffffffffffffffff16602082015260400190565b602060405180830381600087803b15801561156257600080fd5b505af1158015611576573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061159a9190614f44565b6115d0576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b6115dc6131e6565b60408051808201825260009161160b919084906002908390839080828437600092019190915250612a16915050565b6000818152600660205260409020549091506001600160a01b031615611660576040517f4a0b8fa7000000000000000000000000000000000000000000000000000000008152600481018290526024016108dc565b600081815260066020908152604080832080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0388169081179091556007805460018101825594527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688909301849055518381527fe729ae16526293f74ade739043022254f1489f616295a25bf72dfb4511ed73b89101610ba3565b67ffffffffffffffff821660009081526003602052604090205482906001600160a01b031680611760576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b038216146117ad576040517fd8a3fb520000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016108dc565b600b546601000000000000900460ff16156117f4576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff84166000908152600360205260409020600201546064141561184b576040517f05a48e0f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038316600090815260026020908152604080832067ffffffffffffffff80891685529252909120541615611885576109e5565b6001600160a01b038316600081815260026020818152604080842067ffffffffffffffff8a1680865290835281852080547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000166001908117909155600384528286209094018054948501815585529382902090920180547fffffffffffffffffffffffff00000000000000000000000000000000000000001685179055905192835290917f43dc749a04ac8fb825cbd514f7c0e13f13bc6f2ee66043b76629d51776cff8e091016109dc565b6001546001600160a01b031633146119ab5760405162461bcd60e51b815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016108dc565b60008054337fffffffffffffffffffffffff0000000000000000000000000000000000000000808316821784556001805490911690556040516001600160a01b0390921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b600b546601000000000000900460ff1615611a61576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff81166000908152600360205260409020546001600160a01b0316611aba576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff81166000908152600360205260409020600101546001600160a01b03163314611b425767ffffffffffffffff8116600090815260036020526040908190206001015490517fd084e9750000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016108dc565b67ffffffffffffffff81166000818152600360209081526040918290208054337fffffffffffffffffffffffff0000000000000000000000000000000000000000808316821784556001909301805490931690925583516001600160a01b03909116808252928101919091529092917f6f1dc65165ffffedfd8e507b4a0f1fcfdada045ed11f6c26ba27cedfe87802f0910160405180910390a25050565b67ffffffffffffffff821660009081526003602052604090205482906001600160a01b031680611c3c576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b03821614611c89576040517fd8a3fb520000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016108dc565b600b546601000000000000900460ff1615611cd0576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611cd984612fb2565b15611d10576040517fb42f66e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038316600090815260026020908152604080832067ffffffffffffffff808916855292529091205416611d91576040517ff0019fe600000000000000000000000000000000000000000000000000000000815267ffffffffffffffff851660048201526001600160a01b03841660248201526044016108dc565b67ffffffffffffffff8416600090815260036020908152604080832060020180548251818502810185019093528083529192909190830182828015611dff57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611de1575b50505050509050600060018251611e16919061570b565b905060005b8251811015611f8e57856001600160a01b0316838281518110611e4057611e4061587d565b60200260200101516001600160a01b03161415611f7c576000838381518110611e6b57611e6b61587d565b6020026020010151905080600360008a67ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206002018381548110611eb157611eb161587d565b600091825260208083209190910180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03949094169390931790925567ffffffffffffffff8a168152600390915260409020600201805480611f1e57611f1e61584e565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905501905550611f8e565b80611f868161577b565b915050611e1b565b506001600160a01b038516600081815260026020908152604080832067ffffffffffffffff8b168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001690555192835290917f182bff9831466789164ca77075fffd84916d35a8180ba73c27e45634549b445b91015b60405180910390a2505050505050565b600b546000906601000000000000900460ff1615612069576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005805467ffffffffffffffff16906000612083836157b4565b82546101009290920a67ffffffffffffffff8181021990931691831602179091556005541690506000806040519080825280602002602001820160405280156120d6578160200160208202803683370190505b506040805180820182526000808252602080830182815267ffffffffffffffff888116808552600484528685209551865493516bffffffffffffffffffffffff9091167fffffffffffffffffffffffff0000000000000000000000000000000000000000948516176c01000000000000000000000000919093160291909117909455845160608101865233815280830184815281870188815295855260038452959093208351815483166001600160a01b03918216178255955160018201805490931696169590951790559151805194955090936121ba9260028501920190614be5565b505060405133815267ffffffffffffffff841691507f464722b4166576d3dcbba877b999bc35cf911f4eaf434b7eba68fa113951d0bf9060200160405180910390a250905090565b67ffffffffffffffff8116600090815260036020526040812054819081906060906001600160a01b0316612262576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff80861660009081526004602090815260408083205460038352928190208054600290910180548351818602810186019094528084526bffffffffffffffffffffffff8616966c01000000000000000000000000909604909516946001600160a01b0390921693909291839183018282801561230f57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116122f1575b5050505050905093509350935093509193509193565b600b546601000000000000900460ff161561236c576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146123ce576040517f44b0e3c300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60208114612408576040517f8129bbcd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612416828401846151f6565b67ffffffffffffffff81166000908152600360205260409020549091506001600160a01b0316612472576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8116600090815260046020526040812080546bffffffffffffffffffffffff16918691906124a98385615693565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555084600560088282829054906101000a90046bffffffffffffffffffffffff166125009190615693565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508167ffffffffffffffff167fd39ec07f4e209f627a4c427971473820dc129761ba28de8906bd56f57101d4f88287846125679190615658565b6040805192835260208301919091520161200f565b600b546000906601000000000000900460ff16156125c6576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005a905060008060006125da87876136f7565b9250925092506000866060015163ffffffff1667ffffffffffffffff811115612605576126056158ac565b60405190808252806020026020018201604052801561262e578160200160208202803683370190505b50905060005b876060015163ffffffff168110156126a25760408051602081018590529081018290526060016040516020818303038152906040528051906020012060001c8282815181106126855761268561587d565b60209081029190910101528061269a8161577b565b915050612634565b506000838152600960205260408082208290555181907f1fe543e300000000000000000000000000000000000000000000000000000000906126ea908790869060240161553c565b60408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090941693909317909252600b80547fffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffff166601000000000000179055908a015160808b015191925060009161279a9163ffffffff169084613a18565b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffff1690556020808c01805167ffffffffffffffff9081166000908152600490935260408084205492518216845290922080549394506c01000000000000000000000000918290048316936001939192600c9261281e928692900416615670565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060006128758a600b600001600b9054906101000a900463ffffffff1663ffffffff1661286f85612a46565b3a613a64565b6020808e015167ffffffffffffffff166000908152600490915260409020549091506bffffffffffffffffffffffff808316911610156128e1576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6020808d015167ffffffffffffffff166000908152600490915260408120805483929061291d9084906bffffffffffffffffffffffff16615722565b82546101009290920a6bffffffffffffffffffffffff81810219909316918316021790915560008b8152600660209081526040808320546001600160a01b03168352600890915281208054859450909261297991859116615693565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550877f7dffc5ae5ee4e2e4df1651cf6ad329a73cebdb728f37ea0187b9b17e036756e48883866040516129fc939291909283526bffffffffffffffffffffffff9190911660208301521515604082015260600190565b60405180910390a299505050505050505050505b92915050565b600081604051602001612a2991906153a2565b604051602081830303815290604052805190602001209050919050565b6040805161012081018252600c5463ffffffff80821683526401000000008204811660208401526801000000000000000082048116938301939093526c010000000000000000000000008104831660608301527001000000000000000000000000000000008104909216608082015262ffffff740100000000000000000000000000000000000000008304811660a08301819052770100000000000000000000000000000000000000000000008404821660c08401527a0100000000000000000000000000000000000000000000000000008404821660e08401527d0100000000000000000000000000000000000000000000000000000000009093041661010082015260009167ffffffffffffffff841611612b64575192915050565b8267ffffffffffffffff168160a0015162ffffff16108015612b9957508060c0015162ffffff168367ffffffffffffffff1611155b15612ba8576020015192915050565b8267ffffffffffffffff168160c0015162ffffff16108015612bdd57508060e0015162ffffff168367ffffffffffffffff1611155b15612bec576040015192915050565b8267ffffffffffffffff168160e0015162ffffff16108015612c22575080610100015162ffffff168367ffffffffffffffff1611155b15612c31576060015192915050565b6080015192915050565b67ffffffffffffffff821660009081526003602052604090205482906001600160a01b031680612c97576040517f1f6a65b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b03821614612ce4576040517fd8a3fb520000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016108dc565b600b546601000000000000900460ff1615612d2b576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612d3484612fb2565b15612d6b576040517fb42f66e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109e58484613242565b612d7d6131e6565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b158015612df857600080fd5b505afa158015612e0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e309190614f66565b6005549091506801000000000000000090046bffffffffffffffffffffffff1681811115612e94576040517fa99da30200000000000000000000000000000000000000000000000000000000815260048101829052602481018390526044016108dc565b81811015612fad576000612ea8828461570b565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b038681166004830152602482018390529192507f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb90604401602060405180830381600087803b158015612f3057600080fd5b505af1158015612f44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f689190614f44565b50604080516001600160a01b0386168152602081018390527f59bfc682b673f8cbf945f1e454df9334834abf7dfe7f92237ca29ecb9b436600910160405180910390a1505b505050565b67ffffffffffffffff81166000908152600360209081526040808320815160608101835281546001600160a01b039081168252600183015416818501526002820180548451818702810187018652818152879693958601939092919083018282801561304757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613029575b505050505081525050905060005b8160400151518110156131cb5760005b6007548110156131b8576000613181600783815481106130875761308761587d565b9060005260206000200154856040015185815181106130a8576130a861587d565b60200260200101518860026000896040015189815181106130cb576130cb61587d565b6020908102919091018101516001600160a01b03168252818101929092526040908101600090812067ffffffffffffffff808f16835293522054166040805160208082018790526001600160a01b03959095168183015267ffffffffffffffff9384166060820152919092166080808301919091528251808303909101815260a08201835280519084012060c082019490945260e080820185905282518083039091018152610100909101909152805191012091565b50600081815260096020526040902054909150156131a55750600195945050505050565b50806131b08161577b565b915050613065565b50806131c38161577b565b915050613055565b5060009392505050565b6131dd6131e6565b61083481613bbc565b6000546001600160a01b031633146132405760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016108dc565b565b600b546601000000000000900460ff1615613289576040517fed3ba6a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff82166000908152600360209081526040808320815160608101835281546001600160a01b0390811682526001830154168185015260028201805484518187028101870186528181529295939486019383018282801561331a57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116132fc575b5050509190925250505067ffffffffffffffff80851660009081526004602090815260408083208151808301909252546bffffffffffffffffffffffff81168083526c01000000000000000000000000909104909416918101919091529293505b8360400151518110156134145760026000856040015183815181106133a2576133a261587d565b6020908102919091018101516001600160a01b03168252818101929092526040908101600090812067ffffffffffffffff8a168252909252902080547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001690558061340c8161577b565b91505061337b565b5067ffffffffffffffff8516600090815260036020526040812080547fffffffffffffffffffffffff0000000000000000000000000000000000000000908116825560018201805490911690559061346f6002830182614c62565b505067ffffffffffffffff8516600090815260046020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055600580548291906008906134df9084906801000000000000000090046bffffffffffffffffffffffff16615722565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb85836bffffffffffffffffffffffff166040518363ffffffff1660e01b815260040161357d9291906001600160a01b03929092168252602082015260400190565b602060405180830381600087803b15801561359757600080fd5b505af11580156135ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135cf9190614f44565b613605576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080516001600160a01b03861681526bffffffffffffffffffffffff8316602082015267ffffffffffffffff8716917fe8ed5b475a5b5987aa9165e8731bb78043f39eee32ec5a1169a89e27fcd49815910160405180910390a25050505050565b60004661367381613c7e565b156136f05760646001600160a01b031663a3b1b31d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156136b257600080fd5b505afa1580156136c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136ea9190614f66565b91505090565b4391505090565b6040805180820182526000918291829161372a919087906002908390839080828437600092019190915250612a16915050565b6000818152600660205260409020549093506001600160a01b03168061377f576040517f77f5b84c000000000000000000000000000000000000000000000000000000008152600481018590526024016108dc565b838660c0013560405160200161379f929190918252602082015260400190565b60408051601f19818403018152918152815160209283012060008181526009909352912054909350806137fe576040517f3688124a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b85516020808801516040808a015160608b015160808c0151925161386a968b96909594910195865267ffffffffffffffff948516602087015292909316604085015263ffffffff90811660608501529190911660808301526001600160a01b031660a082015260c00190565b6040516020818303038152906040528051906020012081146138b8576040517fd529142c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006138c78760000151613ca1565b9050806139d35786516040517fe9413d3800000000000000000000000000000000000000000000000000000000815267ffffffffffffffff90911660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e9413d389060240160206040518083038186803b15801561395357600080fd5b505afa158015613967573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061398b9190614f66565b9050806139d35786516040517f175dadad00000000000000000000000000000000000000000000000000000000815267ffffffffffffffff90911660048201526024016108dc565b6040805160c08a013560208083019190915281830184905282518083038401815260609092019092528051910120613a0b8982613da7565b9450505050509250925092565b60005a611388811015613a2a57600080fd5b611388810390508460408204820311613a4257600080fd5b50823b613a4e57600080fd5b60008083516020850160008789f1949350505050565b600080613a6f613e9d565b905060008113613aae576040517f43d4cf66000000000000000000000000000000000000000000000000000000008152600481018290526024016108dc565b6000613af06000368080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613fa492505050565b9050600082825a613b018b8b615658565b613b0b919061570b565b613b1590886156ce565b613b1f9190615658565b613b3190670de0b6b3a76400006156ce565b613b3b91906156ba565b90506000613b5463ffffffff881664e8d4a510006156ce565b9050613b6c816b033b2e3c9fd0803ce800000061570b565b821115613ba5576040517fe80fa38100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613baf8183615658565b9998505050505050505050565b6001600160a01b038116331415613c155760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016108dc565b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600061a4b1821480613c92575062066eed82145b80612a1057505062066eee1490565b600046613cad81613c7e565b15613d97576101008367ffffffffffffffff16613cc8613667565b613cd2919061570b565b1180613cef5750613ce1613667565b8367ffffffffffffffff1610155b15613cfd5750600092915050565b6040517f2b407a8200000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84166004820152606490632b407a82906024015b60206040518083038186803b158015613d5857600080fd5b505afa158015613d6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d909190614f66565b9392505050565b505067ffffffffffffffff164090565b604080518082018252600091613e679190859060029083908390808284376000920191909152505060408051808201825291508087019060029083908390808284376000920191909152505050608086013560a087013586613e106101008a0160e08b01614d82565b604080518082018252906101008c019060029083908390808284376000920191909152505060408051808201825291506101408d0190600290839083908082843760009201919091525050506101808c013561407f565b600383604001604051602001613e7e929190615522565b60408051601f1981840301815291905280516020909101209392505050565b600b54604080517ffeaf968c0000000000000000000000000000000000000000000000000000000081529051600092670100000000000000900463ffffffff169182151591849182917f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169163feaf968c9160048083019260a0929190829003018186803b158015613f3657600080fd5b505afa158015613f4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f6e919061523b565b509450909250849150508015613f925750613f89824261570b565b8463ffffffff16105b15613f9c5750600a545b949350505050565b600046613fb081613c7e565b15613fef57606c6001600160a01b031663c6f7de0e6040518163ffffffff1660e01b815260040160206040518083038186803b158015613d5857600080fd5b613ff8816142ba565b156140765773420000000000000000000000000000000000000f6001600160a01b03166349948e0e846040518060800160405280604881526020016158dc6048913960405160200161404b9291906152e0565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401613d4091906153d3565b50600092915050565b61408889614301565b6140d45760405162461bcd60e51b815260206004820152601a60248201527f7075626c6963206b6579206973206e6f74206f6e20637572766500000000000060448201526064016108dc565b6140dd88614301565b6141295760405162461bcd60e51b815260206004820152601560248201527f67616d6d61206973206e6f74206f6e206375727665000000000000000000000060448201526064016108dc565b61413283614301565b61417e5760405162461bcd60e51b815260206004820152601d60248201527f6347616d6d615769746e657373206973206e6f74206f6e20637572766500000060448201526064016108dc565b61418782614301565b6141d35760405162461bcd60e51b815260206004820152601c60248201527f73486173685769746e657373206973206e6f74206f6e2063757276650000000060448201526064016108dc565b6141df878a88876143da565b61422b5760405162461bcd60e51b815260206004820152601960248201527f6164647228632a706b2b732a6729213d5f755769746e6573730000000000000060448201526064016108dc565b60006142378a8761452b565b9050600061424a898b878b86898961458f565b9050600061425b838d8d8a866146bb565b9050808a146142ac5760405162461bcd60e51b815260206004820152600d60248201527f696e76616c69642070726f6f660000000000000000000000000000000000000060448201526064016108dc565b505050505050505050505050565b6000600a8214806142cc57506101a482145b806142d9575062aa37dc82145b806142e5575061210582145b806142f2575062014a3382145b80612a1057505062014a341490565b80516000906401000003d0191161435a5760405162461bcd60e51b815260206004820152601260248201527f696e76616c696420782d6f7264696e617465000000000000000000000000000060448201526064016108dc565b60208201516401000003d019116143b35760405162461bcd60e51b815260206004820152601260248201527f696e76616c696420792d6f7264696e617465000000000000000000000000000060448201526064016108dc565b60208201516401000003d0199080096143d38360005b60200201516146fb565b1492915050565b60006001600160a01b0382166144325760405162461bcd60e51b815260206004820152600b60248201527f626164207769746e65737300000000000000000000000000000000000000000060448201526064016108dc565b60208401516000906001161561444957601c61444c565b601b5b905060007ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd03641418587600060200201510986517ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141918203925060009190890987516040805160008082526020820180845287905260ff88169282019290925260608101929092526080820183905291925060019060a0016020604051602081039080840390855afa158015614503573d6000803e3d6000fd5b5050604051601f1901516001600160a01b039081169088161495505050505050949350505050565b614533614c80565b6145606001848460405160200161454c93929190615381565b60405160208183030381529060405261471f565b90505b61456c81614301565b612a10578051604080516020810192909252614588910161454c565b9050614563565b614597614c80565b825186516401000003d01990819006910614156145f65760405162461bcd60e51b815260206004820152601e60248201527f706f696e747320696e2073756d206d7573742062652064697374696e6374000060448201526064016108dc565b61460187898861476e565b61464d5760405162461bcd60e51b815260206004820152601660248201527f4669727374206d756c20636865636b206661696c65640000000000000000000060448201526064016108dc565b61465884868561476e565b6146a45760405162461bcd60e51b815260206004820152601760248201527f5365636f6e64206d756c20636865636b206661696c656400000000000000000060448201526064016108dc565b6146af8684846148b6565b98975050505050505050565b6000600286868685876040516020016146d99695949392919061530f565b60408051601f1981840301815291905280516020909101209695505050505050565b6000806401000003d01980848509840990506401000003d019600782089392505050565b614727614c80565b6147308261497d565b81526147456147408260006143c9565b6149b8565b602082018190526002900660011415614769576020810180516401000003d0190390525b919050565b6000826147bd5760405162461bcd60e51b815260206004820152600b60248201527f7a65726f207363616c617200000000000000000000000000000000000000000060448201526064016108dc565b835160208501516000906147d3906002906157dc565b156147df57601c6147e2565b601b5b905060007ffffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd03641418387096040805160008082526020820180845281905260ff86169282019290925260608101869052608081018390529192509060019060a0016020604051602081039080840390855afa158015614862573d6000803e3d6000fd5b50505060206040510351905060008660405160200161488191906152ce565b60408051601f1981840301815291905280516020909101206001600160a01b0392831692169190911498975050505050505050565b6148be614c80565b8351602080860151855191860151600093849384936148df939091906149d8565b919450925090506401000003d01985820960011461493f5760405162461bcd60e51b815260206004820152601960248201527f696e765a206d75737420626520696e7665727365206f66207a0000000000000060448201526064016108dc565b60405180604001604052806401000003d0198061495e5761495e61581f565b87860981526020016401000003d0198785099052979650505050505050565b805160208201205b6401000003d019811061476957604080516020808201939093528151808203840181529082019091528051910120614985565b6000612a108260026149d16401000003d0196001615658565b901c614ab8565b60008080600180826401000003d019896401000003d019038808905060006401000003d0198b6401000003d019038a0890506000614a1883838585614b78565b9098509050614a2988828e88614b9c565b9098509050614a3a88828c87614b9c565b90985090506000614a4d8d878b85614b9c565b9098509050614a5e88828686614b78565b9098509050614a6f88828e89614b9c565b9098509050818114614aa4576401000003d019818a0998506401000003d01982890997506401000003d0198183099650614aa8565b8196505b5050505050509450945094915050565b600080614ac3614c9e565b6020808252818101819052604082015260608101859052608081018490526401000003d01960a0820152614af5614cbc565b60208160c08460057ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa925082614b6e5760405162461bcd60e51b815260206004820152601260248201527f6269674d6f64457870206661696c75726521000000000000000000000000000060448201526064016108dc565b5195945050505050565b6000806401000003d0198487096401000003d0198487099097909650945050505050565b600080806401000003d019878509905060006401000003d01987876401000003d019030990506401000003d0198183086401000003d01986890990999098509650505050505050565b828054828255906000526020600020908101928215614c52579160200282015b82811115614c5257825182547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03909116178255602090920191600190910190614c05565b50614c5e929150614cda565b5090565b50805460008255906000526020600020908101906108349190614cda565b60405180604001604052806002906020820280368337509192915050565b6040518060c001604052806006906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b5b80821115614c5e5760008155600101614cdb565b80356001600160a01b038116811461476957600080fd5b8060408101831015612a1057600080fd5b803561ffff8116811461476957600080fd5b803562ffffff8116811461476957600080fd5b803563ffffffff8116811461476957600080fd5b803567ffffffffffffffff8116811461476957600080fd5b805169ffffffffffffffffffff8116811461476957600080fd5b600060208284031215614d9457600080fd5b613d9082614cef565b60008060608385031215614db057600080fd5b614db983614cef565b9150614dc88460208501614d06565b90509250929050565b60008060008060608587031215614de757600080fd5b614df085614cef565b935060208501359250604085013567ffffffffffffffff80821115614e1457600080fd5b818701915087601f830112614e2857600080fd5b813581811115614e3757600080fd5b886020828501011115614e4957600080fd5b95989497505060200194505050565b60008060408385031215614e6b57600080fd5b614e7483614cef565b915060208301356bffffffffffffffffffffffff81168114614e9557600080fd5b809150509250929050565b600060408284031215614eb257600080fd5b613d908383614d06565b600060408284031215614ece57600080fd5b82601f830112614edd57600080fd5b6040516040810181811067ffffffffffffffff82111715614f0057614f006158ac565b8060405250808385604086011115614f1757600080fd5b60005b6002811015614f39578135835260209283019290910190600101614f1a565b509195945050505050565b600060208284031215614f5657600080fd5b81518015158114613d9057600080fd5b600060208284031215614f7857600080fd5b5051919050565b600080600080600060a08688031215614f9757600080fd5b85359450614fa760208701614d50565b9350614fb560408701614d17565b9250614fc360608701614d3c565b9150614fd160808701614d3c565b90509295509295909350565b600080828403610240811215614ff257600080fd5b6101a08082121561500257600080fd5b84935060a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe608301121561503557600080fd5b61503d61560b565b915061504a818601614d50565b82525061505a6101c08501614d50565b602082015261506c6101e08501614d3c565b604082015261507e6102008501614d3c565b60608201526150906102208501614cef565b6080820152809150509250929050565b6000806000806000808688036101c08112156150bb57600080fd5b6150c488614d17565b96506150d260208901614d3c565b95506150e060408901614d3c565b94506150ee60608901614d3c565b935060808801359250610120807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff608301121561512957600080fd5b615131615634565b915061513f60a08a01614d3c565b825261514d60c08a01614d3c565b602083015261515e60e08a01614d3c565b6040830152610100615171818b01614d3c565b6060840152615181828b01614d3c565b60808401526151936101408b01614d29565b60a08401526151a56101608b01614d29565b60c08401526151b76101808b01614d29565b60e08401526151c96101a08b01614d29565b818401525050809150509295509295509295565b6000602082840312156151ef57600080fd5b5035919050565b60006020828403121561520857600080fd5b613d9082614d50565b6000806040838503121561522457600080fd5b61522d83614d50565b9150614dc860208401614cef565b600080600080600060a0868803121561525357600080fd5b61525c86614d68565b9450602086015193506040860151925060608601519150614fd160808701614d68565b8060005b60028110156109e5578151845260209384019390910190600101615283565b600081518084526152ba81602086016020860161574f565b601f01601f19169290920160200192915050565b6152d8818361527f565b604001919050565b600083516152f281846020880161574f565b83519083019061530681836020880161574f565b01949350505050565b86815261531f602082018761527f565b61532c606082018661527f565b61533960a082018561527f565b61534660e082018461527f565b60609190911b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166101208201526101340195945050505050565b838152615391602082018461527f565b606081019190915260800192915050565b60408101818360005b60028110156153ca5781518352602092830192909101906001016153ab565b50505092915050565b602081526000613d9060208301846152a2565b60006060820161ffff86168352602063ffffffff86168185015260606040850152818551808452608086019150828701935060005b818110156154375784518352938301939183019160010161541b565b509098975050505050505050565b60006101c08201905061ffff8816825263ffffffff808816602084015280871660408401528086166060840152846080840152835481811660a085015261549960c08501838360201c1663ffffffff169052565b6154b060e08501838360401c1663ffffffff169052565b6154c86101008501838360601c1663ffffffff169052565b6154e06101208501838360801c1663ffffffff169052565b62ffffff60a082901c811661014086015260b882901c811661016086015260d082901c1661018085015260e81c6101a090930192909252979650505050505050565b828152606081016040836020840137600081529392505050565b6000604082018483526020604081850152818551808452606086019150828701935060005b8181101561557d57845183529383019391830191600101615561565b5090979650505050505050565b6000608082016bffffffffffffffffffffffff87168352602067ffffffffffffffff8716818501526001600160a01b0380871660408601526080606086015282865180855260a087019150838801945060005b818110156155fb5785518416835294840194918401916001016155dd565b50909a9950505050505050505050565b60405160a0810167ffffffffffffffff8111828210171561562e5761562e6158ac565b60405290565b604051610120810167ffffffffffffffff8111828210171561562e5761562e6158ac565b6000821982111561566b5761566b6157f0565b500190565b600067ffffffffffffffff808316818516808303821115615306576153066157f0565b60006bffffffffffffffffffffffff808316818516808303821115615306576153066157f0565b6000826156c9576156c961581f565b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615615706576157066157f0565b500290565b60008282101561571d5761571d6157f0565b500390565b60006bffffffffffffffffffffffff83811690831681811015615747576157476157f0565b039392505050565b60005b8381101561576a578181015183820152602001615752565b838111156109e55750506000910152565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156157ad576157ad6157f0565b5060010190565b600067ffffffffffffffff808316818114156157d2576157d26157f0565b6001019392505050565b6000826157eb576157eb61581f565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfe307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666a164736f6c6343000806000a", } var VRFCoordinatorV2ABI = VRFCoordinatorV2MetaData.ABI 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 bd1a9a09201..b18ea06e3c9 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 @@ -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\":[],\"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: "0x60a06040523480156200001157600080fd5b5060405162005ffe38038062005ffe83398101604081905262000034916200017e565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be81620000d3565b5050506001600160a01b0316608052620001b0565b336001600160a01b038216036200012d5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000602082840312156200019157600080fd5b81516001600160a01b0381168114620001a957600080fd5b9392505050565b608051615e2b620001d3600039600081816105d201526134d00152615e2b6000f3fe60806040526004361061028c5760003560e01c80638402595e11610164578063b2a7cac5116100c6578063da2f26101161008a578063e72f6e3011610064578063e72f6e3014610904578063ee9d2d3814610924578063f2fde38b1461095157600080fd5b8063da2f261014610854578063dac83d29146108b3578063dc311dd3146108d357600080fd5b8063b2a7cac5146107b4578063bec4c08c146107d4578063caf70c4a146107f4578063cb63179714610814578063d98e620e1461083457600080fd5b80639d40a6fd11610128578063a63e0bfb11610102578063a63e0bfb14610747578063aa433aff14610767578063aefb212f1461078757600080fd5b80639d40a6fd146106da578063a21a23e414610712578063a4c0ed361461072757600080fd5b80638402595e1461064957806386fe91c7146106695780638da5cb5b1461068957806395b55cfc146106a75780639b1c385e146106ba57600080fd5b8063405b84fa1161020d57806364d51a2a116101d157806372e9d565116101ab57806372e9d565146105f457806379ba5097146106145780637a5a2aef1461062957600080fd5b806364d51a2a1461058b57806365982744146105a0578063689c4517146105c057600080fd5b8063405b84fa146104d057806340d6bb82146104f057806341af6c871461051b57806351cff8d91461054b5780635d06b4ab1461056b57600080fd5b806315c48b841161025457806315c48b84146103f157806318e3dd27146104195780631b6b6d23146104585780632f622e6b14610490578063301f42e9146104b057600080fd5b806304104edb14610291578063043bd6ae146102b3578063088070f5146102dc57806308821d58146103b15780630ae09540146103d1575b600080fd5b34801561029d57600080fd5b506102b16102ac3660046150bc565b610971565b005b3480156102bf57600080fd5b506102c960105481565b6040519081526020015b60405180910390f35b3480156102e857600080fd5b50600c546103549061ffff81169063ffffffff62010000820481169160ff660100000000000082048116926701000000000000008304811692600160581b8104821692600160781b8204831692600160981b83041691600160b81b8104821691600160c01b9091041689565b6040805161ffff909a168a5263ffffffff98891660208b01529615159689019690965293861660608801529185166080870152841660a08601529290921660c084015260ff91821660e084015216610100820152610120016102d3565b3480156103bd57600080fd5b506102b16103cc3660046150ea565b610aea565b3480156103dd57600080fd5b506102b16103ec366004615106565b610ca7565b3480156103fd57600080fd5b5061040660c881565b60405161ffff90911681526020016102d3565b34801561042557600080fd5b50600a5461044090600160601b90046001600160601b031681565b6040516001600160601b0390911681526020016102d3565b34801561046457600080fd5b50600254610478906001600160a01b031681565b6040516001600160a01b0390911681526020016102d3565b34801561049c57600080fd5b506102b16104ab3660046150bc565b610cef565b3480156104bc57600080fd5b506104406104cb366004615368565b610e3e565b3480156104dc57600080fd5b506102b16104eb366004615106565b611154565b3480156104fc57600080fd5b506105066101f481565b60405163ffffffff90911681526020016102d3565b34801561052757600080fd5b5061053b610536366004615456565b611536565b60405190151581526020016102d3565b34801561055757600080fd5b506102b16105663660046150bc565b6115ea565b34801561057757600080fd5b506102b16105863660046150bc565b61176c565b34801561059757600080fd5b50610406606481565b3480156105ac57600080fd5b506102b16105bb36600461546f565b61182a565b3480156105cc57600080fd5b506104787f000000000000000000000000000000000000000000000000000000000000000081565b34801561060057600080fd5b50600354610478906001600160a01b031681565b34801561062057600080fd5b506102b161188a565b34801561063557600080fd5b506102b161064436600461549d565b61193b565b34801561065557600080fd5b506102b16106643660046150bc565b611a6f565b34801561067557600080fd5b50600a54610440906001600160601b031681565b34801561069557600080fd5b506000546001600160a01b0316610478565b6102b16106b5366004615456565b611b8a565b3480156106c657600080fd5b506102c96106d53660046154d1565b611cae565b3480156106e657600080fd5b506007546106fa906001600160401b031681565b6040516001600160401b0390911681526020016102d3565b34801561071e57600080fd5b506102c96120f4565b34801561073357600080fd5b506102b161074236600461550b565b6122db565b34801561075357600080fd5b506102b16107623660046155b6565b612457565b34801561077357600080fd5b506102b1610782366004615456565b61273e565b34801561079357600080fd5b506107a76107a2366004615657565b612786565b6040516102d391906156b4565b3480156107c057600080fd5b506102b16107cf366004615456565b612888565b3480156107e057600080fd5b506102b16107ef366004615106565b61298c565b34801561080057600080fd5b506102c961080f3660046156c7565b612a7f565b34801561082057600080fd5b506102b161082f366004615106565b612aaf565b34801561084057600080fd5b506102c961084f366004615456565b612d1d565b34801561086057600080fd5b5061089461086f366004615456565b600d6020526000908152604090205460ff81169061010090046001600160401b031682565b6040805192151583526001600160401b039091166020830152016102d3565b3480156108bf57600080fd5b506102b16108ce366004615106565b612d3e565b3480156108df57600080fd5b506108f36108ee366004615456565b612dd8565b6040516102d395949392919061571c565b34801561091057600080fd5b506102b161091f3660046150bc565b612ec6565b34801561093057600080fd5b506102c961093f366004615456565b600f6020526000908152604090205481565b34801561095d57600080fd5b506102b161096c3660046150bc565b613087565b610979613098565b60115460005b81811015610abd57826001600160a01b0316601182815481106109a4576109a4615771565b6000918252602090912001546001600160a01b031603610aad5760116109cb60018461579d565b815481106109db576109db615771565b600091825260209091200154601180546001600160a01b039092169183908110610a0757610a07615771565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506011805480610a4657610a466157b0565b6000828152602090819020600019908301810180546001600160a01b03191690559091019091556040516001600160a01b03851681527ff80a1a97fd42251f3c33cda98635e7399253033a6774fe37cd3f650b5282af3791015b60405180910390a1505050565b610ab6816157c6565b905061097f565b50604051635428d44960e01b81526001600160a01b03831660048201526024015b60405180910390fd5b50565b610af2613098565b604080518082018252600091610b21919084906002908390839080828437600092019190915250612a7f915050565b6000818152600d602090815260409182902082518084019093525460ff811615158084526101009091046001600160401b03169183019190915291925090610b7f57604051631dfd6e1360e21b815260048101839052602401610ade565b6000828152600d60205260408120805468ffffffffffffffffff19169055600e54905b81811015610c515783600e8281548110610bbe57610bbe615771565b906000526020600020015403610c4157600e610bdb60018461579d565b81548110610beb57610beb615771565b9060005260206000200154600e8281548110610c0957610c09615771565b600091825260209091200155600e805480610c2657610c266157b0565b60019003818190600052602060002001600090559055610c51565b610c4a816157c6565b9050610ba2565b507f9b6868e0eb737bcd72205360baa6bfd0ba4e4819a33ade2db384e8a8025639a5838360200151604051610c999291909182526001600160401b0316602082015260400190565b60405180910390a150505050565b81610cb1816130f4565b610cb961315e565b610cc283611536565b15610ce057604051631685ecdd60e31b815260040160405180910390fd5b610cea838361318c565b505050565b610cf761315e565b610cff613098565b600b54600160601b90046001600160601b0316600003610d3257604051631e9acf1760e31b815260040160405180910390fd5b600b8054600160601b90046001600160601b0316908190600c610d5583806157df565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555080600a600c8282829054906101000a90046001600160601b0316610d9d91906157df565b92506101000a8154816001600160601b0302191690836001600160601b031602179055506000826001600160a01b0316826001600160601b031660405160006040518083038185875af1925050503d8060008114610e17576040519150601f19603f3d011682016040523d82523d6000602084013e610e1c565b606091505b5050905080610cea5760405163950b247960e01b815260040160405180910390fd5b6000610e4861315e565b60005a9050610324361115610e7a57604051630f28961b60e01b81523660048201526103246024820152604401610ade565b6000610e868686613332565b90506000610e9c858360000151602001516135e3565b60408301516060888101519293509163ffffffff16806001600160401b03811115610ec957610ec9615136565b604051908082528060200260200182016040528015610ef2578160200160208202803683370190505b50925060005b81811015610f5a5760408051602081018590529081018290526060016040516020818303038152906040528051906020012060001c848281518110610f3f57610f3f615771565b6020908102919091010152610f53816157c6565b9050610ef8565b5050602080850180516000908152600f9092526040822082905551610f80908a8561363e565b60208a8101516000908152600690915260409020805491925090601890610fb690600160c01b90046001600160401b03166157ff565b82546101009290920a6001600160401b0381810219909316918316021790915560808a01516001600160a01b03166000908152600460209081526040808320828e0151845290915290208054909160099161101991600160481b90910416615825565b91906101000a8154816001600160401b0302191690836001600160401b0316021790555060008960a0015160018b60a0015151611056919061579d565b8151811061106657611066615771565b60209101015160f81c600114905060006110828887848d6136e2565b909950905080156110cd5760208088015160105460408051928352928201527f6ca648a381f22ead7e37773d934e64885dcf861fbfbb26c40354cbf0c4662d1a910160405180910390a15b506110dd88828c6020015161371a565b6020808b015187820151604080518781526001600160601b038d16948101949094528415159084015284151560608401528b1515608084015290917faeb4b4786571e184246d39587f659abf0e26f41f6a3358692250382c0cdb47b79060a00160405180910390a3505050505050505b9392505050565b61115c61315e565b61116581613887565b61118d57604051635428d44960e01b81526001600160a01b0382166004820152602401610ade565b60008060008061119c86612dd8565b945094505093509350336001600160a01b0316826001600160a01b0316146112065760405162461bcd60e51b815260206004820152601660248201527f4e6f7420737562736372697074696f6e206f776e6572000000000000000000006044820152606401610ade565b61120f86611536565b1561125c5760405162461bcd60e51b815260206004820152601660248201527f50656e64696e67207265717565737420657869737473000000000000000000006044820152606401610ade565b6040805160c0810182526001815260208082018990526001600160a01b03851682840152606082018490526001600160601b038088166080840152861660a0830152915190916000916112b191849101615848565b60405160208183030381529060405290506112cb886138f2565b505060405163ce3f471960e01b81526001600160a01b0388169063ce3f4719906001600160601b0388169061130490859060040161590d565b6000604051808303818588803b15801561131d57600080fd5b505af1158015611331573d6000803e3d6000fd5b50506002546001600160a01b03161580159350915061135a905057506001600160601b03861615155b1561142a5760025460405163a9059cbb60e01b81526001600160a01b0389811660048301526001600160601b03891660248301529091169063a9059cbb906044016020604051808303816000875af11580156113ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113de9190615920565b61142a5760405162461bcd60e51b815260206004820152601260248201527f696e73756666696369656e742066756e647300000000000000000000000000006044820152606401610ade565b600c805466ff0000000000001916660100000000000017905560005b83518110156114d95783818151811061146157611461615771565b6020908102919091010151604051638ea9811760e01b81526001600160a01b038a8116600483015290911690638ea9811790602401600060405180830381600087803b1580156114b057600080fd5b505af11580156114c4573d6000803e3d6000fd5b50505050806114d2906157c6565b9050611446565b50600c805466ff00000000000019169055604080516001600160a01b0389168152602081018a90527fd63ca8cb945956747ee69bfdc3ea754c24a4caf7418db70e46052f7850be4187910160405180910390a15050505050505050565b6000818152600560205260408120600201805480830361155a575060009392505050565b60005b818110156115df5760006004600085848154811061157d5761157d615771565b60009182526020808320909101546001600160a01b0316835282810193909352604091820181208982529092529020546001600160401b03600160481b9091041611156115cf57506001949350505050565b6115d8816157c6565b905061155d565b506000949350505050565b6115f261315e565b6115fa613098565b6002546001600160a01b03166116235760405163c1f0c0a160e01b815260040160405180910390fd5b600b546001600160601b031660000361164f57604051631e9acf1760e31b815260040160405180910390fd5b600b80546001600160601b0316908190600061166b83806157df565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555080600a60008282829054906101000a90046001600160601b03166116b391906157df565b82546101009290920a6001600160601b0381810219909316918316021790915560025460405163a9059cbb60e01b81526001600160a01b03868116600483015292851660248201529116915063a9059cbb906044016020604051808303816000875af1158015611727573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061174b9190615920565b61176857604051631e9acf1760e31b815260040160405180910390fd5b5050565b611774613098565b61177d81613887565b156117a65760405163ac8a27ef60e01b81526001600160a01b0382166004820152602401610ade565b601180546001810182556000919091527f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c680180546001600160a01b0319166001600160a01b0383169081179091556040519081527fb7cabbfc11e66731fc77de0444614282023bcbd41d16781c753a431d0af016259060200160405180910390a150565b611832613098565b6002546001600160a01b03161561185c57604051631688c53760e11b815260040160405180910390fd5b600280546001600160a01b039384166001600160a01b03199182161790915560038054929093169116179055565b6001546001600160a01b031633146118e45760405162461bcd60e51b815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610ade565b60008054336001600160a01b0319808316821784556001805490911690556040516001600160a01b0390921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b611943613098565b604080518082018252600091611972919085906002908390839080828437600092019190915250612a7f915050565b6000818152600d602052604090205490915060ff16156119a857604051634a0b8fa760e01b815260048101829052602401610ade565b60408051808201825260018082526001600160401b0385811660208085018281526000888152600d835287812096518754925168ffffffffffffffffff1990931690151568ffffffffffffffff00191617610100929095169190910293909317909455600e805493840181559091527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd9091018490558251848152918201527f9b911b2c240bfbef3b6a8f7ed6ee321d1258bb2a3fe6becab52ac1cd3210afd39101610aa0565b611a77613098565b600a544790600160601b90046001600160601b031681811115611ab7576040516354ced18160e11b81526004810182905260248101839052604401610ade565b81811015610cea576000611acb828461579d565b90506000846001600160a01b03168260405160006040518083038185875af1925050503d8060008114611b1a576040519150601f19603f3d011682016040523d82523d6000602084013e611b1f565b606091505b5050905080611b415760405163950b247960e01b815260040160405180910390fd5b604080516001600160a01b0387168152602081018490527f4aed7c8eed0496c8c19ea2681fcca25741c1602342e38b045d9f1e8e905d2e9c910160405180910390a15050505050565b611b9261315e565b6000818152600560205260409020546001600160a01b0316611bc757604051630fb532db60e11b815260040160405180910390fd5b60008181526006602052604090208054600160601b90046001600160601b0316903490600c611bf6838561593d565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555034600a600c8282829054906101000a90046001600160601b0316611c3e919061593d565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550817f7603b205d03651ee812f803fccde89f1012e545a9c99f0abfea9cedd0fd8e902823484611c91919061595d565b604080519283526020830191909152015b60405180910390a25050565b6000611cb861315e565b602080830135600081815260059092526040909120546001600160a01b0316611cf457604051630fb532db60e11b815260040160405180910390fd5b336000908152600460209081526040808320848452808352928190208151606081018352905460ff811615158083526001600160401b036101008304811695840195909552600160481b9091049093169181019190915290611d72576040516379bfd40160e01b815260048101849052336024820152604401610ade565b600c5461ffff16611d896060870160408801615970565b61ffff161080611dac575060c8611da66060870160408801615970565b61ffff16115b15611df257611dc16060860160408701615970565b600c5460405163539c34bb60e11b815261ffff92831660048201529116602482015260c86044820152606401610ade565b600c5462010000900463ffffffff16611e11608087016060880161598b565b63ffffffff161115611e6157611e2d608086016060870161598b565b600c54604051637aebf00f60e11b815263ffffffff9283166004820152620100009091049091166024820152604401610ade565b6101f4611e7460a087016080880161598b565b63ffffffff161115611eba57611e9060a086016080870161598b565b6040516311ce1afb60e21b815263ffffffff90911660048201526101f46024820152604401610ade565b806020018051611ec9906157ff565b6001600160401b03169052604081018051611ee3906157ff565b6001600160401b03908116909152602082810151604080518935818501819052338284015260608201899052929094166080808601919091528151808603909101815260a08501825280519084012060c085019290925260e08085018390528151808603909101815261010090940190528251929091019190912060009190955090506000611f85611f80611f7b60a08a018a6159a6565b613aa4565b613b25565b905085611f90613b96565b86611fa160808b0160608c0161598b565b611fb160a08c0160808d0161598b565b3386604051602001611fc997969594939291906159f3565b60405160208183030381529060405280519060200120600f600088815260200190815260200160002081905550336001600160a01b03168588600001357feb0e3652e0f44f417695e6e90f2f42c99b65cd7169074c5a654b16b9748c3a4e89868c604001602081019061203c9190615970565b8d606001602081019061204f919061598b565b8e6080016020810190612062919061598b565b8960405161207596959493929190615a4a565b60405180910390a45050600092835260209182526040928390208151815493830151929094015168ffffffffffffffffff1990931693151568ffffffffffffffff001916939093176101006001600160401b03928316021770ffffffffffffffff0000000000000000001916600160481b91909216021790555b919050565b60006120fe61315e565b6007546001600160401b03163361211660014361579d565b6040516bffffffffffffffffffffffff19606093841b81166020830152914060348201523090921b1660548201526001600160c01b031960c083901b16606882015260700160408051601f1981840301815291905280516020909101209150612180816001615a89565b6007805467ffffffffffffffff19166001600160401b03928316179055604080516000808252608082018352602080830182815283850183815260608086018581528a86526006855287862093518454935191516001600160601b039182166001600160c01b031990951694909417600160601b91909216021777ffffffffffffffffffffffffffffffffffffffffffffffff16600160c01b9290981691909102969096179055835194850184523385528481018281528585018481528884526005835294909220855181546001600160a01b03199081166001600160a01b0392831617835593516001830180549095169116179092559251805192949391926122909260028501920190614faa565b506122a091506008905084613c17565b5060405133815283907f1d3015d7ba850fa198dc7b1a3f5d42779313a681035f77c8c03764c61005518d9060200160405180910390a2505090565b6122e361315e565b6002546001600160a01b0316331461230e576040516344b0e3c360e01b815260040160405180910390fd5b6020811461232f57604051638129bbcd60e01b815260040160405180910390fd5b600061233d82840184615456565b6000818152600560205260409020549091506001600160a01b031661237557604051630fb532db60e11b815260040160405180910390fd5b600081815260066020526040812080546001600160601b03169186919061239c838561593d565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555084600a60008282829054906101000a90046001600160601b03166123e4919061593d565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550817f1ced9348ff549fceab2ac57cd3a9de38edaaab274b725ee82c23e8fc8c4eec7a828784612437919061595d565b6040805192835260208301919091520160405180910390a2505050505050565b61245f613098565b60c861ffff8a1611156124995760405163539c34bb60e11b815261ffff8a1660048201819052602482015260c86044820152606401610ade565b600085136124bd576040516321ea67b360e11b815260048101869052602401610ade565b8363ffffffff168363ffffffff1611156124fa576040516313c06e5960e11b815263ffffffff808516600483015285166024820152604401610ade565b609b60ff8316111561252b57604051631d66288d60e11b815260ff83166004820152609b6024820152604401610ade565b609b60ff8216111561255c57604051631d66288d60e11b815260ff82166004820152609b6024820152604401610ade565b604080516101208101825261ffff8b1680825263ffffffff808c16602084018190526000848601528b8216606085018190528b8316608086018190528a841660a08701819052938a1660c0870181905260ff808b1660e08901819052908a16610100909801889052600c8054600160c01b90990260ff60c01b19600160b81b9093029290921661ffff60b81b19600160981b90940263ffffffff60981b19600160781b9099029890981676ffffffffffffffff00000000000000000000000000000019600160581b9096026effffffff000000000000000000000019670100000000000000909802979097166effffffffffffffffff000000000000196201000090990265ffffffffffff19909c16909a179a909a1796909616979097179390931791909116959095179290921793909316929092179190911790556010869055517f2c6b6b12413678366b05b145c5f00745bdd00e739131ab5de82484a50c9d78b69061272b908b908b908b908b908b908b908b908b908b9061ffff99909916895263ffffffff97881660208a0152958716604089015293861660608801526080870192909252841660a086015290921660c084015260ff91821660e0840152166101008201526101200190565b60405180910390a1505050505050505050565b612746613098565b6000818152600560205260409020546001600160a01b03168061277c57604051630fb532db60e11b815260040160405180910390fd5b611768828261318c565b606060006127946008613c23565b90508084106127b657604051631390f2a160e01b815260040160405180910390fd5b60006127c2848661595d565b9050818111806127d0575083155b6127da57806127dc565b815b905060006127ea868361579d565b9050806001600160401b0381111561280457612804615136565b60405190808252806020026020018201604052801561282d578160200160208202803683370190505b50935060005b8181101561287d57612850612848888361595d565b600890613c2d565b85828151811061286257612862615771565b6020908102919091010152612876816157c6565b9050612833565b505050505b92915050565b61289061315e565b6000818152600560205260409020546001600160a01b0316806128c657604051630fb532db60e11b815260040160405180910390fd5b6000828152600560205260409020600101546001600160a01b0316331461291f576000828152600560205260409081902060010154905163d084e97560e01b81526001600160a01b039091166004820152602401610ade565b6000828152600560209081526040918290208054336001600160a01b03199182168117835560019092018054909116905582516001600160a01b03851681529182015283917fd4114ab6e9af9f597c52041f32d62dc57c5c4e4c0d4427006069635e216c93869101611ca2565b81612996816130f4565b61299e61315e565b6001600160a01b03821660009081526004602090815260408083208684529091529020805460ff16156129d15750505050565b6000848152600560205260409020600201805460631901612a05576040516305a48e0f60e01b815260040160405180910390fd5b8154600160ff199091168117835581549081018255600082815260209081902090910180546001600160a01b0319166001600160a01b03871690811790915560405190815286917f1e980d04aa7648e205713e5e8ea3808672ac163d10936d36f91b2c88ac1575e191015b60405180910390a25050505050565b600081604051602001612a929190615acc565b604051602081830303815290604052805190602001209050919050565b81612ab9816130f4565b612ac161315e565b612aca83611536565b15612ae857604051631685ecdd60e31b815260040160405180910390fd5b6001600160a01b038216600090815260046020908152604080832086845290915290205460ff16612b3e576040516379bfd40160e01b8152600481018490526001600160a01b0383166024820152604401610ade565b600083815260056020908152604080832060020180548251818502810185019093528083529192909190830182828015612ba157602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612b83575b50505050509050600060018251612bb8919061579d565b905060005b8251811015612cc157846001600160a01b0316838281518110612be257612be2615771565b60200260200101516001600160a01b031603612cb1576000838381518110612c0c57612c0c615771565b6020026020010151905080600560008981526020019081526020016000206002018381548110612c3e57612c3e615771565b600091825260208083209190910180546001600160a01b0319166001600160a01b039490941693909317909255888152600590915260409020600201805480612c8957612c896157b0565b600082815260209020810160001990810180546001600160a01b031916905501905550612cc1565b612cba816157c6565b9050612bbd565b506001600160a01b0384166000818152600460209081526040808320898452825291829020805460ff19169055905191825286917f32158c6058347c1601b2d12bc696ac6901d8a9a9aa3ba10c27ab0a983e8425a79101612a70565b600e8181548110612d2d57600080fd5b600091825260209091200154905081565b81612d48816130f4565b612d5061315e565b600083815260056020526040902060018101546001600160a01b03848116911614612dd2576001810180546001600160a01b0319166001600160a01b03851690811790915560408051338152602081019290925285917f21a4dad170a6bf476c31bbcf4a16628295b0e450672eec25d7c93308e05344a1910160405180910390a25b50505050565b600081815260056020526040812054819081906001600160a01b0316606081612e1457604051630fb532db60e11b815260040160405180910390fd5b600086815260066020908152604080832054600583529281902060020180548251818502810185019093528083526001600160601b0380861695600160601b810490911694600160c01b9091046001600160401b0316938893929091839190830182828015612eac57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612e8e575b505050505090509450945094509450945091939590929450565b612ece613098565b6002546001600160a01b0316612ef75760405163c1f0c0a160e01b815260040160405180910390fd5b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015612f40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f649190615ada565b600a549091506001600160601b031681811115612f9e576040516354ced18160e11b81526004810182905260248101839052604401610ade565b81811015610cea576000612fb2828461579d565b60025460405163a9059cbb60e01b81526001600160a01b0387811660048301526024820184905292935091169063a9059cbb906044016020604051808303816000875af1158015613007573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061302b9190615920565b61304857604051631f01ff1360e21b815260040160405180910390fd5b604080516001600160a01b0386168152602081018390527f59bfc682b673f8cbf945f1e454df9334834abf7dfe7f92237ca29ecb9b4366009101610c99565b61308f613098565b610ae781613c39565b6000546001600160a01b031633146130f25760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610ade565b565b6000818152600560205260409020546001600160a01b03168061312a57604051630fb532db60e11b815260040160405180910390fd5b336001600160a01b0382161461176857604051636c51fda960e11b81526001600160a01b0382166004820152602401610ade565b600c546601000000000000900460ff16156130f25760405163769dd35360e11b815260040160405180910390fd5b600080613198846138f2565b60025491935091506001600160a01b0316158015906131bf57506001600160601b03821615155b156132605760025460405163a9059cbb60e01b81526001600160a01b0385811660048301526001600160601b03851660248301529091169063a9059cbb906044016020604051808303816000875af115801561321f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132439190615920565b61326057604051631e9acf1760e31b815260040160405180910390fd5b6000836001600160a01b0316826001600160601b031660405160006040518083038185875af1925050503d80600081146132b6576040519150601f19603f3d011682016040523d82523d6000602084013e6132bb565b606091505b50509050806132dd5760405163950b247960e01b815260040160405180910390fd5b604080516001600160a01b03861681526001600160601b03808616602083015284169181019190915285907f8c74ce8b8cf87f5eb001275c8be27eb34ea2b62bfab6814fcc62192bb63e81c490606001612a70565b6040805160a0810182526000606082018181526080830182905282526020820181905291810191909152600061336b8460000151612a7f565b6000818152600d602090815260409182902082518084019093525460ff811615158084526101009091046001600160401b031691830191909152919250906133c957604051631dfd6e1360e21b815260048101839052602401610ade565b60008286608001516040516020016133eb929190918252602082015260400190565b60408051601f1981840301815291815281516020928301206000818152600f909352908220549092509081900361343557604051631b44092560e11b815260040160405180910390fd5b85516020808801516040808a015160608b015160808c015160a08d01519351613464978a979096959101615af3565b6040516020818303038152906040528051906020012081146134995760405163354a450b60e21b815260040160405180910390fd5b60006134a88760000151613ce2565b905080613571578651604051631d2827a760e31b81526001600160401b0390911660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e9413d3890602401602060405180830381865afa15801561351f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135439190615ada565b90508061357157865160405163175dadad60e01b81526001600160401b039091166004820152602401610ade565b6000886080015182604051602001613593929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c905060006135ba8a83613db5565b604080516060810182529788526020880196909652948601949094525092979650505050505050565b6000816001600160401b03163a111561363657821561360c57506001600160401b038116612882565b60405163435e532d60e11b81523a60048201526001600160401b0383166024820152604401610ade565b503a92915050565b6000806000631fe543e360e01b868560405160240161365e929190615b46565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252600c805466ff000000000000191666010000000000001790559086015160808701519192506136c89163ffffffff9091169083613e20565b600c805466ff000000000000191690559695505050505050565b6000808315613701576136f6868685613e6c565b600091509150613711565b61370c868685613f7d565b915091505b94509492505050565b600081815260066020526040902082156137ee5780546001600160601b03600160601b909104811690851681101561376557604051631e9acf1760e31b815260040160405180910390fd5b61376f85826157df565b82547fffffffffffffffff000000000000000000000000ffffffffffffffffffffffff16600160601b6001600160601b039283168102919091178455600b805488939192600c926137c492869290041661593d565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555050612dd2565b80546001600160601b0390811690851681101561381e57604051631e9acf1760e31b815260040160405180910390fd5b61382885826157df565b82546bffffffffffffffffffffffff19166001600160601b03918216178355600b8054879260009161385c9185911661593d565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505050505050565b601154600090815b818110156138e857836001600160a01b0316601182815481106138b4576138b4615771565b6000918252602090912001546001600160a01b0316036138d8575060019392505050565b6138e1816157c6565b905061388f565b5060009392505050565b60008181526005602090815260408083206006909252822054600290910180546001600160601b0380841694600160601b90940416925b8181101561399e576004600084838154811061394757613947615771565b60009182526020808320909101546001600160a01b0316835282810193909352604091820181208982529092529020805470ffffffffffffffffffffffffffffffffff19169055613997816157c6565b9050613929565b50600085815260056020526040812080546001600160a01b031990811682556001820180549091169055906139d6600283018261500f565b50506000858152600660205260408120556139f260088661416f565b506001600160601b03841615613a4557600a8054859190600090613a209084906001600160601b03166157df565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b6001600160601b03831615613a9d5782600a600c8282829054906101000a90046001600160601b0316613a7891906157df565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b5050915091565b6040805160208101909152600081526000829003613ad15750604080516020810190915260008152612882565b63125fa26760e31b613ae38385615b67565b6001600160e01b03191614613b0b57604051632923fee760e11b815260040160405180910390fd5b613b188260048186615b97565b81019061114d9190615bc1565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa82604051602401613b5e91511515815260200190565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915292915050565b600046613ba28161417b565b15613c105760646001600160a01b031663a3b1b31d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613be6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c0a9190615ada565b91505090565b4391505090565b600061114d838361419e565b6000612882825490565b600061114d83836141ed565b336001600160a01b03821603613c915760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610ade565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600046613cee8161417b565b15613da657610100836001600160401b0316613d08613b96565b613d12919061579d565b1180613d2e5750613d21613b96565b836001600160401b031610155b15613d3c5750600092915050565b6040516315a03d4160e11b81526001600160401b0384166004820152606490632b407a82906024015b602060405180830381865afa158015613d82573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061114d9190615ada565b50506001600160401b03164090565b6000613de98360000151846020015185604001518660600151868860a001518960c001518a60e001518b6101000151614217565b60038360200151604051602001613e01929190615c0c565b60408051601f1981840301815291905280516020909101209392505050565b60005a611388811015613e3257600080fd5b611388810390508460408204820311613e4a57600080fd5b50823b613e5657600080fd5b60008083516020850160008789f1949350505050565b600080613eaf6000368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061444292505050565b905060005a600c54613ecf908890600160581b900463ffffffff1661595d565b613ed9919061579d565b613ee39086615c20565b600c54909150600090613f0890600160781b900463ffffffff1664e8d4a51000615c20565b90508415613f5457600c548190606490600160b81b900460ff16613f2c858761595d565b613f369190615c20565b613f409190615c4d565b613f4a919061595d565b935050505061114d565b600c548190606490613f7090600160b81b900460ff1682615c61565b60ff16613f2c858761595d565b600080600080613f8b614522565b9150915060008213613fb3576040516321ea67b360e11b815260048101839052602401610ade565b6000613ff56000368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061444292505050565b9050600083825a600c54614017908d90600160581b900463ffffffff1661595d565b614021919061579d565b61402b908b615c20565b614035919061595d565b61404790670de0b6b3a7640000615c20565b6140519190615c4d565b600c5490915060009061407a9063ffffffff600160981b8204811691600160781b900416615c7a565b61408f9063ffffffff1664e8d4a51000615c20565b90506000856140a683670de0b6b3a7640000615c20565b6140b09190615c4d565b9050600089156140f157600c5482906064906140d690600160c01b900460ff1687615c20565b6140e09190615c4d565b6140ea919061595d565b9050614131565b600c54829060649061410d90600160c01b900460ff1682615c61565b61411a9060ff1687615c20565b6141249190615c4d565b61412e919061595d565b90505b6b033b2e3c9fd0803ce800000081111561415e5760405163e80fa38160e01b815260040160405180910390fd5b9b949a509398505050505050505050565b600061114d83836145ed565b600061a4b182148061418f575062066eed82145b8061288257505062066eee1490565b60008181526001830160205260408120546141e557508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612882565b506000612882565b600082600001828154811061420457614204615771565b9060005260206000200154905092915050565b614220896146e7565b61426c5760405162461bcd60e51b815260206004820152601a60248201527f7075626c6963206b6579206973206e6f74206f6e2063757276650000000000006044820152606401610ade565b614275886146e7565b6142c15760405162461bcd60e51b815260206004820152601560248201527f67616d6d61206973206e6f74206f6e20637572766500000000000000000000006044820152606401610ade565b6142ca836146e7565b6143165760405162461bcd60e51b815260206004820152601d60248201527f6347616d6d615769746e657373206973206e6f74206f6e2063757276650000006044820152606401610ade565b61431f826146e7565b61436b5760405162461bcd60e51b815260206004820152601c60248201527f73486173685769746e657373206973206e6f74206f6e206375727665000000006044820152606401610ade565b614377878a88876147c0565b6143c35760405162461bcd60e51b815260206004820152601960248201527f6164647228632a706b2b732a6729213d5f755769746e657373000000000000006044820152606401610ade565b60006143cf8a876148e3565b905060006143e2898b878b868989614947565b905060006143f3838d8d8a86614a73565b9050808a146144345760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b210383937b7b360991b6044820152606401610ade565b505050505050505050505050565b60004661444e8161417b565b1561449257606c6001600160a01b031663c6f7de0e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613d82573d6000803e3d6000fd5b61449b81614ab3565b156145195773420000000000000000000000000000000000000f6001600160a01b03166349948e0e84604051806080016040528060488152602001615dd7604891396040516020016144ee929190615c97565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401613d65919061590d565b50600092915050565b600c5460035460408051633fabe5a360e21b81529051600093849367010000000000000090910463ffffffff169284926001600160a01b039092169163feaf968c9160048082019260a0929091908290030181865afa158015614589573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145ad9190615ce0565b50919650909250505063ffffffff8216158015906145d957506145d0814261579d565b8263ffffffff16105b925082156145e75760105493505b50509091565b600081815260018301602052604081205480156146d657600061461160018361579d565b85549091506000906146259060019061579d565b905081811461468a57600086600001828154811061464557614645615771565b906000526020600020015490508087600001848154811061466857614668615771565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061469b5761469b6157b0565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050612882565b6000915050612882565b5092915050565b80516000906401000003d019116147405760405162461bcd60e51b815260206004820152601260248201527f696e76616c696420782d6f7264696e61746500000000000000000000000000006044820152606401610ade565b60208201516401000003d019116147995760405162461bcd60e51b815260206004820152601260248201527f696e76616c696420792d6f7264696e61746500000000000000000000000000006044820152606401610ade565b60208201516401000003d0199080096147b98360005b6020020151614afa565b1492915050565b60006001600160a01b0382166148065760405162461bcd60e51b815260206004820152600b60248201526a626164207769746e65737360a81b6044820152606401610ade565b60208401516000906001161561481d57601c614820565b601b5b9050600070014551231950b75fc4402da1732fc9bebe1985876000602002015109865170014551231950b75fc4402da1732fc9bebe19918203925060009190890987516040805160008082526020820180845287905260ff88169282019290925260608101929092526080820183905291925060019060a0016020604051602081039080840390855afa1580156148bb573d6000803e3d6000fd5b5050604051601f1901516001600160a01b039081169088161495505050505050949350505050565b6148eb61502d565b6149186001848460405160200161490493929190615d30565b604051602081830303815290604052614b1e565b90505b614924816146e7565b6128825780516040805160208101929092526149409101614904565b905061491b565b61494f61502d565b825186516401000003d01991829006919006036149ae5760405162461bcd60e51b815260206004820152601e60248201527f706f696e747320696e2073756d206d7573742062652064697374696e637400006044820152606401610ade565b6149b9878988614b6b565b614a055760405162461bcd60e51b815260206004820152601660248201527f4669727374206d756c20636865636b206661696c6564000000000000000000006044820152606401610ade565b614a10848685614b6b565b614a5c5760405162461bcd60e51b815260206004820152601760248201527f5365636f6e64206d756c20636865636b206661696c65640000000000000000006044820152606401610ade565b614a67868484614c96565b98975050505050505050565b600060028686868587604051602001614a9196959493929190615d51565b60408051601f1981840301815291905280516020909101209695505050505050565b6000600a821480614ac557506101a482145b80614ad2575062aa37dc82145b80614ade575061210582145b80614aeb575062014a3382145b8061288257505062014a341490565b6000806401000003d01980848509840990506401000003d019600782089392505050565b614b2661502d565b614b2f82614d5d565b8152614b44614b3f8260006147af565b614d98565b60208201819052600290066001036120ef576020810180516401000003d019039052919050565b600082600003614bab5760405162461bcd60e51b815260206004820152600b60248201526a3d32b9379039b1b0b630b960a91b6044820152606401610ade565b83516020850151600090614bc190600290615db0565b15614bcd57601c614bd0565b601b5b9050600070014551231950b75fc4402da1732fc9bebe198387096040805160008082526020820180845281905260ff86169282019290925260608101869052608081018390529192509060019060a0016020604051602081039080840390855afa158015614c42573d6000803e3d6000fd5b505050602060405103519050600086604051602001614c619190615dc4565b60408051601f1981840301815291905280516020909101206001600160a01b0392831692169190911498975050505050505050565b614c9e61502d565b835160208086015185519186015160009384938493614cbf93909190614db8565b919450925090506401000003d019858209600114614d1f5760405162461bcd60e51b815260206004820152601960248201527f696e765a206d75737420626520696e7665727365206f66207a000000000000006044820152606401610ade565b60405180604001604052806401000003d01980614d3e57614d3e615c37565b87860981526020016401000003d0198785099052979650505050505050565b805160208201205b6401000003d01981106120ef57604080516020808201939093528151808203840181529082019091528051910120614d65565b6000612882826002614db16401000003d019600161595d565b901c614e98565b60008080600180826401000003d019896401000003d019038808905060006401000003d0198b6401000003d019038a0890506000614df883838585614f3d565b9098509050614e0988828e88614f61565b9098509050614e1a88828c87614f61565b90985090506000614e2d8d878b85614f61565b9098509050614e3e88828686614f3d565b9098509050614e4f88828e89614f61565b9098509050818114614e84576401000003d019818a0998506401000003d01982890997506401000003d0198183099650614e88565b8196505b5050505050509450945094915050565b600080614ea361504b565b6020808252818101819052604082015260608101859052608081018490526401000003d01960a0820152614ed5615069565b60208160c0846005600019fa925082600003614f335760405162461bcd60e51b815260206004820152601260248201527f6269674d6f64457870206661696c7572652100000000000000000000000000006044820152606401610ade565b5195945050505050565b6000806401000003d0198487096401000003d0198487099097909650945050505050565b600080806401000003d019878509905060006401000003d01987876401000003d019030990506401000003d0198183086401000003d01986890990999098509650505050505050565b828054828255906000526020600020908101928215614fff579160200282015b82811115614fff57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190614fca565b5061500b929150615087565b5090565b5080546000825590600052602060002090810190610ae79190615087565b60405180604001604052806002906020820280368337509192915050565b6040518060c001604052806006906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b5b8082111561500b5760008155600101615088565b6001600160a01b0381168114610ae757600080fd5b80356120ef8161509c565b6000602082840312156150ce57600080fd5b813561114d8161509c565b806040810183101561288257600080fd5b6000604082840312156150fc57600080fd5b61114d83836150d9565b6000806040838503121561511957600080fd5b82359150602083013561512b8161509c565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60405160c081016001600160401b038111828210171561516e5761516e615136565b60405290565b60405161012081016001600160401b038111828210171561516e5761516e615136565b604051601f8201601f191681016001600160401b03811182821017156151bf576151bf615136565b604052919050565b600082601f8301126151d857600080fd5b604051604081018181106001600160401b03821117156151fa576151fa615136565b806040525080604084018581111561521157600080fd5b845b8181101561522b578035835260209283019201615213565b509195945050505050565b80356001600160401b03811681146120ef57600080fd5b803563ffffffff811681146120ef57600080fd5b600060c0828403121561527357600080fd5b61527b61514c565b905061528682615236565b81526020808301358183015261529e6040840161524d565b60408301526152af6060840161524d565b606083015260808301356152c28161509c565b608083015260a08301356001600160401b03808211156152e157600080fd5b818501915085601f8301126152f557600080fd5b81358181111561530757615307615136565b615319601f8201601f19168501615197565b9150808252868482850101111561532f57600080fd5b80848401858401376000848284010152508060a085015250505092915050565b8015158114610ae757600080fd5b80356120ef8161534f565b60008060008385036101e081121561537f57600080fd5b6101a08082121561538f57600080fd5b615397615174565b91506153a387876151c7565b82526153b287604088016151c7565b60208301526080860135604083015260a0860135606083015260c086013560808301526153e160e087016150b1565b60a08301526101006153f5888289016151c7565b60c08401526154088861014089016151c7565b60e0840152610180870135908301529093508401356001600160401b0381111561543157600080fd5b61543d86828701615261565b92505061544d6101c0850161535d565b90509250925092565b60006020828403121561546857600080fd5b5035919050565b6000806040838503121561548257600080fd5b823561548d8161509c565b9150602083013561512b8161509c565b600080606083850312156154b057600080fd5b6154ba84846150d9565b91506154c860408401615236565b90509250929050565b6000602082840312156154e357600080fd5b81356001600160401b038111156154f957600080fd5b820160c0818503121561114d57600080fd5b6000806000806060858703121561552157600080fd5b843561552c8161509c565b93506020850135925060408501356001600160401b038082111561554f57600080fd5b818701915087601f83011261556357600080fd5b81358181111561557257600080fd5b88602082850101111561558457600080fd5b95989497505060200194505050565b803561ffff811681146120ef57600080fd5b803560ff811681146120ef57600080fd5b60008060008060008060008060006101208a8c0312156155d557600080fd5b6155de8a615593565b98506155ec60208b0161524d565b97506155fa60408b0161524d565b965061560860608b0161524d565b955060808a0135945061561d60a08b0161524d565b935061562b60c08b0161524d565b925061563960e08b016155a5565b91506156486101008b016155a5565b90509295985092959850929598565b6000806040838503121561566a57600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b838110156156a95781518752958201959082019060010161568d565b509495945050505050565b60208152600061114d6020830184615679565b6000604082840312156156d957600080fd5b61114d83836151c7565b600081518084526020808501945080840160005b838110156156a95781516001600160a01b0316875295820195908201906001016156f7565b60006001600160601b0380881683528087166020840152506001600160401b03851660408301526001600160a01b038416606083015260a0608083015261576660a08301846156e3565b979650505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561288257612882615787565b634e487b7160e01b600052603160045260246000fd5b6000600182016157d8576157d8615787565b5060010190565b6001600160601b038281168282160390808211156146e0576146e0615787565b60006001600160401b0380831681810361581b5761581b615787565b6001019392505050565b60006001600160401b0382168061583e5761583e615787565b6000190192915050565b6020815260ff8251166020820152602082015160408201526001600160a01b0360408301511660608201526000606083015160c0608084015261588e60e08401826156e3565b905060808401516001600160601b0380821660a08601528060a08701511660c086015250508091505092915050565b60005b838110156158d85781810151838201526020016158c0565b50506000910152565b600081518084526158f98160208601602086016158bd565b601f01601f19169290920160200192915050565b60208152600061114d60208301846158e1565b60006020828403121561593257600080fd5b815161114d8161534f565b6001600160601b038181168382160190808211156146e0576146e0615787565b8082018082111561288257612882615787565b60006020828403121561598257600080fd5b61114d82615593565b60006020828403121561599d57600080fd5b61114d8261524d565b6000808335601e198436030181126159bd57600080fd5b8301803591506001600160401b038211156159d757600080fd5b6020019150368190038213156159ec57600080fd5b9250929050565b878152866020820152856040820152600063ffffffff80871660608401528086166080840152506001600160a01b03841660a083015260e060c0830152615a3d60e08301846158e1565b9998505050505050505050565b86815285602082015261ffff85166040820152600063ffffffff808616606084015280851660808401525060c060a0830152614a6760c08301846158e1565b6001600160401b038181168382160190808211156146e0576146e0615787565b8060005b6002811015612dd2578151845260209384019390910190600101615aad565b604081016128828284615aa9565b600060208284031215615aec57600080fd5b5051919050565b8781526001600160401b0387166020820152856040820152600063ffffffff80871660608401528086166080840152506001600160a01b03841660a083015260e060c0830152615a3d60e08301846158e1565b828152604060208201526000615b5f6040830184615679565b949350505050565b6001600160e01b03198135818116916004851015615b8f5780818660040360031b1b83161692505b505092915050565b60008085851115615ba757600080fd5b83861115615bb457600080fd5b5050820193919092039150565b600060208284031215615bd357600080fd5b604051602081018181106001600160401b0382111715615bf557615bf5615136565b6040528235615c038161534f565b81529392505050565b8281526060810161114d6020830184615aa9565b808202811582820484141761288257612882615787565b634e487b7160e01b600052601260045260246000fd5b600082615c5c57615c5c615c37565b500490565b60ff818116838216019081111561288257612882615787565b63ffffffff8281168282160390808211156146e0576146e0615787565b60008351615ca98184602088016158bd565b835190830190615cbd8183602088016158bd565b01949350505050565b805169ffffffffffffffffffff811681146120ef57600080fd5b600080600080600060a08688031215615cf857600080fd5b615d0186615cc6565b9450602086015193506040860151925060608601519150615d2460808701615cc6565b90509295509295909350565b838152615d406020820184615aa9565b606081019190915260800192915050565b868152615d616020820187615aa9565b615d6e6060820186615aa9565b615d7b60a0820185615aa9565b615d8860e0820184615aa9565b60609190911b6bffffffffffffffffffffffff19166101208201526101340195945050505050565b600082615dbf57615dbf615c37565b500690565b615dce8183615aa9565b60400191905056fe307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666a164736f6c6343000813000a", + 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\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"L1GasFee\",\"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: "0x60a06040523480156200001157600080fd5b506040516200583b3803806200583b83398101604081905262000034916200017e565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be81620000d3565b5050506001600160a01b0316608052620001b0565b336001600160a01b038216036200012d5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000602082840312156200019157600080fd5b81516001600160a01b0381168114620001a957600080fd5b9392505050565b608051615668620001d3600039600081816105d201526131b601526156686000f3fe60806040526004361061028c5760003560e01c80638402595e11610164578063b2a7cac5116100c6578063da2f26101161008a578063e72f6e3011610064578063e72f6e3014610904578063ee9d2d3814610924578063f2fde38b1461095157600080fd5b8063da2f261014610854578063dac83d29146108b3578063dc311dd3146108d357600080fd5b8063b2a7cac5146107b4578063bec4c08c146107d4578063caf70c4a146107f4578063cb63179714610814578063d98e620e1461083457600080fd5b80639d40a6fd11610128578063a63e0bfb11610102578063a63e0bfb14610747578063aa433aff14610767578063aefb212f1461078757600080fd5b80639d40a6fd146106da578063a21a23e414610712578063a4c0ed361461072757600080fd5b80638402595e1461064957806386fe91c7146106695780638da5cb5b1461068957806395b55cfc146106a75780639b1c385e146106ba57600080fd5b8063405b84fa1161020d57806364d51a2a116101d157806372e9d565116101ab57806372e9d565146105f457806379ba5097146106145780637a5a2aef1461062957600080fd5b806364d51a2a1461058b57806365982744146105a0578063689c4517146105c057600080fd5b8063405b84fa146104d057806340d6bb82146104f057806341af6c871461051b57806351cff8d91461054b5780635d06b4ab1461056b57600080fd5b806315c48b841161025457806315c48b84146103f157806318e3dd27146104195780631b6b6d23146104585780632f622e6b14610490578063301f42e9146104b057600080fd5b806304104edb14610291578063043bd6ae146102b3578063088070f5146102dc57806308821d58146103b15780630ae09540146103d1575b600080fd5b34801561029d57600080fd5b506102b16102ac366004614b98565b610971565b005b3480156102bf57600080fd5b506102c960105481565b6040519081526020015b60405180910390f35b3480156102e857600080fd5b50600c546103549061ffff81169063ffffffff62010000820481169160ff660100000000000082048116926701000000000000008304811692600160581b8104821692600160781b8204831692600160981b83041691600160b81b8104821691600160c01b9091041689565b6040805161ffff909a168a5263ffffffff98891660208b01529615159689019690965293861660608801529185166080870152841660a08601529290921660c084015260ff91821660e084015216610100820152610120016102d3565b3480156103bd57600080fd5b506102b16103cc366004614bc6565b610aea565b3480156103dd57600080fd5b506102b16103ec366004614be2565b610c83565b3480156103fd57600080fd5b5061040660c881565b60405161ffff90911681526020016102d3565b34801561042557600080fd5b50600a5461044090600160601b90046001600160601b031681565b6040516001600160601b0390911681526020016102d3565b34801561046457600080fd5b50600254610478906001600160a01b031681565b6040516001600160a01b0390911681526020016102d3565b34801561049c57600080fd5b506102b16104ab366004614b98565b610ccb565b3480156104bc57600080fd5b506104406104cb366004614c38565b610d71565b3480156104dc57600080fd5b506102b16104eb366004614be2565b6110c2565b3480156104fc57600080fd5b506105066101f481565b60405163ffffffff90911681526020016102d3565b34801561052757600080fd5b5061053b610536366004614ca4565b611410565b60405190151581526020016102d3565b34801561055757600080fd5b506102b1610566366004614b98565b6114b2565b34801561057757600080fd5b506102b1610586366004614b98565b611593565b34801561059757600080fd5b50610406606481565b3480156105ac57600080fd5b506102b16105bb366004614cbd565b611651565b3480156105cc57600080fd5b506104787f000000000000000000000000000000000000000000000000000000000000000081565b34801561060057600080fd5b50600354610478906001600160a01b031681565b34801561062057600080fd5b506102b16116b1565b34801561063557600080fd5b506102b1610644366004614d02565b611762565b34801561065557600080fd5b506102b1610664366004614b98565b611872565b34801561067557600080fd5b50600a54610440906001600160601b031681565b34801561069557600080fd5b506000546001600160a01b0316610478565b6102b16106b5366004614ca4565b61198d565b3480156106c657600080fd5b506102c96106d5366004614d36565b611a9d565b3480156106e657600080fd5b506007546106fa906001600160401b031681565b6040516001600160401b0390911681526020016102d3565b34801561071e57600080fd5b506102c9611ec8565b34801561073357600080fd5b506102b1610742366004614d72565b6120af565b34801561075357600080fd5b506102b1610762366004614e31565b612217565b34801561077357600080fd5b506102b1610782366004614ca4565b6124eb565b34801561079357600080fd5b506107a76107a2366004614ed2565b61251e565b6040516102d39190614f2f565b3480156107c057600080fd5b506102b16107cf366004614ca4565b612620565b3480156107e057600080fd5b506102b16107ef366004614be2565b61270f565b34801561080057600080fd5b506102c961080f366004614bc6565b612802565b34801561082057600080fd5b506102b161082f366004614be2565b612832565b34801561084057600080fd5b506102c961084f366004614ca4565b612a32565b34801561086057600080fd5b5061089461086f366004614ca4565b600d6020526000908152604090205460ff81169061010090046001600160401b031682565b6040805192151583526001600160401b039091166020830152016102d3565b3480156108bf57600080fd5b506102b16108ce366004614be2565b612a53565b3480156108df57600080fd5b506108f36108ee366004614ca4565b612aee565b6040516102d3959493929190614f7b565b34801561091057600080fd5b506102b161091f366004614b98565b612bc7565b34801561093057600080fd5b506102c961093f366004614ca4565b600f6020526000908152604090205481565b34801561095d57600080fd5b506102b161096c366004614b98565b612d88565b610979612d99565b60115460005b81811015610abd57826001600160a01b0316601182815481106109a4576109a4614fd0565b6000918252602090912001546001600160a01b031603610aad5760116109cb600184614ffc565b815481106109db576109db614fd0565b600091825260209091200154601180546001600160a01b039092169183908110610a0757610a07614fd0565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506011805480610a4657610a4661500f565b6000828152602090819020600019908301810180546001600160a01b03191690559091019091556040516001600160a01b03851681527ff80a1a97fd42251f3c33cda98635e7399253033a6774fe37cd3f650b5282af3791015b60405180910390a1505050565b610ab681615025565b905061097f565b50604051635428d44960e01b81526001600160a01b03831660048201526024015b60405180910390fd5b50565b610af2612d99565b6000610afd82612802565b6000818152600d602090815260409182902082518084019093525460ff811615158084526101009091046001600160401b03169183019190915291925090610b5b57604051631dfd6e1360e21b815260048101839052602401610ade565b6000828152600d60205260408120805468ffffffffffffffffff19169055600e54905b81811015610c2d5783600e8281548110610b9a57610b9a614fd0565b906000526020600020015403610c1d57600e610bb7600184614ffc565b81548110610bc757610bc7614fd0565b9060005260206000200154600e8281548110610be557610be5614fd0565b600091825260209091200155600e805480610c0257610c0261500f565b60019003818190600052602060002001600090559055610c2d565b610c2681615025565b9050610b7e565b507f9b6868e0eb737bcd72205360baa6bfd0ba4e4819a33ade2db384e8a8025639a5838360200151604051610c759291909182526001600160401b0316602082015260400190565b60405180910390a150505050565b81610c8d81612df5565b610c95612e4a565b610c9e83611410565b15610cbc57604051631685ecdd60e31b815260040160405180910390fd5b610cc68383612e78565b505050565b610cd3612e4a565b610cdb612d99565b600b54600160601b90046001600160601b0316610cf9811515612f5b565b600b80546bffffffffffffffffffffffff60601b19169055600a8054829190600c90610d36908490600160601b90046001600160601b031661503e565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550610d6d82826001600160601b0316612f79565b5050565b6000610d7b612e4a565b60005a9050610324361115610dad57604051630f28961b60e01b81523660048201526103246024820152604401610ade565b6000610db98686612fed565b90506000610dcf858360000151602001516132ec565b60408301519091506060906000610deb60808a018a850161505e565b63ffffffff169050806001600160401b03811115610e0b57610e0b615079565b604051908082528060200260200182016040528015610e34578160200160208202803683370190505b50925060005b81811015610e9c5760408051602081018590529081018290526060016040516020818303038152906040528051906020012060001c848281518110610e8157610e81614fd0565b6020908102919091010152610e9581615025565b9050610e3a565b5050602080850180516000908152600f9092526040822082905551610ec2908a85613347565b60208a8101356000908152600690915260409020805491925090601890610ef890600160c01b90046001600160401b031661508f565b91906101000a8154816001600160401b0302191690836001600160401b03160217905550600460008a6080016020810190610f339190614b98565b6001600160a01b03168152602080820192909252604090810160009081208c840135825290925290208054600990610f7a90600160481b90046001600160401b03166150b5565b91906101000a8154816001600160401b0302191690836001600160401b031602179055506000898060a00190610fb091906150d8565b6001610fbf60a08e018e6150d8565b610fca929150614ffc565b818110610fd957610fd9614fd0565b9091013560f81c600114915060009050610ff58887848d6133fe565b909950905080156110405760208088015160105460408051928352928201527f6ca648a381f22ead7e37773d934e64885dcf861fbfbb26c40354cbf0c4662d1a910160405180910390a15b5061105088828c60200135613436565b602086810151604080518681526001600160601b038c16818501528415158183015285151560608201528c151560808201529051928d0135927faeb4b4786571e184246d39587f659abf0e26f41f6a3358692250382c0cdb47b79181900360a00190a3505050505050505b9392505050565b6110ca612e4a565b6110d38161356b565b6110fb57604051635428d44960e01b81526001600160a01b0382166004820152602401610ade565b60008060008061110a86612aee565b945094505093509350336001600160a01b0316826001600160a01b03161461115057604051636c51fda960e11b81526001600160a01b0383166004820152602401610ade565b61115986611410565b1561117757604051631685ecdd60e31b815260040160405180910390fd5b6040805160c0810182526001815260208082018990526001600160a01b03851682840152606082018490526001600160601b038088166080840152861660a0830152915190916000916111cc91849101615125565b60405160208183030381529060405290506111e6886135d6565b505060405163ce3f471960e01b81526001600160a01b0388169063ce3f4719906001600160601b0388169061121f9085906004016151e0565b6000604051808303818588803b15801561123857600080fd5b505af115801561124c573d6000803e3d6000fd5b50506002546001600160a01b031615801593509150611275905057506001600160601b03861615155b156113015760025460405163a9059cbb60e01b81526001600160a01b0389811660048301526001600160601b038916602483015261130192169063a9059cbb906044015b6020604051808303816000875af11580156112d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112fc91906151f3565b612f5b565b600c805466ff00000000000019166601000000000000179055825160005b818110156113b15784818151811061133957611339614fd0565b6020908102919091010151604051638ea9811760e01b81526001600160a01b038b8116600483015290911690638ea9811790602401600060405180830381600087803b15801561138857600080fd5b505af115801561139c573d6000803e3d6000fd5b50505050806113aa90615025565b905061131f565b50600c805466ff00000000000019169055604080516001600160a01b038a168152602081018b90527fd63ca8cb945956747ee69bfdc3ea754c24a4caf7418db70e46052f7850be418791015b60405180910390a1505050505050505050565b60008181526005602052604081206002018054825b818110156114a75760006004600085848154811061144557611445614fd0565b60009182526020808320909101546001600160a01b0316835282810193909352604091820181208982529092529020546001600160401b03600160481b90910416111561149757506001949350505050565b6114a081615025565b9050611425565b506000949350505050565b6114ba612e4a565b6114c2612d99565b6002546001600160a01b03166114eb5760405163c1f0c0a160e01b815260040160405180910390fd5b600b546001600160601b0316611502811515612f5b565b600b80546bffffffffffffffffffffffff19169055600a80548291906000906115359084906001600160601b031661503e565b82546101009290920a6001600160601b0381810219909316918316021790915560025460405163a9059cbb60e01b81526001600160a01b0386811660048301529285166024820152610d6d935091169063a9059cbb906044016112b9565b61159b612d99565b6115a48161356b565b156115cd5760405163ac8a27ef60e01b81526001600160a01b0382166004820152602401610ade565b601180546001810182556000919091527f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c680180546001600160a01b0319166001600160a01b0383169081179091556040519081527fb7cabbfc11e66731fc77de0444614282023bcbd41d16781c753a431d0af016259060200160405180910390a150565b611659612d99565b6002546001600160a01b03161561168357604051631688c53760e11b815260040160405180910390fd5b600280546001600160a01b039384166001600160a01b03199182161790915560038054929093169116179055565b6001546001600160a01b0316331461170b5760405162461bcd60e51b815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610ade565b60008054336001600160a01b0319808316821784556001805490911690556040516001600160a01b0390921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b61176a612d99565b600061177583612802565b6000818152600d602052604090205490915060ff16156117ab57604051634a0b8fa760e01b815260048101829052602401610ade565b60408051808201825260018082526001600160401b0385811660208085018281526000888152600d835287812096518754925168ffffffffffffffffff1990931690151568ffffffffffffffff00191617610100929095169190910293909317909455600e805493840181559091527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd9091018490558251848152918201527f9b911b2c240bfbef3b6a8f7ed6ee321d1258bb2a3fe6becab52ac1cd3210afd39101610aa0565b61187a612d99565b600a544790600160601b90046001600160601b0316818111156118ba576040516354ced18160e11b81526004810182905260248101839052604401610ade565b81811015610cc65760006118ce8284614ffc565b90506000846001600160a01b03168260405160006040518083038185875af1925050503d806000811461191d576040519150601f19603f3d011682016040523d82523d6000602084013e611922565b606091505b50509050806119445760405163950b247960e01b815260040160405180910390fd5b604080516001600160a01b0387168152602081018490527f4aed7c8eed0496c8c19ea2681fcca25741c1602342e38b045d9f1e8e905d2e9c910160405180910390a15050505050565b611995612e4a565b6000818152600560205260409020546119b6906001600160a01b0316613788565b60008181526006602052604090208054600160601b90046001600160601b0316903490600c6119e58385615210565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555034600a600c8282829054906101000a90046001600160601b0316611a2d9190615210565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550817f7603b205d03651ee812f803fccde89f1012e545a9c99f0abfea9cedd0fd8e902823484611a809190615230565b604080519283526020830191909152015b60405180910390a25050565b6000611aa7612e4a565b60208083013560008181526005909252604090912054611acf906001600160a01b0316613788565b336000908152600460209081526040808320848452808352928190208151606081018352905460ff811615158083526001600160401b036101008304811695840195909552600160481b9091049093169181019190915290611b4d576040516379bfd40160e01b815260048101849052336024820152604401610ade565b600c5461ffff16611b646060870160408801615243565b61ffff161080611b87575060c8611b816060870160408801615243565b61ffff16115b15611bcd57611b9c6060860160408701615243565b600c5460405163539c34bb60e11b815261ffff92831660048201529116602482015260c86044820152606401610ade565b600c5462010000900463ffffffff16611bec608087016060880161505e565b63ffffffff161115611c3c57611c08608086016060870161505e565b600c54604051637aebf00f60e11b815263ffffffff9283166004820152620100009091049091166024820152604401610ade565b6101f4611c4f60a087016080880161505e565b63ffffffff161115611c9557611c6b60a086016080870161505e565b6040516311ce1afb60e21b815263ffffffff90911660048201526101f46024820152604401610ade565b806020018051611ca49061508f565b6001600160401b03169052604081018051611cbe9061508f565b6001600160401b03908116909152602082810151604080518935818501819052338284015260608201899052929094166080808601919091528151808603909101815260a08501825280519084012060c085019290925260e08085018390528151808603909101815261010090940190528251929091019190912060009190955090506000611d60611d5b611d5660a08a018a6150d8565b6137af565b613830565b9050854386611d7560808b0160608c0161505e565b611d8560a08c0160808d0161505e565b3386604051602001611d9d979695949392919061525e565b60405160208183030381529060405280519060200120600f600088815260200190815260200160002081905550336001600160a01b03168588600001357feb0e3652e0f44f417695e6e90f2f42c99b65cd7169074c5a654b16b9748c3a4e89868c6040016020810190611e109190615243565b8d6060016020810190611e23919061505e565b8e6080016020810190611e36919061505e565b89604051611e49969594939291906152b5565b60405180910390a45050600092835260209182526040928390208151815493830151929094015168ffffffffffffffffff1990931693151568ffffffffffffffff001916939093176101006001600160401b03928316021770ffffffffffffffff0000000000000000001916600160481b91909216021790555b919050565b6000611ed2612e4a565b6007546001600160401b031633611eea600143614ffc565b6040516bffffffffffffffffffffffff19606093841b81166020830152914060348201523090921b1660548201526001600160c01b031960c083901b16606882015260700160408051601f1981840301815291905280516020909101209150611f548160016152f4565b6007805467ffffffffffffffff19166001600160401b03928316179055604080516000808252608082018352602080830182815283850183815260608086018581528a86526006855287862093518454935191516001600160601b039182166001600160c01b031990951694909417600160601b91909216021777ffffffffffffffffffffffffffffffffffffffffffffffff16600160c01b9290981691909102969096179055835194850184523385528481018281528585018481528884526005835294909220855181546001600160a01b03199081166001600160a01b0392831617835593516001830180549095169116179092559251805192949391926120649260028501920190614a91565b50612074915060089050846138a1565b5060405133815283907f1d3015d7ba850fa198dc7b1a3f5d42779313a681035f77c8c03764c61005518d9060200160405180910390a2505090565b6120b7612e4a565b6002546001600160a01b031633146120e2576040516344b0e3c360e01b815260040160405180910390fd5b6020811461210357604051638129bbcd60e01b815260040160405180910390fd5b600061211182840184614ca4565b600081815260056020526040902054909150612135906001600160a01b0316613788565b600081815260066020526040812080546001600160601b03169186919061215c8385615210565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555084600a60008282829054906101000a90046001600160601b03166121a49190615210565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550817f1ced9348ff549fceab2ac57cd3a9de38edaaab274b725ee82c23e8fc8c4eec7a8287846121f79190615230565b6040805192835260208301919091520160405180910390a2505050505050565b61221f612d99565b60c861ffff8a1611156122595760405163539c34bb60e11b815261ffff8a1660048201819052602482015260c86044820152606401610ade565b6000851361227d576040516321ea67b360e11b815260048101869052602401610ade565b8363ffffffff168363ffffffff1611156122ba576040516313c06e5960e11b815263ffffffff808516600483015285166024820152604401610ade565b609b60ff831611156122eb57604051631d66288d60e11b815260ff83166004820152609b6024820152604401610ade565b609b60ff8216111561231c57604051631d66288d60e11b815260ff82166004820152609b6024820152604401610ade565b604080516101208101825261ffff8b1680825263ffffffff808c16602084018190526000848601528b8216606085018190528b8316608086018190528a841660a08701819052938a1660c0870181905260ff808b1660e08901819052908a16610100909801889052600c8054600160c01b90990260ff60c01b19600160b81b9093029290921661ffff60b81b19600160981b90940263ffffffff60981b19600160781b9099029890981676ffffffffffffffff00000000000000000000000000000019600160581b9096026effffffff000000000000000000000019670100000000000000909802979097166effffffffffffffffff000000000000196201000090990265ffffffffffff19909c16909a179a909a1796909616979097179390931791909116959095179290921793909316929092179190911790556010869055517f2c6b6b12413678366b05b145c5f00745bdd00e739131ab5de82484a50c9d78b6906113fd908b908b908b908b908b908b908b908b908b9061ffff99909916895263ffffffff97881660208a0152958716604089015293861660608801526080870192909252841660a086015290921660c084015260ff91821660e0840152166101008201526101200190565b6124f3612d99565b6000818152600560205260409020546001600160a01b031661251481613788565b610d6d8282612e78565b6060600061252c60086138ad565b905080841061254e57604051631390f2a160e01b815260040160405180910390fd5b600061255a8486615230565b905081811180612568575083155b6125725780612574565b815b905060006125828683614ffc565b9050806001600160401b0381111561259c5761259c615079565b6040519080825280602002602001820160405280156125c5578160200160208202803683370190505b50935060005b81811015612615576125e86125e08883615230565b6008906138b7565b8582815181106125fa576125fa614fd0565b602090810291909101015261260e81615025565b90506125cb565b505050505b92915050565b612628612e4a565b6000818152600560205260409020546001600160a01b031661264981613788565b6000828152600560205260409020600101546001600160a01b031633146126a2576000828152600560205260409081902060010154905163d084e97560e01b81526001600160a01b039091166004820152602401610ade565b6000828152600560209081526040918290208054336001600160a01b03199182168117835560019092018054909116905582516001600160a01b03851681529182015283917fd4114ab6e9af9f597c52041f32d62dc57c5c4e4c0d4427006069635e216c93869101611a91565b8161271981612df5565b612721612e4a565b6001600160a01b03821660009081526004602090815260408083208684529091529020805460ff16156127545750505050565b6000848152600560205260409020600201805460631901612788576040516305a48e0f60e01b815260040160405180910390fd5b8154600160ff199091168117835581549081018255600082815260209081902090910180546001600160a01b0319166001600160a01b03871690811790915560405190815286917f1e980d04aa7648e205713e5e8ea3808672ac163d10936d36f91b2c88ac1575e191015b60405180910390a25050505050565b6000816040516020016128159190615314565b604051602081830303815290604052805190602001209050919050565b8161283c81612df5565b612844612e4a565b61284d83611410565b1561286b57604051631685ecdd60e31b815260040160405180910390fd5b6001600160a01b038216600090815260046020908152604080832086845290915290205460ff166128c1576040516379bfd40160e01b8152600481018490526001600160a01b0383166024820152604401610ade565b6000838152600560205260408120600201805490915b818110156129d657846001600160a01b03168382815481106128fb576128fb614fd0565b6000918252602090912001546001600160a01b0316036129c65782612921600184614ffc565b8154811061293157612931614fd0565b9060005260206000200160009054906101000a90046001600160a01b031683828154811061296157612961614fd0565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055508280548061299f5761299f61500f565b600082815260209020810160001990810180546001600160a01b03191690550190556129d6565b6129cf81615025565b90506128d7565b506001600160a01b0384166000818152600460209081526040808320898452825291829020805460ff19169055905191825286917f32158c6058347c1601b2d12bc696ac6901d8a9a9aa3ba10c27ab0a983e8425a791016127f3565b600e8181548110612a4257600080fd5b600091825260209091200154905081565b81612a5d81612df5565b612a65612e4a565b600083815260056020526040902060018101546001600160a01b03848116911614612ae8576001810180546001600160a01b0319166001600160a01b03851690811790915560408051338152602081019290925285917f21a4dad170a6bf476c31bbcf4a16628295b0e450672eec25d7c93308e05344a191015b60405180910390a25b50505050565b600081815260056020526040812054819081906001600160a01b03166060612b1582613788565b600086815260066020908152604080832054600583529281902060020180548251818502810185019093528083526001600160601b0380861695600160601b810490911694600160c01b9091046001600160401b0316938893929091839190830182828015612bad57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612b8f575b505050505090509450945094509450945091939590929450565b612bcf612d99565b6002546001600160a01b0316612bf85760405163c1f0c0a160e01b815260040160405180910390fd5b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015612c41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c659190615323565b600a549091506001600160601b031681811115612c9f576040516354ced18160e11b81526004810182905260248101839052604401610ade565b81811015610cc6576000612cb38284614ffc565b60025460405163a9059cbb60e01b81526001600160a01b0387811660048301526024820184905292935091169063a9059cbb906044016020604051808303816000875af1158015612d08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d2c91906151f3565b612d4957604051631f01ff1360e21b815260040160405180910390fd5b604080516001600160a01b0386168152602081018390527f59bfc682b673f8cbf945f1e454df9334834abf7dfe7f92237ca29ecb9b4366009101610c75565b612d90612d99565b610ae7816138c3565b6000546001600160a01b03163314612df35760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610ade565b565b6000818152600560205260409020546001600160a01b0316612e1681613788565b336001600160a01b03821614610d6d57604051636c51fda960e11b81526001600160a01b0382166004820152602401610ade565b600c546601000000000000900460ff1615612df35760405163769dd35360e11b815260040160405180910390fd5b600080612e84846135d6565b60025491935091506001600160a01b031615801590612eab57506001600160601b03821615155b15612ef35760025460405163a9059cbb60e01b81526001600160a01b0385811660048301526001600160601b0385166024830152612ef392169063a9059cbb906044016112b9565b612f0683826001600160601b0316612f79565b604080516001600160a01b03851681526001600160601b03808516602083015283169181019190915284907f8c74ce8b8cf87f5eb001275c8be27eb34ea2b62bfab6814fcc62192bb63e81c490606001612adf565b80610ae757604051631e9acf1760e31b815260040160405180910390fd5b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612fc6576040519150601f19603f3d011682016040523d82523d6000602084013e612fcb565b606091505b5050905080610cc65760405163950b247960e01b815260040160405180910390fd5b6040805160a081018252600060608201818152608083018290528252602082018190529181018290529061302084612802565b6000818152600d602090815260409182902082518084019093525460ff811615158084526101009091046001600160401b0316918301919091529192509061307e57604051631dfd6e1360e21b815260048101839052602401610ade565b6000828660c001356040516020016130a0929190918252602082015260400190565b60408051601f1981840301815291815281516020928301206000818152600f90935290822054909250908190036130ea57604051631b44092560e11b815260040160405180910390fd5b816130f8602088018861533c565b602088013561310d60608a0160408b0161505e565b61311d60808b0160608c0161505e565b61312d60a08c0160808d01614b98565b61313a60a08d018d6150d8565b604051602001613151989796959493929190615357565b6040516020818303038152906040528051906020012081146131865760405163354a450b60e21b815260040160405180910390fd5b60006131a5613198602089018961533c565b6001600160401b03164090565b905080613289576001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663e9413d386131e860208a018a61533c565b6040516001600160e01b031960e084901b1681526001600160401b039091166004820152602401602060405180830381865afa15801561322c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132509190615323565b90508061328957613264602088018861533c565b60405163175dadad60e01b81526001600160401b039091166004820152602401610ade565b6040805160c08a01356020808301919091528183018490528251808303840181526060909201909252805191012060006132c38a8361396c565b604080516060810182529788526020880196909652948601949094525092979650505050505050565b6000816001600160401b03163a111561333f57821561331557506001600160401b03811661261a565b60405163435e532d60e11b81523a60048201526001600160401b0383166024820152604401610ade565b503a92915050565b6000806000631fe543e360e01b86856040516024016133679291906153cf565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252600c805466ff0000000000001916660100000000000017905591506133e4906133c8906060880190880161505e565b63ffffffff166133de60a0880160808901614b98565b83613a62565b600c805466ff000000000000191690559695505050505050565b600080831561341d57613412868685613aae565b60009150915061342d565b613428868685613bb7565b915091505b94509492505050565b600081815260066020526040902082156134e65780546001600160601b03600160601b90910481169061346d908616821015612f5b565b613477858261503e565b82546bffffffffffffffffffffffff60601b1916600160601b6001600160601b039283168102919091178455600b805488939192600c926134bc928692900416615210565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555050612ae8565b80546001600160601b0390811690613502908616821015612f5b565b61350c858261503e565b82546bffffffffffffffffffffffff19166001600160601b03918216178355600b8054879260009161354091859116615210565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505050505050565b601154600090815b818110156135cc57836001600160a01b03166011828154811061359857613598614fd0565b6000918252602090912001546001600160a01b0316036135bc575060019392505050565b6135c581615025565b9050613573565b5060009392505050565b60008181526005602090815260408083206006909252822054600290910180546001600160601b0380841694600160601b90940416925b81811015613682576004600084838154811061362b5761362b614fd0565b60009182526020808320909101546001600160a01b0316835282810193909352604091820181208982529092529020805470ffffffffffffffffffffffffffffffffff1916905561367b81615025565b905061360d565b50600085815260056020526040812080546001600160a01b031990811682556001820180549091169055906136ba6002830182614af6565b50506000858152600660205260408120556136d6600886613da0565b506001600160601b0384161561372957600a80548591906000906137049084906001600160601b031661503e565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b6001600160601b038316156137815782600a600c8282829054906101000a90046001600160601b031661375c919061503e565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b5050915091565b6001600160a01b038116610ae757604051630fb532db60e11b815260040160405180910390fd5b60408051602081019091526000815260008290036137dc575060408051602081019091526000815261261a565b63125fa26760e31b6137ee83856153e8565b6001600160e01b0319161461381657604051632923fee760e11b815260040160405180910390fd5b6138238260048186615418565b8101906110bb9190615442565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa8260405160240161386991511515815260200190565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915292915050565b60006110bb8383613dac565b600061261a825490565b60006110bb8383613dfb565b336001600160a01b0382160361391b5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610ade565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b604080518082018252600091613a2c9190859060029083908390808284376000920191909152505060408051808201825291508087019060029083908390808284376000920191909152505050608086013560a0870135866139d56101008a0160e08b01614b98565b604080518082018252906101008c019060029083908390808284376000920191909152505060408051808201825291506101408d0190600290839083908082843760009201919091525050506101808c0135613e25565b600383604001604051602001613a4392919061549b565b60408051601f1981840301815291905280516020909101209392505050565b60005a611388811015613a7457600080fd5b611388810390508460408204820311613a8c57600080fd5b50823b613a9857600080fd5b60008083516020850160008789f1949350505050565b60008060005a600c54613acf908890600160581b900463ffffffff16615230565b613ad99190614ffc565b613ae390866154b1565b600c54909150600090613b0890600160781b900463ffffffff1664e8d4a510006154b1565b90508215613b44576040518381527f56296f7beae05a0db815737fdb4cd298897b1e517614d62468081531ae14d0999060200160405180910390a15b8415613b8e57600c548190606490600160b81b900460ff16613b668587615230565b613b7091906154b1565b613b7a91906154de565b613b849190615230565b93505050506110bb565b600c548190606490613baa90600160b81b900460ff16826154f2565b60ff16613b668587615230565b600080600080613bc5614050565b9150915060008213613bed576040516321ea67b360e11b815260048101839052602401610ade565b60008083825a600c54613c0e908d90600160581b900463ffffffff16615230565b613c189190614ffc565b613c22908b6154b1565b613c2c9190615230565b613c3e90670de0b6b3a76400006154b1565b613c4891906154de565b600c54909150600090613c719063ffffffff600160981b8204811691600160781b90041661550b565b613c869063ffffffff1664e8d4a510006154b1565b9050600085613c9d83670de0b6b3a76400006154b1565b613ca791906154de565b90508315613ce3576040518481527f56296f7beae05a0db815737fdb4cd298897b1e517614d62468081531ae14d0999060200160405180910390a15b60008915613d2257600c548290606490613d0790600160c01b900460ff16876154b1565b613d1191906154de565b613d1b9190615230565b9050613d62565b600c548290606490613d3e90600160c01b900460ff16826154f2565b613d4b9060ff16876154b1565b613d5591906154de565b613d5f9190615230565b90505b6b033b2e3c9fd0803ce8000000811115613d8f5760405163e80fa38160e01b815260040160405180910390fd5b9b949a509398505050505050505050565b60006110bb838361411b565b6000818152600183016020526040812054613df35750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561261a565b50600061261a565b6000826000018281548110613e1257613e12614fd0565b9060005260206000200154905092915050565b613e2e89614215565b613e7a5760405162461bcd60e51b815260206004820152601a60248201527f7075626c6963206b6579206973206e6f74206f6e2063757276650000000000006044820152606401610ade565b613e8388614215565b613ecf5760405162461bcd60e51b815260206004820152601560248201527f67616d6d61206973206e6f74206f6e20637572766500000000000000000000006044820152606401610ade565b613ed883614215565b613f245760405162461bcd60e51b815260206004820152601d60248201527f6347616d6d615769746e657373206973206e6f74206f6e2063757276650000006044820152606401610ade565b613f2d82614215565b613f795760405162461bcd60e51b815260206004820152601c60248201527f73486173685769746e657373206973206e6f74206f6e206375727665000000006044820152606401610ade565b613f85878a88876142ee565b613fd15760405162461bcd60e51b815260206004820152601960248201527f6164647228632a706b2b732a6729213d5f755769746e657373000000000000006044820152606401610ade565b6000613fdd8a87614411565b90506000613ff0898b878b868989614475565b90506000614001838d8d8a866145a1565b9050808a146140425760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b210383937b7b360991b6044820152606401610ade565b505050505050505050505050565b600c5460035460408051633fabe5a360e21b81529051600093849367010000000000000090910463ffffffff169284926001600160a01b039092169163feaf968c9160048082019260a0929091908290030181865afa1580156140b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140db9190615542565b50919650909250505063ffffffff82161580159061410757506140fe8142614ffc565b8263ffffffff16105b925082156141155760105493505b50509091565b6000818152600183016020526040812054801561420457600061413f600183614ffc565b855490915060009061415390600190614ffc565b90508181146141b857600086600001828154811061417357614173614fd0565b906000526020600020015490508087600001848154811061419657614196614fd0565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806141c9576141c961500f565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061261a565b600091505061261a565b5092915050565b80516000906401000003d0191161426e5760405162461bcd60e51b815260206004820152601260248201527f696e76616c696420782d6f7264696e61746500000000000000000000000000006044820152606401610ade565b60208201516401000003d019116142c75760405162461bcd60e51b815260206004820152601260248201527f696e76616c696420792d6f7264696e61746500000000000000000000000000006044820152606401610ade565b60208201516401000003d0199080096142e78360005b60200201516145e1565b1492915050565b60006001600160a01b0382166143345760405162461bcd60e51b815260206004820152600b60248201526a626164207769746e65737360a81b6044820152606401610ade565b60208401516000906001161561434b57601c61434e565b601b5b9050600070014551231950b75fc4402da1732fc9bebe1985876000602002015109865170014551231950b75fc4402da1732fc9bebe19918203925060009190890987516040805160008082526020820180845287905260ff88169282019290925260608101929092526080820183905291925060019060a0016020604051602081039080840390855afa1580156143e9573d6000803e3d6000fd5b5050604051601f1901516001600160a01b039081169088161495505050505050949350505050565b614419614b14565b61444660018484604051602001614432939291906155b5565b604051602081830303815290604052614605565b90505b61445281614215565b61261a57805160408051602081019290925261446e9101614432565b9050614449565b61447d614b14565b825186516401000003d01991829006919006036144dc5760405162461bcd60e51b815260206004820152601e60248201527f706f696e747320696e2073756d206d7573742062652064697374696e637400006044820152606401610ade565b6144e7878988614652565b6145335760405162461bcd60e51b815260206004820152601660248201527f4669727374206d756c20636865636b206661696c6564000000000000000000006044820152606401610ade565b61453e848685614652565b61458a5760405162461bcd60e51b815260206004820152601760248201527f5365636f6e64206d756c20636865636b206661696c65640000000000000000006044820152606401610ade565b61459586848461477d565b98975050505050505050565b6000600286868685876040516020016145bf969594939291906155d6565b60408051601f1981840301815291905280516020909101209695505050505050565b6000806401000003d01980848509840990506401000003d019600782089392505050565b61460d614b14565b61461682614844565b815261462b6146268260006142dd565b61487f565b6020820181905260029006600103611ec3576020810180516401000003d019039052919050565b6000826000036146925760405162461bcd60e51b815260206004820152600b60248201526a3d32b9379039b1b0b630b960a91b6044820152606401610ade565b835160208501516000906146a890600290615635565b156146b457601c6146b7565b601b5b9050600070014551231950b75fc4402da1732fc9bebe198387096040805160008082526020820180845281905260ff86169282019290925260608101869052608081018390529192509060019060a0016020604051602081039080840390855afa158015614729573d6000803e3d6000fd5b5050506020604051035190506000866040516020016147489190615649565b60408051601f1981840301815291905280516020909101206001600160a01b0392831692169190911498975050505050505050565b614785614b14565b8351602080860151855191860151600093849384936147a69390919061489f565b919450925090506401000003d0198582096001146148065760405162461bcd60e51b815260206004820152601960248201527f696e765a206d75737420626520696e7665727365206f66207a000000000000006044820152606401610ade565b60405180604001604052806401000003d01980614825576148256154c8565b87860981526020016401000003d0198785099052979650505050505050565b805160208201205b6401000003d0198110611ec35760408051602080820193909352815180820384018152908201909152805191012061484c565b600061261a8260026148986401000003d0196001615230565b901c61497f565b60008080600180826401000003d019896401000003d019038808905060006401000003d0198b6401000003d019038a08905060006148df83838585614a24565b90985090506148f088828e88614a48565b909850905061490188828c87614a48565b909850905060006149148d878b85614a48565b909850905061492588828686614a24565b909850905061493688828e89614a48565b909850905081811461496b576401000003d019818a0998506401000003d01982890997506401000003d019818309965061496f565b8196505b5050505050509450945094915050565b60008061498a614b32565b6020808252818101819052604082015260608101859052608081018490526401000003d01960a08201526149bc614b50565b60208160c0846005600019fa925082600003614a1a5760405162461bcd60e51b815260206004820152601260248201527f6269674d6f64457870206661696c7572652100000000000000000000000000006044820152606401610ade565b5195945050505050565b6000806401000003d0198487096401000003d0198487099097909650945050505050565b600080806401000003d019878509905060006401000003d01987876401000003d019030990506401000003d0198183086401000003d01986890990999098509650505050505050565b828054828255906000526020600020908101928215614ae6579160200282015b82811115614ae657825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190614ab1565b50614af2929150614b6e565b5090565b5080546000825590600052602060002090810190610ae79190614b6e565b60405180604001604052806002906020820280368337509192915050565b6040518060c001604052806006906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b5b80821115614af25760008155600101614b6f565b6001600160a01b0381168114610ae757600080fd5b600060208284031215614baa57600080fd5b81356110bb81614b83565b806040810183101561261a57600080fd5b600060408284031215614bd857600080fd5b6110bb8383614bb5565b60008060408385031215614bf557600080fd5b823591506020830135614c0781614b83565b809150509250929050565b600060c08284031215614c2457600080fd5b50919050565b8015158114610ae757600080fd5b60008060008385036101e0811215614c4f57600080fd5b6101a080821215614c5f57600080fd5b85945084013590506001600160401b03811115614c7b57600080fd5b614c8786828701614c12565b9250506101c0840135614c9981614c2a565b809150509250925092565b600060208284031215614cb657600080fd5b5035919050565b60008060408385031215614cd057600080fd5b8235614cdb81614b83565b91506020830135614c0781614b83565b80356001600160401b0381168114611ec357600080fd5b60008060608385031215614d1557600080fd5b614d1f8484614bb5565b9150614d2d60408401614ceb565b90509250929050565b600060208284031215614d4857600080fd5b81356001600160401b03811115614d5e57600080fd5b614d6a84828501614c12565b949350505050565b60008060008060608587031215614d8857600080fd5b8435614d9381614b83565b93506020850135925060408501356001600160401b0380821115614db657600080fd5b818701915087601f830112614dca57600080fd5b813581811115614dd957600080fd5b886020828501011115614deb57600080fd5b95989497505060200194505050565b803561ffff81168114611ec357600080fd5b803563ffffffff81168114611ec357600080fd5b803560ff81168114611ec357600080fd5b60008060008060008060008060006101208a8c031215614e5057600080fd5b614e598a614dfa565b9850614e6760208b01614e0c565b9750614e7560408b01614e0c565b9650614e8360608b01614e0c565b955060808a01359450614e9860a08b01614e0c565b9350614ea660c08b01614e0c565b9250614eb460e08b01614e20565b9150614ec36101008b01614e20565b90509295985092959850929598565b60008060408385031215614ee557600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b83811015614f2457815187529582019590820190600101614f08565b509495945050505050565b6020815260006110bb6020830184614ef4565b600081518084526020808501945080840160005b83811015614f245781516001600160a01b031687529582019590820190600101614f56565b60006001600160601b0380881683528087166020840152506001600160401b03851660408301526001600160a01b038416606083015260a06080830152614fc560a0830184614f42565b979650505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561261a5761261a614fe6565b634e487b7160e01b600052603160045260246000fd5b60006001820161503757615037614fe6565b5060010190565b6001600160601b0382811682821603908082111561420e5761420e614fe6565b60006020828403121561507057600080fd5b6110bb82614e0c565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b038083168181036150ab576150ab614fe6565b6001019392505050565b60006001600160401b038216806150ce576150ce614fe6565b6000190192915050565b6000808335601e198436030181126150ef57600080fd5b8301803591506001600160401b0382111561510957600080fd5b60200191503681900382131561511e57600080fd5b9250929050565b6020815260ff8251166020820152602082015160408201526001600160a01b0360408301511660608201526000606083015160c0608084015261516b60e0840182614f42565b905060808401516001600160601b0380821660a08601528060a08701511660c086015250508091505092915050565b6000815180845260005b818110156151c0576020818501810151868301820152016151a4565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006110bb602083018461519a565b60006020828403121561520557600080fd5b81516110bb81614c2a565b6001600160601b0381811683821601908082111561420e5761420e614fe6565b8082018082111561261a5761261a614fe6565b60006020828403121561525557600080fd5b6110bb82614dfa565b878152866020820152856040820152600063ffffffff80871660608401528086166080840152506001600160a01b03841660a083015260e060c08301526152a860e083018461519a565b9998505050505050505050565b86815285602082015261ffff85166040820152600063ffffffff808616606084015280851660808401525060c060a083015261459560c083018461519a565b6001600160401b0381811683821601908082111561420e5761420e614fe6565b60408181019083833792915050565b60006020828403121561533557600080fd5b5051919050565b60006020828403121561534e57600080fd5b6110bb82614ceb565b8881526001600160401b0388166020820152866040820152600063ffffffff80881660608401528087166080840152506001600160a01b03851660a083015260e060c08301528260e08301526101008385828501376000838501820152601f909301601f191690910190910198975050505050505050565b828152604060208201526000614d6a6040830184614ef4565b6001600160e01b031981358181169160048510156154105780818660040360031b1b83161692505b505092915050565b6000808585111561542857600080fd5b8386111561543557600080fd5b5050820193919092039150565b60006020828403121561545457600080fd5b604051602081018181106001600160401b038211171561548457634e487b7160e01b600052604160045260246000fd5b604052823561549281614c2a565b81529392505050565b8281526060810160408360208401379392505050565b808202811582820484141761261a5761261a614fe6565b634e487b7160e01b600052601260045260246000fd5b6000826154ed576154ed6154c8565b500490565b60ff818116838216019081111561261a5761261a614fe6565b63ffffffff82811682821603908082111561420e5761420e614fe6565b805169ffffffffffffffffffff81168114611ec357600080fd5b600080600080600060a0868803121561555a57600080fd5b61556386615528565b945060208601519350604086015192506060860151915061558660808701615528565b90509295509295909350565b8060005b6002811015612ae8578151845260209384019390910190600101615596565b8381526155c56020820184615592565b606081019190915260800192915050565b8681526155e66020820187615592565b6155f36060820186615592565b61560060a0820185615592565b61560d60e0820184615592565b60609190911b6bffffffffffffffffffffffff19166101208201526101340195945050505050565b600082615644576156446154c8565b500690565b6156538183615592565b60400191905056fea164736f6c6343000813000a", } var VRFCoordinatorV25ABI = VRFCoordinatorV25MetaData.ABI @@ -1536,6 +1536,123 @@ func (_VRFCoordinatorV25 *VRFCoordinatorV25Filterer) ParseFundsRecovered(log typ return event, nil } +type VRFCoordinatorV25L1GasFeeIterator struct { + Event *VRFCoordinatorV25L1GasFee + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25L1GasFeeIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25L1GasFee) + 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(VRFCoordinatorV25L1GasFee) + 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 *VRFCoordinatorV25L1GasFeeIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25L1GasFeeIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25L1GasFee struct { + Fee *big.Int + Raw types.Log +} + +func (_VRFCoordinatorV25 *VRFCoordinatorV25Filterer) FilterL1GasFee(opts *bind.FilterOpts) (*VRFCoordinatorV25L1GasFeeIterator, error) { + + logs, sub, err := _VRFCoordinatorV25.contract.FilterLogs(opts, "L1GasFee") + if err != nil { + return nil, err + } + return &VRFCoordinatorV25L1GasFeeIterator{contract: _VRFCoordinatorV25.contract, event: "L1GasFee", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25 *VRFCoordinatorV25Filterer) WatchL1GasFee(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25L1GasFee) (event.Subscription, error) { + + logs, sub, err := _VRFCoordinatorV25.contract.WatchLogs(opts, "L1GasFee") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25L1GasFee) + if err := _VRFCoordinatorV25.contract.UnpackLog(event, "L1GasFee", 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) ParseL1GasFee(log types.Log) (*VRFCoordinatorV25L1GasFee, error) { + event := new(VRFCoordinatorV25L1GasFee) + if err := _VRFCoordinatorV25.contract.UnpackLog(event, "L1GasFee", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + type VRFCoordinatorV25MigrationCompletedIterator struct { Event *VRFCoordinatorV25MigrationCompleted @@ -3643,6 +3760,8 @@ func (_VRFCoordinatorV25 *VRFCoordinatorV25) ParseLog(log types.Log) (generated. return _VRFCoordinatorV25.ParseFallbackWeiPerUnitLinkUsed(log) case _VRFCoordinatorV25.abi.Events["FundsRecovered"].ID: return _VRFCoordinatorV25.ParseFundsRecovered(log) + case _VRFCoordinatorV25.abi.Events["L1GasFee"].ID: + return _VRFCoordinatorV25.ParseL1GasFee(log) case _VRFCoordinatorV25.abi.Events["MigrationCompleted"].ID: return _VRFCoordinatorV25.ParseMigrationCompleted(log) case _VRFCoordinatorV25.abi.Events["NativeFundsRecovered"].ID: @@ -3701,6 +3820,10 @@ func (VRFCoordinatorV25FundsRecovered) Topic() common.Hash { return common.HexToHash("0x59bfc682b673f8cbf945f1e454df9334834abf7dfe7f92237ca29ecb9b436600") } +func (VRFCoordinatorV25L1GasFee) Topic() common.Hash { + return common.HexToHash("0x56296f7beae05a0db815737fdb4cd298897b1e517614d62468081531ae14d099") +} + func (VRFCoordinatorV25MigrationCompleted) Topic() common.Hash { return common.HexToHash("0xd63ca8cb945956747ee69bfdc3ea754c24a4caf7418db70e46052f7850be4187") } @@ -3892,6 +4015,12 @@ type VRFCoordinatorV25Interface interface { ParseFundsRecovered(log types.Log) (*VRFCoordinatorV25FundsRecovered, error) + FilterL1GasFee(opts *bind.FilterOpts) (*VRFCoordinatorV25L1GasFeeIterator, error) + + WatchL1GasFee(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25L1GasFee) (event.Subscription, error) + + ParseL1GasFee(log types.Log) (*VRFCoordinatorV25L1GasFee, error) + FilterMigrationCompleted(opts *bind.FilterOpts) (*VRFCoordinatorV25MigrationCompletedIterator, error) WatchMigrationCompleted(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25MigrationCompleted) (event.Subscription, error) diff --git a/core/gethwrappers/generated/vrf_coordinator_v2_5_arbitrum/vrf_coordinator_v2_5_arbitrum.go b/core/gethwrappers/generated/vrf_coordinator_v2_5_arbitrum/vrf_coordinator_v2_5_arbitrum.go new file mode 100644 index 00000000000..218c88f0fac --- /dev/null +++ b/core/gethwrappers/generated/vrf_coordinator_v2_5_arbitrum/vrf_coordinator_v2_5_arbitrum.go @@ -0,0 +1,4123 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package vrf_coordinator_v2_5_arbitrum + +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 VRFProof struct { + Pk [2]*big.Int + Gamma [2]*big.Int + C *big.Int + S *big.Int + Seed *big.Int + UWitness common.Address + CGammaWitness [2]*big.Int + SHashWitness [2]*big.Int + 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 + RequestConfirmations uint16 + CallbackGasLimit uint32 + NumWords uint32 + ExtraArgs []byte +} + +var VRFCoordinatorV25ArbitrumMetaData = &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\":[],\"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\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"L1GasFee\",\"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: "0x60a06040523480156200001157600080fd5b50604051620059e4380380620059e4833981016040819052620000349162000180565b8033806000816200008c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000bf57620000bf81620000d5565b5050506001600160a01b031660805250620001b2565b336001600160a01b038216036200012f5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000083565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000602082840312156200019357600080fd5b81516001600160a01b0381168114620001ab57600080fd5b9392505050565b60805161580f620001d5600039600081816105d201526131b5015261580f6000f3fe60806040526004361061028c5760003560e01c80638402595e11610164578063b2a7cac5116100c6578063da2f26101161008a578063e72f6e3011610064578063e72f6e3014610904578063ee9d2d3814610924578063f2fde38b1461095157600080fd5b8063da2f261014610854578063dac83d29146108b3578063dc311dd3146108d357600080fd5b8063b2a7cac5146107b4578063bec4c08c146107d4578063caf70c4a146107f4578063cb63179714610814578063d98e620e1461083457600080fd5b80639d40a6fd11610128578063a63e0bfb11610102578063a63e0bfb14610747578063aa433aff14610767578063aefb212f1461078757600080fd5b80639d40a6fd146106da578063a21a23e414610712578063a4c0ed361461072757600080fd5b80638402595e1461064957806386fe91c7146106695780638da5cb5b1461068957806395b55cfc146106a75780639b1c385e146106ba57600080fd5b8063405b84fa1161020d57806364d51a2a116101d157806372e9d565116101ab57806372e9d565146105f457806379ba5097146106145780637a5a2aef1461062957600080fd5b806364d51a2a1461058b57806365982744146105a0578063689c4517146105c057600080fd5b8063405b84fa146104d057806340d6bb82146104f057806341af6c871461051b57806351cff8d91461054b5780635d06b4ab1461056b57600080fd5b806315c48b841161025457806315c48b84146103f157806318e3dd27146104195780631b6b6d23146104585780632f622e6b14610490578063301f42e9146104b057600080fd5b806304104edb14610291578063043bd6ae146102b3578063088070f5146102dc57806308821d58146103b15780630ae09540146103d1575b600080fd5b34801561029d57600080fd5b506102b16102ac366004614d1f565b610971565b005b3480156102bf57600080fd5b506102c960105481565b6040519081526020015b60405180910390f35b3480156102e857600080fd5b50600c546103549061ffff81169063ffffffff62010000820481169160ff660100000000000082048116926701000000000000008304811692600160581b8104821692600160781b8204831692600160981b83041691600160b81b8104821691600160c01b9091041689565b6040805161ffff909a168a5263ffffffff98891660208b01529615159689019690965293861660608801529185166080870152841660a08601529290921660c084015260ff91821660e084015216610100820152610120016102d3565b3480156103bd57600080fd5b506102b16103cc366004614d4d565b610aea565b3480156103dd57600080fd5b506102b16103ec366004614d69565b610c83565b3480156103fd57600080fd5b5061040660c881565b60405161ffff90911681526020016102d3565b34801561042557600080fd5b50600a5461044090600160601b90046001600160601b031681565b6040516001600160601b0390911681526020016102d3565b34801561046457600080fd5b50600254610478906001600160a01b031681565b6040516001600160a01b0390911681526020016102d3565b34801561049c57600080fd5b506102b16104ab366004614d1f565b610ccb565b3480156104bc57600080fd5b506104406104cb366004614dbf565b610d71565b3480156104dc57600080fd5b506102b16104eb366004614d69565b6110c2565b3480156104fc57600080fd5b506105066101f481565b60405163ffffffff90911681526020016102d3565b34801561052757600080fd5b5061053b610536366004614e2b565b611410565b60405190151581526020016102d3565b34801561055757600080fd5b506102b1610566366004614d1f565b6114b2565b34801561057757600080fd5b506102b1610586366004614d1f565b611593565b34801561059757600080fd5b50610406606481565b3480156105ac57600080fd5b506102b16105bb366004614e44565b611651565b3480156105cc57600080fd5b506104787f000000000000000000000000000000000000000000000000000000000000000081565b34801561060057600080fd5b50600354610478906001600160a01b031681565b34801561062057600080fd5b506102b16116b1565b34801561063557600080fd5b506102b1610644366004614e89565b611762565b34801561065557600080fd5b506102b1610664366004614d1f565b611872565b34801561067557600080fd5b50600a54610440906001600160601b031681565b34801561069557600080fd5b506000546001600160a01b0316610478565b6102b16106b5366004614e2b565b61198d565b3480156106c657600080fd5b506102c96106d5366004614ebd565b611a9d565b3480156106e657600080fd5b506007546106fa906001600160401b031681565b6040516001600160401b0390911681526020016102d3565b34801561071e57600080fd5b506102c9611ecf565b34801561073357600080fd5b506102b1610742366004614ef9565b6120b6565b34801561075357600080fd5b506102b1610762366004614fb8565b61221e565b34801561077357600080fd5b506102b1610782366004614e2b565b6124f2565b34801561079357600080fd5b506107a76107a2366004615059565b612525565b6040516102d391906150b6565b3480156107c057600080fd5b506102b16107cf366004614e2b565b612627565b3480156107e057600080fd5b506102b16107ef366004614d69565b612716565b34801561080057600080fd5b506102c961080f366004614d4d565b612809565b34801561082057600080fd5b506102b161082f366004614d69565b612839565b34801561084057600080fd5b506102c961084f366004614e2b565b612a39565b34801561086057600080fd5b5061089461086f366004614e2b565b600d6020526000908152604090205460ff81169061010090046001600160401b031682565b6040805192151583526001600160401b039091166020830152016102d3565b3480156108bf57600080fd5b506102b16108ce366004614d69565b612a5a565b3480156108df57600080fd5b506108f36108ee366004614e2b565b612af5565b6040516102d3959493929190615102565b34801561091057600080fd5b506102b161091f366004614d1f565b612bce565b34801561093057600080fd5b506102c961093f366004614e2b565b600f6020526000908152604090205481565b34801561095d57600080fd5b506102b161096c366004614d1f565b612d8f565b610979612da0565b60115460005b81811015610abd57826001600160a01b0316601182815481106109a4576109a4615157565b6000918252602090912001546001600160a01b031603610aad5760116109cb600184615183565b815481106109db576109db615157565b600091825260209091200154601180546001600160a01b039092169183908110610a0757610a07615157565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506011805480610a4657610a46615196565b6000828152602090819020600019908301810180546001600160a01b03191690559091019091556040516001600160a01b03851681527ff80a1a97fd42251f3c33cda98635e7399253033a6774fe37cd3f650b5282af3791015b60405180910390a1505050565b610ab6816151ac565b905061097f565b50604051635428d44960e01b81526001600160a01b03831660048201526024015b60405180910390fd5b50565b610af2612da0565b6000610afd82612809565b6000818152600d602090815260409182902082518084019093525460ff811615158084526101009091046001600160401b03169183019190915291925090610b5b57604051631dfd6e1360e21b815260048101839052602401610ade565b6000828152600d60205260408120805468ffffffffffffffffff19169055600e54905b81811015610c2d5783600e8281548110610b9a57610b9a615157565b906000526020600020015403610c1d57600e610bb7600184615183565b81548110610bc757610bc7615157565b9060005260206000200154600e8281548110610be557610be5615157565b600091825260209091200155600e805480610c0257610c02615196565b60019003818190600052602060002001600090559055610c2d565b610c26816151ac565b9050610b7e565b507f9b6868e0eb737bcd72205360baa6bfd0ba4e4819a33ade2db384e8a8025639a5838360200151604051610c759291909182526001600160401b0316602082015260400190565b60405180910390a150505050565b81610c8d81612dfc565b610c95612e51565b610c9e83611410565b15610cbc57604051631685ecdd60e31b815260040160405180910390fd5b610cc68383612e7f565b505050565b610cd3612e51565b610cdb612da0565b600b54600160601b90046001600160601b0316610cf9811515612f62565b600b80546bffffffffffffffffffffffff60601b19169055600a8054829190600c90610d36908490600160601b90046001600160601b03166151c5565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550610d6d82826001600160601b0316612f80565b5050565b6000610d7b612e51565b60005a9050610324361115610dad57604051630f28961b60e01b81523660048201526103246024820152604401610ade565b6000610db98686612ff4565b90506000610dcf858360000151602001516132eb565b60408301519091506060906000610deb60808a018a85016151e5565b63ffffffff169050806001600160401b03811115610e0b57610e0b615200565b604051908082528060200260200182016040528015610e34578160200160208202803683370190505b50925060005b81811015610e9c5760408051602081018590529081018290526060016040516020818303038152906040528051906020012060001c848281518110610e8157610e81615157565b6020908102919091010152610e95816151ac565b9050610e3a565b5050602080850180516000908152600f9092526040822082905551610ec2908a85613346565b60208a8101356000908152600690915260409020805491925090601890610ef890600160c01b90046001600160401b0316615216565b91906101000a8154816001600160401b0302191690836001600160401b03160217905550600460008a6080016020810190610f339190614d1f565b6001600160a01b03168152602080820192909252604090810160009081208c840135825290925290208054600990610f7a90600160481b90046001600160401b031661523c565b91906101000a8154816001600160401b0302191690836001600160401b031602179055506000898060a00190610fb0919061525f565b6001610fbf60a08e018e61525f565b610fca929150615183565b818110610fd957610fd9615157565b9091013560f81c600114915060009050610ff58887848d6133fd565b909950905080156110405760208088015160105460408051928352928201527f6ca648a381f22ead7e37773d934e64885dcf861fbfbb26c40354cbf0c4662d1a910160405180910390a15b5061105088828c60200135613435565b602086810151604080518681526001600160601b038c16818501528415158183015285151560608201528c151560808201529051928d0135927faeb4b4786571e184246d39587f659abf0e26f41f6a3358692250382c0cdb47b79181900360a00190a3505050505050505b9392505050565b6110ca612e51565b6110d38161356a565b6110fb57604051635428d44960e01b81526001600160a01b0382166004820152602401610ade565b60008060008061110a86612af5565b945094505093509350336001600160a01b0316826001600160a01b03161461115057604051636c51fda960e11b81526001600160a01b0383166004820152602401610ade565b61115986611410565b1561117757604051631685ecdd60e31b815260040160405180910390fd5b6040805160c0810182526001815260208082018990526001600160a01b03851682840152606082018490526001600160601b038088166080840152861660a0830152915190916000916111cc918491016152ac565b60405160208183030381529060405290506111e6886135d5565b505060405163ce3f471960e01b81526001600160a01b0388169063ce3f4719906001600160601b0388169061121f908590600401615367565b6000604051808303818588803b15801561123857600080fd5b505af115801561124c573d6000803e3d6000fd5b50506002546001600160a01b031615801593509150611275905057506001600160601b03861615155b156113015760025460405163a9059cbb60e01b81526001600160a01b0389811660048301526001600160601b038916602483015261130192169063a9059cbb906044015b6020604051808303816000875af11580156112d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112fc919061537a565b612f62565b600c805466ff00000000000019166601000000000000179055825160005b818110156113b15784818151811061133957611339615157565b6020908102919091010151604051638ea9811760e01b81526001600160a01b038b8116600483015290911690638ea9811790602401600060405180830381600087803b15801561138857600080fd5b505af115801561139c573d6000803e3d6000fd5b50505050806113aa906151ac565b905061131f565b50600c805466ff00000000000019169055604080516001600160a01b038a168152602081018b90527fd63ca8cb945956747ee69bfdc3ea754c24a4caf7418db70e46052f7850be418791015b60405180910390a1505050505050505050565b60008181526005602052604081206002018054825b818110156114a75760006004600085848154811061144557611445615157565b60009182526020808320909101546001600160a01b0316835282810193909352604091820181208982529092529020546001600160401b03600160481b90910416111561149757506001949350505050565b6114a0816151ac565b9050611425565b506000949350505050565b6114ba612e51565b6114c2612da0565b6002546001600160a01b03166114eb5760405163c1f0c0a160e01b815260040160405180910390fd5b600b546001600160601b0316611502811515612f62565b600b80546bffffffffffffffffffffffff19169055600a80548291906000906115359084906001600160601b03166151c5565b82546101009290920a6001600160601b0381810219909316918316021790915560025460405163a9059cbb60e01b81526001600160a01b0386811660048301529285166024820152610d6d935091169063a9059cbb906044016112b9565b61159b612da0565b6115a48161356a565b156115cd5760405163ac8a27ef60e01b81526001600160a01b0382166004820152602401610ade565b601180546001810182556000919091527f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c680180546001600160a01b0319166001600160a01b0383169081179091556040519081527fb7cabbfc11e66731fc77de0444614282023bcbd41d16781c753a431d0af016259060200160405180910390a150565b611659612da0565b6002546001600160a01b03161561168357604051631688c53760e11b815260040160405180910390fd5b600280546001600160a01b039384166001600160a01b03199182161790915560038054929093169116179055565b6001546001600160a01b0316331461170b5760405162461bcd60e51b815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610ade565b60008054336001600160a01b0319808316821784556001805490911690556040516001600160a01b0390921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b61176a612da0565b600061177583612809565b6000818152600d602052604090205490915060ff16156117ab57604051634a0b8fa760e01b815260048101829052602401610ade565b60408051808201825260018082526001600160401b0385811660208085018281526000888152600d835287812096518754925168ffffffffffffffffff1990931690151568ffffffffffffffff00191617610100929095169190910293909317909455600e805493840181559091527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd9091018490558251848152918201527f9b911b2c240bfbef3b6a8f7ed6ee321d1258bb2a3fe6becab52ac1cd3210afd39101610aa0565b61187a612da0565b600a544790600160601b90046001600160601b0316818111156118ba576040516354ced18160e11b81526004810182905260248101839052604401610ade565b81811015610cc65760006118ce8284615183565b90506000846001600160a01b03168260405160006040518083038185875af1925050503d806000811461191d576040519150601f19603f3d011682016040523d82523d6000602084013e611922565b606091505b50509050806119445760405163950b247960e01b815260040160405180910390fd5b604080516001600160a01b0387168152602081018490527f4aed7c8eed0496c8c19ea2681fcca25741c1602342e38b045d9f1e8e905d2e9c910160405180910390a15050505050565b611995612e51565b6000818152600560205260409020546119b6906001600160a01b0316613787565b60008181526006602052604090208054600160601b90046001600160601b0316903490600c6119e58385615397565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555034600a600c8282829054906101000a90046001600160601b0316611a2d9190615397565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550817f7603b205d03651ee812f803fccde89f1012e545a9c99f0abfea9cedd0fd8e902823484611a8091906153b7565b604080519283526020830191909152015b60405180910390a25050565b6000611aa7612e51565b60208083013560008181526005909252604090912054611acf906001600160a01b0316613787565b336000908152600460209081526040808320848452808352928190208151606081018352905460ff811615158083526001600160401b036101008304811695840195909552600160481b9091049093169181019190915290611b4d576040516379bfd40160e01b815260048101849052336024820152604401610ade565b600c5461ffff16611b6460608701604088016153ca565b61ffff161080611b87575060c8611b8160608701604088016153ca565b61ffff16115b15611bcd57611b9c60608601604087016153ca565b600c5460405163539c34bb60e11b815261ffff92831660048201529116602482015260c86044820152606401610ade565b600c5462010000900463ffffffff16611bec60808701606088016151e5565b63ffffffff161115611c3c57611c0860808601606087016151e5565b600c54604051637aebf00f60e11b815263ffffffff9283166004820152620100009091049091166024820152604401610ade565b6101f4611c4f60a08701608088016151e5565b63ffffffff161115611c9557611c6b60a08601608087016151e5565b6040516311ce1afb60e21b815263ffffffff90911660048201526101f46024820152604401610ade565b806020018051611ca490615216565b6001600160401b03169052604081018051611cbe90615216565b6001600160401b03908116909152602082810151604080518935818501819052338284015260608201899052929094166080808601919091528151808603909101815260a08501825280519084012060c085019290925260e08085018390528151808603909101815261010090940190528251929091019190912060009190955090506000611d60611d5b611d5660a08a018a61525f565b6137ae565b61382f565b905085611d6b6138a0565b86611d7c60808b0160608c016151e5565b611d8c60a08c0160808d016151e5565b3386604051602001611da497969594939291906153e5565b60405160208183030381529060405280519060200120600f600088815260200190815260200160002081905550336001600160a01b03168588600001357feb0e3652e0f44f417695e6e90f2f42c99b65cd7169074c5a654b16b9748c3a4e89868c6040016020810190611e1791906153ca565b8d6060016020810190611e2a91906151e5565b8e6080016020810190611e3d91906151e5565b89604051611e509695949392919061543c565b60405180910390a45050600092835260209182526040928390208151815493830151929094015168ffffffffffffffffff1990931693151568ffffffffffffffff001916939093176101006001600160401b03928316021770ffffffffffffffff0000000000000000001916600160481b91909216021790555b919050565b6000611ed9612e51565b6007546001600160401b031633611ef1600143615183565b6040516bffffffffffffffffffffffff19606093841b81166020830152914060348201523090921b1660548201526001600160c01b031960c083901b16606882015260700160408051601f1981840301815291905280516020909101209150611f5b81600161547b565b6007805467ffffffffffffffff19166001600160401b03928316179055604080516000808252608082018352602080830182815283850183815260608086018581528a86526006855287862093518454935191516001600160601b039182166001600160c01b031990951694909417600160601b91909216021777ffffffffffffffffffffffffffffffffffffffffffffffff16600160c01b9290981691909102969096179055835194850184523385528481018281528585018481528884526005835294909220855181546001600160a01b03199081166001600160a01b03928316178355935160018301805490951691161790925592518051929493919261206b9260028501920190614c18565b5061207b9150600890508461390a565b5060405133815283907f1d3015d7ba850fa198dc7b1a3f5d42779313a681035f77c8c03764c61005518d9060200160405180910390a2505090565b6120be612e51565b6002546001600160a01b031633146120e9576040516344b0e3c360e01b815260040160405180910390fd5b6020811461210a57604051638129bbcd60e01b815260040160405180910390fd5b600061211882840184614e2b565b60008181526005602052604090205490915061213c906001600160a01b0316613787565b600081815260066020526040812080546001600160601b0316918691906121638385615397565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555084600a60008282829054906101000a90046001600160601b03166121ab9190615397565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550817f1ced9348ff549fceab2ac57cd3a9de38edaaab274b725ee82c23e8fc8c4eec7a8287846121fe91906153b7565b6040805192835260208301919091520160405180910390a2505050505050565b612226612da0565b60c861ffff8a1611156122605760405163539c34bb60e11b815261ffff8a1660048201819052602482015260c86044820152606401610ade565b60008513612284576040516321ea67b360e11b815260048101869052602401610ade565b8363ffffffff168363ffffffff1611156122c1576040516313c06e5960e11b815263ffffffff808516600483015285166024820152604401610ade565b609b60ff831611156122f257604051631d66288d60e11b815260ff83166004820152609b6024820152604401610ade565b609b60ff8216111561232357604051631d66288d60e11b815260ff82166004820152609b6024820152604401610ade565b604080516101208101825261ffff8b1680825263ffffffff808c16602084018190526000848601528b8216606085018190528b8316608086018190528a841660a08701819052938a1660c0870181905260ff808b1660e08901819052908a16610100909801889052600c8054600160c01b90990260ff60c01b19600160b81b9093029290921661ffff60b81b19600160981b90940263ffffffff60981b19600160781b9099029890981676ffffffffffffffff00000000000000000000000000000019600160581b9096026effffffff000000000000000000000019670100000000000000909802979097166effffffffffffffffff000000000000196201000090990265ffffffffffff19909c16909a179a909a1796909616979097179390931791909116959095179290921793909316929092179190911790556010869055517f2c6b6b12413678366b05b145c5f00745bdd00e739131ab5de82484a50c9d78b6906113fd908b908b908b908b908b908b908b908b908b9061ffff99909916895263ffffffff97881660208a0152958716604089015293861660608801526080870192909252841660a086015290921660c084015260ff91821660e0840152166101008201526101200190565b6124fa612da0565b6000818152600560205260409020546001600160a01b031661251b81613787565b610d6d8282612e7f565b606060006125336008613916565b905080841061255557604051631390f2a160e01b815260040160405180910390fd5b600061256184866153b7565b90508181118061256f575083155b612579578061257b565b815b905060006125898683615183565b9050806001600160401b038111156125a3576125a3615200565b6040519080825280602002602001820160405280156125cc578160200160208202803683370190505b50935060005b8181101561261c576125ef6125e788836153b7565b600890613920565b85828151811061260157612601615157565b6020908102919091010152612615816151ac565b90506125d2565b505050505b92915050565b61262f612e51565b6000818152600560205260409020546001600160a01b031661265081613787565b6000828152600560205260409020600101546001600160a01b031633146126a9576000828152600560205260409081902060010154905163d084e97560e01b81526001600160a01b039091166004820152602401610ade565b6000828152600560209081526040918290208054336001600160a01b03199182168117835560019092018054909116905582516001600160a01b03851681529182015283917fd4114ab6e9af9f597c52041f32d62dc57c5c4e4c0d4427006069635e216c93869101611a91565b8161272081612dfc565b612728612e51565b6001600160a01b03821660009081526004602090815260408083208684529091529020805460ff161561275b5750505050565b600084815260056020526040902060020180546063190161278f576040516305a48e0f60e01b815260040160405180910390fd5b8154600160ff199091168117835581549081018255600082815260209081902090910180546001600160a01b0319166001600160a01b03871690811790915560405190815286917f1e980d04aa7648e205713e5e8ea3808672ac163d10936d36f91b2c88ac1575e191015b60405180910390a25050505050565b60008160405160200161281c919061549b565b604051602081830303815290604052805190602001209050919050565b8161284381612dfc565b61284b612e51565b61285483611410565b1561287257604051631685ecdd60e31b815260040160405180910390fd5b6001600160a01b038216600090815260046020908152604080832086845290915290205460ff166128c8576040516379bfd40160e01b8152600481018490526001600160a01b0383166024820152604401610ade565b6000838152600560205260408120600201805490915b818110156129dd57846001600160a01b031683828154811061290257612902615157565b6000918252602090912001546001600160a01b0316036129cd5782612928600184615183565b8154811061293857612938615157565b9060005260206000200160009054906101000a90046001600160a01b031683828154811061296857612968615157565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550828054806129a6576129a6615196565b600082815260209020810160001990810180546001600160a01b03191690550190556129dd565b6129d6816151ac565b90506128de565b506001600160a01b0384166000818152600460209081526040808320898452825291829020805460ff19169055905191825286917f32158c6058347c1601b2d12bc696ac6901d8a9a9aa3ba10c27ab0a983e8425a791016127fa565b600e8181548110612a4957600080fd5b600091825260209091200154905081565b81612a6481612dfc565b612a6c612e51565b600083815260056020526040902060018101546001600160a01b03848116911614612aef576001810180546001600160a01b0319166001600160a01b03851690811790915560408051338152602081019290925285917f21a4dad170a6bf476c31bbcf4a16628295b0e450672eec25d7c93308e05344a191015b60405180910390a25b50505050565b600081815260056020526040812054819081906001600160a01b03166060612b1c82613787565b600086815260066020908152604080832054600583529281902060020180548251818502810185019093528083526001600160601b0380861695600160601b810490911694600160c01b9091046001600160401b0316938893929091839190830182828015612bb457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612b96575b505050505090509450945094509450945091939590929450565b612bd6612da0565b6002546001600160a01b0316612bff5760405163c1f0c0a160e01b815260040160405180910390fd5b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015612c48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c6c91906154aa565b600a549091506001600160601b031681811115612ca6576040516354ced18160e11b81526004810182905260248101839052604401610ade565b81811015610cc6576000612cba8284615183565b60025460405163a9059cbb60e01b81526001600160a01b0387811660048301526024820184905292935091169063a9059cbb906044016020604051808303816000875af1158015612d0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d33919061537a565b612d5057604051631f01ff1360e21b815260040160405180910390fd5b604080516001600160a01b0386168152602081018390527f59bfc682b673f8cbf945f1e454df9334834abf7dfe7f92237ca29ecb9b4366009101610c75565b612d97612da0565b610ae78161392c565b6000546001600160a01b03163314612dfa5760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610ade565b565b6000818152600560205260409020546001600160a01b0316612e1d81613787565b336001600160a01b03821614610d6d57604051636c51fda960e11b81526001600160a01b0382166004820152602401610ade565b600c546601000000000000900460ff1615612dfa5760405163769dd35360e11b815260040160405180910390fd5b600080612e8b846135d5565b60025491935091506001600160a01b031615801590612eb257506001600160601b03821615155b15612efa5760025460405163a9059cbb60e01b81526001600160a01b0385811660048301526001600160601b0385166024830152612efa92169063a9059cbb906044016112b9565b612f0d83826001600160601b0316612f80565b604080516001600160a01b03851681526001600160601b03808516602083015283169181019190915284907f8c74ce8b8cf87f5eb001275c8be27eb34ea2b62bfab6814fcc62192bb63e81c490606001612ae6565b80610ae757604051631e9acf1760e31b815260040160405180910390fd5b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612fcd576040519150601f19603f3d011682016040523d82523d6000602084013e612fd2565b606091505b5050905080610cc65760405163950b247960e01b815260040160405180910390fd5b6040805160a081018252600060608201818152608083018290528252602082018190529181018290529061302784612809565b6000818152600d602090815260409182902082518084019093525460ff811615158084526101009091046001600160401b0316918301919091529192509061308557604051631dfd6e1360e21b815260048101839052602401610ade565b6000828660c001356040516020016130a7929190918252602082015260400190565b60408051601f1981840301815291815281516020928301206000818152600f90935290822054909250908190036130f157604051631b44092560e11b815260040160405180910390fd5b816130ff60208801886154c3565b602088013561311460608a0160408b016151e5565b61312460808b0160608c016151e5565b61313460a08c0160808d01614d1f565b61314160a08d018d61525f565b6040516020016131589897969594939291906154de565b60405160208183030381529060405280519060200120811461318d5760405163354a450b60e21b815260040160405180910390fd5b60006131a461319f60208901896154c3565b6139d5565b905080613288576001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663e9413d386131e760208a018a6154c3565b6040516001600160e01b031960e084901b1681526001600160401b039091166004820152602401602060405180830381865afa15801561322b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061324f91906154aa565b9050806132885761326360208801886154c3565b60405163175dadad60e01b81526001600160401b039091166004820152602401610ade565b6040805160c08a01356020808301919091528183018490528251808303840181526060909201909252805191012060006132c28a83613a8d565b604080516060810182529788526020880196909652948601949094525092979650505050505050565b6000816001600160401b03163a111561333e57821561331457506001600160401b038116612621565b60405163435e532d60e11b81523a60048201526001600160401b0383166024820152604401610ade565b503a92915050565b6000806000631fe543e360e01b8685604051602401613366929190615556565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252600c805466ff0000000000001916660100000000000017905591506133e3906133c790606088019088016151e5565b63ffffffff166133dd60a0880160808901614d1f565b83613b83565b600c805466ff000000000000191690559695505050505050565b600080831561341c57613411868685613bcf565b60009150915061342c565b613427868685613ce5565b915091505b94509492505050565b600081815260066020526040902082156134e55780546001600160601b03600160601b90910481169061346c908616821015612f62565b61347685826151c5565b82546bffffffffffffffffffffffff60601b1916600160601b6001600160601b039283168102919091178455600b805488939192600c926134bb928692900416615397565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555050612aef565b80546001600160601b0390811690613501908616821015612f62565b61350b85826151c5565b82546bffffffffffffffffffffffff19166001600160601b03918216178355600b8054879260009161353f91859116615397565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505050505050565b601154600090815b818110156135cb57836001600160a01b03166011828154811061359757613597615157565b6000918252602090912001546001600160a01b0316036135bb575060019392505050565b6135c4816151ac565b9050613572565b5060009392505050565b60008181526005602090815260408083206006909252822054600290910180546001600160601b0380841694600160601b90940416925b81811015613681576004600084838154811061362a5761362a615157565b60009182526020808320909101546001600160a01b0316835282810193909352604091820181208982529092529020805470ffffffffffffffffffffffffffffffffff1916905561367a816151ac565b905061360c565b50600085815260056020526040812080546001600160a01b031990811682556001820180549091169055906136b96002830182614c7d565b50506000858152600660205260408120556136d5600886613edc565b506001600160601b0384161561372857600a80548591906000906137039084906001600160601b03166151c5565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b6001600160601b038316156137805782600a600c8282829054906101000a90046001600160601b031661375b91906151c5565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b5050915091565b6001600160a01b038116610ae757604051630fb532db60e11b815260040160405180910390fd5b60408051602081019091526000815260008290036137db5750604080516020810190915260008152612621565b63125fa26760e31b6137ed838561556f565b6001600160e01b0319161461381557604051632923fee760e11b815260040160405180910390fd5b613822826004818661559f565b8101906110bb91906155c9565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa8260405160240161386891511515815260200190565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915292915050565b600060646001600160a01b031663a3b1b31d6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156138e1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061390591906154aa565b905090565b60006110bb8383613ee8565b6000612621825490565b60006110bb8383613f37565b336001600160a01b038216036139845760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610ade565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000806139e06138a0565b9050806001600160401b0316836001600160401b0316101580613a165750610100613a0b8483615622565b6001600160401b0316115b15613a245750600092915050565b6040516315a03d4160e11b81526001600160401b0384166004820152606490632b407a8290602401602060405180830381865afa158015613a69573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110bb91906154aa565b604080518082018252600091613b4d9190859060029083908390808284376000920191909152505060408051808201825291508087019060029083908390808284376000920191909152505050608086013560a087013586613af66101008a0160e08b01614d1f565b604080518082018252906101008c019060029083908390808284376000920191909152505060408051808201825291506101408d0190600290839083908082843760009201919091525050506101808c0135613f61565b600383604001604051602001613b64929190615642565b60408051601f1981840301815291905280516020909101209392505050565b60005a611388811015613b9557600080fd5b611388810390508460408204820311613bad57600080fd5b50823b613bb957600080fd5b60008083516020850160008789f1949350505050565b600080613bdd60003661418c565b905060005a600c54613bfd908890600160581b900463ffffffff166153b7565b613c079190615183565b613c119086615658565b600c54909150600090613c3690600160781b900463ffffffff1664e8d4a51000615658565b90508215613c72576040518381527f56296f7beae05a0db815737fdb4cd298897b1e517614d62468081531ae14d0999060200160405180910390a15b8415613cbc57600c548190606490600160b81b900460ff16613c9485876153b7565b613c9e9190615658565b613ca89190615685565b613cb291906153b7565b93505050506110bb565b600c548190606490613cd890600160b81b900460ff1682615699565b60ff16613c9485876153b7565b600080600080613cf3614196565b9150915060008213613d1b576040516321ea67b360e11b815260048101839052602401610ade565b6000613d2860003661418c565b9050600083825a600c54613d4a908d90600160581b900463ffffffff166153b7565b613d549190615183565b613d5e908b615658565b613d6891906153b7565b613d7a90670de0b6b3a7640000615658565b613d849190615685565b600c54909150600090613dad9063ffffffff600160981b8204811691600160781b9004166156b2565b613dc29063ffffffff1664e8d4a51000615658565b9050600085613dd983670de0b6b3a7640000615658565b613de39190615685565b90508315613e1f576040518481527f56296f7beae05a0db815737fdb4cd298897b1e517614d62468081531ae14d0999060200160405180910390a15b60008915613e5e57600c548290606490613e4390600160c01b900460ff1687615658565b613e4d9190615685565b613e5791906153b7565b9050613e9e565b600c548290606490613e7a90600160c01b900460ff1682615699565b613e879060ff1687615658565b613e919190615685565b613e9b91906153b7565b90505b6b033b2e3c9fd0803ce8000000811115613ecb5760405163e80fa38160e01b815260040160405180910390fd5b9b949a509398505050505050505050565b60006110bb8383614261565b6000818152600183016020526040812054613f2f57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155612621565b506000612621565b6000826000018281548110613f4e57613f4e615157565b9060005260206000200154905092915050565b613f6a8961435b565b613fb65760405162461bcd60e51b815260206004820152601a60248201527f7075626c6963206b6579206973206e6f74206f6e2063757276650000000000006044820152606401610ade565b613fbf8861435b565b61400b5760405162461bcd60e51b815260206004820152601560248201527f67616d6d61206973206e6f74206f6e20637572766500000000000000000000006044820152606401610ade565b6140148361435b565b6140605760405162461bcd60e51b815260206004820152601d60248201527f6347616d6d615769746e657373206973206e6f74206f6e2063757276650000006044820152606401610ade565b6140698261435b565b6140b55760405162461bcd60e51b815260206004820152601c60248201527f73486173685769746e657373206973206e6f74206f6e206375727665000000006044820152606401610ade565b6140c1878a8887614434565b61410d5760405162461bcd60e51b815260206004820152601960248201527f6164647228632a706b2b732a6729213d5f755769746e657373000000000000006044820152606401610ade565b60006141198a87614557565b9050600061412c898b878b8689896145bb565b9050600061413d838d8d8a866146e7565b9050808a1461417e5760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b210383937b7b360991b6044820152606401610ade565b505050505050505050505050565b60006110bb614727565b600c5460035460408051633fabe5a360e21b81529051600093849367010000000000000090910463ffffffff169284926001600160a01b039092169163feaf968c9160048082019260a0929091908290030181865afa1580156141fd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061422191906156e9565b50919650909250505063ffffffff82161580159061424d57506142448142615183565b8263ffffffff16105b9250821561425b5760105493505b50509091565b6000818152600183016020526040812054801561434a576000614285600183615183565b855490915060009061429990600190615183565b90508181146142fe5760008660000182815481106142b9576142b9615157565b90600052602060002001549050808760000184815481106142dc576142dc615157565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061430f5761430f615196565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050612621565b6000915050612621565b5092915050565b80516000906401000003d019116143b45760405162461bcd60e51b815260206004820152601260248201527f696e76616c696420782d6f7264696e61746500000000000000000000000000006044820152606401610ade565b60208201516401000003d0191161440d5760405162461bcd60e51b815260206004820152601260248201527f696e76616c696420792d6f7264696e61746500000000000000000000000000006044820152606401610ade565b60208201516401000003d01990800961442d8360005b6020020151614768565b1492915050565b60006001600160a01b03821661447a5760405162461bcd60e51b815260206004820152600b60248201526a626164207769746e65737360a81b6044820152606401610ade565b60208401516000906001161561449157601c614494565b601b5b9050600070014551231950b75fc4402da1732fc9bebe1985876000602002015109865170014551231950b75fc4402da1732fc9bebe19918203925060009190890987516040805160008082526020820180845287905260ff88169282019290925260608101929092526080820183905291925060019060a0016020604051602081039080840390855afa15801561452f573d6000803e3d6000fd5b5050604051601f1901516001600160a01b039081169088161495505050505050949350505050565b61455f614c9b565b61458c600184846040516020016145789392919061575c565b60405160208183030381529060405261478c565b90505b6145988161435b565b6126215780516040805160208101929092526145b49101614578565b905061458f565b6145c3614c9b565b825186516401000003d01991829006919006036146225760405162461bcd60e51b815260206004820152601e60248201527f706f696e747320696e2073756d206d7573742062652064697374696e637400006044820152606401610ade565b61462d8789886147d9565b6146795760405162461bcd60e51b815260206004820152601660248201527f4669727374206d756c20636865636b206661696c6564000000000000000000006044820152606401610ade565b6146848486856147d9565b6146d05760405162461bcd60e51b815260206004820152601760248201527f5365636f6e64206d756c20636865636b206661696c65640000000000000000006044820152606401610ade565b6146db868484614904565b98975050505050505050565b6000600286868685876040516020016147059695949392919061577d565b60408051601f1981840301815291905280516020909101209695505050505050565b6000606c6001600160a01b031663c6f7de0e6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156138e1573d6000803e3d6000fd5b6000806401000003d01980848509840990506401000003d019600782089392505050565b614794614c9b565b61479d826149cb565b81526147b26147ad826000614423565b614a06565b6020820181905260029006600103611eca576020810180516401000003d019039052919050565b6000826000036148195760405162461bcd60e51b815260206004820152600b60248201526a3d32b9379039b1b0b630b960a91b6044820152606401610ade565b8351602085015160009061482f906002906157dc565b1561483b57601c61483e565b601b5b9050600070014551231950b75fc4402da1732fc9bebe198387096040805160008082526020820180845281905260ff86169282019290925260608101869052608081018390529192509060019060a0016020604051602081039080840390855afa1580156148b0573d6000803e3d6000fd5b5050506020604051035190506000866040516020016148cf91906157f0565b60408051601f1981840301815291905280516020909101206001600160a01b0392831692169190911498975050505050505050565b61490c614c9b565b83516020808601518551918601516000938493849361492d93909190614a26565b919450925090506401000003d01985820960011461498d5760405162461bcd60e51b815260206004820152601960248201527f696e765a206d75737420626520696e7665727365206f66207a000000000000006044820152606401610ade565b60405180604001604052806401000003d019806149ac576149ac61566f565b87860981526020016401000003d0198785099052979650505050505050565b805160208201205b6401000003d0198110611eca576040805160208082019390935281518082038401815290820190915280519101206149d3565b6000612621826002614a1f6401000003d01960016153b7565b901c614b06565b60008080600180826401000003d019896401000003d019038808905060006401000003d0198b6401000003d019038a0890506000614a6683838585614bab565b9098509050614a7788828e88614bcf565b9098509050614a8888828c87614bcf565b90985090506000614a9b8d878b85614bcf565b9098509050614aac88828686614bab565b9098509050614abd88828e89614bcf565b9098509050818114614af2576401000003d019818a0998506401000003d01982890997506401000003d0198183099650614af6565b8196505b5050505050509450945094915050565b600080614b11614cb9565b6020808252818101819052604082015260608101859052608081018490526401000003d01960a0820152614b43614cd7565b60208160c0846005600019fa925082600003614ba15760405162461bcd60e51b815260206004820152601260248201527f6269674d6f64457870206661696c7572652100000000000000000000000000006044820152606401610ade565b5195945050505050565b6000806401000003d0198487096401000003d0198487099097909650945050505050565b600080806401000003d019878509905060006401000003d01987876401000003d019030990506401000003d0198183086401000003d01986890990999098509650505050505050565b828054828255906000526020600020908101928215614c6d579160200282015b82811115614c6d57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190614c38565b50614c79929150614cf5565b5090565b5080546000825590600052602060002090810190610ae79190614cf5565b60405180604001604052806002906020820280368337509192915050565b6040518060c001604052806006906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b5b80821115614c795760008155600101614cf6565b6001600160a01b0381168114610ae757600080fd5b600060208284031215614d3157600080fd5b81356110bb81614d0a565b806040810183101561262157600080fd5b600060408284031215614d5f57600080fd5b6110bb8383614d3c565b60008060408385031215614d7c57600080fd5b823591506020830135614d8e81614d0a565b809150509250929050565b600060c08284031215614dab57600080fd5b50919050565b8015158114610ae757600080fd5b60008060008385036101e0811215614dd657600080fd5b6101a080821215614de657600080fd5b85945084013590506001600160401b03811115614e0257600080fd5b614e0e86828701614d99565b9250506101c0840135614e2081614db1565b809150509250925092565b600060208284031215614e3d57600080fd5b5035919050565b60008060408385031215614e5757600080fd5b8235614e6281614d0a565b91506020830135614d8e81614d0a565b80356001600160401b0381168114611eca57600080fd5b60008060608385031215614e9c57600080fd5b614ea68484614d3c565b9150614eb460408401614e72565b90509250929050565b600060208284031215614ecf57600080fd5b81356001600160401b03811115614ee557600080fd5b614ef184828501614d99565b949350505050565b60008060008060608587031215614f0f57600080fd5b8435614f1a81614d0a565b93506020850135925060408501356001600160401b0380821115614f3d57600080fd5b818701915087601f830112614f5157600080fd5b813581811115614f6057600080fd5b886020828501011115614f7257600080fd5b95989497505060200194505050565b803561ffff81168114611eca57600080fd5b803563ffffffff81168114611eca57600080fd5b803560ff81168114611eca57600080fd5b60008060008060008060008060006101208a8c031215614fd757600080fd5b614fe08a614f81565b9850614fee60208b01614f93565b9750614ffc60408b01614f93565b965061500a60608b01614f93565b955060808a0135945061501f60a08b01614f93565b935061502d60c08b01614f93565b925061503b60e08b01614fa7565b915061504a6101008b01614fa7565b90509295985092959850929598565b6000806040838503121561506c57600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b838110156150ab5781518752958201959082019060010161508f565b509495945050505050565b6020815260006110bb602083018461507b565b600081518084526020808501945080840160005b838110156150ab5781516001600160a01b0316875295820195908201906001016150dd565b60006001600160601b0380881683528087166020840152506001600160401b03851660408301526001600160a01b038416606083015260a0608083015261514c60a08301846150c9565b979650505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b818103818111156126215761262161516d565b634e487b7160e01b600052603160045260246000fd5b6000600182016151be576151be61516d565b5060010190565b6001600160601b038281168282160390808211156143545761435461516d565b6000602082840312156151f757600080fd5b6110bb82614f93565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b038083168181036152325761523261516d565b6001019392505050565b60006001600160401b038216806152555761525561516d565b6000190192915050565b6000808335601e1984360301811261527657600080fd5b8301803591506001600160401b0382111561529057600080fd5b6020019150368190038213156152a557600080fd5b9250929050565b6020815260ff8251166020820152602082015160408201526001600160a01b0360408301511660608201526000606083015160c060808401526152f260e08401826150c9565b905060808401516001600160601b0380821660a08601528060a08701511660c086015250508091505092915050565b6000815180845260005b818110156153475760208185018101518683018201520161532b565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006110bb6020830184615321565b60006020828403121561538c57600080fd5b81516110bb81614db1565b6001600160601b038181168382160190808211156143545761435461516d565b808201808211156126215761262161516d565b6000602082840312156153dc57600080fd5b6110bb82614f81565b878152866020820152856040820152600063ffffffff80871660608401528086166080840152506001600160a01b03841660a083015260e060c083015261542f60e0830184615321565b9998505050505050505050565b86815285602082015261ffff85166040820152600063ffffffff808616606084015280851660808401525060c060a08301526146db60c0830184615321565b6001600160401b038181168382160190808211156143545761435461516d565b60408181019083833792915050565b6000602082840312156154bc57600080fd5b5051919050565b6000602082840312156154d557600080fd5b6110bb82614e72565b8881526001600160401b0388166020820152866040820152600063ffffffff80881660608401528087166080840152506001600160a01b03851660a083015260e060c08301528260e08301526101008385828501376000838501820152601f909301601f191690910190910198975050505050505050565b828152604060208201526000614ef1604083018461507b565b6001600160e01b031981358181169160048510156155975780818660040360031b1b83161692505b505092915050565b600080858511156155af57600080fd5b838611156155bc57600080fd5b5050820193919092039150565b6000602082840312156155db57600080fd5b604051602081018181106001600160401b038211171561560b57634e487b7160e01b600052604160045260246000fd5b604052823561561981614db1565b81529392505050565b6001600160401b038281168282160390808211156143545761435461516d565b8281526060810160408360208401379392505050565b80820281158282048414176126215761262161516d565b634e487b7160e01b600052601260045260246000fd5b6000826156945761569461566f565b500490565b60ff81811683821601908111156126215761262161516d565b63ffffffff8281168282160390808211156143545761435461516d565b805169ffffffffffffffffffff81168114611eca57600080fd5b600080600080600060a0868803121561570157600080fd5b61570a866156cf565b945060208601519350604086015192506060860151915061572d608087016156cf565b90509295509295909350565b8060005b6002811015612aef57815184526020938401939091019060010161573d565b83815261576c6020820184615739565b606081019190915260800192915050565b86815261578d6020820187615739565b61579a6060820186615739565b6157a760a0820185615739565b6157b460e0820184615739565b60609190911b6bffffffffffffffffffffffff19166101208201526101340195945050505050565b6000826157eb576157eb61566f565b500690565b6157fa8183615739565b60400191905056fea164736f6c6343000813000a", +} + +var VRFCoordinatorV25ArbitrumABI = VRFCoordinatorV25ArbitrumMetaData.ABI + +var VRFCoordinatorV25ArbitrumBin = VRFCoordinatorV25ArbitrumMetaData.Bin + +func DeployVRFCoordinatorV25Arbitrum(auth *bind.TransactOpts, backend bind.ContractBackend, blockhashStore common.Address) (common.Address, *types.Transaction, *VRFCoordinatorV25Arbitrum, error) { + parsed, err := VRFCoordinatorV25ArbitrumMetaData.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(VRFCoordinatorV25ArbitrumBin), backend, blockhashStore) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &VRFCoordinatorV25Arbitrum{address: address, abi: *parsed, VRFCoordinatorV25ArbitrumCaller: VRFCoordinatorV25ArbitrumCaller{contract: contract}, VRFCoordinatorV25ArbitrumTransactor: VRFCoordinatorV25ArbitrumTransactor{contract: contract}, VRFCoordinatorV25ArbitrumFilterer: VRFCoordinatorV25ArbitrumFilterer{contract: contract}}, nil +} + +type VRFCoordinatorV25Arbitrum struct { + address common.Address + abi abi.ABI + VRFCoordinatorV25ArbitrumCaller + VRFCoordinatorV25ArbitrumTransactor + VRFCoordinatorV25ArbitrumFilterer +} + +type VRFCoordinatorV25ArbitrumCaller struct { + contract *bind.BoundContract +} + +type VRFCoordinatorV25ArbitrumTransactor struct { + contract *bind.BoundContract +} + +type VRFCoordinatorV25ArbitrumFilterer struct { + contract *bind.BoundContract +} + +type VRFCoordinatorV25ArbitrumSession struct { + Contract *VRFCoordinatorV25Arbitrum + CallOpts bind.CallOpts + TransactOpts bind.TransactOpts +} + +type VRFCoordinatorV25ArbitrumCallerSession struct { + Contract *VRFCoordinatorV25ArbitrumCaller + CallOpts bind.CallOpts +} + +type VRFCoordinatorV25ArbitrumTransactorSession struct { + Contract *VRFCoordinatorV25ArbitrumTransactor + TransactOpts bind.TransactOpts +} + +type VRFCoordinatorV25ArbitrumRaw struct { + Contract *VRFCoordinatorV25Arbitrum +} + +type VRFCoordinatorV25ArbitrumCallerRaw struct { + Contract *VRFCoordinatorV25ArbitrumCaller +} + +type VRFCoordinatorV25ArbitrumTransactorRaw struct { + Contract *VRFCoordinatorV25ArbitrumTransactor +} + +func NewVRFCoordinatorV25Arbitrum(address common.Address, backend bind.ContractBackend) (*VRFCoordinatorV25Arbitrum, error) { + abi, err := abi.JSON(strings.NewReader(VRFCoordinatorV25ArbitrumABI)) + if err != nil { + return nil, err + } + contract, err := bindVRFCoordinatorV25Arbitrum(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &VRFCoordinatorV25Arbitrum{address: address, abi: abi, VRFCoordinatorV25ArbitrumCaller: VRFCoordinatorV25ArbitrumCaller{contract: contract}, VRFCoordinatorV25ArbitrumTransactor: VRFCoordinatorV25ArbitrumTransactor{contract: contract}, VRFCoordinatorV25ArbitrumFilterer: VRFCoordinatorV25ArbitrumFilterer{contract: contract}}, nil +} + +func NewVRFCoordinatorV25ArbitrumCaller(address common.Address, caller bind.ContractCaller) (*VRFCoordinatorV25ArbitrumCaller, error) { + contract, err := bindVRFCoordinatorV25Arbitrum(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &VRFCoordinatorV25ArbitrumCaller{contract: contract}, nil +} + +func NewVRFCoordinatorV25ArbitrumTransactor(address common.Address, transactor bind.ContractTransactor) (*VRFCoordinatorV25ArbitrumTransactor, error) { + contract, err := bindVRFCoordinatorV25Arbitrum(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &VRFCoordinatorV25ArbitrumTransactor{contract: contract}, nil +} + +func NewVRFCoordinatorV25ArbitrumFilterer(address common.Address, filterer bind.ContractFilterer) (*VRFCoordinatorV25ArbitrumFilterer, error) { + contract, err := bindVRFCoordinatorV25Arbitrum(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &VRFCoordinatorV25ArbitrumFilterer{contract: contract}, nil +} + +func bindVRFCoordinatorV25Arbitrum(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := VRFCoordinatorV25ArbitrumMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _VRFCoordinatorV25Arbitrum.Contract.VRFCoordinatorV25ArbitrumCaller.contract.Call(opts, result, method, params...) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.VRFCoordinatorV25ArbitrumTransactor.contract.Transfer(opts) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.VRFCoordinatorV25ArbitrumTransactor.contract.Transact(opts, method, params...) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _VRFCoordinatorV25Arbitrum.Contract.contract.Call(opts, result, method, params...) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.contract.Transfer(opts) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.contract.Transact(opts, method, params...) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCaller) BLOCKHASHSTORE(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _VRFCoordinatorV25Arbitrum.contract.Call(opts, &out, "BLOCKHASH_STORE") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) BLOCKHASHSTORE() (common.Address, error) { + return _VRFCoordinatorV25Arbitrum.Contract.BLOCKHASHSTORE(&_VRFCoordinatorV25Arbitrum.CallOpts) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCallerSession) BLOCKHASHSTORE() (common.Address, error) { + return _VRFCoordinatorV25Arbitrum.Contract.BLOCKHASHSTORE(&_VRFCoordinatorV25Arbitrum.CallOpts) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCaller) LINK(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _VRFCoordinatorV25Arbitrum.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 (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) LINK() (common.Address, error) { + return _VRFCoordinatorV25Arbitrum.Contract.LINK(&_VRFCoordinatorV25Arbitrum.CallOpts) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCallerSession) LINK() (common.Address, error) { + return _VRFCoordinatorV25Arbitrum.Contract.LINK(&_VRFCoordinatorV25Arbitrum.CallOpts) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCaller) LINKNATIVEFEED(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _VRFCoordinatorV25Arbitrum.contract.Call(opts, &out, "LINK_NATIVE_FEED") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) LINKNATIVEFEED() (common.Address, error) { + return _VRFCoordinatorV25Arbitrum.Contract.LINKNATIVEFEED(&_VRFCoordinatorV25Arbitrum.CallOpts) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCallerSession) LINKNATIVEFEED() (common.Address, error) { + return _VRFCoordinatorV25Arbitrum.Contract.LINKNATIVEFEED(&_VRFCoordinatorV25Arbitrum.CallOpts) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCaller) MAXCONSUMERS(opts *bind.CallOpts) (uint16, error) { + var out []interface{} + err := _VRFCoordinatorV25Arbitrum.contract.Call(opts, &out, "MAX_CONSUMERS") + + if err != nil { + return *new(uint16), err + } + + out0 := *abi.ConvertType(out[0], new(uint16)).(*uint16) + + return out0, err + +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) MAXCONSUMERS() (uint16, error) { + return _VRFCoordinatorV25Arbitrum.Contract.MAXCONSUMERS(&_VRFCoordinatorV25Arbitrum.CallOpts) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCallerSession) MAXCONSUMERS() (uint16, error) { + return _VRFCoordinatorV25Arbitrum.Contract.MAXCONSUMERS(&_VRFCoordinatorV25Arbitrum.CallOpts) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCaller) MAXNUMWORDS(opts *bind.CallOpts) (uint32, error) { + var out []interface{} + err := _VRFCoordinatorV25Arbitrum.contract.Call(opts, &out, "MAX_NUM_WORDS") + + if err != nil { + return *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + + return out0, err + +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) MAXNUMWORDS() (uint32, error) { + return _VRFCoordinatorV25Arbitrum.Contract.MAXNUMWORDS(&_VRFCoordinatorV25Arbitrum.CallOpts) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCallerSession) MAXNUMWORDS() (uint32, error) { + return _VRFCoordinatorV25Arbitrum.Contract.MAXNUMWORDS(&_VRFCoordinatorV25Arbitrum.CallOpts) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCaller) MAXREQUESTCONFIRMATIONS(opts *bind.CallOpts) (uint16, error) { + var out []interface{} + err := _VRFCoordinatorV25Arbitrum.contract.Call(opts, &out, "MAX_REQUEST_CONFIRMATIONS") + + if err != nil { + return *new(uint16), err + } + + out0 := *abi.ConvertType(out[0], new(uint16)).(*uint16) + + return out0, err + +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) MAXREQUESTCONFIRMATIONS() (uint16, error) { + return _VRFCoordinatorV25Arbitrum.Contract.MAXREQUESTCONFIRMATIONS(&_VRFCoordinatorV25Arbitrum.CallOpts) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCallerSession) MAXREQUESTCONFIRMATIONS() (uint16, error) { + return _VRFCoordinatorV25Arbitrum.Contract.MAXREQUESTCONFIRMATIONS(&_VRFCoordinatorV25Arbitrum.CallOpts) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCaller) GetActiveSubscriptionIds(opts *bind.CallOpts, startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) { + var out []interface{} + err := _VRFCoordinatorV25Arbitrum.contract.Call(opts, &out, "getActiveSubscriptionIds", startIndex, maxCount) + + if err != nil { + return *new([]*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) + + return out0, err + +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) GetActiveSubscriptionIds(startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) { + return _VRFCoordinatorV25Arbitrum.Contract.GetActiveSubscriptionIds(&_VRFCoordinatorV25Arbitrum.CallOpts, startIndex, maxCount) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCallerSession) GetActiveSubscriptionIds(startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) { + return _VRFCoordinatorV25Arbitrum.Contract.GetActiveSubscriptionIds(&_VRFCoordinatorV25Arbitrum.CallOpts, startIndex, maxCount) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCaller) GetSubscription(opts *bind.CallOpts, subId *big.Int) (GetSubscription, + + error) { + var out []interface{} + err := _VRFCoordinatorV25Arbitrum.contract.Call(opts, &out, "getSubscription", subId) + + outstruct := new(GetSubscription) + if err != nil { + return *outstruct, err + } + + 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.SubOwner = *abi.ConvertType(out[3], new(common.Address)).(*common.Address) + outstruct.Consumers = *abi.ConvertType(out[4], new([]common.Address)).(*[]common.Address) + + return *outstruct, err + +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) GetSubscription(subId *big.Int) (GetSubscription, + + error) { + return _VRFCoordinatorV25Arbitrum.Contract.GetSubscription(&_VRFCoordinatorV25Arbitrum.CallOpts, subId) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCallerSession) GetSubscription(subId *big.Int) (GetSubscription, + + error) { + return _VRFCoordinatorV25Arbitrum.Contract.GetSubscription(&_VRFCoordinatorV25Arbitrum.CallOpts, subId) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCaller) HashOfKey(opts *bind.CallOpts, publicKey [2]*big.Int) ([32]byte, error) { + var out []interface{} + err := _VRFCoordinatorV25Arbitrum.contract.Call(opts, &out, "hashOfKey", publicKey) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) HashOfKey(publicKey [2]*big.Int) ([32]byte, error) { + return _VRFCoordinatorV25Arbitrum.Contract.HashOfKey(&_VRFCoordinatorV25Arbitrum.CallOpts, publicKey) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCallerSession) HashOfKey(publicKey [2]*big.Int) ([32]byte, error) { + return _VRFCoordinatorV25Arbitrum.Contract.HashOfKey(&_VRFCoordinatorV25Arbitrum.CallOpts, publicKey) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _VRFCoordinatorV25Arbitrum.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 (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) Owner() (common.Address, error) { + return _VRFCoordinatorV25Arbitrum.Contract.Owner(&_VRFCoordinatorV25Arbitrum.CallOpts) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCallerSession) Owner() (common.Address, error) { + return _VRFCoordinatorV25Arbitrum.Contract.Owner(&_VRFCoordinatorV25Arbitrum.CallOpts) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCaller) PendingRequestExists(opts *bind.CallOpts, subId *big.Int) (bool, error) { + var out []interface{} + err := _VRFCoordinatorV25Arbitrum.contract.Call(opts, &out, "pendingRequestExists", subId) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) PendingRequestExists(subId *big.Int) (bool, error) { + return _VRFCoordinatorV25Arbitrum.Contract.PendingRequestExists(&_VRFCoordinatorV25Arbitrum.CallOpts, subId) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCallerSession) PendingRequestExists(subId *big.Int) (bool, error) { + return _VRFCoordinatorV25Arbitrum.Contract.PendingRequestExists(&_VRFCoordinatorV25Arbitrum.CallOpts, subId) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCaller) SConfig(opts *bind.CallOpts) (SConfig, + + error) { + var out []interface{} + err := _VRFCoordinatorV25Arbitrum.contract.Call(opts, &out, "s_config") + + outstruct := new(SConfig) + if err != nil { + return *outstruct, err + } + + outstruct.MinimumRequestConfirmations = *abi.ConvertType(out[0], new(uint16)).(*uint16) + outstruct.MaxGasLimit = *abi.ConvertType(out[1], new(uint32)).(*uint32) + outstruct.ReentrancyLock = *abi.ConvertType(out[2], new(bool)).(*bool) + outstruct.StalenessSeconds = *abi.ConvertType(out[3], new(uint32)).(*uint32) + outstruct.GasAfterPaymentCalculation = *abi.ConvertType(out[4], new(uint32)).(*uint32) + outstruct.FulfillmentFlatFeeNativePPM = *abi.ConvertType(out[5], new(uint32)).(*uint32) + outstruct.FulfillmentFlatFeeLinkDiscountPPM = *abi.ConvertType(out[6], new(uint32)).(*uint32) + outstruct.NativePremiumPercentage = *abi.ConvertType(out[7], new(uint8)).(*uint8) + outstruct.LinkPremiumPercentage = *abi.ConvertType(out[8], new(uint8)).(*uint8) + + return *outstruct, err + +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) SConfig() (SConfig, + + error) { + return _VRFCoordinatorV25Arbitrum.Contract.SConfig(&_VRFCoordinatorV25Arbitrum.CallOpts) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCallerSession) SConfig() (SConfig, + + error) { + return _VRFCoordinatorV25Arbitrum.Contract.SConfig(&_VRFCoordinatorV25Arbitrum.CallOpts) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCaller) SCurrentSubNonce(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _VRFCoordinatorV25Arbitrum.contract.Call(opts, &out, "s_currentSubNonce") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) SCurrentSubNonce() (uint64, error) { + return _VRFCoordinatorV25Arbitrum.Contract.SCurrentSubNonce(&_VRFCoordinatorV25Arbitrum.CallOpts) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCallerSession) SCurrentSubNonce() (uint64, error) { + return _VRFCoordinatorV25Arbitrum.Contract.SCurrentSubNonce(&_VRFCoordinatorV25Arbitrum.CallOpts) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCaller) SFallbackWeiPerUnitLink(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _VRFCoordinatorV25Arbitrum.contract.Call(opts, &out, "s_fallbackWeiPerUnitLink") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) SFallbackWeiPerUnitLink() (*big.Int, error) { + return _VRFCoordinatorV25Arbitrum.Contract.SFallbackWeiPerUnitLink(&_VRFCoordinatorV25Arbitrum.CallOpts) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCallerSession) SFallbackWeiPerUnitLink() (*big.Int, error) { + return _VRFCoordinatorV25Arbitrum.Contract.SFallbackWeiPerUnitLink(&_VRFCoordinatorV25Arbitrum.CallOpts) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCaller) SProvingKeyHashes(opts *bind.CallOpts, arg0 *big.Int) ([32]byte, error) { + var out []interface{} + err := _VRFCoordinatorV25Arbitrum.contract.Call(opts, &out, "s_provingKeyHashes", arg0) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) SProvingKeyHashes(arg0 *big.Int) ([32]byte, error) { + return _VRFCoordinatorV25Arbitrum.Contract.SProvingKeyHashes(&_VRFCoordinatorV25Arbitrum.CallOpts, arg0) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCallerSession) SProvingKeyHashes(arg0 *big.Int) ([32]byte, error) { + return _VRFCoordinatorV25Arbitrum.Contract.SProvingKeyHashes(&_VRFCoordinatorV25Arbitrum.CallOpts, arg0) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCaller) SProvingKeys(opts *bind.CallOpts, arg0 [32]byte) (SProvingKeys, + + error) { + var out []interface{} + err := _VRFCoordinatorV25Arbitrum.contract.Call(opts, &out, "s_provingKeys", arg0) + + outstruct := new(SProvingKeys) + if err != nil { + return *outstruct, err + } + + outstruct.Exists = *abi.ConvertType(out[0], new(bool)).(*bool) + outstruct.MaxGas = *abi.ConvertType(out[1], new(uint64)).(*uint64) + + return *outstruct, err + +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) SProvingKeys(arg0 [32]byte) (SProvingKeys, + + error) { + return _VRFCoordinatorV25Arbitrum.Contract.SProvingKeys(&_VRFCoordinatorV25Arbitrum.CallOpts, arg0) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCallerSession) SProvingKeys(arg0 [32]byte) (SProvingKeys, + + error) { + return _VRFCoordinatorV25Arbitrum.Contract.SProvingKeys(&_VRFCoordinatorV25Arbitrum.CallOpts, arg0) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCaller) SRequestCommitments(opts *bind.CallOpts, arg0 *big.Int) ([32]byte, error) { + var out []interface{} + err := _VRFCoordinatorV25Arbitrum.contract.Call(opts, &out, "s_requestCommitments", arg0) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) SRequestCommitments(arg0 *big.Int) ([32]byte, error) { + return _VRFCoordinatorV25Arbitrum.Contract.SRequestCommitments(&_VRFCoordinatorV25Arbitrum.CallOpts, arg0) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCallerSession) SRequestCommitments(arg0 *big.Int) ([32]byte, error) { + return _VRFCoordinatorV25Arbitrum.Contract.SRequestCommitments(&_VRFCoordinatorV25Arbitrum.CallOpts, arg0) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCaller) STotalBalance(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _VRFCoordinatorV25Arbitrum.contract.Call(opts, &out, "s_totalBalance") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) STotalBalance() (*big.Int, error) { + return _VRFCoordinatorV25Arbitrum.Contract.STotalBalance(&_VRFCoordinatorV25Arbitrum.CallOpts) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCallerSession) STotalBalance() (*big.Int, error) { + return _VRFCoordinatorV25Arbitrum.Contract.STotalBalance(&_VRFCoordinatorV25Arbitrum.CallOpts) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCaller) STotalNativeBalance(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _VRFCoordinatorV25Arbitrum.contract.Call(opts, &out, "s_totalNativeBalance") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) STotalNativeBalance() (*big.Int, error) { + return _VRFCoordinatorV25Arbitrum.Contract.STotalNativeBalance(&_VRFCoordinatorV25Arbitrum.CallOpts) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumCallerSession) STotalNativeBalance() (*big.Int, error) { + return _VRFCoordinatorV25Arbitrum.Contract.STotalNativeBalance(&_VRFCoordinatorV25Arbitrum.CallOpts) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.contract.Transact(opts, "acceptOwnership") +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) AcceptOwnership() (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.AcceptOwnership(&_VRFCoordinatorV25Arbitrum.TransactOpts) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactorSession) AcceptOwnership() (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.AcceptOwnership(&_VRFCoordinatorV25Arbitrum.TransactOpts) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactor) AcceptSubscriptionOwnerTransfer(opts *bind.TransactOpts, subId *big.Int) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.contract.Transact(opts, "acceptSubscriptionOwnerTransfer", subId) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) AcceptSubscriptionOwnerTransfer(subId *big.Int) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.AcceptSubscriptionOwnerTransfer(&_VRFCoordinatorV25Arbitrum.TransactOpts, subId) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactorSession) AcceptSubscriptionOwnerTransfer(subId *big.Int) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.AcceptSubscriptionOwnerTransfer(&_VRFCoordinatorV25Arbitrum.TransactOpts, subId) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactor) AddConsumer(opts *bind.TransactOpts, subId *big.Int, consumer common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.contract.Transact(opts, "addConsumer", subId, consumer) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) AddConsumer(subId *big.Int, consumer common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.AddConsumer(&_VRFCoordinatorV25Arbitrum.TransactOpts, subId, consumer) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactorSession) AddConsumer(subId *big.Int, consumer common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.AddConsumer(&_VRFCoordinatorV25Arbitrum.TransactOpts, subId, consumer) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactor) CancelSubscription(opts *bind.TransactOpts, subId *big.Int, to common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.contract.Transact(opts, "cancelSubscription", subId, to) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) CancelSubscription(subId *big.Int, to common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.CancelSubscription(&_VRFCoordinatorV25Arbitrum.TransactOpts, subId, to) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactorSession) CancelSubscription(subId *big.Int, to common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.CancelSubscription(&_VRFCoordinatorV25Arbitrum.TransactOpts, subId, to) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactor) CreateSubscription(opts *bind.TransactOpts) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.contract.Transact(opts, "createSubscription") +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) CreateSubscription() (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.CreateSubscription(&_VRFCoordinatorV25Arbitrum.TransactOpts) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactorSession) CreateSubscription() (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.CreateSubscription(&_VRFCoordinatorV25Arbitrum.TransactOpts) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactor) DeregisterMigratableCoordinator(opts *bind.TransactOpts, target common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.contract.Transact(opts, "deregisterMigratableCoordinator", target) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) DeregisterMigratableCoordinator(target common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.DeregisterMigratableCoordinator(&_VRFCoordinatorV25Arbitrum.TransactOpts, target) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactorSession) DeregisterMigratableCoordinator(target common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.DeregisterMigratableCoordinator(&_VRFCoordinatorV25Arbitrum.TransactOpts, target) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactor) DeregisterProvingKey(opts *bind.TransactOpts, publicProvingKey [2]*big.Int) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.contract.Transact(opts, "deregisterProvingKey", publicProvingKey) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) DeregisterProvingKey(publicProvingKey [2]*big.Int) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.DeregisterProvingKey(&_VRFCoordinatorV25Arbitrum.TransactOpts, publicProvingKey) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactorSession) DeregisterProvingKey(publicProvingKey [2]*big.Int) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.DeregisterProvingKey(&_VRFCoordinatorV25Arbitrum.TransactOpts, publicProvingKey) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactor) FulfillRandomWords(opts *bind.TransactOpts, proof VRFProof, rc VRFTypesRequestCommitmentV2Plus, onlyPremium bool) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.contract.Transact(opts, "fulfillRandomWords", proof, rc, onlyPremium) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) FulfillRandomWords(proof VRFProof, rc VRFTypesRequestCommitmentV2Plus, onlyPremium bool) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.FulfillRandomWords(&_VRFCoordinatorV25Arbitrum.TransactOpts, proof, rc, onlyPremium) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactorSession) FulfillRandomWords(proof VRFProof, rc VRFTypesRequestCommitmentV2Plus, onlyPremium bool) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.FulfillRandomWords(&_VRFCoordinatorV25Arbitrum.TransactOpts, proof, rc, onlyPremium) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactor) FundSubscriptionWithNative(opts *bind.TransactOpts, subId *big.Int) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.contract.Transact(opts, "fundSubscriptionWithNative", subId) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) FundSubscriptionWithNative(subId *big.Int) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.FundSubscriptionWithNative(&_VRFCoordinatorV25Arbitrum.TransactOpts, subId) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactorSession) FundSubscriptionWithNative(subId *big.Int) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.FundSubscriptionWithNative(&_VRFCoordinatorV25Arbitrum.TransactOpts, subId) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactor) Migrate(opts *bind.TransactOpts, subId *big.Int, newCoordinator common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.contract.Transact(opts, "migrate", subId, newCoordinator) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) Migrate(subId *big.Int, newCoordinator common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.Migrate(&_VRFCoordinatorV25Arbitrum.TransactOpts, subId, newCoordinator) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactorSession) Migrate(subId *big.Int, newCoordinator common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.Migrate(&_VRFCoordinatorV25Arbitrum.TransactOpts, subId, newCoordinator) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactor) OnTokenTransfer(opts *bind.TransactOpts, arg0 common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.contract.Transact(opts, "onTokenTransfer", arg0, amount, data) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) OnTokenTransfer(arg0 common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.OnTokenTransfer(&_VRFCoordinatorV25Arbitrum.TransactOpts, arg0, amount, data) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactorSession) OnTokenTransfer(arg0 common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.OnTokenTransfer(&_VRFCoordinatorV25Arbitrum.TransactOpts, arg0, amount, data) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactor) OwnerCancelSubscription(opts *bind.TransactOpts, subId *big.Int) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.contract.Transact(opts, "ownerCancelSubscription", subId) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) OwnerCancelSubscription(subId *big.Int) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.OwnerCancelSubscription(&_VRFCoordinatorV25Arbitrum.TransactOpts, subId) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactorSession) OwnerCancelSubscription(subId *big.Int) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.OwnerCancelSubscription(&_VRFCoordinatorV25Arbitrum.TransactOpts, subId) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactor) RecoverFunds(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.contract.Transact(opts, "recoverFunds", to) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) RecoverFunds(to common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.RecoverFunds(&_VRFCoordinatorV25Arbitrum.TransactOpts, to) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactorSession) RecoverFunds(to common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.RecoverFunds(&_VRFCoordinatorV25Arbitrum.TransactOpts, to) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactor) RecoverNativeFunds(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.contract.Transact(opts, "recoverNativeFunds", to) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) RecoverNativeFunds(to common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.RecoverNativeFunds(&_VRFCoordinatorV25Arbitrum.TransactOpts, to) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactorSession) RecoverNativeFunds(to common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.RecoverNativeFunds(&_VRFCoordinatorV25Arbitrum.TransactOpts, to) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactor) RegisterMigratableCoordinator(opts *bind.TransactOpts, target common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.contract.Transact(opts, "registerMigratableCoordinator", target) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) RegisterMigratableCoordinator(target common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.RegisterMigratableCoordinator(&_VRFCoordinatorV25Arbitrum.TransactOpts, target) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactorSession) RegisterMigratableCoordinator(target common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.RegisterMigratableCoordinator(&_VRFCoordinatorV25Arbitrum.TransactOpts, target) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactor) RegisterProvingKey(opts *bind.TransactOpts, publicProvingKey [2]*big.Int, maxGas uint64) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.contract.Transact(opts, "registerProvingKey", publicProvingKey, maxGas) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) RegisterProvingKey(publicProvingKey [2]*big.Int, maxGas uint64) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.RegisterProvingKey(&_VRFCoordinatorV25Arbitrum.TransactOpts, publicProvingKey, maxGas) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactorSession) RegisterProvingKey(publicProvingKey [2]*big.Int, maxGas uint64) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.RegisterProvingKey(&_VRFCoordinatorV25Arbitrum.TransactOpts, publicProvingKey, maxGas) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactor) RemoveConsumer(opts *bind.TransactOpts, subId *big.Int, consumer common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.contract.Transact(opts, "removeConsumer", subId, consumer) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) RemoveConsumer(subId *big.Int, consumer common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.RemoveConsumer(&_VRFCoordinatorV25Arbitrum.TransactOpts, subId, consumer) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactorSession) RemoveConsumer(subId *big.Int, consumer common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.RemoveConsumer(&_VRFCoordinatorV25Arbitrum.TransactOpts, subId, consumer) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactor) RequestRandomWords(opts *bind.TransactOpts, req VRFV2PlusClientRandomWordsRequest) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.contract.Transact(opts, "requestRandomWords", req) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) RequestRandomWords(req VRFV2PlusClientRandomWordsRequest) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.RequestRandomWords(&_VRFCoordinatorV25Arbitrum.TransactOpts, req) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactorSession) RequestRandomWords(req VRFV2PlusClientRandomWordsRequest) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.RequestRandomWords(&_VRFCoordinatorV25Arbitrum.TransactOpts, req) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactor) RequestSubscriptionOwnerTransfer(opts *bind.TransactOpts, subId *big.Int, newOwner common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.contract.Transact(opts, "requestSubscriptionOwnerTransfer", subId, newOwner) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) RequestSubscriptionOwnerTransfer(subId *big.Int, newOwner common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.RequestSubscriptionOwnerTransfer(&_VRFCoordinatorV25Arbitrum.TransactOpts, subId, newOwner) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactorSession) RequestSubscriptionOwnerTransfer(subId *big.Int, newOwner common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.RequestSubscriptionOwnerTransfer(&_VRFCoordinatorV25Arbitrum.TransactOpts, subId, newOwner) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactor) SetConfig(opts *bind.TransactOpts, minimumRequestConfirmations uint16, maxGasLimit uint32, stalenessSeconds uint32, gasAfterPaymentCalculation uint32, fallbackWeiPerUnitLink *big.Int, fulfillmentFlatFeeNativePPM uint32, fulfillmentFlatFeeLinkDiscountPPM uint32, nativePremiumPercentage uint8, linkPremiumPercentage uint8) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.contract.Transact(opts, "setConfig", minimumRequestConfirmations, maxGasLimit, stalenessSeconds, gasAfterPaymentCalculation, fallbackWeiPerUnitLink, fulfillmentFlatFeeNativePPM, fulfillmentFlatFeeLinkDiscountPPM, nativePremiumPercentage, linkPremiumPercentage) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) SetConfig(minimumRequestConfirmations uint16, maxGasLimit uint32, stalenessSeconds uint32, gasAfterPaymentCalculation uint32, fallbackWeiPerUnitLink *big.Int, fulfillmentFlatFeeNativePPM uint32, fulfillmentFlatFeeLinkDiscountPPM uint32, nativePremiumPercentage uint8, linkPremiumPercentage uint8) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.SetConfig(&_VRFCoordinatorV25Arbitrum.TransactOpts, minimumRequestConfirmations, maxGasLimit, stalenessSeconds, gasAfterPaymentCalculation, fallbackWeiPerUnitLink, fulfillmentFlatFeeNativePPM, fulfillmentFlatFeeLinkDiscountPPM, nativePremiumPercentage, linkPremiumPercentage) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactorSession) SetConfig(minimumRequestConfirmations uint16, maxGasLimit uint32, stalenessSeconds uint32, gasAfterPaymentCalculation uint32, fallbackWeiPerUnitLink *big.Int, fulfillmentFlatFeeNativePPM uint32, fulfillmentFlatFeeLinkDiscountPPM uint32, nativePremiumPercentage uint8, linkPremiumPercentage uint8) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.SetConfig(&_VRFCoordinatorV25Arbitrum.TransactOpts, minimumRequestConfirmations, maxGasLimit, stalenessSeconds, gasAfterPaymentCalculation, fallbackWeiPerUnitLink, fulfillmentFlatFeeNativePPM, fulfillmentFlatFeeLinkDiscountPPM, nativePremiumPercentage, linkPremiumPercentage) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactor) SetLINKAndLINKNativeFeed(opts *bind.TransactOpts, link common.Address, linkNativeFeed common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.contract.Transact(opts, "setLINKAndLINKNativeFeed", link, linkNativeFeed) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) SetLINKAndLINKNativeFeed(link common.Address, linkNativeFeed common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.SetLINKAndLINKNativeFeed(&_VRFCoordinatorV25Arbitrum.TransactOpts, link, linkNativeFeed) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactorSession) SetLINKAndLINKNativeFeed(link common.Address, linkNativeFeed common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.SetLINKAndLINKNativeFeed(&_VRFCoordinatorV25Arbitrum.TransactOpts, link, linkNativeFeed) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.contract.Transact(opts, "transferOwnership", to) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.TransferOwnership(&_VRFCoordinatorV25Arbitrum.TransactOpts, to) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.TransferOwnership(&_VRFCoordinatorV25Arbitrum.TransactOpts, to) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactor) Withdraw(opts *bind.TransactOpts, recipient common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.contract.Transact(opts, "withdraw", recipient) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) Withdraw(recipient common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.Withdraw(&_VRFCoordinatorV25Arbitrum.TransactOpts, recipient) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactorSession) Withdraw(recipient common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.Withdraw(&_VRFCoordinatorV25Arbitrum.TransactOpts, recipient) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactor) WithdrawNative(opts *bind.TransactOpts, recipient common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.contract.Transact(opts, "withdrawNative", recipient) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumSession) WithdrawNative(recipient common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.WithdrawNative(&_VRFCoordinatorV25Arbitrum.TransactOpts, recipient) +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumTransactorSession) WithdrawNative(recipient common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Arbitrum.Contract.WithdrawNative(&_VRFCoordinatorV25Arbitrum.TransactOpts, recipient) +} + +type VRFCoordinatorV25ArbitrumConfigSetIterator struct { + Event *VRFCoordinatorV25ArbitrumConfigSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25ArbitrumConfigSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25ArbitrumConfigSet) + 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(VRFCoordinatorV25ArbitrumConfigSet) + 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 *VRFCoordinatorV25ArbitrumConfigSetIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25ArbitrumConfigSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25ArbitrumConfigSet struct { + MinimumRequestConfirmations uint16 + MaxGasLimit uint32 + StalenessSeconds uint32 + GasAfterPaymentCalculation uint32 + FallbackWeiPerUnitLink *big.Int + FulfillmentFlatFeeNativePPM uint32 + FulfillmentFlatFeeLinkDiscountPPM uint32 + NativePremiumPercentage uint8 + LinkPremiumPercentage uint8 + Raw types.Log +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) FilterConfigSet(opts *bind.FilterOpts) (*VRFCoordinatorV25ArbitrumConfigSetIterator, error) { + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.FilterLogs(opts, "ConfigSet") + if err != nil { + return nil, err + } + return &VRFCoordinatorV25ArbitrumConfigSetIterator{contract: _VRFCoordinatorV25Arbitrum.contract, event: "ConfigSet", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) WatchConfigSet(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumConfigSet) (event.Subscription, error) { + + logs, sub, err := _VRFCoordinatorV25Arbitrum.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(VRFCoordinatorV25ArbitrumConfigSet) + if err := _VRFCoordinatorV25Arbitrum.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 (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) ParseConfigSet(log types.Log) (*VRFCoordinatorV25ArbitrumConfigSet, error) { + event := new(VRFCoordinatorV25ArbitrumConfigSet) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "ConfigSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25ArbitrumCoordinatorDeregisteredIterator struct { + Event *VRFCoordinatorV25ArbitrumCoordinatorDeregistered + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25ArbitrumCoordinatorDeregisteredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25ArbitrumCoordinatorDeregistered) + 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(VRFCoordinatorV25ArbitrumCoordinatorDeregistered) + 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 *VRFCoordinatorV25ArbitrumCoordinatorDeregisteredIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25ArbitrumCoordinatorDeregisteredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25ArbitrumCoordinatorDeregistered struct { + CoordinatorAddress common.Address + Raw types.Log +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) FilterCoordinatorDeregistered(opts *bind.FilterOpts) (*VRFCoordinatorV25ArbitrumCoordinatorDeregisteredIterator, error) { + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.FilterLogs(opts, "CoordinatorDeregistered") + if err != nil { + return nil, err + } + return &VRFCoordinatorV25ArbitrumCoordinatorDeregisteredIterator{contract: _VRFCoordinatorV25Arbitrum.contract, event: "CoordinatorDeregistered", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) WatchCoordinatorDeregistered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumCoordinatorDeregistered) (event.Subscription, error) { + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.WatchLogs(opts, "CoordinatorDeregistered") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25ArbitrumCoordinatorDeregistered) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "CoordinatorDeregistered", 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 (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) ParseCoordinatorDeregistered(log types.Log) (*VRFCoordinatorV25ArbitrumCoordinatorDeregistered, error) { + event := new(VRFCoordinatorV25ArbitrumCoordinatorDeregistered) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "CoordinatorDeregistered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25ArbitrumCoordinatorRegisteredIterator struct { + Event *VRFCoordinatorV25ArbitrumCoordinatorRegistered + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25ArbitrumCoordinatorRegisteredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25ArbitrumCoordinatorRegistered) + 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(VRFCoordinatorV25ArbitrumCoordinatorRegistered) + 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 *VRFCoordinatorV25ArbitrumCoordinatorRegisteredIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25ArbitrumCoordinatorRegisteredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25ArbitrumCoordinatorRegistered struct { + CoordinatorAddress common.Address + Raw types.Log +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) FilterCoordinatorRegistered(opts *bind.FilterOpts) (*VRFCoordinatorV25ArbitrumCoordinatorRegisteredIterator, error) { + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.FilterLogs(opts, "CoordinatorRegistered") + if err != nil { + return nil, err + } + return &VRFCoordinatorV25ArbitrumCoordinatorRegisteredIterator{contract: _VRFCoordinatorV25Arbitrum.contract, event: "CoordinatorRegistered", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) WatchCoordinatorRegistered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumCoordinatorRegistered) (event.Subscription, error) { + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.WatchLogs(opts, "CoordinatorRegistered") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25ArbitrumCoordinatorRegistered) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "CoordinatorRegistered", 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 (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) ParseCoordinatorRegistered(log types.Log) (*VRFCoordinatorV25ArbitrumCoordinatorRegistered, error) { + event := new(VRFCoordinatorV25ArbitrumCoordinatorRegistered) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "CoordinatorRegistered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25ArbitrumFallbackWeiPerUnitLinkUsedIterator struct { + Event *VRFCoordinatorV25ArbitrumFallbackWeiPerUnitLinkUsed + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25ArbitrumFallbackWeiPerUnitLinkUsedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25ArbitrumFallbackWeiPerUnitLinkUsed) + 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(VRFCoordinatorV25ArbitrumFallbackWeiPerUnitLinkUsed) + 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 *VRFCoordinatorV25ArbitrumFallbackWeiPerUnitLinkUsedIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25ArbitrumFallbackWeiPerUnitLinkUsedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25ArbitrumFallbackWeiPerUnitLinkUsed struct { + RequestId *big.Int + FallbackWeiPerUnitLink *big.Int + Raw types.Log +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) FilterFallbackWeiPerUnitLinkUsed(opts *bind.FilterOpts) (*VRFCoordinatorV25ArbitrumFallbackWeiPerUnitLinkUsedIterator, error) { + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.FilterLogs(opts, "FallbackWeiPerUnitLinkUsed") + if err != nil { + return nil, err + } + return &VRFCoordinatorV25ArbitrumFallbackWeiPerUnitLinkUsedIterator{contract: _VRFCoordinatorV25Arbitrum.contract, event: "FallbackWeiPerUnitLinkUsed", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) WatchFallbackWeiPerUnitLinkUsed(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumFallbackWeiPerUnitLinkUsed) (event.Subscription, error) { + + logs, sub, err := _VRFCoordinatorV25Arbitrum.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(VRFCoordinatorV25ArbitrumFallbackWeiPerUnitLinkUsed) + if err := _VRFCoordinatorV25Arbitrum.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 (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) ParseFallbackWeiPerUnitLinkUsed(log types.Log) (*VRFCoordinatorV25ArbitrumFallbackWeiPerUnitLinkUsed, error) { + event := new(VRFCoordinatorV25ArbitrumFallbackWeiPerUnitLinkUsed) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "FallbackWeiPerUnitLinkUsed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25ArbitrumFundsRecoveredIterator struct { + Event *VRFCoordinatorV25ArbitrumFundsRecovered + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25ArbitrumFundsRecoveredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25ArbitrumFundsRecovered) + 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(VRFCoordinatorV25ArbitrumFundsRecovered) + 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 *VRFCoordinatorV25ArbitrumFundsRecoveredIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25ArbitrumFundsRecoveredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25ArbitrumFundsRecovered struct { + To common.Address + Amount *big.Int + Raw types.Log +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) FilterFundsRecovered(opts *bind.FilterOpts) (*VRFCoordinatorV25ArbitrumFundsRecoveredIterator, error) { + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.FilterLogs(opts, "FundsRecovered") + if err != nil { + return nil, err + } + return &VRFCoordinatorV25ArbitrumFundsRecoveredIterator{contract: _VRFCoordinatorV25Arbitrum.contract, event: "FundsRecovered", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) WatchFundsRecovered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumFundsRecovered) (event.Subscription, error) { + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.WatchLogs(opts, "FundsRecovered") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25ArbitrumFundsRecovered) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "FundsRecovered", 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 (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) ParseFundsRecovered(log types.Log) (*VRFCoordinatorV25ArbitrumFundsRecovered, error) { + event := new(VRFCoordinatorV25ArbitrumFundsRecovered) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "FundsRecovered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25ArbitrumL1GasFeeIterator struct { + Event *VRFCoordinatorV25ArbitrumL1GasFee + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25ArbitrumL1GasFeeIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25ArbitrumL1GasFee) + 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(VRFCoordinatorV25ArbitrumL1GasFee) + 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 *VRFCoordinatorV25ArbitrumL1GasFeeIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25ArbitrumL1GasFeeIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25ArbitrumL1GasFee struct { + Fee *big.Int + Raw types.Log +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) FilterL1GasFee(opts *bind.FilterOpts) (*VRFCoordinatorV25ArbitrumL1GasFeeIterator, error) { + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.FilterLogs(opts, "L1GasFee") + if err != nil { + return nil, err + } + return &VRFCoordinatorV25ArbitrumL1GasFeeIterator{contract: _VRFCoordinatorV25Arbitrum.contract, event: "L1GasFee", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) WatchL1GasFee(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumL1GasFee) (event.Subscription, error) { + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.WatchLogs(opts, "L1GasFee") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25ArbitrumL1GasFee) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "L1GasFee", 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 (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) ParseL1GasFee(log types.Log) (*VRFCoordinatorV25ArbitrumL1GasFee, error) { + event := new(VRFCoordinatorV25ArbitrumL1GasFee) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "L1GasFee", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25ArbitrumMigrationCompletedIterator struct { + Event *VRFCoordinatorV25ArbitrumMigrationCompleted + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25ArbitrumMigrationCompletedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25ArbitrumMigrationCompleted) + 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(VRFCoordinatorV25ArbitrumMigrationCompleted) + 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 *VRFCoordinatorV25ArbitrumMigrationCompletedIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25ArbitrumMigrationCompletedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25ArbitrumMigrationCompleted struct { + NewCoordinator common.Address + SubId *big.Int + Raw types.Log +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) FilterMigrationCompleted(opts *bind.FilterOpts) (*VRFCoordinatorV25ArbitrumMigrationCompletedIterator, error) { + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.FilterLogs(opts, "MigrationCompleted") + if err != nil { + return nil, err + } + return &VRFCoordinatorV25ArbitrumMigrationCompletedIterator{contract: _VRFCoordinatorV25Arbitrum.contract, event: "MigrationCompleted", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) WatchMigrationCompleted(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumMigrationCompleted) (event.Subscription, error) { + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.WatchLogs(opts, "MigrationCompleted") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25ArbitrumMigrationCompleted) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "MigrationCompleted", 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 (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) ParseMigrationCompleted(log types.Log) (*VRFCoordinatorV25ArbitrumMigrationCompleted, error) { + event := new(VRFCoordinatorV25ArbitrumMigrationCompleted) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "MigrationCompleted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25ArbitrumNativeFundsRecoveredIterator struct { + Event *VRFCoordinatorV25ArbitrumNativeFundsRecovered + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25ArbitrumNativeFundsRecoveredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25ArbitrumNativeFundsRecovered) + 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(VRFCoordinatorV25ArbitrumNativeFundsRecovered) + 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 *VRFCoordinatorV25ArbitrumNativeFundsRecoveredIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25ArbitrumNativeFundsRecoveredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25ArbitrumNativeFundsRecovered struct { + To common.Address + Amount *big.Int + Raw types.Log +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) FilterNativeFundsRecovered(opts *bind.FilterOpts) (*VRFCoordinatorV25ArbitrumNativeFundsRecoveredIterator, error) { + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.FilterLogs(opts, "NativeFundsRecovered") + if err != nil { + return nil, err + } + return &VRFCoordinatorV25ArbitrumNativeFundsRecoveredIterator{contract: _VRFCoordinatorV25Arbitrum.contract, event: "NativeFundsRecovered", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) WatchNativeFundsRecovered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumNativeFundsRecovered) (event.Subscription, error) { + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.WatchLogs(opts, "NativeFundsRecovered") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25ArbitrumNativeFundsRecovered) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "NativeFundsRecovered", 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 (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) ParseNativeFundsRecovered(log types.Log) (*VRFCoordinatorV25ArbitrumNativeFundsRecovered, error) { + event := new(VRFCoordinatorV25ArbitrumNativeFundsRecovered) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "NativeFundsRecovered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25ArbitrumOwnershipTransferRequestedIterator struct { + Event *VRFCoordinatorV25ArbitrumOwnershipTransferRequested + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25ArbitrumOwnershipTransferRequestedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25ArbitrumOwnershipTransferRequested) + 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(VRFCoordinatorV25ArbitrumOwnershipTransferRequested) + 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 *VRFCoordinatorV25ArbitrumOwnershipTransferRequestedIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25ArbitrumOwnershipTransferRequestedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25ArbitrumOwnershipTransferRequested struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFCoordinatorV25ArbitrumOwnershipTransferRequestedIterator, 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 := _VRFCoordinatorV25Arbitrum.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + if err != nil { + return nil, err + } + return &VRFCoordinatorV25ArbitrumOwnershipTransferRequestedIterator{contract: _VRFCoordinatorV25Arbitrum.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumOwnershipTransferRequested, 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 := _VRFCoordinatorV25Arbitrum.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(VRFCoordinatorV25ArbitrumOwnershipTransferRequested) + if err := _VRFCoordinatorV25Arbitrum.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 (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) ParseOwnershipTransferRequested(log types.Log) (*VRFCoordinatorV25ArbitrumOwnershipTransferRequested, error) { + event := new(VRFCoordinatorV25ArbitrumOwnershipTransferRequested) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25ArbitrumOwnershipTransferredIterator struct { + Event *VRFCoordinatorV25ArbitrumOwnershipTransferred + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25ArbitrumOwnershipTransferredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25ArbitrumOwnershipTransferred) + 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(VRFCoordinatorV25ArbitrumOwnershipTransferred) + 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 *VRFCoordinatorV25ArbitrumOwnershipTransferredIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25ArbitrumOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25ArbitrumOwnershipTransferred struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFCoordinatorV25ArbitrumOwnershipTransferredIterator, 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 := _VRFCoordinatorV25Arbitrum.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) + if err != nil { + return nil, err + } + return &VRFCoordinatorV25ArbitrumOwnershipTransferredIterator{contract: _VRFCoordinatorV25Arbitrum.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumOwnershipTransferred, 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 := _VRFCoordinatorV25Arbitrum.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(VRFCoordinatorV25ArbitrumOwnershipTransferred) + if err := _VRFCoordinatorV25Arbitrum.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 (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) ParseOwnershipTransferred(log types.Log) (*VRFCoordinatorV25ArbitrumOwnershipTransferred, error) { + event := new(VRFCoordinatorV25ArbitrumOwnershipTransferred) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25ArbitrumProvingKeyDeregisteredIterator struct { + Event *VRFCoordinatorV25ArbitrumProvingKeyDeregistered + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25ArbitrumProvingKeyDeregisteredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25ArbitrumProvingKeyDeregistered) + 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(VRFCoordinatorV25ArbitrumProvingKeyDeregistered) + 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 *VRFCoordinatorV25ArbitrumProvingKeyDeregisteredIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25ArbitrumProvingKeyDeregisteredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25ArbitrumProvingKeyDeregistered struct { + KeyHash [32]byte + MaxGas uint64 + Raw types.Log +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) FilterProvingKeyDeregistered(opts *bind.FilterOpts) (*VRFCoordinatorV25ArbitrumProvingKeyDeregisteredIterator, error) { + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.FilterLogs(opts, "ProvingKeyDeregistered") + if err != nil { + return nil, err + } + return &VRFCoordinatorV25ArbitrumProvingKeyDeregisteredIterator{contract: _VRFCoordinatorV25Arbitrum.contract, event: "ProvingKeyDeregistered", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) WatchProvingKeyDeregistered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumProvingKeyDeregistered) (event.Subscription, error) { + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.WatchLogs(opts, "ProvingKeyDeregistered") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25ArbitrumProvingKeyDeregistered) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "ProvingKeyDeregistered", 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 (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) ParseProvingKeyDeregistered(log types.Log) (*VRFCoordinatorV25ArbitrumProvingKeyDeregistered, error) { + event := new(VRFCoordinatorV25ArbitrumProvingKeyDeregistered) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "ProvingKeyDeregistered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25ArbitrumProvingKeyRegisteredIterator struct { + Event *VRFCoordinatorV25ArbitrumProvingKeyRegistered + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25ArbitrumProvingKeyRegisteredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25ArbitrumProvingKeyRegistered) + 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(VRFCoordinatorV25ArbitrumProvingKeyRegistered) + 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 *VRFCoordinatorV25ArbitrumProvingKeyRegisteredIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25ArbitrumProvingKeyRegisteredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25ArbitrumProvingKeyRegistered struct { + KeyHash [32]byte + MaxGas uint64 + Raw types.Log +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) FilterProvingKeyRegistered(opts *bind.FilterOpts) (*VRFCoordinatorV25ArbitrumProvingKeyRegisteredIterator, error) { + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.FilterLogs(opts, "ProvingKeyRegistered") + if err != nil { + return nil, err + } + return &VRFCoordinatorV25ArbitrumProvingKeyRegisteredIterator{contract: _VRFCoordinatorV25Arbitrum.contract, event: "ProvingKeyRegistered", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) WatchProvingKeyRegistered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumProvingKeyRegistered) (event.Subscription, error) { + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.WatchLogs(opts, "ProvingKeyRegistered") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25ArbitrumProvingKeyRegistered) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "ProvingKeyRegistered", 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 (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) ParseProvingKeyRegistered(log types.Log) (*VRFCoordinatorV25ArbitrumProvingKeyRegistered, error) { + event := new(VRFCoordinatorV25ArbitrumProvingKeyRegistered) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "ProvingKeyRegistered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25ArbitrumRandomWordsFulfilledIterator struct { + Event *VRFCoordinatorV25ArbitrumRandomWordsFulfilled + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25ArbitrumRandomWordsFulfilledIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25ArbitrumRandomWordsFulfilled) + 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(VRFCoordinatorV25ArbitrumRandomWordsFulfilled) + 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 *VRFCoordinatorV25ArbitrumRandomWordsFulfilledIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25ArbitrumRandomWordsFulfilledIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25ArbitrumRandomWordsFulfilled struct { + RequestId *big.Int + OutputSeed *big.Int + SubId *big.Int + Payment *big.Int + NativePayment bool + Success bool + OnlyPremium bool + Raw types.Log +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) FilterRandomWordsFulfilled(opts *bind.FilterOpts, requestId []*big.Int, subId []*big.Int) (*VRFCoordinatorV25ArbitrumRandomWordsFulfilledIterator, error) { + + var requestIdRule []interface{} + for _, requestIdItem := range requestId { + requestIdRule = append(requestIdRule, requestIdItem) + } + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.FilterLogs(opts, "RandomWordsFulfilled", requestIdRule, subIdRule) + if err != nil { + return nil, err + } + return &VRFCoordinatorV25ArbitrumRandomWordsFulfilledIterator{contract: _VRFCoordinatorV25Arbitrum.contract, event: "RandomWordsFulfilled", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) WatchRandomWordsFulfilled(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumRandomWordsFulfilled, requestId []*big.Int, subId []*big.Int) (event.Subscription, error) { + + var requestIdRule []interface{} + for _, requestIdItem := range requestId { + requestIdRule = append(requestIdRule, requestIdItem) + } + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.WatchLogs(opts, "RandomWordsFulfilled", requestIdRule, subIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25ArbitrumRandomWordsFulfilled) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "RandomWordsFulfilled", 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 (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) ParseRandomWordsFulfilled(log types.Log) (*VRFCoordinatorV25ArbitrumRandomWordsFulfilled, error) { + event := new(VRFCoordinatorV25ArbitrumRandomWordsFulfilled) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "RandomWordsFulfilled", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25ArbitrumRandomWordsRequestedIterator struct { + Event *VRFCoordinatorV25ArbitrumRandomWordsRequested + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25ArbitrumRandomWordsRequestedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25ArbitrumRandomWordsRequested) + 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(VRFCoordinatorV25ArbitrumRandomWordsRequested) + 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 *VRFCoordinatorV25ArbitrumRandomWordsRequestedIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25ArbitrumRandomWordsRequestedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25ArbitrumRandomWordsRequested struct { + KeyHash [32]byte + RequestId *big.Int + PreSeed *big.Int + SubId *big.Int + MinimumRequestConfirmations uint16 + CallbackGasLimit uint32 + NumWords uint32 + ExtraArgs []byte + Sender common.Address + Raw types.Log +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) FilterRandomWordsRequested(opts *bind.FilterOpts, keyHash [][32]byte, subId []*big.Int, sender []common.Address) (*VRFCoordinatorV25ArbitrumRandomWordsRequestedIterator, error) { + + var keyHashRule []interface{} + for _, keyHashItem := range keyHash { + keyHashRule = append(keyHashRule, keyHashItem) + } + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.FilterLogs(opts, "RandomWordsRequested", keyHashRule, subIdRule, senderRule) + if err != nil { + return nil, err + } + return &VRFCoordinatorV25ArbitrumRandomWordsRequestedIterator{contract: _VRFCoordinatorV25Arbitrum.contract, event: "RandomWordsRequested", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) WatchRandomWordsRequested(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumRandomWordsRequested, keyHash [][32]byte, subId []*big.Int, sender []common.Address) (event.Subscription, error) { + + var keyHashRule []interface{} + for _, keyHashItem := range keyHash { + keyHashRule = append(keyHashRule, keyHashItem) + } + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.WatchLogs(opts, "RandomWordsRequested", keyHashRule, subIdRule, senderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25ArbitrumRandomWordsRequested) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "RandomWordsRequested", 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 (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) ParseRandomWordsRequested(log types.Log) (*VRFCoordinatorV25ArbitrumRandomWordsRequested, error) { + event := new(VRFCoordinatorV25ArbitrumRandomWordsRequested) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "RandomWordsRequested", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25ArbitrumSubscriptionCanceledIterator struct { + Event *VRFCoordinatorV25ArbitrumSubscriptionCanceled + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25ArbitrumSubscriptionCanceledIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25ArbitrumSubscriptionCanceled) + 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(VRFCoordinatorV25ArbitrumSubscriptionCanceled) + 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 *VRFCoordinatorV25ArbitrumSubscriptionCanceledIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25ArbitrumSubscriptionCanceledIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25ArbitrumSubscriptionCanceled struct { + SubId *big.Int + To common.Address + AmountLink *big.Int + AmountNative *big.Int + Raw types.Log +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) FilterSubscriptionCanceled(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV25ArbitrumSubscriptionCanceledIterator, error) { + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.FilterLogs(opts, "SubscriptionCanceled", subIdRule) + if err != nil { + return nil, err + } + return &VRFCoordinatorV25ArbitrumSubscriptionCanceledIterator{contract: _VRFCoordinatorV25Arbitrum.contract, event: "SubscriptionCanceled", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) WatchSubscriptionCanceled(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumSubscriptionCanceled, subId []*big.Int) (event.Subscription, error) { + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.WatchLogs(opts, "SubscriptionCanceled", subIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25ArbitrumSubscriptionCanceled) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "SubscriptionCanceled", 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 (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) ParseSubscriptionCanceled(log types.Log) (*VRFCoordinatorV25ArbitrumSubscriptionCanceled, error) { + event := new(VRFCoordinatorV25ArbitrumSubscriptionCanceled) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "SubscriptionCanceled", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25ArbitrumSubscriptionConsumerAddedIterator struct { + Event *VRFCoordinatorV25ArbitrumSubscriptionConsumerAdded + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25ArbitrumSubscriptionConsumerAddedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25ArbitrumSubscriptionConsumerAdded) + 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(VRFCoordinatorV25ArbitrumSubscriptionConsumerAdded) + 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 *VRFCoordinatorV25ArbitrumSubscriptionConsumerAddedIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25ArbitrumSubscriptionConsumerAddedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25ArbitrumSubscriptionConsumerAdded struct { + SubId *big.Int + Consumer common.Address + Raw types.Log +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) FilterSubscriptionConsumerAdded(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV25ArbitrumSubscriptionConsumerAddedIterator, error) { + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.FilterLogs(opts, "SubscriptionConsumerAdded", subIdRule) + if err != nil { + return nil, err + } + return &VRFCoordinatorV25ArbitrumSubscriptionConsumerAddedIterator{contract: _VRFCoordinatorV25Arbitrum.contract, event: "SubscriptionConsumerAdded", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) WatchSubscriptionConsumerAdded(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumSubscriptionConsumerAdded, subId []*big.Int) (event.Subscription, error) { + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.WatchLogs(opts, "SubscriptionConsumerAdded", subIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25ArbitrumSubscriptionConsumerAdded) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "SubscriptionConsumerAdded", 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 (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) ParseSubscriptionConsumerAdded(log types.Log) (*VRFCoordinatorV25ArbitrumSubscriptionConsumerAdded, error) { + event := new(VRFCoordinatorV25ArbitrumSubscriptionConsumerAdded) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "SubscriptionConsumerAdded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25ArbitrumSubscriptionConsumerRemovedIterator struct { + Event *VRFCoordinatorV25ArbitrumSubscriptionConsumerRemoved + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25ArbitrumSubscriptionConsumerRemovedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25ArbitrumSubscriptionConsumerRemoved) + 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(VRFCoordinatorV25ArbitrumSubscriptionConsumerRemoved) + 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 *VRFCoordinatorV25ArbitrumSubscriptionConsumerRemovedIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25ArbitrumSubscriptionConsumerRemovedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25ArbitrumSubscriptionConsumerRemoved struct { + SubId *big.Int + Consumer common.Address + Raw types.Log +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) FilterSubscriptionConsumerRemoved(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV25ArbitrumSubscriptionConsumerRemovedIterator, error) { + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.FilterLogs(opts, "SubscriptionConsumerRemoved", subIdRule) + if err != nil { + return nil, err + } + return &VRFCoordinatorV25ArbitrumSubscriptionConsumerRemovedIterator{contract: _VRFCoordinatorV25Arbitrum.contract, event: "SubscriptionConsumerRemoved", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) WatchSubscriptionConsumerRemoved(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumSubscriptionConsumerRemoved, subId []*big.Int) (event.Subscription, error) { + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.WatchLogs(opts, "SubscriptionConsumerRemoved", subIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25ArbitrumSubscriptionConsumerRemoved) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "SubscriptionConsumerRemoved", 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 (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) ParseSubscriptionConsumerRemoved(log types.Log) (*VRFCoordinatorV25ArbitrumSubscriptionConsumerRemoved, error) { + event := new(VRFCoordinatorV25ArbitrumSubscriptionConsumerRemoved) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "SubscriptionConsumerRemoved", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25ArbitrumSubscriptionCreatedIterator struct { + Event *VRFCoordinatorV25ArbitrumSubscriptionCreated + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25ArbitrumSubscriptionCreatedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25ArbitrumSubscriptionCreated) + 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(VRFCoordinatorV25ArbitrumSubscriptionCreated) + 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 *VRFCoordinatorV25ArbitrumSubscriptionCreatedIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25ArbitrumSubscriptionCreatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25ArbitrumSubscriptionCreated struct { + SubId *big.Int + Owner common.Address + Raw types.Log +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) FilterSubscriptionCreated(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV25ArbitrumSubscriptionCreatedIterator, error) { + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.FilterLogs(opts, "SubscriptionCreated", subIdRule) + if err != nil { + return nil, err + } + return &VRFCoordinatorV25ArbitrumSubscriptionCreatedIterator{contract: _VRFCoordinatorV25Arbitrum.contract, event: "SubscriptionCreated", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) WatchSubscriptionCreated(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumSubscriptionCreated, subId []*big.Int) (event.Subscription, error) { + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.WatchLogs(opts, "SubscriptionCreated", subIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25ArbitrumSubscriptionCreated) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "SubscriptionCreated", 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 (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) ParseSubscriptionCreated(log types.Log) (*VRFCoordinatorV25ArbitrumSubscriptionCreated, error) { + event := new(VRFCoordinatorV25ArbitrumSubscriptionCreated) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "SubscriptionCreated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25ArbitrumSubscriptionFundedIterator struct { + Event *VRFCoordinatorV25ArbitrumSubscriptionFunded + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25ArbitrumSubscriptionFundedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25ArbitrumSubscriptionFunded) + 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(VRFCoordinatorV25ArbitrumSubscriptionFunded) + 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 *VRFCoordinatorV25ArbitrumSubscriptionFundedIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25ArbitrumSubscriptionFundedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25ArbitrumSubscriptionFunded struct { + SubId *big.Int + OldBalance *big.Int + NewBalance *big.Int + Raw types.Log +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) FilterSubscriptionFunded(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV25ArbitrumSubscriptionFundedIterator, error) { + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.FilterLogs(opts, "SubscriptionFunded", subIdRule) + if err != nil { + return nil, err + } + return &VRFCoordinatorV25ArbitrumSubscriptionFundedIterator{contract: _VRFCoordinatorV25Arbitrum.contract, event: "SubscriptionFunded", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) WatchSubscriptionFunded(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumSubscriptionFunded, subId []*big.Int) (event.Subscription, error) { + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.WatchLogs(opts, "SubscriptionFunded", subIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25ArbitrumSubscriptionFunded) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "SubscriptionFunded", 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 (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) ParseSubscriptionFunded(log types.Log) (*VRFCoordinatorV25ArbitrumSubscriptionFunded, error) { + event := new(VRFCoordinatorV25ArbitrumSubscriptionFunded) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "SubscriptionFunded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25ArbitrumSubscriptionFundedWithNativeIterator struct { + Event *VRFCoordinatorV25ArbitrumSubscriptionFundedWithNative + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25ArbitrumSubscriptionFundedWithNativeIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25ArbitrumSubscriptionFundedWithNative) + 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(VRFCoordinatorV25ArbitrumSubscriptionFundedWithNative) + 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 *VRFCoordinatorV25ArbitrumSubscriptionFundedWithNativeIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25ArbitrumSubscriptionFundedWithNativeIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25ArbitrumSubscriptionFundedWithNative struct { + SubId *big.Int + OldNativeBalance *big.Int + NewNativeBalance *big.Int + Raw types.Log +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) FilterSubscriptionFundedWithNative(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV25ArbitrumSubscriptionFundedWithNativeIterator, error) { + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.FilterLogs(opts, "SubscriptionFundedWithNative", subIdRule) + if err != nil { + return nil, err + } + return &VRFCoordinatorV25ArbitrumSubscriptionFundedWithNativeIterator{contract: _VRFCoordinatorV25Arbitrum.contract, event: "SubscriptionFundedWithNative", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) WatchSubscriptionFundedWithNative(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumSubscriptionFundedWithNative, subId []*big.Int) (event.Subscription, error) { + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.WatchLogs(opts, "SubscriptionFundedWithNative", subIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25ArbitrumSubscriptionFundedWithNative) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "SubscriptionFundedWithNative", 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 (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) ParseSubscriptionFundedWithNative(log types.Log) (*VRFCoordinatorV25ArbitrumSubscriptionFundedWithNative, error) { + event := new(VRFCoordinatorV25ArbitrumSubscriptionFundedWithNative) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "SubscriptionFundedWithNative", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferRequestedIterator struct { + Event *VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferRequested + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferRequestedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferRequested) + 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(VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferRequested) + 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 *VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferRequestedIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferRequestedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferRequested struct { + SubId *big.Int + From common.Address + To common.Address + Raw types.Log +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) FilterSubscriptionOwnerTransferRequested(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferRequestedIterator, error) { + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.FilterLogs(opts, "SubscriptionOwnerTransferRequested", subIdRule) + if err != nil { + return nil, err + } + return &VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferRequestedIterator{contract: _VRFCoordinatorV25Arbitrum.contract, event: "SubscriptionOwnerTransferRequested", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) WatchSubscriptionOwnerTransferRequested(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferRequested, subId []*big.Int) (event.Subscription, error) { + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.WatchLogs(opts, "SubscriptionOwnerTransferRequested", subIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferRequested) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "SubscriptionOwnerTransferRequested", 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 (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) ParseSubscriptionOwnerTransferRequested(log types.Log) (*VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferRequested, error) { + event := new(VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferRequested) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "SubscriptionOwnerTransferRequested", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferredIterator struct { + Event *VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferred + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferred) + 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(VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferred) + 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 *VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferredIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferred struct { + SubId *big.Int + From common.Address + To common.Address + Raw types.Log +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) FilterSubscriptionOwnerTransferred(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferredIterator, error) { + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.FilterLogs(opts, "SubscriptionOwnerTransferred", subIdRule) + if err != nil { + return nil, err + } + return &VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferredIterator{contract: _VRFCoordinatorV25Arbitrum.contract, event: "SubscriptionOwnerTransferred", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) WatchSubscriptionOwnerTransferred(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferred, subId []*big.Int) (event.Subscription, error) { + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Arbitrum.contract.WatchLogs(opts, "SubscriptionOwnerTransferred", subIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferred) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "SubscriptionOwnerTransferred", 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 (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25ArbitrumFilterer) ParseSubscriptionOwnerTransferred(log types.Log) (*VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferred, error) { + event := new(VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferred) + if err := _VRFCoordinatorV25Arbitrum.contract.UnpackLog(event, "SubscriptionOwnerTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type GetSubscription struct { + Balance *big.Int + NativeBalance *big.Int + ReqCount uint64 + SubOwner common.Address + Consumers []common.Address +} +type SConfig struct { + MinimumRequestConfirmations uint16 + MaxGasLimit uint32 + ReentrancyLock bool + StalenessSeconds uint32 + GasAfterPaymentCalculation uint32 + FulfillmentFlatFeeNativePPM uint32 + FulfillmentFlatFeeLinkDiscountPPM uint32 + NativePremiumPercentage uint8 + LinkPremiumPercentage uint8 +} +type SProvingKeys struct { + Exists bool + MaxGas uint64 +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25Arbitrum) ParseLog(log types.Log) (generated.AbigenLog, error) { + switch log.Topics[0] { + case _VRFCoordinatorV25Arbitrum.abi.Events["ConfigSet"].ID: + return _VRFCoordinatorV25Arbitrum.ParseConfigSet(log) + case _VRFCoordinatorV25Arbitrum.abi.Events["CoordinatorDeregistered"].ID: + return _VRFCoordinatorV25Arbitrum.ParseCoordinatorDeregistered(log) + case _VRFCoordinatorV25Arbitrum.abi.Events["CoordinatorRegistered"].ID: + return _VRFCoordinatorV25Arbitrum.ParseCoordinatorRegistered(log) + case _VRFCoordinatorV25Arbitrum.abi.Events["FallbackWeiPerUnitLinkUsed"].ID: + return _VRFCoordinatorV25Arbitrum.ParseFallbackWeiPerUnitLinkUsed(log) + case _VRFCoordinatorV25Arbitrum.abi.Events["FundsRecovered"].ID: + return _VRFCoordinatorV25Arbitrum.ParseFundsRecovered(log) + case _VRFCoordinatorV25Arbitrum.abi.Events["L1GasFee"].ID: + return _VRFCoordinatorV25Arbitrum.ParseL1GasFee(log) + case _VRFCoordinatorV25Arbitrum.abi.Events["MigrationCompleted"].ID: + return _VRFCoordinatorV25Arbitrum.ParseMigrationCompleted(log) + case _VRFCoordinatorV25Arbitrum.abi.Events["NativeFundsRecovered"].ID: + return _VRFCoordinatorV25Arbitrum.ParseNativeFundsRecovered(log) + case _VRFCoordinatorV25Arbitrum.abi.Events["OwnershipTransferRequested"].ID: + return _VRFCoordinatorV25Arbitrum.ParseOwnershipTransferRequested(log) + case _VRFCoordinatorV25Arbitrum.abi.Events["OwnershipTransferred"].ID: + return _VRFCoordinatorV25Arbitrum.ParseOwnershipTransferred(log) + case _VRFCoordinatorV25Arbitrum.abi.Events["ProvingKeyDeregistered"].ID: + return _VRFCoordinatorV25Arbitrum.ParseProvingKeyDeregistered(log) + case _VRFCoordinatorV25Arbitrum.abi.Events["ProvingKeyRegistered"].ID: + return _VRFCoordinatorV25Arbitrum.ParseProvingKeyRegistered(log) + case _VRFCoordinatorV25Arbitrum.abi.Events["RandomWordsFulfilled"].ID: + return _VRFCoordinatorV25Arbitrum.ParseRandomWordsFulfilled(log) + case _VRFCoordinatorV25Arbitrum.abi.Events["RandomWordsRequested"].ID: + return _VRFCoordinatorV25Arbitrum.ParseRandomWordsRequested(log) + case _VRFCoordinatorV25Arbitrum.abi.Events["SubscriptionCanceled"].ID: + return _VRFCoordinatorV25Arbitrum.ParseSubscriptionCanceled(log) + case _VRFCoordinatorV25Arbitrum.abi.Events["SubscriptionConsumerAdded"].ID: + return _VRFCoordinatorV25Arbitrum.ParseSubscriptionConsumerAdded(log) + case _VRFCoordinatorV25Arbitrum.abi.Events["SubscriptionConsumerRemoved"].ID: + return _VRFCoordinatorV25Arbitrum.ParseSubscriptionConsumerRemoved(log) + case _VRFCoordinatorV25Arbitrum.abi.Events["SubscriptionCreated"].ID: + return _VRFCoordinatorV25Arbitrum.ParseSubscriptionCreated(log) + case _VRFCoordinatorV25Arbitrum.abi.Events["SubscriptionFunded"].ID: + return _VRFCoordinatorV25Arbitrum.ParseSubscriptionFunded(log) + case _VRFCoordinatorV25Arbitrum.abi.Events["SubscriptionFundedWithNative"].ID: + return _VRFCoordinatorV25Arbitrum.ParseSubscriptionFundedWithNative(log) + case _VRFCoordinatorV25Arbitrum.abi.Events["SubscriptionOwnerTransferRequested"].ID: + return _VRFCoordinatorV25Arbitrum.ParseSubscriptionOwnerTransferRequested(log) + case _VRFCoordinatorV25Arbitrum.abi.Events["SubscriptionOwnerTransferred"].ID: + return _VRFCoordinatorV25Arbitrum.ParseSubscriptionOwnerTransferred(log) + + default: + return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) + } +} + +func (VRFCoordinatorV25ArbitrumConfigSet) Topic() common.Hash { + return common.HexToHash("0x2c6b6b12413678366b05b145c5f00745bdd00e739131ab5de82484a50c9d78b6") +} + +func (VRFCoordinatorV25ArbitrumCoordinatorDeregistered) Topic() common.Hash { + return common.HexToHash("0xf80a1a97fd42251f3c33cda98635e7399253033a6774fe37cd3f650b5282af37") +} + +func (VRFCoordinatorV25ArbitrumCoordinatorRegistered) Topic() common.Hash { + return common.HexToHash("0xb7cabbfc11e66731fc77de0444614282023bcbd41d16781c753a431d0af01625") +} + +func (VRFCoordinatorV25ArbitrumFallbackWeiPerUnitLinkUsed) Topic() common.Hash { + return common.HexToHash("0x6ca648a381f22ead7e37773d934e64885dcf861fbfbb26c40354cbf0c4662d1a") +} + +func (VRFCoordinatorV25ArbitrumFundsRecovered) Topic() common.Hash { + return common.HexToHash("0x59bfc682b673f8cbf945f1e454df9334834abf7dfe7f92237ca29ecb9b436600") +} + +func (VRFCoordinatorV25ArbitrumL1GasFee) Topic() common.Hash { + return common.HexToHash("0x56296f7beae05a0db815737fdb4cd298897b1e517614d62468081531ae14d099") +} + +func (VRFCoordinatorV25ArbitrumMigrationCompleted) Topic() common.Hash { + return common.HexToHash("0xd63ca8cb945956747ee69bfdc3ea754c24a4caf7418db70e46052f7850be4187") +} + +func (VRFCoordinatorV25ArbitrumNativeFundsRecovered) Topic() common.Hash { + return common.HexToHash("0x4aed7c8eed0496c8c19ea2681fcca25741c1602342e38b045d9f1e8e905d2e9c") +} + +func (VRFCoordinatorV25ArbitrumOwnershipTransferRequested) Topic() common.Hash { + return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") +} + +func (VRFCoordinatorV25ArbitrumOwnershipTransferred) Topic() common.Hash { + return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") +} + +func (VRFCoordinatorV25ArbitrumProvingKeyDeregistered) Topic() common.Hash { + return common.HexToHash("0x9b6868e0eb737bcd72205360baa6bfd0ba4e4819a33ade2db384e8a8025639a5") +} + +func (VRFCoordinatorV25ArbitrumProvingKeyRegistered) Topic() common.Hash { + return common.HexToHash("0x9b911b2c240bfbef3b6a8f7ed6ee321d1258bb2a3fe6becab52ac1cd3210afd3") +} + +func (VRFCoordinatorV25ArbitrumRandomWordsFulfilled) Topic() common.Hash { + return common.HexToHash("0xaeb4b4786571e184246d39587f659abf0e26f41f6a3358692250382c0cdb47b7") +} + +func (VRFCoordinatorV25ArbitrumRandomWordsRequested) Topic() common.Hash { + return common.HexToHash("0xeb0e3652e0f44f417695e6e90f2f42c99b65cd7169074c5a654b16b9748c3a4e") +} + +func (VRFCoordinatorV25ArbitrumSubscriptionCanceled) Topic() common.Hash { + return common.HexToHash("0x8c74ce8b8cf87f5eb001275c8be27eb34ea2b62bfab6814fcc62192bb63e81c4") +} + +func (VRFCoordinatorV25ArbitrumSubscriptionConsumerAdded) Topic() common.Hash { + return common.HexToHash("0x1e980d04aa7648e205713e5e8ea3808672ac163d10936d36f91b2c88ac1575e1") +} + +func (VRFCoordinatorV25ArbitrumSubscriptionConsumerRemoved) Topic() common.Hash { + return common.HexToHash("0x32158c6058347c1601b2d12bc696ac6901d8a9a9aa3ba10c27ab0a983e8425a7") +} + +func (VRFCoordinatorV25ArbitrumSubscriptionCreated) Topic() common.Hash { + return common.HexToHash("0x1d3015d7ba850fa198dc7b1a3f5d42779313a681035f77c8c03764c61005518d") +} + +func (VRFCoordinatorV25ArbitrumSubscriptionFunded) Topic() common.Hash { + return common.HexToHash("0x1ced9348ff549fceab2ac57cd3a9de38edaaab274b725ee82c23e8fc8c4eec7a") +} + +func (VRFCoordinatorV25ArbitrumSubscriptionFundedWithNative) Topic() common.Hash { + return common.HexToHash("0x7603b205d03651ee812f803fccde89f1012e545a9c99f0abfea9cedd0fd8e902") +} + +func (VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferRequested) Topic() common.Hash { + return common.HexToHash("0x21a4dad170a6bf476c31bbcf4a16628295b0e450672eec25d7c93308e05344a1") +} + +func (VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferred) Topic() common.Hash { + return common.HexToHash("0xd4114ab6e9af9f597c52041f32d62dc57c5c4e4c0d4427006069635e216c9386") +} + +func (_VRFCoordinatorV25Arbitrum *VRFCoordinatorV25Arbitrum) Address() common.Address { + return _VRFCoordinatorV25Arbitrum.address +} + +type VRFCoordinatorV25ArbitrumInterface interface { + BLOCKHASHSTORE(opts *bind.CallOpts) (common.Address, error) + + LINK(opts *bind.CallOpts) (common.Address, error) + + LINKNATIVEFEED(opts *bind.CallOpts) (common.Address, error) + + MAXCONSUMERS(opts *bind.CallOpts) (uint16, error) + + MAXNUMWORDS(opts *bind.CallOpts) (uint32, error) + + MAXREQUESTCONFIRMATIONS(opts *bind.CallOpts) (uint16, error) + + GetActiveSubscriptionIds(opts *bind.CallOpts, startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) + + GetSubscription(opts *bind.CallOpts, subId *big.Int) (GetSubscription, + + error) + + HashOfKey(opts *bind.CallOpts, publicKey [2]*big.Int) ([32]byte, error) + + Owner(opts *bind.CallOpts) (common.Address, error) + + PendingRequestExists(opts *bind.CallOpts, subId *big.Int) (bool, error) + + SConfig(opts *bind.CallOpts) (SConfig, + + error) + + SCurrentSubNonce(opts *bind.CallOpts) (uint64, error) + + SFallbackWeiPerUnitLink(opts *bind.CallOpts) (*big.Int, error) + + SProvingKeyHashes(opts *bind.CallOpts, arg0 *big.Int) ([32]byte, error) + + SProvingKeys(opts *bind.CallOpts, arg0 [32]byte) (SProvingKeys, + + error) + + SRequestCommitments(opts *bind.CallOpts, arg0 *big.Int) ([32]byte, error) + + STotalBalance(opts *bind.CallOpts) (*big.Int, error) + + STotalNativeBalance(opts *bind.CallOpts) (*big.Int, error) + + AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) + + AcceptSubscriptionOwnerTransfer(opts *bind.TransactOpts, subId *big.Int) (*types.Transaction, error) + + AddConsumer(opts *bind.TransactOpts, subId *big.Int, consumer common.Address) (*types.Transaction, error) + + CancelSubscription(opts *bind.TransactOpts, subId *big.Int, to common.Address) (*types.Transaction, error) + + CreateSubscription(opts *bind.TransactOpts) (*types.Transaction, error) + + DeregisterMigratableCoordinator(opts *bind.TransactOpts, target common.Address) (*types.Transaction, error) + + DeregisterProvingKey(opts *bind.TransactOpts, publicProvingKey [2]*big.Int) (*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) + + Migrate(opts *bind.TransactOpts, subId *big.Int, newCoordinator common.Address) (*types.Transaction, error) + + OnTokenTransfer(opts *bind.TransactOpts, arg0 common.Address, amount *big.Int, data []byte) (*types.Transaction, error) + + OwnerCancelSubscription(opts *bind.TransactOpts, subId *big.Int) (*types.Transaction, error) + + RecoverFunds(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) + + RecoverNativeFunds(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) + + RegisterMigratableCoordinator(opts *bind.TransactOpts, target common.Address) (*types.Transaction, error) + + RegisterProvingKey(opts *bind.TransactOpts, publicProvingKey [2]*big.Int, maxGas uint64) (*types.Transaction, error) + + RemoveConsumer(opts *bind.TransactOpts, subId *big.Int, consumer common.Address) (*types.Transaction, error) + + RequestRandomWords(opts *bind.TransactOpts, req VRFV2PlusClientRandomWordsRequest) (*types.Transaction, error) + + RequestSubscriptionOwnerTransfer(opts *bind.TransactOpts, subId *big.Int, newOwner common.Address) (*types.Transaction, error) + + SetConfig(opts *bind.TransactOpts, minimumRequestConfirmations uint16, maxGasLimit uint32, stalenessSeconds uint32, gasAfterPaymentCalculation uint32, fallbackWeiPerUnitLink *big.Int, fulfillmentFlatFeeNativePPM uint32, fulfillmentFlatFeeLinkDiscountPPM uint32, nativePremiumPercentage uint8, linkPremiumPercentage uint8) (*types.Transaction, error) + + SetLINKAndLINKNativeFeed(opts *bind.TransactOpts, link common.Address, linkNativeFeed common.Address) (*types.Transaction, error) + + TransferOwnership(opts *bind.TransactOpts, to common.Address) (*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) (*VRFCoordinatorV25ArbitrumConfigSetIterator, error) + + WatchConfigSet(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumConfigSet) (event.Subscription, error) + + ParseConfigSet(log types.Log) (*VRFCoordinatorV25ArbitrumConfigSet, error) + + FilterCoordinatorDeregistered(opts *bind.FilterOpts) (*VRFCoordinatorV25ArbitrumCoordinatorDeregisteredIterator, error) + + WatchCoordinatorDeregistered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumCoordinatorDeregistered) (event.Subscription, error) + + ParseCoordinatorDeregistered(log types.Log) (*VRFCoordinatorV25ArbitrumCoordinatorDeregistered, error) + + FilterCoordinatorRegistered(opts *bind.FilterOpts) (*VRFCoordinatorV25ArbitrumCoordinatorRegisteredIterator, error) + + WatchCoordinatorRegistered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumCoordinatorRegistered) (event.Subscription, error) + + ParseCoordinatorRegistered(log types.Log) (*VRFCoordinatorV25ArbitrumCoordinatorRegistered, error) + + FilterFallbackWeiPerUnitLinkUsed(opts *bind.FilterOpts) (*VRFCoordinatorV25ArbitrumFallbackWeiPerUnitLinkUsedIterator, error) + + WatchFallbackWeiPerUnitLinkUsed(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumFallbackWeiPerUnitLinkUsed) (event.Subscription, error) + + ParseFallbackWeiPerUnitLinkUsed(log types.Log) (*VRFCoordinatorV25ArbitrumFallbackWeiPerUnitLinkUsed, error) + + FilterFundsRecovered(opts *bind.FilterOpts) (*VRFCoordinatorV25ArbitrumFundsRecoveredIterator, error) + + WatchFundsRecovered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumFundsRecovered) (event.Subscription, error) + + ParseFundsRecovered(log types.Log) (*VRFCoordinatorV25ArbitrumFundsRecovered, error) + + FilterL1GasFee(opts *bind.FilterOpts) (*VRFCoordinatorV25ArbitrumL1GasFeeIterator, error) + + WatchL1GasFee(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumL1GasFee) (event.Subscription, error) + + ParseL1GasFee(log types.Log) (*VRFCoordinatorV25ArbitrumL1GasFee, error) + + FilterMigrationCompleted(opts *bind.FilterOpts) (*VRFCoordinatorV25ArbitrumMigrationCompletedIterator, error) + + WatchMigrationCompleted(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumMigrationCompleted) (event.Subscription, error) + + ParseMigrationCompleted(log types.Log) (*VRFCoordinatorV25ArbitrumMigrationCompleted, error) + + FilterNativeFundsRecovered(opts *bind.FilterOpts) (*VRFCoordinatorV25ArbitrumNativeFundsRecoveredIterator, error) + + WatchNativeFundsRecovered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumNativeFundsRecovered) (event.Subscription, error) + + ParseNativeFundsRecovered(log types.Log) (*VRFCoordinatorV25ArbitrumNativeFundsRecovered, error) + + FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFCoordinatorV25ArbitrumOwnershipTransferRequestedIterator, error) + + WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseOwnershipTransferRequested(log types.Log) (*VRFCoordinatorV25ArbitrumOwnershipTransferRequested, error) + + FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFCoordinatorV25ArbitrumOwnershipTransferredIterator, error) + + WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseOwnershipTransferred(log types.Log) (*VRFCoordinatorV25ArbitrumOwnershipTransferred, error) + + FilterProvingKeyDeregistered(opts *bind.FilterOpts) (*VRFCoordinatorV25ArbitrumProvingKeyDeregisteredIterator, error) + + WatchProvingKeyDeregistered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumProvingKeyDeregistered) (event.Subscription, error) + + ParseProvingKeyDeregistered(log types.Log) (*VRFCoordinatorV25ArbitrumProvingKeyDeregistered, error) + + FilterProvingKeyRegistered(opts *bind.FilterOpts) (*VRFCoordinatorV25ArbitrumProvingKeyRegisteredIterator, error) + + WatchProvingKeyRegistered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumProvingKeyRegistered) (event.Subscription, error) + + ParseProvingKeyRegistered(log types.Log) (*VRFCoordinatorV25ArbitrumProvingKeyRegistered, error) + + FilterRandomWordsFulfilled(opts *bind.FilterOpts, requestId []*big.Int, subId []*big.Int) (*VRFCoordinatorV25ArbitrumRandomWordsFulfilledIterator, error) + + WatchRandomWordsFulfilled(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumRandomWordsFulfilled, requestId []*big.Int, subId []*big.Int) (event.Subscription, error) + + ParseRandomWordsFulfilled(log types.Log) (*VRFCoordinatorV25ArbitrumRandomWordsFulfilled, error) + + FilterRandomWordsRequested(opts *bind.FilterOpts, keyHash [][32]byte, subId []*big.Int, sender []common.Address) (*VRFCoordinatorV25ArbitrumRandomWordsRequestedIterator, error) + + WatchRandomWordsRequested(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumRandomWordsRequested, keyHash [][32]byte, subId []*big.Int, sender []common.Address) (event.Subscription, error) + + ParseRandomWordsRequested(log types.Log) (*VRFCoordinatorV25ArbitrumRandomWordsRequested, error) + + FilterSubscriptionCanceled(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV25ArbitrumSubscriptionCanceledIterator, error) + + WatchSubscriptionCanceled(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumSubscriptionCanceled, subId []*big.Int) (event.Subscription, error) + + ParseSubscriptionCanceled(log types.Log) (*VRFCoordinatorV25ArbitrumSubscriptionCanceled, error) + + FilterSubscriptionConsumerAdded(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV25ArbitrumSubscriptionConsumerAddedIterator, error) + + WatchSubscriptionConsumerAdded(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumSubscriptionConsumerAdded, subId []*big.Int) (event.Subscription, error) + + ParseSubscriptionConsumerAdded(log types.Log) (*VRFCoordinatorV25ArbitrumSubscriptionConsumerAdded, error) + + FilterSubscriptionConsumerRemoved(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV25ArbitrumSubscriptionConsumerRemovedIterator, error) + + WatchSubscriptionConsumerRemoved(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumSubscriptionConsumerRemoved, subId []*big.Int) (event.Subscription, error) + + ParseSubscriptionConsumerRemoved(log types.Log) (*VRFCoordinatorV25ArbitrumSubscriptionConsumerRemoved, error) + + FilterSubscriptionCreated(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV25ArbitrumSubscriptionCreatedIterator, error) + + WatchSubscriptionCreated(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumSubscriptionCreated, subId []*big.Int) (event.Subscription, error) + + ParseSubscriptionCreated(log types.Log) (*VRFCoordinatorV25ArbitrumSubscriptionCreated, error) + + FilterSubscriptionFunded(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV25ArbitrumSubscriptionFundedIterator, error) + + WatchSubscriptionFunded(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumSubscriptionFunded, subId []*big.Int) (event.Subscription, error) + + ParseSubscriptionFunded(log types.Log) (*VRFCoordinatorV25ArbitrumSubscriptionFunded, error) + + FilterSubscriptionFundedWithNative(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV25ArbitrumSubscriptionFundedWithNativeIterator, error) + + WatchSubscriptionFundedWithNative(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumSubscriptionFundedWithNative, subId []*big.Int) (event.Subscription, error) + + ParseSubscriptionFundedWithNative(log types.Log) (*VRFCoordinatorV25ArbitrumSubscriptionFundedWithNative, error) + + FilterSubscriptionOwnerTransferRequested(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferRequestedIterator, error) + + WatchSubscriptionOwnerTransferRequested(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferRequested, subId []*big.Int) (event.Subscription, error) + + ParseSubscriptionOwnerTransferRequested(log types.Log) (*VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferRequested, error) + + FilterSubscriptionOwnerTransferred(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferredIterator, error) + + WatchSubscriptionOwnerTransferred(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferred, subId []*big.Int) (event.Subscription, error) + + ParseSubscriptionOwnerTransferred(log types.Log) (*VRFCoordinatorV25ArbitrumSubscriptionOwnerTransferred, error) + + ParseLog(log types.Log) (generated.AbigenLog, error) + + Address() common.Address +} diff --git a/core/gethwrappers/generated/vrf_coordinator_v2_5_optimism/vrf_coordinator_v2_5_optimism.go b/core/gethwrappers/generated/vrf_coordinator_v2_5_optimism/vrf_coordinator_v2_5_optimism.go new file mode 100644 index 00000000000..85022481c08 --- /dev/null +++ b/core/gethwrappers/generated/vrf_coordinator_v2_5_optimism/vrf_coordinator_v2_5_optimism.go @@ -0,0 +1,4315 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package vrf_coordinator_v2_5_optimism + +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 VRFProof struct { + Pk [2]*big.Int + Gamma [2]*big.Int + C *big.Int + S *big.Int + Seed *big.Int + UWitness common.Address + CGammaWitness [2]*big.Int + SHashWitness [2]*big.Int + 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 + RequestConfirmations uint16 + CallbackGasLimit uint32 + NumWords uint32 + ExtraArgs []byte +} + +var VRFCoordinatorV25OptimismMetaData = &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\":[],\"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\":\"uint8\",\"name\":\"mode\",\"type\":\"uint8\"}],\"name\":\"InvalidL1FeeCalculationMode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"coefficient\",\"type\":\"uint8\"}],\"name\":\"InvalidL1FeeCoefficient\",\"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\":\"uint8\",\"name\":\"mode\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"coefficient\",\"type\":\"uint8\"}],\"name\":\"L1FeeCalculationSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"L1GasFee\",\"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\":[],\"name\":\"s_l1FeeCalculationMode\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_l1FeeCoefficient\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"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\":\"uint8\",\"name\":\"mode\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"coefficient\",\"type\":\"uint8\"}],\"name\":\"setL1FeeCalculation\",\"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: "0x60a06040526012805461ffff19166164001790553480156200002057600080fd5b50604051620060253803806200602583398101604081905262000043916200018f565b8033806000816200009b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000ce57620000ce81620000e4565b5050506001600160a01b031660805250620001c1565b336001600160a01b038216036200013e5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000092565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600060208284031215620001a257600080fd5b81516001600160a01b0381168114620001ba57600080fd5b9392505050565b608051615e41620001e46000396000818161066f015261333e0152615e416000f3fe6080604052600436106102dd5760003560e01c80638402595e1161017f578063aefb212f116100e1578063da2f26101161008a578063e72f6e3011610064578063e72f6e30146109c0578063ee9d2d38146109e0578063f2fde38b14610a0d57600080fd5b8063da2f261014610910578063dac83d291461096f578063dc311dd31461098f57600080fd5b8063caf70c4a116100bb578063caf70c4a146108b0578063cb631797146108d0578063d98e620e146108f057600080fd5b8063aefb212f14610843578063b2a7cac514610870578063bec4c08c1461089057600080fd5b80639b1c385e11610143578063a4c0ed361161011d578063a4c0ed36146107e3578063a63e0bfb14610803578063aa433aff1461082357600080fd5b80639b1c385e146107765780639d40a6fd14610796578063a21a23e4146107ce57600080fd5b80638402595e146106e657806386fe91c7146107065780638da5cb5b1461072657806390bd5c741461074457806395b55cfc1461076357600080fd5b8063405b84fa1161024357806364d51a2a116101ec57806372e9d565116101c657806372e9d5651461069157806379ba5097146106b15780637a5a2aef146106c657600080fd5b806364d51a2a14610628578063659827441461063d578063689c45171461065d57600080fd5b806341af6c871161021d57806341af6c87146105b857806351cff8d9146105e85780635d06b4ab1461060857600080fd5b8063405b84fa1461054157806340d6bb821461056157806340e3290f1461058c57600080fd5b806314530741116102a55780631b6b6d231161027f5780631b6b6d23146104c95780632f622e6b14610501578063301f42e91461052157600080fd5b8063145307411461044257806315c48b841461046257806318e3dd271461048a57600080fd5b806304104edb146102e2578063043bd6ae14610304578063088070f51461032d57806308821d58146104025780630ae0954014610422575b600080fd5b3480156102ee57600080fd5b506103026102fd366004615198565b610a2d565b005b34801561031057600080fd5b5061031a60105481565b6040519081526020015b60405180910390f35b34801561033957600080fd5b50600c546103a59061ffff81169063ffffffff62010000820481169160ff660100000000000082048116926701000000000000008304811692600160581b8104821692600160781b8204831692600160981b83041691600160b81b8104821691600160c01b9091041689565b6040805161ffff909a168a5263ffffffff98891660208b01529615159689019690965293861660608801529185166080870152841660a08601529290921660c084015260ff91821660e08401521661010082015261012001610324565b34801561040e57600080fd5b5061030261041d3660046151c6565b610ba6565b34801561042e57600080fd5b5061030261043d3660046151e2565b610d3f565b34801561044e57600080fd5b5061030261045d366004615223565b610d87565b34801561046e57600080fd5b5061047760c881565b60405161ffff9091168152602001610324565b34801561049657600080fd5b50600a546104b190600160601b90046001600160601b031681565b6040516001600160601b039091168152602001610324565b3480156104d557600080fd5b506002546104e9906001600160a01b031681565b6040516001600160a01b039091168152602001610324565b34801561050d57600080fd5b5061030261051c366004615198565b610d9d565b34801561052d57600080fd5b506104b161053c36600461527c565b610e3f565b34801561054d57600080fd5b5061030261055c3660046151e2565b611190565b34801561056d57600080fd5b506105776101f481565b60405163ffffffff9091168152602001610324565b34801561059857600080fd5b506012546105a69060ff1681565b60405160ff9091168152602001610324565b3480156105c457600080fd5b506105d86105d33660046152e8565b6114de565b6040519015158152602001610324565b3480156105f457600080fd5b50610302610603366004615198565b611580565b34801561061457600080fd5b50610302610623366004615198565b611661565b34801561063457600080fd5b50610477606481565b34801561064957600080fd5b50610302610658366004615301565b61171f565b34801561066957600080fd5b506104e97f000000000000000000000000000000000000000000000000000000000000000081565b34801561069d57600080fd5b506003546104e9906001600160a01b031681565b3480156106bd57600080fd5b5061030261177f565b3480156106d257600080fd5b506103026106e1366004615346565b611830565b3480156106f257600080fd5b50610302610701366004615198565b611940565b34801561071257600080fd5b50600a546104b1906001600160601b031681565b34801561073257600080fd5b506000546001600160a01b03166104e9565b34801561075057600080fd5b506012546105a690610100900460ff1681565b6103026107713660046152e8565b611a5b565b34801561078257600080fd5b5061031a610791366004615371565b611b6b565b3480156107a257600080fd5b506007546107b6906001600160401b031681565b6040516001600160401b039091168152602001610324565b3480156107da57600080fd5b5061031a611f96565b3480156107ef57600080fd5b506103026107fe3660046153ad565b61217d565b34801561080f57600080fd5b5061030261081e366004615459565b6122e5565b34801561082f57600080fd5b5061030261083e3660046152e8565b6125b9565b34801561084f57600080fd5b5061086361085e366004615504565b6125ec565b6040516103249190615561565b34801561087c57600080fd5b5061030261088b3660046152e8565b6126ee565b34801561089c57600080fd5b506103026108ab3660046151e2565b6127dd565b3480156108bc57600080fd5b5061031a6108cb3660046151c6565b6128d0565b3480156108dc57600080fd5b506103026108eb3660046151e2565b612900565b3480156108fc57600080fd5b5061031a61090b3660046152e8565b612b00565b34801561091c57600080fd5b5061095061092b3660046152e8565b600d6020526000908152604090205460ff81169061010090046001600160401b031682565b6040805192151583526001600160401b03909116602083015201610324565b34801561097b57600080fd5b5061030261098a3660046151e2565b612b21565b34801561099b57600080fd5b506109af6109aa3660046152e8565b612bbc565b6040516103249594939291906155ad565b3480156109cc57600080fd5b506103026109db366004615198565b612c95565b3480156109ec57600080fd5b5061031a6109fb3660046152e8565b600f6020526000908152604090205481565b348015610a1957600080fd5b50610302610a28366004615198565b612e56565b610a35612e67565b60115460005b81811015610b7957826001600160a01b031660118281548110610a6057610a60615602565b6000918252602090912001546001600160a01b031603610b69576011610a8760018461562e565b81548110610a9757610a97615602565b600091825260209091200154601180546001600160a01b039092169183908110610ac357610ac3615602565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506011805480610b0257610b02615641565b6000828152602090819020600019908301810180546001600160a01b03191690559091019091556040516001600160a01b03851681527ff80a1a97fd42251f3c33cda98635e7399253033a6774fe37cd3f650b5282af3791015b60405180910390a1505050565b610b7281615657565b9050610a3b565b50604051635428d44960e01b81526001600160a01b03831660048201526024015b60405180910390fd5b50565b610bae612e67565b6000610bb9826128d0565b6000818152600d602090815260409182902082518084019093525460ff811615158084526101009091046001600160401b03169183019190915291925090610c1757604051631dfd6e1360e21b815260048101839052602401610b9a565b6000828152600d60205260408120805468ffffffffffffffffff19169055600e54905b81811015610ce95783600e8281548110610c5657610c56615602565b906000526020600020015403610cd957600e610c7360018461562e565b81548110610c8357610c83615602565b9060005260206000200154600e8281548110610ca157610ca1615602565b600091825260209091200155600e805480610cbe57610cbe615641565b60019003818190600052602060002001600090559055610ce9565b610ce281615657565b9050610c3a565b507f9b6868e0eb737bcd72205360baa6bfd0ba4e4819a33ade2db384e8a8025639a5838360200151604051610d319291909182526001600160401b0316602082015260400190565b60405180910390a150505050565b81610d4981612ec3565b610d51612f18565b610d5a836114de565b15610d7857604051631685ecdd60e31b815260040160405180910390fd5b610d828383612f46565b505050565b610d8f612e67565b610d998282613029565b5050565b610da5612f18565b610dad612e67565b600b54600160601b90046001600160601b0316610dcb8115156130e3565b600b80546bffffffffffffffffffffffff60601b19169055600a8054829190600c90610e08908490600160601b90046001600160601b0316615670565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550610d9982826001600160601b0316613101565b6000610e49612f18565b60005a9050610324361115610e7b57604051630f28961b60e01b81523660048201526103246024820152604401610b9a565b6000610e878686613175565b90506000610e9d85836000015160200151613474565b60408301519091506060906000610eb960808a018a8501615690565b63ffffffff169050806001600160401b03811115610ed957610ed96156ad565b604051908082528060200260200182016040528015610f02578160200160208202803683370190505b50925060005b81811015610f6a5760408051602081018590529081018290526060016040516020818303038152906040528051906020012060001c848281518110610f4f57610f4f615602565b6020908102919091010152610f6381615657565b9050610f08565b5050602080850180516000908152600f9092526040822082905551610f90908a856134cf565b60208a8101356000908152600690915260409020805491925090601890610fc690600160c01b90046001600160401b03166156c3565b91906101000a8154816001600160401b0302191690836001600160401b03160217905550600460008a60800160208101906110019190615198565b6001600160a01b03168152602080820192909252604090810160009081208c84013582529092529020805460099061104890600160481b90046001600160401b03166156e9565b91906101000a8154816001600160401b0302191690836001600160401b031602179055506000898060a0019061107e919061570c565b600161108d60a08e018e61570c565b61109892915061562e565b8181106110a7576110a7615602565b9091013560f81c6001149150600090506110c38887848d613586565b9099509050801561110e5760208088015160105460408051928352928201527f6ca648a381f22ead7e37773d934e64885dcf861fbfbb26c40354cbf0c4662d1a910160405180910390a15b5061111e88828c602001356135be565b602086810151604080518681526001600160601b038c16818501528415158183015285151560608201528c151560808201529051928d0135927faeb4b4786571e184246d39587f659abf0e26f41f6a3358692250382c0cdb47b79181900360a00190a3505050505050505b9392505050565b611198612f18565b6111a1816136f3565b6111c957604051635428d44960e01b81526001600160a01b0382166004820152602401610b9a565b6000806000806111d886612bbc565b945094505093509350336001600160a01b0316826001600160a01b03161461121e57604051636c51fda960e11b81526001600160a01b0383166004820152602401610b9a565b611227866114de565b1561124557604051631685ecdd60e31b815260040160405180910390fd5b6040805160c0810182526001815260208082018990526001600160a01b03851682840152606082018490526001600160601b038088166080840152861660a08301529151909160009161129a91849101615759565b60405160208183030381529060405290506112b48861375e565b505060405163ce3f471960e01b81526001600160a01b0388169063ce3f4719906001600160601b038816906112ed90859060040161581e565b6000604051808303818588803b15801561130657600080fd5b505af115801561131a573d6000803e3d6000fd5b50506002546001600160a01b031615801593509150611343905057506001600160601b03861615155b156113cf5760025460405163a9059cbb60e01b81526001600160a01b0389811660048301526001600160601b03891660248301526113cf92169063a9059cbb906044015b6020604051808303816000875af11580156113a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113ca9190615831565b6130e3565b600c805466ff00000000000019166601000000000000179055825160005b8181101561147f5784818151811061140757611407615602565b6020908102919091010151604051638ea9811760e01b81526001600160a01b038b8116600483015290911690638ea9811790602401600060405180830381600087803b15801561145657600080fd5b505af115801561146a573d6000803e3d6000fd5b505050508061147890615657565b90506113ed565b50600c805466ff00000000000019169055604080516001600160a01b038a168152602081018b90527fd63ca8cb945956747ee69bfdc3ea754c24a4caf7418db70e46052f7850be418791015b60405180910390a1505050505050505050565b60008181526005602052604081206002018054825b818110156115755760006004600085848154811061151357611513615602565b60009182526020808320909101546001600160a01b0316835282810193909352604091820181208982529092529020546001600160401b03600160481b90910416111561156557506001949350505050565b61156e81615657565b90506114f3565b506000949350505050565b611588612f18565b611590612e67565b6002546001600160a01b03166115b95760405163c1f0c0a160e01b815260040160405180910390fd5b600b546001600160601b03166115d08115156130e3565b600b80546bffffffffffffffffffffffff19169055600a80548291906000906116039084906001600160601b0316615670565b82546101009290920a6001600160601b0381810219909316918316021790915560025460405163a9059cbb60e01b81526001600160a01b0386811660048301529285166024820152610d99935091169063a9059cbb90604401611387565b611669612e67565b611672816136f3565b1561169b5760405163ac8a27ef60e01b81526001600160a01b0382166004820152602401610b9a565b601180546001810182556000919091527f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c680180546001600160a01b0319166001600160a01b0383169081179091556040519081527fb7cabbfc11e66731fc77de0444614282023bcbd41d16781c753a431d0af016259060200160405180910390a150565b611727612e67565b6002546001600160a01b03161561175157604051631688c53760e11b815260040160405180910390fd5b600280546001600160a01b039384166001600160a01b03199182161790915560038054929093169116179055565b6001546001600160a01b031633146117d95760405162461bcd60e51b815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610b9a565b60008054336001600160a01b0319808316821784556001805490911690556040516001600160a01b0390921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b611838612e67565b6000611843836128d0565b6000818152600d602052604090205490915060ff161561187957604051634a0b8fa760e01b815260048101829052602401610b9a565b60408051808201825260018082526001600160401b0385811660208085018281526000888152600d835287812096518754925168ffffffffffffffffff1990931690151568ffffffffffffffff00191617610100929095169190910293909317909455600e805493840181559091527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd9091018490558251848152918201527f9b911b2c240bfbef3b6a8f7ed6ee321d1258bb2a3fe6becab52ac1cd3210afd39101610b5c565b611948612e67565b600a544790600160601b90046001600160601b031681811115611988576040516354ced18160e11b81526004810182905260248101839052604401610b9a565b81811015610d8257600061199c828461562e565b90506000846001600160a01b03168260405160006040518083038185875af1925050503d80600081146119eb576040519150601f19603f3d011682016040523d82523d6000602084013e6119f0565b606091505b5050905080611a125760405163950b247960e01b815260040160405180910390fd5b604080516001600160a01b0387168152602081018490527f4aed7c8eed0496c8c19ea2681fcca25741c1602342e38b045d9f1e8e905d2e9c910160405180910390a15050505050565b611a63612f18565b600081815260056020526040902054611a84906001600160a01b0316613910565b60008181526006602052604090208054600160601b90046001600160601b0316903490600c611ab3838561584e565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555034600a600c8282829054906101000a90046001600160601b0316611afb919061584e565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550817f7603b205d03651ee812f803fccde89f1012e545a9c99f0abfea9cedd0fd8e902823484611b4e919061586e565b604080519283526020830191909152015b60405180910390a25050565b6000611b75612f18565b60208083013560008181526005909252604090912054611b9d906001600160a01b0316613910565b336000908152600460209081526040808320848452808352928190208151606081018352905460ff811615158083526001600160401b036101008304811695840195909552600160481b9091049093169181019190915290611c1b576040516379bfd40160e01b815260048101849052336024820152604401610b9a565b600c5461ffff16611c326060870160408801615881565b61ffff161080611c55575060c8611c4f6060870160408801615881565b61ffff16115b15611c9b57611c6a6060860160408701615881565b600c5460405163539c34bb60e11b815261ffff92831660048201529116602482015260c86044820152606401610b9a565b600c5462010000900463ffffffff16611cba6080870160608801615690565b63ffffffff161115611d0a57611cd66080860160608701615690565b600c54604051637aebf00f60e11b815263ffffffff9283166004820152620100009091049091166024820152604401610b9a565b6101f4611d1d60a0870160808801615690565b63ffffffff161115611d6357611d3960a0860160808701615690565b6040516311ce1afb60e21b815263ffffffff90911660048201526101f46024820152604401610b9a565b806020018051611d72906156c3565b6001600160401b03169052604081018051611d8c906156c3565b6001600160401b03908116909152602082810151604080518935818501819052338284015260608201899052929094166080808601919091528151808603909101815260a08501825280519084012060c085019290925260e08085018390528151808603909101815261010090940190528251929091019190912060009190955090506000611e2e611e29611e2460a08a018a61570c565b613937565b6139b8565b9050854386611e4360808b0160608c01615690565b611e5360a08c0160808d01615690565b3386604051602001611e6b979695949392919061589c565b60405160208183030381529060405280519060200120600f600088815260200190815260200160002081905550336001600160a01b03168588600001357feb0e3652e0f44f417695e6e90f2f42c99b65cd7169074c5a654b16b9748c3a4e89868c6040016020810190611ede9190615881565b8d6060016020810190611ef19190615690565b8e6080016020810190611f049190615690565b89604051611f17969594939291906158f3565b60405180910390a45050600092835260209182526040928390208151815493830151929094015168ffffffffffffffffff1990931693151568ffffffffffffffff001916939093176101006001600160401b03928316021770ffffffffffffffff0000000000000000001916600160481b91909216021790555b919050565b6000611fa0612f18565b6007546001600160401b031633611fb860014361562e565b6040516bffffffffffffffffffffffff19606093841b81166020830152914060348201523090921b1660548201526001600160c01b031960c083901b16606882015260700160408051601f1981840301815291905280516020909101209150612022816001615932565b6007805467ffffffffffffffff19166001600160401b03928316179055604080516000808252608082018352602080830182815283850183815260608086018581528a86526006855287862093518454935191516001600160601b039182166001600160c01b031990951694909417600160601b91909216021777ffffffffffffffffffffffffffffffffffffffffffffffff16600160c01b9290981691909102969096179055835194850184523385528481018281528585018481528884526005835294909220855181546001600160a01b03199081166001600160a01b0392831617835593516001830180549095169116179092559251805192949391926121329260028501920190615091565b5061214291506008905084613a29565b5060405133815283907f1d3015d7ba850fa198dc7b1a3f5d42779313a681035f77c8c03764c61005518d9060200160405180910390a2505090565b612185612f18565b6002546001600160a01b031633146121b0576040516344b0e3c360e01b815260040160405180910390fd5b602081146121d157604051638129bbcd60e01b815260040160405180910390fd5b60006121df828401846152e8565b600081815260056020526040902054909150612203906001600160a01b0316613910565b600081815260066020526040812080546001600160601b03169186919061222a838561584e565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555084600a60008282829054906101000a90046001600160601b0316612272919061584e565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550817f1ced9348ff549fceab2ac57cd3a9de38edaaab274b725ee82c23e8fc8c4eec7a8287846122c5919061586e565b6040805192835260208301919091520160405180910390a2505050505050565b6122ed612e67565b60c861ffff8a1611156123275760405163539c34bb60e11b815261ffff8a1660048201819052602482015260c86044820152606401610b9a565b6000851361234b576040516321ea67b360e11b815260048101869052602401610b9a565b8363ffffffff168363ffffffff161115612388576040516313c06e5960e11b815263ffffffff808516600483015285166024820152604401610b9a565b609b60ff831611156123b957604051631d66288d60e11b815260ff83166004820152609b6024820152604401610b9a565b609b60ff821611156123ea57604051631d66288d60e11b815260ff82166004820152609b6024820152604401610b9a565b604080516101208101825261ffff8b1680825263ffffffff808c16602084018190526000848601528b8216606085018190528b8316608086018190528a841660a08701819052938a1660c0870181905260ff808b1660e08901819052908a16610100909801889052600c8054600160c01b90990260ff60c01b19600160b81b9093029290921661ffff60b81b19600160981b90940263ffffffff60981b19600160781b9099029890981676ffffffffffffffff00000000000000000000000000000019600160581b9096026effffffff000000000000000000000019670100000000000000909802979097166effffffffffffffffff000000000000196201000090990265ffffffffffff19909c16909a179a909a1796909616979097179390931791909116959095179290921793909316929092179190911790556010869055517f2c6b6b12413678366b05b145c5f00745bdd00e739131ab5de82484a50c9d78b6906114cb908b908b908b908b908b908b908b908b908b9061ffff99909916895263ffffffff97881660208a0152958716604089015293861660608801526080870192909252841660a086015290921660c084015260ff91821660e0840152166101008201526101200190565b6125c1612e67565b6000818152600560205260409020546001600160a01b03166125e281613910565b610d998282612f46565b606060006125fa6008613a35565b905080841061261c57604051631390f2a160e01b815260040160405180910390fd5b6000612628848661586e565b905081811180612636575083155b6126405780612642565b815b90506000612650868361562e565b9050806001600160401b0381111561266a5761266a6156ad565b604051908082528060200260200182016040528015612693578160200160208202803683370190505b50935060005b818110156126e3576126b66126ae888361586e565b600890613a3f565b8582815181106126c8576126c8615602565b60209081029190910101526126dc81615657565b9050612699565b505050505b92915050565b6126f6612f18565b6000818152600560205260409020546001600160a01b031661271781613910565b6000828152600560205260409020600101546001600160a01b03163314612770576000828152600560205260409081902060010154905163d084e97560e01b81526001600160a01b039091166004820152602401610b9a565b6000828152600560209081526040918290208054336001600160a01b03199182168117835560019092018054909116905582516001600160a01b03851681529182015283917fd4114ab6e9af9f597c52041f32d62dc57c5c4e4c0d4427006069635e216c93869101611b5f565b816127e781612ec3565b6127ef612f18565b6001600160a01b03821660009081526004602090815260408083208684529091529020805460ff16156128225750505050565b6000848152600560205260409020600201805460631901612856576040516305a48e0f60e01b815260040160405180910390fd5b8154600160ff199091168117835581549081018255600082815260209081902090910180546001600160a01b0319166001600160a01b03871690811790915560405190815286917f1e980d04aa7648e205713e5e8ea3808672ac163d10936d36f91b2c88ac1575e191015b60405180910390a25050505050565b6000816040516020016128e39190615952565b604051602081830303815290604052805190602001209050919050565b8161290a81612ec3565b612912612f18565b61291b836114de565b1561293957604051631685ecdd60e31b815260040160405180910390fd5b6001600160a01b038216600090815260046020908152604080832086845290915290205460ff1661298f576040516379bfd40160e01b8152600481018490526001600160a01b0383166024820152604401610b9a565b6000838152600560205260408120600201805490915b81811015612aa457846001600160a01b03168382815481106129c9576129c9615602565b6000918252602090912001546001600160a01b031603612a9457826129ef60018461562e565b815481106129ff576129ff615602565b9060005260206000200160009054906101000a90046001600160a01b0316838281548110612a2f57612a2f615602565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555082805480612a6d57612a6d615641565b600082815260209020810160001990810180546001600160a01b0319169055019055612aa4565b612a9d81615657565b90506129a5565b506001600160a01b0384166000818152600460209081526040808320898452825291829020805460ff19169055905191825286917f32158c6058347c1601b2d12bc696ac6901d8a9a9aa3ba10c27ab0a983e8425a791016128c1565b600e8181548110612b1057600080fd5b600091825260209091200154905081565b81612b2b81612ec3565b612b33612f18565b600083815260056020526040902060018101546001600160a01b03848116911614612bb6576001810180546001600160a01b0319166001600160a01b03851690811790915560408051338152602081019290925285917f21a4dad170a6bf476c31bbcf4a16628295b0e450672eec25d7c93308e05344a191015b60405180910390a25b50505050565b600081815260056020526040812054819081906001600160a01b03166060612be382613910565b600086815260066020908152604080832054600583529281902060020180548251818502810185019093528083526001600160601b0380861695600160601b810490911694600160c01b9091046001600160401b0316938893929091839190830182828015612c7b57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612c5d575b505050505090509450945094509450945091939590929450565b612c9d612e67565b6002546001600160a01b0316612cc65760405163c1f0c0a160e01b815260040160405180910390fd5b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015612d0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d339190615961565b600a549091506001600160601b031681811115612d6d576040516354ced18160e11b81526004810182905260248101839052604401610b9a565b81811015610d82576000612d81828461562e565b60025460405163a9059cbb60e01b81526001600160a01b0387811660048301526024820184905292935091169063a9059cbb906044016020604051808303816000875af1158015612dd6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dfa9190615831565b612e1757604051631f01ff1360e21b815260040160405180910390fd5b604080516001600160a01b0386168152602081018390527f59bfc682b673f8cbf945f1e454df9334834abf7dfe7f92237ca29ecb9b4366009101610d31565b612e5e612e67565b610ba381613a4b565b6000546001600160a01b03163314612ec15760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610b9a565b565b6000818152600560205260409020546001600160a01b0316612ee481613910565b336001600160a01b03821614610d9957604051636c51fda960e11b81526001600160a01b0382166004820152602401610b9a565b600c546601000000000000900460ff1615612ec15760405163769dd35360e11b815260040160405180910390fd5b600080612f528461375e565b60025491935091506001600160a01b031615801590612f7957506001600160601b03821615155b15612fc15760025460405163a9059cbb60e01b81526001600160a01b0385811660048301526001600160601b0385166024830152612fc192169063a9059cbb90604401611387565b612fd483826001600160601b0316613101565b604080516001600160a01b03851681526001600160601b03808516602083015283169181019190915284907f8c74ce8b8cf87f5eb001275c8be27eb34ea2b62bfab6814fcc62192bb63e81c490606001612bad565b60038260ff161061305157604051621c300f60e81b815260ff83166004820152602401610b9a565b60ff81161580613064575060648160ff16115b156130865760405162d4503560e51b815260ff82166004820152602401610b9a565b6012805460ff84811661ffff199092168217610100918516918202179092556040805191825260208201929092527f8e63dc2f2e669ce73bebd2580bb9dd9a5d17fa2d046ac02057d8349fc0b0c2f3910160405180910390a15050565b80610ba357604051631e9acf1760e31b815260040160405180910390fd5b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461314e576040519150601f19603f3d011682016040523d82523d6000602084013e613153565b606091505b5050905080610d825760405163950b247960e01b815260040160405180910390fd5b6040805160a08101825260006060820181815260808301829052825260208201819052918101829052906131a8846128d0565b6000818152600d602090815260409182902082518084019093525460ff811615158084526101009091046001600160401b0316918301919091529192509061320657604051631dfd6e1360e21b815260048101839052602401610b9a565b6000828660c00135604051602001613228929190918252602082015260400190565b60408051601f1981840301815291815281516020928301206000818152600f909352908220549092509081900361327257604051631b44092560e11b815260040160405180910390fd5b81613280602088018861597a565b602088013561329560608a0160408b01615690565b6132a560808b0160608c01615690565b6132b560a08c0160808d01615198565b6132c260a08d018d61570c565b6040516020016132d9989796959493929190615995565b60405160208183030381529060405280519060200120811461330e5760405163354a450b60e21b815260040160405180910390fd5b600061332d613320602089018961597a565b6001600160401b03164090565b905080613411576001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663e9413d3861337060208a018a61597a565b6040516001600160e01b031960e084901b1681526001600160401b039091166004820152602401602060405180830381865afa1580156133b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133d89190615961565b905080613411576133ec602088018861597a565b60405163175dadad60e01b81526001600160401b039091166004820152602401610b9a565b6040805160c08a013560208083019190915281830184905282518083038401815260609092019092528051910120600061344b8a83613af4565b604080516060810182529788526020880196909652948601949094525092979650505050505050565b6000816001600160401b03163a11156134c757821561349d57506001600160401b0381166126e8565b60405163435e532d60e11b81523a60048201526001600160401b0383166024820152604401610b9a565b503a92915050565b6000806000631fe543e360e01b86856040516024016134ef929190615a0d565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252600c805466ff00000000000019166601000000000000179055915061356c906135509060608801908801615690565b63ffffffff1661356660a0880160808901615198565b83613bea565b600c805466ff000000000000191690559695505050505050565b60008083156135a55761359a868685613c36565b6000915091506135b5565b6135b0868685613d4c565b915091505b94509492505050565b6000818152600660205260409020821561366e5780546001600160601b03600160601b9091048116906135f59086168210156130e3565b6135ff8582615670565b82546bffffffffffffffffffffffff60601b1916600160601b6001600160601b039283168102919091178455600b805488939192600c9261364492869290041661584e565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555050612bb6565b80546001600160601b039081169061368a9086168210156130e3565b6136948582615670565b82546bffffffffffffffffffffffff19166001600160601b03918216178355600b805487926000916136c89185911661584e565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505050505050565b601154600090815b8181101561375457836001600160a01b03166011828154811061372057613720615602565b6000918252602090912001546001600160a01b031603613744575060019392505050565b61374d81615657565b90506136fb565b5060009392505050565b60008181526005602090815260408083206006909252822054600290910180546001600160601b0380841694600160601b90940416925b8181101561380a57600460008483815481106137b3576137b3615602565b60009182526020808320909101546001600160a01b0316835282810193909352604091820181208982529092529020805470ffffffffffffffffffffffffffffffffff1916905561380381615657565b9050613795565b50600085815260056020526040812080546001600160a01b0319908116825560018201805490911690559061384260028301826150f6565b505060008581526006602052604081205561385e600886613f43565b506001600160601b038416156138b157600a805485919060009061388c9084906001600160601b0316615670565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b6001600160601b038316156139095782600a600c8282829054906101000a90046001600160601b03166138e49190615670565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b5050915091565b6001600160a01b038116610ba357604051630fb532db60e11b815260040160405180910390fd5b604080516020810190915260008152600082900361396457506040805160208101909152600081526126e8565b63125fa26760e31b6139768385615a26565b6001600160e01b0319161461399e57604051632923fee760e11b815260040160405180910390fd5b6139ab8260048186615a56565b8101906111899190615a80565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa826040516024016139f191511515815260200190565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915292915050565b60006111898383613f4f565b60006126e8825490565b60006111898383613f9e565b336001600160a01b03821603613aa35760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610b9a565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b604080518082018252600091613bb49190859060029083908390808284376000920191909152505060408051808201825291508087019060029083908390808284376000920191909152505050608086013560a087013586613b5d6101008a0160e08b01615198565b604080518082018252906101008c019060029083908390808284376000920191909152505060408051808201825291506101408d0190600290839083908082843760009201919091525050506101808c0135613fc8565b600383604001604051602001613bcb929190615ad9565b60408051601f1981840301815291905280516020909101209392505050565b60005a611388811015613bfc57600080fd5b611388810390508460408204820311613c1457600080fd5b50823b613c2057600080fd5b60008083516020850160008789f1949350505050565b600080613c446000366141f3565b905060005a600c54613c64908890600160581b900463ffffffff1661586e565b613c6e919061562e565b613c789086615aef565b600c54909150600090613c9d90600160781b900463ffffffff1664e8d4a51000615aef565b90508215613cd9576040518381527f56296f7beae05a0db815737fdb4cd298897b1e517614d62468081531ae14d0999060200160405180910390a15b8415613d2357600c548190606490600160b81b900460ff16613cfb858761586e565b613d059190615aef565b613d0f9190615b1c565b613d19919061586e565b9350505050611189565b600c548190606490613d3f90600160b81b900460ff1682615b30565b60ff16613cfb858761586e565b600080600080613d5a6141ff565b9150915060008213613d82576040516321ea67b360e11b815260048101839052602401610b9a565b6000613d8f6000366141f3565b9050600083825a600c54613db1908d90600160581b900463ffffffff1661586e565b613dbb919061562e565b613dc5908b615aef565b613dcf919061586e565b613de190670de0b6b3a7640000615aef565b613deb9190615b1c565b600c54909150600090613e149063ffffffff600160981b8204811691600160781b900416615b49565b613e299063ffffffff1664e8d4a51000615aef565b9050600085613e4083670de0b6b3a7640000615aef565b613e4a9190615b1c565b90508315613e86576040518481527f56296f7beae05a0db815737fdb4cd298897b1e517614d62468081531ae14d0999060200160405180910390a15b60008915613ec557600c548290606490613eaa90600160c01b900460ff1687615aef565b613eb49190615b1c565b613ebe919061586e565b9050613f05565b600c548290606490613ee190600160c01b900460ff1682615b30565b613eee9060ff1687615aef565b613ef89190615b1c565b613f02919061586e565b90505b6b033b2e3c9fd0803ce8000000811115613f325760405163e80fa38160e01b815260040160405180910390fd5b9b949a509398505050505050505050565b600061118983836142ca565b6000818152600183016020526040812054613f96575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556126e8565b5060006126e8565b6000826000018281548110613fb557613fb5615602565b9060005260206000200154905092915050565b613fd1896143c4565b61401d5760405162461bcd60e51b815260206004820152601a60248201527f7075626c6963206b6579206973206e6f74206f6e2063757276650000000000006044820152606401610b9a565b614026886143c4565b6140725760405162461bcd60e51b815260206004820152601560248201527f67616d6d61206973206e6f74206f6e20637572766500000000000000000000006044820152606401610b9a565b61407b836143c4565b6140c75760405162461bcd60e51b815260206004820152601d60248201527f6347616d6d615769746e657373206973206e6f74206f6e2063757276650000006044820152606401610b9a565b6140d0826143c4565b61411c5760405162461bcd60e51b815260206004820152601c60248201527f73486173685769746e657373206973206e6f74206f6e206375727665000000006044820152606401610b9a565b614128878a888761449d565b6141745760405162461bcd60e51b815260206004820152601960248201527f6164647228632a706b2b732a6729213d5f755769746e657373000000000000006044820152606401610b9a565b60006141808a876145c0565b90506000614193898b878b868989614624565b905060006141a4838d8d8a86614750565b9050808a146141e55760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b210383937b7b360991b6044820152606401610b9a565b505050505050505050505050565b60006111898383614790565b600c5460035460408051633fabe5a360e21b81529051600093849367010000000000000090910463ffffffff169284926001600160a01b039092169163feaf968c9160048082019260a0929091908290030181865afa158015614266573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061428a9190615b80565b50919650909250505063ffffffff8216158015906142b657506142ad814261562e565b8263ffffffff16105b925082156142c45760105493505b50509091565b600081815260018301602052604081205480156143b35760006142ee60018361562e565b85549091506000906143029060019061562e565b905081811461436757600086600001828154811061432257614322615602565b906000526020600020015490508087600001848154811061434557614345615602565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061437857614378615641565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506126e8565b60009150506126e8565b5092915050565b80516000906401000003d0191161441d5760405162461bcd60e51b815260206004820152601260248201527f696e76616c696420782d6f7264696e61746500000000000000000000000000006044820152606401610b9a565b60208201516401000003d019116144765760405162461bcd60e51b815260206004820152601260248201527f696e76616c696420792d6f7264696e61746500000000000000000000000000006044820152606401610b9a565b60208201516401000003d0199080096144968360005b602002015161485c565b1492915050565b60006001600160a01b0382166144e35760405162461bcd60e51b815260206004820152600b60248201526a626164207769746e65737360a81b6044820152606401610b9a565b6020840151600090600116156144fa57601c6144fd565b601b5b9050600070014551231950b75fc4402da1732fc9bebe1985876000602002015109865170014551231950b75fc4402da1732fc9bebe19918203925060009190890987516040805160008082526020820180845287905260ff88169282019290925260608101929092526080820183905291925060019060a0016020604051602081039080840390855afa158015614598573d6000803e3d6000fd5b5050604051601f1901516001600160a01b039081169088161495505050505050949350505050565b6145c8615114565b6145f5600184846040516020016145e193929190615bf3565b604051602081830303815290604052614880565b90505b614601816143c4565b6126e857805160408051602081019290925261461d91016145e1565b90506145f8565b61462c615114565b825186516401000003d019918290069190060361468b5760405162461bcd60e51b815260206004820152601e60248201527f706f696e747320696e2073756d206d7573742062652064697374696e637400006044820152606401610b9a565b6146968789886148cd565b6146e25760405162461bcd60e51b815260206004820152601660248201527f4669727374206d756c20636865636b206661696c6564000000000000000000006044820152606401610b9a565b6146ed8486856148cd565b6147395760405162461bcd60e51b815260206004820152601760248201527f5365636f6e64206d756c20636865636b206661696c65640000000000000000006044820152606401610b9a565b6147448684846149f8565b98975050505050505050565b60006002868686858760405160200161476e96959493929190615c14565b60408051601f1981840301815291905280516020909101209695505050505050565b60125460009060ff1661485357600f602160991b016001600160a01b03166349948e0e8484604051806080016040528060478152602001615dee604791396040516020016147e093929190615c73565b6040516020818303038152906040526040518263ffffffff1660e01b815260040161480b919061581e565b602060405180830381865afa158015614828573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061484c9190615961565b90506126e8565b61118982614abf565b6000806401000003d01980848509840990506401000003d019600782089392505050565b614888615114565b61489182614ba7565b81526148a66148a182600061448c565b614be2565b6020820181905260029006600103611f91576020810180516401000003d019039052919050565b60008260000361490d5760405162461bcd60e51b815260206004820152600b60248201526a3d32b9379039b1b0b630b960a91b6044820152606401610b9a565b8351602085015160009061492390600290615c9a565b1561492f57601c614932565b601b5b9050600070014551231950b75fc4402da1732fc9bebe198387096040805160008082526020820180845281905260ff86169282019290925260608101869052608081018390529192509060019060a0016020604051602081039080840390855afa1580156149a4573d6000803e3d6000fd5b5050506020604051035190506000866040516020016149c39190615cae565b60408051601f1981840301815291905280516020909101206001600160a01b0392831692169190911498975050505050505050565b614a00615114565b835160208086015185519186015160009384938493614a2193909190614c02565b919450925090506401000003d019858209600114614a815760405162461bcd60e51b815260206004820152601960248201527f696e765a206d75737420626520696e7665727365206f66207a000000000000006044820152606401610b9a565b60405180604001604052806401000003d01980614aa057614aa0615b06565b87860981526020016401000003d0198785099052979650505050505050565b60125460009060ff166000198101614b05576064614ae6614ae160478661586e565b614ce2565b601254614afb9190610100900460ff16615aef565b6111899190615b1c565b60011960ff821601614b8a576064600f602160991b0163f1c7a58b614b2b60478761586e565b6040518263ffffffff1660e01b8152600401614b4991815260200190565b602060405180830381865afa158015614b66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614ae69190615961565b604051621c300f60e81b815260ff82166004820152602401610b9a565b805160208201205b6401000003d0198110611f9157604080516020808201939093528151808203840181529082019091528051910120614baf565b60006126e8826002614bfb6401000003d019600161586e565b901c614f7f565b60008080600180826401000003d019896401000003d019038808905060006401000003d0198b6401000003d019038a0890506000614c4283838585615024565b9098509050614c5388828e88615048565b9098509050614c6488828c87615048565b90985090506000614c778d878b85615048565b9098509050614c8888828686615024565b9098509050614c9988828e89615048565b9098509050818114614cce576401000003d019818a0998506401000003d01982890997506401000003d0198183099650614cd2565b8196505b5050505050509450945094915050565b600080614cf060448461586e565b614cfb906010615aef565b90506000600f602160991b016001600160a01b031663519b4bd36040518163ffffffff1660e01b8152600401602060405180830381865afa158015614d44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614d689190615961565b600f602160991b016001600160a01b031663c59859186040518163ffffffff1660e01b8152600401602060405180830381865afa158015614dad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614dd19190615cc0565b614ddc906010615cdd565b63ffffffff16614dec9190615aef565b90506000600f602160991b016001600160a01b031663f82061406040518163ffffffff1660e01b8152600401602060405180830381865afa158015614e35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614e599190615961565b600f602160991b016001600160a01b03166368d5dca66040518163ffffffff1660e01b8152600401602060405180830381865afa158015614e9e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614ec29190615cc0565b63ffffffff16614ed29190615aef565b90506000614ee0828461586e565b614eea9085615aef565b9050600f602160991b016001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015614f31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614f559190615961565b614f6090600a615de1565b614f6b906010615aef565b614f759082615b1c565b9695505050505050565b600080614f8a615132565b6020808252818101819052604082015260608101859052608081018490526401000003d01960a0820152614fbc615150565b60208160c0846005600019fa92508260000361501a5760405162461bcd60e51b815260206004820152601260248201527f6269674d6f64457870206661696c7572652100000000000000000000000000006044820152606401610b9a565b5195945050505050565b6000806401000003d0198487096401000003d0198487099097909650945050505050565b600080806401000003d019878509905060006401000003d01987876401000003d019030990506401000003d0198183086401000003d01986890990999098509650505050505050565b8280548282559060005260206000209081019282156150e6579160200282015b828111156150e657825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906150b1565b506150f292915061516e565b5090565b5080546000825590600052602060002090810190610ba3919061516e565b60405180604001604052806002906020820280368337509192915050565b6040518060c001604052806006906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b5b808211156150f2576000815560010161516f565b6001600160a01b0381168114610ba357600080fd5b6000602082840312156151aa57600080fd5b813561118981615183565b80604081018310156126e857600080fd5b6000604082840312156151d857600080fd5b61118983836151b5565b600080604083850312156151f557600080fd5b82359150602083013561520781615183565b809150509250929050565b803560ff81168114611f9157600080fd5b6000806040838503121561523657600080fd5b61523f83615212565b915061524d60208401615212565b90509250929050565b600060c0828403121561526857600080fd5b50919050565b8015158114610ba357600080fd5b60008060008385036101e081121561529357600080fd5b6101a0808212156152a357600080fd5b85945084013590506001600160401b038111156152bf57600080fd5b6152cb86828701615256565b9250506101c08401356152dd8161526e565b809150509250925092565b6000602082840312156152fa57600080fd5b5035919050565b6000806040838503121561531457600080fd5b823561531f81615183565b9150602083013561520781615183565b80356001600160401b0381168114611f9157600080fd5b6000806060838503121561535957600080fd5b61536384846151b5565b915061524d6040840161532f565b60006020828403121561538357600080fd5b81356001600160401b0381111561539957600080fd5b6153a584828501615256565b949350505050565b600080600080606085870312156153c357600080fd5b84356153ce81615183565b93506020850135925060408501356001600160401b03808211156153f157600080fd5b818701915087601f83011261540557600080fd5b81358181111561541457600080fd5b88602082850101111561542657600080fd5b95989497505060200194505050565b803561ffff81168114611f9157600080fd5b63ffffffff81168114610ba357600080fd5b60008060008060008060008060006101208a8c03121561547857600080fd5b6154818a615435565b985060208a013561549181615447565b975060408a01356154a181615447565b965060608a01356154b181615447565b955060808a0135945060a08a01356154c881615447565b935060c08a01356154d881615447565b92506154e660e08b01615212565b91506154f56101008b01615212565b90509295985092959850929598565b6000806040838503121561551757600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b838110156155565781518752958201959082019060010161553a565b509495945050505050565b6020815260006111896020830184615526565b600081518084526020808501945080840160005b838110156155565781516001600160a01b031687529582019590820190600101615588565b60006001600160601b0380881683528087166020840152506001600160401b03851660408301526001600160a01b038416606083015260a060808301526155f760a0830184615574565b979650505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b818103818111156126e8576126e8615618565b634e487b7160e01b600052603160045260246000fd5b60006001820161566957615669615618565b5060010190565b6001600160601b038281168282160390808211156143bd576143bd615618565b6000602082840312156156a257600080fd5b813561118981615447565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b038083168181036156df576156df615618565b6001019392505050565b60006001600160401b0382168061570257615702615618565b6000190192915050565b6000808335601e1984360301811261572357600080fd5b8301803591506001600160401b0382111561573d57600080fd5b60200191503681900382131561575257600080fd5b9250929050565b6020815260ff8251166020820152602082015160408201526001600160a01b0360408301511660608201526000606083015160c0608084015261579f60e0840182615574565b905060808401516001600160601b0380821660a08601528060a08701511660c086015250508091505092915050565b60005b838110156157e95781810151838201526020016157d1565b50506000910152565b6000815180845261580a8160208601602086016157ce565b601f01601f19169290920160200192915050565b60208152600061118960208301846157f2565b60006020828403121561584357600080fd5b81516111898161526e565b6001600160601b038181168382160190808211156143bd576143bd615618565b808201808211156126e8576126e8615618565b60006020828403121561589357600080fd5b61118982615435565b878152866020820152856040820152600063ffffffff80871660608401528086166080840152506001600160a01b03841660a083015260e060c08301526158e660e08301846157f2565b9998505050505050505050565b86815285602082015261ffff85166040820152600063ffffffff808616606084015280851660808401525060c060a083015261474460c08301846157f2565b6001600160401b038181168382160190808211156143bd576143bd615618565b60408181019083833792915050565b60006020828403121561597357600080fd5b5051919050565b60006020828403121561598c57600080fd5b6111898261532f565b8881526001600160401b0388166020820152866040820152600063ffffffff80881660608401528087166080840152506001600160a01b03851660a083015260e060c08301528260e08301526101008385828501376000838501820152601f909301601f191690910190910198975050505050505050565b8281526040602082015260006153a56040830184615526565b6001600160e01b03198135818116916004851015615a4e5780818660040360031b1b83161692505b505092915050565b60008085851115615a6657600080fd5b83861115615a7357600080fd5b5050820193919092039150565b600060208284031215615a9257600080fd5b604051602081018181106001600160401b0382111715615ac257634e487b7160e01b600052604160045260246000fd5b6040528235615ad08161526e565b81529392505050565b8281526060810160408360208401379392505050565b80820281158282048414176126e8576126e8615618565b634e487b7160e01b600052601260045260246000fd5b600082615b2b57615b2b615b06565b500490565b60ff81811683821601908111156126e8576126e8615618565b63ffffffff8281168282160390808211156143bd576143bd615618565b805169ffffffffffffffffffff81168114611f9157600080fd5b600080600080600060a08688031215615b9857600080fd5b615ba186615b66565b9450602086015193506040860151925060608601519150615bc460808701615b66565b90509295509295909350565b8060005b6002811015612bb6578151845260209384019390910190600101615bd4565b838152615c036020820184615bd0565b606081019190915260800192915050565b868152615c246020820187615bd0565b615c316060820186615bd0565b615c3e60a0820185615bd0565b615c4b60e0820184615bd0565b60609190911b6bffffffffffffffffffffffff19166101208201526101340195945050505050565b828482376000838201600081528351615c908183602088016157ce565b0195945050505050565b600082615ca957615ca9615b06565b500690565b615cb88183615bd0565b604001919050565b600060208284031215615cd257600080fd5b815161118981615447565b63ffffffff818116838216028082169190828114615a4e57615a4e615618565b600181815b80851115615d38578160001904821115615d1e57615d1e615618565b80851615615d2b57918102915b93841c9390800290615d02565b509250929050565b600082615d4f575060016126e8565b81615d5c575060006126e8565b8160018114615d725760028114615d7c57615d98565b60019150506126e8565b60ff841115615d8d57615d8d615618565b50506001821b6126e8565b5060208310610133831016604e8410600b8410161715615dbb575081810a6126e8565b615dc58383615cfd565b8060001904821115615dd957615dd9615618565b029392505050565b60006111898383615d4056feffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa164736f6c6343000813000a", +} + +var VRFCoordinatorV25OptimismABI = VRFCoordinatorV25OptimismMetaData.ABI + +var VRFCoordinatorV25OptimismBin = VRFCoordinatorV25OptimismMetaData.Bin + +func DeployVRFCoordinatorV25Optimism(auth *bind.TransactOpts, backend bind.ContractBackend, blockhashStore common.Address) (common.Address, *types.Transaction, *VRFCoordinatorV25Optimism, error) { + parsed, err := VRFCoordinatorV25OptimismMetaData.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(VRFCoordinatorV25OptimismBin), backend, blockhashStore) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &VRFCoordinatorV25Optimism{address: address, abi: *parsed, VRFCoordinatorV25OptimismCaller: VRFCoordinatorV25OptimismCaller{contract: contract}, VRFCoordinatorV25OptimismTransactor: VRFCoordinatorV25OptimismTransactor{contract: contract}, VRFCoordinatorV25OptimismFilterer: VRFCoordinatorV25OptimismFilterer{contract: contract}}, nil +} + +type VRFCoordinatorV25Optimism struct { + address common.Address + abi abi.ABI + VRFCoordinatorV25OptimismCaller + VRFCoordinatorV25OptimismTransactor + VRFCoordinatorV25OptimismFilterer +} + +type VRFCoordinatorV25OptimismCaller struct { + contract *bind.BoundContract +} + +type VRFCoordinatorV25OptimismTransactor struct { + contract *bind.BoundContract +} + +type VRFCoordinatorV25OptimismFilterer struct { + contract *bind.BoundContract +} + +type VRFCoordinatorV25OptimismSession struct { + Contract *VRFCoordinatorV25Optimism + CallOpts bind.CallOpts + TransactOpts bind.TransactOpts +} + +type VRFCoordinatorV25OptimismCallerSession struct { + Contract *VRFCoordinatorV25OptimismCaller + CallOpts bind.CallOpts +} + +type VRFCoordinatorV25OptimismTransactorSession struct { + Contract *VRFCoordinatorV25OptimismTransactor + TransactOpts bind.TransactOpts +} + +type VRFCoordinatorV25OptimismRaw struct { + Contract *VRFCoordinatorV25Optimism +} + +type VRFCoordinatorV25OptimismCallerRaw struct { + Contract *VRFCoordinatorV25OptimismCaller +} + +type VRFCoordinatorV25OptimismTransactorRaw struct { + Contract *VRFCoordinatorV25OptimismTransactor +} + +func NewVRFCoordinatorV25Optimism(address common.Address, backend bind.ContractBackend) (*VRFCoordinatorV25Optimism, error) { + abi, err := abi.JSON(strings.NewReader(VRFCoordinatorV25OptimismABI)) + if err != nil { + return nil, err + } + contract, err := bindVRFCoordinatorV25Optimism(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &VRFCoordinatorV25Optimism{address: address, abi: abi, VRFCoordinatorV25OptimismCaller: VRFCoordinatorV25OptimismCaller{contract: contract}, VRFCoordinatorV25OptimismTransactor: VRFCoordinatorV25OptimismTransactor{contract: contract}, VRFCoordinatorV25OptimismFilterer: VRFCoordinatorV25OptimismFilterer{contract: contract}}, nil +} + +func NewVRFCoordinatorV25OptimismCaller(address common.Address, caller bind.ContractCaller) (*VRFCoordinatorV25OptimismCaller, error) { + contract, err := bindVRFCoordinatorV25Optimism(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &VRFCoordinatorV25OptimismCaller{contract: contract}, nil +} + +func NewVRFCoordinatorV25OptimismTransactor(address common.Address, transactor bind.ContractTransactor) (*VRFCoordinatorV25OptimismTransactor, error) { + contract, err := bindVRFCoordinatorV25Optimism(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &VRFCoordinatorV25OptimismTransactor{contract: contract}, nil +} + +func NewVRFCoordinatorV25OptimismFilterer(address common.Address, filterer bind.ContractFilterer) (*VRFCoordinatorV25OptimismFilterer, error) { + contract, err := bindVRFCoordinatorV25Optimism(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &VRFCoordinatorV25OptimismFilterer{contract: contract}, nil +} + +func bindVRFCoordinatorV25Optimism(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := VRFCoordinatorV25OptimismMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _VRFCoordinatorV25Optimism.Contract.VRFCoordinatorV25OptimismCaller.contract.Call(opts, result, method, params...) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.VRFCoordinatorV25OptimismTransactor.contract.Transfer(opts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.VRFCoordinatorV25OptimismTransactor.contract.Transact(opts, method, params...) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _VRFCoordinatorV25Optimism.Contract.contract.Call(opts, result, method, params...) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.contract.Transfer(opts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.contract.Transact(opts, method, params...) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCaller) BLOCKHASHSTORE(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _VRFCoordinatorV25Optimism.contract.Call(opts, &out, "BLOCKHASH_STORE") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) BLOCKHASHSTORE() (common.Address, error) { + return _VRFCoordinatorV25Optimism.Contract.BLOCKHASHSTORE(&_VRFCoordinatorV25Optimism.CallOpts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCallerSession) BLOCKHASHSTORE() (common.Address, error) { + return _VRFCoordinatorV25Optimism.Contract.BLOCKHASHSTORE(&_VRFCoordinatorV25Optimism.CallOpts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCaller) LINK(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _VRFCoordinatorV25Optimism.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 (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) LINK() (common.Address, error) { + return _VRFCoordinatorV25Optimism.Contract.LINK(&_VRFCoordinatorV25Optimism.CallOpts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCallerSession) LINK() (common.Address, error) { + return _VRFCoordinatorV25Optimism.Contract.LINK(&_VRFCoordinatorV25Optimism.CallOpts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCaller) LINKNATIVEFEED(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _VRFCoordinatorV25Optimism.contract.Call(opts, &out, "LINK_NATIVE_FEED") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) LINKNATIVEFEED() (common.Address, error) { + return _VRFCoordinatorV25Optimism.Contract.LINKNATIVEFEED(&_VRFCoordinatorV25Optimism.CallOpts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCallerSession) LINKNATIVEFEED() (common.Address, error) { + return _VRFCoordinatorV25Optimism.Contract.LINKNATIVEFEED(&_VRFCoordinatorV25Optimism.CallOpts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCaller) MAXCONSUMERS(opts *bind.CallOpts) (uint16, error) { + var out []interface{} + err := _VRFCoordinatorV25Optimism.contract.Call(opts, &out, "MAX_CONSUMERS") + + if err != nil { + return *new(uint16), err + } + + out0 := *abi.ConvertType(out[0], new(uint16)).(*uint16) + + return out0, err + +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) MAXCONSUMERS() (uint16, error) { + return _VRFCoordinatorV25Optimism.Contract.MAXCONSUMERS(&_VRFCoordinatorV25Optimism.CallOpts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCallerSession) MAXCONSUMERS() (uint16, error) { + return _VRFCoordinatorV25Optimism.Contract.MAXCONSUMERS(&_VRFCoordinatorV25Optimism.CallOpts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCaller) MAXNUMWORDS(opts *bind.CallOpts) (uint32, error) { + var out []interface{} + err := _VRFCoordinatorV25Optimism.contract.Call(opts, &out, "MAX_NUM_WORDS") + + if err != nil { + return *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + + return out0, err + +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) MAXNUMWORDS() (uint32, error) { + return _VRFCoordinatorV25Optimism.Contract.MAXNUMWORDS(&_VRFCoordinatorV25Optimism.CallOpts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCallerSession) MAXNUMWORDS() (uint32, error) { + return _VRFCoordinatorV25Optimism.Contract.MAXNUMWORDS(&_VRFCoordinatorV25Optimism.CallOpts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCaller) MAXREQUESTCONFIRMATIONS(opts *bind.CallOpts) (uint16, error) { + var out []interface{} + err := _VRFCoordinatorV25Optimism.contract.Call(opts, &out, "MAX_REQUEST_CONFIRMATIONS") + + if err != nil { + return *new(uint16), err + } + + out0 := *abi.ConvertType(out[0], new(uint16)).(*uint16) + + return out0, err + +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) MAXREQUESTCONFIRMATIONS() (uint16, error) { + return _VRFCoordinatorV25Optimism.Contract.MAXREQUESTCONFIRMATIONS(&_VRFCoordinatorV25Optimism.CallOpts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCallerSession) MAXREQUESTCONFIRMATIONS() (uint16, error) { + return _VRFCoordinatorV25Optimism.Contract.MAXREQUESTCONFIRMATIONS(&_VRFCoordinatorV25Optimism.CallOpts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCaller) GetActiveSubscriptionIds(opts *bind.CallOpts, startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) { + var out []interface{} + err := _VRFCoordinatorV25Optimism.contract.Call(opts, &out, "getActiveSubscriptionIds", startIndex, maxCount) + + if err != nil { + return *new([]*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) + + return out0, err + +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) GetActiveSubscriptionIds(startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) { + return _VRFCoordinatorV25Optimism.Contract.GetActiveSubscriptionIds(&_VRFCoordinatorV25Optimism.CallOpts, startIndex, maxCount) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCallerSession) GetActiveSubscriptionIds(startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) { + return _VRFCoordinatorV25Optimism.Contract.GetActiveSubscriptionIds(&_VRFCoordinatorV25Optimism.CallOpts, startIndex, maxCount) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCaller) GetSubscription(opts *bind.CallOpts, subId *big.Int) (GetSubscription, + + error) { + var out []interface{} + err := _VRFCoordinatorV25Optimism.contract.Call(opts, &out, "getSubscription", subId) + + outstruct := new(GetSubscription) + if err != nil { + return *outstruct, err + } + + 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.SubOwner = *abi.ConvertType(out[3], new(common.Address)).(*common.Address) + outstruct.Consumers = *abi.ConvertType(out[4], new([]common.Address)).(*[]common.Address) + + return *outstruct, err + +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) GetSubscription(subId *big.Int) (GetSubscription, + + error) { + return _VRFCoordinatorV25Optimism.Contract.GetSubscription(&_VRFCoordinatorV25Optimism.CallOpts, subId) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCallerSession) GetSubscription(subId *big.Int) (GetSubscription, + + error) { + return _VRFCoordinatorV25Optimism.Contract.GetSubscription(&_VRFCoordinatorV25Optimism.CallOpts, subId) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCaller) HashOfKey(opts *bind.CallOpts, publicKey [2]*big.Int) ([32]byte, error) { + var out []interface{} + err := _VRFCoordinatorV25Optimism.contract.Call(opts, &out, "hashOfKey", publicKey) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) HashOfKey(publicKey [2]*big.Int) ([32]byte, error) { + return _VRFCoordinatorV25Optimism.Contract.HashOfKey(&_VRFCoordinatorV25Optimism.CallOpts, publicKey) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCallerSession) HashOfKey(publicKey [2]*big.Int) ([32]byte, error) { + return _VRFCoordinatorV25Optimism.Contract.HashOfKey(&_VRFCoordinatorV25Optimism.CallOpts, publicKey) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _VRFCoordinatorV25Optimism.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 (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) Owner() (common.Address, error) { + return _VRFCoordinatorV25Optimism.Contract.Owner(&_VRFCoordinatorV25Optimism.CallOpts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCallerSession) Owner() (common.Address, error) { + return _VRFCoordinatorV25Optimism.Contract.Owner(&_VRFCoordinatorV25Optimism.CallOpts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCaller) PendingRequestExists(opts *bind.CallOpts, subId *big.Int) (bool, error) { + var out []interface{} + err := _VRFCoordinatorV25Optimism.contract.Call(opts, &out, "pendingRequestExists", subId) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) PendingRequestExists(subId *big.Int) (bool, error) { + return _VRFCoordinatorV25Optimism.Contract.PendingRequestExists(&_VRFCoordinatorV25Optimism.CallOpts, subId) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCallerSession) PendingRequestExists(subId *big.Int) (bool, error) { + return _VRFCoordinatorV25Optimism.Contract.PendingRequestExists(&_VRFCoordinatorV25Optimism.CallOpts, subId) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCaller) SConfig(opts *bind.CallOpts) (SConfig, + + error) { + var out []interface{} + err := _VRFCoordinatorV25Optimism.contract.Call(opts, &out, "s_config") + + outstruct := new(SConfig) + if err != nil { + return *outstruct, err + } + + outstruct.MinimumRequestConfirmations = *abi.ConvertType(out[0], new(uint16)).(*uint16) + outstruct.MaxGasLimit = *abi.ConvertType(out[1], new(uint32)).(*uint32) + outstruct.ReentrancyLock = *abi.ConvertType(out[2], new(bool)).(*bool) + outstruct.StalenessSeconds = *abi.ConvertType(out[3], new(uint32)).(*uint32) + outstruct.GasAfterPaymentCalculation = *abi.ConvertType(out[4], new(uint32)).(*uint32) + outstruct.FulfillmentFlatFeeNativePPM = *abi.ConvertType(out[5], new(uint32)).(*uint32) + outstruct.FulfillmentFlatFeeLinkDiscountPPM = *abi.ConvertType(out[6], new(uint32)).(*uint32) + outstruct.NativePremiumPercentage = *abi.ConvertType(out[7], new(uint8)).(*uint8) + outstruct.LinkPremiumPercentage = *abi.ConvertType(out[8], new(uint8)).(*uint8) + + return *outstruct, err + +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) SConfig() (SConfig, + + error) { + return _VRFCoordinatorV25Optimism.Contract.SConfig(&_VRFCoordinatorV25Optimism.CallOpts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCallerSession) SConfig() (SConfig, + + error) { + return _VRFCoordinatorV25Optimism.Contract.SConfig(&_VRFCoordinatorV25Optimism.CallOpts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCaller) SCurrentSubNonce(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _VRFCoordinatorV25Optimism.contract.Call(opts, &out, "s_currentSubNonce") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) SCurrentSubNonce() (uint64, error) { + return _VRFCoordinatorV25Optimism.Contract.SCurrentSubNonce(&_VRFCoordinatorV25Optimism.CallOpts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCallerSession) SCurrentSubNonce() (uint64, error) { + return _VRFCoordinatorV25Optimism.Contract.SCurrentSubNonce(&_VRFCoordinatorV25Optimism.CallOpts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCaller) SFallbackWeiPerUnitLink(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _VRFCoordinatorV25Optimism.contract.Call(opts, &out, "s_fallbackWeiPerUnitLink") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) SFallbackWeiPerUnitLink() (*big.Int, error) { + return _VRFCoordinatorV25Optimism.Contract.SFallbackWeiPerUnitLink(&_VRFCoordinatorV25Optimism.CallOpts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCallerSession) SFallbackWeiPerUnitLink() (*big.Int, error) { + return _VRFCoordinatorV25Optimism.Contract.SFallbackWeiPerUnitLink(&_VRFCoordinatorV25Optimism.CallOpts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCaller) SL1FeeCalculationMode(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _VRFCoordinatorV25Optimism.contract.Call(opts, &out, "s_l1FeeCalculationMode") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) SL1FeeCalculationMode() (uint8, error) { + return _VRFCoordinatorV25Optimism.Contract.SL1FeeCalculationMode(&_VRFCoordinatorV25Optimism.CallOpts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCallerSession) SL1FeeCalculationMode() (uint8, error) { + return _VRFCoordinatorV25Optimism.Contract.SL1FeeCalculationMode(&_VRFCoordinatorV25Optimism.CallOpts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCaller) SL1FeeCoefficient(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _VRFCoordinatorV25Optimism.contract.Call(opts, &out, "s_l1FeeCoefficient") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) SL1FeeCoefficient() (uint8, error) { + return _VRFCoordinatorV25Optimism.Contract.SL1FeeCoefficient(&_VRFCoordinatorV25Optimism.CallOpts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCallerSession) SL1FeeCoefficient() (uint8, error) { + return _VRFCoordinatorV25Optimism.Contract.SL1FeeCoefficient(&_VRFCoordinatorV25Optimism.CallOpts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCaller) SProvingKeyHashes(opts *bind.CallOpts, arg0 *big.Int) ([32]byte, error) { + var out []interface{} + err := _VRFCoordinatorV25Optimism.contract.Call(opts, &out, "s_provingKeyHashes", arg0) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) SProvingKeyHashes(arg0 *big.Int) ([32]byte, error) { + return _VRFCoordinatorV25Optimism.Contract.SProvingKeyHashes(&_VRFCoordinatorV25Optimism.CallOpts, arg0) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCallerSession) SProvingKeyHashes(arg0 *big.Int) ([32]byte, error) { + return _VRFCoordinatorV25Optimism.Contract.SProvingKeyHashes(&_VRFCoordinatorV25Optimism.CallOpts, arg0) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCaller) SProvingKeys(opts *bind.CallOpts, arg0 [32]byte) (SProvingKeys, + + error) { + var out []interface{} + err := _VRFCoordinatorV25Optimism.contract.Call(opts, &out, "s_provingKeys", arg0) + + outstruct := new(SProvingKeys) + if err != nil { + return *outstruct, err + } + + outstruct.Exists = *abi.ConvertType(out[0], new(bool)).(*bool) + outstruct.MaxGas = *abi.ConvertType(out[1], new(uint64)).(*uint64) + + return *outstruct, err + +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) SProvingKeys(arg0 [32]byte) (SProvingKeys, + + error) { + return _VRFCoordinatorV25Optimism.Contract.SProvingKeys(&_VRFCoordinatorV25Optimism.CallOpts, arg0) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCallerSession) SProvingKeys(arg0 [32]byte) (SProvingKeys, + + error) { + return _VRFCoordinatorV25Optimism.Contract.SProvingKeys(&_VRFCoordinatorV25Optimism.CallOpts, arg0) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCaller) SRequestCommitments(opts *bind.CallOpts, arg0 *big.Int) ([32]byte, error) { + var out []interface{} + err := _VRFCoordinatorV25Optimism.contract.Call(opts, &out, "s_requestCommitments", arg0) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) SRequestCommitments(arg0 *big.Int) ([32]byte, error) { + return _VRFCoordinatorV25Optimism.Contract.SRequestCommitments(&_VRFCoordinatorV25Optimism.CallOpts, arg0) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCallerSession) SRequestCommitments(arg0 *big.Int) ([32]byte, error) { + return _VRFCoordinatorV25Optimism.Contract.SRequestCommitments(&_VRFCoordinatorV25Optimism.CallOpts, arg0) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCaller) STotalBalance(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _VRFCoordinatorV25Optimism.contract.Call(opts, &out, "s_totalBalance") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) STotalBalance() (*big.Int, error) { + return _VRFCoordinatorV25Optimism.Contract.STotalBalance(&_VRFCoordinatorV25Optimism.CallOpts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCallerSession) STotalBalance() (*big.Int, error) { + return _VRFCoordinatorV25Optimism.Contract.STotalBalance(&_VRFCoordinatorV25Optimism.CallOpts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCaller) STotalNativeBalance(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _VRFCoordinatorV25Optimism.contract.Call(opts, &out, "s_totalNativeBalance") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) STotalNativeBalance() (*big.Int, error) { + return _VRFCoordinatorV25Optimism.Contract.STotalNativeBalance(&_VRFCoordinatorV25Optimism.CallOpts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismCallerSession) STotalNativeBalance() (*big.Int, error) { + return _VRFCoordinatorV25Optimism.Contract.STotalNativeBalance(&_VRFCoordinatorV25Optimism.CallOpts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.contract.Transact(opts, "acceptOwnership") +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) AcceptOwnership() (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.AcceptOwnership(&_VRFCoordinatorV25Optimism.TransactOpts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactorSession) AcceptOwnership() (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.AcceptOwnership(&_VRFCoordinatorV25Optimism.TransactOpts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactor) AcceptSubscriptionOwnerTransfer(opts *bind.TransactOpts, subId *big.Int) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.contract.Transact(opts, "acceptSubscriptionOwnerTransfer", subId) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) AcceptSubscriptionOwnerTransfer(subId *big.Int) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.AcceptSubscriptionOwnerTransfer(&_VRFCoordinatorV25Optimism.TransactOpts, subId) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactorSession) AcceptSubscriptionOwnerTransfer(subId *big.Int) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.AcceptSubscriptionOwnerTransfer(&_VRFCoordinatorV25Optimism.TransactOpts, subId) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactor) AddConsumer(opts *bind.TransactOpts, subId *big.Int, consumer common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.contract.Transact(opts, "addConsumer", subId, consumer) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) AddConsumer(subId *big.Int, consumer common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.AddConsumer(&_VRFCoordinatorV25Optimism.TransactOpts, subId, consumer) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactorSession) AddConsumer(subId *big.Int, consumer common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.AddConsumer(&_VRFCoordinatorV25Optimism.TransactOpts, subId, consumer) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactor) CancelSubscription(opts *bind.TransactOpts, subId *big.Int, to common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.contract.Transact(opts, "cancelSubscription", subId, to) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) CancelSubscription(subId *big.Int, to common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.CancelSubscription(&_VRFCoordinatorV25Optimism.TransactOpts, subId, to) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactorSession) CancelSubscription(subId *big.Int, to common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.CancelSubscription(&_VRFCoordinatorV25Optimism.TransactOpts, subId, to) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactor) CreateSubscription(opts *bind.TransactOpts) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.contract.Transact(opts, "createSubscription") +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) CreateSubscription() (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.CreateSubscription(&_VRFCoordinatorV25Optimism.TransactOpts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactorSession) CreateSubscription() (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.CreateSubscription(&_VRFCoordinatorV25Optimism.TransactOpts) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactor) DeregisterMigratableCoordinator(opts *bind.TransactOpts, target common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.contract.Transact(opts, "deregisterMigratableCoordinator", target) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) DeregisterMigratableCoordinator(target common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.DeregisterMigratableCoordinator(&_VRFCoordinatorV25Optimism.TransactOpts, target) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactorSession) DeregisterMigratableCoordinator(target common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.DeregisterMigratableCoordinator(&_VRFCoordinatorV25Optimism.TransactOpts, target) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactor) DeregisterProvingKey(opts *bind.TransactOpts, publicProvingKey [2]*big.Int) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.contract.Transact(opts, "deregisterProvingKey", publicProvingKey) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) DeregisterProvingKey(publicProvingKey [2]*big.Int) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.DeregisterProvingKey(&_VRFCoordinatorV25Optimism.TransactOpts, publicProvingKey) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactorSession) DeregisterProvingKey(publicProvingKey [2]*big.Int) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.DeregisterProvingKey(&_VRFCoordinatorV25Optimism.TransactOpts, publicProvingKey) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactor) FulfillRandomWords(opts *bind.TransactOpts, proof VRFProof, rc VRFTypesRequestCommitmentV2Plus, onlyPremium bool) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.contract.Transact(opts, "fulfillRandomWords", proof, rc, onlyPremium) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) FulfillRandomWords(proof VRFProof, rc VRFTypesRequestCommitmentV2Plus, onlyPremium bool) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.FulfillRandomWords(&_VRFCoordinatorV25Optimism.TransactOpts, proof, rc, onlyPremium) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactorSession) FulfillRandomWords(proof VRFProof, rc VRFTypesRequestCommitmentV2Plus, onlyPremium bool) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.FulfillRandomWords(&_VRFCoordinatorV25Optimism.TransactOpts, proof, rc, onlyPremium) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactor) FundSubscriptionWithNative(opts *bind.TransactOpts, subId *big.Int) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.contract.Transact(opts, "fundSubscriptionWithNative", subId) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) FundSubscriptionWithNative(subId *big.Int) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.FundSubscriptionWithNative(&_VRFCoordinatorV25Optimism.TransactOpts, subId) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactorSession) FundSubscriptionWithNative(subId *big.Int) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.FundSubscriptionWithNative(&_VRFCoordinatorV25Optimism.TransactOpts, subId) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactor) Migrate(opts *bind.TransactOpts, subId *big.Int, newCoordinator common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.contract.Transact(opts, "migrate", subId, newCoordinator) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) Migrate(subId *big.Int, newCoordinator common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.Migrate(&_VRFCoordinatorV25Optimism.TransactOpts, subId, newCoordinator) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactorSession) Migrate(subId *big.Int, newCoordinator common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.Migrate(&_VRFCoordinatorV25Optimism.TransactOpts, subId, newCoordinator) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactor) OnTokenTransfer(opts *bind.TransactOpts, arg0 common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.contract.Transact(opts, "onTokenTransfer", arg0, amount, data) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) OnTokenTransfer(arg0 common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.OnTokenTransfer(&_VRFCoordinatorV25Optimism.TransactOpts, arg0, amount, data) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactorSession) OnTokenTransfer(arg0 common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.OnTokenTransfer(&_VRFCoordinatorV25Optimism.TransactOpts, arg0, amount, data) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactor) OwnerCancelSubscription(opts *bind.TransactOpts, subId *big.Int) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.contract.Transact(opts, "ownerCancelSubscription", subId) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) OwnerCancelSubscription(subId *big.Int) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.OwnerCancelSubscription(&_VRFCoordinatorV25Optimism.TransactOpts, subId) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactorSession) OwnerCancelSubscription(subId *big.Int) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.OwnerCancelSubscription(&_VRFCoordinatorV25Optimism.TransactOpts, subId) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactor) RecoverFunds(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.contract.Transact(opts, "recoverFunds", to) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) RecoverFunds(to common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.RecoverFunds(&_VRFCoordinatorV25Optimism.TransactOpts, to) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactorSession) RecoverFunds(to common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.RecoverFunds(&_VRFCoordinatorV25Optimism.TransactOpts, to) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactor) RecoverNativeFunds(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.contract.Transact(opts, "recoverNativeFunds", to) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) RecoverNativeFunds(to common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.RecoverNativeFunds(&_VRFCoordinatorV25Optimism.TransactOpts, to) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactorSession) RecoverNativeFunds(to common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.RecoverNativeFunds(&_VRFCoordinatorV25Optimism.TransactOpts, to) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactor) RegisterMigratableCoordinator(opts *bind.TransactOpts, target common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.contract.Transact(opts, "registerMigratableCoordinator", target) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) RegisterMigratableCoordinator(target common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.RegisterMigratableCoordinator(&_VRFCoordinatorV25Optimism.TransactOpts, target) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactorSession) RegisterMigratableCoordinator(target common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.RegisterMigratableCoordinator(&_VRFCoordinatorV25Optimism.TransactOpts, target) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactor) RegisterProvingKey(opts *bind.TransactOpts, publicProvingKey [2]*big.Int, maxGas uint64) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.contract.Transact(opts, "registerProvingKey", publicProvingKey, maxGas) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) RegisterProvingKey(publicProvingKey [2]*big.Int, maxGas uint64) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.RegisterProvingKey(&_VRFCoordinatorV25Optimism.TransactOpts, publicProvingKey, maxGas) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactorSession) RegisterProvingKey(publicProvingKey [2]*big.Int, maxGas uint64) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.RegisterProvingKey(&_VRFCoordinatorV25Optimism.TransactOpts, publicProvingKey, maxGas) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactor) RemoveConsumer(opts *bind.TransactOpts, subId *big.Int, consumer common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.contract.Transact(opts, "removeConsumer", subId, consumer) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) RemoveConsumer(subId *big.Int, consumer common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.RemoveConsumer(&_VRFCoordinatorV25Optimism.TransactOpts, subId, consumer) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactorSession) RemoveConsumer(subId *big.Int, consumer common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.RemoveConsumer(&_VRFCoordinatorV25Optimism.TransactOpts, subId, consumer) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactor) RequestRandomWords(opts *bind.TransactOpts, req VRFV2PlusClientRandomWordsRequest) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.contract.Transact(opts, "requestRandomWords", req) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) RequestRandomWords(req VRFV2PlusClientRandomWordsRequest) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.RequestRandomWords(&_VRFCoordinatorV25Optimism.TransactOpts, req) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactorSession) RequestRandomWords(req VRFV2PlusClientRandomWordsRequest) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.RequestRandomWords(&_VRFCoordinatorV25Optimism.TransactOpts, req) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactor) RequestSubscriptionOwnerTransfer(opts *bind.TransactOpts, subId *big.Int, newOwner common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.contract.Transact(opts, "requestSubscriptionOwnerTransfer", subId, newOwner) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) RequestSubscriptionOwnerTransfer(subId *big.Int, newOwner common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.RequestSubscriptionOwnerTransfer(&_VRFCoordinatorV25Optimism.TransactOpts, subId, newOwner) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactorSession) RequestSubscriptionOwnerTransfer(subId *big.Int, newOwner common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.RequestSubscriptionOwnerTransfer(&_VRFCoordinatorV25Optimism.TransactOpts, subId, newOwner) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactor) SetConfig(opts *bind.TransactOpts, minimumRequestConfirmations uint16, maxGasLimit uint32, stalenessSeconds uint32, gasAfterPaymentCalculation uint32, fallbackWeiPerUnitLink *big.Int, fulfillmentFlatFeeNativePPM uint32, fulfillmentFlatFeeLinkDiscountPPM uint32, nativePremiumPercentage uint8, linkPremiumPercentage uint8) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.contract.Transact(opts, "setConfig", minimumRequestConfirmations, maxGasLimit, stalenessSeconds, gasAfterPaymentCalculation, fallbackWeiPerUnitLink, fulfillmentFlatFeeNativePPM, fulfillmentFlatFeeLinkDiscountPPM, nativePremiumPercentage, linkPremiumPercentage) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) SetConfig(minimumRequestConfirmations uint16, maxGasLimit uint32, stalenessSeconds uint32, gasAfterPaymentCalculation uint32, fallbackWeiPerUnitLink *big.Int, fulfillmentFlatFeeNativePPM uint32, fulfillmentFlatFeeLinkDiscountPPM uint32, nativePremiumPercentage uint8, linkPremiumPercentage uint8) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.SetConfig(&_VRFCoordinatorV25Optimism.TransactOpts, minimumRequestConfirmations, maxGasLimit, stalenessSeconds, gasAfterPaymentCalculation, fallbackWeiPerUnitLink, fulfillmentFlatFeeNativePPM, fulfillmentFlatFeeLinkDiscountPPM, nativePremiumPercentage, linkPremiumPercentage) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactorSession) SetConfig(minimumRequestConfirmations uint16, maxGasLimit uint32, stalenessSeconds uint32, gasAfterPaymentCalculation uint32, fallbackWeiPerUnitLink *big.Int, fulfillmentFlatFeeNativePPM uint32, fulfillmentFlatFeeLinkDiscountPPM uint32, nativePremiumPercentage uint8, linkPremiumPercentage uint8) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.SetConfig(&_VRFCoordinatorV25Optimism.TransactOpts, minimumRequestConfirmations, maxGasLimit, stalenessSeconds, gasAfterPaymentCalculation, fallbackWeiPerUnitLink, fulfillmentFlatFeeNativePPM, fulfillmentFlatFeeLinkDiscountPPM, nativePremiumPercentage, linkPremiumPercentage) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactor) SetL1FeeCalculation(opts *bind.TransactOpts, mode uint8, coefficient uint8) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.contract.Transact(opts, "setL1FeeCalculation", mode, coefficient) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) SetL1FeeCalculation(mode uint8, coefficient uint8) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.SetL1FeeCalculation(&_VRFCoordinatorV25Optimism.TransactOpts, mode, coefficient) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactorSession) SetL1FeeCalculation(mode uint8, coefficient uint8) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.SetL1FeeCalculation(&_VRFCoordinatorV25Optimism.TransactOpts, mode, coefficient) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactor) SetLINKAndLINKNativeFeed(opts *bind.TransactOpts, link common.Address, linkNativeFeed common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.contract.Transact(opts, "setLINKAndLINKNativeFeed", link, linkNativeFeed) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) SetLINKAndLINKNativeFeed(link common.Address, linkNativeFeed common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.SetLINKAndLINKNativeFeed(&_VRFCoordinatorV25Optimism.TransactOpts, link, linkNativeFeed) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactorSession) SetLINKAndLINKNativeFeed(link common.Address, linkNativeFeed common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.SetLINKAndLINKNativeFeed(&_VRFCoordinatorV25Optimism.TransactOpts, link, linkNativeFeed) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.contract.Transact(opts, "transferOwnership", to) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.TransferOwnership(&_VRFCoordinatorV25Optimism.TransactOpts, to) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.TransferOwnership(&_VRFCoordinatorV25Optimism.TransactOpts, to) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactor) Withdraw(opts *bind.TransactOpts, recipient common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.contract.Transact(opts, "withdraw", recipient) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) Withdraw(recipient common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.Withdraw(&_VRFCoordinatorV25Optimism.TransactOpts, recipient) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactorSession) Withdraw(recipient common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.Withdraw(&_VRFCoordinatorV25Optimism.TransactOpts, recipient) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactor) WithdrawNative(opts *bind.TransactOpts, recipient common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.contract.Transact(opts, "withdrawNative", recipient) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismSession) WithdrawNative(recipient common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.WithdrawNative(&_VRFCoordinatorV25Optimism.TransactOpts, recipient) +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismTransactorSession) WithdrawNative(recipient common.Address) (*types.Transaction, error) { + return _VRFCoordinatorV25Optimism.Contract.WithdrawNative(&_VRFCoordinatorV25Optimism.TransactOpts, recipient) +} + +type VRFCoordinatorV25OptimismConfigSetIterator struct { + Event *VRFCoordinatorV25OptimismConfigSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25OptimismConfigSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25OptimismConfigSet) + 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(VRFCoordinatorV25OptimismConfigSet) + 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 *VRFCoordinatorV25OptimismConfigSetIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25OptimismConfigSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25OptimismConfigSet struct { + MinimumRequestConfirmations uint16 + MaxGasLimit uint32 + StalenessSeconds uint32 + GasAfterPaymentCalculation uint32 + FallbackWeiPerUnitLink *big.Int + FulfillmentFlatFeeNativePPM uint32 + FulfillmentFlatFeeLinkDiscountPPM uint32 + NativePremiumPercentage uint8 + LinkPremiumPercentage uint8 + Raw types.Log +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) FilterConfigSet(opts *bind.FilterOpts) (*VRFCoordinatorV25OptimismConfigSetIterator, error) { + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.FilterLogs(opts, "ConfigSet") + if err != nil { + return nil, err + } + return &VRFCoordinatorV25OptimismConfigSetIterator{contract: _VRFCoordinatorV25Optimism.contract, event: "ConfigSet", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) WatchConfigSet(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismConfigSet) (event.Subscription, error) { + + logs, sub, err := _VRFCoordinatorV25Optimism.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(VRFCoordinatorV25OptimismConfigSet) + if err := _VRFCoordinatorV25Optimism.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 (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) ParseConfigSet(log types.Log) (*VRFCoordinatorV25OptimismConfigSet, error) { + event := new(VRFCoordinatorV25OptimismConfigSet) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "ConfigSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25OptimismCoordinatorDeregisteredIterator struct { + Event *VRFCoordinatorV25OptimismCoordinatorDeregistered + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25OptimismCoordinatorDeregisteredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25OptimismCoordinatorDeregistered) + 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(VRFCoordinatorV25OptimismCoordinatorDeregistered) + 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 *VRFCoordinatorV25OptimismCoordinatorDeregisteredIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25OptimismCoordinatorDeregisteredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25OptimismCoordinatorDeregistered struct { + CoordinatorAddress common.Address + Raw types.Log +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) FilterCoordinatorDeregistered(opts *bind.FilterOpts) (*VRFCoordinatorV25OptimismCoordinatorDeregisteredIterator, error) { + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.FilterLogs(opts, "CoordinatorDeregistered") + if err != nil { + return nil, err + } + return &VRFCoordinatorV25OptimismCoordinatorDeregisteredIterator{contract: _VRFCoordinatorV25Optimism.contract, event: "CoordinatorDeregistered", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) WatchCoordinatorDeregistered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismCoordinatorDeregistered) (event.Subscription, error) { + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.WatchLogs(opts, "CoordinatorDeregistered") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25OptimismCoordinatorDeregistered) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "CoordinatorDeregistered", 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 (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) ParseCoordinatorDeregistered(log types.Log) (*VRFCoordinatorV25OptimismCoordinatorDeregistered, error) { + event := new(VRFCoordinatorV25OptimismCoordinatorDeregistered) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "CoordinatorDeregistered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25OptimismCoordinatorRegisteredIterator struct { + Event *VRFCoordinatorV25OptimismCoordinatorRegistered + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25OptimismCoordinatorRegisteredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25OptimismCoordinatorRegistered) + 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(VRFCoordinatorV25OptimismCoordinatorRegistered) + 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 *VRFCoordinatorV25OptimismCoordinatorRegisteredIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25OptimismCoordinatorRegisteredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25OptimismCoordinatorRegistered struct { + CoordinatorAddress common.Address + Raw types.Log +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) FilterCoordinatorRegistered(opts *bind.FilterOpts) (*VRFCoordinatorV25OptimismCoordinatorRegisteredIterator, error) { + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.FilterLogs(opts, "CoordinatorRegistered") + if err != nil { + return nil, err + } + return &VRFCoordinatorV25OptimismCoordinatorRegisteredIterator{contract: _VRFCoordinatorV25Optimism.contract, event: "CoordinatorRegistered", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) WatchCoordinatorRegistered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismCoordinatorRegistered) (event.Subscription, error) { + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.WatchLogs(opts, "CoordinatorRegistered") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25OptimismCoordinatorRegistered) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "CoordinatorRegistered", 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 (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) ParseCoordinatorRegistered(log types.Log) (*VRFCoordinatorV25OptimismCoordinatorRegistered, error) { + event := new(VRFCoordinatorV25OptimismCoordinatorRegistered) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "CoordinatorRegistered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25OptimismFallbackWeiPerUnitLinkUsedIterator struct { + Event *VRFCoordinatorV25OptimismFallbackWeiPerUnitLinkUsed + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25OptimismFallbackWeiPerUnitLinkUsedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25OptimismFallbackWeiPerUnitLinkUsed) + 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(VRFCoordinatorV25OptimismFallbackWeiPerUnitLinkUsed) + 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 *VRFCoordinatorV25OptimismFallbackWeiPerUnitLinkUsedIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25OptimismFallbackWeiPerUnitLinkUsedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25OptimismFallbackWeiPerUnitLinkUsed struct { + RequestId *big.Int + FallbackWeiPerUnitLink *big.Int + Raw types.Log +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) FilterFallbackWeiPerUnitLinkUsed(opts *bind.FilterOpts) (*VRFCoordinatorV25OptimismFallbackWeiPerUnitLinkUsedIterator, error) { + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.FilterLogs(opts, "FallbackWeiPerUnitLinkUsed") + if err != nil { + return nil, err + } + return &VRFCoordinatorV25OptimismFallbackWeiPerUnitLinkUsedIterator{contract: _VRFCoordinatorV25Optimism.contract, event: "FallbackWeiPerUnitLinkUsed", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) WatchFallbackWeiPerUnitLinkUsed(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismFallbackWeiPerUnitLinkUsed) (event.Subscription, error) { + + logs, sub, err := _VRFCoordinatorV25Optimism.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(VRFCoordinatorV25OptimismFallbackWeiPerUnitLinkUsed) + if err := _VRFCoordinatorV25Optimism.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 (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) ParseFallbackWeiPerUnitLinkUsed(log types.Log) (*VRFCoordinatorV25OptimismFallbackWeiPerUnitLinkUsed, error) { + event := new(VRFCoordinatorV25OptimismFallbackWeiPerUnitLinkUsed) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "FallbackWeiPerUnitLinkUsed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25OptimismFundsRecoveredIterator struct { + Event *VRFCoordinatorV25OptimismFundsRecovered + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25OptimismFundsRecoveredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25OptimismFundsRecovered) + 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(VRFCoordinatorV25OptimismFundsRecovered) + 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 *VRFCoordinatorV25OptimismFundsRecoveredIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25OptimismFundsRecoveredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25OptimismFundsRecovered struct { + To common.Address + Amount *big.Int + Raw types.Log +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) FilterFundsRecovered(opts *bind.FilterOpts) (*VRFCoordinatorV25OptimismFundsRecoveredIterator, error) { + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.FilterLogs(opts, "FundsRecovered") + if err != nil { + return nil, err + } + return &VRFCoordinatorV25OptimismFundsRecoveredIterator{contract: _VRFCoordinatorV25Optimism.contract, event: "FundsRecovered", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) WatchFundsRecovered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismFundsRecovered) (event.Subscription, error) { + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.WatchLogs(opts, "FundsRecovered") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25OptimismFundsRecovered) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "FundsRecovered", 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 (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) ParseFundsRecovered(log types.Log) (*VRFCoordinatorV25OptimismFundsRecovered, error) { + event := new(VRFCoordinatorV25OptimismFundsRecovered) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "FundsRecovered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25OptimismL1FeeCalculationSetIterator struct { + Event *VRFCoordinatorV25OptimismL1FeeCalculationSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25OptimismL1FeeCalculationSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25OptimismL1FeeCalculationSet) + 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(VRFCoordinatorV25OptimismL1FeeCalculationSet) + 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 *VRFCoordinatorV25OptimismL1FeeCalculationSetIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25OptimismL1FeeCalculationSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25OptimismL1FeeCalculationSet struct { + Mode uint8 + Coefficient uint8 + Raw types.Log +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) FilterL1FeeCalculationSet(opts *bind.FilterOpts) (*VRFCoordinatorV25OptimismL1FeeCalculationSetIterator, error) { + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.FilterLogs(opts, "L1FeeCalculationSet") + if err != nil { + return nil, err + } + return &VRFCoordinatorV25OptimismL1FeeCalculationSetIterator{contract: _VRFCoordinatorV25Optimism.contract, event: "L1FeeCalculationSet", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) WatchL1FeeCalculationSet(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismL1FeeCalculationSet) (event.Subscription, error) { + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.WatchLogs(opts, "L1FeeCalculationSet") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25OptimismL1FeeCalculationSet) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "L1FeeCalculationSet", 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 (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) ParseL1FeeCalculationSet(log types.Log) (*VRFCoordinatorV25OptimismL1FeeCalculationSet, error) { + event := new(VRFCoordinatorV25OptimismL1FeeCalculationSet) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "L1FeeCalculationSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25OptimismL1GasFeeIterator struct { + Event *VRFCoordinatorV25OptimismL1GasFee + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25OptimismL1GasFeeIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25OptimismL1GasFee) + 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(VRFCoordinatorV25OptimismL1GasFee) + 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 *VRFCoordinatorV25OptimismL1GasFeeIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25OptimismL1GasFeeIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25OptimismL1GasFee struct { + Fee *big.Int + Raw types.Log +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) FilterL1GasFee(opts *bind.FilterOpts) (*VRFCoordinatorV25OptimismL1GasFeeIterator, error) { + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.FilterLogs(opts, "L1GasFee") + if err != nil { + return nil, err + } + return &VRFCoordinatorV25OptimismL1GasFeeIterator{contract: _VRFCoordinatorV25Optimism.contract, event: "L1GasFee", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) WatchL1GasFee(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismL1GasFee) (event.Subscription, error) { + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.WatchLogs(opts, "L1GasFee") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25OptimismL1GasFee) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "L1GasFee", 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 (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) ParseL1GasFee(log types.Log) (*VRFCoordinatorV25OptimismL1GasFee, error) { + event := new(VRFCoordinatorV25OptimismL1GasFee) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "L1GasFee", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25OptimismMigrationCompletedIterator struct { + Event *VRFCoordinatorV25OptimismMigrationCompleted + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25OptimismMigrationCompletedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25OptimismMigrationCompleted) + 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(VRFCoordinatorV25OptimismMigrationCompleted) + 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 *VRFCoordinatorV25OptimismMigrationCompletedIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25OptimismMigrationCompletedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25OptimismMigrationCompleted struct { + NewCoordinator common.Address + SubId *big.Int + Raw types.Log +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) FilterMigrationCompleted(opts *bind.FilterOpts) (*VRFCoordinatorV25OptimismMigrationCompletedIterator, error) { + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.FilterLogs(opts, "MigrationCompleted") + if err != nil { + return nil, err + } + return &VRFCoordinatorV25OptimismMigrationCompletedIterator{contract: _VRFCoordinatorV25Optimism.contract, event: "MigrationCompleted", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) WatchMigrationCompleted(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismMigrationCompleted) (event.Subscription, error) { + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.WatchLogs(opts, "MigrationCompleted") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25OptimismMigrationCompleted) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "MigrationCompleted", 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 (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) ParseMigrationCompleted(log types.Log) (*VRFCoordinatorV25OptimismMigrationCompleted, error) { + event := new(VRFCoordinatorV25OptimismMigrationCompleted) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "MigrationCompleted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25OptimismNativeFundsRecoveredIterator struct { + Event *VRFCoordinatorV25OptimismNativeFundsRecovered + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25OptimismNativeFundsRecoveredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25OptimismNativeFundsRecovered) + 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(VRFCoordinatorV25OptimismNativeFundsRecovered) + 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 *VRFCoordinatorV25OptimismNativeFundsRecoveredIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25OptimismNativeFundsRecoveredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25OptimismNativeFundsRecovered struct { + To common.Address + Amount *big.Int + Raw types.Log +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) FilterNativeFundsRecovered(opts *bind.FilterOpts) (*VRFCoordinatorV25OptimismNativeFundsRecoveredIterator, error) { + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.FilterLogs(opts, "NativeFundsRecovered") + if err != nil { + return nil, err + } + return &VRFCoordinatorV25OptimismNativeFundsRecoveredIterator{contract: _VRFCoordinatorV25Optimism.contract, event: "NativeFundsRecovered", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) WatchNativeFundsRecovered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismNativeFundsRecovered) (event.Subscription, error) { + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.WatchLogs(opts, "NativeFundsRecovered") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25OptimismNativeFundsRecovered) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "NativeFundsRecovered", 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 (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) ParseNativeFundsRecovered(log types.Log) (*VRFCoordinatorV25OptimismNativeFundsRecovered, error) { + event := new(VRFCoordinatorV25OptimismNativeFundsRecovered) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "NativeFundsRecovered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25OptimismOwnershipTransferRequestedIterator struct { + Event *VRFCoordinatorV25OptimismOwnershipTransferRequested + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25OptimismOwnershipTransferRequestedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25OptimismOwnershipTransferRequested) + 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(VRFCoordinatorV25OptimismOwnershipTransferRequested) + 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 *VRFCoordinatorV25OptimismOwnershipTransferRequestedIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25OptimismOwnershipTransferRequestedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25OptimismOwnershipTransferRequested struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFCoordinatorV25OptimismOwnershipTransferRequestedIterator, 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 := _VRFCoordinatorV25Optimism.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + if err != nil { + return nil, err + } + return &VRFCoordinatorV25OptimismOwnershipTransferRequestedIterator{contract: _VRFCoordinatorV25Optimism.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismOwnershipTransferRequested, 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 := _VRFCoordinatorV25Optimism.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(VRFCoordinatorV25OptimismOwnershipTransferRequested) + if err := _VRFCoordinatorV25Optimism.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 (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) ParseOwnershipTransferRequested(log types.Log) (*VRFCoordinatorV25OptimismOwnershipTransferRequested, error) { + event := new(VRFCoordinatorV25OptimismOwnershipTransferRequested) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25OptimismOwnershipTransferredIterator struct { + Event *VRFCoordinatorV25OptimismOwnershipTransferred + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25OptimismOwnershipTransferredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25OptimismOwnershipTransferred) + 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(VRFCoordinatorV25OptimismOwnershipTransferred) + 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 *VRFCoordinatorV25OptimismOwnershipTransferredIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25OptimismOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25OptimismOwnershipTransferred struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFCoordinatorV25OptimismOwnershipTransferredIterator, 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 := _VRFCoordinatorV25Optimism.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) + if err != nil { + return nil, err + } + return &VRFCoordinatorV25OptimismOwnershipTransferredIterator{contract: _VRFCoordinatorV25Optimism.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismOwnershipTransferred, 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 := _VRFCoordinatorV25Optimism.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(VRFCoordinatorV25OptimismOwnershipTransferred) + if err := _VRFCoordinatorV25Optimism.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 (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) ParseOwnershipTransferred(log types.Log) (*VRFCoordinatorV25OptimismOwnershipTransferred, error) { + event := new(VRFCoordinatorV25OptimismOwnershipTransferred) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25OptimismProvingKeyDeregisteredIterator struct { + Event *VRFCoordinatorV25OptimismProvingKeyDeregistered + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25OptimismProvingKeyDeregisteredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25OptimismProvingKeyDeregistered) + 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(VRFCoordinatorV25OptimismProvingKeyDeregistered) + 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 *VRFCoordinatorV25OptimismProvingKeyDeregisteredIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25OptimismProvingKeyDeregisteredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25OptimismProvingKeyDeregistered struct { + KeyHash [32]byte + MaxGas uint64 + Raw types.Log +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) FilterProvingKeyDeregistered(opts *bind.FilterOpts) (*VRFCoordinatorV25OptimismProvingKeyDeregisteredIterator, error) { + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.FilterLogs(opts, "ProvingKeyDeregistered") + if err != nil { + return nil, err + } + return &VRFCoordinatorV25OptimismProvingKeyDeregisteredIterator{contract: _VRFCoordinatorV25Optimism.contract, event: "ProvingKeyDeregistered", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) WatchProvingKeyDeregistered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismProvingKeyDeregistered) (event.Subscription, error) { + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.WatchLogs(opts, "ProvingKeyDeregistered") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25OptimismProvingKeyDeregistered) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "ProvingKeyDeregistered", 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 (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) ParseProvingKeyDeregistered(log types.Log) (*VRFCoordinatorV25OptimismProvingKeyDeregistered, error) { + event := new(VRFCoordinatorV25OptimismProvingKeyDeregistered) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "ProvingKeyDeregistered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25OptimismProvingKeyRegisteredIterator struct { + Event *VRFCoordinatorV25OptimismProvingKeyRegistered + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25OptimismProvingKeyRegisteredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25OptimismProvingKeyRegistered) + 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(VRFCoordinatorV25OptimismProvingKeyRegistered) + 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 *VRFCoordinatorV25OptimismProvingKeyRegisteredIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25OptimismProvingKeyRegisteredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25OptimismProvingKeyRegistered struct { + KeyHash [32]byte + MaxGas uint64 + Raw types.Log +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) FilterProvingKeyRegistered(opts *bind.FilterOpts) (*VRFCoordinatorV25OptimismProvingKeyRegisteredIterator, error) { + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.FilterLogs(opts, "ProvingKeyRegistered") + if err != nil { + return nil, err + } + return &VRFCoordinatorV25OptimismProvingKeyRegisteredIterator{contract: _VRFCoordinatorV25Optimism.contract, event: "ProvingKeyRegistered", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) WatchProvingKeyRegistered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismProvingKeyRegistered) (event.Subscription, error) { + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.WatchLogs(opts, "ProvingKeyRegistered") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25OptimismProvingKeyRegistered) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "ProvingKeyRegistered", 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 (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) ParseProvingKeyRegistered(log types.Log) (*VRFCoordinatorV25OptimismProvingKeyRegistered, error) { + event := new(VRFCoordinatorV25OptimismProvingKeyRegistered) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "ProvingKeyRegistered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25OptimismRandomWordsFulfilledIterator struct { + Event *VRFCoordinatorV25OptimismRandomWordsFulfilled + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25OptimismRandomWordsFulfilledIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25OptimismRandomWordsFulfilled) + 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(VRFCoordinatorV25OptimismRandomWordsFulfilled) + 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 *VRFCoordinatorV25OptimismRandomWordsFulfilledIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25OptimismRandomWordsFulfilledIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25OptimismRandomWordsFulfilled struct { + RequestId *big.Int + OutputSeed *big.Int + SubId *big.Int + Payment *big.Int + NativePayment bool + Success bool + OnlyPremium bool + Raw types.Log +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) FilterRandomWordsFulfilled(opts *bind.FilterOpts, requestId []*big.Int, subId []*big.Int) (*VRFCoordinatorV25OptimismRandomWordsFulfilledIterator, error) { + + var requestIdRule []interface{} + for _, requestIdItem := range requestId { + requestIdRule = append(requestIdRule, requestIdItem) + } + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.FilterLogs(opts, "RandomWordsFulfilled", requestIdRule, subIdRule) + if err != nil { + return nil, err + } + return &VRFCoordinatorV25OptimismRandomWordsFulfilledIterator{contract: _VRFCoordinatorV25Optimism.contract, event: "RandomWordsFulfilled", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) WatchRandomWordsFulfilled(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismRandomWordsFulfilled, requestId []*big.Int, subId []*big.Int) (event.Subscription, error) { + + var requestIdRule []interface{} + for _, requestIdItem := range requestId { + requestIdRule = append(requestIdRule, requestIdItem) + } + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.WatchLogs(opts, "RandomWordsFulfilled", requestIdRule, subIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25OptimismRandomWordsFulfilled) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "RandomWordsFulfilled", 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 (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) ParseRandomWordsFulfilled(log types.Log) (*VRFCoordinatorV25OptimismRandomWordsFulfilled, error) { + event := new(VRFCoordinatorV25OptimismRandomWordsFulfilled) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "RandomWordsFulfilled", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25OptimismRandomWordsRequestedIterator struct { + Event *VRFCoordinatorV25OptimismRandomWordsRequested + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25OptimismRandomWordsRequestedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25OptimismRandomWordsRequested) + 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(VRFCoordinatorV25OptimismRandomWordsRequested) + 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 *VRFCoordinatorV25OptimismRandomWordsRequestedIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25OptimismRandomWordsRequestedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25OptimismRandomWordsRequested struct { + KeyHash [32]byte + RequestId *big.Int + PreSeed *big.Int + SubId *big.Int + MinimumRequestConfirmations uint16 + CallbackGasLimit uint32 + NumWords uint32 + ExtraArgs []byte + Sender common.Address + Raw types.Log +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) FilterRandomWordsRequested(opts *bind.FilterOpts, keyHash [][32]byte, subId []*big.Int, sender []common.Address) (*VRFCoordinatorV25OptimismRandomWordsRequestedIterator, error) { + + var keyHashRule []interface{} + for _, keyHashItem := range keyHash { + keyHashRule = append(keyHashRule, keyHashItem) + } + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.FilterLogs(opts, "RandomWordsRequested", keyHashRule, subIdRule, senderRule) + if err != nil { + return nil, err + } + return &VRFCoordinatorV25OptimismRandomWordsRequestedIterator{contract: _VRFCoordinatorV25Optimism.contract, event: "RandomWordsRequested", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) WatchRandomWordsRequested(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismRandomWordsRequested, keyHash [][32]byte, subId []*big.Int, sender []common.Address) (event.Subscription, error) { + + var keyHashRule []interface{} + for _, keyHashItem := range keyHash { + keyHashRule = append(keyHashRule, keyHashItem) + } + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.WatchLogs(opts, "RandomWordsRequested", keyHashRule, subIdRule, senderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25OptimismRandomWordsRequested) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "RandomWordsRequested", 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 (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) ParseRandomWordsRequested(log types.Log) (*VRFCoordinatorV25OptimismRandomWordsRequested, error) { + event := new(VRFCoordinatorV25OptimismRandomWordsRequested) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "RandomWordsRequested", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25OptimismSubscriptionCanceledIterator struct { + Event *VRFCoordinatorV25OptimismSubscriptionCanceled + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25OptimismSubscriptionCanceledIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25OptimismSubscriptionCanceled) + 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(VRFCoordinatorV25OptimismSubscriptionCanceled) + 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 *VRFCoordinatorV25OptimismSubscriptionCanceledIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25OptimismSubscriptionCanceledIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25OptimismSubscriptionCanceled struct { + SubId *big.Int + To common.Address + AmountLink *big.Int + AmountNative *big.Int + Raw types.Log +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) FilterSubscriptionCanceled(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV25OptimismSubscriptionCanceledIterator, error) { + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.FilterLogs(opts, "SubscriptionCanceled", subIdRule) + if err != nil { + return nil, err + } + return &VRFCoordinatorV25OptimismSubscriptionCanceledIterator{contract: _VRFCoordinatorV25Optimism.contract, event: "SubscriptionCanceled", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) WatchSubscriptionCanceled(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismSubscriptionCanceled, subId []*big.Int) (event.Subscription, error) { + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.WatchLogs(opts, "SubscriptionCanceled", subIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25OptimismSubscriptionCanceled) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "SubscriptionCanceled", 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 (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) ParseSubscriptionCanceled(log types.Log) (*VRFCoordinatorV25OptimismSubscriptionCanceled, error) { + event := new(VRFCoordinatorV25OptimismSubscriptionCanceled) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "SubscriptionCanceled", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25OptimismSubscriptionConsumerAddedIterator struct { + Event *VRFCoordinatorV25OptimismSubscriptionConsumerAdded + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25OptimismSubscriptionConsumerAddedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25OptimismSubscriptionConsumerAdded) + 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(VRFCoordinatorV25OptimismSubscriptionConsumerAdded) + 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 *VRFCoordinatorV25OptimismSubscriptionConsumerAddedIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25OptimismSubscriptionConsumerAddedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25OptimismSubscriptionConsumerAdded struct { + SubId *big.Int + Consumer common.Address + Raw types.Log +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) FilterSubscriptionConsumerAdded(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV25OptimismSubscriptionConsumerAddedIterator, error) { + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.FilterLogs(opts, "SubscriptionConsumerAdded", subIdRule) + if err != nil { + return nil, err + } + return &VRFCoordinatorV25OptimismSubscriptionConsumerAddedIterator{contract: _VRFCoordinatorV25Optimism.contract, event: "SubscriptionConsumerAdded", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) WatchSubscriptionConsumerAdded(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismSubscriptionConsumerAdded, subId []*big.Int) (event.Subscription, error) { + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.WatchLogs(opts, "SubscriptionConsumerAdded", subIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25OptimismSubscriptionConsumerAdded) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "SubscriptionConsumerAdded", 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 (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) ParseSubscriptionConsumerAdded(log types.Log) (*VRFCoordinatorV25OptimismSubscriptionConsumerAdded, error) { + event := new(VRFCoordinatorV25OptimismSubscriptionConsumerAdded) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "SubscriptionConsumerAdded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25OptimismSubscriptionConsumerRemovedIterator struct { + Event *VRFCoordinatorV25OptimismSubscriptionConsumerRemoved + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25OptimismSubscriptionConsumerRemovedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25OptimismSubscriptionConsumerRemoved) + 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(VRFCoordinatorV25OptimismSubscriptionConsumerRemoved) + 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 *VRFCoordinatorV25OptimismSubscriptionConsumerRemovedIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25OptimismSubscriptionConsumerRemovedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25OptimismSubscriptionConsumerRemoved struct { + SubId *big.Int + Consumer common.Address + Raw types.Log +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) FilterSubscriptionConsumerRemoved(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV25OptimismSubscriptionConsumerRemovedIterator, error) { + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.FilterLogs(opts, "SubscriptionConsumerRemoved", subIdRule) + if err != nil { + return nil, err + } + return &VRFCoordinatorV25OptimismSubscriptionConsumerRemovedIterator{contract: _VRFCoordinatorV25Optimism.contract, event: "SubscriptionConsumerRemoved", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) WatchSubscriptionConsumerRemoved(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismSubscriptionConsumerRemoved, subId []*big.Int) (event.Subscription, error) { + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.WatchLogs(opts, "SubscriptionConsumerRemoved", subIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25OptimismSubscriptionConsumerRemoved) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "SubscriptionConsumerRemoved", 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 (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) ParseSubscriptionConsumerRemoved(log types.Log) (*VRFCoordinatorV25OptimismSubscriptionConsumerRemoved, error) { + event := new(VRFCoordinatorV25OptimismSubscriptionConsumerRemoved) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "SubscriptionConsumerRemoved", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25OptimismSubscriptionCreatedIterator struct { + Event *VRFCoordinatorV25OptimismSubscriptionCreated + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25OptimismSubscriptionCreatedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25OptimismSubscriptionCreated) + 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(VRFCoordinatorV25OptimismSubscriptionCreated) + 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 *VRFCoordinatorV25OptimismSubscriptionCreatedIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25OptimismSubscriptionCreatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25OptimismSubscriptionCreated struct { + SubId *big.Int + Owner common.Address + Raw types.Log +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) FilterSubscriptionCreated(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV25OptimismSubscriptionCreatedIterator, error) { + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.FilterLogs(opts, "SubscriptionCreated", subIdRule) + if err != nil { + return nil, err + } + return &VRFCoordinatorV25OptimismSubscriptionCreatedIterator{contract: _VRFCoordinatorV25Optimism.contract, event: "SubscriptionCreated", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) WatchSubscriptionCreated(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismSubscriptionCreated, subId []*big.Int) (event.Subscription, error) { + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.WatchLogs(opts, "SubscriptionCreated", subIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25OptimismSubscriptionCreated) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "SubscriptionCreated", 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 (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) ParseSubscriptionCreated(log types.Log) (*VRFCoordinatorV25OptimismSubscriptionCreated, error) { + event := new(VRFCoordinatorV25OptimismSubscriptionCreated) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "SubscriptionCreated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25OptimismSubscriptionFundedIterator struct { + Event *VRFCoordinatorV25OptimismSubscriptionFunded + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25OptimismSubscriptionFundedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25OptimismSubscriptionFunded) + 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(VRFCoordinatorV25OptimismSubscriptionFunded) + 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 *VRFCoordinatorV25OptimismSubscriptionFundedIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25OptimismSubscriptionFundedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25OptimismSubscriptionFunded struct { + SubId *big.Int + OldBalance *big.Int + NewBalance *big.Int + Raw types.Log +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) FilterSubscriptionFunded(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV25OptimismSubscriptionFundedIterator, error) { + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.FilterLogs(opts, "SubscriptionFunded", subIdRule) + if err != nil { + return nil, err + } + return &VRFCoordinatorV25OptimismSubscriptionFundedIterator{contract: _VRFCoordinatorV25Optimism.contract, event: "SubscriptionFunded", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) WatchSubscriptionFunded(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismSubscriptionFunded, subId []*big.Int) (event.Subscription, error) { + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.WatchLogs(opts, "SubscriptionFunded", subIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25OptimismSubscriptionFunded) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "SubscriptionFunded", 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 (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) ParseSubscriptionFunded(log types.Log) (*VRFCoordinatorV25OptimismSubscriptionFunded, error) { + event := new(VRFCoordinatorV25OptimismSubscriptionFunded) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "SubscriptionFunded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25OptimismSubscriptionFundedWithNativeIterator struct { + Event *VRFCoordinatorV25OptimismSubscriptionFundedWithNative + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25OptimismSubscriptionFundedWithNativeIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25OptimismSubscriptionFundedWithNative) + 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(VRFCoordinatorV25OptimismSubscriptionFundedWithNative) + 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 *VRFCoordinatorV25OptimismSubscriptionFundedWithNativeIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25OptimismSubscriptionFundedWithNativeIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25OptimismSubscriptionFundedWithNative struct { + SubId *big.Int + OldNativeBalance *big.Int + NewNativeBalance *big.Int + Raw types.Log +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) FilterSubscriptionFundedWithNative(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV25OptimismSubscriptionFundedWithNativeIterator, error) { + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.FilterLogs(opts, "SubscriptionFundedWithNative", subIdRule) + if err != nil { + return nil, err + } + return &VRFCoordinatorV25OptimismSubscriptionFundedWithNativeIterator{contract: _VRFCoordinatorV25Optimism.contract, event: "SubscriptionFundedWithNative", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) WatchSubscriptionFundedWithNative(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismSubscriptionFundedWithNative, subId []*big.Int) (event.Subscription, error) { + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.WatchLogs(opts, "SubscriptionFundedWithNative", subIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25OptimismSubscriptionFundedWithNative) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "SubscriptionFundedWithNative", 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 (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) ParseSubscriptionFundedWithNative(log types.Log) (*VRFCoordinatorV25OptimismSubscriptionFundedWithNative, error) { + event := new(VRFCoordinatorV25OptimismSubscriptionFundedWithNative) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "SubscriptionFundedWithNative", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25OptimismSubscriptionOwnerTransferRequestedIterator struct { + Event *VRFCoordinatorV25OptimismSubscriptionOwnerTransferRequested + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25OptimismSubscriptionOwnerTransferRequestedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25OptimismSubscriptionOwnerTransferRequested) + 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(VRFCoordinatorV25OptimismSubscriptionOwnerTransferRequested) + 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 *VRFCoordinatorV25OptimismSubscriptionOwnerTransferRequestedIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25OptimismSubscriptionOwnerTransferRequestedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25OptimismSubscriptionOwnerTransferRequested struct { + SubId *big.Int + From common.Address + To common.Address + Raw types.Log +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) FilterSubscriptionOwnerTransferRequested(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV25OptimismSubscriptionOwnerTransferRequestedIterator, error) { + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.FilterLogs(opts, "SubscriptionOwnerTransferRequested", subIdRule) + if err != nil { + return nil, err + } + return &VRFCoordinatorV25OptimismSubscriptionOwnerTransferRequestedIterator{contract: _VRFCoordinatorV25Optimism.contract, event: "SubscriptionOwnerTransferRequested", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) WatchSubscriptionOwnerTransferRequested(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismSubscriptionOwnerTransferRequested, subId []*big.Int) (event.Subscription, error) { + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.WatchLogs(opts, "SubscriptionOwnerTransferRequested", subIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25OptimismSubscriptionOwnerTransferRequested) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "SubscriptionOwnerTransferRequested", 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 (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) ParseSubscriptionOwnerTransferRequested(log types.Log) (*VRFCoordinatorV25OptimismSubscriptionOwnerTransferRequested, error) { + event := new(VRFCoordinatorV25OptimismSubscriptionOwnerTransferRequested) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "SubscriptionOwnerTransferRequested", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFCoordinatorV25OptimismSubscriptionOwnerTransferredIterator struct { + Event *VRFCoordinatorV25OptimismSubscriptionOwnerTransferred + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFCoordinatorV25OptimismSubscriptionOwnerTransferredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFCoordinatorV25OptimismSubscriptionOwnerTransferred) + 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(VRFCoordinatorV25OptimismSubscriptionOwnerTransferred) + 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 *VRFCoordinatorV25OptimismSubscriptionOwnerTransferredIterator) Error() error { + return it.fail +} + +func (it *VRFCoordinatorV25OptimismSubscriptionOwnerTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFCoordinatorV25OptimismSubscriptionOwnerTransferred struct { + SubId *big.Int + From common.Address + To common.Address + Raw types.Log +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) FilterSubscriptionOwnerTransferred(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV25OptimismSubscriptionOwnerTransferredIterator, error) { + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.FilterLogs(opts, "SubscriptionOwnerTransferred", subIdRule) + if err != nil { + return nil, err + } + return &VRFCoordinatorV25OptimismSubscriptionOwnerTransferredIterator{contract: _VRFCoordinatorV25Optimism.contract, event: "SubscriptionOwnerTransferred", logs: logs, sub: sub}, nil +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) WatchSubscriptionOwnerTransferred(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismSubscriptionOwnerTransferred, subId []*big.Int) (event.Subscription, error) { + + var subIdRule []interface{} + for _, subIdItem := range subId { + subIdRule = append(subIdRule, subIdItem) + } + + logs, sub, err := _VRFCoordinatorV25Optimism.contract.WatchLogs(opts, "SubscriptionOwnerTransferred", subIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFCoordinatorV25OptimismSubscriptionOwnerTransferred) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "SubscriptionOwnerTransferred", 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 (_VRFCoordinatorV25Optimism *VRFCoordinatorV25OptimismFilterer) ParseSubscriptionOwnerTransferred(log types.Log) (*VRFCoordinatorV25OptimismSubscriptionOwnerTransferred, error) { + event := new(VRFCoordinatorV25OptimismSubscriptionOwnerTransferred) + if err := _VRFCoordinatorV25Optimism.contract.UnpackLog(event, "SubscriptionOwnerTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type GetSubscription struct { + Balance *big.Int + NativeBalance *big.Int + ReqCount uint64 + SubOwner common.Address + Consumers []common.Address +} +type SConfig struct { + MinimumRequestConfirmations uint16 + MaxGasLimit uint32 + ReentrancyLock bool + StalenessSeconds uint32 + GasAfterPaymentCalculation uint32 + FulfillmentFlatFeeNativePPM uint32 + FulfillmentFlatFeeLinkDiscountPPM uint32 + NativePremiumPercentage uint8 + LinkPremiumPercentage uint8 +} +type SProvingKeys struct { + Exists bool + MaxGas uint64 +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25Optimism) ParseLog(log types.Log) (generated.AbigenLog, error) { + switch log.Topics[0] { + case _VRFCoordinatorV25Optimism.abi.Events["ConfigSet"].ID: + return _VRFCoordinatorV25Optimism.ParseConfigSet(log) + case _VRFCoordinatorV25Optimism.abi.Events["CoordinatorDeregistered"].ID: + return _VRFCoordinatorV25Optimism.ParseCoordinatorDeregistered(log) + case _VRFCoordinatorV25Optimism.abi.Events["CoordinatorRegistered"].ID: + return _VRFCoordinatorV25Optimism.ParseCoordinatorRegistered(log) + case _VRFCoordinatorV25Optimism.abi.Events["FallbackWeiPerUnitLinkUsed"].ID: + return _VRFCoordinatorV25Optimism.ParseFallbackWeiPerUnitLinkUsed(log) + case _VRFCoordinatorV25Optimism.abi.Events["FundsRecovered"].ID: + return _VRFCoordinatorV25Optimism.ParseFundsRecovered(log) + case _VRFCoordinatorV25Optimism.abi.Events["L1FeeCalculationSet"].ID: + return _VRFCoordinatorV25Optimism.ParseL1FeeCalculationSet(log) + case _VRFCoordinatorV25Optimism.abi.Events["L1GasFee"].ID: + return _VRFCoordinatorV25Optimism.ParseL1GasFee(log) + case _VRFCoordinatorV25Optimism.abi.Events["MigrationCompleted"].ID: + return _VRFCoordinatorV25Optimism.ParseMigrationCompleted(log) + case _VRFCoordinatorV25Optimism.abi.Events["NativeFundsRecovered"].ID: + return _VRFCoordinatorV25Optimism.ParseNativeFundsRecovered(log) + case _VRFCoordinatorV25Optimism.abi.Events["OwnershipTransferRequested"].ID: + return _VRFCoordinatorV25Optimism.ParseOwnershipTransferRequested(log) + case _VRFCoordinatorV25Optimism.abi.Events["OwnershipTransferred"].ID: + return _VRFCoordinatorV25Optimism.ParseOwnershipTransferred(log) + case _VRFCoordinatorV25Optimism.abi.Events["ProvingKeyDeregistered"].ID: + return _VRFCoordinatorV25Optimism.ParseProvingKeyDeregistered(log) + case _VRFCoordinatorV25Optimism.abi.Events["ProvingKeyRegistered"].ID: + return _VRFCoordinatorV25Optimism.ParseProvingKeyRegistered(log) + case _VRFCoordinatorV25Optimism.abi.Events["RandomWordsFulfilled"].ID: + return _VRFCoordinatorV25Optimism.ParseRandomWordsFulfilled(log) + case _VRFCoordinatorV25Optimism.abi.Events["RandomWordsRequested"].ID: + return _VRFCoordinatorV25Optimism.ParseRandomWordsRequested(log) + case _VRFCoordinatorV25Optimism.abi.Events["SubscriptionCanceled"].ID: + return _VRFCoordinatorV25Optimism.ParseSubscriptionCanceled(log) + case _VRFCoordinatorV25Optimism.abi.Events["SubscriptionConsumerAdded"].ID: + return _VRFCoordinatorV25Optimism.ParseSubscriptionConsumerAdded(log) + case _VRFCoordinatorV25Optimism.abi.Events["SubscriptionConsumerRemoved"].ID: + return _VRFCoordinatorV25Optimism.ParseSubscriptionConsumerRemoved(log) + case _VRFCoordinatorV25Optimism.abi.Events["SubscriptionCreated"].ID: + return _VRFCoordinatorV25Optimism.ParseSubscriptionCreated(log) + case _VRFCoordinatorV25Optimism.abi.Events["SubscriptionFunded"].ID: + return _VRFCoordinatorV25Optimism.ParseSubscriptionFunded(log) + case _VRFCoordinatorV25Optimism.abi.Events["SubscriptionFundedWithNative"].ID: + return _VRFCoordinatorV25Optimism.ParseSubscriptionFundedWithNative(log) + case _VRFCoordinatorV25Optimism.abi.Events["SubscriptionOwnerTransferRequested"].ID: + return _VRFCoordinatorV25Optimism.ParseSubscriptionOwnerTransferRequested(log) + case _VRFCoordinatorV25Optimism.abi.Events["SubscriptionOwnerTransferred"].ID: + return _VRFCoordinatorV25Optimism.ParseSubscriptionOwnerTransferred(log) + + default: + return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) + } +} + +func (VRFCoordinatorV25OptimismConfigSet) Topic() common.Hash { + return common.HexToHash("0x2c6b6b12413678366b05b145c5f00745bdd00e739131ab5de82484a50c9d78b6") +} + +func (VRFCoordinatorV25OptimismCoordinatorDeregistered) Topic() common.Hash { + return common.HexToHash("0xf80a1a97fd42251f3c33cda98635e7399253033a6774fe37cd3f650b5282af37") +} + +func (VRFCoordinatorV25OptimismCoordinatorRegistered) Topic() common.Hash { + return common.HexToHash("0xb7cabbfc11e66731fc77de0444614282023bcbd41d16781c753a431d0af01625") +} + +func (VRFCoordinatorV25OptimismFallbackWeiPerUnitLinkUsed) Topic() common.Hash { + return common.HexToHash("0x6ca648a381f22ead7e37773d934e64885dcf861fbfbb26c40354cbf0c4662d1a") +} + +func (VRFCoordinatorV25OptimismFundsRecovered) Topic() common.Hash { + return common.HexToHash("0x59bfc682b673f8cbf945f1e454df9334834abf7dfe7f92237ca29ecb9b436600") +} + +func (VRFCoordinatorV25OptimismL1FeeCalculationSet) Topic() common.Hash { + return common.HexToHash("0x8e63dc2f2e669ce73bebd2580bb9dd9a5d17fa2d046ac02057d8349fc0b0c2f3") +} + +func (VRFCoordinatorV25OptimismL1GasFee) Topic() common.Hash { + return common.HexToHash("0x56296f7beae05a0db815737fdb4cd298897b1e517614d62468081531ae14d099") +} + +func (VRFCoordinatorV25OptimismMigrationCompleted) Topic() common.Hash { + return common.HexToHash("0xd63ca8cb945956747ee69bfdc3ea754c24a4caf7418db70e46052f7850be4187") +} + +func (VRFCoordinatorV25OptimismNativeFundsRecovered) Topic() common.Hash { + return common.HexToHash("0x4aed7c8eed0496c8c19ea2681fcca25741c1602342e38b045d9f1e8e905d2e9c") +} + +func (VRFCoordinatorV25OptimismOwnershipTransferRequested) Topic() common.Hash { + return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") +} + +func (VRFCoordinatorV25OptimismOwnershipTransferred) Topic() common.Hash { + return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") +} + +func (VRFCoordinatorV25OptimismProvingKeyDeregistered) Topic() common.Hash { + return common.HexToHash("0x9b6868e0eb737bcd72205360baa6bfd0ba4e4819a33ade2db384e8a8025639a5") +} + +func (VRFCoordinatorV25OptimismProvingKeyRegistered) Topic() common.Hash { + return common.HexToHash("0x9b911b2c240bfbef3b6a8f7ed6ee321d1258bb2a3fe6becab52ac1cd3210afd3") +} + +func (VRFCoordinatorV25OptimismRandomWordsFulfilled) Topic() common.Hash { + return common.HexToHash("0xaeb4b4786571e184246d39587f659abf0e26f41f6a3358692250382c0cdb47b7") +} + +func (VRFCoordinatorV25OptimismRandomWordsRequested) Topic() common.Hash { + return common.HexToHash("0xeb0e3652e0f44f417695e6e90f2f42c99b65cd7169074c5a654b16b9748c3a4e") +} + +func (VRFCoordinatorV25OptimismSubscriptionCanceled) Topic() common.Hash { + return common.HexToHash("0x8c74ce8b8cf87f5eb001275c8be27eb34ea2b62bfab6814fcc62192bb63e81c4") +} + +func (VRFCoordinatorV25OptimismSubscriptionConsumerAdded) Topic() common.Hash { + return common.HexToHash("0x1e980d04aa7648e205713e5e8ea3808672ac163d10936d36f91b2c88ac1575e1") +} + +func (VRFCoordinatorV25OptimismSubscriptionConsumerRemoved) Topic() common.Hash { + return common.HexToHash("0x32158c6058347c1601b2d12bc696ac6901d8a9a9aa3ba10c27ab0a983e8425a7") +} + +func (VRFCoordinatorV25OptimismSubscriptionCreated) Topic() common.Hash { + return common.HexToHash("0x1d3015d7ba850fa198dc7b1a3f5d42779313a681035f77c8c03764c61005518d") +} + +func (VRFCoordinatorV25OptimismSubscriptionFunded) Topic() common.Hash { + return common.HexToHash("0x1ced9348ff549fceab2ac57cd3a9de38edaaab274b725ee82c23e8fc8c4eec7a") +} + +func (VRFCoordinatorV25OptimismSubscriptionFundedWithNative) Topic() common.Hash { + return common.HexToHash("0x7603b205d03651ee812f803fccde89f1012e545a9c99f0abfea9cedd0fd8e902") +} + +func (VRFCoordinatorV25OptimismSubscriptionOwnerTransferRequested) Topic() common.Hash { + return common.HexToHash("0x21a4dad170a6bf476c31bbcf4a16628295b0e450672eec25d7c93308e05344a1") +} + +func (VRFCoordinatorV25OptimismSubscriptionOwnerTransferred) Topic() common.Hash { + return common.HexToHash("0xd4114ab6e9af9f597c52041f32d62dc57c5c4e4c0d4427006069635e216c9386") +} + +func (_VRFCoordinatorV25Optimism *VRFCoordinatorV25Optimism) Address() common.Address { + return _VRFCoordinatorV25Optimism.address +} + +type VRFCoordinatorV25OptimismInterface interface { + BLOCKHASHSTORE(opts *bind.CallOpts) (common.Address, error) + + LINK(opts *bind.CallOpts) (common.Address, error) + + LINKNATIVEFEED(opts *bind.CallOpts) (common.Address, error) + + MAXCONSUMERS(opts *bind.CallOpts) (uint16, error) + + MAXNUMWORDS(opts *bind.CallOpts) (uint32, error) + + MAXREQUESTCONFIRMATIONS(opts *bind.CallOpts) (uint16, error) + + GetActiveSubscriptionIds(opts *bind.CallOpts, startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) + + GetSubscription(opts *bind.CallOpts, subId *big.Int) (GetSubscription, + + error) + + HashOfKey(opts *bind.CallOpts, publicKey [2]*big.Int) ([32]byte, error) + + Owner(opts *bind.CallOpts) (common.Address, error) + + PendingRequestExists(opts *bind.CallOpts, subId *big.Int) (bool, error) + + SConfig(opts *bind.CallOpts) (SConfig, + + error) + + SCurrentSubNonce(opts *bind.CallOpts) (uint64, error) + + SFallbackWeiPerUnitLink(opts *bind.CallOpts) (*big.Int, error) + + SL1FeeCalculationMode(opts *bind.CallOpts) (uint8, error) + + SL1FeeCoefficient(opts *bind.CallOpts) (uint8, error) + + SProvingKeyHashes(opts *bind.CallOpts, arg0 *big.Int) ([32]byte, error) + + SProvingKeys(opts *bind.CallOpts, arg0 [32]byte) (SProvingKeys, + + error) + + SRequestCommitments(opts *bind.CallOpts, arg0 *big.Int) ([32]byte, error) + + STotalBalance(opts *bind.CallOpts) (*big.Int, error) + + STotalNativeBalance(opts *bind.CallOpts) (*big.Int, error) + + AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) + + AcceptSubscriptionOwnerTransfer(opts *bind.TransactOpts, subId *big.Int) (*types.Transaction, error) + + AddConsumer(opts *bind.TransactOpts, subId *big.Int, consumer common.Address) (*types.Transaction, error) + + CancelSubscription(opts *bind.TransactOpts, subId *big.Int, to common.Address) (*types.Transaction, error) + + CreateSubscription(opts *bind.TransactOpts) (*types.Transaction, error) + + DeregisterMigratableCoordinator(opts *bind.TransactOpts, target common.Address) (*types.Transaction, error) + + DeregisterProvingKey(opts *bind.TransactOpts, publicProvingKey [2]*big.Int) (*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) + + Migrate(opts *bind.TransactOpts, subId *big.Int, newCoordinator common.Address) (*types.Transaction, error) + + OnTokenTransfer(opts *bind.TransactOpts, arg0 common.Address, amount *big.Int, data []byte) (*types.Transaction, error) + + OwnerCancelSubscription(opts *bind.TransactOpts, subId *big.Int) (*types.Transaction, error) + + RecoverFunds(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) + + RecoverNativeFunds(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) + + RegisterMigratableCoordinator(opts *bind.TransactOpts, target common.Address) (*types.Transaction, error) + + RegisterProvingKey(opts *bind.TransactOpts, publicProvingKey [2]*big.Int, maxGas uint64) (*types.Transaction, error) + + RemoveConsumer(opts *bind.TransactOpts, subId *big.Int, consumer common.Address) (*types.Transaction, error) + + RequestRandomWords(opts *bind.TransactOpts, req VRFV2PlusClientRandomWordsRequest) (*types.Transaction, error) + + RequestSubscriptionOwnerTransfer(opts *bind.TransactOpts, subId *big.Int, newOwner common.Address) (*types.Transaction, error) + + SetConfig(opts *bind.TransactOpts, minimumRequestConfirmations uint16, maxGasLimit uint32, stalenessSeconds uint32, gasAfterPaymentCalculation uint32, fallbackWeiPerUnitLink *big.Int, fulfillmentFlatFeeNativePPM uint32, fulfillmentFlatFeeLinkDiscountPPM uint32, nativePremiumPercentage uint8, linkPremiumPercentage uint8) (*types.Transaction, error) + + SetL1FeeCalculation(opts *bind.TransactOpts, mode uint8, coefficient uint8) (*types.Transaction, error) + + SetLINKAndLINKNativeFeed(opts *bind.TransactOpts, link common.Address, linkNativeFeed common.Address) (*types.Transaction, error) + + TransferOwnership(opts *bind.TransactOpts, to common.Address) (*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) (*VRFCoordinatorV25OptimismConfigSetIterator, error) + + WatchConfigSet(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismConfigSet) (event.Subscription, error) + + ParseConfigSet(log types.Log) (*VRFCoordinatorV25OptimismConfigSet, error) + + FilterCoordinatorDeregistered(opts *bind.FilterOpts) (*VRFCoordinatorV25OptimismCoordinatorDeregisteredIterator, error) + + WatchCoordinatorDeregistered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismCoordinatorDeregistered) (event.Subscription, error) + + ParseCoordinatorDeregistered(log types.Log) (*VRFCoordinatorV25OptimismCoordinatorDeregistered, error) + + FilterCoordinatorRegistered(opts *bind.FilterOpts) (*VRFCoordinatorV25OptimismCoordinatorRegisteredIterator, error) + + WatchCoordinatorRegistered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismCoordinatorRegistered) (event.Subscription, error) + + ParseCoordinatorRegistered(log types.Log) (*VRFCoordinatorV25OptimismCoordinatorRegistered, error) + + FilterFallbackWeiPerUnitLinkUsed(opts *bind.FilterOpts) (*VRFCoordinatorV25OptimismFallbackWeiPerUnitLinkUsedIterator, error) + + WatchFallbackWeiPerUnitLinkUsed(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismFallbackWeiPerUnitLinkUsed) (event.Subscription, error) + + ParseFallbackWeiPerUnitLinkUsed(log types.Log) (*VRFCoordinatorV25OptimismFallbackWeiPerUnitLinkUsed, error) + + FilterFundsRecovered(opts *bind.FilterOpts) (*VRFCoordinatorV25OptimismFundsRecoveredIterator, error) + + WatchFundsRecovered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismFundsRecovered) (event.Subscription, error) + + ParseFundsRecovered(log types.Log) (*VRFCoordinatorV25OptimismFundsRecovered, error) + + FilterL1FeeCalculationSet(opts *bind.FilterOpts) (*VRFCoordinatorV25OptimismL1FeeCalculationSetIterator, error) + + WatchL1FeeCalculationSet(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismL1FeeCalculationSet) (event.Subscription, error) + + ParseL1FeeCalculationSet(log types.Log) (*VRFCoordinatorV25OptimismL1FeeCalculationSet, error) + + FilterL1GasFee(opts *bind.FilterOpts) (*VRFCoordinatorV25OptimismL1GasFeeIterator, error) + + WatchL1GasFee(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismL1GasFee) (event.Subscription, error) + + ParseL1GasFee(log types.Log) (*VRFCoordinatorV25OptimismL1GasFee, error) + + FilterMigrationCompleted(opts *bind.FilterOpts) (*VRFCoordinatorV25OptimismMigrationCompletedIterator, error) + + WatchMigrationCompleted(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismMigrationCompleted) (event.Subscription, error) + + ParseMigrationCompleted(log types.Log) (*VRFCoordinatorV25OptimismMigrationCompleted, error) + + FilterNativeFundsRecovered(opts *bind.FilterOpts) (*VRFCoordinatorV25OptimismNativeFundsRecoveredIterator, error) + + WatchNativeFundsRecovered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismNativeFundsRecovered) (event.Subscription, error) + + ParseNativeFundsRecovered(log types.Log) (*VRFCoordinatorV25OptimismNativeFundsRecovered, error) + + FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFCoordinatorV25OptimismOwnershipTransferRequestedIterator, error) + + WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseOwnershipTransferRequested(log types.Log) (*VRFCoordinatorV25OptimismOwnershipTransferRequested, error) + + FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFCoordinatorV25OptimismOwnershipTransferredIterator, error) + + WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseOwnershipTransferred(log types.Log) (*VRFCoordinatorV25OptimismOwnershipTransferred, error) + + FilterProvingKeyDeregistered(opts *bind.FilterOpts) (*VRFCoordinatorV25OptimismProvingKeyDeregisteredIterator, error) + + WatchProvingKeyDeregistered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismProvingKeyDeregistered) (event.Subscription, error) + + ParseProvingKeyDeregistered(log types.Log) (*VRFCoordinatorV25OptimismProvingKeyDeregistered, error) + + FilterProvingKeyRegistered(opts *bind.FilterOpts) (*VRFCoordinatorV25OptimismProvingKeyRegisteredIterator, error) + + WatchProvingKeyRegistered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismProvingKeyRegistered) (event.Subscription, error) + + ParseProvingKeyRegistered(log types.Log) (*VRFCoordinatorV25OptimismProvingKeyRegistered, error) + + FilterRandomWordsFulfilled(opts *bind.FilterOpts, requestId []*big.Int, subId []*big.Int) (*VRFCoordinatorV25OptimismRandomWordsFulfilledIterator, error) + + WatchRandomWordsFulfilled(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismRandomWordsFulfilled, requestId []*big.Int, subId []*big.Int) (event.Subscription, error) + + ParseRandomWordsFulfilled(log types.Log) (*VRFCoordinatorV25OptimismRandomWordsFulfilled, error) + + FilterRandomWordsRequested(opts *bind.FilterOpts, keyHash [][32]byte, subId []*big.Int, sender []common.Address) (*VRFCoordinatorV25OptimismRandomWordsRequestedIterator, error) + + WatchRandomWordsRequested(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismRandomWordsRequested, keyHash [][32]byte, subId []*big.Int, sender []common.Address) (event.Subscription, error) + + ParseRandomWordsRequested(log types.Log) (*VRFCoordinatorV25OptimismRandomWordsRequested, error) + + FilterSubscriptionCanceled(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV25OptimismSubscriptionCanceledIterator, error) + + WatchSubscriptionCanceled(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismSubscriptionCanceled, subId []*big.Int) (event.Subscription, error) + + ParseSubscriptionCanceled(log types.Log) (*VRFCoordinatorV25OptimismSubscriptionCanceled, error) + + FilterSubscriptionConsumerAdded(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV25OptimismSubscriptionConsumerAddedIterator, error) + + WatchSubscriptionConsumerAdded(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismSubscriptionConsumerAdded, subId []*big.Int) (event.Subscription, error) + + ParseSubscriptionConsumerAdded(log types.Log) (*VRFCoordinatorV25OptimismSubscriptionConsumerAdded, error) + + FilterSubscriptionConsumerRemoved(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV25OptimismSubscriptionConsumerRemovedIterator, error) + + WatchSubscriptionConsumerRemoved(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismSubscriptionConsumerRemoved, subId []*big.Int) (event.Subscription, error) + + ParseSubscriptionConsumerRemoved(log types.Log) (*VRFCoordinatorV25OptimismSubscriptionConsumerRemoved, error) + + FilterSubscriptionCreated(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV25OptimismSubscriptionCreatedIterator, error) + + WatchSubscriptionCreated(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismSubscriptionCreated, subId []*big.Int) (event.Subscription, error) + + ParseSubscriptionCreated(log types.Log) (*VRFCoordinatorV25OptimismSubscriptionCreated, error) + + FilterSubscriptionFunded(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV25OptimismSubscriptionFundedIterator, error) + + WatchSubscriptionFunded(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismSubscriptionFunded, subId []*big.Int) (event.Subscription, error) + + ParseSubscriptionFunded(log types.Log) (*VRFCoordinatorV25OptimismSubscriptionFunded, error) + + FilterSubscriptionFundedWithNative(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV25OptimismSubscriptionFundedWithNativeIterator, error) + + WatchSubscriptionFundedWithNative(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismSubscriptionFundedWithNative, subId []*big.Int) (event.Subscription, error) + + ParseSubscriptionFundedWithNative(log types.Log) (*VRFCoordinatorV25OptimismSubscriptionFundedWithNative, error) + + FilterSubscriptionOwnerTransferRequested(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV25OptimismSubscriptionOwnerTransferRequestedIterator, error) + + WatchSubscriptionOwnerTransferRequested(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismSubscriptionOwnerTransferRequested, subId []*big.Int) (event.Subscription, error) + + ParseSubscriptionOwnerTransferRequested(log types.Log) (*VRFCoordinatorV25OptimismSubscriptionOwnerTransferRequested, error) + + FilterSubscriptionOwnerTransferred(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorV25OptimismSubscriptionOwnerTransferredIterator, error) + + WatchSubscriptionOwnerTransferred(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorV25OptimismSubscriptionOwnerTransferred, subId []*big.Int) (event.Subscription, error) + + ParseSubscriptionOwnerTransferred(log types.Log) (*VRFCoordinatorV25OptimismSubscriptionOwnerTransferred, error) + + ParseLog(log types.Log) (generated.AbigenLog, error) + + Address() common.Address +} diff --git a/core/gethwrappers/generated/vrf_owner/vrf_owner.go b/core/gethwrappers/generated/vrf_owner/vrf_owner.go index b029bd393f6..4b9e77ac864 100644 --- a/core/gethwrappers/generated/vrf_owner/vrf_owner.go +++ b/core/gethwrappers/generated/vrf_owner/vrf_owner.go @@ -64,7 +64,7 @@ type VRFTypesRequestCommitment struct { var VRFOwnerMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"EmptySendersList\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAllowedToSetSenders\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnauthorizedSender\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"senders\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"changedBy\",\"type\":\"address\"}],\"name\":\"AuthorizedSendersChanged\",\"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\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RandomWordsForced\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptVRFOwnership\",\"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\":\"structVRFTypes.Proof\",\"name\":\"proof\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"blockNum\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"numWords\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"internalType\":\"structVRFTypes.RequestCommitment\",\"name\":\"rc\",\"type\":\"tuple\"}],\"name\":\"fulfillRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAuthorizedSenders\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVRFCoordinator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"isAuthorizedSender\",\"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\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"}],\"name\":\"ownerCancelSubscription\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"recoverFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"},{\"internalType\":\"uint256[2]\",\"name\":\"publicProvingKey\",\"type\":\"uint256[2]\"}],\"name\":\"registerProvingKey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"senders\",\"type\":\"address[]\"}],\"name\":\"setAuthorizedSenders\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier1\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier2\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier3\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier4\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkPPMTier5\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"reqsForTier2\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"reqsForTier3\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"reqsForTier4\",\"type\":\"uint24\"},{\"internalType\":\"uint24\",\"name\":\"reqsForTier5\",\"type\":\"uint24\"}],\"internalType\":\"structFeeConfig\",\"name\":\"feeConfig\",\"type\":\"tuple\"}],\"name\":\"setConfig\",\"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\":\"transferVRFOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60806040523480156200001157600080fd5b5060405162002007380380620020078339810160408190526200003491620001fc565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be8162000150565b5050506001600160a01b0381166200012a5760405162461bcd60e51b815260206004820152602860248201527f76726620636f6f7264696e61746f722061646472657373206d757374206265206044820152676e6f6e2d7a65726f60c01b606482015260840162000082565b600580546001600160a01b0319166001600160a01b03929092169190911790556200022e565b6001600160a01b038116331415620001ab5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000602082840312156200020f57600080fd5b81516001600160a01b03811681146200022757600080fd5b9392505050565b611dc9806200023e6000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c8063984e804711610097578063e72f6e3011610066578063e72f6e30146101f9578063ee56997b1461020c578063f2fde38b1461021f578063fa00763a1461023257600080fd5b8063984e8047146101ad578063a378f371146101b5578063af198b97146101d3578063c2df03e4146101e657600080fd5b80634cb48a54116100d35780634cb48a54146101405780636f64f03f1461015357806379ba5097146101665780638da5cb5b1461016e57600080fd5b806302bcc5b6146100fa57806308821d581461010f5780632408afaa14610122575b600080fd5b61010d6101083660046118f6565b610255565b005b61010d61011d366004611591565b6102ee565b61012a61034c565b6040516101379190611a0a565b60405180910390f35b61010d61014e3660046116ed565b6103bb565b61010d6101613660046114e8565b61045d565b61010d6104f3565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610137565b61010d6105f5565b60055473ffffffffffffffffffffffffffffffffffffffff16610188565b61010d6101e13660046115c6565b610681565b61010d6101f43660046114cd565b610859565b61010d6102073660046114cd565b6108b9565b61010d61021a36600461151c565b610919565b61010d61022d3660046114cd565b610a8c565b6102456102403660046114cd565b610aa0565b6040519015158152602001610137565b61025d610ab3565b6005546040517f02bcc5b600000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8316600482015273ffffffffffffffffffffffffffffffffffffffff909116906302bcc5b6906024015b600060405180830381600087803b1580156102d357600080fd5b505af11580156102e7573d6000803e3d6000fd5b5050505050565b6102f6610ab3565b6005546040517f08821d5800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906308821d58906102b9908490600401611a64565b606060048054806020026020016040519081016040528092919081815260200182805480156103b157602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610386575b5050505050905090565b6103c3610ab3565b6005546040517f4cb48a5400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690634cb48a549061042390899089908990899089908990600401611b82565b600060405180830381600087803b15801561043d57600080fd5b505af1158015610451573d6000803e3d6000fd5b50505050505050505050565b610465610ab3565b6005546040517f6f64f03f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690636f64f03f906104bd9085908590600401611962565b600060405180830381600087803b1580156104d757600080fd5b505af11580156104eb573d6000803e3d6000fd5b505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610579576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6105fd610ab3565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166379ba50976040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561066757600080fd5b505af115801561067b573d6000803e3d6000fd5b50505050565b610689610b36565b600061069d83600001518460800151610b75565b905060006106a9610c7f565b805160208083015160408051610120810182526000808252938101849052908101839052606081018390526080810183905260a0810183905260c0810183905260e08101839052610100810183905293945061072b9390916001917f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff906103c3565b6005546040517faf198b9700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063af198b97906107839087908790600401611a85565b602060405180830381600087803b15801561079d57600080fd5b505af11580156107b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d59190611911565b506107fc816000015182602001518360400151846060015185608001518660a001516103c3565b826080015173ffffffffffffffffffffffffffffffffffffffff16836020015167ffffffffffffffff16837fabbcd646b939d78de3053d035798eb5c9818ea1836a2fbdbad335331df51e01d60405160405180910390a450505050565b610861610ab3565b6005546040517ff2fde38b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301529091169063f2fde38b906024016102b9565b6108c1610ab3565b6005546040517fe72f6e3000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301529091169063e72f6e30906024016102b9565b610921610fcb565b610957576040517fad77f06100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8061098e576040517f75158c3b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b6004548110156109ee576109db600482815481106109b1576109b1611d2b565b60009182526020909120015460029073ffffffffffffffffffffffffffffffffffffffff16611009565b50806109e681611c94565b915050610991565b5060005b81811015610a3f57610a2c838383818110610a0f57610a0f611d2b565b9050602002016020810190610a2491906114cd565b600290611032565b5080610a3781611c94565b9150506109f2565b50610a4c600483836112bb565b507ff263cfb3e4298332e776194610cf9fdc09ccb3ada8b9aa39764d882e11fbf0a0828233604051610a8093929190611992565b60405180910390a15050565b610a94610ab3565b610a9d81611054565b50565b6000610aad60028361114a565b92915050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610b34576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610570565b565b610b3f33610aa0565b610b34576040517f0809490800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005546040517fcaf70c4a000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff9091169063caf70c4a90610bd0908790600401611a77565b60206040518083038186803b158015610be857600080fd5b505afa158015610bfc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2091906115ad565b905060008184604051602001610c40929190918252602082015260400190565b604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0018152919052805160209091012095945050505050565b6040805160c080820183526000808352602080840182905283850182905260608085018390526080808601849052865161012081018852848152928301849052958201839052810182905293840181905260a080850182905291840181905260e08401819052610100840152810191909152600080600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c3f909d46040518163ffffffff1660e01b815260040160806040518083038186803b158015610d5f57600080fd5b505afa158015610d73573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d97919061168e565b93509350935093506000806000806000806000806000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635fbbc0d26040518163ffffffff1660e01b81526004016101206040518083038186803b158015610e1657600080fd5b505afa158015610e2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4e9190611832565b9850985098509850985098509850985098506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663356dac716040518163ffffffff1660e01b815260040160206040518083038186803b158015610eca57600080fd5b505afa158015610ede573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f0291906115ad565b90506040518060c001604052808f61ffff1681526020018e63ffffffff1681526020018d63ffffffff1681526020018c63ffffffff1681526020018281526020016040518061012001604052808d63ffffffff1681526020018c63ffffffff1681526020018b63ffffffff1681526020018a63ffffffff1681526020018963ffffffff1681526020018862ffffff1681526020018762ffffff1681526020018662ffffff1681526020018562ffffff168152508152509e50505050505050505050505050505090565b600033610fed60005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b600061102b8373ffffffffffffffffffffffffffffffffffffffff8416611179565b9392505050565b600061102b8373ffffffffffffffffffffffffffffffffffffffff841661126c565b73ffffffffffffffffffffffffffffffffffffffff81163314156110d4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610570565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600183016020526040812054151561102b565b6000818152600183016020526040812054801561126257600061119d600183611c7d565b85549091506000906111b190600190611c7d565b90508181146112165760008660000182815481106111d1576111d1611d2b565b90600052602060002001549050808760000184815481106111f4576111f4611d2b565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061122757611227611cfc565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610aad565b6000915050610aad565b60008181526001830160205260408120546112b357508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610aad565b506000610aad565b828054828255906000526020600020908101928215611333579160200282015b828111156113335781547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8435161782556020909201916001909101906112db565b5061133f929150611343565b5090565b5b8082111561133f5760008155600101611344565b803573ffffffffffffffffffffffffffffffffffffffff8116811461137c57600080fd5b919050565b8060408101831015610aad57600080fd5b600082601f8301126113a357600080fd5b6040516040810181811067ffffffffffffffff821117156113c6576113c6611d5a565b80604052508083856040860111156113dd57600080fd5b60005b60028110156113ff5781358352602092830192909101906001016113e0565b509195945050505050565b600060a0828403121561141c57600080fd5b60405160a0810181811067ffffffffffffffff8211171561143f5761143f611d5a565b60405290508061144e836114b5565b815261145c602084016114b5565b6020820152604083013561146f81611daa565b6040820152606083013561148281611daa565b606082015261149360808401611358565b60808201525092915050565b803561137c81611d99565b803561137c81611daa565b803567ffffffffffffffff8116811461137c57600080fd5b6000602082840312156114df57600080fd5b61102b82611358565b600080606083850312156114fb57600080fd5b61150483611358565b91506115138460208501611381565b90509250929050565b6000806020838503121561152f57600080fd5b823567ffffffffffffffff8082111561154757600080fd5b818501915085601f83011261155b57600080fd5b81358181111561156a57600080fd5b8660208260051b850101111561157f57600080fd5b60209290920196919550909350505050565b6000604082840312156115a357600080fd5b61102b8383611381565b6000602082840312156115bf57600080fd5b5051919050565b6000808284036102408112156115db57600080fd5b6101a0808212156115eb57600080fd5b6115f3611c53565b91506115ff8686611392565b825261160e8660408701611392565b60208301526080850135604083015260a0850135606083015260c0850135608083015261163d60e08601611358565b60a083015261010061165187828801611392565b60c0840152611664876101408801611392565b60e084015261018086013581840152508193506116838682870161140a565b925050509250929050565b600080600080608085870312156116a457600080fd5b84516116af81611d89565b60208601519094506116c081611daa565b60408601519093506116d181611daa565b60608601519092506116e281611daa565b939692955090935050565b6000806000806000808688036101c081121561170857600080fd5b873561171381611d89565b9650602088013561172381611daa565b9550604088013561173381611daa565b9450606088013561174381611daa565b9350608088013592506101207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60820181131561177e57600080fd5b611786611c53565b915061179460a08a016114aa565b82526117a260c08a016114aa565b60208301526117b360e08a016114aa565b60408301526101006117c6818b016114aa565b60608401526117d6828b016114aa565b60808401526117e86101408b0161149f565b60a08401526117fa6101608b0161149f565b60c084015261180c6101808b0161149f565b60e084015261181e6101a08b0161149f565b818401525050809150509295509295509295565b60008060008060008060008060006101208a8c03121561185157600080fd5b895161185c81611daa565b60208b015190995061186d81611daa565b60408b015190985061187e81611daa565b60608b015190975061188f81611daa565b60808b01519096506118a081611daa565b60a08b01519095506118b181611d99565b60c08b01519094506118c281611d99565b60e08b01519093506118d381611d99565b6101008b01519092506118e581611d99565b809150509295985092959850929598565b60006020828403121561190857600080fd5b61102b826114b5565b60006020828403121561192357600080fd5b81516bffffffffffffffffffffffff8116811461102b57600080fd5b8060005b600281101561067b578151845260209384019390910190600101611943565b73ffffffffffffffffffffffffffffffffffffffff83168152606081016040836020840137600081529392505050565b6040808252810183905260008460608301825b868110156119e05773ffffffffffffffffffffffffffffffffffffffff6119cb84611358565b168252602092830192909101906001016119a5565b50809250505073ffffffffffffffffffffffffffffffffffffffff83166020830152949350505050565b6020808252825182820181905260009190848201906040850190845b81811015611a5857835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101611a26565b50909695505050505050565b6040818101908383376000815292915050565b60408101610aad828461193f565b600061024082019050611a9982855161193f565b6020840151611aab604084018261193f565b5060408401516080830152606084015160a0830152608084015160c083015273ffffffffffffffffffffffffffffffffffffffff60a08501511660e083015260c0840151610100611afe8185018361193f565b60e08601519150611b1361014085018361193f565b85015161018084015250825167ffffffffffffffff9081166101a08401526020840151166101c0830152604083015163ffffffff9081166101e0840152606084015116610200830152608083015173ffffffffffffffffffffffffffffffffffffffff1661022083015261102b565b60006101c08201905061ffff8816825263ffffffff8088166020840152808716604084015280861660608401528460808401528084511660a08401528060208501511660c0840152506040830151611be260e084018263ffffffff169052565b506060830151610100611bfc8185018363ffffffff169052565b608085015163ffffffff1661012085015260a085015162ffffff90811661014086015260c0860151811661016086015260e086015181166101808601529401519093166101a0909201919091529695505050505050565b604051610120810167ffffffffffffffff81118282101715611c7757611c77611d5a565b60405290565b600082821015611c8f57611c8f611ccd565b500390565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611cc657611cc6611ccd565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61ffff81168114610a9d57600080fd5b62ffffff81168114610a9d57600080fd5b63ffffffff81168114610a9d57600080fdfea164736f6c6343000806000a", + Bin: "0x60806040523480156200001157600080fd5b5060405162001f6038038062001f608339810160408190526200003491620001fc565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be8162000150565b5050506001600160a01b0381166200012a5760405162461bcd60e51b815260206004820152602860248201527f76726620636f6f7264696e61746f722061646472657373206d757374206265206044820152676e6f6e2d7a65726f60c01b606482015260840162000082565b600580546001600160a01b0319166001600160a01b03929092169190911790556200022e565b6001600160a01b038116331415620001ab5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000602082840312156200020f57600080fd5b81516001600160a01b03811681146200022757600080fd5b9392505050565b611d22806200023e6000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c8063984e804711610097578063e72f6e3011610066578063e72f6e30146101f9578063ee56997b1461020c578063f2fde38b1461021f578063fa00763a1461023257600080fd5b8063984e8047146101ad578063a378f371146101b5578063af198b97146101d3578063c2df03e4146101e657600080fd5b80634cb48a54116100d35780634cb48a54146101405780636f64f03f1461015357806379ba5097146101665780638da5cb5b1461016e57600080fd5b806302bcc5b6146100fa57806308821d581461010f5780632408afaa14610122575b600080fd5b61010d610108366004611807565b610255565b005b61010d61011d3660046114a3565b6102ee565b61012a61034c565b6040516101379190611908565b60405180910390f35b61010d61014e3660046115fe565b6103bb565b61010d6101613660046113fa565b61045d565b61010d6104f3565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610137565b61010d6105f5565b60055473ffffffffffffffffffffffffffffffffffffffff16610188565b61010d6101e13660046114d8565b610681565b61010d6101f43660046113df565b610878565b61010d6102073660046113df565b6108d8565b61010d61021a36600461142e565b610938565b61010d61022d3660046113df565b610aab565b6102456102403660046113df565b610abf565b6040519015158152602001610137565b61025d610ad2565b6005546040517f02bcc5b600000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8316600482015273ffffffffffffffffffffffffffffffffffffffff909116906302bcc5b6906024015b600060405180830381600087803b1580156102d357600080fd5b505af11580156102e7573d6000803e3d6000fd5b5050505050565b6102f6610ad2565b6005546040517f08821d5800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906308821d58906102b9908490600401611962565b606060048054806020026020016040519081016040528092919081815260200182805480156103b157602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610386575b5050505050905090565b6103c3610ad2565b6005546040517f4cb48a5400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690634cb48a549061042390899089908990899089908990600401611a99565b600060405180830381600087803b15801561043d57600080fd5b505af1158015610451573d6000803e3d6000fd5b50505050505050505050565b610465610ad2565b6005546040517f6f64f03f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690636f64f03f906104bd9085908590600401611860565b600060405180830381600087803b1580156104d757600080fd5b505af11580156104eb573d6000803e3d6000fd5b505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610579576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6105fd610ad2565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166379ba50976040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561066757600080fd5b505af115801561067b573d6000803e3d6000fd5b50505050565b610689610b55565b6040805180820182526000916106bc919085906002908390839080828437600092019190915250505060c0850135610b94565b905060006106c8610c9e565b805160208083015160408051610120810182526000808252938101849052908101839052606081018390526080810183905260a0810183905260c0810183905260e08101839052610100810183905293945061074a9390916001917f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff906103c3565b6005546040517faf198b9700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063af198b97906107a290879087906004016119a6565b602060405180830381600087803b1580156107bc57600080fd5b505af11580156107d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f49190611822565b5061081b816000015182602001518360400151846060015185608001518660a001516103c3565b826080015173ffffffffffffffffffffffffffffffffffffffff16836020015167ffffffffffffffff16837fabbcd646b939d78de3053d035798eb5c9818ea1836a2fbdbad335331df51e01d60405160405180910390a450505050565b610880610ad2565b6005546040517ff2fde38b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301529091169063f2fde38b906024016102b9565b6108e0610ad2565b6005546040517fe72f6e3000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301529091169063e72f6e30906024016102b9565b610940610fea565b610976576040517fad77f06100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806109ad576040517f75158c3b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b600454811015610a0d576109fa600482815481106109d0576109d0611cb3565b60009182526020909120015460029073ffffffffffffffffffffffffffffffffffffffff16611028565b5080610a0581611c1c565b9150506109b0565b5060005b81811015610a5e57610a4b838383818110610a2e57610a2e611cb3565b9050602002016020810190610a4391906113df565b600290611051565b5080610a5681611c1c565b915050610a11565b50610a6b600483836112da565b507ff263cfb3e4298332e776194610cf9fdc09ccb3ada8b9aa39764d882e11fbf0a0828233604051610a9f93929190611890565b60405180910390a15050565b610ab3610ad2565b610abc81611073565b50565b6000610acc600283611169565b92915050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610b53576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610570565b565b610b5e33610abf565b610b53576040517f0809490800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005546040517fcaf70c4a000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff9091169063caf70c4a90610bef908790600401611975565b60206040518083038186803b158015610c0757600080fd5b505afa158015610c1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c3f91906114bf565b905060008184604051602001610c5f929190918252602082015260400190565b604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0018152919052805160209091012095945050505050565b6040805160c080820183526000808352602080840182905283850182905260608085018390526080808601849052865161012081018852848152928301849052958201839052810182905293840181905260a080850182905291840181905260e08401819052610100840152810191909152600080600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c3f909d46040518163ffffffff1660e01b815260040160806040518083038186803b158015610d7e57600080fd5b505afa158015610d92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610db6919061159f565b93509350935093506000806000806000806000806000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635fbbc0d26040518163ffffffff1660e01b81526004016101206040518083038186803b158015610e3557600080fd5b505afa158015610e49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6d9190611743565b9850985098509850985098509850985098506000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663356dac716040518163ffffffff1660e01b815260040160206040518083038186803b158015610ee957600080fd5b505afa158015610efd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2191906114bf565b90506040518060c001604052808f61ffff1681526020018e63ffffffff1681526020018d63ffffffff1681526020018c63ffffffff1681526020018281526020016040518061012001604052808d63ffffffff1681526020018c63ffffffff1681526020018b63ffffffff1681526020018a63ffffffff1681526020018963ffffffff1681526020018862ffffff1681526020018762ffffff1681526020018662ffffff1681526020018562ffffff168152508152509e50505050505050505050505050505090565b60003361100c60005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b600061104a8373ffffffffffffffffffffffffffffffffffffffff8416611198565b9392505050565b600061104a8373ffffffffffffffffffffffffffffffffffffffff841661128b565b73ffffffffffffffffffffffffffffffffffffffff81163314156110f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610570565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600183016020526040812054151561104a565b600081815260018301602052604081205480156112815760006111bc600183611c05565b85549091506000906111d090600190611c05565b90508181146112355760008660000182815481106111f0576111f0611cb3565b906000526020600020015490508087600001848154811061121357611213611cb3565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061124657611246611c84565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610acc565b6000915050610acc565b60008181526001830160205260408120546112d257508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610acc565b506000610acc565b828054828255906000526020600020908101928215611352579160200282015b828111156113525781547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8435161782556020909201916001909101906112fa565b5061135e929150611362565b5090565b5b8082111561135e5760008155600101611363565b803573ffffffffffffffffffffffffffffffffffffffff8116811461139b57600080fd5b919050565b8060408101831015610acc57600080fd5b803561139b81611cf2565b803561139b81611d03565b803567ffffffffffffffff8116811461139b57600080fd5b6000602082840312156113f157600080fd5b61104a82611377565b6000806060838503121561140d57600080fd5b61141683611377565b915061142584602085016113a0565b90509250929050565b6000806020838503121561144157600080fd5b823567ffffffffffffffff8082111561145957600080fd5b818501915085601f83011261146d57600080fd5b81358181111561147c57600080fd5b8660208260051b850101111561149157600080fd5b60209290920196919550909350505050565b6000604082840312156114b557600080fd5b61104a83836113a0565b6000602082840312156114d157600080fd5b5051919050565b6000808284036102408112156114ed57600080fd5b6101a0808212156114fd57600080fd5b84935060a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe608301121561153057600080fd5b611538611b6a565b91506115458186016113c7565b8252506115556101c085016113c7565b60208201526101e084013561156981611d03565b604082015261020084013561157d81611d03565b606082015261158f6102208501611377565b6080820152809150509250929050565b600080600080608085870312156115b557600080fd5b84516115c081611ce2565b60208601519094506115d181611d03565b60408601519093506115e281611d03565b60608601519092506115f381611d03565b939692955090935050565b6000806000806000808688036101c081121561161957600080fd5b873561162481611ce2565b9650602088013561163481611d03565b9550604088013561164481611d03565b9450606088013561165481611d03565b9350608088013592506101207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60820181131561168f57600080fd5b611697611bba565b91506116a560a08a016113bc565b82526116b360c08a016113bc565b60208301526116c460e08a016113bc565b60408301526101006116d7818b016113bc565b60608401526116e7828b016113bc565b60808401526116f96101408b016113b1565b60a084015261170b6101608b016113b1565b60c084015261171d6101808b016113b1565b60e084015261172f6101a08b016113b1565b818401525050809150509295509295509295565b60008060008060008060008060006101208a8c03121561176257600080fd5b895161176d81611d03565b60208b015190995061177e81611d03565b60408b015190985061178f81611d03565b60608b01519097506117a081611d03565b60808b01519096506117b181611d03565b60a08b01519095506117c281611cf2565b60c08b01519094506117d381611cf2565b60e08b01519093506117e481611cf2565b6101008b01519092506117f681611cf2565b809150509295985092959850929598565b60006020828403121561181957600080fd5b61104a826113c7565b60006020828403121561183457600080fd5b81516bffffffffffffffffffffffff8116811461104a57600080fd5b6040818337600060408301525050565b73ffffffffffffffffffffffffffffffffffffffff83168152606081016040836020840137600081529392505050565b6040808252810183905260008460608301825b868110156118de5773ffffffffffffffffffffffffffffffffffffffff6118c984611377565b168252602092830192909101906001016118a3565b50809250505073ffffffffffffffffffffffffffffffffffffffff83166020830152949350505050565b6020808252825182820181905260009190848201906040850190845b8181101561195657835173ffffffffffffffffffffffffffffffffffffffff1683529284019291840191600101611924565b50909695505050505050565b6040818101908383376000815292915050565b60408101818360005b600281101561199d57815183526020928301929091019060010161197e565b50505092915050565b61024081016040848337604082016000815260408086018237506080848101359083015260a0808501359083015260c0808501359083015273ffffffffffffffffffffffffffffffffffffffff6119ff60e08601611377565b1660e0830152610100611a16818401828701611850565b50610140611a28818401828701611850565b506101808481013590830152825167ffffffffffffffff9081166101a08401526020840151166101c0830152604083015163ffffffff9081166101e0840152606084015116610200830152608083015173ffffffffffffffffffffffffffffffffffffffff1661022083015261104a565b60006101c08201905061ffff8816825263ffffffff8088166020840152808716604084015280861660608401528460808401528084511660a08401528060208501511660c0840152506040830151611af960e084018263ffffffff169052565b506060830151610100611b138185018363ffffffff169052565b608085015163ffffffff1661012085015260a085015162ffffff90811661014086015260c0860151811661016086015260e086015181166101808601529401519093166101a0909201919091529695505050505050565b60405160a0810167ffffffffffffffff81118282101715611bb4577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405290565b604051610120810167ffffffffffffffff81118282101715611bb4577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082821015611c1757611c17611c55565b500390565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611c4e57611c4e611c55565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b61ffff81168114610abc57600080fd5b62ffffff81168114610abc57600080fd5b63ffffffff81168114610abc57600080fdfea164736f6c6343000806000a", } var VRFOwnerABI = VRFOwnerMetaData.ABI 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 f7c5f3cfa93..44728a0277b 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 @@ -62,7 +62,7 @@ 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\":[{\"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\":\"uint256\",\"name\":\"transferredValue\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"expectedValue\",\"type\":\"uint96\"}],\"name\":\"InvalidNativeBalance\",\"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\":[{\"internalType\":\"uint8\",\"name\":\"requestVersion\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"expectedVersion\",\"type\":\"uint8\"}],\"name\":\"InvalidVersion\",\"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\":\"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\":\"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\":\"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\":\"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\":[{\"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\":[],\"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]\"},{\"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: "0x60a06040523480156200001157600080fd5b506040516200614c3803806200614c83398101604081905262000034916200017e565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be81620000d3565b5050506001600160a01b0316608052620001b0565b336001600160a01b038216036200012d5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000602082840312156200019157600080fd5b81516001600160a01b0381168114620001a957600080fd5b9392505050565b608051615f79620001d36000396000818161052e01526133610152615f796000f3fe6080604052600436106101f65760003560e01c8062012291146101fb578063043bd6ae14610228578063088070f51461024c5780630ae095401461031a57806315c48b841461033c57806318e3dd27146103645780631b6b6d23146103a3578063294daa49146103d05780632f622e6b146103ec578063301f42e91461040c578063405b84fa1461042c57806340d6bb821461044c57806341af6c871461047757806351cff8d9146104a75780635d06b4ab146104c757806364d51a2a146104e757806365982744146104fc578063689c45171461051c57806372e9d5651461055057806379ba5097146105705780637a5a2aef146105855780638402595e146105a557806386fe91c7146105c55780638da5cb5b146105e557806395b55cfc146106035780639b1c385e146106165780639d40a6fd14610636578063a21a23e414610663578063a4c0ed3614610678578063a63e0bfb14610698578063aa433aff146106b8578063aefb212f146106d8578063b2a7cac514610705578063bec4c08c14610725578063caf70c4a14610745578063cb63179714610765578063ce3f471914610785578063d98e620e14610798578063da2f2610146107b8578063dac83d2914610817578063dc311dd314610837578063e72f6e3014610868578063ee9d2d3814610888578063f2fde38b146108b5575b600080fd5b34801561020757600080fd5b506102106108d5565b60405161021f93929190614ef8565b60405180910390f35b34801561023457600080fd5b5061023e60105481565b60405190815260200161021f565b34801561025857600080fd5b50600c546102bd9061ffff81169063ffffffff62010000820481169160ff600160301b8204811692600160381b8304811692600160581b8104821692600160781b8204831692600160981b83041691600160b81b8104821691600160c01b9091041689565b6040805161ffff909a168a5263ffffffff98891660208b01529615159689019690965293861660608801529185166080870152841660a08601529290921660c084015260ff91821660e0840152166101008201526101200161021f565b34801561032657600080fd5b5061033a610335366004614f77565b610951565b005b34801561034857600080fd5b5061035160c881565b60405161ffff909116815260200161021f565b34801561037057600080fd5b50600a5461038b90600160601b90046001600160601b031681565b6040516001600160601b03909116815260200161021f565b3480156103af57600080fd5b506002546103c3906001600160a01b031681565b60405161021f9190614fa7565b3480156103dc57600080fd5b506040516002815260200161021f565b3480156103f857600080fd5b5061033a610407366004614fbb565b610999565b34801561041857600080fd5b5061038b61042736600461520a565b610ae8565b34801561043857600080fd5b5061033a610447366004614f77565b610e02565b34801561045857600080fd5b506104626101f481565b60405163ffffffff909116815260200161021f565b34801561048357600080fd5b506104976104923660046152f8565b6111a5565b604051901515815260200161021f565b3480156104b357600080fd5b5061033a6104c2366004614fbb565b611259565b3480156104d357600080fd5b5061033a6104e2366004614fbb565b6113db565b3480156104f357600080fd5b50610351606481565b34801561050857600080fd5b5061033a610517366004615311565b611492565b34801561052857600080fd5b506103c37f000000000000000000000000000000000000000000000000000000000000000081565b34801561055c57600080fd5b506003546103c3906001600160a01b031681565b34801561057c57600080fd5b5061033a6114f2565b34801561059157600080fd5b5061033a6105a036600461533f565b61159c565b3480156105b157600080fd5b5061033a6105c0366004614fbb565b6116d8565b3480156105d157600080fd5b50600a5461038b906001600160601b031681565b3480156105f157600080fd5b506000546001600160a01b03166103c3565b61033a6106113660046152f8565b6117e4565b34801561062257600080fd5b5061023e610631366004615379565b611905565b34801561064257600080fd5b50600754610656906001600160401b031681565b60405161021f91906153b3565b34801561066f57600080fd5b5061023e611cbf565b34801561068457600080fd5b5061033a61069336600461540f565b611e92565b3480156106a457600080fd5b5061033a6106b336600461548d565b61200c565b3480156106c457600080fd5b5061033a6106d33660046152f8565b6122ae565b3480156106e457600080fd5b506106f86106f336600461552e565b6122f6565b60405161021f919061558b565b34801561071157600080fd5b5061033a6107203660046152f8565b6123f8565b34801561073157600080fd5b5061033a610740366004614f77565b6124ed565b34801561075157600080fd5b5061023e61076036600461559e565b6125df565b34801561077157600080fd5b5061033a610780366004614f77565b61260f565b61033a6107933660046155ba565b612871565b3480156107a457600080fd5b5061023e6107b33660046152f8565b612bd8565b3480156107c457600080fd5b506107f86107d33660046152f8565b600d6020526000908152604090205460ff81169061010090046001600160401b031682565b6040805192151583526001600160401b0390911660208301520161021f565b34801561082357600080fd5b5061033a610832366004614f77565b612bf9565b34801561084357600080fd5b506108576108523660046152f8565b612c8f565b60405161021f959493929190615634565b34801561087457600080fd5b5061033a610883366004614fbb565b612d7d565b34801561089457600080fd5b5061023e6108a33660046152f8565b600f6020526000908152604090205481565b3480156108c157600080fd5b5061033a6108d0366004614fbb565b612f3a565b600c54600e805460408051602080840282018101909252828152600094859460609461ffff8316946201000090930463ffffffff1693919283919083018282801561093f57602002820191906000526020600020905b81548152602001906001019080831161092b575b50505050509050925092509250909192565b8161095b81612f4e565b610963612faf565b61096c836111a5565b1561098a57604051631685ecdd60e31b815260040160405180910390fd5b6109948383612fdc565b505050565b6109a1612faf565b6109a9613181565b600b54600160601b90046001600160601b03166000036109dc57604051631e9acf1760e31b815260040160405180910390fd5b600b8054600160601b90046001600160601b0316908190600c6109ff838061569f565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555080600a600c8282829054906101000a90046001600160601b0316610a47919061569f565b92506101000a8154816001600160601b0302191690836001600160601b031602179055506000826001600160a01b0316826001600160601b031660405160006040518083038185875af1925050503d8060008114610ac1576040519150601f19603f3d011682016040523d82523d6000602084013e610ac6565b606091505b50509050806109945760405163950b247960e01b815260040160405180910390fd5b6000610af2612faf565b60005a9050610324361115610b2957604051630f28961b60e01b815236600482015261032460248201526044015b60405180910390fd5b6000610b3586866131d4565b90506000610b4b8583600001516020015161346b565b60408301516060888101519293509163ffffffff16806001600160401b03811115610b7857610b78614fd8565b604051908082528060200260200182016040528015610ba1578160200160208202803683370190505b50925060005b81811015610c08578281604051602001610bc29291906156bf565b6040516020818303038152906040528051906020012060001c848281518110610bed57610bed6156cd565b6020908102919091010152610c01816156e3565b9050610ba7565b5050602080850180516000908152600f9092526040822082905551610c2e908a856134b9565b60208a8101516000908152600690915260409020805491925090601890610c6490600160c01b90046001600160401b03166156fc565b82546101009290920a6001600160401b0381810219909316918316021790915560808a01516001600160a01b03166000908152600460209081526040808320828e01518452909152902080549091600991610cc791600160481b9091041661572a565b91906101000a8154816001600160401b0302191690836001600160401b0316021790555060008960a0015160018b60a0015151610d04919061574d565b81518110610d1457610d146156cd565b60209101015160f81c60011490506000610d308887848d613554565b90995090508015610d7b577f6ca648a381f22ead7e37773d934e64885dcf861fbfbb26c40354cbf0c4662d1a8760200151601054604051610d729291906156bf565b60405180910390a15b50610d8b88828c6020015161358c565b6020808b015187820151604080518781526001600160601b038d16948101949094528415159084015284151560608401528b1515608084015290917faeb4b4786571e184246d39587f659abf0e26f41f6a3358692250382c0cdb47b79060a00160405180910390a3505050505050505b9392505050565b610e0a612faf565b610e13816136df565b610e325780604051635428d44960e01b8152600401610b209190614fa7565b600080600080610e4186612c8f565b945094505093509350336001600160a01b0316826001600160a01b031614610ea45760405162461bcd60e51b81526020600482015260166024820152752737ba1039bab139b1b934b83a34b7b71037bbb732b960511b6044820152606401610b20565b610ead866111a5565b15610ef35760405162461bcd60e51b815260206004820152601660248201527550656e64696e6720726571756573742065786973747360501b6044820152606401610b20565b6040805160c0810182526001815260208082018990526001600160a01b03851682840152606082018490526001600160601b038088166080840152861660a083015291519091600091610f4891849101615760565b6040516020818303038152906040529050610f628861374a565b505060405163ce3f471960e01b81526001600160a01b0388169063ce3f4719906001600160601b03881690610f9b908590600401615825565b6000604051808303818588803b158015610fb457600080fd5b505af1158015610fc8573d6000803e3d6000fd5b50506002546001600160a01b031615801593509150610ff1905057506001600160601b03861615155b156110ac5760025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb90611028908a908a90600401615838565b6020604051808303816000875af1158015611047573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106b919061585a565b6110ac5760405162461bcd60e51b8152602060048201526012602482015271696e73756666696369656e742066756e647360701b6044820152606401610b20565b600c805460ff60301b1916600160301b17905560005b8351811015611153578381815181106110dd576110dd6156cd565b60200260200101516001600160a01b0316638ea98117896040518263ffffffff1660e01b81526004016111109190614fa7565b600060405180830381600087803b15801561112a57600080fd5b505af115801561113e573d6000803e3d6000fd5b505050508061114c906156e3565b90506110c2565b50600c805460ff60301b191690556040517fd63ca8cb945956747ee69bfdc3ea754c24a4caf7418db70e46052f7850be4187906111939089908b90615877565b60405180910390a15050505050505050565b600081815260056020526040812060020180548083036111c9575060009392505050565b60005b8181101561124e576000600460008584815481106111ec576111ec6156cd565b60009182526020808320909101546001600160a01b0316835282810193909352604091820181208982529092529020546001600160401b03600160481b90910416111561123e57506001949350505050565b611247816156e3565b90506111cc565b506000949350505050565b611261612faf565b611269613181565b6002546001600160a01b03166112925760405163c1f0c0a160e01b815260040160405180910390fd5b600b546001600160601b03166000036112be57604051631e9acf1760e31b815260040160405180910390fd5b600b80546001600160601b031690819060006112da838061569f565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555080600a60008282829054906101000a90046001600160601b0316611322919061569f565b82546001600160601b039182166101009390930a92830291909202199091161790555060025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb906113779085908590600401615838565b6020604051808303816000875af1158015611396573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113ba919061585a565b6113d757604051631e9acf1760e31b815260040160405180910390fd5b5050565b6113e3613181565b6113ec816136df565b1561140c578060405163ac8a27ef60e01b8152600401610b209190614fa7565b601180546001810182556000919091527f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c680180546001600160a01b0319166001600160a01b0383161790556040517fb7cabbfc11e66731fc77de0444614282023bcbd41d16781c753a431d0af0162590611487908390614fa7565b60405180910390a150565b61149a613181565b6002546001600160a01b0316156114c457604051631688c53760e11b815260040160405180910390fd5b600280546001600160a01b039384166001600160a01b03199182161790915560038054929093169116179055565b6001546001600160a01b031633146115455760405162461bcd60e51b815260206004820152601660248201527526bab9ba10313290383937b837b9b2b21037bbb732b960511b6044820152606401610b20565b60008054336001600160a01b0319808316821784556001805490911690556040516001600160a01b0390921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6115a4613181565b6040805180820182526000916115d39190859060029083908390808284376000920191909152506125df915050565b6000818152600d602052604090205490915060ff161561160957604051634a0b8fa760e01b815260048101829052602401610b20565b60408051808201825260018082526001600160401b0385811660208085019182526000878152600d9091528581209451855492516001600160481b0319909316901515610100600160481b03191617610100929093169190910291909117909255600e805491820181559091527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd01829055517f9b911b2c240bfbef3b6a8f7ed6ee321d1258bb2a3fe6becab52ac1cd3210afd3906116cb9083908590615890565b60405180910390a1505050565b6116e0613181565b600a544790600160601b90046001600160601b03168181111561171a5780826040516354ced18160e11b8152600401610b209291906156bf565b8181101561099457600061172e828461574d565b90506000846001600160a01b03168260405160006040518083038185875af1925050503d806000811461177d576040519150601f19603f3d011682016040523d82523d6000602084013e611782565b606091505b50509050806117a45760405163950b247960e01b815260040160405180910390fd5b7f4aed7c8eed0496c8c19ea2681fcca25741c1602342e38b045d9f1e8e905d2e9c85836040516117d5929190615877565b60405180910390a15050505050565b6117ec612faf565b6000818152600560205260409020546001600160a01b031661182157604051630fb532db60e11b815260040160405180910390fd5b60008181526006602052604090208054600160601b90046001600160601b0316903490600c61185083856158a7565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555034600a600c8282829054906101000a90046001600160601b031661189891906158a7565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550817f7603b205d03651ee812f803fccde89f1012e545a9c99f0abfea9cedd0fd8e9028234846118eb91906158c7565b6040516118f99291906156bf565b60405180910390a25050565b600061190f612faf565b602080830135600081815260059092526040909120546001600160a01b031661194b57604051630fb532db60e11b815260040160405180910390fd5b336000908152600460209081526040808320848452808352928190208151606081018352905460ff811615158083526001600160401b036101008304811695840195909552600160481b90910490931691810191909152906119c45782336040516379bfd40160e01b8152600401610b209291906158da565b600c5461ffff166119db60608701604088016158f1565b61ffff1610806119fe575060c86119f860608701604088016158f1565b61ffff16115b15611a3857611a1360608601604087016158f1565b600c5460405163539c34bb60e11b8152610b20929161ffff169060c89060040161590c565b600c5462010000900463ffffffff16611a57608087016060880161592a565b63ffffffff161115611a9d57611a73608086016060870161592a565b600c54604051637aebf00f60e11b8152610b20929162010000900463ffffffff1690600401615945565b6101f4611ab060a087016080880161592a565b63ffffffff161115611aea57611acc60a086016080870161592a565b6101f46040516311ce1afb60e21b8152600401610b20929190615945565b806020018051611af9906156fc565b6001600160401b03169052604081018051611b13906156fc565b6001600160401b031690526020810151600090611b3690873590339087906138f2565b90955090506000611b5a611b55611b5060a08a018a61595c565b61397b565b6139fc565b905085611b65613a6d565b86611b7660808b0160608c0161592a565b611b8660a08c0160808d0161592a565b3386604051602001611b9e97969594939291906159a2565b60405160208183030381529060405280519060200120600f600088815260200190815260200160002081905550336001600160a01b03168588600001357feb0e3652e0f44f417695e6e90f2f42c99b65cd7169074c5a654b16b9748c3a4e89868c6040016020810190611c1191906158f1565b8d6060016020810190611c24919061592a565b8e6080016020810190611c37919061592a565b89604051611c4a969594939291906159fb565b60405180910390a4505060009283526020918252604092839020815181549383015192909401516001600160481b0319909316931515610100600160481b031916939093176101006001600160401b039283160217600160481b600160881b031916600160481b91909216021790555b919050565b6000611cc9612faf565b6007546001600160401b031633611ce160014361574d565b6040516001600160601b0319606093841b81166020830152914060348201523090921b1660548201526001600160c01b031960c083901b16606882015260700160408051601f1981840301815291905280516020909101209150611d46816001615a3a565b600780546001600160401b0319166001600160401b03928316179055604080516000808252608082018352602080830182815283850183815260608086018581528a86526006855287862093518454935191516001600160601b039182166001600160c01b031990951694909417600160601b9190921602176001600160c01b0316600160c01b9290981691909102969096179055835194850184523385528481018281528585018481528884526005835294909220855181546001600160a01b03199081166001600160a01b039283161783559351600183018054909516911617909255925180519294939192611e449260028501920190614e06565b50611e5491506008905084613aee565b50827f1d3015d7ba850fa198dc7b1a3f5d42779313a681035f77c8c03764c61005518d33604051611e859190614fa7565b60405180910390a2505090565b611e9a612faf565b6002546001600160a01b03163314611ec5576040516344b0e3c360e01b815260040160405180910390fd5b60208114611ee657604051638129bbcd60e01b815260040160405180910390fd5b6000611ef4828401846152f8565b6000818152600560205260409020549091506001600160a01b0316611f2c57604051630fb532db60e11b815260040160405180910390fd5b600081815260066020526040812080546001600160601b031691869190611f5383856158a7565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555084600a60008282829054906101000a90046001600160601b0316611f9b91906158a7565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550817f1ced9348ff549fceab2ac57cd3a9de38edaaab274b725ee82c23e8fc8c4eec7a828784611fee91906158c7565b604051611ffc9291906156bf565b60405180910390a2505050505050565b612014613181565b60c861ffff8a16111561204157888960c860405163539c34bb60e11b8152600401610b209392919061590c565b60008513612065576040516321ea67b360e11b815260048101869052602401610b20565b8363ffffffff168363ffffffff1611156120965782846040516313c06e5960e11b8152600401610b20929190615945565b609b60ff831611156120c05781609b604051631d66288d60e11b8152600401610b20929190615a5a565b609b60ff821611156120ea5780609b604051631d66288d60e11b8152600401610b20929190615a5a565b604080516101208101825261ffff8b1680825263ffffffff808c16602084018190526000848601528b8216606085018190528b8316608086018190528a841660a08701819052938a1660c0870181905260ff808b1660e08901819052908a16610100909801889052600c8054600160c01b90990260ff60c01b19600160b81b9093029290921661ffff60b81b19600160981b90940263ffffffff60981b19600160781b90990298909816600160781b600160b81b0319600160581b90960263ffffffff60581b19600160381b90980297909716600160301b600160781b03196201000090990265ffffffffffff19909c16909a179a909a1796909616979097179390931791909116959095179290921793909316929092179190911790556010869055517f2c6b6b12413678366b05b145c5f00745bdd00e739131ab5de82484a50c9d78b69061229b908b908b908b908b908b908b908b908b908b9061ffff99909916895263ffffffff97881660208a0152958716604089015293861660608801526080870192909252841660a086015290921660c084015260ff91821660e0840152166101008201526101200190565b60405180910390a1505050505050505050565b6122b6613181565b6000818152600560205260409020546001600160a01b0316806122ec57604051630fb532db60e11b815260040160405180910390fd5b6113d78282612fdc565b606060006123046008613afa565b905080841061232657604051631390f2a160e01b815260040160405180910390fd5b600061233284866158c7565b905081811180612340575083155b61234a578061234c565b815b9050600061235a868361574d565b9050806001600160401b0381111561237457612374614fd8565b60405190808252806020026020018201604052801561239d578160200160208202803683370190505b50935060005b818110156123ed576123c06123b888836158c7565b600890613b04565b8582815181106123d2576123d26156cd565b60209081029190910101526123e6816156e3565b90506123a3565b505050505b92915050565b612400612faf565b6000818152600560205260409020546001600160a01b03168061243657604051630fb532db60e11b815260040160405180910390fd5b6000828152600560205260409020600101546001600160a01b0316331461248d576000828152600560205260409081902060010154905163d084e97560e01b8152610b20916001600160a01b031690600401614fa7565b600082815260056020526040908190208054336001600160a01b031991821681178355600190920180549091169055905183917fd4114ab6e9af9f597c52041f32d62dc57c5c4e4c0d4427006069635e216c9386916118f9918591615a6e565b816124f781612f4e565b6124ff612faf565b6001600160a01b03821660009081526004602090815260408083208684529091529020805460ff16156125325750505050565b6000848152600560205260409020600201805460631901612566576040516305a48e0f60e01b815260040160405180910390fd5b8154600160ff1990911681178355815490810182556000828152602090200180546001600160a01b0319166001600160a01b03861617905560405185907f1e980d04aa7648e205713e5e8ea3808672ac163d10936d36f91b2c88ac1575e1906125d0908790614fa7565b60405180910390a25050505050565b6000816040516020016125f29190615aab565b604051602081830303815290604052805190602001209050919050565b8161261981612f4e565b612621612faf565b61262a836111a5565b1561264857604051631685ecdd60e31b815260040160405180910390fd5b6001600160a01b038216600090815260046020908152604080832086845290915290205460ff166126905782826040516379bfd40160e01b8152600401610b209291906158da565b6000838152600560209081526040808320600201805482518185028101850190935280835291929091908301828280156126f357602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116126d5575b5050505050905060006001825161270a919061574d565b905060005b825181101561281357846001600160a01b0316838281518110612734576127346156cd565b60200260200101516001600160a01b03160361280357600083838151811061275e5761275e6156cd565b6020026020010151905080600560008981526020019081526020016000206002018381548110612790576127906156cd565b600091825260208083209190910180546001600160a01b0319166001600160a01b0394909416939093179092558881526005909152604090206002018054806127db576127db615ab9565b600082815260209020810160001990810180546001600160a01b031916905501905550612813565b61280c816156e3565b905061270f565b506001600160a01b038416600090815260046020908152604080832088845290915290819020805460ff191690555185907f32158c6058347c1601b2d12bc696ac6901d8a9a9aa3ba10c27ab0a983e8425a7906125d0908790614fa7565b600061287f82840184615ae6565b9050806000015160ff166001146128af57805160405163237d181f60e21b8152610b209190600190600401615a5a565b8060a001516001600160601b031634146128f35760a08101516040516306acf13560e41b81523460048201526001600160601b039091166024820152604401610b20565b6020808201516000908152600590915260409020546001600160a01b03161561292f576040516326afa43560e11b815260040160405180910390fd5b60005b816060015151811015612a2857604051806060016040528060011515815260200160006001600160401b0316815260200160006001600160401b0316815250600460008460600151848151811061298b5761298b6156cd565b6020908102919091018101516001600160a01b0316825281810192909252604090810160009081208684015182528352819020835181549385015194909201516001600160481b0319909316911515610100600160481b031916919091176101006001600160401b039485160217600160481b600160881b031916600160481b939092169290920217905580612a20816156e3565b915050612932565b50604080516060808201835260808401516001600160601b03908116835260a0850151811660208085019182526000858701818152828901805183526006845288832097518854955192516001600160401b0316600160c01b026001600160c01b03938816600160601b026001600160c01b0319909716919097161794909417169390931790945584518084018652868601516001600160a01b03908116825281860184815294880151828801908152925184526005865295909220825181549087166001600160a01b0319918216178255935160018201805491909716941693909317909455925180519192612b2792600285019290910190614e06565b5050506080810151600a8054600090612b4a9084906001600160601b03166158a7565b92506101000a8154816001600160601b0302191690836001600160601b031602179055508060a00151600a600c8282829054906101000a90046001600160601b0316612b9691906158a7565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550612bd281602001516008613aee90919063ffffffff16565b50505050565b600e8181548110612be857600080fd5b600091825260209091200154905081565b81612c0381612f4e565b612c0b612faf565b600083815260056020526040902060018101546001600160a01b03848116911614612bd2576001810180546001600160a01b0319166001600160a01b03851617905560405184907f21a4dad170a6bf476c31bbcf4a16628295b0e450672eec25d7c93308e05344a190612c819033908790615a6e565b60405180910390a250505050565b600081815260056020526040812054819081906001600160a01b0316606081612ccb57604051630fb532db60e11b815260040160405180910390fd5b600086815260066020908152604080832054600583529281902060020180548251818502810185019093528083526001600160601b0380861695600160601b810490911694600160c01b9091046001600160401b0316938893929091839190830182828015612d6357602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612d45575b505050505090509450945094509450945091939590929450565b612d85613181565b6002546001600160a01b0316612dae5760405163c1f0c0a160e01b815260040160405180910390fd5b6002546040516370a0823160e01b81526000916001600160a01b0316906370a0823190612ddf903090600401614fa7565b602060405180830381865afa158015612dfc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e209190615c11565b600a549091506001600160601b031681811115612e545780826040516354ced18160e11b8152600401610b209291906156bf565b81811015610994576000612e68828461574d565b60025460405163a9059cbb60e01b81529192506001600160a01b03169063a9059cbb90612e9b9087908590600401615877565b6020604051808303816000875af1158015612eba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ede919061585a565b612efb57604051631f01ff1360e21b815260040160405180910390fd5b7f59bfc682b673f8cbf945f1e454df9334834abf7dfe7f92237ca29ecb9b4366008482604051612f2c929190615877565b60405180910390a150505050565b612f42613181565b612f4b81613b10565b50565b6000818152600560205260409020546001600160a01b031680612f8457604051630fb532db60e11b815260040160405180910390fd5b336001600160a01b038216146113d75780604051636c51fda960e11b8152600401610b209190614fa7565b600c54600160301b900460ff1615612fda5760405163769dd35360e11b815260040160405180910390fd5b565b600080612fe88461374a565b60025491935091506001600160a01b03161580159061300f57506001600160601b03821615155b156130af5760025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb9061304f9086906001600160601b03871690600401615877565b6020604051808303816000875af115801561306e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613092919061585a565b6130af57604051631e9acf1760e31b815260040160405180910390fd5b6000836001600160a01b0316826001600160601b031660405160006040518083038185875af1925050503d8060008114613105576040519150601f19603f3d011682016040523d82523d6000602084013e61310a565b606091505b505090508061312c5760405163950b247960e01b815260040160405180910390fd5b604080516001600160a01b03861681526001600160601b03808616602083015284169181019190915285907f8c74ce8b8cf87f5eb001275c8be27eb34ea2b62bfab6814fcc62192bb63e81c4906060016125d0565b6000546001600160a01b03163314612fda5760405162461bcd60e51b815260206004820152601660248201527527b7363c9031b0b63630b1363290313c9037bbb732b960511b6044820152606401610b20565b6040805160a0810182526000606082018181526080830182905282526020820181905291810191909152600061320d84600001516125df565b6000818152600d602090815260409182902082518084019093525460ff811615158084526101009091046001600160401b0316918301919091529192509061326b57604051631dfd6e1360e21b815260048101839052602401610b20565b60008286608001516040516020016132849291906156bf565b60408051601f1981840301815291815281516020928301206000818152600f90935290822054909250908190036132ce57604051631b44092560e11b815260040160405180910390fd5b85516020808801516040808a015160608b015160808c015160a08d015193516132fd978a979096959101615c2a565b6040516020818303038152906040528051906020012081146133325760405163354a450b60e21b815260040160405180910390fd5b60006133418760000151613bb3565b9050806133f9578651604051631d2827a760e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163e9413d389161339591906004016153b3565b602060405180830381865afa1580156133b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133d69190615c11565b9050806133f957865160405163175dadad60e01b8152610b2091906004016153b3565b600088608001518260405160200161341b929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c905060006134428a83613c81565b604080516060810182529788526020880196909652948601949094525092979650505050505050565b6000816001600160401b03163a11156134b157821561349457506001600160401b0381166123f2565b3a8260405163435e532d60e11b8152600401610b20929190615890565b503a92915050565b6000806000631fe543e360e01b86856040516024016134d9929190615c7e565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252600c805460ff60301b1916600160301b17905590860151608087015191925061353d9163ffffffff9091169083613cec565b600c805460ff60301b191690559695505050505050565b600080831561357357613568868685613d38565b600091509150613583565b61357e868685613e49565b915091505b94509492505050565b6000818152600660205260409020821561364b5780546001600160601b03600160601b90910481169085168110156135d757604051631e9acf1760e31b815260040160405180910390fd5b6135e1858261569f565b8254600160601b600160c01b031916600160601b6001600160601b039283168102919091178455600b805488939192600c926136219286929004166158a7565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555050612bd2565b80546001600160601b0390811690851681101561367b57604051631e9acf1760e31b815260040160405180910390fd5b613685858261569f565b82546001600160601b0319166001600160601b03918216178355600b805487926000916136b4918591166158a7565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505050505050565b601154600090815b8181101561374057836001600160a01b03166011828154811061370c5761370c6156cd565b6000918252602090912001546001600160a01b031603613730575060019392505050565b613739816156e3565b90506136e7565b5060009392505050565b60008181526005602090815260408083206006909252822054600290910180546001600160601b0380841694600160601b90940416925b818110156137ec576004600084838154811061379f5761379f6156cd565b60009182526020808320909101546001600160a01b031683528281019390935260409182018120898252909252902080546001600160881b03191690556137e5816156e3565b9050613781565b50600085815260056020526040812080546001600160a01b031990811682556001820180549091169055906138246002830182614e6b565b505060008581526006602052604081205561384060088661403a565b506001600160601b0384161561389357600a805485919060009061386e9084906001600160601b031661569f565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b6001600160601b038316156138eb5782600a600c8282829054906101000a90046001600160601b03166138c6919061569f565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b5050915091565b60408051602081018690526001600160a01b03851691810191909152606081018390526001600160401b03821660808201526000908190819060a00160408051601f1981840301815290829052805160209182012092506139579189918491016156bf565b60408051808303601f19018152919052805160209091012097909650945050505050565b60408051602081019091526000815260008290036139a857506040805160208101909152600081526123f2565b63125fa26760e31b6139ba8385615c9f565b6001600160e01b031916146139e257604051632923fee760e11b815260040160405180910390fd5b6139ef8260048186615ccf565b810190610dfb9190615cf9565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa82604051602401613a3591511515815260200190565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915292915050565b600046613a7981614046565b15613ae75760646001600160a01b031663a3b1b31d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613abd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ae19190615c11565b91505090565b4391505090565b6000610dfb8383614069565b60006123f2825490565b6000610dfb83836140b8565b336001600160a01b03821603613b625760405162461bcd60e51b815260206004820152601760248201527621b0b73737ba103a3930b739b332b9103a379039b2b63360491b6044820152606401610b20565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600046613bbf81614046565b15613c7257610100836001600160401b0316613bd9613a6d565b613be3919061574d565b1180613bff5750613bf2613a6d565b836001600160401b031610155b15613c0d5750600092915050565b6040516315a03d4160e11b8152606490632b407a8290613c319086906004016153b3565b602060405180830381865afa158015613c4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dfb9190615c11565b50506001600160401b03164090565b6000613cb58360000151846020015185604001518660600151868860a001518960c001518a60e001518b61010001516140e2565b60038360200151604051602001613ccd929190615d44565b60408051601f1981840301815291905280516020909101209392505050565b60005a611388811015613cfe57600080fd5b611388810390508460408204820311613d1657600080fd5b50823b613d2257600080fd5b60008083516020850160008789f1949350505050565b600080613d7b6000368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506142fd92505050565b905060005a600c54613d9b908890600160581b900463ffffffff166158c7565b613da5919061574d565b613daf9086615d58565b600c54909150600090613dd490600160781b900463ffffffff1664e8d4a51000615d58565b90508415613e2057600c548190606490600160b81b900460ff16613df885876158c7565b613e029190615d58565b613e0c9190615d85565b613e1691906158c7565b9350505050610dfb565b600c548190606490613e3c90600160b81b900460ff1682615d99565b60ff16613df885876158c7565b600080600080613e576143d0565b9150915060008213613e7f576040516321ea67b360e11b815260048101839052602401610b20565b6000613ec16000368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506142fd92505050565b9050600083825a600c54613ee3908d90600160581b900463ffffffff166158c7565b613eed919061574d565b613ef7908b615d58565b613f0191906158c7565b613f1390670de0b6b3a7640000615d58565b613f1d9190615d85565b600c54909150600090613f469063ffffffff600160981b8204811691600160781b900416615db2565b613f5b9063ffffffff1664e8d4a51000615d58565b9050600085613f7283670de0b6b3a7640000615d58565b613f7c9190615d85565b905060008915613fbd57600c548290606490613fa290600160c01b900460ff1687615d58565b613fac9190615d85565b613fb691906158c7565b9050613ffd565b600c548290606490613fd990600160c01b900460ff1682615d99565b613fe69060ff1687615d58565b613ff09190615d85565b613ffa91906158c7565b90505b676765c793fa10079d601b1b8111156140295760405163e80fa38160e01b815260040160405180910390fd5b9b949a509398505050505050505050565b6000610dfb8383614497565b600061a4b182148061405a575062066eed82145b806123f257505062066eee1490565b60008181526001830160205260408120546140b0575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556123f2565b5060006123f2565b60008260000182815481106140cf576140cf6156cd565b9060005260206000200154905092915050565b6140eb89614591565b6141345760405162461bcd60e51b815260206004820152601a6024820152797075626c6963206b6579206973206e6f74206f6e20637572766560301b6044820152606401610b20565b61413d88614591565b6141815760405162461bcd60e51b815260206004820152601560248201527467616d6d61206973206e6f74206f6e20637572766560581b6044820152606401610b20565b61418a83614591565b6141d65760405162461bcd60e51b815260206004820152601d60248201527f6347616d6d615769746e657373206973206e6f74206f6e2063757276650000006044820152606401610b20565b6141df82614591565b61422a5760405162461bcd60e51b815260206004820152601c60248201527b73486173685769746e657373206973206e6f74206f6e20637572766560201b6044820152606401610b20565b614236878a8887614654565b61427e5760405162461bcd60e51b81526020600482015260196024820152786164647228632a706b2b732a6729213d5f755769746e65737360381b6044820152606401610b20565b600061428a8a87614768565b9050600061429d898b878b8689896147cc565b905060006142ae838d8d8a866148eb565b9050808a146142ef5760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b210383937b7b360991b6044820152606401610b20565b505050505050505050505050565b60004661430981614046565b1561434d57606c6001600160a01b031663c6f7de0e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613c4e573d6000803e3d6000fd5b6143568161492b565b156143c757600f602160991b016001600160a01b03166349948e0e84604051806080016040528060488152602001615f256048913960405160200161439c929190615dcf565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401613c319190615825565b50600092915050565b600c5460035460408051633fabe5a360e21b815290516000938493600160381b90910463ffffffff169284926001600160a01b039092169163feaf968c9160048082019260a0929091908290030181865afa158015614433573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144579190615e15565b50919650909250505063ffffffff821615801590614483575061447a814261574d565b8263ffffffff16105b925082156144915760105493505b50509091565b600081815260018301602052604081205480156145805760006144bb60018361574d565b85549091506000906144cf9060019061574d565b90508181146145345760008660000182815481106144ef576144ef6156cd565b9060005260206000200154905080876000018481548110614512576145126156cd565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061454557614545615ab9565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506123f2565b60009150506123f2565b5092915050565b80516000906401000003d019116145df5760405162461bcd60e51b8152602060048201526012602482015271696e76616c696420782d6f7264696e61746560701b6044820152606401610b20565b60208201516401000003d0191161462d5760405162461bcd60e51b8152602060048201526012602482015271696e76616c696420792d6f7264696e61746560701b6044820152606401610b20565b60208201516401000003d01990800961464d8360005b6020020151614972565b1492915050565b60006001600160a01b03821661469a5760405162461bcd60e51b815260206004820152600b60248201526a626164207769746e65737360a81b6044820152606401610b20565b6020840151600090600116156146b157601c6146b4565b601b5b9050600070014551231950b75fc4402da1732fc9bebe1985876000602002015109865170014551231950b75fc4402da1732fc9bebe199182039250600091908909875160408051600080825260209091019182905292935060019161471e91869188918790615e65565b6020604051602081039080840390855afa158015614740573d6000803e3d6000fd5b5050604051601f1901516001600160a01b039081169088161495505050505050949350505050565b614770614e89565b61479d6001848460405160200161478993929190615e83565b604051602081830303815290604052614996565b90505b6147a981614591565b6123f25780516040805160208101929092526147c59101614789565b90506147a0565b6147d4614e89565b825186516401000003d01991829006919006036148335760405162461bcd60e51b815260206004820152601e60248201527f706f696e747320696e2073756d206d7573742062652064697374696e637400006044820152606401610b20565b61483e8789886149e3565b6148835760405162461bcd60e51b8152602060048201526016602482015275119a5c9cdd081b5d5b0818da1958dac819985a5b195960521b6044820152606401610b20565b61488e8486856149e3565b6148d45760405162461bcd60e51b815260206004820152601760248201527614d958dbdb99081b5d5b0818da1958dac819985a5b1959604a1b6044820152606401610b20565b6148df868484614b01565b98975050505050505050565b60006002868686858760405160200161490996959493929190615ea4565b60408051601f1981840301815291905280516020909101209695505050505050565b6000600a82148061493d57506101a482145b8061494a575062aa37dc82145b80614956575061210582145b80614963575062014a3382145b806123f257505062014a341490565b6000806401000003d01980848509840990506401000003d019600782089392505050565b61499e614e89565b6149a782614bc4565b81526149bc6149b7826000614643565b614bff565b6020820181905260029006600103611cba576020810180516401000003d019039052919050565b600082600003614a235760405162461bcd60e51b815260206004820152600b60248201526a3d32b9379039b1b0b630b960a91b6044820152606401610b20565b83516020850151600090614a3990600290615efe565b15614a4557601c614a48565b601b5b9050600070014551231950b75fc4402da1732fc9bebe19838709604080516000808252602090910191829052919250600190614a8b908390869088908790615e65565b6020604051602081039080840390855afa158015614aad573d6000803e3d6000fd5b505050602060405103519050600086604051602001614acc9190615f12565b60408051601f1981840301815291905280516020909101206001600160a01b0392831692169190911498975050505050505050565b614b09614e89565b835160208086015185519186015160009384938493614b2a93909190614c1f565b919450925090506401000003d019858209600114614b865760405162461bcd60e51b815260206004820152601960248201527834b73b2d1036bab9ba1031329034b73b32b939b29037b3103d60391b6044820152606401610b20565b60405180604001604052806401000003d01980614ba557614ba5615d6f565b87860981526020016401000003d0198785099052979650505050505050565b805160208201205b6401000003d0198110611cba57604080516020808201939093528151808203840181529082019091528051910120614bcc565b60006123f2826002614c186401000003d01960016158c7565b901c614cff565b60008080600180826401000003d019896401000003d019038808905060006401000003d0198b6401000003d019038a0890506000614c5f83838585614d99565b9098509050614c7088828e88614dbd565b9098509050614c8188828c87614dbd565b90985090506000614c948d878b85614dbd565b9098509050614ca588828686614d99565b9098509050614cb688828e89614dbd565b9098509050818114614ceb576401000003d019818a0998506401000003d01982890997506401000003d0198183099650614cef565b8196505b5050505050509450945094915050565b600080614d0a614ea7565b6020808252818101819052604082015260608101859052608081018490526401000003d01960a0820152614d3c614ec5565b60208160c0846005600019fa925082600003614d8f5760405162461bcd60e51b81526020600482015260126024820152716269674d6f64457870206661696c7572652160701b6044820152606401610b20565b5195945050505050565b6000806401000003d0198487096401000003d0198487099097909650945050505050565b600080806401000003d019878509905060006401000003d01987876401000003d019030990506401000003d0198183086401000003d01986890990999098509650505050505050565b828054828255906000526020600020908101928215614e5b579160200282015b82811115614e5b57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190614e26565b50614e67929150614ee3565b5090565b5080546000825590600052602060002090810190612f4b9190614ee3565b60405180604001604052806002906020820280368337509192915050565b6040518060c001604052806006906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b5b80821115614e675760008155600101614ee4565b60006060820161ffff86168352602063ffffffff86168185015260606040850152818551808452608086019150828701935060005b81811015614f4957845183529383019391830191600101614f2d565b509098975050505050505050565b6001600160a01b0381168114612f4b57600080fd5b8035611cba81614f57565b60008060408385031215614f8a57600080fd5b823591506020830135614f9c81614f57565b809150509250929050565b6001600160a01b0391909116815260200190565b600060208284031215614fcd57600080fd5b8135610dfb81614f57565b634e487b7160e01b600052604160045260246000fd5b60405160c081016001600160401b038111828210171561501057615010614fd8565b60405290565b60405161012081016001600160401b038111828210171561501057615010614fd8565b604051601f8201601f191681016001600160401b038111828210171561506157615061614fd8565b604052919050565b600082601f83011261507a57600080fd5b604080519081016001600160401b038111828210171561509c5761509c614fd8565b80604052508060408401858111156150b357600080fd5b845b818110156150cd5780358352602092830192016150b5565b509195945050505050565b80356001600160401b0381168114611cba57600080fd5b803563ffffffff81168114611cba57600080fd5b600060c0828403121561511557600080fd5b61511d614fee565b9050615128826150d8565b815260208083013581830152615140604084016150ef565b6040830152615151606084016150ef565b6060830152608083013561516481614f57565b608083015260a08301356001600160401b038082111561518357600080fd5b818501915085601f83011261519757600080fd5b8135818111156151a9576151a9614fd8565b6151bb601f8201601f19168501615039565b915080825286848285010111156151d157600080fd5b80848401858401376000848284010152508060a085015250505092915050565b8015158114612f4b57600080fd5b8035611cba816151f1565b60008060008385036101e081121561522157600080fd5b6101a08082121561523157600080fd5b615239615016565b91506152458787615069565b82526152548760408801615069565b60208301526080860135604083015260a0860135606083015260c0860135608083015261528360e08701614f6c565b60a083015261010061529788828901615069565b60c08401526152aa886101408901615069565b60e0840152610180870135908301529093508401356001600160401b038111156152d357600080fd5b6152df86828701615103565b9250506152ef6101c085016151ff565b90509250925092565b60006020828403121561530a57600080fd5b5035919050565b6000806040838503121561532457600080fd5b823561532f81614f57565b91506020830135614f9c81614f57565b6000806060838503121561535257600080fd5b604083018481111561536357600080fd5b83925061536f816150d8565b9150509250929050565b60006020828403121561538b57600080fd5b81356001600160401b038111156153a157600080fd5b820160c08185031215610dfb57600080fd5b6001600160401b0391909116815260200190565b60008083601f8401126153d957600080fd5b5081356001600160401b038111156153f057600080fd5b60208301915083602082850101111561540857600080fd5b9250929050565b6000806000806060858703121561542557600080fd5b843561543081614f57565b93506020850135925060408501356001600160401b0381111561545257600080fd5b61545e878288016153c7565b95989497509550505050565b803561ffff81168114611cba57600080fd5b803560ff81168114611cba57600080fd5b60008060008060008060008060006101208a8c0312156154ac57600080fd5b6154b58a61546a565b98506154c360208b016150ef565b97506154d160408b016150ef565b96506154df60608b016150ef565b955060808a013594506154f460a08b016150ef565b935061550260c08b016150ef565b925061551060e08b0161547c565b915061551f6101008b0161547c565b90509295985092959850929598565b6000806040838503121561554157600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b8381101561558057815187529582019590820190600101615564565b509495945050505050565b602081526000610dfb6020830184615550565b6000604082840312156155b057600080fd5b610dfb8383615069565b600080602083850312156155cd57600080fd5b82356001600160401b038111156155e357600080fd5b6155ef858286016153c7565b90969095509350505050565b600081518084526020808501945080840160005b838110156155805781516001600160a01b03168752958201959082019060010161560f565b6001600160601b038681168252851660208201526001600160401b03841660408201526001600160a01b038316606082015260a06080820181905260009061567e908301846155fb565b979650505050505050565b634e487b7160e01b600052601160045260246000fd5b6001600160601b0382811682821603908082111561458a5761458a615689565b918252602082015260400190565b634e487b7160e01b600052603260045260246000fd5b6000600182016156f5576156f5615689565b5060010190565b60006001600160401b038281166002600160401b0319810161572057615720615689565b6001019392505050565b60006001600160401b0382168061574357615743615689565b6000190192915050565b818103818111156123f2576123f2615689565b6020815260ff82511660208201526020820151604082015260018060a01b0360408301511660608201526000606083015160c060808401526157a560e08401826155fb565b60808501516001600160601b0390811660a0868101919091529095015190941660c0909301929092525090919050565b60005b838110156157f05781810151838201526020016157d8565b50506000910152565b600081518084526158118160208601602086016157d5565b601f01601f19169290920160200192915050565b602081526000610dfb60208301846157f9565b6001600160a01b039290921682526001600160601b0316602082015260400190565b60006020828403121561586c57600080fd5b8151610dfb816151f1565b6001600160a01b03929092168252602082015260400190565b9182526001600160401b0316602082015260400190565b6001600160601b0381811683821601908082111561458a5761458a615689565b808201808211156123f2576123f2615689565b9182526001600160a01b0316602082015260400190565b60006020828403121561590357600080fd5b610dfb8261546a565b61ffff93841681529183166020830152909116604082015260600190565b60006020828403121561593c57600080fd5b610dfb826150ef565b63ffffffff92831681529116602082015260400190565b6000808335601e1984360301811261597357600080fd5b8301803591506001600160401b0382111561598d57600080fd5b60200191503681900382131561540857600080fd5b878152602081018790526040810186905263ffffffff8581166060830152841660808201526001600160a01b03831660a082015260e060c082018190526000906159ee908301846157f9565b9998505050505050505050565b86815285602082015261ffff85166040820152600063ffffffff808616606084015280851660808401525060c060a08301526148df60c08301846157f9565b6001600160401b0381811683821601908082111561458a5761458a615689565b60ff92831681529116602082015260400190565b6001600160a01b0392831681529116602082015260400190565b8060005b6002811015612bd2578151845260209384019390910190600101615a8c565b604081016123f28284615a88565b634e487b7160e01b600052603160045260246000fd5b80356001600160601b0381168114611cba57600080fd5b60006020808385031215615af957600080fd5b82356001600160401b0380821115615b1057600080fd5b9084019060c08287031215615b2457600080fd5b615b2c614fee565b615b358361547c565b815283830135848201526040830135615b4d81614f57565b6040820152606083013582811115615b6457600080fd5b8301601f81018813615b7557600080fd5b803583811115615b8757615b87614fd8565b8060051b9350615b98868501615039565b818152938201860193868101908a861115615bb257600080fd5b928701925b85841015615bdc5783359250615bcc83614f57565b8282529287019290870190615bb7565b606085015250615bf191505060808401615acf565b6080820152615c0260a08401615acf565b60a08201529695505050505050565b600060208284031215615c2357600080fd5b5051919050565b8781526001600160401b03871660208201526040810186905263ffffffff8581166060830152841660808201526001600160a01b03831660a082015260e060c082018190526000906159ee908301846157f9565b828152604060208201526000615c976040830184615550565b949350505050565b6001600160e01b03198135818116916004851015615cc75780818660040360031b1b83161692505b505092915050565b60008085851115615cdf57600080fd5b83861115615cec57600080fd5b5050820193919092039150565b600060208284031215615d0b57600080fd5b604051602081016001600160401b0381118282101715615d2d57615d2d614fd8565b6040528235615d3b816151f1565b81529392505050565b82815260608101610dfb6020830184615a88565b80820281158282048414176123f2576123f2615689565b634e487b7160e01b600052601260045260246000fd5b600082615d9457615d94615d6f565b500490565b60ff81811683821601908111156123f2576123f2615689565b63ffffffff82811682821603908082111561458a5761458a615689565b60008351615de18184602088016157d5565b835190830190615df58183602088016157d5565b01949350505050565b80516001600160501b0381168114611cba57600080fd5b600080600080600060a08688031215615e2d57600080fd5b615e3686615dfe565b9450602086015193506040860151925060608601519150615e5960808701615dfe565b90509295509295909350565b93845260ff9290921660208401526040830152606082015260800190565b838152615e936020820184615a88565b606081019190915260800192915050565b868152615eb46020820187615a88565b615ec16060820186615a88565b615ece60a0820185615a88565b615edb60e0820184615a88565b60609190911b6001600160601b0319166101208201526101340195945050505050565b600082615f0d57615f0d615d6f565b500690565b615f1c8183615a88565b60400191905056fe307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666a164736f6c6343000813000a", + Bin: "0x60a06040523480156200001157600080fd5b5060405162005fac38038062005fac83398101604081905262000034916200017e565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be81620000d3565b5050506001600160a01b0316608052620001b0565b336001600160a01b038216036200012d5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000602082840312156200019157600080fd5b81516001600160a01b0381168114620001a957600080fd5b9392505050565b608051615dd9620001d36000396000818161052e01526132250152615dd96000f3fe6080604052600436106101f65760003560e01c8062012291146101fb578063043bd6ae14610228578063088070f51461024c5780630ae095401461031a57806315c48b841461033c57806318e3dd27146103645780631b6b6d23146103a3578063294daa49146103d05780632f622e6b146103ec578063301f42e91461040c578063405b84fa1461042c57806340d6bb821461044c57806341af6c871461047757806351cff8d9146104a75780635d06b4ab146104c757806364d51a2a146104e757806365982744146104fc578063689c45171461051c57806372e9d5651461055057806379ba5097146105705780637a5a2aef146105855780638402595e146105a557806386fe91c7146105c55780638da5cb5b146105e557806395b55cfc146106035780639b1c385e146106165780639d40a6fd14610636578063a21a23e414610663578063a4c0ed3614610678578063a63e0bfb14610698578063aa433aff146106b8578063aefb212f146106d8578063b2a7cac514610705578063bec4c08c14610725578063caf70c4a14610745578063cb63179714610765578063ce3f471914610785578063d98e620e14610798578063da2f2610146107b8578063dac83d2914610817578063dc311dd314610837578063e72f6e3014610868578063ee9d2d3814610888578063f2fde38b146108b5575b600080fd5b34801561020757600080fd5b506102106108d5565b60405161021f93929190614e97565b60405180910390f35b34801561023457600080fd5b5061023e60105481565b60405190815260200161021f565b34801561025857600080fd5b50600c546102bd9061ffff81169063ffffffff62010000820481169160ff600160301b8204811692600160381b8304811692600160581b8104821692600160781b8204831692600160981b83041691600160b81b8104821691600160c01b9091041689565b6040805161ffff909a168a5263ffffffff98891660208b01529615159689019690965293861660608801529185166080870152841660a08601529290921660c084015260ff91821660e0840152166101008201526101200161021f565b34801561032657600080fd5b5061033a610335366004614f0b565b610951565b005b34801561034857600080fd5b5061035160c881565b60405161ffff909116815260200161021f565b34801561037057600080fd5b50600a5461038b90600160601b90046001600160601b031681565b6040516001600160601b03909116815260200161021f565b3480156103af57600080fd5b506002546103c3906001600160a01b031681565b60405161021f9190614f3b565b3480156103dc57600080fd5b506040516002815260200161021f565b3480156103f857600080fd5b5061033a610407366004614f4f565b610999565b34801561041857600080fd5b5061038b610427366004614f92565b610a3a565b34801561043857600080fd5b5061033a610447366004614f0b565b610d8f565b34801561045857600080fd5b506104626101f481565b60405163ffffffff909116815260200161021f565b34801561048357600080fd5b50610497610492366004614ffe565b611132565b604051901515815260200161021f565b3480156104b357600080fd5b5061033a6104c2366004614f4f565b6111e6565b3480156104d357600080fd5b5061033a6104e2366004614f4f565b611303565b3480156104f357600080fd5b50610351606481565b34801561050857600080fd5b5061033a610517366004615017565b6113ba565b34801561052857600080fd5b506103c37f000000000000000000000000000000000000000000000000000000000000000081565b34801561055c57600080fd5b506003546103c3906001600160a01b031681565b34801561057c57600080fd5b5061033a61141a565b34801561059157600080fd5b5061033a6105a036600461505c565b6114c4565b3480156105b157600080fd5b5061033a6105c0366004614f4f565b611600565b3480156105d157600080fd5b50600a5461038b906001600160601b031681565b3480156105f157600080fd5b506000546001600160a01b03166103c3565b61033a610611366004614ffe565b61170c565b34801561062257600080fd5b5061023e610631366004615096565b611819565b34801561064257600080fd5b50600754610656906001600160401b031681565b60405161021f91906150d2565b34801561066f57600080fd5b5061023e611bd3565b34801561068457600080fd5b5061033a61069336600461512e565b611da6565b3480156106a457600080fd5b5061033a6106b33660046151c0565b611f0c565b3480156106c457600080fd5b5061033a6106d3366004614ffe565b6121ae565b3480156106e457600080fd5b506106f86106f3366004615261565b6121e1565b60405161021f91906152be565b34801561071157600080fd5b5061033a610720366004614ffe565b6122e3565b34801561073157600080fd5b5061033a610740366004614f0b565b6123c3565b34801561075157600080fd5b5061023e61076036600461533f565b6124b5565b34801561077157600080fd5b5061033a610780366004614f0b565b6124e5565b61033a6107933660046153be565b612747565b3480156107a457600080fd5b5061023e6107b3366004614ffe565b612aae565b3480156107c457600080fd5b506107f86107d3366004614ffe565b600d6020526000908152604090205460ff81169061010090046001600160401b031682565b6040805192151583526001600160401b0390911660208301520161021f565b34801561082357600080fd5b5061033a610832366004614f0b565b612acf565b34801561084357600080fd5b50610857610852366004614ffe565b612b65565b60405161021f959493929190615438565b34801561087457600080fd5b5061033a610883366004614f4f565b612c3e565b34801561089457600080fd5b5061023e6108a3366004614ffe565b600f6020526000908152604090205481565b3480156108c157600080fd5b5061033a6108d0366004614f4f565b612dfb565b600c54600e805460408051602080840282018101909252828152600094859460609461ffff8316946201000090930463ffffffff1693919283919083018282801561093f57602002820191906000526020600020905b81548152602001906001019080831161092b575b50505050509050925092509250909192565b8161095b81612e0f565b610963612e5b565b61096c83611132565b1561098a57604051631685ecdd60e31b815260040160405180910390fd5b6109948383612e88565b505050565b6109a1612e5b565b6109a9612f65565b600b54600160601b90046001600160601b03166109c7811515612fb8565b600b8054600160601b600160c01b0319169055600a8054829190600c906109ff908490600160601b90046001600160601b03166154a3565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550610a3682826001600160601b0316612fd6565b5050565b6000610a44612e5b565b60005a9050610324361115610a7b57604051630f28961b60e01b815236600482015261032460248201526044015b60405180910390fd5b6000610a87868661304a565b90506000610a9d85836000015160200151613345565b60408301519091506060906000610ab960808a018a85016154c3565b63ffffffff169050806001600160401b03811115610ad957610ad96152d1565b604051908082528060200260200182016040528015610b02578160200160208202803683370190505b50925060005b81811015610b69578281604051602001610b239291906154de565b6040516020818303038152906040528051906020012060001c848281518110610b4e57610b4e6154ec565b6020908102919091010152610b6281615502565b9050610b08565b5050602080850180516000908152600f9092526040822082905551610b8f908a85613393565b60208a8101356000908152600690915260409020805491925090601890610bc590600160c01b90046001600160401b031661551b565b91906101000a8154816001600160401b0302191690836001600160401b03160217905550600460008a6080016020810190610c009190614f4f565b6001600160a01b03168152602080820192909252604090810160009081208c840135825290925290208054600990610c4790600160481b90046001600160401b0316615549565b91906101000a8154816001600160401b0302191690836001600160401b031602179055506000898060a00190610c7d919061556c565b6001610c8c60a08e018e61556c565b610c979291506155b2565b818110610ca657610ca66154ec565b9091013560f81c600114915060009050610cc28887848d613441565b90995090508015610d0d577f6ca648a381f22ead7e37773d934e64885dcf861fbfbb26c40354cbf0c4662d1a8760200151601054604051610d049291906154de565b60405180910390a15b50610d1d88828c60200135613479565b602086810151604080518681526001600160601b038c16818501528415158183015285151560608201528c151560808201529051928d0135927faeb4b4786571e184246d39587f659abf0e26f41f6a3358692250382c0cdb47b79181900360a00190a3505050505050505b9392505050565b610d97612e5b565b610da0816135cc565b610dbf5780604051635428d44960e01b8152600401610a729190614f3b565b600080600080610dce86612b65565b945094505093509350336001600160a01b0316826001600160a01b031614610e315760405162461bcd60e51b81526020600482015260166024820152752737ba1039bab139b1b934b83a34b7b71037bbb732b960511b6044820152606401610a72565b610e3a86611132565b15610e805760405162461bcd60e51b815260206004820152601660248201527550656e64696e6720726571756573742065786973747360501b6044820152606401610a72565b6040805160c0810182526001815260208082018990526001600160a01b03851682840152606082018490526001600160601b038088166080840152861660a083015291519091600091610ed5918491016155c5565b6040516020818303038152906040529050610eef88613637565b505060405163ce3f471960e01b81526001600160a01b0388169063ce3f4719906001600160601b03881690610f2890859060040161568a565b6000604051808303818588803b158015610f4157600080fd5b505af1158015610f55573d6000803e3d6000fd5b50506002546001600160a01b031615801593509150610f7e905057506001600160601b03861615155b156110395760025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb90610fb5908a908a9060040161569d565b6020604051808303816000875af1158015610fd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff891906156bf565b6110395760405162461bcd60e51b8152602060048201526012602482015271696e73756666696369656e742066756e647360701b6044820152606401610a72565b600c805460ff60301b1916600160301b17905560005b83518110156110e05783818151811061106a5761106a6154ec565b60200260200101516001600160a01b0316638ea98117896040518263ffffffff1660e01b815260040161109d9190614f3b565b600060405180830381600087803b1580156110b757600080fd5b505af11580156110cb573d6000803e3d6000fd5b50505050806110d990615502565b905061104f565b50600c805460ff60301b191690556040517fd63ca8cb945956747ee69bfdc3ea754c24a4caf7418db70e46052f7850be4187906111209089908b906156dc565b60405180910390a15050505050505050565b60008181526005602052604081206002018054808303611156575060009392505050565b60005b818110156111db57600060046000858481548110611179576111796154ec565b60009182526020808320909101546001600160a01b0316835282810193909352604091820181208982529092529020546001600160401b03600160481b9091041611156111cb57506001949350505050565b6111d481615502565b9050611159565b506000949350505050565b6111ee612e5b565b6111f6612f65565b6002546001600160a01b031661121f5760405163c1f0c0a160e01b815260040160405180910390fd5b600b546001600160601b0316611236811515612fb8565b600b80546001600160601b0319169055600a80548291906000906112649084906001600160601b03166154a3565b82546001600160601b039182166101009390930a92830291909202199091161790555060025460405163a9059cbb60e01b8152610a36916001600160a01b03169063a9059cbb906112bb908690869060040161569d565b6020604051808303816000875af11580156112da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112fe91906156bf565b612fb8565b61130b612f65565b611314816135cc565b15611334578060405163ac8a27ef60e01b8152600401610a729190614f3b565b601180546001810182556000919091527f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c680180546001600160a01b0319166001600160a01b0383161790556040517fb7cabbfc11e66731fc77de0444614282023bcbd41d16781c753a431d0af01625906113af908390614f3b565b60405180910390a150565b6113c2612f65565b6002546001600160a01b0316156113ec57604051631688c53760e11b815260040160405180910390fd5b600280546001600160a01b039384166001600160a01b03199182161790915560038054929093169116179055565b6001546001600160a01b0316331461146d5760405162461bcd60e51b815260206004820152601660248201527526bab9ba10313290383937b837b9b2b21037bbb732b960511b6044820152606401610a72565b60008054336001600160a01b0319808316821784556001805490911690556040516001600160a01b0390921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6114cc612f65565b6040805180820182526000916114fb9190859060029083908390808284376000920191909152506124b5915050565b6000818152600d602052604090205490915060ff161561153157604051634a0b8fa760e01b815260048101829052602401610a72565b60408051808201825260018082526001600160401b0385811660208085019182526000878152600d9091528581209451855492516001600160481b0319909316901515610100600160481b03191617610100929093169190910291909117909255600e805491820181559091527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd01829055517f9b911b2c240bfbef3b6a8f7ed6ee321d1258bb2a3fe6becab52ac1cd3210afd3906115f390839085906156f5565b60405180910390a1505050565b611608612f65565b600a544790600160601b90046001600160601b0316818111156116425780826040516354ced18160e11b8152600401610a729291906154de565b8181101561099457600061165682846155b2565b90506000846001600160a01b03168260405160006040518083038185875af1925050503d80600081146116a5576040519150601f19603f3d011682016040523d82523d6000602084013e6116aa565b606091505b50509050806116cc5760405163950b247960e01b815260040160405180910390fd5b7f4aed7c8eed0496c8c19ea2681fcca25741c1602342e38b045d9f1e8e905d2e9c85836040516116fd9291906156dc565b60405180910390a15050505050565b611714612e5b565b600081815260056020526040902054611735906001600160a01b03166137df565b60008181526006602052604090208054600160601b90046001600160601b0316903490600c611764838561570c565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555034600a600c8282829054906101000a90046001600160601b03166117ac919061570c565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550817f7603b205d03651ee812f803fccde89f1012e545a9c99f0abfea9cedd0fd8e9028234846117ff919061572c565b60405161180d9291906154de565b60405180910390a25050565b6000611823612e5b565b602080830135600081815260059092526040909120546001600160a01b031661185f57604051630fb532db60e11b815260040160405180910390fd5b336000908152600460209081526040808320848452808352928190208151606081018352905460ff811615158083526001600160401b036101008304811695840195909552600160481b90910490931691810191909152906118d85782336040516379bfd40160e01b8152600401610a7292919061573f565b600c5461ffff166118ef6060870160408801615756565b61ffff161080611912575060c861190c6060870160408801615756565b61ffff16115b1561194c576119276060860160408701615756565b600c5460405163539c34bb60e11b8152610a72929161ffff169060c890600401615771565b600c5462010000900463ffffffff1661196b60808701606088016154c3565b63ffffffff1611156119b15761198760808601606087016154c3565b600c54604051637aebf00f60e11b8152610a72929162010000900463ffffffff169060040161578f565b6101f46119c460a08701608088016154c3565b63ffffffff1611156119fe576119e060a08601608087016154c3565b6101f46040516311ce1afb60e21b8152600401610a7292919061578f565b806020018051611a0d9061551b565b6001600160401b03169052604081018051611a279061551b565b6001600160401b031690526020810151600090611a4a9087359033908790613806565b90955090506000611a6e611a69611a6460a08a018a61556c565b61388f565b613910565b905085611a79613981565b86611a8a60808b0160608c016154c3565b611a9a60a08c0160808d016154c3565b3386604051602001611ab297969594939291906157a6565b60405160208183030381529060405280519060200120600f600088815260200190815260200160002081905550336001600160a01b03168588600001357feb0e3652e0f44f417695e6e90f2f42c99b65cd7169074c5a654b16b9748c3a4e89868c6040016020810190611b259190615756565b8d6060016020810190611b3891906154c3565b8e6080016020810190611b4b91906154c3565b89604051611b5e969594939291906157ff565b60405180910390a4505060009283526020918252604092839020815181549383015192909401516001600160481b0319909316931515610100600160481b031916939093176101006001600160401b039283160217600160481b600160881b031916600160481b91909216021790555b919050565b6000611bdd612e5b565b6007546001600160401b031633611bf56001436155b2565b6040516001600160601b0319606093841b81166020830152914060348201523090921b1660548201526001600160c01b031960c083901b16606882015260700160408051601f1981840301815291905280516020909101209150611c5a81600161583e565b600780546001600160401b0319166001600160401b03928316179055604080516000808252608082018352602080830182815283850183815260608086018581528a86526006855287862093518454935191516001600160601b039182166001600160c01b031990951694909417600160601b9190921602176001600160c01b0316600160c01b9290981691909102969096179055835194850184523385528481018281528585018481528884526005835294909220855181546001600160a01b03199081166001600160a01b039283161783559351600183018054909516911617909255925180519294939192611d589260028501920190614da5565b50611d6891506008905084613a02565b50827f1d3015d7ba850fa198dc7b1a3f5d42779313a681035f77c8c03764c61005518d33604051611d999190614f3b565b60405180910390a2505090565b611dae612e5b565b6002546001600160a01b03163314611dd9576040516344b0e3c360e01b815260040160405180910390fd5b60208114611dfa57604051638129bbcd60e01b815260040160405180910390fd5b6000611e0882840184614ffe565b600081815260056020526040902054909150611e2c906001600160a01b03166137df565b600081815260066020526040812080546001600160601b031691869190611e53838561570c565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555084600a60008282829054906101000a90046001600160601b0316611e9b919061570c565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550817f1ced9348ff549fceab2ac57cd3a9de38edaaab274b725ee82c23e8fc8c4eec7a828784611eee919061572c565b604051611efc9291906154de565b60405180910390a2505050505050565b611f14612f65565b60c861ffff8a161115611f4157888960c860405163539c34bb60e11b8152600401610a7293929190615771565b60008513611f65576040516321ea67b360e11b815260048101869052602401610a72565b8363ffffffff168363ffffffff161115611f965782846040516313c06e5960e11b8152600401610a7292919061578f565b609b60ff83161115611fc05781609b604051631d66288d60e11b8152600401610a7292919061585e565b609b60ff82161115611fea5780609b604051631d66288d60e11b8152600401610a7292919061585e565b604080516101208101825261ffff8b1680825263ffffffff808c16602084018190526000848601528b8216606085018190528b8316608086018190528a841660a08701819052938a1660c0870181905260ff808b1660e08901819052908a16610100909801889052600c8054600160c01b90990260ff60c01b19600160b81b9093029290921661ffff60b81b19600160981b90940263ffffffff60981b19600160781b90990298909816600160781b600160b81b0319600160581b90960263ffffffff60581b19600160381b90980297909716600160301b600160781b03196201000090990265ffffffffffff19909c16909a179a909a1796909616979097179390931791909116959095179290921793909316929092179190911790556010869055517f2c6b6b12413678366b05b145c5f00745bdd00e739131ab5de82484a50c9d78b69061219b908b908b908b908b908b908b908b908b908b9061ffff99909916895263ffffffff97881660208a0152958716604089015293861660608801526080870192909252841660a086015290921660c084015260ff91821660e0840152166101008201526101200190565b60405180910390a1505050505050505050565b6121b6612f65565b6000818152600560205260409020546001600160a01b03166121d7816137df565b610a368282612e88565b606060006121ef6008613a0e565b905080841061221157604051631390f2a160e01b815260040160405180910390fd5b600061221d848661572c565b90508181118061222b575083155b6122355780612237565b815b9050600061224586836155b2565b9050806001600160401b0381111561225f5761225f6152d1565b604051908082528060200260200182016040528015612288578160200160208202803683370190505b50935060005b818110156122d8576122ab6122a3888361572c565b600890613a18565b8582815181106122bd576122bd6154ec565b60209081029190910101526122d181615502565b905061228e565b505050505b92915050565b6122eb612e5b565b6000818152600560205260409020546001600160a01b031661230c816137df565b6000828152600560205260409020600101546001600160a01b03163314612363576000828152600560205260409081902060010154905163d084e97560e01b8152610a72916001600160a01b031690600401614f3b565b600082815260056020526040908190208054336001600160a01b031991821681178355600190920180549091169055905183917fd4114ab6e9af9f597c52041f32d62dc57c5c4e4c0d4427006069635e216c93869161180d918591615872565b816123cd81612e0f565b6123d5612e5b565b6001600160a01b03821660009081526004602090815260408083208684529091529020805460ff16156124085750505050565b600084815260056020526040902060020180546063190161243c576040516305a48e0f60e01b815260040160405180910390fd5b8154600160ff1990911681178355815490810182556000828152602090200180546001600160a01b0319166001600160a01b03861617905560405185907f1e980d04aa7648e205713e5e8ea3808672ac163d10936d36f91b2c88ac1575e1906124a6908790614f3b565b60405180910390a25050505050565b6000816040516020016124c8919061588c565b604051602081830303815290604052805190602001209050919050565b816124ef81612e0f565b6124f7612e5b565b61250083611132565b1561251e57604051631685ecdd60e31b815260040160405180910390fd5b6001600160a01b038216600090815260046020908152604080832086845290915290205460ff166125665782826040516379bfd40160e01b8152600401610a7292919061573f565b6000838152600560209081526040808320600201805482518185028101850190935280835291929091908301828280156125c957602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116125ab575b505050505090506000600182516125e091906155b2565b905060005b82518110156126e957846001600160a01b031683828151811061260a5761260a6154ec565b60200260200101516001600160a01b0316036126d9576000838381518110612634576126346154ec565b6020026020010151905080600560008981526020019081526020016000206002018381548110612666576126666154ec565b600091825260208083209190910180546001600160a01b0319166001600160a01b0394909416939093179092558881526005909152604090206002018054806126b1576126b16158bd565b600082815260209020810160001990810180546001600160a01b0319169055019055506126e9565b6126e281615502565b90506125e5565b506001600160a01b038416600090815260046020908152604080832088845290915290819020805460ff191690555185907f32158c6058347c1601b2d12bc696ac6901d8a9a9aa3ba10c27ab0a983e8425a7906124a6908790614f3b565b6000612755828401846158ea565b9050806000015160ff1660011461278557805160405163237d181f60e21b8152610a72919060019060040161585e565b8060a001516001600160601b031634146127c95760a08101516040516306acf13560e41b81523460048201526001600160601b039091166024820152604401610a72565b6020808201516000908152600590915260409020546001600160a01b031615612805576040516326afa43560e11b815260040160405180910390fd5b60005b8160600151518110156128fe57604051806060016040528060011515815260200160006001600160401b0316815260200160006001600160401b03168152506004600084606001518481518110612861576128616154ec565b6020908102919091018101516001600160a01b0316825281810192909252604090810160009081208684015182528352819020835181549385015194909201516001600160481b0319909316911515610100600160481b031916919091176101006001600160401b039485160217600160481b600160881b031916600160481b9390921692909202179055806128f681615502565b915050612808565b50604080516060808201835260808401516001600160601b03908116835260a0850151811660208085019182526000858701818152828901805183526006845288832097518854955192516001600160401b0316600160c01b026001600160c01b03938816600160601b026001600160c01b0319909716919097161794909417169390931790945584518084018652868601516001600160a01b03908116825281860184815294880151828801908152925184526005865295909220825181549087166001600160a01b03199182161782559351600182018054919097169416939093179094559251805191926129fd92600285019290910190614da5565b5050506080810151600a8054600090612a209084906001600160601b031661570c565b92506101000a8154816001600160601b0302191690836001600160601b031602179055508060a00151600a600c8282829054906101000a90046001600160601b0316612a6c919061570c565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550612aa881602001516008613a0290919063ffffffff16565b50505050565b600e8181548110612abe57600080fd5b600091825260209091200154905081565b81612ad981612e0f565b612ae1612e5b565b600083815260056020526040902060018101546001600160a01b03848116911614612aa8576001810180546001600160a01b0319166001600160a01b03851617905560405184907f21a4dad170a6bf476c31bbcf4a16628295b0e450672eec25d7c93308e05344a190612b579033908790615872565b60405180910390a250505050565b600081815260056020526040812054819081906001600160a01b03166060612b8c826137df565b600086815260066020908152604080832054600583529281902060020180548251818502810185019093528083526001600160601b0380861695600160601b810490911694600160c01b9091046001600160401b0316938893929091839190830182828015612c2457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612c06575b505050505090509450945094509450945091939590929450565b612c46612f65565b6002546001600160a01b0316612c6f5760405163c1f0c0a160e01b815260040160405180910390fd5b6002546040516370a0823160e01b81526000916001600160a01b0316906370a0823190612ca0903090600401614f3b565b602060405180830381865afa158015612cbd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ce19190615a15565b600a549091506001600160601b031681811115612d155780826040516354ced18160e11b8152600401610a729291906154de565b81811015610994576000612d2982846155b2565b60025460405163a9059cbb60e01b81529192506001600160a01b03169063a9059cbb90612d5c90879085906004016156dc565b6020604051808303816000875af1158015612d7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d9f91906156bf565b612dbc57604051631f01ff1360e21b815260040160405180910390fd5b7f59bfc682b673f8cbf945f1e454df9334834abf7dfe7f92237ca29ecb9b4366008482604051612ded9291906156dc565b60405180910390a150505050565b612e03612f65565b612e0c81613a24565b50565b6000818152600560205260409020546001600160a01b0316612e30816137df565b336001600160a01b03821614610a365780604051636c51fda960e11b8152600401610a729190614f3b565b600c54600160301b900460ff1615612e865760405163769dd35360e11b815260040160405180910390fd5b565b600080612e9484613637565b60025491935091506001600160a01b031615801590612ebb57506001600160601b03821615155b15612efd5760025460405163a9059cbb60e01b8152612efd916001600160a01b03169063a9059cbb906112bb9087906001600160601b038816906004016156dc565b612f1083826001600160601b0316612fd6565b604080516001600160a01b03851681526001600160601b03808516602083015283169181019190915284907f8c74ce8b8cf87f5eb001275c8be27eb34ea2b62bfab6814fcc62192bb63e81c490606001612b57565b6000546001600160a01b03163314612e865760405162461bcd60e51b815260206004820152601660248201527527b7363c9031b0b63630b1363290313c9037bbb732b960511b6044820152606401610a72565b80612e0c57604051631e9acf1760e31b815260040160405180910390fd5b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114613023576040519150601f19603f3d011682016040523d82523d6000602084013e613028565b606091505b50509050806109945760405163950b247960e01b815260040160405180910390fd5b6040805160a0810182526000606082018181526080830182905282526020820181905281830181905282518084018452919290916130a091869060029083908390808284376000920191909152506124b5915050565b6000818152600d602090815260409182902082518084019093525460ff811615158084526101009091046001600160401b031691830191909152919250906130fe57604051631dfd6e1360e21b815260048101839052602401610a72565b6000828660c001356040516020016131179291906154de565b60408051601f1981840301815291815281516020928301206000818152600f909352908220549092509081900361316157604051631b44092560e11b815260040160405180910390fd5b8161316f6020880188615a2e565b602088013561318460608a0160408b016154c3565b61319460808b0160608c016154c3565b6131a460a08c0160808d01614f4f565b6131b160a08d018d61556c565b6040516020016131c8989796959493929190615a49565b6040516020818303038152906040528051906020012081146131fd5760405163354a450b60e21b815260040160405180910390fd5b600061321461320f6020890189615a2e565b613ac7565b9050806132e2576001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663e9413d3861325760208a018a615a2e565b6040518263ffffffff1660e01b815260040161327391906150d2565b602060405180830381865afa158015613290573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132b49190615a15565b9050806132e2576132c86020880188615a2e565b60405163175dadad60e01b8152600401610a7291906150d2565b6040805160c08a013560208083019190915281830184905282518083038401815260609092019092528051910120600061331c8a83613b95565b604080516060810182529788526020880196909652948601949094525092979650505050505050565b6000816001600160401b03163a111561338b57821561336e57506001600160401b0381166122dd565b3a8260405163435e532d60e11b8152600401610a729291906156f5565b503a92915050565b6000806000631fe543e360e01b86856040516024016133b3929190615ac1565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252600c805460ff60301b1916600160301b179055915061342a9061340e90606088019088016154c3565b63ffffffff1661342460a0880160808901614f4f565b83613c8b565b600c805460ff60301b191690559695505050505050565b600080831561346057613455868685613cd7565b600091509150613470565b61346b868685613de8565b915091505b94509492505050565b600081815260066020526040902082156135385780546001600160601b03600160601b90910481169085168110156134c457604051631e9acf1760e31b815260040160405180910390fd5b6134ce85826154a3565b8254600160601b600160c01b031916600160601b6001600160601b039283168102919091178455600b805488939192600c9261350e92869290041661570c565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555050612aa8565b80546001600160601b0390811690851681101561356857604051631e9acf1760e31b815260040160405180910390fd5b61357285826154a3565b82546001600160601b0319166001600160601b03918216178355600b805487926000916135a19185911661570c565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505050505050565b601154600090815b8181101561362d57836001600160a01b0316601182815481106135f9576135f96154ec565b6000918252602090912001546001600160a01b03160361361d575060019392505050565b61362681615502565b90506135d4565b5060009392505050565b60008181526005602090815260408083206006909252822054600290910180546001600160601b0380841694600160601b90940416925b818110156136d9576004600084838154811061368c5761368c6154ec565b60009182526020808320909101546001600160a01b031683528281019390935260409182018120898252909252902080546001600160881b03191690556136d281615502565b905061366e565b50600085815260056020526040812080546001600160a01b031990811682556001820180549091169055906137116002830182614e0a565b505060008581526006602052604081205561372d600886613fd9565b506001600160601b0384161561378057600a805485919060009061375b9084906001600160601b03166154a3565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b6001600160601b038316156137d85782600a600c8282829054906101000a90046001600160601b03166137b391906154a3565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b5050915091565b6001600160a01b038116612e0c57604051630fb532db60e11b815260040160405180910390fd5b60408051602081018690526001600160a01b03851691810191909152606081018390526001600160401b03821660808201526000908190819060a00160408051601f19818403018152908290528051602091820120925061386b9189918491016154de565b60408051808303601f19018152919052805160209091012097909650945050505050565b60408051602081019091526000815260008290036138bc57506040805160208101909152600081526122dd565b63125fa26760e31b6138ce8385615ada565b6001600160e01b031916146138f657604051632923fee760e11b815260040160405180910390fd5b6139038260048186615b0a565b810190610d889190615b34565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa8260405160240161394991511515815260200190565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915292915050565b60004661398d81613fe5565b156139fb5760646001600160a01b031663a3b1b31d6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156139d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139f59190615a15565b91505090565b4391505090565b6000610d888383614008565b60006122dd825490565b6000610d888383614057565b336001600160a01b03821603613a765760405162461bcd60e51b815260206004820152601760248201527621b0b73737ba103a3930b739b332b9103a379039b2b63360491b6044820152606401610a72565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600046613ad381613fe5565b15613b8657610100836001600160401b0316613aed613981565b613af791906155b2565b1180613b135750613b06613981565b836001600160401b031610155b15613b215750600092915050565b6040516315a03d4160e11b8152606490632b407a8290613b459086906004016150d2565b602060405180830381865afa158015613b62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d889190615a15565b50506001600160401b03164090565b604080518082018252600091613c559190859060029083908390808284376000920191909152505060408051808201825291508087019060029083908390808284376000920191909152505050608086013560a087013586613bfe6101008a0160e08b01614f4f565b604080518082018252906101008c019060029083908390808284376000920191909152505060408051808201825291506101408d0190600290839083908082843760009201919091525050506101808c0135614081565b600383604001604051602001613c6c929190615b7f565b60408051601f1981840301815291905280516020909101209392505050565b60005a611388811015613c9d57600080fd5b611388810390508460408204820311613cb557600080fd5b50823b613cc157600080fd5b60008083516020850160008789f1949350505050565b600080613d1a6000368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061429c92505050565b905060005a600c54613d3a908890600160581b900463ffffffff1661572c565b613d4491906155b2565b613d4e9086615b95565b600c54909150600090613d7390600160781b900463ffffffff1664e8d4a51000615b95565b90508415613dbf57600c548190606490600160b81b900460ff16613d97858761572c565b613da19190615b95565b613dab9190615bc2565b613db5919061572c565b9350505050610d88565b600c548190606490613ddb90600160b81b900460ff1682615bd6565b60ff16613d97858761572c565b600080600080613df661436f565b9150915060008213613e1e576040516321ea67b360e11b815260048101839052602401610a72565b6000613e606000368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061429c92505050565b9050600083825a600c54613e82908d90600160581b900463ffffffff1661572c565b613e8c91906155b2565b613e96908b615b95565b613ea0919061572c565b613eb290670de0b6b3a7640000615b95565b613ebc9190615bc2565b600c54909150600090613ee59063ffffffff600160981b8204811691600160781b900416615bef565b613efa9063ffffffff1664e8d4a51000615b95565b9050600085613f1183670de0b6b3a7640000615b95565b613f1b9190615bc2565b905060008915613f5c57600c548290606490613f4190600160c01b900460ff1687615b95565b613f4b9190615bc2565b613f55919061572c565b9050613f9c565b600c548290606490613f7890600160c01b900460ff1682615bd6565b613f859060ff1687615b95565b613f8f9190615bc2565b613f99919061572c565b90505b676765c793fa10079d601b1b811115613fc85760405163e80fa38160e01b815260040160405180910390fd5b9b949a509398505050505050505050565b6000610d888383614436565b600061a4b1821480613ff9575062066eed82145b806122dd57505062066eee1490565b600081815260018301602052604081205461404f575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556122dd565b5060006122dd565b600082600001828154811061406e5761406e6154ec565b9060005260206000200154905092915050565b61408a89614530565b6140d35760405162461bcd60e51b815260206004820152601a6024820152797075626c6963206b6579206973206e6f74206f6e20637572766560301b6044820152606401610a72565b6140dc88614530565b6141205760405162461bcd60e51b815260206004820152601560248201527467616d6d61206973206e6f74206f6e20637572766560581b6044820152606401610a72565b61412983614530565b6141755760405162461bcd60e51b815260206004820152601d60248201527f6347616d6d615769746e657373206973206e6f74206f6e2063757276650000006044820152606401610a72565b61417e82614530565b6141c95760405162461bcd60e51b815260206004820152601c60248201527b73486173685769746e657373206973206e6f74206f6e20637572766560201b6044820152606401610a72565b6141d5878a88876145f3565b61421d5760405162461bcd60e51b81526020600482015260196024820152786164647228632a706b2b732a6729213d5f755769746e65737360381b6044820152606401610a72565b60006142298a87614707565b9050600061423c898b878b86898961476b565b9050600061424d838d8d8a8661488a565b9050808a1461428e5760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b210383937b7b360991b6044820152606401610a72565b505050505050505050505050565b6000466142a881613fe5565b156142ec57606c6001600160a01b031663c6f7de0e6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613b62573d6000803e3d6000fd5b6142f5816148ca565b1561436657600f602160991b016001600160a01b03166349948e0e84604051806080016040528060488152602001615d856048913960405160200161433b929190615c0c565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401613b45919061568a565b50600092915050565b600c5460035460408051633fabe5a360e21b815290516000938493600160381b90910463ffffffff169284926001600160a01b039092169163feaf968c9160048082019260a0929091908290030181865afa1580156143d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906143f69190615c52565b50919650909250505063ffffffff821615801590614422575061441981426155b2565b8263ffffffff16105b925082156144305760105493505b50509091565b6000818152600183016020526040812054801561451f57600061445a6001836155b2565b855490915060009061446e906001906155b2565b90508181146144d357600086600001828154811061448e5761448e6154ec565b90600052602060002001549050808760000184815481106144b1576144b16154ec565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806144e4576144e46158bd565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506122dd565b60009150506122dd565b5092915050565b80516000906401000003d0191161457e5760405162461bcd60e51b8152602060048201526012602482015271696e76616c696420782d6f7264696e61746560701b6044820152606401610a72565b60208201516401000003d019116145cc5760405162461bcd60e51b8152602060048201526012602482015271696e76616c696420792d6f7264696e61746560701b6044820152606401610a72565b60208201516401000003d0199080096145ec8360005b6020020151614911565b1492915050565b60006001600160a01b0382166146395760405162461bcd60e51b815260206004820152600b60248201526a626164207769746e65737360a81b6044820152606401610a72565b60208401516000906001161561465057601c614653565b601b5b9050600070014551231950b75fc4402da1732fc9bebe1985876000602002015109865170014551231950b75fc4402da1732fc9bebe19918203925060009190890987516040805160008082526020909101918290529293506001916146bd91869188918790615ca2565b6020604051602081039080840390855afa1580156146df573d6000803e3d6000fd5b5050604051601f1901516001600160a01b039081169088161495505050505050949350505050565b61470f614e28565b61473c6001848460405160200161472893929190615ce3565b604051602081830303815290604052614935565b90505b61474881614530565b6122dd5780516040805160208101929092526147649101614728565b905061473f565b614773614e28565b825186516401000003d01991829006919006036147d25760405162461bcd60e51b815260206004820152601e60248201527f706f696e747320696e2073756d206d7573742062652064697374696e637400006044820152606401610a72565b6147dd878988614982565b6148225760405162461bcd60e51b8152602060048201526016602482015275119a5c9cdd081b5d5b0818da1958dac819985a5b195960521b6044820152606401610a72565b61482d848685614982565b6148735760405162461bcd60e51b815260206004820152601760248201527614d958dbdb99081b5d5b0818da1958dac819985a5b1959604a1b6044820152606401610a72565b61487e868484614aa0565b98975050505050505050565b6000600286868685876040516020016148a896959493929190615d04565b60408051601f1981840301815291905280516020909101209695505050505050565b6000600a8214806148dc57506101a482145b806148e9575062aa37dc82145b806148f5575061210582145b80614902575062014a3382145b806122dd57505062014a341490565b6000806401000003d01980848509840990506401000003d019600782089392505050565b61493d614e28565b61494682614b63565b815261495b6149568260006145e2565b614b9e565b6020820181905260029006600103611bce576020810180516401000003d019039052919050565b6000826000036149c25760405162461bcd60e51b815260206004820152600b60248201526a3d32b9379039b1b0b630b960a91b6044820152606401610a72565b835160208501516000906149d890600290615d5e565b156149e457601c6149e7565b601b5b9050600070014551231950b75fc4402da1732fc9bebe19838709604080516000808252602090910191829052919250600190614a2a908390869088908790615ca2565b6020604051602081039080840390855afa158015614a4c573d6000803e3d6000fd5b505050602060405103519050600086604051602001614a6b9190615d72565b60408051601f1981840301815291905280516020909101206001600160a01b0392831692169190911498975050505050505050565b614aa8614e28565b835160208086015185519186015160009384938493614ac993909190614bbe565b919450925090506401000003d019858209600114614b255760405162461bcd60e51b815260206004820152601960248201527834b73b2d1036bab9ba1031329034b73b32b939b29037b3103d60391b6044820152606401610a72565b60405180604001604052806401000003d01980614b4457614b44615bac565b87860981526020016401000003d0198785099052979650505050505050565b805160208201205b6401000003d0198110611bce57604080516020808201939093528151808203840181529082019091528051910120614b6b565b60006122dd826002614bb76401000003d019600161572c565b901c614c9e565b60008080600180826401000003d019896401000003d019038808905060006401000003d0198b6401000003d019038a0890506000614bfe83838585614d38565b9098509050614c0f88828e88614d5c565b9098509050614c2088828c87614d5c565b90985090506000614c338d878b85614d5c565b9098509050614c4488828686614d38565b9098509050614c5588828e89614d5c565b9098509050818114614c8a576401000003d019818a0998506401000003d01982890997506401000003d0198183099650614c8e565b8196505b5050505050509450945094915050565b600080614ca9614e46565b6020808252818101819052604082015260608101859052608081018490526401000003d01960a0820152614cdb614e64565b60208160c0846005600019fa925082600003614d2e5760405162461bcd60e51b81526020600482015260126024820152716269674d6f64457870206661696c7572652160701b6044820152606401610a72565b5195945050505050565b6000806401000003d0198487096401000003d0198487099097909650945050505050565b600080806401000003d019878509905060006401000003d01987876401000003d019030990506401000003d0198183086401000003d01986890990999098509650505050505050565b828054828255906000526020600020908101928215614dfa579160200282015b82811115614dfa57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190614dc5565b50614e06929150614e82565b5090565b5080546000825590600052602060002090810190612e0c9190614e82565b60405180604001604052806002906020820280368337509192915050565b6040518060c001604052806006906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b5b80821115614e065760008155600101614e83565b60006060820161ffff86168352602063ffffffff86168185015260606040850152818551808452608086019150828701935060005b81811015614ee857845183529383019391830191600101614ecc565b509098975050505050505050565b6001600160a01b0381168114612e0c57600080fd5b60008060408385031215614f1e57600080fd5b823591506020830135614f3081614ef6565b809150509250929050565b6001600160a01b0391909116815260200190565b600060208284031215614f6157600080fd5b8135610d8881614ef6565b600060c08284031215614f7e57600080fd5b50919050565b8015158114612e0c57600080fd5b60008060008385036101e0811215614fa957600080fd5b6101a080821215614fb957600080fd5b85945084013590506001600160401b03811115614fd557600080fd5b614fe186828701614f6c565b9250506101c0840135614ff381614f84565b809150509250925092565b60006020828403121561501057600080fd5b5035919050565b6000806040838503121561502a57600080fd5b823561503581614ef6565b91506020830135614f3081614ef6565b80356001600160401b0381168114611bce57600080fd5b6000806060838503121561506f57600080fd5b604083018481111561508057600080fd5b83925061508c81615045565b9150509250929050565b6000602082840312156150a857600080fd5b81356001600160401b038111156150be57600080fd5b6150ca84828501614f6c565b949350505050565b6001600160401b0391909116815260200190565b60008083601f8401126150f857600080fd5b5081356001600160401b0381111561510f57600080fd5b60208301915083602082850101111561512757600080fd5b9250929050565b6000806000806060858703121561514457600080fd5b843561514f81614ef6565b93506020850135925060408501356001600160401b0381111561517157600080fd5b61517d878288016150e6565b95989497509550505050565b803561ffff81168114611bce57600080fd5b803563ffffffff81168114611bce57600080fd5b803560ff81168114611bce57600080fd5b60008060008060008060008060006101208a8c0312156151df57600080fd5b6151e88a615189565b98506151f660208b0161519b565b975061520460408b0161519b565b965061521260608b0161519b565b955060808a0135945061522760a08b0161519b565b935061523560c08b0161519b565b925061524360e08b016151af565b91506152526101008b016151af565b90509295985092959850929598565b6000806040838503121561527457600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b838110156152b357815187529582019590820190600101615297565b509495945050505050565b602081526000610d886020830184615283565b634e487b7160e01b600052604160045260246000fd5b60405160c081016001600160401b0381118282101715615309576153096152d1565b60405290565b604051601f8201601f191681016001600160401b0381118282101715615337576153376152d1565b604052919050565b60006040828403121561535157600080fd5b82601f83011261536057600080fd5b604080519081016001600160401b0381118282101715615382576153826152d1565b806040525080604084018581111561539957600080fd5b845b818110156153b357803583526020928301920161539b565b509195945050505050565b600080602083850312156153d157600080fd5b82356001600160401b038111156153e757600080fd5b6153f3858286016150e6565b90969095509350505050565b600081518084526020808501945080840160005b838110156152b35781516001600160a01b031687529582019590820190600101615413565b6001600160601b038681168252851660208201526001600160401b03841660408201526001600160a01b038316606082015260a060808201819052600090615482908301846153ff565b979650505050505050565b634e487b7160e01b600052601160045260246000fd5b6001600160601b038281168282160390808211156145295761452961548d565b6000602082840312156154d557600080fd5b610d888261519b565b918252602082015260400190565b634e487b7160e01b600052603260045260246000fd5b6000600182016155145761551461548d565b5060010190565b60006001600160401b038281166002600160401b0319810161553f5761553f61548d565b6001019392505050565b60006001600160401b038216806155625761556261548d565b6000190192915050565b6000808335601e1984360301811261558357600080fd5b8301803591506001600160401b0382111561559d57600080fd5b60200191503681900382131561512757600080fd5b818103818111156122dd576122dd61548d565b6020815260ff82511660208201526020820151604082015260018060a01b0360408301511660608201526000606083015160c0608084015261560a60e08401826153ff565b60808501516001600160601b0390811660a0868101919091529095015190941660c0909301929092525090919050565b60005b8381101561565557818101518382015260200161563d565b50506000910152565b6000815180845261567681602086016020860161563a565b601f01601f19169290920160200192915050565b602081526000610d88602083018461565e565b6001600160a01b039290921682526001600160601b0316602082015260400190565b6000602082840312156156d157600080fd5b8151610d8881614f84565b6001600160a01b03929092168252602082015260400190565b9182526001600160401b0316602082015260400190565b6001600160601b038181168382160190808211156145295761452961548d565b808201808211156122dd576122dd61548d565b9182526001600160a01b0316602082015260400190565b60006020828403121561576857600080fd5b610d8882615189565b61ffff93841681529183166020830152909116604082015260600190565b63ffffffff92831681529116602082015260400190565b878152602081018790526040810186905263ffffffff8581166060830152841660808201526001600160a01b03831660a082015260e060c082018190526000906157f29083018461565e565b9998505050505050505050565b86815285602082015261ffff85166040820152600063ffffffff808616606084015280851660808401525060c060a083015261487e60c083018461565e565b6001600160401b038181168382160190808211156145295761452961548d565b60ff92831681529116602082015260400190565b6001600160a01b0392831681529116602082015260400190565b60408101818360005b60028110156158b4578151835260209283019290910190600101615895565b50505092915050565b634e487b7160e01b600052603160045260246000fd5b80356001600160601b0381168114611bce57600080fd5b600060208083850312156158fd57600080fd5b82356001600160401b038082111561591457600080fd5b9084019060c0828703121561592857600080fd5b6159306152e7565b615939836151af565b81528383013584820152604083013561595181614ef6565b604082015260608301358281111561596857600080fd5b8301601f8101881361597957600080fd5b80358381111561598b5761598b6152d1565b8060051b935061599c86850161530f565b818152938201860193868101908a8611156159b657600080fd5b928701925b858410156159e057833592506159d083614ef6565b82825292870192908701906159bb565b6060850152506159f5915050608084016158d3565b6080820152615a0660a084016158d3565b60a08201529695505050505050565b600060208284031215615a2757600080fd5b5051919050565b600060208284031215615a4057600080fd5b610d8882615045565b8881526001600160401b03881660208201526040810187905263ffffffff8681166060830152851660808201526001600160a01b03841660a082015260e060c08201819052810182905260006101008385828501376000838501820152601f909301601f191690910190910198975050505050505050565b8281526040602082015260006150ca6040830184615283565b6001600160e01b03198135818116916004851015615b025780818660040360031b1b83161692505b505092915050565b60008085851115615b1a57600080fd5b83861115615b2757600080fd5b5050820193919092039150565b600060208284031215615b4657600080fd5b604051602081016001600160401b0381118282101715615b6857615b686152d1565b6040528235615b7681614f84565b81529392505050565b8281526060810160408360208401379392505050565b80820281158282048414176122dd576122dd61548d565b634e487b7160e01b600052601260045260246000fd5b600082615bd157615bd1615bac565b500490565b60ff81811683821601908111156122dd576122dd61548d565b63ffffffff8281168282160390808211156145295761452961548d565b60008351615c1e81846020880161563a565b835190830190615c3281836020880161563a565b01949350505050565b80516001600160501b0381168114611bce57600080fd5b600080600080600060a08688031215615c6a57600080fd5b615c7386615c3b565b9450602086015193506040860151925060608601519150615c9660808701615c3b565b90509295509295909350565b93845260ff9290921660208401526040830152606082015260800190565b8060005b6002811015612aa8578151845260209384019390910190600101615cc4565b838152615cf36020820184615cc0565b606081019190915260800192915050565b868152615d146020820187615cc0565b615d216060820186615cc0565b615d2e60a0820185615cc0565b615d3b60e0820184615cc0565b60609190911b6001600160601b0319166101208201526101340195945050505050565b600082615d6d57615d6d615bac565b500690565b615d7c8183615cc0565b60400191905056fe307866666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666a164736f6c6343000813000a", } var VRFCoordinatorV2PlusUpgradedVersionABI = VRFCoordinatorV2PlusUpgradedVersionMetaData.ABI diff --git a/core/gethwrappers/generated/vrfv2plus_wrapper/vrfv2plus_wrapper.go b/core/gethwrappers/generated/vrfv2plus_wrapper/vrfv2plus_wrapper.go index e623e345103..64224275f91 100644 --- a/core/gethwrappers/generated/vrfv2plus_wrapper/vrfv2plus_wrapper.go +++ b/core/gethwrappers/generated/vrfv2plus_wrapper/vrfv2plus_wrapper.go @@ -31,8 +31,8 @@ var ( ) var VRFV2PlusWrapperMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_link\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_linkNativeFeed\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_coordinator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_subId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"FailedToTransferLink\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"expectedMinimumLength\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"actualLength\",\"type\":\"uint16\"}],\"name\":\"IncorrectExtraArgsLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"premiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"max\",\"type\":\"uint8\"}],\"name\":\"InvalidPremiumPercentage\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LINKPaymentInRequestRandomWordsInNative\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LinkAlreadySet\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"flatFeeLinkDiscountPPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeNativePPM\",\"type\":\"uint32\"}],\"name\":\"LinkDiscountTooHigh\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NativePaymentInOnTokenTransfer\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"want\",\"type\":\"address\"}],\"name\":\"OnlyCoordinatorCanFulfill\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"}],\"name\":\"OnlyOwnerOrCoordinator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SubscriptionIdMissing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"wrapperGasOverhead\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"coordinatorGasOverheadNative\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"coordinatorGasOverheadLink\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"coordinatorGasOverheadPerWord\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"coordinatorNativePremiumPercentage\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"coordinatorLinkPremiumPercentage\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"maxNumWords\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"stalenessSeconds\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"fallbackWeiPerUnitLink\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeNativePPM\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkDiscountPPM\",\"type\":\"uint32\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"}],\"name\":\"CoordinatorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Disabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Enabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"fallbackWeiPerUnitLink\",\"type\":\"int256\"}],\"name\":\"FallbackWeiPerUnitLinkUsed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"size\",\"type\":\"uint32\"}],\"name\":\"FulfillmentTxSizeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"NativeWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"WrapperFulfillmentFailed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"SUBSCRIPTION_ID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"}],\"name\":\"calculateRequestPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"}],\"name\":\"calculateRequestPriceNative\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isLinkMode\",\"type\":\"bool\"}],\"name\":\"checkPaymentMode\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disable\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"enable\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_requestGasPriceWei\",\"type\":\"uint256\"}],\"name\":\"estimateRequestPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_requestGasPriceWei\",\"type\":\"uint256\"}],\"name\":\"estimateRequestPriceNative\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"fallbackWeiPerUnitLink\",\"type\":\"int256\"},{\"internalType\":\"uint32\",\"name\":\"stalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeNativePPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkDiscountPPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"wrapperGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"coordinatorGasOverheadNative\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"coordinatorGasOverheadLink\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"coordinatorGasOverheadPerWord\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"wrapperNativePremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"wrapperLinkPremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"maxNumWords\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastRequestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"link\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"linkNativeFeed\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"onTokenTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"}],\"name\":\"rawFulfillRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"_requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"}],\"name\":\"requestRandomWordsInNative\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_callbacks\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"callbackAddress\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"requestGasPrice\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_configured\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_disabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_fulfillmentTxSizeBytes\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_vrfCoordinator\",\"outputs\":[{\"internalType\":\"contractIVRFCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_wrapperGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_coordinatorGasOverheadNative\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_coordinatorGasOverheadLink\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"_coordinatorGasOverheadPerWord\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"_coordinatorNativePremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"_coordinatorLinkPremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"_keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"_maxNumWords\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"_stalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"int256\",\"name\":\"_fallbackWeiPerUnitLink\",\"type\":\"int256\"},{\"internalType\":\"uint32\",\"name\":\"_fulfillmentFlatFeeNativePPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_fulfillmentFlatFeeLinkDiscountPPM\",\"type\":\"uint32\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"size\",\"type\":\"uint32\"}],\"name\":\"setFulfillmentTxSize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_recipient\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_recipient\",\"type\":\"address\"}],\"name\":\"withdrawNative\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60e06040526006805463ffffffff60401b191669024400000000000000001790553480156200002d57600080fd5b5060405162003e1638038062003e168339810160408190526200005091620002a1565b813380600081620000a85760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000db57620000db81620001d9565b5050506001600160a01b038116620001065760405163d92e233d60e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392831617905584811660a052831660c0526000819003620001505760405163a81c0bef60e01b815260040160405180910390fd5b60025460405163dc311dd360e01b8152600481018390526001600160a01b039091169063dc311dd390602401600060405180830381865afa1580156200019a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620001c4919081019062000321565b505050608092909252506200044a9350505050565b336001600160a01b03821603620002335760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016200009f565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b03811681146200029c57600080fd5b919050565b60008060008060808587031215620002b857600080fd5b620002c38562000284565b9350620002d36020860162000284565b9250620002e36040860162000284565b6060959095015193969295505050565b80516001600160601b03811681146200029c57600080fd5b634e487b7160e01b600052604160045260246000fd5b600080600080600060a086880312156200033a57600080fd5b6200034586620002f3565b9450602062000356818801620002f3565b60408801519095506001600160401b0380821682146200037557600080fd5b8195506200038660608a0162000284565b945060808901519150808211156200039d57600080fd5b818901915089601f830112620003b257600080fd5b815181811115620003c757620003c76200030b565b8060051b604051601f19603f83011681018181108582111715620003ef57620003ef6200030b565b60405291825284820192508381018501918c8311156200040e57600080fd5b938501935b828510156200043757620004278562000284565b8452938501939285019262000413565b8096505050505050509295509295909350565b60805160a05160c051613972620004a46000396000818161037e01526122840152600081816102ea015281816111f6015281816112c50152611c6f01526000818161020b015281816118c40152611e5c01526139726000f3fe6080604052600436106101c15760003560e01c806357a8070a116100f7578063a4c0ed3611610095578063cdd8d88511610064578063cdd8d88514610741578063e1cab7451461077f578063f2fde38b1461079f578063fc2a88c3146107bf57600080fd5b8063a4c0ed36146105b9578063a608a1e1146105d9578063bf17e5591461060c578063c3f909d41461062c57600080fd5b80638ea98117116100d15780638ea98117146105445780639cfc058e146105645780639eccacf614610577578063a3907d71146105a457600080fd5b806357a8070a146104c257806379ba5097146105045780638da5cb5b1461051957600080fd5b80631fe543e3116101645780632f2770db1161013e5780632f2770db146103a25780632f622e6b146103b757806348baa1c5146103d757806351cff8d9146104a257600080fd5b80631fe543e31461032f57806327e5c50a1461034f5780632808e6c81461036f57600080fd5b806313c34b7f116101a057806313c34b7f1461024f578063181f5a771461026f57806318b6f4c8146102bb5780631c4695f4146102db57600080fd5b806226501b146101c6578063030932bb146101f9578063045343aa1461022d575b600080fd5b3480156101d257600080fd5b506101e66101e1366004612e8d565b6107d5565b6040519081526020015b60405180910390f35b34801561020557600080fd5b506101e67f000000000000000000000000000000000000000000000000000000000000000081565b34801561023957600080fd5b5061024d610248366004612eec565b61090f565b005b34801561025b57600080fd5b506101e661026a366004612fba565b610bcb565b34801561027b57600080fd5b50604080518082018252601681527f5652465632506c75735772617070657220312e302e3000000000000000000000602082015290516101f09190613051565b3480156102c757600080fd5b5061024d6102d636600461314c565b610cf2565b3480156102e757600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101f0565b34801561033b57600080fd5b5061024d61034a36600461319e565b610e71565b34801561035b57600080fd5b506101e661036a366004612fba565b610eef565b34801561037b57600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061030a565b3480156103ae57600080fd5b5061024d611023565b3480156103c357600080fd5b5061024d6103d2366004613241565b611096565b3480156103e357600080fd5b506104616103f236600461325c565b60076020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff81169074010000000000000000000000000000000000000000810463ffffffff16907801000000000000000000000000000000000000000000000000900467ffffffffffffffff1683565b6040805173ffffffffffffffffffffffffffffffffffffffff909416845263ffffffff909216602084015267ffffffffffffffff16908201526060016101f0565b3480156104ae57600080fd5b5061024d6104bd366004613241565b6111bd565b3480156104ce57600080fd5b506002546104f49074010000000000000000000000000000000000000000900460ff1681565b60405190151581526020016101f0565b34801561051057600080fd5b5061024d6113be565b34801561052557600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff1661030a565b34801561055057600080fd5b5061024d61055f366004613241565b6114bb565b6101e66105723660046132be565b611646565b34801561058357600080fd5b5060025461030a9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156105b057600080fd5b5061024d611af2565b3480156105c557600080fd5b5061024d6105d4366004613334565b611b4d565b3480156105e557600080fd5b506002546104f4907501000000000000000000000000000000000000000000900460ff1681565b34801561061857600080fd5b5061024d61062736600461338e565b6120bb565b34801561063857600080fd5b506005546006546003546002546040516101f0949363ffffffff808216947601000000000000000000000000000000000000000000008084048316957a010000000000000000000000000000000000000000000000000000850484169564010000000086048516956c0100000000000000000000000081048616957001000000000000000000000000000000008204169461ffff740100000000000000000000000000000000000000008304169460ff7e0100000000000000000000000000000000000000000000000000000000000084048116957f010000000000000000000000000000000000000000000000000000000000000090940481169492939190910416906133a9565b34801561074d57600080fd5b5060065461076a9068010000000000000000900463ffffffff1681565b60405163ffffffff90911681526020016101f0565b34801561078b57600080fd5b506101e661079a366004612e8d565b612134565b3480156107ab57600080fd5b5061024d6107ba366004613241565b612252565b3480156107cb57600080fd5b506101e660045481565b60025460009074010000000000000000000000000000000000000000900460ff16610861576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e666967757265640000000000000060448201526064015b60405180910390fd5b6002547501000000000000000000000000000000000000000000900460ff16156108e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610858565b60006108f1612266565b5090506109068563ffffffff168585846123bc565b95945050505050565b610917612523565b8163ffffffff168163ffffffff16111561096d576040517f2780dcb200000000000000000000000000000000000000000000000000000000815263ffffffff808316600483015283166024820152604401610858565b609b60ff891611156109b7576040517f3acc511a00000000000000000000000000000000000000000000000000000000815260ff89166004820152609b6024820152604401610858565b609b60ff88161115610a01576040517f3acc511a00000000000000000000000000000000000000000000000000000000815260ff88166004820152609b6024820152604401610858565b8b600660046101000a81548163ffffffff021916908363ffffffff1602179055508a6006600c6101000a81548163ffffffff021916908363ffffffff16021790555089600660106101000a81548163ffffffff021916908363ffffffff16021790555088600660146101000a81548161ffff021916908361ffff160217905550876006601e6101000a81548160ff021916908360ff160217905550866006601f6101000a81548160ff021916908360ff1602179055508560038190555084600260166101000a81548160ff021916908360ff1602179055506001600260146101000a81548160ff02191690831515021790555083600660006101000a81548163ffffffff021916908363ffffffff1602179055508260058190555081600660166101000a81548163ffffffff021916908363ffffffff160217905550806006601a6101000a81548163ffffffff021916908363ffffffff1602179055507f8aee1a8c131eaf1a5bd30594737b6926a7c5cb29281a97639f6ac93947c8995e8c8c8c8c8c8c8c8c8c8c8c6006601a9054906101000a900463ffffffff16604051610bb59c9b9a9998979695949392919061342a565b60405180910390a1505050505050505050505050565b60025460009074010000000000000000000000000000000000000000900460ff16610c52576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610858565b6002547501000000000000000000000000000000000000000000900460ff1615610cd8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610858565b610ce98363ffffffff16833a6125a6565b90505b92915050565b8151600003610d365780610d32576040517f6b81746e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b815160241115610d875781516040517f51200dce0000000000000000000000000000000000000000000000000000000081526108589160249160040161ffff92831681529116602082015260400190565b600082602381518110610d9c57610d9c6134a7565b6020910101517fff00000000000000000000000000000000000000000000000000000000000000167f0100000000000000000000000000000000000000000000000000000000000000149050808015610df25750815b15610e29576040517f6048aa6800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80158015610e35575081155b15610e6c576040517f6b81746e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b60025473ffffffffffffffffffffffffffffffffffffffff163314610ee4576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9091166024820152604401610858565b610e6c8383836126be565b60025460009074010000000000000000000000000000000000000000900460ff16610f76576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610858565b6002547501000000000000000000000000000000000000000000900460ff1615610ffc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610858565b6000611006612266565b50905061101b8463ffffffff16843a846123bc565b949350505050565b61102b612523565b600280547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1675010000000000000000000000000000000000000000001790556040517f75884cdadc4a89e8b545db800057f06ec7f5338a08183c7ba515f2bfdd9fe1e190600090a1565b61109e612523565b604051479060009073ffffffffffffffffffffffffffffffffffffffff84169083908381818185875af1925050503d80600081146110f8576040519150601f19603f3d011682016040523d82523d6000602084013e6110fd565b606091505b5050905080611168576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f6661696c656420746f207769746864726177206e6174697665000000000000006044820152606401610858565b8273ffffffffffffffffffffffffffffffffffffffff167fc303ca808382409472acbbf899c316cf439f409f6584aae22df86dfa3c9ed504836040516111b091815260200190565b60405180910390a2505050565b6111c5612523565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015611252573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061127691906134d6565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018390529192507f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303816000875af1158015611310573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133491906134ef565b61136a576040517f7c07fc4c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5826040516113b291815260200190565b60405180910390a25050565b60015473ffffffffffffffffffffffffffffffffffffffff16331461143f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610858565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60005473ffffffffffffffffffffffffffffffffffffffff1633148015906114fb575060025473ffffffffffffffffffffffffffffffffffffffff163314155b1561157f573361152060005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff93841660048201529183166024830152919091166044820152606401610858565b73ffffffffffffffffffffffffffffffffffffffff81166115cc576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527fd1a6a14209a385a964d036e404cb5cfb71f4000cdb03c9366292430787261be6906020015b60405180910390a150565b60025460009074010000000000000000000000000000000000000000900460ff166116cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610858565b6002547501000000000000000000000000000000000000000000900460ff1615611753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610858565b61179283838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509250610cf2915050565b600061179d876128a4565b905060006117b28863ffffffff16873a6125a6565b90508034101561181e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f66656520746f6f206c6f770000000000000000000000000000000000000000006044820152606401610858565b600254760100000000000000000000000000000000000000000000900460ff1663ffffffff871611156118ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6e756d576f72647320746f6f20686967680000000000000000000000000000006044820152606401610858565b60006040518060c0016040528060035481526020017f000000000000000000000000000000000000000000000000000000000000000081526020018961ffff168152602001600660049054906101000a900463ffffffff16858c611911919061353b565b61191b919061353b565b63ffffffff1681526020018863ffffffff16815260200187878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509152506002546040517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff1690639b1c385e906119c190849060040161355f565b6020604051808303816000875af11580156119e0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a0491906134d6565b6040805160608101825233815263ffffffff808d16602080840191825267ffffffffffffffff3a81168587019081526000888152600790935295909120935184549251955190911678010000000000000000000000000000000000000000000000000277ffffffffffffffffffffffffffffffffffffffffffffffff9590931674010000000000000000000000000000000000000000027fffffffffffffffff00000000000000000000000000000000000000000000000090921673ffffffffffffffffffffffffffffffffffffffff91909116171792909216919091179055935050505095945050505050565b611afa612523565b600280547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1690556040517fc0f961051f97b04c496472d11cb6170d844e4b2c9dfd3b602a4fa0139712d48490600090a1565b60025474010000000000000000000000000000000000000000900460ff16611bd1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610858565b6002547501000000000000000000000000000000000000000000900460ff1615611c57576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610858565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614611cf6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f6f6e6c792063616c6c61626c652066726f6d204c494e4b0000000000000000006044820152606401610858565b6000808080611d07858701876135bc565b9350935093509350611d1a816001610cf2565b6000611d25856128a4565b9050600080611d32612266565b915091506000611d4a8863ffffffff16873a866123bc565b9050808b1015611db6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f66656520746f6f206c6f770000000000000000000000000000000000000000006044820152606401610858565b600254760100000000000000000000000000000000000000000000900460ff1663ffffffff87161115611e45576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6e756d576f72647320746f6f20686967680000000000000000000000000000006044820152606401610858565b60006040518060c0016040528060035481526020017f000000000000000000000000000000000000000000000000000000000000000081526020018961ffff168152602001600660049054906101000a900463ffffffff16878c611ea9919061353b565b611eb3919061353b565b63ffffffff908116825289166020820152604090810188905260025490517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925060009173ffffffffffffffffffffffffffffffffffffffff90911690639b1c385e90611f2790859060040161355f565b6020604051808303816000875af1158015611f46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6a91906134d6565b905060405180606001604052808f73ffffffffffffffffffffffffffffffffffffffff1681526020018b63ffffffff1681526020013a67ffffffffffffffff168152506007600083815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160186101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055509050508060048190555083156120ab576005546040805183815260208101929092527f6ca648a381f22ead7e37773d934e64885dcf861fbfbb26c40354cbf0c4662d1a910160405180910390a15b5050505050505050505050505050565b6120c3612523565b600680547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff166801000000000000000063ffffffff8416908102919091179091556040519081527f697b48b8b76cebb09a54ec4ff810e8a181c96f65395d51c744db09c115d1d5d09060200161163b565b60025460009074010000000000000000000000000000000000000000900460ff166121bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610858565b6002547501000000000000000000000000000000000000000000900460ff1615612241576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610858565b61101b8463ffffffff1684846125a6565b61225a612523565b612263816128bc565b50565b6000806000600660009054906101000a900463ffffffff16905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156122ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123119190613645565b50919650909250505063ffffffff82161580159061233d57506123348142613695565b8263ffffffff16105b9250821561234b5760055493505b60008412156123b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496e76616c6964204c494e4b20776569207072696365000000000000000000006044820152606401610858565b50509091565b60065460009081906123dc90640100000000900463ffffffff16856136a8565b6006549091506000906124009068010000000000000000900463ffffffff166129b1565b61240b876000612a79565b61241b9063ffffffff16896136bf565b61242590876136a8565b61242f91906136bf565b6006549091506000906124829063ffffffff7a01000000000000000000000000000000000000000000000000000082048116917601000000000000000000000000000000000000000000009004166136d2565b6124979063ffffffff1664e8d4a510006136a8565b6006546064906124cd907f0100000000000000000000000000000000000000000000000000000000000000900460ff16826136ef565b6124da9060ff16856136a8565b6124e49190613737565b6124ee91906136bf565b9050846124fb82856136bf565b61250d90670de0b6b3a76400006136a8565b6125179190613737565b98975050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146125a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610858565b565b60065460009081906125c690640100000000900463ffffffff16846136a8565b6006549091506000906125ea9068010000000000000000900463ffffffff166129b1565b6125f5866001612a79565b6126059063ffffffff16886136bf565b61260f90866136a8565b61261991906136bf565b60065490915060009061265190760100000000000000000000000000000000000000000000900463ffffffff1664e8d4a510006136a8565b600654606490612686907e01000000000000000000000000000000000000000000000000000000000000900460ff16826136ef565b6126939060ff16856136a8565b61269d9190613737565b6126a791906136bf565b90506126b381846136bf565b979650505050505050565b60008381526007602081815260408084208151606081018352815473ffffffffffffffffffffffffffffffffffffffff808216835274010000000000000000000000000000000000000000820463ffffffff1683870152780100000000000000000000000000000000000000000000000090910467ffffffffffffffff1693820193909352888652939092529290558051909181166127b9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f72657175657374206e6f7420666f756e640000000000000000000000000000006044820152606401610858565b600080631fe543e360e01b8787876040516024016127d99392919061374b565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061284f856020015163ffffffff168584612b24565b90508061289a5760405173ffffffffffffffffffffffffffffffffffffffff85169089907fc551b83c151f2d1c7eeb938ac59008e0409f1c1dc1e2f112449d4d79b458902290600090a35b5050505050505050565b60006128b1603f836137a4565b610cec90600161353b565b3373ffffffffffffffffffffffffffffffffffffffff82160361293b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610858565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000466129bd81612b70565b15612a52576000606c73ffffffffffffffffffffffffffffffffffffffff166341b247a86040518163ffffffff1660e01b815260040160c060405180830381865afa158015612a10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a3491906137c7565b5050505091505083608c612a4891906136bf565b61101b90826136a8565b612a5b81612b93565b15612a7057612a6983612bda565b9392505050565b50600092915050565b60008115612ad457600654612aaa9074010000000000000000000000000000000000000000900461ffff1684613811565b600654612acd91906c01000000000000000000000000900463ffffffff1661353b565b9050610cec565b600654612afd9074010000000000000000000000000000000000000000900461ffff1684613811565b600654612acd9190700100000000000000000000000000000000900463ffffffff1661353b565b60005a611388811015612b3657600080fd5b611388810390508460408204820311612b4e57600080fd5b50823b612b5a57600080fd5b60008083516020850160008789f1949350505050565b600061a4b1821480612b84575062066eed82145b80610cec57505062066eee1490565b6000600a821480612ba557506101a482145b80612bb2575062aa37dc82145b80612bbe575061210582145b80612bcb575062014a3382145b80610cec57505062014a341490565b60008073420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff1663519b4bd36040518163ffffffff1660e01b8152600401602060405180830381865afa158015612c3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c6091906134d6565b9050600080612c6f8186613695565b90506000612c7e8260106136a8565b612c898460046136a8565b612c9391906136bf565b9050600073420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff16630c18c1626040518163ffffffff1660e01b8152600401602060405180830381865afa158015612cf6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d1a91906134d6565b9050600073420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff1663f45e65d86040518163ffffffff1660e01b8152600401602060405180830381865afa158015612d7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612da191906134d6565b9050600073420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015612e04573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e2891906134d6565b90506000612e3782600a613959565b905060008184612e4787896136bf565b612e51908c6136a8565b612e5b91906136a8565b612e659190613737565b9b9a5050505050505050505050565b803563ffffffff81168114612e8857600080fd5b919050565b600080600060608486031215612ea257600080fd5b612eab84612e74565b9250612eb960208501612e74565b9150604084013590509250925092565b803561ffff81168114612e8857600080fd5b803560ff81168114612e8857600080fd5b6000806000806000806000806000806000806101808d8f031215612f0f57600080fd5b612f188d612e74565b9b50612f2660208e01612e74565b9a50612f3460408e01612e74565b9950612f4260608e01612ec9565b9850612f5060808e01612edb565b9750612f5e60a08e01612edb565b965060c08d01359550612f7360e08e01612edb565b9450612f826101008e01612e74565b93506101208d01359250612f996101408e01612e74565b9150612fa86101608e01612e74565b90509295989b509295989b509295989b565b60008060408385031215612fcd57600080fd5b612fd683612e74565b9150612fe460208401612e74565b90509250929050565b6000815180845260005b8181101561301357602081850181015186830182015201612ff7565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000610ce96020830184612fed565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f8301126130a457600080fd5b813567ffffffffffffffff808211156130bf576130bf613064565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561310557613105613064565b8160405283815286602085880101111561311e57600080fd5b836020870160208301376000602085830101528094505050505092915050565b801515811461226357600080fd5b6000806040838503121561315f57600080fd5b823567ffffffffffffffff81111561317657600080fd5b61318285828601613093565b92505060208301356131938161313e565b809150509250929050565b6000806000604084860312156131b357600080fd5b83359250602084013567ffffffffffffffff808211156131d257600080fd5b818601915086601f8301126131e657600080fd5b8135818111156131f557600080fd5b8760208260051b850101111561320a57600080fd5b6020830194508093505050509250925092565b803573ffffffffffffffffffffffffffffffffffffffff81168114612e8857600080fd5b60006020828403121561325357600080fd5b610ce98261321d565b60006020828403121561326e57600080fd5b5035919050565b60008083601f84011261328757600080fd5b50813567ffffffffffffffff81111561329f57600080fd5b6020830191508360208285010111156132b757600080fd5b9250929050565b6000806000806000608086880312156132d657600080fd5b6132df86612e74565b94506132ed60208701612ec9565b93506132fb60408701612e74565b9250606086013567ffffffffffffffff81111561331757600080fd5b61332388828901613275565b969995985093965092949392505050565b6000806000806060858703121561334a57600080fd5b6133538561321d565b935060208501359250604085013567ffffffffffffffff81111561337657600080fd5b61338287828801613275565b95989497509550505050565b6000602082840312156133a057600080fd5b610ce982612e74565b8c815263ffffffff8c811660208301528b811660408301528a81166060830152898116608083015288811660a0830152871660c082015261ffff861660e082015260ff858116610100830152841661012082015261018081018361014083015261341961016083018460ff169052565b9d9c50505050505050505050505050565b63ffffffff8d811682528c811660208301528b8116604083015261ffff8b16606083015260ff8a8116608084015289811660a084015260c08301899052871660e0830152851661010082015261018081018461012083015261349561014083018563ffffffff169052565b63ffffffff8316610160830152613419565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156134e857600080fd5b5051919050565b60006020828403121561350157600080fd5b8151612a698161313e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b63ffffffff8181168382160190808211156135585761355861350c565b5092915050565b60208152815160208201526020820151604082015261ffff60408301511660608201526000606083015163ffffffff80821660808501528060808601511660a0850152505060a083015160c08084015261101b60e0840182612fed565b600080600080608085870312156135d257600080fd5b6135db85612e74565b93506135e960208601612ec9565b92506135f760408601612e74565b9150606085013567ffffffffffffffff81111561361357600080fd5b61361f87828801613093565b91505092959194509250565b805169ffffffffffffffffffff81168114612e8857600080fd5b600080600080600060a0868803121561365d57600080fd5b6136668661362b565b94506020860151935060408601519250606086015191506136896080870161362b565b90509295509295909350565b81810381811115610cec57610cec61350c565b8082028115828204841417610cec57610cec61350c565b80820180821115610cec57610cec61350c565b63ffffffff8281168282160390808211156135585761355861350c565b60ff8181168382160190811115610cec57610cec61350c565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261374657613746613708565b500490565b8381526040602082015281604082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561378a57600080fd5b8260051b8085606085013791909101606001949350505050565b600063ffffffff808416806137bb576137bb613708565b92169190910492915050565b60008060008060008060c087890312156137e057600080fd5b865195506020870151945060408701519350606087015192506080870151915060a087015190509295509295509295565b63ffffffff8181168382160280821691908281146138315761383161350c565b505092915050565b600181815b8085111561389257817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156138785761387861350c565b8085161561388557918102915b93841c939080029061383e565b509250929050565b6000826138a957506001610cec565b816138b657506000610cec565b81600181146138cc57600281146138d6576138f2565b6001915050610cec565b60ff8411156138e7576138e761350c565b50506001821b610cec565b5060208310610133831016604e8410600b8410161715613915575081810a610cec565b61391f8383613839565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156139515761395161350c565b029392505050565b6000610ce9838361389a56fea164736f6c6343000813000a", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_link\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_linkNativeFeed\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_coordinator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_subId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"FailedToTransferLink\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"expectedMinimumLength\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"actualLength\",\"type\":\"uint16\"}],\"name\":\"IncorrectExtraArgsLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"premiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"max\",\"type\":\"uint8\"}],\"name\":\"InvalidPremiumPercentage\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LINKPaymentInRequestRandomWordsInNative\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LinkAlreadySet\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"flatFeeLinkDiscountPPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeNativePPM\",\"type\":\"uint32\"}],\"name\":\"LinkDiscountTooHigh\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NativePaymentInOnTokenTransfer\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"want\",\"type\":\"address\"}],\"name\":\"OnlyCoordinatorCanFulfill\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"}],\"name\":\"OnlyOwnerOrCoordinator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SubscriptionIdMissing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"wrapperGasOverhead\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"coordinatorGasOverheadNative\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"coordinatorGasOverheadLink\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"coordinatorGasOverheadPerWord\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"coordinatorNativePremiumPercentage\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"coordinatorLinkPremiumPercentage\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"maxNumWords\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"stalenessSeconds\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"fallbackWeiPerUnitLink\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeNativePPM\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkDiscountPPM\",\"type\":\"uint32\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"}],\"name\":\"CoordinatorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Disabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Enabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"fallbackWeiPerUnitLink\",\"type\":\"int256\"}],\"name\":\"FallbackWeiPerUnitLinkUsed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"size\",\"type\":\"uint32\"}],\"name\":\"FulfillmentTxSizeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"NativeWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"WrapperFulfillmentFailed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"SUBSCRIPTION_ID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"}],\"name\":\"calculateRequestPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"}],\"name\":\"calculateRequestPriceNative\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isLinkMode\",\"type\":\"bool\"}],\"name\":\"checkPaymentMode\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disable\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"enable\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_requestGasPriceWei\",\"type\":\"uint256\"}],\"name\":\"estimateRequestPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_requestGasPriceWei\",\"type\":\"uint256\"}],\"name\":\"estimateRequestPriceNative\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"fallbackWeiPerUnitLink\",\"type\":\"int256\"},{\"internalType\":\"uint32\",\"name\":\"stalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeNativePPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkDiscountPPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"wrapperGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"coordinatorGasOverheadNative\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"coordinatorGasOverheadLink\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"coordinatorGasOverheadPerWord\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"wrapperNativePremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"wrapperLinkPremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"maxNumWords\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastRequestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"link\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"linkNativeFeed\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"onTokenTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"}],\"name\":\"rawFulfillRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"_requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"}],\"name\":\"requestRandomWordsInNative\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_callbacks\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"callbackAddress\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"requestGasPrice\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_configured\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_disabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_fulfillmentTxSizeBytes\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_vrfCoordinator\",\"outputs\":[{\"internalType\":\"contractIVRFCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_wrapperGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_coordinatorGasOverheadNative\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_coordinatorGasOverheadLink\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"_coordinatorGasOverheadPerWord\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"_coordinatorNativePremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"_coordinatorLinkPremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"_keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"_maxNumWords\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"_stalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"int256\",\"name\":\"_fallbackWeiPerUnitLink\",\"type\":\"int256\"},{\"internalType\":\"uint32\",\"name\":\"_fulfillmentFlatFeeNativePPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_fulfillmentFlatFeeLinkDiscountPPM\",\"type\":\"uint32\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_size\",\"type\":\"uint32\"}],\"name\":\"setFulfillmentTxSize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_recipient\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_recipient\",\"type\":\"address\"}],\"name\":\"withdrawNative\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x60e06040526006805463ffffffff60401b191669030400000000000000001790553480156200002d57600080fd5b506040516200389d3803806200389d8339810160408190526200005091620002a1565b813380600081620000a85760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000db57620000db81620001d9565b5050506001600160a01b038116620001065760405163d92e233d60e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392831617905584811660a052831660c0526000819003620001505760405163a81c0bef60e01b815260040160405180910390fd5b60025460405163dc311dd360e01b8152600481018390526001600160a01b039091169063dc311dd390602401600060405180830381865afa1580156200019a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620001c4919081019062000321565b505050608092909252506200044a9350505050565b336001600160a01b03821603620002335760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016200009f565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b03811681146200029c57600080fd5b919050565b60008060008060808587031215620002b857600080fd5b620002c38562000284565b9350620002d36020860162000284565b9250620002e36040860162000284565b6060959095015193969295505050565b80516001600160601b03811681146200029c57600080fd5b634e487b7160e01b600052604160045260246000fd5b600080600080600060a086880312156200033a57600080fd5b6200034586620002f3565b9450602062000356818801620002f3565b60408801519095506001600160401b0380821682146200037557600080fd5b8195506200038660608a0162000284565b945060808901519150808211156200039d57600080fd5b818901915089601f830112620003b257600080fd5b815181811115620003c757620003c76200030b565b8060051b604051601f19603f83011681018181108582111715620003ef57620003ef6200030b565b60405291825284820192508381018501918c8311156200040e57600080fd5b938501935b828510156200043757620004278562000284565b8452938501939285019262000413565b8096505050505050509295509295909350565b60805160a05160c0516133f9620004a46000396000818161037e01526122840152600081816102ea015281816111f6015281816112c50152611c6f01526000818161020b015281816118c40152611e5c01526133f96000f3fe6080604052600436106101c15760003560e01c806357a8070a116100f7578063a4c0ed3611610095578063cdd8d88511610064578063cdd8d88514610741578063e1cab7451461077f578063f2fde38b1461079f578063fc2a88c3146107bf57600080fd5b8063a4c0ed36146105b9578063a608a1e1146105d9578063bf17e5591461060c578063c3f909d41461062c57600080fd5b80638ea98117116100d15780638ea98117146105445780639cfc058e146105645780639eccacf614610577578063a3907d71146105a457600080fd5b806357a8070a146104c257806379ba5097146105045780638da5cb5b1461051957600080fd5b80631fe543e3116101645780632f2770db1161013e5780632f2770db146103a25780632f622e6b146103b757806348baa1c5146103d757806351cff8d9146104a257600080fd5b80631fe543e31461032f57806327e5c50a1461034f5780632808e6c81461036f57600080fd5b806313c34b7f116101a057806313c34b7f1461024f578063181f5a771461026f57806318b6f4c8146102bb5780631c4695f4146102db57600080fd5b806226501b146101c6578063030932bb146101f9578063045343aa1461022d575b600080fd5b3480156101d257600080fd5b506101e66101e1366004612a83565b6107d5565b6040519081526020015b60405180910390f35b34801561020557600080fd5b506101e67f000000000000000000000000000000000000000000000000000000000000000081565b34801561023957600080fd5b5061024d610248366004612ae2565b61090f565b005b34801561025b57600080fd5b506101e661026a366004612bb0565b610bcb565b34801561027b57600080fd5b50604080518082018252601681527f5652465632506c75735772617070657220312e302e3000000000000000000000602082015290516101f09190612c47565b3480156102c757600080fd5b5061024d6102d6366004612d42565b610cf2565b3480156102e757600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101f0565b34801561033b57600080fd5b5061024d61034a366004612d94565b610e71565b34801561035b57600080fd5b506101e661036a366004612bb0565b610eef565b34801561037b57600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061030a565b3480156103ae57600080fd5b5061024d611023565b3480156103c357600080fd5b5061024d6103d2366004612e37565b611096565b3480156103e357600080fd5b506104616103f2366004612e52565b60076020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff81169074010000000000000000000000000000000000000000810463ffffffff16907801000000000000000000000000000000000000000000000000900467ffffffffffffffff1683565b6040805173ffffffffffffffffffffffffffffffffffffffff909416845263ffffffff909216602084015267ffffffffffffffff16908201526060016101f0565b3480156104ae57600080fd5b5061024d6104bd366004612e37565b6111bd565b3480156104ce57600080fd5b506002546104f49074010000000000000000000000000000000000000000900460ff1681565b60405190151581526020016101f0565b34801561051057600080fd5b5061024d6113be565b34801561052557600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff1661030a565b34801561055057600080fd5b5061024d61055f366004612e37565b6114bb565b6101e6610572366004612eb4565b611646565b34801561058357600080fd5b5060025461030a9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156105b057600080fd5b5061024d611af2565b3480156105c557600080fd5b5061024d6105d4366004612f2a565b611b4d565b3480156105e557600080fd5b506002546104f4907501000000000000000000000000000000000000000000900460ff1681565b34801561061857600080fd5b5061024d610627366004612f84565b6120bb565b34801561063857600080fd5b506005546006546003546002546040516101f0949363ffffffff808216947601000000000000000000000000000000000000000000008084048316957a010000000000000000000000000000000000000000000000000000850484169564010000000086048516956c0100000000000000000000000081048616957001000000000000000000000000000000008204169461ffff740100000000000000000000000000000000000000008304169460ff7e0100000000000000000000000000000000000000000000000000000000000084048116957f01000000000000000000000000000000000000000000000000000000000000009094048116949293919091041690612f9f565b34801561074d57600080fd5b5060065461076a9068010000000000000000900463ffffffff1681565b60405163ffffffff90911681526020016101f0565b34801561078b57600080fd5b506101e661079a366004612a83565b612134565b3480156107ab57600080fd5b5061024d6107ba366004612e37565b612252565b3480156107cb57600080fd5b506101e660045481565b60025460009074010000000000000000000000000000000000000000900460ff16610861576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e666967757265640000000000000060448201526064015b60405180910390fd5b6002547501000000000000000000000000000000000000000000900460ff16156108e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610858565b60006108f1612266565b5090506109068563ffffffff168585846123bc565b95945050505050565b610917612504565b8163ffffffff168163ffffffff16111561096d576040517f2780dcb200000000000000000000000000000000000000000000000000000000815263ffffffff808316600483015283166024820152604401610858565b609b60ff891611156109b7576040517f3acc511a00000000000000000000000000000000000000000000000000000000815260ff89166004820152609b6024820152604401610858565b609b60ff88161115610a01576040517f3acc511a00000000000000000000000000000000000000000000000000000000815260ff88166004820152609b6024820152604401610858565b8b600660046101000a81548163ffffffff021916908363ffffffff1602179055508a6006600c6101000a81548163ffffffff021916908363ffffffff16021790555089600660106101000a81548163ffffffff021916908363ffffffff16021790555088600660146101000a81548161ffff021916908361ffff160217905550876006601e6101000a81548160ff021916908360ff160217905550866006601f6101000a81548160ff021916908360ff1602179055508560038190555084600260166101000a81548160ff021916908360ff1602179055506001600260146101000a81548160ff02191690831515021790555083600660006101000a81548163ffffffff021916908363ffffffff1602179055508260058190555081600660166101000a81548163ffffffff021916908363ffffffff160217905550806006601a6101000a81548163ffffffff021916908363ffffffff1602179055507f8aee1a8c131eaf1a5bd30594737b6926a7c5cb29281a97639f6ac93947c8995e8c8c8c8c8c8c8c8c8c8c8c6006601a9054906101000a900463ffffffff16604051610bb59c9b9a99989796959493929190613020565b60405180910390a1505050505050505050505050565b60025460009074010000000000000000000000000000000000000000900460ff16610c52576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610858565b6002547501000000000000000000000000000000000000000000900460ff1615610cd8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610858565b610ce98363ffffffff16833a612587565b90505b92915050565b8151600003610d365780610d32576040517f6b81746e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b815160241115610d875781516040517f51200dce0000000000000000000000000000000000000000000000000000000081526108589160249160040161ffff92831681529116602082015260400190565b600082602381518110610d9c57610d9c61309d565b6020910101517fff00000000000000000000000000000000000000000000000000000000000000167f0100000000000000000000000000000000000000000000000000000000000000149050808015610df25750815b15610e29576040517f6048aa6800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80158015610e35575081155b15610e6c576040517f6b81746e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b60025473ffffffffffffffffffffffffffffffffffffffff163314610ee4576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9091166024820152604401610858565b610e6c838383612680565b60025460009074010000000000000000000000000000000000000000900460ff16610f76576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610858565b6002547501000000000000000000000000000000000000000000900460ff1615610ffc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610858565b6000611006612266565b50905061101b8463ffffffff16843a846123bc565b949350505050565b61102b612504565b600280547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1675010000000000000000000000000000000000000000001790556040517f75884cdadc4a89e8b545db800057f06ec7f5338a08183c7ba515f2bfdd9fe1e190600090a1565b61109e612504565b604051479060009073ffffffffffffffffffffffffffffffffffffffff84169083908381818185875af1925050503d80600081146110f8576040519150601f19603f3d011682016040523d82523d6000602084013e6110fd565b606091505b5050905080611168576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f6661696c656420746f207769746864726177206e6174697665000000000000006044820152606401610858565b8273ffffffffffffffffffffffffffffffffffffffff167fc303ca808382409472acbbf899c316cf439f409f6584aae22df86dfa3c9ed504836040516111b091815260200190565b60405180910390a2505050565b6111c5612504565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015611252573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061127691906130cc565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018390529192507f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303816000875af1158015611310573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133491906130e5565b61136a576040517f7c07fc4c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5826040516113b291815260200190565b60405180910390a25050565b60015473ffffffffffffffffffffffffffffffffffffffff16331461143f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610858565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60005473ffffffffffffffffffffffffffffffffffffffff1633148015906114fb575060025473ffffffffffffffffffffffffffffffffffffffff163314155b1561157f573361152060005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff93841660048201529183166024830152919091166044820152606401610858565b73ffffffffffffffffffffffffffffffffffffffff81166115cc576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527fd1a6a14209a385a964d036e404cb5cfb71f4000cdb03c9366292430787261be6906020015b60405180910390a150565b60025460009074010000000000000000000000000000000000000000900460ff166116cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610858565b6002547501000000000000000000000000000000000000000000900460ff1615611753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610858565b61179283838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509250610cf2915050565b600061179d87612866565b905060006117b28863ffffffff16873a612587565b90508034101561181e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f66656520746f6f206c6f770000000000000000000000000000000000000000006044820152606401610858565b600254760100000000000000000000000000000000000000000000900460ff1663ffffffff871611156118ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6e756d576f72647320746f6f20686967680000000000000000000000000000006044820152606401610858565b60006040518060c0016040528060035481526020017f000000000000000000000000000000000000000000000000000000000000000081526020018961ffff168152602001600660049054906101000a900463ffffffff16858c6119119190613138565b61191b9190613138565b63ffffffff1681526020018863ffffffff16815260200187878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509152506002546040517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff1690639b1c385e906119c190849060040161315c565b6020604051808303816000875af11580156119e0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a0491906130cc565b6040805160608101825233815263ffffffff808d16602080840191825267ffffffffffffffff3a81168587019081526000888152600790935295909120935184549251955190911678010000000000000000000000000000000000000000000000000277ffffffffffffffffffffffffffffffffffffffffffffffff9590931674010000000000000000000000000000000000000000027fffffffffffffffff00000000000000000000000000000000000000000000000090921673ffffffffffffffffffffffffffffffffffffffff91909116171792909216919091179055935050505095945050505050565b611afa612504565b600280547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1690556040517fc0f961051f97b04c496472d11cb6170d844e4b2c9dfd3b602a4fa0139712d48490600090a1565b60025474010000000000000000000000000000000000000000900460ff16611bd1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610858565b6002547501000000000000000000000000000000000000000000900460ff1615611c57576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610858565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614611cf6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f6f6e6c792063616c6c61626c652066726f6d204c494e4b0000000000000000006044820152606401610858565b6000808080611d07858701876131b9565b9350935093509350611d1a816001610cf2565b6000611d2585612866565b9050600080611d32612266565b915091506000611d4a8863ffffffff16873a866123bc565b9050808b1015611db6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f66656520746f6f206c6f770000000000000000000000000000000000000000006044820152606401610858565b600254760100000000000000000000000000000000000000000000900460ff1663ffffffff87161115611e45576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6e756d576f72647320746f6f20686967680000000000000000000000000000006044820152606401610858565b60006040518060c0016040528060035481526020017f000000000000000000000000000000000000000000000000000000000000000081526020018961ffff168152602001600660049054906101000a900463ffffffff16878c611ea99190613138565b611eb39190613138565b63ffffffff908116825289166020820152604090810188905260025490517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925060009173ffffffffffffffffffffffffffffffffffffffff90911690639b1c385e90611f2790859060040161315c565b6020604051808303816000875af1158015611f46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6a91906130cc565b905060405180606001604052808f73ffffffffffffffffffffffffffffffffffffffff1681526020018b63ffffffff1681526020013a67ffffffffffffffff168152506007600083815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160186101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055509050508060048190555083156120ab576005546040805183815260208101929092527f6ca648a381f22ead7e37773d934e64885dcf861fbfbb26c40354cbf0c4662d1a910160405180910390a15b5050505050505050505050505050565b6120c3612504565b600680547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff166801000000000000000063ffffffff8416908102919091179091556040519081527f697b48b8b76cebb09a54ec4ff810e8a181c96f65395d51c744db09c115d1d5d09060200161163b565b60025460009074010000000000000000000000000000000000000000900460ff166121bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610858565b6002547501000000000000000000000000000000000000000000900460ff1615612241576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610858565b61101b8463ffffffff168484612587565b61225a612504565b6122638161287e565b50565b6000806000600660009054906101000a900463ffffffff16905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156122ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123119190613242565b50919650909250505063ffffffff82161580159061233d57506123348142613292565b8263ffffffff16105b9250821561234b5760055493505b60008412156123b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496e76616c6964204c494e4b20776569207072696365000000000000000000006044820152606401610858565b50509091565b60065460009081906123dc90640100000000900463ffffffff16856132a5565b90506000806123ec876000612973565b6123fc9063ffffffff16896132bc565b61240690876132a5565b61241091906132bc565b6006549091506000906124639063ffffffff7a01000000000000000000000000000000000000000000000000000082048116917601000000000000000000000000000000000000000000009004166132cf565b6124789063ffffffff1664e8d4a510006132a5565b6006546064906124ae907f0100000000000000000000000000000000000000000000000000000000000000900460ff16826132ec565b6124bb9060ff16856132a5565b6124c59190613334565b6124cf91906132bc565b9050846124dc82856132bc565b6124ee90670de0b6b3a76400006132a5565b6124f89190613334565b98975050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314612585576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610858565b565b60065460009081906125a790640100000000900463ffffffff16846132a5565b90506000806125b7866001612973565b6125c79063ffffffff16886132bc565b6125d190866132a5565b6125db91906132bc565b60065490915060009061261390760100000000000000000000000000000000000000000000900463ffffffff1664e8d4a510006132a5565b600654606490612648907e01000000000000000000000000000000000000000000000000000000000000900460ff16826132ec565b6126559060ff16856132a5565b61265f9190613334565b61266991906132bc565b905061267581846132bc565b979650505050505050565b60008381526007602081815260408084208151606081018352815473ffffffffffffffffffffffffffffffffffffffff808216835274010000000000000000000000000000000000000000820463ffffffff1683870152780100000000000000000000000000000000000000000000000090910467ffffffffffffffff16938201939093528886529390925292905580519091811661277b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f72657175657374206e6f7420666f756e640000000000000000000000000000006044820152606401610858565b600080631fe543e360e01b87878760405160240161279b93929190613348565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506000612811856020015163ffffffff168584612a1e565b90508061285c5760405173ffffffffffffffffffffffffffffffffffffffff85169089907fc551b83c151f2d1c7eeb938ac59008e0409f1c1dc1e2f112449d4d79b458902290600090a35b5050505050505050565b6000612873603f836133a1565b610cec906001613138565b3373ffffffffffffffffffffffffffffffffffffffff8216036128fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610858565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600081156129ce576006546129a49074010000000000000000000000000000000000000000900461ffff16846133c4565b6006546129c791906c01000000000000000000000000900463ffffffff16613138565b9050610cec565b6006546129f79074010000000000000000000000000000000000000000900461ffff16846133c4565b6006546129c79190700100000000000000000000000000000000900463ffffffff16613138565b60005a611388811015612a3057600080fd5b611388810390508460408204820311612a4857600080fd5b50823b612a5457600080fd5b60008083516020850160008789f1949350505050565b803563ffffffff81168114612a7e57600080fd5b919050565b600080600060608486031215612a9857600080fd5b612aa184612a6a565b9250612aaf60208501612a6a565b9150604084013590509250925092565b803561ffff81168114612a7e57600080fd5b803560ff81168114612a7e57600080fd5b6000806000806000806000806000806000806101808d8f031215612b0557600080fd5b612b0e8d612a6a565b9b50612b1c60208e01612a6a565b9a50612b2a60408e01612a6a565b9950612b3860608e01612abf565b9850612b4660808e01612ad1565b9750612b5460a08e01612ad1565b965060c08d01359550612b6960e08e01612ad1565b9450612b786101008e01612a6a565b93506101208d01359250612b8f6101408e01612a6a565b9150612b9e6101608e01612a6a565b90509295989b509295989b509295989b565b60008060408385031215612bc357600080fd5b612bcc83612a6a565b9150612bda60208401612a6a565b90509250929050565b6000815180845260005b81811015612c0957602081850181015186830182015201612bed565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000610ce96020830184612be3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112612c9a57600080fd5b813567ffffffffffffffff80821115612cb557612cb5612c5a565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715612cfb57612cfb612c5a565b81604052838152866020858801011115612d1457600080fd5b836020870160208301376000602085830101528094505050505092915050565b801515811461226357600080fd5b60008060408385031215612d5557600080fd5b823567ffffffffffffffff811115612d6c57600080fd5b612d7885828601612c89565b9250506020830135612d8981612d34565b809150509250929050565b600080600060408486031215612da957600080fd5b83359250602084013567ffffffffffffffff80821115612dc857600080fd5b818601915086601f830112612ddc57600080fd5b813581811115612deb57600080fd5b8760208260051b8501011115612e0057600080fd5b6020830194508093505050509250925092565b803573ffffffffffffffffffffffffffffffffffffffff81168114612a7e57600080fd5b600060208284031215612e4957600080fd5b610ce982612e13565b600060208284031215612e6457600080fd5b5035919050565b60008083601f840112612e7d57600080fd5b50813567ffffffffffffffff811115612e9557600080fd5b602083019150836020828501011115612ead57600080fd5b9250929050565b600080600080600060808688031215612ecc57600080fd5b612ed586612a6a565b9450612ee360208701612abf565b9350612ef160408701612a6a565b9250606086013567ffffffffffffffff811115612f0d57600080fd5b612f1988828901612e6b565b969995985093965092949392505050565b60008060008060608587031215612f4057600080fd5b612f4985612e13565b935060208501359250604085013567ffffffffffffffff811115612f6c57600080fd5b612f7887828801612e6b565b95989497509550505050565b600060208284031215612f9657600080fd5b610ce982612a6a565b8c815263ffffffff8c811660208301528b811660408301528a81166060830152898116608083015288811660a0830152871660c082015261ffff861660e082015260ff858116610100830152841661012082015261018081018361014083015261300f61016083018460ff169052565b9d9c50505050505050505050505050565b63ffffffff8d811682528c811660208301528b8116604083015261ffff8b16606083015260ff8a8116608084015289811660a084015260c08301899052871660e0830152851661010082015261018081018461012083015261308b61014083018563ffffffff169052565b63ffffffff831661016083015261300f565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156130de57600080fd5b5051919050565b6000602082840312156130f757600080fd5b815161310281612d34565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b63ffffffff81811683821601908082111561315557613155613109565b5092915050565b60208152815160208201526020820151604082015261ffff60408301511660608201526000606083015163ffffffff80821660808501528060808601511660a0850152505060a083015160c08084015261101b60e0840182612be3565b600080600080608085870312156131cf57600080fd5b6131d885612a6a565b93506131e660208601612abf565b92506131f460408601612a6a565b9150606085013567ffffffffffffffff81111561321057600080fd5b61321c87828801612c89565b91505092959194509250565b805169ffffffffffffffffffff81168114612a7e57600080fd5b600080600080600060a0868803121561325a57600080fd5b61326386613228565b945060208601519350604086015192506060860151915061328660808701613228565b90509295509295909350565b81810381811115610cec57610cec613109565b8082028115828204841417610cec57610cec613109565b80820180821115610cec57610cec613109565b63ffffffff82811682821603908082111561315557613155613109565b60ff8181168382160190811115610cec57610cec613109565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261334357613343613305565b500490565b8381526040602082015281604082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561338757600080fd5b8260051b8085606085013791909101606001949350505050565b600063ffffffff808416806133b8576133b8613305565b92169190910492915050565b63ffffffff8181168382160280821691908281146133e4576133e4613109565b50509291505056fea164736f6c6343000813000a", } var VRFV2PlusWrapperABI = VRFV2PlusWrapperMetaData.ABI @@ -666,16 +666,16 @@ func (_VRFV2PlusWrapper *VRFV2PlusWrapperTransactorSession) SetCoordinator(_vrfC return _VRFV2PlusWrapper.Contract.SetCoordinator(&_VRFV2PlusWrapper.TransactOpts, _vrfCoordinator) } -func (_VRFV2PlusWrapper *VRFV2PlusWrapperTransactor) SetFulfillmentTxSize(opts *bind.TransactOpts, size uint32) (*types.Transaction, error) { - return _VRFV2PlusWrapper.contract.Transact(opts, "setFulfillmentTxSize", size) +func (_VRFV2PlusWrapper *VRFV2PlusWrapperTransactor) SetFulfillmentTxSize(opts *bind.TransactOpts, _size uint32) (*types.Transaction, error) { + return _VRFV2PlusWrapper.contract.Transact(opts, "setFulfillmentTxSize", _size) } -func (_VRFV2PlusWrapper *VRFV2PlusWrapperSession) SetFulfillmentTxSize(size uint32) (*types.Transaction, error) { - return _VRFV2PlusWrapper.Contract.SetFulfillmentTxSize(&_VRFV2PlusWrapper.TransactOpts, size) +func (_VRFV2PlusWrapper *VRFV2PlusWrapperSession) SetFulfillmentTxSize(_size uint32) (*types.Transaction, error) { + return _VRFV2PlusWrapper.Contract.SetFulfillmentTxSize(&_VRFV2PlusWrapper.TransactOpts, _size) } -func (_VRFV2PlusWrapper *VRFV2PlusWrapperTransactorSession) SetFulfillmentTxSize(size uint32) (*types.Transaction, error) { - return _VRFV2PlusWrapper.Contract.SetFulfillmentTxSize(&_VRFV2PlusWrapper.TransactOpts, size) +func (_VRFV2PlusWrapper *VRFV2PlusWrapperTransactorSession) SetFulfillmentTxSize(_size uint32) (*types.Transaction, error) { + return _VRFV2PlusWrapper.Contract.SetFulfillmentTxSize(&_VRFV2PlusWrapper.TransactOpts, _size) } func (_VRFV2PlusWrapper *VRFV2PlusWrapperTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { @@ -2243,7 +2243,7 @@ type VRFV2PlusWrapperInterface interface { SetCoordinator(opts *bind.TransactOpts, _vrfCoordinator common.Address) (*types.Transaction, error) - SetFulfillmentTxSize(opts *bind.TransactOpts, size uint32) (*types.Transaction, error) + SetFulfillmentTxSize(opts *bind.TransactOpts, _size uint32) (*types.Transaction, error) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) diff --git a/core/gethwrappers/generated/vrfv2plus_wrapper_arbitrum/vrfv2plus_wrapper_arbitrum.go b/core/gethwrappers/generated/vrfv2plus_wrapper_arbitrum/vrfv2plus_wrapper_arbitrum.go new file mode 100644 index 00000000000..6c02de7b94e --- /dev/null +++ b/core/gethwrappers/generated/vrfv2plus_wrapper_arbitrum/vrfv2plus_wrapper_arbitrum.go @@ -0,0 +1,2323 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package vrfv2plus_wrapper_arbitrum + +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 +) + +var VRFV2PlusWrapperArbitrumMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_link\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_linkNativeFeed\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_coordinator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_subId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"FailedToTransferLink\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"expectedMinimumLength\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"actualLength\",\"type\":\"uint16\"}],\"name\":\"IncorrectExtraArgsLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"premiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"max\",\"type\":\"uint8\"}],\"name\":\"InvalidPremiumPercentage\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LINKPaymentInRequestRandomWordsInNative\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LinkAlreadySet\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"flatFeeLinkDiscountPPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeNativePPM\",\"type\":\"uint32\"}],\"name\":\"LinkDiscountTooHigh\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NativePaymentInOnTokenTransfer\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"want\",\"type\":\"address\"}],\"name\":\"OnlyCoordinatorCanFulfill\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"}],\"name\":\"OnlyOwnerOrCoordinator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SubscriptionIdMissing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"wrapperGasOverhead\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"coordinatorGasOverheadNative\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"coordinatorGasOverheadLink\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"coordinatorGasOverheadPerWord\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"coordinatorNativePremiumPercentage\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"coordinatorLinkPremiumPercentage\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"maxNumWords\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"stalenessSeconds\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"fallbackWeiPerUnitLink\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeNativePPM\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkDiscountPPM\",\"type\":\"uint32\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"}],\"name\":\"CoordinatorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Disabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Enabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"fallbackWeiPerUnitLink\",\"type\":\"int256\"}],\"name\":\"FallbackWeiPerUnitLinkUsed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"size\",\"type\":\"uint32\"}],\"name\":\"FulfillmentTxSizeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"NativeWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"WrapperFulfillmentFailed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"SUBSCRIPTION_ID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"}],\"name\":\"calculateRequestPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"}],\"name\":\"calculateRequestPriceNative\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isLinkMode\",\"type\":\"bool\"}],\"name\":\"checkPaymentMode\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disable\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"enable\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_requestGasPriceWei\",\"type\":\"uint256\"}],\"name\":\"estimateRequestPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_requestGasPriceWei\",\"type\":\"uint256\"}],\"name\":\"estimateRequestPriceNative\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"fallbackWeiPerUnitLink\",\"type\":\"int256\"},{\"internalType\":\"uint32\",\"name\":\"stalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeNativePPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkDiscountPPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"wrapperGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"coordinatorGasOverheadNative\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"coordinatorGasOverheadLink\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"coordinatorGasOverheadPerWord\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"wrapperNativePremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"wrapperLinkPremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"maxNumWords\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastRequestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"link\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"linkNativeFeed\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"onTokenTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"}],\"name\":\"rawFulfillRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"_requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"}],\"name\":\"requestRandomWordsInNative\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_callbacks\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"callbackAddress\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"requestGasPrice\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_configured\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_disabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_fulfillmentTxSizeBytes\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_vrfCoordinator\",\"outputs\":[{\"internalType\":\"contractIVRFCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_wrapperGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_coordinatorGasOverheadNative\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_coordinatorGasOverheadLink\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"_coordinatorGasOverheadPerWord\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"_coordinatorNativePremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"_coordinatorLinkPremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"_keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"_maxNumWords\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"_stalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"int256\",\"name\":\"_fallbackWeiPerUnitLink\",\"type\":\"int256\"},{\"internalType\":\"uint32\",\"name\":\"_fulfillmentFlatFeeNativePPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_fulfillmentFlatFeeLinkDiscountPPM\",\"type\":\"uint32\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_size\",\"type\":\"uint32\"}],\"name\":\"setFulfillmentTxSize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_recipient\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_recipient\",\"type\":\"address\"}],\"name\":\"withdrawNative\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x60e06040526006805463ffffffff60401b191669030400000000000000001790553480156200002d57600080fd5b50604051620039b4380380620039b48339810160408190526200005091620002a9565b83838383813380600081620000ac5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000df57620000df81620001e1565b5050506001600160a01b0381166200010a5760405163d92e233d60e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392831617905584811660a052831660c0526000819003620001545760405163a81c0bef60e01b815260040160405180910390fd5b60025460405163dc311dd360e01b8152600481018390526001600160a01b039091169063dc311dd390602401600060405180830381865afa1580156200019e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620001c8919081019062000329565b5050506080929092525062000452975050505050505050565b336001600160a01b038216036200023b5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401620000a3565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b0381168114620002a457600080fd5b919050565b60008060008060808587031215620002c057600080fd5b620002cb856200028c565b9350620002db602086016200028c565b9250620002eb604086016200028c565b6060959095015193969295505050565b80516001600160601b0381168114620002a457600080fd5b634e487b7160e01b600052604160045260246000fd5b600080600080600060a086880312156200034257600080fd5b6200034d86620002fb565b945060206200035e818801620002fb565b60408801519095506001600160401b0380821682146200037d57600080fd5b8195506200038e60608a016200028c565b94506080890151915080821115620003a557600080fd5b818901915089601f830112620003ba57600080fd5b815181811115620003cf57620003cf62000313565b8060051b604051601f19603f83011681018181108582111715620003f757620003f762000313565b60405291825284820192508381018501918c8311156200041657600080fd5b938501935b828510156200043f576200042f856200028c565b845293850193928501926200041b565b8096505050505050509295509295909350565b60805160a05160c051613508620004ac6000396000818161037e01526122840152600081816102ea015281816111f6015281816112c50152611c6f01526000818161020b015281816118c40152611e5c01526135086000f3fe6080604052600436106101c15760003560e01c806357a8070a116100f7578063a4c0ed3611610095578063cdd8d88511610064578063cdd8d88514610741578063e1cab7451461077f578063f2fde38b1461079f578063fc2a88c3146107bf57600080fd5b8063a4c0ed36146105b9578063a608a1e1146105d9578063bf17e5591461060c578063c3f909d41461062c57600080fd5b80638ea98117116100d15780638ea98117146105445780639cfc058e146105645780639eccacf614610577578063a3907d71146105a457600080fd5b806357a8070a146104c257806379ba5097146105045780638da5cb5b1461051957600080fd5b80631fe543e3116101645780632f2770db1161013e5780632f2770db146103a25780632f622e6b146103b757806348baa1c5146103d757806351cff8d9146104a257600080fd5b80631fe543e31461032f57806327e5c50a1461034f5780632808e6c81461036f57600080fd5b806313c34b7f116101a057806313c34b7f1461024f578063181f5a771461026f57806318b6f4c8146102bb5780631c4695f4146102db57600080fd5b806226501b146101c6578063030932bb146101f9578063045343aa1461022d575b600080fd5b3480156101d257600080fd5b506101e66101e1366004612b4f565b6107d5565b6040519081526020015b60405180910390f35b34801561020557600080fd5b506101e67f000000000000000000000000000000000000000000000000000000000000000081565b34801561023957600080fd5b5061024d610248366004612bae565b61090f565b005b34801561025b57600080fd5b506101e661026a366004612c7c565b610bcb565b34801561027b57600080fd5b50604080518082018252601681527f5652465632506c75735772617070657220312e302e3000000000000000000000602082015290516101f09190612d13565b3480156102c757600080fd5b5061024d6102d6366004612e0e565b610cf2565b3480156102e757600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101f0565b34801561033b57600080fd5b5061024d61034a366004612e60565b610e71565b34801561035b57600080fd5b506101e661036a366004612c7c565b610eef565b34801561037b57600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061030a565b3480156103ae57600080fd5b5061024d611023565b3480156103c357600080fd5b5061024d6103d2366004612f03565b611096565b3480156103e357600080fd5b506104616103f2366004612f1e565b60076020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff81169074010000000000000000000000000000000000000000810463ffffffff16907801000000000000000000000000000000000000000000000000900467ffffffffffffffff1683565b6040805173ffffffffffffffffffffffffffffffffffffffff909416845263ffffffff909216602084015267ffffffffffffffff16908201526060016101f0565b3480156104ae57600080fd5b5061024d6104bd366004612f03565b6111bd565b3480156104ce57600080fd5b506002546104f49074010000000000000000000000000000000000000000900460ff1681565b60405190151581526020016101f0565b34801561051057600080fd5b5061024d6113be565b34801561052557600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff1661030a565b34801561055057600080fd5b5061024d61055f366004612f03565b6114bb565b6101e6610572366004612f80565b611646565b34801561058357600080fd5b5060025461030a9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156105b057600080fd5b5061024d611af2565b3480156105c557600080fd5b5061024d6105d4366004612ff6565b611b4d565b3480156105e557600080fd5b506002546104f4907501000000000000000000000000000000000000000000900460ff1681565b34801561061857600080fd5b5061024d610627366004613050565b6120bb565b34801561063857600080fd5b506005546006546003546002546040516101f0949363ffffffff808216947601000000000000000000000000000000000000000000008084048316957a010000000000000000000000000000000000000000000000000000850484169564010000000086048516956c0100000000000000000000000081048616957001000000000000000000000000000000008204169461ffff740100000000000000000000000000000000000000008304169460ff7e0100000000000000000000000000000000000000000000000000000000000084048116957f0100000000000000000000000000000000000000000000000000000000000000909404811694929391909104169061306b565b34801561074d57600080fd5b5060065461076a9068010000000000000000900463ffffffff1681565b60405163ffffffff90911681526020016101f0565b34801561078b57600080fd5b506101e661079a366004612b4f565b612134565b3480156107ab57600080fd5b5061024d6107ba366004612f03565b612252565b3480156107cb57600080fd5b506101e660045481565b60025460009074010000000000000000000000000000000000000000900460ff16610861576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e666967757265640000000000000060448201526064015b60405180910390fd5b6002547501000000000000000000000000000000000000000000900460ff16156108e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610858565b60006108f1612266565b5090506109068563ffffffff168585846123bc565b95945050505050565b61091761250b565b8163ffffffff168163ffffffff16111561096d576040517f2780dcb200000000000000000000000000000000000000000000000000000000815263ffffffff808316600483015283166024820152604401610858565b609b60ff891611156109b7576040517f3acc511a00000000000000000000000000000000000000000000000000000000815260ff89166004820152609b6024820152604401610858565b609b60ff88161115610a01576040517f3acc511a00000000000000000000000000000000000000000000000000000000815260ff88166004820152609b6024820152604401610858565b8b600660046101000a81548163ffffffff021916908363ffffffff1602179055508a6006600c6101000a81548163ffffffff021916908363ffffffff16021790555089600660106101000a81548163ffffffff021916908363ffffffff16021790555088600660146101000a81548161ffff021916908361ffff160217905550876006601e6101000a81548160ff021916908360ff160217905550866006601f6101000a81548160ff021916908360ff1602179055508560038190555084600260166101000a81548160ff021916908360ff1602179055506001600260146101000a81548160ff02191690831515021790555083600660006101000a81548163ffffffff021916908363ffffffff1602179055508260058190555081600660166101000a81548163ffffffff021916908363ffffffff160217905550806006601a6101000a81548163ffffffff021916908363ffffffff1602179055507f8aee1a8c131eaf1a5bd30594737b6926a7c5cb29281a97639f6ac93947c8995e8c8c8c8c8c8c8c8c8c8c8c6006601a9054906101000a900463ffffffff16604051610bb59c9b9a999897969594939291906130ec565b60405180910390a1505050505050505050505050565b60025460009074010000000000000000000000000000000000000000900460ff16610c52576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610858565b6002547501000000000000000000000000000000000000000000900460ff1615610cd8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610858565b610ce98363ffffffff16833a61258e565b90505b92915050565b8151600003610d365780610d32576040517f6b81746e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b815160241115610d875781516040517f51200dce0000000000000000000000000000000000000000000000000000000081526108589160249160040161ffff92831681529116602082015260400190565b600082602381518110610d9c57610d9c613169565b6020910101517fff00000000000000000000000000000000000000000000000000000000000000167f0100000000000000000000000000000000000000000000000000000000000000149050808015610df25750815b15610e29576040517f6048aa6800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80158015610e35575081155b15610e6c576040517f6b81746e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b60025473ffffffffffffffffffffffffffffffffffffffff163314610ee4576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9091166024820152604401610858565b610e6c83838361268e565b60025460009074010000000000000000000000000000000000000000900460ff16610f76576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610858565b6002547501000000000000000000000000000000000000000000900460ff1615610ffc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610858565b6000611006612266565b50905061101b8463ffffffff16843a846123bc565b949350505050565b61102b61250b565b600280547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1675010000000000000000000000000000000000000000001790556040517f75884cdadc4a89e8b545db800057f06ec7f5338a08183c7ba515f2bfdd9fe1e190600090a1565b61109e61250b565b604051479060009073ffffffffffffffffffffffffffffffffffffffff84169083908381818185875af1925050503d80600081146110f8576040519150601f19603f3d011682016040523d82523d6000602084013e6110fd565b606091505b5050905080611168576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f6661696c656420746f207769746864726177206e6174697665000000000000006044820152606401610858565b8273ffffffffffffffffffffffffffffffffffffffff167fc303ca808382409472acbbf899c316cf439f409f6584aae22df86dfa3c9ed504836040516111b091815260200190565b60405180910390a2505050565b6111c561250b565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015611252573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112769190613198565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018390529192507f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303816000875af1158015611310573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133491906131b1565b61136a576040517f7c07fc4c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5826040516113b291815260200190565b60405180910390a25050565b60015473ffffffffffffffffffffffffffffffffffffffff16331461143f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610858565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60005473ffffffffffffffffffffffffffffffffffffffff1633148015906114fb575060025473ffffffffffffffffffffffffffffffffffffffff163314155b1561157f573361152060005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff93841660048201529183166024830152919091166044820152606401610858565b73ffffffffffffffffffffffffffffffffffffffff81166115cc576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527fd1a6a14209a385a964d036e404cb5cfb71f4000cdb03c9366292430787261be6906020015b60405180910390a150565b60025460009074010000000000000000000000000000000000000000900460ff166116cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610858565b6002547501000000000000000000000000000000000000000000900460ff1615611753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610858565b61179283838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509250610cf2915050565b600061179d87612874565b905060006117b28863ffffffff16873a61258e565b90508034101561181e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f66656520746f6f206c6f770000000000000000000000000000000000000000006044820152606401610858565b600254760100000000000000000000000000000000000000000000900460ff1663ffffffff871611156118ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6e756d576f72647320746f6f20686967680000000000000000000000000000006044820152606401610858565b60006040518060c0016040528060035481526020017f000000000000000000000000000000000000000000000000000000000000000081526020018961ffff168152602001600660049054906101000a900463ffffffff16858c61191191906131fd565b61191b91906131fd565b63ffffffff1681526020018863ffffffff16815260200187878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509152506002546040517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff1690639b1c385e906119c1908490600401613221565b6020604051808303816000875af11580156119e0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a049190613198565b6040805160608101825233815263ffffffff808d16602080840191825267ffffffffffffffff3a81168587019081526000888152600790935295909120935184549251955190911678010000000000000000000000000000000000000000000000000277ffffffffffffffffffffffffffffffffffffffffffffffff9590931674010000000000000000000000000000000000000000027fffffffffffffffff00000000000000000000000000000000000000000000000090921673ffffffffffffffffffffffffffffffffffffffff91909116171792909216919091179055935050505095945050505050565b611afa61250b565b600280547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1690556040517fc0f961051f97b04c496472d11cb6170d844e4b2c9dfd3b602a4fa0139712d48490600090a1565b60025474010000000000000000000000000000000000000000900460ff16611bd1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610858565b6002547501000000000000000000000000000000000000000000900460ff1615611c57576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610858565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614611cf6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f6f6e6c792063616c6c61626c652066726f6d204c494e4b0000000000000000006044820152606401610858565b6000808080611d078587018761327e565b9350935093509350611d1a816001610cf2565b6000611d2585612874565b9050600080611d32612266565b915091506000611d4a8863ffffffff16873a866123bc565b9050808b1015611db6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f66656520746f6f206c6f770000000000000000000000000000000000000000006044820152606401610858565b600254760100000000000000000000000000000000000000000000900460ff1663ffffffff87161115611e45576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6e756d576f72647320746f6f20686967680000000000000000000000000000006044820152606401610858565b60006040518060c0016040528060035481526020017f000000000000000000000000000000000000000000000000000000000000000081526020018961ffff168152602001600660049054906101000a900463ffffffff16878c611ea991906131fd565b611eb391906131fd565b63ffffffff908116825289166020820152604090810188905260025490517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925060009173ffffffffffffffffffffffffffffffffffffffff90911690639b1c385e90611f27908590600401613221565b6020604051808303816000875af1158015611f46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6a9190613198565b905060405180606001604052808f73ffffffffffffffffffffffffffffffffffffffff1681526020018b63ffffffff1681526020013a67ffffffffffffffff168152506007600083815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160186101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055509050508060048190555083156120ab576005546040805183815260208101929092527f6ca648a381f22ead7e37773d934e64885dcf861fbfbb26c40354cbf0c4662d1a910160405180910390a15b5050505050505050505050505050565b6120c361250b565b600680547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff166801000000000000000063ffffffff8416908102919091179091556040519081527f697b48b8b76cebb09a54ec4ff810e8a181c96f65395d51c744db09c115d1d5d09060200161163b565b60025460009074010000000000000000000000000000000000000000900460ff166121bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610858565b6002547501000000000000000000000000000000000000000000900460ff1615612241576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610858565b61101b8463ffffffff16848461258e565b61225a61250b565b6122638161288c565b50565b6000806000600660009054906101000a900463ffffffff16905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156122ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123119190613307565b50919650909250505063ffffffff82161580159061233d57506123348142613357565b8263ffffffff16105b9250821561234b5760055493505b60008412156123b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496e76616c6964204c494e4b20776569207072696365000000000000000000006044820152606401610858565b50509091565b60065460009081906123dc90640100000000900463ffffffff168561336a565b905060006123e8612981565b6123f38760006129a7565b6124039063ffffffff1689613381565b61240d908761336a565b6124179190613381565b60065490915060009061246a9063ffffffff7a0100000000000000000000000000000000000000000000000000008204811691760100000000000000000000000000000000000000000000900416613394565b61247f9063ffffffff1664e8d4a5100061336a565b6006546064906124b5907f0100000000000000000000000000000000000000000000000000000000000000900460ff16826133b1565b6124c29060ff168561336a565b6124cc91906133f9565b6124d69190613381565b9050846124e38285613381565b6124f590670de0b6b3a764000061336a565b6124ff91906133f9565b98975050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461258c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610858565b565b60065460009081906125ae90640100000000900463ffffffff168461336a565b905060006125ba612981565b6125c58660016129a7565b6125d59063ffffffff1688613381565b6125df908661336a565b6125e99190613381565b60065490915060009061262190760100000000000000000000000000000000000000000000900463ffffffff1664e8d4a5100061336a565b600654606490612656907e01000000000000000000000000000000000000000000000000000000000000900460ff16826133b1565b6126639060ff168561336a565b61266d91906133f9565b6126779190613381565b90506126838184613381565b979650505050505050565b60008381526007602081815260408084208151606081018352815473ffffffffffffffffffffffffffffffffffffffff808216835274010000000000000000000000000000000000000000820463ffffffff1683870152780100000000000000000000000000000000000000000000000090910467ffffffffffffffff169382019390935288865293909252929055805190918116612789576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f72657175657374206e6f7420666f756e640000000000000000000000000000006044820152606401610858565b600080631fe543e360e01b8787876040516024016127a99392919061340d565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061281f856020015163ffffffff168584612a52565b90508061286a5760405173ffffffffffffffffffffffffffffffffffffffff85169089907fc551b83c151f2d1c7eeb938ac59008e0409f1c1dc1e2f112449d4d79b458902290600090a35b5050505050505050565b6000612881603f83613466565b610cec9060016131fd565b3373ffffffffffffffffffffffffffffffffffffffff82160361290b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610858565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6006546000906129a29068010000000000000000900463ffffffff16612a9e565b905090565b60008115612a02576006546129d89074010000000000000000000000000000000000000000900461ffff1684613489565b6006546129fb91906c01000000000000000000000000900463ffffffff166131fd565b9050610cec565b600654612a2b9074010000000000000000000000000000000000000000900461ffff1684613489565b6006546129fb9190700100000000000000000000000000000000900463ffffffff166131fd565b60005a611388811015612a6457600080fd5b611388810390508460408204820311612a7c57600080fd5b50823b612a8857600080fd5b60008083516020850160008789f1949350505050565b600080606c73ffffffffffffffffffffffffffffffffffffffff166341b247a86040518163ffffffff1660e01b815260040160c060405180830381865afa158015612aed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b1191906134b1565b5050505091505082608c612b259190613381565b612b2f908261336a565b9392505050565b803563ffffffff81168114612b4a57600080fd5b919050565b600080600060608486031215612b6457600080fd5b612b6d84612b36565b9250612b7b60208501612b36565b9150604084013590509250925092565b803561ffff81168114612b4a57600080fd5b803560ff81168114612b4a57600080fd5b6000806000806000806000806000806000806101808d8f031215612bd157600080fd5b612bda8d612b36565b9b50612be860208e01612b36565b9a50612bf660408e01612b36565b9950612c0460608e01612b8b565b9850612c1260808e01612b9d565b9750612c2060a08e01612b9d565b965060c08d01359550612c3560e08e01612b9d565b9450612c446101008e01612b36565b93506101208d01359250612c5b6101408e01612b36565b9150612c6a6101608e01612b36565b90509295989b509295989b509295989b565b60008060408385031215612c8f57600080fd5b612c9883612b36565b9150612ca660208401612b36565b90509250929050565b6000815180845260005b81811015612cd557602081850181015186830182015201612cb9565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000610ce96020830184612caf565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112612d6657600080fd5b813567ffffffffffffffff80821115612d8157612d81612d26565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715612dc757612dc7612d26565b81604052838152866020858801011115612de057600080fd5b836020870160208301376000602085830101528094505050505092915050565b801515811461226357600080fd5b60008060408385031215612e2157600080fd5b823567ffffffffffffffff811115612e3857600080fd5b612e4485828601612d55565b9250506020830135612e5581612e00565b809150509250929050565b600080600060408486031215612e7557600080fd5b83359250602084013567ffffffffffffffff80821115612e9457600080fd5b818601915086601f830112612ea857600080fd5b813581811115612eb757600080fd5b8760208260051b8501011115612ecc57600080fd5b6020830194508093505050509250925092565b803573ffffffffffffffffffffffffffffffffffffffff81168114612b4a57600080fd5b600060208284031215612f1557600080fd5b610ce982612edf565b600060208284031215612f3057600080fd5b5035919050565b60008083601f840112612f4957600080fd5b50813567ffffffffffffffff811115612f6157600080fd5b602083019150836020828501011115612f7957600080fd5b9250929050565b600080600080600060808688031215612f9857600080fd5b612fa186612b36565b9450612faf60208701612b8b565b9350612fbd60408701612b36565b9250606086013567ffffffffffffffff811115612fd957600080fd5b612fe588828901612f37565b969995985093965092949392505050565b6000806000806060858703121561300c57600080fd5b61301585612edf565b935060208501359250604085013567ffffffffffffffff81111561303857600080fd5b61304487828801612f37565b95989497509550505050565b60006020828403121561306257600080fd5b610ce982612b36565b8c815263ffffffff8c811660208301528b811660408301528a81166060830152898116608083015288811660a0830152871660c082015261ffff861660e082015260ff85811661010083015284166101208201526101808101836101408301526130db61016083018460ff169052565b9d9c50505050505050505050505050565b63ffffffff8d811682528c811660208301528b8116604083015261ffff8b16606083015260ff8a8116608084015289811660a084015260c08301899052871660e0830152851661010082015261018081018461012083015261315761014083018563ffffffff169052565b63ffffffff83166101608301526130db565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156131aa57600080fd5b5051919050565b6000602082840312156131c357600080fd5b8151612b2f81612e00565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b63ffffffff81811683821601908082111561321a5761321a6131ce565b5092915050565b60208152815160208201526020820151604082015261ffff60408301511660608201526000606083015163ffffffff80821660808501528060808601511660a0850152505060a083015160c08084015261101b60e0840182612caf565b6000806000806080858703121561329457600080fd5b61329d85612b36565b93506132ab60208601612b8b565b92506132b960408601612b36565b9150606085013567ffffffffffffffff8111156132d557600080fd5b6132e187828801612d55565b91505092959194509250565b805169ffffffffffffffffffff81168114612b4a57600080fd5b600080600080600060a0868803121561331f57600080fd5b613328866132ed565b945060208601519350604086015192506060860151915061334b608087016132ed565b90509295509295909350565b81810381811115610cec57610cec6131ce565b8082028115828204841417610cec57610cec6131ce565b80820180821115610cec57610cec6131ce565b63ffffffff82811682821603908082111561321a5761321a6131ce565b60ff8181168382160190811115610cec57610cec6131ce565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082613408576134086133ca565b500490565b8381526040602082015281604082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561344c57600080fd5b8260051b8085606085013791909101606001949350505050565b600063ffffffff8084168061347d5761347d6133ca565b92169190910492915050565b63ffffffff8181168382160280821691908281146134a9576134a96131ce565b505092915050565b60008060008060008060c087890312156134ca57600080fd5b865195506020870151945060408701519350606087015192506080870151915060a08701519050929550929550929556fea164736f6c6343000813000a", +} + +var VRFV2PlusWrapperArbitrumABI = VRFV2PlusWrapperArbitrumMetaData.ABI + +var VRFV2PlusWrapperArbitrumBin = VRFV2PlusWrapperArbitrumMetaData.Bin + +func DeployVRFV2PlusWrapperArbitrum(auth *bind.TransactOpts, backend bind.ContractBackend, _link common.Address, _linkNativeFeed common.Address, _coordinator common.Address, _subId *big.Int) (common.Address, *types.Transaction, *VRFV2PlusWrapperArbitrum, error) { + parsed, err := VRFV2PlusWrapperArbitrumMetaData.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(VRFV2PlusWrapperArbitrumBin), backend, _link, _linkNativeFeed, _coordinator, _subId) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &VRFV2PlusWrapperArbitrum{address: address, abi: *parsed, VRFV2PlusWrapperArbitrumCaller: VRFV2PlusWrapperArbitrumCaller{contract: contract}, VRFV2PlusWrapperArbitrumTransactor: VRFV2PlusWrapperArbitrumTransactor{contract: contract}, VRFV2PlusWrapperArbitrumFilterer: VRFV2PlusWrapperArbitrumFilterer{contract: contract}}, nil +} + +type VRFV2PlusWrapperArbitrum struct { + address common.Address + abi abi.ABI + VRFV2PlusWrapperArbitrumCaller + VRFV2PlusWrapperArbitrumTransactor + VRFV2PlusWrapperArbitrumFilterer +} + +type VRFV2PlusWrapperArbitrumCaller struct { + contract *bind.BoundContract +} + +type VRFV2PlusWrapperArbitrumTransactor struct { + contract *bind.BoundContract +} + +type VRFV2PlusWrapperArbitrumFilterer struct { + contract *bind.BoundContract +} + +type VRFV2PlusWrapperArbitrumSession struct { + Contract *VRFV2PlusWrapperArbitrum + CallOpts bind.CallOpts + TransactOpts bind.TransactOpts +} + +type VRFV2PlusWrapperArbitrumCallerSession struct { + Contract *VRFV2PlusWrapperArbitrumCaller + CallOpts bind.CallOpts +} + +type VRFV2PlusWrapperArbitrumTransactorSession struct { + Contract *VRFV2PlusWrapperArbitrumTransactor + TransactOpts bind.TransactOpts +} + +type VRFV2PlusWrapperArbitrumRaw struct { + Contract *VRFV2PlusWrapperArbitrum +} + +type VRFV2PlusWrapperArbitrumCallerRaw struct { + Contract *VRFV2PlusWrapperArbitrumCaller +} + +type VRFV2PlusWrapperArbitrumTransactorRaw struct { + Contract *VRFV2PlusWrapperArbitrumTransactor +} + +func NewVRFV2PlusWrapperArbitrum(address common.Address, backend bind.ContractBackend) (*VRFV2PlusWrapperArbitrum, error) { + abi, err := abi.JSON(strings.NewReader(VRFV2PlusWrapperArbitrumABI)) + if err != nil { + return nil, err + } + contract, err := bindVRFV2PlusWrapperArbitrum(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperArbitrum{address: address, abi: abi, VRFV2PlusWrapperArbitrumCaller: VRFV2PlusWrapperArbitrumCaller{contract: contract}, VRFV2PlusWrapperArbitrumTransactor: VRFV2PlusWrapperArbitrumTransactor{contract: contract}, VRFV2PlusWrapperArbitrumFilterer: VRFV2PlusWrapperArbitrumFilterer{contract: contract}}, nil +} + +func NewVRFV2PlusWrapperArbitrumCaller(address common.Address, caller bind.ContractCaller) (*VRFV2PlusWrapperArbitrumCaller, error) { + contract, err := bindVRFV2PlusWrapperArbitrum(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperArbitrumCaller{contract: contract}, nil +} + +func NewVRFV2PlusWrapperArbitrumTransactor(address common.Address, transactor bind.ContractTransactor) (*VRFV2PlusWrapperArbitrumTransactor, error) { + contract, err := bindVRFV2PlusWrapperArbitrum(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperArbitrumTransactor{contract: contract}, nil +} + +func NewVRFV2PlusWrapperArbitrumFilterer(address common.Address, filterer bind.ContractFilterer) (*VRFV2PlusWrapperArbitrumFilterer, error) { + contract, err := bindVRFV2PlusWrapperArbitrum(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperArbitrumFilterer{contract: contract}, nil +} + +func bindVRFV2PlusWrapperArbitrum(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := VRFV2PlusWrapperArbitrumMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _VRFV2PlusWrapperArbitrum.Contract.VRFV2PlusWrapperArbitrumCaller.contract.Call(opts, result, method, params...) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.Contract.VRFV2PlusWrapperArbitrumTransactor.contract.Transfer(opts) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.Contract.VRFV2PlusWrapperArbitrumTransactor.contract.Transact(opts, method, params...) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _VRFV2PlusWrapperArbitrum.Contract.contract.Call(opts, result, method, params...) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.Contract.contract.Transfer(opts) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.Contract.contract.Transact(opts, method, params...) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCaller) SUBSCRIPTIONID(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _VRFV2PlusWrapperArbitrum.contract.Call(opts, &out, "SUBSCRIPTION_ID") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumSession) SUBSCRIPTIONID() (*big.Int, error) { + return _VRFV2PlusWrapperArbitrum.Contract.SUBSCRIPTIONID(&_VRFV2PlusWrapperArbitrum.CallOpts) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCallerSession) SUBSCRIPTIONID() (*big.Int, error) { + return _VRFV2PlusWrapperArbitrum.Contract.SUBSCRIPTIONID(&_VRFV2PlusWrapperArbitrum.CallOpts) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCaller) CalculateRequestPrice(opts *bind.CallOpts, _callbackGasLimit uint32, _numWords uint32) (*big.Int, error) { + var out []interface{} + err := _VRFV2PlusWrapperArbitrum.contract.Call(opts, &out, "calculateRequestPrice", _callbackGasLimit, _numWords) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumSession) CalculateRequestPrice(_callbackGasLimit uint32, _numWords uint32) (*big.Int, error) { + return _VRFV2PlusWrapperArbitrum.Contract.CalculateRequestPrice(&_VRFV2PlusWrapperArbitrum.CallOpts, _callbackGasLimit, _numWords) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCallerSession) CalculateRequestPrice(_callbackGasLimit uint32, _numWords uint32) (*big.Int, error) { + return _VRFV2PlusWrapperArbitrum.Contract.CalculateRequestPrice(&_VRFV2PlusWrapperArbitrum.CallOpts, _callbackGasLimit, _numWords) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCaller) CalculateRequestPriceNative(opts *bind.CallOpts, _callbackGasLimit uint32, _numWords uint32) (*big.Int, error) { + var out []interface{} + err := _VRFV2PlusWrapperArbitrum.contract.Call(opts, &out, "calculateRequestPriceNative", _callbackGasLimit, _numWords) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumSession) CalculateRequestPriceNative(_callbackGasLimit uint32, _numWords uint32) (*big.Int, error) { + return _VRFV2PlusWrapperArbitrum.Contract.CalculateRequestPriceNative(&_VRFV2PlusWrapperArbitrum.CallOpts, _callbackGasLimit, _numWords) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCallerSession) CalculateRequestPriceNative(_callbackGasLimit uint32, _numWords uint32) (*big.Int, error) { + return _VRFV2PlusWrapperArbitrum.Contract.CalculateRequestPriceNative(&_VRFV2PlusWrapperArbitrum.CallOpts, _callbackGasLimit, _numWords) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCaller) CheckPaymentMode(opts *bind.CallOpts, extraArgs []byte, isLinkMode bool) error { + var out []interface{} + err := _VRFV2PlusWrapperArbitrum.contract.Call(opts, &out, "checkPaymentMode", extraArgs, isLinkMode) + + if err != nil { + return err + } + + return err + +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumSession) CheckPaymentMode(extraArgs []byte, isLinkMode bool) error { + return _VRFV2PlusWrapperArbitrum.Contract.CheckPaymentMode(&_VRFV2PlusWrapperArbitrum.CallOpts, extraArgs, isLinkMode) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCallerSession) CheckPaymentMode(extraArgs []byte, isLinkMode bool) error { + return _VRFV2PlusWrapperArbitrum.Contract.CheckPaymentMode(&_VRFV2PlusWrapperArbitrum.CallOpts, extraArgs, isLinkMode) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCaller) EstimateRequestPrice(opts *bind.CallOpts, _callbackGasLimit uint32, _numWords uint32, _requestGasPriceWei *big.Int) (*big.Int, error) { + var out []interface{} + err := _VRFV2PlusWrapperArbitrum.contract.Call(opts, &out, "estimateRequestPrice", _callbackGasLimit, _numWords, _requestGasPriceWei) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumSession) EstimateRequestPrice(_callbackGasLimit uint32, _numWords uint32, _requestGasPriceWei *big.Int) (*big.Int, error) { + return _VRFV2PlusWrapperArbitrum.Contract.EstimateRequestPrice(&_VRFV2PlusWrapperArbitrum.CallOpts, _callbackGasLimit, _numWords, _requestGasPriceWei) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCallerSession) EstimateRequestPrice(_callbackGasLimit uint32, _numWords uint32, _requestGasPriceWei *big.Int) (*big.Int, error) { + return _VRFV2PlusWrapperArbitrum.Contract.EstimateRequestPrice(&_VRFV2PlusWrapperArbitrum.CallOpts, _callbackGasLimit, _numWords, _requestGasPriceWei) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCaller) EstimateRequestPriceNative(opts *bind.CallOpts, _callbackGasLimit uint32, _numWords uint32, _requestGasPriceWei *big.Int) (*big.Int, error) { + var out []interface{} + err := _VRFV2PlusWrapperArbitrum.contract.Call(opts, &out, "estimateRequestPriceNative", _callbackGasLimit, _numWords, _requestGasPriceWei) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumSession) EstimateRequestPriceNative(_callbackGasLimit uint32, _numWords uint32, _requestGasPriceWei *big.Int) (*big.Int, error) { + return _VRFV2PlusWrapperArbitrum.Contract.EstimateRequestPriceNative(&_VRFV2PlusWrapperArbitrum.CallOpts, _callbackGasLimit, _numWords, _requestGasPriceWei) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCallerSession) EstimateRequestPriceNative(_callbackGasLimit uint32, _numWords uint32, _requestGasPriceWei *big.Int) (*big.Int, error) { + return _VRFV2PlusWrapperArbitrum.Contract.EstimateRequestPriceNative(&_VRFV2PlusWrapperArbitrum.CallOpts, _callbackGasLimit, _numWords, _requestGasPriceWei) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCaller) GetConfig(opts *bind.CallOpts) (GetConfig, + + error) { + var out []interface{} + err := _VRFV2PlusWrapperArbitrum.contract.Call(opts, &out, "getConfig") + + outstruct := new(GetConfig) + if err != nil { + return *outstruct, err + } + + outstruct.FallbackWeiPerUnitLink = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.StalenessSeconds = *abi.ConvertType(out[1], 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.CoordinatorGasOverheadNative = *abi.ConvertType(out[5], new(uint32)).(*uint32) + outstruct.CoordinatorGasOverheadLink = *abi.ConvertType(out[6], new(uint32)).(*uint32) + outstruct.CoordinatorGasOverheadPerWord = *abi.ConvertType(out[7], new(uint16)).(*uint16) + outstruct.WrapperNativePremiumPercentage = *abi.ConvertType(out[8], new(uint8)).(*uint8) + outstruct.WrapperLinkPremiumPercentage = *abi.ConvertType(out[9], new(uint8)).(*uint8) + outstruct.KeyHash = *abi.ConvertType(out[10], new([32]byte)).(*[32]byte) + outstruct.MaxNumWords = *abi.ConvertType(out[11], new(uint8)).(*uint8) + + return *outstruct, err + +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumSession) GetConfig() (GetConfig, + + error) { + return _VRFV2PlusWrapperArbitrum.Contract.GetConfig(&_VRFV2PlusWrapperArbitrum.CallOpts) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCallerSession) GetConfig() (GetConfig, + + error) { + return _VRFV2PlusWrapperArbitrum.Contract.GetConfig(&_VRFV2PlusWrapperArbitrum.CallOpts) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCaller) LastRequestId(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _VRFV2PlusWrapperArbitrum.contract.Call(opts, &out, "lastRequestId") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumSession) LastRequestId() (*big.Int, error) { + return _VRFV2PlusWrapperArbitrum.Contract.LastRequestId(&_VRFV2PlusWrapperArbitrum.CallOpts) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCallerSession) LastRequestId() (*big.Int, error) { + return _VRFV2PlusWrapperArbitrum.Contract.LastRequestId(&_VRFV2PlusWrapperArbitrum.CallOpts) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCaller) Link(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _VRFV2PlusWrapperArbitrum.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 (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumSession) Link() (common.Address, error) { + return _VRFV2PlusWrapperArbitrum.Contract.Link(&_VRFV2PlusWrapperArbitrum.CallOpts) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCallerSession) Link() (common.Address, error) { + return _VRFV2PlusWrapperArbitrum.Contract.Link(&_VRFV2PlusWrapperArbitrum.CallOpts) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCaller) LinkNativeFeed(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _VRFV2PlusWrapperArbitrum.contract.Call(opts, &out, "linkNativeFeed") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumSession) LinkNativeFeed() (common.Address, error) { + return _VRFV2PlusWrapperArbitrum.Contract.LinkNativeFeed(&_VRFV2PlusWrapperArbitrum.CallOpts) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCallerSession) LinkNativeFeed() (common.Address, error) { + return _VRFV2PlusWrapperArbitrum.Contract.LinkNativeFeed(&_VRFV2PlusWrapperArbitrum.CallOpts) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _VRFV2PlusWrapperArbitrum.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 (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumSession) Owner() (common.Address, error) { + return _VRFV2PlusWrapperArbitrum.Contract.Owner(&_VRFV2PlusWrapperArbitrum.CallOpts) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCallerSession) Owner() (common.Address, error) { + return _VRFV2PlusWrapperArbitrum.Contract.Owner(&_VRFV2PlusWrapperArbitrum.CallOpts) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCaller) SCallbacks(opts *bind.CallOpts, arg0 *big.Int) (SCallbacks, + + error) { + var out []interface{} + err := _VRFV2PlusWrapperArbitrum.contract.Call(opts, &out, "s_callbacks", arg0) + + outstruct := new(SCallbacks) + if err != nil { + return *outstruct, err + } + + outstruct.CallbackAddress = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + outstruct.CallbackGasLimit = *abi.ConvertType(out[1], new(uint32)).(*uint32) + outstruct.RequestGasPrice = *abi.ConvertType(out[2], new(uint64)).(*uint64) + + return *outstruct, err + +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumSession) SCallbacks(arg0 *big.Int) (SCallbacks, + + error) { + return _VRFV2PlusWrapperArbitrum.Contract.SCallbacks(&_VRFV2PlusWrapperArbitrum.CallOpts, arg0) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCallerSession) SCallbacks(arg0 *big.Int) (SCallbacks, + + error) { + return _VRFV2PlusWrapperArbitrum.Contract.SCallbacks(&_VRFV2PlusWrapperArbitrum.CallOpts, arg0) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCaller) SConfigured(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _VRFV2PlusWrapperArbitrum.contract.Call(opts, &out, "s_configured") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumSession) SConfigured() (bool, error) { + return _VRFV2PlusWrapperArbitrum.Contract.SConfigured(&_VRFV2PlusWrapperArbitrum.CallOpts) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCallerSession) SConfigured() (bool, error) { + return _VRFV2PlusWrapperArbitrum.Contract.SConfigured(&_VRFV2PlusWrapperArbitrum.CallOpts) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCaller) SDisabled(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _VRFV2PlusWrapperArbitrum.contract.Call(opts, &out, "s_disabled") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumSession) SDisabled() (bool, error) { + return _VRFV2PlusWrapperArbitrum.Contract.SDisabled(&_VRFV2PlusWrapperArbitrum.CallOpts) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCallerSession) SDisabled() (bool, error) { + return _VRFV2PlusWrapperArbitrum.Contract.SDisabled(&_VRFV2PlusWrapperArbitrum.CallOpts) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCaller) SFulfillmentTxSizeBytes(opts *bind.CallOpts) (uint32, error) { + var out []interface{} + err := _VRFV2PlusWrapperArbitrum.contract.Call(opts, &out, "s_fulfillmentTxSizeBytes") + + if err != nil { + return *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + + return out0, err + +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumSession) SFulfillmentTxSizeBytes() (uint32, error) { + return _VRFV2PlusWrapperArbitrum.Contract.SFulfillmentTxSizeBytes(&_VRFV2PlusWrapperArbitrum.CallOpts) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCallerSession) SFulfillmentTxSizeBytes() (uint32, error) { + return _VRFV2PlusWrapperArbitrum.Contract.SFulfillmentTxSizeBytes(&_VRFV2PlusWrapperArbitrum.CallOpts) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCaller) SVrfCoordinator(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _VRFV2PlusWrapperArbitrum.contract.Call(opts, &out, "s_vrfCoordinator") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumSession) SVrfCoordinator() (common.Address, error) { + return _VRFV2PlusWrapperArbitrum.Contract.SVrfCoordinator(&_VRFV2PlusWrapperArbitrum.CallOpts) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCallerSession) SVrfCoordinator() (common.Address, error) { + return _VRFV2PlusWrapperArbitrum.Contract.SVrfCoordinator(&_VRFV2PlusWrapperArbitrum.CallOpts) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCaller) TypeAndVersion(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _VRFV2PlusWrapperArbitrum.contract.Call(opts, &out, "typeAndVersion") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumSession) TypeAndVersion() (string, error) { + return _VRFV2PlusWrapperArbitrum.Contract.TypeAndVersion(&_VRFV2PlusWrapperArbitrum.CallOpts) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumCallerSession) TypeAndVersion() (string, error) { + return _VRFV2PlusWrapperArbitrum.Contract.TypeAndVersion(&_VRFV2PlusWrapperArbitrum.CallOpts) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.contract.Transact(opts, "acceptOwnership") +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumSession) AcceptOwnership() (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.Contract.AcceptOwnership(&_VRFV2PlusWrapperArbitrum.TransactOpts) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumTransactorSession) AcceptOwnership() (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.Contract.AcceptOwnership(&_VRFV2PlusWrapperArbitrum.TransactOpts) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumTransactor) Disable(opts *bind.TransactOpts) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.contract.Transact(opts, "disable") +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumSession) Disable() (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.Contract.Disable(&_VRFV2PlusWrapperArbitrum.TransactOpts) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumTransactorSession) Disable() (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.Contract.Disable(&_VRFV2PlusWrapperArbitrum.TransactOpts) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumTransactor) Enable(opts *bind.TransactOpts) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.contract.Transact(opts, "enable") +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumSession) Enable() (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.Contract.Enable(&_VRFV2PlusWrapperArbitrum.TransactOpts) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumTransactorSession) Enable() (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.Contract.Enable(&_VRFV2PlusWrapperArbitrum.TransactOpts) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumTransactor) OnTokenTransfer(opts *bind.TransactOpts, _sender common.Address, _amount *big.Int, _data []byte) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.contract.Transact(opts, "onTokenTransfer", _sender, _amount, _data) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumSession) OnTokenTransfer(_sender common.Address, _amount *big.Int, _data []byte) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.Contract.OnTokenTransfer(&_VRFV2PlusWrapperArbitrum.TransactOpts, _sender, _amount, _data) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumTransactorSession) OnTokenTransfer(_sender common.Address, _amount *big.Int, _data []byte) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.Contract.OnTokenTransfer(&_VRFV2PlusWrapperArbitrum.TransactOpts, _sender, _amount, _data) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumTransactor) RawFulfillRandomWords(opts *bind.TransactOpts, requestId *big.Int, randomWords []*big.Int) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.contract.Transact(opts, "rawFulfillRandomWords", requestId, randomWords) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumSession) RawFulfillRandomWords(requestId *big.Int, randomWords []*big.Int) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.Contract.RawFulfillRandomWords(&_VRFV2PlusWrapperArbitrum.TransactOpts, requestId, randomWords) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumTransactorSession) RawFulfillRandomWords(requestId *big.Int, randomWords []*big.Int) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.Contract.RawFulfillRandomWords(&_VRFV2PlusWrapperArbitrum.TransactOpts, requestId, randomWords) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumTransactor) RequestRandomWordsInNative(opts *bind.TransactOpts, _callbackGasLimit uint32, _requestConfirmations uint16, _numWords uint32, extraArgs []byte) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.contract.Transact(opts, "requestRandomWordsInNative", _callbackGasLimit, _requestConfirmations, _numWords, extraArgs) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumSession) RequestRandomWordsInNative(_callbackGasLimit uint32, _requestConfirmations uint16, _numWords uint32, extraArgs []byte) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.Contract.RequestRandomWordsInNative(&_VRFV2PlusWrapperArbitrum.TransactOpts, _callbackGasLimit, _requestConfirmations, _numWords, extraArgs) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumTransactorSession) RequestRandomWordsInNative(_callbackGasLimit uint32, _requestConfirmations uint16, _numWords uint32, extraArgs []byte) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.Contract.RequestRandomWordsInNative(&_VRFV2PlusWrapperArbitrum.TransactOpts, _callbackGasLimit, _requestConfirmations, _numWords, extraArgs) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumTransactor) SetConfig(opts *bind.TransactOpts, _wrapperGasOverhead uint32, _coordinatorGasOverheadNative uint32, _coordinatorGasOverheadLink uint32, _coordinatorGasOverheadPerWord uint16, _coordinatorNativePremiumPercentage uint8, _coordinatorLinkPremiumPercentage uint8, _keyHash [32]byte, _maxNumWords uint8, _stalenessSeconds uint32, _fallbackWeiPerUnitLink *big.Int, _fulfillmentFlatFeeNativePPM uint32, _fulfillmentFlatFeeLinkDiscountPPM uint32) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.contract.Transact(opts, "setConfig", _wrapperGasOverhead, _coordinatorGasOverheadNative, _coordinatorGasOverheadLink, _coordinatorGasOverheadPerWord, _coordinatorNativePremiumPercentage, _coordinatorLinkPremiumPercentage, _keyHash, _maxNumWords, _stalenessSeconds, _fallbackWeiPerUnitLink, _fulfillmentFlatFeeNativePPM, _fulfillmentFlatFeeLinkDiscountPPM) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumSession) SetConfig(_wrapperGasOverhead uint32, _coordinatorGasOverheadNative uint32, _coordinatorGasOverheadLink uint32, _coordinatorGasOverheadPerWord uint16, _coordinatorNativePremiumPercentage uint8, _coordinatorLinkPremiumPercentage uint8, _keyHash [32]byte, _maxNumWords uint8, _stalenessSeconds uint32, _fallbackWeiPerUnitLink *big.Int, _fulfillmentFlatFeeNativePPM uint32, _fulfillmentFlatFeeLinkDiscountPPM uint32) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.Contract.SetConfig(&_VRFV2PlusWrapperArbitrum.TransactOpts, _wrapperGasOverhead, _coordinatorGasOverheadNative, _coordinatorGasOverheadLink, _coordinatorGasOverheadPerWord, _coordinatorNativePremiumPercentage, _coordinatorLinkPremiumPercentage, _keyHash, _maxNumWords, _stalenessSeconds, _fallbackWeiPerUnitLink, _fulfillmentFlatFeeNativePPM, _fulfillmentFlatFeeLinkDiscountPPM) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumTransactorSession) SetConfig(_wrapperGasOverhead uint32, _coordinatorGasOverheadNative uint32, _coordinatorGasOverheadLink uint32, _coordinatorGasOverheadPerWord uint16, _coordinatorNativePremiumPercentage uint8, _coordinatorLinkPremiumPercentage uint8, _keyHash [32]byte, _maxNumWords uint8, _stalenessSeconds uint32, _fallbackWeiPerUnitLink *big.Int, _fulfillmentFlatFeeNativePPM uint32, _fulfillmentFlatFeeLinkDiscountPPM uint32) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.Contract.SetConfig(&_VRFV2PlusWrapperArbitrum.TransactOpts, _wrapperGasOverhead, _coordinatorGasOverheadNative, _coordinatorGasOverheadLink, _coordinatorGasOverheadPerWord, _coordinatorNativePremiumPercentage, _coordinatorLinkPremiumPercentage, _keyHash, _maxNumWords, _stalenessSeconds, _fallbackWeiPerUnitLink, _fulfillmentFlatFeeNativePPM, _fulfillmentFlatFeeLinkDiscountPPM) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumTransactor) SetCoordinator(opts *bind.TransactOpts, _vrfCoordinator common.Address) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.contract.Transact(opts, "setCoordinator", _vrfCoordinator) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumSession) SetCoordinator(_vrfCoordinator common.Address) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.Contract.SetCoordinator(&_VRFV2PlusWrapperArbitrum.TransactOpts, _vrfCoordinator) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumTransactorSession) SetCoordinator(_vrfCoordinator common.Address) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.Contract.SetCoordinator(&_VRFV2PlusWrapperArbitrum.TransactOpts, _vrfCoordinator) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumTransactor) SetFulfillmentTxSize(opts *bind.TransactOpts, _size uint32) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.contract.Transact(opts, "setFulfillmentTxSize", _size) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumSession) SetFulfillmentTxSize(_size uint32) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.Contract.SetFulfillmentTxSize(&_VRFV2PlusWrapperArbitrum.TransactOpts, _size) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumTransactorSession) SetFulfillmentTxSize(_size uint32) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.Contract.SetFulfillmentTxSize(&_VRFV2PlusWrapperArbitrum.TransactOpts, _size) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.contract.Transact(opts, "transferOwnership", to) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumSession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.Contract.TransferOwnership(&_VRFV2PlusWrapperArbitrum.TransactOpts, to) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.Contract.TransferOwnership(&_VRFV2PlusWrapperArbitrum.TransactOpts, to) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumTransactor) Withdraw(opts *bind.TransactOpts, _recipient common.Address) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.contract.Transact(opts, "withdraw", _recipient) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumSession) Withdraw(_recipient common.Address) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.Contract.Withdraw(&_VRFV2PlusWrapperArbitrum.TransactOpts, _recipient) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumTransactorSession) Withdraw(_recipient common.Address) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.Contract.Withdraw(&_VRFV2PlusWrapperArbitrum.TransactOpts, _recipient) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumTransactor) WithdrawNative(opts *bind.TransactOpts, _recipient common.Address) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.contract.Transact(opts, "withdrawNative", _recipient) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumSession) WithdrawNative(_recipient common.Address) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.Contract.WithdrawNative(&_VRFV2PlusWrapperArbitrum.TransactOpts, _recipient) +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumTransactorSession) WithdrawNative(_recipient common.Address) (*types.Transaction, error) { + return _VRFV2PlusWrapperArbitrum.Contract.WithdrawNative(&_VRFV2PlusWrapperArbitrum.TransactOpts, _recipient) +} + +type VRFV2PlusWrapperArbitrumConfigSetIterator struct { + Event *VRFV2PlusWrapperArbitrumConfigSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusWrapperArbitrumConfigSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperArbitrumConfigSet) + 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(VRFV2PlusWrapperArbitrumConfigSet) + 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 *VRFV2PlusWrapperArbitrumConfigSetIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusWrapperArbitrumConfigSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusWrapperArbitrumConfigSet struct { + WrapperGasOverhead uint32 + CoordinatorGasOverheadNative uint32 + CoordinatorGasOverheadLink uint32 + CoordinatorGasOverheadPerWord uint16 + CoordinatorNativePremiumPercentage uint8 + CoordinatorLinkPremiumPercentage uint8 + KeyHash [32]byte + MaxNumWords uint8 + StalenessSeconds uint32 + FallbackWeiPerUnitLink *big.Int + FulfillmentFlatFeeNativePPM uint32 + FulfillmentFlatFeeLinkDiscountPPM uint32 + Raw types.Log +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumFilterer) FilterConfigSet(opts *bind.FilterOpts) (*VRFV2PlusWrapperArbitrumConfigSetIterator, error) { + + logs, sub, err := _VRFV2PlusWrapperArbitrum.contract.FilterLogs(opts, "ConfigSet") + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperArbitrumConfigSetIterator{contract: _VRFV2PlusWrapperArbitrum.contract, event: "ConfigSet", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumFilterer) WatchConfigSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperArbitrumConfigSet) (event.Subscription, error) { + + logs, sub, err := _VRFV2PlusWrapperArbitrum.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(VRFV2PlusWrapperArbitrumConfigSet) + if err := _VRFV2PlusWrapperArbitrum.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 (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumFilterer) ParseConfigSet(log types.Log) (*VRFV2PlusWrapperArbitrumConfigSet, error) { + event := new(VRFV2PlusWrapperArbitrumConfigSet) + if err := _VRFV2PlusWrapperArbitrum.contract.UnpackLog(event, "ConfigSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFV2PlusWrapperArbitrumCoordinatorSetIterator struct { + Event *VRFV2PlusWrapperArbitrumCoordinatorSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusWrapperArbitrumCoordinatorSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperArbitrumCoordinatorSet) + 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(VRFV2PlusWrapperArbitrumCoordinatorSet) + 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 *VRFV2PlusWrapperArbitrumCoordinatorSetIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusWrapperArbitrumCoordinatorSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusWrapperArbitrumCoordinatorSet struct { + VrfCoordinator common.Address + Raw types.Log +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumFilterer) FilterCoordinatorSet(opts *bind.FilterOpts) (*VRFV2PlusWrapperArbitrumCoordinatorSetIterator, error) { + + logs, sub, err := _VRFV2PlusWrapperArbitrum.contract.FilterLogs(opts, "CoordinatorSet") + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperArbitrumCoordinatorSetIterator{contract: _VRFV2PlusWrapperArbitrum.contract, event: "CoordinatorSet", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumFilterer) WatchCoordinatorSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperArbitrumCoordinatorSet) (event.Subscription, error) { + + logs, sub, err := _VRFV2PlusWrapperArbitrum.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(VRFV2PlusWrapperArbitrumCoordinatorSet) + if err := _VRFV2PlusWrapperArbitrum.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 (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumFilterer) ParseCoordinatorSet(log types.Log) (*VRFV2PlusWrapperArbitrumCoordinatorSet, error) { + event := new(VRFV2PlusWrapperArbitrumCoordinatorSet) + if err := _VRFV2PlusWrapperArbitrum.contract.UnpackLog(event, "CoordinatorSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFV2PlusWrapperArbitrumDisabledIterator struct { + Event *VRFV2PlusWrapperArbitrumDisabled + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusWrapperArbitrumDisabledIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperArbitrumDisabled) + 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(VRFV2PlusWrapperArbitrumDisabled) + 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 *VRFV2PlusWrapperArbitrumDisabledIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusWrapperArbitrumDisabledIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusWrapperArbitrumDisabled struct { + Raw types.Log +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumFilterer) FilterDisabled(opts *bind.FilterOpts) (*VRFV2PlusWrapperArbitrumDisabledIterator, error) { + + logs, sub, err := _VRFV2PlusWrapperArbitrum.contract.FilterLogs(opts, "Disabled") + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperArbitrumDisabledIterator{contract: _VRFV2PlusWrapperArbitrum.contract, event: "Disabled", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumFilterer) WatchDisabled(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperArbitrumDisabled) (event.Subscription, error) { + + logs, sub, err := _VRFV2PlusWrapperArbitrum.contract.WatchLogs(opts, "Disabled") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFV2PlusWrapperArbitrumDisabled) + if err := _VRFV2PlusWrapperArbitrum.contract.UnpackLog(event, "Disabled", 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 (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumFilterer) ParseDisabled(log types.Log) (*VRFV2PlusWrapperArbitrumDisabled, error) { + event := new(VRFV2PlusWrapperArbitrumDisabled) + if err := _VRFV2PlusWrapperArbitrum.contract.UnpackLog(event, "Disabled", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFV2PlusWrapperArbitrumEnabledIterator struct { + Event *VRFV2PlusWrapperArbitrumEnabled + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusWrapperArbitrumEnabledIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperArbitrumEnabled) + 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(VRFV2PlusWrapperArbitrumEnabled) + 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 *VRFV2PlusWrapperArbitrumEnabledIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusWrapperArbitrumEnabledIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusWrapperArbitrumEnabled struct { + Raw types.Log +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumFilterer) FilterEnabled(opts *bind.FilterOpts) (*VRFV2PlusWrapperArbitrumEnabledIterator, error) { + + logs, sub, err := _VRFV2PlusWrapperArbitrum.contract.FilterLogs(opts, "Enabled") + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperArbitrumEnabledIterator{contract: _VRFV2PlusWrapperArbitrum.contract, event: "Enabled", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumFilterer) WatchEnabled(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperArbitrumEnabled) (event.Subscription, error) { + + logs, sub, err := _VRFV2PlusWrapperArbitrum.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: + + event := new(VRFV2PlusWrapperArbitrumEnabled) + if err := _VRFV2PlusWrapperArbitrum.contract.UnpackLog(event, "Enabled", 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 (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumFilterer) ParseEnabled(log types.Log) (*VRFV2PlusWrapperArbitrumEnabled, error) { + event := new(VRFV2PlusWrapperArbitrumEnabled) + if err := _VRFV2PlusWrapperArbitrum.contract.UnpackLog(event, "Enabled", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFV2PlusWrapperArbitrumFallbackWeiPerUnitLinkUsedIterator struct { + Event *VRFV2PlusWrapperArbitrumFallbackWeiPerUnitLinkUsed + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusWrapperArbitrumFallbackWeiPerUnitLinkUsedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperArbitrumFallbackWeiPerUnitLinkUsed) + 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(VRFV2PlusWrapperArbitrumFallbackWeiPerUnitLinkUsed) + 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 *VRFV2PlusWrapperArbitrumFallbackWeiPerUnitLinkUsedIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusWrapperArbitrumFallbackWeiPerUnitLinkUsedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusWrapperArbitrumFallbackWeiPerUnitLinkUsed struct { + RequestId *big.Int + FallbackWeiPerUnitLink *big.Int + Raw types.Log +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumFilterer) FilterFallbackWeiPerUnitLinkUsed(opts *bind.FilterOpts) (*VRFV2PlusWrapperArbitrumFallbackWeiPerUnitLinkUsedIterator, error) { + + logs, sub, err := _VRFV2PlusWrapperArbitrum.contract.FilterLogs(opts, "FallbackWeiPerUnitLinkUsed") + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperArbitrumFallbackWeiPerUnitLinkUsedIterator{contract: _VRFV2PlusWrapperArbitrum.contract, event: "FallbackWeiPerUnitLinkUsed", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumFilterer) WatchFallbackWeiPerUnitLinkUsed(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperArbitrumFallbackWeiPerUnitLinkUsed) (event.Subscription, error) { + + logs, sub, err := _VRFV2PlusWrapperArbitrum.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(VRFV2PlusWrapperArbitrumFallbackWeiPerUnitLinkUsed) + if err := _VRFV2PlusWrapperArbitrum.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 (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumFilterer) ParseFallbackWeiPerUnitLinkUsed(log types.Log) (*VRFV2PlusWrapperArbitrumFallbackWeiPerUnitLinkUsed, error) { + event := new(VRFV2PlusWrapperArbitrumFallbackWeiPerUnitLinkUsed) + if err := _VRFV2PlusWrapperArbitrum.contract.UnpackLog(event, "FallbackWeiPerUnitLinkUsed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFV2PlusWrapperArbitrumFulfillmentTxSizeSetIterator struct { + Event *VRFV2PlusWrapperArbitrumFulfillmentTxSizeSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusWrapperArbitrumFulfillmentTxSizeSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperArbitrumFulfillmentTxSizeSet) + 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(VRFV2PlusWrapperArbitrumFulfillmentTxSizeSet) + 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 *VRFV2PlusWrapperArbitrumFulfillmentTxSizeSetIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusWrapperArbitrumFulfillmentTxSizeSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusWrapperArbitrumFulfillmentTxSizeSet struct { + Size uint32 + Raw types.Log +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumFilterer) FilterFulfillmentTxSizeSet(opts *bind.FilterOpts) (*VRFV2PlusWrapperArbitrumFulfillmentTxSizeSetIterator, error) { + + logs, sub, err := _VRFV2PlusWrapperArbitrum.contract.FilterLogs(opts, "FulfillmentTxSizeSet") + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperArbitrumFulfillmentTxSizeSetIterator{contract: _VRFV2PlusWrapperArbitrum.contract, event: "FulfillmentTxSizeSet", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumFilterer) WatchFulfillmentTxSizeSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperArbitrumFulfillmentTxSizeSet) (event.Subscription, error) { + + logs, sub, err := _VRFV2PlusWrapperArbitrum.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(VRFV2PlusWrapperArbitrumFulfillmentTxSizeSet) + if err := _VRFV2PlusWrapperArbitrum.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 (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumFilterer) ParseFulfillmentTxSizeSet(log types.Log) (*VRFV2PlusWrapperArbitrumFulfillmentTxSizeSet, error) { + event := new(VRFV2PlusWrapperArbitrumFulfillmentTxSizeSet) + if err := _VRFV2PlusWrapperArbitrum.contract.UnpackLog(event, "FulfillmentTxSizeSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFV2PlusWrapperArbitrumNativeWithdrawnIterator struct { + Event *VRFV2PlusWrapperArbitrumNativeWithdrawn + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusWrapperArbitrumNativeWithdrawnIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperArbitrumNativeWithdrawn) + 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(VRFV2PlusWrapperArbitrumNativeWithdrawn) + 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 *VRFV2PlusWrapperArbitrumNativeWithdrawnIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusWrapperArbitrumNativeWithdrawnIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusWrapperArbitrumNativeWithdrawn struct { + To common.Address + Amount *big.Int + Raw types.Log +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumFilterer) FilterNativeWithdrawn(opts *bind.FilterOpts, to []common.Address) (*VRFV2PlusWrapperArbitrumNativeWithdrawnIterator, error) { + + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _VRFV2PlusWrapperArbitrum.contract.FilterLogs(opts, "NativeWithdrawn", toRule) + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperArbitrumNativeWithdrawnIterator{contract: _VRFV2PlusWrapperArbitrum.contract, event: "NativeWithdrawn", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumFilterer) WatchNativeWithdrawn(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperArbitrumNativeWithdrawn, to []common.Address) (event.Subscription, error) { + + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _VRFV2PlusWrapperArbitrum.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(VRFV2PlusWrapperArbitrumNativeWithdrawn) + if err := _VRFV2PlusWrapperArbitrum.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 (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumFilterer) ParseNativeWithdrawn(log types.Log) (*VRFV2PlusWrapperArbitrumNativeWithdrawn, error) { + event := new(VRFV2PlusWrapperArbitrumNativeWithdrawn) + if err := _VRFV2PlusWrapperArbitrum.contract.UnpackLog(event, "NativeWithdrawn", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFV2PlusWrapperArbitrumOwnershipTransferRequestedIterator struct { + Event *VRFV2PlusWrapperArbitrumOwnershipTransferRequested + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusWrapperArbitrumOwnershipTransferRequestedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperArbitrumOwnershipTransferRequested) + 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(VRFV2PlusWrapperArbitrumOwnershipTransferRequested) + 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 *VRFV2PlusWrapperArbitrumOwnershipTransferRequestedIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusWrapperArbitrumOwnershipTransferRequestedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusWrapperArbitrumOwnershipTransferRequested struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFV2PlusWrapperArbitrumOwnershipTransferRequestedIterator, 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 := _VRFV2PlusWrapperArbitrum.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperArbitrumOwnershipTransferRequestedIterator{contract: _VRFV2PlusWrapperArbitrum.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperArbitrumOwnershipTransferRequested, 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 := _VRFV2PlusWrapperArbitrum.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(VRFV2PlusWrapperArbitrumOwnershipTransferRequested) + if err := _VRFV2PlusWrapperArbitrum.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 (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumFilterer) ParseOwnershipTransferRequested(log types.Log) (*VRFV2PlusWrapperArbitrumOwnershipTransferRequested, error) { + event := new(VRFV2PlusWrapperArbitrumOwnershipTransferRequested) + if err := _VRFV2PlusWrapperArbitrum.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFV2PlusWrapperArbitrumOwnershipTransferredIterator struct { + Event *VRFV2PlusWrapperArbitrumOwnershipTransferred + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusWrapperArbitrumOwnershipTransferredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperArbitrumOwnershipTransferred) + 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(VRFV2PlusWrapperArbitrumOwnershipTransferred) + 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 *VRFV2PlusWrapperArbitrumOwnershipTransferredIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusWrapperArbitrumOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusWrapperArbitrumOwnershipTransferred struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFV2PlusWrapperArbitrumOwnershipTransferredIterator, 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 := _VRFV2PlusWrapperArbitrum.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperArbitrumOwnershipTransferredIterator{contract: _VRFV2PlusWrapperArbitrum.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperArbitrumOwnershipTransferred, 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 := _VRFV2PlusWrapperArbitrum.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(VRFV2PlusWrapperArbitrumOwnershipTransferred) + if err := _VRFV2PlusWrapperArbitrum.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 (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumFilterer) ParseOwnershipTransferred(log types.Log) (*VRFV2PlusWrapperArbitrumOwnershipTransferred, error) { + event := new(VRFV2PlusWrapperArbitrumOwnershipTransferred) + if err := _VRFV2PlusWrapperArbitrum.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFV2PlusWrapperArbitrumWithdrawnIterator struct { + Event *VRFV2PlusWrapperArbitrumWithdrawn + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusWrapperArbitrumWithdrawnIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperArbitrumWithdrawn) + 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(VRFV2PlusWrapperArbitrumWithdrawn) + 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 *VRFV2PlusWrapperArbitrumWithdrawnIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusWrapperArbitrumWithdrawnIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusWrapperArbitrumWithdrawn struct { + To common.Address + Amount *big.Int + Raw types.Log +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumFilterer) FilterWithdrawn(opts *bind.FilterOpts, to []common.Address) (*VRFV2PlusWrapperArbitrumWithdrawnIterator, error) { + + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _VRFV2PlusWrapperArbitrum.contract.FilterLogs(opts, "Withdrawn", toRule) + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperArbitrumWithdrawnIterator{contract: _VRFV2PlusWrapperArbitrum.contract, event: "Withdrawn", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumFilterer) WatchWithdrawn(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperArbitrumWithdrawn, to []common.Address) (event.Subscription, error) { + + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _VRFV2PlusWrapperArbitrum.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(VRFV2PlusWrapperArbitrumWithdrawn) + if err := _VRFV2PlusWrapperArbitrum.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 (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumFilterer) ParseWithdrawn(log types.Log) (*VRFV2PlusWrapperArbitrumWithdrawn, error) { + event := new(VRFV2PlusWrapperArbitrumWithdrawn) + if err := _VRFV2PlusWrapperArbitrum.contract.UnpackLog(event, "Withdrawn", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFV2PlusWrapperArbitrumWrapperFulfillmentFailedIterator struct { + Event *VRFV2PlusWrapperArbitrumWrapperFulfillmentFailed + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusWrapperArbitrumWrapperFulfillmentFailedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperArbitrumWrapperFulfillmentFailed) + 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(VRFV2PlusWrapperArbitrumWrapperFulfillmentFailed) + 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 *VRFV2PlusWrapperArbitrumWrapperFulfillmentFailedIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusWrapperArbitrumWrapperFulfillmentFailedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusWrapperArbitrumWrapperFulfillmentFailed struct { + RequestId *big.Int + Consumer common.Address + Raw types.Log +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumFilterer) FilterWrapperFulfillmentFailed(opts *bind.FilterOpts, requestId []*big.Int, consumer []common.Address) (*VRFV2PlusWrapperArbitrumWrapperFulfillmentFailedIterator, 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 := _VRFV2PlusWrapperArbitrum.contract.FilterLogs(opts, "WrapperFulfillmentFailed", requestIdRule, consumerRule) + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperArbitrumWrapperFulfillmentFailedIterator{contract: _VRFV2PlusWrapperArbitrum.contract, event: "WrapperFulfillmentFailed", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumFilterer) WatchWrapperFulfillmentFailed(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperArbitrumWrapperFulfillmentFailed, 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 := _VRFV2PlusWrapperArbitrum.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(VRFV2PlusWrapperArbitrumWrapperFulfillmentFailed) + if err := _VRFV2PlusWrapperArbitrum.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 (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrumFilterer) ParseWrapperFulfillmentFailed(log types.Log) (*VRFV2PlusWrapperArbitrumWrapperFulfillmentFailed, error) { + event := new(VRFV2PlusWrapperArbitrumWrapperFulfillmentFailed) + if err := _VRFV2PlusWrapperArbitrum.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 + CoordinatorGasOverheadNative uint32 + CoordinatorGasOverheadLink uint32 + CoordinatorGasOverheadPerWord uint16 + WrapperNativePremiumPercentage uint8 + WrapperLinkPremiumPercentage uint8 + KeyHash [32]byte + MaxNumWords uint8 +} +type SCallbacks struct { + CallbackAddress common.Address + CallbackGasLimit uint32 + RequestGasPrice uint64 +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrum) ParseLog(log types.Log) (generated.AbigenLog, error) { + switch log.Topics[0] { + case _VRFV2PlusWrapperArbitrum.abi.Events["ConfigSet"].ID: + return _VRFV2PlusWrapperArbitrum.ParseConfigSet(log) + case _VRFV2PlusWrapperArbitrum.abi.Events["CoordinatorSet"].ID: + return _VRFV2PlusWrapperArbitrum.ParseCoordinatorSet(log) + case _VRFV2PlusWrapperArbitrum.abi.Events["Disabled"].ID: + return _VRFV2PlusWrapperArbitrum.ParseDisabled(log) + case _VRFV2PlusWrapperArbitrum.abi.Events["Enabled"].ID: + return _VRFV2PlusWrapperArbitrum.ParseEnabled(log) + case _VRFV2PlusWrapperArbitrum.abi.Events["FallbackWeiPerUnitLinkUsed"].ID: + return _VRFV2PlusWrapperArbitrum.ParseFallbackWeiPerUnitLinkUsed(log) + case _VRFV2PlusWrapperArbitrum.abi.Events["FulfillmentTxSizeSet"].ID: + return _VRFV2PlusWrapperArbitrum.ParseFulfillmentTxSizeSet(log) + case _VRFV2PlusWrapperArbitrum.abi.Events["NativeWithdrawn"].ID: + return _VRFV2PlusWrapperArbitrum.ParseNativeWithdrawn(log) + case _VRFV2PlusWrapperArbitrum.abi.Events["OwnershipTransferRequested"].ID: + return _VRFV2PlusWrapperArbitrum.ParseOwnershipTransferRequested(log) + case _VRFV2PlusWrapperArbitrum.abi.Events["OwnershipTransferred"].ID: + return _VRFV2PlusWrapperArbitrum.ParseOwnershipTransferred(log) + case _VRFV2PlusWrapperArbitrum.abi.Events["Withdrawn"].ID: + return _VRFV2PlusWrapperArbitrum.ParseWithdrawn(log) + case _VRFV2PlusWrapperArbitrum.abi.Events["WrapperFulfillmentFailed"].ID: + return _VRFV2PlusWrapperArbitrum.ParseWrapperFulfillmentFailed(log) + + default: + return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) + } +} + +func (VRFV2PlusWrapperArbitrumConfigSet) Topic() common.Hash { + return common.HexToHash("0x8aee1a8c131eaf1a5bd30594737b6926a7c5cb29281a97639f6ac93947c8995e") +} + +func (VRFV2PlusWrapperArbitrumCoordinatorSet) Topic() common.Hash { + return common.HexToHash("0xd1a6a14209a385a964d036e404cb5cfb71f4000cdb03c9366292430787261be6") +} + +func (VRFV2PlusWrapperArbitrumDisabled) Topic() common.Hash { + return common.HexToHash("0x75884cdadc4a89e8b545db800057f06ec7f5338a08183c7ba515f2bfdd9fe1e1") +} + +func (VRFV2PlusWrapperArbitrumEnabled) Topic() common.Hash { + return common.HexToHash("0xc0f961051f97b04c496472d11cb6170d844e4b2c9dfd3b602a4fa0139712d484") +} + +func (VRFV2PlusWrapperArbitrumFallbackWeiPerUnitLinkUsed) Topic() common.Hash { + return common.HexToHash("0x6ca648a381f22ead7e37773d934e64885dcf861fbfbb26c40354cbf0c4662d1a") +} + +func (VRFV2PlusWrapperArbitrumFulfillmentTxSizeSet) Topic() common.Hash { + return common.HexToHash("0x697b48b8b76cebb09a54ec4ff810e8a181c96f65395d51c744db09c115d1d5d0") +} + +func (VRFV2PlusWrapperArbitrumNativeWithdrawn) Topic() common.Hash { + return common.HexToHash("0xc303ca808382409472acbbf899c316cf439f409f6584aae22df86dfa3c9ed504") +} + +func (VRFV2PlusWrapperArbitrumOwnershipTransferRequested) Topic() common.Hash { + return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") +} + +func (VRFV2PlusWrapperArbitrumOwnershipTransferred) Topic() common.Hash { + return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") +} + +func (VRFV2PlusWrapperArbitrumWithdrawn) Topic() common.Hash { + return common.HexToHash("0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5") +} + +func (VRFV2PlusWrapperArbitrumWrapperFulfillmentFailed) Topic() common.Hash { + return common.HexToHash("0xc551b83c151f2d1c7eeb938ac59008e0409f1c1dc1e2f112449d4d79b4589022") +} + +func (_VRFV2PlusWrapperArbitrum *VRFV2PlusWrapperArbitrum) Address() common.Address { + return _VRFV2PlusWrapperArbitrum.address +} + +type VRFV2PlusWrapperArbitrumInterface interface { + SUBSCRIPTIONID(opts *bind.CallOpts) (*big.Int, error) + + CalculateRequestPrice(opts *bind.CallOpts, _callbackGasLimit uint32, _numWords uint32) (*big.Int, error) + + CalculateRequestPriceNative(opts *bind.CallOpts, _callbackGasLimit uint32, _numWords uint32) (*big.Int, error) + + CheckPaymentMode(opts *bind.CallOpts, extraArgs []byte, isLinkMode bool) error + + EstimateRequestPrice(opts *bind.CallOpts, _callbackGasLimit uint32, _numWords uint32, _requestGasPriceWei *big.Int) (*big.Int, error) + + EstimateRequestPriceNative(opts *bind.CallOpts, _callbackGasLimit uint32, _numWords 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) + + LinkNativeFeed(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) + + SDisabled(opts *bind.CallOpts) (bool, error) + + SFulfillmentTxSizeBytes(opts *bind.CallOpts) (uint32, error) + + SVrfCoordinator(opts *bind.CallOpts) (common.Address, error) + + TypeAndVersion(opts *bind.CallOpts) (string, error) + + AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) + + Disable(opts *bind.TransactOpts) (*types.Transaction, error) + + Enable(opts *bind.TransactOpts) (*types.Transaction, error) + + OnTokenTransfer(opts *bind.TransactOpts, _sender common.Address, _amount *big.Int, _data []byte) (*types.Transaction, error) + + RawFulfillRandomWords(opts *bind.TransactOpts, requestId *big.Int, randomWords []*big.Int) (*types.Transaction, error) + + RequestRandomWordsInNative(opts *bind.TransactOpts, _callbackGasLimit uint32, _requestConfirmations uint16, _numWords uint32, extraArgs []byte) (*types.Transaction, error) + + SetConfig(opts *bind.TransactOpts, _wrapperGasOverhead uint32, _coordinatorGasOverheadNative uint32, _coordinatorGasOverheadLink uint32, _coordinatorGasOverheadPerWord uint16, _coordinatorNativePremiumPercentage uint8, _coordinatorLinkPremiumPercentage uint8, _keyHash [32]byte, _maxNumWords uint8, _stalenessSeconds uint32, _fallbackWeiPerUnitLink *big.Int, _fulfillmentFlatFeeNativePPM uint32, _fulfillmentFlatFeeLinkDiscountPPM uint32) (*types.Transaction, error) + + SetCoordinator(opts *bind.TransactOpts, _vrfCoordinator common.Address) (*types.Transaction, error) + + SetFulfillmentTxSize(opts *bind.TransactOpts, _size uint32) (*types.Transaction, error) + + TransferOwnership(opts *bind.TransactOpts, to common.Address) (*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) (*VRFV2PlusWrapperArbitrumConfigSetIterator, error) + + WatchConfigSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperArbitrumConfigSet) (event.Subscription, error) + + ParseConfigSet(log types.Log) (*VRFV2PlusWrapperArbitrumConfigSet, error) + + FilterCoordinatorSet(opts *bind.FilterOpts) (*VRFV2PlusWrapperArbitrumCoordinatorSetIterator, error) + + WatchCoordinatorSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperArbitrumCoordinatorSet) (event.Subscription, error) + + ParseCoordinatorSet(log types.Log) (*VRFV2PlusWrapperArbitrumCoordinatorSet, error) + + FilterDisabled(opts *bind.FilterOpts) (*VRFV2PlusWrapperArbitrumDisabledIterator, error) + + WatchDisabled(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperArbitrumDisabled) (event.Subscription, error) + + ParseDisabled(log types.Log) (*VRFV2PlusWrapperArbitrumDisabled, error) + + FilterEnabled(opts *bind.FilterOpts) (*VRFV2PlusWrapperArbitrumEnabledIterator, error) + + WatchEnabled(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperArbitrumEnabled) (event.Subscription, error) + + ParseEnabled(log types.Log) (*VRFV2PlusWrapperArbitrumEnabled, error) + + FilterFallbackWeiPerUnitLinkUsed(opts *bind.FilterOpts) (*VRFV2PlusWrapperArbitrumFallbackWeiPerUnitLinkUsedIterator, error) + + WatchFallbackWeiPerUnitLinkUsed(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperArbitrumFallbackWeiPerUnitLinkUsed) (event.Subscription, error) + + ParseFallbackWeiPerUnitLinkUsed(log types.Log) (*VRFV2PlusWrapperArbitrumFallbackWeiPerUnitLinkUsed, error) + + FilterFulfillmentTxSizeSet(opts *bind.FilterOpts) (*VRFV2PlusWrapperArbitrumFulfillmentTxSizeSetIterator, error) + + WatchFulfillmentTxSizeSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperArbitrumFulfillmentTxSizeSet) (event.Subscription, error) + + ParseFulfillmentTxSizeSet(log types.Log) (*VRFV2PlusWrapperArbitrumFulfillmentTxSizeSet, error) + + FilterNativeWithdrawn(opts *bind.FilterOpts, to []common.Address) (*VRFV2PlusWrapperArbitrumNativeWithdrawnIterator, error) + + WatchNativeWithdrawn(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperArbitrumNativeWithdrawn, to []common.Address) (event.Subscription, error) + + ParseNativeWithdrawn(log types.Log) (*VRFV2PlusWrapperArbitrumNativeWithdrawn, error) + + FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFV2PlusWrapperArbitrumOwnershipTransferRequestedIterator, error) + + WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperArbitrumOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseOwnershipTransferRequested(log types.Log) (*VRFV2PlusWrapperArbitrumOwnershipTransferRequested, error) + + FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFV2PlusWrapperArbitrumOwnershipTransferredIterator, error) + + WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperArbitrumOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseOwnershipTransferred(log types.Log) (*VRFV2PlusWrapperArbitrumOwnershipTransferred, error) + + FilterWithdrawn(opts *bind.FilterOpts, to []common.Address) (*VRFV2PlusWrapperArbitrumWithdrawnIterator, error) + + WatchWithdrawn(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperArbitrumWithdrawn, to []common.Address) (event.Subscription, error) + + ParseWithdrawn(log types.Log) (*VRFV2PlusWrapperArbitrumWithdrawn, error) + + FilterWrapperFulfillmentFailed(opts *bind.FilterOpts, requestId []*big.Int, consumer []common.Address) (*VRFV2PlusWrapperArbitrumWrapperFulfillmentFailedIterator, error) + + WatchWrapperFulfillmentFailed(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperArbitrumWrapperFulfillmentFailed, requestId []*big.Int, consumer []common.Address) (event.Subscription, error) + + ParseWrapperFulfillmentFailed(log types.Log) (*VRFV2PlusWrapperArbitrumWrapperFulfillmentFailed, error) + + ParseLog(log types.Log) (generated.AbigenLog, error) + + Address() common.Address +} diff --git a/core/gethwrappers/generated/vrfv2plus_wrapper_optimism/vrfv2plus_wrapper_optimism.go b/core/gethwrappers/generated/vrfv2plus_wrapper_optimism/vrfv2plus_wrapper_optimism.go new file mode 100644 index 00000000000..59060e0457d --- /dev/null +++ b/core/gethwrappers/generated/vrfv2plus_wrapper_optimism/vrfv2plus_wrapper_optimism.go @@ -0,0 +1,2515 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package vrfv2plus_wrapper_optimism + +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 +) + +var VRFV2PlusWrapperOptimismMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_link\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_linkNativeFeed\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_coordinator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_subId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"FailedToTransferLink\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"expectedMinimumLength\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"actualLength\",\"type\":\"uint16\"}],\"name\":\"IncorrectExtraArgsLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"mode\",\"type\":\"uint8\"}],\"name\":\"InvalidL1FeeCalculationMode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"coefficient\",\"type\":\"uint8\"}],\"name\":\"InvalidL1FeeCoefficient\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"premiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"max\",\"type\":\"uint8\"}],\"name\":\"InvalidPremiumPercentage\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LINKPaymentInRequestRandomWordsInNative\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LinkAlreadySet\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"flatFeeLinkDiscountPPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeNativePPM\",\"type\":\"uint32\"}],\"name\":\"LinkDiscountTooHigh\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NativePaymentInOnTokenTransfer\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"want\",\"type\":\"address\"}],\"name\":\"OnlyCoordinatorCanFulfill\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"}],\"name\":\"OnlyOwnerOrCoordinator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SubscriptionIdMissing\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"mode\",\"type\":\"uint8\"}],\"name\":\"UnsupportedL1FeeCalculationMode\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"wrapperGasOverhead\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"coordinatorGasOverheadNative\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"coordinatorGasOverheadLink\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"coordinatorGasOverheadPerWord\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"coordinatorNativePremiumPercentage\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"coordinatorLinkPremiumPercentage\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"maxNumWords\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"stalenessSeconds\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"fallbackWeiPerUnitLink\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeNativePPM\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkDiscountPPM\",\"type\":\"uint32\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"}],\"name\":\"CoordinatorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Disabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Enabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"fallbackWeiPerUnitLink\",\"type\":\"int256\"}],\"name\":\"FallbackWeiPerUnitLinkUsed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"size\",\"type\":\"uint32\"}],\"name\":\"FulfillmentTxSizeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"mode\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"coefficient\",\"type\":\"uint8\"}],\"name\":\"L1FeeCalculationSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"NativeWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"WrapperFulfillmentFailed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"SUBSCRIPTION_ID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"}],\"name\":\"calculateRequestPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"}],\"name\":\"calculateRequestPriceNative\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isLinkMode\",\"type\":\"bool\"}],\"name\":\"checkPaymentMode\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disable\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"enable\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_requestGasPriceWei\",\"type\":\"uint256\"}],\"name\":\"estimateRequestPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_requestGasPriceWei\",\"type\":\"uint256\"}],\"name\":\"estimateRequestPriceNative\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"fallbackWeiPerUnitLink\",\"type\":\"int256\"},{\"internalType\":\"uint32\",\"name\":\"stalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeNativePPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkDiscountPPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"wrapperGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"coordinatorGasOverheadNative\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"coordinatorGasOverheadLink\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"coordinatorGasOverheadPerWord\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"wrapperNativePremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"wrapperLinkPremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"maxNumWords\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastRequestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"link\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"linkNativeFeed\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"onTokenTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"}],\"name\":\"rawFulfillRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"_requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"}],\"name\":\"requestRandomWordsInNative\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_callbacks\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"callbackAddress\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"requestGasPrice\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_configured\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_disabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_fulfillmentTxSizeBytes\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_l1FeeCalculationMode\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_l1FeeCoefficient\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_vrfCoordinator\",\"outputs\":[{\"internalType\":\"contractIVRFCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_wrapperGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_coordinatorGasOverheadNative\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_coordinatorGasOverheadLink\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"_coordinatorGasOverheadPerWord\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"_coordinatorNativePremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"_coordinatorLinkPremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"_keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"_maxNumWords\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"_stalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"int256\",\"name\":\"_fallbackWeiPerUnitLink\",\"type\":\"int256\"},{\"internalType\":\"uint32\",\"name\":\"_fulfillmentFlatFeeNativePPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_fulfillmentFlatFeeLinkDiscountPPM\",\"type\":\"uint32\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_size\",\"type\":\"uint32\"}],\"name\":\"setFulfillmentTxSize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"mode\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"coefficient\",\"type\":\"uint8\"}],\"name\":\"setL1FeeCalculation\",\"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: "0x60e06040526006805463ffffffff60401b191669030400000000000000001790556008805461ffff19166164001790553480156200003c57600080fd5b50604051620040d9380380620040d98339810160408190526200005f91620002c5565b83838383813380600081620000bb5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000ee57620000ee81620001fd565b5050506001600160a01b038116620001195760405163d92e233d60e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392831617905584811660a052831660c0526000819003620001635760405163a81c0bef60e01b815260040160405180910390fd5b60025460405163dc311dd360e01b8152600481018390526001600160a01b039091169063dc311dd390602401600060405180830381865afa158015620001ad573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620001d7919081019062000345565b50505060809290925250506008805460ff19166001179055506200046e95505050505050565b336001600160a01b03821603620002575760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401620000b2565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b0381168114620002c057600080fd5b919050565b60008060008060808587031215620002dc57600080fd5b620002e785620002a8565b9350620002f760208601620002a8565b92506200030760408601620002a8565b6060959095015193969295505050565b80516001600160601b0381168114620002c057600080fd5b634e487b7160e01b600052604160045260246000fd5b600080600080600060a086880312156200035e57600080fd5b620003698662000317565b945060206200037a81880162000317565b60408801519095506001600160401b0380821682146200039957600080fd5b819550620003aa60608a01620002a8565b94506080890151915080821115620003c157600080fd5b818901915089601f830112620003d657600080fd5b815181811115620003eb57620003eb6200032f565b8060051b604051601f19603f830116810181811085821117156200041357620004136200032f565b60405291825284820192508381018501918c8311156200043257600080fd5b938501935b828510156200045b576200044b85620002a8565b8452938501939285019262000437565b8096505050505050509295509295909350565b60805160a05160c051613c11620004c8600039600081816103bf015261236101526000818161032b015281816112d3015281816113a20152611d4c01526000818161022c015281816119a10152611f390152613c116000f3fe6080604052600436106101e25760003560e01c806357a8070a11610102578063a4c0ed3611610095578063cdd8d88511610064578063cdd8d885146107cd578063e1cab7451461080b578063f2fde38b1461082b578063fc2a88c31461084b57600080fd5b8063a4c0ed3614610645578063a608a1e114610665578063bf17e55914610698578063c3f909d4146106b857600080fd5b806390bd5c74116100d157806390bd5c74146105d15780639cfc058e146105f05780639eccacf614610603578063a3907d711461063057600080fd5b806357a8070a1461052f57806379ba5097146105715780638da5cb5b146105865780638ea98117146105b157600080fd5b80631fe543e31161017a5780632f622e6b116101495780632f622e6b146103f857806340e3290f1461041857806348baa1c51461044457806351cff8d91461050f57600080fd5b80631fe543e31461037057806327e5c50a146103905780632808e6c8146103b05780632f2770db146103e357600080fd5b806314530741116101b65780631453074114610290578063181f5a77146102b057806318b6f4c8146102fc5780631c4695f41461031c57600080fd5b806226501b146101e7578063030932bb1461021a578063045343aa1461024e57806313c34b7f14610270575b600080fd5b3480156101f357600080fd5b50610207610202366004613109565b610861565b6040519081526020015b60405180910390f35b34801561022657600080fd5b506102077f000000000000000000000000000000000000000000000000000000000000000081565b34801561025a57600080fd5b5061026e610269366004613172565b61099b565b005b34801561027c57600080fd5b5061020761028b36600461324e565b610c57565b34801561029c57600080fd5b5061026e6102ab366004613287565b610d7e565b3480156102bc57600080fd5b50604080518082018252601681527f5652465632506c75735772617070657220312e302e300000000000000000000060208201529051610211919061331e565b34801561030857600080fd5b5061026e610317366004613419565b610dd3565b34801561032857600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610211565b34801561037c57600080fd5b5061026e61038b366004613460565b610f4e565b34801561039c57600080fd5b506102076103ab36600461324e565b610fcc565b3480156103bc57600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061034b565b3480156103ef57600080fd5b5061026e611100565b34801561040457600080fd5b5061026e610413366004613503565b611173565b34801561042457600080fd5b506008546104329060ff1681565b60405160ff9091168152602001610211565b34801561045057600080fd5b506104ce61045f36600461351e565b60076020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff81169074010000000000000000000000000000000000000000810463ffffffff16907801000000000000000000000000000000000000000000000000900467ffffffffffffffff1683565b6040805173ffffffffffffffffffffffffffffffffffffffff909416845263ffffffff909216602084015267ffffffffffffffff1690820152606001610211565b34801561051b57600080fd5b5061026e61052a366004613503565b61129a565b34801561053b57600080fd5b506002546105619074010000000000000000000000000000000000000000900460ff1681565b6040519015158152602001610211565b34801561057d57600080fd5b5061026e61149b565b34801561059257600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff1661034b565b3480156105bd57600080fd5b5061026e6105cc366004613503565b611598565b3480156105dd57600080fd5b5060085461043290610100900460ff1681565b6102076105fe366004613580565b611723565b34801561060f57600080fd5b5060025461034b9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561063c57600080fd5b5061026e611bcf565b34801561065157600080fd5b5061026e6106603660046135fa565b611c2a565b34801561067157600080fd5b50600254610561907501000000000000000000000000000000000000000000900460ff1681565b3480156106a457600080fd5b5061026e6106b3366004613654565b612198565b3480156106c457600080fd5b50600554600654600354600254604051610211949363ffffffff808216947601000000000000000000000000000000000000000000008084048316957a010000000000000000000000000000000000000000000000000000850484169564010000000086048516956c0100000000000000000000000081048616957001000000000000000000000000000000008204169461ffff740100000000000000000000000000000000000000008304169460ff7e0100000000000000000000000000000000000000000000000000000000000084048116957f01000000000000000000000000000000000000000000000000000000000000009094048116949293919091041690613671565b3480156107d957600080fd5b506006546107f69068010000000000000000900463ffffffff1681565b60405163ffffffff9091168152602001610211565b34801561081757600080fd5b50610207610826366004613109565b612211565b34801561083757600080fd5b5061026e610846366004613503565b61232f565b34801561085757600080fd5b5061020760045481565b60025460009074010000000000000000000000000000000000000000900460ff166108ed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e666967757265640000000000000060448201526064015b60405180910390fd5b6002547501000000000000000000000000000000000000000000900460ff1615610973576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c65640000000000000000000000000060448201526064016108e4565b600061097d612343565b5090506109928563ffffffff16858584612499565b95945050505050565b6109a36125e8565b8163ffffffff168163ffffffff1611156109f9576040517f2780dcb200000000000000000000000000000000000000000000000000000000815263ffffffff8083166004830152831660248201526044016108e4565b609b60ff89161115610a43576040517f3acc511a00000000000000000000000000000000000000000000000000000000815260ff89166004820152609b60248201526044016108e4565b609b60ff88161115610a8d576040517f3acc511a00000000000000000000000000000000000000000000000000000000815260ff88166004820152609b60248201526044016108e4565b8b600660046101000a81548163ffffffff021916908363ffffffff1602179055508a6006600c6101000a81548163ffffffff021916908363ffffffff16021790555089600660106101000a81548163ffffffff021916908363ffffffff16021790555088600660146101000a81548161ffff021916908361ffff160217905550876006601e6101000a81548160ff021916908360ff160217905550866006601f6101000a81548160ff021916908360ff1602179055508560038190555084600260166101000a81548160ff021916908360ff1602179055506001600260146101000a81548160ff02191690831515021790555083600660006101000a81548163ffffffff021916908363ffffffff1602179055508260058190555081600660166101000a81548163ffffffff021916908363ffffffff160217905550806006601a6101000a81548163ffffffff021916908363ffffffff1602179055507f8aee1a8c131eaf1a5bd30594737b6926a7c5cb29281a97639f6ac93947c8995e8c8c8c8c8c8c8c8c8c8c8c6006601a9054906101000a900463ffffffff16604051610c419c9b9a999897969594939291906136f2565b60405180910390a1505050505050505050505050565b60025460009074010000000000000000000000000000000000000000900460ff16610cde576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e666967757265640000000000000060448201526064016108e4565b6002547501000000000000000000000000000000000000000000900460ff1615610d64576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c65640000000000000000000000000060448201526064016108e4565b610d758363ffffffff16833a61266b565b90505b92915050565b610d866125e8565b60ff8216610dc5576040517f1d6b700000000000000000000000000000000000000000000000000000000000815260ff831660048201526024016108e4565b610dcf828261276b565b5050565b8151600003610e135780610dcf576040517f6b81746e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815160241115610e645781516040517f51200dce0000000000000000000000000000000000000000000000000000000081526108e49160249160040161ffff92831681529116602082015260400190565b600082602381518110610e7957610e7961376f565b6020910101517fff00000000000000000000000000000000000000000000000000000000000000167f0100000000000000000000000000000000000000000000000000000000000000149050808015610ecf5750815b15610f06576040517f6048aa6800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80158015610f12575081155b15610f49576040517f6b81746e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b60025473ffffffffffffffffffffffffffffffffffffffff163314610fc1576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911660248201526044016108e4565b610f49838383612876565b60025460009074010000000000000000000000000000000000000000900460ff16611053576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e666967757265640000000000000060448201526064016108e4565b6002547501000000000000000000000000000000000000000000900460ff16156110d9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c65640000000000000000000000000060448201526064016108e4565b60006110e3612343565b5090506110f88463ffffffff16843a84612499565b949350505050565b6111086125e8565b600280547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1675010000000000000000000000000000000000000000001790556040517f75884cdadc4a89e8b545db800057f06ec7f5338a08183c7ba515f2bfdd9fe1e190600090a1565b61117b6125e8565b604051479060009073ffffffffffffffffffffffffffffffffffffffff84169083908381818185875af1925050503d80600081146111d5576040519150601f19603f3d011682016040523d82523d6000602084013e6111da565b606091505b5050905080611245576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f6661696c656420746f207769746864726177206e61746976650000000000000060448201526064016108e4565b8273ffffffffffffffffffffffffffffffffffffffff167fc303ca808382409472acbbf899c316cf439f409f6584aae22df86dfa3c9ed5048360405161128d91815260200190565b60405180910390a2505050565b6112a26125e8565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa15801561132f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611353919061379e565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018390529192507f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303816000875af11580156113ed573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061141191906137b7565b611447576040517f7c07fc4c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d58260405161148f91815260200190565b60405180910390a25050565b60015473ffffffffffffffffffffffffffffffffffffffff16331461151c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016108e4565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60005473ffffffffffffffffffffffffffffffffffffffff1633148015906115d8575060025473ffffffffffffffffffffffffffffffffffffffff163314155b1561165c57336115fd60005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff938416600482015291831660248301529190911660448201526064016108e4565b73ffffffffffffffffffffffffffffffffffffffff81166116a9576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527fd1a6a14209a385a964d036e404cb5cfb71f4000cdb03c9366292430787261be6906020015b60405180910390a150565b60025460009074010000000000000000000000000000000000000000900460ff166117aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e666967757265640000000000000060448201526064016108e4565b6002547501000000000000000000000000000000000000000000900460ff1615611830576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c65640000000000000000000000000060448201526064016108e4565b61186f83838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509250610dd3915050565b600061187a87612a5c565b9050600061188f8863ffffffff16873a61266b565b9050803410156118fb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f66656520746f6f206c6f7700000000000000000000000000000000000000000060448201526064016108e4565b600254760100000000000000000000000000000000000000000000900460ff1663ffffffff8716111561198a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6e756d576f72647320746f6f206869676800000000000000000000000000000060448201526064016108e4565b60006040518060c0016040528060035481526020017f000000000000000000000000000000000000000000000000000000000000000081526020018961ffff168152602001600660049054906101000a900463ffffffff16858c6119ee9190613803565b6119f89190613803565b63ffffffff1681526020018863ffffffff16815260200187878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509152506002546040517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff1690639b1c385e90611a9e908490600401613827565b6020604051808303816000875af1158015611abd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ae1919061379e565b6040805160608101825233815263ffffffff808d16602080840191825267ffffffffffffffff3a81168587019081526000888152600790935295909120935184549251955190911678010000000000000000000000000000000000000000000000000277ffffffffffffffffffffffffffffffffffffffffffffffff9590931674010000000000000000000000000000000000000000027fffffffffffffffff00000000000000000000000000000000000000000000000090921673ffffffffffffffffffffffffffffffffffffffff91909116171792909216919091179055935050505095945050505050565b611bd76125e8565b600280547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1690556040517fc0f961051f97b04c496472d11cb6170d844e4b2c9dfd3b602a4fa0139712d48490600090a1565b60025474010000000000000000000000000000000000000000900460ff16611cae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e666967757265640000000000000060448201526064016108e4565b6002547501000000000000000000000000000000000000000000900460ff1615611d34576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c65640000000000000000000000000060448201526064016108e4565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614611dd3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f6f6e6c792063616c6c61626c652066726f6d204c494e4b00000000000000000060448201526064016108e4565b6000808080611de485870187613884565b9350935093509350611df7816001610dd3565b6000611e0285612a5c565b9050600080611e0f612343565b915091506000611e278863ffffffff16873a86612499565b9050808b1015611e93576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f66656520746f6f206c6f7700000000000000000000000000000000000000000060448201526064016108e4565b600254760100000000000000000000000000000000000000000000900460ff1663ffffffff87161115611f22576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6e756d576f72647320746f6f206869676800000000000000000000000000000060448201526064016108e4565b60006040518060c0016040528060035481526020017f000000000000000000000000000000000000000000000000000000000000000081526020018961ffff168152602001600660049054906101000a900463ffffffff16878c611f869190613803565b611f909190613803565b63ffffffff908116825289166020820152604090810188905260025490517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925060009173ffffffffffffffffffffffffffffffffffffffff90911690639b1c385e90612004908590600401613827565b6020604051808303816000875af1158015612023573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612047919061379e565b905060405180606001604052808f73ffffffffffffffffffffffffffffffffffffffff1681526020018b63ffffffff1681526020013a67ffffffffffffffff168152506007600083815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160186101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550905050806004819055508315612188576005546040805183815260208101929092527f6ca648a381f22ead7e37773d934e64885dcf861fbfbb26c40354cbf0c4662d1a910160405180910390a15b5050505050505050505050505050565b6121a06125e8565b600680547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff166801000000000000000063ffffffff8416908102919091179091556040519081527f697b48b8b76cebb09a54ec4ff810e8a181c96f65395d51c744db09c115d1d5d090602001611718565b60025460009074010000000000000000000000000000000000000000900460ff16612298576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e666967757265640000000000000060448201526064016108e4565b6002547501000000000000000000000000000000000000000000900460ff161561231e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c65640000000000000000000000000060448201526064016108e4565b6110f88463ffffffff16848461266b565b6123376125e8565b61234081612a74565b50565b6000806000600660009054906101000a900463ffffffff16905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156123ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123ee9190613911565b50919650909250505063ffffffff82161580159061241a57506124118142613961565b8263ffffffff16105b925082156124285760055493505b6000841215612493576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496e76616c6964204c494e4b207765692070726963650000000000000000000060448201526064016108e4565b50509091565b60065460009081906124b990640100000000900463ffffffff1685613974565b905060006124c5612b69565b6124d0876000612b8f565b6124e09063ffffffff168961398b565b6124ea9087613974565b6124f4919061398b565b6006549091506000906125479063ffffffff7a010000000000000000000000000000000000000000000000000000820481169176010000000000000000000000000000000000000000000090041661399e565b61255c9063ffffffff1664e8d4a51000613974565b600654606490612592907f0100000000000000000000000000000000000000000000000000000000000000900460ff16826139bb565b61259f9060ff1685613974565b6125a99190613a03565b6125b3919061398b565b9050846125c0828561398b565b6125d290670de0b6b3a7640000613974565b6125dc9190613a03565b98975050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314612669576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016108e4565b565b600654600090819061268b90640100000000900463ffffffff1684613974565b90506000612697612b69565b6126a2866001612b8f565b6126b29063ffffffff168861398b565b6126bc9086613974565b6126c6919061398b565b6006549091506000906126fe90760100000000000000000000000000000000000000000000900463ffffffff1664e8d4a51000613974565b600654606490612733907e01000000000000000000000000000000000000000000000000000000000000900460ff16826139bb565b6127409060ff1685613974565b61274a9190613a03565b612754919061398b565b9050612760818461398b565b979650505050505050565b60038260ff16106127ad576040517f1c300f0000000000000000000000000000000000000000000000000000000000815260ff831660048201526024016108e4565b60ff811615806127c0575060648160ff16115b156127fc576040517f1a8a06a000000000000000000000000000000000000000000000000000000000815260ff821660048201526024016108e4565b6008805460ff8481167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00009092168217610100918516918202179092556040805191825260208201929092527f8e63dc2f2e669ce73bebd2580bb9dd9a5d17fa2d046ac02057d8349fc0b0c2f3910160405180910390a15050565b60008381526007602081815260408084208151606081018352815473ffffffffffffffffffffffffffffffffffffffff808216835274010000000000000000000000000000000000000000820463ffffffff1683870152780100000000000000000000000000000000000000000000000090910467ffffffffffffffff169382019390935288865293909252929055805190918116612971576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f72657175657374206e6f7420666f756e6400000000000000000000000000000060448201526064016108e4565b600080631fe543e360e01b87878760405160240161299193929190613a17565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506000612a07856020015163ffffffff168584612c3a565b905080612a525760405173ffffffffffffffffffffffffffffffffffffffff85169089907fc551b83c151f2d1c7eeb938ac59008e0409f1c1dc1e2f112449d4d79b458902290600090a35b5050505050505050565b6000612a69603f83613a70565b610d78906001613803565b3373ffffffffffffffffffffffffffffffffffffffff821603612af3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016108e4565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600654600090612b8a9068010000000000000000900463ffffffff16612c86565b905090565b60008115612bea57600654612bc09074010000000000000000000000000000000000000000900461ffff1684613a93565b600654612be391906c01000000000000000000000000900463ffffffff16613803565b9050610d78565b600654612c139074010000000000000000000000000000000000000000900461ffff1684613a93565b600654612be39190700100000000000000000000000000000000900463ffffffff16613803565b60005a611388811015612c4c57600080fd5b611388810390508460408204820311612c6457600080fd5b50823b612c7057600080fd5b60008083516020850160008789f1949350505050565b60085460009060ff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101612cf1576064612ccb612cc660478661398b565b612dd8565b600854612ce09190610100900460ff16613974565b612cea9190613a03565b9392505050565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe60ff821601612da157606473420000000000000000000000000000000000000f63f1c7a58b612d4260478761398b565b6040518263ffffffff1660e01b8152600401612d6091815260200190565b602060405180830381865afa158015612d7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ccb919061379e565b6040517f1c300f0000000000000000000000000000000000000000000000000000000000815260ff821660048201526024016108e4565b600080612de660448461398b565b612df1906010613974565b9050600073420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff1663519b4bd36040518163ffffffff1660e01b8152600401602060405180830381865afa158015612e54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e78919061379e565b73420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff1663c59859186040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ed7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612efb9190613abb565b612f06906010613a93565b63ffffffff16612f169190613974565b9050600073420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff1663f82061406040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f9d919061379e565b73420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff166368d5dca66040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ffc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130209190613abb565b63ffffffff166130309190613974565b9050600061303e828461398b565b6130489085613974565b905073420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156130a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130cd919061379e565b6130d890600a613bf8565b6130e3906010613974565b6130ed9082613a03565b9695505050505050565b63ffffffff8116811461234057600080fd5b60008060006060848603121561311e57600080fd5b8335613129816130f7565b92506020840135613139816130f7565b929592945050506040919091013590565b803561ffff8116811461315c57600080fd5b919050565b803560ff8116811461315c57600080fd5b6000806000806000806000806000806000806101808d8f03121561319557600080fd5b8c356131a0816130f7565b9b5060208d01356131b0816130f7565b9a5060408d01356131c0816130f7565b99506131ce60608e0161314a565b98506131dc60808e01613161565b97506131ea60a08e01613161565b965060c08d013595506131ff60e08e01613161565b94506101008d0135613210816130f7565b93506101208d013592506101408d0135613229816130f7565b91506101608d013561323a816130f7565b809150509295989b509295989b509295989b565b6000806040838503121561326157600080fd5b823561326c816130f7565b9150602083013561327c816130f7565b809150509250929050565b6000806040838503121561329a57600080fd5b6132a383613161565b91506132b160208401613161565b90509250929050565b6000815180845260005b818110156132e0576020818501810151868301820152016132c4565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000610d7560208301846132ba565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f83011261337157600080fd5b813567ffffffffffffffff8082111561338c5761338c613331565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156133d2576133d2613331565b816040528381528660208588010111156133eb57600080fd5b836020870160208301376000602085830101528094505050505092915050565b801515811461234057600080fd5b6000806040838503121561342c57600080fd5b823567ffffffffffffffff81111561344357600080fd5b61344f85828601613360565b925050602083013561327c8161340b565b60008060006040848603121561347557600080fd5b83359250602084013567ffffffffffffffff8082111561349457600080fd5b818601915086601f8301126134a857600080fd5b8135818111156134b757600080fd5b8760208260051b85010111156134cc57600080fd5b6020830194508093505050509250925092565b803573ffffffffffffffffffffffffffffffffffffffff8116811461315c57600080fd5b60006020828403121561351557600080fd5b610d75826134df565b60006020828403121561353057600080fd5b5035919050565b60008083601f84011261354957600080fd5b50813567ffffffffffffffff81111561356157600080fd5b60208301915083602082850101111561357957600080fd5b9250929050565b60008060008060006080868803121561359857600080fd5b85356135a3816130f7565b94506135b16020870161314a565b935060408601356135c1816130f7565b9250606086013567ffffffffffffffff8111156135dd57600080fd5b6135e988828901613537565b969995985093965092949392505050565b6000806000806060858703121561361057600080fd5b613619856134df565b935060208501359250604085013567ffffffffffffffff81111561363c57600080fd5b61364887828801613537565b95989497509550505050565b60006020828403121561366657600080fd5b8135612cea816130f7565b8c815263ffffffff8c811660208301528b811660408301528a81166060830152898116608083015288811660a0830152871660c082015261ffff861660e082015260ff85811661010083015284166101208201526101808101836101408301526136e161016083018460ff169052565b9d9c50505050505050505050505050565b63ffffffff8d811682528c811660208301528b8116604083015261ffff8b16606083015260ff8a8116608084015289811660a084015260c08301899052871660e0830152851661010082015261018081018461012083015261375d61014083018563ffffffff169052565b63ffffffff83166101608301526136e1565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156137b057600080fd5b5051919050565b6000602082840312156137c957600080fd5b8151612cea8161340b565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b63ffffffff818116838216019080821115613820576138206137d4565b5092915050565b60208152815160208201526020820151604082015261ffff60408301511660608201526000606083015163ffffffff80821660808501528060808601511660a0850152505060a083015160c0808401526110f860e08401826132ba565b6000806000806080858703121561389a57600080fd5b84356138a5816130f7565b93506138b36020860161314a565b925060408501356138c3816130f7565b9150606085013567ffffffffffffffff8111156138df57600080fd5b6138eb87828801613360565b91505092959194509250565b805169ffffffffffffffffffff8116811461315c57600080fd5b600080600080600060a0868803121561392957600080fd5b613932866138f7565b9450602086015193506040860151925060608601519150613955608087016138f7565b90509295509295909350565b81810381811115610d7857610d786137d4565b8082028115828204841417610d7857610d786137d4565b80820180821115610d7857610d786137d4565b63ffffffff828116828216039080821115613820576138206137d4565b60ff8181168382160190811115610d7857610d786137d4565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082613a1257613a126139d4565b500490565b8381526040602082015281604082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831115613a5657600080fd5b8260051b8085606085013791909101606001949350505050565b600063ffffffff80841680613a8757613a876139d4565b92169190910492915050565b63ffffffff818116838216028082169190828114613ab357613ab36137d4565b505092915050565b600060208284031215613acd57600080fd5b8151612cea816130f7565b600181815b80851115613b3157817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115613b1757613b176137d4565b80851615613b2457918102915b93841c9390800290613add565b509250929050565b600082613b4857506001610d78565b81613b5557506000610d78565b8160018114613b6b5760028114613b7557613b91565b6001915050610d78565b60ff841115613b8657613b866137d4565b50506001821b610d78565b5060208310610133831016604e8410600b8410161715613bb4575081810a610d78565b613bbe8383613ad8565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115613bf057613bf06137d4565b029392505050565b6000610d758383613b3956fea164736f6c6343000813000a", +} + +var VRFV2PlusWrapperOptimismABI = VRFV2PlusWrapperOptimismMetaData.ABI + +var VRFV2PlusWrapperOptimismBin = VRFV2PlusWrapperOptimismMetaData.Bin + +func DeployVRFV2PlusWrapperOptimism(auth *bind.TransactOpts, backend bind.ContractBackend, _link common.Address, _linkNativeFeed common.Address, _coordinator common.Address, _subId *big.Int) (common.Address, *types.Transaction, *VRFV2PlusWrapperOptimism, error) { + parsed, err := VRFV2PlusWrapperOptimismMetaData.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(VRFV2PlusWrapperOptimismBin), backend, _link, _linkNativeFeed, _coordinator, _subId) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &VRFV2PlusWrapperOptimism{address: address, abi: *parsed, VRFV2PlusWrapperOptimismCaller: VRFV2PlusWrapperOptimismCaller{contract: contract}, VRFV2PlusWrapperOptimismTransactor: VRFV2PlusWrapperOptimismTransactor{contract: contract}, VRFV2PlusWrapperOptimismFilterer: VRFV2PlusWrapperOptimismFilterer{contract: contract}}, nil +} + +type VRFV2PlusWrapperOptimism struct { + address common.Address + abi abi.ABI + VRFV2PlusWrapperOptimismCaller + VRFV2PlusWrapperOptimismTransactor + VRFV2PlusWrapperOptimismFilterer +} + +type VRFV2PlusWrapperOptimismCaller struct { + contract *bind.BoundContract +} + +type VRFV2PlusWrapperOptimismTransactor struct { + contract *bind.BoundContract +} + +type VRFV2PlusWrapperOptimismFilterer struct { + contract *bind.BoundContract +} + +type VRFV2PlusWrapperOptimismSession struct { + Contract *VRFV2PlusWrapperOptimism + CallOpts bind.CallOpts + TransactOpts bind.TransactOpts +} + +type VRFV2PlusWrapperOptimismCallerSession struct { + Contract *VRFV2PlusWrapperOptimismCaller + CallOpts bind.CallOpts +} + +type VRFV2PlusWrapperOptimismTransactorSession struct { + Contract *VRFV2PlusWrapperOptimismTransactor + TransactOpts bind.TransactOpts +} + +type VRFV2PlusWrapperOptimismRaw struct { + Contract *VRFV2PlusWrapperOptimism +} + +type VRFV2PlusWrapperOptimismCallerRaw struct { + Contract *VRFV2PlusWrapperOptimismCaller +} + +type VRFV2PlusWrapperOptimismTransactorRaw struct { + Contract *VRFV2PlusWrapperOptimismTransactor +} + +func NewVRFV2PlusWrapperOptimism(address common.Address, backend bind.ContractBackend) (*VRFV2PlusWrapperOptimism, error) { + abi, err := abi.JSON(strings.NewReader(VRFV2PlusWrapperOptimismABI)) + if err != nil { + return nil, err + } + contract, err := bindVRFV2PlusWrapperOptimism(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperOptimism{address: address, abi: abi, VRFV2PlusWrapperOptimismCaller: VRFV2PlusWrapperOptimismCaller{contract: contract}, VRFV2PlusWrapperOptimismTransactor: VRFV2PlusWrapperOptimismTransactor{contract: contract}, VRFV2PlusWrapperOptimismFilterer: VRFV2PlusWrapperOptimismFilterer{contract: contract}}, nil +} + +func NewVRFV2PlusWrapperOptimismCaller(address common.Address, caller bind.ContractCaller) (*VRFV2PlusWrapperOptimismCaller, error) { + contract, err := bindVRFV2PlusWrapperOptimism(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperOptimismCaller{contract: contract}, nil +} + +func NewVRFV2PlusWrapperOptimismTransactor(address common.Address, transactor bind.ContractTransactor) (*VRFV2PlusWrapperOptimismTransactor, error) { + contract, err := bindVRFV2PlusWrapperOptimism(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperOptimismTransactor{contract: contract}, nil +} + +func NewVRFV2PlusWrapperOptimismFilterer(address common.Address, filterer bind.ContractFilterer) (*VRFV2PlusWrapperOptimismFilterer, error) { + contract, err := bindVRFV2PlusWrapperOptimism(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperOptimismFilterer{contract: contract}, nil +} + +func bindVRFV2PlusWrapperOptimism(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := VRFV2PlusWrapperOptimismMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _VRFV2PlusWrapperOptimism.Contract.VRFV2PlusWrapperOptimismCaller.contract.Call(opts, result, method, params...) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.Contract.VRFV2PlusWrapperOptimismTransactor.contract.Transfer(opts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.Contract.VRFV2PlusWrapperOptimismTransactor.contract.Transact(opts, method, params...) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _VRFV2PlusWrapperOptimism.Contract.contract.Call(opts, result, method, params...) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.Contract.contract.Transfer(opts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.Contract.contract.Transact(opts, method, params...) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCaller) SUBSCRIPTIONID(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _VRFV2PlusWrapperOptimism.contract.Call(opts, &out, "SUBSCRIPTION_ID") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismSession) SUBSCRIPTIONID() (*big.Int, error) { + return _VRFV2PlusWrapperOptimism.Contract.SUBSCRIPTIONID(&_VRFV2PlusWrapperOptimism.CallOpts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCallerSession) SUBSCRIPTIONID() (*big.Int, error) { + return _VRFV2PlusWrapperOptimism.Contract.SUBSCRIPTIONID(&_VRFV2PlusWrapperOptimism.CallOpts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCaller) CalculateRequestPrice(opts *bind.CallOpts, _callbackGasLimit uint32, _numWords uint32) (*big.Int, error) { + var out []interface{} + err := _VRFV2PlusWrapperOptimism.contract.Call(opts, &out, "calculateRequestPrice", _callbackGasLimit, _numWords) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismSession) CalculateRequestPrice(_callbackGasLimit uint32, _numWords uint32) (*big.Int, error) { + return _VRFV2PlusWrapperOptimism.Contract.CalculateRequestPrice(&_VRFV2PlusWrapperOptimism.CallOpts, _callbackGasLimit, _numWords) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCallerSession) CalculateRequestPrice(_callbackGasLimit uint32, _numWords uint32) (*big.Int, error) { + return _VRFV2PlusWrapperOptimism.Contract.CalculateRequestPrice(&_VRFV2PlusWrapperOptimism.CallOpts, _callbackGasLimit, _numWords) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCaller) CalculateRequestPriceNative(opts *bind.CallOpts, _callbackGasLimit uint32, _numWords uint32) (*big.Int, error) { + var out []interface{} + err := _VRFV2PlusWrapperOptimism.contract.Call(opts, &out, "calculateRequestPriceNative", _callbackGasLimit, _numWords) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismSession) CalculateRequestPriceNative(_callbackGasLimit uint32, _numWords uint32) (*big.Int, error) { + return _VRFV2PlusWrapperOptimism.Contract.CalculateRequestPriceNative(&_VRFV2PlusWrapperOptimism.CallOpts, _callbackGasLimit, _numWords) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCallerSession) CalculateRequestPriceNative(_callbackGasLimit uint32, _numWords uint32) (*big.Int, error) { + return _VRFV2PlusWrapperOptimism.Contract.CalculateRequestPriceNative(&_VRFV2PlusWrapperOptimism.CallOpts, _callbackGasLimit, _numWords) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCaller) CheckPaymentMode(opts *bind.CallOpts, extraArgs []byte, isLinkMode bool) error { + var out []interface{} + err := _VRFV2PlusWrapperOptimism.contract.Call(opts, &out, "checkPaymentMode", extraArgs, isLinkMode) + + if err != nil { + return err + } + + return err + +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismSession) CheckPaymentMode(extraArgs []byte, isLinkMode bool) error { + return _VRFV2PlusWrapperOptimism.Contract.CheckPaymentMode(&_VRFV2PlusWrapperOptimism.CallOpts, extraArgs, isLinkMode) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCallerSession) CheckPaymentMode(extraArgs []byte, isLinkMode bool) error { + return _VRFV2PlusWrapperOptimism.Contract.CheckPaymentMode(&_VRFV2PlusWrapperOptimism.CallOpts, extraArgs, isLinkMode) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCaller) EstimateRequestPrice(opts *bind.CallOpts, _callbackGasLimit uint32, _numWords uint32, _requestGasPriceWei *big.Int) (*big.Int, error) { + var out []interface{} + err := _VRFV2PlusWrapperOptimism.contract.Call(opts, &out, "estimateRequestPrice", _callbackGasLimit, _numWords, _requestGasPriceWei) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismSession) EstimateRequestPrice(_callbackGasLimit uint32, _numWords uint32, _requestGasPriceWei *big.Int) (*big.Int, error) { + return _VRFV2PlusWrapperOptimism.Contract.EstimateRequestPrice(&_VRFV2PlusWrapperOptimism.CallOpts, _callbackGasLimit, _numWords, _requestGasPriceWei) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCallerSession) EstimateRequestPrice(_callbackGasLimit uint32, _numWords uint32, _requestGasPriceWei *big.Int) (*big.Int, error) { + return _VRFV2PlusWrapperOptimism.Contract.EstimateRequestPrice(&_VRFV2PlusWrapperOptimism.CallOpts, _callbackGasLimit, _numWords, _requestGasPriceWei) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCaller) EstimateRequestPriceNative(opts *bind.CallOpts, _callbackGasLimit uint32, _numWords uint32, _requestGasPriceWei *big.Int) (*big.Int, error) { + var out []interface{} + err := _VRFV2PlusWrapperOptimism.contract.Call(opts, &out, "estimateRequestPriceNative", _callbackGasLimit, _numWords, _requestGasPriceWei) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismSession) EstimateRequestPriceNative(_callbackGasLimit uint32, _numWords uint32, _requestGasPriceWei *big.Int) (*big.Int, error) { + return _VRFV2PlusWrapperOptimism.Contract.EstimateRequestPriceNative(&_VRFV2PlusWrapperOptimism.CallOpts, _callbackGasLimit, _numWords, _requestGasPriceWei) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCallerSession) EstimateRequestPriceNative(_callbackGasLimit uint32, _numWords uint32, _requestGasPriceWei *big.Int) (*big.Int, error) { + return _VRFV2PlusWrapperOptimism.Contract.EstimateRequestPriceNative(&_VRFV2PlusWrapperOptimism.CallOpts, _callbackGasLimit, _numWords, _requestGasPriceWei) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCaller) GetConfig(opts *bind.CallOpts) (GetConfig, + + error) { + var out []interface{} + err := _VRFV2PlusWrapperOptimism.contract.Call(opts, &out, "getConfig") + + outstruct := new(GetConfig) + if err != nil { + return *outstruct, err + } + + outstruct.FallbackWeiPerUnitLink = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.StalenessSeconds = *abi.ConvertType(out[1], 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.CoordinatorGasOverheadNative = *abi.ConvertType(out[5], new(uint32)).(*uint32) + outstruct.CoordinatorGasOverheadLink = *abi.ConvertType(out[6], new(uint32)).(*uint32) + outstruct.CoordinatorGasOverheadPerWord = *abi.ConvertType(out[7], new(uint16)).(*uint16) + outstruct.WrapperNativePremiumPercentage = *abi.ConvertType(out[8], new(uint8)).(*uint8) + outstruct.WrapperLinkPremiumPercentage = *abi.ConvertType(out[9], new(uint8)).(*uint8) + outstruct.KeyHash = *abi.ConvertType(out[10], new([32]byte)).(*[32]byte) + outstruct.MaxNumWords = *abi.ConvertType(out[11], new(uint8)).(*uint8) + + return *outstruct, err + +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismSession) GetConfig() (GetConfig, + + error) { + return _VRFV2PlusWrapperOptimism.Contract.GetConfig(&_VRFV2PlusWrapperOptimism.CallOpts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCallerSession) GetConfig() (GetConfig, + + error) { + return _VRFV2PlusWrapperOptimism.Contract.GetConfig(&_VRFV2PlusWrapperOptimism.CallOpts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCaller) LastRequestId(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _VRFV2PlusWrapperOptimism.contract.Call(opts, &out, "lastRequestId") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismSession) LastRequestId() (*big.Int, error) { + return _VRFV2PlusWrapperOptimism.Contract.LastRequestId(&_VRFV2PlusWrapperOptimism.CallOpts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCallerSession) LastRequestId() (*big.Int, error) { + return _VRFV2PlusWrapperOptimism.Contract.LastRequestId(&_VRFV2PlusWrapperOptimism.CallOpts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCaller) Link(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _VRFV2PlusWrapperOptimism.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 (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismSession) Link() (common.Address, error) { + return _VRFV2PlusWrapperOptimism.Contract.Link(&_VRFV2PlusWrapperOptimism.CallOpts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCallerSession) Link() (common.Address, error) { + return _VRFV2PlusWrapperOptimism.Contract.Link(&_VRFV2PlusWrapperOptimism.CallOpts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCaller) LinkNativeFeed(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _VRFV2PlusWrapperOptimism.contract.Call(opts, &out, "linkNativeFeed") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismSession) LinkNativeFeed() (common.Address, error) { + return _VRFV2PlusWrapperOptimism.Contract.LinkNativeFeed(&_VRFV2PlusWrapperOptimism.CallOpts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCallerSession) LinkNativeFeed() (common.Address, error) { + return _VRFV2PlusWrapperOptimism.Contract.LinkNativeFeed(&_VRFV2PlusWrapperOptimism.CallOpts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _VRFV2PlusWrapperOptimism.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 (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismSession) Owner() (common.Address, error) { + return _VRFV2PlusWrapperOptimism.Contract.Owner(&_VRFV2PlusWrapperOptimism.CallOpts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCallerSession) Owner() (common.Address, error) { + return _VRFV2PlusWrapperOptimism.Contract.Owner(&_VRFV2PlusWrapperOptimism.CallOpts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCaller) SCallbacks(opts *bind.CallOpts, arg0 *big.Int) (SCallbacks, + + error) { + var out []interface{} + err := _VRFV2PlusWrapperOptimism.contract.Call(opts, &out, "s_callbacks", arg0) + + outstruct := new(SCallbacks) + if err != nil { + return *outstruct, err + } + + outstruct.CallbackAddress = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + outstruct.CallbackGasLimit = *abi.ConvertType(out[1], new(uint32)).(*uint32) + outstruct.RequestGasPrice = *abi.ConvertType(out[2], new(uint64)).(*uint64) + + return *outstruct, err + +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismSession) SCallbacks(arg0 *big.Int) (SCallbacks, + + error) { + return _VRFV2PlusWrapperOptimism.Contract.SCallbacks(&_VRFV2PlusWrapperOptimism.CallOpts, arg0) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCallerSession) SCallbacks(arg0 *big.Int) (SCallbacks, + + error) { + return _VRFV2PlusWrapperOptimism.Contract.SCallbacks(&_VRFV2PlusWrapperOptimism.CallOpts, arg0) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCaller) SConfigured(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _VRFV2PlusWrapperOptimism.contract.Call(opts, &out, "s_configured") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismSession) SConfigured() (bool, error) { + return _VRFV2PlusWrapperOptimism.Contract.SConfigured(&_VRFV2PlusWrapperOptimism.CallOpts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCallerSession) SConfigured() (bool, error) { + return _VRFV2PlusWrapperOptimism.Contract.SConfigured(&_VRFV2PlusWrapperOptimism.CallOpts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCaller) SDisabled(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _VRFV2PlusWrapperOptimism.contract.Call(opts, &out, "s_disabled") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismSession) SDisabled() (bool, error) { + return _VRFV2PlusWrapperOptimism.Contract.SDisabled(&_VRFV2PlusWrapperOptimism.CallOpts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCallerSession) SDisabled() (bool, error) { + return _VRFV2PlusWrapperOptimism.Contract.SDisabled(&_VRFV2PlusWrapperOptimism.CallOpts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCaller) SFulfillmentTxSizeBytes(opts *bind.CallOpts) (uint32, error) { + var out []interface{} + err := _VRFV2PlusWrapperOptimism.contract.Call(opts, &out, "s_fulfillmentTxSizeBytes") + + if err != nil { + return *new(uint32), err + } + + out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) + + return out0, err + +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismSession) SFulfillmentTxSizeBytes() (uint32, error) { + return _VRFV2PlusWrapperOptimism.Contract.SFulfillmentTxSizeBytes(&_VRFV2PlusWrapperOptimism.CallOpts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCallerSession) SFulfillmentTxSizeBytes() (uint32, error) { + return _VRFV2PlusWrapperOptimism.Contract.SFulfillmentTxSizeBytes(&_VRFV2PlusWrapperOptimism.CallOpts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCaller) SL1FeeCalculationMode(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _VRFV2PlusWrapperOptimism.contract.Call(opts, &out, "s_l1FeeCalculationMode") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismSession) SL1FeeCalculationMode() (uint8, error) { + return _VRFV2PlusWrapperOptimism.Contract.SL1FeeCalculationMode(&_VRFV2PlusWrapperOptimism.CallOpts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCallerSession) SL1FeeCalculationMode() (uint8, error) { + return _VRFV2PlusWrapperOptimism.Contract.SL1FeeCalculationMode(&_VRFV2PlusWrapperOptimism.CallOpts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCaller) SL1FeeCoefficient(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _VRFV2PlusWrapperOptimism.contract.Call(opts, &out, "s_l1FeeCoefficient") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismSession) SL1FeeCoefficient() (uint8, error) { + return _VRFV2PlusWrapperOptimism.Contract.SL1FeeCoefficient(&_VRFV2PlusWrapperOptimism.CallOpts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCallerSession) SL1FeeCoefficient() (uint8, error) { + return _VRFV2PlusWrapperOptimism.Contract.SL1FeeCoefficient(&_VRFV2PlusWrapperOptimism.CallOpts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCaller) SVrfCoordinator(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _VRFV2PlusWrapperOptimism.contract.Call(opts, &out, "s_vrfCoordinator") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismSession) SVrfCoordinator() (common.Address, error) { + return _VRFV2PlusWrapperOptimism.Contract.SVrfCoordinator(&_VRFV2PlusWrapperOptimism.CallOpts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCallerSession) SVrfCoordinator() (common.Address, error) { + return _VRFV2PlusWrapperOptimism.Contract.SVrfCoordinator(&_VRFV2PlusWrapperOptimism.CallOpts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCaller) TypeAndVersion(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _VRFV2PlusWrapperOptimism.contract.Call(opts, &out, "typeAndVersion") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismSession) TypeAndVersion() (string, error) { + return _VRFV2PlusWrapperOptimism.Contract.TypeAndVersion(&_VRFV2PlusWrapperOptimism.CallOpts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismCallerSession) TypeAndVersion() (string, error) { + return _VRFV2PlusWrapperOptimism.Contract.TypeAndVersion(&_VRFV2PlusWrapperOptimism.CallOpts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.contract.Transact(opts, "acceptOwnership") +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismSession) AcceptOwnership() (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.Contract.AcceptOwnership(&_VRFV2PlusWrapperOptimism.TransactOpts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismTransactorSession) AcceptOwnership() (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.Contract.AcceptOwnership(&_VRFV2PlusWrapperOptimism.TransactOpts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismTransactor) Disable(opts *bind.TransactOpts) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.contract.Transact(opts, "disable") +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismSession) Disable() (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.Contract.Disable(&_VRFV2PlusWrapperOptimism.TransactOpts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismTransactorSession) Disable() (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.Contract.Disable(&_VRFV2PlusWrapperOptimism.TransactOpts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismTransactor) Enable(opts *bind.TransactOpts) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.contract.Transact(opts, "enable") +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismSession) Enable() (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.Contract.Enable(&_VRFV2PlusWrapperOptimism.TransactOpts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismTransactorSession) Enable() (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.Contract.Enable(&_VRFV2PlusWrapperOptimism.TransactOpts) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismTransactor) OnTokenTransfer(opts *bind.TransactOpts, _sender common.Address, _amount *big.Int, _data []byte) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.contract.Transact(opts, "onTokenTransfer", _sender, _amount, _data) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismSession) OnTokenTransfer(_sender common.Address, _amount *big.Int, _data []byte) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.Contract.OnTokenTransfer(&_VRFV2PlusWrapperOptimism.TransactOpts, _sender, _amount, _data) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismTransactorSession) OnTokenTransfer(_sender common.Address, _amount *big.Int, _data []byte) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.Contract.OnTokenTransfer(&_VRFV2PlusWrapperOptimism.TransactOpts, _sender, _amount, _data) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismTransactor) RawFulfillRandomWords(opts *bind.TransactOpts, requestId *big.Int, randomWords []*big.Int) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.contract.Transact(opts, "rawFulfillRandomWords", requestId, randomWords) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismSession) RawFulfillRandomWords(requestId *big.Int, randomWords []*big.Int) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.Contract.RawFulfillRandomWords(&_VRFV2PlusWrapperOptimism.TransactOpts, requestId, randomWords) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismTransactorSession) RawFulfillRandomWords(requestId *big.Int, randomWords []*big.Int) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.Contract.RawFulfillRandomWords(&_VRFV2PlusWrapperOptimism.TransactOpts, requestId, randomWords) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismTransactor) RequestRandomWordsInNative(opts *bind.TransactOpts, _callbackGasLimit uint32, _requestConfirmations uint16, _numWords uint32, extraArgs []byte) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.contract.Transact(opts, "requestRandomWordsInNative", _callbackGasLimit, _requestConfirmations, _numWords, extraArgs) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismSession) RequestRandomWordsInNative(_callbackGasLimit uint32, _requestConfirmations uint16, _numWords uint32, extraArgs []byte) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.Contract.RequestRandomWordsInNative(&_VRFV2PlusWrapperOptimism.TransactOpts, _callbackGasLimit, _requestConfirmations, _numWords, extraArgs) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismTransactorSession) RequestRandomWordsInNative(_callbackGasLimit uint32, _requestConfirmations uint16, _numWords uint32, extraArgs []byte) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.Contract.RequestRandomWordsInNative(&_VRFV2PlusWrapperOptimism.TransactOpts, _callbackGasLimit, _requestConfirmations, _numWords, extraArgs) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismTransactor) SetConfig(opts *bind.TransactOpts, _wrapperGasOverhead uint32, _coordinatorGasOverheadNative uint32, _coordinatorGasOverheadLink uint32, _coordinatorGasOverheadPerWord uint16, _coordinatorNativePremiumPercentage uint8, _coordinatorLinkPremiumPercentage uint8, _keyHash [32]byte, _maxNumWords uint8, _stalenessSeconds uint32, _fallbackWeiPerUnitLink *big.Int, _fulfillmentFlatFeeNativePPM uint32, _fulfillmentFlatFeeLinkDiscountPPM uint32) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.contract.Transact(opts, "setConfig", _wrapperGasOverhead, _coordinatorGasOverheadNative, _coordinatorGasOverheadLink, _coordinatorGasOverheadPerWord, _coordinatorNativePremiumPercentage, _coordinatorLinkPremiumPercentage, _keyHash, _maxNumWords, _stalenessSeconds, _fallbackWeiPerUnitLink, _fulfillmentFlatFeeNativePPM, _fulfillmentFlatFeeLinkDiscountPPM) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismSession) SetConfig(_wrapperGasOverhead uint32, _coordinatorGasOverheadNative uint32, _coordinatorGasOverheadLink uint32, _coordinatorGasOverheadPerWord uint16, _coordinatorNativePremiumPercentage uint8, _coordinatorLinkPremiumPercentage uint8, _keyHash [32]byte, _maxNumWords uint8, _stalenessSeconds uint32, _fallbackWeiPerUnitLink *big.Int, _fulfillmentFlatFeeNativePPM uint32, _fulfillmentFlatFeeLinkDiscountPPM uint32) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.Contract.SetConfig(&_VRFV2PlusWrapperOptimism.TransactOpts, _wrapperGasOverhead, _coordinatorGasOverheadNative, _coordinatorGasOverheadLink, _coordinatorGasOverheadPerWord, _coordinatorNativePremiumPercentage, _coordinatorLinkPremiumPercentage, _keyHash, _maxNumWords, _stalenessSeconds, _fallbackWeiPerUnitLink, _fulfillmentFlatFeeNativePPM, _fulfillmentFlatFeeLinkDiscountPPM) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismTransactorSession) SetConfig(_wrapperGasOverhead uint32, _coordinatorGasOverheadNative uint32, _coordinatorGasOverheadLink uint32, _coordinatorGasOverheadPerWord uint16, _coordinatorNativePremiumPercentage uint8, _coordinatorLinkPremiumPercentage uint8, _keyHash [32]byte, _maxNumWords uint8, _stalenessSeconds uint32, _fallbackWeiPerUnitLink *big.Int, _fulfillmentFlatFeeNativePPM uint32, _fulfillmentFlatFeeLinkDiscountPPM uint32) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.Contract.SetConfig(&_VRFV2PlusWrapperOptimism.TransactOpts, _wrapperGasOverhead, _coordinatorGasOverheadNative, _coordinatorGasOverheadLink, _coordinatorGasOverheadPerWord, _coordinatorNativePremiumPercentage, _coordinatorLinkPremiumPercentage, _keyHash, _maxNumWords, _stalenessSeconds, _fallbackWeiPerUnitLink, _fulfillmentFlatFeeNativePPM, _fulfillmentFlatFeeLinkDiscountPPM) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismTransactor) SetCoordinator(opts *bind.TransactOpts, _vrfCoordinator common.Address) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.contract.Transact(opts, "setCoordinator", _vrfCoordinator) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismSession) SetCoordinator(_vrfCoordinator common.Address) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.Contract.SetCoordinator(&_VRFV2PlusWrapperOptimism.TransactOpts, _vrfCoordinator) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismTransactorSession) SetCoordinator(_vrfCoordinator common.Address) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.Contract.SetCoordinator(&_VRFV2PlusWrapperOptimism.TransactOpts, _vrfCoordinator) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismTransactor) SetFulfillmentTxSize(opts *bind.TransactOpts, _size uint32) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.contract.Transact(opts, "setFulfillmentTxSize", _size) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismSession) SetFulfillmentTxSize(_size uint32) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.Contract.SetFulfillmentTxSize(&_VRFV2PlusWrapperOptimism.TransactOpts, _size) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismTransactorSession) SetFulfillmentTxSize(_size uint32) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.Contract.SetFulfillmentTxSize(&_VRFV2PlusWrapperOptimism.TransactOpts, _size) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismTransactor) SetL1FeeCalculation(opts *bind.TransactOpts, mode uint8, coefficient uint8) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.contract.Transact(opts, "setL1FeeCalculation", mode, coefficient) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismSession) SetL1FeeCalculation(mode uint8, coefficient uint8) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.Contract.SetL1FeeCalculation(&_VRFV2PlusWrapperOptimism.TransactOpts, mode, coefficient) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismTransactorSession) SetL1FeeCalculation(mode uint8, coefficient uint8) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.Contract.SetL1FeeCalculation(&_VRFV2PlusWrapperOptimism.TransactOpts, mode, coefficient) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.contract.Transact(opts, "transferOwnership", to) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismSession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.Contract.TransferOwnership(&_VRFV2PlusWrapperOptimism.TransactOpts, to) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.Contract.TransferOwnership(&_VRFV2PlusWrapperOptimism.TransactOpts, to) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismTransactor) Withdraw(opts *bind.TransactOpts, _recipient common.Address) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.contract.Transact(opts, "withdraw", _recipient) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismSession) Withdraw(_recipient common.Address) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.Contract.Withdraw(&_VRFV2PlusWrapperOptimism.TransactOpts, _recipient) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismTransactorSession) Withdraw(_recipient common.Address) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.Contract.Withdraw(&_VRFV2PlusWrapperOptimism.TransactOpts, _recipient) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismTransactor) WithdrawNative(opts *bind.TransactOpts, _recipient common.Address) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.contract.Transact(opts, "withdrawNative", _recipient) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismSession) WithdrawNative(_recipient common.Address) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.Contract.WithdrawNative(&_VRFV2PlusWrapperOptimism.TransactOpts, _recipient) +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismTransactorSession) WithdrawNative(_recipient common.Address) (*types.Transaction, error) { + return _VRFV2PlusWrapperOptimism.Contract.WithdrawNative(&_VRFV2PlusWrapperOptimism.TransactOpts, _recipient) +} + +type VRFV2PlusWrapperOptimismConfigSetIterator struct { + Event *VRFV2PlusWrapperOptimismConfigSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusWrapperOptimismConfigSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperOptimismConfigSet) + 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(VRFV2PlusWrapperOptimismConfigSet) + 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 *VRFV2PlusWrapperOptimismConfigSetIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusWrapperOptimismConfigSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusWrapperOptimismConfigSet struct { + WrapperGasOverhead uint32 + CoordinatorGasOverheadNative uint32 + CoordinatorGasOverheadLink uint32 + CoordinatorGasOverheadPerWord uint16 + CoordinatorNativePremiumPercentage uint8 + CoordinatorLinkPremiumPercentage uint8 + KeyHash [32]byte + MaxNumWords uint8 + StalenessSeconds uint32 + FallbackWeiPerUnitLink *big.Int + FulfillmentFlatFeeNativePPM uint32 + FulfillmentFlatFeeLinkDiscountPPM uint32 + Raw types.Log +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) FilterConfigSet(opts *bind.FilterOpts) (*VRFV2PlusWrapperOptimismConfigSetIterator, error) { + + logs, sub, err := _VRFV2PlusWrapperOptimism.contract.FilterLogs(opts, "ConfigSet") + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperOptimismConfigSetIterator{contract: _VRFV2PlusWrapperOptimism.contract, event: "ConfigSet", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) WatchConfigSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperOptimismConfigSet) (event.Subscription, error) { + + logs, sub, err := _VRFV2PlusWrapperOptimism.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(VRFV2PlusWrapperOptimismConfigSet) + if err := _VRFV2PlusWrapperOptimism.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 (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) ParseConfigSet(log types.Log) (*VRFV2PlusWrapperOptimismConfigSet, error) { + event := new(VRFV2PlusWrapperOptimismConfigSet) + if err := _VRFV2PlusWrapperOptimism.contract.UnpackLog(event, "ConfigSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFV2PlusWrapperOptimismCoordinatorSetIterator struct { + Event *VRFV2PlusWrapperOptimismCoordinatorSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusWrapperOptimismCoordinatorSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperOptimismCoordinatorSet) + 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(VRFV2PlusWrapperOptimismCoordinatorSet) + 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 *VRFV2PlusWrapperOptimismCoordinatorSetIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusWrapperOptimismCoordinatorSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusWrapperOptimismCoordinatorSet struct { + VrfCoordinator common.Address + Raw types.Log +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) FilterCoordinatorSet(opts *bind.FilterOpts) (*VRFV2PlusWrapperOptimismCoordinatorSetIterator, error) { + + logs, sub, err := _VRFV2PlusWrapperOptimism.contract.FilterLogs(opts, "CoordinatorSet") + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperOptimismCoordinatorSetIterator{contract: _VRFV2PlusWrapperOptimism.contract, event: "CoordinatorSet", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) WatchCoordinatorSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperOptimismCoordinatorSet) (event.Subscription, error) { + + logs, sub, err := _VRFV2PlusWrapperOptimism.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(VRFV2PlusWrapperOptimismCoordinatorSet) + if err := _VRFV2PlusWrapperOptimism.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 (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) ParseCoordinatorSet(log types.Log) (*VRFV2PlusWrapperOptimismCoordinatorSet, error) { + event := new(VRFV2PlusWrapperOptimismCoordinatorSet) + if err := _VRFV2PlusWrapperOptimism.contract.UnpackLog(event, "CoordinatorSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFV2PlusWrapperOptimismDisabledIterator struct { + Event *VRFV2PlusWrapperOptimismDisabled + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusWrapperOptimismDisabledIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperOptimismDisabled) + 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(VRFV2PlusWrapperOptimismDisabled) + 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 *VRFV2PlusWrapperOptimismDisabledIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusWrapperOptimismDisabledIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusWrapperOptimismDisabled struct { + Raw types.Log +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) FilterDisabled(opts *bind.FilterOpts) (*VRFV2PlusWrapperOptimismDisabledIterator, error) { + + logs, sub, err := _VRFV2PlusWrapperOptimism.contract.FilterLogs(opts, "Disabled") + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperOptimismDisabledIterator{contract: _VRFV2PlusWrapperOptimism.contract, event: "Disabled", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) WatchDisabled(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperOptimismDisabled) (event.Subscription, error) { + + logs, sub, err := _VRFV2PlusWrapperOptimism.contract.WatchLogs(opts, "Disabled") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFV2PlusWrapperOptimismDisabled) + if err := _VRFV2PlusWrapperOptimism.contract.UnpackLog(event, "Disabled", 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 (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) ParseDisabled(log types.Log) (*VRFV2PlusWrapperOptimismDisabled, error) { + event := new(VRFV2PlusWrapperOptimismDisabled) + if err := _VRFV2PlusWrapperOptimism.contract.UnpackLog(event, "Disabled", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFV2PlusWrapperOptimismEnabledIterator struct { + Event *VRFV2PlusWrapperOptimismEnabled + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusWrapperOptimismEnabledIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperOptimismEnabled) + 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(VRFV2PlusWrapperOptimismEnabled) + 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 *VRFV2PlusWrapperOptimismEnabledIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusWrapperOptimismEnabledIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusWrapperOptimismEnabled struct { + Raw types.Log +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) FilterEnabled(opts *bind.FilterOpts) (*VRFV2PlusWrapperOptimismEnabledIterator, error) { + + logs, sub, err := _VRFV2PlusWrapperOptimism.contract.FilterLogs(opts, "Enabled") + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperOptimismEnabledIterator{contract: _VRFV2PlusWrapperOptimism.contract, event: "Enabled", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) WatchEnabled(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperOptimismEnabled) (event.Subscription, error) { + + logs, sub, err := _VRFV2PlusWrapperOptimism.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: + + event := new(VRFV2PlusWrapperOptimismEnabled) + if err := _VRFV2PlusWrapperOptimism.contract.UnpackLog(event, "Enabled", 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 (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) ParseEnabled(log types.Log) (*VRFV2PlusWrapperOptimismEnabled, error) { + event := new(VRFV2PlusWrapperOptimismEnabled) + if err := _VRFV2PlusWrapperOptimism.contract.UnpackLog(event, "Enabled", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFV2PlusWrapperOptimismFallbackWeiPerUnitLinkUsedIterator struct { + Event *VRFV2PlusWrapperOptimismFallbackWeiPerUnitLinkUsed + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusWrapperOptimismFallbackWeiPerUnitLinkUsedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperOptimismFallbackWeiPerUnitLinkUsed) + 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(VRFV2PlusWrapperOptimismFallbackWeiPerUnitLinkUsed) + 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 *VRFV2PlusWrapperOptimismFallbackWeiPerUnitLinkUsedIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusWrapperOptimismFallbackWeiPerUnitLinkUsedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusWrapperOptimismFallbackWeiPerUnitLinkUsed struct { + RequestId *big.Int + FallbackWeiPerUnitLink *big.Int + Raw types.Log +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) FilterFallbackWeiPerUnitLinkUsed(opts *bind.FilterOpts) (*VRFV2PlusWrapperOptimismFallbackWeiPerUnitLinkUsedIterator, error) { + + logs, sub, err := _VRFV2PlusWrapperOptimism.contract.FilterLogs(opts, "FallbackWeiPerUnitLinkUsed") + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperOptimismFallbackWeiPerUnitLinkUsedIterator{contract: _VRFV2PlusWrapperOptimism.contract, event: "FallbackWeiPerUnitLinkUsed", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) WatchFallbackWeiPerUnitLinkUsed(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperOptimismFallbackWeiPerUnitLinkUsed) (event.Subscription, error) { + + logs, sub, err := _VRFV2PlusWrapperOptimism.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(VRFV2PlusWrapperOptimismFallbackWeiPerUnitLinkUsed) + if err := _VRFV2PlusWrapperOptimism.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 (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) ParseFallbackWeiPerUnitLinkUsed(log types.Log) (*VRFV2PlusWrapperOptimismFallbackWeiPerUnitLinkUsed, error) { + event := new(VRFV2PlusWrapperOptimismFallbackWeiPerUnitLinkUsed) + if err := _VRFV2PlusWrapperOptimism.contract.UnpackLog(event, "FallbackWeiPerUnitLinkUsed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFV2PlusWrapperOptimismFulfillmentTxSizeSetIterator struct { + Event *VRFV2PlusWrapperOptimismFulfillmentTxSizeSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusWrapperOptimismFulfillmentTxSizeSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperOptimismFulfillmentTxSizeSet) + 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(VRFV2PlusWrapperOptimismFulfillmentTxSizeSet) + 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 *VRFV2PlusWrapperOptimismFulfillmentTxSizeSetIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusWrapperOptimismFulfillmentTxSizeSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusWrapperOptimismFulfillmentTxSizeSet struct { + Size uint32 + Raw types.Log +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) FilterFulfillmentTxSizeSet(opts *bind.FilterOpts) (*VRFV2PlusWrapperOptimismFulfillmentTxSizeSetIterator, error) { + + logs, sub, err := _VRFV2PlusWrapperOptimism.contract.FilterLogs(opts, "FulfillmentTxSizeSet") + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperOptimismFulfillmentTxSizeSetIterator{contract: _VRFV2PlusWrapperOptimism.contract, event: "FulfillmentTxSizeSet", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) WatchFulfillmentTxSizeSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperOptimismFulfillmentTxSizeSet) (event.Subscription, error) { + + logs, sub, err := _VRFV2PlusWrapperOptimism.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(VRFV2PlusWrapperOptimismFulfillmentTxSizeSet) + if err := _VRFV2PlusWrapperOptimism.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 (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) ParseFulfillmentTxSizeSet(log types.Log) (*VRFV2PlusWrapperOptimismFulfillmentTxSizeSet, error) { + event := new(VRFV2PlusWrapperOptimismFulfillmentTxSizeSet) + if err := _VRFV2PlusWrapperOptimism.contract.UnpackLog(event, "FulfillmentTxSizeSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFV2PlusWrapperOptimismL1FeeCalculationSetIterator struct { + Event *VRFV2PlusWrapperOptimismL1FeeCalculationSet + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusWrapperOptimismL1FeeCalculationSetIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperOptimismL1FeeCalculationSet) + 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(VRFV2PlusWrapperOptimismL1FeeCalculationSet) + 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 *VRFV2PlusWrapperOptimismL1FeeCalculationSetIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusWrapperOptimismL1FeeCalculationSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusWrapperOptimismL1FeeCalculationSet struct { + Mode uint8 + Coefficient uint8 + Raw types.Log +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) FilterL1FeeCalculationSet(opts *bind.FilterOpts) (*VRFV2PlusWrapperOptimismL1FeeCalculationSetIterator, error) { + + logs, sub, err := _VRFV2PlusWrapperOptimism.contract.FilterLogs(opts, "L1FeeCalculationSet") + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperOptimismL1FeeCalculationSetIterator{contract: _VRFV2PlusWrapperOptimism.contract, event: "L1FeeCalculationSet", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) WatchL1FeeCalculationSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperOptimismL1FeeCalculationSet) (event.Subscription, error) { + + logs, sub, err := _VRFV2PlusWrapperOptimism.contract.WatchLogs(opts, "L1FeeCalculationSet") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFV2PlusWrapperOptimismL1FeeCalculationSet) + if err := _VRFV2PlusWrapperOptimism.contract.UnpackLog(event, "L1FeeCalculationSet", 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 (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) ParseL1FeeCalculationSet(log types.Log) (*VRFV2PlusWrapperOptimismL1FeeCalculationSet, error) { + event := new(VRFV2PlusWrapperOptimismL1FeeCalculationSet) + if err := _VRFV2PlusWrapperOptimism.contract.UnpackLog(event, "L1FeeCalculationSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFV2PlusWrapperOptimismNativeWithdrawnIterator struct { + Event *VRFV2PlusWrapperOptimismNativeWithdrawn + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusWrapperOptimismNativeWithdrawnIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperOptimismNativeWithdrawn) + 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(VRFV2PlusWrapperOptimismNativeWithdrawn) + 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 *VRFV2PlusWrapperOptimismNativeWithdrawnIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusWrapperOptimismNativeWithdrawnIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusWrapperOptimismNativeWithdrawn struct { + To common.Address + Amount *big.Int + Raw types.Log +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) FilterNativeWithdrawn(opts *bind.FilterOpts, to []common.Address) (*VRFV2PlusWrapperOptimismNativeWithdrawnIterator, error) { + + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _VRFV2PlusWrapperOptimism.contract.FilterLogs(opts, "NativeWithdrawn", toRule) + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperOptimismNativeWithdrawnIterator{contract: _VRFV2PlusWrapperOptimism.contract, event: "NativeWithdrawn", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) WatchNativeWithdrawn(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperOptimismNativeWithdrawn, to []common.Address) (event.Subscription, error) { + + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _VRFV2PlusWrapperOptimism.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(VRFV2PlusWrapperOptimismNativeWithdrawn) + if err := _VRFV2PlusWrapperOptimism.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 (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) ParseNativeWithdrawn(log types.Log) (*VRFV2PlusWrapperOptimismNativeWithdrawn, error) { + event := new(VRFV2PlusWrapperOptimismNativeWithdrawn) + if err := _VRFV2PlusWrapperOptimism.contract.UnpackLog(event, "NativeWithdrawn", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFV2PlusWrapperOptimismOwnershipTransferRequestedIterator struct { + Event *VRFV2PlusWrapperOptimismOwnershipTransferRequested + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusWrapperOptimismOwnershipTransferRequestedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperOptimismOwnershipTransferRequested) + 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(VRFV2PlusWrapperOptimismOwnershipTransferRequested) + 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 *VRFV2PlusWrapperOptimismOwnershipTransferRequestedIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusWrapperOptimismOwnershipTransferRequestedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusWrapperOptimismOwnershipTransferRequested struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFV2PlusWrapperOptimismOwnershipTransferRequestedIterator, 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 := _VRFV2PlusWrapperOptimism.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperOptimismOwnershipTransferRequestedIterator{contract: _VRFV2PlusWrapperOptimism.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperOptimismOwnershipTransferRequested, 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 := _VRFV2PlusWrapperOptimism.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(VRFV2PlusWrapperOptimismOwnershipTransferRequested) + if err := _VRFV2PlusWrapperOptimism.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 (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) ParseOwnershipTransferRequested(log types.Log) (*VRFV2PlusWrapperOptimismOwnershipTransferRequested, error) { + event := new(VRFV2PlusWrapperOptimismOwnershipTransferRequested) + if err := _VRFV2PlusWrapperOptimism.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFV2PlusWrapperOptimismOwnershipTransferredIterator struct { + Event *VRFV2PlusWrapperOptimismOwnershipTransferred + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusWrapperOptimismOwnershipTransferredIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperOptimismOwnershipTransferred) + 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(VRFV2PlusWrapperOptimismOwnershipTransferred) + 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 *VRFV2PlusWrapperOptimismOwnershipTransferredIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusWrapperOptimismOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusWrapperOptimismOwnershipTransferred struct { + From common.Address + To common.Address + Raw types.Log +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFV2PlusWrapperOptimismOwnershipTransferredIterator, 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 := _VRFV2PlusWrapperOptimism.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperOptimismOwnershipTransferredIterator{contract: _VRFV2PlusWrapperOptimism.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperOptimismOwnershipTransferred, 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 := _VRFV2PlusWrapperOptimism.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(VRFV2PlusWrapperOptimismOwnershipTransferred) + if err := _VRFV2PlusWrapperOptimism.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 (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) ParseOwnershipTransferred(log types.Log) (*VRFV2PlusWrapperOptimismOwnershipTransferred, error) { + event := new(VRFV2PlusWrapperOptimismOwnershipTransferred) + if err := _VRFV2PlusWrapperOptimism.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFV2PlusWrapperOptimismWithdrawnIterator struct { + Event *VRFV2PlusWrapperOptimismWithdrawn + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusWrapperOptimismWithdrawnIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperOptimismWithdrawn) + 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(VRFV2PlusWrapperOptimismWithdrawn) + 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 *VRFV2PlusWrapperOptimismWithdrawnIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusWrapperOptimismWithdrawnIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusWrapperOptimismWithdrawn struct { + To common.Address + Amount *big.Int + Raw types.Log +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) FilterWithdrawn(opts *bind.FilterOpts, to []common.Address) (*VRFV2PlusWrapperOptimismWithdrawnIterator, error) { + + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _VRFV2PlusWrapperOptimism.contract.FilterLogs(opts, "Withdrawn", toRule) + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperOptimismWithdrawnIterator{contract: _VRFV2PlusWrapperOptimism.contract, event: "Withdrawn", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) WatchWithdrawn(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperOptimismWithdrawn, to []common.Address) (event.Subscription, error) { + + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _VRFV2PlusWrapperOptimism.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(VRFV2PlusWrapperOptimismWithdrawn) + if err := _VRFV2PlusWrapperOptimism.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 (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) ParseWithdrawn(log types.Log) (*VRFV2PlusWrapperOptimismWithdrawn, error) { + event := new(VRFV2PlusWrapperOptimismWithdrawn) + if err := _VRFV2PlusWrapperOptimism.contract.UnpackLog(event, "Withdrawn", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type VRFV2PlusWrapperOptimismWrapperFulfillmentFailedIterator struct { + Event *VRFV2PlusWrapperOptimismWrapperFulfillmentFailed + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusWrapperOptimismWrapperFulfillmentFailedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperOptimismWrapperFulfillmentFailed) + 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(VRFV2PlusWrapperOptimismWrapperFulfillmentFailed) + 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 *VRFV2PlusWrapperOptimismWrapperFulfillmentFailedIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusWrapperOptimismWrapperFulfillmentFailedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusWrapperOptimismWrapperFulfillmentFailed struct { + RequestId *big.Int + Consumer common.Address + Raw types.Log +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) FilterWrapperFulfillmentFailed(opts *bind.FilterOpts, requestId []*big.Int, consumer []common.Address) (*VRFV2PlusWrapperOptimismWrapperFulfillmentFailedIterator, 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 := _VRFV2PlusWrapperOptimism.contract.FilterLogs(opts, "WrapperFulfillmentFailed", requestIdRule, consumerRule) + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperOptimismWrapperFulfillmentFailedIterator{contract: _VRFV2PlusWrapperOptimism.contract, event: "WrapperFulfillmentFailed", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) WatchWrapperFulfillmentFailed(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperOptimismWrapperFulfillmentFailed, 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 := _VRFV2PlusWrapperOptimism.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(VRFV2PlusWrapperOptimismWrapperFulfillmentFailed) + if err := _VRFV2PlusWrapperOptimism.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 (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimismFilterer) ParseWrapperFulfillmentFailed(log types.Log) (*VRFV2PlusWrapperOptimismWrapperFulfillmentFailed, error) { + event := new(VRFV2PlusWrapperOptimismWrapperFulfillmentFailed) + if err := _VRFV2PlusWrapperOptimism.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 + CoordinatorGasOverheadNative uint32 + CoordinatorGasOverheadLink uint32 + CoordinatorGasOverheadPerWord uint16 + WrapperNativePremiumPercentage uint8 + WrapperLinkPremiumPercentage uint8 + KeyHash [32]byte + MaxNumWords uint8 +} +type SCallbacks struct { + CallbackAddress common.Address + CallbackGasLimit uint32 + RequestGasPrice uint64 +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimism) ParseLog(log types.Log) (generated.AbigenLog, error) { + switch log.Topics[0] { + case _VRFV2PlusWrapperOptimism.abi.Events["ConfigSet"].ID: + return _VRFV2PlusWrapperOptimism.ParseConfigSet(log) + case _VRFV2PlusWrapperOptimism.abi.Events["CoordinatorSet"].ID: + return _VRFV2PlusWrapperOptimism.ParseCoordinatorSet(log) + case _VRFV2PlusWrapperOptimism.abi.Events["Disabled"].ID: + return _VRFV2PlusWrapperOptimism.ParseDisabled(log) + case _VRFV2PlusWrapperOptimism.abi.Events["Enabled"].ID: + return _VRFV2PlusWrapperOptimism.ParseEnabled(log) + case _VRFV2PlusWrapperOptimism.abi.Events["FallbackWeiPerUnitLinkUsed"].ID: + return _VRFV2PlusWrapperOptimism.ParseFallbackWeiPerUnitLinkUsed(log) + case _VRFV2PlusWrapperOptimism.abi.Events["FulfillmentTxSizeSet"].ID: + return _VRFV2PlusWrapperOptimism.ParseFulfillmentTxSizeSet(log) + case _VRFV2PlusWrapperOptimism.abi.Events["L1FeeCalculationSet"].ID: + return _VRFV2PlusWrapperOptimism.ParseL1FeeCalculationSet(log) + case _VRFV2PlusWrapperOptimism.abi.Events["NativeWithdrawn"].ID: + return _VRFV2PlusWrapperOptimism.ParseNativeWithdrawn(log) + case _VRFV2PlusWrapperOptimism.abi.Events["OwnershipTransferRequested"].ID: + return _VRFV2PlusWrapperOptimism.ParseOwnershipTransferRequested(log) + case _VRFV2PlusWrapperOptimism.abi.Events["OwnershipTransferred"].ID: + return _VRFV2PlusWrapperOptimism.ParseOwnershipTransferred(log) + case _VRFV2PlusWrapperOptimism.abi.Events["Withdrawn"].ID: + return _VRFV2PlusWrapperOptimism.ParseWithdrawn(log) + case _VRFV2PlusWrapperOptimism.abi.Events["WrapperFulfillmentFailed"].ID: + return _VRFV2PlusWrapperOptimism.ParseWrapperFulfillmentFailed(log) + + default: + return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) + } +} + +func (VRFV2PlusWrapperOptimismConfigSet) Topic() common.Hash { + return common.HexToHash("0x8aee1a8c131eaf1a5bd30594737b6926a7c5cb29281a97639f6ac93947c8995e") +} + +func (VRFV2PlusWrapperOptimismCoordinatorSet) Topic() common.Hash { + return common.HexToHash("0xd1a6a14209a385a964d036e404cb5cfb71f4000cdb03c9366292430787261be6") +} + +func (VRFV2PlusWrapperOptimismDisabled) Topic() common.Hash { + return common.HexToHash("0x75884cdadc4a89e8b545db800057f06ec7f5338a08183c7ba515f2bfdd9fe1e1") +} + +func (VRFV2PlusWrapperOptimismEnabled) Topic() common.Hash { + return common.HexToHash("0xc0f961051f97b04c496472d11cb6170d844e4b2c9dfd3b602a4fa0139712d484") +} + +func (VRFV2PlusWrapperOptimismFallbackWeiPerUnitLinkUsed) Topic() common.Hash { + return common.HexToHash("0x6ca648a381f22ead7e37773d934e64885dcf861fbfbb26c40354cbf0c4662d1a") +} + +func (VRFV2PlusWrapperOptimismFulfillmentTxSizeSet) Topic() common.Hash { + return common.HexToHash("0x697b48b8b76cebb09a54ec4ff810e8a181c96f65395d51c744db09c115d1d5d0") +} + +func (VRFV2PlusWrapperOptimismL1FeeCalculationSet) Topic() common.Hash { + return common.HexToHash("0x8e63dc2f2e669ce73bebd2580bb9dd9a5d17fa2d046ac02057d8349fc0b0c2f3") +} + +func (VRFV2PlusWrapperOptimismNativeWithdrawn) Topic() common.Hash { + return common.HexToHash("0xc303ca808382409472acbbf899c316cf439f409f6584aae22df86dfa3c9ed504") +} + +func (VRFV2PlusWrapperOptimismOwnershipTransferRequested) Topic() common.Hash { + return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") +} + +func (VRFV2PlusWrapperOptimismOwnershipTransferred) Topic() common.Hash { + return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") +} + +func (VRFV2PlusWrapperOptimismWithdrawn) Topic() common.Hash { + return common.HexToHash("0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5") +} + +func (VRFV2PlusWrapperOptimismWrapperFulfillmentFailed) Topic() common.Hash { + return common.HexToHash("0xc551b83c151f2d1c7eeb938ac59008e0409f1c1dc1e2f112449d4d79b4589022") +} + +func (_VRFV2PlusWrapperOptimism *VRFV2PlusWrapperOptimism) Address() common.Address { + return _VRFV2PlusWrapperOptimism.address +} + +type VRFV2PlusWrapperOptimismInterface interface { + SUBSCRIPTIONID(opts *bind.CallOpts) (*big.Int, error) + + CalculateRequestPrice(opts *bind.CallOpts, _callbackGasLimit uint32, _numWords uint32) (*big.Int, error) + + CalculateRequestPriceNative(opts *bind.CallOpts, _callbackGasLimit uint32, _numWords uint32) (*big.Int, error) + + CheckPaymentMode(opts *bind.CallOpts, extraArgs []byte, isLinkMode bool) error + + EstimateRequestPrice(opts *bind.CallOpts, _callbackGasLimit uint32, _numWords uint32, _requestGasPriceWei *big.Int) (*big.Int, error) + + EstimateRequestPriceNative(opts *bind.CallOpts, _callbackGasLimit uint32, _numWords 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) + + LinkNativeFeed(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) + + SDisabled(opts *bind.CallOpts) (bool, error) + + SFulfillmentTxSizeBytes(opts *bind.CallOpts) (uint32, error) + + SL1FeeCalculationMode(opts *bind.CallOpts) (uint8, error) + + SL1FeeCoefficient(opts *bind.CallOpts) (uint8, error) + + SVrfCoordinator(opts *bind.CallOpts) (common.Address, error) + + TypeAndVersion(opts *bind.CallOpts) (string, error) + + AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) + + Disable(opts *bind.TransactOpts) (*types.Transaction, error) + + Enable(opts *bind.TransactOpts) (*types.Transaction, error) + + OnTokenTransfer(opts *bind.TransactOpts, _sender common.Address, _amount *big.Int, _data []byte) (*types.Transaction, error) + + RawFulfillRandomWords(opts *bind.TransactOpts, requestId *big.Int, randomWords []*big.Int) (*types.Transaction, error) + + RequestRandomWordsInNative(opts *bind.TransactOpts, _callbackGasLimit uint32, _requestConfirmations uint16, _numWords uint32, extraArgs []byte) (*types.Transaction, error) + + SetConfig(opts *bind.TransactOpts, _wrapperGasOverhead uint32, _coordinatorGasOverheadNative uint32, _coordinatorGasOverheadLink uint32, _coordinatorGasOverheadPerWord uint16, _coordinatorNativePremiumPercentage uint8, _coordinatorLinkPremiumPercentage uint8, _keyHash [32]byte, _maxNumWords uint8, _stalenessSeconds uint32, _fallbackWeiPerUnitLink *big.Int, _fulfillmentFlatFeeNativePPM uint32, _fulfillmentFlatFeeLinkDiscountPPM uint32) (*types.Transaction, error) + + SetCoordinator(opts *bind.TransactOpts, _vrfCoordinator common.Address) (*types.Transaction, error) + + SetFulfillmentTxSize(opts *bind.TransactOpts, _size uint32) (*types.Transaction, error) + + SetL1FeeCalculation(opts *bind.TransactOpts, mode uint8, coefficient uint8) (*types.Transaction, error) + + TransferOwnership(opts *bind.TransactOpts, to common.Address) (*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) (*VRFV2PlusWrapperOptimismConfigSetIterator, error) + + WatchConfigSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperOptimismConfigSet) (event.Subscription, error) + + ParseConfigSet(log types.Log) (*VRFV2PlusWrapperOptimismConfigSet, error) + + FilterCoordinatorSet(opts *bind.FilterOpts) (*VRFV2PlusWrapperOptimismCoordinatorSetIterator, error) + + WatchCoordinatorSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperOptimismCoordinatorSet) (event.Subscription, error) + + ParseCoordinatorSet(log types.Log) (*VRFV2PlusWrapperOptimismCoordinatorSet, error) + + FilterDisabled(opts *bind.FilterOpts) (*VRFV2PlusWrapperOptimismDisabledIterator, error) + + WatchDisabled(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperOptimismDisabled) (event.Subscription, error) + + ParseDisabled(log types.Log) (*VRFV2PlusWrapperOptimismDisabled, error) + + FilterEnabled(opts *bind.FilterOpts) (*VRFV2PlusWrapperOptimismEnabledIterator, error) + + WatchEnabled(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperOptimismEnabled) (event.Subscription, error) + + ParseEnabled(log types.Log) (*VRFV2PlusWrapperOptimismEnabled, error) + + FilterFallbackWeiPerUnitLinkUsed(opts *bind.FilterOpts) (*VRFV2PlusWrapperOptimismFallbackWeiPerUnitLinkUsedIterator, error) + + WatchFallbackWeiPerUnitLinkUsed(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperOptimismFallbackWeiPerUnitLinkUsed) (event.Subscription, error) + + ParseFallbackWeiPerUnitLinkUsed(log types.Log) (*VRFV2PlusWrapperOptimismFallbackWeiPerUnitLinkUsed, error) + + FilterFulfillmentTxSizeSet(opts *bind.FilterOpts) (*VRFV2PlusWrapperOptimismFulfillmentTxSizeSetIterator, error) + + WatchFulfillmentTxSizeSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperOptimismFulfillmentTxSizeSet) (event.Subscription, error) + + ParseFulfillmentTxSizeSet(log types.Log) (*VRFV2PlusWrapperOptimismFulfillmentTxSizeSet, error) + + FilterL1FeeCalculationSet(opts *bind.FilterOpts) (*VRFV2PlusWrapperOptimismL1FeeCalculationSetIterator, error) + + WatchL1FeeCalculationSet(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperOptimismL1FeeCalculationSet) (event.Subscription, error) + + ParseL1FeeCalculationSet(log types.Log) (*VRFV2PlusWrapperOptimismL1FeeCalculationSet, error) + + FilterNativeWithdrawn(opts *bind.FilterOpts, to []common.Address) (*VRFV2PlusWrapperOptimismNativeWithdrawnIterator, error) + + WatchNativeWithdrawn(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperOptimismNativeWithdrawn, to []common.Address) (event.Subscription, error) + + ParseNativeWithdrawn(log types.Log) (*VRFV2PlusWrapperOptimismNativeWithdrawn, error) + + FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFV2PlusWrapperOptimismOwnershipTransferRequestedIterator, error) + + WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperOptimismOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseOwnershipTransferRequested(log types.Log) (*VRFV2PlusWrapperOptimismOwnershipTransferRequested, error) + + FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFV2PlusWrapperOptimismOwnershipTransferredIterator, error) + + WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperOptimismOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) + + ParseOwnershipTransferred(log types.Log) (*VRFV2PlusWrapperOptimismOwnershipTransferred, error) + + FilterWithdrawn(opts *bind.FilterOpts, to []common.Address) (*VRFV2PlusWrapperOptimismWithdrawnIterator, error) + + WatchWithdrawn(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperOptimismWithdrawn, to []common.Address) (event.Subscription, error) + + ParseWithdrawn(log types.Log) (*VRFV2PlusWrapperOptimismWithdrawn, error) + + FilterWrapperFulfillmentFailed(opts *bind.FilterOpts, requestId []*big.Int, consumer []common.Address) (*VRFV2PlusWrapperOptimismWrapperFulfillmentFailedIterator, error) + + WatchWrapperFulfillmentFailed(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperOptimismWrapperFulfillmentFailed, requestId []*big.Int, consumer []common.Address) (event.Subscription, error) + + ParseWrapperFulfillmentFailed(log types.Log) (*VRFV2PlusWrapperOptimismWrapperFulfillmentFailed, error) + + ParseLog(log types.Log) (generated.AbigenLog, error) + + Address() common.Address +} diff --git a/core/gethwrappers/generated/weth9_wrapper/weth9_wrapper.go b/core/gethwrappers/generated/weth9_wrapper/weth9_wrapper.go new file mode 100644 index 00000000000..f38435143b9 --- /dev/null +++ b/core/gethwrappers/generated/weth9_wrapper/weth9_wrapper.go @@ -0,0 +1,1010 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package weth9_wrapper + +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 +) + +var WETH9MetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"name\":\"InsufficientBalance\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"guy\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"Withdrawal\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guy\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + Bin: "0x60c0604052600d60809081526c2bb930b83832b21022ba3432b960991b60a05260009061002c9082610114565b506040805180820190915260048152630ae8aa8960e31b60208201526001906100559082610114565b506002805460ff1916601217905534801561006f57600080fd5b506101d3565b634e487b7160e01b600052604160045260246000fd5b600181811c9082168061009f57607f821691505b6020821081036100bf57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561010f57600081815260208120601f850160051c810160208610156100ec5750805b601f850160051c820191505b8181101561010b578281556001016100f8565b5050505b505050565b81516001600160401b0381111561012d5761012d610075565b6101418161013b845461008b565b846100c5565b602080601f831160018114610176576000841561015e5750858301515b600019600386901b1c1916600185901b17855561010b565b600085815260208120601f198616915b828110156101a557888601518255948401946001909101908401610186565b50858210156101c35787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61099c80620001e36000396000f3fe6080604052600436106100cb5760003560e01c806340c10f1911610074578063a9059cbb1161004e578063a9059cbb14610225578063d0e30db014610245578063dd62ed3e1461024d57600080fd5b806340c10f19146101c357806370a08231146101e357806395d89b411461021057600080fd5b806323b872dd116100a557806323b872dd146101575780632e1a7d4d14610177578063313ce5671461019757600080fd5b806306fdde03146100df578063095ea7b31461010a57806318160ddd1461013a57600080fd5b366100da576100d8610285565b005b600080fd5b3480156100eb57600080fd5b506100f46102e0565b6040516101019190610785565b60405180910390f35b34801561011657600080fd5b5061012a61012536600461081a565b61036e565b6040519015158152602001610101565b34801561014657600080fd5b50475b604051908152602001610101565b34801561016357600080fd5b5061012a610172366004610844565b6103e8565b34801561018357600080fd5b506100d8610192366004610880565b610649565b3480156101a357600080fd5b506002546101b19060ff1681565b60405160ff9091168152602001610101565b3480156101cf57600080fd5b506100d86101de36600461081a565b61071c565b3480156101ef57600080fd5b506101496101fe366004610899565b60036020526000908152604090205481565b34801561021c57600080fd5b506100f461075a565b34801561023157600080fd5b5061012a61024036600461081a565b610767565b6100d861077b565b34801561025957600080fd5b506101496102683660046108b4565b600460209081526000928352604080842090915290825290205481565b33600090815260036020526040812080543492906102a4908490610916565b909155505060405134815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9060200160405180910390a2565b600080546102ed90610929565b80601f016020809104026020016040519081016040528092919081815260200182805461031990610929565b80156103665780601f1061033b57610100808354040283529160200191610366565b820191906000526020600020905b81548152906001019060200180831161034957829003601f168201915b505050505081565b33600081815260046020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906103d69086815260200190565b60405180910390a35060015b92915050565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260036020526040812054821115610447576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff841633148015906104ad575073ffffffffffffffffffffffffffffffffffffffff841660009081526004602090815260408083203384529091529020546fffffffffffffffffffffffffffffffff14155b156105625773ffffffffffffffffffffffffffffffffffffffff8416600090815260046020908152604080832033845290915290205482111561051c576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff841660009081526004602090815260408083203384529091528120805484929061055c90849061097c565b90915550505b73ffffffffffffffffffffffffffffffffffffffff84166000908152600360205260408120805484929061059790849061097c565b909155505073ffffffffffffffffffffffffffffffffffffffff8316600090815260036020526040812080548492906105d1908490610916565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161063791815260200190565b60405180910390a35060019392505050565b33600090815260036020526040902054811115610692576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260036020526040812080548392906106b190849061097c565b9091555050604051339082156108fc029083906000818181858888f193505050501580156106e3573d6000803e3d6000fd5b5060405181815233907f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b659060200160405180910390a250565b73ffffffffffffffffffffffffffffffffffffffff821660009081526003602052604081208054839290610751908490610916565b90915550505050565b600180546102ed90610929565b60006107743384846103e8565b9392505050565b610783610285565b565b600060208083528351808285015260005b818110156107b257858101830151858201604001528201610796565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461081557600080fd5b919050565b6000806040838503121561082d57600080fd5b610836836107f1565b946020939093013593505050565b60008060006060848603121561085957600080fd5b610862846107f1565b9250610870602085016107f1565b9150604084013590509250925092565b60006020828403121561089257600080fd5b5035919050565b6000602082840312156108ab57600080fd5b610774826107f1565b600080604083850312156108c757600080fd5b6108d0836107f1565b91506108de602084016107f1565b90509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156103e2576103e26108e7565b600181811c9082168061093d57607f821691505b602082108103610976577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b818103818111156103e2576103e26108e756fea164736f6c6343000813000a", +} + +var WETH9ABI = WETH9MetaData.ABI + +var WETH9Bin = WETH9MetaData.Bin + +func DeployWETH9(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *WETH9, error) { + parsed, err := WETH9MetaData.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(WETH9Bin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &WETH9{address: address, abi: *parsed, WETH9Caller: WETH9Caller{contract: contract}, WETH9Transactor: WETH9Transactor{contract: contract}, WETH9Filterer: WETH9Filterer{contract: contract}}, nil +} + +type WETH9 struct { + address common.Address + abi abi.ABI + WETH9Caller + WETH9Transactor + WETH9Filterer +} + +type WETH9Caller struct { + contract *bind.BoundContract +} + +type WETH9Transactor struct { + contract *bind.BoundContract +} + +type WETH9Filterer struct { + contract *bind.BoundContract +} + +type WETH9Session struct { + Contract *WETH9 + CallOpts bind.CallOpts + TransactOpts bind.TransactOpts +} + +type WETH9CallerSession struct { + Contract *WETH9Caller + CallOpts bind.CallOpts +} + +type WETH9TransactorSession struct { + Contract *WETH9Transactor + TransactOpts bind.TransactOpts +} + +type WETH9Raw struct { + Contract *WETH9 +} + +type WETH9CallerRaw struct { + Contract *WETH9Caller +} + +type WETH9TransactorRaw struct { + Contract *WETH9Transactor +} + +func NewWETH9(address common.Address, backend bind.ContractBackend) (*WETH9, error) { + abi, err := abi.JSON(strings.NewReader(WETH9ABI)) + if err != nil { + return nil, err + } + contract, err := bindWETH9(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &WETH9{address: address, abi: abi, WETH9Caller: WETH9Caller{contract: contract}, WETH9Transactor: WETH9Transactor{contract: contract}, WETH9Filterer: WETH9Filterer{contract: contract}}, nil +} + +func NewWETH9Caller(address common.Address, caller bind.ContractCaller) (*WETH9Caller, error) { + contract, err := bindWETH9(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &WETH9Caller{contract: contract}, nil +} + +func NewWETH9Transactor(address common.Address, transactor bind.ContractTransactor) (*WETH9Transactor, error) { + contract, err := bindWETH9(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &WETH9Transactor{contract: contract}, nil +} + +func NewWETH9Filterer(address common.Address, filterer bind.ContractFilterer) (*WETH9Filterer, error) { + contract, err := bindWETH9(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &WETH9Filterer{contract: contract}, nil +} + +func bindWETH9(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := WETH9MetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +func (_WETH9 *WETH9Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _WETH9.Contract.WETH9Caller.contract.Call(opts, result, method, params...) +} + +func (_WETH9 *WETH9Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _WETH9.Contract.WETH9Transactor.contract.Transfer(opts) +} + +func (_WETH9 *WETH9Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _WETH9.Contract.WETH9Transactor.contract.Transact(opts, method, params...) +} + +func (_WETH9 *WETH9CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _WETH9.Contract.contract.Call(opts, result, method, params...) +} + +func (_WETH9 *WETH9TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _WETH9.Contract.contract.Transfer(opts) +} + +func (_WETH9 *WETH9TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _WETH9.Contract.contract.Transact(opts, method, params...) +} + +func (_WETH9 *WETH9Caller) Allowance(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address) (*big.Int, error) { + var out []interface{} + err := _WETH9.contract.Call(opts, &out, "allowance", arg0, arg1) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_WETH9 *WETH9Session) Allowance(arg0 common.Address, arg1 common.Address) (*big.Int, error) { + return _WETH9.Contract.Allowance(&_WETH9.CallOpts, arg0, arg1) +} + +func (_WETH9 *WETH9CallerSession) Allowance(arg0 common.Address, arg1 common.Address) (*big.Int, error) { + return _WETH9.Contract.Allowance(&_WETH9.CallOpts, arg0, arg1) +} + +func (_WETH9 *WETH9Caller) BalanceOf(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { + var out []interface{} + err := _WETH9.contract.Call(opts, &out, "balanceOf", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_WETH9 *WETH9Session) BalanceOf(arg0 common.Address) (*big.Int, error) { + return _WETH9.Contract.BalanceOf(&_WETH9.CallOpts, arg0) +} + +func (_WETH9 *WETH9CallerSession) BalanceOf(arg0 common.Address) (*big.Int, error) { + return _WETH9.Contract.BalanceOf(&_WETH9.CallOpts, arg0) +} + +func (_WETH9 *WETH9Caller) Decimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _WETH9.contract.Call(opts, &out, "decimals") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +func (_WETH9 *WETH9Session) Decimals() (uint8, error) { + return _WETH9.Contract.Decimals(&_WETH9.CallOpts) +} + +func (_WETH9 *WETH9CallerSession) Decimals() (uint8, error) { + return _WETH9.Contract.Decimals(&_WETH9.CallOpts) +} + +func (_WETH9 *WETH9Caller) Name(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _WETH9.contract.Call(opts, &out, "name") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +func (_WETH9 *WETH9Session) Name() (string, error) { + return _WETH9.Contract.Name(&_WETH9.CallOpts) +} + +func (_WETH9 *WETH9CallerSession) Name() (string, error) { + return _WETH9.Contract.Name(&_WETH9.CallOpts) +} + +func (_WETH9 *WETH9Caller) Symbol(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _WETH9.contract.Call(opts, &out, "symbol") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +func (_WETH9 *WETH9Session) Symbol() (string, error) { + return _WETH9.Contract.Symbol(&_WETH9.CallOpts) +} + +func (_WETH9 *WETH9CallerSession) Symbol() (string, error) { + return _WETH9.Contract.Symbol(&_WETH9.CallOpts) +} + +func (_WETH9 *WETH9Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _WETH9.contract.Call(opts, &out, "totalSupply") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +func (_WETH9 *WETH9Session) TotalSupply() (*big.Int, error) { + return _WETH9.Contract.TotalSupply(&_WETH9.CallOpts) +} + +func (_WETH9 *WETH9CallerSession) TotalSupply() (*big.Int, error) { + return _WETH9.Contract.TotalSupply(&_WETH9.CallOpts) +} + +func (_WETH9 *WETH9Transactor) Approve(opts *bind.TransactOpts, guy common.Address, wad *big.Int) (*types.Transaction, error) { + return _WETH9.contract.Transact(opts, "approve", guy, wad) +} + +func (_WETH9 *WETH9Session) Approve(guy common.Address, wad *big.Int) (*types.Transaction, error) { + return _WETH9.Contract.Approve(&_WETH9.TransactOpts, guy, wad) +} + +func (_WETH9 *WETH9TransactorSession) Approve(guy common.Address, wad *big.Int) (*types.Transaction, error) { + return _WETH9.Contract.Approve(&_WETH9.TransactOpts, guy, wad) +} + +func (_WETH9 *WETH9Transactor) Deposit(opts *bind.TransactOpts) (*types.Transaction, error) { + return _WETH9.contract.Transact(opts, "deposit") +} + +func (_WETH9 *WETH9Session) Deposit() (*types.Transaction, error) { + return _WETH9.Contract.Deposit(&_WETH9.TransactOpts) +} + +func (_WETH9 *WETH9TransactorSession) Deposit() (*types.Transaction, error) { + return _WETH9.Contract.Deposit(&_WETH9.TransactOpts) +} + +func (_WETH9 *WETH9Transactor) Mint(opts *bind.TransactOpts, account common.Address, amount *big.Int) (*types.Transaction, error) { + return _WETH9.contract.Transact(opts, "mint", account, amount) +} + +func (_WETH9 *WETH9Session) Mint(account common.Address, amount *big.Int) (*types.Transaction, error) { + return _WETH9.Contract.Mint(&_WETH9.TransactOpts, account, amount) +} + +func (_WETH9 *WETH9TransactorSession) Mint(account common.Address, amount *big.Int) (*types.Transaction, error) { + return _WETH9.Contract.Mint(&_WETH9.TransactOpts, account, amount) +} + +func (_WETH9 *WETH9Transactor) Transfer(opts *bind.TransactOpts, dst common.Address, wad *big.Int) (*types.Transaction, error) { + return _WETH9.contract.Transact(opts, "transfer", dst, wad) +} + +func (_WETH9 *WETH9Session) Transfer(dst common.Address, wad *big.Int) (*types.Transaction, error) { + return _WETH9.Contract.Transfer(&_WETH9.TransactOpts, dst, wad) +} + +func (_WETH9 *WETH9TransactorSession) Transfer(dst common.Address, wad *big.Int) (*types.Transaction, error) { + return _WETH9.Contract.Transfer(&_WETH9.TransactOpts, dst, wad) +} + +func (_WETH9 *WETH9Transactor) TransferFrom(opts *bind.TransactOpts, src common.Address, dst common.Address, wad *big.Int) (*types.Transaction, error) { + return _WETH9.contract.Transact(opts, "transferFrom", src, dst, wad) +} + +func (_WETH9 *WETH9Session) TransferFrom(src common.Address, dst common.Address, wad *big.Int) (*types.Transaction, error) { + return _WETH9.Contract.TransferFrom(&_WETH9.TransactOpts, src, dst, wad) +} + +func (_WETH9 *WETH9TransactorSession) TransferFrom(src common.Address, dst common.Address, wad *big.Int) (*types.Transaction, error) { + return _WETH9.Contract.TransferFrom(&_WETH9.TransactOpts, src, dst, wad) +} + +func (_WETH9 *WETH9Transactor) Withdraw(opts *bind.TransactOpts, wad *big.Int) (*types.Transaction, error) { + return _WETH9.contract.Transact(opts, "withdraw", wad) +} + +func (_WETH9 *WETH9Session) Withdraw(wad *big.Int) (*types.Transaction, error) { + return _WETH9.Contract.Withdraw(&_WETH9.TransactOpts, wad) +} + +func (_WETH9 *WETH9TransactorSession) Withdraw(wad *big.Int) (*types.Transaction, error) { + return _WETH9.Contract.Withdraw(&_WETH9.TransactOpts, wad) +} + +func (_WETH9 *WETH9Transactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _WETH9.contract.RawTransact(opts, nil) +} + +func (_WETH9 *WETH9Session) Receive() (*types.Transaction, error) { + return _WETH9.Contract.Receive(&_WETH9.TransactOpts) +} + +func (_WETH9 *WETH9TransactorSession) Receive() (*types.Transaction, error) { + return _WETH9.Contract.Receive(&_WETH9.TransactOpts) +} + +type WETH9ApprovalIterator struct { + Event *WETH9Approval + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *WETH9ApprovalIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(WETH9Approval) + 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(WETH9Approval) + 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 *WETH9ApprovalIterator) Error() error { + return it.fail +} + +func (it *WETH9ApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type WETH9Approval struct { + Src common.Address + Guy common.Address + Wad *big.Int + Raw types.Log +} + +func (_WETH9 *WETH9Filterer) FilterApproval(opts *bind.FilterOpts, src []common.Address, guy []common.Address) (*WETH9ApprovalIterator, error) { + + var srcRule []interface{} + for _, srcItem := range src { + srcRule = append(srcRule, srcItem) + } + var guyRule []interface{} + for _, guyItem := range guy { + guyRule = append(guyRule, guyItem) + } + + logs, sub, err := _WETH9.contract.FilterLogs(opts, "Approval", srcRule, guyRule) + if err != nil { + return nil, err + } + return &WETH9ApprovalIterator{contract: _WETH9.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +func (_WETH9 *WETH9Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *WETH9Approval, src []common.Address, guy []common.Address) (event.Subscription, error) { + + var srcRule []interface{} + for _, srcItem := range src { + srcRule = append(srcRule, srcItem) + } + var guyRule []interface{} + for _, guyItem := range guy { + guyRule = append(guyRule, guyItem) + } + + logs, sub, err := _WETH9.contract.WatchLogs(opts, "Approval", srcRule, guyRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(WETH9Approval) + if err := _WETH9.contract.UnpackLog(event, "Approval", 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 (_WETH9 *WETH9Filterer) ParseApproval(log types.Log) (*WETH9Approval, error) { + event := new(WETH9Approval) + if err := _WETH9.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type WETH9DepositIterator struct { + Event *WETH9Deposit + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *WETH9DepositIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(WETH9Deposit) + 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(WETH9Deposit) + 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 *WETH9DepositIterator) Error() error { + return it.fail +} + +func (it *WETH9DepositIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type WETH9Deposit struct { + Dst common.Address + Wad *big.Int + Raw types.Log +} + +func (_WETH9 *WETH9Filterer) FilterDeposit(opts *bind.FilterOpts, dst []common.Address) (*WETH9DepositIterator, error) { + + var dstRule []interface{} + for _, dstItem := range dst { + dstRule = append(dstRule, dstItem) + } + + logs, sub, err := _WETH9.contract.FilterLogs(opts, "Deposit", dstRule) + if err != nil { + return nil, err + } + return &WETH9DepositIterator{contract: _WETH9.contract, event: "Deposit", logs: logs, sub: sub}, nil +} + +func (_WETH9 *WETH9Filterer) WatchDeposit(opts *bind.WatchOpts, sink chan<- *WETH9Deposit, dst []common.Address) (event.Subscription, error) { + + var dstRule []interface{} + for _, dstItem := range dst { + dstRule = append(dstRule, dstItem) + } + + logs, sub, err := _WETH9.contract.WatchLogs(opts, "Deposit", dstRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(WETH9Deposit) + if err := _WETH9.contract.UnpackLog(event, "Deposit", 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 (_WETH9 *WETH9Filterer) ParseDeposit(log types.Log) (*WETH9Deposit, error) { + event := new(WETH9Deposit) + if err := _WETH9.contract.UnpackLog(event, "Deposit", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type WETH9TransferIterator struct { + Event *WETH9Transfer + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *WETH9TransferIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(WETH9Transfer) + 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(WETH9Transfer) + 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 *WETH9TransferIterator) Error() error { + return it.fail +} + +func (it *WETH9TransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type WETH9Transfer struct { + Src common.Address + Dst common.Address + Wad *big.Int + Raw types.Log +} + +func (_WETH9 *WETH9Filterer) FilterTransfer(opts *bind.FilterOpts, src []common.Address, dst []common.Address) (*WETH9TransferIterator, error) { + + var srcRule []interface{} + for _, srcItem := range src { + srcRule = append(srcRule, srcItem) + } + var dstRule []interface{} + for _, dstItem := range dst { + dstRule = append(dstRule, dstItem) + } + + logs, sub, err := _WETH9.contract.FilterLogs(opts, "Transfer", srcRule, dstRule) + if err != nil { + return nil, err + } + return &WETH9TransferIterator{contract: _WETH9.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +func (_WETH9 *WETH9Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *WETH9Transfer, src []common.Address, dst []common.Address) (event.Subscription, error) { + + var srcRule []interface{} + for _, srcItem := range src { + srcRule = append(srcRule, srcItem) + } + var dstRule []interface{} + for _, dstItem := range dst { + dstRule = append(dstRule, dstItem) + } + + logs, sub, err := _WETH9.contract.WatchLogs(opts, "Transfer", srcRule, dstRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(WETH9Transfer) + if err := _WETH9.contract.UnpackLog(event, "Transfer", 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 (_WETH9 *WETH9Filterer) ParseTransfer(log types.Log) (*WETH9Transfer, error) { + event := new(WETH9Transfer) + if err := _WETH9.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +type WETH9WithdrawalIterator struct { + Event *WETH9Withdrawal + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *WETH9WithdrawalIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(WETH9Withdrawal) + 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(WETH9Withdrawal) + 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 *WETH9WithdrawalIterator) Error() error { + return it.fail +} + +func (it *WETH9WithdrawalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type WETH9Withdrawal struct { + Src common.Address + Wad *big.Int + Raw types.Log +} + +func (_WETH9 *WETH9Filterer) FilterWithdrawal(opts *bind.FilterOpts, src []common.Address) (*WETH9WithdrawalIterator, error) { + + var srcRule []interface{} + for _, srcItem := range src { + srcRule = append(srcRule, srcItem) + } + + logs, sub, err := _WETH9.contract.FilterLogs(opts, "Withdrawal", srcRule) + if err != nil { + return nil, err + } + return &WETH9WithdrawalIterator{contract: _WETH9.contract, event: "Withdrawal", logs: logs, sub: sub}, nil +} + +func (_WETH9 *WETH9Filterer) WatchWithdrawal(opts *bind.WatchOpts, sink chan<- *WETH9Withdrawal, src []common.Address) (event.Subscription, error) { + + var srcRule []interface{} + for _, srcItem := range src { + srcRule = append(srcRule, srcItem) + } + + logs, sub, err := _WETH9.contract.WatchLogs(opts, "Withdrawal", srcRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(WETH9Withdrawal) + if err := _WETH9.contract.UnpackLog(event, "Withdrawal", 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 (_WETH9 *WETH9Filterer) ParseWithdrawal(log types.Log) (*WETH9Withdrawal, error) { + event := new(WETH9Withdrawal) + if err := _WETH9.contract.UnpackLog(event, "Withdrawal", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +func (_WETH9 *WETH9) ParseLog(log types.Log) (generated.AbigenLog, error) { + switch log.Topics[0] { + case _WETH9.abi.Events["Approval"].ID: + return _WETH9.ParseApproval(log) + case _WETH9.abi.Events["Deposit"].ID: + return _WETH9.ParseDeposit(log) + case _WETH9.abi.Events["Transfer"].ID: + return _WETH9.ParseTransfer(log) + case _WETH9.abi.Events["Withdrawal"].ID: + return _WETH9.ParseWithdrawal(log) + + default: + return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) + } +} + +func (WETH9Approval) Topic() common.Hash { + return common.HexToHash("0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925") +} + +func (WETH9Deposit) Topic() common.Hash { + return common.HexToHash("0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c") +} + +func (WETH9Transfer) Topic() common.Hash { + return common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef") +} + +func (WETH9Withdrawal) Topic() common.Hash { + return common.HexToHash("0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65") +} + +func (_WETH9 *WETH9) Address() common.Address { + return _WETH9.address +} + +type WETH9Interface interface { + Allowance(opts *bind.CallOpts, arg0 common.Address, arg1 common.Address) (*big.Int, error) + + BalanceOf(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) + + Decimals(opts *bind.CallOpts) (uint8, error) + + Name(opts *bind.CallOpts) (string, error) + + Symbol(opts *bind.CallOpts) (string, error) + + TotalSupply(opts *bind.CallOpts) (*big.Int, error) + + Approve(opts *bind.TransactOpts, guy common.Address, wad *big.Int) (*types.Transaction, error) + + Deposit(opts *bind.TransactOpts) (*types.Transaction, error) + + Mint(opts *bind.TransactOpts, account common.Address, amount *big.Int) (*types.Transaction, error) + + Transfer(opts *bind.TransactOpts, dst common.Address, wad *big.Int) (*types.Transaction, error) + + TransferFrom(opts *bind.TransactOpts, src common.Address, dst common.Address, wad *big.Int) (*types.Transaction, error) + + Withdraw(opts *bind.TransactOpts, wad *big.Int) (*types.Transaction, error) + + Receive(opts *bind.TransactOpts) (*types.Transaction, error) + + FilterApproval(opts *bind.FilterOpts, src []common.Address, guy []common.Address) (*WETH9ApprovalIterator, error) + + WatchApproval(opts *bind.WatchOpts, sink chan<- *WETH9Approval, src []common.Address, guy []common.Address) (event.Subscription, error) + + ParseApproval(log types.Log) (*WETH9Approval, error) + + FilterDeposit(opts *bind.FilterOpts, dst []common.Address) (*WETH9DepositIterator, error) + + WatchDeposit(opts *bind.WatchOpts, sink chan<- *WETH9Deposit, dst []common.Address) (event.Subscription, error) + + ParseDeposit(log types.Log) (*WETH9Deposit, error) + + FilterTransfer(opts *bind.FilterOpts, src []common.Address, dst []common.Address) (*WETH9TransferIterator, error) + + WatchTransfer(opts *bind.WatchOpts, sink chan<- *WETH9Transfer, src []common.Address, dst []common.Address) (event.Subscription, error) + + ParseTransfer(log types.Log) (*WETH9Transfer, error) + + FilterWithdrawal(opts *bind.FilterOpts, src []common.Address) (*WETH9WithdrawalIterator, error) + + WatchWithdrawal(opts *bind.WatchOpts, sink chan<- *WETH9Withdrawal, src []common.Address) (event.Subscription, error) + + ParseWithdrawal(log types.Log) (*WETH9Withdrawal, error) + + ParseLog(log types.Log) (generated.AbigenLog, error) + + Address() common.Address +} 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 e46f86ba591..612d6c0ea4d 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 @@ -20,12 +20,13 @@ automation_utils_2_1: ../../contracts/solc/v0.8.16/AutomationUtils2_1/Automation 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.19/BatchBlockhashStore/BatchBlockhashStore.abi ../../contracts/solc/v0.8.19/BatchBlockhashStore/BatchBlockhashStore.bin 6a7444e5e3e95c370de2442ff53740e535d81ec9c6fb84e8b3c53742e4aaa38e -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.19/BatchVRFCoordinatorV2Plus/BatchVRFCoordinatorV2Plus.abi ../../contracts/solc/v0.8.19/BatchVRFCoordinatorV2Plus/BatchVRFCoordinatorV2Plus.bin ace5851ac0b419ee93f3c716ee13e77c530531248119f3970657f84dfcd73c6e +batch_vrf_coordinator_v2: ../../contracts/solc/v0.8.6/BatchVRFCoordinatorV2/BatchVRFCoordinatorV2.abi ../../contracts/solc/v0.8.6/BatchVRFCoordinatorV2/BatchVRFCoordinatorV2.bin 4512f4313bc5c078215c9241a69045a2a3cfecd6adfcef2f13037183a2d71483 +batch_vrf_coordinator_v2plus: ../../contracts/solc/v0.8.19/BatchVRFCoordinatorV2Plus/BatchVRFCoordinatorV2Plus.abi ../../contracts/solc/v0.8.19/BatchVRFCoordinatorV2Plus/BatchVRFCoordinatorV2Plus.bin f13715b38b5b9084b08bffa571fb1c8ef686001535902e1255052f074b31ad4e blockhash_store: ../../contracts/solc/v0.8.19/BlockhashStore/BlockhashStore.abi ../../contracts/solc/v0.8.19/BlockhashStore/BlockhashStore.bin 31b118f9577240c8834c35f8b5a1440e82a6ca8aea702970de2601824b6ab0e1 chain_module_base: ../../contracts/solc/v0.8.19/ChainModuleBase/ChainModuleBase.abi ../../contracts/solc/v0.8.19/ChainModuleBase/ChainModuleBase.bin 39dfce79330e921e5c169051b11c6e5ea15cd4db5a7b09c06aabbe9658148915 -chain_reader_tester: ../../contracts/solc/v0.8.19/ChainReaderTester/ChainReaderTester.abi ../../contracts/solc/v0.8.19/ChainReaderTester/ChainReaderTester.bin de88c7e68de36b96aa2bec844bdc96fcd7c9017b38e25062b3b9f9cec42c814f +chain_reader_tester: ../../contracts/solc/v0.8.19/ChainReaderTester/ChainReaderTester.abi ../../contracts/solc/v0.8.19/ChainReaderTester/ChainReaderTester.bin b3718dad488f54de97d124221d96b867c81e11210084a1fad379cb8385d37ffe chain_specific_util_helper: ../../contracts/solc/v0.8.6/ChainSpecificUtilHelper/ChainSpecificUtilHelper.abi ../../contracts/solc/v0.8.6/ChainSpecificUtilHelper/ChainSpecificUtilHelper.bin 66eb30b0717fefe05672df5ec863c0b9a5a654623c4757307a2726d8f31e26b1 +counter: ../../contracts/solc/v0.8.6/Counter/Counter.abi ../../contracts/solc/v0.8.6/Counter/Counter.bin 6ca06e000e8423573ffa0bdfda749d88236ab3da2a4cbb4a868c706da90488c9 cron_upkeep_factory_wrapper: ../../contracts/solc/v0.8.6/CronUpkeepFactory/CronUpkeepFactory.abi - dacb0f8cdf54ae9d2781c5e720fc314b32ed5e58eddccff512c75d6067292cd7 cron_upkeep_wrapper: ../../contracts/solc/v0.8.6/CronUpkeepFactory/CronUpkeep.abi - 362fcfcf30a6ab3acff83095ea4b2b9056dd5e9dcb94bc5411aae58995d22709 dummy_protocol_wrapper: ../../contracts/solc/v0.8.16/DummyProtocol/DummyProtocol.abi ../../contracts/solc/v0.8.16/DummyProtocol/DummyProtocol.bin 583a448170b13abf7ed64e406e8177d78c9e55ab44efd141eee60de23a71ee3b @@ -55,6 +56,7 @@ log_emitter: ../../contracts/solc/v0.8.19/LogEmitter/LogEmitter.abi ../../contra log_triggered_streams_lookup_wrapper: ../../contracts/solc/v0.8.16/LogTriggeredStreamsLookup/LogTriggeredStreamsLookup.abi ../../contracts/solc/v0.8.16/LogTriggeredStreamsLookup/LogTriggeredStreamsLookup.bin 920fff3b662909f12ed11b47d168036ffa74ad52070a94e2fa26cdad5e428b4e log_upkeep_counter_wrapper: ../../contracts/solc/v0.8.6/LogUpkeepCounter/LogUpkeepCounter.abi ../../contracts/solc/v0.8.6/LogUpkeepCounter/LogUpkeepCounter.bin 42426bbb83f96dfbe55fc576d6c65020eaeed690e2289cf99b0c4aa810a5f4ec mock_aggregator_proxy: ../../contracts/solc/v0.8.6/MockAggregatorProxy/MockAggregatorProxy.abi ../../contracts/solc/v0.8.6/MockAggregatorProxy/MockAggregatorProxy.bin b16c108f3dd384c342ddff5e94da7c0a8d39d1be5e3d8f2cf61ecc7f0e50ff42 +mock_ethusd_aggregator_wrapper: ../../contracts/solc/v0.8.19/MockETHUSDAggregator/MockETHUSDAggregator.abi ../../contracts/solc/v0.8.19/MockETHUSDAggregator/MockETHUSDAggregator.bin b9b361f502d2aad32311c60ca86b071de93a024ac488bcfa19725d368cd05d61 offchain_aggregator_wrapper: OffchainAggregator/OffchainAggregator.abi - 5c8d6562e94166d4790f1ee6e4321d359d9f7262e6c5452a712b1f1c896f45cf operator_factory: ../../contracts/solc/v0.8.19/OperatorFactory/OperatorFactory.abi ../../contracts/solc/v0.8.19/OperatorFactory/OperatorFactory.bin 88e6baa5d9b255eea02616fbcb2cbe21a25ab46adeb6395f6289d169dec949ae operator_wrapper: ../../contracts/solc/v0.8.19/Operator/Operator.abi ../../contracts/solc/v0.8.19/Operator/Operator.bin 23c3888eaa7259e6adf2153d09abae8f4b1987dc44200363faab1e65483f32d5 @@ -64,12 +66,12 @@ scroll_module: ../../contracts/solc/v0.8.19/ScrollModule/ScrollModule.abi ../../ simple_log_upkeep_counter_wrapper: ../../contracts/solc/v0.8.6/SimpleLogUpkeepCounter/SimpleLogUpkeepCounter.abi ../../contracts/solc/v0.8.6/SimpleLogUpkeepCounter/SimpleLogUpkeepCounter.bin 7557d117a066cd8cf35f635bc085ee11795442073c18f8610ede9037b74fd814 solidity_vrf_consumer_interface_v08: ../../contracts/solc/v0.8.6/VRFConsumer/VRFConsumer.abi ../../contracts/solc/v0.8.6/VRFConsumer/VRFConsumer.bin b14f9136b15e3dc9d6154d5700f3ed4cf88ddc4f70f20c3bb57fc46050904c8f solidity_vrf_request_id_v08: ../../contracts/solc/v0.8.6/VRFRequestIDBaseTestHelper/VRFRequestIDBaseTestHelper.abi ../../contracts/solc/v0.8.6/VRFRequestIDBaseTestHelper/VRFRequestIDBaseTestHelper.bin f2559015d6f3e5d285c57b011be9b2300632e93dd6c4524e58202d6200f09edc -solidity_vrf_v08_verifier_wrapper: ../../contracts/solc/v0.8.6/VRFTestHelper/VRFTestHelper.abi ../../contracts/solc/v0.8.6/VRFTestHelper/VRFTestHelper.bin f37f8b21a81c113085c6137835a2246db6ebda07da455c4f2b5c7ec60c725c3b +solidity_vrf_v08_verifier_wrapper: ../../contracts/solc/v0.8.6/VRFTestHelper/VRFTestHelper.abi ../../contracts/solc/v0.8.6/VRFTestHelper/VRFTestHelper.bin 8cc8d2df518c84c75a2dcd336c5d76355b68a9161dfd987d449fc8afb8b46c2f streams_lookup_compatible_interface: ../../contracts/solc/v0.8.16/StreamsLookupCompatibleInterface/StreamsLookupCompatibleInterface.abi ../../contracts/solc/v0.8.16/StreamsLookupCompatibleInterface/StreamsLookupCompatibleInterface.bin 2861f553fb4731e89126b13319462df674727005a51982d1e617e2c2e44fa422 streams_lookup_upkeep_wrapper: ../../contracts/solc/v0.8.16/StreamsLookupUpkeep/StreamsLookupUpkeep.abi ../../contracts/solc/v0.8.16/StreamsLookupUpkeep/StreamsLookupUpkeep.bin 37e3a61091cc2a156539dd4aaff987e07577118aa02e97931a647df55705465e trusted_blockhash_store: ../../contracts/solc/v0.8.19/TrustedBlockhashStore/TrustedBlockhashStore.abi ../../contracts/solc/v0.8.19/TrustedBlockhashStore/TrustedBlockhashStore.bin 1570663ef6feabf8660a93e85d2427ad8e7dabcfa5b418d308c62132451c5662 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 cef953186d12ac802e54d17c897d01605b60bbe0ce2df3b4cf2c31c5c3168b35 +upkeep_counter_wrapper: ../../contracts/solc/v0.8.16/UpkeepCounter/UpkeepCounter.abi ../../contracts/solc/v0.8.16/UpkeepCounter/UpkeepCounter.bin 6fe44aac779a3f471febc867ec34e17c00471b88d201b019b3330a51bc484365 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 fdc345861ed01e59a5fe74538c7adccf1360db47d7660f5e463c0a99a78c9821 @@ -79,9 +81,11 @@ vrf_consumer_v2: ../../contracts/solc/v0.8.6/VRFConsumerV2/VRFConsumerV2.abi ../ vrf_consumer_v2_plus_upgradeable_example: ../../contracts/solc/v0.8.19/VRFConsumerV2PlusUpgradeableExample/VRFConsumerV2PlusUpgradeableExample.abi ../../contracts/solc/v0.8.19/VRFConsumerV2PlusUpgradeableExample/VRFConsumerV2PlusUpgradeableExample.bin 02a48cf194946ed680f4fa224bb8aebd95cc79cb4349ec382b9673605c079ac4 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 6ec239714523dc30dec2d8484c3020fb24ba1d4e2310146b24df30b46b370551 -vrf_coordinator_v2_5: ../../contracts/solc/v0.8.19/VRFCoordinatorV2_5/VRFCoordinatorV2_5.abi ../../contracts/solc/v0.8.19/VRFCoordinatorV2_5/VRFCoordinatorV2_5.bin 6c8c81567233a78de7ddde8612a000b3f36a5fb0c0a01a0acc47c25924225b7c +vrf_coordinator_test_v2: ../../contracts/solc/v0.8.6/VRFCoordinatorTestV2/VRFCoordinatorTestV2.abi ../../contracts/solc/v0.8.6/VRFCoordinatorTestV2/VRFCoordinatorTestV2.bin ff6c0056c6181ea75f667beed21ff4610f417dd50ceabf2dec8fa42e84851f50 +vrf_coordinator_v2: ../../contracts/solc/v0.8.6/VRFCoordinatorV2/VRFCoordinatorV2.abi ../../contracts/solc/v0.8.6/VRFCoordinatorV2/VRFCoordinatorV2.bin 156fbbc19489383901087c2076648ccd343bcd9a332f1ad25974da834c5be961 +vrf_coordinator_v2_5: ../../contracts/solc/v0.8.19/VRFCoordinatorV2_5/VRFCoordinatorV2_5.abi ../../contracts/solc/v0.8.19/VRFCoordinatorV2_5/VRFCoordinatorV2_5.bin 3c766dbdefcc895ad475de96c65b6c48c868b8dc889ee750bba6711b1e5ec41d +vrf_coordinator_v2_5_arbitrum: ../../contracts/solc/v0.8.19/VRFCoordinatorV2_5_Arbitrum/VRFCoordinatorV2_5_Arbitrum.abi ../../contracts/solc/v0.8.19/VRFCoordinatorV2_5_Arbitrum/VRFCoordinatorV2_5_Arbitrum.bin 1a2431ee76e307b45f683c439d08b9096a08f08aaf9ca132ea5b36b409962abe +vrf_coordinator_v2_5_optimism: ../../contracts/solc/v0.8.19/VRFCoordinatorV2_5_Optimism/VRFCoordinatorV2_5_Optimism.abi ../../contracts/solc/v0.8.19/VRFCoordinatorV2_5_Optimism/VRFCoordinatorV2_5_Optimism.bin 2f0e50b65a97d7d648390d78523b36e678323e05ca8cb3ae8fefedc152389719 vrf_coordinator_v2_plus_v2_example: ../../contracts/solc/v0.8.19/VRFCoordinatorV2Plus_V2Example/VRFCoordinatorV2Plus_V2Example.abi ../../contracts/solc/v0.8.19/VRFCoordinatorV2Plus_V2Example/VRFCoordinatorV2Plus_V2Example.bin 75eddfee13481e4fa1031762a230cdb2db78fa80d48faa0db555dd1c202aa347 vrf_coordinator_v2plus_interface: ../../contracts/solc/v0.8.19/IVRFCoordinatorV2PlusInternal/IVRFCoordinatorV2PlusInternal.abi ../../contracts/solc/v0.8.19/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 @@ -92,7 +96,7 @@ vrf_log_emitter: ../../contracts/solc/v0.8.19/VRFLogEmitter/VRFLogEmitter.abi .. 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.19/VRFMaliciousConsumerV2Plus/VRFMaliciousConsumerV2Plus.abi ../../contracts/solc/v0.8.19/VRFMaliciousConsumerV2Plus/VRFMaliciousConsumerV2Plus.bin f6bf81658d3472bb705d28dc4a837097ec93d78c3f786efaa9cd040ada9d3319 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: ../../contracts/solc/v0.8.6/VRFOwner/VRFOwner.abi ../../contracts/solc/v0.8.6/VRFOwner/VRFOwner.bin 743f73b550e90b56136aa71d17c48e08d0bb61e59fe0d17024e0313a2ce35948 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 @@ -100,7 +104,7 @@ vrf_v2_consumer_wrapper: ../../contracts/solc/v0.8.6/VRFv2Consumer/VRFv2Consumer vrf_v2plus_load_test_with_metrics: ../../contracts/solc/v0.8.19/VRFV2PlusLoadTestWithMetrics/VRFV2PlusLoadTestWithMetrics.abi ../../contracts/solc/v0.8.19/VRFV2PlusLoadTestWithMetrics/VRFV2PlusLoadTestWithMetrics.bin b618ed5a9d883f4a33b6af14994bf590b4f5c27db8f881b0474d72092aea6bf5 vrf_v2plus_single_consumer: ../../contracts/solc/v0.8.19/VRFV2PlusSingleConsumerExample/VRFV2PlusSingleConsumerExample.abi ../../contracts/solc/v0.8.19/VRFV2PlusSingleConsumerExample/VRFV2PlusSingleConsumerExample.bin cfdfb97b1b0801ee778410d54b1f6541395ac01ab592ffd6c3feaf4a3ac3eca2 vrf_v2plus_sub_owner: ../../contracts/solc/v0.8.19/VRFV2PlusExternalSubOwnerExample/VRFV2PlusExternalSubOwnerExample.abi ../../contracts/solc/v0.8.19/VRFV2PlusExternalSubOwnerExample/VRFV2PlusExternalSubOwnerExample.bin 6032a081ad15453e52af1cf37c74a9f77f2a30bc14b2cb35f564eabc4b0b4c2e -vrf_v2plus_upgraded_version: ../../contracts/solc/v0.8.19/VRFCoordinatorV2PlusUpgradedVersion/VRFCoordinatorV2PlusUpgradedVersion.abi ../../contracts/solc/v0.8.19/VRFCoordinatorV2PlusUpgradedVersion/VRFCoordinatorV2PlusUpgradedVersion.bin e6f9d63623a10f8501ea51e7da7c8e8eca9cd267057eaf0962dcab823fc3fa83 +vrf_v2plus_upgraded_version: ../../contracts/solc/v0.8.19/VRFCoordinatorV2PlusUpgradedVersion/VRFCoordinatorV2PlusUpgradedVersion.abi ../../contracts/solc/v0.8.19/VRFCoordinatorV2PlusUpgradedVersion/VRFCoordinatorV2PlusUpgradedVersion.bin ffc45cdde6444156ba2eca1bf8cf569db0b5bfaa44977a5d37694babbb7ad41c 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 @@ -112,6 +116,9 @@ vrfv2plus_client: ../../contracts/solc/v0.8.19/VRFV2PlusClient/VRFV2PlusClient.a vrfv2plus_consumer_example: ../../contracts/solc/v0.8.19/VRFV2PlusConsumerExample/VRFV2PlusConsumerExample.abi ../../contracts/solc/v0.8.19/VRFV2PlusConsumerExample/VRFV2PlusConsumerExample.bin 5e0bdf21048dd6b405ccaa3d260d7fb6d24fd256094310a5cb149aed68e4f892 vrfv2plus_malicious_migrator: ../../contracts/solc/v0.8.19/VRFV2PlusMaliciousMigrator/VRFV2PlusMaliciousMigrator.abi ../../contracts/solc/v0.8.19/VRFV2PlusMaliciousMigrator/VRFV2PlusMaliciousMigrator.bin 5dff20621fe6ed3bed75fe4b65381b0d4b1f6286ee3571553dbeb57213b53416 vrfv2plus_reverting_example: ../../contracts/solc/v0.8.19/VRFV2PlusRevertingExample/VRFV2PlusRevertingExample.abi ../../contracts/solc/v0.8.19/VRFV2PlusRevertingExample/VRFV2PlusRevertingExample.bin 82860e6ed846eaa4a5127b96c8ce4e444138412e9ed0605cfdecb6995436b3af -vrfv2plus_wrapper: ../../contracts/solc/v0.8.19/VRFV2PlusWrapper/VRFV2PlusWrapper.abi ../../contracts/solc/v0.8.19/VRFV2PlusWrapper/VRFV2PlusWrapper.bin 004733665a250081153e8878c0621461fea65a2d3b4905269cbd79a0966f211e +vrfv2plus_wrapper: ../../contracts/solc/v0.8.19/VRFV2PlusWrapper/VRFV2PlusWrapper.abi ../../contracts/solc/v0.8.19/VRFV2PlusWrapper/VRFV2PlusWrapper.bin 411246826f5689cfdcaed073893c5194fd089acf2b5c13dd989abc1869b67071 +vrfv2plus_wrapper_arbitrum: ../../contracts/solc/v0.8.19/VRFV2PlusWrapper_Arbitrum/VRFV2PlusWrapper_Arbitrum.abi ../../contracts/solc/v0.8.19/VRFV2PlusWrapper_Arbitrum/VRFV2PlusWrapper_Arbitrum.bin 079bb2b4d29d6b4ff0edd741b3024f4a9a58e0e31a7e54273b820cc815d6c0c8 vrfv2plus_wrapper_consumer_example: ../../contracts/solc/v0.8.19/VRFV2PlusWrapperConsumerExample/VRFV2PlusWrapperConsumerExample.abi ../../contracts/solc/v0.8.19/VRFV2PlusWrapperConsumerExample/VRFV2PlusWrapperConsumerExample.bin aeb0c681fa264f90971f65cba1e8d41064948070b217c8204a80ac95e1fa2294 vrfv2plus_wrapper_load_test_consumer: ../../contracts/solc/v0.8.19/VRFV2PlusWrapperLoadTestConsumer/VRFV2PlusWrapperLoadTestConsumer.abi ../../contracts/solc/v0.8.19/VRFV2PlusWrapperLoadTestConsumer/VRFV2PlusWrapperLoadTestConsumer.bin 5ca0223d3f6f6073ddfee4f9ddca13ea5f87297eb5f800359d7a1c41d04b6776 +vrfv2plus_wrapper_optimism: ../../contracts/solc/v0.8.19/VRFV2PlusWrapper_Optimism/VRFV2PlusWrapper_Optimism.abi ../../contracts/solc/v0.8.19/VRFV2PlusWrapper_Optimism/VRFV2PlusWrapper_Optimism.bin 12a8c7a96716a5472a8ca712b10ab631085d4f5eb17bd5f7e0d2412556058ce9 +weth9_wrapper: ../../contracts/solc/v0.8.19/WETH9/WETH9.abi ../../contracts/solc/v0.8.19/WETH9/WETH9.bin 7f600a1de0c02a071cb13bcf9eb1dbf11c3e3eccd1e78ed4b4ecb2960f2bb020 diff --git a/core/gethwrappers/go_generate.go b/core/gethwrappers/go_generate.go index 1ab61563bf7..c916380cb43 100644 --- a/core/gethwrappers/go_generate.go +++ b/core/gethwrappers/go_generate.go @@ -57,6 +57,8 @@ package gethwrappers //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.19/MockETHUSDAggregator/MockETHUSDAggregator.abi ../../contracts/solc/v0.8.19/MockETHUSDAggregator/MockETHUSDAggregator.bin MockETHUSDAggregator mock_ethusd_aggregator_wrapper +//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/WETH9/WETH9.abi ../../contracts/solc/v0.8.19/WETH9/WETH9.bin WETH9 weth9_wrapper //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 @@ -81,6 +83,7 @@ package gethwrappers //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/VRFV2LoadTestWithMetrics/VRFV2LoadTestWithMetrics.abi ../../contracts/solc/v0.8.6/VRFV2LoadTestWithMetrics/VRFV2LoadTestWithMetrics.bin VRFV2LoadTestWithMetrics vrf_load_test_with_metrics //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/VRFV2OwnerTestConsumer/VRFV2OwnerTestConsumer.abi ../../contracts/solc/v0.8.6/VRFV2OwnerTestConsumer/VRFV2OwnerTestConsumer.bin VRFV2OwnerTestConsumer vrf_owner_test_consumer //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/VRFv2Consumer/VRFv2Consumer.abi ../../contracts/solc/v0.8.6/VRFv2Consumer/VRFv2Consumer.bin VRFv2Consumer vrf_v2_consumer_wrapper +//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/Counter/Counter.abi ../../contracts/solc/v0.8.6/Counter/Counter.bin Counter counter //go:generate go run ./generation/generate_link/wrap_link.go @@ -136,6 +139,10 @@ package gethwrappers //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/VRFV2PlusWrapperLoadTestConsumer/VRFV2PlusWrapperLoadTestConsumer.abi ../../contracts/solc/v0.8.19/VRFV2PlusWrapperLoadTestConsumer/VRFV2PlusWrapperLoadTestConsumer.bin VRFV2PlusWrapperLoadTestConsumer vrfv2plus_wrapper_load_test_consumer //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/BlockhashStore/BlockhashStore.abi ../../contracts/solc/v0.8.19/BlockhashStore/BlockhashStore.bin BlockhashStore blockhash_store //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/BatchBlockhashStore/BatchBlockhashStore.abi ../../contracts/solc/v0.8.19/BatchBlockhashStore/BatchBlockhashStore.bin BatchBlockhashStore batch_blockhash_store +//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/VRFCoordinatorV2_5_Arbitrum/VRFCoordinatorV2_5_Arbitrum.abi ../../contracts/solc/v0.8.19/VRFCoordinatorV2_5_Arbitrum/VRFCoordinatorV2_5_Arbitrum.bin VRFCoordinatorV2_5_Arbitrum vrf_coordinator_v2_5_arbitrum +//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/VRFCoordinatorV2_5_Optimism/VRFCoordinatorV2_5_Optimism.abi ../../contracts/solc/v0.8.19/VRFCoordinatorV2_5_Optimism/VRFCoordinatorV2_5_Optimism.bin VRFCoordinatorV2_5_Optimism vrf_coordinator_v2_5_optimism +//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/VRFV2PlusWrapper_Arbitrum/VRFV2PlusWrapper_Arbitrum.abi ../../contracts/solc/v0.8.19/VRFV2PlusWrapper_Arbitrum/VRFV2PlusWrapper_Arbitrum.bin VRFV2PlusWrapper_Arbitrum vrfv2plus_wrapper_arbitrum +//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/VRFV2PlusWrapper_Optimism/VRFV2PlusWrapper_Optimism.abi ../../contracts/solc/v0.8.19/VRFV2PlusWrapper_Optimism/VRFV2PlusWrapper_Optimism.bin VRFV2PlusWrapper_Optimism vrfv2plus_wrapper_optimism // Aggregators //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/AggregatorV2V3Interface/AggregatorV2V3Interface.abi ../../contracts/solc/v0.8.6/AggregatorV2V3Interface/AggregatorV2V3Interface.bin AggregatorV2V3Interface aggregator_v2v3_interface diff --git a/core/gethwrappers/go_generate_vrfv2plus.go b/core/gethwrappers/go_generate_vrfv2plus.go index 6a2059e00c4..2ff9b3b5cbd 100644 --- a/core/gethwrappers/go_generate_vrfv2plus.go +++ b/core/gethwrappers/go_generate_vrfv2plus.go @@ -21,3 +21,7 @@ package gethwrappers //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/VRFV2PlusWrapperLoadTestConsumer/VRFV2PlusWrapperLoadTestConsumer.abi ../../contracts/solc/v0.8.19/VRFV2PlusWrapperLoadTestConsumer/VRFV2PlusWrapperLoadTestConsumer.bin VRFV2PlusWrapperLoadTestConsumer vrfv2plus_wrapper_load_test_consumer //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/BlockhashStore/BlockhashStore.abi ../../contracts/solc/v0.8.19/BlockhashStore/BlockhashStore.bin BlockhashStore blockhash_store //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/BatchBlockhashStore/BatchBlockhashStore.abi ../../contracts/solc/v0.8.19/BatchBlockhashStore/BatchBlockhashStore.bin BatchBlockhashStore batch_blockhash_store +//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/VRFCoordinatorV2_5_Arbitrum/VRFCoordinatorV2_5_Arbitrum.abi ../../contracts/solc/v0.8.19/VRFCoordinatorV2_5_Arbitrum/VRFCoordinatorV2_5_Arbitrum.bin VRFCoordinatorV2_5_Arbitrum vrf_coordinator_v2_5_arbitrum +//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/VRFCoordinatorV2_5_Optimism/VRFCoordinatorV2_5_Optimism.abi ../../contracts/solc/v0.8.19/VRFCoordinatorV2_5_Optimism/VRFCoordinatorV2_5_Optimism.bin VRFCoordinatorV2_5_Optimism vrf_coordinator_v2_5_optimism +//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/VRFV2PlusWrapper_Arbitrum/VRFV2PlusWrapper_Arbitrum.abi ../../contracts/solc/v0.8.19/VRFV2PlusWrapper_Arbitrum/VRFV2PlusWrapper_Arbitrum.bin VRFV2PlusWrapper_Arbitrum vrfv2plus_wrapper_arbitrum +//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.19/VRFV2PlusWrapper_Optimism/VRFV2PlusWrapper_Optimism.abi ../../contracts/solc/v0.8.19/VRFV2PlusWrapper_Optimism/VRFV2PlusWrapper_Optimism.bin VRFV2PlusWrapper_Optimism vrfv2plus_wrapper_optimism diff --git a/core/gethwrappers/ocr2vrf/generated/dkg/dkg.go b/core/gethwrappers/ocr2vrf/generated/dkg/dkg.go deleted file mode 100644 index 7a18b7f55bd..00000000000 --- a/core/gethwrappers/ocr2vrf/generated/dkg/dkg.go +++ /dev/null @@ -1,1274 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package dkg - -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 KeyDataStructKeyData struct { - PublicKey []byte - Hashes [][32]byte -} - -var DKGMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"actualLength\",\"type\":\"uint256\"}],\"name\":\"CalldataLengthMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"actual\",\"type\":\"bytes32\"}],\"name\":\"ConfigDigestMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IncorrectNumberOfFaultyOracles\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedNumSignatures\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rsLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ssLength\",\"type\":\"uint256\"}],\"name\":\"IncorrectNumberOfSignatures\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"expectedLength\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"actualLength\",\"type\":\"uint256\"}],\"name\":\"InvalidOnchainConfigLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"}],\"name\":\"InvalidSigner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"}],\"name\":\"InvalidTransmitter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"KeyIDCopyFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NonUniqueSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"numFaultyOracles\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"numSigners\",\"type\":\"uint256\"}],\"name\":\"NumberOfFaultyOraclesTooHigh\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"repeatedSignerAddress\",\"type\":\"address\"}],\"name\":\"RepeatedSigner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"repeatedTransmitterAddress\",\"type\":\"address\"}],\"name\":\"RepeatedTransmitter\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"numSigners\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"numTransmitters\",\"type\":\"uint256\"}],\"name\":\"SignersTransmittersMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"maxOracles\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"providedOracles\",\"type\":\"uint256\"}],\"name\":\"TooManyOracles\",\"type\":\"error\"},{\"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\":false,\"internalType\":\"contractDKGClient\",\"name\":\"client\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"errorData\",\"type\":\"bytes\"}],\"name\":\"DKGClientError\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"keyID\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"publicKey\",\"type\":\"bytes\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashes\",\"type\":\"bytes32[]\"}],\"indexed\":false,\"internalType\":\"structKeyDataStruct.KeyData\",\"name\":\"key\",\"type\":\"tuple\"}],\"name\":\"KeyGenerated\",\"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\":\"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\":\"keyID\",\"type\":\"bytes32\"},{\"internalType\":\"contractDKGClient\",\"name\":\"clientAddress\",\"type\":\"address\"}],\"name\":\"addClient\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_keyID\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_configDigest\",\"type\":\"bytes32\"}],\"name\":\"getKey\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"publicKey\",\"type\":\"bytes\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashes\",\"type\":\"bytes32[]\"}],\"internalType\":\"structKeyDataStruct.KeyData\",\"name\":\"\",\"type\":\"tuple\"}],\"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\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"keyID\",\"type\":\"bytes32\"},{\"internalType\":\"contractDKGClient\",\"name\":\"clientAddress\",\"type\":\"address\"}],\"name\":\"removeClient\",\"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\":\"_onchainConfig\",\"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\":\"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\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}]", - Bin: "0x60806040523480156200001157600080fd5b503380600081620000695760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b03848116919091179091558116156200009c576200009c81620000a5565b50505062000150565b336001600160a01b03821603620000ff5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000060565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b612b8080620001606000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80638da5cb5b11610081578063c3105a6b1161005b578063c3105a6b146101db578063e3d0e712146101fb578063f2fde38b1461020e57600080fd5b80638da5cb5b14610176578063afcb95d71461019e578063b1dc65a4146101c857600080fd5b806379ba5097116100b257806379ba50971461012b5780637bf1ffc51461013357806381ff70481461014657600080fd5b8063181f5a77146100ce5780635429a79e14610116575b600080fd5b604080518082018252600981527f444b4720302e302e3100000000000000000000000000000000000000000000006020820152905161010d9190611fc8565b60405180910390f35b610129610124366004612004565b610221565b005b6101296104b0565b610129610141366004612004565b6105b2565b6007546005546040805163ffffffff8085168252640100000000909404909316602084015282015260600161010d565b60005460405173ffffffffffffffffffffffffffffffffffffffff909116815260200161010d565b6005546004546040805160008152602081019390935263ffffffff9091169082015260600161010d565b6101296101d6366004612080565b61061e565b6101ee6101e9366004612165565b610761565b60405161010d9190612187565b6101296102093660046123dd565b61088a565b61012961021c3660046124aa565b6111ec565b610229611200565b60008281526002602090815260408083208054825181850281018501909352808352919290919083018282801561029657602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff16815260019091019060200180831161026b575b505050505090506000815167ffffffffffffffff8111156102b9576102b961220d565b6040519080825280602002602001820160405280156102e2578160200160208202803683370190505b5090506000805b83518110156103b9578473ffffffffffffffffffffffffffffffffffffffff1684828151811061031b5761031b6124c7565b602002602001015173ffffffffffffffffffffffffffffffffffffffff161461039957848361034a8484612525565b8151811061035a5761035a6124c7565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506103a7565b816103a381612538565b9250505b806103b181612538565b9150506102e9565b5060008184516103c99190612525565b67ffffffffffffffff8111156103e1576103e161220d565b60405190808252806020026020018201604052801561040a578160200160208202803683370190505b50905060005b82855161041d9190612525565b81101561048757838181518110610436576104366124c7565b6020026020010151828281518110610450576104506124c7565b73ffffffffffffffffffffffffffffffffffffffff909216602092830291909101909101528061047f81612538565b915050610410565b50600086815260026020908152604090912082516104a792840190611e61565b50505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610536576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6105ba611200565b600091825260026020908152604083208054600181018255908452922090910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055565b60005a604080516020601f8b018190048102820181019092528981529192508a3591818c01359161066e9184918491908e908e908190840183828082843760009201919091525061128392505050565b6040805183815263ffffffff600884901c1660208201527fb04e63db38c49950639fa09d29872f21f5d49d614f3a969d8adf3d4b52e41a62910160405180910390a16040805160608101825260055480825260065460ff808216602085015261010090910416928201929092529083146107215780516040517f93df584c00000000000000000000000000000000000000000000000000000000815260048101919091526024810184905260440161052d565b61072f8b8b8b8b8b8b611512565b6107408c8c8c8c8c8c8c8c89611599565b50505063ffffffff811061075657610756612570565b505050505050505050565b604080518082019091526060808252602082015260008381526003602090815260408083208584529091529081902081518083019092528054829082906107a79061259f565b80601f01602080910402602001604051908101604052809291908181526020018280546107d39061259f565b80156108205780601f106107f557610100808354040283529160200191610820565b820191906000526020600020905b81548152906001019060200180831161080357829003601f168201915b505050505081526020016001820180548060200260200160405190810160405280929190818152602001828054801561087857602002820191906000526020600020905b815481526020019060010190808311610864575b50505050508152505090505b92915050565b8551855185601f8311156108d4576040517f809fc428000000000000000000000000000000000000000000000000000000008152601f60048201526024810184905260440161052d565b818314610917576040517f988a0804000000000000000000000000000000000000000000000000000000008152600481018490526024810183905260440161052d565b6109228160036125f2565b60ff168311610969576040517ffda9db7800000000000000000000000000000000000000000000000000000000815260ff821660048201526024810184905260440161052d565b8060ff166000036109a6576040517fe77dba5600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109ae611200565b6040805160c0810182528a8152602081018a905260ff8916918101919091526060810187905267ffffffffffffffff8616608082015260a081018590525b60095415610ba157600954600090610a0690600190612525565b9050600060098281548110610a1d57610a1d6124c7565b6000918252602082200154600a805473ffffffffffffffffffffffffffffffffffffffff90921693509084908110610a5757610a576124c7565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff85811684526008909252604080842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000090811690915592909116808452922080549091169055600980549192509080610ad757610ad7612615565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055019055600a805480610b4057610b40612615565b60008281526020902081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055019055506109ec915050565b60005b81515181101561101c5760006008600084600001518481518110610bca57610bca6124c7565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002054610100900460ff166002811115610c1457610c14612644565b14610c84578151805182908110610c2d57610c2d6124c7565b60200260200101516040517f7451f83e00000000000000000000000000000000000000000000000000000000815260040161052d919073ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b6040805180820190915260ff82168152600160208201528251805160089160009185908110610cb557610cb56124c7565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252818101929092526040016000208251815460ff9091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082168117835592840151919283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001617610100836002811115610d5657610d56612644565b021790555060009150610d669050565b6008600084602001518481518110610d8057610d806124c7565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002054610100900460ff166002811115610dca57610dca612644565b14610e3c5781602001518181518110610de557610de56124c7565b60200260200101516040517fe8d2989900000000000000000000000000000000000000000000000000000000815260040161052d919073ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b6040805180820190915260ff821681526020810160028152506008600084602001518481518110610e6f57610e6f6124c7565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252818101929092526040016000208251815460ff9091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082168117835592840151919283917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001617610100836002811115610f1057610f10612644565b021790555050825180516009925083908110610f2e57610f2e6124c7565b602090810291909101810151825460018101845560009384529282902090920180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909316929092179091558201518051600a919083908110610faa57610faa6124c7565b60209081029190910181015182546001810184556000938452919092200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790558061101481612538565b915050610ba4565b506040810151600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff909216919091179055600754640100000000900463ffffffff1661106c611a2f565b6007805463ffffffff928316640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff8216811783556001936000926110bd928692908116911617612673565b92506101000a81548163ffffffff021916908363ffffffff160217905550600061111e4630600760009054906101000a900463ffffffff1663ffffffff1686600001518760200151886040015189606001518a608001518b60a00151611ac6565b6005819055835180516006805460ff909216610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff9092169190911790556007546020860151604080880151606089015160808a015160a08b015193519798507f1591690b8638f5fb2dbec82ac741805ac5da8b45dc5263f4875b0496fdce4e05976111c3978b978b9763ffffffff9091169691959094909390929091906126e1565b60405180910390a16111de8360400151846060015183611b71565b505050505050505050505050565b6111f4611200565b6111fd81611d6c565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314611281576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640161052d565b565b60006060808380602001905181019061129c9190612777565b60408051808201825283815260208082018490526000868152600282528381208054855181850281018501909652808652979a509598509396509094929391929083018282801561132357602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff1681526001909101906020018083116112f8575b5050505050905060005b815181101561144d57818181518110611348576113486124c7565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1663bf2732c7846040518263ffffffff1660e01b81526004016113889190612187565b600060405180830381600087803b1580156113a257600080fd5b505af19250505080156113b3575060015b61143b573d8080156113e1576040519150601f19603f3d011682016040523d82523d6000602084013e6113e6565b606091505b507f116391732f5df106193bda7cedf1728f3b07b62f6cdcdd611c9eeec44efcae5483838151811061141a5761141a6124c7565b602002602001015182604051611431929190612875565b60405180910390a1505b8061144581612538565b91505061132d565b5060008581526003602090815260408083208b845290915290208251839190819061147890826128fb565b5060208281015180516114919260018501920190611eeb565b5090505084887fc8db841f5b2231ccf7190311f440aa197b161e369f3b40b023508160cc555656846040516114c69190612187565b60405180910390a350506004805460089690961c63ffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000909616959095179094555050505050565b600061151f826020612a15565b61152a856020612a15565b61153688610144612a2c565b6115409190612a2c565b61154a9190612a2c565b611555906000612a2c565b90503681146104a7576040517ff7b94f0a0000000000000000000000000000000000000000000000000000000081526004810182905236602482015260440161052d565b60006002826020015183604001516115b19190612a3f565b6115bb9190612a58565b6115c6906001612a3f565b60408051600180825281830190925260ff929092169250600091906020820181803683370190505090508160f81b81600081518110611607576116076124c7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535086821415806116455750868514155b1561168d576040517fe307bd5700000000000000000000000000000000000000000000000000000000815260048101839052602481018890526044810186905260640161052d565b3360009081526008602090815260408083208151808301909252805460ff808216845292939192918401916101009091041660028111156116d0576116d0612644565b60028111156116e1576116e1612644565b90525090506002816020015160028111156116fe576116fe612644565b1415806117465750600a816000015160ff1681548110611720576117206124c7565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff163314155b1561177f576040517f2d0f0c0f00000000000000000000000000000000000000000000000000000000815233600482015260240161052d565b50505060008888604051611794929190612aa1565b6040519081900381206117ab918c90602001612ab1565b6040516020818303038152906040528051906020012090506117cb611f26565b604080518082019091526000808252602082015260005b88811015611a20576000600185888460208110611801576118016124c7565b61180e91901a601b612a3f565b8d8d86818110611820576118206124c7565b905060200201358c8c87818110611839576118396124c7565b9050602002013560405160008152602001604052604051611876949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa158015611898573d6000803e3d6000fd5b5050604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081015173ffffffffffffffffffffffffffffffffffffffff811660009081526008602090815290849020838501909452835460ff8082168552929650929450840191610100900416600281111561191857611918612644565b600281111561192957611929612644565b905250925060018360200151600281111561194657611946612644565b14611995576040517fbf18af4300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260240161052d565b8251849060ff16601f81106119ac576119ac6124c7565b6020020151156119e8576040517f21cf3b4400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600184846000015160ff16601f8110611a0357611a036124c7565b911515602090920201525080611a1881612538565b9150506117e2565b50505050505050505050505050565b60004661a4b1811480611a44575062066eed81145b15611abf57606473ffffffffffffffffffffffffffffffffffffffff1663a3b1b31d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab99190612ac5565b91505090565b4391505090565b6000808a8a8a8a8a8a8a8a8a604051602001611aea99989796959493929190612ade565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101207dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e01000000000000000000000000000000000000000000000000000000000000179150509998505050505050505050565b6000808351602014611bbc5783516040517f1625adfe00000000000000000000000000000000000000000000000000000000815260206004820152602481019190915260440161052d565b60208401519150808203611bfc576040517faf5e77d000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408051808201909152606080825260208201526000838152600360209081526040808320878452909152902081518291908190611c3a90826128fb565b506020828101518051611c539260018501920190611eeb565b505050600083815260026020908152604080832080548251818502810185019093528083529192909190830182828015611cc357602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311611c98575b5050505050905060005b8151811015611d6257818181518110611ce857611ce86124c7565b602002602001015173ffffffffffffffffffffffffffffffffffffffff166355e487496040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611d3757600080fd5b505af1158015611d4b573d6000803e3d6000fd5b505050508080611d5a90612538565b915050611ccd565b5050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff821603611deb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161052d565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b828054828255906000526020600020908101928215611edb579160200282015b82811115611edb57825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602090920191600190910190611e81565b50611ee7929150611f45565b5090565b828054828255906000526020600020908101928215611edb579160200282015b82811115611edb578251825591602001919060010190611f0b565b604051806103e00160405280601f906020820280368337509192915050565b5b80821115611ee75760008155600101611f46565b60005b83811015611f75578181015183820152602001611f5d565b50506000910152565b60008151808452611f96816020860160208601611f5a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611fdb6020830184611f7e565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff811681146111fd57600080fd5b6000806040838503121561201757600080fd5b82359150602083013561202981611fe2565b809150509250929050565b60008083601f84011261204657600080fd5b50813567ffffffffffffffff81111561205e57600080fd5b6020830191508360208260051b850101111561207957600080fd5b9250929050565b60008060008060008060008060e0898b03121561209c57600080fd5b606089018a8111156120ad57600080fd5b8998503567ffffffffffffffff808211156120c757600080fd5b818b0191508b601f8301126120db57600080fd5b8135818111156120ea57600080fd5b8c60208285010111156120fc57600080fd5b6020830199508098505060808b013591508082111561211a57600080fd5b6121268c838d01612034565b909750955060a08b013591508082111561213f57600080fd5b5061214c8b828c01612034565b999c989b50969995989497949560c00135949350505050565b6000806040838503121561217857600080fd5b50508035926020909101359150565b6000602080835283516040828501526121a36060850182611f7e565b858301518582037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0016040870152805180835290840192506000918401905b8083101561220257835182529284019260019290920191908401906121e2565b509695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156122835761228361220d565b604052919050565b600067ffffffffffffffff8211156122a5576122a561220d565b5060051b60200190565b600082601f8301126122c057600080fd5b813560206122d56122d08361228b565b61223c565b82815260059290921b840181019181810190868411156122f457600080fd5b8286015b8481101561220257803561230b81611fe2565b83529183019183016122f8565b803560ff8116811461232957600080fd5b919050565b600067ffffffffffffffff8211156123485761234861220d565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082601f83011261238557600080fd5b81356123936122d08261232e565b8181528460208386010111156123a857600080fd5b816020850160208301376000918101602001919091529392505050565b803567ffffffffffffffff8116811461232957600080fd5b60008060008060008060c087890312156123f657600080fd5b863567ffffffffffffffff8082111561240e57600080fd5b61241a8a838b016122af565b9750602089013591508082111561243057600080fd5b61243c8a838b016122af565b965061244a60408a01612318565b9550606089013591508082111561246057600080fd5b61246c8a838b01612374565b945061247a60808a016123c5565b935060a089013591508082111561249057600080fd5b5061249d89828a01612374565b9150509295509295509295565b6000602082840312156124bc57600080fd5b8135611fdb81611fe2565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81810381811115610884576108846124f6565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612569576125696124f6565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b600181811c908216806125b357607f821691505b6020821081036125ec577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60ff818116838216029081169081811461260e5761260e6124f6565b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b63ffffffff81811683821601908082111561260e5761260e6124f6565b600081518084526020808501945080840160005b838110156126d657815173ffffffffffffffffffffffffffffffffffffffff16875295820195908201906001016126a4565b509495945050505050565b600061012063ffffffff808d1684528b6020850152808b166040850152508060608401526127118184018a612690565b905082810360808401526127258189612690565b905060ff871660a084015282810360c08401526127428187611f7e565b905067ffffffffffffffff851660e08401528281036101008401526127678185611f7e565b9c9b505050505050505050505050565b60008060006060848603121561278c57600080fd5b8351925060208085015167ffffffffffffffff808211156127ac57600080fd5b818701915087601f8301126127c057600080fd5b81516127ce6122d08261232e565b81815289858386010111156127e257600080fd5b6127f182868301878701611f5a565b60408901519096509250508082111561280957600080fd5b508501601f8101871361281b57600080fd5b80516128296122d08261228b565b81815260059190911b8201830190838101908983111561284857600080fd5b928401925b828410156128665783518252928401929084019061284d565b80955050505050509250925092565b73ffffffffffffffffffffffffffffffffffffffff831681526040602082015260006128a46040830184611f7e565b949350505050565b601f8211156128f657600081815260208120601f850160051c810160208610156128d35750805b601f850160051c820191505b818110156128f2578281556001016128df565b5050505b505050565b815167ffffffffffffffff8111156129155761291561220d565b61292981612923845461259f565b846128ac565b602080601f83116001811461297c57600084156129465750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b1785556128f2565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156129c9578886015182559484019460019091019084016129aa565b5085821015612a0557878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b8082028115828204841417610884576108846124f6565b80820180821115610884576108846124f6565b60ff8181168382160190811115610884576108846124f6565b600060ff831680612a92577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b8060ff84160491505092915050565b8183823760009101908152919050565b828152606082602083013760800192915050565b600060208284031215612ad757600080fd5b5051919050565b60006101208b835273ffffffffffffffffffffffffffffffffffffffff8b16602084015267ffffffffffffffff808b166040850152816060850152612b258285018b612690565b91508382036080850152612b39828a612690565b915060ff881660a085015283820360c0850152612b568288611f7e565b90861660e085015283810361010085015290506127678185611f7e56fea164736f6c6343000813000a", -} - -var DKGABI = DKGMetaData.ABI - -var DKGBin = DKGMetaData.Bin - -func DeployDKG(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *DKG, error) { - parsed, err := DKGMetaData.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(DKGBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &DKG{DKGCaller: DKGCaller{contract: contract}, DKGTransactor: DKGTransactor{contract: contract}, DKGFilterer: DKGFilterer{contract: contract}}, nil -} - -type DKG struct { - address common.Address - abi abi.ABI - DKGCaller - DKGTransactor - DKGFilterer -} - -type DKGCaller struct { - contract *bind.BoundContract -} - -type DKGTransactor struct { - contract *bind.BoundContract -} - -type DKGFilterer struct { - contract *bind.BoundContract -} - -type DKGSession struct { - Contract *DKG - CallOpts bind.CallOpts - TransactOpts bind.TransactOpts -} - -type DKGCallerSession struct { - Contract *DKGCaller - CallOpts bind.CallOpts -} - -type DKGTransactorSession struct { - Contract *DKGTransactor - TransactOpts bind.TransactOpts -} - -type DKGRaw struct { - Contract *DKG -} - -type DKGCallerRaw struct { - Contract *DKGCaller -} - -type DKGTransactorRaw struct { - Contract *DKGTransactor -} - -func NewDKG(address common.Address, backend bind.ContractBackend) (*DKG, error) { - abi, err := abi.JSON(strings.NewReader(DKGABI)) - if err != nil { - return nil, err - } - contract, err := bindDKG(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &DKG{address: address, abi: abi, DKGCaller: DKGCaller{contract: contract}, DKGTransactor: DKGTransactor{contract: contract}, DKGFilterer: DKGFilterer{contract: contract}}, nil -} - -func NewDKGCaller(address common.Address, caller bind.ContractCaller) (*DKGCaller, error) { - contract, err := bindDKG(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &DKGCaller{contract: contract}, nil -} - -func NewDKGTransactor(address common.Address, transactor bind.ContractTransactor) (*DKGTransactor, error) { - contract, err := bindDKG(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &DKGTransactor{contract: contract}, nil -} - -func NewDKGFilterer(address common.Address, filterer bind.ContractFilterer) (*DKGFilterer, error) { - contract, err := bindDKG(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &DKGFilterer{contract: contract}, nil -} - -func bindDKG(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := DKGMetaData.GetAbi() - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil -} - -func (_DKG *DKGRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _DKG.Contract.DKGCaller.contract.Call(opts, result, method, params...) -} - -func (_DKG *DKGRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _DKG.Contract.DKGTransactor.contract.Transfer(opts) -} - -func (_DKG *DKGRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _DKG.Contract.DKGTransactor.contract.Transact(opts, method, params...) -} - -func (_DKG *DKGCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _DKG.Contract.contract.Call(opts, result, method, params...) -} - -func (_DKG *DKGTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _DKG.Contract.contract.Transfer(opts) -} - -func (_DKG *DKGTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _DKG.Contract.contract.Transact(opts, method, params...) -} - -func (_DKG *DKGCaller) GetKey(opts *bind.CallOpts, _keyID [32]byte, _configDigest [32]byte) (KeyDataStructKeyData, error) { - var out []interface{} - err := _DKG.contract.Call(opts, &out, "getKey", _keyID, _configDigest) - - if err != nil { - return *new(KeyDataStructKeyData), err - } - - out0 := *abi.ConvertType(out[0], new(KeyDataStructKeyData)).(*KeyDataStructKeyData) - - return out0, err - -} - -func (_DKG *DKGSession) GetKey(_keyID [32]byte, _configDigest [32]byte) (KeyDataStructKeyData, error) { - return _DKG.Contract.GetKey(&_DKG.CallOpts, _keyID, _configDigest) -} - -func (_DKG *DKGCallerSession) GetKey(_keyID [32]byte, _configDigest [32]byte) (KeyDataStructKeyData, error) { - return _DKG.Contract.GetKey(&_DKG.CallOpts, _keyID, _configDigest) -} - -func (_DKG *DKGCaller) LatestConfigDetails(opts *bind.CallOpts) (LatestConfigDetails, - - error) { - var out []interface{} - err := _DKG.contract.Call(opts, &out, "latestConfigDetails") - - outstruct := new(LatestConfigDetails) - if err != nil { - return *outstruct, err - } - - outstruct.ConfigCount = *abi.ConvertType(out[0], new(uint32)).(*uint32) - outstruct.BlockNumber = *abi.ConvertType(out[1], new(uint32)).(*uint32) - outstruct.ConfigDigest = *abi.ConvertType(out[2], new([32]byte)).(*[32]byte) - - return *outstruct, err - -} - -func (_DKG *DKGSession) LatestConfigDetails() (LatestConfigDetails, - - error) { - return _DKG.Contract.LatestConfigDetails(&_DKG.CallOpts) -} - -func (_DKG *DKGCallerSession) LatestConfigDetails() (LatestConfigDetails, - - error) { - return _DKG.Contract.LatestConfigDetails(&_DKG.CallOpts) -} - -func (_DKG *DKGCaller) LatestConfigDigestAndEpoch(opts *bind.CallOpts) (LatestConfigDigestAndEpoch, - - error) { - var out []interface{} - err := _DKG.contract.Call(opts, &out, "latestConfigDigestAndEpoch") - - outstruct := new(LatestConfigDigestAndEpoch) - if err != nil { - return *outstruct, err - } - - outstruct.ScanLogs = *abi.ConvertType(out[0], new(bool)).(*bool) - outstruct.ConfigDigest = *abi.ConvertType(out[1], new([32]byte)).(*[32]byte) - outstruct.Epoch = *abi.ConvertType(out[2], new(uint32)).(*uint32) - - return *outstruct, err - -} - -func (_DKG *DKGSession) LatestConfigDigestAndEpoch() (LatestConfigDigestAndEpoch, - - error) { - return _DKG.Contract.LatestConfigDigestAndEpoch(&_DKG.CallOpts) -} - -func (_DKG *DKGCallerSession) LatestConfigDigestAndEpoch() (LatestConfigDigestAndEpoch, - - error) { - return _DKG.Contract.LatestConfigDigestAndEpoch(&_DKG.CallOpts) -} - -func (_DKG *DKGCaller) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _DKG.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 (_DKG *DKGSession) Owner() (common.Address, error) { - return _DKG.Contract.Owner(&_DKG.CallOpts) -} - -func (_DKG *DKGCallerSession) Owner() (common.Address, error) { - return _DKG.Contract.Owner(&_DKG.CallOpts) -} - -func (_DKG *DKGCaller) TypeAndVersion(opts *bind.CallOpts) (string, error) { - var out []interface{} - err := _DKG.contract.Call(opts, &out, "typeAndVersion") - - if err != nil { - return *new(string), err - } - - out0 := *abi.ConvertType(out[0], new(string)).(*string) - - return out0, err - -} - -func (_DKG *DKGSession) TypeAndVersion() (string, error) { - return _DKG.Contract.TypeAndVersion(&_DKG.CallOpts) -} - -func (_DKG *DKGCallerSession) TypeAndVersion() (string, error) { - return _DKG.Contract.TypeAndVersion(&_DKG.CallOpts) -} - -func (_DKG *DKGTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _DKG.contract.Transact(opts, "acceptOwnership") -} - -func (_DKG *DKGSession) AcceptOwnership() (*types.Transaction, error) { - return _DKG.Contract.AcceptOwnership(&_DKG.TransactOpts) -} - -func (_DKG *DKGTransactorSession) AcceptOwnership() (*types.Transaction, error) { - return _DKG.Contract.AcceptOwnership(&_DKG.TransactOpts) -} - -func (_DKG *DKGTransactor) AddClient(opts *bind.TransactOpts, keyID [32]byte, clientAddress common.Address) (*types.Transaction, error) { - return _DKG.contract.Transact(opts, "addClient", keyID, clientAddress) -} - -func (_DKG *DKGSession) AddClient(keyID [32]byte, clientAddress common.Address) (*types.Transaction, error) { - return _DKG.Contract.AddClient(&_DKG.TransactOpts, keyID, clientAddress) -} - -func (_DKG *DKGTransactorSession) AddClient(keyID [32]byte, clientAddress common.Address) (*types.Transaction, error) { - return _DKG.Contract.AddClient(&_DKG.TransactOpts, keyID, clientAddress) -} - -func (_DKG *DKGTransactor) RemoveClient(opts *bind.TransactOpts, keyID [32]byte, clientAddress common.Address) (*types.Transaction, error) { - return _DKG.contract.Transact(opts, "removeClient", keyID, clientAddress) -} - -func (_DKG *DKGSession) RemoveClient(keyID [32]byte, clientAddress common.Address) (*types.Transaction, error) { - return _DKG.Contract.RemoveClient(&_DKG.TransactOpts, keyID, clientAddress) -} - -func (_DKG *DKGTransactorSession) RemoveClient(keyID [32]byte, clientAddress common.Address) (*types.Transaction, error) { - return _DKG.Contract.RemoveClient(&_DKG.TransactOpts, keyID, clientAddress) -} - -func (_DKG *DKGTransactor) SetConfig(opts *bind.TransactOpts, _signers []common.Address, _transmitters []common.Address, _f uint8, _onchainConfig []byte, _offchainConfigVersion uint64, _offchainConfig []byte) (*types.Transaction, error) { - return _DKG.contract.Transact(opts, "setConfig", _signers, _transmitters, _f, _onchainConfig, _offchainConfigVersion, _offchainConfig) -} - -func (_DKG *DKGSession) SetConfig(_signers []common.Address, _transmitters []common.Address, _f uint8, _onchainConfig []byte, _offchainConfigVersion uint64, _offchainConfig []byte) (*types.Transaction, error) { - return _DKG.Contract.SetConfig(&_DKG.TransactOpts, _signers, _transmitters, _f, _onchainConfig, _offchainConfigVersion, _offchainConfig) -} - -func (_DKG *DKGTransactorSession) SetConfig(_signers []common.Address, _transmitters []common.Address, _f uint8, _onchainConfig []byte, _offchainConfigVersion uint64, _offchainConfig []byte) (*types.Transaction, error) { - return _DKG.Contract.SetConfig(&_DKG.TransactOpts, _signers, _transmitters, _f, _onchainConfig, _offchainConfigVersion, _offchainConfig) -} - -func (_DKG *DKGTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { - return _DKG.contract.Transact(opts, "transferOwnership", to) -} - -func (_DKG *DKGSession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _DKG.Contract.TransferOwnership(&_DKG.TransactOpts, to) -} - -func (_DKG *DKGTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _DKG.Contract.TransferOwnership(&_DKG.TransactOpts, to) -} - -func (_DKG *DKGTransactor) Transmit(opts *bind.TransactOpts, reportContext [3][32]byte, report []byte, rs [][32]byte, ss [][32]byte, rawVs [32]byte) (*types.Transaction, error) { - return _DKG.contract.Transact(opts, "transmit", reportContext, report, rs, ss, rawVs) -} - -func (_DKG *DKGSession) Transmit(reportContext [3][32]byte, report []byte, rs [][32]byte, ss [][32]byte, rawVs [32]byte) (*types.Transaction, error) { - return _DKG.Contract.Transmit(&_DKG.TransactOpts, reportContext, report, rs, ss, rawVs) -} - -func (_DKG *DKGTransactorSession) Transmit(reportContext [3][32]byte, report []byte, rs [][32]byte, ss [][32]byte, rawVs [32]byte) (*types.Transaction, error) { - return _DKG.Contract.Transmit(&_DKG.TransactOpts, reportContext, report, rs, ss, rawVs) -} - -type DKGConfigSetIterator struct { - Event *DKGConfigSet - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *DKGConfigSetIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(DKGConfigSet) - 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(DKGConfigSet) - 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 *DKGConfigSetIterator) Error() error { - return it.fail -} - -func (it *DKGConfigSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type DKGConfigSet 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 (_DKG *DKGFilterer) FilterConfigSet(opts *bind.FilterOpts) (*DKGConfigSetIterator, error) { - - logs, sub, err := _DKG.contract.FilterLogs(opts, "ConfigSet") - if err != nil { - return nil, err - } - return &DKGConfigSetIterator{contract: _DKG.contract, event: "ConfigSet", logs: logs, sub: sub}, nil -} - -func (_DKG *DKGFilterer) WatchConfigSet(opts *bind.WatchOpts, sink chan<- *DKGConfigSet) (event.Subscription, error) { - - logs, sub, err := _DKG.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(DKGConfigSet) - if err := _DKG.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 (_DKG *DKGFilterer) ParseConfigSet(log types.Log) (*DKGConfigSet, error) { - event := new(DKGConfigSet) - if err := _DKG.contract.UnpackLog(event, "ConfigSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type DKGDKGClientErrorIterator struct { - Event *DKGDKGClientError - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *DKGDKGClientErrorIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(DKGDKGClientError) - 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(DKGDKGClientError) - 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 *DKGDKGClientErrorIterator) Error() error { - return it.fail -} - -func (it *DKGDKGClientErrorIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type DKGDKGClientError struct { - Client common.Address - ErrorData []byte - Raw types.Log -} - -func (_DKG *DKGFilterer) FilterDKGClientError(opts *bind.FilterOpts) (*DKGDKGClientErrorIterator, error) { - - logs, sub, err := _DKG.contract.FilterLogs(opts, "DKGClientError") - if err != nil { - return nil, err - } - return &DKGDKGClientErrorIterator{contract: _DKG.contract, event: "DKGClientError", logs: logs, sub: sub}, nil -} - -func (_DKG *DKGFilterer) WatchDKGClientError(opts *bind.WatchOpts, sink chan<- *DKGDKGClientError) (event.Subscription, error) { - - logs, sub, err := _DKG.contract.WatchLogs(opts, "DKGClientError") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(DKGDKGClientError) - if err := _DKG.contract.UnpackLog(event, "DKGClientError", 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 (_DKG *DKGFilterer) ParseDKGClientError(log types.Log) (*DKGDKGClientError, error) { - event := new(DKGDKGClientError) - if err := _DKG.contract.UnpackLog(event, "DKGClientError", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type DKGKeyGeneratedIterator struct { - Event *DKGKeyGenerated - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *DKGKeyGeneratedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(DKGKeyGenerated) - 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(DKGKeyGenerated) - 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 *DKGKeyGeneratedIterator) Error() error { - return it.fail -} - -func (it *DKGKeyGeneratedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type DKGKeyGenerated struct { - ConfigDigest [32]byte - KeyID [32]byte - Key KeyDataStructKeyData - Raw types.Log -} - -func (_DKG *DKGFilterer) FilterKeyGenerated(opts *bind.FilterOpts, configDigest [][32]byte, keyID [][32]byte) (*DKGKeyGeneratedIterator, error) { - - var configDigestRule []interface{} - for _, configDigestItem := range configDigest { - configDigestRule = append(configDigestRule, configDigestItem) - } - var keyIDRule []interface{} - for _, keyIDItem := range keyID { - keyIDRule = append(keyIDRule, keyIDItem) - } - - logs, sub, err := _DKG.contract.FilterLogs(opts, "KeyGenerated", configDigestRule, keyIDRule) - if err != nil { - return nil, err - } - return &DKGKeyGeneratedIterator{contract: _DKG.contract, event: "KeyGenerated", logs: logs, sub: sub}, nil -} - -func (_DKG *DKGFilterer) WatchKeyGenerated(opts *bind.WatchOpts, sink chan<- *DKGKeyGenerated, configDigest [][32]byte, keyID [][32]byte) (event.Subscription, error) { - - var configDigestRule []interface{} - for _, configDigestItem := range configDigest { - configDigestRule = append(configDigestRule, configDigestItem) - } - var keyIDRule []interface{} - for _, keyIDItem := range keyID { - keyIDRule = append(keyIDRule, keyIDItem) - } - - logs, sub, err := _DKG.contract.WatchLogs(opts, "KeyGenerated", configDigestRule, keyIDRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(DKGKeyGenerated) - if err := _DKG.contract.UnpackLog(event, "KeyGenerated", 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 (_DKG *DKGFilterer) ParseKeyGenerated(log types.Log) (*DKGKeyGenerated, error) { - event := new(DKGKeyGenerated) - if err := _DKG.contract.UnpackLog(event, "KeyGenerated", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type DKGOwnershipTransferRequestedIterator struct { - Event *DKGOwnershipTransferRequested - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *DKGOwnershipTransferRequestedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(DKGOwnershipTransferRequested) - 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(DKGOwnershipTransferRequested) - 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 *DKGOwnershipTransferRequestedIterator) Error() error { - return it.fail -} - -func (it *DKGOwnershipTransferRequestedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type DKGOwnershipTransferRequested struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_DKG *DKGFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*DKGOwnershipTransferRequestedIterator, 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 := _DKG.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) - if err != nil { - return nil, err - } - return &DKGOwnershipTransferRequestedIterator{contract: _DKG.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil -} - -func (_DKG *DKGFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *DKGOwnershipTransferRequested, 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 := _DKG.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(DKGOwnershipTransferRequested) - if err := _DKG.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 (_DKG *DKGFilterer) ParseOwnershipTransferRequested(log types.Log) (*DKGOwnershipTransferRequested, error) { - event := new(DKGOwnershipTransferRequested) - if err := _DKG.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type DKGOwnershipTransferredIterator struct { - Event *DKGOwnershipTransferred - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *DKGOwnershipTransferredIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(DKGOwnershipTransferred) - 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(DKGOwnershipTransferred) - 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 *DKGOwnershipTransferredIterator) Error() error { - return it.fail -} - -func (it *DKGOwnershipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type DKGOwnershipTransferred struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_DKG *DKGFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*DKGOwnershipTransferredIterator, 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 := _DKG.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) - if err != nil { - return nil, err - } - return &DKGOwnershipTransferredIterator{contract: _DKG.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil -} - -func (_DKG *DKGFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *DKGOwnershipTransferred, 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 := _DKG.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(DKGOwnershipTransferred) - if err := _DKG.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 (_DKG *DKGFilterer) ParseOwnershipTransferred(log types.Log) (*DKGOwnershipTransferred, error) { - event := new(DKGOwnershipTransferred) - if err := _DKG.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type DKGTransmittedIterator struct { - Event *DKGTransmitted - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *DKGTransmittedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(DKGTransmitted) - 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(DKGTransmitted) - 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 *DKGTransmittedIterator) Error() error { - return it.fail -} - -func (it *DKGTransmittedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type DKGTransmitted struct { - ConfigDigest [32]byte - Epoch uint32 - Raw types.Log -} - -func (_DKG *DKGFilterer) FilterTransmitted(opts *bind.FilterOpts) (*DKGTransmittedIterator, error) { - - logs, sub, err := _DKG.contract.FilterLogs(opts, "Transmitted") - if err != nil { - return nil, err - } - return &DKGTransmittedIterator{contract: _DKG.contract, event: "Transmitted", logs: logs, sub: sub}, nil -} - -func (_DKG *DKGFilterer) WatchTransmitted(opts *bind.WatchOpts, sink chan<- *DKGTransmitted) (event.Subscription, error) { - - logs, sub, err := _DKG.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(DKGTransmitted) - if err := _DKG.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 (_DKG *DKGFilterer) ParseTransmitted(log types.Log) (*DKGTransmitted, error) { - event := new(DKGTransmitted) - if err := _DKG.contract.UnpackLog(event, "Transmitted", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type LatestConfigDetails struct { - ConfigCount uint32 - BlockNumber uint32 - ConfigDigest [32]byte -} -type LatestConfigDigestAndEpoch struct { - ScanLogs bool - ConfigDigest [32]byte - Epoch uint32 -} - -func (_DKG *DKG) ParseLog(log types.Log) (generated.AbigenLog, error) { - switch log.Topics[0] { - case _DKG.abi.Events["ConfigSet"].ID: - return _DKG.ParseConfigSet(log) - case _DKG.abi.Events["DKGClientError"].ID: - return _DKG.ParseDKGClientError(log) - case _DKG.abi.Events["KeyGenerated"].ID: - return _DKG.ParseKeyGenerated(log) - case _DKG.abi.Events["OwnershipTransferRequested"].ID: - return _DKG.ParseOwnershipTransferRequested(log) - case _DKG.abi.Events["OwnershipTransferred"].ID: - return _DKG.ParseOwnershipTransferred(log) - case _DKG.abi.Events["Transmitted"].ID: - return _DKG.ParseTransmitted(log) - - default: - return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) - } -} - -func (DKGConfigSet) Topic() common.Hash { - return common.HexToHash("0x1591690b8638f5fb2dbec82ac741805ac5da8b45dc5263f4875b0496fdce4e05") -} - -func (DKGDKGClientError) Topic() common.Hash { - return common.HexToHash("0x116391732f5df106193bda7cedf1728f3b07b62f6cdcdd611c9eeec44efcae54") -} - -func (DKGKeyGenerated) Topic() common.Hash { - return common.HexToHash("0xc8db841f5b2231ccf7190311f440aa197b161e369f3b40b023508160cc555656") -} - -func (DKGOwnershipTransferRequested) Topic() common.Hash { - return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") -} - -func (DKGOwnershipTransferred) Topic() common.Hash { - return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") -} - -func (DKGTransmitted) Topic() common.Hash { - return common.HexToHash("0xb04e63db38c49950639fa09d29872f21f5d49d614f3a969d8adf3d4b52e41a62") -} - -func (_DKG *DKG) Address() common.Address { - return _DKG.address -} - -type DKGInterface interface { - GetKey(opts *bind.CallOpts, _keyID [32]byte, _configDigest [32]byte) (KeyDataStructKeyData, error) - - LatestConfigDetails(opts *bind.CallOpts) (LatestConfigDetails, - - error) - - LatestConfigDigestAndEpoch(opts *bind.CallOpts) (LatestConfigDigestAndEpoch, - - error) - - Owner(opts *bind.CallOpts) (common.Address, error) - - TypeAndVersion(opts *bind.CallOpts) (string, error) - - AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) - - AddClient(opts *bind.TransactOpts, keyID [32]byte, clientAddress common.Address) (*types.Transaction, error) - - RemoveClient(opts *bind.TransactOpts, keyID [32]byte, clientAddress common.Address) (*types.Transaction, error) - - SetConfig(opts *bind.TransactOpts, _signers []common.Address, _transmitters []common.Address, _f uint8, _onchainConfig []byte, _offchainConfigVersion uint64, _offchainConfig []byte) (*types.Transaction, error) - - TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) - - Transmit(opts *bind.TransactOpts, reportContext [3][32]byte, report []byte, rs [][32]byte, ss [][32]byte, rawVs [32]byte) (*types.Transaction, error) - - FilterConfigSet(opts *bind.FilterOpts) (*DKGConfigSetIterator, error) - - WatchConfigSet(opts *bind.WatchOpts, sink chan<- *DKGConfigSet) (event.Subscription, error) - - ParseConfigSet(log types.Log) (*DKGConfigSet, error) - - FilterDKGClientError(opts *bind.FilterOpts) (*DKGDKGClientErrorIterator, error) - - WatchDKGClientError(opts *bind.WatchOpts, sink chan<- *DKGDKGClientError) (event.Subscription, error) - - ParseDKGClientError(log types.Log) (*DKGDKGClientError, error) - - FilterKeyGenerated(opts *bind.FilterOpts, configDigest [][32]byte, keyID [][32]byte) (*DKGKeyGeneratedIterator, error) - - WatchKeyGenerated(opts *bind.WatchOpts, sink chan<- *DKGKeyGenerated, configDigest [][32]byte, keyID [][32]byte) (event.Subscription, error) - - ParseKeyGenerated(log types.Log) (*DKGKeyGenerated, error) - - FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*DKGOwnershipTransferRequestedIterator, error) - - WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *DKGOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseOwnershipTransferRequested(log types.Log) (*DKGOwnershipTransferRequested, error) - - FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*DKGOwnershipTransferredIterator, error) - - WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *DKGOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseOwnershipTransferred(log types.Log) (*DKGOwnershipTransferred, error) - - FilterTransmitted(opts *bind.FilterOpts) (*DKGTransmittedIterator, error) - - WatchTransmitted(opts *bind.WatchOpts, sink chan<- *DKGTransmitted) (event.Subscription, error) - - ParseTransmitted(log types.Log) (*DKGTransmitted, error) - - ParseLog(log types.Log) (generated.AbigenLog, error) - - Address() common.Address -} diff --git a/core/gethwrappers/ocr2vrf/generated/load_test_beacon_consumer/load_test_beacon_consumer.go b/core/gethwrappers/ocr2vrf/generated/load_test_beacon_consumer/load_test_beacon_consumer.go deleted file mode 100644 index 32bf1e66219..00000000000 --- a/core/gethwrappers/ocr2vrf/generated/load_test_beacon_consumer/load_test_beacon_consumer.go +++ /dev/null @@ -1,1422 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package load_test_beacon_consumer - -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 -) - -var LoadTestBeaconVRFConsumerMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"shouldFail\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"beaconPeriodBlocks\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"MustBeCoordinator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MustBeOwnerOrCoordinator\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"}],\"name\":\"CoordinatorUpdated\",\"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\":\"fail\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"reqID\",\"type\":\"uint256\"}],\"name\":\"getFulfillmentDurationByRequestID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"reqID\",\"type\":\"uint256\"}],\"name\":\"getRawFulfillmentDurationByRequestID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"i_beaconPeriodBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingRequests\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"arguments\",\"type\":\"bytes\"}],\"name\":\"rawFulfillRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"requestHeights\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_ReceivedRandomnessByRequestID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_arguments\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"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\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_fulfillmentDurationInBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_gasAvailable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_mostRecentRequestID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_myBeaconRequests\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"slotNumber\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"confirmationDelay\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"numWords\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"requester\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_randomWords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_rawFulfillmentDurationInBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_requestIDs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_requestOutputHeights\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint24\",\"name\":\"\",\"type\":\"uint24\"}],\"name\":\"s_requestsIDs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_resetCounter\",\"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\":[],\"name\":\"s_slowestRequestID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_subId\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_totalFulfilled\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_totalRequests\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"shouldFail\",\"type\":\"bool\"}],\"name\":\"setFail\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"reqId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"height\",\"type\":\"uint256\"},{\"internalType\":\"uint24\",\"name\":\"delay\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"numWords\",\"type\":\"uint16\"}],\"name\":\"storeBeaconRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requestID\",\"type\":\"uint256\"}],\"name\":\"testRedeemRandomness\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"numWords\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"subID\",\"type\":\"uint256\"},{\"internalType\":\"uint24\",\"name\":\"confirmationDelayArg\",\"type\":\"uint24\"}],\"name\":\"testRequestRandomness\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subID\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"numWords\",\"type\":\"uint16\"},{\"internalType\":\"uint24\",\"name\":\"confDelay\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"arguments\",\"type\":\"bytes\"}],\"name\":\"testRequestRandomnessFulfillment\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subID\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"numWords\",\"type\":\"uint16\"},{\"internalType\":\"uint24\",\"name\":\"confirmationDelayArg\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"arguments\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"batchSize\",\"type\":\"uint256\"}],\"name\":\"testRequestRandomnessFulfillmentBatch\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60806040526000600d556000600e556103e7600f556000601055600060115560006012553480156200003057600080fd5b5060405162001f6138038062001f618339810160408190526200005391620001d0565b828282823380600081620000ae5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000e157620000e18162000125565b5050600280546001600160a01b0319166001600160a01b03939093169290921790915550600b805460ff191692151592909217909155600c55506200022792505050565b336001600160a01b038216036200017f5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401620000a5565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600080600060608486031215620001e657600080fd5b83516001600160a01b0381168114620001fe57600080fd5b602085015190935080151581146200021557600080fd5b80925050604084015190509250925092565b611d2a80620002376000396000f3fe608060405234801561001057600080fd5b50600436106102775760003560e01c806379ba509711610160578063d0705f04116100d8578063f2fde38b1161008c578063f6eaffc811610071578063f6eaffc8146105bc578063fc7fea37146105cf578063ffe97ca4146105d857600080fd5b8063f2fde38b1461057e578063f371829b1461059157600080fd5b8063d826f88f116100bd578063d826f88f1461055a578063ea7502ab14610562578063f08c5daa1461057557600080fd5b8063d0705f0414610534578063d21ea8fd1461054757600080fd5b80638ea981171161012f578063a9cc471811610114578063a9cc4718146104fb578063c6d6130114610518578063cd0593df1461052b57600080fd5b80638ea98117146104a95780639d769402146104bc57600080fd5b806379ba5097146104675780638866c6bd1461046f5780638d0e3165146104785780638da5cb5b1461048157600080fd5b80635a947873116101f35780636df57cc3116101c2578063737144bc116101a7578063737144bc1461044057806374dba124146104495780637716cdaa1461045257600080fd5b80636df57cc314610400578063706da1ca1461041357600080fd5b80635a947873146103b05780635f15cccc146103c3578063601201d3146103ee578063689b77ab146103f757600080fd5b80632b1a21301161024a578063341867a21161022f578063341867a21461035b578063353e0f60146103705780634a0aee291461039b57600080fd5b80632b1a21301461031d5780632fe8fa311461033057600080fd5b80631591950a1461027c5780631757f11c146102ba578063195e0d75146102c35780631e87f20e146102f0575b600080fd5b6102a761028a366004611503565b601560209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b6102a7600e5481565b6102a76102d1366004611525565b6012546000908152601860209081526040808320938352929052205490565b6102a76102fe366004611525565b6012546000908152601760209081526040808320938352929052205490565b6102a761032b366004611503565b61068b565b6102a761033e366004611503565b601760209081526000928352604080842090915290825290205481565b61036e610369366004611503565b6106bc565b005b6102a761037e366004611503565b601660209081526000928352604080842090915290825290205481565b6103a36107b1565b6040516102b1919061153e565b6103a36103be3660046116cc565b6108c1565b6102a76103d136600461174d565b600460209081526000928352604080842090915290825290205481565b6102a760115481565b6102a760085481565b61036e61040e366004611779565b610a1f565b6009546104279067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016102b1565b6102a7600d5481565b6102a7600f5481565b61045a610b5a565b6040516102b19190611823565b61036e610be8565b6102a760105481565b6102a760135481565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102b1565b61036e6104b736600461183d565b610cea565b61036e6104ca366004611873565b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b600b546105089060ff1681565b60405190151581526020016102b1565b6102a7610526366004611895565b610dd0565b6102a7600c5481565b6102a7610542366004611503565b610eda565b61036e6105553660046118f5565b610ef6565b61036e610f57565b6102a76105703660046119be565b610f8d565b6102a7600a5481565b61036e61058c36600461183d565b61109d565b6102a761059f366004611503565b601860209081526000928352604080842090915290825290205481565b6102a76105ca366004611525565b6110b1565b6102a760125481565b6106416105e6366004611525565b60056020526000908152604090205463ffffffff811690640100000000810462ffffff1690670100000000000000810461ffff16906901000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1684565b6040805163ffffffff909516855262ffffff909316602085015261ffff9091169183019190915273ffffffffffffffffffffffffffffffffffffffff1660608201526080016102b1565b601460205281600052604060002081815481106106a757600080fd5b90600052602060002001600091509150505481565b60025460408051602081018252600080825291517facfc6cdd000000000000000000000000000000000000000000000000000000008152919273ffffffffffffffffffffffffffffffffffffffff169163acfc6cdd916107229187918791600401611a37565b6000604051808303816000875af1158015610741573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526107879190810190611a5f565b600083815260066020908152604090912082519293506107ab9290918401906114a3565b50505050565b6012546000908152601460205260408120546060919067ffffffffffffffff8111156107df576107df6115c0565b604051908082528060200260200182016040528015610808578160200160208202803683370190505b5090506000805b6012546000908152601460205260409020548110156108b957601254600090815260146020526040812080548390811061084b5761084b611af0565b600091825260208083209091015460125483526017825260408084208285529092529082205490925090036108a6578084848151811061088d5761088d611af0565b6020908102919091010152826108a281611b4e565b9350505b50806108b181611b4e565b91505061080f565b508152919050565b606060008267ffffffffffffffff8111156108de576108de6115c0565b604051908082528060200260200182016040528015610907578160200160208202803683370190505b5090506000600c546109176110d2565b6109219190611bb5565b9050600081600c546109316110d2565b61093b9190611bc9565b6109459190611be2565b905060005b85811015610a105760006109618c8c8c8c8c610f8d565b60108054919250600061097383611b4e565b90915550506012546000908152601560209081526040808320848452909152902083905561099f6110d2565b60128054600090815260166020908152604080832086845282528083209490945591548152601482529182208054600181018255908352912001819055845181908690849081106109f2576109f2611af0565b60209081029190910101525080610a0881611b4e565b91505061094a565b50919998505050505050505050565b600083815260046020908152604080832062ffffff861684529091528120859055600c54610a4d9085611bf5565b6040805160808101825263ffffffff928316815262ffffff958616602080830191825261ffff968716838501908152306060850190815260009b8c526005909252939099209151825491519351995173ffffffffffffffffffffffffffffffffffffffff166901000000000000000000027fffffff0000000000000000000000000000000000000000ffffffffffffffffff9a90971667010000000000000002999099167fffffff00000000000000000000000000000000000000000000ffffffffffffff93909716640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffff000000000000009091169890931697909717919091171692909217179092555050565b60078054610b6790611c09565b80601f0160208091040260200160405190810160405280929190818152602001828054610b9390611c09565b8015610be05780601f10610bb557610100808354040283529160200191610be0565b820191906000526020600020905b815481529060010190602001808311610bc357829003601f168201915b505050505081565b60015473ffffffffffffffffffffffffffffffffffffffff163314610c6e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60005473ffffffffffffffffffffffffffffffffffffffff163314801590610d2a575060025473ffffffffffffffffffffffffffffffffffffffff163314155b15610d61576040517fd4e06fd700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517fc258faa9a17ddfdf4130b4acff63a289202e7d5f9e42f366add65368575486bc90600090a250565b600080600c54610dde6110d2565b610de89190611bb5565b9050600081600c54610df86110d2565b610e029190611bc9565b610e0c9190611be2565b60025460408051602081018252600080825291517f4ffac83a000000000000000000000000000000000000000000000000000000008152939450909273ffffffffffffffffffffffffffffffffffffffff90921691634ffac83a91610e7a918a918c918b9190600401611c5c565b6020604051808303816000875af1158015610e99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ebd9190611c94565b9050610ecb8183878a610a1f565b60088190559695505050505050565b600660205281600052604060002081815481106106a757600080fd5b60025473ffffffffffffffffffffffffffffffffffffffff163314610f47576040517f66bf9c7200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f52838383611169565b505050565b6000600d819055600e8190556103e7600f556010819055601181905560138190556012805491610f8683611b4e565b9190505550565b600080600c54610f9b6110d2565b610fa59190611bb5565b9050600081600c54610fb56110d2565b610fbf9190611bc9565b610fc99190611be2565b60025460408051602081018252600080825291517fdb972c8b000000000000000000000000000000000000000000000000000000008152939450909273ffffffffffffffffffffffffffffffffffffffff9092169163db972c8b9161103b918d918d918d918d918d9190600401611cad565b6020604051808303816000875af115801561105a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061107e9190611c94565b905061108c8183898b610a1f565b600881905598975050505050505050565b6110a561132b565b6110ae816113ae565b50565b600381815481106110c157600080fd5b600091825260209091200154905081565b60004661a4b18114806110e7575062066eed81145b1561116257606473ffffffffffffffffffffffffffffffffffffffff1663a3b1b31d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611138573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061115c9190611c94565b91505090565b4391505090565b600b5460ff16156111d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f206661696c656420696e2066756c66696c6c52616e646f6d576f7264730000006044820152606401610c65565b600083815260066020908152604090912083516111f5928501906114a3565b50601254600090815260156020908152604080832086845290915281205461121b6110d2565b6112259190611be2565b60125460009081526016602090815260408083208884529091528120549192509061124e6110d2565b6112589190611be2565b9050600061126983620f4240611d06565b9050600e5483111561128057600e83905560138690555b600f54831061129157600f54611293565b825b600f556011546112a357806112d6565b6011546112b1906001611bc9565b81601154600d546112c29190611d06565b6112cc9190611bc9565b6112d69190611bf5565b600d55601180549060006112e983611b4e565b90915550506012805460009081526017602090815260408083208a84528252808320969096559154815260188252848120978152969052509320929092555050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146113ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610c65565b565b3373ffffffffffffffffffffffffffffffffffffffff82160361142d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610c65565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b8280548282559060005260206000209081019282156114de579160200282015b828111156114de5782518255916020019190600101906114c3565b506114ea9291506114ee565b5090565b5b808211156114ea57600081556001016114ef565b6000806040838503121561151657600080fd5b50508035926020909101359150565b60006020828403121561153757600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b818110156115765783518352928401929184019160010161155a565b50909695505050505050565b803561ffff8116811461159457600080fd5b919050565b803562ffffff8116811461159457600080fd5b803563ffffffff8116811461159457600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715611636576116366115c0565b604052919050565b600082601f83011261164f57600080fd5b813567ffffffffffffffff811115611669576116696115c0565b61169a60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016115ef565b8181528460208386010111156116af57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060008060c087890312156116e557600080fd5b863595506116f560208801611582565b945061170360408801611599565b9350611711606088016115ac565b9250608087013567ffffffffffffffff81111561172d57600080fd5b61173989828a0161163e565b92505060a087013590509295509295509295565b6000806040838503121561176057600080fd5b8235915061177060208401611599565b90509250929050565b6000806000806080858703121561178f57600080fd5b84359350602085013592506117a660408601611599565b91506117b460608601611582565b905092959194509250565b6000815180845260005b818110156117e5576020818501810151868301820152016117c9565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b60208152600061183660208301846117bf565b9392505050565b60006020828403121561184f57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461183657600080fd5b60006020828403121561188557600080fd5b8135801515811461183657600080fd5b6000806000606084860312156118aa57600080fd5b6118b384611582565b9250602084013591506118c860408501611599565b90509250925092565b600067ffffffffffffffff8211156118eb576118eb6115c0565b5060051b60200190565b60008060006060848603121561190a57600080fd5b8335925060208085013567ffffffffffffffff8082111561192a57600080fd5b818701915087601f83011261193e57600080fd5b813561195161194c826118d1565b6115ef565b81815260059190911b8301840190848101908a83111561197057600080fd5b938501935b8285101561198e57843582529385019390850190611975565b9650505060408701359250808311156119a657600080fd5b50506119b48682870161163e565b9150509250925092565b600080600080600060a086880312156119d657600080fd5b853594506119e660208701611582565b93506119f460408701611599565b9250611a02606087016115ac565b9150608086013567ffffffffffffffff811115611a1e57600080fd5b611a2a8882890161163e565b9150509295509295909350565b838152826020820152606060408201526000611a5660608301846117bf565b95945050505050565b60006020808385031215611a7257600080fd5b825167ffffffffffffffff811115611a8957600080fd5b8301601f81018513611a9a57600080fd5b8051611aa861194c826118d1565b81815260059190911b82018301908381019087831115611ac757600080fd5b928401925b82841015611ae557835182529284019290840190611acc565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611b7f57611b7f611b1f565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082611bc457611bc4611b86565b500690565b80820180821115611bdc57611bdc611b1f565b92915050565b81810381811115611bdc57611bdc611b1f565b600082611c0457611c04611b86565b500490565b600181811c90821680611c1d57607f821691505b602082108103611c56577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b84815261ffff8416602082015262ffffff83166040820152608060608201526000611c8a60808301846117bf565b9695505050505050565b600060208284031215611ca657600080fd5b5051919050565b86815261ffff8616602082015262ffffff8516604082015263ffffffff8416606082015260c060808201526000611ce760c08301856117bf565b82810360a0840152611cf981856117bf565b9998505050505050505050565b8082028115828204841417611bdc57611bdc611b1f56fea164736f6c6343000813000a", -} - -var LoadTestBeaconVRFConsumerABI = LoadTestBeaconVRFConsumerMetaData.ABI - -var LoadTestBeaconVRFConsumerBin = LoadTestBeaconVRFConsumerMetaData.Bin - -func DeployLoadTestBeaconVRFConsumer(auth *bind.TransactOpts, backend bind.ContractBackend, coordinator common.Address, shouldFail bool, beaconPeriodBlocks *big.Int) (common.Address, *types.Transaction, *LoadTestBeaconVRFConsumer, error) { - parsed, err := LoadTestBeaconVRFConsumerMetaData.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(LoadTestBeaconVRFConsumerBin), backend, coordinator, shouldFail, beaconPeriodBlocks) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &LoadTestBeaconVRFConsumer{LoadTestBeaconVRFConsumerCaller: LoadTestBeaconVRFConsumerCaller{contract: contract}, LoadTestBeaconVRFConsumerTransactor: LoadTestBeaconVRFConsumerTransactor{contract: contract}, LoadTestBeaconVRFConsumerFilterer: LoadTestBeaconVRFConsumerFilterer{contract: contract}}, nil -} - -type LoadTestBeaconVRFConsumer struct { - address common.Address - abi abi.ABI - LoadTestBeaconVRFConsumerCaller - LoadTestBeaconVRFConsumerTransactor - LoadTestBeaconVRFConsumerFilterer -} - -type LoadTestBeaconVRFConsumerCaller struct { - contract *bind.BoundContract -} - -type LoadTestBeaconVRFConsumerTransactor struct { - contract *bind.BoundContract -} - -type LoadTestBeaconVRFConsumerFilterer struct { - contract *bind.BoundContract -} - -type LoadTestBeaconVRFConsumerSession struct { - Contract *LoadTestBeaconVRFConsumer - CallOpts bind.CallOpts - TransactOpts bind.TransactOpts -} - -type LoadTestBeaconVRFConsumerCallerSession struct { - Contract *LoadTestBeaconVRFConsumerCaller - CallOpts bind.CallOpts -} - -type LoadTestBeaconVRFConsumerTransactorSession struct { - Contract *LoadTestBeaconVRFConsumerTransactor - TransactOpts bind.TransactOpts -} - -type LoadTestBeaconVRFConsumerRaw struct { - Contract *LoadTestBeaconVRFConsumer -} - -type LoadTestBeaconVRFConsumerCallerRaw struct { - Contract *LoadTestBeaconVRFConsumerCaller -} - -type LoadTestBeaconVRFConsumerTransactorRaw struct { - Contract *LoadTestBeaconVRFConsumerTransactor -} - -func NewLoadTestBeaconVRFConsumer(address common.Address, backend bind.ContractBackend) (*LoadTestBeaconVRFConsumer, error) { - abi, err := abi.JSON(strings.NewReader(LoadTestBeaconVRFConsumerABI)) - if err != nil { - return nil, err - } - contract, err := bindLoadTestBeaconVRFConsumer(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &LoadTestBeaconVRFConsumer{address: address, abi: abi, LoadTestBeaconVRFConsumerCaller: LoadTestBeaconVRFConsumerCaller{contract: contract}, LoadTestBeaconVRFConsumerTransactor: LoadTestBeaconVRFConsumerTransactor{contract: contract}, LoadTestBeaconVRFConsumerFilterer: LoadTestBeaconVRFConsumerFilterer{contract: contract}}, nil -} - -func NewLoadTestBeaconVRFConsumerCaller(address common.Address, caller bind.ContractCaller) (*LoadTestBeaconVRFConsumerCaller, error) { - contract, err := bindLoadTestBeaconVRFConsumer(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &LoadTestBeaconVRFConsumerCaller{contract: contract}, nil -} - -func NewLoadTestBeaconVRFConsumerTransactor(address common.Address, transactor bind.ContractTransactor) (*LoadTestBeaconVRFConsumerTransactor, error) { - contract, err := bindLoadTestBeaconVRFConsumer(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &LoadTestBeaconVRFConsumerTransactor{contract: contract}, nil -} - -func NewLoadTestBeaconVRFConsumerFilterer(address common.Address, filterer bind.ContractFilterer) (*LoadTestBeaconVRFConsumerFilterer, error) { - contract, err := bindLoadTestBeaconVRFConsumer(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &LoadTestBeaconVRFConsumerFilterer{contract: contract}, nil -} - -func bindLoadTestBeaconVRFConsumer(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := LoadTestBeaconVRFConsumerMetaData.GetAbi() - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _LoadTestBeaconVRFConsumer.Contract.LoadTestBeaconVRFConsumerCaller.contract.Call(opts, result, method, params...) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.Contract.LoadTestBeaconVRFConsumerTransactor.contract.Transfer(opts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.Contract.LoadTestBeaconVRFConsumerTransactor.contract.Transact(opts, method, params...) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _LoadTestBeaconVRFConsumer.Contract.contract.Call(opts, result, method, params...) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.Contract.contract.Transfer(opts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.Contract.contract.Transact(opts, method, params...) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCaller) Fail(opts *bind.CallOpts) (bool, error) { - var out []interface{} - err := _LoadTestBeaconVRFConsumer.contract.Call(opts, &out, "fail") - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) Fail() (bool, error) { - return _LoadTestBeaconVRFConsumer.Contract.Fail(&_LoadTestBeaconVRFConsumer.CallOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCallerSession) Fail() (bool, error) { - return _LoadTestBeaconVRFConsumer.Contract.Fail(&_LoadTestBeaconVRFConsumer.CallOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCaller) GetFulfillmentDurationByRequestID(opts *bind.CallOpts, reqID *big.Int) (*big.Int, error) { - var out []interface{} - err := _LoadTestBeaconVRFConsumer.contract.Call(opts, &out, "getFulfillmentDurationByRequestID", reqID) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) GetFulfillmentDurationByRequestID(reqID *big.Int) (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.GetFulfillmentDurationByRequestID(&_LoadTestBeaconVRFConsumer.CallOpts, reqID) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCallerSession) GetFulfillmentDurationByRequestID(reqID *big.Int) (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.GetFulfillmentDurationByRequestID(&_LoadTestBeaconVRFConsumer.CallOpts, reqID) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCaller) GetRawFulfillmentDurationByRequestID(opts *bind.CallOpts, reqID *big.Int) (*big.Int, error) { - var out []interface{} - err := _LoadTestBeaconVRFConsumer.contract.Call(opts, &out, "getRawFulfillmentDurationByRequestID", reqID) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) GetRawFulfillmentDurationByRequestID(reqID *big.Int) (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.GetRawFulfillmentDurationByRequestID(&_LoadTestBeaconVRFConsumer.CallOpts, reqID) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCallerSession) GetRawFulfillmentDurationByRequestID(reqID *big.Int) (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.GetRawFulfillmentDurationByRequestID(&_LoadTestBeaconVRFConsumer.CallOpts, reqID) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCaller) IBeaconPeriodBlocks(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _LoadTestBeaconVRFConsumer.contract.Call(opts, &out, "i_beaconPeriodBlocks") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) IBeaconPeriodBlocks() (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.IBeaconPeriodBlocks(&_LoadTestBeaconVRFConsumer.CallOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCallerSession) IBeaconPeriodBlocks() (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.IBeaconPeriodBlocks(&_LoadTestBeaconVRFConsumer.CallOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCaller) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _LoadTestBeaconVRFConsumer.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 (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) Owner() (common.Address, error) { - return _LoadTestBeaconVRFConsumer.Contract.Owner(&_LoadTestBeaconVRFConsumer.CallOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCallerSession) Owner() (common.Address, error) { - return _LoadTestBeaconVRFConsumer.Contract.Owner(&_LoadTestBeaconVRFConsumer.CallOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCaller) PendingRequests(opts *bind.CallOpts) ([]*big.Int, error) { - var out []interface{} - err := _LoadTestBeaconVRFConsumer.contract.Call(opts, &out, "pendingRequests") - - if err != nil { - return *new([]*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) - - return out0, err - -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) PendingRequests() ([]*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.PendingRequests(&_LoadTestBeaconVRFConsumer.CallOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCallerSession) PendingRequests() ([]*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.PendingRequests(&_LoadTestBeaconVRFConsumer.CallOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCaller) RequestHeights(opts *bind.CallOpts, arg0 *big.Int, arg1 *big.Int) (*big.Int, error) { - var out []interface{} - err := _LoadTestBeaconVRFConsumer.contract.Call(opts, &out, "requestHeights", arg0, arg1) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) RequestHeights(arg0 *big.Int, arg1 *big.Int) (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.RequestHeights(&_LoadTestBeaconVRFConsumer.CallOpts, arg0, arg1) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCallerSession) RequestHeights(arg0 *big.Int, arg1 *big.Int) (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.RequestHeights(&_LoadTestBeaconVRFConsumer.CallOpts, arg0, arg1) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCaller) SReceivedRandomnessByRequestID(opts *bind.CallOpts, arg0 *big.Int, arg1 *big.Int) (*big.Int, error) { - var out []interface{} - err := _LoadTestBeaconVRFConsumer.contract.Call(opts, &out, "s_ReceivedRandomnessByRequestID", arg0, arg1) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) SReceivedRandomnessByRequestID(arg0 *big.Int, arg1 *big.Int) (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.SReceivedRandomnessByRequestID(&_LoadTestBeaconVRFConsumer.CallOpts, arg0, arg1) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCallerSession) SReceivedRandomnessByRequestID(arg0 *big.Int, arg1 *big.Int) (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.SReceivedRandomnessByRequestID(&_LoadTestBeaconVRFConsumer.CallOpts, arg0, arg1) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCaller) SArguments(opts *bind.CallOpts) ([]byte, error) { - var out []interface{} - err := _LoadTestBeaconVRFConsumer.contract.Call(opts, &out, "s_arguments") - - if err != nil { - return *new([]byte), err - } - - out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) - - return out0, err - -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) SArguments() ([]byte, error) { - return _LoadTestBeaconVRFConsumer.Contract.SArguments(&_LoadTestBeaconVRFConsumer.CallOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCallerSession) SArguments() ([]byte, error) { - return _LoadTestBeaconVRFConsumer.Contract.SArguments(&_LoadTestBeaconVRFConsumer.CallOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCaller) SAverageFulfillmentInMillions(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _LoadTestBeaconVRFConsumer.contract.Call(opts, &out, "s_averageFulfillmentInMillions") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) SAverageFulfillmentInMillions() (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.SAverageFulfillmentInMillions(&_LoadTestBeaconVRFConsumer.CallOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCallerSession) SAverageFulfillmentInMillions() (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.SAverageFulfillmentInMillions(&_LoadTestBeaconVRFConsumer.CallOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCaller) SFastestFulfillment(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _LoadTestBeaconVRFConsumer.contract.Call(opts, &out, "s_fastestFulfillment") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) SFastestFulfillment() (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.SFastestFulfillment(&_LoadTestBeaconVRFConsumer.CallOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCallerSession) SFastestFulfillment() (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.SFastestFulfillment(&_LoadTestBeaconVRFConsumer.CallOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCaller) SFulfillmentDurationInBlocks(opts *bind.CallOpts, arg0 *big.Int, arg1 *big.Int) (*big.Int, error) { - var out []interface{} - err := _LoadTestBeaconVRFConsumer.contract.Call(opts, &out, "s_fulfillmentDurationInBlocks", arg0, arg1) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) SFulfillmentDurationInBlocks(arg0 *big.Int, arg1 *big.Int) (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.SFulfillmentDurationInBlocks(&_LoadTestBeaconVRFConsumer.CallOpts, arg0, arg1) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCallerSession) SFulfillmentDurationInBlocks(arg0 *big.Int, arg1 *big.Int) (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.SFulfillmentDurationInBlocks(&_LoadTestBeaconVRFConsumer.CallOpts, arg0, arg1) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCaller) SGasAvailable(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _LoadTestBeaconVRFConsumer.contract.Call(opts, &out, "s_gasAvailable") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) SGasAvailable() (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.SGasAvailable(&_LoadTestBeaconVRFConsumer.CallOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCallerSession) SGasAvailable() (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.SGasAvailable(&_LoadTestBeaconVRFConsumer.CallOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCaller) SMostRecentRequestID(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _LoadTestBeaconVRFConsumer.contract.Call(opts, &out, "s_mostRecentRequestID") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) SMostRecentRequestID() (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.SMostRecentRequestID(&_LoadTestBeaconVRFConsumer.CallOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCallerSession) SMostRecentRequestID() (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.SMostRecentRequestID(&_LoadTestBeaconVRFConsumer.CallOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCaller) SMyBeaconRequests(opts *bind.CallOpts, arg0 *big.Int) (SMyBeaconRequests, - - error) { - var out []interface{} - err := _LoadTestBeaconVRFConsumer.contract.Call(opts, &out, "s_myBeaconRequests", arg0) - - outstruct := new(SMyBeaconRequests) - if err != nil { - return *outstruct, err - } - - outstruct.SlotNumber = *abi.ConvertType(out[0], new(uint32)).(*uint32) - outstruct.ConfirmationDelay = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) - outstruct.NumWords = *abi.ConvertType(out[2], new(uint16)).(*uint16) - outstruct.Requester = *abi.ConvertType(out[3], new(common.Address)).(*common.Address) - - return *outstruct, err - -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) SMyBeaconRequests(arg0 *big.Int) (SMyBeaconRequests, - - error) { - return _LoadTestBeaconVRFConsumer.Contract.SMyBeaconRequests(&_LoadTestBeaconVRFConsumer.CallOpts, arg0) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCallerSession) SMyBeaconRequests(arg0 *big.Int) (SMyBeaconRequests, - - error) { - return _LoadTestBeaconVRFConsumer.Contract.SMyBeaconRequests(&_LoadTestBeaconVRFConsumer.CallOpts, arg0) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCaller) SRandomWords(opts *bind.CallOpts, arg0 *big.Int) (*big.Int, error) { - var out []interface{} - err := _LoadTestBeaconVRFConsumer.contract.Call(opts, &out, "s_randomWords", arg0) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) SRandomWords(arg0 *big.Int) (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.SRandomWords(&_LoadTestBeaconVRFConsumer.CallOpts, arg0) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCallerSession) SRandomWords(arg0 *big.Int) (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.SRandomWords(&_LoadTestBeaconVRFConsumer.CallOpts, arg0) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCaller) SRawFulfillmentDurationInBlocks(opts *bind.CallOpts, arg0 *big.Int, arg1 *big.Int) (*big.Int, error) { - var out []interface{} - err := _LoadTestBeaconVRFConsumer.contract.Call(opts, &out, "s_rawFulfillmentDurationInBlocks", arg0, arg1) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) SRawFulfillmentDurationInBlocks(arg0 *big.Int, arg1 *big.Int) (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.SRawFulfillmentDurationInBlocks(&_LoadTestBeaconVRFConsumer.CallOpts, arg0, arg1) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCallerSession) SRawFulfillmentDurationInBlocks(arg0 *big.Int, arg1 *big.Int) (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.SRawFulfillmentDurationInBlocks(&_LoadTestBeaconVRFConsumer.CallOpts, arg0, arg1) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCaller) SRequestIDs(opts *bind.CallOpts, arg0 *big.Int, arg1 *big.Int) (*big.Int, error) { - var out []interface{} - err := _LoadTestBeaconVRFConsumer.contract.Call(opts, &out, "s_requestIDs", arg0, arg1) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) SRequestIDs(arg0 *big.Int, arg1 *big.Int) (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.SRequestIDs(&_LoadTestBeaconVRFConsumer.CallOpts, arg0, arg1) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCallerSession) SRequestIDs(arg0 *big.Int, arg1 *big.Int) (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.SRequestIDs(&_LoadTestBeaconVRFConsumer.CallOpts, arg0, arg1) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCaller) SRequestOutputHeights(opts *bind.CallOpts, arg0 *big.Int, arg1 *big.Int) (*big.Int, error) { - var out []interface{} - err := _LoadTestBeaconVRFConsumer.contract.Call(opts, &out, "s_requestOutputHeights", arg0, arg1) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) SRequestOutputHeights(arg0 *big.Int, arg1 *big.Int) (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.SRequestOutputHeights(&_LoadTestBeaconVRFConsumer.CallOpts, arg0, arg1) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCallerSession) SRequestOutputHeights(arg0 *big.Int, arg1 *big.Int) (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.SRequestOutputHeights(&_LoadTestBeaconVRFConsumer.CallOpts, arg0, arg1) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCaller) SRequestsIDs(opts *bind.CallOpts, arg0 *big.Int, arg1 *big.Int) (*big.Int, error) { - var out []interface{} - err := _LoadTestBeaconVRFConsumer.contract.Call(opts, &out, "s_requestsIDs", arg0, arg1) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) SRequestsIDs(arg0 *big.Int, arg1 *big.Int) (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.SRequestsIDs(&_LoadTestBeaconVRFConsumer.CallOpts, arg0, arg1) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCallerSession) SRequestsIDs(arg0 *big.Int, arg1 *big.Int) (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.SRequestsIDs(&_LoadTestBeaconVRFConsumer.CallOpts, arg0, arg1) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCaller) SResetCounter(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _LoadTestBeaconVRFConsumer.contract.Call(opts, &out, "s_resetCounter") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) SResetCounter() (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.SResetCounter(&_LoadTestBeaconVRFConsumer.CallOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCallerSession) SResetCounter() (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.SResetCounter(&_LoadTestBeaconVRFConsumer.CallOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCaller) SSlowestFulfillment(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _LoadTestBeaconVRFConsumer.contract.Call(opts, &out, "s_slowestFulfillment") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) SSlowestFulfillment() (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.SSlowestFulfillment(&_LoadTestBeaconVRFConsumer.CallOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCallerSession) SSlowestFulfillment() (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.SSlowestFulfillment(&_LoadTestBeaconVRFConsumer.CallOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCaller) SSlowestRequestID(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _LoadTestBeaconVRFConsumer.contract.Call(opts, &out, "s_slowestRequestID") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) SSlowestRequestID() (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.SSlowestRequestID(&_LoadTestBeaconVRFConsumer.CallOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCallerSession) SSlowestRequestID() (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.SSlowestRequestID(&_LoadTestBeaconVRFConsumer.CallOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCaller) SSubId(opts *bind.CallOpts) (uint64, error) { - var out []interface{} - err := _LoadTestBeaconVRFConsumer.contract.Call(opts, &out, "s_subId") - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) SSubId() (uint64, error) { - return _LoadTestBeaconVRFConsumer.Contract.SSubId(&_LoadTestBeaconVRFConsumer.CallOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCallerSession) SSubId() (uint64, error) { - return _LoadTestBeaconVRFConsumer.Contract.SSubId(&_LoadTestBeaconVRFConsumer.CallOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCaller) STotalFulfilled(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _LoadTestBeaconVRFConsumer.contract.Call(opts, &out, "s_totalFulfilled") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) STotalFulfilled() (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.STotalFulfilled(&_LoadTestBeaconVRFConsumer.CallOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCallerSession) STotalFulfilled() (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.STotalFulfilled(&_LoadTestBeaconVRFConsumer.CallOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCaller) STotalRequests(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _LoadTestBeaconVRFConsumer.contract.Call(opts, &out, "s_totalRequests") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) STotalRequests() (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.STotalRequests(&_LoadTestBeaconVRFConsumer.CallOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerCallerSession) STotalRequests() (*big.Int, error) { - return _LoadTestBeaconVRFConsumer.Contract.STotalRequests(&_LoadTestBeaconVRFConsumer.CallOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.contract.Transact(opts, "acceptOwnership") -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) AcceptOwnership() (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.Contract.AcceptOwnership(&_LoadTestBeaconVRFConsumer.TransactOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerTransactorSession) AcceptOwnership() (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.Contract.AcceptOwnership(&_LoadTestBeaconVRFConsumer.TransactOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerTransactor) RawFulfillRandomWords(opts *bind.TransactOpts, requestID *big.Int, randomWords []*big.Int, arguments []byte) (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.contract.Transact(opts, "rawFulfillRandomWords", requestID, randomWords, arguments) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) RawFulfillRandomWords(requestID *big.Int, randomWords []*big.Int, arguments []byte) (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.Contract.RawFulfillRandomWords(&_LoadTestBeaconVRFConsumer.TransactOpts, requestID, randomWords, arguments) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerTransactorSession) RawFulfillRandomWords(requestID *big.Int, randomWords []*big.Int, arguments []byte) (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.Contract.RawFulfillRandomWords(&_LoadTestBeaconVRFConsumer.TransactOpts, requestID, randomWords, arguments) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerTransactor) Reset(opts *bind.TransactOpts) (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.contract.Transact(opts, "reset") -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) Reset() (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.Contract.Reset(&_LoadTestBeaconVRFConsumer.TransactOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerTransactorSession) Reset() (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.Contract.Reset(&_LoadTestBeaconVRFConsumer.TransactOpts) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerTransactor) SetCoordinator(opts *bind.TransactOpts, coordinator common.Address) (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.contract.Transact(opts, "setCoordinator", coordinator) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) SetCoordinator(coordinator common.Address) (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.Contract.SetCoordinator(&_LoadTestBeaconVRFConsumer.TransactOpts, coordinator) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerTransactorSession) SetCoordinator(coordinator common.Address) (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.Contract.SetCoordinator(&_LoadTestBeaconVRFConsumer.TransactOpts, coordinator) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerTransactor) SetFail(opts *bind.TransactOpts, shouldFail bool) (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.contract.Transact(opts, "setFail", shouldFail) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) SetFail(shouldFail bool) (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.Contract.SetFail(&_LoadTestBeaconVRFConsumer.TransactOpts, shouldFail) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerTransactorSession) SetFail(shouldFail bool) (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.Contract.SetFail(&_LoadTestBeaconVRFConsumer.TransactOpts, shouldFail) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerTransactor) StoreBeaconRequest(opts *bind.TransactOpts, reqId *big.Int, height *big.Int, delay *big.Int, numWords uint16) (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.contract.Transact(opts, "storeBeaconRequest", reqId, height, delay, numWords) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) StoreBeaconRequest(reqId *big.Int, height *big.Int, delay *big.Int, numWords uint16) (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.Contract.StoreBeaconRequest(&_LoadTestBeaconVRFConsumer.TransactOpts, reqId, height, delay, numWords) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerTransactorSession) StoreBeaconRequest(reqId *big.Int, height *big.Int, delay *big.Int, numWords uint16) (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.Contract.StoreBeaconRequest(&_LoadTestBeaconVRFConsumer.TransactOpts, reqId, height, delay, numWords) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerTransactor) TestRedeemRandomness(opts *bind.TransactOpts, subID *big.Int, requestID *big.Int) (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.contract.Transact(opts, "testRedeemRandomness", subID, requestID) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) TestRedeemRandomness(subID *big.Int, requestID *big.Int) (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.Contract.TestRedeemRandomness(&_LoadTestBeaconVRFConsumer.TransactOpts, subID, requestID) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerTransactorSession) TestRedeemRandomness(subID *big.Int, requestID *big.Int) (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.Contract.TestRedeemRandomness(&_LoadTestBeaconVRFConsumer.TransactOpts, subID, requestID) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerTransactor) TestRequestRandomness(opts *bind.TransactOpts, numWords uint16, subID *big.Int, confirmationDelayArg *big.Int) (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.contract.Transact(opts, "testRequestRandomness", numWords, subID, confirmationDelayArg) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) TestRequestRandomness(numWords uint16, subID *big.Int, confirmationDelayArg *big.Int) (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.Contract.TestRequestRandomness(&_LoadTestBeaconVRFConsumer.TransactOpts, numWords, subID, confirmationDelayArg) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerTransactorSession) TestRequestRandomness(numWords uint16, subID *big.Int, confirmationDelayArg *big.Int) (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.Contract.TestRequestRandomness(&_LoadTestBeaconVRFConsumer.TransactOpts, numWords, subID, confirmationDelayArg) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerTransactor) TestRequestRandomnessFulfillment(opts *bind.TransactOpts, subID *big.Int, numWords uint16, confDelay *big.Int, callbackGasLimit uint32, arguments []byte) (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.contract.Transact(opts, "testRequestRandomnessFulfillment", subID, numWords, confDelay, callbackGasLimit, arguments) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) TestRequestRandomnessFulfillment(subID *big.Int, numWords uint16, confDelay *big.Int, callbackGasLimit uint32, arguments []byte) (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.Contract.TestRequestRandomnessFulfillment(&_LoadTestBeaconVRFConsumer.TransactOpts, subID, numWords, confDelay, callbackGasLimit, arguments) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerTransactorSession) TestRequestRandomnessFulfillment(subID *big.Int, numWords uint16, confDelay *big.Int, callbackGasLimit uint32, arguments []byte) (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.Contract.TestRequestRandomnessFulfillment(&_LoadTestBeaconVRFConsumer.TransactOpts, subID, numWords, confDelay, callbackGasLimit, arguments) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerTransactor) TestRequestRandomnessFulfillmentBatch(opts *bind.TransactOpts, subID *big.Int, numWords uint16, confirmationDelayArg *big.Int, callbackGasLimit uint32, arguments []byte, batchSize *big.Int) (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.contract.Transact(opts, "testRequestRandomnessFulfillmentBatch", subID, numWords, confirmationDelayArg, callbackGasLimit, arguments, batchSize) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) TestRequestRandomnessFulfillmentBatch(subID *big.Int, numWords uint16, confirmationDelayArg *big.Int, callbackGasLimit uint32, arguments []byte, batchSize *big.Int) (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.Contract.TestRequestRandomnessFulfillmentBatch(&_LoadTestBeaconVRFConsumer.TransactOpts, subID, numWords, confirmationDelayArg, callbackGasLimit, arguments, batchSize) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerTransactorSession) TestRequestRandomnessFulfillmentBatch(subID *big.Int, numWords uint16, confirmationDelayArg *big.Int, callbackGasLimit uint32, arguments []byte, batchSize *big.Int) (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.Contract.TestRequestRandomnessFulfillmentBatch(&_LoadTestBeaconVRFConsumer.TransactOpts, subID, numWords, confirmationDelayArg, callbackGasLimit, arguments, batchSize) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.contract.Transact(opts, "transferOwnership", to) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerSession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.Contract.TransferOwnership(&_LoadTestBeaconVRFConsumer.TransactOpts, to) -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _LoadTestBeaconVRFConsumer.Contract.TransferOwnership(&_LoadTestBeaconVRFConsumer.TransactOpts, to) -} - -type LoadTestBeaconVRFConsumerCoordinatorUpdatedIterator struct { - Event *LoadTestBeaconVRFConsumerCoordinatorUpdated - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *LoadTestBeaconVRFConsumerCoordinatorUpdatedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(LoadTestBeaconVRFConsumerCoordinatorUpdated) - 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(LoadTestBeaconVRFConsumerCoordinatorUpdated) - 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 *LoadTestBeaconVRFConsumerCoordinatorUpdatedIterator) Error() error { - return it.fail -} - -func (it *LoadTestBeaconVRFConsumerCoordinatorUpdatedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type LoadTestBeaconVRFConsumerCoordinatorUpdated struct { - Coordinator common.Address - Raw types.Log -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerFilterer) FilterCoordinatorUpdated(opts *bind.FilterOpts, coordinator []common.Address) (*LoadTestBeaconVRFConsumerCoordinatorUpdatedIterator, error) { - - var coordinatorRule []interface{} - for _, coordinatorItem := range coordinator { - coordinatorRule = append(coordinatorRule, coordinatorItem) - } - - logs, sub, err := _LoadTestBeaconVRFConsumer.contract.FilterLogs(opts, "CoordinatorUpdated", coordinatorRule) - if err != nil { - return nil, err - } - return &LoadTestBeaconVRFConsumerCoordinatorUpdatedIterator{contract: _LoadTestBeaconVRFConsumer.contract, event: "CoordinatorUpdated", logs: logs, sub: sub}, nil -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerFilterer) WatchCoordinatorUpdated(opts *bind.WatchOpts, sink chan<- *LoadTestBeaconVRFConsumerCoordinatorUpdated, coordinator []common.Address) (event.Subscription, error) { - - var coordinatorRule []interface{} - for _, coordinatorItem := range coordinator { - coordinatorRule = append(coordinatorRule, coordinatorItem) - } - - logs, sub, err := _LoadTestBeaconVRFConsumer.contract.WatchLogs(opts, "CoordinatorUpdated", coordinatorRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(LoadTestBeaconVRFConsumerCoordinatorUpdated) - if err := _LoadTestBeaconVRFConsumer.contract.UnpackLog(event, "CoordinatorUpdated", 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 (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerFilterer) ParseCoordinatorUpdated(log types.Log) (*LoadTestBeaconVRFConsumerCoordinatorUpdated, error) { - event := new(LoadTestBeaconVRFConsumerCoordinatorUpdated) - if err := _LoadTestBeaconVRFConsumer.contract.UnpackLog(event, "CoordinatorUpdated", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type LoadTestBeaconVRFConsumerOwnershipTransferRequestedIterator struct { - Event *LoadTestBeaconVRFConsumerOwnershipTransferRequested - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *LoadTestBeaconVRFConsumerOwnershipTransferRequestedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(LoadTestBeaconVRFConsumerOwnershipTransferRequested) - 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(LoadTestBeaconVRFConsumerOwnershipTransferRequested) - 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 *LoadTestBeaconVRFConsumerOwnershipTransferRequestedIterator) Error() error { - return it.fail -} - -func (it *LoadTestBeaconVRFConsumerOwnershipTransferRequestedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type LoadTestBeaconVRFConsumerOwnershipTransferRequested struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*LoadTestBeaconVRFConsumerOwnershipTransferRequestedIterator, 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 := _LoadTestBeaconVRFConsumer.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) - if err != nil { - return nil, err - } - return &LoadTestBeaconVRFConsumerOwnershipTransferRequestedIterator{contract: _LoadTestBeaconVRFConsumer.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *LoadTestBeaconVRFConsumerOwnershipTransferRequested, 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 := _LoadTestBeaconVRFConsumer.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(LoadTestBeaconVRFConsumerOwnershipTransferRequested) - if err := _LoadTestBeaconVRFConsumer.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 (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerFilterer) ParseOwnershipTransferRequested(log types.Log) (*LoadTestBeaconVRFConsumerOwnershipTransferRequested, error) { - event := new(LoadTestBeaconVRFConsumerOwnershipTransferRequested) - if err := _LoadTestBeaconVRFConsumer.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type LoadTestBeaconVRFConsumerOwnershipTransferredIterator struct { - Event *LoadTestBeaconVRFConsumerOwnershipTransferred - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *LoadTestBeaconVRFConsumerOwnershipTransferredIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(LoadTestBeaconVRFConsumerOwnershipTransferred) - 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(LoadTestBeaconVRFConsumerOwnershipTransferred) - 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 *LoadTestBeaconVRFConsumerOwnershipTransferredIterator) Error() error { - return it.fail -} - -func (it *LoadTestBeaconVRFConsumerOwnershipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type LoadTestBeaconVRFConsumerOwnershipTransferred struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*LoadTestBeaconVRFConsumerOwnershipTransferredIterator, 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 := _LoadTestBeaconVRFConsumer.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) - if err != nil { - return nil, err - } - return &LoadTestBeaconVRFConsumerOwnershipTransferredIterator{contract: _LoadTestBeaconVRFConsumer.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *LoadTestBeaconVRFConsumerOwnershipTransferred, 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 := _LoadTestBeaconVRFConsumer.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(LoadTestBeaconVRFConsumerOwnershipTransferred) - if err := _LoadTestBeaconVRFConsumer.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 (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumerFilterer) ParseOwnershipTransferred(log types.Log) (*LoadTestBeaconVRFConsumerOwnershipTransferred, error) { - event := new(LoadTestBeaconVRFConsumerOwnershipTransferred) - if err := _LoadTestBeaconVRFConsumer.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type SMyBeaconRequests struct { - SlotNumber uint32 - ConfirmationDelay *big.Int - NumWords uint16 - Requester common.Address -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumer) ParseLog(log types.Log) (generated.AbigenLog, error) { - switch log.Topics[0] { - case _LoadTestBeaconVRFConsumer.abi.Events["CoordinatorUpdated"].ID: - return _LoadTestBeaconVRFConsumer.ParseCoordinatorUpdated(log) - case _LoadTestBeaconVRFConsumer.abi.Events["OwnershipTransferRequested"].ID: - return _LoadTestBeaconVRFConsumer.ParseOwnershipTransferRequested(log) - case _LoadTestBeaconVRFConsumer.abi.Events["OwnershipTransferred"].ID: - return _LoadTestBeaconVRFConsumer.ParseOwnershipTransferred(log) - - default: - return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) - } -} - -func (LoadTestBeaconVRFConsumerCoordinatorUpdated) Topic() common.Hash { - return common.HexToHash("0xc258faa9a17ddfdf4130b4acff63a289202e7d5f9e42f366add65368575486bc") -} - -func (LoadTestBeaconVRFConsumerOwnershipTransferRequested) Topic() common.Hash { - return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") -} - -func (LoadTestBeaconVRFConsumerOwnershipTransferred) Topic() common.Hash { - return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") -} - -func (_LoadTestBeaconVRFConsumer *LoadTestBeaconVRFConsumer) Address() common.Address { - return _LoadTestBeaconVRFConsumer.address -} - -type LoadTestBeaconVRFConsumerInterface interface { - Fail(opts *bind.CallOpts) (bool, error) - - GetFulfillmentDurationByRequestID(opts *bind.CallOpts, reqID *big.Int) (*big.Int, error) - - GetRawFulfillmentDurationByRequestID(opts *bind.CallOpts, reqID *big.Int) (*big.Int, error) - - IBeaconPeriodBlocks(opts *bind.CallOpts) (*big.Int, error) - - Owner(opts *bind.CallOpts) (common.Address, error) - - PendingRequests(opts *bind.CallOpts) ([]*big.Int, error) - - RequestHeights(opts *bind.CallOpts, arg0 *big.Int, arg1 *big.Int) (*big.Int, error) - - SReceivedRandomnessByRequestID(opts *bind.CallOpts, arg0 *big.Int, arg1 *big.Int) (*big.Int, error) - - SArguments(opts *bind.CallOpts) ([]byte, error) - - SAverageFulfillmentInMillions(opts *bind.CallOpts) (*big.Int, error) - - SFastestFulfillment(opts *bind.CallOpts) (*big.Int, error) - - SFulfillmentDurationInBlocks(opts *bind.CallOpts, arg0 *big.Int, arg1 *big.Int) (*big.Int, error) - - SGasAvailable(opts *bind.CallOpts) (*big.Int, error) - - SMostRecentRequestID(opts *bind.CallOpts) (*big.Int, error) - - SMyBeaconRequests(opts *bind.CallOpts, arg0 *big.Int) (SMyBeaconRequests, - - error) - - SRandomWords(opts *bind.CallOpts, arg0 *big.Int) (*big.Int, error) - - SRawFulfillmentDurationInBlocks(opts *bind.CallOpts, arg0 *big.Int, arg1 *big.Int) (*big.Int, error) - - SRequestIDs(opts *bind.CallOpts, arg0 *big.Int, arg1 *big.Int) (*big.Int, error) - - SRequestOutputHeights(opts *bind.CallOpts, arg0 *big.Int, arg1 *big.Int) (*big.Int, error) - - SRequestsIDs(opts *bind.CallOpts, arg0 *big.Int, arg1 *big.Int) (*big.Int, error) - - SResetCounter(opts *bind.CallOpts) (*big.Int, error) - - SSlowestFulfillment(opts *bind.CallOpts) (*big.Int, error) - - SSlowestRequestID(opts *bind.CallOpts) (*big.Int, error) - - SSubId(opts *bind.CallOpts) (uint64, error) - - STotalFulfilled(opts *bind.CallOpts) (*big.Int, error) - - STotalRequests(opts *bind.CallOpts) (*big.Int, error) - - AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) - - RawFulfillRandomWords(opts *bind.TransactOpts, requestID *big.Int, randomWords []*big.Int, arguments []byte) (*types.Transaction, error) - - Reset(opts *bind.TransactOpts) (*types.Transaction, error) - - SetCoordinator(opts *bind.TransactOpts, coordinator common.Address) (*types.Transaction, error) - - SetFail(opts *bind.TransactOpts, shouldFail bool) (*types.Transaction, error) - - StoreBeaconRequest(opts *bind.TransactOpts, reqId *big.Int, height *big.Int, delay *big.Int, numWords uint16) (*types.Transaction, error) - - TestRedeemRandomness(opts *bind.TransactOpts, subID *big.Int, requestID *big.Int) (*types.Transaction, error) - - TestRequestRandomness(opts *bind.TransactOpts, numWords uint16, subID *big.Int, confirmationDelayArg *big.Int) (*types.Transaction, error) - - TestRequestRandomnessFulfillment(opts *bind.TransactOpts, subID *big.Int, numWords uint16, confDelay *big.Int, callbackGasLimit uint32, arguments []byte) (*types.Transaction, error) - - TestRequestRandomnessFulfillmentBatch(opts *bind.TransactOpts, subID *big.Int, numWords uint16, confirmationDelayArg *big.Int, callbackGasLimit uint32, arguments []byte, batchSize *big.Int) (*types.Transaction, error) - - TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) - - FilterCoordinatorUpdated(opts *bind.FilterOpts, coordinator []common.Address) (*LoadTestBeaconVRFConsumerCoordinatorUpdatedIterator, error) - - WatchCoordinatorUpdated(opts *bind.WatchOpts, sink chan<- *LoadTestBeaconVRFConsumerCoordinatorUpdated, coordinator []common.Address) (event.Subscription, error) - - ParseCoordinatorUpdated(log types.Log) (*LoadTestBeaconVRFConsumerCoordinatorUpdated, error) - - FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*LoadTestBeaconVRFConsumerOwnershipTransferRequestedIterator, error) - - WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *LoadTestBeaconVRFConsumerOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseOwnershipTransferRequested(log types.Log) (*LoadTestBeaconVRFConsumerOwnershipTransferRequested, error) - - FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*LoadTestBeaconVRFConsumerOwnershipTransferredIterator, error) - - WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *LoadTestBeaconVRFConsumerOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseOwnershipTransferred(log types.Log) (*LoadTestBeaconVRFConsumerOwnershipTransferred, error) - - ParseLog(log types.Log) (generated.AbigenLog, error) - - Address() common.Address -} diff --git a/core/gethwrappers/ocr2vrf/generated/vrf_beacon/vrf_beacon.go b/core/gethwrappers/ocr2vrf/generated/vrf_beacon/vrf_beacon.go deleted file mode 100644 index b44019de548..00000000000 --- a/core/gethwrappers/ocr2vrf/generated/vrf_beacon/vrf_beacon.go +++ /dev/null @@ -1,2846 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package vrf_beacon - -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 ECCArithmeticG1Point struct { - P [2]*big.Int -} - -type KeyDataStructKeyData struct { - PublicKey []byte - Hashes [][32]byte -} - -type VRFBeaconReportReport struct { - Outputs []VRFBeaconTypesVRFOutput - JuelsPerFeeCoin *big.Int - ReasonableGasPrice uint64 - RecentBlockHeight uint64 - RecentBlockHash [32]byte -} - -type VRFBeaconTypesCallback struct { - RequestID *big.Int - NumWords uint16 - Requester common.Address - Arguments []byte - GasAllowance *big.Int - SubID *big.Int - GasPrice *big.Int - WeiPerUnitLink *big.Int -} - -type VRFBeaconTypesCostedCallback struct { - Callback VRFBeaconTypesCallback - Price *big.Int -} - -type VRFBeaconTypesOutputServed struct { - Height uint64 - ConfirmationDelay *big.Int - ProofG1X *big.Int - ProofG1Y *big.Int -} - -type VRFBeaconTypesVRFOutput struct { - BlockHeight uint64 - ConfirmationDelay *big.Int - VrfOutput ECCArithmeticG1Point - Callbacks []VRFBeaconTypesCostedCallback - ShouldStore bool -} - -var VRFBeaconMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"contractLinkTokenInterface\",\"name\":\"link\",\"type\":\"address\"},{\"internalType\":\"contractIVRFCoordinatorProducerAPI\",\"name\":\"coordinator\",\"type\":\"address\"},{\"internalType\":\"contractDKG\",\"name\":\"keyProvider\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"keyID\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"actualLength\",\"type\":\"uint256\"}],\"name\":\"CalldataLengthMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CannotAcceptPayeeship\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"expected\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"actual\",\"type\":\"bytes32\"}],\"name\":\"ConfigDigestMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DuplicateSigners\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"providedHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"onchainHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"blockHeight\",\"type\":\"uint64\"}],\"name\":\"HistoryDomainSeparatorWrong\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IncorrectNumberOfFaultyOracles\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"numTransmitters\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"numPayees\",\"type\":\"uint256\"}],\"name\":\"IncorrectNumberOfPayees\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"expectedNumSignatures\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"rsLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ssLength\",\"type\":\"uint256\"}],\"name\":\"IncorrectNumberOfSignatures\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"actualBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requiredBalance\",\"type\":\"uint256\"}],\"name\":\"InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPayee\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"keyProvider\",\"type\":\"address\"}],\"name\":\"KeyInfoMustComeFromProvider\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LeftGasExceedsInitialGas\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MustBeOwnerOrBillingAdmin\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"numFaultyOracles\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"numSigners\",\"type\":\"uint256\"}],\"name\":\"NumberOfFaultyOraclesTooHigh\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"config\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"expectedLength\",\"type\":\"uint256\"}],\"name\":\"OnchainConfigHasWrongLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"}],\"name\":\"OnlyActiveSigners\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"}],\"name\":\"OnlyActiveTransmitters\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCurrentPayee\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"existingPayee\",\"type\":\"address\"}],\"name\":\"PayeeAlreadySet\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"repeatedSignerAddress\",\"type\":\"address\"}],\"name\":\"RepeatedSigner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"repeatedTransmitterAddress\",\"type\":\"address\"}],\"name\":\"RepeatedTransmitter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReportDoesNotContainNewOutputs\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"numSigners\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"numTransmitters\",\"type\":\"uint256\"}],\"name\":\"SignersTransmittersMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"maxOracles\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"providedOracles\",\"type\":\"uint256\"}],\"name\":\"TooManyOracles\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"ocrVersion\",\"type\":\"uint64\"}],\"name\":\"UnknownConfigVersion\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contractAccessControllerInterface\",\"name\":\"old\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contractAccessControllerInterface\",\"name\":\"current\",\"type\":\"address\"}],\"name\":\"BillingAccessControllerSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"maximumGasPrice\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"reasonableGasPrice\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"observationPayment\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"transmissionPayment\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint24\",\"name\":\"accountingGas\",\"type\":\"uint24\"}],\"name\":\"BillingSet\",\"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\":\"uint40\",\"name\":\"epochAndRound\",\"type\":\"uint40\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint192\",\"name\":\"juelsPerFeeCoin\",\"type\":\"uint192\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"reasonableGasPrice\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"name\":\"NewTransmission\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"contractLinkTokenInterface\",\"name\":\"linkToken\",\"type\":\"address\"}],\"name\":\"OraclePaid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"recentBlockHeight\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint192\",\"name\":\"juelsPerFeeCoin\",\"type\":\"uint192\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"reasonableGasPrice\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"height\",\"type\":\"uint64\"},{\"internalType\":\"uint24\",\"name\":\"confirmationDelay\",\"type\":\"uint24\"},{\"internalType\":\"uint256\",\"name\":\"proofG1X\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proofG1Y\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"structVRFBeaconTypes.OutputServed[]\",\"name\":\"outputsServed\",\"type\":\"tuple[]\"}],\"name\":\"OutputsServed\",\"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\":\"transmitter\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"current\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"PayeeshipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previous\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"current\",\"type\":\"address\"}],\"name\":\"PayeeshipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"requestIDs\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"successfulFulfillment\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"truncatedErrorData\",\"type\":\"bytes[]\"},{\"indexed\":false,\"internalType\":\"uint96[]\",\"name\":\"subBalances\",\"type\":\"uint96[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"subIDs\",\"type\":\"uint256[]\"}],\"name\":\"RandomWordsFulfilled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"requestID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"requester\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"nextBeaconOutputHeight\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint24\",\"name\":\"confDelay\",\"type\":\"uint24\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"subID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"numWords\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"gasAllowance\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weiPerUnitLink\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"arguments\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"costJuels\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newSubBalance\",\"type\":\"uint256\"}],\"name\":\"RandomnessFulfillmentRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"requestID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"requester\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"subID\",\"type\":\"uint256\"}],\"name\":\"RandomnessRedeemed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"requestID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"requester\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"nextBeaconOutputHeight\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint24\",\"name\":\"confDelay\",\"type\":\"uint24\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"subID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"numWords\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"costJuels\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newSubBalance\",\"type\":\"uint256\"}],\"name\":\"RandomnessRequested\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"NUM_CONF_DELAYS\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"}],\"name\":\"acceptPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"blockHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint24\",\"name\":\"confirmationDelay\",\"type\":\"uint24\"},{\"components\":[{\"internalType\":\"uint256[2]\",\"name\":\"p\",\"type\":\"uint256[2]\"}],\"internalType\":\"structECCArithmetic.G1Point\",\"name\":\"vrfOutput\",\"type\":\"tuple\"},{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"requestID\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"numWords\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"requester\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"arguments\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"gasAllowance\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"subID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"weiPerUnitLink\",\"type\":\"uint256\"}],\"internalType\":\"structVRFBeaconTypes.Callback\",\"name\":\"callback\",\"type\":\"tuple\"},{\"internalType\":\"uint96\",\"name\":\"price\",\"type\":\"uint96\"}],\"internalType\":\"structVRFBeaconTypes.CostedCallback[]\",\"name\":\"callbacks\",\"type\":\"tuple[]\"},{\"internalType\":\"bool\",\"name\":\"shouldStore\",\"type\":\"bool\"}],\"internalType\":\"structVRFBeaconTypes.VRFOutput[]\",\"name\":\"outputs\",\"type\":\"tuple[]\"},{\"internalType\":\"uint192\",\"name\":\"juelsPerFeeCoin\",\"type\":\"uint192\"},{\"internalType\":\"uint64\",\"name\":\"reasonableGasPrice\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"recentBlockHeight\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"recentBlockHash\",\"type\":\"bytes32\"}],\"internalType\":\"structVRFBeaconReport.Report\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"exposeType\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBilling\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"maximumGasPrice\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"reasonableGasPrice\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"observationPayment\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"transmissionPayment\",\"type\":\"uint64\"},{\"internalType\":\"uint24\",\"name\":\"accountingGas\",\"type\":\"uint24\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBillingAccessController\",\"outputs\":[{\"internalType\":\"contractAccessControllerInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"i_coordinator\",\"outputs\":[{\"internalType\":\"contractIVRFCoordinatorProducerAPI\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"i_link\",\"outputs\":[{\"internalType\":\"contractLinkTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes\",\"name\":\"publicKey\",\"type\":\"bytes\"},{\"internalType\":\"bytes32[]\",\"name\":\"hashes\",\"type\":\"bytes32[]\"}],\"internalType\":\"structKeyDataStruct.KeyData\",\"name\":\"kd\",\"type\":\"tuple\"}],\"name\":\"keyGenerated\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"int256\",\"name\":\"availableBalance\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"newKeyRequested\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitterAddress\",\"type\":\"address\"}],\"name\":\"owedPayment\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_keyID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_keyProvider\",\"outputs\":[{\"internalType\":\"contractDKG\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_provingKeyHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"maximumGasPrice\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"reasonableGasPrice\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"observationPayment\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"transmissionPayment\",\"type\":\"uint64\"},{\"internalType\":\"uint24\",\"name\":\"accountingGas\",\"type\":\"uint24\"}],\"name\":\"setBilling\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractAccessControllerInterface\",\"name\":\"_billingAccessController\",\"type\":\"address\"}],\"name\":\"setBillingAccessController\",\"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\":\"onchainConfig\",\"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\":\"transmitters\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"payees\",\"type\":\"address[]\"}],\"name\":\"setPayees\",\"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\":\"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\":\"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\":\"withdrawFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"}],\"name\":\"withdrawPayment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60e06040523480156200001157600080fd5b5060405162004dfe38038062004dfe8339810160408190526200003491620001c7565b8181858581813380600081620000915760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000c457620000c48162000103565b5050506001600160a01b03918216608052811660a052600e80546001600160a01b03191695909116949094179093555060c05250620002219350505050565b336001600160a01b038216036200015d5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000088565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6001600160a01b0381168114620001c457600080fd5b50565b60008060008060808587031215620001de57600080fd5b8451620001eb81620001ae565b6020860151909450620001fe81620001ae565b60408601519093506200021181620001ae565b6060959095015193969295505050565b60805160a05160c051614b28620002d660003960006104810152600081816103820152818161114e015281816112260152818161131c0152818161141d015281816114bb01528181612216015281816122ee015281816124650152818161275a01528181612b8301528181612c5b0152818161316501526136cd01526000818161032b015281816112540152818161144a0152818161231c015281816124c301528181612c8901526130500152614b286000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c8063afcb95d7116100f9578063d09dc33911610097578063e53bbc9a11610071578063e53bbc9a146104c7578063eb5dcd6c146104da578063f2fde38b146104ed578063fbffd2c11461050057600080fd5b8063d09dc339146104a3578063d57fc45a146104ab578063e3d0e712146104b457600080fd5b8063bf2732c7116100d3578063bf2732c714610438578063c10753291461044b578063c4c92b371461045e578063cc31f7dd1461047c57600080fd5b8063afcb95d7146103e8578063b121e14714610412578063b1dc65a41461042557600080fd5b806379ba5097116101665780638a1b1772116101405780638a1b17721461037d5780638ac28d5a146103a45780638da5cb5b146103b75780639c849b30146103d557600080fd5b806379ba50971461031e5780637d253aff1461032657806381ff70481461034d57600080fd5b806329937268116101a257806329937268146102415780632f7527cc146102b757806355e48749146102d15780635f27026f146102d957600080fd5b806305aeed58146101c95780630eafb25b146101dc578063181f5a7714610202575b600080fd5b6101da6101d73660046137f7565b50565b005b6101ef6101ea366004613854565b610513565b6040519081526020015b60405180910390f35b604080518082018252600f81527f565246426561636f6e20312e302e300000000000000000000000000000000000602082015290516101f991906138df565b60025460035460408051610100840467ffffffffffffffff9081168252690100000000000000000085048116602083015271010000000000000000000000000000000000909404841691810191909152918116606083015268010000000000000000900462ffffff16608082015260a0016101f9565b6102bf600881565b60405160ff90911681526020016101f9565b6101da61059f565b600e546102f99073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101f9565b6101da61061c565b6102f97f000000000000000000000000000000000000000000000000000000000000000081565b6004546005546040805163ffffffff808516825264010000000090940490931660208401528201526060016101f9565b6102f97f000000000000000000000000000000000000000000000000000000000000000081565b6101da6103b2366004613854565b610719565b60005473ffffffffffffffffffffffffffffffffffffffff166102f9565b6101da6103e336600461393e565b610782565b6005546006546040805160008152602081019390935263ffffffff909116908201526060016101f9565b6101da610420366004613854565b6109d4565b6101da6104333660046139ec565b610acc565b6101da610446366004613c89565b610f87565b6101da610459366004613d56565b611046565b600d5473ffffffffffffffffffffffffffffffffffffffff166102f9565b6101ef7f000000000000000000000000000000000000000000000000000000000000000081565b6101ef6113e0565b6101ef600f5481565b6101da6104c2366004613db9565b611573565b6101da6104d5366004613eb8565b611dc9565b6101da6104e8366004613f29565b61201b565b6101da6104fb366004613854565b612174565b6101da61050e366004613854565b612185565b73ffffffffffffffffffffffffffffffffffffffff811660009081526007602090815260408083208151606081018352905460ff80821615158084526101008304909116948301949094526201000090046bffffffffffffffffffffffff1691810191909152906105875750600092915050565b604001516bffffffffffffffffffffffff1692915050565b600e5473ffffffffffffffffffffffffffffffffffffffff16338114610614576040517f292f4fb500000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff821660248201526044015b60405180910390fd5b506000600f55565b60015473ffffffffffffffffffffffffffffffffffffffff16331461069d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e657200000000000000000000604482015260640161060b565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b73ffffffffffffffffffffffffffffffffffffffff8181166000908152600b6020526040902054163314610779576040517fdce38c2400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6101d781612196565b61078a612569565b8281146107cd576040517f36d20459000000000000000000000000000000000000000000000000000000008152600481018490526024810182905260440161060b565b60005b838110156109cd5760008585838181106107ec576107ec613f62565b90506020020160208101906108019190613854565b9050600084848481811061081757610817613f62565b905060200201602081019061082c9190613854565b73ffffffffffffffffffffffffffffffffffffffff8084166000908152600b602052604090205491925016801580158161089257508273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156108e9576040517febdf175600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff80861660048301528316602482015260440161060b565b73ffffffffffffffffffffffffffffffffffffffff8481166000908152600b6020526040902080547fffffffffffffffffffffffff000000000000000000000000000000000000000016858316908117909155908316146109b6578273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f78af32efdcad432315431e9b03d27e6cd98fb79c405fdc5af7c1714d9c0f75b360405160405180910390a45b5050505080806109c590613fc0565b9150506107d0565b5050505050565b73ffffffffffffffffffffffffffffffffffffffff8181166000908152600c6020526040902054163314610a34576040517f9d12ec4f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8181166000818152600b602090815260408083208054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217909355600c909452828520805490921690915590519416939092849290917f78af32efdcad432315431e9b03d27e6cd98fb79c405fdc5af7c1714d9c0f75b39190a45050565b60005a6040805160c08101825260025460ff808216835267ffffffffffffffff61010083048116602080860191909152690100000000000000000084048216858701527101000000000000000000000000000000000090930481166060850152600354908116608085015262ffffff680100000000000000009091041660a08401523360009081526007835293909320549394509092908c01359116610ba0576040517fb1c1f68e00000000000000000000000000000000000000000000000000000000815233600482015260240161060b565b6005548b3514610bea576005546040517f93df584c00000000000000000000000000000000000000000000000000000000815260048101919091528b35602482015260440161060b565b610bf88a8a8a8a8a8a6125ec565b8151610c05906001613ff8565b60ff1687141580610c165750868514155b15610c6e578151610c28906001613ff8565b6040517ffc33647500000000000000000000000000000000000000000000000000000000815260ff9091166004820152602481018890526044810186905260640161060b565b60008a8a604051610c80929190614011565b604051908190038120610c97918e90602001614021565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152828252805160209182012083830190925260008084529083018190529092509060005b8a811015610e885760006001858a8460208110610d0457610d04613f62565b610d1191901a601b613ff8565b8f8f86818110610d2357610d23613f62565b905060200201358e8e87818110610d3c57610d3c613f62565b9050602002013560405160008152602001604052604051610d79949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa158015610d9b573d6000803e3d6000fd5b5050604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081015173ffffffffffffffffffffffffffffffffffffffff811660009081526008602090815290849020838501909452925460ff8082161515808552610100909204169383019390935290955092509050610e61576040517f20fb74ee00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260240161060b565b826020015160080260ff166001901b84019350508080610e8090613fc0565b915050610ce5565b5081827e010101010101010101010101010101010101010101010101010101010101011614610ee3576040517fc103be2e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5060009150819050610f328d826020020135848e8e8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061267c92505050565b600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff600888901c161790559092509050610f7884838388336128c6565b50505050505050505050505050565b600e5473ffffffffffffffffffffffffffffffffffffffff16338114610ff7576040517f292f4fb500000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff8216602482015260440161060b565b81516040516110099190602001614035565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190528051602090910120600f555050565b60005473ffffffffffffffffffffffffffffffffffffffff1633148015906111075750600d546040517f6b14daf800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690636b14daf8906110c4903390600090369060040161409a565b602060405180830381865afa1580156110e1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061110591906140da565b155b1561113e576040517fc04ecc2800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611148612a24565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663597d2f3c6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111db91906140f5565b905060006111e9828461410e565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660048301529192506000917f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa15801561129b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112bf91906140f5565b905081811015611305576040517fcf479181000000000000000000000000000000000000000000000000000000008152600481018290526024810183905260440161060b565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001663f99b1d688761135561134f8686614121565b89612b1f565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff90921660048301526024820152604401600060405180830381600087803b1580156113c057600080fd5b505af11580156113d4573d6000803e3d6000fd5b50505050505050505050565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000008116600483015260009182917f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015611491573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114b591906140f5565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663597d2f3c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611524573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061154891906140f5565b90506000611554612a24565b9050816115618285614134565b61156b9190614134565b935050505090565b888787601f8311156115bb576040517f809fc428000000000000000000000000000000000000000000000000000000008152601f60048201526024810184905260440161060b565b8183146115fe576040517f988a0804000000000000000000000000000000000000000000000000000000008152600481018490526024810183905260440161060b565b61160981600361415b565b60ff168311611650576040517ffda9db7800000000000000000000000000000000000000000000000000000000815260ff821660048201526024810184905260440161060b565b61165c8160ff16612b39565b611664612569565b60006040518060c001604052808f8f80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505081526020018d8d8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050509082525060ff8c1660208083019190915260408051601f8d0183900483028101830182528c8152920191908c908c908190840183828082843760009201919091525050509082525067ffffffffffffffff891660208083019190915260408051601f8a01839004830281018301825289815292019190899089908190840183828082843760009201919091525050509152509050611786612b73565b60095460005b8181101561187f576000600982815481106117a9576117a9613f62565b6000918252602082200154600a805473ffffffffffffffffffffffffffffffffffffffff909216935090849081106117e3576117e3613f62565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff948516835260088252604080842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000016905594168252600790529190912080547fffffffffffffffffffffffffffffffffffff0000000000000000000000000000169055508061187781613fc0565b91505061178c565b5061188c6009600061373a565b611898600a600061373a565b60005b825151811015611c215760086000846000015183815181106118bf576118bf613f62565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff1682528101919091526040016000205460ff161561196357825180518290811061190c5761190c613f62565b60200260200101516040517f7451f83e00000000000000000000000000000000000000000000000000000000815260040161060b919073ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b604080518082019091526001815260ff82166020820152835180516008916000918590811061199457611994613f62565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281810192909252604001600090812083518154948401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00009095169015157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff161761010060ff90951694909402939093179092558401518051600792919084908110611a4657611a46613f62565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff1682528101919091526040016000205460ff1615611aec5782602001518181518110611a9557611a95613f62565b60200260200101516040517fe8d2989900000000000000000000000000000000000000000000000000000000815260040161060b919073ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b60405180606001604052806001151581526020018260ff16815260200160006bffffffffffffffffffffffff168152506007600085602001518481518110611b3657611b36613f62565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff168252818101929092526040908101600020835181549385015194909201516bffffffffffffffffffffffff1662010000027fffffffffffffffffffffffffffffffffffff000000000000000000000000ffff60ff95909516610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff931515939093167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000090941693909317919091179290921617905580611c1981613fc0565b91505061189b565b5081518051611c3891600991602090910190613758565b506020808301518051611c4f92600a920190613758565b506040820151600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff909216919091179055600454640100000000900463ffffffff16611c9f6131d5565b6004805463ffffffff928316640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff82168117909255600092611ced9281169116176001614177565b905080600460006101000a81548163ffffffff021916908363ffffffff1602179055506000611d4146308463ffffffff16886000015189602001518a604001518b606001518c608001518d60a0015161326c565b9050806005819055507f1591690b8638f5fb2dbec82ac741805ac5da8b45dc5263f4875b0496fdce4e058360055484886000015189602001518a604001518b606001518c608001518d60a00151604051611da3999897969594939291906141e5565b60405180910390a1611db58d8d613317565b505050505050505050505050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314801590611e8a5750600d546040517f6b14daf800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690636b14daf890611e47903390600090369060040161409a565b602060405180830381865afa158015611e64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e8891906140da565b155b15611ec1576040517fc04ecc2800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611ec9612b73565b6002805467ffffffffffffffff8581167101000000000000000000000000000000000081027fffffffffffffff0000000000000000ffffffffffffffffffffffffffffffffff898416690100000000000000000081027fffffffffffffffffffffffffffffff0000000000000000ffffffffffffffffff8d87166101008102919091167fffffffffffffffffffffffffffffff00000000000000000000000000000000ff909816979097171791909116919091179094556003805462ffffff87166801000000000000000081027fffffffffffffffffffffffffffffffffffffffffff00000000000000000000009092169489169485179190911790915560408051948552602085019590955293830152606082015260808101919091527f49275ddcdfc9c0519b3d094308c8bf675f06070a754ce90c152163cb6e66e8a09060a00160405180910390a15050505050565b73ffffffffffffffffffffffffffffffffffffffff8281166000908152600b602052604090205416331461207b576040517fdce38c2400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811633036120ca576040517fb387a23800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600c6020526040902080548383167fffffffffffffffffffffffff00000000000000000000000000000000000000008216811790925590911690811461216f5760405173ffffffffffffffffffffffffffffffffffffffff8084169133918616907f84f7c7c80bb8ed2279b4aab5f61cd05e6374073d38f46d7f32de8c30e9e3836790600090a45b505050565b61217c612569565b6101d781613325565b61218d612569565b6101d78161341a565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600760209081526040918290208251606081018452905460ff80821615158084526101008304909116938301939093526201000090046bffffffffffffffffffffffff1692810192909252612205575050565b600061221083610513565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663597d2f3c6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561227f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122a391906140f5565b905060006122b1828461410e565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660048301529192506000917f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015612363573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061238791906140f5565b9050818110156123cd576040517fcf479181000000000000000000000000000000000000000000000000000000008152600481018290526024810183905260440161060b565b83156125615773ffffffffffffffffffffffffffffffffffffffff8681166000908152600b602090815260408083205460079092529182902080547fffffffffffffffffffffffffffffffffffff000000000000000000000000ffff16905590517ff99b1d680000000000000000000000000000000000000000000000000000000081529082166004820181905260248201879052917f0000000000000000000000000000000000000000000000000000000000000000169063f99b1d6890604401600060405180830381600087803b1580156124a957600080fd5b505af11580156124bd573d6000803e3d6000fd5b505050507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167fd0b1dac935d85bd54cf0a33b0d41d39f8cf53a968465fc7ea2377526b8ac712c8860405161255791815260200190565b60405180910390a4505b505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146125ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640161060b565b565b60006125f982602061427b565b61260485602061427b565b6126108861014461410e565b61261a919061410e565b612624919061410e565b61262f90600061410e565b9050368114612673576040517ff7b94f0a0000000000000000000000000000000000000000000000000000000081526004810182905236602482015260440161060b565b50505050505050565b60008060008380602001905181019061269591906144bf565b905060006126a682606001516134c2565b90508082608001511461270957608082015160608301516040517faed0afe500000000000000000000000000000000000000000000000000000000815260048101929092526024820183905267ffffffffffffffff16604482015260640161060b565b81516020830151604080850151606086015191517f76f2e3f400000000000000000000000000000000000000000000000000000000815260009473ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016946376f2e3f4946127929492939192916004016147fa565b6020604051808303816000875af11580156127b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127d591906140da565b90508061280e576040517f69c920fa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8664ffffffffff167ffc3c7a7927e878a0fca37c904953c3c75cee3ca1d1640184a0ab1c65eec6274333856020015186604001518c6040516128a5949392919073ffffffffffffffffffffffffffffffffffffffff94909416845277ffffffffffffffffffffffffffffffffffffffffffffffff92909216602084015267ffffffffffffffff166040830152606082015260800190565b60405180910390a28260200151836040015194509450505050935093915050565b60006128f23a67ffffffffffffffff8616156128e257856128e8565b87604001515b88602001516135a5565b90506010360260005a9050600061291b8663ffffffff1685858c60a0015162ffffff16866135f6565b90506000670de0b6b3a764000077ffffffffffffffffffffffffffffffffffffffffffffffff8a16830273ffffffffffffffffffffffffffffffffffffffff881660009081526007602052604090205460808d01519290910492506201000090046bffffffffffffffffffffffff9081169167ffffffffffffffff16828401019081168211156129b157505050505050506109cd565b73ffffffffffffffffffffffffffffffffffffffff8816600090815260076020526040902080546bffffffffffffffffffffffff90921662010000027fffffffffffffffffffffffffffffffffffff000000000000000000000000ffff9092169190911790555050505050505050505050565b600080600a805480602002602001604051908101604052809291908181526020018280548015612a8a57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311612a5f575b505083519394506000925050505b81811015612b195760076000848381518110612ab657612ab6613f62565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002054612b05906201000090046bffffffffffffffffffffffff168561410e565b935080612b1181613fc0565b915050612a98565b50505090565b600081831015612b30575081612b33565b50805b92915050565b806000036101d7576040517fe77dba5600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612b7d612a24565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663597d2f3c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612bec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c1091906140f5565b90506000612c1e828461410e565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660048301529192506000917f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015612cd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cf491906140f5565b905081811015612d3a576040517fcf479181000000000000000000000000000000000000000000000000000000008152600481018290526024810183905260440161060b565b6000600a805480602002602001604051908101604052809291908181526020018280548015612d9f57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311612d74575b5050505050905060008151905060008167ffffffffffffffff811115612dc757612dc7613aa3565b604051908082528060200260200182016040528015612df0578160200160208202803683370190505b50905060008267ffffffffffffffff811115612e0e57612e0e613aa3565b604051908082528060200260200182016040528015612e37578160200160208202803683370190505b5090506000805b8481101561311157600060076000888481518110612e5e57612e5e613f62565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160029054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050600060076000898581518110612ee457612ee4613f62565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002080546bffffffffffffffffffffffff9290921662010000027fffffffffffffffffffffffffffffffffffff000000000000000000000000ffff909216919091179055808015613107576000600b60008a8681518110612f7557612f75613f62565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905080878681518110612fed57612fed613f62565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508186868151811061303a5761303a613f62565b60200260200101818152505084806001019550507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff168a86815181106130ae576130ae613f62565b602002602001015173ffffffffffffffffffffffffffffffffffffffff167fd0b1dac935d85bd54cf0a33b0d41d39f8cf53a968465fc7ea2377526b8ac712c856040516130fd91815260200190565b60405180910390a4505b5050600101612e3e565b5081518114613121578082528083525b8151156131ca576040517f73433a2f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906373433a2f9061319c908690869060040161496a565b600060405180830381600087803b1580156131b657600080fd5b505af1158015610f78573d6000803e3d6000fd5b505050505050505050565b60004661a4b18114806131ea575062066eed81145b1561326557606473ffffffffffffffffffffffffffffffffffffffff1663a3b1b31d6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561323b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061325f91906140f5565b91505090565b4391505090565b6000808a8a8a8a8a8a8a8a8a604051602001613290999897969594939291906149c1565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101207dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e01000000000000000000000000000000000000000000000000000000000000179150509998505050505050505050565b613321828261363e565b5050565b3373ffffffffffffffffffffffffffffffffffffffff8216036133a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161060b565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600d5473ffffffffffffffffffffffffffffffffffffffff908116908216811461332157600d80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84811691821790925560408051928416835260208301919091527f793cb73064f3c8cde7e187ae515511e6e56d1ee89bf08b82fa60fb70f8d48912910160405180910390a15050565b60004661a4b18114806134d7575062066eed81145b15613595576101008367ffffffffffffffff166134f26131d5565b6134fc9190614121565b111561350b5750600092915050565b6040517f2b407a8200000000000000000000000000000000000000000000000000000000815267ffffffffffffffff84166004820152606490632b407a8290602401602060405180830381865afa15801561356a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061358e91906140f5565b9392505050565b505067ffffffffffffffff164090565b60008367ffffffffffffffff84168110156135d9576002858567ffffffffffffffff1603816135d6576135d661493b565b04015b6135ed818467ffffffffffffffff16612b1f565b95945050505050565b600081861015613632576040517f3fef97df00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50909303019091010290565b610100818114613680578282826040517f418a179b00000000000000000000000000000000000000000000000000000000815260040161060b93929190614a56565b600061368e83850185614a7a565b90506040517f8eef585f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690638eef585f90613702908490600401614ae4565b600060405180830381600087803b15801561371c57600080fd5b505af1158015613730573d6000803e3d6000fd5b5050505050505050565b50805460008255906000526020600020908101906101d791906137e2565b8280548282559060005260206000209081019282156137d2579160200282015b828111156137d257825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602090920191600190910190613778565b506137de9291506137e2565b5090565b5b808211156137de57600081556001016137e3565b60006020828403121561380957600080fd5b813567ffffffffffffffff81111561382057600080fd5b820160a0818503121561358e57600080fd5b73ffffffffffffffffffffffffffffffffffffffff811681146101d757600080fd5b60006020828403121561386657600080fd5b813561358e81613832565b60005b8381101561388c578181015183820152602001613874565b50506000910152565b600081518084526138ad816020860160208601613871565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061358e6020830184613895565b60008083601f84011261390457600080fd5b50813567ffffffffffffffff81111561391c57600080fd5b6020830191508360208260051b850101111561393757600080fd5b9250929050565b6000806000806040858703121561395457600080fd5b843567ffffffffffffffff8082111561396c57600080fd5b613978888389016138f2565b9096509450602087013591508082111561399157600080fd5b5061399e878288016138f2565b95989497509550505050565b60008083601f8401126139bc57600080fd5b50813567ffffffffffffffff8111156139d457600080fd5b60208301915083602082850101111561393757600080fd5b60008060008060008060008060e0898b031215613a0857600080fd5b606089018a811115613a1957600080fd5b8998503567ffffffffffffffff80821115613a3357600080fd5b613a3f8c838d016139aa565b909950975060808b0135915080821115613a5857600080fd5b613a648c838d016138f2565b909750955060a08b0135915080821115613a7d57600080fd5b50613a8a8b828c016138f2565b999c989b50969995989497949560c00135949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715613af557613af5613aa3565b60405290565b604051610100810167ffffffffffffffff81118282101715613af557613af5613aa3565b60405160a0810167ffffffffffffffff81118282101715613af557613af5613aa3565b6040516020810167ffffffffffffffff81118282101715613af557613af5613aa3565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613bac57613bac613aa3565b604052919050565b600067ffffffffffffffff821115613bce57613bce613aa3565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600067ffffffffffffffff821115613c1457613c14613aa3565b5060051b60200190565b600082601f830112613c2f57600080fd5b81356020613c44613c3f83613bfa565b613b65565b82815260059290921b84018101918181019086841115613c6357600080fd5b8286015b84811015613c7e5780358352918301918301613c67565b509695505050505050565b60006020808385031215613c9c57600080fd5b823567ffffffffffffffff80821115613cb457600080fd5b9084019060408287031215613cc857600080fd5b613cd0613ad2565b823582811115613cdf57600080fd5b8301601f81018813613cf057600080fd5b8035613cfe613c3f82613bb4565b8181528987838501011115613d1257600080fd5b818784018883013760008783830101528084525050508383013582811115613d3957600080fd5b613d4588828601613c1e565b948201949094529695505050505050565b60008060408385031215613d6957600080fd5b8235613d7481613832565b946020939093013593505050565b803560ff81168114613d9357600080fd5b919050565b67ffffffffffffffff811681146101d757600080fd5b8035613d9381613d98565b60008060008060008060008060008060c08b8d031215613dd857600080fd5b8a3567ffffffffffffffff80821115613df057600080fd5b613dfc8e838f016138f2565b909c509a5060208d0135915080821115613e1557600080fd5b613e218e838f016138f2565b909a509850889150613e3560408e01613d82565b975060608d0135915080821115613e4b57600080fd5b613e578e838f016139aa565b9097509550859150613e6b60808e01613dae565b945060a08d0135915080821115613e8157600080fd5b50613e8e8d828e016139aa565b915080935050809150509295989b9194979a5092959850565b62ffffff811681146101d757600080fd5b600080600080600060a08688031215613ed057600080fd5b8535613edb81613d98565b94506020860135613eeb81613d98565b93506040860135613efb81613d98565b92506060860135613f0b81613d98565b91506080860135613f1b81613ea7565b809150509295509295909350565b60008060408385031215613f3c57600080fd5b8235613f4781613832565b91506020830135613f5781613832565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613ff157613ff1613f91565b5060010190565b60ff8181168382160190811115612b3357612b33613f91565b8183823760009101908152919050565b828152606082602083013760800192915050565b60008251614047818460208701613871565b9190910192915050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff841681526040602082015260006135ed604083018486614051565b80518015158114613d9357600080fd5b6000602082840312156140ec57600080fd5b61358e826140ca565b60006020828403121561410757600080fd5b5051919050565b80820180821115612b3357612b33613f91565b81810381811115612b3357612b33613f91565b818103600083128015838313168383128216171561415457614154613f91565b5092915050565b60ff818116838216029081169081811461415457614154613f91565b63ffffffff81811683821601908082111561415457614154613f91565b600081518084526020808501945080840160005b838110156141da57815173ffffffffffffffffffffffffffffffffffffffff16875295820195908201906001016141a8565b509495945050505050565b600061012063ffffffff808d1684528b6020850152808b166040850152508060608401526142158184018a614194565b905082810360808401526142298189614194565b905060ff871660a084015282810360c08401526142468187613895565b905067ffffffffffffffff851660e084015282810361010084015261426b8185613895565b9c9b505050505050505050505050565b8082028115828204841417612b3357612b33613f91565b8051613d9381613d98565b805161ffff81168114613d9357600080fd5b8051613d9381613832565b600082601f8301126142cb57600080fd5b81516142d9613c3f82613bb4565b8181528460208386010111156142ee57600080fd5b6142ff826020830160208701613871565b949350505050565b80516bffffffffffffffffffffffff81168114613d9357600080fd5b600082601f83011261433457600080fd5b81516020614344613c3f83613bfa565b82815260059290921b8401810191818101908684111561436357600080fd5b8286015b84811015613c7e57805167ffffffffffffffff8082111561438757600080fd5b908801907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06040838c03820112156143be57600080fd5b6143c6613ad2565b87840151838111156143d757600080fd5b8401610100818e03840112156143ec57600080fd5b6143f4613afb565b92508881015183526144086040820161429d565b89840152614418606082016142af565b604084015260808101518481111561442f57600080fd5b61443d8e8b838501016142ba565b60608501525061444f60a08201614307565b608084015260c081015160a084015260e081015160c084015261010081015160e08401525081815261448360408501614307565b818901528652505050918301918301614367565b805177ffffffffffffffffffffffffffffffffffffffffffffffff81168114613d9357600080fd5b6000602082840312156144d157600080fd5b815167ffffffffffffffff808211156144e957600080fd5b9083019060a082860312156144fd57600080fd5b614505613b1f565b82518281111561451457600080fd5b8301601f8101871361452557600080fd5b8051614533613c3f82613bfa565b8082825260208201915060208360051b85010192508983111561455557600080fd5b602084015b838110156146a25780518781111561457157600080fd5b850160c0818d037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00112156145a557600080fd5b6145ad613b1f565b60208201516145bb81613d98565b815260408201516145cb81613ea7565b60208201526040828e037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa001121561460257600080fd5b61460a613b42565b8d607f84011261461957600080fd5b614621613ad2565b808f60a08601111561463257600080fd5b606085015b60a08601811015614652578051835260209283019201614637565b50825250604082015260a08201518981111561466d57600080fd5b61467c8e602083860101614323565b60608301525061468e60c083016140ca565b60808201528452506020928301920161455a565b508452506146b591505060208401614497565b60208201526146c660408401614292565b60408201526146d760608401614292565b60608201526080830151608082015280935050505092915050565b600081518084526020808501808196508360051b8101915082860160005b858110156147ed57828403895281516040815181875280518288015287810151606061ffff8216818a01528383015193506080915073ffffffffffffffffffffffffffffffffffffffff8416828a01528083015193505061010060a081818b015261477f6101408b0186613895565b9284015192945060c06147a18b8201856bffffffffffffffffffffffff169052565b9084015160e08b81019190915290840151918a01919091529091015161012088015250908601516bffffffffffffffffffffffff16948601949094529784019790840190600101614710565b5091979650505050505050565b6000608080830181845280885180835260a092508286019150828160051b8701016020808c016000805b858110156148df578a85037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600187528251805167ffffffffffffffff1686528481015162ffffff16858701526040808201515160c091859089015b600282101561489e57825181529188019160019190910190880161487f565b5050506060820151818c8901526148b7828901826146f2565b928c0151801515898d01529291506148cc9050565b9785019795505091830191600101614824565b50505081965061490a8189018c77ffffffffffffffffffffffffffffffffffffffffffffffff169052565b505050505050614926604083018567ffffffffffffffff169052565b67ffffffffffffffff831660608301526135ed565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60408152600061497d6040830185614194565b82810360208481019190915284518083528582019282019060005b818110156149b457845183529383019391830191600101614998565b5090979650505050505050565b60006101208b835273ffffffffffffffffffffffffffffffffffffffff8b16602084015267ffffffffffffffff808b166040850152816060850152614a088285018b614194565b91508382036080850152614a1c828a614194565b915060ff881660a085015283820360c0850152614a398288613895565b90861660e0850152838103610100850152905061426b8185613895565b604081526000614a6a604083018587614051565b9050826020830152949350505050565b6000610100808385031215614a8e57600080fd5b83601f840112614a9d57600080fd5b614aa5613afb565b908301908085831115614ab757600080fd5b845b83811015614ada578035614acc81613ea7565b835260209283019201614ab9565b5095945050505050565b6101008101818360005b6008811015614b1257815162ffffff16835260209283019290910190600101614aee565b5050509291505056fea164736f6c6343000813000a", -} - -var VRFBeaconABI = VRFBeaconMetaData.ABI - -var VRFBeaconBin = VRFBeaconMetaData.Bin - -func DeployVRFBeacon(auth *bind.TransactOpts, backend bind.ContractBackend, link common.Address, coordinator common.Address, keyProvider common.Address, keyID [32]byte) (common.Address, *types.Transaction, *VRFBeacon, error) { - parsed, err := VRFBeaconMetaData.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(VRFBeaconBin), backend, link, coordinator, keyProvider, keyID) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &VRFBeacon{VRFBeaconCaller: VRFBeaconCaller{contract: contract}, VRFBeaconTransactor: VRFBeaconTransactor{contract: contract}, VRFBeaconFilterer: VRFBeaconFilterer{contract: contract}}, nil -} - -type VRFBeacon struct { - address common.Address - abi abi.ABI - VRFBeaconCaller - VRFBeaconTransactor - VRFBeaconFilterer -} - -type VRFBeaconCaller struct { - contract *bind.BoundContract -} - -type VRFBeaconTransactor struct { - contract *bind.BoundContract -} - -type VRFBeaconFilterer struct { - contract *bind.BoundContract -} - -type VRFBeaconSession struct { - Contract *VRFBeacon - CallOpts bind.CallOpts - TransactOpts bind.TransactOpts -} - -type VRFBeaconCallerSession struct { - Contract *VRFBeaconCaller - CallOpts bind.CallOpts -} - -type VRFBeaconTransactorSession struct { - Contract *VRFBeaconTransactor - TransactOpts bind.TransactOpts -} - -type VRFBeaconRaw struct { - Contract *VRFBeacon -} - -type VRFBeaconCallerRaw struct { - Contract *VRFBeaconCaller -} - -type VRFBeaconTransactorRaw struct { - Contract *VRFBeaconTransactor -} - -func NewVRFBeacon(address common.Address, backend bind.ContractBackend) (*VRFBeacon, error) { - abi, err := abi.JSON(strings.NewReader(VRFBeaconABI)) - if err != nil { - return nil, err - } - contract, err := bindVRFBeacon(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &VRFBeacon{address: address, abi: abi, VRFBeaconCaller: VRFBeaconCaller{contract: contract}, VRFBeaconTransactor: VRFBeaconTransactor{contract: contract}, VRFBeaconFilterer: VRFBeaconFilterer{contract: contract}}, nil -} - -func NewVRFBeaconCaller(address common.Address, caller bind.ContractCaller) (*VRFBeaconCaller, error) { - contract, err := bindVRFBeacon(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &VRFBeaconCaller{contract: contract}, nil -} - -func NewVRFBeaconTransactor(address common.Address, transactor bind.ContractTransactor) (*VRFBeaconTransactor, error) { - contract, err := bindVRFBeacon(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &VRFBeaconTransactor{contract: contract}, nil -} - -func NewVRFBeaconFilterer(address common.Address, filterer bind.ContractFilterer) (*VRFBeaconFilterer, error) { - contract, err := bindVRFBeacon(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &VRFBeaconFilterer{contract: contract}, nil -} - -func bindVRFBeacon(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := VRFBeaconMetaData.GetAbi() - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil -} - -func (_VRFBeacon *VRFBeaconRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _VRFBeacon.Contract.VRFBeaconCaller.contract.Call(opts, result, method, params...) -} - -func (_VRFBeacon *VRFBeaconRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _VRFBeacon.Contract.VRFBeaconTransactor.contract.Transfer(opts) -} - -func (_VRFBeacon *VRFBeaconRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _VRFBeacon.Contract.VRFBeaconTransactor.contract.Transact(opts, method, params...) -} - -func (_VRFBeacon *VRFBeaconCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _VRFBeacon.Contract.contract.Call(opts, result, method, params...) -} - -func (_VRFBeacon *VRFBeaconTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _VRFBeacon.Contract.contract.Transfer(opts) -} - -func (_VRFBeacon *VRFBeaconTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _VRFBeacon.Contract.contract.Transact(opts, method, params...) -} - -func (_VRFBeacon *VRFBeaconCaller) NUMCONFDELAYS(opts *bind.CallOpts) (uint8, error) { - var out []interface{} - err := _VRFBeacon.contract.Call(opts, &out, "NUM_CONF_DELAYS") - - if err != nil { - return *new(uint8), err - } - - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) - - return out0, err - -} - -func (_VRFBeacon *VRFBeaconSession) NUMCONFDELAYS() (uint8, error) { - return _VRFBeacon.Contract.NUMCONFDELAYS(&_VRFBeacon.CallOpts) -} - -func (_VRFBeacon *VRFBeaconCallerSession) NUMCONFDELAYS() (uint8, error) { - return _VRFBeacon.Contract.NUMCONFDELAYS(&_VRFBeacon.CallOpts) -} - -func (_VRFBeacon *VRFBeaconCaller) GetBilling(opts *bind.CallOpts) (GetBilling, - - error) { - var out []interface{} - err := _VRFBeacon.contract.Call(opts, &out, "getBilling") - - outstruct := new(GetBilling) - if err != nil { - return *outstruct, err - } - - outstruct.MaximumGasPrice = *abi.ConvertType(out[0], new(uint64)).(*uint64) - outstruct.ReasonableGasPrice = *abi.ConvertType(out[1], new(uint64)).(*uint64) - outstruct.ObservationPayment = *abi.ConvertType(out[2], new(uint64)).(*uint64) - outstruct.TransmissionPayment = *abi.ConvertType(out[3], new(uint64)).(*uint64) - outstruct.AccountingGas = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int) - - return *outstruct, err - -} - -func (_VRFBeacon *VRFBeaconSession) GetBilling() (GetBilling, - - error) { - return _VRFBeacon.Contract.GetBilling(&_VRFBeacon.CallOpts) -} - -func (_VRFBeacon *VRFBeaconCallerSession) GetBilling() (GetBilling, - - error) { - return _VRFBeacon.Contract.GetBilling(&_VRFBeacon.CallOpts) -} - -func (_VRFBeacon *VRFBeaconCaller) GetBillingAccessController(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _VRFBeacon.contract.Call(opts, &out, "getBillingAccessController") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_VRFBeacon *VRFBeaconSession) GetBillingAccessController() (common.Address, error) { - return _VRFBeacon.Contract.GetBillingAccessController(&_VRFBeacon.CallOpts) -} - -func (_VRFBeacon *VRFBeaconCallerSession) GetBillingAccessController() (common.Address, error) { - return _VRFBeacon.Contract.GetBillingAccessController(&_VRFBeacon.CallOpts) -} - -func (_VRFBeacon *VRFBeaconCaller) ICoordinator(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _VRFBeacon.contract.Call(opts, &out, "i_coordinator") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_VRFBeacon *VRFBeaconSession) ICoordinator() (common.Address, error) { - return _VRFBeacon.Contract.ICoordinator(&_VRFBeacon.CallOpts) -} - -func (_VRFBeacon *VRFBeaconCallerSession) ICoordinator() (common.Address, error) { - return _VRFBeacon.Contract.ICoordinator(&_VRFBeacon.CallOpts) -} - -func (_VRFBeacon *VRFBeaconCaller) ILink(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _VRFBeacon.contract.Call(opts, &out, "i_link") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_VRFBeacon *VRFBeaconSession) ILink() (common.Address, error) { - return _VRFBeacon.Contract.ILink(&_VRFBeacon.CallOpts) -} - -func (_VRFBeacon *VRFBeaconCallerSession) ILink() (common.Address, error) { - return _VRFBeacon.Contract.ILink(&_VRFBeacon.CallOpts) -} - -func (_VRFBeacon *VRFBeaconCaller) LatestConfigDetails(opts *bind.CallOpts) (LatestConfigDetails, - - error) { - var out []interface{} - err := _VRFBeacon.contract.Call(opts, &out, "latestConfigDetails") - - outstruct := new(LatestConfigDetails) - if err != nil { - return *outstruct, err - } - - outstruct.ConfigCount = *abi.ConvertType(out[0], new(uint32)).(*uint32) - outstruct.BlockNumber = *abi.ConvertType(out[1], new(uint32)).(*uint32) - outstruct.ConfigDigest = *abi.ConvertType(out[2], new([32]byte)).(*[32]byte) - - return *outstruct, err - -} - -func (_VRFBeacon *VRFBeaconSession) LatestConfigDetails() (LatestConfigDetails, - - error) { - return _VRFBeacon.Contract.LatestConfigDetails(&_VRFBeacon.CallOpts) -} - -func (_VRFBeacon *VRFBeaconCallerSession) LatestConfigDetails() (LatestConfigDetails, - - error) { - return _VRFBeacon.Contract.LatestConfigDetails(&_VRFBeacon.CallOpts) -} - -func (_VRFBeacon *VRFBeaconCaller) LatestConfigDigestAndEpoch(opts *bind.CallOpts) (LatestConfigDigestAndEpoch, - - error) { - var out []interface{} - err := _VRFBeacon.contract.Call(opts, &out, "latestConfigDigestAndEpoch") - - outstruct := new(LatestConfigDigestAndEpoch) - if err != nil { - return *outstruct, err - } - - outstruct.ScanLogs = *abi.ConvertType(out[0], new(bool)).(*bool) - outstruct.ConfigDigest = *abi.ConvertType(out[1], new([32]byte)).(*[32]byte) - outstruct.Epoch = *abi.ConvertType(out[2], new(uint32)).(*uint32) - - return *outstruct, err - -} - -func (_VRFBeacon *VRFBeaconSession) LatestConfigDigestAndEpoch() (LatestConfigDigestAndEpoch, - - error) { - return _VRFBeacon.Contract.LatestConfigDigestAndEpoch(&_VRFBeacon.CallOpts) -} - -func (_VRFBeacon *VRFBeaconCallerSession) LatestConfigDigestAndEpoch() (LatestConfigDigestAndEpoch, - - error) { - return _VRFBeacon.Contract.LatestConfigDigestAndEpoch(&_VRFBeacon.CallOpts) -} - -func (_VRFBeacon *VRFBeaconCaller) LinkAvailableForPayment(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _VRFBeacon.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 (_VRFBeacon *VRFBeaconSession) LinkAvailableForPayment() (*big.Int, error) { - return _VRFBeacon.Contract.LinkAvailableForPayment(&_VRFBeacon.CallOpts) -} - -func (_VRFBeacon *VRFBeaconCallerSession) LinkAvailableForPayment() (*big.Int, error) { - return _VRFBeacon.Contract.LinkAvailableForPayment(&_VRFBeacon.CallOpts) -} - -func (_VRFBeacon *VRFBeaconCaller) OwedPayment(opts *bind.CallOpts, transmitterAddress common.Address) (*big.Int, error) { - var out []interface{} - err := _VRFBeacon.contract.Call(opts, &out, "owedPayment", transmitterAddress) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_VRFBeacon *VRFBeaconSession) OwedPayment(transmitterAddress common.Address) (*big.Int, error) { - return _VRFBeacon.Contract.OwedPayment(&_VRFBeacon.CallOpts, transmitterAddress) -} - -func (_VRFBeacon *VRFBeaconCallerSession) OwedPayment(transmitterAddress common.Address) (*big.Int, error) { - return _VRFBeacon.Contract.OwedPayment(&_VRFBeacon.CallOpts, transmitterAddress) -} - -func (_VRFBeacon *VRFBeaconCaller) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _VRFBeacon.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 (_VRFBeacon *VRFBeaconSession) Owner() (common.Address, error) { - return _VRFBeacon.Contract.Owner(&_VRFBeacon.CallOpts) -} - -func (_VRFBeacon *VRFBeaconCallerSession) Owner() (common.Address, error) { - return _VRFBeacon.Contract.Owner(&_VRFBeacon.CallOpts) -} - -func (_VRFBeacon *VRFBeaconCaller) SKeyID(opts *bind.CallOpts) ([32]byte, error) { - var out []interface{} - err := _VRFBeacon.contract.Call(opts, &out, "s_keyID") - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -func (_VRFBeacon *VRFBeaconSession) SKeyID() ([32]byte, error) { - return _VRFBeacon.Contract.SKeyID(&_VRFBeacon.CallOpts) -} - -func (_VRFBeacon *VRFBeaconCallerSession) SKeyID() ([32]byte, error) { - return _VRFBeacon.Contract.SKeyID(&_VRFBeacon.CallOpts) -} - -func (_VRFBeacon *VRFBeaconCaller) SKeyProvider(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _VRFBeacon.contract.Call(opts, &out, "s_keyProvider") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_VRFBeacon *VRFBeaconSession) SKeyProvider() (common.Address, error) { - return _VRFBeacon.Contract.SKeyProvider(&_VRFBeacon.CallOpts) -} - -func (_VRFBeacon *VRFBeaconCallerSession) SKeyProvider() (common.Address, error) { - return _VRFBeacon.Contract.SKeyProvider(&_VRFBeacon.CallOpts) -} - -func (_VRFBeacon *VRFBeaconCaller) SProvingKeyHash(opts *bind.CallOpts) ([32]byte, error) { - var out []interface{} - err := _VRFBeacon.contract.Call(opts, &out, "s_provingKeyHash") - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -func (_VRFBeacon *VRFBeaconSession) SProvingKeyHash() ([32]byte, error) { - return _VRFBeacon.Contract.SProvingKeyHash(&_VRFBeacon.CallOpts) -} - -func (_VRFBeacon *VRFBeaconCallerSession) SProvingKeyHash() ([32]byte, error) { - return _VRFBeacon.Contract.SProvingKeyHash(&_VRFBeacon.CallOpts) -} - -func (_VRFBeacon *VRFBeaconCaller) TypeAndVersion(opts *bind.CallOpts) (string, error) { - var out []interface{} - err := _VRFBeacon.contract.Call(opts, &out, "typeAndVersion") - - if err != nil { - return *new(string), err - } - - out0 := *abi.ConvertType(out[0], new(string)).(*string) - - return out0, err - -} - -func (_VRFBeacon *VRFBeaconSession) TypeAndVersion() (string, error) { - return _VRFBeacon.Contract.TypeAndVersion(&_VRFBeacon.CallOpts) -} - -func (_VRFBeacon *VRFBeaconCallerSession) TypeAndVersion() (string, error) { - return _VRFBeacon.Contract.TypeAndVersion(&_VRFBeacon.CallOpts) -} - -func (_VRFBeacon *VRFBeaconTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _VRFBeacon.contract.Transact(opts, "acceptOwnership") -} - -func (_VRFBeacon *VRFBeaconSession) AcceptOwnership() (*types.Transaction, error) { - return _VRFBeacon.Contract.AcceptOwnership(&_VRFBeacon.TransactOpts) -} - -func (_VRFBeacon *VRFBeaconTransactorSession) AcceptOwnership() (*types.Transaction, error) { - return _VRFBeacon.Contract.AcceptOwnership(&_VRFBeacon.TransactOpts) -} - -func (_VRFBeacon *VRFBeaconTransactor) AcceptPayeeship(opts *bind.TransactOpts, transmitter common.Address) (*types.Transaction, error) { - return _VRFBeacon.contract.Transact(opts, "acceptPayeeship", transmitter) -} - -func (_VRFBeacon *VRFBeaconSession) AcceptPayeeship(transmitter common.Address) (*types.Transaction, error) { - return _VRFBeacon.Contract.AcceptPayeeship(&_VRFBeacon.TransactOpts, transmitter) -} - -func (_VRFBeacon *VRFBeaconTransactorSession) AcceptPayeeship(transmitter common.Address) (*types.Transaction, error) { - return _VRFBeacon.Contract.AcceptPayeeship(&_VRFBeacon.TransactOpts, transmitter) -} - -func (_VRFBeacon *VRFBeaconTransactor) ExposeType(opts *bind.TransactOpts, arg0 VRFBeaconReportReport) (*types.Transaction, error) { - return _VRFBeacon.contract.Transact(opts, "exposeType", arg0) -} - -func (_VRFBeacon *VRFBeaconSession) ExposeType(arg0 VRFBeaconReportReport) (*types.Transaction, error) { - return _VRFBeacon.Contract.ExposeType(&_VRFBeacon.TransactOpts, arg0) -} - -func (_VRFBeacon *VRFBeaconTransactorSession) ExposeType(arg0 VRFBeaconReportReport) (*types.Transaction, error) { - return _VRFBeacon.Contract.ExposeType(&_VRFBeacon.TransactOpts, arg0) -} - -func (_VRFBeacon *VRFBeaconTransactor) KeyGenerated(opts *bind.TransactOpts, kd KeyDataStructKeyData) (*types.Transaction, error) { - return _VRFBeacon.contract.Transact(opts, "keyGenerated", kd) -} - -func (_VRFBeacon *VRFBeaconSession) KeyGenerated(kd KeyDataStructKeyData) (*types.Transaction, error) { - return _VRFBeacon.Contract.KeyGenerated(&_VRFBeacon.TransactOpts, kd) -} - -func (_VRFBeacon *VRFBeaconTransactorSession) KeyGenerated(kd KeyDataStructKeyData) (*types.Transaction, error) { - return _VRFBeacon.Contract.KeyGenerated(&_VRFBeacon.TransactOpts, kd) -} - -func (_VRFBeacon *VRFBeaconTransactor) NewKeyRequested(opts *bind.TransactOpts) (*types.Transaction, error) { - return _VRFBeacon.contract.Transact(opts, "newKeyRequested") -} - -func (_VRFBeacon *VRFBeaconSession) NewKeyRequested() (*types.Transaction, error) { - return _VRFBeacon.Contract.NewKeyRequested(&_VRFBeacon.TransactOpts) -} - -func (_VRFBeacon *VRFBeaconTransactorSession) NewKeyRequested() (*types.Transaction, error) { - return _VRFBeacon.Contract.NewKeyRequested(&_VRFBeacon.TransactOpts) -} - -func (_VRFBeacon *VRFBeaconTransactor) SetBilling(opts *bind.TransactOpts, maximumGasPrice uint64, reasonableGasPrice uint64, observationPayment uint64, transmissionPayment uint64, accountingGas *big.Int) (*types.Transaction, error) { - return _VRFBeacon.contract.Transact(opts, "setBilling", maximumGasPrice, reasonableGasPrice, observationPayment, transmissionPayment, accountingGas) -} - -func (_VRFBeacon *VRFBeaconSession) SetBilling(maximumGasPrice uint64, reasonableGasPrice uint64, observationPayment uint64, transmissionPayment uint64, accountingGas *big.Int) (*types.Transaction, error) { - return _VRFBeacon.Contract.SetBilling(&_VRFBeacon.TransactOpts, maximumGasPrice, reasonableGasPrice, observationPayment, transmissionPayment, accountingGas) -} - -func (_VRFBeacon *VRFBeaconTransactorSession) SetBilling(maximumGasPrice uint64, reasonableGasPrice uint64, observationPayment uint64, transmissionPayment uint64, accountingGas *big.Int) (*types.Transaction, error) { - return _VRFBeacon.Contract.SetBilling(&_VRFBeacon.TransactOpts, maximumGasPrice, reasonableGasPrice, observationPayment, transmissionPayment, accountingGas) -} - -func (_VRFBeacon *VRFBeaconTransactor) SetBillingAccessController(opts *bind.TransactOpts, _billingAccessController common.Address) (*types.Transaction, error) { - return _VRFBeacon.contract.Transact(opts, "setBillingAccessController", _billingAccessController) -} - -func (_VRFBeacon *VRFBeaconSession) SetBillingAccessController(_billingAccessController common.Address) (*types.Transaction, error) { - return _VRFBeacon.Contract.SetBillingAccessController(&_VRFBeacon.TransactOpts, _billingAccessController) -} - -func (_VRFBeacon *VRFBeaconTransactorSession) SetBillingAccessController(_billingAccessController common.Address) (*types.Transaction, error) { - return _VRFBeacon.Contract.SetBillingAccessController(&_VRFBeacon.TransactOpts, _billingAccessController) -} - -func (_VRFBeacon *VRFBeaconTransactor) SetConfig(opts *bind.TransactOpts, signers []common.Address, transmitters []common.Address, f uint8, onchainConfig []byte, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) { - return _VRFBeacon.contract.Transact(opts, "setConfig", signers, transmitters, f, onchainConfig, offchainConfigVersion, offchainConfig) -} - -func (_VRFBeacon *VRFBeaconSession) SetConfig(signers []common.Address, transmitters []common.Address, f uint8, onchainConfig []byte, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) { - return _VRFBeacon.Contract.SetConfig(&_VRFBeacon.TransactOpts, signers, transmitters, f, onchainConfig, offchainConfigVersion, offchainConfig) -} - -func (_VRFBeacon *VRFBeaconTransactorSession) SetConfig(signers []common.Address, transmitters []common.Address, f uint8, onchainConfig []byte, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) { - return _VRFBeacon.Contract.SetConfig(&_VRFBeacon.TransactOpts, signers, transmitters, f, onchainConfig, offchainConfigVersion, offchainConfig) -} - -func (_VRFBeacon *VRFBeaconTransactor) SetPayees(opts *bind.TransactOpts, transmitters []common.Address, payees []common.Address) (*types.Transaction, error) { - return _VRFBeacon.contract.Transact(opts, "setPayees", transmitters, payees) -} - -func (_VRFBeacon *VRFBeaconSession) SetPayees(transmitters []common.Address, payees []common.Address) (*types.Transaction, error) { - return _VRFBeacon.Contract.SetPayees(&_VRFBeacon.TransactOpts, transmitters, payees) -} - -func (_VRFBeacon *VRFBeaconTransactorSession) SetPayees(transmitters []common.Address, payees []common.Address) (*types.Transaction, error) { - return _VRFBeacon.Contract.SetPayees(&_VRFBeacon.TransactOpts, transmitters, payees) -} - -func (_VRFBeacon *VRFBeaconTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { - return _VRFBeacon.contract.Transact(opts, "transferOwnership", to) -} - -func (_VRFBeacon *VRFBeaconSession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _VRFBeacon.Contract.TransferOwnership(&_VRFBeacon.TransactOpts, to) -} - -func (_VRFBeacon *VRFBeaconTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _VRFBeacon.Contract.TransferOwnership(&_VRFBeacon.TransactOpts, to) -} - -func (_VRFBeacon *VRFBeaconTransactor) TransferPayeeship(opts *bind.TransactOpts, transmitter common.Address, proposed common.Address) (*types.Transaction, error) { - return _VRFBeacon.contract.Transact(opts, "transferPayeeship", transmitter, proposed) -} - -func (_VRFBeacon *VRFBeaconSession) TransferPayeeship(transmitter common.Address, proposed common.Address) (*types.Transaction, error) { - return _VRFBeacon.Contract.TransferPayeeship(&_VRFBeacon.TransactOpts, transmitter, proposed) -} - -func (_VRFBeacon *VRFBeaconTransactorSession) TransferPayeeship(transmitter common.Address, proposed common.Address) (*types.Transaction, error) { - return _VRFBeacon.Contract.TransferPayeeship(&_VRFBeacon.TransactOpts, transmitter, proposed) -} - -func (_VRFBeacon *VRFBeaconTransactor) Transmit(opts *bind.TransactOpts, reportContext [3][32]byte, report []byte, rs [][32]byte, ss [][32]byte, rawVs [32]byte) (*types.Transaction, error) { - return _VRFBeacon.contract.Transact(opts, "transmit", reportContext, report, rs, ss, rawVs) -} - -func (_VRFBeacon *VRFBeaconSession) Transmit(reportContext [3][32]byte, report []byte, rs [][32]byte, ss [][32]byte, rawVs [32]byte) (*types.Transaction, error) { - return _VRFBeacon.Contract.Transmit(&_VRFBeacon.TransactOpts, reportContext, report, rs, ss, rawVs) -} - -func (_VRFBeacon *VRFBeaconTransactorSession) Transmit(reportContext [3][32]byte, report []byte, rs [][32]byte, ss [][32]byte, rawVs [32]byte) (*types.Transaction, error) { - return _VRFBeacon.Contract.Transmit(&_VRFBeacon.TransactOpts, reportContext, report, rs, ss, rawVs) -} - -func (_VRFBeacon *VRFBeaconTransactor) WithdrawFunds(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _VRFBeacon.contract.Transact(opts, "withdrawFunds", recipient, amount) -} - -func (_VRFBeacon *VRFBeaconSession) WithdrawFunds(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _VRFBeacon.Contract.WithdrawFunds(&_VRFBeacon.TransactOpts, recipient, amount) -} - -func (_VRFBeacon *VRFBeaconTransactorSession) WithdrawFunds(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _VRFBeacon.Contract.WithdrawFunds(&_VRFBeacon.TransactOpts, recipient, amount) -} - -func (_VRFBeacon *VRFBeaconTransactor) WithdrawPayment(opts *bind.TransactOpts, transmitter common.Address) (*types.Transaction, error) { - return _VRFBeacon.contract.Transact(opts, "withdrawPayment", transmitter) -} - -func (_VRFBeacon *VRFBeaconSession) WithdrawPayment(transmitter common.Address) (*types.Transaction, error) { - return _VRFBeacon.Contract.WithdrawPayment(&_VRFBeacon.TransactOpts, transmitter) -} - -func (_VRFBeacon *VRFBeaconTransactorSession) WithdrawPayment(transmitter common.Address) (*types.Transaction, error) { - return _VRFBeacon.Contract.WithdrawPayment(&_VRFBeacon.TransactOpts, transmitter) -} - -type VRFBeaconBillingAccessControllerSetIterator struct { - Event *VRFBeaconBillingAccessControllerSet - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFBeaconBillingAccessControllerSetIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFBeaconBillingAccessControllerSet) - 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(VRFBeaconBillingAccessControllerSet) - 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 *VRFBeaconBillingAccessControllerSetIterator) Error() error { - return it.fail -} - -func (it *VRFBeaconBillingAccessControllerSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFBeaconBillingAccessControllerSet struct { - Old common.Address - Current common.Address - Raw types.Log -} - -func (_VRFBeacon *VRFBeaconFilterer) FilterBillingAccessControllerSet(opts *bind.FilterOpts) (*VRFBeaconBillingAccessControllerSetIterator, error) { - - logs, sub, err := _VRFBeacon.contract.FilterLogs(opts, "BillingAccessControllerSet") - if err != nil { - return nil, err - } - return &VRFBeaconBillingAccessControllerSetIterator{contract: _VRFBeacon.contract, event: "BillingAccessControllerSet", logs: logs, sub: sub}, nil -} - -func (_VRFBeacon *VRFBeaconFilterer) WatchBillingAccessControllerSet(opts *bind.WatchOpts, sink chan<- *VRFBeaconBillingAccessControllerSet) (event.Subscription, error) { - - logs, sub, err := _VRFBeacon.contract.WatchLogs(opts, "BillingAccessControllerSet") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(VRFBeaconBillingAccessControllerSet) - if err := _VRFBeacon.contract.UnpackLog(event, "BillingAccessControllerSet", 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 (_VRFBeacon *VRFBeaconFilterer) ParseBillingAccessControllerSet(log types.Log) (*VRFBeaconBillingAccessControllerSet, error) { - event := new(VRFBeaconBillingAccessControllerSet) - if err := _VRFBeacon.contract.UnpackLog(event, "BillingAccessControllerSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type VRFBeaconBillingSetIterator struct { - Event *VRFBeaconBillingSet - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFBeaconBillingSetIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFBeaconBillingSet) - 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(VRFBeaconBillingSet) - 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 *VRFBeaconBillingSetIterator) Error() error { - return it.fail -} - -func (it *VRFBeaconBillingSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFBeaconBillingSet struct { - MaximumGasPrice uint64 - ReasonableGasPrice uint64 - ObservationPayment uint64 - TransmissionPayment uint64 - AccountingGas *big.Int - Raw types.Log -} - -func (_VRFBeacon *VRFBeaconFilterer) FilterBillingSet(opts *bind.FilterOpts) (*VRFBeaconBillingSetIterator, error) { - - logs, sub, err := _VRFBeacon.contract.FilterLogs(opts, "BillingSet") - if err != nil { - return nil, err - } - return &VRFBeaconBillingSetIterator{contract: _VRFBeacon.contract, event: "BillingSet", logs: logs, sub: sub}, nil -} - -func (_VRFBeacon *VRFBeaconFilterer) WatchBillingSet(opts *bind.WatchOpts, sink chan<- *VRFBeaconBillingSet) (event.Subscription, error) { - - logs, sub, err := _VRFBeacon.contract.WatchLogs(opts, "BillingSet") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(VRFBeaconBillingSet) - if err := _VRFBeacon.contract.UnpackLog(event, "BillingSet", 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 (_VRFBeacon *VRFBeaconFilterer) ParseBillingSet(log types.Log) (*VRFBeaconBillingSet, error) { - event := new(VRFBeaconBillingSet) - if err := _VRFBeacon.contract.UnpackLog(event, "BillingSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type VRFBeaconConfigSetIterator struct { - Event *VRFBeaconConfigSet - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFBeaconConfigSetIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFBeaconConfigSet) - 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(VRFBeaconConfigSet) - 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 *VRFBeaconConfigSetIterator) Error() error { - return it.fail -} - -func (it *VRFBeaconConfigSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFBeaconConfigSet 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 (_VRFBeacon *VRFBeaconFilterer) FilterConfigSet(opts *bind.FilterOpts) (*VRFBeaconConfigSetIterator, error) { - - logs, sub, err := _VRFBeacon.contract.FilterLogs(opts, "ConfigSet") - if err != nil { - return nil, err - } - return &VRFBeaconConfigSetIterator{contract: _VRFBeacon.contract, event: "ConfigSet", logs: logs, sub: sub}, nil -} - -func (_VRFBeacon *VRFBeaconFilterer) WatchConfigSet(opts *bind.WatchOpts, sink chan<- *VRFBeaconConfigSet) (event.Subscription, error) { - - logs, sub, err := _VRFBeacon.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(VRFBeaconConfigSet) - if err := _VRFBeacon.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 (_VRFBeacon *VRFBeaconFilterer) ParseConfigSet(log types.Log) (*VRFBeaconConfigSet, error) { - event := new(VRFBeaconConfigSet) - if err := _VRFBeacon.contract.UnpackLog(event, "ConfigSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type VRFBeaconNewTransmissionIterator struct { - Event *VRFBeaconNewTransmission - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFBeaconNewTransmissionIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFBeaconNewTransmission) - 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(VRFBeaconNewTransmission) - 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 *VRFBeaconNewTransmissionIterator) Error() error { - return it.fail -} - -func (it *VRFBeaconNewTransmissionIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFBeaconNewTransmission struct { - EpochAndRound *big.Int - Transmitter common.Address - JuelsPerFeeCoin *big.Int - ReasonableGasPrice uint64 - ConfigDigest [32]byte - Raw types.Log -} - -func (_VRFBeacon *VRFBeaconFilterer) FilterNewTransmission(opts *bind.FilterOpts, epochAndRound []*big.Int) (*VRFBeaconNewTransmissionIterator, error) { - - var epochAndRoundRule []interface{} - for _, epochAndRoundItem := range epochAndRound { - epochAndRoundRule = append(epochAndRoundRule, epochAndRoundItem) - } - - logs, sub, err := _VRFBeacon.contract.FilterLogs(opts, "NewTransmission", epochAndRoundRule) - if err != nil { - return nil, err - } - return &VRFBeaconNewTransmissionIterator{contract: _VRFBeacon.contract, event: "NewTransmission", logs: logs, sub: sub}, nil -} - -func (_VRFBeacon *VRFBeaconFilterer) WatchNewTransmission(opts *bind.WatchOpts, sink chan<- *VRFBeaconNewTransmission, epochAndRound []*big.Int) (event.Subscription, error) { - - var epochAndRoundRule []interface{} - for _, epochAndRoundItem := range epochAndRound { - epochAndRoundRule = append(epochAndRoundRule, epochAndRoundItem) - } - - logs, sub, err := _VRFBeacon.contract.WatchLogs(opts, "NewTransmission", epochAndRoundRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(VRFBeaconNewTransmission) - if err := _VRFBeacon.contract.UnpackLog(event, "NewTransmission", 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 (_VRFBeacon *VRFBeaconFilterer) ParseNewTransmission(log types.Log) (*VRFBeaconNewTransmission, error) { - event := new(VRFBeaconNewTransmission) - if err := _VRFBeacon.contract.UnpackLog(event, "NewTransmission", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type VRFBeaconOraclePaidIterator struct { - Event *VRFBeaconOraclePaid - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFBeaconOraclePaidIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFBeaconOraclePaid) - 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(VRFBeaconOraclePaid) - 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 *VRFBeaconOraclePaidIterator) Error() error { - return it.fail -} - -func (it *VRFBeaconOraclePaidIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFBeaconOraclePaid struct { - Transmitter common.Address - Payee common.Address - Amount *big.Int - LinkToken common.Address - Raw types.Log -} - -func (_VRFBeacon *VRFBeaconFilterer) FilterOraclePaid(opts *bind.FilterOpts, transmitter []common.Address, payee []common.Address, linkToken []common.Address) (*VRFBeaconOraclePaidIterator, error) { - - var transmitterRule []interface{} - for _, transmitterItem := range transmitter { - transmitterRule = append(transmitterRule, transmitterItem) - } - var payeeRule []interface{} - for _, payeeItem := range payee { - payeeRule = append(payeeRule, payeeItem) - } - - var linkTokenRule []interface{} - for _, linkTokenItem := range linkToken { - linkTokenRule = append(linkTokenRule, linkTokenItem) - } - - logs, sub, err := _VRFBeacon.contract.FilterLogs(opts, "OraclePaid", transmitterRule, payeeRule, linkTokenRule) - if err != nil { - return nil, err - } - return &VRFBeaconOraclePaidIterator{contract: _VRFBeacon.contract, event: "OraclePaid", logs: logs, sub: sub}, nil -} - -func (_VRFBeacon *VRFBeaconFilterer) WatchOraclePaid(opts *bind.WatchOpts, sink chan<- *VRFBeaconOraclePaid, transmitter []common.Address, payee []common.Address, linkToken []common.Address) (event.Subscription, error) { - - var transmitterRule []interface{} - for _, transmitterItem := range transmitter { - transmitterRule = append(transmitterRule, transmitterItem) - } - var payeeRule []interface{} - for _, payeeItem := range payee { - payeeRule = append(payeeRule, payeeItem) - } - - var linkTokenRule []interface{} - for _, linkTokenItem := range linkToken { - linkTokenRule = append(linkTokenRule, linkTokenItem) - } - - logs, sub, err := _VRFBeacon.contract.WatchLogs(opts, "OraclePaid", transmitterRule, payeeRule, linkTokenRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(VRFBeaconOraclePaid) - if err := _VRFBeacon.contract.UnpackLog(event, "OraclePaid", 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 (_VRFBeacon *VRFBeaconFilterer) ParseOraclePaid(log types.Log) (*VRFBeaconOraclePaid, error) { - event := new(VRFBeaconOraclePaid) - if err := _VRFBeacon.contract.UnpackLog(event, "OraclePaid", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type VRFBeaconOutputsServedIterator struct { - Event *VRFBeaconOutputsServed - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFBeaconOutputsServedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFBeaconOutputsServed) - 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(VRFBeaconOutputsServed) - 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 *VRFBeaconOutputsServedIterator) Error() error { - return it.fail -} - -func (it *VRFBeaconOutputsServedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFBeaconOutputsServed struct { - RecentBlockHeight uint64 - JuelsPerFeeCoin *big.Int - ReasonableGasPrice uint64 - OutputsServed []VRFBeaconTypesOutputServed - Raw types.Log -} - -func (_VRFBeacon *VRFBeaconFilterer) FilterOutputsServed(opts *bind.FilterOpts) (*VRFBeaconOutputsServedIterator, error) { - - logs, sub, err := _VRFBeacon.contract.FilterLogs(opts, "OutputsServed") - if err != nil { - return nil, err - } - return &VRFBeaconOutputsServedIterator{contract: _VRFBeacon.contract, event: "OutputsServed", logs: logs, sub: sub}, nil -} - -func (_VRFBeacon *VRFBeaconFilterer) WatchOutputsServed(opts *bind.WatchOpts, sink chan<- *VRFBeaconOutputsServed) (event.Subscription, error) { - - logs, sub, err := _VRFBeacon.contract.WatchLogs(opts, "OutputsServed") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(VRFBeaconOutputsServed) - if err := _VRFBeacon.contract.UnpackLog(event, "OutputsServed", 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 (_VRFBeacon *VRFBeaconFilterer) ParseOutputsServed(log types.Log) (*VRFBeaconOutputsServed, error) { - event := new(VRFBeaconOutputsServed) - if err := _VRFBeacon.contract.UnpackLog(event, "OutputsServed", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type VRFBeaconOwnershipTransferRequestedIterator struct { - Event *VRFBeaconOwnershipTransferRequested - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFBeaconOwnershipTransferRequestedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFBeaconOwnershipTransferRequested) - 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(VRFBeaconOwnershipTransferRequested) - 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 *VRFBeaconOwnershipTransferRequestedIterator) Error() error { - return it.fail -} - -func (it *VRFBeaconOwnershipTransferRequestedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFBeaconOwnershipTransferRequested struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_VRFBeacon *VRFBeaconFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFBeaconOwnershipTransferRequestedIterator, 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 := _VRFBeacon.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) - if err != nil { - return nil, err - } - return &VRFBeaconOwnershipTransferRequestedIterator{contract: _VRFBeacon.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil -} - -func (_VRFBeacon *VRFBeaconFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *VRFBeaconOwnershipTransferRequested, 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 := _VRFBeacon.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(VRFBeaconOwnershipTransferRequested) - if err := _VRFBeacon.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 (_VRFBeacon *VRFBeaconFilterer) ParseOwnershipTransferRequested(log types.Log) (*VRFBeaconOwnershipTransferRequested, error) { - event := new(VRFBeaconOwnershipTransferRequested) - if err := _VRFBeacon.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type VRFBeaconOwnershipTransferredIterator struct { - Event *VRFBeaconOwnershipTransferred - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFBeaconOwnershipTransferredIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFBeaconOwnershipTransferred) - 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(VRFBeaconOwnershipTransferred) - 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 *VRFBeaconOwnershipTransferredIterator) Error() error { - return it.fail -} - -func (it *VRFBeaconOwnershipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFBeaconOwnershipTransferred struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_VRFBeacon *VRFBeaconFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFBeaconOwnershipTransferredIterator, 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 := _VRFBeacon.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) - if err != nil { - return nil, err - } - return &VRFBeaconOwnershipTransferredIterator{contract: _VRFBeacon.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil -} - -func (_VRFBeacon *VRFBeaconFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *VRFBeaconOwnershipTransferred, 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 := _VRFBeacon.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(VRFBeaconOwnershipTransferred) - if err := _VRFBeacon.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 (_VRFBeacon *VRFBeaconFilterer) ParseOwnershipTransferred(log types.Log) (*VRFBeaconOwnershipTransferred, error) { - event := new(VRFBeaconOwnershipTransferred) - if err := _VRFBeacon.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type VRFBeaconPayeeshipTransferRequestedIterator struct { - Event *VRFBeaconPayeeshipTransferRequested - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFBeaconPayeeshipTransferRequestedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFBeaconPayeeshipTransferRequested) - 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(VRFBeaconPayeeshipTransferRequested) - 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 *VRFBeaconPayeeshipTransferRequestedIterator) Error() error { - return it.fail -} - -func (it *VRFBeaconPayeeshipTransferRequestedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFBeaconPayeeshipTransferRequested struct { - Transmitter common.Address - Current common.Address - Proposed common.Address - Raw types.Log -} - -func (_VRFBeacon *VRFBeaconFilterer) FilterPayeeshipTransferRequested(opts *bind.FilterOpts, transmitter []common.Address, current []common.Address, proposed []common.Address) (*VRFBeaconPayeeshipTransferRequestedIterator, error) { - - var transmitterRule []interface{} - for _, transmitterItem := range transmitter { - transmitterRule = append(transmitterRule, transmitterItem) - } - var currentRule []interface{} - for _, currentItem := range current { - currentRule = append(currentRule, currentItem) - } - var proposedRule []interface{} - for _, proposedItem := range proposed { - proposedRule = append(proposedRule, proposedItem) - } - - logs, sub, err := _VRFBeacon.contract.FilterLogs(opts, "PayeeshipTransferRequested", transmitterRule, currentRule, proposedRule) - if err != nil { - return nil, err - } - return &VRFBeaconPayeeshipTransferRequestedIterator{contract: _VRFBeacon.contract, event: "PayeeshipTransferRequested", logs: logs, sub: sub}, nil -} - -func (_VRFBeacon *VRFBeaconFilterer) WatchPayeeshipTransferRequested(opts *bind.WatchOpts, sink chan<- *VRFBeaconPayeeshipTransferRequested, transmitter []common.Address, current []common.Address, proposed []common.Address) (event.Subscription, error) { - - var transmitterRule []interface{} - for _, transmitterItem := range transmitter { - transmitterRule = append(transmitterRule, transmitterItem) - } - var currentRule []interface{} - for _, currentItem := range current { - currentRule = append(currentRule, currentItem) - } - var proposedRule []interface{} - for _, proposedItem := range proposed { - proposedRule = append(proposedRule, proposedItem) - } - - logs, sub, err := _VRFBeacon.contract.WatchLogs(opts, "PayeeshipTransferRequested", transmitterRule, currentRule, proposedRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(VRFBeaconPayeeshipTransferRequested) - if err := _VRFBeacon.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 (_VRFBeacon *VRFBeaconFilterer) ParsePayeeshipTransferRequested(log types.Log) (*VRFBeaconPayeeshipTransferRequested, error) { - event := new(VRFBeaconPayeeshipTransferRequested) - if err := _VRFBeacon.contract.UnpackLog(event, "PayeeshipTransferRequested", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type VRFBeaconPayeeshipTransferredIterator struct { - Event *VRFBeaconPayeeshipTransferred - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFBeaconPayeeshipTransferredIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFBeaconPayeeshipTransferred) - 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(VRFBeaconPayeeshipTransferred) - 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 *VRFBeaconPayeeshipTransferredIterator) Error() error { - return it.fail -} - -func (it *VRFBeaconPayeeshipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFBeaconPayeeshipTransferred struct { - Transmitter common.Address - Previous common.Address - Current common.Address - Raw types.Log -} - -func (_VRFBeacon *VRFBeaconFilterer) FilterPayeeshipTransferred(opts *bind.FilterOpts, transmitter []common.Address, previous []common.Address, current []common.Address) (*VRFBeaconPayeeshipTransferredIterator, error) { - - var transmitterRule []interface{} - for _, transmitterItem := range transmitter { - transmitterRule = append(transmitterRule, transmitterItem) - } - var previousRule []interface{} - for _, previousItem := range previous { - previousRule = append(previousRule, previousItem) - } - var currentRule []interface{} - for _, currentItem := range current { - currentRule = append(currentRule, currentItem) - } - - logs, sub, err := _VRFBeacon.contract.FilterLogs(opts, "PayeeshipTransferred", transmitterRule, previousRule, currentRule) - if err != nil { - return nil, err - } - return &VRFBeaconPayeeshipTransferredIterator{contract: _VRFBeacon.contract, event: "PayeeshipTransferred", logs: logs, sub: sub}, nil -} - -func (_VRFBeacon *VRFBeaconFilterer) WatchPayeeshipTransferred(opts *bind.WatchOpts, sink chan<- *VRFBeaconPayeeshipTransferred, transmitter []common.Address, previous []common.Address, current []common.Address) (event.Subscription, error) { - - var transmitterRule []interface{} - for _, transmitterItem := range transmitter { - transmitterRule = append(transmitterRule, transmitterItem) - } - var previousRule []interface{} - for _, previousItem := range previous { - previousRule = append(previousRule, previousItem) - } - var currentRule []interface{} - for _, currentItem := range current { - currentRule = append(currentRule, currentItem) - } - - logs, sub, err := _VRFBeacon.contract.WatchLogs(opts, "PayeeshipTransferred", transmitterRule, previousRule, currentRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(VRFBeaconPayeeshipTransferred) - if err := _VRFBeacon.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 (_VRFBeacon *VRFBeaconFilterer) ParsePayeeshipTransferred(log types.Log) (*VRFBeaconPayeeshipTransferred, error) { - event := new(VRFBeaconPayeeshipTransferred) - if err := _VRFBeacon.contract.UnpackLog(event, "PayeeshipTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type VRFBeaconRandomWordsFulfilledIterator struct { - Event *VRFBeaconRandomWordsFulfilled - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFBeaconRandomWordsFulfilledIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFBeaconRandomWordsFulfilled) - 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(VRFBeaconRandomWordsFulfilled) - 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 *VRFBeaconRandomWordsFulfilledIterator) Error() error { - return it.fail -} - -func (it *VRFBeaconRandomWordsFulfilledIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFBeaconRandomWordsFulfilled struct { - RequestIDs []*big.Int - SuccessfulFulfillment []byte - TruncatedErrorData [][]byte - SubBalances []*big.Int - SubIDs []*big.Int - Raw types.Log -} - -func (_VRFBeacon *VRFBeaconFilterer) FilterRandomWordsFulfilled(opts *bind.FilterOpts) (*VRFBeaconRandomWordsFulfilledIterator, error) { - - logs, sub, err := _VRFBeacon.contract.FilterLogs(opts, "RandomWordsFulfilled") - if err != nil { - return nil, err - } - return &VRFBeaconRandomWordsFulfilledIterator{contract: _VRFBeacon.contract, event: "RandomWordsFulfilled", logs: logs, sub: sub}, nil -} - -func (_VRFBeacon *VRFBeaconFilterer) WatchRandomWordsFulfilled(opts *bind.WatchOpts, sink chan<- *VRFBeaconRandomWordsFulfilled) (event.Subscription, error) { - - logs, sub, err := _VRFBeacon.contract.WatchLogs(opts, "RandomWordsFulfilled") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(VRFBeaconRandomWordsFulfilled) - if err := _VRFBeacon.contract.UnpackLog(event, "RandomWordsFulfilled", 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 (_VRFBeacon *VRFBeaconFilterer) ParseRandomWordsFulfilled(log types.Log) (*VRFBeaconRandomWordsFulfilled, error) { - event := new(VRFBeaconRandomWordsFulfilled) - if err := _VRFBeacon.contract.UnpackLog(event, "RandomWordsFulfilled", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type VRFBeaconRandomnessFulfillmentRequestedIterator struct { - Event *VRFBeaconRandomnessFulfillmentRequested - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFBeaconRandomnessFulfillmentRequestedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFBeaconRandomnessFulfillmentRequested) - 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(VRFBeaconRandomnessFulfillmentRequested) - 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 *VRFBeaconRandomnessFulfillmentRequestedIterator) Error() error { - return it.fail -} - -func (it *VRFBeaconRandomnessFulfillmentRequestedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFBeaconRandomnessFulfillmentRequested struct { - RequestID *big.Int - Requester common.Address - NextBeaconOutputHeight uint64 - ConfDelay *big.Int - SubID *big.Int - NumWords uint16 - GasAllowance uint32 - GasPrice *big.Int - WeiPerUnitLink *big.Int - Arguments []byte - CostJuels *big.Int - NewSubBalance *big.Int - Raw types.Log -} - -func (_VRFBeacon *VRFBeaconFilterer) FilterRandomnessFulfillmentRequested(opts *bind.FilterOpts, requestID []*big.Int) (*VRFBeaconRandomnessFulfillmentRequestedIterator, error) { - - var requestIDRule []interface{} - for _, requestIDItem := range requestID { - requestIDRule = append(requestIDRule, requestIDItem) - } - - logs, sub, err := _VRFBeacon.contract.FilterLogs(opts, "RandomnessFulfillmentRequested", requestIDRule) - if err != nil { - return nil, err - } - return &VRFBeaconRandomnessFulfillmentRequestedIterator{contract: _VRFBeacon.contract, event: "RandomnessFulfillmentRequested", logs: logs, sub: sub}, nil -} - -func (_VRFBeacon *VRFBeaconFilterer) WatchRandomnessFulfillmentRequested(opts *bind.WatchOpts, sink chan<- *VRFBeaconRandomnessFulfillmentRequested, requestID []*big.Int) (event.Subscription, error) { - - var requestIDRule []interface{} - for _, requestIDItem := range requestID { - requestIDRule = append(requestIDRule, requestIDItem) - } - - logs, sub, err := _VRFBeacon.contract.WatchLogs(opts, "RandomnessFulfillmentRequested", requestIDRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(VRFBeaconRandomnessFulfillmentRequested) - if err := _VRFBeacon.contract.UnpackLog(event, "RandomnessFulfillmentRequested", 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 (_VRFBeacon *VRFBeaconFilterer) ParseRandomnessFulfillmentRequested(log types.Log) (*VRFBeaconRandomnessFulfillmentRequested, error) { - event := new(VRFBeaconRandomnessFulfillmentRequested) - if err := _VRFBeacon.contract.UnpackLog(event, "RandomnessFulfillmentRequested", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type VRFBeaconRandomnessRedeemedIterator struct { - Event *VRFBeaconRandomnessRedeemed - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFBeaconRandomnessRedeemedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFBeaconRandomnessRedeemed) - 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(VRFBeaconRandomnessRedeemed) - 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 *VRFBeaconRandomnessRedeemedIterator) Error() error { - return it.fail -} - -func (it *VRFBeaconRandomnessRedeemedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFBeaconRandomnessRedeemed struct { - RequestID *big.Int - Requester common.Address - SubID *big.Int - Raw types.Log -} - -func (_VRFBeacon *VRFBeaconFilterer) FilterRandomnessRedeemed(opts *bind.FilterOpts, requestID []*big.Int, requester []common.Address) (*VRFBeaconRandomnessRedeemedIterator, error) { - - var requestIDRule []interface{} - for _, requestIDItem := range requestID { - requestIDRule = append(requestIDRule, requestIDItem) - } - var requesterRule []interface{} - for _, requesterItem := range requester { - requesterRule = append(requesterRule, requesterItem) - } - - logs, sub, err := _VRFBeacon.contract.FilterLogs(opts, "RandomnessRedeemed", requestIDRule, requesterRule) - if err != nil { - return nil, err - } - return &VRFBeaconRandomnessRedeemedIterator{contract: _VRFBeacon.contract, event: "RandomnessRedeemed", logs: logs, sub: sub}, nil -} - -func (_VRFBeacon *VRFBeaconFilterer) WatchRandomnessRedeemed(opts *bind.WatchOpts, sink chan<- *VRFBeaconRandomnessRedeemed, requestID []*big.Int, requester []common.Address) (event.Subscription, error) { - - var requestIDRule []interface{} - for _, requestIDItem := range requestID { - requestIDRule = append(requestIDRule, requestIDItem) - } - var requesterRule []interface{} - for _, requesterItem := range requester { - requesterRule = append(requesterRule, requesterItem) - } - - logs, sub, err := _VRFBeacon.contract.WatchLogs(opts, "RandomnessRedeemed", requestIDRule, requesterRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(VRFBeaconRandomnessRedeemed) - if err := _VRFBeacon.contract.UnpackLog(event, "RandomnessRedeemed", 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 (_VRFBeacon *VRFBeaconFilterer) ParseRandomnessRedeemed(log types.Log) (*VRFBeaconRandomnessRedeemed, error) { - event := new(VRFBeaconRandomnessRedeemed) - if err := _VRFBeacon.contract.UnpackLog(event, "RandomnessRedeemed", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type VRFBeaconRandomnessRequestedIterator struct { - Event *VRFBeaconRandomnessRequested - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFBeaconRandomnessRequestedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFBeaconRandomnessRequested) - 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(VRFBeaconRandomnessRequested) - 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 *VRFBeaconRandomnessRequestedIterator) Error() error { - return it.fail -} - -func (it *VRFBeaconRandomnessRequestedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFBeaconRandomnessRequested struct { - RequestID *big.Int - Requester common.Address - NextBeaconOutputHeight uint64 - ConfDelay *big.Int - SubID *big.Int - NumWords uint16 - CostJuels *big.Int - NewSubBalance *big.Int - Raw types.Log -} - -func (_VRFBeacon *VRFBeaconFilterer) FilterRandomnessRequested(opts *bind.FilterOpts, requestID []*big.Int) (*VRFBeaconRandomnessRequestedIterator, error) { - - var requestIDRule []interface{} - for _, requestIDItem := range requestID { - requestIDRule = append(requestIDRule, requestIDItem) - } - - logs, sub, err := _VRFBeacon.contract.FilterLogs(opts, "RandomnessRequested", requestIDRule) - if err != nil { - return nil, err - } - return &VRFBeaconRandomnessRequestedIterator{contract: _VRFBeacon.contract, event: "RandomnessRequested", logs: logs, sub: sub}, nil -} - -func (_VRFBeacon *VRFBeaconFilterer) WatchRandomnessRequested(opts *bind.WatchOpts, sink chan<- *VRFBeaconRandomnessRequested, requestID []*big.Int) (event.Subscription, error) { - - var requestIDRule []interface{} - for _, requestIDItem := range requestID { - requestIDRule = append(requestIDRule, requestIDItem) - } - - logs, sub, err := _VRFBeacon.contract.WatchLogs(opts, "RandomnessRequested", requestIDRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(VRFBeaconRandomnessRequested) - if err := _VRFBeacon.contract.UnpackLog(event, "RandomnessRequested", 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 (_VRFBeacon *VRFBeaconFilterer) ParseRandomnessRequested(log types.Log) (*VRFBeaconRandomnessRequested, error) { - event := new(VRFBeaconRandomnessRequested) - if err := _VRFBeacon.contract.UnpackLog(event, "RandomnessRequested", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type GetBilling struct { - MaximumGasPrice uint64 - ReasonableGasPrice uint64 - ObservationPayment uint64 - TransmissionPayment uint64 - AccountingGas *big.Int -} -type LatestConfigDetails struct { - ConfigCount uint32 - BlockNumber uint32 - ConfigDigest [32]byte -} -type LatestConfigDigestAndEpoch struct { - ScanLogs bool - ConfigDigest [32]byte - Epoch uint32 -} - -func (_VRFBeacon *VRFBeacon) ParseLog(log types.Log) (generated.AbigenLog, error) { - switch log.Topics[0] { - case _VRFBeacon.abi.Events["BillingAccessControllerSet"].ID: - return _VRFBeacon.ParseBillingAccessControllerSet(log) - case _VRFBeacon.abi.Events["BillingSet"].ID: - return _VRFBeacon.ParseBillingSet(log) - case _VRFBeacon.abi.Events["ConfigSet"].ID: - return _VRFBeacon.ParseConfigSet(log) - case _VRFBeacon.abi.Events["NewTransmission"].ID: - return _VRFBeacon.ParseNewTransmission(log) - case _VRFBeacon.abi.Events["OraclePaid"].ID: - return _VRFBeacon.ParseOraclePaid(log) - case _VRFBeacon.abi.Events["OutputsServed"].ID: - return _VRFBeacon.ParseOutputsServed(log) - case _VRFBeacon.abi.Events["OwnershipTransferRequested"].ID: - return _VRFBeacon.ParseOwnershipTransferRequested(log) - case _VRFBeacon.abi.Events["OwnershipTransferred"].ID: - return _VRFBeacon.ParseOwnershipTransferred(log) - case _VRFBeacon.abi.Events["PayeeshipTransferRequested"].ID: - return _VRFBeacon.ParsePayeeshipTransferRequested(log) - case _VRFBeacon.abi.Events["PayeeshipTransferred"].ID: - return _VRFBeacon.ParsePayeeshipTransferred(log) - case _VRFBeacon.abi.Events["RandomWordsFulfilled"].ID: - return _VRFBeacon.ParseRandomWordsFulfilled(log) - case _VRFBeacon.abi.Events["RandomnessFulfillmentRequested"].ID: - return _VRFBeacon.ParseRandomnessFulfillmentRequested(log) - case _VRFBeacon.abi.Events["RandomnessRedeemed"].ID: - return _VRFBeacon.ParseRandomnessRedeemed(log) - case _VRFBeacon.abi.Events["RandomnessRequested"].ID: - return _VRFBeacon.ParseRandomnessRequested(log) - - default: - return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) - } -} - -func (VRFBeaconBillingAccessControllerSet) Topic() common.Hash { - return common.HexToHash("0x793cb73064f3c8cde7e187ae515511e6e56d1ee89bf08b82fa60fb70f8d48912") -} - -func (VRFBeaconBillingSet) Topic() common.Hash { - return common.HexToHash("0x49275ddcdfc9c0519b3d094308c8bf675f06070a754ce90c152163cb6e66e8a0") -} - -func (VRFBeaconConfigSet) Topic() common.Hash { - return common.HexToHash("0x1591690b8638f5fb2dbec82ac741805ac5da8b45dc5263f4875b0496fdce4e05") -} - -func (VRFBeaconNewTransmission) Topic() common.Hash { - return common.HexToHash("0xfc3c7a7927e878a0fca37c904953c3c75cee3ca1d1640184a0ab1c65eec62743") -} - -func (VRFBeaconOraclePaid) Topic() common.Hash { - return common.HexToHash("0xd0b1dac935d85bd54cf0a33b0d41d39f8cf53a968465fc7ea2377526b8ac712c") -} - -func (VRFBeaconOutputsServed) Topic() common.Hash { - return common.HexToHash("0xf10ea936d00579b4c52035ee33bf46929646b3aa87554c565d8fb2c7aa549c44") -} - -func (VRFBeaconOwnershipTransferRequested) Topic() common.Hash { - return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") -} - -func (VRFBeaconOwnershipTransferred) Topic() common.Hash { - return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") -} - -func (VRFBeaconPayeeshipTransferRequested) Topic() common.Hash { - return common.HexToHash("0x84f7c7c80bb8ed2279b4aab5f61cd05e6374073d38f46d7f32de8c30e9e38367") -} - -func (VRFBeaconPayeeshipTransferred) Topic() common.Hash { - return common.HexToHash("0x78af32efdcad432315431e9b03d27e6cd98fb79c405fdc5af7c1714d9c0f75b3") -} - -func (VRFBeaconRandomWordsFulfilled) Topic() common.Hash { - return common.HexToHash("0x8f79f730779e875ce76c428039cc2052b5b5918c2a55c598fab251c1198aec54") -} - -func (VRFBeaconRandomnessFulfillmentRequested) Topic() common.Hash { - return common.HexToHash("0x01872fb9c7d6d68af06a17347935e04412da302a377224c205e672c26e18c37f") -} - -func (VRFBeaconRandomnessRedeemed) Topic() common.Hash { - return common.HexToHash("0x16f3f633197fafab10a5df69e6f3f2f7f20092f08d8d47de0a91c0f4b96a1a25") -} - -func (VRFBeaconRandomnessRequested) Topic() common.Hash { - return common.HexToHash("0xb7933fba96b6b452eb44f99fdc08052a45dff82363d59abaff0456931c3d2459") -} - -func (_VRFBeacon *VRFBeacon) Address() common.Address { - return _VRFBeacon.address -} - -type VRFBeaconInterface interface { - NUMCONFDELAYS(opts *bind.CallOpts) (uint8, error) - - GetBilling(opts *bind.CallOpts) (GetBilling, - - error) - - GetBillingAccessController(opts *bind.CallOpts) (common.Address, error) - - ICoordinator(opts *bind.CallOpts) (common.Address, error) - - ILink(opts *bind.CallOpts) (common.Address, error) - - LatestConfigDetails(opts *bind.CallOpts) (LatestConfigDetails, - - error) - - LatestConfigDigestAndEpoch(opts *bind.CallOpts) (LatestConfigDigestAndEpoch, - - error) - - LinkAvailableForPayment(opts *bind.CallOpts) (*big.Int, error) - - OwedPayment(opts *bind.CallOpts, transmitterAddress common.Address) (*big.Int, error) - - Owner(opts *bind.CallOpts) (common.Address, error) - - SKeyID(opts *bind.CallOpts) ([32]byte, error) - - SKeyProvider(opts *bind.CallOpts) (common.Address, error) - - SProvingKeyHash(opts *bind.CallOpts) ([32]byte, error) - - TypeAndVersion(opts *bind.CallOpts) (string, error) - - AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) - - AcceptPayeeship(opts *bind.TransactOpts, transmitter common.Address) (*types.Transaction, error) - - ExposeType(opts *bind.TransactOpts, arg0 VRFBeaconReportReport) (*types.Transaction, error) - - KeyGenerated(opts *bind.TransactOpts, kd KeyDataStructKeyData) (*types.Transaction, error) - - NewKeyRequested(opts *bind.TransactOpts) (*types.Transaction, error) - - SetBilling(opts *bind.TransactOpts, maximumGasPrice uint64, reasonableGasPrice uint64, observationPayment uint64, transmissionPayment uint64, accountingGas *big.Int) (*types.Transaction, error) - - SetBillingAccessController(opts *bind.TransactOpts, _billingAccessController common.Address) (*types.Transaction, error) - - SetConfig(opts *bind.TransactOpts, signers []common.Address, transmitters []common.Address, f uint8, onchainConfig []byte, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) - - SetPayees(opts *bind.TransactOpts, transmitters []common.Address, payees []common.Address) (*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) - - Transmit(opts *bind.TransactOpts, reportContext [3][32]byte, report []byte, rs [][32]byte, ss [][32]byte, rawVs [32]byte) (*types.Transaction, error) - - WithdrawFunds(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) - - WithdrawPayment(opts *bind.TransactOpts, transmitter common.Address) (*types.Transaction, error) - - FilterBillingAccessControllerSet(opts *bind.FilterOpts) (*VRFBeaconBillingAccessControllerSetIterator, error) - - WatchBillingAccessControllerSet(opts *bind.WatchOpts, sink chan<- *VRFBeaconBillingAccessControllerSet) (event.Subscription, error) - - ParseBillingAccessControllerSet(log types.Log) (*VRFBeaconBillingAccessControllerSet, error) - - FilterBillingSet(opts *bind.FilterOpts) (*VRFBeaconBillingSetIterator, error) - - WatchBillingSet(opts *bind.WatchOpts, sink chan<- *VRFBeaconBillingSet) (event.Subscription, error) - - ParseBillingSet(log types.Log) (*VRFBeaconBillingSet, error) - - FilterConfigSet(opts *bind.FilterOpts) (*VRFBeaconConfigSetIterator, error) - - WatchConfigSet(opts *bind.WatchOpts, sink chan<- *VRFBeaconConfigSet) (event.Subscription, error) - - ParseConfigSet(log types.Log) (*VRFBeaconConfigSet, error) - - FilterNewTransmission(opts *bind.FilterOpts, epochAndRound []*big.Int) (*VRFBeaconNewTransmissionIterator, error) - - WatchNewTransmission(opts *bind.WatchOpts, sink chan<- *VRFBeaconNewTransmission, epochAndRound []*big.Int) (event.Subscription, error) - - ParseNewTransmission(log types.Log) (*VRFBeaconNewTransmission, error) - - FilterOraclePaid(opts *bind.FilterOpts, transmitter []common.Address, payee []common.Address, linkToken []common.Address) (*VRFBeaconOraclePaidIterator, error) - - WatchOraclePaid(opts *bind.WatchOpts, sink chan<- *VRFBeaconOraclePaid, transmitter []common.Address, payee []common.Address, linkToken []common.Address) (event.Subscription, error) - - ParseOraclePaid(log types.Log) (*VRFBeaconOraclePaid, error) - - FilterOutputsServed(opts *bind.FilterOpts) (*VRFBeaconOutputsServedIterator, error) - - WatchOutputsServed(opts *bind.WatchOpts, sink chan<- *VRFBeaconOutputsServed) (event.Subscription, error) - - ParseOutputsServed(log types.Log) (*VRFBeaconOutputsServed, error) - - FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFBeaconOwnershipTransferRequestedIterator, error) - - WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *VRFBeaconOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseOwnershipTransferRequested(log types.Log) (*VRFBeaconOwnershipTransferRequested, error) - - FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFBeaconOwnershipTransferredIterator, error) - - WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *VRFBeaconOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseOwnershipTransferred(log types.Log) (*VRFBeaconOwnershipTransferred, error) - - FilterPayeeshipTransferRequested(opts *bind.FilterOpts, transmitter []common.Address, current []common.Address, proposed []common.Address) (*VRFBeaconPayeeshipTransferRequestedIterator, error) - - WatchPayeeshipTransferRequested(opts *bind.WatchOpts, sink chan<- *VRFBeaconPayeeshipTransferRequested, transmitter []common.Address, current []common.Address, proposed []common.Address) (event.Subscription, error) - - ParsePayeeshipTransferRequested(log types.Log) (*VRFBeaconPayeeshipTransferRequested, error) - - FilterPayeeshipTransferred(opts *bind.FilterOpts, transmitter []common.Address, previous []common.Address, current []common.Address) (*VRFBeaconPayeeshipTransferredIterator, error) - - WatchPayeeshipTransferred(opts *bind.WatchOpts, sink chan<- *VRFBeaconPayeeshipTransferred, transmitter []common.Address, previous []common.Address, current []common.Address) (event.Subscription, error) - - ParsePayeeshipTransferred(log types.Log) (*VRFBeaconPayeeshipTransferred, error) - - FilterRandomWordsFulfilled(opts *bind.FilterOpts) (*VRFBeaconRandomWordsFulfilledIterator, error) - - WatchRandomWordsFulfilled(opts *bind.WatchOpts, sink chan<- *VRFBeaconRandomWordsFulfilled) (event.Subscription, error) - - ParseRandomWordsFulfilled(log types.Log) (*VRFBeaconRandomWordsFulfilled, error) - - FilterRandomnessFulfillmentRequested(opts *bind.FilterOpts, requestID []*big.Int) (*VRFBeaconRandomnessFulfillmentRequestedIterator, error) - - WatchRandomnessFulfillmentRequested(opts *bind.WatchOpts, sink chan<- *VRFBeaconRandomnessFulfillmentRequested, requestID []*big.Int) (event.Subscription, error) - - ParseRandomnessFulfillmentRequested(log types.Log) (*VRFBeaconRandomnessFulfillmentRequested, error) - - FilterRandomnessRedeemed(opts *bind.FilterOpts, requestID []*big.Int, requester []common.Address) (*VRFBeaconRandomnessRedeemedIterator, error) - - WatchRandomnessRedeemed(opts *bind.WatchOpts, sink chan<- *VRFBeaconRandomnessRedeemed, requestID []*big.Int, requester []common.Address) (event.Subscription, error) - - ParseRandomnessRedeemed(log types.Log) (*VRFBeaconRandomnessRedeemed, error) - - FilterRandomnessRequested(opts *bind.FilterOpts, requestID []*big.Int) (*VRFBeaconRandomnessRequestedIterator, error) - - WatchRandomnessRequested(opts *bind.WatchOpts, sink chan<- *VRFBeaconRandomnessRequested, requestID []*big.Int) (event.Subscription, error) - - ParseRandomnessRequested(log types.Log) (*VRFBeaconRandomnessRequested, error) - - ParseLog(log types.Log) (generated.AbigenLog, error) - - Address() common.Address -} diff --git a/core/gethwrappers/ocr2vrf/generated/vrf_beacon_consumer/vrf_beacon_consumer.go b/core/gethwrappers/ocr2vrf/generated/vrf_beacon_consumer/vrf_beacon_consumer.go deleted file mode 100644 index edc4ec6556d..00000000000 --- a/core/gethwrappers/ocr2vrf/generated/vrf_beacon_consumer/vrf_beacon_consumer.go +++ /dev/null @@ -1,1034 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package vrf_beacon_consumer - -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 -) - -var BeaconVRFConsumerMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"shouldFail\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"beaconPeriodBlocks\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"MustBeCoordinator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MustBeOwnerOrCoordinator\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"}],\"name\":\"CoordinatorUpdated\",\"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\":\"fail\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"i_beaconPeriodBlocks\",\"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\":\"requestID\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"arguments\",\"type\":\"bytes\"}],\"name\":\"rawFulfillRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_ReceivedRandomnessByRequestID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_arguments\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_gasAvailable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_mostRecentRequestID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_myBeaconRequests\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"slotNumber\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"confirmationDelay\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"numWords\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"requester\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_randomWords\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint24\",\"name\":\"\",\"type\":\"uint24\"}],\"name\":\"s_requestsIDs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_subId\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"shouldFail\",\"type\":\"bool\"}],\"name\":\"setFail\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"reqId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"height\",\"type\":\"uint256\"},{\"internalType\":\"uint24\",\"name\":\"delay\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"numWords\",\"type\":\"uint16\"}],\"name\":\"storeBeaconRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requestID\",\"type\":\"uint256\"}],\"name\":\"testRedeemRandomness\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"numWords\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"subID\",\"type\":\"uint256\"},{\"internalType\":\"uint24\",\"name\":\"confirmationDelayArg\",\"type\":\"uint24\"}],\"name\":\"testRequestRandomness\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subID\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"numWords\",\"type\":\"uint16\"},{\"internalType\":\"uint24\",\"name\":\"confDelay\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"arguments\",\"type\":\"bytes\"}],\"name\":\"testRequestRandomnessFulfillment\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60806040523480156200001157600080fd5b50604051620018db380380620018db8339810160408190526200003491620001aa565b8233806000816200008c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000bf57620000bf81620000ff565b5050600280546001600160a01b0319166001600160a01b03939093169290921790915550600b805460ff191692151592909217909155600c555062000201565b336001600160a01b03821603620001595760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000083565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600080600060608486031215620001c057600080fd5b83516001600160a01b0381168114620001d857600080fd5b60208501519093508015158114620001ef57600080fd5b80925050604084015190509250925092565b6116ca80620002116000396000f3fe608060405234801561001057600080fd5b506004361061016c5760003560e01c8063a9cc4718116100cd578063ea7502ab11610081578063f2fde38b11610066578063f2fde38b1461031f578063f6eaffc814610332578063ffe97ca41461034557600080fd5b8063ea7502ab14610303578063f08c5daa1461031657600080fd5b8063cd0593df116100b2578063cd0593df146102d4578063d0705f04146102dd578063d21ea8fd146102f057600080fd5b8063a9cc4718146102a4578063c6d61301146102c157600080fd5b80637716cdaa116101245780638da5cb5b116101095780638da5cb5b1461022a5780638ea98117146102525780639d7694021461026557600080fd5b80637716cdaa1461020d57806379ba50971461022257600080fd5b8063689b77ab11610155578063689b77ab146101c45780636df57cc3146101cd578063706da1ca146101e057600080fd5b8063341867a2146101715780635f15cccc14610186575b600080fd5b61018461017f366004610e87565b6103f8565b005b6101b1610194366004610ec1565b600460209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b6101b160085481565b6101846101db366004610eff565b6104ed565b6009546101f49067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016101bb565b610215610628565b6040516101bb9190610fa9565b6101846106b6565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101bb565b610184610260366004610fc3565b6107b8565b610184610273366004610ff9565b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b600b546102b19060ff1681565b60405190151581526020016101bb565b6101b16102cf36600461101b565b61089e565b6101b1600c5481565b6101b16102eb366004610e87565b6109a8565b6101846102fe366004611187565b6109d9565b6101b1610311366004611250565b610a3a565b6101b1600a5481565b61018461032d366004610fc3565b610b4a565b6101b16103403660046112d4565b610b5e565b6103ae6103533660046112d4565b60056020526000908152604090205463ffffffff811690640100000000810462ffffff1690670100000000000000810461ffff16906901000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1684565b6040805163ffffffff909516855262ffffff909316602085015261ffff9091169183019190915273ffffffffffffffffffffffffffffffffffffffff1660608201526080016101bb565b60025460408051602081018252600080825291517facfc6cdd000000000000000000000000000000000000000000000000000000008152919273ffffffffffffffffffffffffffffffffffffffff169163acfc6cdd9161045e91879187916004016112ed565b6000604051808303816000875af115801561047d573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526104c39190810190611315565b600083815260066020908152604090912082519293506104e7929091840190610e27565b50505050565b600083815260046020908152604080832062ffffff861684529091528120859055600c5461051b9085611404565b6040805160808101825263ffffffff928316815262ffffff958616602080830191825261ffff968716838501908152306060850190815260009b8c526005909252939099209151825491519351995173ffffffffffffffffffffffffffffffffffffffff166901000000000000000000027fffffff0000000000000000000000000000000000000000ffffffffffffffffff9a90971667010000000000000002999099167fffffff00000000000000000000000000000000000000000000ffffffffffffff93909716640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffff000000000000009091169890931697909717919091171692909217179092555050565b6007805461063590611418565b80601f016020809104026020016040519081016040528092919081815260200182805461066190611418565b80156106ae5780601f10610683576101008083540402835291602001916106ae565b820191906000526020600020905b81548152906001019060200180831161069157829003601f168201915b505050505081565b60015473ffffffffffffffffffffffffffffffffffffffff16331461073c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60005473ffffffffffffffffffffffffffffffffffffffff1633148015906107f8575060025473ffffffffffffffffffffffffffffffffffffffff163314155b1561082f576040517fd4e06fd700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517fc258faa9a17ddfdf4130b4acff63a289202e7d5f9e42f366add65368575486bc90600090a250565b600080600c546108ac610b7f565b6108b6919061146b565b9050600081600c546108c6610b7f565b6108d0919061147f565b6108da9190611498565b60025460408051602081018252600080825291517f4ffac83a000000000000000000000000000000000000000000000000000000008152939450909273ffffffffffffffffffffffffffffffffffffffff90921691634ffac83a91610948918a918c918b91906004016114ab565b6020604051808303816000875af1158015610967573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061098b91906114e3565b90506109998183878a6104ed565b60088190559695505050505050565b600660205281600052604060002081815481106109c457600080fd5b90600052602060002001600091509150505481565b60025473ffffffffffffffffffffffffffffffffffffffff163314610a2a576040517f66bf9c7200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a35838383610c16565b505050565b600080600c54610a48610b7f565b610a52919061146b565b9050600081600c54610a62610b7f565b610a6c919061147f565b610a769190611498565b60025460408051602081018252600080825291517fdb972c8b000000000000000000000000000000000000000000000000000000008152939450909273ffffffffffffffffffffffffffffffffffffffff9092169163db972c8b91610ae8918d918d918d918d918d91906004016114fc565b6020604051808303816000875af1158015610b07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2b91906114e3565b9050610b398183898b6104ed565b600881905598975050505050505050565b610b52610caf565b610b5b81610d32565b50565b60038181548110610b6e57600080fd5b600091825260209091200154905081565b60004661a4b1811480610b94575062066eed81145b15610c0f57606473ffffffffffffffffffffffffffffffffffffffff1663a3b1b31d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610be5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0991906114e3565b91505090565b4391505090565b600b5460ff1615610c83576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f206661696c656420696e2066756c66696c6c52616e646f6d576f7264730000006044820152606401610733565b60008381526006602090815260409091208351610ca292850190610e27565b5060076104e782826115a3565b60005473ffffffffffffffffffffffffffffffffffffffff163314610d30576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610733565b565b3373ffffffffffffffffffffffffffffffffffffffff821603610db1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610733565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b828054828255906000526020600020908101928215610e62579160200282015b82811115610e62578251825591602001919060010190610e47565b50610e6e929150610e72565b5090565b5b80821115610e6e5760008155600101610e73565b60008060408385031215610e9a57600080fd5b50508035926020909101359150565b803562ffffff81168114610ebc57600080fd5b919050565b60008060408385031215610ed457600080fd5b82359150610ee460208401610ea9565b90509250929050565b803561ffff81168114610ebc57600080fd5b60008060008060808587031215610f1557600080fd5b8435935060208501359250610f2c60408601610ea9565b9150610f3a60608601610eed565b905092959194509250565b6000815180845260005b81811015610f6b57602081850181015186830182015201610f4f565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000610fbc6020830184610f45565b9392505050565b600060208284031215610fd557600080fd5b813573ffffffffffffffffffffffffffffffffffffffff81168114610fbc57600080fd5b60006020828403121561100b57600080fd5b81358015158114610fbc57600080fd5b60008060006060848603121561103057600080fd5b61103984610eed565b92506020840135915061104e60408501610ea9565b90509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156110cd576110cd611057565b604052919050565b600067ffffffffffffffff8211156110ef576110ef611057565b5060051b60200190565b600082601f83011261110a57600080fd5b813567ffffffffffffffff81111561112457611124611057565b61115560207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601611086565b81815284602083860101111561116a57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060006060848603121561119c57600080fd5b8335925060208085013567ffffffffffffffff808211156111bc57600080fd5b818701915087601f8301126111d057600080fd5b81356111e36111de826110d5565b611086565b81815260059190911b8301840190848101908a83111561120257600080fd5b938501935b8285101561122057843582529385019390850190611207565b96505050604087013592508083111561123857600080fd5b5050611246868287016110f9565b9150509250925092565b600080600080600060a0868803121561126857600080fd5b8535945061127860208701610eed565b935061128660408701610ea9565b9250606086013563ffffffff8116811461129f57600080fd5b9150608086013567ffffffffffffffff8111156112bb57600080fd5b6112c7888289016110f9565b9150509295509295909350565b6000602082840312156112e657600080fd5b5035919050565b83815282602082015260606040820152600061130c6060830184610f45565b95945050505050565b6000602080838503121561132857600080fd5b825167ffffffffffffffff81111561133f57600080fd5b8301601f8101851361135057600080fd5b805161135e6111de826110d5565b81815260059190911b8201830190838101908783111561137d57600080fd5b928401925b8284101561139b57835182529284019290840190611382565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082611413576114136113a6565b500490565b600181811c9082168061142c57607f821691505b602082108103611465577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60008261147a5761147a6113a6565b500690565b80820180821115611492576114926113d5565b92915050565b81810381811115611492576114926113d5565b84815261ffff8416602082015262ffffff831660408201526080606082015260006114d96080830184610f45565b9695505050505050565b6000602082840312156114f557600080fd5b5051919050565b86815261ffff8616602082015262ffffff8516604082015263ffffffff8416606082015260c06080820152600061153660c0830185610f45565b82810360a08401526115488185610f45565b9998505050505050505050565b601f821115610a3557600081815260208120601f850160051c8101602086101561157c5750805b601f850160051c820191505b8181101561159b57828155600101611588565b505050505050565b815167ffffffffffffffff8111156115bd576115bd611057565b6115d1816115cb8454611418565b84611555565b602080601f83116001811461162457600084156115ee5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b17855561159b565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561167157888601518255948401946001909101908401611652565b50858210156116ad57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b0190555056fea164736f6c6343000813000a", -} - -var BeaconVRFConsumerABI = BeaconVRFConsumerMetaData.ABI - -var BeaconVRFConsumerBin = BeaconVRFConsumerMetaData.Bin - -func DeployBeaconVRFConsumer(auth *bind.TransactOpts, backend bind.ContractBackend, coordinator common.Address, shouldFail bool, beaconPeriodBlocks *big.Int) (common.Address, *types.Transaction, *BeaconVRFConsumer, error) { - parsed, err := BeaconVRFConsumerMetaData.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(BeaconVRFConsumerBin), backend, coordinator, shouldFail, beaconPeriodBlocks) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &BeaconVRFConsumer{BeaconVRFConsumerCaller: BeaconVRFConsumerCaller{contract: contract}, BeaconVRFConsumerTransactor: BeaconVRFConsumerTransactor{contract: contract}, BeaconVRFConsumerFilterer: BeaconVRFConsumerFilterer{contract: contract}}, nil -} - -type BeaconVRFConsumer struct { - address common.Address - abi abi.ABI - BeaconVRFConsumerCaller - BeaconVRFConsumerTransactor - BeaconVRFConsumerFilterer -} - -type BeaconVRFConsumerCaller struct { - contract *bind.BoundContract -} - -type BeaconVRFConsumerTransactor struct { - contract *bind.BoundContract -} - -type BeaconVRFConsumerFilterer struct { - contract *bind.BoundContract -} - -type BeaconVRFConsumerSession struct { - Contract *BeaconVRFConsumer - CallOpts bind.CallOpts - TransactOpts bind.TransactOpts -} - -type BeaconVRFConsumerCallerSession struct { - Contract *BeaconVRFConsumerCaller - CallOpts bind.CallOpts -} - -type BeaconVRFConsumerTransactorSession struct { - Contract *BeaconVRFConsumerTransactor - TransactOpts bind.TransactOpts -} - -type BeaconVRFConsumerRaw struct { - Contract *BeaconVRFConsumer -} - -type BeaconVRFConsumerCallerRaw struct { - Contract *BeaconVRFConsumerCaller -} - -type BeaconVRFConsumerTransactorRaw struct { - Contract *BeaconVRFConsumerTransactor -} - -func NewBeaconVRFConsumer(address common.Address, backend bind.ContractBackend) (*BeaconVRFConsumer, error) { - abi, err := abi.JSON(strings.NewReader(BeaconVRFConsumerABI)) - if err != nil { - return nil, err - } - contract, err := bindBeaconVRFConsumer(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &BeaconVRFConsumer{address: address, abi: abi, BeaconVRFConsumerCaller: BeaconVRFConsumerCaller{contract: contract}, BeaconVRFConsumerTransactor: BeaconVRFConsumerTransactor{contract: contract}, BeaconVRFConsumerFilterer: BeaconVRFConsumerFilterer{contract: contract}}, nil -} - -func NewBeaconVRFConsumerCaller(address common.Address, caller bind.ContractCaller) (*BeaconVRFConsumerCaller, error) { - contract, err := bindBeaconVRFConsumer(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &BeaconVRFConsumerCaller{contract: contract}, nil -} - -func NewBeaconVRFConsumerTransactor(address common.Address, transactor bind.ContractTransactor) (*BeaconVRFConsumerTransactor, error) { - contract, err := bindBeaconVRFConsumer(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &BeaconVRFConsumerTransactor{contract: contract}, nil -} - -func NewBeaconVRFConsumerFilterer(address common.Address, filterer bind.ContractFilterer) (*BeaconVRFConsumerFilterer, error) { - contract, err := bindBeaconVRFConsumer(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &BeaconVRFConsumerFilterer{contract: contract}, nil -} - -func bindBeaconVRFConsumer(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := BeaconVRFConsumerMetaData.GetAbi() - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _BeaconVRFConsumer.Contract.BeaconVRFConsumerCaller.contract.Call(opts, result, method, params...) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _BeaconVRFConsumer.Contract.BeaconVRFConsumerTransactor.contract.Transfer(opts) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _BeaconVRFConsumer.Contract.BeaconVRFConsumerTransactor.contract.Transact(opts, method, params...) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _BeaconVRFConsumer.Contract.contract.Call(opts, result, method, params...) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _BeaconVRFConsumer.Contract.contract.Transfer(opts) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _BeaconVRFConsumer.Contract.contract.Transact(opts, method, params...) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerCaller) Fail(opts *bind.CallOpts) (bool, error) { - var out []interface{} - err := _BeaconVRFConsumer.contract.Call(opts, &out, "fail") - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerSession) Fail() (bool, error) { - return _BeaconVRFConsumer.Contract.Fail(&_BeaconVRFConsumer.CallOpts) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerCallerSession) Fail() (bool, error) { - return _BeaconVRFConsumer.Contract.Fail(&_BeaconVRFConsumer.CallOpts) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerCaller) IBeaconPeriodBlocks(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _BeaconVRFConsumer.contract.Call(opts, &out, "i_beaconPeriodBlocks") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerSession) IBeaconPeriodBlocks() (*big.Int, error) { - return _BeaconVRFConsumer.Contract.IBeaconPeriodBlocks(&_BeaconVRFConsumer.CallOpts) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerCallerSession) IBeaconPeriodBlocks() (*big.Int, error) { - return _BeaconVRFConsumer.Contract.IBeaconPeriodBlocks(&_BeaconVRFConsumer.CallOpts) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerCaller) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _BeaconVRFConsumer.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 (_BeaconVRFConsumer *BeaconVRFConsumerSession) Owner() (common.Address, error) { - return _BeaconVRFConsumer.Contract.Owner(&_BeaconVRFConsumer.CallOpts) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerCallerSession) Owner() (common.Address, error) { - return _BeaconVRFConsumer.Contract.Owner(&_BeaconVRFConsumer.CallOpts) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerCaller) SReceivedRandomnessByRequestID(opts *bind.CallOpts, arg0 *big.Int, arg1 *big.Int) (*big.Int, error) { - var out []interface{} - err := _BeaconVRFConsumer.contract.Call(opts, &out, "s_ReceivedRandomnessByRequestID", arg0, arg1) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerSession) SReceivedRandomnessByRequestID(arg0 *big.Int, arg1 *big.Int) (*big.Int, error) { - return _BeaconVRFConsumer.Contract.SReceivedRandomnessByRequestID(&_BeaconVRFConsumer.CallOpts, arg0, arg1) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerCallerSession) SReceivedRandomnessByRequestID(arg0 *big.Int, arg1 *big.Int) (*big.Int, error) { - return _BeaconVRFConsumer.Contract.SReceivedRandomnessByRequestID(&_BeaconVRFConsumer.CallOpts, arg0, arg1) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerCaller) SArguments(opts *bind.CallOpts) ([]byte, error) { - var out []interface{} - err := _BeaconVRFConsumer.contract.Call(opts, &out, "s_arguments") - - if err != nil { - return *new([]byte), err - } - - out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) - - return out0, err - -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerSession) SArguments() ([]byte, error) { - return _BeaconVRFConsumer.Contract.SArguments(&_BeaconVRFConsumer.CallOpts) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerCallerSession) SArguments() ([]byte, error) { - return _BeaconVRFConsumer.Contract.SArguments(&_BeaconVRFConsumer.CallOpts) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerCaller) SGasAvailable(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _BeaconVRFConsumer.contract.Call(opts, &out, "s_gasAvailable") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerSession) SGasAvailable() (*big.Int, error) { - return _BeaconVRFConsumer.Contract.SGasAvailable(&_BeaconVRFConsumer.CallOpts) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerCallerSession) SGasAvailable() (*big.Int, error) { - return _BeaconVRFConsumer.Contract.SGasAvailable(&_BeaconVRFConsumer.CallOpts) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerCaller) SMostRecentRequestID(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _BeaconVRFConsumer.contract.Call(opts, &out, "s_mostRecentRequestID") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerSession) SMostRecentRequestID() (*big.Int, error) { - return _BeaconVRFConsumer.Contract.SMostRecentRequestID(&_BeaconVRFConsumer.CallOpts) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerCallerSession) SMostRecentRequestID() (*big.Int, error) { - return _BeaconVRFConsumer.Contract.SMostRecentRequestID(&_BeaconVRFConsumer.CallOpts) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerCaller) SMyBeaconRequests(opts *bind.CallOpts, arg0 *big.Int) (SMyBeaconRequests, - - error) { - var out []interface{} - err := _BeaconVRFConsumer.contract.Call(opts, &out, "s_myBeaconRequests", arg0) - - outstruct := new(SMyBeaconRequests) - if err != nil { - return *outstruct, err - } - - outstruct.SlotNumber = *abi.ConvertType(out[0], new(uint32)).(*uint32) - outstruct.ConfirmationDelay = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) - outstruct.NumWords = *abi.ConvertType(out[2], new(uint16)).(*uint16) - outstruct.Requester = *abi.ConvertType(out[3], new(common.Address)).(*common.Address) - - return *outstruct, err - -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerSession) SMyBeaconRequests(arg0 *big.Int) (SMyBeaconRequests, - - error) { - return _BeaconVRFConsumer.Contract.SMyBeaconRequests(&_BeaconVRFConsumer.CallOpts, arg0) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerCallerSession) SMyBeaconRequests(arg0 *big.Int) (SMyBeaconRequests, - - error) { - return _BeaconVRFConsumer.Contract.SMyBeaconRequests(&_BeaconVRFConsumer.CallOpts, arg0) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerCaller) SRandomWords(opts *bind.CallOpts, arg0 *big.Int) (*big.Int, error) { - var out []interface{} - err := _BeaconVRFConsumer.contract.Call(opts, &out, "s_randomWords", arg0) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerSession) SRandomWords(arg0 *big.Int) (*big.Int, error) { - return _BeaconVRFConsumer.Contract.SRandomWords(&_BeaconVRFConsumer.CallOpts, arg0) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerCallerSession) SRandomWords(arg0 *big.Int) (*big.Int, error) { - return _BeaconVRFConsumer.Contract.SRandomWords(&_BeaconVRFConsumer.CallOpts, arg0) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerCaller) SRequestsIDs(opts *bind.CallOpts, arg0 *big.Int, arg1 *big.Int) (*big.Int, error) { - var out []interface{} - err := _BeaconVRFConsumer.contract.Call(opts, &out, "s_requestsIDs", arg0, arg1) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerSession) SRequestsIDs(arg0 *big.Int, arg1 *big.Int) (*big.Int, error) { - return _BeaconVRFConsumer.Contract.SRequestsIDs(&_BeaconVRFConsumer.CallOpts, arg0, arg1) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerCallerSession) SRequestsIDs(arg0 *big.Int, arg1 *big.Int) (*big.Int, error) { - return _BeaconVRFConsumer.Contract.SRequestsIDs(&_BeaconVRFConsumer.CallOpts, arg0, arg1) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerCaller) SSubId(opts *bind.CallOpts) (uint64, error) { - var out []interface{} - err := _BeaconVRFConsumer.contract.Call(opts, &out, "s_subId") - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerSession) SSubId() (uint64, error) { - return _BeaconVRFConsumer.Contract.SSubId(&_BeaconVRFConsumer.CallOpts) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerCallerSession) SSubId() (uint64, error) { - return _BeaconVRFConsumer.Contract.SSubId(&_BeaconVRFConsumer.CallOpts) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _BeaconVRFConsumer.contract.Transact(opts, "acceptOwnership") -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerSession) AcceptOwnership() (*types.Transaction, error) { - return _BeaconVRFConsumer.Contract.AcceptOwnership(&_BeaconVRFConsumer.TransactOpts) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerTransactorSession) AcceptOwnership() (*types.Transaction, error) { - return _BeaconVRFConsumer.Contract.AcceptOwnership(&_BeaconVRFConsumer.TransactOpts) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerTransactor) RawFulfillRandomWords(opts *bind.TransactOpts, requestID *big.Int, randomWords []*big.Int, arguments []byte) (*types.Transaction, error) { - return _BeaconVRFConsumer.contract.Transact(opts, "rawFulfillRandomWords", requestID, randomWords, arguments) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerSession) RawFulfillRandomWords(requestID *big.Int, randomWords []*big.Int, arguments []byte) (*types.Transaction, error) { - return _BeaconVRFConsumer.Contract.RawFulfillRandomWords(&_BeaconVRFConsumer.TransactOpts, requestID, randomWords, arguments) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerTransactorSession) RawFulfillRandomWords(requestID *big.Int, randomWords []*big.Int, arguments []byte) (*types.Transaction, error) { - return _BeaconVRFConsumer.Contract.RawFulfillRandomWords(&_BeaconVRFConsumer.TransactOpts, requestID, randomWords, arguments) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerTransactor) SetCoordinator(opts *bind.TransactOpts, coordinator common.Address) (*types.Transaction, error) { - return _BeaconVRFConsumer.contract.Transact(opts, "setCoordinator", coordinator) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerSession) SetCoordinator(coordinator common.Address) (*types.Transaction, error) { - return _BeaconVRFConsumer.Contract.SetCoordinator(&_BeaconVRFConsumer.TransactOpts, coordinator) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerTransactorSession) SetCoordinator(coordinator common.Address) (*types.Transaction, error) { - return _BeaconVRFConsumer.Contract.SetCoordinator(&_BeaconVRFConsumer.TransactOpts, coordinator) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerTransactor) SetFail(opts *bind.TransactOpts, shouldFail bool) (*types.Transaction, error) { - return _BeaconVRFConsumer.contract.Transact(opts, "setFail", shouldFail) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerSession) SetFail(shouldFail bool) (*types.Transaction, error) { - return _BeaconVRFConsumer.Contract.SetFail(&_BeaconVRFConsumer.TransactOpts, shouldFail) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerTransactorSession) SetFail(shouldFail bool) (*types.Transaction, error) { - return _BeaconVRFConsumer.Contract.SetFail(&_BeaconVRFConsumer.TransactOpts, shouldFail) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerTransactor) StoreBeaconRequest(opts *bind.TransactOpts, reqId *big.Int, height *big.Int, delay *big.Int, numWords uint16) (*types.Transaction, error) { - return _BeaconVRFConsumer.contract.Transact(opts, "storeBeaconRequest", reqId, height, delay, numWords) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerSession) StoreBeaconRequest(reqId *big.Int, height *big.Int, delay *big.Int, numWords uint16) (*types.Transaction, error) { - return _BeaconVRFConsumer.Contract.StoreBeaconRequest(&_BeaconVRFConsumer.TransactOpts, reqId, height, delay, numWords) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerTransactorSession) StoreBeaconRequest(reqId *big.Int, height *big.Int, delay *big.Int, numWords uint16) (*types.Transaction, error) { - return _BeaconVRFConsumer.Contract.StoreBeaconRequest(&_BeaconVRFConsumer.TransactOpts, reqId, height, delay, numWords) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerTransactor) TestRedeemRandomness(opts *bind.TransactOpts, subID *big.Int, requestID *big.Int) (*types.Transaction, error) { - return _BeaconVRFConsumer.contract.Transact(opts, "testRedeemRandomness", subID, requestID) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerSession) TestRedeemRandomness(subID *big.Int, requestID *big.Int) (*types.Transaction, error) { - return _BeaconVRFConsumer.Contract.TestRedeemRandomness(&_BeaconVRFConsumer.TransactOpts, subID, requestID) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerTransactorSession) TestRedeemRandomness(subID *big.Int, requestID *big.Int) (*types.Transaction, error) { - return _BeaconVRFConsumer.Contract.TestRedeemRandomness(&_BeaconVRFConsumer.TransactOpts, subID, requestID) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerTransactor) TestRequestRandomness(opts *bind.TransactOpts, numWords uint16, subID *big.Int, confirmationDelayArg *big.Int) (*types.Transaction, error) { - return _BeaconVRFConsumer.contract.Transact(opts, "testRequestRandomness", numWords, subID, confirmationDelayArg) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerSession) TestRequestRandomness(numWords uint16, subID *big.Int, confirmationDelayArg *big.Int) (*types.Transaction, error) { - return _BeaconVRFConsumer.Contract.TestRequestRandomness(&_BeaconVRFConsumer.TransactOpts, numWords, subID, confirmationDelayArg) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerTransactorSession) TestRequestRandomness(numWords uint16, subID *big.Int, confirmationDelayArg *big.Int) (*types.Transaction, error) { - return _BeaconVRFConsumer.Contract.TestRequestRandomness(&_BeaconVRFConsumer.TransactOpts, numWords, subID, confirmationDelayArg) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerTransactor) TestRequestRandomnessFulfillment(opts *bind.TransactOpts, subID *big.Int, numWords uint16, confDelay *big.Int, callbackGasLimit uint32, arguments []byte) (*types.Transaction, error) { - return _BeaconVRFConsumer.contract.Transact(opts, "testRequestRandomnessFulfillment", subID, numWords, confDelay, callbackGasLimit, arguments) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerSession) TestRequestRandomnessFulfillment(subID *big.Int, numWords uint16, confDelay *big.Int, callbackGasLimit uint32, arguments []byte) (*types.Transaction, error) { - return _BeaconVRFConsumer.Contract.TestRequestRandomnessFulfillment(&_BeaconVRFConsumer.TransactOpts, subID, numWords, confDelay, callbackGasLimit, arguments) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerTransactorSession) TestRequestRandomnessFulfillment(subID *big.Int, numWords uint16, confDelay *big.Int, callbackGasLimit uint32, arguments []byte) (*types.Transaction, error) { - return _BeaconVRFConsumer.Contract.TestRequestRandomnessFulfillment(&_BeaconVRFConsumer.TransactOpts, subID, numWords, confDelay, callbackGasLimit, arguments) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { - return _BeaconVRFConsumer.contract.Transact(opts, "transferOwnership", to) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerSession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _BeaconVRFConsumer.Contract.TransferOwnership(&_BeaconVRFConsumer.TransactOpts, to) -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _BeaconVRFConsumer.Contract.TransferOwnership(&_BeaconVRFConsumer.TransactOpts, to) -} - -type BeaconVRFConsumerCoordinatorUpdatedIterator struct { - Event *BeaconVRFConsumerCoordinatorUpdated - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *BeaconVRFConsumerCoordinatorUpdatedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(BeaconVRFConsumerCoordinatorUpdated) - 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(BeaconVRFConsumerCoordinatorUpdated) - 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 *BeaconVRFConsumerCoordinatorUpdatedIterator) Error() error { - return it.fail -} - -func (it *BeaconVRFConsumerCoordinatorUpdatedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type BeaconVRFConsumerCoordinatorUpdated struct { - Coordinator common.Address - Raw types.Log -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerFilterer) FilterCoordinatorUpdated(opts *bind.FilterOpts, coordinator []common.Address) (*BeaconVRFConsumerCoordinatorUpdatedIterator, error) { - - var coordinatorRule []interface{} - for _, coordinatorItem := range coordinator { - coordinatorRule = append(coordinatorRule, coordinatorItem) - } - - logs, sub, err := _BeaconVRFConsumer.contract.FilterLogs(opts, "CoordinatorUpdated", coordinatorRule) - if err != nil { - return nil, err - } - return &BeaconVRFConsumerCoordinatorUpdatedIterator{contract: _BeaconVRFConsumer.contract, event: "CoordinatorUpdated", logs: logs, sub: sub}, nil -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerFilterer) WatchCoordinatorUpdated(opts *bind.WatchOpts, sink chan<- *BeaconVRFConsumerCoordinatorUpdated, coordinator []common.Address) (event.Subscription, error) { - - var coordinatorRule []interface{} - for _, coordinatorItem := range coordinator { - coordinatorRule = append(coordinatorRule, coordinatorItem) - } - - logs, sub, err := _BeaconVRFConsumer.contract.WatchLogs(opts, "CoordinatorUpdated", coordinatorRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(BeaconVRFConsumerCoordinatorUpdated) - if err := _BeaconVRFConsumer.contract.UnpackLog(event, "CoordinatorUpdated", 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 (_BeaconVRFConsumer *BeaconVRFConsumerFilterer) ParseCoordinatorUpdated(log types.Log) (*BeaconVRFConsumerCoordinatorUpdated, error) { - event := new(BeaconVRFConsumerCoordinatorUpdated) - if err := _BeaconVRFConsumer.contract.UnpackLog(event, "CoordinatorUpdated", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type BeaconVRFConsumerOwnershipTransferRequestedIterator struct { - Event *BeaconVRFConsumerOwnershipTransferRequested - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *BeaconVRFConsumerOwnershipTransferRequestedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(BeaconVRFConsumerOwnershipTransferRequested) - 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(BeaconVRFConsumerOwnershipTransferRequested) - 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 *BeaconVRFConsumerOwnershipTransferRequestedIterator) Error() error { - return it.fail -} - -func (it *BeaconVRFConsumerOwnershipTransferRequestedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type BeaconVRFConsumerOwnershipTransferRequested struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*BeaconVRFConsumerOwnershipTransferRequestedIterator, 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 := _BeaconVRFConsumer.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) - if err != nil { - return nil, err - } - return &BeaconVRFConsumerOwnershipTransferRequestedIterator{contract: _BeaconVRFConsumer.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *BeaconVRFConsumerOwnershipTransferRequested, 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 := _BeaconVRFConsumer.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(BeaconVRFConsumerOwnershipTransferRequested) - if err := _BeaconVRFConsumer.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 (_BeaconVRFConsumer *BeaconVRFConsumerFilterer) ParseOwnershipTransferRequested(log types.Log) (*BeaconVRFConsumerOwnershipTransferRequested, error) { - event := new(BeaconVRFConsumerOwnershipTransferRequested) - if err := _BeaconVRFConsumer.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type BeaconVRFConsumerOwnershipTransferredIterator struct { - Event *BeaconVRFConsumerOwnershipTransferred - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *BeaconVRFConsumerOwnershipTransferredIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(BeaconVRFConsumerOwnershipTransferred) - 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(BeaconVRFConsumerOwnershipTransferred) - 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 *BeaconVRFConsumerOwnershipTransferredIterator) Error() error { - return it.fail -} - -func (it *BeaconVRFConsumerOwnershipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type BeaconVRFConsumerOwnershipTransferred struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*BeaconVRFConsumerOwnershipTransferredIterator, 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 := _BeaconVRFConsumer.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) - if err != nil { - return nil, err - } - return &BeaconVRFConsumerOwnershipTransferredIterator{contract: _BeaconVRFConsumer.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil -} - -func (_BeaconVRFConsumer *BeaconVRFConsumerFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *BeaconVRFConsumerOwnershipTransferred, 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 := _BeaconVRFConsumer.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(BeaconVRFConsumerOwnershipTransferred) - if err := _BeaconVRFConsumer.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 (_BeaconVRFConsumer *BeaconVRFConsumerFilterer) ParseOwnershipTransferred(log types.Log) (*BeaconVRFConsumerOwnershipTransferred, error) { - event := new(BeaconVRFConsumerOwnershipTransferred) - if err := _BeaconVRFConsumer.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type SMyBeaconRequests struct { - SlotNumber uint32 - ConfirmationDelay *big.Int - NumWords uint16 - Requester common.Address -} - -func (_BeaconVRFConsumer *BeaconVRFConsumer) ParseLog(log types.Log) (generated.AbigenLog, error) { - switch log.Topics[0] { - case _BeaconVRFConsumer.abi.Events["CoordinatorUpdated"].ID: - return _BeaconVRFConsumer.ParseCoordinatorUpdated(log) - case _BeaconVRFConsumer.abi.Events["OwnershipTransferRequested"].ID: - return _BeaconVRFConsumer.ParseOwnershipTransferRequested(log) - case _BeaconVRFConsumer.abi.Events["OwnershipTransferred"].ID: - return _BeaconVRFConsumer.ParseOwnershipTransferred(log) - - default: - return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) - } -} - -func (BeaconVRFConsumerCoordinatorUpdated) Topic() common.Hash { - return common.HexToHash("0xc258faa9a17ddfdf4130b4acff63a289202e7d5f9e42f366add65368575486bc") -} - -func (BeaconVRFConsumerOwnershipTransferRequested) Topic() common.Hash { - return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") -} - -func (BeaconVRFConsumerOwnershipTransferred) Topic() common.Hash { - return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") -} - -func (_BeaconVRFConsumer *BeaconVRFConsumer) Address() common.Address { - return _BeaconVRFConsumer.address -} - -type BeaconVRFConsumerInterface interface { - Fail(opts *bind.CallOpts) (bool, error) - - IBeaconPeriodBlocks(opts *bind.CallOpts) (*big.Int, error) - - Owner(opts *bind.CallOpts) (common.Address, error) - - SReceivedRandomnessByRequestID(opts *bind.CallOpts, arg0 *big.Int, arg1 *big.Int) (*big.Int, error) - - SArguments(opts *bind.CallOpts) ([]byte, error) - - SGasAvailable(opts *bind.CallOpts) (*big.Int, error) - - SMostRecentRequestID(opts *bind.CallOpts) (*big.Int, error) - - SMyBeaconRequests(opts *bind.CallOpts, arg0 *big.Int) (SMyBeaconRequests, - - error) - - SRandomWords(opts *bind.CallOpts, arg0 *big.Int) (*big.Int, error) - - SRequestsIDs(opts *bind.CallOpts, arg0 *big.Int, arg1 *big.Int) (*big.Int, error) - - SSubId(opts *bind.CallOpts) (uint64, error) - - AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) - - RawFulfillRandomWords(opts *bind.TransactOpts, requestID *big.Int, randomWords []*big.Int, arguments []byte) (*types.Transaction, error) - - SetCoordinator(opts *bind.TransactOpts, coordinator common.Address) (*types.Transaction, error) - - SetFail(opts *bind.TransactOpts, shouldFail bool) (*types.Transaction, error) - - StoreBeaconRequest(opts *bind.TransactOpts, reqId *big.Int, height *big.Int, delay *big.Int, numWords uint16) (*types.Transaction, error) - - TestRedeemRandomness(opts *bind.TransactOpts, subID *big.Int, requestID *big.Int) (*types.Transaction, error) - - TestRequestRandomness(opts *bind.TransactOpts, numWords uint16, subID *big.Int, confirmationDelayArg *big.Int) (*types.Transaction, error) - - TestRequestRandomnessFulfillment(opts *bind.TransactOpts, subID *big.Int, numWords uint16, confDelay *big.Int, callbackGasLimit uint32, arguments []byte) (*types.Transaction, error) - - TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) - - FilterCoordinatorUpdated(opts *bind.FilterOpts, coordinator []common.Address) (*BeaconVRFConsumerCoordinatorUpdatedIterator, error) - - WatchCoordinatorUpdated(opts *bind.WatchOpts, sink chan<- *BeaconVRFConsumerCoordinatorUpdated, coordinator []common.Address) (event.Subscription, error) - - ParseCoordinatorUpdated(log types.Log) (*BeaconVRFConsumerCoordinatorUpdated, error) - - FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*BeaconVRFConsumerOwnershipTransferRequestedIterator, error) - - WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *BeaconVRFConsumerOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseOwnershipTransferRequested(log types.Log) (*BeaconVRFConsumerOwnershipTransferRequested, error) - - FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*BeaconVRFConsumerOwnershipTransferredIterator, error) - - WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *BeaconVRFConsumerOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseOwnershipTransferred(log types.Log) (*BeaconVRFConsumerOwnershipTransferred, error) - - ParseLog(log types.Log) (generated.AbigenLog, error) - - Address() common.Address -} diff --git a/core/gethwrappers/ocr2vrf/generated/vrf_coordinator/vrf_coordinator.go b/core/gethwrappers/ocr2vrf/generated/vrf_coordinator/vrf_coordinator.go deleted file mode 100644 index f20d5494452..00000000000 --- a/core/gethwrappers/ocr2vrf/generated/vrf_coordinator/vrf_coordinator.go +++ /dev/null @@ -1,3870 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package vrf_coordinator - -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 ECCArithmeticG1Point struct { - P [2]*big.Int -} - -type VRFBeaconTypesCallback struct { - RequestID *big.Int - NumWords uint16 - Requester common.Address - Arguments []byte - GasAllowance *big.Int - SubID *big.Int - GasPrice *big.Int - WeiPerUnitLink *big.Int -} - -type VRFBeaconTypesCoordinatorConfig struct { - UseReasonableGasPrice bool - ReentrancyLock bool - Paused bool - PremiumPercentage uint8 - UnusedGasPenaltyPercent uint8 - StalenessSeconds uint32 - RedeemableRequestGasOverhead uint32 - CallbackRequestGasOverhead uint32 - ReasonableGasPriceStalenessBlocks uint32 - FallbackWeiPerUnitLink *big.Int -} - -type VRFBeaconTypesCostedCallback struct { - Callback VRFBeaconTypesCallback - Price *big.Int -} - -type VRFBeaconTypesOutputServed struct { - Height uint64 - ConfirmationDelay *big.Int - ProofG1X *big.Int - ProofG1Y *big.Int -} - -type VRFBeaconTypesVRFOutput struct { - BlockHeight uint64 - ConfirmationDelay *big.Int - VrfOutput ECCArithmeticG1Point - Callbacks []VRFBeaconTypesCostedCallback - ShouldStore bool -} - -type VRFCoordinatorCallbackConfig struct { - MaxCallbackGasLimit uint32 - MaxCallbackArgumentsLength uint32 -} - -var VRFCoordinatorMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"beaconPeriodBlocksArg\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"linkToken\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"BeaconPeriodMustBePositive\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestHeight\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"earliestAllowed\",\"type\":\"uint256\"}],\"name\":\"BlockTooRecent\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint16[10]\",\"name\":\"confirmationDelays\",\"type\":\"uint16[10]\"},{\"internalType\":\"uint8\",\"name\":\"violatingIndex\",\"type\":\"uint8\"}],\"name\":\"ConfirmationDelaysNotIncreasing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ContractPaused\",\"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\":[{\"internalType\":\"uint256\",\"name\":\"gasAllowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLeft\",\"type\":\"uint256\"}],\"name\":\"GasAllowanceExceedsGasLeft\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"reportHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"separatorHeight\",\"type\":\"uint64\"}],\"name\":\"HistoryDomainSeparatorTooOld\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"actualBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requiredBalance\",\"type\":\"uint256\"}],\"name\":\"InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"expectedLength\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"actualLength\",\"type\":\"uint256\"}],\"name\":\"InvalidCalldata\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"InvalidConsumer\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidCoordinatorConfig\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidJuelsConversion\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"numRecipients\",\"type\":\"uint256\"}],\"name\":\"InvalidNumberOfRecipients\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSubID\",\"type\":\"uint256\"}],\"name\":\"InvalidSubscription\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"requestedVersion\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"coordinatorVersion\",\"type\":\"uint8\"}],\"name\":\"MigrationVersionMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MustBeProducer\",\"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\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"NativePaymentGiven\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoWordsRequested\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint16[10]\",\"name\":\"confDelays\",\"type\":\"uint16[10]\"}],\"name\":\"NonZeroDelayAfterZeroDelay\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnMigrationNotSupported\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableFromLink\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PendingRequestExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"producer\",\"type\":\"address\"}],\"name\":\"ProducerAlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requestHeight\",\"type\":\"uint256\"}],\"name\":\"RandomnessNotAvailable\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestHeight\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"confDelay\",\"type\":\"uint256\"}],\"name\":\"RandomnessSeedNotFoundForCallbacks\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"numRecipients\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"numPayments\",\"type\":\"uint256\"}],\"name\":\"RecipientsPaymentsMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Reentrant\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"expected\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"actual\",\"type\":\"address\"}],\"name\":\"ResponseMustBeRetrievedByRequester\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManyConsumers\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManyRequestsReplaceContract\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManySlotsReplaceContract\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requested\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"max\",\"type\":\"uint256\"}],\"name\":\"TooManyWords\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockHeight\",\"type\":\"uint256\"}],\"name\":\"UniverseHasEndedBangBangBang\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"maxCallbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCallbackArgumentsLength\",\"type\":\"uint32\"}],\"indexed\":false,\"internalType\":\"structVRFCoordinator.CallbackConfig\",\"name\":\"newConfig\",\"type\":\"tuple\"}],\"name\":\"CallbackConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"useReasonableGasPrice\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"reentrancyLock\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"premiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"unusedGasPenaltyPercent\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"stalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"redeemableRequestGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"callbackRequestGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"reasonableGasPriceStalenessBlocks\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"fallbackWeiPerUnitLink\",\"type\":\"uint96\"}],\"indexed\":false,\"internalType\":\"structVRFBeaconTypes.CoordinatorConfig\",\"name\":\"coordinatorConfig\",\"type\":\"tuple\"}],\"name\":\"CoordinatorConfigSet\",\"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\":true,\"internalType\":\"uint8\",\"name\":\"newVersion\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newCoordinator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"subID\",\"type\":\"uint256\"}],\"name\":\"MigrationCompleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"recentBlockHeight\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint192\",\"name\":\"juelsPerFeeCoin\",\"type\":\"uint192\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"reasonableGasPrice\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"height\",\"type\":\"uint64\"},{\"internalType\":\"uint24\",\"name\":\"confirmationDelay\",\"type\":\"uint24\"},{\"internalType\":\"uint256\",\"name\":\"proofG1X\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proofG1Y\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"structVRFBeaconTypes.OutputServed[]\",\"name\":\"outputsServed\",\"type\":\"tuple[]\"}],\"name\":\"OutputsServed\",\"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\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"name\":\"PauseFlagChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"requestIDs\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"successfulFulfillment\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes[]\",\"name\":\"truncatedErrorData\",\"type\":\"bytes[]\"},{\"indexed\":false,\"internalType\":\"uint96[]\",\"name\":\"subBalances\",\"type\":\"uint96[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"subIDs\",\"type\":\"uint256[]\"}],\"name\":\"RandomWordsFulfilled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"requestID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"requester\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"nextBeaconOutputHeight\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint24\",\"name\":\"confDelay\",\"type\":\"uint24\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"subID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"numWords\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"gasAllowance\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"weiPerUnitLink\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"arguments\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"costJuels\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newSubBalance\",\"type\":\"uint256\"}],\"name\":\"RandomnessFulfillmentRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"requestID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"requester\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"subID\",\"type\":\"uint256\"}],\"name\":\"RandomnessRedeemed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"requestID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"requester\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"nextBeaconOutputHeight\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint24\",\"name\":\"confDelay\",\"type\":\"uint24\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"subID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"numWords\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"costJuels\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newSubBalance\",\"type\":\"uint256\"}],\"name\":\"RandomnessRequested\",\"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\":\"amount\",\"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\":true,\"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\":\"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\":\"MAX_CONSUMERS\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_NUM_WORDS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NUM_CONF_DELAYS\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"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\":\"address[]\",\"name\":\"recipients\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"paymentsInJuels\",\"type\":\"uint256[]\"}],\"name\":\"batchTransferLink\",\"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\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"deregisterMigratableCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"name\":\"getCallbackMemo\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfirmationDelays\",\"outputs\":[{\"internalType\":\"uint24[8]\",\"name\":\"\",\"type\":\"uint24[8]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"getFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"arguments\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"getFulfillmentFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subId\",\"type\":\"uint256\"}],\"name\":\"getSubscription\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"uint64\",\"name\":\"pendingFulfillments\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"consumers\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSubscriptionLinkBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"i_beaconPeriodBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"i_link\",\"outputs\":[{\"internalType\":\"contractLinkTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIVRFMigration\",\"name\":\"newCoordinator\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"encodedRequest\",\"type\":\"bytes\"}],\"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\":\"\",\"type\":\"bytes\"}],\"name\":\"onMigration\",\"outputs\":[],\"stateMutability\":\"pure\",\"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\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"blockHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint24\",\"name\":\"confirmationDelay\",\"type\":\"uint24\"},{\"components\":[{\"internalType\":\"uint256[2]\",\"name\":\"p\",\"type\":\"uint256[2]\"}],\"internalType\":\"structECCArithmetic.G1Point\",\"name\":\"vrfOutput\",\"type\":\"tuple\"},{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"requestID\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"numWords\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"requester\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"arguments\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"gasAllowance\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"subID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"weiPerUnitLink\",\"type\":\"uint256\"}],\"internalType\":\"structVRFBeaconTypes.Callback\",\"name\":\"callback\",\"type\":\"tuple\"},{\"internalType\":\"uint96\",\"name\":\"price\",\"type\":\"uint96\"}],\"internalType\":\"structVRFBeaconTypes.CostedCallback[]\",\"name\":\"callbacks\",\"type\":\"tuple[]\"},{\"internalType\":\"bool\",\"name\":\"shouldStore\",\"type\":\"bool\"}],\"internalType\":\"structVRFBeaconTypes.VRFOutput[]\",\"name\":\"vrfOutputs\",\"type\":\"tuple[]\"},{\"internalType\":\"uint192\",\"name\":\"juelsPerFeeCoin\",\"type\":\"uint192\"},{\"internalType\":\"uint64\",\"name\":\"reasonableGasPrice\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockHeight\",\"type\":\"uint64\"}],\"name\":\"processVRFOutputs\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"containsNewOutputs\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requestID\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"redeemRandomness\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"randomness\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"registerMigratableCoordinator\",\"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\":[{\"internalType\":\"uint256\",\"name\":\"subID\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"numWords\",\"type\":\"uint16\"},{\"internalType\":\"uint24\",\"name\":\"confDelay\",\"type\":\"uint24\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"requestRandomness\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"subID\",\"type\":\"uint256\"},{\"internalType\":\"uint16\",\"name\":\"numWords\",\"type\":\"uint16\"},{\"internalType\":\"uint24\",\"name\":\"confDelay\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"arguments\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"requestRandomnessFulfillment\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"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_callbackConfig\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"maxCallbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCallbackArgumentsLength\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_coordinatorConfig\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"useReasonableGasPrice\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"reentrancyLock\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"premiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"unusedGasPenaltyPercent\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"stalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"redeemableRequestGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"callbackRequestGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"reasonableGasPriceStalenessBlocks\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"fallbackWeiPerUnitLink\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_pendingRequests\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"slotNumber\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"confirmationDelay\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"numWords\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"requester\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_producer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"maxCallbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCallbackArgumentsLength\",\"type\":\"uint32\"}],\"internalType\":\"structVRFCoordinator.CallbackConfig\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"setCallbackConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint24[8]\",\"name\":\"confDelays\",\"type\":\"uint24[8]\"}],\"name\":\"setConfirmationDelays\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"useReasonableGasPrice\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"reentrancyLock\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"premiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"unusedGasPenaltyPercent\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"stalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"redeemableRequestGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"callbackRequestGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"reasonableGasPriceStalenessBlocks\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"fallbackWeiPerUnitLink\",\"type\":\"uint96\"}],\"internalType\":\"structVRFBeaconTypes.CoordinatorConfig\",\"name\":\"coordinatorConfig\",\"type\":\"tuple\"}],\"name\":\"setCoordinatorConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"pause\",\"type\":\"bool\"}],\"name\":\"setPauseFlag\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"producer\",\"type\":\"address\"}],\"name\":\"setProducer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"juelsAmount\",\"type\":\"uint256\"}],\"name\":\"transferLink\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60c06040523480156200001157600080fd5b50604051620062f5380380620062f5833981016040819052620000349162000239565b8033806000816200008c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000bf57620000bf816200018e565b5050506001600160a01b03166080908152604080519182018152600080835260208301819052908201819052662386f26fc10000606090920191909152642386f26fc160b01b6006556004805463ffffffff60281b191668ffffffff00000000001790558290036200014457604051632abc297960e01b815260040160405180910390fd5b60a0829052600e805465ffffffffffff16906000620001638362000278565b91906101000a81548165ffffffffffff021916908365ffffffffffff160217905550505050620002ac565b336001600160a01b03821603620001e85760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000083565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600080604083850312156200024d57600080fd5b825160208401519092506001600160a01b03811681146200026d57600080fd5b809150509250929050565b600065ffffffffffff808316818103620002a257634e487b7160e01b600052601160045260246000fd5b6001019392505050565b60805160a051615fdd620003186000396000818161075f01528181611ca301528181613cb301528181613ce201528181613d1a015261430e01526000818161047501528181610bb501528181611a410152818161237b01528181612d610152612df60152615fdd6000f3fe6080604052600436106101d65760003560e01c806304104edb146101db5780630ae09540146101fd57806316f6ee9a1461021d578063294daa491461025d5780632b38bafc1461027f5780632f7527cc1461029f5780633e79167f146102b457806340d6bb82146102d457806347c3e2cb146102ea5780634ffac83a14610385578063597d2f3c146103985780635d06b4ab146103b657806364d51a2a146103d657806373433a2f146103fe57806376f2e3f41461041e57806379ba50971461044e5780637d253aff1461046357806385c64e11146104a45780638c7cba66146104c65780638da5cb5b146104e65780638da92e71146105045780638eef585f146105245780639e20103614610544578063a21a23e414610564578063a4c0ed3614610579578063acfc6cdd14610599578063b2a7cac5146105c6578063b79fa6f7146105e6578063bd58017f146106cd578063bec4c08c146106ed578063c3fbb6fd1461070d578063cb6317971461072d578063cd0593df1461074d578063ce3f471914610781578063dac83d29146107a1578063db972c8b146107c1578063dc311dd3146107d4578063e30afa4a14610804578063f2fde38b14610849578063f99b1d6814610869578063f9c45ced14610889575b600080fd5b3480156101e757600080fd5b506101fb6101f6366004614abd565b6108a9565b005b34801561020957600080fd5b506101fb610218366004614ae1565b610a5e565b34801561022957600080fd5b5061024a610238366004614b11565b6000908152600c602052604090205490565b6040519081526020015b60405180910390f35b34801561026957600080fd5b5060015b60405160ff9091168152602001610254565b34801561028b57600080fd5b506101fb61029a366004614abd565b610cc0565b3480156102ab57600080fd5b5061026d600881565b3480156102c057600080fd5b506101fb6102cf366004614b2a565b610d21565b3480156102e057600080fd5b5061024a6103e881565b3480156102f657600080fd5b50610348610305366004614b11565b60106020526000908152604090205463ffffffff811690600160201b810462ffffff1690600160381b810461ffff1690600160481b90046001600160a01b031684565b6040805163ffffffff909516855262ffffff909316602085015261ffff909116918301919091526001600160a01b03166060820152608001610254565b61024a610393366004614cac565b610dd2565b3480156103a457600080fd5b506002546001600160601b031661024a565b3480156103c257600080fd5b506101fb6103d1366004614abd565b610f7e565b3480156103e257600080fd5b506103eb606481565b60405161ffff9091168152602001610254565b34801561040a57600080fd5b506101fb610419366004614d57565b61102a565b34801561042a57600080fd5b5061043e610439366004614dd9565b611115565b6040519015158152602001610254565b34801561045a57600080fd5b506101fb611453565b34801561046f57600080fd5b506104977f000000000000000000000000000000000000000000000000000000000000000081565b6040516102549190614e5b565b3480156104b057600080fd5b506104b96114fd565b6040516102549190614e6f565b3480156104d257600080fd5b506101fb6104e1366004614ec3565b611562565b3480156104f257600080fd5b506000546001600160a01b0316610497565b34801561051057600080fd5b506101fb61051f366004614f1d565b6115d6565b34801561053057600080fd5b506101fb61053f366004614f3a565b611640565b34801561055057600080fd5b5061024a61055f366004614f65565b61167c565b34801561057057600080fd5b5061024a61179d565b34801561058557600080fd5b506101fb610594366004615019565b6119e3565b3480156105a557600080fd5b506105b96105b4366004615068565b611bce565b60405161025491906150f2565b3480156105d257600080fd5b506101fb6105e1366004614b11565b611dd2565b3480156105f257600080fd5b506004546005546106629160ff80821692610100830482169262010000810483169263010000008204811692600160201b83049091169163ffffffff600160281b8204811692600160481b8304821692600160681b8104831692600160881b90910416906001600160601b03168a565b604080519a15158b5298151560208b01529615159789019790975260ff948516606089015292909316608087015263ffffffff90811660a087015291821660c0860152811660e08501529091166101008301526001600160601b031661012082015261014001610254565b3480156106d957600080fd5b50600a54610497906001600160a01b031681565b3480156106f957600080fd5b506101fb610708366004614ae1565b611f03565b34801561071957600080fd5b506101fb610728366004615105565b6120bf565b34801561073957600080fd5b506101fb610748366004614ae1565b6125ac565b34801561075957600080fd5b5061024a7f000000000000000000000000000000000000000000000000000000000000000081565b34801561078d57600080fd5b506101fb61079c366004615159565b612899565b3480156107ad57600080fd5b506101fb6107bc366004614ae1565b6128b2565b61024a6107cf36600461519a565b6129c3565b3480156107e057600080fd5b506107f46107ef366004614b11565b612c21565b6040516102549493929190615272565b34801561081057600080fd5b50600b5461082c9063ffffffff80821691600160201b90041682565b6040805163ffffffff938416815292909116602083015201610254565b34801561085557600080fd5b506101fb610864366004614abd565b612d0e565b34801561087557600080fd5b506101fb6108843660046152be565b612d1f565b34801561089557600080fd5b5061024a6108a43660046152ea565b612e88565b6108b1612f9f565b60095460005b81811015610a3657826001600160a01b0316600982815481106108dc576108dc615330565b6000918252602090912001546001600160a01b031603610a2457600961090360018461535c565b8154811061091357610913615330565b600091825260209091200154600980546001600160a01b03909216918390811061093f5761093f615330565b600091825260209091200180546001600160a01b0319166001600160a01b039290921691909117905582600961097660018561535c565b8154811061098657610986615330565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060098054806109c5576109c561536f565b600082815260209020810160001990810180546001600160a01b03191690550190556040517ff80a1a97fd42251f3c33cda98635e7399253033a6774fe37cd3f650b5282af3790610a17908590614e5b565b60405180910390a1505050565b80610a2e81615385565b9150506108b7565b5081604051635428d44960e01b8152600401610a529190614e5b565b60405180910390fd5b50565b60008281526007602052604090205482906001600160a01b031680610a995760405163c5171ee960e01b815260048101839052602401610a52565b336001600160a01b03821614610ac45780604051636c51fda960e11b8152600401610a529190614e5b565b600454610100900460ff1615610aed5760405163769dd35360e11b815260040160405180910390fd5b600084815260086020526040902054600160601b90046001600160401b031615610b2a57604051631685ecdd60e31b815260040160405180910390fd5b6000848152600860209081526040918290208251808401909352546001600160601b038116808452600160601b9091046001600160401b031691830191909152610b7386612ff4565b600280546001600160601b03169082906000610b8f838561539e565b92506101000a8154816001600160601b0302191690836001600160601b031602179055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb87846001600160601b03166040518363ffffffff1660e01b8152600401610c0a9291906153c5565b6020604051808303816000875af1158015610c29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4d91906153de565b610c7d5760405163cf47918160e01b81526001600160601b03808316600483015283166024820152604401610a52565b867f3784f77e8e883de95b5d47cd713ced01229fa74d118c0a462224bcb0516d43f18784604051610caf9291906153fb565b60405180910390a250505050505050565b610cc8612f9f565b600a546001600160a01b031615610cff57600a5460405163ea6d390560e01b8152610a52916001600160a01b031690600401614e5b565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b610d29612f9f565b6064610d3b60a0830160808401615437565b60ff161180610d555750610d556040820160208301614f1d565b80610d6b5750610d6b6060820160408301614f1d565b15610d895760405163b0e7bd8360e01b815260040160405180910390fd5b806004610d96828261549d565b9050507e28d3a46e95e67def989d41c66eb331add9809460b95b5fb4eb006157728fc581604051610dc79190615670565b60405180910390a150565b60045460009062010000900460ff1615610dff5760405163ab35696f60e01b815260040160405180910390fd5b600454610100900460ff1615610e285760405163769dd35360e11b815260040160405180910390fd5b3415610e4957604051630b829bad60e21b8152346004820152602401610a52565b6000806000610e5a88338989613143565b925092509250600080610e6d338b61328e565b600087815260106020908152604091829020885181548a8401518b8601516060808e015163ffffffff90951666ffffffffffffff1990941693909317600160201b62ffffff9384160217600160381b600160e81b031916600160381b61ffff92831602600160481b600160e81b03191617600160481b6001600160a01b03909516949094029390931790935584513381526001600160401b038b1694810194909452918e169383019390935281018e9052908c16608082015260a081018390526001600160601b03821660c0820152919350915085907fb7933fba96b6b452eb44f99fdc08052a45dff82363d59abaff0456931c3d24599060e00160405180910390a2509298975050505050505050565b610f86612f9f565b610f8f8161346a565b15610faf578060405163ac8a27ef60e01b8152600401610a529190614e5b565b600980546001810182556000919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0180546001600160a01b0319166001600160a01b0383161790556040517fb7cabbfc11e66731fc77de0444614282023bcbd41d16781c753a431d0af0162590610dc7908390614e5b565b600a546001600160a01b0316331461105557604051634bea32db60e11b815260040160405180910390fd5b828015806110635750601f81115b1561108457604051634ecc4fef60e01b815260048101829052602401610a52565b8082146110a85760405163339f8a9d60e01b8152610a529082908490600401615758565b60005b8181101561110d576110fb8686838181106110c8576110c8615330565b90506020020160208101906110dd9190614abd565b8585848181106110ef576110ef615330565b90506020020135612d1f565b8061110581615385565b9150506110ab565b505050505050565b600a546000906001600160a01b0316331461114357604051634bea32db60e11b815260040160405180910390fd5b60045462010000900460ff161561116d5760405163ab35696f60e01b815260040160405180910390fd5b6001600160c01b038416156111aa57600680546001600160601b038616600160a01b02600160201b600160a01b0390911663ffffffff4216171790555b6001600160401b038316156111ff5760068054436001600160401b03908116600160201b02600160201b600160601b0319918716600160601b0291909116600160201b600160a01b0319909216919091171790555b600080866001600160401b0381111561121a5761121a614b68565b60405190808252806020026020018201604052801561125357816020015b6112406148f6565b8152602001906001900390816112385790505b50905060005b8781101561135557600089898381811061127557611275615330565b90506020028101906112879190615766565b611290906158ea565b9050600061129f82888b6134d3565b905085806112aa5750805b604083015151519096501515806112c957506040820151516020015115155b15611340576040805160808101825283516001600160401b0316815260208085015162ffffff168183015284830180515151938301939093529151519091015160608201528451859061ffff881690811061132657611326615330565b6020026020010181905250848061133c906159d0565b9550505b5050808061134d90615385565b915050611259565b5060008261ffff166001600160401b0381111561137457611374614b68565b6040519080825280602002602001820160405280156113ad57816020015b61139a6148f6565b8152602001906001900390816113925790505b50905060005b8361ffff16811015611409578281815181106113d1576113d1615330565b60200260200101518282815181106113eb576113eb615330565b6020026020010181905250808061140190615385565b9150506113b3565b507ff10ea936d00579b4c52035ee33bf46929646b3aa87554c565d8fb2c7aa549c448588888460405161143f94939291906159f1565b60405180910390a150505095945050505050565b6001546001600160a01b031633146114a65760405162461bcd60e51b815260206004820152601660248201527526bab9ba10313290383937b837b9b2b21037bbb732b960511b6044820152606401610a52565b60008054336001600160a01b0319808316821784556001805490911690556040516001600160a01b0390921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b61150561492c565b6040805161010081019182905290600f90600890826000855b82829054906101000a900462ffffff1662ffffff168152602001906003019060208260020104928301926001038202915080841161151e5790505050505050905090565b61156a612f9f565b8051600b80546020808501805163ffffffff908116600160201b026001600160401b031990941695811695861793909317909355604080519485529251909116908301527f0cc54509a45ab33cd67614d4a2892c083ecf8fb43b9d29f6ea8130b9023e51df9101610dc7565b6115de612f9f565b60045460ff6201000090910416151581151514610a5b5760048054821515620100000262ff0000199091161790556040517f49ba7c1de2d8853088b6270e43df2118516b217f38b917dd2b80dea360860fbe90610dc790831515815260200190565b600a546001600160a01b0316331461166b57604051634bea32db60e11b815260040160405180910390fd5b611678600f82600861494b565b5050565b604080516101408101825260045460ff80821615158352610100808304821615156020808601919091526201000084048316151585870152630100000084048316606080870191909152600160201b808604909416608080880191909152600160281b860463ffffffff90811660a0890152600160481b8704811660c0890152600160681b8704811660e0890152600160881b9096048616938701939093526005546001600160601b039081166101208801528751938401885260065480871685526001600160401b03958104861693850193909352600160601b830490941696830196909652600160a01b90049091169381019390935260009283926117889288169187919061366b565b50506001600160601b03169695505050505050565b600454600090610100900460ff16156117c95760405163769dd35360e11b815260040160405180910390fd5b60045462010000900460ff16156117f35760405163ab35696f60e01b815260040160405180910390fd5b60003361180160014361535c565b6001546040516001600160601b0319606094851b81166020830152924060348201523090931b90911660548301526001600160c01b0319600160a01b90910460c01b16606882015260700160408051808303601f19018152919052805160209091012060018054919250600160a01b9091046001600160401b031690601461188883615a86565b91906101000a8154816001600160401b0302191690836001600160401b03160217905550506000806001600160401b038111156118c7576118c7614b68565b6040519080825280602002602001820160405280156118f0578160200160208202803683370190505b5060408051808201825260008082526020808301828152878352600882528483209351845491516001600160601b039091166001600160a01b031992831617600160601b6001600160401b039092169190910217909355835160608101855233815280820183815281860187815289855260078452959093208151815486166001600160a01b03918216178255935160018201805490961694169390931790935592518051949550919390926119ad9260028501929101906149e9565b505060405133915083907f1d3015d7ba850fa198dc7b1a3f5d42779313a681035f77c8c03764c61005518d90600090a350905090565b600454610100900460ff1615611a0c5760405163769dd35360e11b815260040160405180910390fd5b60045462010000900460ff1615611a365760405163ab35696f60e01b815260040160405180910390fd5b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611a7f576040516344b0e3c360e01b815260040160405180910390fd5b60208114611aa557604051636865567560e01b8152610a52906020908390600401615aaa565b6000611ab382840184614b11565b6000818152600760205260409020549091506001600160a01b0316611aee5760405163c5171ee960e01b815260048101829052602401610a52565b600081815260086020526040812080546001600160601b031691869190611b158385615abe565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555084600260008282829054906101000a90046001600160601b0316611b5d9190615abe565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550817f1ced9348ff549fceab2ac57cd3a9de38edaaab274b725ee82c23e8fc8c4eec7a828784611bb09190615ade565b604051611bbe929190615758565b60405180910390a2505050505050565b600454606090610100900460ff1615611bfa5760405163769dd35360e11b815260040160405180910390fd5b60008381526010602081815260408084208151608081018352815463ffffffff8116825262ffffff600160201b8204168286015261ffff600160381b820416938201939093526001600160a01b03600160481b8404811660608301908152968a9052949093526001600160e81b031990911690559151163314611c9857806060015133604051638e30e82360e01b8152600401610a52929190615af1565b8051600090611cce907f00000000000000000000000000000000000000000000000000000000000000009063ffffffff16615b0b565b90506000611cda613715565b90506000836020015162ffffff1682611cf3919061535c565b9050808310611d385782846020015162ffffff1684611d129190615ade565b611d1d906001615ade565b6040516315ad27c360e01b8152600401610a52929190615758565b6001600160401b03831115611d63576040516302c6ef8160e11b815260048101849052602401610a52565b604051888152339088907f16f3f633197fafab10a5df69e6f3f2f7f20092f08d8d47de0a91c0f4b96a1a259060200160405180910390a3611dc68785600d6000611db1888a6020015161379f565b815260200190815260200160002054866137ae565b98975050505050505050565b600454610100900460ff1615611dfb5760405163769dd35360e11b815260040160405180910390fd5b6000818152600760205260409020546001600160a01b0316611e335760405163c5171ee960e01b815260048101829052602401610a52565b6000818152600760205260409020600101546001600160a01b03163314611e8a576000818152600760205260409081902060010154905163d084e97560e01b8152610a52916001600160a01b031690600401614e5b565b6000818152600760205260409081902080546001600160a01b031980821633908117845560019093018054909116905591516001600160a01b039092169183917fd4114ab6e9af9f597c52041f32d62dc57c5c4e4c0d4427006069635e216c938691611ef7918591615af1565b60405180910390a25050565b60008281526007602052604090205482906001600160a01b031680611f3e5760405163c5171ee960e01b815260048101839052602401610a52565b336001600160a01b03821614611f695780604051636c51fda960e11b8152600401610a529190614e5b565b600454610100900460ff1615611f925760405163769dd35360e11b815260040160405180910390fd5b60045462010000900460ff1615611fbc5760405163ab35696f60e01b815260040160405180910390fd5b60008481526007602052604090206002015460631901611fef576040516305a48e0f60e01b815260040160405180910390fd5b60036000611ffd8587613967565b815260208101919091526040016000205460ff166120b9576001600360006120258688613967565b815260208082019290925260409081016000908120805460ff191694151594909417909355868352600782528083206002018054600181018255908452919092200180546001600160a01b0319166001600160a01b0386161790555184907f1e980d04aa7648e205713e5e8ea3808672ac163d10936d36f91b2c88ac1575e1906120b0908690614e5b565b60405180910390a25b50505050565b600454610100900460ff16156120e85760405163769dd35360e11b815260040160405180910390fd5b6120f18361346a565b6121105782604051635428d44960e01b8152600401610a529190614e5b565b604081146121355760408051636865567560e01b8152610a5291908390600401615aaa565b600061214382840184615b22565b90506000806000806121588560200151612c21565b9350935093509350816001600160a01b0316336001600160a01b0316146121945781604051636c51fda960e11b8152600401610a529190614e5b565b876001600160a01b031663294daa496040518163ffffffff1660e01b8152600401602060405180830381865afa1580156121d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121f69190615b5c565b60ff16856000015160ff1614612293578460000151886001600160a01b031663294daa496040518163ffffffff1660e01b8152600401602060405180830381865afa158015612249573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061226d9190615b5c565b60405163e7aada9560e01b815260ff928316600482015291166024820152604401610a52565b6001600160401b038316156122bb57604051631685ecdd60e31b815260040160405180910390fd5b60006040518060a001604052806122d0600190565b60ff16815260200187602001518152602001846001600160a01b03168152602001838152602001866001600160601b031681525090506000816040516020016123199190615b79565b60405160208183030381529060405290506123378760200151612ff4565b600280548791906000906123559084906001600160601b031661539e565b92506101000a8154816001600160601b0302191690836001600160601b031602179055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb8b886040518363ffffffff1660e01b81526004016123c79291906153fb565b6020604051808303816000875af11580156123e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061240a91906153de565b61244b5760405162461bcd60e51b8152602060048201526012602482015271696e73756666696369656e742066756e647360701b6044820152606401610a52565b60405163ce3f471960e01b81526001600160a01b038b169063ce3f471990612477908490600401615c25565b600060405180830381600087803b15801561249157600080fd5b505af11580156124a5573d6000803e3d6000fd5b50506004805461ff00191661010017905550600090505b835181101561254f578381815181106124d7576124d7615330565b60200260200101516001600160a01b0316638ea981178c6040518263ffffffff1660e01b815260040161250a9190614e5b565b600060405180830381600087803b15801561252457600080fd5b505af1158015612538573d6000803e3d6000fd5b50505050808061254790615385565b9150506124bc565b506004805461ff00191690556020870151875160405160ff909116907fbd89b747474d3fc04664dfbd1d56ae7ffbe46ee097cdb9979c13916bb76269ce90612598908e90614e5b565b60405180910390a350505050505050505050565b60008281526007602052604090205482906001600160a01b0316806125e75760405163c5171ee960e01b815260048101839052602401610a52565b336001600160a01b038216146126125780604051636c51fda960e11b8152600401610a529190614e5b565b600454610100900460ff161561263b5760405163769dd35360e11b815260040160405180910390fd5b600084815260086020526040902054600160601b90046001600160401b03161561267857604051631685ecdd60e31b815260040160405180910390fd5b600360006126868587613967565b815260208101919091526040016000205460ff166126bb5783836040516379bfd40160e01b8152600401610a52929190615c38565b60008481526007602090815260408083206002018054825181850281018501909352808352919290919083018282801561271e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612700575b50505050509050600060018251612735919061535c565b905060005b825181101561284057856001600160a01b031683828151811061275f5761275f615330565b60200260200101516001600160a01b03160361282e57600083838151811061278957612789615330565b6020026020010151905080600760008a815260200190815260200160002060020183815481106127bb576127bb615330565b600091825260208083209190910180546001600160a01b0319166001600160a01b0394909416939093179092558981526007909152604090206002018054806128065761280661536f565b600082815260209020810160001990810180546001600160a01b031916905501905550612840565b8061283881615385565b91505061273a565b506003600061284f8789613967565b815260208101919091526040908101600020805460ff191690555186907f32158c6058347c1601b2d12bc696ac6901d8a9a9aa3ba10c27ab0a983e8425a790611bbe908890614e5b565b604051632cb6686f60e01b815260040160405180910390fd5b60008281526007602052604090205482906001600160a01b0316806128ed5760405163c5171ee960e01b815260048101839052602401610a52565b336001600160a01b038216146129185780604051636c51fda960e11b8152600401610a529190614e5b565b600454610100900460ff16156129415760405163769dd35360e11b815260040160405180910390fd5b6000848152600760205260409020600101546001600160a01b038481169116146120b9576000848152600760205260409081902060010180546001600160a01b0319166001600160a01b0386161790555184907f21a4dad170a6bf476c31bbcf4a16628295b0e450672eec25d7c93308e05344a1906120b09033908790615af1565b60045460009062010000900460ff16156129f05760405163ab35696f60e01b815260040160405180910390fd5b600454610100900460ff1615612a195760405163769dd35360e11b815260040160405180910390fd5b3415612a3a57604051630b829bad60e21b8152346004820152602401610a52565b600080612a4989338a8a613143565b925050915060006040518061010001604052808481526020018a61ffff168152602001336001600160a01b031681526020018781526020018863ffffffff166001600160601b031681526020018b81526020016000815260200160008152509050600080612ab68361397d565b60c087019190915260e08601919091526040519193509150612ae29085908c908f908790602001615c4f565b60405160208183030381529060405280519060200120600c6000878152602001908152602001600020819055506000604051806101600160405280878152602001336001600160a01b03168152602001866001600160401b031681526020018c62ffffff1681526020018e81526020018d61ffff1681526020018b63ffffffff1681526020018581526020018a8152602001848152602001836001600160601b0316815250905080600001517f01872fb9c7d6d68af06a17347935e04412da302a377224c205e672c26e18c37f82602001518360400151846060015185608001518660a001518760c001518860e0015160c001518960e0015160e001518a61010001518b61012001518c6101400151604051612c089b9a99989796959493929190615d02565b60405180910390a250939b9a5050505050505050505050565b600081815260076020526040812054819081906060906001600160a01b0316612c605760405163c5171ee960e01b815260048101869052602401610a52565b60008581526008602090815260408083205460078352928190208054600290910180548351818602810186019094528084526001600160601b03861695600160601b90046001600160401b0316946001600160a01b03909316939192839190830182828015612cf857602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612cda575b5050505050905093509350935093509193509193565b612d16612f9f565b610a5b81613bb4565b600a546001600160a01b03163314612d4a57604051634bea32db60e11b815260040160405180910390fd5b60405163a9059cbb60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb90612d9890859085906004016153c5565b6020604051808303816000875af1158015612db7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ddb91906153de565b611678576040516370a0823160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190612e2b903090600401614e5b565b602060405180830381865afa158015612e48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e6c9190615d98565b8160405163cf47918160e01b8152600401610a52929190615758565b604080516101408101825260045460ff80821615158352610100808304821615156020808601919091526201000084048316151585870152630100000084048316606080870191909152600160201b80860490941660808088019190915263ffffffff600160281b8704811660a0890152600160481b8704811660c0890152600160681b8704811660e0890152600160881b9096048616938701939093526005546001600160601b039081166101208801528751938401885260065495861684526001600160401b03948604851692840192909252600160601b850490931695820195909552600160a01b90920490931692810192909252600091612f8d9190613c57565b6001600160601b031690505b92915050565b6000546001600160a01b03163314612ff25760405162461bcd60e51b815260206004820152601660248201527527b7363c9031b0b63630b1363290313c9037bbb732b960511b6044820152606401610a52565b565b6000818152600760209081526040808320815160608101835281546001600160a01b0390811682526001830154168185015260028201805484518187028101870186528181529295939486019383018282801561307a57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161305c575b505050505081525050905060005b8160400151518110156130ea57600360006130c0846040015184815181106130b2576130b2615330565b602002602001015186613967565b81526020810191909152604001600020805460ff19169055806130e281615385565b915050613088565b50600082815260076020526040812080546001600160a01b031990811682556001820180549091169055906131226002830182614a3e565b505050600090815260086020526040902080546001600160a01b0319169055565b600061314d614a5c565b60006103e88561ffff16111561317c57846103e8604051634a90778560e01b8152600401610a52929190615aaa565b8461ffff166000036131a1576040516308fad2a760e01b815260040160405180910390fd5b6000806131ac613c9d565b600e54919350915065ffffffffffff1660006132178b8b84604080513060208201529081018490526001600160a01b038316606082015265ffffffffffff8216608082015260009060a00160408051601f198184030181529190528051602090910120949350505050565b9050613224826001615db1565b600e805465ffffffffffff9290921665ffffffffffff199092169190911790556040805160808101825263ffffffff909416845262ffffff8916602085015261ffff8a16908401526001600160a01b038a1660608401529550909350909150509450945094915050565b604080516080808201835260065463ffffffff8082168452600160201b8083046001600160401b03908116602080880191909152600160601b850490911686880152600160a01b9093046001600160601b0390811660608088019190915287516101408101895260045460ff808216151583526101008083048216151598840198909852620100008204811615159a83019a909a52630100000081048a169282019290925292810490971694820194909452600160281b8604821660a0820152600160481b8604821660c0820152600160681b8604821660e0820152600160881b9095041690840152600554166101208301526000918291906003836133948888613967565b815260208101919091526040016000205460ff166133c95784866040516379bfd40160e01b8152600401610a52929190615c38565b60006133d58284613c57565b600087815260086020526040902080546001600160601b0392831693509091168281101561342457815460405163cf47918160e01b8152610a52916001600160601b0316908590600401615dd0565b81546001600160601b0319908116918490036001600160601b038181169390931790935560028054918216918316859003909216179055909450925050505b9250929050565b6000805b6009548110156134ca57826001600160a01b03166009828154811061349557613495615330565b6000918252602090912001546001600160a01b0316036134b85750600192915050565b806134c281615385565b91505061346e565b50600092915050565b6000826001600160401b031684600001516001600160401b0316111561352257835160405163012d824d60e01b81526001600160401b0380861660048301529091166024820152604401610a52565b606084015151604080860151905160009161353f91602001615de9565b60405160208183030381529060405280519060200120905085604001516000015160006002811061357257613572615330565b602002015115801561358b575060408601515160200151155b156135c557600d60006135af88600001516001600160401b0316896020015161379f565b8152602001908152602001600020549050613648565b856080015115613648576000600d60006135f089600001516001600160401b03168a6020015161379f565b81526020810191909152604001600020549050806136425781600d60006136288a600001516001600160401b03168b6020015161379f565b815260208101919091526040016000205560019350613646565b8091505b505b6000613655838389613d70565b905083806136605750805b979650505050505050565b60008060008061367b8686614189565b6001600160401b031690506000613693826010615b0b565b9050600060146136a4836015615b0b565b6136ae9190615e29565b89516136ba9190615b0b565b838960e0015163ffffffff168c6136d19190615abe565b6001600160601b03166136e49190615b0b565b6136ee9190615ade565b90506000806137008360008c8c614202565b909d909c50949a509398505050505050505050565b60004661a4b181148061372a575062066eed81145b156137985760646001600160a01b031663a3b1b31d6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561376e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137929190615d98565b91505090565b4391505090565b62ffffff1660189190911b1790565b6060826137e05760405163220a34e960e11b8152600481018690526001600160401b0383166024820152604401610a52565b604080516020808201889052865163ffffffff168284015286015162ffffff166060808301919091529186015161ffff166080820152908501516001600160a01b031660a082015260c0810184905260009060e0016040516020818303038152906040528051906020012090506103e8856040015161ffff1611156138825784604001516103e8604051634a90778560e01b8152600401610a52929190615aaa565b6000856040015161ffff166001600160401b038111156138a4576138a4614b68565b6040519080825280602002602001820160405280156138cd578160200160208202803683370190505b50905060005b866040015161ffff168161ffff16101561395c57828160405160200161391092919091825260f01b6001600160f01b031916602082015260220190565b6040516020818303038152906040528051906020012060001c828261ffff168151811061393f5761393f615330565b602090810291909101015280613954816159d0565b9150506138d3565b509695505050505050565b60a081901b6001600160a01b0383161792915050565b6000806000806003600061399987604001518860a00151613967565b815260208101919091526040016000205460ff166139d6578460a0015185604001516040516379bfd40160e01b8152600401610a52929190615c38565b604080516080808201835260065463ffffffff80821684526001600160401b03600160201b8084048216602080880191909152600160601b8504909216868801526001600160601b03600160a01b909404841660608088019190915287516101408101895260045460ff808216151583526101008083048216151596840196909652620100008204811615159a83019a909a52630100000081048a168284015292830490981688870152600160281b8204841660a0890152600160481b8204841660c0890152600160681b8204841660e0890152600160881b90910490921690860152600554909116610120850152908801519088015191929160009182918291613ae291868861366b565b60a08d0151600090815260086020526040902080546001600160601b0394851697509295509093509116841115613b3a57805460405163cf47918160e01b8152610a52916001600160601b0316908690600401615dd0565b80546001600160601b0360016001600160401b03600160601b8085048216929092011602818116828416178790038083166001600160601b03199283166001600160a01b03199095169490941793909317909355600280548083168890039092169190931617909155929a91995097509095509350505050565b336001600160a01b03821603613c065760405162461bcd60e51b815260206004820152601760248201527621b0b73737ba103a3930b739b332b9103a379039b2b63360491b6044820152606401610a52565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600080613c648484614189565b8460c0015163ffffffff16613c799190615e3d565b6001600160401b031690506000613c938260008787614202565b5095945050505050565b6000806000613caa613715565b90506000613cd87f000000000000000000000000000000000000000000000000000000000000000083615e60565b9050600081613d077f000000000000000000000000000000000000000000000000000000000000000085615ade565b613d11919061535c565b90506000613d3f7f000000000000000000000000000000000000000000000000000000000000000083615e29565b905063ffffffff8110613d65576040516307b2a52360e41b815260040160405180910390fd5b909590945092505050565b6000806040518060c00160405280866001600160401b03811115613d9657613d96614b68565b604051908082528060200260200182016040528015613dbf578160200160208202803683370190505b508152602001866001600160401b03811115613ddd57613ddd614b68565b6040519080825280601f01601f191660200182016040528015613e07576020820181803683370190505b508152602001866001600160401b03811115613e2557613e25614b68565b604051908082528060200260200182016040528015613e5857816020015b6060815260200190600190039081613e435790505b50815260006020820152604001866001600160401b03811115613e7d57613e7d614b68565b604051908082528060200260200182016040528015613ea6578160200160208202803683370190505b508152602001866001600160401b03811115613ec457613ec4614b68565b604051908082528060200260200182016040528015613eed578160200160208202803683370190505b509052905060005b8581101561406c57600084606001518281518110613f1557613f15615330565b60200260200101519050600080600080613f3989600001518a602001518c8861424d565b93509350935093508315613f8d57828760400151886060015161ffff1681518110613f6657613f66615330565b602090810291909101015260608701805190613f81826159d0565b61ffff16905250613fc0565b600160f81b87602001518781518110613fa857613fa8615330565b60200101906001600160f81b031916908160001a9053505b8780613fca575080155b85515188518051929a50909188908110613fe657613fe6615330565b602002602001018181525050818760800151878151811061400957614009615330565b60200260200101906001600160601b031690816001600160601b031681525050846000015160a001518760a00151878151811061404857614048615330565b6020026020010181815250505050505050808061406490615385565b915050613ef5565b5060608301515115614181576000816060015161ffff166001600160401b0381111561409a5761409a614b68565b6040519080825280602002602001820160405280156140cd57816020015b60608152602001906001900390816140b85790505b50905060005b826060015161ffff1681101561413157826040015181815181106140f9576140f9615330565b602002602001015182828151811061411357614113615330565b6020026020010181905250808061412990615385565b9150506140d3565b5081516020830151608084015160a08501516040517f8f79f730779e875ce76c428039cc2052b5b5918c2a55c598fab251c1198aec549461417794909390928792615ead565b60405180910390a1505b509392505050565b815160009080156141a6575060408201516001600160401b031615155b156141fa5761010083015163ffffffff16431080806141e757506101008401516141d69063ffffffff164361535c565b83602001516001600160401b031610155b156141f85750506040810151612f99565b505b503a92915050565b600080600060648560600151606461421a9190615f50565b6142279060ff1689615b0b565b6142319190615e29565b905061423f818787876145bc565b925092505094509492505050565b805160a09081015160009081526008602090815260408083208551948501519151939460609486948594859261428b928e928e929091879101615c4f565b60408051601f19818403018152918152815160209283012084516000908152600c90935291205490915081146142fe5750505460408051808201909152601081526f756e6b6e6f776e2063616c6c6261636b60801b60208201526001955093506001600160601b031691508390506145b1565b50614307614a5c565b600061433c7f00000000000000000000000000000000000000000000000000000000000000006001600160401b038e16615e29565b6040805160808101825263ffffffff909216825262ffffff8d1660208084019190915285015161ffff16828201528401516001600160a01b0316606082015291508990506143d0575050604080518082019091526016815275756e617661696c61626c652072616e646f6d6e65737360501b60208201529054600195509093506001600160601b03169150600090506145b1565b60006143e28360000151838c8f6137ae565b606080840151855191860151604051939450909260009263d21ea8fd60e01b9261441192879190602401615f69565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526004805461ff00191661010017905590506000805a9050600061447c8e60000151608001516001600160601b0316896040015186614630565b9093509050806144b1578d516080015160405163aad1598360e01b8152610a52916001600160601b0316908490600401615758565b506000610bb85a6144c29190615ade565b6004805461ff00191690559050818110156144eb576144eb6144e4828461535c565b8f5161466f565b8854600160601b90046001600160401b031689600c61450983615f94565b82546001600160401b039182166101009390930a92830291909202199091161790555087516000908152600c60205260408120558261457f5760408051808201909152601081526f195e1958dd5d1a5bdb8819985a5b195960821b60208201528954600191906001600160601b0316600061459f565b604080516020810190915260008082528a549091906001600160601b0316825b9c509c509c509c505050505050505050505b945094509450949050565b6000808085156145cc57856145d6565b6145d6858561489b565b90506000816145ed89670de0b6b3a7640000615b0b565b6145f79190615e29565b9050676765c793fa10079d601b1b8111156146245760405162de437160e81b815260040160405180910390fd5b97909650945050505050565b6000805a610bb8811061466657610bb881039050856040820482031115614666576000808551602087016000898bf19250600191505b50935093915050565b80608001516001600160601b0316821115614688575050565b6004546000906064906146a590600160201b900460ff1682615fb7565b60ff168360c001518585608001516001600160601b03166146c6919061535c565b6146d09190615b0b565b6146da9190615b0b565b6146e49190615e29565b60e080840151604080516101408101825260045460ff80821615158352610100808304821615156020808601919091526201000084048316151585870152630100000084048316606080870191909152600160201b80860490941660808088019190915263ffffffff600160281b8704811660a0890152600160481b8704811660c0890152600160681b870481169a88019a909a52600160881b9095048916928601929092526005546001600160601b039081166101208701528651948501875260065498891685526001600160401b03938904841691850191909152600160601b880490921694830194909452600160a01b909504909416918401919091529293506000926147f792859291906145bc565b5060a08401516000908152600860205260408120805492935083929091906148299084906001600160601b0316615abe565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555080600260008282829054906101000a90046001600160601b03166148719190615abe565b92506101000a8154816001600160601b0302191690836001600160601b0316021790555050505050565b60a0820151606082015160009190600163ffffffff831611908180156148d7575084516148ce9063ffffffff164261535c565b8363ffffffff16105b156148e457506101208501515b6001600160601b031695945050505050565b604051806080016040528060006001600160401b03168152602001600062ffffff16815260200160008152602001600081525090565b6040518061010001604052806008906020820280368337509192915050565b6001830191839082156149d95791602002820160005b838211156149a857833562ffffff1683826101000a81548162ffffff021916908362ffffff1602179055509260200192600301602081600201049283019260010302614961565b80156149d75782816101000a81549062ffffff02191690556003016020816002010492830192600103026149a8565b505b506149e5929150614a83565b5090565b8280548282559060005260206000209081019282156149d9579160200282015b828111156149d957825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190614a09565b5080546000825590600052602060002090810190610a5b9190614a83565b60408051608081018252600080825260208201819052918101829052606081019190915290565b5b808211156149e55760008155600101614a84565b6001600160a01b0381168114610a5b57600080fd5b8035614ab881614a98565b919050565b600060208284031215614acf57600080fd5b8135614ada81614a98565b9392505050565b60008060408385031215614af457600080fd5b823591506020830135614b0681614a98565b809150509250929050565b600060208284031215614b2357600080fd5b5035919050565b60006101408284031215614b3d57600080fd5b50919050565b803561ffff81168114614ab857600080fd5b803562ffffff81168114614ab857600080fd5b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715614ba057614ba0614b68565b60405290565b60405161010081016001600160401b0381118282101715614ba057614ba0614b68565b60405160a081016001600160401b0381118282101715614ba057614ba0614b68565b604051602081016001600160401b0381118282101715614ba057614ba0614b68565b604051601f8201601f191681016001600160401b0381118282101715614c3557614c35614b68565b604052919050565b600082601f830112614c4e57600080fd5b81356001600160401b03811115614c6757614c67614b68565b614c7a601f8201601f1916602001614c0d565b818152846020838601011115614c8f57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215614cc257600080fd5b84359350614cd260208601614b43565b9250614ce060408601614b55565b915060608501356001600160401b03811115614cfb57600080fd5b614d0787828801614c3d565b91505092959194509250565b60008083601f840112614d2557600080fd5b5081356001600160401b03811115614d3c57600080fd5b6020830191508360208260051b850101111561346357600080fd5b60008060008060408587031215614d6d57600080fd5b84356001600160401b0380821115614d8457600080fd5b614d9088838901614d13565b90965094506020870135915080821115614da957600080fd5b50614db687828801614d13565b95989497509550505050565b80356001600160401b0381168114614ab857600080fd5b600080600080600060808688031215614df157600080fd5b85356001600160401b03811115614e0757600080fd5b614e1388828901614d13565b90965094505060208601356001600160c01b0381168114614e3357600080fd5b9250614e4160408701614dc2565b9150614e4f60608701614dc2565b90509295509295909350565b6001600160a01b0391909116815260200190565b6101008101818360005b6008811015614e9d57815162ffffff16835260209283019290910190600101614e79565b50505092915050565b63ffffffff81168114610a5b57600080fd5b8035614ab881614ea6565b600060408284031215614ed557600080fd5b614edd614b7e565b8235614ee881614ea6565b81526020830135614ef881614ea6565b60208201529392505050565b8015158114610a5b57600080fd5b8035614ab881614f04565b600060208284031215614f2f57600080fd5b8135614ada81614f04565b6000610100808385031215614f4e57600080fd5b838184011115614f5d57600080fd5b509092915050565b60008060008060808587031215614f7b57600080fd5b843593506020850135614f8d81614ea6565b925060408501356001600160401b0380821115614fa957600080fd5b614fb588838901614c3d565b93506060870135915080821115614fcb57600080fd5b50614d0787828801614c3d565b60008083601f840112614fea57600080fd5b5081356001600160401b0381111561500157600080fd5b60208301915083602082850101111561346357600080fd5b6000806000806060858703121561502f57600080fd5b843561503a81614a98565b93506020850135925060408501356001600160401b0381111561505c57600080fd5b614db687828801614fd8565b60008060006060848603121561507d57600080fd5b833592506020840135915060408401356001600160401b038111156150a157600080fd5b6150ad86828701614c3d565b9150509250925092565b600081518084526020808501945080840160005b838110156150e7578151875295820195908201906001016150cb565b509495945050505050565b602081526000614ada60208301846150b7565b60008060006040848603121561511a57600080fd5b833561512581614a98565b925060208401356001600160401b0381111561514057600080fd5b61514c86828701614fd8565b9497909650939450505050565b6000806020838503121561516c57600080fd5b82356001600160401b0381111561518257600080fd5b61518e85828601614fd8565b90969095509350505050565b60008060008060008060c087890312156151b357600080fd5b863595506151c360208801614b43565b94506151d160408801614b55565b935060608701356151e181614ea6565b925060808701356001600160401b03808211156151fd57600080fd5b6152098a838b01614c3d565b935060a089013591508082111561521f57600080fd5b5061522c89828a01614c3d565b9150509295509295509295565b600081518084526020808501945080840160005b838110156150e75781516001600160a01b03168752958201959082019060010161524d565b6001600160601b03851681526001600160401b03841660208201526001600160a01b03831660408201526080606082018190526000906152b490830184615239565b9695505050505050565b600080604083850312156152d157600080fd5b82356152dc81614a98565b946020939093013593505050565b600080604083850312156152fd57600080fd5b8235915060208301356001600160401b0381111561531a57600080fd5b61532685828601614c3d565b9150509250929050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115612f9957612f99615346565b634e487b7160e01b600052603160045260246000fd5b60006001820161539757615397615346565b5060010190565b6001600160601b038281168282160390808211156153be576153be615346565b5092915050565b6001600160a01b03929092168252602082015260400190565b6000602082840312156153f057600080fd5b8151614ada81614f04565b6001600160a01b039290921682526001600160601b0316602082015260400190565b60ff81168114610a5b57600080fd5b8035614ab88161541d565b60006020828403121561544957600080fd5b8135614ada8161541d565b60008135612f9981614f04565b60008135612f998161541d565b60008135612f9981614ea6565b6001600160601b0381168114610a5b57600080fd5b60008135612f998161547b565b81356154a881614f04565b815490151560ff1660ff19919091161781556154e36154c960208401615454565b82805461ff00191691151560081b61ff0016919091179055565b61550e6154f260408401615454565b82805462ff0000191691151560101b62ff000016919091179055565b61553761551d60608401615461565b825463ff000000191660189190911b63ff00000016178255565b61556461554660808401615461565b82805460ff60201b191660209290921b60ff60201b16919091179055565b61559761557360a0840161546e565b82805463ffffffff60281b191660289290921b63ffffffff60281b16919091179055565b6155ca6155a660c0840161546e565b82805463ffffffff60481b191660489290921b63ffffffff60481b16919091179055565b6155fd6155d960e0840161546e565b82805463ffffffff60681b191660689290921b63ffffffff60681b16919091179055565b61563161560d610100840161546e565b82805463ffffffff60881b191660889290921b63ffffffff60881b16919091179055565b6116786156416101208401615490565b6001830180546001600160601b0319166001600160601b0392909216919091179055565b8035614ab88161547b565b61014081016156888261568285614f12565b15159052565b61569460208401614f12565b151560208301526156a760408401614f12565b151560408301526156ba6060840161542c565b60ff1660608301526156ce6080840161542c565b60ff1660808301526156e260a08401614eb8565b63ffffffff1660a08301526156f960c08401614eb8565b63ffffffff1660c083015261571060e08401614eb8565b63ffffffff1660e0830152610100615729848201614eb8565b63ffffffff1690830152610120615741848201615665565b6001600160601b038116848301525b505092915050565b918252602082015260400190565b6000823560be1983360301811261577c57600080fd5b9190910192915050565b600082601f83011261579757600080fd5b813560206001600160401b03808311156157b3576157b3614b68565b8260051b6157c2838201614c0d565b93845285810183019383810190888611156157dc57600080fd5b84880192505b85831015611dc6578235848111156157f957600080fd5b8801601f196040828c038201121561581057600080fd5b615818614b7e565b878301358781111561582957600080fd5b8301610100818e038401121561583e57600080fd5b615846614ba6565b925088810135835261585a60408201614b43565b8984015261586a60608201614aad565b604084015260808101358881111561588157600080fd5b61588f8e8b83850101614c3d565b6060850152506158a160a08201615665565b608084015260c081013560a084015260e081013560c084015261010081013560e0840152508181526158d560408401615665565b818901528452505091840191908401906157e2565b600081360360c08112156158fd57600080fd5b615905614bc9565b61590e84614dc2565b8152602061591d818601614b55565b828201526040603f198401121561593357600080fd5b61593b614beb565b925036605f86011261594c57600080fd5b615954614b7e565b80608087013681111561596657600080fd5b604088015b81811015615982578035845292840192840161596b565b50908552604084019490945250509035906001600160401b038211156159a757600080fd5b6159b336838601615786565b60608201526159c460a08501614f12565b60808201529392505050565b600061ffff8083168181036159e7576159e7615346565b6001019392505050565b6000608080830160018060401b038089168552602060018060c01b038916818701526040828916818801526060858189015284895180875260a08a019150848b01965060005b81811015615a735787518051881684528681015162ffffff16878501528581015186850152840151848401529685019691880191600101615a37565b50909d9c50505050505050505050505050565b60006001600160401b038281166002600160401b031981016159e7576159e7615346565b61ffff929092168252602082015260400190565b6001600160601b038181168382160190808211156153be576153be615346565b80820180821115612f9957612f99615346565b6001600160a01b0392831681529116602082015260400190565b8082028115828204841417612f9957612f99615346565b600060408284031215615b3457600080fd5b615b3c614b7e565b8235615b478161541d565b81526020928301359281019290925250919050565b600060208284031215615b6e57600080fd5b8151614ada8161541d565b6020815260ff82511660208201526020820151604082015260018060a01b0360408301511660608201526000606083015160a06080840152615bbe60c0840182615239565b608094909401516001600160601b031660a093909301929092525090919050565b6000815180845260005b81811015615c0557602081850181015186830182015201615be9565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000614ada6020830184615bdf565b9182526001600160a01b0316602082015260400190565b60018060401b038516815262ffffff84166020820152826040820152608060608201528151608082015261ffff60208301511660a082015260018060a01b0360408301511660c0820152600060608301516101008060e0850152615cb7610180850183615bdf565b91506080850151615cd2828601826001600160601b03169052565b505060a084015161012084015260c084015161014084015260e08401516101608401528091505095945050505050565b6001600160a01b038c1681526001600160401b038b16602082015262ffffff8a1660408201526060810189905261ffff8816608082015263ffffffff871660a082015260c0810186905260e081018590526101606101008201819052600090615d6d83820187615bdf565b61012084019590955250506001600160601b0391909116610140909101529998505050505050505050565b600060208284031215615daa57600080fd5b5051919050565b65ffffffffffff8181168382160190808211156153be576153be615346565b6001600160601b03929092168252602082015260400190565b815160408201908260005b6002811015614e9d578251825260209283019290910190600101615df4565b634e487b7160e01b600052601260045260246000fd5b600082615e3857615e38615e13565b500490565b6001600160401b0381811683821602808216919082811461575057615750615346565b600082615e6f57615e6f615e13565b500690565b600081518084526020808501945080840160005b838110156150e75781516001600160601b031687529582019590820190600101615e88565b60a081526000615ec060a08301886150b7565b602083820381850152615ed38289615bdf565b915083820360408501528187518084528284019150828160051b850101838a0160005b83811015615f2457601f19878403018552615f12838351615bdf565b94860194925090850190600101615ef6565b50508681036060880152615f38818a615e74565b9450505050508281036080840152611dc681856150b7565b60ff8181168382160190811115612f9957612f99615346565b838152606060208201526000615f8260608301856150b7565b82810360408401526152b48185615bdf565b60006001600160401b03821680615fad57615fad615346565b6000190192915050565b60ff8281168282160390811115612f9957612f9961534656fea164736f6c6343000813000a", -} - -var VRFCoordinatorABI = VRFCoordinatorMetaData.ABI - -var VRFCoordinatorBin = VRFCoordinatorMetaData.Bin - -func DeployVRFCoordinator(auth *bind.TransactOpts, backend bind.ContractBackend, beaconPeriodBlocksArg *big.Int, linkToken common.Address) (common.Address, *types.Transaction, *VRFCoordinator, error) { - parsed, err := VRFCoordinatorMetaData.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(VRFCoordinatorBin), backend, beaconPeriodBlocksArg, linkToken) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &VRFCoordinator{VRFCoordinatorCaller: VRFCoordinatorCaller{contract: contract}, VRFCoordinatorTransactor: VRFCoordinatorTransactor{contract: contract}, VRFCoordinatorFilterer: VRFCoordinatorFilterer{contract: contract}}, nil -} - -type VRFCoordinator struct { - address common.Address - abi abi.ABI - VRFCoordinatorCaller - VRFCoordinatorTransactor - VRFCoordinatorFilterer -} - -type VRFCoordinatorCaller struct { - contract *bind.BoundContract -} - -type VRFCoordinatorTransactor struct { - contract *bind.BoundContract -} - -type VRFCoordinatorFilterer struct { - contract *bind.BoundContract -} - -type VRFCoordinatorSession struct { - Contract *VRFCoordinator - CallOpts bind.CallOpts - TransactOpts bind.TransactOpts -} - -type VRFCoordinatorCallerSession struct { - Contract *VRFCoordinatorCaller - CallOpts bind.CallOpts -} - -type VRFCoordinatorTransactorSession struct { - Contract *VRFCoordinatorTransactor - TransactOpts bind.TransactOpts -} - -type VRFCoordinatorRaw struct { - Contract *VRFCoordinator -} - -type VRFCoordinatorCallerRaw struct { - Contract *VRFCoordinatorCaller -} - -type VRFCoordinatorTransactorRaw struct { - Contract *VRFCoordinatorTransactor -} - -func NewVRFCoordinator(address common.Address, backend bind.ContractBackend) (*VRFCoordinator, error) { - abi, err := abi.JSON(strings.NewReader(VRFCoordinatorABI)) - if err != nil { - return nil, err - } - contract, err := bindVRFCoordinator(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &VRFCoordinator{address: address, abi: abi, VRFCoordinatorCaller: VRFCoordinatorCaller{contract: contract}, VRFCoordinatorTransactor: VRFCoordinatorTransactor{contract: contract}, VRFCoordinatorFilterer: VRFCoordinatorFilterer{contract: contract}}, nil -} - -func NewVRFCoordinatorCaller(address common.Address, caller bind.ContractCaller) (*VRFCoordinatorCaller, error) { - contract, err := bindVRFCoordinator(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &VRFCoordinatorCaller{contract: contract}, nil -} - -func NewVRFCoordinatorTransactor(address common.Address, transactor bind.ContractTransactor) (*VRFCoordinatorTransactor, error) { - contract, err := bindVRFCoordinator(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &VRFCoordinatorTransactor{contract: contract}, nil -} - -func NewVRFCoordinatorFilterer(address common.Address, filterer bind.ContractFilterer) (*VRFCoordinatorFilterer, error) { - contract, err := bindVRFCoordinator(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &VRFCoordinatorFilterer{contract: contract}, nil -} - -func bindVRFCoordinator(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := VRFCoordinatorMetaData.GetAbi() - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil -} - -func (_VRFCoordinator *VRFCoordinatorRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _VRFCoordinator.Contract.VRFCoordinatorCaller.contract.Call(opts, result, method, params...) -} - -func (_VRFCoordinator *VRFCoordinatorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _VRFCoordinator.Contract.VRFCoordinatorTransactor.contract.Transfer(opts) -} - -func (_VRFCoordinator *VRFCoordinatorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _VRFCoordinator.Contract.VRFCoordinatorTransactor.contract.Transact(opts, method, params...) -} - -func (_VRFCoordinator *VRFCoordinatorCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _VRFCoordinator.Contract.contract.Call(opts, result, method, params...) -} - -func (_VRFCoordinator *VRFCoordinatorTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _VRFCoordinator.Contract.contract.Transfer(opts) -} - -func (_VRFCoordinator *VRFCoordinatorTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _VRFCoordinator.Contract.contract.Transact(opts, method, params...) -} - -func (_VRFCoordinator *VRFCoordinatorCaller) MAXCONSUMERS(opts *bind.CallOpts) (uint16, error) { - var out []interface{} - err := _VRFCoordinator.contract.Call(opts, &out, "MAX_CONSUMERS") - - if err != nil { - return *new(uint16), err - } - - out0 := *abi.ConvertType(out[0], new(uint16)).(*uint16) - - return out0, err - -} - -func (_VRFCoordinator *VRFCoordinatorSession) MAXCONSUMERS() (uint16, error) { - return _VRFCoordinator.Contract.MAXCONSUMERS(&_VRFCoordinator.CallOpts) -} - -func (_VRFCoordinator *VRFCoordinatorCallerSession) MAXCONSUMERS() (uint16, error) { - return _VRFCoordinator.Contract.MAXCONSUMERS(&_VRFCoordinator.CallOpts) -} - -func (_VRFCoordinator *VRFCoordinatorCaller) MAXNUMWORDS(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _VRFCoordinator.contract.Call(opts, &out, "MAX_NUM_WORDS") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_VRFCoordinator *VRFCoordinatorSession) MAXNUMWORDS() (*big.Int, error) { - return _VRFCoordinator.Contract.MAXNUMWORDS(&_VRFCoordinator.CallOpts) -} - -func (_VRFCoordinator *VRFCoordinatorCallerSession) MAXNUMWORDS() (*big.Int, error) { - return _VRFCoordinator.Contract.MAXNUMWORDS(&_VRFCoordinator.CallOpts) -} - -func (_VRFCoordinator *VRFCoordinatorCaller) NUMCONFDELAYS(opts *bind.CallOpts) (uint8, error) { - var out []interface{} - err := _VRFCoordinator.contract.Call(opts, &out, "NUM_CONF_DELAYS") - - if err != nil { - return *new(uint8), err - } - - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) - - return out0, err - -} - -func (_VRFCoordinator *VRFCoordinatorSession) NUMCONFDELAYS() (uint8, error) { - return _VRFCoordinator.Contract.NUMCONFDELAYS(&_VRFCoordinator.CallOpts) -} - -func (_VRFCoordinator *VRFCoordinatorCallerSession) NUMCONFDELAYS() (uint8, error) { - return _VRFCoordinator.Contract.NUMCONFDELAYS(&_VRFCoordinator.CallOpts) -} - -func (_VRFCoordinator *VRFCoordinatorCaller) GetCallbackMemo(opts *bind.CallOpts, requestId *big.Int) ([32]byte, error) { - var out []interface{} - err := _VRFCoordinator.contract.Call(opts, &out, "getCallbackMemo", requestId) - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -func (_VRFCoordinator *VRFCoordinatorSession) GetCallbackMemo(requestId *big.Int) ([32]byte, error) { - return _VRFCoordinator.Contract.GetCallbackMemo(&_VRFCoordinator.CallOpts, requestId) -} - -func (_VRFCoordinator *VRFCoordinatorCallerSession) GetCallbackMemo(requestId *big.Int) ([32]byte, error) { - return _VRFCoordinator.Contract.GetCallbackMemo(&_VRFCoordinator.CallOpts, requestId) -} - -func (_VRFCoordinator *VRFCoordinatorCaller) GetConfirmationDelays(opts *bind.CallOpts) ([8]*big.Int, error) { - var out []interface{} - err := _VRFCoordinator.contract.Call(opts, &out, "getConfirmationDelays") - - if err != nil { - return *new([8]*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new([8]*big.Int)).(*[8]*big.Int) - - return out0, err - -} - -func (_VRFCoordinator *VRFCoordinatorSession) GetConfirmationDelays() ([8]*big.Int, error) { - return _VRFCoordinator.Contract.GetConfirmationDelays(&_VRFCoordinator.CallOpts) -} - -func (_VRFCoordinator *VRFCoordinatorCallerSession) GetConfirmationDelays() ([8]*big.Int, error) { - return _VRFCoordinator.Contract.GetConfirmationDelays(&_VRFCoordinator.CallOpts) -} - -func (_VRFCoordinator *VRFCoordinatorCaller) GetFee(opts *bind.CallOpts, arg0 *big.Int, arg1 []byte) (*big.Int, error) { - var out []interface{} - err := _VRFCoordinator.contract.Call(opts, &out, "getFee", arg0, arg1) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_VRFCoordinator *VRFCoordinatorSession) GetFee(arg0 *big.Int, arg1 []byte) (*big.Int, error) { - return _VRFCoordinator.Contract.GetFee(&_VRFCoordinator.CallOpts, arg0, arg1) -} - -func (_VRFCoordinator *VRFCoordinatorCallerSession) GetFee(arg0 *big.Int, arg1 []byte) (*big.Int, error) { - return _VRFCoordinator.Contract.GetFee(&_VRFCoordinator.CallOpts, arg0, arg1) -} - -func (_VRFCoordinator *VRFCoordinatorCaller) GetFulfillmentFee(opts *bind.CallOpts, arg0 *big.Int, callbackGasLimit uint32, arguments []byte, arg3 []byte) (*big.Int, error) { - var out []interface{} - err := _VRFCoordinator.contract.Call(opts, &out, "getFulfillmentFee", arg0, callbackGasLimit, arguments, arg3) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_VRFCoordinator *VRFCoordinatorSession) GetFulfillmentFee(arg0 *big.Int, callbackGasLimit uint32, arguments []byte, arg3 []byte) (*big.Int, error) { - return _VRFCoordinator.Contract.GetFulfillmentFee(&_VRFCoordinator.CallOpts, arg0, callbackGasLimit, arguments, arg3) -} - -func (_VRFCoordinator *VRFCoordinatorCallerSession) GetFulfillmentFee(arg0 *big.Int, callbackGasLimit uint32, arguments []byte, arg3 []byte) (*big.Int, error) { - return _VRFCoordinator.Contract.GetFulfillmentFee(&_VRFCoordinator.CallOpts, arg0, callbackGasLimit, arguments, arg3) -} - -func (_VRFCoordinator *VRFCoordinatorCaller) GetSubscription(opts *bind.CallOpts, subId *big.Int) (GetSubscription, - - error) { - var out []interface{} - err := _VRFCoordinator.contract.Call(opts, &out, "getSubscription", subId) - - outstruct := new(GetSubscription) - if err != nil { - return *outstruct, err - } - - outstruct.Balance = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - outstruct.PendingFulfillments = *abi.ConvertType(out[1], new(uint64)).(*uint64) - outstruct.Owner = *abi.ConvertType(out[2], new(common.Address)).(*common.Address) - outstruct.Consumers = *abi.ConvertType(out[3], new([]common.Address)).(*[]common.Address) - - return *outstruct, err - -} - -func (_VRFCoordinator *VRFCoordinatorSession) GetSubscription(subId *big.Int) (GetSubscription, - - error) { - return _VRFCoordinator.Contract.GetSubscription(&_VRFCoordinator.CallOpts, subId) -} - -func (_VRFCoordinator *VRFCoordinatorCallerSession) GetSubscription(subId *big.Int) (GetSubscription, - - error) { - return _VRFCoordinator.Contract.GetSubscription(&_VRFCoordinator.CallOpts, subId) -} - -func (_VRFCoordinator *VRFCoordinatorCaller) GetSubscriptionLinkBalance(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _VRFCoordinator.contract.Call(opts, &out, "getSubscriptionLinkBalance") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_VRFCoordinator *VRFCoordinatorSession) GetSubscriptionLinkBalance() (*big.Int, error) { - return _VRFCoordinator.Contract.GetSubscriptionLinkBalance(&_VRFCoordinator.CallOpts) -} - -func (_VRFCoordinator *VRFCoordinatorCallerSession) GetSubscriptionLinkBalance() (*big.Int, error) { - return _VRFCoordinator.Contract.GetSubscriptionLinkBalance(&_VRFCoordinator.CallOpts) -} - -func (_VRFCoordinator *VRFCoordinatorCaller) IBeaconPeriodBlocks(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _VRFCoordinator.contract.Call(opts, &out, "i_beaconPeriodBlocks") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_VRFCoordinator *VRFCoordinatorSession) IBeaconPeriodBlocks() (*big.Int, error) { - return _VRFCoordinator.Contract.IBeaconPeriodBlocks(&_VRFCoordinator.CallOpts) -} - -func (_VRFCoordinator *VRFCoordinatorCallerSession) IBeaconPeriodBlocks() (*big.Int, error) { - return _VRFCoordinator.Contract.IBeaconPeriodBlocks(&_VRFCoordinator.CallOpts) -} - -func (_VRFCoordinator *VRFCoordinatorCaller) ILink(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _VRFCoordinator.contract.Call(opts, &out, "i_link") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_VRFCoordinator *VRFCoordinatorSession) ILink() (common.Address, error) { - return _VRFCoordinator.Contract.ILink(&_VRFCoordinator.CallOpts) -} - -func (_VRFCoordinator *VRFCoordinatorCallerSession) ILink() (common.Address, error) { - return _VRFCoordinator.Contract.ILink(&_VRFCoordinator.CallOpts) -} - -func (_VRFCoordinator *VRFCoordinatorCaller) MigrationVersion(opts *bind.CallOpts) (uint8, error) { - var out []interface{} - err := _VRFCoordinator.contract.Call(opts, &out, "migrationVersion") - - if err != nil { - return *new(uint8), err - } - - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) - - return out0, err - -} - -func (_VRFCoordinator *VRFCoordinatorSession) MigrationVersion() (uint8, error) { - return _VRFCoordinator.Contract.MigrationVersion(&_VRFCoordinator.CallOpts) -} - -func (_VRFCoordinator *VRFCoordinatorCallerSession) MigrationVersion() (uint8, error) { - return _VRFCoordinator.Contract.MigrationVersion(&_VRFCoordinator.CallOpts) -} - -func (_VRFCoordinator *VRFCoordinatorCaller) OnMigration(opts *bind.CallOpts, arg0 []byte) error { - var out []interface{} - err := _VRFCoordinator.contract.Call(opts, &out, "onMigration", arg0) - - if err != nil { - return err - } - - return err - -} - -func (_VRFCoordinator *VRFCoordinatorSession) OnMigration(arg0 []byte) error { - return _VRFCoordinator.Contract.OnMigration(&_VRFCoordinator.CallOpts, arg0) -} - -func (_VRFCoordinator *VRFCoordinatorCallerSession) OnMigration(arg0 []byte) error { - return _VRFCoordinator.Contract.OnMigration(&_VRFCoordinator.CallOpts, arg0) -} - -func (_VRFCoordinator *VRFCoordinatorCaller) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _VRFCoordinator.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 (_VRFCoordinator *VRFCoordinatorSession) Owner() (common.Address, error) { - return _VRFCoordinator.Contract.Owner(&_VRFCoordinator.CallOpts) -} - -func (_VRFCoordinator *VRFCoordinatorCallerSession) Owner() (common.Address, error) { - return _VRFCoordinator.Contract.Owner(&_VRFCoordinator.CallOpts) -} - -func (_VRFCoordinator *VRFCoordinatorCaller) SCallbackConfig(opts *bind.CallOpts) (SCallbackConfig, - - error) { - var out []interface{} - err := _VRFCoordinator.contract.Call(opts, &out, "s_callbackConfig") - - outstruct := new(SCallbackConfig) - if err != nil { - return *outstruct, err - } - - outstruct.MaxCallbackGasLimit = *abi.ConvertType(out[0], new(uint32)).(*uint32) - outstruct.MaxCallbackArgumentsLength = *abi.ConvertType(out[1], new(uint32)).(*uint32) - - return *outstruct, err - -} - -func (_VRFCoordinator *VRFCoordinatorSession) SCallbackConfig() (SCallbackConfig, - - error) { - return _VRFCoordinator.Contract.SCallbackConfig(&_VRFCoordinator.CallOpts) -} - -func (_VRFCoordinator *VRFCoordinatorCallerSession) SCallbackConfig() (SCallbackConfig, - - error) { - return _VRFCoordinator.Contract.SCallbackConfig(&_VRFCoordinator.CallOpts) -} - -func (_VRFCoordinator *VRFCoordinatorCaller) SCoordinatorConfig(opts *bind.CallOpts) (SCoordinatorConfig, - - error) { - var out []interface{} - err := _VRFCoordinator.contract.Call(opts, &out, "s_coordinatorConfig") - - outstruct := new(SCoordinatorConfig) - if err != nil { - return *outstruct, err - } - - outstruct.UseReasonableGasPrice = *abi.ConvertType(out[0], new(bool)).(*bool) - outstruct.ReentrancyLock = *abi.ConvertType(out[1], new(bool)).(*bool) - outstruct.Paused = *abi.ConvertType(out[2], new(bool)).(*bool) - outstruct.PremiumPercentage = *abi.ConvertType(out[3], new(uint8)).(*uint8) - outstruct.UnusedGasPenaltyPercent = *abi.ConvertType(out[4], new(uint8)).(*uint8) - outstruct.StalenessSeconds = *abi.ConvertType(out[5], new(uint32)).(*uint32) - outstruct.RedeemableRequestGasOverhead = *abi.ConvertType(out[6], new(uint32)).(*uint32) - outstruct.CallbackRequestGasOverhead = *abi.ConvertType(out[7], new(uint32)).(*uint32) - outstruct.ReasonableGasPriceStalenessBlocks = *abi.ConvertType(out[8], new(uint32)).(*uint32) - outstruct.FallbackWeiPerUnitLink = *abi.ConvertType(out[9], new(*big.Int)).(**big.Int) - - return *outstruct, err - -} - -func (_VRFCoordinator *VRFCoordinatorSession) SCoordinatorConfig() (SCoordinatorConfig, - - error) { - return _VRFCoordinator.Contract.SCoordinatorConfig(&_VRFCoordinator.CallOpts) -} - -func (_VRFCoordinator *VRFCoordinatorCallerSession) SCoordinatorConfig() (SCoordinatorConfig, - - error) { - return _VRFCoordinator.Contract.SCoordinatorConfig(&_VRFCoordinator.CallOpts) -} - -func (_VRFCoordinator *VRFCoordinatorCaller) SPendingRequests(opts *bind.CallOpts, arg0 *big.Int) (SPendingRequests, - - error) { - var out []interface{} - err := _VRFCoordinator.contract.Call(opts, &out, "s_pendingRequests", arg0) - - outstruct := new(SPendingRequests) - if err != nil { - return *outstruct, err - } - - outstruct.SlotNumber = *abi.ConvertType(out[0], new(uint32)).(*uint32) - outstruct.ConfirmationDelay = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) - outstruct.NumWords = *abi.ConvertType(out[2], new(uint16)).(*uint16) - outstruct.Requester = *abi.ConvertType(out[3], new(common.Address)).(*common.Address) - - return *outstruct, err - -} - -func (_VRFCoordinator *VRFCoordinatorSession) SPendingRequests(arg0 *big.Int) (SPendingRequests, - - error) { - return _VRFCoordinator.Contract.SPendingRequests(&_VRFCoordinator.CallOpts, arg0) -} - -func (_VRFCoordinator *VRFCoordinatorCallerSession) SPendingRequests(arg0 *big.Int) (SPendingRequests, - - error) { - return _VRFCoordinator.Contract.SPendingRequests(&_VRFCoordinator.CallOpts, arg0) -} - -func (_VRFCoordinator *VRFCoordinatorCaller) SProducer(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _VRFCoordinator.contract.Call(opts, &out, "s_producer") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_VRFCoordinator *VRFCoordinatorSession) SProducer() (common.Address, error) { - return _VRFCoordinator.Contract.SProducer(&_VRFCoordinator.CallOpts) -} - -func (_VRFCoordinator *VRFCoordinatorCallerSession) SProducer() (common.Address, error) { - return _VRFCoordinator.Contract.SProducer(&_VRFCoordinator.CallOpts) -} - -func (_VRFCoordinator *VRFCoordinatorTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _VRFCoordinator.contract.Transact(opts, "acceptOwnership") -} - -func (_VRFCoordinator *VRFCoordinatorSession) AcceptOwnership() (*types.Transaction, error) { - return _VRFCoordinator.Contract.AcceptOwnership(&_VRFCoordinator.TransactOpts) -} - -func (_VRFCoordinator *VRFCoordinatorTransactorSession) AcceptOwnership() (*types.Transaction, error) { - return _VRFCoordinator.Contract.AcceptOwnership(&_VRFCoordinator.TransactOpts) -} - -func (_VRFCoordinator *VRFCoordinatorTransactor) AcceptSubscriptionOwnerTransfer(opts *bind.TransactOpts, subId *big.Int) (*types.Transaction, error) { - return _VRFCoordinator.contract.Transact(opts, "acceptSubscriptionOwnerTransfer", subId) -} - -func (_VRFCoordinator *VRFCoordinatorSession) AcceptSubscriptionOwnerTransfer(subId *big.Int) (*types.Transaction, error) { - return _VRFCoordinator.Contract.AcceptSubscriptionOwnerTransfer(&_VRFCoordinator.TransactOpts, subId) -} - -func (_VRFCoordinator *VRFCoordinatorTransactorSession) AcceptSubscriptionOwnerTransfer(subId *big.Int) (*types.Transaction, error) { - return _VRFCoordinator.Contract.AcceptSubscriptionOwnerTransfer(&_VRFCoordinator.TransactOpts, subId) -} - -func (_VRFCoordinator *VRFCoordinatorTransactor) AddConsumer(opts *bind.TransactOpts, subId *big.Int, consumer common.Address) (*types.Transaction, error) { - return _VRFCoordinator.contract.Transact(opts, "addConsumer", subId, consumer) -} - -func (_VRFCoordinator *VRFCoordinatorSession) AddConsumer(subId *big.Int, consumer common.Address) (*types.Transaction, error) { - return _VRFCoordinator.Contract.AddConsumer(&_VRFCoordinator.TransactOpts, subId, consumer) -} - -func (_VRFCoordinator *VRFCoordinatorTransactorSession) AddConsumer(subId *big.Int, consumer common.Address) (*types.Transaction, error) { - return _VRFCoordinator.Contract.AddConsumer(&_VRFCoordinator.TransactOpts, subId, consumer) -} - -func (_VRFCoordinator *VRFCoordinatorTransactor) BatchTransferLink(opts *bind.TransactOpts, recipients []common.Address, paymentsInJuels []*big.Int) (*types.Transaction, error) { - return _VRFCoordinator.contract.Transact(opts, "batchTransferLink", recipients, paymentsInJuels) -} - -func (_VRFCoordinator *VRFCoordinatorSession) BatchTransferLink(recipients []common.Address, paymentsInJuels []*big.Int) (*types.Transaction, error) { - return _VRFCoordinator.Contract.BatchTransferLink(&_VRFCoordinator.TransactOpts, recipients, paymentsInJuels) -} - -func (_VRFCoordinator *VRFCoordinatorTransactorSession) BatchTransferLink(recipients []common.Address, paymentsInJuels []*big.Int) (*types.Transaction, error) { - return _VRFCoordinator.Contract.BatchTransferLink(&_VRFCoordinator.TransactOpts, recipients, paymentsInJuels) -} - -func (_VRFCoordinator *VRFCoordinatorTransactor) CancelSubscription(opts *bind.TransactOpts, subId *big.Int, to common.Address) (*types.Transaction, error) { - return _VRFCoordinator.contract.Transact(opts, "cancelSubscription", subId, to) -} - -func (_VRFCoordinator *VRFCoordinatorSession) CancelSubscription(subId *big.Int, to common.Address) (*types.Transaction, error) { - return _VRFCoordinator.Contract.CancelSubscription(&_VRFCoordinator.TransactOpts, subId, to) -} - -func (_VRFCoordinator *VRFCoordinatorTransactorSession) CancelSubscription(subId *big.Int, to common.Address) (*types.Transaction, error) { - return _VRFCoordinator.Contract.CancelSubscription(&_VRFCoordinator.TransactOpts, subId, to) -} - -func (_VRFCoordinator *VRFCoordinatorTransactor) CreateSubscription(opts *bind.TransactOpts) (*types.Transaction, error) { - return _VRFCoordinator.contract.Transact(opts, "createSubscription") -} - -func (_VRFCoordinator *VRFCoordinatorSession) CreateSubscription() (*types.Transaction, error) { - return _VRFCoordinator.Contract.CreateSubscription(&_VRFCoordinator.TransactOpts) -} - -func (_VRFCoordinator *VRFCoordinatorTransactorSession) CreateSubscription() (*types.Transaction, error) { - return _VRFCoordinator.Contract.CreateSubscription(&_VRFCoordinator.TransactOpts) -} - -func (_VRFCoordinator *VRFCoordinatorTransactor) DeregisterMigratableCoordinator(opts *bind.TransactOpts, target common.Address) (*types.Transaction, error) { - return _VRFCoordinator.contract.Transact(opts, "deregisterMigratableCoordinator", target) -} - -func (_VRFCoordinator *VRFCoordinatorSession) DeregisterMigratableCoordinator(target common.Address) (*types.Transaction, error) { - return _VRFCoordinator.Contract.DeregisterMigratableCoordinator(&_VRFCoordinator.TransactOpts, target) -} - -func (_VRFCoordinator *VRFCoordinatorTransactorSession) DeregisterMigratableCoordinator(target common.Address) (*types.Transaction, error) { - return _VRFCoordinator.Contract.DeregisterMigratableCoordinator(&_VRFCoordinator.TransactOpts, target) -} - -func (_VRFCoordinator *VRFCoordinatorTransactor) Migrate(opts *bind.TransactOpts, newCoordinator common.Address, encodedRequest []byte) (*types.Transaction, error) { - return _VRFCoordinator.contract.Transact(opts, "migrate", newCoordinator, encodedRequest) -} - -func (_VRFCoordinator *VRFCoordinatorSession) Migrate(newCoordinator common.Address, encodedRequest []byte) (*types.Transaction, error) { - return _VRFCoordinator.Contract.Migrate(&_VRFCoordinator.TransactOpts, newCoordinator, encodedRequest) -} - -func (_VRFCoordinator *VRFCoordinatorTransactorSession) Migrate(newCoordinator common.Address, encodedRequest []byte) (*types.Transaction, error) { - return _VRFCoordinator.Contract.Migrate(&_VRFCoordinator.TransactOpts, newCoordinator, encodedRequest) -} - -func (_VRFCoordinator *VRFCoordinatorTransactor) OnTokenTransfer(opts *bind.TransactOpts, arg0 common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { - return _VRFCoordinator.contract.Transact(opts, "onTokenTransfer", arg0, amount, data) -} - -func (_VRFCoordinator *VRFCoordinatorSession) OnTokenTransfer(arg0 common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { - return _VRFCoordinator.Contract.OnTokenTransfer(&_VRFCoordinator.TransactOpts, arg0, amount, data) -} - -func (_VRFCoordinator *VRFCoordinatorTransactorSession) OnTokenTransfer(arg0 common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { - return _VRFCoordinator.Contract.OnTokenTransfer(&_VRFCoordinator.TransactOpts, arg0, amount, data) -} - -func (_VRFCoordinator *VRFCoordinatorTransactor) ProcessVRFOutputs(opts *bind.TransactOpts, vrfOutputs []VRFBeaconTypesVRFOutput, juelsPerFeeCoin *big.Int, reasonableGasPrice uint64, blockHeight uint64) (*types.Transaction, error) { - return _VRFCoordinator.contract.Transact(opts, "processVRFOutputs", vrfOutputs, juelsPerFeeCoin, reasonableGasPrice, blockHeight) -} - -func (_VRFCoordinator *VRFCoordinatorSession) ProcessVRFOutputs(vrfOutputs []VRFBeaconTypesVRFOutput, juelsPerFeeCoin *big.Int, reasonableGasPrice uint64, blockHeight uint64) (*types.Transaction, error) { - return _VRFCoordinator.Contract.ProcessVRFOutputs(&_VRFCoordinator.TransactOpts, vrfOutputs, juelsPerFeeCoin, reasonableGasPrice, blockHeight) -} - -func (_VRFCoordinator *VRFCoordinatorTransactorSession) ProcessVRFOutputs(vrfOutputs []VRFBeaconTypesVRFOutput, juelsPerFeeCoin *big.Int, reasonableGasPrice uint64, blockHeight uint64) (*types.Transaction, error) { - return _VRFCoordinator.Contract.ProcessVRFOutputs(&_VRFCoordinator.TransactOpts, vrfOutputs, juelsPerFeeCoin, reasonableGasPrice, blockHeight) -} - -func (_VRFCoordinator *VRFCoordinatorTransactor) RedeemRandomness(opts *bind.TransactOpts, subID *big.Int, requestID *big.Int, arg2 []byte) (*types.Transaction, error) { - return _VRFCoordinator.contract.Transact(opts, "redeemRandomness", subID, requestID, arg2) -} - -func (_VRFCoordinator *VRFCoordinatorSession) RedeemRandomness(subID *big.Int, requestID *big.Int, arg2 []byte) (*types.Transaction, error) { - return _VRFCoordinator.Contract.RedeemRandomness(&_VRFCoordinator.TransactOpts, subID, requestID, arg2) -} - -func (_VRFCoordinator *VRFCoordinatorTransactorSession) RedeemRandomness(subID *big.Int, requestID *big.Int, arg2 []byte) (*types.Transaction, error) { - return _VRFCoordinator.Contract.RedeemRandomness(&_VRFCoordinator.TransactOpts, subID, requestID, arg2) -} - -func (_VRFCoordinator *VRFCoordinatorTransactor) RegisterMigratableCoordinator(opts *bind.TransactOpts, target common.Address) (*types.Transaction, error) { - return _VRFCoordinator.contract.Transact(opts, "registerMigratableCoordinator", target) -} - -func (_VRFCoordinator *VRFCoordinatorSession) RegisterMigratableCoordinator(target common.Address) (*types.Transaction, error) { - return _VRFCoordinator.Contract.RegisterMigratableCoordinator(&_VRFCoordinator.TransactOpts, target) -} - -func (_VRFCoordinator *VRFCoordinatorTransactorSession) RegisterMigratableCoordinator(target common.Address) (*types.Transaction, error) { - return _VRFCoordinator.Contract.RegisterMigratableCoordinator(&_VRFCoordinator.TransactOpts, target) -} - -func (_VRFCoordinator *VRFCoordinatorTransactor) RemoveConsumer(opts *bind.TransactOpts, subId *big.Int, consumer common.Address) (*types.Transaction, error) { - return _VRFCoordinator.contract.Transact(opts, "removeConsumer", subId, consumer) -} - -func (_VRFCoordinator *VRFCoordinatorSession) RemoveConsumer(subId *big.Int, consumer common.Address) (*types.Transaction, error) { - return _VRFCoordinator.Contract.RemoveConsumer(&_VRFCoordinator.TransactOpts, subId, consumer) -} - -func (_VRFCoordinator *VRFCoordinatorTransactorSession) RemoveConsumer(subId *big.Int, consumer common.Address) (*types.Transaction, error) { - return _VRFCoordinator.Contract.RemoveConsumer(&_VRFCoordinator.TransactOpts, subId, consumer) -} - -func (_VRFCoordinator *VRFCoordinatorTransactor) RequestRandomness(opts *bind.TransactOpts, subID *big.Int, numWords uint16, confDelay *big.Int, arg3 []byte) (*types.Transaction, error) { - return _VRFCoordinator.contract.Transact(opts, "requestRandomness", subID, numWords, confDelay, arg3) -} - -func (_VRFCoordinator *VRFCoordinatorSession) RequestRandomness(subID *big.Int, numWords uint16, confDelay *big.Int, arg3 []byte) (*types.Transaction, error) { - return _VRFCoordinator.Contract.RequestRandomness(&_VRFCoordinator.TransactOpts, subID, numWords, confDelay, arg3) -} - -func (_VRFCoordinator *VRFCoordinatorTransactorSession) RequestRandomness(subID *big.Int, numWords uint16, confDelay *big.Int, arg3 []byte) (*types.Transaction, error) { - return _VRFCoordinator.Contract.RequestRandomness(&_VRFCoordinator.TransactOpts, subID, numWords, confDelay, arg3) -} - -func (_VRFCoordinator *VRFCoordinatorTransactor) RequestRandomnessFulfillment(opts *bind.TransactOpts, subID *big.Int, numWords uint16, confDelay *big.Int, callbackGasLimit uint32, arguments []byte, arg5 []byte) (*types.Transaction, error) { - return _VRFCoordinator.contract.Transact(opts, "requestRandomnessFulfillment", subID, numWords, confDelay, callbackGasLimit, arguments, arg5) -} - -func (_VRFCoordinator *VRFCoordinatorSession) RequestRandomnessFulfillment(subID *big.Int, numWords uint16, confDelay *big.Int, callbackGasLimit uint32, arguments []byte, arg5 []byte) (*types.Transaction, error) { - return _VRFCoordinator.Contract.RequestRandomnessFulfillment(&_VRFCoordinator.TransactOpts, subID, numWords, confDelay, callbackGasLimit, arguments, arg5) -} - -func (_VRFCoordinator *VRFCoordinatorTransactorSession) RequestRandomnessFulfillment(subID *big.Int, numWords uint16, confDelay *big.Int, callbackGasLimit uint32, arguments []byte, arg5 []byte) (*types.Transaction, error) { - return _VRFCoordinator.Contract.RequestRandomnessFulfillment(&_VRFCoordinator.TransactOpts, subID, numWords, confDelay, callbackGasLimit, arguments, arg5) -} - -func (_VRFCoordinator *VRFCoordinatorTransactor) RequestSubscriptionOwnerTransfer(opts *bind.TransactOpts, subId *big.Int, newOwner common.Address) (*types.Transaction, error) { - return _VRFCoordinator.contract.Transact(opts, "requestSubscriptionOwnerTransfer", subId, newOwner) -} - -func (_VRFCoordinator *VRFCoordinatorSession) RequestSubscriptionOwnerTransfer(subId *big.Int, newOwner common.Address) (*types.Transaction, error) { - return _VRFCoordinator.Contract.RequestSubscriptionOwnerTransfer(&_VRFCoordinator.TransactOpts, subId, newOwner) -} - -func (_VRFCoordinator *VRFCoordinatorTransactorSession) RequestSubscriptionOwnerTransfer(subId *big.Int, newOwner common.Address) (*types.Transaction, error) { - return _VRFCoordinator.Contract.RequestSubscriptionOwnerTransfer(&_VRFCoordinator.TransactOpts, subId, newOwner) -} - -func (_VRFCoordinator *VRFCoordinatorTransactor) SetCallbackConfig(opts *bind.TransactOpts, config VRFCoordinatorCallbackConfig) (*types.Transaction, error) { - return _VRFCoordinator.contract.Transact(opts, "setCallbackConfig", config) -} - -func (_VRFCoordinator *VRFCoordinatorSession) SetCallbackConfig(config VRFCoordinatorCallbackConfig) (*types.Transaction, error) { - return _VRFCoordinator.Contract.SetCallbackConfig(&_VRFCoordinator.TransactOpts, config) -} - -func (_VRFCoordinator *VRFCoordinatorTransactorSession) SetCallbackConfig(config VRFCoordinatorCallbackConfig) (*types.Transaction, error) { - return _VRFCoordinator.Contract.SetCallbackConfig(&_VRFCoordinator.TransactOpts, config) -} - -func (_VRFCoordinator *VRFCoordinatorTransactor) SetConfirmationDelays(opts *bind.TransactOpts, confDelays [8]*big.Int) (*types.Transaction, error) { - return _VRFCoordinator.contract.Transact(opts, "setConfirmationDelays", confDelays) -} - -func (_VRFCoordinator *VRFCoordinatorSession) SetConfirmationDelays(confDelays [8]*big.Int) (*types.Transaction, error) { - return _VRFCoordinator.Contract.SetConfirmationDelays(&_VRFCoordinator.TransactOpts, confDelays) -} - -func (_VRFCoordinator *VRFCoordinatorTransactorSession) SetConfirmationDelays(confDelays [8]*big.Int) (*types.Transaction, error) { - return _VRFCoordinator.Contract.SetConfirmationDelays(&_VRFCoordinator.TransactOpts, confDelays) -} - -func (_VRFCoordinator *VRFCoordinatorTransactor) SetCoordinatorConfig(opts *bind.TransactOpts, coordinatorConfig VRFBeaconTypesCoordinatorConfig) (*types.Transaction, error) { - return _VRFCoordinator.contract.Transact(opts, "setCoordinatorConfig", coordinatorConfig) -} - -func (_VRFCoordinator *VRFCoordinatorSession) SetCoordinatorConfig(coordinatorConfig VRFBeaconTypesCoordinatorConfig) (*types.Transaction, error) { - return _VRFCoordinator.Contract.SetCoordinatorConfig(&_VRFCoordinator.TransactOpts, coordinatorConfig) -} - -func (_VRFCoordinator *VRFCoordinatorTransactorSession) SetCoordinatorConfig(coordinatorConfig VRFBeaconTypesCoordinatorConfig) (*types.Transaction, error) { - return _VRFCoordinator.Contract.SetCoordinatorConfig(&_VRFCoordinator.TransactOpts, coordinatorConfig) -} - -func (_VRFCoordinator *VRFCoordinatorTransactor) SetPauseFlag(opts *bind.TransactOpts, pause bool) (*types.Transaction, error) { - return _VRFCoordinator.contract.Transact(opts, "setPauseFlag", pause) -} - -func (_VRFCoordinator *VRFCoordinatorSession) SetPauseFlag(pause bool) (*types.Transaction, error) { - return _VRFCoordinator.Contract.SetPauseFlag(&_VRFCoordinator.TransactOpts, pause) -} - -func (_VRFCoordinator *VRFCoordinatorTransactorSession) SetPauseFlag(pause bool) (*types.Transaction, error) { - return _VRFCoordinator.Contract.SetPauseFlag(&_VRFCoordinator.TransactOpts, pause) -} - -func (_VRFCoordinator *VRFCoordinatorTransactor) SetProducer(opts *bind.TransactOpts, producer common.Address) (*types.Transaction, error) { - return _VRFCoordinator.contract.Transact(opts, "setProducer", producer) -} - -func (_VRFCoordinator *VRFCoordinatorSession) SetProducer(producer common.Address) (*types.Transaction, error) { - return _VRFCoordinator.Contract.SetProducer(&_VRFCoordinator.TransactOpts, producer) -} - -func (_VRFCoordinator *VRFCoordinatorTransactorSession) SetProducer(producer common.Address) (*types.Transaction, error) { - return _VRFCoordinator.Contract.SetProducer(&_VRFCoordinator.TransactOpts, producer) -} - -func (_VRFCoordinator *VRFCoordinatorTransactor) TransferLink(opts *bind.TransactOpts, recipient common.Address, juelsAmount *big.Int) (*types.Transaction, error) { - return _VRFCoordinator.contract.Transact(opts, "transferLink", recipient, juelsAmount) -} - -func (_VRFCoordinator *VRFCoordinatorSession) TransferLink(recipient common.Address, juelsAmount *big.Int) (*types.Transaction, error) { - return _VRFCoordinator.Contract.TransferLink(&_VRFCoordinator.TransactOpts, recipient, juelsAmount) -} - -func (_VRFCoordinator *VRFCoordinatorTransactorSession) TransferLink(recipient common.Address, juelsAmount *big.Int) (*types.Transaction, error) { - return _VRFCoordinator.Contract.TransferLink(&_VRFCoordinator.TransactOpts, recipient, juelsAmount) -} - -func (_VRFCoordinator *VRFCoordinatorTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { - return _VRFCoordinator.contract.Transact(opts, "transferOwnership", to) -} - -func (_VRFCoordinator *VRFCoordinatorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _VRFCoordinator.Contract.TransferOwnership(&_VRFCoordinator.TransactOpts, to) -} - -func (_VRFCoordinator *VRFCoordinatorTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _VRFCoordinator.Contract.TransferOwnership(&_VRFCoordinator.TransactOpts, to) -} - -type VRFCoordinatorCallbackConfigSetIterator struct { - Event *VRFCoordinatorCallbackConfigSet - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFCoordinatorCallbackConfigSetIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFCoordinatorCallbackConfigSet) - 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(VRFCoordinatorCallbackConfigSet) - 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 *VRFCoordinatorCallbackConfigSetIterator) Error() error { - return it.fail -} - -func (it *VRFCoordinatorCallbackConfigSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFCoordinatorCallbackConfigSet struct { - NewConfig VRFCoordinatorCallbackConfig - Raw types.Log -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) FilterCallbackConfigSet(opts *bind.FilterOpts) (*VRFCoordinatorCallbackConfigSetIterator, error) { - - logs, sub, err := _VRFCoordinator.contract.FilterLogs(opts, "CallbackConfigSet") - if err != nil { - return nil, err - } - return &VRFCoordinatorCallbackConfigSetIterator{contract: _VRFCoordinator.contract, event: "CallbackConfigSet", logs: logs, sub: sub}, nil -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) WatchCallbackConfigSet(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorCallbackConfigSet) (event.Subscription, error) { - - logs, sub, err := _VRFCoordinator.contract.WatchLogs(opts, "CallbackConfigSet") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(VRFCoordinatorCallbackConfigSet) - if err := _VRFCoordinator.contract.UnpackLog(event, "CallbackConfigSet", 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 (_VRFCoordinator *VRFCoordinatorFilterer) ParseCallbackConfigSet(log types.Log) (*VRFCoordinatorCallbackConfigSet, error) { - event := new(VRFCoordinatorCallbackConfigSet) - if err := _VRFCoordinator.contract.UnpackLog(event, "CallbackConfigSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type VRFCoordinatorCoordinatorConfigSetIterator struct { - Event *VRFCoordinatorCoordinatorConfigSet - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFCoordinatorCoordinatorConfigSetIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFCoordinatorCoordinatorConfigSet) - 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(VRFCoordinatorCoordinatorConfigSet) - 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 *VRFCoordinatorCoordinatorConfigSetIterator) Error() error { - return it.fail -} - -func (it *VRFCoordinatorCoordinatorConfigSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFCoordinatorCoordinatorConfigSet struct { - CoordinatorConfig VRFBeaconTypesCoordinatorConfig - Raw types.Log -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) FilterCoordinatorConfigSet(opts *bind.FilterOpts) (*VRFCoordinatorCoordinatorConfigSetIterator, error) { - - logs, sub, err := _VRFCoordinator.contract.FilterLogs(opts, "CoordinatorConfigSet") - if err != nil { - return nil, err - } - return &VRFCoordinatorCoordinatorConfigSetIterator{contract: _VRFCoordinator.contract, event: "CoordinatorConfigSet", logs: logs, sub: sub}, nil -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) WatchCoordinatorConfigSet(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorCoordinatorConfigSet) (event.Subscription, error) { - - logs, sub, err := _VRFCoordinator.contract.WatchLogs(opts, "CoordinatorConfigSet") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(VRFCoordinatorCoordinatorConfigSet) - if err := _VRFCoordinator.contract.UnpackLog(event, "CoordinatorConfigSet", 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 (_VRFCoordinator *VRFCoordinatorFilterer) ParseCoordinatorConfigSet(log types.Log) (*VRFCoordinatorCoordinatorConfigSet, error) { - event := new(VRFCoordinatorCoordinatorConfigSet) - if err := _VRFCoordinator.contract.UnpackLog(event, "CoordinatorConfigSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type VRFCoordinatorCoordinatorDeregisteredIterator struct { - Event *VRFCoordinatorCoordinatorDeregistered - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFCoordinatorCoordinatorDeregisteredIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFCoordinatorCoordinatorDeregistered) - 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(VRFCoordinatorCoordinatorDeregistered) - 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 *VRFCoordinatorCoordinatorDeregisteredIterator) Error() error { - return it.fail -} - -func (it *VRFCoordinatorCoordinatorDeregisteredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFCoordinatorCoordinatorDeregistered struct { - CoordinatorAddress common.Address - Raw types.Log -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) FilterCoordinatorDeregistered(opts *bind.FilterOpts) (*VRFCoordinatorCoordinatorDeregisteredIterator, error) { - - logs, sub, err := _VRFCoordinator.contract.FilterLogs(opts, "CoordinatorDeregistered") - if err != nil { - return nil, err - } - return &VRFCoordinatorCoordinatorDeregisteredIterator{contract: _VRFCoordinator.contract, event: "CoordinatorDeregistered", logs: logs, sub: sub}, nil -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) WatchCoordinatorDeregistered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorCoordinatorDeregistered) (event.Subscription, error) { - - logs, sub, err := _VRFCoordinator.contract.WatchLogs(opts, "CoordinatorDeregistered") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(VRFCoordinatorCoordinatorDeregistered) - if err := _VRFCoordinator.contract.UnpackLog(event, "CoordinatorDeregistered", 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 (_VRFCoordinator *VRFCoordinatorFilterer) ParseCoordinatorDeregistered(log types.Log) (*VRFCoordinatorCoordinatorDeregistered, error) { - event := new(VRFCoordinatorCoordinatorDeregistered) - if err := _VRFCoordinator.contract.UnpackLog(event, "CoordinatorDeregistered", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type VRFCoordinatorCoordinatorRegisteredIterator struct { - Event *VRFCoordinatorCoordinatorRegistered - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFCoordinatorCoordinatorRegisteredIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFCoordinatorCoordinatorRegistered) - 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(VRFCoordinatorCoordinatorRegistered) - 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 *VRFCoordinatorCoordinatorRegisteredIterator) Error() error { - return it.fail -} - -func (it *VRFCoordinatorCoordinatorRegisteredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFCoordinatorCoordinatorRegistered struct { - CoordinatorAddress common.Address - Raw types.Log -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) FilterCoordinatorRegistered(opts *bind.FilterOpts) (*VRFCoordinatorCoordinatorRegisteredIterator, error) { - - logs, sub, err := _VRFCoordinator.contract.FilterLogs(opts, "CoordinatorRegistered") - if err != nil { - return nil, err - } - return &VRFCoordinatorCoordinatorRegisteredIterator{contract: _VRFCoordinator.contract, event: "CoordinatorRegistered", logs: logs, sub: sub}, nil -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) WatchCoordinatorRegistered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorCoordinatorRegistered) (event.Subscription, error) { - - logs, sub, err := _VRFCoordinator.contract.WatchLogs(opts, "CoordinatorRegistered") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(VRFCoordinatorCoordinatorRegistered) - if err := _VRFCoordinator.contract.UnpackLog(event, "CoordinatorRegistered", 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 (_VRFCoordinator *VRFCoordinatorFilterer) ParseCoordinatorRegistered(log types.Log) (*VRFCoordinatorCoordinatorRegistered, error) { - event := new(VRFCoordinatorCoordinatorRegistered) - if err := _VRFCoordinator.contract.UnpackLog(event, "CoordinatorRegistered", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type VRFCoordinatorMigrationCompletedIterator struct { - Event *VRFCoordinatorMigrationCompleted - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFCoordinatorMigrationCompletedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFCoordinatorMigrationCompleted) - 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(VRFCoordinatorMigrationCompleted) - 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 *VRFCoordinatorMigrationCompletedIterator) Error() error { - return it.fail -} - -func (it *VRFCoordinatorMigrationCompletedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFCoordinatorMigrationCompleted struct { - NewVersion uint8 - NewCoordinator common.Address - SubID *big.Int - Raw types.Log -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) FilterMigrationCompleted(opts *bind.FilterOpts, newVersion []uint8, subID []*big.Int) (*VRFCoordinatorMigrationCompletedIterator, error) { - - var newVersionRule []interface{} - for _, newVersionItem := range newVersion { - newVersionRule = append(newVersionRule, newVersionItem) - } - - var subIDRule []interface{} - for _, subIDItem := range subID { - subIDRule = append(subIDRule, subIDItem) - } - - logs, sub, err := _VRFCoordinator.contract.FilterLogs(opts, "MigrationCompleted", newVersionRule, subIDRule) - if err != nil { - return nil, err - } - return &VRFCoordinatorMigrationCompletedIterator{contract: _VRFCoordinator.contract, event: "MigrationCompleted", logs: logs, sub: sub}, nil -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) WatchMigrationCompleted(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorMigrationCompleted, newVersion []uint8, subID []*big.Int) (event.Subscription, error) { - - var newVersionRule []interface{} - for _, newVersionItem := range newVersion { - newVersionRule = append(newVersionRule, newVersionItem) - } - - var subIDRule []interface{} - for _, subIDItem := range subID { - subIDRule = append(subIDRule, subIDItem) - } - - logs, sub, err := _VRFCoordinator.contract.WatchLogs(opts, "MigrationCompleted", newVersionRule, subIDRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(VRFCoordinatorMigrationCompleted) - if err := _VRFCoordinator.contract.UnpackLog(event, "MigrationCompleted", 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 (_VRFCoordinator *VRFCoordinatorFilterer) ParseMigrationCompleted(log types.Log) (*VRFCoordinatorMigrationCompleted, error) { - event := new(VRFCoordinatorMigrationCompleted) - if err := _VRFCoordinator.contract.UnpackLog(event, "MigrationCompleted", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type VRFCoordinatorOutputsServedIterator struct { - Event *VRFCoordinatorOutputsServed - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFCoordinatorOutputsServedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFCoordinatorOutputsServed) - 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(VRFCoordinatorOutputsServed) - 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 *VRFCoordinatorOutputsServedIterator) Error() error { - return it.fail -} - -func (it *VRFCoordinatorOutputsServedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFCoordinatorOutputsServed struct { - RecentBlockHeight uint64 - JuelsPerFeeCoin *big.Int - ReasonableGasPrice uint64 - OutputsServed []VRFBeaconTypesOutputServed - Raw types.Log -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) FilterOutputsServed(opts *bind.FilterOpts) (*VRFCoordinatorOutputsServedIterator, error) { - - logs, sub, err := _VRFCoordinator.contract.FilterLogs(opts, "OutputsServed") - if err != nil { - return nil, err - } - return &VRFCoordinatorOutputsServedIterator{contract: _VRFCoordinator.contract, event: "OutputsServed", logs: logs, sub: sub}, nil -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) WatchOutputsServed(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorOutputsServed) (event.Subscription, error) { - - logs, sub, err := _VRFCoordinator.contract.WatchLogs(opts, "OutputsServed") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(VRFCoordinatorOutputsServed) - if err := _VRFCoordinator.contract.UnpackLog(event, "OutputsServed", 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 (_VRFCoordinator *VRFCoordinatorFilterer) ParseOutputsServed(log types.Log) (*VRFCoordinatorOutputsServed, error) { - event := new(VRFCoordinatorOutputsServed) - if err := _VRFCoordinator.contract.UnpackLog(event, "OutputsServed", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type VRFCoordinatorOwnershipTransferRequestedIterator struct { - Event *VRFCoordinatorOwnershipTransferRequested - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFCoordinatorOwnershipTransferRequestedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFCoordinatorOwnershipTransferRequested) - 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(VRFCoordinatorOwnershipTransferRequested) - 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 *VRFCoordinatorOwnershipTransferRequestedIterator) Error() error { - return it.fail -} - -func (it *VRFCoordinatorOwnershipTransferRequestedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFCoordinatorOwnershipTransferRequested struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFCoordinatorOwnershipTransferRequestedIterator, 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 := _VRFCoordinator.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) - if err != nil { - return nil, err - } - return &VRFCoordinatorOwnershipTransferRequestedIterator{contract: _VRFCoordinator.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorOwnershipTransferRequested, 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 := _VRFCoordinator.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(VRFCoordinatorOwnershipTransferRequested) - if err := _VRFCoordinator.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 (_VRFCoordinator *VRFCoordinatorFilterer) ParseOwnershipTransferRequested(log types.Log) (*VRFCoordinatorOwnershipTransferRequested, error) { - event := new(VRFCoordinatorOwnershipTransferRequested) - if err := _VRFCoordinator.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type VRFCoordinatorOwnershipTransferredIterator struct { - Event *VRFCoordinatorOwnershipTransferred - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFCoordinatorOwnershipTransferredIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFCoordinatorOwnershipTransferred) - 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(VRFCoordinatorOwnershipTransferred) - 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 *VRFCoordinatorOwnershipTransferredIterator) Error() error { - return it.fail -} - -func (it *VRFCoordinatorOwnershipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFCoordinatorOwnershipTransferred struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFCoordinatorOwnershipTransferredIterator, 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 := _VRFCoordinator.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) - if err != nil { - return nil, err - } - return &VRFCoordinatorOwnershipTransferredIterator{contract: _VRFCoordinator.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorOwnershipTransferred, 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 := _VRFCoordinator.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(VRFCoordinatorOwnershipTransferred) - if err := _VRFCoordinator.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 (_VRFCoordinator *VRFCoordinatorFilterer) ParseOwnershipTransferred(log types.Log) (*VRFCoordinatorOwnershipTransferred, error) { - event := new(VRFCoordinatorOwnershipTransferred) - if err := _VRFCoordinator.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type VRFCoordinatorPauseFlagChangedIterator struct { - Event *VRFCoordinatorPauseFlagChanged - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFCoordinatorPauseFlagChangedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFCoordinatorPauseFlagChanged) - 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(VRFCoordinatorPauseFlagChanged) - 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 *VRFCoordinatorPauseFlagChangedIterator) Error() error { - return it.fail -} - -func (it *VRFCoordinatorPauseFlagChangedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFCoordinatorPauseFlagChanged struct { - Paused bool - Raw types.Log -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) FilterPauseFlagChanged(opts *bind.FilterOpts) (*VRFCoordinatorPauseFlagChangedIterator, error) { - - logs, sub, err := _VRFCoordinator.contract.FilterLogs(opts, "PauseFlagChanged") - if err != nil { - return nil, err - } - return &VRFCoordinatorPauseFlagChangedIterator{contract: _VRFCoordinator.contract, event: "PauseFlagChanged", logs: logs, sub: sub}, nil -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) WatchPauseFlagChanged(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorPauseFlagChanged) (event.Subscription, error) { - - logs, sub, err := _VRFCoordinator.contract.WatchLogs(opts, "PauseFlagChanged") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(VRFCoordinatorPauseFlagChanged) - if err := _VRFCoordinator.contract.UnpackLog(event, "PauseFlagChanged", 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 (_VRFCoordinator *VRFCoordinatorFilterer) ParsePauseFlagChanged(log types.Log) (*VRFCoordinatorPauseFlagChanged, error) { - event := new(VRFCoordinatorPauseFlagChanged) - if err := _VRFCoordinator.contract.UnpackLog(event, "PauseFlagChanged", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type VRFCoordinatorRandomWordsFulfilledIterator struct { - Event *VRFCoordinatorRandomWordsFulfilled - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFCoordinatorRandomWordsFulfilledIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFCoordinatorRandomWordsFulfilled) - 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(VRFCoordinatorRandomWordsFulfilled) - 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 *VRFCoordinatorRandomWordsFulfilledIterator) Error() error { - return it.fail -} - -func (it *VRFCoordinatorRandomWordsFulfilledIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFCoordinatorRandomWordsFulfilled struct { - RequestIDs []*big.Int - SuccessfulFulfillment []byte - TruncatedErrorData [][]byte - SubBalances []*big.Int - SubIDs []*big.Int - Raw types.Log -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) FilterRandomWordsFulfilled(opts *bind.FilterOpts) (*VRFCoordinatorRandomWordsFulfilledIterator, error) { - - logs, sub, err := _VRFCoordinator.contract.FilterLogs(opts, "RandomWordsFulfilled") - if err != nil { - return nil, err - } - return &VRFCoordinatorRandomWordsFulfilledIterator{contract: _VRFCoordinator.contract, event: "RandomWordsFulfilled", logs: logs, sub: sub}, nil -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) WatchRandomWordsFulfilled(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorRandomWordsFulfilled) (event.Subscription, error) { - - logs, sub, err := _VRFCoordinator.contract.WatchLogs(opts, "RandomWordsFulfilled") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(VRFCoordinatorRandomWordsFulfilled) - if err := _VRFCoordinator.contract.UnpackLog(event, "RandomWordsFulfilled", 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 (_VRFCoordinator *VRFCoordinatorFilterer) ParseRandomWordsFulfilled(log types.Log) (*VRFCoordinatorRandomWordsFulfilled, error) { - event := new(VRFCoordinatorRandomWordsFulfilled) - if err := _VRFCoordinator.contract.UnpackLog(event, "RandomWordsFulfilled", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type VRFCoordinatorRandomnessFulfillmentRequestedIterator struct { - Event *VRFCoordinatorRandomnessFulfillmentRequested - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFCoordinatorRandomnessFulfillmentRequestedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFCoordinatorRandomnessFulfillmentRequested) - 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(VRFCoordinatorRandomnessFulfillmentRequested) - 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 *VRFCoordinatorRandomnessFulfillmentRequestedIterator) Error() error { - return it.fail -} - -func (it *VRFCoordinatorRandomnessFulfillmentRequestedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFCoordinatorRandomnessFulfillmentRequested struct { - RequestID *big.Int - Requester common.Address - NextBeaconOutputHeight uint64 - ConfDelay *big.Int - SubID *big.Int - NumWords uint16 - GasAllowance uint32 - GasPrice *big.Int - WeiPerUnitLink *big.Int - Arguments []byte - CostJuels *big.Int - NewSubBalance *big.Int - Raw types.Log -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) FilterRandomnessFulfillmentRequested(opts *bind.FilterOpts, requestID []*big.Int) (*VRFCoordinatorRandomnessFulfillmentRequestedIterator, error) { - - var requestIDRule []interface{} - for _, requestIDItem := range requestID { - requestIDRule = append(requestIDRule, requestIDItem) - } - - logs, sub, err := _VRFCoordinator.contract.FilterLogs(opts, "RandomnessFulfillmentRequested", requestIDRule) - if err != nil { - return nil, err - } - return &VRFCoordinatorRandomnessFulfillmentRequestedIterator{contract: _VRFCoordinator.contract, event: "RandomnessFulfillmentRequested", logs: logs, sub: sub}, nil -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) WatchRandomnessFulfillmentRequested(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorRandomnessFulfillmentRequested, requestID []*big.Int) (event.Subscription, error) { - - var requestIDRule []interface{} - for _, requestIDItem := range requestID { - requestIDRule = append(requestIDRule, requestIDItem) - } - - logs, sub, err := _VRFCoordinator.contract.WatchLogs(opts, "RandomnessFulfillmentRequested", requestIDRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(VRFCoordinatorRandomnessFulfillmentRequested) - if err := _VRFCoordinator.contract.UnpackLog(event, "RandomnessFulfillmentRequested", 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 (_VRFCoordinator *VRFCoordinatorFilterer) ParseRandomnessFulfillmentRequested(log types.Log) (*VRFCoordinatorRandomnessFulfillmentRequested, error) { - event := new(VRFCoordinatorRandomnessFulfillmentRequested) - if err := _VRFCoordinator.contract.UnpackLog(event, "RandomnessFulfillmentRequested", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type VRFCoordinatorRandomnessRedeemedIterator struct { - Event *VRFCoordinatorRandomnessRedeemed - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFCoordinatorRandomnessRedeemedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFCoordinatorRandomnessRedeemed) - 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(VRFCoordinatorRandomnessRedeemed) - 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 *VRFCoordinatorRandomnessRedeemedIterator) Error() error { - return it.fail -} - -func (it *VRFCoordinatorRandomnessRedeemedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFCoordinatorRandomnessRedeemed struct { - RequestID *big.Int - Requester common.Address - SubID *big.Int - Raw types.Log -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) FilterRandomnessRedeemed(opts *bind.FilterOpts, requestID []*big.Int, requester []common.Address) (*VRFCoordinatorRandomnessRedeemedIterator, error) { - - var requestIDRule []interface{} - for _, requestIDItem := range requestID { - requestIDRule = append(requestIDRule, requestIDItem) - } - var requesterRule []interface{} - for _, requesterItem := range requester { - requesterRule = append(requesterRule, requesterItem) - } - - logs, sub, err := _VRFCoordinator.contract.FilterLogs(opts, "RandomnessRedeemed", requestIDRule, requesterRule) - if err != nil { - return nil, err - } - return &VRFCoordinatorRandomnessRedeemedIterator{contract: _VRFCoordinator.contract, event: "RandomnessRedeemed", logs: logs, sub: sub}, nil -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) WatchRandomnessRedeemed(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorRandomnessRedeemed, requestID []*big.Int, requester []common.Address) (event.Subscription, error) { - - var requestIDRule []interface{} - for _, requestIDItem := range requestID { - requestIDRule = append(requestIDRule, requestIDItem) - } - var requesterRule []interface{} - for _, requesterItem := range requester { - requesterRule = append(requesterRule, requesterItem) - } - - logs, sub, err := _VRFCoordinator.contract.WatchLogs(opts, "RandomnessRedeemed", requestIDRule, requesterRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(VRFCoordinatorRandomnessRedeemed) - if err := _VRFCoordinator.contract.UnpackLog(event, "RandomnessRedeemed", 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 (_VRFCoordinator *VRFCoordinatorFilterer) ParseRandomnessRedeemed(log types.Log) (*VRFCoordinatorRandomnessRedeemed, error) { - event := new(VRFCoordinatorRandomnessRedeemed) - if err := _VRFCoordinator.contract.UnpackLog(event, "RandomnessRedeemed", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type VRFCoordinatorRandomnessRequestedIterator struct { - Event *VRFCoordinatorRandomnessRequested - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFCoordinatorRandomnessRequestedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFCoordinatorRandomnessRequested) - 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(VRFCoordinatorRandomnessRequested) - 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 *VRFCoordinatorRandomnessRequestedIterator) Error() error { - return it.fail -} - -func (it *VRFCoordinatorRandomnessRequestedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFCoordinatorRandomnessRequested struct { - RequestID *big.Int - Requester common.Address - NextBeaconOutputHeight uint64 - ConfDelay *big.Int - SubID *big.Int - NumWords uint16 - CostJuels *big.Int - NewSubBalance *big.Int - Raw types.Log -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) FilterRandomnessRequested(opts *bind.FilterOpts, requestID []*big.Int) (*VRFCoordinatorRandomnessRequestedIterator, error) { - - var requestIDRule []interface{} - for _, requestIDItem := range requestID { - requestIDRule = append(requestIDRule, requestIDItem) - } - - logs, sub, err := _VRFCoordinator.contract.FilterLogs(opts, "RandomnessRequested", requestIDRule) - if err != nil { - return nil, err - } - return &VRFCoordinatorRandomnessRequestedIterator{contract: _VRFCoordinator.contract, event: "RandomnessRequested", logs: logs, sub: sub}, nil -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) WatchRandomnessRequested(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorRandomnessRequested, requestID []*big.Int) (event.Subscription, error) { - - var requestIDRule []interface{} - for _, requestIDItem := range requestID { - requestIDRule = append(requestIDRule, requestIDItem) - } - - logs, sub, err := _VRFCoordinator.contract.WatchLogs(opts, "RandomnessRequested", requestIDRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(VRFCoordinatorRandomnessRequested) - if err := _VRFCoordinator.contract.UnpackLog(event, "RandomnessRequested", 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 (_VRFCoordinator *VRFCoordinatorFilterer) ParseRandomnessRequested(log types.Log) (*VRFCoordinatorRandomnessRequested, error) { - event := new(VRFCoordinatorRandomnessRequested) - if err := _VRFCoordinator.contract.UnpackLog(event, "RandomnessRequested", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type VRFCoordinatorSubscriptionCanceledIterator struct { - Event *VRFCoordinatorSubscriptionCanceled - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFCoordinatorSubscriptionCanceledIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFCoordinatorSubscriptionCanceled) - 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(VRFCoordinatorSubscriptionCanceled) - 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 *VRFCoordinatorSubscriptionCanceledIterator) Error() error { - return it.fail -} - -func (it *VRFCoordinatorSubscriptionCanceledIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFCoordinatorSubscriptionCanceled struct { - SubId *big.Int - To common.Address - Amount *big.Int - Raw types.Log -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) FilterSubscriptionCanceled(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorSubscriptionCanceledIterator, error) { - - var subIdRule []interface{} - for _, subIdItem := range subId { - subIdRule = append(subIdRule, subIdItem) - } - - logs, sub, err := _VRFCoordinator.contract.FilterLogs(opts, "SubscriptionCanceled", subIdRule) - if err != nil { - return nil, err - } - return &VRFCoordinatorSubscriptionCanceledIterator{contract: _VRFCoordinator.contract, event: "SubscriptionCanceled", logs: logs, sub: sub}, nil -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) WatchSubscriptionCanceled(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorSubscriptionCanceled, subId []*big.Int) (event.Subscription, error) { - - var subIdRule []interface{} - for _, subIdItem := range subId { - subIdRule = append(subIdRule, subIdItem) - } - - logs, sub, err := _VRFCoordinator.contract.WatchLogs(opts, "SubscriptionCanceled", subIdRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(VRFCoordinatorSubscriptionCanceled) - if err := _VRFCoordinator.contract.UnpackLog(event, "SubscriptionCanceled", 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 (_VRFCoordinator *VRFCoordinatorFilterer) ParseSubscriptionCanceled(log types.Log) (*VRFCoordinatorSubscriptionCanceled, error) { - event := new(VRFCoordinatorSubscriptionCanceled) - if err := _VRFCoordinator.contract.UnpackLog(event, "SubscriptionCanceled", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type VRFCoordinatorSubscriptionConsumerAddedIterator struct { - Event *VRFCoordinatorSubscriptionConsumerAdded - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFCoordinatorSubscriptionConsumerAddedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFCoordinatorSubscriptionConsumerAdded) - 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(VRFCoordinatorSubscriptionConsumerAdded) - 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 *VRFCoordinatorSubscriptionConsumerAddedIterator) Error() error { - return it.fail -} - -func (it *VRFCoordinatorSubscriptionConsumerAddedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFCoordinatorSubscriptionConsumerAdded struct { - SubId *big.Int - Consumer common.Address - Raw types.Log -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) FilterSubscriptionConsumerAdded(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorSubscriptionConsumerAddedIterator, error) { - - var subIdRule []interface{} - for _, subIdItem := range subId { - subIdRule = append(subIdRule, subIdItem) - } - - logs, sub, err := _VRFCoordinator.contract.FilterLogs(opts, "SubscriptionConsumerAdded", subIdRule) - if err != nil { - return nil, err - } - return &VRFCoordinatorSubscriptionConsumerAddedIterator{contract: _VRFCoordinator.contract, event: "SubscriptionConsumerAdded", logs: logs, sub: sub}, nil -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) WatchSubscriptionConsumerAdded(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorSubscriptionConsumerAdded, subId []*big.Int) (event.Subscription, error) { - - var subIdRule []interface{} - for _, subIdItem := range subId { - subIdRule = append(subIdRule, subIdItem) - } - - logs, sub, err := _VRFCoordinator.contract.WatchLogs(opts, "SubscriptionConsumerAdded", subIdRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(VRFCoordinatorSubscriptionConsumerAdded) - if err := _VRFCoordinator.contract.UnpackLog(event, "SubscriptionConsumerAdded", 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 (_VRFCoordinator *VRFCoordinatorFilterer) ParseSubscriptionConsumerAdded(log types.Log) (*VRFCoordinatorSubscriptionConsumerAdded, error) { - event := new(VRFCoordinatorSubscriptionConsumerAdded) - if err := _VRFCoordinator.contract.UnpackLog(event, "SubscriptionConsumerAdded", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type VRFCoordinatorSubscriptionConsumerRemovedIterator struct { - Event *VRFCoordinatorSubscriptionConsumerRemoved - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFCoordinatorSubscriptionConsumerRemovedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFCoordinatorSubscriptionConsumerRemoved) - 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(VRFCoordinatorSubscriptionConsumerRemoved) - 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 *VRFCoordinatorSubscriptionConsumerRemovedIterator) Error() error { - return it.fail -} - -func (it *VRFCoordinatorSubscriptionConsumerRemovedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFCoordinatorSubscriptionConsumerRemoved struct { - SubId *big.Int - Consumer common.Address - Raw types.Log -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) FilterSubscriptionConsumerRemoved(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorSubscriptionConsumerRemovedIterator, error) { - - var subIdRule []interface{} - for _, subIdItem := range subId { - subIdRule = append(subIdRule, subIdItem) - } - - logs, sub, err := _VRFCoordinator.contract.FilterLogs(opts, "SubscriptionConsumerRemoved", subIdRule) - if err != nil { - return nil, err - } - return &VRFCoordinatorSubscriptionConsumerRemovedIterator{contract: _VRFCoordinator.contract, event: "SubscriptionConsumerRemoved", logs: logs, sub: sub}, nil -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) WatchSubscriptionConsumerRemoved(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorSubscriptionConsumerRemoved, subId []*big.Int) (event.Subscription, error) { - - var subIdRule []interface{} - for _, subIdItem := range subId { - subIdRule = append(subIdRule, subIdItem) - } - - logs, sub, err := _VRFCoordinator.contract.WatchLogs(opts, "SubscriptionConsumerRemoved", subIdRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(VRFCoordinatorSubscriptionConsumerRemoved) - if err := _VRFCoordinator.contract.UnpackLog(event, "SubscriptionConsumerRemoved", 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 (_VRFCoordinator *VRFCoordinatorFilterer) ParseSubscriptionConsumerRemoved(log types.Log) (*VRFCoordinatorSubscriptionConsumerRemoved, error) { - event := new(VRFCoordinatorSubscriptionConsumerRemoved) - if err := _VRFCoordinator.contract.UnpackLog(event, "SubscriptionConsumerRemoved", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type VRFCoordinatorSubscriptionCreatedIterator struct { - Event *VRFCoordinatorSubscriptionCreated - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFCoordinatorSubscriptionCreatedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFCoordinatorSubscriptionCreated) - 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(VRFCoordinatorSubscriptionCreated) - 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 *VRFCoordinatorSubscriptionCreatedIterator) Error() error { - return it.fail -} - -func (it *VRFCoordinatorSubscriptionCreatedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFCoordinatorSubscriptionCreated struct { - SubId *big.Int - Owner common.Address - Raw types.Log -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) FilterSubscriptionCreated(opts *bind.FilterOpts, subId []*big.Int, owner []common.Address) (*VRFCoordinatorSubscriptionCreatedIterator, error) { - - var subIdRule []interface{} - for _, subIdItem := range subId { - subIdRule = append(subIdRule, subIdItem) - } - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - - logs, sub, err := _VRFCoordinator.contract.FilterLogs(opts, "SubscriptionCreated", subIdRule, ownerRule) - if err != nil { - return nil, err - } - return &VRFCoordinatorSubscriptionCreatedIterator{contract: _VRFCoordinator.contract, event: "SubscriptionCreated", logs: logs, sub: sub}, nil -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) WatchSubscriptionCreated(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorSubscriptionCreated, subId []*big.Int, owner []common.Address) (event.Subscription, error) { - - var subIdRule []interface{} - for _, subIdItem := range subId { - subIdRule = append(subIdRule, subIdItem) - } - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - - logs, sub, err := _VRFCoordinator.contract.WatchLogs(opts, "SubscriptionCreated", subIdRule, ownerRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(VRFCoordinatorSubscriptionCreated) - if err := _VRFCoordinator.contract.UnpackLog(event, "SubscriptionCreated", 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 (_VRFCoordinator *VRFCoordinatorFilterer) ParseSubscriptionCreated(log types.Log) (*VRFCoordinatorSubscriptionCreated, error) { - event := new(VRFCoordinatorSubscriptionCreated) - if err := _VRFCoordinator.contract.UnpackLog(event, "SubscriptionCreated", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type VRFCoordinatorSubscriptionFundedIterator struct { - Event *VRFCoordinatorSubscriptionFunded - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFCoordinatorSubscriptionFundedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFCoordinatorSubscriptionFunded) - 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(VRFCoordinatorSubscriptionFunded) - 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 *VRFCoordinatorSubscriptionFundedIterator) Error() error { - return it.fail -} - -func (it *VRFCoordinatorSubscriptionFundedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFCoordinatorSubscriptionFunded struct { - SubId *big.Int - OldBalance *big.Int - NewBalance *big.Int - Raw types.Log -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) FilterSubscriptionFunded(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorSubscriptionFundedIterator, error) { - - var subIdRule []interface{} - for _, subIdItem := range subId { - subIdRule = append(subIdRule, subIdItem) - } - - logs, sub, err := _VRFCoordinator.contract.FilterLogs(opts, "SubscriptionFunded", subIdRule) - if err != nil { - return nil, err - } - return &VRFCoordinatorSubscriptionFundedIterator{contract: _VRFCoordinator.contract, event: "SubscriptionFunded", logs: logs, sub: sub}, nil -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) WatchSubscriptionFunded(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorSubscriptionFunded, subId []*big.Int) (event.Subscription, error) { - - var subIdRule []interface{} - for _, subIdItem := range subId { - subIdRule = append(subIdRule, subIdItem) - } - - logs, sub, err := _VRFCoordinator.contract.WatchLogs(opts, "SubscriptionFunded", subIdRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(VRFCoordinatorSubscriptionFunded) - if err := _VRFCoordinator.contract.UnpackLog(event, "SubscriptionFunded", 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 (_VRFCoordinator *VRFCoordinatorFilterer) ParseSubscriptionFunded(log types.Log) (*VRFCoordinatorSubscriptionFunded, error) { - event := new(VRFCoordinatorSubscriptionFunded) - if err := _VRFCoordinator.contract.UnpackLog(event, "SubscriptionFunded", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type VRFCoordinatorSubscriptionOwnerTransferRequestedIterator struct { - Event *VRFCoordinatorSubscriptionOwnerTransferRequested - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFCoordinatorSubscriptionOwnerTransferRequestedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFCoordinatorSubscriptionOwnerTransferRequested) - 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(VRFCoordinatorSubscriptionOwnerTransferRequested) - 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 *VRFCoordinatorSubscriptionOwnerTransferRequestedIterator) Error() error { - return it.fail -} - -func (it *VRFCoordinatorSubscriptionOwnerTransferRequestedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFCoordinatorSubscriptionOwnerTransferRequested struct { - SubId *big.Int - From common.Address - To common.Address - Raw types.Log -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) FilterSubscriptionOwnerTransferRequested(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorSubscriptionOwnerTransferRequestedIterator, error) { - - var subIdRule []interface{} - for _, subIdItem := range subId { - subIdRule = append(subIdRule, subIdItem) - } - - logs, sub, err := _VRFCoordinator.contract.FilterLogs(opts, "SubscriptionOwnerTransferRequested", subIdRule) - if err != nil { - return nil, err - } - return &VRFCoordinatorSubscriptionOwnerTransferRequestedIterator{contract: _VRFCoordinator.contract, event: "SubscriptionOwnerTransferRequested", logs: logs, sub: sub}, nil -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) WatchSubscriptionOwnerTransferRequested(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorSubscriptionOwnerTransferRequested, subId []*big.Int) (event.Subscription, error) { - - var subIdRule []interface{} - for _, subIdItem := range subId { - subIdRule = append(subIdRule, subIdItem) - } - - logs, sub, err := _VRFCoordinator.contract.WatchLogs(opts, "SubscriptionOwnerTransferRequested", subIdRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(VRFCoordinatorSubscriptionOwnerTransferRequested) - if err := _VRFCoordinator.contract.UnpackLog(event, "SubscriptionOwnerTransferRequested", 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 (_VRFCoordinator *VRFCoordinatorFilterer) ParseSubscriptionOwnerTransferRequested(log types.Log) (*VRFCoordinatorSubscriptionOwnerTransferRequested, error) { - event := new(VRFCoordinatorSubscriptionOwnerTransferRequested) - if err := _VRFCoordinator.contract.UnpackLog(event, "SubscriptionOwnerTransferRequested", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type VRFCoordinatorSubscriptionOwnerTransferredIterator struct { - Event *VRFCoordinatorSubscriptionOwnerTransferred - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *VRFCoordinatorSubscriptionOwnerTransferredIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(VRFCoordinatorSubscriptionOwnerTransferred) - 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(VRFCoordinatorSubscriptionOwnerTransferred) - 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 *VRFCoordinatorSubscriptionOwnerTransferredIterator) Error() error { - return it.fail -} - -func (it *VRFCoordinatorSubscriptionOwnerTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type VRFCoordinatorSubscriptionOwnerTransferred struct { - SubId *big.Int - From common.Address - To common.Address - Raw types.Log -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) FilterSubscriptionOwnerTransferred(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorSubscriptionOwnerTransferredIterator, error) { - - var subIdRule []interface{} - for _, subIdItem := range subId { - subIdRule = append(subIdRule, subIdItem) - } - - logs, sub, err := _VRFCoordinator.contract.FilterLogs(opts, "SubscriptionOwnerTransferred", subIdRule) - if err != nil { - return nil, err - } - return &VRFCoordinatorSubscriptionOwnerTransferredIterator{contract: _VRFCoordinator.contract, event: "SubscriptionOwnerTransferred", logs: logs, sub: sub}, nil -} - -func (_VRFCoordinator *VRFCoordinatorFilterer) WatchSubscriptionOwnerTransferred(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorSubscriptionOwnerTransferred, subId []*big.Int) (event.Subscription, error) { - - var subIdRule []interface{} - for _, subIdItem := range subId { - subIdRule = append(subIdRule, subIdItem) - } - - logs, sub, err := _VRFCoordinator.contract.WatchLogs(opts, "SubscriptionOwnerTransferred", subIdRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(VRFCoordinatorSubscriptionOwnerTransferred) - if err := _VRFCoordinator.contract.UnpackLog(event, "SubscriptionOwnerTransferred", 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 (_VRFCoordinator *VRFCoordinatorFilterer) ParseSubscriptionOwnerTransferred(log types.Log) (*VRFCoordinatorSubscriptionOwnerTransferred, error) { - event := new(VRFCoordinatorSubscriptionOwnerTransferred) - if err := _VRFCoordinator.contract.UnpackLog(event, "SubscriptionOwnerTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type GetSubscription struct { - Balance *big.Int - PendingFulfillments uint64 - Owner common.Address - Consumers []common.Address -} -type SCallbackConfig struct { - MaxCallbackGasLimit uint32 - MaxCallbackArgumentsLength uint32 -} -type SCoordinatorConfig struct { - UseReasonableGasPrice bool - ReentrancyLock bool - Paused bool - PremiumPercentage uint8 - UnusedGasPenaltyPercent uint8 - StalenessSeconds uint32 - RedeemableRequestGasOverhead uint32 - CallbackRequestGasOverhead uint32 - ReasonableGasPriceStalenessBlocks uint32 - FallbackWeiPerUnitLink *big.Int -} -type SPendingRequests struct { - SlotNumber uint32 - ConfirmationDelay *big.Int - NumWords uint16 - Requester common.Address -} - -func (_VRFCoordinator *VRFCoordinator) ParseLog(log types.Log) (generated.AbigenLog, error) { - switch log.Topics[0] { - case _VRFCoordinator.abi.Events["CallbackConfigSet"].ID: - return _VRFCoordinator.ParseCallbackConfigSet(log) - case _VRFCoordinator.abi.Events["CoordinatorConfigSet"].ID: - return _VRFCoordinator.ParseCoordinatorConfigSet(log) - case _VRFCoordinator.abi.Events["CoordinatorDeregistered"].ID: - return _VRFCoordinator.ParseCoordinatorDeregistered(log) - case _VRFCoordinator.abi.Events["CoordinatorRegistered"].ID: - return _VRFCoordinator.ParseCoordinatorRegistered(log) - case _VRFCoordinator.abi.Events["MigrationCompleted"].ID: - return _VRFCoordinator.ParseMigrationCompleted(log) - case _VRFCoordinator.abi.Events["OutputsServed"].ID: - return _VRFCoordinator.ParseOutputsServed(log) - case _VRFCoordinator.abi.Events["OwnershipTransferRequested"].ID: - return _VRFCoordinator.ParseOwnershipTransferRequested(log) - case _VRFCoordinator.abi.Events["OwnershipTransferred"].ID: - return _VRFCoordinator.ParseOwnershipTransferred(log) - case _VRFCoordinator.abi.Events["PauseFlagChanged"].ID: - return _VRFCoordinator.ParsePauseFlagChanged(log) - case _VRFCoordinator.abi.Events["RandomWordsFulfilled"].ID: - return _VRFCoordinator.ParseRandomWordsFulfilled(log) - case _VRFCoordinator.abi.Events["RandomnessFulfillmentRequested"].ID: - return _VRFCoordinator.ParseRandomnessFulfillmentRequested(log) - case _VRFCoordinator.abi.Events["RandomnessRedeemed"].ID: - return _VRFCoordinator.ParseRandomnessRedeemed(log) - case _VRFCoordinator.abi.Events["RandomnessRequested"].ID: - return _VRFCoordinator.ParseRandomnessRequested(log) - case _VRFCoordinator.abi.Events["SubscriptionCanceled"].ID: - return _VRFCoordinator.ParseSubscriptionCanceled(log) - case _VRFCoordinator.abi.Events["SubscriptionConsumerAdded"].ID: - return _VRFCoordinator.ParseSubscriptionConsumerAdded(log) - case _VRFCoordinator.abi.Events["SubscriptionConsumerRemoved"].ID: - return _VRFCoordinator.ParseSubscriptionConsumerRemoved(log) - case _VRFCoordinator.abi.Events["SubscriptionCreated"].ID: - return _VRFCoordinator.ParseSubscriptionCreated(log) - case _VRFCoordinator.abi.Events["SubscriptionFunded"].ID: - return _VRFCoordinator.ParseSubscriptionFunded(log) - case _VRFCoordinator.abi.Events["SubscriptionOwnerTransferRequested"].ID: - return _VRFCoordinator.ParseSubscriptionOwnerTransferRequested(log) - case _VRFCoordinator.abi.Events["SubscriptionOwnerTransferred"].ID: - return _VRFCoordinator.ParseSubscriptionOwnerTransferred(log) - - default: - return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) - } -} - -func (VRFCoordinatorCallbackConfigSet) Topic() common.Hash { - return common.HexToHash("0x0cc54509a45ab33cd67614d4a2892c083ecf8fb43b9d29f6ea8130b9023e51df") -} - -func (VRFCoordinatorCoordinatorConfigSet) Topic() common.Hash { - return common.HexToHash("0x0028d3a46e95e67def989d41c66eb331add9809460b95b5fb4eb006157728fc5") -} - -func (VRFCoordinatorCoordinatorDeregistered) Topic() common.Hash { - return common.HexToHash("0xf80a1a97fd42251f3c33cda98635e7399253033a6774fe37cd3f650b5282af37") -} - -func (VRFCoordinatorCoordinatorRegistered) Topic() common.Hash { - return common.HexToHash("0xb7cabbfc11e66731fc77de0444614282023bcbd41d16781c753a431d0af01625") -} - -func (VRFCoordinatorMigrationCompleted) Topic() common.Hash { - return common.HexToHash("0xbd89b747474d3fc04664dfbd1d56ae7ffbe46ee097cdb9979c13916bb76269ce") -} - -func (VRFCoordinatorOutputsServed) Topic() common.Hash { - return common.HexToHash("0xf10ea936d00579b4c52035ee33bf46929646b3aa87554c565d8fb2c7aa549c44") -} - -func (VRFCoordinatorOwnershipTransferRequested) Topic() common.Hash { - return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") -} - -func (VRFCoordinatorOwnershipTransferred) Topic() common.Hash { - return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") -} - -func (VRFCoordinatorPauseFlagChanged) Topic() common.Hash { - return common.HexToHash("0x49ba7c1de2d8853088b6270e43df2118516b217f38b917dd2b80dea360860fbe") -} - -func (VRFCoordinatorRandomWordsFulfilled) Topic() common.Hash { - return common.HexToHash("0x8f79f730779e875ce76c428039cc2052b5b5918c2a55c598fab251c1198aec54") -} - -func (VRFCoordinatorRandomnessFulfillmentRequested) Topic() common.Hash { - return common.HexToHash("0x01872fb9c7d6d68af06a17347935e04412da302a377224c205e672c26e18c37f") -} - -func (VRFCoordinatorRandomnessRedeemed) Topic() common.Hash { - return common.HexToHash("0x16f3f633197fafab10a5df69e6f3f2f7f20092f08d8d47de0a91c0f4b96a1a25") -} - -func (VRFCoordinatorRandomnessRequested) Topic() common.Hash { - return common.HexToHash("0xb7933fba96b6b452eb44f99fdc08052a45dff82363d59abaff0456931c3d2459") -} - -func (VRFCoordinatorSubscriptionCanceled) Topic() common.Hash { - return common.HexToHash("0x3784f77e8e883de95b5d47cd713ced01229fa74d118c0a462224bcb0516d43f1") -} - -func (VRFCoordinatorSubscriptionConsumerAdded) Topic() common.Hash { - return common.HexToHash("0x1e980d04aa7648e205713e5e8ea3808672ac163d10936d36f91b2c88ac1575e1") -} - -func (VRFCoordinatorSubscriptionConsumerRemoved) Topic() common.Hash { - return common.HexToHash("0x32158c6058347c1601b2d12bc696ac6901d8a9a9aa3ba10c27ab0a983e8425a7") -} - -func (VRFCoordinatorSubscriptionCreated) Topic() common.Hash { - return common.HexToHash("0x1d3015d7ba850fa198dc7b1a3f5d42779313a681035f77c8c03764c61005518d") -} - -func (VRFCoordinatorSubscriptionFunded) Topic() common.Hash { - return common.HexToHash("0x1ced9348ff549fceab2ac57cd3a9de38edaaab274b725ee82c23e8fc8c4eec7a") -} - -func (VRFCoordinatorSubscriptionOwnerTransferRequested) Topic() common.Hash { - return common.HexToHash("0x21a4dad170a6bf476c31bbcf4a16628295b0e450672eec25d7c93308e05344a1") -} - -func (VRFCoordinatorSubscriptionOwnerTransferred) Topic() common.Hash { - return common.HexToHash("0xd4114ab6e9af9f597c52041f32d62dc57c5c4e4c0d4427006069635e216c9386") -} - -func (_VRFCoordinator *VRFCoordinator) Address() common.Address { - return _VRFCoordinator.address -} - -type VRFCoordinatorInterface interface { - MAXCONSUMERS(opts *bind.CallOpts) (uint16, error) - - MAXNUMWORDS(opts *bind.CallOpts) (*big.Int, error) - - NUMCONFDELAYS(opts *bind.CallOpts) (uint8, error) - - GetCallbackMemo(opts *bind.CallOpts, requestId *big.Int) ([32]byte, error) - - GetConfirmationDelays(opts *bind.CallOpts) ([8]*big.Int, error) - - GetFee(opts *bind.CallOpts, arg0 *big.Int, arg1 []byte) (*big.Int, error) - - GetFulfillmentFee(opts *bind.CallOpts, arg0 *big.Int, callbackGasLimit uint32, arguments []byte, arg3 []byte) (*big.Int, error) - - GetSubscription(opts *bind.CallOpts, subId *big.Int) (GetSubscription, - - error) - - GetSubscriptionLinkBalance(opts *bind.CallOpts) (*big.Int, error) - - IBeaconPeriodBlocks(opts *bind.CallOpts) (*big.Int, error) - - ILink(opts *bind.CallOpts) (common.Address, error) - - MigrationVersion(opts *bind.CallOpts) (uint8, error) - - OnMigration(opts *bind.CallOpts, arg0 []byte) error - - Owner(opts *bind.CallOpts) (common.Address, error) - - SCallbackConfig(opts *bind.CallOpts) (SCallbackConfig, - - error) - - SCoordinatorConfig(opts *bind.CallOpts) (SCoordinatorConfig, - - error) - - SPendingRequests(opts *bind.CallOpts, arg0 *big.Int) (SPendingRequests, - - error) - - SProducer(opts *bind.CallOpts) (common.Address, error) - - AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) - - AcceptSubscriptionOwnerTransfer(opts *bind.TransactOpts, subId *big.Int) (*types.Transaction, error) - - AddConsumer(opts *bind.TransactOpts, subId *big.Int, consumer common.Address) (*types.Transaction, error) - - BatchTransferLink(opts *bind.TransactOpts, recipients []common.Address, paymentsInJuels []*big.Int) (*types.Transaction, error) - - CancelSubscription(opts *bind.TransactOpts, subId *big.Int, to common.Address) (*types.Transaction, error) - - CreateSubscription(opts *bind.TransactOpts) (*types.Transaction, error) - - DeregisterMigratableCoordinator(opts *bind.TransactOpts, target common.Address) (*types.Transaction, error) - - Migrate(opts *bind.TransactOpts, newCoordinator common.Address, encodedRequest []byte) (*types.Transaction, error) - - OnTokenTransfer(opts *bind.TransactOpts, arg0 common.Address, amount *big.Int, data []byte) (*types.Transaction, error) - - ProcessVRFOutputs(opts *bind.TransactOpts, vrfOutputs []VRFBeaconTypesVRFOutput, juelsPerFeeCoin *big.Int, reasonableGasPrice uint64, blockHeight uint64) (*types.Transaction, error) - - RedeemRandomness(opts *bind.TransactOpts, subID *big.Int, requestID *big.Int, arg2 []byte) (*types.Transaction, error) - - RegisterMigratableCoordinator(opts *bind.TransactOpts, target common.Address) (*types.Transaction, error) - - RemoveConsumer(opts *bind.TransactOpts, subId *big.Int, consumer common.Address) (*types.Transaction, error) - - RequestRandomness(opts *bind.TransactOpts, subID *big.Int, numWords uint16, confDelay *big.Int, arg3 []byte) (*types.Transaction, error) - - RequestRandomnessFulfillment(opts *bind.TransactOpts, subID *big.Int, numWords uint16, confDelay *big.Int, callbackGasLimit uint32, arguments []byte, arg5 []byte) (*types.Transaction, error) - - RequestSubscriptionOwnerTransfer(opts *bind.TransactOpts, subId *big.Int, newOwner common.Address) (*types.Transaction, error) - - SetCallbackConfig(opts *bind.TransactOpts, config VRFCoordinatorCallbackConfig) (*types.Transaction, error) - - SetConfirmationDelays(opts *bind.TransactOpts, confDelays [8]*big.Int) (*types.Transaction, error) - - SetCoordinatorConfig(opts *bind.TransactOpts, coordinatorConfig VRFBeaconTypesCoordinatorConfig) (*types.Transaction, error) - - SetPauseFlag(opts *bind.TransactOpts, pause bool) (*types.Transaction, error) - - SetProducer(opts *bind.TransactOpts, producer common.Address) (*types.Transaction, error) - - TransferLink(opts *bind.TransactOpts, recipient common.Address, juelsAmount *big.Int) (*types.Transaction, error) - - TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) - - FilterCallbackConfigSet(opts *bind.FilterOpts) (*VRFCoordinatorCallbackConfigSetIterator, error) - - WatchCallbackConfigSet(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorCallbackConfigSet) (event.Subscription, error) - - ParseCallbackConfigSet(log types.Log) (*VRFCoordinatorCallbackConfigSet, error) - - FilterCoordinatorConfigSet(opts *bind.FilterOpts) (*VRFCoordinatorCoordinatorConfigSetIterator, error) - - WatchCoordinatorConfigSet(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorCoordinatorConfigSet) (event.Subscription, error) - - ParseCoordinatorConfigSet(log types.Log) (*VRFCoordinatorCoordinatorConfigSet, error) - - FilterCoordinatorDeregistered(opts *bind.FilterOpts) (*VRFCoordinatorCoordinatorDeregisteredIterator, error) - - WatchCoordinatorDeregistered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorCoordinatorDeregistered) (event.Subscription, error) - - ParseCoordinatorDeregistered(log types.Log) (*VRFCoordinatorCoordinatorDeregistered, error) - - FilterCoordinatorRegistered(opts *bind.FilterOpts) (*VRFCoordinatorCoordinatorRegisteredIterator, error) - - WatchCoordinatorRegistered(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorCoordinatorRegistered) (event.Subscription, error) - - ParseCoordinatorRegistered(log types.Log) (*VRFCoordinatorCoordinatorRegistered, error) - - FilterMigrationCompleted(opts *bind.FilterOpts, newVersion []uint8, subID []*big.Int) (*VRFCoordinatorMigrationCompletedIterator, error) - - WatchMigrationCompleted(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorMigrationCompleted, newVersion []uint8, subID []*big.Int) (event.Subscription, error) - - ParseMigrationCompleted(log types.Log) (*VRFCoordinatorMigrationCompleted, error) - - FilterOutputsServed(opts *bind.FilterOpts) (*VRFCoordinatorOutputsServedIterator, error) - - WatchOutputsServed(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorOutputsServed) (event.Subscription, error) - - ParseOutputsServed(log types.Log) (*VRFCoordinatorOutputsServed, error) - - FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFCoordinatorOwnershipTransferRequestedIterator, error) - - WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseOwnershipTransferRequested(log types.Log) (*VRFCoordinatorOwnershipTransferRequested, error) - - FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFCoordinatorOwnershipTransferredIterator, error) - - WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseOwnershipTransferred(log types.Log) (*VRFCoordinatorOwnershipTransferred, error) - - FilterPauseFlagChanged(opts *bind.FilterOpts) (*VRFCoordinatorPauseFlagChangedIterator, error) - - WatchPauseFlagChanged(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorPauseFlagChanged) (event.Subscription, error) - - ParsePauseFlagChanged(log types.Log) (*VRFCoordinatorPauseFlagChanged, error) - - FilterRandomWordsFulfilled(opts *bind.FilterOpts) (*VRFCoordinatorRandomWordsFulfilledIterator, error) - - WatchRandomWordsFulfilled(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorRandomWordsFulfilled) (event.Subscription, error) - - ParseRandomWordsFulfilled(log types.Log) (*VRFCoordinatorRandomWordsFulfilled, error) - - FilterRandomnessFulfillmentRequested(opts *bind.FilterOpts, requestID []*big.Int) (*VRFCoordinatorRandomnessFulfillmentRequestedIterator, error) - - WatchRandomnessFulfillmentRequested(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorRandomnessFulfillmentRequested, requestID []*big.Int) (event.Subscription, error) - - ParseRandomnessFulfillmentRequested(log types.Log) (*VRFCoordinatorRandomnessFulfillmentRequested, error) - - FilterRandomnessRedeemed(opts *bind.FilterOpts, requestID []*big.Int, requester []common.Address) (*VRFCoordinatorRandomnessRedeemedIterator, error) - - WatchRandomnessRedeemed(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorRandomnessRedeemed, requestID []*big.Int, requester []common.Address) (event.Subscription, error) - - ParseRandomnessRedeemed(log types.Log) (*VRFCoordinatorRandomnessRedeemed, error) - - FilterRandomnessRequested(opts *bind.FilterOpts, requestID []*big.Int) (*VRFCoordinatorRandomnessRequestedIterator, error) - - WatchRandomnessRequested(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorRandomnessRequested, requestID []*big.Int) (event.Subscription, error) - - ParseRandomnessRequested(log types.Log) (*VRFCoordinatorRandomnessRequested, error) - - FilterSubscriptionCanceled(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorSubscriptionCanceledIterator, error) - - WatchSubscriptionCanceled(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorSubscriptionCanceled, subId []*big.Int) (event.Subscription, error) - - ParseSubscriptionCanceled(log types.Log) (*VRFCoordinatorSubscriptionCanceled, error) - - FilterSubscriptionConsumerAdded(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorSubscriptionConsumerAddedIterator, error) - - WatchSubscriptionConsumerAdded(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorSubscriptionConsumerAdded, subId []*big.Int) (event.Subscription, error) - - ParseSubscriptionConsumerAdded(log types.Log) (*VRFCoordinatorSubscriptionConsumerAdded, error) - - FilterSubscriptionConsumerRemoved(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorSubscriptionConsumerRemovedIterator, error) - - WatchSubscriptionConsumerRemoved(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorSubscriptionConsumerRemoved, subId []*big.Int) (event.Subscription, error) - - ParseSubscriptionConsumerRemoved(log types.Log) (*VRFCoordinatorSubscriptionConsumerRemoved, error) - - FilterSubscriptionCreated(opts *bind.FilterOpts, subId []*big.Int, owner []common.Address) (*VRFCoordinatorSubscriptionCreatedIterator, error) - - WatchSubscriptionCreated(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorSubscriptionCreated, subId []*big.Int, owner []common.Address) (event.Subscription, error) - - ParseSubscriptionCreated(log types.Log) (*VRFCoordinatorSubscriptionCreated, error) - - FilterSubscriptionFunded(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorSubscriptionFundedIterator, error) - - WatchSubscriptionFunded(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorSubscriptionFunded, subId []*big.Int) (event.Subscription, error) - - ParseSubscriptionFunded(log types.Log) (*VRFCoordinatorSubscriptionFunded, error) - - FilterSubscriptionOwnerTransferRequested(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorSubscriptionOwnerTransferRequestedIterator, error) - - WatchSubscriptionOwnerTransferRequested(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorSubscriptionOwnerTransferRequested, subId []*big.Int) (event.Subscription, error) - - ParseSubscriptionOwnerTransferRequested(log types.Log) (*VRFCoordinatorSubscriptionOwnerTransferRequested, error) - - FilterSubscriptionOwnerTransferred(opts *bind.FilterOpts, subId []*big.Int) (*VRFCoordinatorSubscriptionOwnerTransferredIterator, error) - - WatchSubscriptionOwnerTransferred(opts *bind.WatchOpts, sink chan<- *VRFCoordinatorSubscriptionOwnerTransferred, subId []*big.Int) (event.Subscription, error) - - ParseSubscriptionOwnerTransferred(log types.Log) (*VRFCoordinatorSubscriptionOwnerTransferred, error) - - ParseLog(log types.Log) (generated.AbigenLog, error) - - Address() common.Address -} diff --git a/core/gethwrappers/ocr2vrf/generation/generated-wrapper-dependency-versions-do-not-edit.txt b/core/gethwrappers/ocr2vrf/generation/generated-wrapper-dependency-versions-do-not-edit.txt deleted file mode 100644 index ce0b1a09702..00000000000 --- a/core/gethwrappers/ocr2vrf/generation/generated-wrapper-dependency-versions-do-not-edit.txt +++ /dev/null @@ -1,7 +0,0 @@ -GETH_VERSION: 1.12.0 -dkg: ../../../contracts/solc/v0.8.19/DKG.abi ../../../contracts/solc/v0.8.19/DKG.bin 02549733c46e50ba393c2521e39d4ec55b6a5d9a66baf4406b1a515b20470425 -load_test_beacon_consumer: ../../../contracts/solc/v0.8.19/LoadTestBeaconVRFConsumer.abi ../../../contracts/solc/v0.8.19/LoadTestBeaconVRFConsumer.bin 7306576bc1db6c0a4f0a8a83dd4c08e3078afa73b72858f7d1eaa410d1128fd2 -vrf_beacon: ../../../contracts/solc/v0.8.19/VRFBeacon.abi ../../../contracts/solc/v0.8.19/VRFBeacon.bin 63107992adf02024afccbe77fdf973777548dcd4d9af1484c8449aca6de30f4c -vrf_beacon_consumer: ../../../contracts/solc/v0.8.19/BeaconVRFConsumer.abi ../../../contracts/solc/v0.8.19/BeaconVRFConsumer.bin 520f1c24e4d926a4eb6c9504506b55b79a35ae8cc65ee02d28309a7d5b735a53 -vrf_beacon_coordinator: ../../../contracts/solc/v0.8.15/VRFBeaconCoordinator.abi ../../../contracts/solc/v0.8.15/VRFBeaconCoordinator.bin 08da747a3488fcd318ddc0db75fd0df7c07a100b2e19061f0efcb12a7180ecde -vrf_coordinator: ../../../contracts/solc/v0.8.19/VRFCoordinator.abi ../../../contracts/solc/v0.8.19/VRFCoordinator.bin 295bec795ab8c1ef08b6b27a67bab7f06233660e8a2f389211e470cc2b58c5ea diff --git a/core/gethwrappers/ocr2vrf/go_generate.go b/core/gethwrappers/ocr2vrf/go_generate.go deleted file mode 100644 index 475bf7e8f67..00000000000 --- a/core/gethwrappers/ocr2vrf/go_generate.go +++ /dev/null @@ -1,10 +0,0 @@ -// Package gethwrappers provides tools for wrapping solidity contracts with -// golang packages, using abigen. -package gethwrappers - -// OCR2VRF - remove the _disabled tag to run these locally. -//go:generate_disabled go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.19/DKG.abi ../../../contracts/solc/v0.8.19/DKG.bin DKG dkg -//go:generate_disabled go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.19/VRFCoordinator.abi ../../../contracts/solc/v0.8.19/VRFCoordinator.bin VRFCoordinator vrf_coordinator -//go:generate_disabled go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.19/VRFBeacon.abi ../../../contracts/solc/v0.8.19/VRFBeacon.bin VRFBeacon vrf_beacon -//go:generate_disabled go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.19/BeaconVRFConsumer.abi ../../../contracts/solc/v0.8.19/BeaconVRFConsumer.bin BeaconVRFConsumer vrf_beacon_consumer -//go:generate_disabled go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.19/LoadTestBeaconVRFConsumer.abi ../../../contracts/solc/v0.8.19/LoadTestBeaconVRFConsumer.bin LoadTestBeaconVRFConsumer load_test_beacon_consumer diff --git a/core/internal/cltest/cltest.go b/core/internal/cltest/cltest.go index 5212b29fce3..508dde86a05 100644 --- a/core/internal/cltest/cltest.go +++ b/core/internal/cltest/cltest.go @@ -66,10 +66,9 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" "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/aptoskey" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/cosmoskey" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/csakey" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/dkgencryptkey" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/dkgsignkey" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocr2key" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocrkey" @@ -119,16 +118,15 @@ var ( DefaultP2PPeerID p2pkey.PeerID FixtureChainID = *testutils.FixtureChainID - DefaultCosmosKey = cosmoskey.MustNewInsecure(keystest.NewRandReaderFromSeed(KeyBigIntSeed)) - DefaultCSAKey = csakey.MustNewV2XXXTestingOnly(big.NewInt(KeyBigIntSeed)) - DefaultOCRKey = ocrkey.MustNewV2XXXTestingOnly(big.NewInt(KeyBigIntSeed)) - DefaultOCR2Key = ocr2key.MustNewInsecure(keystest.NewRandReaderFromSeed(KeyBigIntSeed), "evm") - DefaultP2PKey = p2pkey.MustNewV2XXXTestingOnly(big.NewInt(KeyBigIntSeed)) - DefaultSolanaKey = solkey.MustNewInsecure(keystest.NewRandReaderFromSeed(KeyBigIntSeed)) - DefaultStarkNetKey = starkkey.MustNewInsecure(keystest.NewRandReaderFromSeed(KeyBigIntSeed)) - DefaultVRFKey = vrfkey.MustNewV2XXXTestingOnly(big.NewInt(KeyBigIntSeed)) - DefaultDKGSignKey = dkgsignkey.MustNewXXXTestingOnly(big.NewInt(KeyBigIntSeed)) - DefaultDKGEncryptKey = dkgencryptkey.MustNewXXXTestingOnly(big.NewInt(KeyBigIntSeed)) + DefaultCosmosKey = cosmoskey.MustNewInsecure(keystest.NewRandReaderFromSeed(KeyBigIntSeed)) + DefaultCSAKey = csakey.MustNewV2XXXTestingOnly(big.NewInt(KeyBigIntSeed)) + DefaultOCRKey = ocrkey.MustNewV2XXXTestingOnly(big.NewInt(KeyBigIntSeed)) + DefaultOCR2Key = ocr2key.MustNewInsecure(keystest.NewRandReaderFromSeed(KeyBigIntSeed), "evm") + DefaultP2PKey = p2pkey.MustNewV2XXXTestingOnly(big.NewInt(KeyBigIntSeed)) + DefaultSolanaKey = solkey.MustNewInsecure(keystest.NewRandReaderFromSeed(KeyBigIntSeed)) + DefaultStarkNetKey = starkkey.MustNewInsecure(keystest.NewRandReaderFromSeed(KeyBigIntSeed)) + DefaultAptosKey = aptoskey.MustNewInsecure(keystest.NewRandReaderFromSeed(KeyBigIntSeed)) + DefaultVRFKey = vrfkey.MustNewV2XXXTestingOnly(big.NewInt(KeyBigIntSeed)) ) func init() { @@ -387,7 +385,7 @@ func NewApplicationWithConfig(t testing.TB, cfg chainlink.GeneralConfig, flagsAn testCtx := testutils.Context(t) // evm alway enabled for backward compatibility - initOps := []chainlink.CoreRelayerChainInitFunc{chainlink.InitEVM(testCtx, relayerFactory, evmOpts)} + initOps := []chainlink.CoreRelayerChainInitFunc{chainlink.InitDummy(testCtx, relayerFactory), chainlink.InitEVM(testCtx, relayerFactory, evmOpts)} if cfg.CosmosEnabled() { cosmosCfg := chainlink.CosmosFactoryConfig{ diff --git a/core/internal/cltest/heavyweight/orm.go b/core/internal/cltest/heavyweight/orm.go index f49a94be05b..4e824b1ab0f 100644 --- a/core/internal/cltest/heavyweight/orm.go +++ b/core/internal/cltest/heavyweight/orm.go @@ -10,7 +10,6 @@ import ( "testing" "github.com/google/uuid" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/jmoiron/sqlx" @@ -68,7 +67,8 @@ func (c Kind) PrepareDB(t testing.TB, overrideFn func(c *chainlink.Config, s *ch db, err := pg.NewConnection(migrationTestDBURL, dialects.Postgres, gcfg.Database()) require.NoError(t, err) t.Cleanup(func() { - assert.NoError(t, db.Close()) + require.NoError(t, db.Close()) // must close before dropping + require.NoError(t, testdb.Drop(*testutils.MustParseURL(t, migrationTestDBURL))) os.RemoveAll(gcfg.RootDir()) }) diff --git a/core/internal/features/ocr2/features_ocr2_test.go b/core/internal/features/ocr2/features_ocr2_test.go index 440f68d8931..d0f157d8bd4 100644 --- a/core/internal/features/ocr2/features_ocr2_test.go +++ b/core/internal/features/ocr2/features_ocr2_test.go @@ -603,7 +603,7 @@ updateInterval = "1m" contractABI, err2 := abi.JSON(strings.NewReader(ocr2aggregator.OCR2AggregatorABI)) require.NoError(t, err2) apps[0].GetRelayers().LegacyEVMChains().Slice() - 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) + 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) require.NoError(t, err2) configDigest, epoch, err2 := ct.LatestConfigDigestAndEpoch(testutils.Context(t)) require.NoError(t, err2) @@ -916,7 +916,7 @@ updateInterval = "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(testutils.Context(t), 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) 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 f845d46ca8d..aaccbafc949 100644 --- a/core/internal/mocks/application.go +++ b/core/internal/mocks/application.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -53,6 +53,14 @@ type Application struct { mock.Mock } +type Application_Expecter struct { + mock *mock.Mock +} + +func (_m *Application) EXPECT() *Application_Expecter { + return &Application_Expecter{mock: &_m.Mock} +} + // AddJobV2 provides a mock function with given fields: ctx, _a1 func (_m *Application) AddJobV2(ctx context.Context, _a1 *job.Job) error { ret := _m.Called(ctx, _a1) @@ -71,6 +79,35 @@ func (_m *Application) AddJobV2(ctx context.Context, _a1 *job.Job) error { return r0 } +// Application_AddJobV2_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddJobV2' +type Application_AddJobV2_Call struct { + *mock.Call +} + +// AddJobV2 is a helper method to define mock.On call +// - ctx context.Context +// - _a1 *job.Job +func (_e *Application_Expecter) AddJobV2(ctx interface{}, _a1 interface{}) *Application_AddJobV2_Call { + return &Application_AddJobV2_Call{Call: _e.mock.On("AddJobV2", ctx, _a1)} +} + +func (_c *Application_AddJobV2_Call) Run(run func(ctx context.Context, _a1 *job.Job)) *Application_AddJobV2_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*job.Job)) + }) + return _c +} + +func (_c *Application_AddJobV2_Call) Return(_a0 error) *Application_AddJobV2_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Application_AddJobV2_Call) RunAndReturn(run func(context.Context, *job.Job) error) *Application_AddJobV2_Call { + _c.Call.Return(run) + return _c +} + // AuthenticationProvider provides a mock function with given fields: func (_m *Application) AuthenticationProvider() sessions.AuthenticationProvider { ret := _m.Called() @@ -91,6 +128,33 @@ func (_m *Application) AuthenticationProvider() sessions.AuthenticationProvider return r0 } +// Application_AuthenticationProvider_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AuthenticationProvider' +type Application_AuthenticationProvider_Call struct { + *mock.Call +} + +// AuthenticationProvider is a helper method to define mock.On call +func (_e *Application_Expecter) AuthenticationProvider() *Application_AuthenticationProvider_Call { + return &Application_AuthenticationProvider_Call{Call: _e.mock.On("AuthenticationProvider")} +} + +func (_c *Application_AuthenticationProvider_Call) Run(run func()) *Application_AuthenticationProvider_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Application_AuthenticationProvider_Call) Return(_a0 sessions.AuthenticationProvider) *Application_AuthenticationProvider_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Application_AuthenticationProvider_Call) RunAndReturn(run func() sessions.AuthenticationProvider) *Application_AuthenticationProvider_Call { + _c.Call.Return(run) + return _c +} + // BasicAdminUsersORM provides a mock function with given fields: func (_m *Application) BasicAdminUsersORM() sessions.BasicAdminUsersORM { ret := _m.Called() @@ -111,6 +175,33 @@ func (_m *Application) BasicAdminUsersORM() sessions.BasicAdminUsersORM { return r0 } +// Application_BasicAdminUsersORM_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BasicAdminUsersORM' +type Application_BasicAdminUsersORM_Call struct { + *mock.Call +} + +// BasicAdminUsersORM is a helper method to define mock.On call +func (_e *Application_Expecter) BasicAdminUsersORM() *Application_BasicAdminUsersORM_Call { + return &Application_BasicAdminUsersORM_Call{Call: _e.mock.On("BasicAdminUsersORM")} +} + +func (_c *Application_BasicAdminUsersORM_Call) Run(run func()) *Application_BasicAdminUsersORM_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Application_BasicAdminUsersORM_Call) Return(_a0 sessions.BasicAdminUsersORM) *Application_BasicAdminUsersORM_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Application_BasicAdminUsersORM_Call) RunAndReturn(run func() sessions.BasicAdminUsersORM) *Application_BasicAdminUsersORM_Call { + _c.Call.Return(run) + return _c +} + // BridgeORM provides a mock function with given fields: func (_m *Application) BridgeORM() bridges.ORM { ret := _m.Called() @@ -131,6 +222,33 @@ func (_m *Application) BridgeORM() bridges.ORM { return r0 } +// Application_BridgeORM_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BridgeORM' +type Application_BridgeORM_Call struct { + *mock.Call +} + +// BridgeORM is a helper method to define mock.On call +func (_e *Application_Expecter) BridgeORM() *Application_BridgeORM_Call { + return &Application_BridgeORM_Call{Call: _e.mock.On("BridgeORM")} +} + +func (_c *Application_BridgeORM_Call) Run(run func()) *Application_BridgeORM_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Application_BridgeORM_Call) Return(_a0 bridges.ORM) *Application_BridgeORM_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Application_BridgeORM_Call) RunAndReturn(run func() bridges.ORM) *Application_BridgeORM_Call { + _c.Call.Return(run) + return _c +} + // DeleteJob provides a mock function with given fields: ctx, jobID func (_m *Application) DeleteJob(ctx context.Context, jobID int32) error { ret := _m.Called(ctx, jobID) @@ -149,6 +267,35 @@ func (_m *Application) DeleteJob(ctx context.Context, jobID int32) error { return r0 } +// Application_DeleteJob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteJob' +type Application_DeleteJob_Call struct { + *mock.Call +} + +// DeleteJob is a helper method to define mock.On call +// - ctx context.Context +// - jobID int32 +func (_e *Application_Expecter) DeleteJob(ctx interface{}, jobID interface{}) *Application_DeleteJob_Call { + return &Application_DeleteJob_Call{Call: _e.mock.On("DeleteJob", ctx, jobID)} +} + +func (_c *Application_DeleteJob_Call) Run(run func(ctx context.Context, jobID int32)) *Application_DeleteJob_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int32)) + }) + return _c +} + +func (_c *Application_DeleteJob_Call) Return(_a0 error) *Application_DeleteJob_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Application_DeleteJob_Call) RunAndReturn(run func(context.Context, int32) error) *Application_DeleteJob_Call { + _c.Call.Return(run) + return _c +} + // DeleteLogPollerDataAfter provides a mock function with given fields: ctx, chainID, start func (_m *Application) DeleteLogPollerDataAfter(ctx context.Context, chainID *big.Int, start int64) error { ret := _m.Called(ctx, chainID, start) @@ -167,6 +314,36 @@ func (_m *Application) DeleteLogPollerDataAfter(ctx context.Context, chainID *bi return r0 } +// Application_DeleteLogPollerDataAfter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteLogPollerDataAfter' +type Application_DeleteLogPollerDataAfter_Call struct { + *mock.Call +} + +// DeleteLogPollerDataAfter is a helper method to define mock.On call +// - ctx context.Context +// - chainID *big.Int +// - start int64 +func (_e *Application_Expecter) DeleteLogPollerDataAfter(ctx interface{}, chainID interface{}, start interface{}) *Application_DeleteLogPollerDataAfter_Call { + return &Application_DeleteLogPollerDataAfter_Call{Call: _e.mock.On("DeleteLogPollerDataAfter", ctx, chainID, start)} +} + +func (_c *Application_DeleteLogPollerDataAfter_Call) Run(run func(ctx context.Context, chainID *big.Int, start int64)) *Application_DeleteLogPollerDataAfter_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*big.Int), args[2].(int64)) + }) + return _c +} + +func (_c *Application_DeleteLogPollerDataAfter_Call) Return(_a0 error) *Application_DeleteLogPollerDataAfter_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Application_DeleteLogPollerDataAfter_Call) RunAndReturn(run func(context.Context, *big.Int, int64) error) *Application_DeleteLogPollerDataAfter_Call { + _c.Call.Return(run) + return _c +} + // EVMORM provides a mock function with given fields: func (_m *Application) EVMORM() types.Configs { ret := _m.Called() @@ -187,6 +364,33 @@ func (_m *Application) EVMORM() types.Configs { return r0 } +// Application_EVMORM_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EVMORM' +type Application_EVMORM_Call struct { + *mock.Call +} + +// EVMORM is a helper method to define mock.On call +func (_e *Application_Expecter) EVMORM() *Application_EVMORM_Call { + return &Application_EVMORM_Call{Call: _e.mock.On("EVMORM")} +} + +func (_c *Application_EVMORM_Call) Run(run func()) *Application_EVMORM_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Application_EVMORM_Call) Return(_a0 types.Configs) *Application_EVMORM_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Application_EVMORM_Call) RunAndReturn(run func() types.Configs) *Application_EVMORM_Call { + _c.Call.Return(run) + return _c +} + // FindLCA provides a mock function with given fields: ctx, chainID func (_m *Application) FindLCA(ctx context.Context, chainID *big.Int) (*logpoller.LogPollerBlock, error) { ret := _m.Called(ctx, chainID) @@ -217,6 +421,35 @@ func (_m *Application) FindLCA(ctx context.Context, chainID *big.Int) (*logpolle return r0, r1 } +// Application_FindLCA_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindLCA' +type Application_FindLCA_Call struct { + *mock.Call +} + +// FindLCA is a helper method to define mock.On call +// - ctx context.Context +// - chainID *big.Int +func (_e *Application_Expecter) FindLCA(ctx interface{}, chainID interface{}) *Application_FindLCA_Call { + return &Application_FindLCA_Call{Call: _e.mock.On("FindLCA", ctx, chainID)} +} + +func (_c *Application_FindLCA_Call) Run(run func(ctx context.Context, chainID *big.Int)) *Application_FindLCA_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*big.Int)) + }) + return _c +} + +func (_c *Application_FindLCA_Call) Return(_a0 *logpoller.LogPollerBlock, _a1 error) *Application_FindLCA_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Application_FindLCA_Call) RunAndReturn(run func(context.Context, *big.Int) (*logpoller.LogPollerBlock, error)) *Application_FindLCA_Call { + _c.Call.Return(run) + return _c +} + // GetAuditLogger provides a mock function with given fields: func (_m *Application) GetAuditLogger() audit.AuditLogger { ret := _m.Called() @@ -237,6 +470,33 @@ func (_m *Application) GetAuditLogger() audit.AuditLogger { return r0 } +// Application_GetAuditLogger_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAuditLogger' +type Application_GetAuditLogger_Call struct { + *mock.Call +} + +// GetAuditLogger is a helper method to define mock.On call +func (_e *Application_Expecter) GetAuditLogger() *Application_GetAuditLogger_Call { + return &Application_GetAuditLogger_Call{Call: _e.mock.On("GetAuditLogger")} +} + +func (_c *Application_GetAuditLogger_Call) Run(run func()) *Application_GetAuditLogger_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Application_GetAuditLogger_Call) Return(_a0 audit.AuditLogger) *Application_GetAuditLogger_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Application_GetAuditLogger_Call) RunAndReturn(run func() audit.AuditLogger) *Application_GetAuditLogger_Call { + _c.Call.Return(run) + return _c +} + // GetConfig provides a mock function with given fields: func (_m *Application) GetConfig() chainlink.GeneralConfig { ret := _m.Called() @@ -257,6 +517,33 @@ func (_m *Application) GetConfig() chainlink.GeneralConfig { return r0 } +// Application_GetConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetConfig' +type Application_GetConfig_Call struct { + *mock.Call +} + +// GetConfig is a helper method to define mock.On call +func (_e *Application_Expecter) GetConfig() *Application_GetConfig_Call { + return &Application_GetConfig_Call{Call: _e.mock.On("GetConfig")} +} + +func (_c *Application_GetConfig_Call) Run(run func()) *Application_GetConfig_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Application_GetConfig_Call) Return(_a0 chainlink.GeneralConfig) *Application_GetConfig_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Application_GetConfig_Call) RunAndReturn(run func() chainlink.GeneralConfig) *Application_GetConfig_Call { + _c.Call.Return(run) + return _c +} + // GetDB provides a mock function with given fields: func (_m *Application) GetDB() sqlutil.DataSource { ret := _m.Called() @@ -277,6 +564,33 @@ func (_m *Application) GetDB() sqlutil.DataSource { return r0 } +// Application_GetDB_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDB' +type Application_GetDB_Call struct { + *mock.Call +} + +// GetDB is a helper method to define mock.On call +func (_e *Application_Expecter) GetDB() *Application_GetDB_Call { + return &Application_GetDB_Call{Call: _e.mock.On("GetDB")} +} + +func (_c *Application_GetDB_Call) Run(run func()) *Application_GetDB_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Application_GetDB_Call) Return(_a0 sqlutil.DataSource) *Application_GetDB_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Application_GetDB_Call) RunAndReturn(run func() sqlutil.DataSource) *Application_GetDB_Call { + _c.Call.Return(run) + return _c +} + // GetExternalInitiatorManager provides a mock function with given fields: func (_m *Application) GetExternalInitiatorManager() webhook.ExternalInitiatorManager { ret := _m.Called() @@ -297,6 +611,33 @@ func (_m *Application) GetExternalInitiatorManager() webhook.ExternalInitiatorMa return r0 } +// Application_GetExternalInitiatorManager_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetExternalInitiatorManager' +type Application_GetExternalInitiatorManager_Call struct { + *mock.Call +} + +// GetExternalInitiatorManager is a helper method to define mock.On call +func (_e *Application_Expecter) GetExternalInitiatorManager() *Application_GetExternalInitiatorManager_Call { + return &Application_GetExternalInitiatorManager_Call{Call: _e.mock.On("GetExternalInitiatorManager")} +} + +func (_c *Application_GetExternalInitiatorManager_Call) Run(run func()) *Application_GetExternalInitiatorManager_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Application_GetExternalInitiatorManager_Call) Return(_a0 webhook.ExternalInitiatorManager) *Application_GetExternalInitiatorManager_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Application_GetExternalInitiatorManager_Call) RunAndReturn(run func() webhook.ExternalInitiatorManager) *Application_GetExternalInitiatorManager_Call { + _c.Call.Return(run) + return _c +} + // GetFeedsService provides a mock function with given fields: func (_m *Application) GetFeedsService() feeds.Service { ret := _m.Called() @@ -317,6 +658,33 @@ func (_m *Application) GetFeedsService() feeds.Service { return r0 } +// Application_GetFeedsService_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFeedsService' +type Application_GetFeedsService_Call struct { + *mock.Call +} + +// GetFeedsService is a helper method to define mock.On call +func (_e *Application_Expecter) GetFeedsService() *Application_GetFeedsService_Call { + return &Application_GetFeedsService_Call{Call: _e.mock.On("GetFeedsService")} +} + +func (_c *Application_GetFeedsService_Call) Run(run func()) *Application_GetFeedsService_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Application_GetFeedsService_Call) Return(_a0 feeds.Service) *Application_GetFeedsService_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Application_GetFeedsService_Call) RunAndReturn(run func() feeds.Service) *Application_GetFeedsService_Call { + _c.Call.Return(run) + return _c +} + // GetHealthChecker provides a mock function with given fields: func (_m *Application) GetHealthChecker() services.Checker { ret := _m.Called() @@ -337,6 +705,33 @@ func (_m *Application) GetHealthChecker() services.Checker { return r0 } +// Application_GetHealthChecker_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetHealthChecker' +type Application_GetHealthChecker_Call struct { + *mock.Call +} + +// GetHealthChecker is a helper method to define mock.On call +func (_e *Application_Expecter) GetHealthChecker() *Application_GetHealthChecker_Call { + return &Application_GetHealthChecker_Call{Call: _e.mock.On("GetHealthChecker")} +} + +func (_c *Application_GetHealthChecker_Call) Run(run func()) *Application_GetHealthChecker_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Application_GetHealthChecker_Call) Return(_a0 services.Checker) *Application_GetHealthChecker_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Application_GetHealthChecker_Call) RunAndReturn(run func() services.Checker) *Application_GetHealthChecker_Call { + _c.Call.Return(run) + return _c +} + // GetKeyStore provides a mock function with given fields: func (_m *Application) GetKeyStore() keystore.Master { ret := _m.Called() @@ -357,6 +752,33 @@ func (_m *Application) GetKeyStore() keystore.Master { return r0 } +// Application_GetKeyStore_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetKeyStore' +type Application_GetKeyStore_Call struct { + *mock.Call +} + +// GetKeyStore is a helper method to define mock.On call +func (_e *Application_Expecter) GetKeyStore() *Application_GetKeyStore_Call { + return &Application_GetKeyStore_Call{Call: _e.mock.On("GetKeyStore")} +} + +func (_c *Application_GetKeyStore_Call) Run(run func()) *Application_GetKeyStore_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Application_GetKeyStore_Call) Return(_a0 keystore.Master) *Application_GetKeyStore_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Application_GetKeyStore_Call) RunAndReturn(run func() keystore.Master) *Application_GetKeyStore_Call { + _c.Call.Return(run) + return _c +} + // GetLogger provides a mock function with given fields: func (_m *Application) GetLogger() logger.SugaredLogger { ret := _m.Called() @@ -377,6 +799,33 @@ func (_m *Application) GetLogger() logger.SugaredLogger { return r0 } +// Application_GetLogger_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLogger' +type Application_GetLogger_Call struct { + *mock.Call +} + +// GetLogger is a helper method to define mock.On call +func (_e *Application_Expecter) GetLogger() *Application_GetLogger_Call { + return &Application_GetLogger_Call{Call: _e.mock.On("GetLogger")} +} + +func (_c *Application_GetLogger_Call) Run(run func()) *Application_GetLogger_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Application_GetLogger_Call) Return(_a0 logger.SugaredLogger) *Application_GetLogger_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Application_GetLogger_Call) RunAndReturn(run func() logger.SugaredLogger) *Application_GetLogger_Call { + _c.Call.Return(run) + return _c +} + // GetLoopRegistrarConfig provides a mock function with given fields: func (_m *Application) GetLoopRegistrarConfig() plugins.RegistrarConfig { ret := _m.Called() @@ -397,6 +846,33 @@ func (_m *Application) GetLoopRegistrarConfig() plugins.RegistrarConfig { return r0 } +// Application_GetLoopRegistrarConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLoopRegistrarConfig' +type Application_GetLoopRegistrarConfig_Call struct { + *mock.Call +} + +// GetLoopRegistrarConfig is a helper method to define mock.On call +func (_e *Application_Expecter) GetLoopRegistrarConfig() *Application_GetLoopRegistrarConfig_Call { + return &Application_GetLoopRegistrarConfig_Call{Call: _e.mock.On("GetLoopRegistrarConfig")} +} + +func (_c *Application_GetLoopRegistrarConfig_Call) Run(run func()) *Application_GetLoopRegistrarConfig_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Application_GetLoopRegistrarConfig_Call) Return(_a0 plugins.RegistrarConfig) *Application_GetLoopRegistrarConfig_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Application_GetLoopRegistrarConfig_Call) RunAndReturn(run func() plugins.RegistrarConfig) *Application_GetLoopRegistrarConfig_Call { + _c.Call.Return(run) + return _c +} + // GetLoopRegistry provides a mock function with given fields: func (_m *Application) GetLoopRegistry() *plugins.LoopRegistry { ret := _m.Called() @@ -417,6 +893,33 @@ func (_m *Application) GetLoopRegistry() *plugins.LoopRegistry { return r0 } +// Application_GetLoopRegistry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLoopRegistry' +type Application_GetLoopRegistry_Call struct { + *mock.Call +} + +// GetLoopRegistry is a helper method to define mock.On call +func (_e *Application_Expecter) GetLoopRegistry() *Application_GetLoopRegistry_Call { + return &Application_GetLoopRegistry_Call{Call: _e.mock.On("GetLoopRegistry")} +} + +func (_c *Application_GetLoopRegistry_Call) Run(run func()) *Application_GetLoopRegistry_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Application_GetLoopRegistry_Call) Return(_a0 *plugins.LoopRegistry) *Application_GetLoopRegistry_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Application_GetLoopRegistry_Call) RunAndReturn(run func() *plugins.LoopRegistry) *Application_GetLoopRegistry_Call { + _c.Call.Return(run) + return _c +} + // GetRelayers provides a mock function with given fields: func (_m *Application) GetRelayers() chainlink.RelayerChainInteroperators { ret := _m.Called() @@ -437,6 +940,33 @@ func (_m *Application) GetRelayers() chainlink.RelayerChainInteroperators { return r0 } +// Application_GetRelayers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRelayers' +type Application_GetRelayers_Call struct { + *mock.Call +} + +// GetRelayers is a helper method to define mock.On call +func (_e *Application_Expecter) GetRelayers() *Application_GetRelayers_Call { + return &Application_GetRelayers_Call{Call: _e.mock.On("GetRelayers")} +} + +func (_c *Application_GetRelayers_Call) Run(run func()) *Application_GetRelayers_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Application_GetRelayers_Call) Return(_a0 chainlink.RelayerChainInteroperators) *Application_GetRelayers_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Application_GetRelayers_Call) RunAndReturn(run func() chainlink.RelayerChainInteroperators) *Application_GetRelayers_Call { + _c.Call.Return(run) + return _c +} + // GetWebAuthnConfiguration provides a mock function with given fields: func (_m *Application) GetWebAuthnConfiguration() sessions.WebAuthnConfiguration { ret := _m.Called() @@ -455,6 +985,33 @@ func (_m *Application) GetWebAuthnConfiguration() sessions.WebAuthnConfiguration return r0 } +// Application_GetWebAuthnConfiguration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetWebAuthnConfiguration' +type Application_GetWebAuthnConfiguration_Call struct { + *mock.Call +} + +// GetWebAuthnConfiguration is a helper method to define mock.On call +func (_e *Application_Expecter) GetWebAuthnConfiguration() *Application_GetWebAuthnConfiguration_Call { + return &Application_GetWebAuthnConfiguration_Call{Call: _e.mock.On("GetWebAuthnConfiguration")} +} + +func (_c *Application_GetWebAuthnConfiguration_Call) Run(run func()) *Application_GetWebAuthnConfiguration_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Application_GetWebAuthnConfiguration_Call) Return(_a0 sessions.WebAuthnConfiguration) *Application_GetWebAuthnConfiguration_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Application_GetWebAuthnConfiguration_Call) RunAndReturn(run func() sessions.WebAuthnConfiguration) *Application_GetWebAuthnConfiguration_Call { + _c.Call.Return(run) + return _c +} + // ID provides a mock function with given fields: func (_m *Application) ID() uuid.UUID { ret := _m.Called() @@ -475,6 +1032,33 @@ func (_m *Application) ID() uuid.UUID { return r0 } +// Application_ID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ID' +type Application_ID_Call struct { + *mock.Call +} + +// ID is a helper method to define mock.On call +func (_e *Application_Expecter) ID() *Application_ID_Call { + return &Application_ID_Call{Call: _e.mock.On("ID")} +} + +func (_c *Application_ID_Call) Run(run func()) *Application_ID_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Application_ID_Call) Return(_a0 uuid.UUID) *Application_ID_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Application_ID_Call) RunAndReturn(run func() uuid.UUID) *Application_ID_Call { + _c.Call.Return(run) + return _c +} + // JobORM provides a mock function with given fields: func (_m *Application) JobORM() job.ORM { ret := _m.Called() @@ -495,6 +1079,33 @@ func (_m *Application) JobORM() job.ORM { return r0 } +// Application_JobORM_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'JobORM' +type Application_JobORM_Call struct { + *mock.Call +} + +// JobORM is a helper method to define mock.On call +func (_e *Application_Expecter) JobORM() *Application_JobORM_Call { + return &Application_JobORM_Call{Call: _e.mock.On("JobORM")} +} + +func (_c *Application_JobORM_Call) Run(run func()) *Application_JobORM_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Application_JobORM_Call) Return(_a0 job.ORM) *Application_JobORM_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Application_JobORM_Call) RunAndReturn(run func() job.ORM) *Application_JobORM_Call { + _c.Call.Return(run) + return _c +} + // JobSpawner provides a mock function with given fields: func (_m *Application) JobSpawner() job.Spawner { ret := _m.Called() @@ -515,6 +1126,33 @@ func (_m *Application) JobSpawner() job.Spawner { return r0 } +// Application_JobSpawner_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'JobSpawner' +type Application_JobSpawner_Call struct { + *mock.Call +} + +// JobSpawner is a helper method to define mock.On call +func (_e *Application_Expecter) JobSpawner() *Application_JobSpawner_Call { + return &Application_JobSpawner_Call{Call: _e.mock.On("JobSpawner")} +} + +func (_c *Application_JobSpawner_Call) Run(run func()) *Application_JobSpawner_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Application_JobSpawner_Call) Return(_a0 job.Spawner) *Application_JobSpawner_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Application_JobSpawner_Call) RunAndReturn(run func() job.Spawner) *Application_JobSpawner_Call { + _c.Call.Return(run) + return _c +} + // PipelineORM provides a mock function with given fields: func (_m *Application) PipelineORM() pipeline.ORM { ret := _m.Called() @@ -535,6 +1173,33 @@ func (_m *Application) PipelineORM() pipeline.ORM { return r0 } +// Application_PipelineORM_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PipelineORM' +type Application_PipelineORM_Call struct { + *mock.Call +} + +// PipelineORM is a helper method to define mock.On call +func (_e *Application_Expecter) PipelineORM() *Application_PipelineORM_Call { + return &Application_PipelineORM_Call{Call: _e.mock.On("PipelineORM")} +} + +func (_c *Application_PipelineORM_Call) Run(run func()) *Application_PipelineORM_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Application_PipelineORM_Call) Return(_a0 pipeline.ORM) *Application_PipelineORM_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Application_PipelineORM_Call) RunAndReturn(run func() pipeline.ORM) *Application_PipelineORM_Call { + _c.Call.Return(run) + return _c +} + // ReplayFromBlock provides a mock function with given fields: chainID, number, forceBroadcast func (_m *Application) ReplayFromBlock(chainID *big.Int, number uint64, forceBroadcast bool) error { ret := _m.Called(chainID, number, forceBroadcast) @@ -553,6 +1218,36 @@ func (_m *Application) ReplayFromBlock(chainID *big.Int, number uint64, forceBro return r0 } +// Application_ReplayFromBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReplayFromBlock' +type Application_ReplayFromBlock_Call struct { + *mock.Call +} + +// ReplayFromBlock is a helper method to define mock.On call +// - chainID *big.Int +// - number uint64 +// - forceBroadcast bool +func (_e *Application_Expecter) ReplayFromBlock(chainID interface{}, number interface{}, forceBroadcast interface{}) *Application_ReplayFromBlock_Call { + return &Application_ReplayFromBlock_Call{Call: _e.mock.On("ReplayFromBlock", chainID, number, forceBroadcast)} +} + +func (_c *Application_ReplayFromBlock_Call) Run(run func(chainID *big.Int, number uint64, forceBroadcast bool)) *Application_ReplayFromBlock_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*big.Int), args[1].(uint64), args[2].(bool)) + }) + return _c +} + +func (_c *Application_ReplayFromBlock_Call) Return(_a0 error) *Application_ReplayFromBlock_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Application_ReplayFromBlock_Call) RunAndReturn(run func(*big.Int, uint64, bool) error) *Application_ReplayFromBlock_Call { + _c.Call.Return(run) + return _c +} + // ResumeJobV2 provides a mock function with given fields: ctx, taskID, result func (_m *Application) ResumeJobV2(ctx context.Context, taskID uuid.UUID, result pipeline.Result) error { ret := _m.Called(ctx, taskID, result) @@ -571,6 +1266,36 @@ func (_m *Application) ResumeJobV2(ctx context.Context, taskID uuid.UUID, result return r0 } +// Application_ResumeJobV2_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResumeJobV2' +type Application_ResumeJobV2_Call struct { + *mock.Call +} + +// ResumeJobV2 is a helper method to define mock.On call +// - ctx context.Context +// - taskID uuid.UUID +// - result pipeline.Result +func (_e *Application_Expecter) ResumeJobV2(ctx interface{}, taskID interface{}, result interface{}) *Application_ResumeJobV2_Call { + return &Application_ResumeJobV2_Call{Call: _e.mock.On("ResumeJobV2", ctx, taskID, result)} +} + +func (_c *Application_ResumeJobV2_Call) Run(run func(ctx context.Context, taskID uuid.UUID, result pipeline.Result)) *Application_ResumeJobV2_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(pipeline.Result)) + }) + return _c +} + +func (_c *Application_ResumeJobV2_Call) Return(_a0 error) *Application_ResumeJobV2_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Application_ResumeJobV2_Call) RunAndReturn(run func(context.Context, uuid.UUID, pipeline.Result) error) *Application_ResumeJobV2_Call { + _c.Call.Return(run) + return _c +} + // RunJobV2 provides a mock function with given fields: ctx, jobID, meta func (_m *Application) RunJobV2(ctx context.Context, jobID int32, meta map[string]interface{}) (int64, error) { ret := _m.Called(ctx, jobID, meta) @@ -599,6 +1324,36 @@ func (_m *Application) RunJobV2(ctx context.Context, jobID int32, meta map[strin return r0, r1 } +// Application_RunJobV2_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RunJobV2' +type Application_RunJobV2_Call struct { + *mock.Call +} + +// RunJobV2 is a helper method to define mock.On call +// - ctx context.Context +// - jobID int32 +// - meta map[string]interface{} +func (_e *Application_Expecter) RunJobV2(ctx interface{}, jobID interface{}, meta interface{}) *Application_RunJobV2_Call { + return &Application_RunJobV2_Call{Call: _e.mock.On("RunJobV2", ctx, jobID, meta)} +} + +func (_c *Application_RunJobV2_Call) Run(run func(ctx context.Context, jobID int32, meta map[string]interface{})) *Application_RunJobV2_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int32), args[2].(map[string]interface{})) + }) + return _c +} + +func (_c *Application_RunJobV2_Call) Return(_a0 int64, _a1 error) *Application_RunJobV2_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Application_RunJobV2_Call) RunAndReturn(run func(context.Context, int32, map[string]interface{}) (int64, error)) *Application_RunJobV2_Call { + _c.Call.Return(run) + return _c +} + // RunWebhookJobV2 provides a mock function with given fields: ctx, jobUUID, requestBody, meta func (_m *Application) RunWebhookJobV2(ctx context.Context, jobUUID uuid.UUID, requestBody string, meta jsonserializable.JSONSerializable) (int64, error) { ret := _m.Called(ctx, jobUUID, requestBody, meta) @@ -627,6 +1382,37 @@ func (_m *Application) RunWebhookJobV2(ctx context.Context, jobUUID uuid.UUID, r return r0, r1 } +// Application_RunWebhookJobV2_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RunWebhookJobV2' +type Application_RunWebhookJobV2_Call struct { + *mock.Call +} + +// RunWebhookJobV2 is a helper method to define mock.On call +// - ctx context.Context +// - jobUUID uuid.UUID +// - requestBody string +// - meta jsonserializable.JSONSerializable +func (_e *Application_Expecter) RunWebhookJobV2(ctx interface{}, jobUUID interface{}, requestBody interface{}, meta interface{}) *Application_RunWebhookJobV2_Call { + return &Application_RunWebhookJobV2_Call{Call: _e.mock.On("RunWebhookJobV2", ctx, jobUUID, requestBody, meta)} +} + +func (_c *Application_RunWebhookJobV2_Call) Run(run func(ctx context.Context, jobUUID uuid.UUID, requestBody string, meta jsonserializable.JSONSerializable)) *Application_RunWebhookJobV2_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(string), args[3].(jsonserializable.JSONSerializable)) + }) + return _c +} + +func (_c *Application_RunWebhookJobV2_Call) Return(_a0 int64, _a1 error) *Application_RunWebhookJobV2_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Application_RunWebhookJobV2_Call) RunAndReturn(run func(context.Context, uuid.UUID, string, jsonserializable.JSONSerializable) (int64, error)) *Application_RunWebhookJobV2_Call { + _c.Call.Return(run) + return _c +} + // SecretGenerator provides a mock function with given fields: func (_m *Application) SecretGenerator() chainlink.SecretGenerator { ret := _m.Called() @@ -647,6 +1433,33 @@ func (_m *Application) SecretGenerator() chainlink.SecretGenerator { return r0 } +// Application_SecretGenerator_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SecretGenerator' +type Application_SecretGenerator_Call struct { + *mock.Call +} + +// SecretGenerator is a helper method to define mock.On call +func (_e *Application_Expecter) SecretGenerator() *Application_SecretGenerator_Call { + return &Application_SecretGenerator_Call{Call: _e.mock.On("SecretGenerator")} +} + +func (_c *Application_SecretGenerator_Call) Run(run func()) *Application_SecretGenerator_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Application_SecretGenerator_Call) Return(_a0 chainlink.SecretGenerator) *Application_SecretGenerator_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Application_SecretGenerator_Call) RunAndReturn(run func() chainlink.SecretGenerator) *Application_SecretGenerator_Call { + _c.Call.Return(run) + return _c +} + // SetLogLevel provides a mock function with given fields: lvl func (_m *Application) SetLogLevel(lvl zapcore.Level) error { ret := _m.Called(lvl) @@ -665,6 +1478,34 @@ func (_m *Application) SetLogLevel(lvl zapcore.Level) error { return r0 } +// Application_SetLogLevel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetLogLevel' +type Application_SetLogLevel_Call struct { + *mock.Call +} + +// SetLogLevel is a helper method to define mock.On call +// - lvl zapcore.Level +func (_e *Application_Expecter) SetLogLevel(lvl interface{}) *Application_SetLogLevel_Call { + return &Application_SetLogLevel_Call{Call: _e.mock.On("SetLogLevel", lvl)} +} + +func (_c *Application_SetLogLevel_Call) Run(run func(lvl zapcore.Level)) *Application_SetLogLevel_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(zapcore.Level)) + }) + return _c +} + +func (_c *Application_SetLogLevel_Call) Return(_a0 error) *Application_SetLogLevel_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Application_SetLogLevel_Call) RunAndReturn(run func(zapcore.Level) error) *Application_SetLogLevel_Call { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: ctx func (_m *Application) Start(ctx context.Context) error { ret := _m.Called(ctx) @@ -683,6 +1524,34 @@ func (_m *Application) Start(ctx context.Context) error { return r0 } +// Application_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type Application_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - ctx context.Context +func (_e *Application_Expecter) Start(ctx interface{}) *Application_Start_Call { + return &Application_Start_Call{Call: _e.mock.On("Start", ctx)} +} + +func (_c *Application_Start_Call) Run(run func(ctx context.Context)) *Application_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Application_Start_Call) Return(_a0 error) *Application_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Application_Start_Call) RunAndReturn(run func(context.Context) error) *Application_Start_Call { + _c.Call.Return(run) + return _c +} + // Stop provides a mock function with given fields: func (_m *Application) Stop() error { ret := _m.Called() @@ -701,6 +1570,33 @@ func (_m *Application) Stop() error { return r0 } +// Application_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop' +type Application_Stop_Call struct { + *mock.Call +} + +// Stop is a helper method to define mock.On call +func (_e *Application_Expecter) Stop() *Application_Stop_Call { + return &Application_Stop_Call{Call: _e.mock.On("Stop")} +} + +func (_c *Application_Stop_Call) Run(run func()) *Application_Stop_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Application_Stop_Call) Return(_a0 error) *Application_Stop_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Application_Stop_Call) RunAndReturn(run func() error) *Application_Stop_Call { + _c.Call.Return(run) + return _c +} + // TxmStorageService provides a mock function with given fields: func (_m *Application) TxmStorageService() txmgr.EvmTxStore { ret := _m.Called() @@ -721,11 +1617,65 @@ func (_m *Application) TxmStorageService() txmgr.EvmTxStore { return r0 } +// Application_TxmStorageService_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TxmStorageService' +type Application_TxmStorageService_Call struct { + *mock.Call +} + +// TxmStorageService is a helper method to define mock.On call +func (_e *Application_Expecter) TxmStorageService() *Application_TxmStorageService_Call { + return &Application_TxmStorageService_Call{Call: _e.mock.On("TxmStorageService")} +} + +func (_c *Application_TxmStorageService_Call) Run(run func()) *Application_TxmStorageService_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Application_TxmStorageService_Call) Return(_a0 txmgr.EvmTxStore) *Application_TxmStorageService_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Application_TxmStorageService_Call) RunAndReturn(run func() txmgr.EvmTxStore) *Application_TxmStorageService_Call { + _c.Call.Return(run) + return _c +} + // WakeSessionReaper provides a mock function with given fields: func (_m *Application) WakeSessionReaper() { _m.Called() } +// Application_WakeSessionReaper_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WakeSessionReaper' +type Application_WakeSessionReaper_Call struct { + *mock.Call +} + +// WakeSessionReaper is a helper method to define mock.On call +func (_e *Application_Expecter) WakeSessionReaper() *Application_WakeSessionReaper_Call { + return &Application_WakeSessionReaper_Call{Call: _e.mock.On("WakeSessionReaper")} +} + +func (_c *Application_WakeSessionReaper_Call) Run(run func()) *Application_WakeSessionReaper_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Application_WakeSessionReaper_Call) Return() *Application_WakeSessionReaper_Call { + _c.Call.Return() + return _c +} + +func (_c *Application_WakeSessionReaper_Call) RunAndReturn(run func()) *Application_WakeSessionReaper_Call { + _c.Call.Return(run) + return _c +} + // NewApplication creates a new instance of Application. 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 NewApplication(t interface { diff --git a/core/internal/mocks/flags.go b/core/internal/mocks/flags.go index 3f9e47095e6..35efa75cafc 100644 --- a/core/internal/mocks/flags.go +++ b/core/internal/mocks/flags.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -22,6 +22,14 @@ type Flags struct { mock.Mock } +type Flags_Expecter struct { + mock *mock.Mock +} + +func (_m *Flags) EXPECT() *Flags_Expecter { + return &Flags_Expecter{mock: &_m.Mock} +} + // AcceptOwnership provides a mock function with given fields: opts func (_m *Flags) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { ret := _m.Called(opts) @@ -52,6 +60,34 @@ func (_m *Flags) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, e return r0, r1 } +// Flags_AcceptOwnership_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AcceptOwnership' +type Flags_AcceptOwnership_Call struct { + *mock.Call +} + +// AcceptOwnership is a helper method to define mock.On call +// - opts *bind.TransactOpts +func (_e *Flags_Expecter) AcceptOwnership(opts interface{}) *Flags_AcceptOwnership_Call { + return &Flags_AcceptOwnership_Call{Call: _e.mock.On("AcceptOwnership", opts)} +} + +func (_c *Flags_AcceptOwnership_Call) Run(run func(opts *bind.TransactOpts)) *Flags_AcceptOwnership_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts)) + }) + return _c +} + +func (_c *Flags_AcceptOwnership_Call) Return(_a0 *types.Transaction, _a1 error) *Flags_AcceptOwnership_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_AcceptOwnership_Call) RunAndReturn(run func(*bind.TransactOpts) (*types.Transaction, error)) *Flags_AcceptOwnership_Call { + _c.Call.Return(run) + return _c +} + // AddAccess provides a mock function with given fields: opts, _user func (_m *Flags) AddAccess(opts *bind.TransactOpts, _user common.Address) (*types.Transaction, error) { ret := _m.Called(opts, _user) @@ -82,6 +118,35 @@ func (_m *Flags) AddAccess(opts *bind.TransactOpts, _user common.Address) (*type return r0, r1 } +// Flags_AddAccess_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddAccess' +type Flags_AddAccess_Call struct { + *mock.Call +} + +// AddAccess is a helper method to define mock.On call +// - opts *bind.TransactOpts +// - _user common.Address +func (_e *Flags_Expecter) AddAccess(opts interface{}, _user interface{}) *Flags_AddAccess_Call { + return &Flags_AddAccess_Call{Call: _e.mock.On("AddAccess", opts, _user)} +} + +func (_c *Flags_AddAccess_Call) Run(run func(opts *bind.TransactOpts, _user common.Address)) *Flags_AddAccess_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts), args[1].(common.Address)) + }) + return _c +} + +func (_c *Flags_AddAccess_Call) Return(_a0 *types.Transaction, _a1 error) *Flags_AddAccess_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_AddAccess_Call) RunAndReturn(run func(*bind.TransactOpts, common.Address) (*types.Transaction, error)) *Flags_AddAccess_Call { + _c.Call.Return(run) + return _c +} + // Address provides a mock function with given fields: func (_m *Flags) Address() common.Address { ret := _m.Called() @@ -102,6 +167,33 @@ func (_m *Flags) Address() common.Address { return r0 } +// Flags_Address_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Address' +type Flags_Address_Call struct { + *mock.Call +} + +// Address is a helper method to define mock.On call +func (_e *Flags_Expecter) Address() *Flags_Address_Call { + return &Flags_Address_Call{Call: _e.mock.On("Address")} +} + +func (_c *Flags_Address_Call) Run(run func()) *Flags_Address_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Flags_Address_Call) Return(_a0 common.Address) *Flags_Address_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Flags_Address_Call) RunAndReturn(run func() common.Address) *Flags_Address_Call { + _c.Call.Return(run) + return _c +} + // CheckEnabled provides a mock function with given fields: opts func (_m *Flags) CheckEnabled(opts *bind.CallOpts) (bool, error) { ret := _m.Called(opts) @@ -130,6 +222,34 @@ func (_m *Flags) CheckEnabled(opts *bind.CallOpts) (bool, error) { return r0, r1 } +// Flags_CheckEnabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckEnabled' +type Flags_CheckEnabled_Call struct { + *mock.Call +} + +// CheckEnabled is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *Flags_Expecter) CheckEnabled(opts interface{}) *Flags_CheckEnabled_Call { + return &Flags_CheckEnabled_Call{Call: _e.mock.On("CheckEnabled", opts)} +} + +func (_c *Flags_CheckEnabled_Call) Run(run func(opts *bind.CallOpts)) *Flags_CheckEnabled_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *Flags_CheckEnabled_Call) Return(_a0 bool, _a1 error) *Flags_CheckEnabled_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_CheckEnabled_Call) RunAndReturn(run func(*bind.CallOpts) (bool, error)) *Flags_CheckEnabled_Call { + _c.Call.Return(run) + return _c +} + // DisableAccessCheck provides a mock function with given fields: opts func (_m *Flags) DisableAccessCheck(opts *bind.TransactOpts) (*types.Transaction, error) { ret := _m.Called(opts) @@ -160,6 +280,34 @@ func (_m *Flags) DisableAccessCheck(opts *bind.TransactOpts) (*types.Transaction return r0, r1 } +// Flags_DisableAccessCheck_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DisableAccessCheck' +type Flags_DisableAccessCheck_Call struct { + *mock.Call +} + +// DisableAccessCheck is a helper method to define mock.On call +// - opts *bind.TransactOpts +func (_e *Flags_Expecter) DisableAccessCheck(opts interface{}) *Flags_DisableAccessCheck_Call { + return &Flags_DisableAccessCheck_Call{Call: _e.mock.On("DisableAccessCheck", opts)} +} + +func (_c *Flags_DisableAccessCheck_Call) Run(run func(opts *bind.TransactOpts)) *Flags_DisableAccessCheck_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts)) + }) + return _c +} + +func (_c *Flags_DisableAccessCheck_Call) Return(_a0 *types.Transaction, _a1 error) *Flags_DisableAccessCheck_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_DisableAccessCheck_Call) RunAndReturn(run func(*bind.TransactOpts) (*types.Transaction, error)) *Flags_DisableAccessCheck_Call { + _c.Call.Return(run) + return _c +} + // EnableAccessCheck provides a mock function with given fields: opts func (_m *Flags) EnableAccessCheck(opts *bind.TransactOpts) (*types.Transaction, error) { ret := _m.Called(opts) @@ -190,6 +338,34 @@ func (_m *Flags) EnableAccessCheck(opts *bind.TransactOpts) (*types.Transaction, return r0, r1 } +// Flags_EnableAccessCheck_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnableAccessCheck' +type Flags_EnableAccessCheck_Call struct { + *mock.Call +} + +// EnableAccessCheck is a helper method to define mock.On call +// - opts *bind.TransactOpts +func (_e *Flags_Expecter) EnableAccessCheck(opts interface{}) *Flags_EnableAccessCheck_Call { + return &Flags_EnableAccessCheck_Call{Call: _e.mock.On("EnableAccessCheck", opts)} +} + +func (_c *Flags_EnableAccessCheck_Call) Run(run func(opts *bind.TransactOpts)) *Flags_EnableAccessCheck_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts)) + }) + return _c +} + +func (_c *Flags_EnableAccessCheck_Call) Return(_a0 *types.Transaction, _a1 error) *Flags_EnableAccessCheck_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_EnableAccessCheck_Call) RunAndReturn(run func(*bind.TransactOpts) (*types.Transaction, error)) *Flags_EnableAccessCheck_Call { + _c.Call.Return(run) + return _c +} + // FilterAddedAccess provides a mock function with given fields: opts func (_m *Flags) FilterAddedAccess(opts *bind.FilterOpts) (*flags_wrapper.FlagsAddedAccessIterator, error) { ret := _m.Called(opts) @@ -220,6 +396,34 @@ func (_m *Flags) FilterAddedAccess(opts *bind.FilterOpts) (*flags_wrapper.FlagsA return r0, r1 } +// Flags_FilterAddedAccess_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterAddedAccess' +type Flags_FilterAddedAccess_Call struct { + *mock.Call +} + +// FilterAddedAccess is a helper method to define mock.On call +// - opts *bind.FilterOpts +func (_e *Flags_Expecter) FilterAddedAccess(opts interface{}) *Flags_FilterAddedAccess_Call { + return &Flags_FilterAddedAccess_Call{Call: _e.mock.On("FilterAddedAccess", opts)} +} + +func (_c *Flags_FilterAddedAccess_Call) Run(run func(opts *bind.FilterOpts)) *Flags_FilterAddedAccess_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts)) + }) + return _c +} + +func (_c *Flags_FilterAddedAccess_Call) Return(_a0 *flags_wrapper.FlagsAddedAccessIterator, _a1 error) *Flags_FilterAddedAccess_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_FilterAddedAccess_Call) RunAndReturn(run func(*bind.FilterOpts) (*flags_wrapper.FlagsAddedAccessIterator, error)) *Flags_FilterAddedAccess_Call { + _c.Call.Return(run) + return _c +} + // FilterCheckAccessDisabled provides a mock function with given fields: opts func (_m *Flags) FilterCheckAccessDisabled(opts *bind.FilterOpts) (*flags_wrapper.FlagsCheckAccessDisabledIterator, error) { ret := _m.Called(opts) @@ -250,6 +454,34 @@ func (_m *Flags) FilterCheckAccessDisabled(opts *bind.FilterOpts) (*flags_wrappe return r0, r1 } +// Flags_FilterCheckAccessDisabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterCheckAccessDisabled' +type Flags_FilterCheckAccessDisabled_Call struct { + *mock.Call +} + +// FilterCheckAccessDisabled is a helper method to define mock.On call +// - opts *bind.FilterOpts +func (_e *Flags_Expecter) FilterCheckAccessDisabled(opts interface{}) *Flags_FilterCheckAccessDisabled_Call { + return &Flags_FilterCheckAccessDisabled_Call{Call: _e.mock.On("FilterCheckAccessDisabled", opts)} +} + +func (_c *Flags_FilterCheckAccessDisabled_Call) Run(run func(opts *bind.FilterOpts)) *Flags_FilterCheckAccessDisabled_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts)) + }) + return _c +} + +func (_c *Flags_FilterCheckAccessDisabled_Call) Return(_a0 *flags_wrapper.FlagsCheckAccessDisabledIterator, _a1 error) *Flags_FilterCheckAccessDisabled_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_FilterCheckAccessDisabled_Call) RunAndReturn(run func(*bind.FilterOpts) (*flags_wrapper.FlagsCheckAccessDisabledIterator, error)) *Flags_FilterCheckAccessDisabled_Call { + _c.Call.Return(run) + return _c +} + // FilterCheckAccessEnabled provides a mock function with given fields: opts func (_m *Flags) FilterCheckAccessEnabled(opts *bind.FilterOpts) (*flags_wrapper.FlagsCheckAccessEnabledIterator, error) { ret := _m.Called(opts) @@ -280,6 +512,34 @@ func (_m *Flags) FilterCheckAccessEnabled(opts *bind.FilterOpts) (*flags_wrapper return r0, r1 } +// Flags_FilterCheckAccessEnabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterCheckAccessEnabled' +type Flags_FilterCheckAccessEnabled_Call struct { + *mock.Call +} + +// FilterCheckAccessEnabled is a helper method to define mock.On call +// - opts *bind.FilterOpts +func (_e *Flags_Expecter) FilterCheckAccessEnabled(opts interface{}) *Flags_FilterCheckAccessEnabled_Call { + return &Flags_FilterCheckAccessEnabled_Call{Call: _e.mock.On("FilterCheckAccessEnabled", opts)} +} + +func (_c *Flags_FilterCheckAccessEnabled_Call) Run(run func(opts *bind.FilterOpts)) *Flags_FilterCheckAccessEnabled_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts)) + }) + return _c +} + +func (_c *Flags_FilterCheckAccessEnabled_Call) Return(_a0 *flags_wrapper.FlagsCheckAccessEnabledIterator, _a1 error) *Flags_FilterCheckAccessEnabled_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_FilterCheckAccessEnabled_Call) RunAndReturn(run func(*bind.FilterOpts) (*flags_wrapper.FlagsCheckAccessEnabledIterator, error)) *Flags_FilterCheckAccessEnabled_Call { + _c.Call.Return(run) + return _c +} + // FilterFlagLowered provides a mock function with given fields: opts, subject func (_m *Flags) FilterFlagLowered(opts *bind.FilterOpts, subject []common.Address) (*flags_wrapper.FlagsFlagLoweredIterator, error) { ret := _m.Called(opts, subject) @@ -310,6 +570,35 @@ func (_m *Flags) FilterFlagLowered(opts *bind.FilterOpts, subject []common.Addre return r0, r1 } +// Flags_FilterFlagLowered_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterFlagLowered' +type Flags_FilterFlagLowered_Call struct { + *mock.Call +} + +// FilterFlagLowered is a helper method to define mock.On call +// - opts *bind.FilterOpts +// - subject []common.Address +func (_e *Flags_Expecter) FilterFlagLowered(opts interface{}, subject interface{}) *Flags_FilterFlagLowered_Call { + return &Flags_FilterFlagLowered_Call{Call: _e.mock.On("FilterFlagLowered", opts, subject)} +} + +func (_c *Flags_FilterFlagLowered_Call) Run(run func(opts *bind.FilterOpts, subject []common.Address)) *Flags_FilterFlagLowered_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts), args[1].([]common.Address)) + }) + return _c +} + +func (_c *Flags_FilterFlagLowered_Call) Return(_a0 *flags_wrapper.FlagsFlagLoweredIterator, _a1 error) *Flags_FilterFlagLowered_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_FilterFlagLowered_Call) RunAndReturn(run func(*bind.FilterOpts, []common.Address) (*flags_wrapper.FlagsFlagLoweredIterator, error)) *Flags_FilterFlagLowered_Call { + _c.Call.Return(run) + return _c +} + // FilterFlagRaised provides a mock function with given fields: opts, subject func (_m *Flags) FilterFlagRaised(opts *bind.FilterOpts, subject []common.Address) (*flags_wrapper.FlagsFlagRaisedIterator, error) { ret := _m.Called(opts, subject) @@ -340,6 +629,35 @@ func (_m *Flags) FilterFlagRaised(opts *bind.FilterOpts, subject []common.Addres return r0, r1 } +// Flags_FilterFlagRaised_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterFlagRaised' +type Flags_FilterFlagRaised_Call struct { + *mock.Call +} + +// FilterFlagRaised is a helper method to define mock.On call +// - opts *bind.FilterOpts +// - subject []common.Address +func (_e *Flags_Expecter) FilterFlagRaised(opts interface{}, subject interface{}) *Flags_FilterFlagRaised_Call { + return &Flags_FilterFlagRaised_Call{Call: _e.mock.On("FilterFlagRaised", opts, subject)} +} + +func (_c *Flags_FilterFlagRaised_Call) Run(run func(opts *bind.FilterOpts, subject []common.Address)) *Flags_FilterFlagRaised_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts), args[1].([]common.Address)) + }) + return _c +} + +func (_c *Flags_FilterFlagRaised_Call) Return(_a0 *flags_wrapper.FlagsFlagRaisedIterator, _a1 error) *Flags_FilterFlagRaised_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_FilterFlagRaised_Call) RunAndReturn(run func(*bind.FilterOpts, []common.Address) (*flags_wrapper.FlagsFlagRaisedIterator, error)) *Flags_FilterFlagRaised_Call { + _c.Call.Return(run) + return _c +} + // FilterOwnershipTransferRequested provides a mock function with given fields: opts, from, to func (_m *Flags) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*flags_wrapper.FlagsOwnershipTransferRequestedIterator, error) { ret := _m.Called(opts, from, to) @@ -370,6 +688,36 @@ func (_m *Flags) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from [] return r0, r1 } +// Flags_FilterOwnershipTransferRequested_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterOwnershipTransferRequested' +type Flags_FilterOwnershipTransferRequested_Call struct { + *mock.Call +} + +// FilterOwnershipTransferRequested is a helper method to define mock.On call +// - opts *bind.FilterOpts +// - from []common.Address +// - to []common.Address +func (_e *Flags_Expecter) FilterOwnershipTransferRequested(opts interface{}, from interface{}, to interface{}) *Flags_FilterOwnershipTransferRequested_Call { + return &Flags_FilterOwnershipTransferRequested_Call{Call: _e.mock.On("FilterOwnershipTransferRequested", opts, from, to)} +} + +func (_c *Flags_FilterOwnershipTransferRequested_Call) Run(run func(opts *bind.FilterOpts, from []common.Address, to []common.Address)) *Flags_FilterOwnershipTransferRequested_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts), args[1].([]common.Address), args[2].([]common.Address)) + }) + return _c +} + +func (_c *Flags_FilterOwnershipTransferRequested_Call) Return(_a0 *flags_wrapper.FlagsOwnershipTransferRequestedIterator, _a1 error) *Flags_FilterOwnershipTransferRequested_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_FilterOwnershipTransferRequested_Call) RunAndReturn(run func(*bind.FilterOpts, []common.Address, []common.Address) (*flags_wrapper.FlagsOwnershipTransferRequestedIterator, error)) *Flags_FilterOwnershipTransferRequested_Call { + _c.Call.Return(run) + return _c +} + // FilterOwnershipTransferred provides a mock function with given fields: opts, from, to func (_m *Flags) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*flags_wrapper.FlagsOwnershipTransferredIterator, error) { ret := _m.Called(opts, from, to) @@ -400,6 +748,36 @@ func (_m *Flags) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common return r0, r1 } +// Flags_FilterOwnershipTransferred_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterOwnershipTransferred' +type Flags_FilterOwnershipTransferred_Call struct { + *mock.Call +} + +// FilterOwnershipTransferred is a helper method to define mock.On call +// - opts *bind.FilterOpts +// - from []common.Address +// - to []common.Address +func (_e *Flags_Expecter) FilterOwnershipTransferred(opts interface{}, from interface{}, to interface{}) *Flags_FilterOwnershipTransferred_Call { + return &Flags_FilterOwnershipTransferred_Call{Call: _e.mock.On("FilterOwnershipTransferred", opts, from, to)} +} + +func (_c *Flags_FilterOwnershipTransferred_Call) Run(run func(opts *bind.FilterOpts, from []common.Address, to []common.Address)) *Flags_FilterOwnershipTransferred_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts), args[1].([]common.Address), args[2].([]common.Address)) + }) + return _c +} + +func (_c *Flags_FilterOwnershipTransferred_Call) Return(_a0 *flags_wrapper.FlagsOwnershipTransferredIterator, _a1 error) *Flags_FilterOwnershipTransferred_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_FilterOwnershipTransferred_Call) RunAndReturn(run func(*bind.FilterOpts, []common.Address, []common.Address) (*flags_wrapper.FlagsOwnershipTransferredIterator, error)) *Flags_FilterOwnershipTransferred_Call { + _c.Call.Return(run) + return _c +} + // FilterRaisingAccessControllerUpdated provides a mock function with given fields: opts, previous, current func (_m *Flags) FilterRaisingAccessControllerUpdated(opts *bind.FilterOpts, previous []common.Address, current []common.Address) (*flags_wrapper.FlagsRaisingAccessControllerUpdatedIterator, error) { ret := _m.Called(opts, previous, current) @@ -430,6 +808,36 @@ func (_m *Flags) FilterRaisingAccessControllerUpdated(opts *bind.FilterOpts, pre return r0, r1 } +// Flags_FilterRaisingAccessControllerUpdated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterRaisingAccessControllerUpdated' +type Flags_FilterRaisingAccessControllerUpdated_Call struct { + *mock.Call +} + +// FilterRaisingAccessControllerUpdated is a helper method to define mock.On call +// - opts *bind.FilterOpts +// - previous []common.Address +// - current []common.Address +func (_e *Flags_Expecter) FilterRaisingAccessControllerUpdated(opts interface{}, previous interface{}, current interface{}) *Flags_FilterRaisingAccessControllerUpdated_Call { + return &Flags_FilterRaisingAccessControllerUpdated_Call{Call: _e.mock.On("FilterRaisingAccessControllerUpdated", opts, previous, current)} +} + +func (_c *Flags_FilterRaisingAccessControllerUpdated_Call) Run(run func(opts *bind.FilterOpts, previous []common.Address, current []common.Address)) *Flags_FilterRaisingAccessControllerUpdated_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts), args[1].([]common.Address), args[2].([]common.Address)) + }) + return _c +} + +func (_c *Flags_FilterRaisingAccessControllerUpdated_Call) Return(_a0 *flags_wrapper.FlagsRaisingAccessControllerUpdatedIterator, _a1 error) *Flags_FilterRaisingAccessControllerUpdated_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_FilterRaisingAccessControllerUpdated_Call) RunAndReturn(run func(*bind.FilterOpts, []common.Address, []common.Address) (*flags_wrapper.FlagsRaisingAccessControllerUpdatedIterator, error)) *Flags_FilterRaisingAccessControllerUpdated_Call { + _c.Call.Return(run) + return _c +} + // FilterRemovedAccess provides a mock function with given fields: opts func (_m *Flags) FilterRemovedAccess(opts *bind.FilterOpts) (*flags_wrapper.FlagsRemovedAccessIterator, error) { ret := _m.Called(opts) @@ -460,6 +868,34 @@ func (_m *Flags) FilterRemovedAccess(opts *bind.FilterOpts) (*flags_wrapper.Flag return r0, r1 } +// Flags_FilterRemovedAccess_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterRemovedAccess' +type Flags_FilterRemovedAccess_Call struct { + *mock.Call +} + +// FilterRemovedAccess is a helper method to define mock.On call +// - opts *bind.FilterOpts +func (_e *Flags_Expecter) FilterRemovedAccess(opts interface{}) *Flags_FilterRemovedAccess_Call { + return &Flags_FilterRemovedAccess_Call{Call: _e.mock.On("FilterRemovedAccess", opts)} +} + +func (_c *Flags_FilterRemovedAccess_Call) Run(run func(opts *bind.FilterOpts)) *Flags_FilterRemovedAccess_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts)) + }) + return _c +} + +func (_c *Flags_FilterRemovedAccess_Call) Return(_a0 *flags_wrapper.FlagsRemovedAccessIterator, _a1 error) *Flags_FilterRemovedAccess_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_FilterRemovedAccess_Call) RunAndReturn(run func(*bind.FilterOpts) (*flags_wrapper.FlagsRemovedAccessIterator, error)) *Flags_FilterRemovedAccess_Call { + _c.Call.Return(run) + return _c +} + // GetFlag provides a mock function with given fields: opts, subject func (_m *Flags) GetFlag(opts *bind.CallOpts, subject common.Address) (bool, error) { ret := _m.Called(opts, subject) @@ -488,6 +924,35 @@ func (_m *Flags) GetFlag(opts *bind.CallOpts, subject common.Address) (bool, err return r0, r1 } +// Flags_GetFlag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFlag' +type Flags_GetFlag_Call struct { + *mock.Call +} + +// GetFlag is a helper method to define mock.On call +// - opts *bind.CallOpts +// - subject common.Address +func (_e *Flags_Expecter) GetFlag(opts interface{}, subject interface{}) *Flags_GetFlag_Call { + return &Flags_GetFlag_Call{Call: _e.mock.On("GetFlag", opts, subject)} +} + +func (_c *Flags_GetFlag_Call) Run(run func(opts *bind.CallOpts, subject common.Address)) *Flags_GetFlag_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts), args[1].(common.Address)) + }) + return _c +} + +func (_c *Flags_GetFlag_Call) Return(_a0 bool, _a1 error) *Flags_GetFlag_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_GetFlag_Call) RunAndReturn(run func(*bind.CallOpts, common.Address) (bool, error)) *Flags_GetFlag_Call { + _c.Call.Return(run) + return _c +} + // GetFlags provides a mock function with given fields: opts, subjects func (_m *Flags) GetFlags(opts *bind.CallOpts, subjects []common.Address) ([]bool, error) { ret := _m.Called(opts, subjects) @@ -518,6 +983,35 @@ func (_m *Flags) GetFlags(opts *bind.CallOpts, subjects []common.Address) ([]boo return r0, r1 } +// Flags_GetFlags_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFlags' +type Flags_GetFlags_Call struct { + *mock.Call +} + +// GetFlags is a helper method to define mock.On call +// - opts *bind.CallOpts +// - subjects []common.Address +func (_e *Flags_Expecter) GetFlags(opts interface{}, subjects interface{}) *Flags_GetFlags_Call { + return &Flags_GetFlags_Call{Call: _e.mock.On("GetFlags", opts, subjects)} +} + +func (_c *Flags_GetFlags_Call) Run(run func(opts *bind.CallOpts, subjects []common.Address)) *Flags_GetFlags_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts), args[1].([]common.Address)) + }) + return _c +} + +func (_c *Flags_GetFlags_Call) Return(_a0 []bool, _a1 error) *Flags_GetFlags_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_GetFlags_Call) RunAndReturn(run func(*bind.CallOpts, []common.Address) ([]bool, error)) *Flags_GetFlags_Call { + _c.Call.Return(run) + return _c +} + // HasAccess provides a mock function with given fields: opts, _user, _calldata func (_m *Flags) HasAccess(opts *bind.CallOpts, _user common.Address, _calldata []byte) (bool, error) { ret := _m.Called(opts, _user, _calldata) @@ -546,6 +1040,36 @@ func (_m *Flags) HasAccess(opts *bind.CallOpts, _user common.Address, _calldata return r0, r1 } +// Flags_HasAccess_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HasAccess' +type Flags_HasAccess_Call struct { + *mock.Call +} + +// HasAccess is a helper method to define mock.On call +// - opts *bind.CallOpts +// - _user common.Address +// - _calldata []byte +func (_e *Flags_Expecter) HasAccess(opts interface{}, _user interface{}, _calldata interface{}) *Flags_HasAccess_Call { + return &Flags_HasAccess_Call{Call: _e.mock.On("HasAccess", opts, _user, _calldata)} +} + +func (_c *Flags_HasAccess_Call) Run(run func(opts *bind.CallOpts, _user common.Address, _calldata []byte)) *Flags_HasAccess_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts), args[1].(common.Address), args[2].([]byte)) + }) + return _c +} + +func (_c *Flags_HasAccess_Call) Return(_a0 bool, _a1 error) *Flags_HasAccess_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_HasAccess_Call) RunAndReturn(run func(*bind.CallOpts, common.Address, []byte) (bool, error)) *Flags_HasAccess_Call { + _c.Call.Return(run) + return _c +} + // LowerFlags provides a mock function with given fields: opts, subjects func (_m *Flags) LowerFlags(opts *bind.TransactOpts, subjects []common.Address) (*types.Transaction, error) { ret := _m.Called(opts, subjects) @@ -576,6 +1100,35 @@ func (_m *Flags) LowerFlags(opts *bind.TransactOpts, subjects []common.Address) return r0, r1 } +// Flags_LowerFlags_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LowerFlags' +type Flags_LowerFlags_Call struct { + *mock.Call +} + +// LowerFlags is a helper method to define mock.On call +// - opts *bind.TransactOpts +// - subjects []common.Address +func (_e *Flags_Expecter) LowerFlags(opts interface{}, subjects interface{}) *Flags_LowerFlags_Call { + return &Flags_LowerFlags_Call{Call: _e.mock.On("LowerFlags", opts, subjects)} +} + +func (_c *Flags_LowerFlags_Call) Run(run func(opts *bind.TransactOpts, subjects []common.Address)) *Flags_LowerFlags_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts), args[1].([]common.Address)) + }) + return _c +} + +func (_c *Flags_LowerFlags_Call) Return(_a0 *types.Transaction, _a1 error) *Flags_LowerFlags_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_LowerFlags_Call) RunAndReturn(run func(*bind.TransactOpts, []common.Address) (*types.Transaction, error)) *Flags_LowerFlags_Call { + _c.Call.Return(run) + return _c +} + // Owner provides a mock function with given fields: opts func (_m *Flags) Owner(opts *bind.CallOpts) (common.Address, error) { ret := _m.Called(opts) @@ -606,6 +1159,34 @@ func (_m *Flags) Owner(opts *bind.CallOpts) (common.Address, error) { return r0, r1 } +// Flags_Owner_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Owner' +type Flags_Owner_Call struct { + *mock.Call +} + +// Owner is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *Flags_Expecter) Owner(opts interface{}) *Flags_Owner_Call { + return &Flags_Owner_Call{Call: _e.mock.On("Owner", opts)} +} + +func (_c *Flags_Owner_Call) Run(run func(opts *bind.CallOpts)) *Flags_Owner_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *Flags_Owner_Call) Return(_a0 common.Address, _a1 error) *Flags_Owner_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_Owner_Call) RunAndReturn(run func(*bind.CallOpts) (common.Address, error)) *Flags_Owner_Call { + _c.Call.Return(run) + return _c +} + // ParseAddedAccess provides a mock function with given fields: log func (_m *Flags) ParseAddedAccess(log types.Log) (*flags_wrapper.FlagsAddedAccess, error) { ret := _m.Called(log) @@ -636,6 +1217,34 @@ func (_m *Flags) ParseAddedAccess(log types.Log) (*flags_wrapper.FlagsAddedAcces return r0, r1 } +// Flags_ParseAddedAccess_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseAddedAccess' +type Flags_ParseAddedAccess_Call struct { + *mock.Call +} + +// ParseAddedAccess is a helper method to define mock.On call +// - log types.Log +func (_e *Flags_Expecter) ParseAddedAccess(log interface{}) *Flags_ParseAddedAccess_Call { + return &Flags_ParseAddedAccess_Call{Call: _e.mock.On("ParseAddedAccess", log)} +} + +func (_c *Flags_ParseAddedAccess_Call) Run(run func(log types.Log)) *Flags_ParseAddedAccess_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *Flags_ParseAddedAccess_Call) Return(_a0 *flags_wrapper.FlagsAddedAccess, _a1 error) *Flags_ParseAddedAccess_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_ParseAddedAccess_Call) RunAndReturn(run func(types.Log) (*flags_wrapper.FlagsAddedAccess, error)) *Flags_ParseAddedAccess_Call { + _c.Call.Return(run) + return _c +} + // ParseCheckAccessDisabled provides a mock function with given fields: log func (_m *Flags) ParseCheckAccessDisabled(log types.Log) (*flags_wrapper.FlagsCheckAccessDisabled, error) { ret := _m.Called(log) @@ -666,6 +1275,34 @@ func (_m *Flags) ParseCheckAccessDisabled(log types.Log) (*flags_wrapper.FlagsCh return r0, r1 } +// Flags_ParseCheckAccessDisabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseCheckAccessDisabled' +type Flags_ParseCheckAccessDisabled_Call struct { + *mock.Call +} + +// ParseCheckAccessDisabled is a helper method to define mock.On call +// - log types.Log +func (_e *Flags_Expecter) ParseCheckAccessDisabled(log interface{}) *Flags_ParseCheckAccessDisabled_Call { + return &Flags_ParseCheckAccessDisabled_Call{Call: _e.mock.On("ParseCheckAccessDisabled", log)} +} + +func (_c *Flags_ParseCheckAccessDisabled_Call) Run(run func(log types.Log)) *Flags_ParseCheckAccessDisabled_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *Flags_ParseCheckAccessDisabled_Call) Return(_a0 *flags_wrapper.FlagsCheckAccessDisabled, _a1 error) *Flags_ParseCheckAccessDisabled_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_ParseCheckAccessDisabled_Call) RunAndReturn(run func(types.Log) (*flags_wrapper.FlagsCheckAccessDisabled, error)) *Flags_ParseCheckAccessDisabled_Call { + _c.Call.Return(run) + return _c +} + // ParseCheckAccessEnabled provides a mock function with given fields: log func (_m *Flags) ParseCheckAccessEnabled(log types.Log) (*flags_wrapper.FlagsCheckAccessEnabled, error) { ret := _m.Called(log) @@ -696,6 +1333,34 @@ func (_m *Flags) ParseCheckAccessEnabled(log types.Log) (*flags_wrapper.FlagsChe return r0, r1 } +// Flags_ParseCheckAccessEnabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseCheckAccessEnabled' +type Flags_ParseCheckAccessEnabled_Call struct { + *mock.Call +} + +// ParseCheckAccessEnabled is a helper method to define mock.On call +// - log types.Log +func (_e *Flags_Expecter) ParseCheckAccessEnabled(log interface{}) *Flags_ParseCheckAccessEnabled_Call { + return &Flags_ParseCheckAccessEnabled_Call{Call: _e.mock.On("ParseCheckAccessEnabled", log)} +} + +func (_c *Flags_ParseCheckAccessEnabled_Call) Run(run func(log types.Log)) *Flags_ParseCheckAccessEnabled_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *Flags_ParseCheckAccessEnabled_Call) Return(_a0 *flags_wrapper.FlagsCheckAccessEnabled, _a1 error) *Flags_ParseCheckAccessEnabled_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_ParseCheckAccessEnabled_Call) RunAndReturn(run func(types.Log) (*flags_wrapper.FlagsCheckAccessEnabled, error)) *Flags_ParseCheckAccessEnabled_Call { + _c.Call.Return(run) + return _c +} + // ParseFlagLowered provides a mock function with given fields: log func (_m *Flags) ParseFlagLowered(log types.Log) (*flags_wrapper.FlagsFlagLowered, error) { ret := _m.Called(log) @@ -726,6 +1391,34 @@ func (_m *Flags) ParseFlagLowered(log types.Log) (*flags_wrapper.FlagsFlagLowere return r0, r1 } +// Flags_ParseFlagLowered_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseFlagLowered' +type Flags_ParseFlagLowered_Call struct { + *mock.Call +} + +// ParseFlagLowered is a helper method to define mock.On call +// - log types.Log +func (_e *Flags_Expecter) ParseFlagLowered(log interface{}) *Flags_ParseFlagLowered_Call { + return &Flags_ParseFlagLowered_Call{Call: _e.mock.On("ParseFlagLowered", log)} +} + +func (_c *Flags_ParseFlagLowered_Call) Run(run func(log types.Log)) *Flags_ParseFlagLowered_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *Flags_ParseFlagLowered_Call) Return(_a0 *flags_wrapper.FlagsFlagLowered, _a1 error) *Flags_ParseFlagLowered_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_ParseFlagLowered_Call) RunAndReturn(run func(types.Log) (*flags_wrapper.FlagsFlagLowered, error)) *Flags_ParseFlagLowered_Call { + _c.Call.Return(run) + return _c +} + // ParseFlagRaised provides a mock function with given fields: log func (_m *Flags) ParseFlagRaised(log types.Log) (*flags_wrapper.FlagsFlagRaised, error) { ret := _m.Called(log) @@ -756,6 +1449,34 @@ func (_m *Flags) ParseFlagRaised(log types.Log) (*flags_wrapper.FlagsFlagRaised, return r0, r1 } +// Flags_ParseFlagRaised_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseFlagRaised' +type Flags_ParseFlagRaised_Call struct { + *mock.Call +} + +// ParseFlagRaised is a helper method to define mock.On call +// - log types.Log +func (_e *Flags_Expecter) ParseFlagRaised(log interface{}) *Flags_ParseFlagRaised_Call { + return &Flags_ParseFlagRaised_Call{Call: _e.mock.On("ParseFlagRaised", log)} +} + +func (_c *Flags_ParseFlagRaised_Call) Run(run func(log types.Log)) *Flags_ParseFlagRaised_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *Flags_ParseFlagRaised_Call) Return(_a0 *flags_wrapper.FlagsFlagRaised, _a1 error) *Flags_ParseFlagRaised_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_ParseFlagRaised_Call) RunAndReturn(run func(types.Log) (*flags_wrapper.FlagsFlagRaised, error)) *Flags_ParseFlagRaised_Call { + _c.Call.Return(run) + return _c +} + // ParseLog provides a mock function with given fields: log func (_m *Flags) ParseLog(log types.Log) (generated.AbigenLog, error) { ret := _m.Called(log) @@ -786,6 +1507,34 @@ func (_m *Flags) ParseLog(log types.Log) (generated.AbigenLog, error) { return r0, r1 } +// Flags_ParseLog_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseLog' +type Flags_ParseLog_Call struct { + *mock.Call +} + +// ParseLog is a helper method to define mock.On call +// - log types.Log +func (_e *Flags_Expecter) ParseLog(log interface{}) *Flags_ParseLog_Call { + return &Flags_ParseLog_Call{Call: _e.mock.On("ParseLog", log)} +} + +func (_c *Flags_ParseLog_Call) Run(run func(log types.Log)) *Flags_ParseLog_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *Flags_ParseLog_Call) Return(_a0 generated.AbigenLog, _a1 error) *Flags_ParseLog_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_ParseLog_Call) RunAndReturn(run func(types.Log) (generated.AbigenLog, error)) *Flags_ParseLog_Call { + _c.Call.Return(run) + return _c +} + // ParseOwnershipTransferRequested provides a mock function with given fields: log func (_m *Flags) ParseOwnershipTransferRequested(log types.Log) (*flags_wrapper.FlagsOwnershipTransferRequested, error) { ret := _m.Called(log) @@ -816,6 +1565,34 @@ func (_m *Flags) ParseOwnershipTransferRequested(log types.Log) (*flags_wrapper. return r0, r1 } +// Flags_ParseOwnershipTransferRequested_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseOwnershipTransferRequested' +type Flags_ParseOwnershipTransferRequested_Call struct { + *mock.Call +} + +// ParseOwnershipTransferRequested is a helper method to define mock.On call +// - log types.Log +func (_e *Flags_Expecter) ParseOwnershipTransferRequested(log interface{}) *Flags_ParseOwnershipTransferRequested_Call { + return &Flags_ParseOwnershipTransferRequested_Call{Call: _e.mock.On("ParseOwnershipTransferRequested", log)} +} + +func (_c *Flags_ParseOwnershipTransferRequested_Call) Run(run func(log types.Log)) *Flags_ParseOwnershipTransferRequested_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *Flags_ParseOwnershipTransferRequested_Call) Return(_a0 *flags_wrapper.FlagsOwnershipTransferRequested, _a1 error) *Flags_ParseOwnershipTransferRequested_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_ParseOwnershipTransferRequested_Call) RunAndReturn(run func(types.Log) (*flags_wrapper.FlagsOwnershipTransferRequested, error)) *Flags_ParseOwnershipTransferRequested_Call { + _c.Call.Return(run) + return _c +} + // ParseOwnershipTransferred provides a mock function with given fields: log func (_m *Flags) ParseOwnershipTransferred(log types.Log) (*flags_wrapper.FlagsOwnershipTransferred, error) { ret := _m.Called(log) @@ -846,6 +1623,34 @@ func (_m *Flags) ParseOwnershipTransferred(log types.Log) (*flags_wrapper.FlagsO return r0, r1 } +// Flags_ParseOwnershipTransferred_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseOwnershipTransferred' +type Flags_ParseOwnershipTransferred_Call struct { + *mock.Call +} + +// ParseOwnershipTransferred is a helper method to define mock.On call +// - log types.Log +func (_e *Flags_Expecter) ParseOwnershipTransferred(log interface{}) *Flags_ParseOwnershipTransferred_Call { + return &Flags_ParseOwnershipTransferred_Call{Call: _e.mock.On("ParseOwnershipTransferred", log)} +} + +func (_c *Flags_ParseOwnershipTransferred_Call) Run(run func(log types.Log)) *Flags_ParseOwnershipTransferred_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *Flags_ParseOwnershipTransferred_Call) Return(_a0 *flags_wrapper.FlagsOwnershipTransferred, _a1 error) *Flags_ParseOwnershipTransferred_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_ParseOwnershipTransferred_Call) RunAndReturn(run func(types.Log) (*flags_wrapper.FlagsOwnershipTransferred, error)) *Flags_ParseOwnershipTransferred_Call { + _c.Call.Return(run) + return _c +} + // ParseRaisingAccessControllerUpdated provides a mock function with given fields: log func (_m *Flags) ParseRaisingAccessControllerUpdated(log types.Log) (*flags_wrapper.FlagsRaisingAccessControllerUpdated, error) { ret := _m.Called(log) @@ -876,6 +1681,34 @@ func (_m *Flags) ParseRaisingAccessControllerUpdated(log types.Log) (*flags_wrap return r0, r1 } +// Flags_ParseRaisingAccessControllerUpdated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseRaisingAccessControllerUpdated' +type Flags_ParseRaisingAccessControllerUpdated_Call struct { + *mock.Call +} + +// ParseRaisingAccessControllerUpdated is a helper method to define mock.On call +// - log types.Log +func (_e *Flags_Expecter) ParseRaisingAccessControllerUpdated(log interface{}) *Flags_ParseRaisingAccessControllerUpdated_Call { + return &Flags_ParseRaisingAccessControllerUpdated_Call{Call: _e.mock.On("ParseRaisingAccessControllerUpdated", log)} +} + +func (_c *Flags_ParseRaisingAccessControllerUpdated_Call) Run(run func(log types.Log)) *Flags_ParseRaisingAccessControllerUpdated_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *Flags_ParseRaisingAccessControllerUpdated_Call) Return(_a0 *flags_wrapper.FlagsRaisingAccessControllerUpdated, _a1 error) *Flags_ParseRaisingAccessControllerUpdated_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_ParseRaisingAccessControllerUpdated_Call) RunAndReturn(run func(types.Log) (*flags_wrapper.FlagsRaisingAccessControllerUpdated, error)) *Flags_ParseRaisingAccessControllerUpdated_Call { + _c.Call.Return(run) + return _c +} + // ParseRemovedAccess provides a mock function with given fields: log func (_m *Flags) ParseRemovedAccess(log types.Log) (*flags_wrapper.FlagsRemovedAccess, error) { ret := _m.Called(log) @@ -906,6 +1739,34 @@ func (_m *Flags) ParseRemovedAccess(log types.Log) (*flags_wrapper.FlagsRemovedA return r0, r1 } +// Flags_ParseRemovedAccess_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseRemovedAccess' +type Flags_ParseRemovedAccess_Call struct { + *mock.Call +} + +// ParseRemovedAccess is a helper method to define mock.On call +// - log types.Log +func (_e *Flags_Expecter) ParseRemovedAccess(log interface{}) *Flags_ParseRemovedAccess_Call { + return &Flags_ParseRemovedAccess_Call{Call: _e.mock.On("ParseRemovedAccess", log)} +} + +func (_c *Flags_ParseRemovedAccess_Call) Run(run func(log types.Log)) *Flags_ParseRemovedAccess_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *Flags_ParseRemovedAccess_Call) Return(_a0 *flags_wrapper.FlagsRemovedAccess, _a1 error) *Flags_ParseRemovedAccess_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_ParseRemovedAccess_Call) RunAndReturn(run func(types.Log) (*flags_wrapper.FlagsRemovedAccess, error)) *Flags_ParseRemovedAccess_Call { + _c.Call.Return(run) + return _c +} + // RaiseFlag provides a mock function with given fields: opts, subject func (_m *Flags) RaiseFlag(opts *bind.TransactOpts, subject common.Address) (*types.Transaction, error) { ret := _m.Called(opts, subject) @@ -936,6 +1797,35 @@ func (_m *Flags) RaiseFlag(opts *bind.TransactOpts, subject common.Address) (*ty return r0, r1 } +// Flags_RaiseFlag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RaiseFlag' +type Flags_RaiseFlag_Call struct { + *mock.Call +} + +// RaiseFlag is a helper method to define mock.On call +// - opts *bind.TransactOpts +// - subject common.Address +func (_e *Flags_Expecter) RaiseFlag(opts interface{}, subject interface{}) *Flags_RaiseFlag_Call { + return &Flags_RaiseFlag_Call{Call: _e.mock.On("RaiseFlag", opts, subject)} +} + +func (_c *Flags_RaiseFlag_Call) Run(run func(opts *bind.TransactOpts, subject common.Address)) *Flags_RaiseFlag_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts), args[1].(common.Address)) + }) + return _c +} + +func (_c *Flags_RaiseFlag_Call) Return(_a0 *types.Transaction, _a1 error) *Flags_RaiseFlag_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_RaiseFlag_Call) RunAndReturn(run func(*bind.TransactOpts, common.Address) (*types.Transaction, error)) *Flags_RaiseFlag_Call { + _c.Call.Return(run) + return _c +} + // RaiseFlags provides a mock function with given fields: opts, subjects func (_m *Flags) RaiseFlags(opts *bind.TransactOpts, subjects []common.Address) (*types.Transaction, error) { ret := _m.Called(opts, subjects) @@ -966,6 +1856,35 @@ func (_m *Flags) RaiseFlags(opts *bind.TransactOpts, subjects []common.Address) return r0, r1 } +// Flags_RaiseFlags_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RaiseFlags' +type Flags_RaiseFlags_Call struct { + *mock.Call +} + +// RaiseFlags is a helper method to define mock.On call +// - opts *bind.TransactOpts +// - subjects []common.Address +func (_e *Flags_Expecter) RaiseFlags(opts interface{}, subjects interface{}) *Flags_RaiseFlags_Call { + return &Flags_RaiseFlags_Call{Call: _e.mock.On("RaiseFlags", opts, subjects)} +} + +func (_c *Flags_RaiseFlags_Call) Run(run func(opts *bind.TransactOpts, subjects []common.Address)) *Flags_RaiseFlags_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts), args[1].([]common.Address)) + }) + return _c +} + +func (_c *Flags_RaiseFlags_Call) Return(_a0 *types.Transaction, _a1 error) *Flags_RaiseFlags_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_RaiseFlags_Call) RunAndReturn(run func(*bind.TransactOpts, []common.Address) (*types.Transaction, error)) *Flags_RaiseFlags_Call { + _c.Call.Return(run) + return _c +} + // RaisingAccessController provides a mock function with given fields: opts func (_m *Flags) RaisingAccessController(opts *bind.CallOpts) (common.Address, error) { ret := _m.Called(opts) @@ -996,6 +1915,34 @@ func (_m *Flags) RaisingAccessController(opts *bind.CallOpts) (common.Address, e return r0, r1 } +// Flags_RaisingAccessController_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RaisingAccessController' +type Flags_RaisingAccessController_Call struct { + *mock.Call +} + +// RaisingAccessController is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *Flags_Expecter) RaisingAccessController(opts interface{}) *Flags_RaisingAccessController_Call { + return &Flags_RaisingAccessController_Call{Call: _e.mock.On("RaisingAccessController", opts)} +} + +func (_c *Flags_RaisingAccessController_Call) Run(run func(opts *bind.CallOpts)) *Flags_RaisingAccessController_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *Flags_RaisingAccessController_Call) Return(_a0 common.Address, _a1 error) *Flags_RaisingAccessController_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_RaisingAccessController_Call) RunAndReturn(run func(*bind.CallOpts) (common.Address, error)) *Flags_RaisingAccessController_Call { + _c.Call.Return(run) + return _c +} + // RemoveAccess provides a mock function with given fields: opts, _user func (_m *Flags) RemoveAccess(opts *bind.TransactOpts, _user common.Address) (*types.Transaction, error) { ret := _m.Called(opts, _user) @@ -1026,6 +1973,35 @@ func (_m *Flags) RemoveAccess(opts *bind.TransactOpts, _user common.Address) (*t return r0, r1 } +// Flags_RemoveAccess_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveAccess' +type Flags_RemoveAccess_Call struct { + *mock.Call +} + +// RemoveAccess is a helper method to define mock.On call +// - opts *bind.TransactOpts +// - _user common.Address +func (_e *Flags_Expecter) RemoveAccess(opts interface{}, _user interface{}) *Flags_RemoveAccess_Call { + return &Flags_RemoveAccess_Call{Call: _e.mock.On("RemoveAccess", opts, _user)} +} + +func (_c *Flags_RemoveAccess_Call) Run(run func(opts *bind.TransactOpts, _user common.Address)) *Flags_RemoveAccess_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts), args[1].(common.Address)) + }) + return _c +} + +func (_c *Flags_RemoveAccess_Call) Return(_a0 *types.Transaction, _a1 error) *Flags_RemoveAccess_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_RemoveAccess_Call) RunAndReturn(run func(*bind.TransactOpts, common.Address) (*types.Transaction, error)) *Flags_RemoveAccess_Call { + _c.Call.Return(run) + return _c +} + // SetRaisingAccessController provides a mock function with given fields: opts, racAddress func (_m *Flags) SetRaisingAccessController(opts *bind.TransactOpts, racAddress common.Address) (*types.Transaction, error) { ret := _m.Called(opts, racAddress) @@ -1056,6 +2032,35 @@ func (_m *Flags) SetRaisingAccessController(opts *bind.TransactOpts, racAddress return r0, r1 } +// Flags_SetRaisingAccessController_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetRaisingAccessController' +type Flags_SetRaisingAccessController_Call struct { + *mock.Call +} + +// SetRaisingAccessController is a helper method to define mock.On call +// - opts *bind.TransactOpts +// - racAddress common.Address +func (_e *Flags_Expecter) SetRaisingAccessController(opts interface{}, racAddress interface{}) *Flags_SetRaisingAccessController_Call { + return &Flags_SetRaisingAccessController_Call{Call: _e.mock.On("SetRaisingAccessController", opts, racAddress)} +} + +func (_c *Flags_SetRaisingAccessController_Call) Run(run func(opts *bind.TransactOpts, racAddress common.Address)) *Flags_SetRaisingAccessController_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts), args[1].(common.Address)) + }) + return _c +} + +func (_c *Flags_SetRaisingAccessController_Call) Return(_a0 *types.Transaction, _a1 error) *Flags_SetRaisingAccessController_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_SetRaisingAccessController_Call) RunAndReturn(run func(*bind.TransactOpts, common.Address) (*types.Transaction, error)) *Flags_SetRaisingAccessController_Call { + _c.Call.Return(run) + return _c +} + // TransferOwnership provides a mock function with given fields: opts, _to func (_m *Flags) TransferOwnership(opts *bind.TransactOpts, _to common.Address) (*types.Transaction, error) { ret := _m.Called(opts, _to) @@ -1086,6 +2091,35 @@ func (_m *Flags) TransferOwnership(opts *bind.TransactOpts, _to common.Address) return r0, r1 } +// Flags_TransferOwnership_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransferOwnership' +type Flags_TransferOwnership_Call struct { + *mock.Call +} + +// TransferOwnership is a helper method to define mock.On call +// - opts *bind.TransactOpts +// - _to common.Address +func (_e *Flags_Expecter) TransferOwnership(opts interface{}, _to interface{}) *Flags_TransferOwnership_Call { + return &Flags_TransferOwnership_Call{Call: _e.mock.On("TransferOwnership", opts, _to)} +} + +func (_c *Flags_TransferOwnership_Call) Run(run func(opts *bind.TransactOpts, _to common.Address)) *Flags_TransferOwnership_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts), args[1].(common.Address)) + }) + return _c +} + +func (_c *Flags_TransferOwnership_Call) Return(_a0 *types.Transaction, _a1 error) *Flags_TransferOwnership_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_TransferOwnership_Call) RunAndReturn(run func(*bind.TransactOpts, common.Address) (*types.Transaction, error)) *Flags_TransferOwnership_Call { + _c.Call.Return(run) + return _c +} + // WatchAddedAccess provides a mock function with given fields: opts, sink func (_m *Flags) WatchAddedAccess(opts *bind.WatchOpts, sink chan<- *flags_wrapper.FlagsAddedAccess) (event.Subscription, error) { ret := _m.Called(opts, sink) @@ -1116,6 +2150,35 @@ func (_m *Flags) WatchAddedAccess(opts *bind.WatchOpts, sink chan<- *flags_wrapp return r0, r1 } +// Flags_WatchAddedAccess_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchAddedAccess' +type Flags_WatchAddedAccess_Call struct { + *mock.Call +} + +// WatchAddedAccess is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *flags_wrapper.FlagsAddedAccess +func (_e *Flags_Expecter) WatchAddedAccess(opts interface{}, sink interface{}) *Flags_WatchAddedAccess_Call { + return &Flags_WatchAddedAccess_Call{Call: _e.mock.On("WatchAddedAccess", opts, sink)} +} + +func (_c *Flags_WatchAddedAccess_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *flags_wrapper.FlagsAddedAccess)) *Flags_WatchAddedAccess_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *flags_wrapper.FlagsAddedAccess)) + }) + return _c +} + +func (_c *Flags_WatchAddedAccess_Call) Return(_a0 event.Subscription, _a1 error) *Flags_WatchAddedAccess_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_WatchAddedAccess_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *flags_wrapper.FlagsAddedAccess) (event.Subscription, error)) *Flags_WatchAddedAccess_Call { + _c.Call.Return(run) + return _c +} + // WatchCheckAccessDisabled provides a mock function with given fields: opts, sink func (_m *Flags) WatchCheckAccessDisabled(opts *bind.WatchOpts, sink chan<- *flags_wrapper.FlagsCheckAccessDisabled) (event.Subscription, error) { ret := _m.Called(opts, sink) @@ -1146,6 +2209,35 @@ func (_m *Flags) WatchCheckAccessDisabled(opts *bind.WatchOpts, sink chan<- *fla return r0, r1 } +// Flags_WatchCheckAccessDisabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchCheckAccessDisabled' +type Flags_WatchCheckAccessDisabled_Call struct { + *mock.Call +} + +// WatchCheckAccessDisabled is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *flags_wrapper.FlagsCheckAccessDisabled +func (_e *Flags_Expecter) WatchCheckAccessDisabled(opts interface{}, sink interface{}) *Flags_WatchCheckAccessDisabled_Call { + return &Flags_WatchCheckAccessDisabled_Call{Call: _e.mock.On("WatchCheckAccessDisabled", opts, sink)} +} + +func (_c *Flags_WatchCheckAccessDisabled_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *flags_wrapper.FlagsCheckAccessDisabled)) *Flags_WatchCheckAccessDisabled_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *flags_wrapper.FlagsCheckAccessDisabled)) + }) + return _c +} + +func (_c *Flags_WatchCheckAccessDisabled_Call) Return(_a0 event.Subscription, _a1 error) *Flags_WatchCheckAccessDisabled_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_WatchCheckAccessDisabled_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *flags_wrapper.FlagsCheckAccessDisabled) (event.Subscription, error)) *Flags_WatchCheckAccessDisabled_Call { + _c.Call.Return(run) + return _c +} + // WatchCheckAccessEnabled provides a mock function with given fields: opts, sink func (_m *Flags) WatchCheckAccessEnabled(opts *bind.WatchOpts, sink chan<- *flags_wrapper.FlagsCheckAccessEnabled) (event.Subscription, error) { ret := _m.Called(opts, sink) @@ -1176,6 +2268,35 @@ func (_m *Flags) WatchCheckAccessEnabled(opts *bind.WatchOpts, sink chan<- *flag return r0, r1 } +// Flags_WatchCheckAccessEnabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchCheckAccessEnabled' +type Flags_WatchCheckAccessEnabled_Call struct { + *mock.Call +} + +// WatchCheckAccessEnabled is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *flags_wrapper.FlagsCheckAccessEnabled +func (_e *Flags_Expecter) WatchCheckAccessEnabled(opts interface{}, sink interface{}) *Flags_WatchCheckAccessEnabled_Call { + return &Flags_WatchCheckAccessEnabled_Call{Call: _e.mock.On("WatchCheckAccessEnabled", opts, sink)} +} + +func (_c *Flags_WatchCheckAccessEnabled_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *flags_wrapper.FlagsCheckAccessEnabled)) *Flags_WatchCheckAccessEnabled_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *flags_wrapper.FlagsCheckAccessEnabled)) + }) + return _c +} + +func (_c *Flags_WatchCheckAccessEnabled_Call) Return(_a0 event.Subscription, _a1 error) *Flags_WatchCheckAccessEnabled_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_WatchCheckAccessEnabled_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *flags_wrapper.FlagsCheckAccessEnabled) (event.Subscription, error)) *Flags_WatchCheckAccessEnabled_Call { + _c.Call.Return(run) + return _c +} + // WatchFlagLowered provides a mock function with given fields: opts, sink, subject func (_m *Flags) WatchFlagLowered(opts *bind.WatchOpts, sink chan<- *flags_wrapper.FlagsFlagLowered, subject []common.Address) (event.Subscription, error) { ret := _m.Called(opts, sink, subject) @@ -1206,6 +2327,36 @@ func (_m *Flags) WatchFlagLowered(opts *bind.WatchOpts, sink chan<- *flags_wrapp return r0, r1 } +// Flags_WatchFlagLowered_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchFlagLowered' +type Flags_WatchFlagLowered_Call struct { + *mock.Call +} + +// WatchFlagLowered is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *flags_wrapper.FlagsFlagLowered +// - subject []common.Address +func (_e *Flags_Expecter) WatchFlagLowered(opts interface{}, sink interface{}, subject interface{}) *Flags_WatchFlagLowered_Call { + return &Flags_WatchFlagLowered_Call{Call: _e.mock.On("WatchFlagLowered", opts, sink, subject)} +} + +func (_c *Flags_WatchFlagLowered_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *flags_wrapper.FlagsFlagLowered, subject []common.Address)) *Flags_WatchFlagLowered_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *flags_wrapper.FlagsFlagLowered), args[2].([]common.Address)) + }) + return _c +} + +func (_c *Flags_WatchFlagLowered_Call) Return(_a0 event.Subscription, _a1 error) *Flags_WatchFlagLowered_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_WatchFlagLowered_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *flags_wrapper.FlagsFlagLowered, []common.Address) (event.Subscription, error)) *Flags_WatchFlagLowered_Call { + _c.Call.Return(run) + return _c +} + // WatchFlagRaised provides a mock function with given fields: opts, sink, subject func (_m *Flags) WatchFlagRaised(opts *bind.WatchOpts, sink chan<- *flags_wrapper.FlagsFlagRaised, subject []common.Address) (event.Subscription, error) { ret := _m.Called(opts, sink, subject) @@ -1236,6 +2387,36 @@ func (_m *Flags) WatchFlagRaised(opts *bind.WatchOpts, sink chan<- *flags_wrappe return r0, r1 } +// Flags_WatchFlagRaised_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchFlagRaised' +type Flags_WatchFlagRaised_Call struct { + *mock.Call +} + +// WatchFlagRaised is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *flags_wrapper.FlagsFlagRaised +// - subject []common.Address +func (_e *Flags_Expecter) WatchFlagRaised(opts interface{}, sink interface{}, subject interface{}) *Flags_WatchFlagRaised_Call { + return &Flags_WatchFlagRaised_Call{Call: _e.mock.On("WatchFlagRaised", opts, sink, subject)} +} + +func (_c *Flags_WatchFlagRaised_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *flags_wrapper.FlagsFlagRaised, subject []common.Address)) *Flags_WatchFlagRaised_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *flags_wrapper.FlagsFlagRaised), args[2].([]common.Address)) + }) + return _c +} + +func (_c *Flags_WatchFlagRaised_Call) Return(_a0 event.Subscription, _a1 error) *Flags_WatchFlagRaised_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_WatchFlagRaised_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *flags_wrapper.FlagsFlagRaised, []common.Address) (event.Subscription, error)) *Flags_WatchFlagRaised_Call { + _c.Call.Return(run) + return _c +} + // WatchOwnershipTransferRequested provides a mock function with given fields: opts, sink, from, to func (_m *Flags) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *flags_wrapper.FlagsOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { ret := _m.Called(opts, sink, from, to) @@ -1266,6 +2447,37 @@ func (_m *Flags) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan return r0, r1 } +// Flags_WatchOwnershipTransferRequested_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchOwnershipTransferRequested' +type Flags_WatchOwnershipTransferRequested_Call struct { + *mock.Call +} + +// WatchOwnershipTransferRequested is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *flags_wrapper.FlagsOwnershipTransferRequested +// - from []common.Address +// - to []common.Address +func (_e *Flags_Expecter) WatchOwnershipTransferRequested(opts interface{}, sink interface{}, from interface{}, to interface{}) *Flags_WatchOwnershipTransferRequested_Call { + return &Flags_WatchOwnershipTransferRequested_Call{Call: _e.mock.On("WatchOwnershipTransferRequested", opts, sink, from, to)} +} + +func (_c *Flags_WatchOwnershipTransferRequested_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *flags_wrapper.FlagsOwnershipTransferRequested, from []common.Address, to []common.Address)) *Flags_WatchOwnershipTransferRequested_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *flags_wrapper.FlagsOwnershipTransferRequested), args[2].([]common.Address), args[3].([]common.Address)) + }) + return _c +} + +func (_c *Flags_WatchOwnershipTransferRequested_Call) Return(_a0 event.Subscription, _a1 error) *Flags_WatchOwnershipTransferRequested_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_WatchOwnershipTransferRequested_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *flags_wrapper.FlagsOwnershipTransferRequested, []common.Address, []common.Address) (event.Subscription, error)) *Flags_WatchOwnershipTransferRequested_Call { + _c.Call.Return(run) + return _c +} + // WatchOwnershipTransferred provides a mock function with given fields: opts, sink, from, to func (_m *Flags) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *flags_wrapper.FlagsOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { ret := _m.Called(opts, sink, from, to) @@ -1296,6 +2508,37 @@ func (_m *Flags) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *fl return r0, r1 } +// Flags_WatchOwnershipTransferred_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchOwnershipTransferred' +type Flags_WatchOwnershipTransferred_Call struct { + *mock.Call +} + +// WatchOwnershipTransferred is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *flags_wrapper.FlagsOwnershipTransferred +// - from []common.Address +// - to []common.Address +func (_e *Flags_Expecter) WatchOwnershipTransferred(opts interface{}, sink interface{}, from interface{}, to interface{}) *Flags_WatchOwnershipTransferred_Call { + return &Flags_WatchOwnershipTransferred_Call{Call: _e.mock.On("WatchOwnershipTransferred", opts, sink, from, to)} +} + +func (_c *Flags_WatchOwnershipTransferred_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *flags_wrapper.FlagsOwnershipTransferred, from []common.Address, to []common.Address)) *Flags_WatchOwnershipTransferred_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *flags_wrapper.FlagsOwnershipTransferred), args[2].([]common.Address), args[3].([]common.Address)) + }) + return _c +} + +func (_c *Flags_WatchOwnershipTransferred_Call) Return(_a0 event.Subscription, _a1 error) *Flags_WatchOwnershipTransferred_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_WatchOwnershipTransferred_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *flags_wrapper.FlagsOwnershipTransferred, []common.Address, []common.Address) (event.Subscription, error)) *Flags_WatchOwnershipTransferred_Call { + _c.Call.Return(run) + return _c +} + // WatchRaisingAccessControllerUpdated provides a mock function with given fields: opts, sink, previous, current func (_m *Flags) WatchRaisingAccessControllerUpdated(opts *bind.WatchOpts, sink chan<- *flags_wrapper.FlagsRaisingAccessControllerUpdated, previous []common.Address, current []common.Address) (event.Subscription, error) { ret := _m.Called(opts, sink, previous, current) @@ -1326,6 +2569,37 @@ func (_m *Flags) WatchRaisingAccessControllerUpdated(opts *bind.WatchOpts, sink return r0, r1 } +// Flags_WatchRaisingAccessControllerUpdated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchRaisingAccessControllerUpdated' +type Flags_WatchRaisingAccessControllerUpdated_Call struct { + *mock.Call +} + +// WatchRaisingAccessControllerUpdated is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *flags_wrapper.FlagsRaisingAccessControllerUpdated +// - previous []common.Address +// - current []common.Address +func (_e *Flags_Expecter) WatchRaisingAccessControllerUpdated(opts interface{}, sink interface{}, previous interface{}, current interface{}) *Flags_WatchRaisingAccessControllerUpdated_Call { + return &Flags_WatchRaisingAccessControllerUpdated_Call{Call: _e.mock.On("WatchRaisingAccessControllerUpdated", opts, sink, previous, current)} +} + +func (_c *Flags_WatchRaisingAccessControllerUpdated_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *flags_wrapper.FlagsRaisingAccessControllerUpdated, previous []common.Address, current []common.Address)) *Flags_WatchRaisingAccessControllerUpdated_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *flags_wrapper.FlagsRaisingAccessControllerUpdated), args[2].([]common.Address), args[3].([]common.Address)) + }) + return _c +} + +func (_c *Flags_WatchRaisingAccessControllerUpdated_Call) Return(_a0 event.Subscription, _a1 error) *Flags_WatchRaisingAccessControllerUpdated_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_WatchRaisingAccessControllerUpdated_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *flags_wrapper.FlagsRaisingAccessControllerUpdated, []common.Address, []common.Address) (event.Subscription, error)) *Flags_WatchRaisingAccessControllerUpdated_Call { + _c.Call.Return(run) + return _c +} + // WatchRemovedAccess provides a mock function with given fields: opts, sink func (_m *Flags) WatchRemovedAccess(opts *bind.WatchOpts, sink chan<- *flags_wrapper.FlagsRemovedAccess) (event.Subscription, error) { ret := _m.Called(opts, sink) @@ -1356,6 +2630,35 @@ func (_m *Flags) WatchRemovedAccess(opts *bind.WatchOpts, sink chan<- *flags_wra return r0, r1 } +// Flags_WatchRemovedAccess_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchRemovedAccess' +type Flags_WatchRemovedAccess_Call struct { + *mock.Call +} + +// WatchRemovedAccess is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *flags_wrapper.FlagsRemovedAccess +func (_e *Flags_Expecter) WatchRemovedAccess(opts interface{}, sink interface{}) *Flags_WatchRemovedAccess_Call { + return &Flags_WatchRemovedAccess_Call{Call: _e.mock.On("WatchRemovedAccess", opts, sink)} +} + +func (_c *Flags_WatchRemovedAccess_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *flags_wrapper.FlagsRemovedAccess)) *Flags_WatchRemovedAccess_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *flags_wrapper.FlagsRemovedAccess)) + }) + return _c +} + +func (_c *Flags_WatchRemovedAccess_Call) Return(_a0 event.Subscription, _a1 error) *Flags_WatchRemovedAccess_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_WatchRemovedAccess_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *flags_wrapper.FlagsRemovedAccess) (event.Subscription, error)) *Flags_WatchRemovedAccess_Call { + _c.Call.Return(run) + return _c +} + // NewFlags creates a new instance of Flags. 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 NewFlags(t interface { diff --git a/core/internal/mocks/flux_aggregator.go b/core/internal/mocks/flux_aggregator.go index c1e35f41e2f..84c456d1eaa 100644 --- a/core/internal/mocks/flux_aggregator.go +++ b/core/internal/mocks/flux_aggregator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -24,6 +24,14 @@ type FluxAggregator struct { mock.Mock } +type FluxAggregator_Expecter struct { + mock *mock.Mock +} + +func (_m *FluxAggregator) EXPECT() *FluxAggregator_Expecter { + return &FluxAggregator_Expecter{mock: &_m.Mock} +} + // AcceptAdmin provides a mock function with given fields: opts, _oracle func (_m *FluxAggregator) AcceptAdmin(opts *bind.TransactOpts, _oracle common.Address) (*types.Transaction, error) { ret := _m.Called(opts, _oracle) @@ -54,6 +62,35 @@ func (_m *FluxAggregator) AcceptAdmin(opts *bind.TransactOpts, _oracle common.Ad return r0, r1 } +// FluxAggregator_AcceptAdmin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AcceptAdmin' +type FluxAggregator_AcceptAdmin_Call struct { + *mock.Call +} + +// AcceptAdmin is a helper method to define mock.On call +// - opts *bind.TransactOpts +// - _oracle common.Address +func (_e *FluxAggregator_Expecter) AcceptAdmin(opts interface{}, _oracle interface{}) *FluxAggregator_AcceptAdmin_Call { + return &FluxAggregator_AcceptAdmin_Call{Call: _e.mock.On("AcceptAdmin", opts, _oracle)} +} + +func (_c *FluxAggregator_AcceptAdmin_Call) Run(run func(opts *bind.TransactOpts, _oracle common.Address)) *FluxAggregator_AcceptAdmin_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts), args[1].(common.Address)) + }) + return _c +} + +func (_c *FluxAggregator_AcceptAdmin_Call) Return(_a0 *types.Transaction, _a1 error) *FluxAggregator_AcceptAdmin_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_AcceptAdmin_Call) RunAndReturn(run func(*bind.TransactOpts, common.Address) (*types.Transaction, error)) *FluxAggregator_AcceptAdmin_Call { + _c.Call.Return(run) + return _c +} + // AcceptOwnership provides a mock function with given fields: opts func (_m *FluxAggregator) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { ret := _m.Called(opts) @@ -84,6 +121,34 @@ func (_m *FluxAggregator) AcceptOwnership(opts *bind.TransactOpts) (*types.Trans return r0, r1 } +// FluxAggregator_AcceptOwnership_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AcceptOwnership' +type FluxAggregator_AcceptOwnership_Call struct { + *mock.Call +} + +// AcceptOwnership is a helper method to define mock.On call +// - opts *bind.TransactOpts +func (_e *FluxAggregator_Expecter) AcceptOwnership(opts interface{}) *FluxAggregator_AcceptOwnership_Call { + return &FluxAggregator_AcceptOwnership_Call{Call: _e.mock.On("AcceptOwnership", opts)} +} + +func (_c *FluxAggregator_AcceptOwnership_Call) Run(run func(opts *bind.TransactOpts)) *FluxAggregator_AcceptOwnership_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts)) + }) + return _c +} + +func (_c *FluxAggregator_AcceptOwnership_Call) Return(_a0 *types.Transaction, _a1 error) *FluxAggregator_AcceptOwnership_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_AcceptOwnership_Call) RunAndReturn(run func(*bind.TransactOpts) (*types.Transaction, error)) *FluxAggregator_AcceptOwnership_Call { + _c.Call.Return(run) + return _c +} + // Address provides a mock function with given fields: func (_m *FluxAggregator) Address() common.Address { ret := _m.Called() @@ -104,6 +169,33 @@ func (_m *FluxAggregator) Address() common.Address { return r0 } +// FluxAggregator_Address_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Address' +type FluxAggregator_Address_Call struct { + *mock.Call +} + +// Address is a helper method to define mock.On call +func (_e *FluxAggregator_Expecter) Address() *FluxAggregator_Address_Call { + return &FluxAggregator_Address_Call{Call: _e.mock.On("Address")} +} + +func (_c *FluxAggregator_Address_Call) Run(run func()) *FluxAggregator_Address_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *FluxAggregator_Address_Call) Return(_a0 common.Address) *FluxAggregator_Address_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *FluxAggregator_Address_Call) RunAndReturn(run func() common.Address) *FluxAggregator_Address_Call { + _c.Call.Return(run) + return _c +} + // AllocatedFunds provides a mock function with given fields: opts func (_m *FluxAggregator) AllocatedFunds(opts *bind.CallOpts) (*big.Int, error) { ret := _m.Called(opts) @@ -134,6 +226,34 @@ func (_m *FluxAggregator) AllocatedFunds(opts *bind.CallOpts) (*big.Int, error) return r0, r1 } +// FluxAggregator_AllocatedFunds_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AllocatedFunds' +type FluxAggregator_AllocatedFunds_Call struct { + *mock.Call +} + +// AllocatedFunds is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *FluxAggregator_Expecter) AllocatedFunds(opts interface{}) *FluxAggregator_AllocatedFunds_Call { + return &FluxAggregator_AllocatedFunds_Call{Call: _e.mock.On("AllocatedFunds", opts)} +} + +func (_c *FluxAggregator_AllocatedFunds_Call) Run(run func(opts *bind.CallOpts)) *FluxAggregator_AllocatedFunds_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *FluxAggregator_AllocatedFunds_Call) Return(_a0 *big.Int, _a1 error) *FluxAggregator_AllocatedFunds_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_AllocatedFunds_Call) RunAndReturn(run func(*bind.CallOpts) (*big.Int, error)) *FluxAggregator_AllocatedFunds_Call { + _c.Call.Return(run) + return _c +} + // AvailableFunds provides a mock function with given fields: opts func (_m *FluxAggregator) AvailableFunds(opts *bind.CallOpts) (*big.Int, error) { ret := _m.Called(opts) @@ -164,6 +284,34 @@ func (_m *FluxAggregator) AvailableFunds(opts *bind.CallOpts) (*big.Int, error) return r0, r1 } +// FluxAggregator_AvailableFunds_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AvailableFunds' +type FluxAggregator_AvailableFunds_Call struct { + *mock.Call +} + +// AvailableFunds is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *FluxAggregator_Expecter) AvailableFunds(opts interface{}) *FluxAggregator_AvailableFunds_Call { + return &FluxAggregator_AvailableFunds_Call{Call: _e.mock.On("AvailableFunds", opts)} +} + +func (_c *FluxAggregator_AvailableFunds_Call) Run(run func(opts *bind.CallOpts)) *FluxAggregator_AvailableFunds_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *FluxAggregator_AvailableFunds_Call) Return(_a0 *big.Int, _a1 error) *FluxAggregator_AvailableFunds_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_AvailableFunds_Call) RunAndReturn(run func(*bind.CallOpts) (*big.Int, error)) *FluxAggregator_AvailableFunds_Call { + _c.Call.Return(run) + return _c +} + // ChangeOracles provides a mock function with given fields: opts, _removed, _added, _addedAdmins, _minSubmissions, _maxSubmissions, _restartDelay func (_m *FluxAggregator) ChangeOracles(opts *bind.TransactOpts, _removed []common.Address, _added []common.Address, _addedAdmins []common.Address, _minSubmissions uint32, _maxSubmissions uint32, _restartDelay uint32) (*types.Transaction, error) { ret := _m.Called(opts, _removed, _added, _addedAdmins, _minSubmissions, _maxSubmissions, _restartDelay) @@ -194,6 +342,40 @@ func (_m *FluxAggregator) ChangeOracles(opts *bind.TransactOpts, _removed []comm return r0, r1 } +// FluxAggregator_ChangeOracles_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChangeOracles' +type FluxAggregator_ChangeOracles_Call struct { + *mock.Call +} + +// ChangeOracles is a helper method to define mock.On call +// - opts *bind.TransactOpts +// - _removed []common.Address +// - _added []common.Address +// - _addedAdmins []common.Address +// - _minSubmissions uint32 +// - _maxSubmissions uint32 +// - _restartDelay uint32 +func (_e *FluxAggregator_Expecter) ChangeOracles(opts interface{}, _removed interface{}, _added interface{}, _addedAdmins interface{}, _minSubmissions interface{}, _maxSubmissions interface{}, _restartDelay interface{}) *FluxAggregator_ChangeOracles_Call { + return &FluxAggregator_ChangeOracles_Call{Call: _e.mock.On("ChangeOracles", opts, _removed, _added, _addedAdmins, _minSubmissions, _maxSubmissions, _restartDelay)} +} + +func (_c *FluxAggregator_ChangeOracles_Call) Run(run func(opts *bind.TransactOpts, _removed []common.Address, _added []common.Address, _addedAdmins []common.Address, _minSubmissions uint32, _maxSubmissions uint32, _restartDelay uint32)) *FluxAggregator_ChangeOracles_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts), args[1].([]common.Address), args[2].([]common.Address), args[3].([]common.Address), args[4].(uint32), args[5].(uint32), args[6].(uint32)) + }) + return _c +} + +func (_c *FluxAggregator_ChangeOracles_Call) Return(_a0 *types.Transaction, _a1 error) *FluxAggregator_ChangeOracles_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_ChangeOracles_Call) RunAndReturn(run func(*bind.TransactOpts, []common.Address, []common.Address, []common.Address, uint32, uint32, uint32) (*types.Transaction, error)) *FluxAggregator_ChangeOracles_Call { + _c.Call.Return(run) + return _c +} + // Decimals provides a mock function with given fields: opts func (_m *FluxAggregator) Decimals(opts *bind.CallOpts) (uint8, error) { ret := _m.Called(opts) @@ -222,6 +404,34 @@ func (_m *FluxAggregator) Decimals(opts *bind.CallOpts) (uint8, error) { return r0, r1 } +// FluxAggregator_Decimals_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Decimals' +type FluxAggregator_Decimals_Call struct { + *mock.Call +} + +// Decimals is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *FluxAggregator_Expecter) Decimals(opts interface{}) *FluxAggregator_Decimals_Call { + return &FluxAggregator_Decimals_Call{Call: _e.mock.On("Decimals", opts)} +} + +func (_c *FluxAggregator_Decimals_Call) Run(run func(opts *bind.CallOpts)) *FluxAggregator_Decimals_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *FluxAggregator_Decimals_Call) Return(_a0 uint8, _a1 error) *FluxAggregator_Decimals_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_Decimals_Call) RunAndReturn(run func(*bind.CallOpts) (uint8, error)) *FluxAggregator_Decimals_Call { + _c.Call.Return(run) + return _c +} + // Description provides a mock function with given fields: opts func (_m *FluxAggregator) Description(opts *bind.CallOpts) (string, error) { ret := _m.Called(opts) @@ -250,6 +460,34 @@ func (_m *FluxAggregator) Description(opts *bind.CallOpts) (string, error) { return r0, r1 } +// FluxAggregator_Description_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Description' +type FluxAggregator_Description_Call struct { + *mock.Call +} + +// Description is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *FluxAggregator_Expecter) Description(opts interface{}) *FluxAggregator_Description_Call { + return &FluxAggregator_Description_Call{Call: _e.mock.On("Description", opts)} +} + +func (_c *FluxAggregator_Description_Call) Run(run func(opts *bind.CallOpts)) *FluxAggregator_Description_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *FluxAggregator_Description_Call) Return(_a0 string, _a1 error) *FluxAggregator_Description_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_Description_Call) RunAndReturn(run func(*bind.CallOpts) (string, error)) *FluxAggregator_Description_Call { + _c.Call.Return(run) + return _c +} + // FilterAnswerUpdated provides a mock function with given fields: opts, current, roundId func (_m *FluxAggregator) FilterAnswerUpdated(opts *bind.FilterOpts, current []*big.Int, roundId []*big.Int) (*flux_aggregator_wrapper.FluxAggregatorAnswerUpdatedIterator, error) { ret := _m.Called(opts, current, roundId) @@ -280,6 +518,36 @@ func (_m *FluxAggregator) FilterAnswerUpdated(opts *bind.FilterOpts, current []* return r0, r1 } +// FluxAggregator_FilterAnswerUpdated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterAnswerUpdated' +type FluxAggregator_FilterAnswerUpdated_Call struct { + *mock.Call +} + +// FilterAnswerUpdated is a helper method to define mock.On call +// - opts *bind.FilterOpts +// - current []*big.Int +// - roundId []*big.Int +func (_e *FluxAggregator_Expecter) FilterAnswerUpdated(opts interface{}, current interface{}, roundId interface{}) *FluxAggregator_FilterAnswerUpdated_Call { + return &FluxAggregator_FilterAnswerUpdated_Call{Call: _e.mock.On("FilterAnswerUpdated", opts, current, roundId)} +} + +func (_c *FluxAggregator_FilterAnswerUpdated_Call) Run(run func(opts *bind.FilterOpts, current []*big.Int, roundId []*big.Int)) *FluxAggregator_FilterAnswerUpdated_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts), args[1].([]*big.Int), args[2].([]*big.Int)) + }) + return _c +} + +func (_c *FluxAggregator_FilterAnswerUpdated_Call) Return(_a0 *flux_aggregator_wrapper.FluxAggregatorAnswerUpdatedIterator, _a1 error) *FluxAggregator_FilterAnswerUpdated_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_FilterAnswerUpdated_Call) RunAndReturn(run func(*bind.FilterOpts, []*big.Int, []*big.Int) (*flux_aggregator_wrapper.FluxAggregatorAnswerUpdatedIterator, error)) *FluxAggregator_FilterAnswerUpdated_Call { + _c.Call.Return(run) + return _c +} + // FilterAvailableFundsUpdated provides a mock function with given fields: opts, amount func (_m *FluxAggregator) FilterAvailableFundsUpdated(opts *bind.FilterOpts, amount []*big.Int) (*flux_aggregator_wrapper.FluxAggregatorAvailableFundsUpdatedIterator, error) { ret := _m.Called(opts, amount) @@ -310,6 +578,35 @@ func (_m *FluxAggregator) FilterAvailableFundsUpdated(opts *bind.FilterOpts, amo return r0, r1 } +// FluxAggregator_FilterAvailableFundsUpdated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterAvailableFundsUpdated' +type FluxAggregator_FilterAvailableFundsUpdated_Call struct { + *mock.Call +} + +// FilterAvailableFundsUpdated is a helper method to define mock.On call +// - opts *bind.FilterOpts +// - amount []*big.Int +func (_e *FluxAggregator_Expecter) FilterAvailableFundsUpdated(opts interface{}, amount interface{}) *FluxAggregator_FilterAvailableFundsUpdated_Call { + return &FluxAggregator_FilterAvailableFundsUpdated_Call{Call: _e.mock.On("FilterAvailableFundsUpdated", opts, amount)} +} + +func (_c *FluxAggregator_FilterAvailableFundsUpdated_Call) Run(run func(opts *bind.FilterOpts, amount []*big.Int)) *FluxAggregator_FilterAvailableFundsUpdated_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts), args[1].([]*big.Int)) + }) + return _c +} + +func (_c *FluxAggregator_FilterAvailableFundsUpdated_Call) Return(_a0 *flux_aggregator_wrapper.FluxAggregatorAvailableFundsUpdatedIterator, _a1 error) *FluxAggregator_FilterAvailableFundsUpdated_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_FilterAvailableFundsUpdated_Call) RunAndReturn(run func(*bind.FilterOpts, []*big.Int) (*flux_aggregator_wrapper.FluxAggregatorAvailableFundsUpdatedIterator, error)) *FluxAggregator_FilterAvailableFundsUpdated_Call { + _c.Call.Return(run) + return _c +} + // FilterNewRound provides a mock function with given fields: opts, roundId, startedBy func (_m *FluxAggregator) FilterNewRound(opts *bind.FilterOpts, roundId []*big.Int, startedBy []common.Address) (*flux_aggregator_wrapper.FluxAggregatorNewRoundIterator, error) { ret := _m.Called(opts, roundId, startedBy) @@ -340,6 +637,36 @@ func (_m *FluxAggregator) FilterNewRound(opts *bind.FilterOpts, roundId []*big.I return r0, r1 } +// FluxAggregator_FilterNewRound_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterNewRound' +type FluxAggregator_FilterNewRound_Call struct { + *mock.Call +} + +// FilterNewRound is a helper method to define mock.On call +// - opts *bind.FilterOpts +// - roundId []*big.Int +// - startedBy []common.Address +func (_e *FluxAggregator_Expecter) FilterNewRound(opts interface{}, roundId interface{}, startedBy interface{}) *FluxAggregator_FilterNewRound_Call { + return &FluxAggregator_FilterNewRound_Call{Call: _e.mock.On("FilterNewRound", opts, roundId, startedBy)} +} + +func (_c *FluxAggregator_FilterNewRound_Call) Run(run func(opts *bind.FilterOpts, roundId []*big.Int, startedBy []common.Address)) *FluxAggregator_FilterNewRound_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts), args[1].([]*big.Int), args[2].([]common.Address)) + }) + return _c +} + +func (_c *FluxAggregator_FilterNewRound_Call) Return(_a0 *flux_aggregator_wrapper.FluxAggregatorNewRoundIterator, _a1 error) *FluxAggregator_FilterNewRound_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_FilterNewRound_Call) RunAndReturn(run func(*bind.FilterOpts, []*big.Int, []common.Address) (*flux_aggregator_wrapper.FluxAggregatorNewRoundIterator, error)) *FluxAggregator_FilterNewRound_Call { + _c.Call.Return(run) + return _c +} + // FilterOracleAdminUpdateRequested provides a mock function with given fields: opts, oracle func (_m *FluxAggregator) FilterOracleAdminUpdateRequested(opts *bind.FilterOpts, oracle []common.Address) (*flux_aggregator_wrapper.FluxAggregatorOracleAdminUpdateRequestedIterator, error) { ret := _m.Called(opts, oracle) @@ -370,6 +697,35 @@ func (_m *FluxAggregator) FilterOracleAdminUpdateRequested(opts *bind.FilterOpts return r0, r1 } +// FluxAggregator_FilterOracleAdminUpdateRequested_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterOracleAdminUpdateRequested' +type FluxAggregator_FilterOracleAdminUpdateRequested_Call struct { + *mock.Call +} + +// FilterOracleAdminUpdateRequested is a helper method to define mock.On call +// - opts *bind.FilterOpts +// - oracle []common.Address +func (_e *FluxAggregator_Expecter) FilterOracleAdminUpdateRequested(opts interface{}, oracle interface{}) *FluxAggregator_FilterOracleAdminUpdateRequested_Call { + return &FluxAggregator_FilterOracleAdminUpdateRequested_Call{Call: _e.mock.On("FilterOracleAdminUpdateRequested", opts, oracle)} +} + +func (_c *FluxAggregator_FilterOracleAdminUpdateRequested_Call) Run(run func(opts *bind.FilterOpts, oracle []common.Address)) *FluxAggregator_FilterOracleAdminUpdateRequested_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts), args[1].([]common.Address)) + }) + return _c +} + +func (_c *FluxAggregator_FilterOracleAdminUpdateRequested_Call) Return(_a0 *flux_aggregator_wrapper.FluxAggregatorOracleAdminUpdateRequestedIterator, _a1 error) *FluxAggregator_FilterOracleAdminUpdateRequested_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_FilterOracleAdminUpdateRequested_Call) RunAndReturn(run func(*bind.FilterOpts, []common.Address) (*flux_aggregator_wrapper.FluxAggregatorOracleAdminUpdateRequestedIterator, error)) *FluxAggregator_FilterOracleAdminUpdateRequested_Call { + _c.Call.Return(run) + return _c +} + // FilterOracleAdminUpdated provides a mock function with given fields: opts, oracle, newAdmin func (_m *FluxAggregator) FilterOracleAdminUpdated(opts *bind.FilterOpts, oracle []common.Address, newAdmin []common.Address) (*flux_aggregator_wrapper.FluxAggregatorOracleAdminUpdatedIterator, error) { ret := _m.Called(opts, oracle, newAdmin) @@ -400,6 +756,36 @@ func (_m *FluxAggregator) FilterOracleAdminUpdated(opts *bind.FilterOpts, oracle return r0, r1 } +// FluxAggregator_FilterOracleAdminUpdated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterOracleAdminUpdated' +type FluxAggregator_FilterOracleAdminUpdated_Call struct { + *mock.Call +} + +// FilterOracleAdminUpdated is a helper method to define mock.On call +// - opts *bind.FilterOpts +// - oracle []common.Address +// - newAdmin []common.Address +func (_e *FluxAggregator_Expecter) FilterOracleAdminUpdated(opts interface{}, oracle interface{}, newAdmin interface{}) *FluxAggregator_FilterOracleAdminUpdated_Call { + return &FluxAggregator_FilterOracleAdminUpdated_Call{Call: _e.mock.On("FilterOracleAdminUpdated", opts, oracle, newAdmin)} +} + +func (_c *FluxAggregator_FilterOracleAdminUpdated_Call) Run(run func(opts *bind.FilterOpts, oracle []common.Address, newAdmin []common.Address)) *FluxAggregator_FilterOracleAdminUpdated_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts), args[1].([]common.Address), args[2].([]common.Address)) + }) + return _c +} + +func (_c *FluxAggregator_FilterOracleAdminUpdated_Call) Return(_a0 *flux_aggregator_wrapper.FluxAggregatorOracleAdminUpdatedIterator, _a1 error) *FluxAggregator_FilterOracleAdminUpdated_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_FilterOracleAdminUpdated_Call) RunAndReturn(run func(*bind.FilterOpts, []common.Address, []common.Address) (*flux_aggregator_wrapper.FluxAggregatorOracleAdminUpdatedIterator, error)) *FluxAggregator_FilterOracleAdminUpdated_Call { + _c.Call.Return(run) + return _c +} + // FilterOraclePermissionsUpdated provides a mock function with given fields: opts, oracle, whitelisted func (_m *FluxAggregator) FilterOraclePermissionsUpdated(opts *bind.FilterOpts, oracle []common.Address, whitelisted []bool) (*flux_aggregator_wrapper.FluxAggregatorOraclePermissionsUpdatedIterator, error) { ret := _m.Called(opts, oracle, whitelisted) @@ -430,6 +816,36 @@ func (_m *FluxAggregator) FilterOraclePermissionsUpdated(opts *bind.FilterOpts, return r0, r1 } +// FluxAggregator_FilterOraclePermissionsUpdated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterOraclePermissionsUpdated' +type FluxAggregator_FilterOraclePermissionsUpdated_Call struct { + *mock.Call +} + +// FilterOraclePermissionsUpdated is a helper method to define mock.On call +// - opts *bind.FilterOpts +// - oracle []common.Address +// - whitelisted []bool +func (_e *FluxAggregator_Expecter) FilterOraclePermissionsUpdated(opts interface{}, oracle interface{}, whitelisted interface{}) *FluxAggregator_FilterOraclePermissionsUpdated_Call { + return &FluxAggregator_FilterOraclePermissionsUpdated_Call{Call: _e.mock.On("FilterOraclePermissionsUpdated", opts, oracle, whitelisted)} +} + +func (_c *FluxAggregator_FilterOraclePermissionsUpdated_Call) Run(run func(opts *bind.FilterOpts, oracle []common.Address, whitelisted []bool)) *FluxAggregator_FilterOraclePermissionsUpdated_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts), args[1].([]common.Address), args[2].([]bool)) + }) + return _c +} + +func (_c *FluxAggregator_FilterOraclePermissionsUpdated_Call) Return(_a0 *flux_aggregator_wrapper.FluxAggregatorOraclePermissionsUpdatedIterator, _a1 error) *FluxAggregator_FilterOraclePermissionsUpdated_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_FilterOraclePermissionsUpdated_Call) RunAndReturn(run func(*bind.FilterOpts, []common.Address, []bool) (*flux_aggregator_wrapper.FluxAggregatorOraclePermissionsUpdatedIterator, error)) *FluxAggregator_FilterOraclePermissionsUpdated_Call { + _c.Call.Return(run) + return _c +} + // FilterOwnershipTransferRequested provides a mock function with given fields: opts, from, to func (_m *FluxAggregator) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*flux_aggregator_wrapper.FluxAggregatorOwnershipTransferRequestedIterator, error) { ret := _m.Called(opts, from, to) @@ -460,6 +876,36 @@ func (_m *FluxAggregator) FilterOwnershipTransferRequested(opts *bind.FilterOpts return r0, r1 } +// FluxAggregator_FilterOwnershipTransferRequested_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterOwnershipTransferRequested' +type FluxAggregator_FilterOwnershipTransferRequested_Call struct { + *mock.Call +} + +// FilterOwnershipTransferRequested is a helper method to define mock.On call +// - opts *bind.FilterOpts +// - from []common.Address +// - to []common.Address +func (_e *FluxAggregator_Expecter) FilterOwnershipTransferRequested(opts interface{}, from interface{}, to interface{}) *FluxAggregator_FilterOwnershipTransferRequested_Call { + return &FluxAggregator_FilterOwnershipTransferRequested_Call{Call: _e.mock.On("FilterOwnershipTransferRequested", opts, from, to)} +} + +func (_c *FluxAggregator_FilterOwnershipTransferRequested_Call) Run(run func(opts *bind.FilterOpts, from []common.Address, to []common.Address)) *FluxAggregator_FilterOwnershipTransferRequested_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts), args[1].([]common.Address), args[2].([]common.Address)) + }) + return _c +} + +func (_c *FluxAggregator_FilterOwnershipTransferRequested_Call) Return(_a0 *flux_aggregator_wrapper.FluxAggregatorOwnershipTransferRequestedIterator, _a1 error) *FluxAggregator_FilterOwnershipTransferRequested_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_FilterOwnershipTransferRequested_Call) RunAndReturn(run func(*bind.FilterOpts, []common.Address, []common.Address) (*flux_aggregator_wrapper.FluxAggregatorOwnershipTransferRequestedIterator, error)) *FluxAggregator_FilterOwnershipTransferRequested_Call { + _c.Call.Return(run) + return _c +} + // FilterOwnershipTransferred provides a mock function with given fields: opts, from, to func (_m *FluxAggregator) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*flux_aggregator_wrapper.FluxAggregatorOwnershipTransferredIterator, error) { ret := _m.Called(opts, from, to) @@ -490,6 +936,36 @@ func (_m *FluxAggregator) FilterOwnershipTransferred(opts *bind.FilterOpts, from return r0, r1 } +// FluxAggregator_FilterOwnershipTransferred_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterOwnershipTransferred' +type FluxAggregator_FilterOwnershipTransferred_Call struct { + *mock.Call +} + +// FilterOwnershipTransferred is a helper method to define mock.On call +// - opts *bind.FilterOpts +// - from []common.Address +// - to []common.Address +func (_e *FluxAggregator_Expecter) FilterOwnershipTransferred(opts interface{}, from interface{}, to interface{}) *FluxAggregator_FilterOwnershipTransferred_Call { + return &FluxAggregator_FilterOwnershipTransferred_Call{Call: _e.mock.On("FilterOwnershipTransferred", opts, from, to)} +} + +func (_c *FluxAggregator_FilterOwnershipTransferred_Call) Run(run func(opts *bind.FilterOpts, from []common.Address, to []common.Address)) *FluxAggregator_FilterOwnershipTransferred_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts), args[1].([]common.Address), args[2].([]common.Address)) + }) + return _c +} + +func (_c *FluxAggregator_FilterOwnershipTransferred_Call) Return(_a0 *flux_aggregator_wrapper.FluxAggregatorOwnershipTransferredIterator, _a1 error) *FluxAggregator_FilterOwnershipTransferred_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_FilterOwnershipTransferred_Call) RunAndReturn(run func(*bind.FilterOpts, []common.Address, []common.Address) (*flux_aggregator_wrapper.FluxAggregatorOwnershipTransferredIterator, error)) *FluxAggregator_FilterOwnershipTransferred_Call { + _c.Call.Return(run) + return _c +} + // FilterRequesterPermissionsSet provides a mock function with given fields: opts, requester func (_m *FluxAggregator) FilterRequesterPermissionsSet(opts *bind.FilterOpts, requester []common.Address) (*flux_aggregator_wrapper.FluxAggregatorRequesterPermissionsSetIterator, error) { ret := _m.Called(opts, requester) @@ -520,6 +996,35 @@ func (_m *FluxAggregator) FilterRequesterPermissionsSet(opts *bind.FilterOpts, r return r0, r1 } +// FluxAggregator_FilterRequesterPermissionsSet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterRequesterPermissionsSet' +type FluxAggregator_FilterRequesterPermissionsSet_Call struct { + *mock.Call +} + +// FilterRequesterPermissionsSet is a helper method to define mock.On call +// - opts *bind.FilterOpts +// - requester []common.Address +func (_e *FluxAggregator_Expecter) FilterRequesterPermissionsSet(opts interface{}, requester interface{}) *FluxAggregator_FilterRequesterPermissionsSet_Call { + return &FluxAggregator_FilterRequesterPermissionsSet_Call{Call: _e.mock.On("FilterRequesterPermissionsSet", opts, requester)} +} + +func (_c *FluxAggregator_FilterRequesterPermissionsSet_Call) Run(run func(opts *bind.FilterOpts, requester []common.Address)) *FluxAggregator_FilterRequesterPermissionsSet_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts), args[1].([]common.Address)) + }) + return _c +} + +func (_c *FluxAggregator_FilterRequesterPermissionsSet_Call) Return(_a0 *flux_aggregator_wrapper.FluxAggregatorRequesterPermissionsSetIterator, _a1 error) *FluxAggregator_FilterRequesterPermissionsSet_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_FilterRequesterPermissionsSet_Call) RunAndReturn(run func(*bind.FilterOpts, []common.Address) (*flux_aggregator_wrapper.FluxAggregatorRequesterPermissionsSetIterator, error)) *FluxAggregator_FilterRequesterPermissionsSet_Call { + _c.Call.Return(run) + return _c +} + // FilterRoundDetailsUpdated provides a mock function with given fields: opts, paymentAmount, minSubmissionCount, maxSubmissionCount func (_m *FluxAggregator) FilterRoundDetailsUpdated(opts *bind.FilterOpts, paymentAmount []*big.Int, minSubmissionCount []uint32, maxSubmissionCount []uint32) (*flux_aggregator_wrapper.FluxAggregatorRoundDetailsUpdatedIterator, error) { ret := _m.Called(opts, paymentAmount, minSubmissionCount, maxSubmissionCount) @@ -550,6 +1055,37 @@ func (_m *FluxAggregator) FilterRoundDetailsUpdated(opts *bind.FilterOpts, payme return r0, r1 } +// FluxAggregator_FilterRoundDetailsUpdated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterRoundDetailsUpdated' +type FluxAggregator_FilterRoundDetailsUpdated_Call struct { + *mock.Call +} + +// FilterRoundDetailsUpdated is a helper method to define mock.On call +// - opts *bind.FilterOpts +// - paymentAmount []*big.Int +// - minSubmissionCount []uint32 +// - maxSubmissionCount []uint32 +func (_e *FluxAggregator_Expecter) FilterRoundDetailsUpdated(opts interface{}, paymentAmount interface{}, minSubmissionCount interface{}, maxSubmissionCount interface{}) *FluxAggregator_FilterRoundDetailsUpdated_Call { + return &FluxAggregator_FilterRoundDetailsUpdated_Call{Call: _e.mock.On("FilterRoundDetailsUpdated", opts, paymentAmount, minSubmissionCount, maxSubmissionCount)} +} + +func (_c *FluxAggregator_FilterRoundDetailsUpdated_Call) Run(run func(opts *bind.FilterOpts, paymentAmount []*big.Int, minSubmissionCount []uint32, maxSubmissionCount []uint32)) *FluxAggregator_FilterRoundDetailsUpdated_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts), args[1].([]*big.Int), args[2].([]uint32), args[3].([]uint32)) + }) + return _c +} + +func (_c *FluxAggregator_FilterRoundDetailsUpdated_Call) Return(_a0 *flux_aggregator_wrapper.FluxAggregatorRoundDetailsUpdatedIterator, _a1 error) *FluxAggregator_FilterRoundDetailsUpdated_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_FilterRoundDetailsUpdated_Call) RunAndReturn(run func(*bind.FilterOpts, []*big.Int, []uint32, []uint32) (*flux_aggregator_wrapper.FluxAggregatorRoundDetailsUpdatedIterator, error)) *FluxAggregator_FilterRoundDetailsUpdated_Call { + _c.Call.Return(run) + return _c +} + // FilterSubmissionReceived provides a mock function with given fields: opts, submission, round, oracle func (_m *FluxAggregator) FilterSubmissionReceived(opts *bind.FilterOpts, submission []*big.Int, round []uint32, oracle []common.Address) (*flux_aggregator_wrapper.FluxAggregatorSubmissionReceivedIterator, error) { ret := _m.Called(opts, submission, round, oracle) @@ -580,6 +1116,37 @@ func (_m *FluxAggregator) FilterSubmissionReceived(opts *bind.FilterOpts, submis return r0, r1 } +// FluxAggregator_FilterSubmissionReceived_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterSubmissionReceived' +type FluxAggregator_FilterSubmissionReceived_Call struct { + *mock.Call +} + +// FilterSubmissionReceived is a helper method to define mock.On call +// - opts *bind.FilterOpts +// - submission []*big.Int +// - round []uint32 +// - oracle []common.Address +func (_e *FluxAggregator_Expecter) FilterSubmissionReceived(opts interface{}, submission interface{}, round interface{}, oracle interface{}) *FluxAggregator_FilterSubmissionReceived_Call { + return &FluxAggregator_FilterSubmissionReceived_Call{Call: _e.mock.On("FilterSubmissionReceived", opts, submission, round, oracle)} +} + +func (_c *FluxAggregator_FilterSubmissionReceived_Call) Run(run func(opts *bind.FilterOpts, submission []*big.Int, round []uint32, oracle []common.Address)) *FluxAggregator_FilterSubmissionReceived_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts), args[1].([]*big.Int), args[2].([]uint32), args[3].([]common.Address)) + }) + return _c +} + +func (_c *FluxAggregator_FilterSubmissionReceived_Call) Return(_a0 *flux_aggregator_wrapper.FluxAggregatorSubmissionReceivedIterator, _a1 error) *FluxAggregator_FilterSubmissionReceived_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_FilterSubmissionReceived_Call) RunAndReturn(run func(*bind.FilterOpts, []*big.Int, []uint32, []common.Address) (*flux_aggregator_wrapper.FluxAggregatorSubmissionReceivedIterator, error)) *FluxAggregator_FilterSubmissionReceived_Call { + _c.Call.Return(run) + return _c +} + // FilterValidatorUpdated provides a mock function with given fields: opts, previous, current func (_m *FluxAggregator) FilterValidatorUpdated(opts *bind.FilterOpts, previous []common.Address, current []common.Address) (*flux_aggregator_wrapper.FluxAggregatorValidatorUpdatedIterator, error) { ret := _m.Called(opts, previous, current) @@ -610,6 +1177,36 @@ func (_m *FluxAggregator) FilterValidatorUpdated(opts *bind.FilterOpts, previous return r0, r1 } +// FluxAggregator_FilterValidatorUpdated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterValidatorUpdated' +type FluxAggregator_FilterValidatorUpdated_Call struct { + *mock.Call +} + +// FilterValidatorUpdated is a helper method to define mock.On call +// - opts *bind.FilterOpts +// - previous []common.Address +// - current []common.Address +func (_e *FluxAggregator_Expecter) FilterValidatorUpdated(opts interface{}, previous interface{}, current interface{}) *FluxAggregator_FilterValidatorUpdated_Call { + return &FluxAggregator_FilterValidatorUpdated_Call{Call: _e.mock.On("FilterValidatorUpdated", opts, previous, current)} +} + +func (_c *FluxAggregator_FilterValidatorUpdated_Call) Run(run func(opts *bind.FilterOpts, previous []common.Address, current []common.Address)) *FluxAggregator_FilterValidatorUpdated_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts), args[1].([]common.Address), args[2].([]common.Address)) + }) + return _c +} + +func (_c *FluxAggregator_FilterValidatorUpdated_Call) Return(_a0 *flux_aggregator_wrapper.FluxAggregatorValidatorUpdatedIterator, _a1 error) *FluxAggregator_FilterValidatorUpdated_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_FilterValidatorUpdated_Call) RunAndReturn(run func(*bind.FilterOpts, []common.Address, []common.Address) (*flux_aggregator_wrapper.FluxAggregatorValidatorUpdatedIterator, error)) *FluxAggregator_FilterValidatorUpdated_Call { + _c.Call.Return(run) + return _c +} + // GetAdmin provides a mock function with given fields: opts, _oracle func (_m *FluxAggregator) GetAdmin(opts *bind.CallOpts, _oracle common.Address) (common.Address, error) { ret := _m.Called(opts, _oracle) @@ -640,6 +1237,35 @@ func (_m *FluxAggregator) GetAdmin(opts *bind.CallOpts, _oracle common.Address) return r0, r1 } +// FluxAggregator_GetAdmin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAdmin' +type FluxAggregator_GetAdmin_Call struct { + *mock.Call +} + +// GetAdmin is a helper method to define mock.On call +// - opts *bind.CallOpts +// - _oracle common.Address +func (_e *FluxAggregator_Expecter) GetAdmin(opts interface{}, _oracle interface{}) *FluxAggregator_GetAdmin_Call { + return &FluxAggregator_GetAdmin_Call{Call: _e.mock.On("GetAdmin", opts, _oracle)} +} + +func (_c *FluxAggregator_GetAdmin_Call) Run(run func(opts *bind.CallOpts, _oracle common.Address)) *FluxAggregator_GetAdmin_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts), args[1].(common.Address)) + }) + return _c +} + +func (_c *FluxAggregator_GetAdmin_Call) Return(_a0 common.Address, _a1 error) *FluxAggregator_GetAdmin_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_GetAdmin_Call) RunAndReturn(run func(*bind.CallOpts, common.Address) (common.Address, error)) *FluxAggregator_GetAdmin_Call { + _c.Call.Return(run) + return _c +} + // GetAnswer provides a mock function with given fields: opts, _roundId func (_m *FluxAggregator) GetAnswer(opts *bind.CallOpts, _roundId *big.Int) (*big.Int, error) { ret := _m.Called(opts, _roundId) @@ -670,6 +1296,35 @@ func (_m *FluxAggregator) GetAnswer(opts *bind.CallOpts, _roundId *big.Int) (*bi return r0, r1 } +// FluxAggregator_GetAnswer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAnswer' +type FluxAggregator_GetAnswer_Call struct { + *mock.Call +} + +// GetAnswer is a helper method to define mock.On call +// - opts *bind.CallOpts +// - _roundId *big.Int +func (_e *FluxAggregator_Expecter) GetAnswer(opts interface{}, _roundId interface{}) *FluxAggregator_GetAnswer_Call { + return &FluxAggregator_GetAnswer_Call{Call: _e.mock.On("GetAnswer", opts, _roundId)} +} + +func (_c *FluxAggregator_GetAnswer_Call) Run(run func(opts *bind.CallOpts, _roundId *big.Int)) *FluxAggregator_GetAnswer_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts), args[1].(*big.Int)) + }) + return _c +} + +func (_c *FluxAggregator_GetAnswer_Call) Return(_a0 *big.Int, _a1 error) *FluxAggregator_GetAnswer_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_GetAnswer_Call) RunAndReturn(run func(*bind.CallOpts, *big.Int) (*big.Int, error)) *FluxAggregator_GetAnswer_Call { + _c.Call.Return(run) + return _c +} + // GetOracles provides a mock function with given fields: opts func (_m *FluxAggregator) GetOracles(opts *bind.CallOpts) ([]common.Address, error) { ret := _m.Called(opts) @@ -700,6 +1355,34 @@ func (_m *FluxAggregator) GetOracles(opts *bind.CallOpts) ([]common.Address, err return r0, r1 } +// FluxAggregator_GetOracles_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOracles' +type FluxAggregator_GetOracles_Call struct { + *mock.Call +} + +// GetOracles is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *FluxAggregator_Expecter) GetOracles(opts interface{}) *FluxAggregator_GetOracles_Call { + return &FluxAggregator_GetOracles_Call{Call: _e.mock.On("GetOracles", opts)} +} + +func (_c *FluxAggregator_GetOracles_Call) Run(run func(opts *bind.CallOpts)) *FluxAggregator_GetOracles_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *FluxAggregator_GetOracles_Call) Return(_a0 []common.Address, _a1 error) *FluxAggregator_GetOracles_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_GetOracles_Call) RunAndReturn(run func(*bind.CallOpts) ([]common.Address, error)) *FluxAggregator_GetOracles_Call { + _c.Call.Return(run) + return _c +} + // GetRoundData provides a mock function with given fields: opts, _roundId func (_m *FluxAggregator) GetRoundData(opts *bind.CallOpts, _roundId *big.Int) (flux_aggregator_wrapper.GetRoundData, error) { ret := _m.Called(opts, _roundId) @@ -728,6 +1411,35 @@ func (_m *FluxAggregator) GetRoundData(opts *bind.CallOpts, _roundId *big.Int) ( return r0, r1 } +// FluxAggregator_GetRoundData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRoundData' +type FluxAggregator_GetRoundData_Call struct { + *mock.Call +} + +// GetRoundData is a helper method to define mock.On call +// - opts *bind.CallOpts +// - _roundId *big.Int +func (_e *FluxAggregator_Expecter) GetRoundData(opts interface{}, _roundId interface{}) *FluxAggregator_GetRoundData_Call { + return &FluxAggregator_GetRoundData_Call{Call: _e.mock.On("GetRoundData", opts, _roundId)} +} + +func (_c *FluxAggregator_GetRoundData_Call) Run(run func(opts *bind.CallOpts, _roundId *big.Int)) *FluxAggregator_GetRoundData_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts), args[1].(*big.Int)) + }) + return _c +} + +func (_c *FluxAggregator_GetRoundData_Call) Return(_a0 flux_aggregator_wrapper.GetRoundData, _a1 error) *FluxAggregator_GetRoundData_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_GetRoundData_Call) RunAndReturn(run func(*bind.CallOpts, *big.Int) (flux_aggregator_wrapper.GetRoundData, error)) *FluxAggregator_GetRoundData_Call { + _c.Call.Return(run) + return _c +} + // GetTimestamp provides a mock function with given fields: opts, _roundId func (_m *FluxAggregator) GetTimestamp(opts *bind.CallOpts, _roundId *big.Int) (*big.Int, error) { ret := _m.Called(opts, _roundId) @@ -758,6 +1470,35 @@ func (_m *FluxAggregator) GetTimestamp(opts *bind.CallOpts, _roundId *big.Int) ( return r0, r1 } +// FluxAggregator_GetTimestamp_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTimestamp' +type FluxAggregator_GetTimestamp_Call struct { + *mock.Call +} + +// GetTimestamp is a helper method to define mock.On call +// - opts *bind.CallOpts +// - _roundId *big.Int +func (_e *FluxAggregator_Expecter) GetTimestamp(opts interface{}, _roundId interface{}) *FluxAggregator_GetTimestamp_Call { + return &FluxAggregator_GetTimestamp_Call{Call: _e.mock.On("GetTimestamp", opts, _roundId)} +} + +func (_c *FluxAggregator_GetTimestamp_Call) Run(run func(opts *bind.CallOpts, _roundId *big.Int)) *FluxAggregator_GetTimestamp_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts), args[1].(*big.Int)) + }) + return _c +} + +func (_c *FluxAggregator_GetTimestamp_Call) Return(_a0 *big.Int, _a1 error) *FluxAggregator_GetTimestamp_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_GetTimestamp_Call) RunAndReturn(run func(*bind.CallOpts, *big.Int) (*big.Int, error)) *FluxAggregator_GetTimestamp_Call { + _c.Call.Return(run) + return _c +} + // LatestAnswer provides a mock function with given fields: opts func (_m *FluxAggregator) LatestAnswer(opts *bind.CallOpts) (*big.Int, error) { ret := _m.Called(opts) @@ -788,8 +1529,36 @@ func (_m *FluxAggregator) LatestAnswer(opts *bind.CallOpts) (*big.Int, error) { return r0, r1 } -// LatestRound provides a mock function with given fields: opts -func (_m *FluxAggregator) LatestRound(opts *bind.CallOpts) (*big.Int, error) { +// FluxAggregator_LatestAnswer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LatestAnswer' +type FluxAggregator_LatestAnswer_Call struct { + *mock.Call +} + +// LatestAnswer is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *FluxAggregator_Expecter) LatestAnswer(opts interface{}) *FluxAggregator_LatestAnswer_Call { + return &FluxAggregator_LatestAnswer_Call{Call: _e.mock.On("LatestAnswer", opts)} +} + +func (_c *FluxAggregator_LatestAnswer_Call) Run(run func(opts *bind.CallOpts)) *FluxAggregator_LatestAnswer_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *FluxAggregator_LatestAnswer_Call) Return(_a0 *big.Int, _a1 error) *FluxAggregator_LatestAnswer_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_LatestAnswer_Call) RunAndReturn(run func(*bind.CallOpts) (*big.Int, error)) *FluxAggregator_LatestAnswer_Call { + _c.Call.Return(run) + return _c +} + +// LatestRound provides a mock function with given fields: opts +func (_m *FluxAggregator) LatestRound(opts *bind.CallOpts) (*big.Int, error) { ret := _m.Called(opts) if len(ret) == 0 { @@ -818,6 +1587,34 @@ func (_m *FluxAggregator) LatestRound(opts *bind.CallOpts) (*big.Int, error) { return r0, r1 } +// FluxAggregator_LatestRound_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LatestRound' +type FluxAggregator_LatestRound_Call struct { + *mock.Call +} + +// LatestRound is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *FluxAggregator_Expecter) LatestRound(opts interface{}) *FluxAggregator_LatestRound_Call { + return &FluxAggregator_LatestRound_Call{Call: _e.mock.On("LatestRound", opts)} +} + +func (_c *FluxAggregator_LatestRound_Call) Run(run func(opts *bind.CallOpts)) *FluxAggregator_LatestRound_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *FluxAggregator_LatestRound_Call) Return(_a0 *big.Int, _a1 error) *FluxAggregator_LatestRound_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_LatestRound_Call) RunAndReturn(run func(*bind.CallOpts) (*big.Int, error)) *FluxAggregator_LatestRound_Call { + _c.Call.Return(run) + return _c +} + // LatestRoundData provides a mock function with given fields: opts func (_m *FluxAggregator) LatestRoundData(opts *bind.CallOpts) (flux_aggregator_wrapper.LatestRoundData, error) { ret := _m.Called(opts) @@ -846,6 +1643,34 @@ func (_m *FluxAggregator) LatestRoundData(opts *bind.CallOpts) (flux_aggregator_ return r0, r1 } +// FluxAggregator_LatestRoundData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LatestRoundData' +type FluxAggregator_LatestRoundData_Call struct { + *mock.Call +} + +// LatestRoundData is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *FluxAggregator_Expecter) LatestRoundData(opts interface{}) *FluxAggregator_LatestRoundData_Call { + return &FluxAggregator_LatestRoundData_Call{Call: _e.mock.On("LatestRoundData", opts)} +} + +func (_c *FluxAggregator_LatestRoundData_Call) Run(run func(opts *bind.CallOpts)) *FluxAggregator_LatestRoundData_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *FluxAggregator_LatestRoundData_Call) Return(_a0 flux_aggregator_wrapper.LatestRoundData, _a1 error) *FluxAggregator_LatestRoundData_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_LatestRoundData_Call) RunAndReturn(run func(*bind.CallOpts) (flux_aggregator_wrapper.LatestRoundData, error)) *FluxAggregator_LatestRoundData_Call { + _c.Call.Return(run) + return _c +} + // LatestTimestamp provides a mock function with given fields: opts func (_m *FluxAggregator) LatestTimestamp(opts *bind.CallOpts) (*big.Int, error) { ret := _m.Called(opts) @@ -876,6 +1701,34 @@ func (_m *FluxAggregator) LatestTimestamp(opts *bind.CallOpts) (*big.Int, error) return r0, r1 } +// FluxAggregator_LatestTimestamp_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LatestTimestamp' +type FluxAggregator_LatestTimestamp_Call struct { + *mock.Call +} + +// LatestTimestamp is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *FluxAggregator_Expecter) LatestTimestamp(opts interface{}) *FluxAggregator_LatestTimestamp_Call { + return &FluxAggregator_LatestTimestamp_Call{Call: _e.mock.On("LatestTimestamp", opts)} +} + +func (_c *FluxAggregator_LatestTimestamp_Call) Run(run func(opts *bind.CallOpts)) *FluxAggregator_LatestTimestamp_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *FluxAggregator_LatestTimestamp_Call) Return(_a0 *big.Int, _a1 error) *FluxAggregator_LatestTimestamp_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_LatestTimestamp_Call) RunAndReturn(run func(*bind.CallOpts) (*big.Int, error)) *FluxAggregator_LatestTimestamp_Call { + _c.Call.Return(run) + return _c +} + // LinkToken provides a mock function with given fields: opts func (_m *FluxAggregator) LinkToken(opts *bind.CallOpts) (common.Address, error) { ret := _m.Called(opts) @@ -906,6 +1759,34 @@ func (_m *FluxAggregator) LinkToken(opts *bind.CallOpts) (common.Address, error) return r0, r1 } +// FluxAggregator_LinkToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LinkToken' +type FluxAggregator_LinkToken_Call struct { + *mock.Call +} + +// LinkToken is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *FluxAggregator_Expecter) LinkToken(opts interface{}) *FluxAggregator_LinkToken_Call { + return &FluxAggregator_LinkToken_Call{Call: _e.mock.On("LinkToken", opts)} +} + +func (_c *FluxAggregator_LinkToken_Call) Run(run func(opts *bind.CallOpts)) *FluxAggregator_LinkToken_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *FluxAggregator_LinkToken_Call) Return(_a0 common.Address, _a1 error) *FluxAggregator_LinkToken_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_LinkToken_Call) RunAndReturn(run func(*bind.CallOpts) (common.Address, error)) *FluxAggregator_LinkToken_Call { + _c.Call.Return(run) + return _c +} + // MaxSubmissionCount provides a mock function with given fields: opts func (_m *FluxAggregator) MaxSubmissionCount(opts *bind.CallOpts) (uint32, error) { ret := _m.Called(opts) @@ -934,6 +1815,34 @@ func (_m *FluxAggregator) MaxSubmissionCount(opts *bind.CallOpts) (uint32, error return r0, r1 } +// FluxAggregator_MaxSubmissionCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MaxSubmissionCount' +type FluxAggregator_MaxSubmissionCount_Call struct { + *mock.Call +} + +// MaxSubmissionCount is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *FluxAggregator_Expecter) MaxSubmissionCount(opts interface{}) *FluxAggregator_MaxSubmissionCount_Call { + return &FluxAggregator_MaxSubmissionCount_Call{Call: _e.mock.On("MaxSubmissionCount", opts)} +} + +func (_c *FluxAggregator_MaxSubmissionCount_Call) Run(run func(opts *bind.CallOpts)) *FluxAggregator_MaxSubmissionCount_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *FluxAggregator_MaxSubmissionCount_Call) Return(_a0 uint32, _a1 error) *FluxAggregator_MaxSubmissionCount_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_MaxSubmissionCount_Call) RunAndReturn(run func(*bind.CallOpts) (uint32, error)) *FluxAggregator_MaxSubmissionCount_Call { + _c.Call.Return(run) + return _c +} + // MaxSubmissionValue provides a mock function with given fields: opts func (_m *FluxAggregator) MaxSubmissionValue(opts *bind.CallOpts) (*big.Int, error) { ret := _m.Called(opts) @@ -964,6 +1873,34 @@ func (_m *FluxAggregator) MaxSubmissionValue(opts *bind.CallOpts) (*big.Int, err return r0, r1 } +// FluxAggregator_MaxSubmissionValue_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MaxSubmissionValue' +type FluxAggregator_MaxSubmissionValue_Call struct { + *mock.Call +} + +// MaxSubmissionValue is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *FluxAggregator_Expecter) MaxSubmissionValue(opts interface{}) *FluxAggregator_MaxSubmissionValue_Call { + return &FluxAggregator_MaxSubmissionValue_Call{Call: _e.mock.On("MaxSubmissionValue", opts)} +} + +func (_c *FluxAggregator_MaxSubmissionValue_Call) Run(run func(opts *bind.CallOpts)) *FluxAggregator_MaxSubmissionValue_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *FluxAggregator_MaxSubmissionValue_Call) Return(_a0 *big.Int, _a1 error) *FluxAggregator_MaxSubmissionValue_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_MaxSubmissionValue_Call) RunAndReturn(run func(*bind.CallOpts) (*big.Int, error)) *FluxAggregator_MaxSubmissionValue_Call { + _c.Call.Return(run) + return _c +} + // MinSubmissionCount provides a mock function with given fields: opts func (_m *FluxAggregator) MinSubmissionCount(opts *bind.CallOpts) (uint32, error) { ret := _m.Called(opts) @@ -992,6 +1929,34 @@ func (_m *FluxAggregator) MinSubmissionCount(opts *bind.CallOpts) (uint32, error return r0, r1 } +// FluxAggregator_MinSubmissionCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MinSubmissionCount' +type FluxAggregator_MinSubmissionCount_Call struct { + *mock.Call +} + +// MinSubmissionCount is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *FluxAggregator_Expecter) MinSubmissionCount(opts interface{}) *FluxAggregator_MinSubmissionCount_Call { + return &FluxAggregator_MinSubmissionCount_Call{Call: _e.mock.On("MinSubmissionCount", opts)} +} + +func (_c *FluxAggregator_MinSubmissionCount_Call) Run(run func(opts *bind.CallOpts)) *FluxAggregator_MinSubmissionCount_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *FluxAggregator_MinSubmissionCount_Call) Return(_a0 uint32, _a1 error) *FluxAggregator_MinSubmissionCount_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_MinSubmissionCount_Call) RunAndReturn(run func(*bind.CallOpts) (uint32, error)) *FluxAggregator_MinSubmissionCount_Call { + _c.Call.Return(run) + return _c +} + // MinSubmissionValue provides a mock function with given fields: opts func (_m *FluxAggregator) MinSubmissionValue(opts *bind.CallOpts) (*big.Int, error) { ret := _m.Called(opts) @@ -1022,6 +1987,34 @@ func (_m *FluxAggregator) MinSubmissionValue(opts *bind.CallOpts) (*big.Int, err return r0, r1 } +// FluxAggregator_MinSubmissionValue_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MinSubmissionValue' +type FluxAggregator_MinSubmissionValue_Call struct { + *mock.Call +} + +// MinSubmissionValue is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *FluxAggregator_Expecter) MinSubmissionValue(opts interface{}) *FluxAggregator_MinSubmissionValue_Call { + return &FluxAggregator_MinSubmissionValue_Call{Call: _e.mock.On("MinSubmissionValue", opts)} +} + +func (_c *FluxAggregator_MinSubmissionValue_Call) Run(run func(opts *bind.CallOpts)) *FluxAggregator_MinSubmissionValue_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *FluxAggregator_MinSubmissionValue_Call) Return(_a0 *big.Int, _a1 error) *FluxAggregator_MinSubmissionValue_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_MinSubmissionValue_Call) RunAndReturn(run func(*bind.CallOpts) (*big.Int, error)) *FluxAggregator_MinSubmissionValue_Call { + _c.Call.Return(run) + return _c +} + // OnTokenTransfer provides a mock function with given fields: opts, arg0, arg1, _data func (_m *FluxAggregator) OnTokenTransfer(opts *bind.TransactOpts, arg0 common.Address, arg1 *big.Int, _data []byte) (*types.Transaction, error) { ret := _m.Called(opts, arg0, arg1, _data) @@ -1052,6 +2045,37 @@ func (_m *FluxAggregator) OnTokenTransfer(opts *bind.TransactOpts, arg0 common.A return r0, r1 } +// FluxAggregator_OnTokenTransfer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnTokenTransfer' +type FluxAggregator_OnTokenTransfer_Call struct { + *mock.Call +} + +// OnTokenTransfer is a helper method to define mock.On call +// - opts *bind.TransactOpts +// - arg0 common.Address +// - arg1 *big.Int +// - _data []byte +func (_e *FluxAggregator_Expecter) OnTokenTransfer(opts interface{}, arg0 interface{}, arg1 interface{}, _data interface{}) *FluxAggregator_OnTokenTransfer_Call { + return &FluxAggregator_OnTokenTransfer_Call{Call: _e.mock.On("OnTokenTransfer", opts, arg0, arg1, _data)} +} + +func (_c *FluxAggregator_OnTokenTransfer_Call) Run(run func(opts *bind.TransactOpts, arg0 common.Address, arg1 *big.Int, _data []byte)) *FluxAggregator_OnTokenTransfer_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts), args[1].(common.Address), args[2].(*big.Int), args[3].([]byte)) + }) + return _c +} + +func (_c *FluxAggregator_OnTokenTransfer_Call) Return(_a0 *types.Transaction, _a1 error) *FluxAggregator_OnTokenTransfer_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_OnTokenTransfer_Call) RunAndReturn(run func(*bind.TransactOpts, common.Address, *big.Int, []byte) (*types.Transaction, error)) *FluxAggregator_OnTokenTransfer_Call { + _c.Call.Return(run) + return _c +} + // OracleCount provides a mock function with given fields: opts func (_m *FluxAggregator) OracleCount(opts *bind.CallOpts) (uint8, error) { ret := _m.Called(opts) @@ -1080,6 +2104,34 @@ func (_m *FluxAggregator) OracleCount(opts *bind.CallOpts) (uint8, error) { return r0, r1 } +// FluxAggregator_OracleCount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OracleCount' +type FluxAggregator_OracleCount_Call struct { + *mock.Call +} + +// OracleCount is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *FluxAggregator_Expecter) OracleCount(opts interface{}) *FluxAggregator_OracleCount_Call { + return &FluxAggregator_OracleCount_Call{Call: _e.mock.On("OracleCount", opts)} +} + +func (_c *FluxAggregator_OracleCount_Call) Run(run func(opts *bind.CallOpts)) *FluxAggregator_OracleCount_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *FluxAggregator_OracleCount_Call) Return(_a0 uint8, _a1 error) *FluxAggregator_OracleCount_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_OracleCount_Call) RunAndReturn(run func(*bind.CallOpts) (uint8, error)) *FluxAggregator_OracleCount_Call { + _c.Call.Return(run) + return _c +} + // OracleRoundState provides a mock function with given fields: opts, _oracle, _queriedRoundId func (_m *FluxAggregator) OracleRoundState(opts *bind.CallOpts, _oracle common.Address, _queriedRoundId uint32) (flux_aggregator_wrapper.OracleRoundState, error) { ret := _m.Called(opts, _oracle, _queriedRoundId) @@ -1108,6 +2160,36 @@ func (_m *FluxAggregator) OracleRoundState(opts *bind.CallOpts, _oracle common.A return r0, r1 } +// FluxAggregator_OracleRoundState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OracleRoundState' +type FluxAggregator_OracleRoundState_Call struct { + *mock.Call +} + +// OracleRoundState is a helper method to define mock.On call +// - opts *bind.CallOpts +// - _oracle common.Address +// - _queriedRoundId uint32 +func (_e *FluxAggregator_Expecter) OracleRoundState(opts interface{}, _oracle interface{}, _queriedRoundId interface{}) *FluxAggregator_OracleRoundState_Call { + return &FluxAggregator_OracleRoundState_Call{Call: _e.mock.On("OracleRoundState", opts, _oracle, _queriedRoundId)} +} + +func (_c *FluxAggregator_OracleRoundState_Call) Run(run func(opts *bind.CallOpts, _oracle common.Address, _queriedRoundId uint32)) *FluxAggregator_OracleRoundState_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts), args[1].(common.Address), args[2].(uint32)) + }) + return _c +} + +func (_c *FluxAggregator_OracleRoundState_Call) Return(_a0 flux_aggregator_wrapper.OracleRoundState, _a1 error) *FluxAggregator_OracleRoundState_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_OracleRoundState_Call) RunAndReturn(run func(*bind.CallOpts, common.Address, uint32) (flux_aggregator_wrapper.OracleRoundState, error)) *FluxAggregator_OracleRoundState_Call { + _c.Call.Return(run) + return _c +} + // Owner provides a mock function with given fields: opts func (_m *FluxAggregator) Owner(opts *bind.CallOpts) (common.Address, error) { ret := _m.Called(opts) @@ -1138,6 +2220,34 @@ func (_m *FluxAggregator) Owner(opts *bind.CallOpts) (common.Address, error) { return r0, r1 } +// FluxAggregator_Owner_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Owner' +type FluxAggregator_Owner_Call struct { + *mock.Call +} + +// Owner is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *FluxAggregator_Expecter) Owner(opts interface{}) *FluxAggregator_Owner_Call { + return &FluxAggregator_Owner_Call{Call: _e.mock.On("Owner", opts)} +} + +func (_c *FluxAggregator_Owner_Call) Run(run func(opts *bind.CallOpts)) *FluxAggregator_Owner_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *FluxAggregator_Owner_Call) Return(_a0 common.Address, _a1 error) *FluxAggregator_Owner_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_Owner_Call) RunAndReturn(run func(*bind.CallOpts) (common.Address, error)) *FluxAggregator_Owner_Call { + _c.Call.Return(run) + return _c +} + // ParseAnswerUpdated provides a mock function with given fields: log func (_m *FluxAggregator) ParseAnswerUpdated(log types.Log) (*flux_aggregator_wrapper.FluxAggregatorAnswerUpdated, error) { ret := _m.Called(log) @@ -1168,6 +2278,34 @@ func (_m *FluxAggregator) ParseAnswerUpdated(log types.Log) (*flux_aggregator_wr return r0, r1 } +// FluxAggregator_ParseAnswerUpdated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseAnswerUpdated' +type FluxAggregator_ParseAnswerUpdated_Call struct { + *mock.Call +} + +// ParseAnswerUpdated is a helper method to define mock.On call +// - log types.Log +func (_e *FluxAggregator_Expecter) ParseAnswerUpdated(log interface{}) *FluxAggregator_ParseAnswerUpdated_Call { + return &FluxAggregator_ParseAnswerUpdated_Call{Call: _e.mock.On("ParseAnswerUpdated", log)} +} + +func (_c *FluxAggregator_ParseAnswerUpdated_Call) Run(run func(log types.Log)) *FluxAggregator_ParseAnswerUpdated_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *FluxAggregator_ParseAnswerUpdated_Call) Return(_a0 *flux_aggregator_wrapper.FluxAggregatorAnswerUpdated, _a1 error) *FluxAggregator_ParseAnswerUpdated_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_ParseAnswerUpdated_Call) RunAndReturn(run func(types.Log) (*flux_aggregator_wrapper.FluxAggregatorAnswerUpdated, error)) *FluxAggregator_ParseAnswerUpdated_Call { + _c.Call.Return(run) + return _c +} + // ParseAvailableFundsUpdated provides a mock function with given fields: log func (_m *FluxAggregator) ParseAvailableFundsUpdated(log types.Log) (*flux_aggregator_wrapper.FluxAggregatorAvailableFundsUpdated, error) { ret := _m.Called(log) @@ -1198,6 +2336,34 @@ func (_m *FluxAggregator) ParseAvailableFundsUpdated(log types.Log) (*flux_aggre return r0, r1 } +// FluxAggregator_ParseAvailableFundsUpdated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseAvailableFundsUpdated' +type FluxAggregator_ParseAvailableFundsUpdated_Call struct { + *mock.Call +} + +// ParseAvailableFundsUpdated is a helper method to define mock.On call +// - log types.Log +func (_e *FluxAggregator_Expecter) ParseAvailableFundsUpdated(log interface{}) *FluxAggregator_ParseAvailableFundsUpdated_Call { + return &FluxAggregator_ParseAvailableFundsUpdated_Call{Call: _e.mock.On("ParseAvailableFundsUpdated", log)} +} + +func (_c *FluxAggregator_ParseAvailableFundsUpdated_Call) Run(run func(log types.Log)) *FluxAggregator_ParseAvailableFundsUpdated_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *FluxAggregator_ParseAvailableFundsUpdated_Call) Return(_a0 *flux_aggregator_wrapper.FluxAggregatorAvailableFundsUpdated, _a1 error) *FluxAggregator_ParseAvailableFundsUpdated_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_ParseAvailableFundsUpdated_Call) RunAndReturn(run func(types.Log) (*flux_aggregator_wrapper.FluxAggregatorAvailableFundsUpdated, error)) *FluxAggregator_ParseAvailableFundsUpdated_Call { + _c.Call.Return(run) + return _c +} + // ParseLog provides a mock function with given fields: log func (_m *FluxAggregator) ParseLog(log types.Log) (generated.AbigenLog, error) { ret := _m.Called(log) @@ -1228,6 +2394,34 @@ func (_m *FluxAggregator) ParseLog(log types.Log) (generated.AbigenLog, error) { return r0, r1 } +// FluxAggregator_ParseLog_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseLog' +type FluxAggregator_ParseLog_Call struct { + *mock.Call +} + +// ParseLog is a helper method to define mock.On call +// - log types.Log +func (_e *FluxAggregator_Expecter) ParseLog(log interface{}) *FluxAggregator_ParseLog_Call { + return &FluxAggregator_ParseLog_Call{Call: _e.mock.On("ParseLog", log)} +} + +func (_c *FluxAggregator_ParseLog_Call) Run(run func(log types.Log)) *FluxAggregator_ParseLog_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *FluxAggregator_ParseLog_Call) Return(_a0 generated.AbigenLog, _a1 error) *FluxAggregator_ParseLog_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_ParseLog_Call) RunAndReturn(run func(types.Log) (generated.AbigenLog, error)) *FluxAggregator_ParseLog_Call { + _c.Call.Return(run) + return _c +} + // ParseNewRound provides a mock function with given fields: log func (_m *FluxAggregator) ParseNewRound(log types.Log) (*flux_aggregator_wrapper.FluxAggregatorNewRound, error) { ret := _m.Called(log) @@ -1258,6 +2452,34 @@ func (_m *FluxAggregator) ParseNewRound(log types.Log) (*flux_aggregator_wrapper return r0, r1 } +// FluxAggregator_ParseNewRound_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseNewRound' +type FluxAggregator_ParseNewRound_Call struct { + *mock.Call +} + +// ParseNewRound is a helper method to define mock.On call +// - log types.Log +func (_e *FluxAggregator_Expecter) ParseNewRound(log interface{}) *FluxAggregator_ParseNewRound_Call { + return &FluxAggregator_ParseNewRound_Call{Call: _e.mock.On("ParseNewRound", log)} +} + +func (_c *FluxAggregator_ParseNewRound_Call) Run(run func(log types.Log)) *FluxAggregator_ParseNewRound_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *FluxAggregator_ParseNewRound_Call) Return(_a0 *flux_aggregator_wrapper.FluxAggregatorNewRound, _a1 error) *FluxAggregator_ParseNewRound_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_ParseNewRound_Call) RunAndReturn(run func(types.Log) (*flux_aggregator_wrapper.FluxAggregatorNewRound, error)) *FluxAggregator_ParseNewRound_Call { + _c.Call.Return(run) + return _c +} + // ParseOracleAdminUpdateRequested provides a mock function with given fields: log func (_m *FluxAggregator) ParseOracleAdminUpdateRequested(log types.Log) (*flux_aggregator_wrapper.FluxAggregatorOracleAdminUpdateRequested, error) { ret := _m.Called(log) @@ -1288,6 +2510,34 @@ func (_m *FluxAggregator) ParseOracleAdminUpdateRequested(log types.Log) (*flux_ return r0, r1 } +// FluxAggregator_ParseOracleAdminUpdateRequested_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseOracleAdminUpdateRequested' +type FluxAggregator_ParseOracleAdminUpdateRequested_Call struct { + *mock.Call +} + +// ParseOracleAdminUpdateRequested is a helper method to define mock.On call +// - log types.Log +func (_e *FluxAggregator_Expecter) ParseOracleAdminUpdateRequested(log interface{}) *FluxAggregator_ParseOracleAdminUpdateRequested_Call { + return &FluxAggregator_ParseOracleAdminUpdateRequested_Call{Call: _e.mock.On("ParseOracleAdminUpdateRequested", log)} +} + +func (_c *FluxAggregator_ParseOracleAdminUpdateRequested_Call) Run(run func(log types.Log)) *FluxAggregator_ParseOracleAdminUpdateRequested_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *FluxAggregator_ParseOracleAdminUpdateRequested_Call) Return(_a0 *flux_aggregator_wrapper.FluxAggregatorOracleAdminUpdateRequested, _a1 error) *FluxAggregator_ParseOracleAdminUpdateRequested_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_ParseOracleAdminUpdateRequested_Call) RunAndReturn(run func(types.Log) (*flux_aggregator_wrapper.FluxAggregatorOracleAdminUpdateRequested, error)) *FluxAggregator_ParseOracleAdminUpdateRequested_Call { + _c.Call.Return(run) + return _c +} + // ParseOracleAdminUpdated provides a mock function with given fields: log func (_m *FluxAggregator) ParseOracleAdminUpdated(log types.Log) (*flux_aggregator_wrapper.FluxAggregatorOracleAdminUpdated, error) { ret := _m.Called(log) @@ -1318,6 +2568,34 @@ func (_m *FluxAggregator) ParseOracleAdminUpdated(log types.Log) (*flux_aggregat return r0, r1 } +// FluxAggregator_ParseOracleAdminUpdated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseOracleAdminUpdated' +type FluxAggregator_ParseOracleAdminUpdated_Call struct { + *mock.Call +} + +// ParseOracleAdminUpdated is a helper method to define mock.On call +// - log types.Log +func (_e *FluxAggregator_Expecter) ParseOracleAdminUpdated(log interface{}) *FluxAggregator_ParseOracleAdminUpdated_Call { + return &FluxAggregator_ParseOracleAdminUpdated_Call{Call: _e.mock.On("ParseOracleAdminUpdated", log)} +} + +func (_c *FluxAggregator_ParseOracleAdminUpdated_Call) Run(run func(log types.Log)) *FluxAggregator_ParseOracleAdminUpdated_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *FluxAggregator_ParseOracleAdminUpdated_Call) Return(_a0 *flux_aggregator_wrapper.FluxAggregatorOracleAdminUpdated, _a1 error) *FluxAggregator_ParseOracleAdminUpdated_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_ParseOracleAdminUpdated_Call) RunAndReturn(run func(types.Log) (*flux_aggregator_wrapper.FluxAggregatorOracleAdminUpdated, error)) *FluxAggregator_ParseOracleAdminUpdated_Call { + _c.Call.Return(run) + return _c +} + // ParseOraclePermissionsUpdated provides a mock function with given fields: log func (_m *FluxAggregator) ParseOraclePermissionsUpdated(log types.Log) (*flux_aggregator_wrapper.FluxAggregatorOraclePermissionsUpdated, error) { ret := _m.Called(log) @@ -1348,6 +2626,34 @@ func (_m *FluxAggregator) ParseOraclePermissionsUpdated(log types.Log) (*flux_ag return r0, r1 } +// FluxAggregator_ParseOraclePermissionsUpdated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseOraclePermissionsUpdated' +type FluxAggregator_ParseOraclePermissionsUpdated_Call struct { + *mock.Call +} + +// ParseOraclePermissionsUpdated is a helper method to define mock.On call +// - log types.Log +func (_e *FluxAggregator_Expecter) ParseOraclePermissionsUpdated(log interface{}) *FluxAggregator_ParseOraclePermissionsUpdated_Call { + return &FluxAggregator_ParseOraclePermissionsUpdated_Call{Call: _e.mock.On("ParseOraclePermissionsUpdated", log)} +} + +func (_c *FluxAggregator_ParseOraclePermissionsUpdated_Call) Run(run func(log types.Log)) *FluxAggregator_ParseOraclePermissionsUpdated_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *FluxAggregator_ParseOraclePermissionsUpdated_Call) Return(_a0 *flux_aggregator_wrapper.FluxAggregatorOraclePermissionsUpdated, _a1 error) *FluxAggregator_ParseOraclePermissionsUpdated_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_ParseOraclePermissionsUpdated_Call) RunAndReturn(run func(types.Log) (*flux_aggregator_wrapper.FluxAggregatorOraclePermissionsUpdated, error)) *FluxAggregator_ParseOraclePermissionsUpdated_Call { + _c.Call.Return(run) + return _c +} + // ParseOwnershipTransferRequested provides a mock function with given fields: log func (_m *FluxAggregator) ParseOwnershipTransferRequested(log types.Log) (*flux_aggregator_wrapper.FluxAggregatorOwnershipTransferRequested, error) { ret := _m.Called(log) @@ -1378,6 +2684,34 @@ func (_m *FluxAggregator) ParseOwnershipTransferRequested(log types.Log) (*flux_ return r0, r1 } +// FluxAggregator_ParseOwnershipTransferRequested_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseOwnershipTransferRequested' +type FluxAggregator_ParseOwnershipTransferRequested_Call struct { + *mock.Call +} + +// ParseOwnershipTransferRequested is a helper method to define mock.On call +// - log types.Log +func (_e *FluxAggregator_Expecter) ParseOwnershipTransferRequested(log interface{}) *FluxAggregator_ParseOwnershipTransferRequested_Call { + return &FluxAggregator_ParseOwnershipTransferRequested_Call{Call: _e.mock.On("ParseOwnershipTransferRequested", log)} +} + +func (_c *FluxAggregator_ParseOwnershipTransferRequested_Call) Run(run func(log types.Log)) *FluxAggregator_ParseOwnershipTransferRequested_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *FluxAggregator_ParseOwnershipTransferRequested_Call) Return(_a0 *flux_aggregator_wrapper.FluxAggregatorOwnershipTransferRequested, _a1 error) *FluxAggregator_ParseOwnershipTransferRequested_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_ParseOwnershipTransferRequested_Call) RunAndReturn(run func(types.Log) (*flux_aggregator_wrapper.FluxAggregatorOwnershipTransferRequested, error)) *FluxAggregator_ParseOwnershipTransferRequested_Call { + _c.Call.Return(run) + return _c +} + // ParseOwnershipTransferred provides a mock function with given fields: log func (_m *FluxAggregator) ParseOwnershipTransferred(log types.Log) (*flux_aggregator_wrapper.FluxAggregatorOwnershipTransferred, error) { ret := _m.Called(log) @@ -1408,6 +2742,34 @@ func (_m *FluxAggregator) ParseOwnershipTransferred(log types.Log) (*flux_aggreg return r0, r1 } +// FluxAggregator_ParseOwnershipTransferred_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseOwnershipTransferred' +type FluxAggregator_ParseOwnershipTransferred_Call struct { + *mock.Call +} + +// ParseOwnershipTransferred is a helper method to define mock.On call +// - log types.Log +func (_e *FluxAggregator_Expecter) ParseOwnershipTransferred(log interface{}) *FluxAggregator_ParseOwnershipTransferred_Call { + return &FluxAggregator_ParseOwnershipTransferred_Call{Call: _e.mock.On("ParseOwnershipTransferred", log)} +} + +func (_c *FluxAggregator_ParseOwnershipTransferred_Call) Run(run func(log types.Log)) *FluxAggregator_ParseOwnershipTransferred_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *FluxAggregator_ParseOwnershipTransferred_Call) Return(_a0 *flux_aggregator_wrapper.FluxAggregatorOwnershipTransferred, _a1 error) *FluxAggregator_ParseOwnershipTransferred_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_ParseOwnershipTransferred_Call) RunAndReturn(run func(types.Log) (*flux_aggregator_wrapper.FluxAggregatorOwnershipTransferred, error)) *FluxAggregator_ParseOwnershipTransferred_Call { + _c.Call.Return(run) + return _c +} + // ParseRequesterPermissionsSet provides a mock function with given fields: log func (_m *FluxAggregator) ParseRequesterPermissionsSet(log types.Log) (*flux_aggregator_wrapper.FluxAggregatorRequesterPermissionsSet, error) { ret := _m.Called(log) @@ -1438,6 +2800,34 @@ func (_m *FluxAggregator) ParseRequesterPermissionsSet(log types.Log) (*flux_agg return r0, r1 } +// FluxAggregator_ParseRequesterPermissionsSet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseRequesterPermissionsSet' +type FluxAggregator_ParseRequesterPermissionsSet_Call struct { + *mock.Call +} + +// ParseRequesterPermissionsSet is a helper method to define mock.On call +// - log types.Log +func (_e *FluxAggregator_Expecter) ParseRequesterPermissionsSet(log interface{}) *FluxAggregator_ParseRequesterPermissionsSet_Call { + return &FluxAggregator_ParseRequesterPermissionsSet_Call{Call: _e.mock.On("ParseRequesterPermissionsSet", log)} +} + +func (_c *FluxAggregator_ParseRequesterPermissionsSet_Call) Run(run func(log types.Log)) *FluxAggregator_ParseRequesterPermissionsSet_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *FluxAggregator_ParseRequesterPermissionsSet_Call) Return(_a0 *flux_aggregator_wrapper.FluxAggregatorRequesterPermissionsSet, _a1 error) *FluxAggregator_ParseRequesterPermissionsSet_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_ParseRequesterPermissionsSet_Call) RunAndReturn(run func(types.Log) (*flux_aggregator_wrapper.FluxAggregatorRequesterPermissionsSet, error)) *FluxAggregator_ParseRequesterPermissionsSet_Call { + _c.Call.Return(run) + return _c +} + // ParseRoundDetailsUpdated provides a mock function with given fields: log func (_m *FluxAggregator) ParseRoundDetailsUpdated(log types.Log) (*flux_aggregator_wrapper.FluxAggregatorRoundDetailsUpdated, error) { ret := _m.Called(log) @@ -1468,6 +2858,34 @@ func (_m *FluxAggregator) ParseRoundDetailsUpdated(log types.Log) (*flux_aggrega return r0, r1 } +// FluxAggregator_ParseRoundDetailsUpdated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseRoundDetailsUpdated' +type FluxAggregator_ParseRoundDetailsUpdated_Call struct { + *mock.Call +} + +// ParseRoundDetailsUpdated is a helper method to define mock.On call +// - log types.Log +func (_e *FluxAggregator_Expecter) ParseRoundDetailsUpdated(log interface{}) *FluxAggregator_ParseRoundDetailsUpdated_Call { + return &FluxAggregator_ParseRoundDetailsUpdated_Call{Call: _e.mock.On("ParseRoundDetailsUpdated", log)} +} + +func (_c *FluxAggregator_ParseRoundDetailsUpdated_Call) Run(run func(log types.Log)) *FluxAggregator_ParseRoundDetailsUpdated_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *FluxAggregator_ParseRoundDetailsUpdated_Call) Return(_a0 *flux_aggregator_wrapper.FluxAggregatorRoundDetailsUpdated, _a1 error) *FluxAggregator_ParseRoundDetailsUpdated_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_ParseRoundDetailsUpdated_Call) RunAndReturn(run func(types.Log) (*flux_aggregator_wrapper.FluxAggregatorRoundDetailsUpdated, error)) *FluxAggregator_ParseRoundDetailsUpdated_Call { + _c.Call.Return(run) + return _c +} + // ParseSubmissionReceived provides a mock function with given fields: log func (_m *FluxAggregator) ParseSubmissionReceived(log types.Log) (*flux_aggregator_wrapper.FluxAggregatorSubmissionReceived, error) { ret := _m.Called(log) @@ -1498,6 +2916,34 @@ func (_m *FluxAggregator) ParseSubmissionReceived(log types.Log) (*flux_aggregat return r0, r1 } +// FluxAggregator_ParseSubmissionReceived_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseSubmissionReceived' +type FluxAggregator_ParseSubmissionReceived_Call struct { + *mock.Call +} + +// ParseSubmissionReceived is a helper method to define mock.On call +// - log types.Log +func (_e *FluxAggregator_Expecter) ParseSubmissionReceived(log interface{}) *FluxAggregator_ParseSubmissionReceived_Call { + return &FluxAggregator_ParseSubmissionReceived_Call{Call: _e.mock.On("ParseSubmissionReceived", log)} +} + +func (_c *FluxAggregator_ParseSubmissionReceived_Call) Run(run func(log types.Log)) *FluxAggregator_ParseSubmissionReceived_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *FluxAggregator_ParseSubmissionReceived_Call) Return(_a0 *flux_aggregator_wrapper.FluxAggregatorSubmissionReceived, _a1 error) *FluxAggregator_ParseSubmissionReceived_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_ParseSubmissionReceived_Call) RunAndReturn(run func(types.Log) (*flux_aggregator_wrapper.FluxAggregatorSubmissionReceived, error)) *FluxAggregator_ParseSubmissionReceived_Call { + _c.Call.Return(run) + return _c +} + // ParseValidatorUpdated provides a mock function with given fields: log func (_m *FluxAggregator) ParseValidatorUpdated(log types.Log) (*flux_aggregator_wrapper.FluxAggregatorValidatorUpdated, error) { ret := _m.Called(log) @@ -1528,6 +2974,34 @@ func (_m *FluxAggregator) ParseValidatorUpdated(log types.Log) (*flux_aggregator return r0, r1 } +// FluxAggregator_ParseValidatorUpdated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseValidatorUpdated' +type FluxAggregator_ParseValidatorUpdated_Call struct { + *mock.Call +} + +// ParseValidatorUpdated is a helper method to define mock.On call +// - log types.Log +func (_e *FluxAggregator_Expecter) ParseValidatorUpdated(log interface{}) *FluxAggregator_ParseValidatorUpdated_Call { + return &FluxAggregator_ParseValidatorUpdated_Call{Call: _e.mock.On("ParseValidatorUpdated", log)} +} + +func (_c *FluxAggregator_ParseValidatorUpdated_Call) Run(run func(log types.Log)) *FluxAggregator_ParseValidatorUpdated_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *FluxAggregator_ParseValidatorUpdated_Call) Return(_a0 *flux_aggregator_wrapper.FluxAggregatorValidatorUpdated, _a1 error) *FluxAggregator_ParseValidatorUpdated_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_ParseValidatorUpdated_Call) RunAndReturn(run func(types.Log) (*flux_aggregator_wrapper.FluxAggregatorValidatorUpdated, error)) *FluxAggregator_ParseValidatorUpdated_Call { + _c.Call.Return(run) + return _c +} + // PaymentAmount provides a mock function with given fields: opts func (_m *FluxAggregator) PaymentAmount(opts *bind.CallOpts) (*big.Int, error) { ret := _m.Called(opts) @@ -1558,6 +3032,34 @@ func (_m *FluxAggregator) PaymentAmount(opts *bind.CallOpts) (*big.Int, error) { return r0, r1 } +// FluxAggregator_PaymentAmount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PaymentAmount' +type FluxAggregator_PaymentAmount_Call struct { + *mock.Call +} + +// PaymentAmount is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *FluxAggregator_Expecter) PaymentAmount(opts interface{}) *FluxAggregator_PaymentAmount_Call { + return &FluxAggregator_PaymentAmount_Call{Call: _e.mock.On("PaymentAmount", opts)} +} + +func (_c *FluxAggregator_PaymentAmount_Call) Run(run func(opts *bind.CallOpts)) *FluxAggregator_PaymentAmount_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *FluxAggregator_PaymentAmount_Call) Return(_a0 *big.Int, _a1 error) *FluxAggregator_PaymentAmount_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_PaymentAmount_Call) RunAndReturn(run func(*bind.CallOpts) (*big.Int, error)) *FluxAggregator_PaymentAmount_Call { + _c.Call.Return(run) + return _c +} + // RequestNewRound provides a mock function with given fields: opts func (_m *FluxAggregator) RequestNewRound(opts *bind.TransactOpts) (*types.Transaction, error) { ret := _m.Called(opts) @@ -1588,6 +3090,34 @@ func (_m *FluxAggregator) RequestNewRound(opts *bind.TransactOpts) (*types.Trans return r0, r1 } +// FluxAggregator_RequestNewRound_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RequestNewRound' +type FluxAggregator_RequestNewRound_Call struct { + *mock.Call +} + +// RequestNewRound is a helper method to define mock.On call +// - opts *bind.TransactOpts +func (_e *FluxAggregator_Expecter) RequestNewRound(opts interface{}) *FluxAggregator_RequestNewRound_Call { + return &FluxAggregator_RequestNewRound_Call{Call: _e.mock.On("RequestNewRound", opts)} +} + +func (_c *FluxAggregator_RequestNewRound_Call) Run(run func(opts *bind.TransactOpts)) *FluxAggregator_RequestNewRound_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts)) + }) + return _c +} + +func (_c *FluxAggregator_RequestNewRound_Call) Return(_a0 *types.Transaction, _a1 error) *FluxAggregator_RequestNewRound_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_RequestNewRound_Call) RunAndReturn(run func(*bind.TransactOpts) (*types.Transaction, error)) *FluxAggregator_RequestNewRound_Call { + _c.Call.Return(run) + return _c +} + // RestartDelay provides a mock function with given fields: opts func (_m *FluxAggregator) RestartDelay(opts *bind.CallOpts) (uint32, error) { ret := _m.Called(opts) @@ -1613,7 +3143,35 @@ func (_m *FluxAggregator) RestartDelay(opts *bind.CallOpts) (uint32, error) { r1 = ret.Error(1) } - return r0, r1 + return r0, r1 +} + +// FluxAggregator_RestartDelay_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RestartDelay' +type FluxAggregator_RestartDelay_Call struct { + *mock.Call +} + +// RestartDelay is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *FluxAggregator_Expecter) RestartDelay(opts interface{}) *FluxAggregator_RestartDelay_Call { + return &FluxAggregator_RestartDelay_Call{Call: _e.mock.On("RestartDelay", opts)} +} + +func (_c *FluxAggregator_RestartDelay_Call) Run(run func(opts *bind.CallOpts)) *FluxAggregator_RestartDelay_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *FluxAggregator_RestartDelay_Call) Return(_a0 uint32, _a1 error) *FluxAggregator_RestartDelay_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_RestartDelay_Call) RunAndReturn(run func(*bind.CallOpts) (uint32, error)) *FluxAggregator_RestartDelay_Call { + _c.Call.Return(run) + return _c } // SetRequesterPermissions provides a mock function with given fields: opts, _requester, _authorized, _delay @@ -1646,6 +3204,37 @@ func (_m *FluxAggregator) SetRequesterPermissions(opts *bind.TransactOpts, _requ return r0, r1 } +// FluxAggregator_SetRequesterPermissions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetRequesterPermissions' +type FluxAggregator_SetRequesterPermissions_Call struct { + *mock.Call +} + +// SetRequesterPermissions is a helper method to define mock.On call +// - opts *bind.TransactOpts +// - _requester common.Address +// - _authorized bool +// - _delay uint32 +func (_e *FluxAggregator_Expecter) SetRequesterPermissions(opts interface{}, _requester interface{}, _authorized interface{}, _delay interface{}) *FluxAggregator_SetRequesterPermissions_Call { + return &FluxAggregator_SetRequesterPermissions_Call{Call: _e.mock.On("SetRequesterPermissions", opts, _requester, _authorized, _delay)} +} + +func (_c *FluxAggregator_SetRequesterPermissions_Call) Run(run func(opts *bind.TransactOpts, _requester common.Address, _authorized bool, _delay uint32)) *FluxAggregator_SetRequesterPermissions_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts), args[1].(common.Address), args[2].(bool), args[3].(uint32)) + }) + return _c +} + +func (_c *FluxAggregator_SetRequesterPermissions_Call) Return(_a0 *types.Transaction, _a1 error) *FluxAggregator_SetRequesterPermissions_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_SetRequesterPermissions_Call) RunAndReturn(run func(*bind.TransactOpts, common.Address, bool, uint32) (*types.Transaction, error)) *FluxAggregator_SetRequesterPermissions_Call { + _c.Call.Return(run) + return _c +} + // SetValidator provides a mock function with given fields: opts, _newValidator func (_m *FluxAggregator) SetValidator(opts *bind.TransactOpts, _newValidator common.Address) (*types.Transaction, error) { ret := _m.Called(opts, _newValidator) @@ -1676,6 +3265,35 @@ func (_m *FluxAggregator) SetValidator(opts *bind.TransactOpts, _newValidator co return r0, r1 } +// FluxAggregator_SetValidator_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetValidator' +type FluxAggregator_SetValidator_Call struct { + *mock.Call +} + +// SetValidator is a helper method to define mock.On call +// - opts *bind.TransactOpts +// - _newValidator common.Address +func (_e *FluxAggregator_Expecter) SetValidator(opts interface{}, _newValidator interface{}) *FluxAggregator_SetValidator_Call { + return &FluxAggregator_SetValidator_Call{Call: _e.mock.On("SetValidator", opts, _newValidator)} +} + +func (_c *FluxAggregator_SetValidator_Call) Run(run func(opts *bind.TransactOpts, _newValidator common.Address)) *FluxAggregator_SetValidator_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts), args[1].(common.Address)) + }) + return _c +} + +func (_c *FluxAggregator_SetValidator_Call) Return(_a0 *types.Transaction, _a1 error) *FluxAggregator_SetValidator_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_SetValidator_Call) RunAndReturn(run func(*bind.TransactOpts, common.Address) (*types.Transaction, error)) *FluxAggregator_SetValidator_Call { + _c.Call.Return(run) + return _c +} + // Submit provides a mock function with given fields: opts, _roundId, _submission func (_m *FluxAggregator) Submit(opts *bind.TransactOpts, _roundId *big.Int, _submission *big.Int) (*types.Transaction, error) { ret := _m.Called(opts, _roundId, _submission) @@ -1706,6 +3324,36 @@ func (_m *FluxAggregator) Submit(opts *bind.TransactOpts, _roundId *big.Int, _su return r0, r1 } +// FluxAggregator_Submit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Submit' +type FluxAggregator_Submit_Call struct { + *mock.Call +} + +// Submit is a helper method to define mock.On call +// - opts *bind.TransactOpts +// - _roundId *big.Int +// - _submission *big.Int +func (_e *FluxAggregator_Expecter) Submit(opts interface{}, _roundId interface{}, _submission interface{}) *FluxAggregator_Submit_Call { + return &FluxAggregator_Submit_Call{Call: _e.mock.On("Submit", opts, _roundId, _submission)} +} + +func (_c *FluxAggregator_Submit_Call) Run(run func(opts *bind.TransactOpts, _roundId *big.Int, _submission *big.Int)) *FluxAggregator_Submit_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts), args[1].(*big.Int), args[2].(*big.Int)) + }) + return _c +} + +func (_c *FluxAggregator_Submit_Call) Return(_a0 *types.Transaction, _a1 error) *FluxAggregator_Submit_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_Submit_Call) RunAndReturn(run func(*bind.TransactOpts, *big.Int, *big.Int) (*types.Transaction, error)) *FluxAggregator_Submit_Call { + _c.Call.Return(run) + return _c +} + // Timeout provides a mock function with given fields: opts func (_m *FluxAggregator) Timeout(opts *bind.CallOpts) (uint32, error) { ret := _m.Called(opts) @@ -1734,6 +3382,34 @@ func (_m *FluxAggregator) Timeout(opts *bind.CallOpts) (uint32, error) { return r0, r1 } +// FluxAggregator_Timeout_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Timeout' +type FluxAggregator_Timeout_Call struct { + *mock.Call +} + +// Timeout is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *FluxAggregator_Expecter) Timeout(opts interface{}) *FluxAggregator_Timeout_Call { + return &FluxAggregator_Timeout_Call{Call: _e.mock.On("Timeout", opts)} +} + +func (_c *FluxAggregator_Timeout_Call) Run(run func(opts *bind.CallOpts)) *FluxAggregator_Timeout_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *FluxAggregator_Timeout_Call) Return(_a0 uint32, _a1 error) *FluxAggregator_Timeout_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_Timeout_Call) RunAndReturn(run func(*bind.CallOpts) (uint32, error)) *FluxAggregator_Timeout_Call { + _c.Call.Return(run) + return _c +} + // TransferAdmin provides a mock function with given fields: opts, _oracle, _newAdmin func (_m *FluxAggregator) TransferAdmin(opts *bind.TransactOpts, _oracle common.Address, _newAdmin common.Address) (*types.Transaction, error) { ret := _m.Called(opts, _oracle, _newAdmin) @@ -1764,6 +3440,36 @@ func (_m *FluxAggregator) TransferAdmin(opts *bind.TransactOpts, _oracle common. return r0, r1 } +// FluxAggregator_TransferAdmin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransferAdmin' +type FluxAggregator_TransferAdmin_Call struct { + *mock.Call +} + +// TransferAdmin is a helper method to define mock.On call +// - opts *bind.TransactOpts +// - _oracle common.Address +// - _newAdmin common.Address +func (_e *FluxAggregator_Expecter) TransferAdmin(opts interface{}, _oracle interface{}, _newAdmin interface{}) *FluxAggregator_TransferAdmin_Call { + return &FluxAggregator_TransferAdmin_Call{Call: _e.mock.On("TransferAdmin", opts, _oracle, _newAdmin)} +} + +func (_c *FluxAggregator_TransferAdmin_Call) Run(run func(opts *bind.TransactOpts, _oracle common.Address, _newAdmin common.Address)) *FluxAggregator_TransferAdmin_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts), args[1].(common.Address), args[2].(common.Address)) + }) + return _c +} + +func (_c *FluxAggregator_TransferAdmin_Call) Return(_a0 *types.Transaction, _a1 error) *FluxAggregator_TransferAdmin_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_TransferAdmin_Call) RunAndReturn(run func(*bind.TransactOpts, common.Address, common.Address) (*types.Transaction, error)) *FluxAggregator_TransferAdmin_Call { + _c.Call.Return(run) + return _c +} + // TransferOwnership provides a mock function with given fields: opts, _to func (_m *FluxAggregator) TransferOwnership(opts *bind.TransactOpts, _to common.Address) (*types.Transaction, error) { ret := _m.Called(opts, _to) @@ -1794,6 +3500,35 @@ func (_m *FluxAggregator) TransferOwnership(opts *bind.TransactOpts, _to common. return r0, r1 } +// FluxAggregator_TransferOwnership_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransferOwnership' +type FluxAggregator_TransferOwnership_Call struct { + *mock.Call +} + +// TransferOwnership is a helper method to define mock.On call +// - opts *bind.TransactOpts +// - _to common.Address +func (_e *FluxAggregator_Expecter) TransferOwnership(opts interface{}, _to interface{}) *FluxAggregator_TransferOwnership_Call { + return &FluxAggregator_TransferOwnership_Call{Call: _e.mock.On("TransferOwnership", opts, _to)} +} + +func (_c *FluxAggregator_TransferOwnership_Call) Run(run func(opts *bind.TransactOpts, _to common.Address)) *FluxAggregator_TransferOwnership_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts), args[1].(common.Address)) + }) + return _c +} + +func (_c *FluxAggregator_TransferOwnership_Call) Return(_a0 *types.Transaction, _a1 error) *FluxAggregator_TransferOwnership_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_TransferOwnership_Call) RunAndReturn(run func(*bind.TransactOpts, common.Address) (*types.Transaction, error)) *FluxAggregator_TransferOwnership_Call { + _c.Call.Return(run) + return _c +} + // UpdateAvailableFunds provides a mock function with given fields: opts func (_m *FluxAggregator) UpdateAvailableFunds(opts *bind.TransactOpts) (*types.Transaction, error) { ret := _m.Called(opts) @@ -1824,6 +3559,34 @@ func (_m *FluxAggregator) UpdateAvailableFunds(opts *bind.TransactOpts) (*types. return r0, r1 } +// FluxAggregator_UpdateAvailableFunds_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateAvailableFunds' +type FluxAggregator_UpdateAvailableFunds_Call struct { + *mock.Call +} + +// UpdateAvailableFunds is a helper method to define mock.On call +// - opts *bind.TransactOpts +func (_e *FluxAggregator_Expecter) UpdateAvailableFunds(opts interface{}) *FluxAggregator_UpdateAvailableFunds_Call { + return &FluxAggregator_UpdateAvailableFunds_Call{Call: _e.mock.On("UpdateAvailableFunds", opts)} +} + +func (_c *FluxAggregator_UpdateAvailableFunds_Call) Run(run func(opts *bind.TransactOpts)) *FluxAggregator_UpdateAvailableFunds_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts)) + }) + return _c +} + +func (_c *FluxAggregator_UpdateAvailableFunds_Call) Return(_a0 *types.Transaction, _a1 error) *FluxAggregator_UpdateAvailableFunds_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_UpdateAvailableFunds_Call) RunAndReturn(run func(*bind.TransactOpts) (*types.Transaction, error)) *FluxAggregator_UpdateAvailableFunds_Call { + _c.Call.Return(run) + return _c +} + // UpdateFutureRounds provides a mock function with given fields: opts, _paymentAmount, _minSubmissions, _maxSubmissions, _restartDelay, _timeout func (_m *FluxAggregator) UpdateFutureRounds(opts *bind.TransactOpts, _paymentAmount *big.Int, _minSubmissions uint32, _maxSubmissions uint32, _restartDelay uint32, _timeout uint32) (*types.Transaction, error) { ret := _m.Called(opts, _paymentAmount, _minSubmissions, _maxSubmissions, _restartDelay, _timeout) @@ -1854,6 +3617,39 @@ func (_m *FluxAggregator) UpdateFutureRounds(opts *bind.TransactOpts, _paymentAm return r0, r1 } +// FluxAggregator_UpdateFutureRounds_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateFutureRounds' +type FluxAggregator_UpdateFutureRounds_Call struct { + *mock.Call +} + +// UpdateFutureRounds is a helper method to define mock.On call +// - opts *bind.TransactOpts +// - _paymentAmount *big.Int +// - _minSubmissions uint32 +// - _maxSubmissions uint32 +// - _restartDelay uint32 +// - _timeout uint32 +func (_e *FluxAggregator_Expecter) UpdateFutureRounds(opts interface{}, _paymentAmount interface{}, _minSubmissions interface{}, _maxSubmissions interface{}, _restartDelay interface{}, _timeout interface{}) *FluxAggregator_UpdateFutureRounds_Call { + return &FluxAggregator_UpdateFutureRounds_Call{Call: _e.mock.On("UpdateFutureRounds", opts, _paymentAmount, _minSubmissions, _maxSubmissions, _restartDelay, _timeout)} +} + +func (_c *FluxAggregator_UpdateFutureRounds_Call) Run(run func(opts *bind.TransactOpts, _paymentAmount *big.Int, _minSubmissions uint32, _maxSubmissions uint32, _restartDelay uint32, _timeout uint32)) *FluxAggregator_UpdateFutureRounds_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts), args[1].(*big.Int), args[2].(uint32), args[3].(uint32), args[4].(uint32), args[5].(uint32)) + }) + return _c +} + +func (_c *FluxAggregator_UpdateFutureRounds_Call) Return(_a0 *types.Transaction, _a1 error) *FluxAggregator_UpdateFutureRounds_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_UpdateFutureRounds_Call) RunAndReturn(run func(*bind.TransactOpts, *big.Int, uint32, uint32, uint32, uint32) (*types.Transaction, error)) *FluxAggregator_UpdateFutureRounds_Call { + _c.Call.Return(run) + return _c +} + // Validator provides a mock function with given fields: opts func (_m *FluxAggregator) Validator(opts *bind.CallOpts) (common.Address, error) { ret := _m.Called(opts) @@ -1884,6 +3680,34 @@ func (_m *FluxAggregator) Validator(opts *bind.CallOpts) (common.Address, error) return r0, r1 } +// FluxAggregator_Validator_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Validator' +type FluxAggregator_Validator_Call struct { + *mock.Call +} + +// Validator is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *FluxAggregator_Expecter) Validator(opts interface{}) *FluxAggregator_Validator_Call { + return &FluxAggregator_Validator_Call{Call: _e.mock.On("Validator", opts)} +} + +func (_c *FluxAggregator_Validator_Call) Run(run func(opts *bind.CallOpts)) *FluxAggregator_Validator_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *FluxAggregator_Validator_Call) Return(_a0 common.Address, _a1 error) *FluxAggregator_Validator_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_Validator_Call) RunAndReturn(run func(*bind.CallOpts) (common.Address, error)) *FluxAggregator_Validator_Call { + _c.Call.Return(run) + return _c +} + // Version provides a mock function with given fields: opts func (_m *FluxAggregator) Version(opts *bind.CallOpts) (*big.Int, error) { ret := _m.Called(opts) @@ -1914,6 +3738,34 @@ func (_m *FluxAggregator) Version(opts *bind.CallOpts) (*big.Int, error) { return r0, r1 } +// FluxAggregator_Version_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Version' +type FluxAggregator_Version_Call struct { + *mock.Call +} + +// Version is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *FluxAggregator_Expecter) Version(opts interface{}) *FluxAggregator_Version_Call { + return &FluxAggregator_Version_Call{Call: _e.mock.On("Version", opts)} +} + +func (_c *FluxAggregator_Version_Call) Run(run func(opts *bind.CallOpts)) *FluxAggregator_Version_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *FluxAggregator_Version_Call) Return(_a0 *big.Int, _a1 error) *FluxAggregator_Version_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_Version_Call) RunAndReturn(run func(*bind.CallOpts) (*big.Int, error)) *FluxAggregator_Version_Call { + _c.Call.Return(run) + return _c +} + // WatchAnswerUpdated provides a mock function with given fields: opts, sink, current, roundId func (_m *FluxAggregator) WatchAnswerUpdated(opts *bind.WatchOpts, sink chan<- *flux_aggregator_wrapper.FluxAggregatorAnswerUpdated, current []*big.Int, roundId []*big.Int) (event.Subscription, error) { ret := _m.Called(opts, sink, current, roundId) @@ -1944,6 +3796,37 @@ func (_m *FluxAggregator) WatchAnswerUpdated(opts *bind.WatchOpts, sink chan<- * return r0, r1 } +// FluxAggregator_WatchAnswerUpdated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchAnswerUpdated' +type FluxAggregator_WatchAnswerUpdated_Call struct { + *mock.Call +} + +// WatchAnswerUpdated is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *flux_aggregator_wrapper.FluxAggregatorAnswerUpdated +// - current []*big.Int +// - roundId []*big.Int +func (_e *FluxAggregator_Expecter) WatchAnswerUpdated(opts interface{}, sink interface{}, current interface{}, roundId interface{}) *FluxAggregator_WatchAnswerUpdated_Call { + return &FluxAggregator_WatchAnswerUpdated_Call{Call: _e.mock.On("WatchAnswerUpdated", opts, sink, current, roundId)} +} + +func (_c *FluxAggregator_WatchAnswerUpdated_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *flux_aggregator_wrapper.FluxAggregatorAnswerUpdated, current []*big.Int, roundId []*big.Int)) *FluxAggregator_WatchAnswerUpdated_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *flux_aggregator_wrapper.FluxAggregatorAnswerUpdated), args[2].([]*big.Int), args[3].([]*big.Int)) + }) + return _c +} + +func (_c *FluxAggregator_WatchAnswerUpdated_Call) Return(_a0 event.Subscription, _a1 error) *FluxAggregator_WatchAnswerUpdated_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_WatchAnswerUpdated_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *flux_aggregator_wrapper.FluxAggregatorAnswerUpdated, []*big.Int, []*big.Int) (event.Subscription, error)) *FluxAggregator_WatchAnswerUpdated_Call { + _c.Call.Return(run) + return _c +} + // WatchAvailableFundsUpdated provides a mock function with given fields: opts, sink, amount func (_m *FluxAggregator) WatchAvailableFundsUpdated(opts *bind.WatchOpts, sink chan<- *flux_aggregator_wrapper.FluxAggregatorAvailableFundsUpdated, amount []*big.Int) (event.Subscription, error) { ret := _m.Called(opts, sink, amount) @@ -1974,6 +3857,36 @@ func (_m *FluxAggregator) WatchAvailableFundsUpdated(opts *bind.WatchOpts, sink return r0, r1 } +// FluxAggregator_WatchAvailableFundsUpdated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchAvailableFundsUpdated' +type FluxAggregator_WatchAvailableFundsUpdated_Call struct { + *mock.Call +} + +// WatchAvailableFundsUpdated is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *flux_aggregator_wrapper.FluxAggregatorAvailableFundsUpdated +// - amount []*big.Int +func (_e *FluxAggregator_Expecter) WatchAvailableFundsUpdated(opts interface{}, sink interface{}, amount interface{}) *FluxAggregator_WatchAvailableFundsUpdated_Call { + return &FluxAggregator_WatchAvailableFundsUpdated_Call{Call: _e.mock.On("WatchAvailableFundsUpdated", opts, sink, amount)} +} + +func (_c *FluxAggregator_WatchAvailableFundsUpdated_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *flux_aggregator_wrapper.FluxAggregatorAvailableFundsUpdated, amount []*big.Int)) *FluxAggregator_WatchAvailableFundsUpdated_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *flux_aggregator_wrapper.FluxAggregatorAvailableFundsUpdated), args[2].([]*big.Int)) + }) + return _c +} + +func (_c *FluxAggregator_WatchAvailableFundsUpdated_Call) Return(_a0 event.Subscription, _a1 error) *FluxAggregator_WatchAvailableFundsUpdated_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_WatchAvailableFundsUpdated_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *flux_aggregator_wrapper.FluxAggregatorAvailableFundsUpdated, []*big.Int) (event.Subscription, error)) *FluxAggregator_WatchAvailableFundsUpdated_Call { + _c.Call.Return(run) + return _c +} + // WatchNewRound provides a mock function with given fields: opts, sink, roundId, startedBy func (_m *FluxAggregator) WatchNewRound(opts *bind.WatchOpts, sink chan<- *flux_aggregator_wrapper.FluxAggregatorNewRound, roundId []*big.Int, startedBy []common.Address) (event.Subscription, error) { ret := _m.Called(opts, sink, roundId, startedBy) @@ -2004,6 +3917,37 @@ func (_m *FluxAggregator) WatchNewRound(opts *bind.WatchOpts, sink chan<- *flux_ return r0, r1 } +// FluxAggregator_WatchNewRound_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchNewRound' +type FluxAggregator_WatchNewRound_Call struct { + *mock.Call +} + +// WatchNewRound is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *flux_aggregator_wrapper.FluxAggregatorNewRound +// - roundId []*big.Int +// - startedBy []common.Address +func (_e *FluxAggregator_Expecter) WatchNewRound(opts interface{}, sink interface{}, roundId interface{}, startedBy interface{}) *FluxAggregator_WatchNewRound_Call { + return &FluxAggregator_WatchNewRound_Call{Call: _e.mock.On("WatchNewRound", opts, sink, roundId, startedBy)} +} + +func (_c *FluxAggregator_WatchNewRound_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *flux_aggregator_wrapper.FluxAggregatorNewRound, roundId []*big.Int, startedBy []common.Address)) *FluxAggregator_WatchNewRound_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *flux_aggregator_wrapper.FluxAggregatorNewRound), args[2].([]*big.Int), args[3].([]common.Address)) + }) + return _c +} + +func (_c *FluxAggregator_WatchNewRound_Call) Return(_a0 event.Subscription, _a1 error) *FluxAggregator_WatchNewRound_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_WatchNewRound_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *flux_aggregator_wrapper.FluxAggregatorNewRound, []*big.Int, []common.Address) (event.Subscription, error)) *FluxAggregator_WatchNewRound_Call { + _c.Call.Return(run) + return _c +} + // WatchOracleAdminUpdateRequested provides a mock function with given fields: opts, sink, oracle func (_m *FluxAggregator) WatchOracleAdminUpdateRequested(opts *bind.WatchOpts, sink chan<- *flux_aggregator_wrapper.FluxAggregatorOracleAdminUpdateRequested, oracle []common.Address) (event.Subscription, error) { ret := _m.Called(opts, sink, oracle) @@ -2034,6 +3978,36 @@ func (_m *FluxAggregator) WatchOracleAdminUpdateRequested(opts *bind.WatchOpts, return r0, r1 } +// FluxAggregator_WatchOracleAdminUpdateRequested_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchOracleAdminUpdateRequested' +type FluxAggregator_WatchOracleAdminUpdateRequested_Call struct { + *mock.Call +} + +// WatchOracleAdminUpdateRequested is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *flux_aggregator_wrapper.FluxAggregatorOracleAdminUpdateRequested +// - oracle []common.Address +func (_e *FluxAggregator_Expecter) WatchOracleAdminUpdateRequested(opts interface{}, sink interface{}, oracle interface{}) *FluxAggregator_WatchOracleAdminUpdateRequested_Call { + return &FluxAggregator_WatchOracleAdminUpdateRequested_Call{Call: _e.mock.On("WatchOracleAdminUpdateRequested", opts, sink, oracle)} +} + +func (_c *FluxAggregator_WatchOracleAdminUpdateRequested_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *flux_aggregator_wrapper.FluxAggregatorOracleAdminUpdateRequested, oracle []common.Address)) *FluxAggregator_WatchOracleAdminUpdateRequested_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *flux_aggregator_wrapper.FluxAggregatorOracleAdminUpdateRequested), args[2].([]common.Address)) + }) + return _c +} + +func (_c *FluxAggregator_WatchOracleAdminUpdateRequested_Call) Return(_a0 event.Subscription, _a1 error) *FluxAggregator_WatchOracleAdminUpdateRequested_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_WatchOracleAdminUpdateRequested_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *flux_aggregator_wrapper.FluxAggregatorOracleAdminUpdateRequested, []common.Address) (event.Subscription, error)) *FluxAggregator_WatchOracleAdminUpdateRequested_Call { + _c.Call.Return(run) + return _c +} + // WatchOracleAdminUpdated provides a mock function with given fields: opts, sink, oracle, newAdmin func (_m *FluxAggregator) WatchOracleAdminUpdated(opts *bind.WatchOpts, sink chan<- *flux_aggregator_wrapper.FluxAggregatorOracleAdminUpdated, oracle []common.Address, newAdmin []common.Address) (event.Subscription, error) { ret := _m.Called(opts, sink, oracle, newAdmin) @@ -2064,6 +4038,37 @@ func (_m *FluxAggregator) WatchOracleAdminUpdated(opts *bind.WatchOpts, sink cha return r0, r1 } +// FluxAggregator_WatchOracleAdminUpdated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchOracleAdminUpdated' +type FluxAggregator_WatchOracleAdminUpdated_Call struct { + *mock.Call +} + +// WatchOracleAdminUpdated is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *flux_aggregator_wrapper.FluxAggregatorOracleAdminUpdated +// - oracle []common.Address +// - newAdmin []common.Address +func (_e *FluxAggregator_Expecter) WatchOracleAdminUpdated(opts interface{}, sink interface{}, oracle interface{}, newAdmin interface{}) *FluxAggregator_WatchOracleAdminUpdated_Call { + return &FluxAggregator_WatchOracleAdminUpdated_Call{Call: _e.mock.On("WatchOracleAdminUpdated", opts, sink, oracle, newAdmin)} +} + +func (_c *FluxAggregator_WatchOracleAdminUpdated_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *flux_aggregator_wrapper.FluxAggregatorOracleAdminUpdated, oracle []common.Address, newAdmin []common.Address)) *FluxAggregator_WatchOracleAdminUpdated_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *flux_aggregator_wrapper.FluxAggregatorOracleAdminUpdated), args[2].([]common.Address), args[3].([]common.Address)) + }) + return _c +} + +func (_c *FluxAggregator_WatchOracleAdminUpdated_Call) Return(_a0 event.Subscription, _a1 error) *FluxAggregator_WatchOracleAdminUpdated_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_WatchOracleAdminUpdated_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *flux_aggregator_wrapper.FluxAggregatorOracleAdminUpdated, []common.Address, []common.Address) (event.Subscription, error)) *FluxAggregator_WatchOracleAdminUpdated_Call { + _c.Call.Return(run) + return _c +} + // WatchOraclePermissionsUpdated provides a mock function with given fields: opts, sink, oracle, whitelisted func (_m *FluxAggregator) WatchOraclePermissionsUpdated(opts *bind.WatchOpts, sink chan<- *flux_aggregator_wrapper.FluxAggregatorOraclePermissionsUpdated, oracle []common.Address, whitelisted []bool) (event.Subscription, error) { ret := _m.Called(opts, sink, oracle, whitelisted) @@ -2094,6 +4099,37 @@ func (_m *FluxAggregator) WatchOraclePermissionsUpdated(opts *bind.WatchOpts, si return r0, r1 } +// FluxAggregator_WatchOraclePermissionsUpdated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchOraclePermissionsUpdated' +type FluxAggregator_WatchOraclePermissionsUpdated_Call struct { + *mock.Call +} + +// WatchOraclePermissionsUpdated is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *flux_aggregator_wrapper.FluxAggregatorOraclePermissionsUpdated +// - oracle []common.Address +// - whitelisted []bool +func (_e *FluxAggregator_Expecter) WatchOraclePermissionsUpdated(opts interface{}, sink interface{}, oracle interface{}, whitelisted interface{}) *FluxAggregator_WatchOraclePermissionsUpdated_Call { + return &FluxAggregator_WatchOraclePermissionsUpdated_Call{Call: _e.mock.On("WatchOraclePermissionsUpdated", opts, sink, oracle, whitelisted)} +} + +func (_c *FluxAggregator_WatchOraclePermissionsUpdated_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *flux_aggregator_wrapper.FluxAggregatorOraclePermissionsUpdated, oracle []common.Address, whitelisted []bool)) *FluxAggregator_WatchOraclePermissionsUpdated_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *flux_aggregator_wrapper.FluxAggregatorOraclePermissionsUpdated), args[2].([]common.Address), args[3].([]bool)) + }) + return _c +} + +func (_c *FluxAggregator_WatchOraclePermissionsUpdated_Call) Return(_a0 event.Subscription, _a1 error) *FluxAggregator_WatchOraclePermissionsUpdated_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_WatchOraclePermissionsUpdated_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *flux_aggregator_wrapper.FluxAggregatorOraclePermissionsUpdated, []common.Address, []bool) (event.Subscription, error)) *FluxAggregator_WatchOraclePermissionsUpdated_Call { + _c.Call.Return(run) + return _c +} + // WatchOwnershipTransferRequested provides a mock function with given fields: opts, sink, from, to func (_m *FluxAggregator) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *flux_aggregator_wrapper.FluxAggregatorOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { ret := _m.Called(opts, sink, from, to) @@ -2124,6 +4160,37 @@ func (_m *FluxAggregator) WatchOwnershipTransferRequested(opts *bind.WatchOpts, return r0, r1 } +// FluxAggregator_WatchOwnershipTransferRequested_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchOwnershipTransferRequested' +type FluxAggregator_WatchOwnershipTransferRequested_Call struct { + *mock.Call +} + +// WatchOwnershipTransferRequested is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *flux_aggregator_wrapper.FluxAggregatorOwnershipTransferRequested +// - from []common.Address +// - to []common.Address +func (_e *FluxAggregator_Expecter) WatchOwnershipTransferRequested(opts interface{}, sink interface{}, from interface{}, to interface{}) *FluxAggregator_WatchOwnershipTransferRequested_Call { + return &FluxAggregator_WatchOwnershipTransferRequested_Call{Call: _e.mock.On("WatchOwnershipTransferRequested", opts, sink, from, to)} +} + +func (_c *FluxAggregator_WatchOwnershipTransferRequested_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *flux_aggregator_wrapper.FluxAggregatorOwnershipTransferRequested, from []common.Address, to []common.Address)) *FluxAggregator_WatchOwnershipTransferRequested_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *flux_aggregator_wrapper.FluxAggregatorOwnershipTransferRequested), args[2].([]common.Address), args[3].([]common.Address)) + }) + return _c +} + +func (_c *FluxAggregator_WatchOwnershipTransferRequested_Call) Return(_a0 event.Subscription, _a1 error) *FluxAggregator_WatchOwnershipTransferRequested_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_WatchOwnershipTransferRequested_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *flux_aggregator_wrapper.FluxAggregatorOwnershipTransferRequested, []common.Address, []common.Address) (event.Subscription, error)) *FluxAggregator_WatchOwnershipTransferRequested_Call { + _c.Call.Return(run) + return _c +} + // WatchOwnershipTransferred provides a mock function with given fields: opts, sink, from, to func (_m *FluxAggregator) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *flux_aggregator_wrapper.FluxAggregatorOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { ret := _m.Called(opts, sink, from, to) @@ -2154,6 +4221,37 @@ func (_m *FluxAggregator) WatchOwnershipTransferred(opts *bind.WatchOpts, sink c return r0, r1 } +// FluxAggregator_WatchOwnershipTransferred_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchOwnershipTransferred' +type FluxAggregator_WatchOwnershipTransferred_Call struct { + *mock.Call +} + +// WatchOwnershipTransferred is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *flux_aggregator_wrapper.FluxAggregatorOwnershipTransferred +// - from []common.Address +// - to []common.Address +func (_e *FluxAggregator_Expecter) WatchOwnershipTransferred(opts interface{}, sink interface{}, from interface{}, to interface{}) *FluxAggregator_WatchOwnershipTransferred_Call { + return &FluxAggregator_WatchOwnershipTransferred_Call{Call: _e.mock.On("WatchOwnershipTransferred", opts, sink, from, to)} +} + +func (_c *FluxAggregator_WatchOwnershipTransferred_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *flux_aggregator_wrapper.FluxAggregatorOwnershipTransferred, from []common.Address, to []common.Address)) *FluxAggregator_WatchOwnershipTransferred_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *flux_aggregator_wrapper.FluxAggregatorOwnershipTransferred), args[2].([]common.Address), args[3].([]common.Address)) + }) + return _c +} + +func (_c *FluxAggregator_WatchOwnershipTransferred_Call) Return(_a0 event.Subscription, _a1 error) *FluxAggregator_WatchOwnershipTransferred_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_WatchOwnershipTransferred_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *flux_aggregator_wrapper.FluxAggregatorOwnershipTransferred, []common.Address, []common.Address) (event.Subscription, error)) *FluxAggregator_WatchOwnershipTransferred_Call { + _c.Call.Return(run) + return _c +} + // WatchRequesterPermissionsSet provides a mock function with given fields: opts, sink, requester func (_m *FluxAggregator) WatchRequesterPermissionsSet(opts *bind.WatchOpts, sink chan<- *flux_aggregator_wrapper.FluxAggregatorRequesterPermissionsSet, requester []common.Address) (event.Subscription, error) { ret := _m.Called(opts, sink, requester) @@ -2184,6 +4282,36 @@ func (_m *FluxAggregator) WatchRequesterPermissionsSet(opts *bind.WatchOpts, sin return r0, r1 } +// FluxAggregator_WatchRequesterPermissionsSet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchRequesterPermissionsSet' +type FluxAggregator_WatchRequesterPermissionsSet_Call struct { + *mock.Call +} + +// WatchRequesterPermissionsSet is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *flux_aggregator_wrapper.FluxAggregatorRequesterPermissionsSet +// - requester []common.Address +func (_e *FluxAggregator_Expecter) WatchRequesterPermissionsSet(opts interface{}, sink interface{}, requester interface{}) *FluxAggregator_WatchRequesterPermissionsSet_Call { + return &FluxAggregator_WatchRequesterPermissionsSet_Call{Call: _e.mock.On("WatchRequesterPermissionsSet", opts, sink, requester)} +} + +func (_c *FluxAggregator_WatchRequesterPermissionsSet_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *flux_aggregator_wrapper.FluxAggregatorRequesterPermissionsSet, requester []common.Address)) *FluxAggregator_WatchRequesterPermissionsSet_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *flux_aggregator_wrapper.FluxAggregatorRequesterPermissionsSet), args[2].([]common.Address)) + }) + return _c +} + +func (_c *FluxAggregator_WatchRequesterPermissionsSet_Call) Return(_a0 event.Subscription, _a1 error) *FluxAggregator_WatchRequesterPermissionsSet_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_WatchRequesterPermissionsSet_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *flux_aggregator_wrapper.FluxAggregatorRequesterPermissionsSet, []common.Address) (event.Subscription, error)) *FluxAggregator_WatchRequesterPermissionsSet_Call { + _c.Call.Return(run) + return _c +} + // WatchRoundDetailsUpdated provides a mock function with given fields: opts, sink, paymentAmount, minSubmissionCount, maxSubmissionCount func (_m *FluxAggregator) WatchRoundDetailsUpdated(opts *bind.WatchOpts, sink chan<- *flux_aggregator_wrapper.FluxAggregatorRoundDetailsUpdated, paymentAmount []*big.Int, minSubmissionCount []uint32, maxSubmissionCount []uint32) (event.Subscription, error) { ret := _m.Called(opts, sink, paymentAmount, minSubmissionCount, maxSubmissionCount) @@ -2214,6 +4342,38 @@ func (_m *FluxAggregator) WatchRoundDetailsUpdated(opts *bind.WatchOpts, sink ch return r0, r1 } +// FluxAggregator_WatchRoundDetailsUpdated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchRoundDetailsUpdated' +type FluxAggregator_WatchRoundDetailsUpdated_Call struct { + *mock.Call +} + +// WatchRoundDetailsUpdated is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *flux_aggregator_wrapper.FluxAggregatorRoundDetailsUpdated +// - paymentAmount []*big.Int +// - minSubmissionCount []uint32 +// - maxSubmissionCount []uint32 +func (_e *FluxAggregator_Expecter) WatchRoundDetailsUpdated(opts interface{}, sink interface{}, paymentAmount interface{}, minSubmissionCount interface{}, maxSubmissionCount interface{}) *FluxAggregator_WatchRoundDetailsUpdated_Call { + return &FluxAggregator_WatchRoundDetailsUpdated_Call{Call: _e.mock.On("WatchRoundDetailsUpdated", opts, sink, paymentAmount, minSubmissionCount, maxSubmissionCount)} +} + +func (_c *FluxAggregator_WatchRoundDetailsUpdated_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *flux_aggregator_wrapper.FluxAggregatorRoundDetailsUpdated, paymentAmount []*big.Int, minSubmissionCount []uint32, maxSubmissionCount []uint32)) *FluxAggregator_WatchRoundDetailsUpdated_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *flux_aggregator_wrapper.FluxAggregatorRoundDetailsUpdated), args[2].([]*big.Int), args[3].([]uint32), args[4].([]uint32)) + }) + return _c +} + +func (_c *FluxAggregator_WatchRoundDetailsUpdated_Call) Return(_a0 event.Subscription, _a1 error) *FluxAggregator_WatchRoundDetailsUpdated_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_WatchRoundDetailsUpdated_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *flux_aggregator_wrapper.FluxAggregatorRoundDetailsUpdated, []*big.Int, []uint32, []uint32) (event.Subscription, error)) *FluxAggregator_WatchRoundDetailsUpdated_Call { + _c.Call.Return(run) + return _c +} + // WatchSubmissionReceived provides a mock function with given fields: opts, sink, submission, round, oracle func (_m *FluxAggregator) WatchSubmissionReceived(opts *bind.WatchOpts, sink chan<- *flux_aggregator_wrapper.FluxAggregatorSubmissionReceived, submission []*big.Int, round []uint32, oracle []common.Address) (event.Subscription, error) { ret := _m.Called(opts, sink, submission, round, oracle) @@ -2244,6 +4404,38 @@ func (_m *FluxAggregator) WatchSubmissionReceived(opts *bind.WatchOpts, sink cha return r0, r1 } +// FluxAggregator_WatchSubmissionReceived_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchSubmissionReceived' +type FluxAggregator_WatchSubmissionReceived_Call struct { + *mock.Call +} + +// WatchSubmissionReceived is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *flux_aggregator_wrapper.FluxAggregatorSubmissionReceived +// - submission []*big.Int +// - round []uint32 +// - oracle []common.Address +func (_e *FluxAggregator_Expecter) WatchSubmissionReceived(opts interface{}, sink interface{}, submission interface{}, round interface{}, oracle interface{}) *FluxAggregator_WatchSubmissionReceived_Call { + return &FluxAggregator_WatchSubmissionReceived_Call{Call: _e.mock.On("WatchSubmissionReceived", opts, sink, submission, round, oracle)} +} + +func (_c *FluxAggregator_WatchSubmissionReceived_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *flux_aggregator_wrapper.FluxAggregatorSubmissionReceived, submission []*big.Int, round []uint32, oracle []common.Address)) *FluxAggregator_WatchSubmissionReceived_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *flux_aggregator_wrapper.FluxAggregatorSubmissionReceived), args[2].([]*big.Int), args[3].([]uint32), args[4].([]common.Address)) + }) + return _c +} + +func (_c *FluxAggregator_WatchSubmissionReceived_Call) Return(_a0 event.Subscription, _a1 error) *FluxAggregator_WatchSubmissionReceived_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_WatchSubmissionReceived_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *flux_aggregator_wrapper.FluxAggregatorSubmissionReceived, []*big.Int, []uint32, []common.Address) (event.Subscription, error)) *FluxAggregator_WatchSubmissionReceived_Call { + _c.Call.Return(run) + return _c +} + // WatchValidatorUpdated provides a mock function with given fields: opts, sink, previous, current func (_m *FluxAggregator) WatchValidatorUpdated(opts *bind.WatchOpts, sink chan<- *flux_aggregator_wrapper.FluxAggregatorValidatorUpdated, previous []common.Address, current []common.Address) (event.Subscription, error) { ret := _m.Called(opts, sink, previous, current) @@ -2274,6 +4466,37 @@ func (_m *FluxAggregator) WatchValidatorUpdated(opts *bind.WatchOpts, sink chan< return r0, r1 } +// FluxAggregator_WatchValidatorUpdated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchValidatorUpdated' +type FluxAggregator_WatchValidatorUpdated_Call struct { + *mock.Call +} + +// WatchValidatorUpdated is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *flux_aggregator_wrapper.FluxAggregatorValidatorUpdated +// - previous []common.Address +// - current []common.Address +func (_e *FluxAggregator_Expecter) WatchValidatorUpdated(opts interface{}, sink interface{}, previous interface{}, current interface{}) *FluxAggregator_WatchValidatorUpdated_Call { + return &FluxAggregator_WatchValidatorUpdated_Call{Call: _e.mock.On("WatchValidatorUpdated", opts, sink, previous, current)} +} + +func (_c *FluxAggregator_WatchValidatorUpdated_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *flux_aggregator_wrapper.FluxAggregatorValidatorUpdated, previous []common.Address, current []common.Address)) *FluxAggregator_WatchValidatorUpdated_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *flux_aggregator_wrapper.FluxAggregatorValidatorUpdated), args[2].([]common.Address), args[3].([]common.Address)) + }) + return _c +} + +func (_c *FluxAggregator_WatchValidatorUpdated_Call) Return(_a0 event.Subscription, _a1 error) *FluxAggregator_WatchValidatorUpdated_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_WatchValidatorUpdated_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *flux_aggregator_wrapper.FluxAggregatorValidatorUpdated, []common.Address, []common.Address) (event.Subscription, error)) *FluxAggregator_WatchValidatorUpdated_Call { + _c.Call.Return(run) + return _c +} + // WithdrawFunds provides a mock function with given fields: opts, _recipient, _amount func (_m *FluxAggregator) WithdrawFunds(opts *bind.TransactOpts, _recipient common.Address, _amount *big.Int) (*types.Transaction, error) { ret := _m.Called(opts, _recipient, _amount) @@ -2304,6 +4527,36 @@ func (_m *FluxAggregator) WithdrawFunds(opts *bind.TransactOpts, _recipient comm return r0, r1 } +// FluxAggregator_WithdrawFunds_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithdrawFunds' +type FluxAggregator_WithdrawFunds_Call struct { + *mock.Call +} + +// WithdrawFunds is a helper method to define mock.On call +// - opts *bind.TransactOpts +// - _recipient common.Address +// - _amount *big.Int +func (_e *FluxAggregator_Expecter) WithdrawFunds(opts interface{}, _recipient interface{}, _amount interface{}) *FluxAggregator_WithdrawFunds_Call { + return &FluxAggregator_WithdrawFunds_Call{Call: _e.mock.On("WithdrawFunds", opts, _recipient, _amount)} +} + +func (_c *FluxAggregator_WithdrawFunds_Call) Run(run func(opts *bind.TransactOpts, _recipient common.Address, _amount *big.Int)) *FluxAggregator_WithdrawFunds_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts), args[1].(common.Address), args[2].(*big.Int)) + }) + return _c +} + +func (_c *FluxAggregator_WithdrawFunds_Call) Return(_a0 *types.Transaction, _a1 error) *FluxAggregator_WithdrawFunds_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_WithdrawFunds_Call) RunAndReturn(run func(*bind.TransactOpts, common.Address, *big.Int) (*types.Transaction, error)) *FluxAggregator_WithdrawFunds_Call { + _c.Call.Return(run) + return _c +} + // WithdrawPayment provides a mock function with given fields: opts, _oracle, _recipient, _amount func (_m *FluxAggregator) WithdrawPayment(opts *bind.TransactOpts, _oracle common.Address, _recipient common.Address, _amount *big.Int) (*types.Transaction, error) { ret := _m.Called(opts, _oracle, _recipient, _amount) @@ -2334,6 +4587,37 @@ func (_m *FluxAggregator) WithdrawPayment(opts *bind.TransactOpts, _oracle commo return r0, r1 } +// FluxAggregator_WithdrawPayment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithdrawPayment' +type FluxAggregator_WithdrawPayment_Call struct { + *mock.Call +} + +// WithdrawPayment is a helper method to define mock.On call +// - opts *bind.TransactOpts +// - _oracle common.Address +// - _recipient common.Address +// - _amount *big.Int +func (_e *FluxAggregator_Expecter) WithdrawPayment(opts interface{}, _oracle interface{}, _recipient interface{}, _amount interface{}) *FluxAggregator_WithdrawPayment_Call { + return &FluxAggregator_WithdrawPayment_Call{Call: _e.mock.On("WithdrawPayment", opts, _oracle, _recipient, _amount)} +} + +func (_c *FluxAggregator_WithdrawPayment_Call) Run(run func(opts *bind.TransactOpts, _oracle common.Address, _recipient common.Address, _amount *big.Int)) *FluxAggregator_WithdrawPayment_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts), args[1].(common.Address), args[2].(common.Address), args[3].(*big.Int)) + }) + return _c +} + +func (_c *FluxAggregator_WithdrawPayment_Call) Return(_a0 *types.Transaction, _a1 error) *FluxAggregator_WithdrawPayment_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_WithdrawPayment_Call) RunAndReturn(run func(*bind.TransactOpts, common.Address, common.Address, *big.Int) (*types.Transaction, error)) *FluxAggregator_WithdrawPayment_Call { + _c.Call.Return(run) + return _c +} + // WithdrawablePayment provides a mock function with given fields: opts, _oracle func (_m *FluxAggregator) WithdrawablePayment(opts *bind.CallOpts, _oracle common.Address) (*big.Int, error) { ret := _m.Called(opts, _oracle) @@ -2364,6 +4648,35 @@ func (_m *FluxAggregator) WithdrawablePayment(opts *bind.CallOpts, _oracle commo return r0, r1 } +// FluxAggregator_WithdrawablePayment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithdrawablePayment' +type FluxAggregator_WithdrawablePayment_Call struct { + *mock.Call +} + +// WithdrawablePayment is a helper method to define mock.On call +// - opts *bind.CallOpts +// - _oracle common.Address +func (_e *FluxAggregator_Expecter) WithdrawablePayment(opts interface{}, _oracle interface{}) *FluxAggregator_WithdrawablePayment_Call { + return &FluxAggregator_WithdrawablePayment_Call{Call: _e.mock.On("WithdrawablePayment", opts, _oracle)} +} + +func (_c *FluxAggregator_WithdrawablePayment_Call) Run(run func(opts *bind.CallOpts, _oracle common.Address)) *FluxAggregator_WithdrawablePayment_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts), args[1].(common.Address)) + }) + return _c +} + +func (_c *FluxAggregator_WithdrawablePayment_Call) Return(_a0 *big.Int, _a1 error) *FluxAggregator_WithdrawablePayment_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FluxAggregator_WithdrawablePayment_Call) RunAndReturn(run func(*bind.CallOpts, common.Address) (*big.Int, error)) *FluxAggregator_WithdrawablePayment_Call { + _c.Call.Return(run) + return _c +} + // NewFluxAggregator creates a new instance of FluxAggregator. 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 NewFluxAggregator(t interface { diff --git a/core/internal/mocks/go_generate.go b/core/internal/mocks/go_generate.go deleted file mode 100644 index f3f5f0ae2ca..00000000000 --- a/core/internal/mocks/go_generate.go +++ /dev/null @@ -1,8 +0,0 @@ -package mocks - -//go:generate mockery --quiet --srcpkg github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/flux_aggregator_wrapper --name FluxAggregatorInterface --output . --case=underscore --structname FluxAggregator --filename flux_aggregator.go -//go:generate mockery --quiet --srcpkg github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/flags_wrapper --name FlagsInterface --output . --case=underscore --structname Flags --filename flags.go -//go:generate mockery --quiet --srcpkg github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/aggregator_v3_interface --name AggregatorV3InterfaceInterface --output ../../services/vrf/mocks/ --case=underscore --structname AggregatorV3Interface --filename aggregator_v3_interface.go -//go:generate mockery --quiet --srcpkg github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrf_coordinator_v2 --name VRFCoordinatorV2Interface --output ../../services/vrf/mocks/ --case=underscore --structname VRFCoordinatorV2Interface --filename vrf_coordinator_v2.go -//go:generate mockery --quiet --srcpkg github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/vrf_beacon --name VRFBeaconInterface --output ../../services/ocr2/plugins/ocr2vrf/coordinator/mocks --case=underscore --structname VRFBeaconInterface --filename vrf_beacon.go -//go:generate mockery --quiet --srcpkg github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/vrf_coordinator --name VRFCoordinatorInterface --output ../../services/ocr2/plugins/ocr2vrf/coordinator/mocks --case=underscore --structname VRFCoordinatorInterface --filename vrf_coordinator.go diff --git a/core/internal/mocks/prometheus_backend.go b/core/internal/mocks/prometheus_backend.go index 81ff22d9d52..d02f7062cbf 100644 --- a/core/internal/mocks/prometheus_backend.go +++ b/core/internal/mocks/prometheus_backend.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -13,31 +13,182 @@ type PrometheusBackend struct { mock.Mock } +type PrometheusBackend_Expecter struct { + mock *mock.Mock +} + +func (_m *PrometheusBackend) EXPECT() *PrometheusBackend_Expecter { + return &PrometheusBackend_Expecter{mock: &_m.Mock} +} + // SetMaxUnconfirmedAge provides a mock function with given fields: _a0, _a1 func (_m *PrometheusBackend) SetMaxUnconfirmedAge(_a0 *big.Int, _a1 float64) { _m.Called(_a0, _a1) } +// PrometheusBackend_SetMaxUnconfirmedAge_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetMaxUnconfirmedAge' +type PrometheusBackend_SetMaxUnconfirmedAge_Call struct { + *mock.Call +} + +// SetMaxUnconfirmedAge is a helper method to define mock.On call +// - _a0 *big.Int +// - _a1 float64 +func (_e *PrometheusBackend_Expecter) SetMaxUnconfirmedAge(_a0 interface{}, _a1 interface{}) *PrometheusBackend_SetMaxUnconfirmedAge_Call { + return &PrometheusBackend_SetMaxUnconfirmedAge_Call{Call: _e.mock.On("SetMaxUnconfirmedAge", _a0, _a1)} +} + +func (_c *PrometheusBackend_SetMaxUnconfirmedAge_Call) Run(run func(_a0 *big.Int, _a1 float64)) *PrometheusBackend_SetMaxUnconfirmedAge_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*big.Int), args[1].(float64)) + }) + return _c +} + +func (_c *PrometheusBackend_SetMaxUnconfirmedAge_Call) Return() *PrometheusBackend_SetMaxUnconfirmedAge_Call { + _c.Call.Return() + return _c +} + +func (_c *PrometheusBackend_SetMaxUnconfirmedAge_Call) RunAndReturn(run func(*big.Int, float64)) *PrometheusBackend_SetMaxUnconfirmedAge_Call { + _c.Call.Return(run) + return _c +} + // SetMaxUnconfirmedBlocks provides a mock function with given fields: _a0, _a1 func (_m *PrometheusBackend) SetMaxUnconfirmedBlocks(_a0 *big.Int, _a1 int64) { _m.Called(_a0, _a1) } +// PrometheusBackend_SetMaxUnconfirmedBlocks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetMaxUnconfirmedBlocks' +type PrometheusBackend_SetMaxUnconfirmedBlocks_Call struct { + *mock.Call +} + +// SetMaxUnconfirmedBlocks is a helper method to define mock.On call +// - _a0 *big.Int +// - _a1 int64 +func (_e *PrometheusBackend_Expecter) SetMaxUnconfirmedBlocks(_a0 interface{}, _a1 interface{}) *PrometheusBackend_SetMaxUnconfirmedBlocks_Call { + return &PrometheusBackend_SetMaxUnconfirmedBlocks_Call{Call: _e.mock.On("SetMaxUnconfirmedBlocks", _a0, _a1)} +} + +func (_c *PrometheusBackend_SetMaxUnconfirmedBlocks_Call) Run(run func(_a0 *big.Int, _a1 int64)) *PrometheusBackend_SetMaxUnconfirmedBlocks_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*big.Int), args[1].(int64)) + }) + return _c +} + +func (_c *PrometheusBackend_SetMaxUnconfirmedBlocks_Call) Return() *PrometheusBackend_SetMaxUnconfirmedBlocks_Call { + _c.Call.Return() + return _c +} + +func (_c *PrometheusBackend_SetMaxUnconfirmedBlocks_Call) RunAndReturn(run func(*big.Int, int64)) *PrometheusBackend_SetMaxUnconfirmedBlocks_Call { + _c.Call.Return(run) + return _c +} + // SetPipelineRunsQueued provides a mock function with given fields: n func (_m *PrometheusBackend) SetPipelineRunsQueued(n int) { _m.Called(n) } +// PrometheusBackend_SetPipelineRunsQueued_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPipelineRunsQueued' +type PrometheusBackend_SetPipelineRunsQueued_Call struct { + *mock.Call +} + +// SetPipelineRunsQueued is a helper method to define mock.On call +// - n int +func (_e *PrometheusBackend_Expecter) SetPipelineRunsQueued(n interface{}) *PrometheusBackend_SetPipelineRunsQueued_Call { + return &PrometheusBackend_SetPipelineRunsQueued_Call{Call: _e.mock.On("SetPipelineRunsQueued", n)} +} + +func (_c *PrometheusBackend_SetPipelineRunsQueued_Call) Run(run func(n int)) *PrometheusBackend_SetPipelineRunsQueued_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int)) + }) + return _c +} + +func (_c *PrometheusBackend_SetPipelineRunsQueued_Call) Return() *PrometheusBackend_SetPipelineRunsQueued_Call { + _c.Call.Return() + return _c +} + +func (_c *PrometheusBackend_SetPipelineRunsQueued_Call) RunAndReturn(run func(int)) *PrometheusBackend_SetPipelineRunsQueued_Call { + _c.Call.Return(run) + return _c +} + // SetPipelineTaskRunsQueued provides a mock function with given fields: n func (_m *PrometheusBackend) SetPipelineTaskRunsQueued(n int) { _m.Called(n) } +// PrometheusBackend_SetPipelineTaskRunsQueued_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPipelineTaskRunsQueued' +type PrometheusBackend_SetPipelineTaskRunsQueued_Call struct { + *mock.Call +} + +// SetPipelineTaskRunsQueued is a helper method to define mock.On call +// - n int +func (_e *PrometheusBackend_Expecter) SetPipelineTaskRunsQueued(n interface{}) *PrometheusBackend_SetPipelineTaskRunsQueued_Call { + return &PrometheusBackend_SetPipelineTaskRunsQueued_Call{Call: _e.mock.On("SetPipelineTaskRunsQueued", n)} +} + +func (_c *PrometheusBackend_SetPipelineTaskRunsQueued_Call) Run(run func(n int)) *PrometheusBackend_SetPipelineTaskRunsQueued_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int)) + }) + return _c +} + +func (_c *PrometheusBackend_SetPipelineTaskRunsQueued_Call) Return() *PrometheusBackend_SetPipelineTaskRunsQueued_Call { + _c.Call.Return() + return _c +} + +func (_c *PrometheusBackend_SetPipelineTaskRunsQueued_Call) RunAndReturn(run func(int)) *PrometheusBackend_SetPipelineTaskRunsQueued_Call { + _c.Call.Return(run) + return _c +} + // SetUnconfirmedTransactions provides a mock function with given fields: _a0, _a1 func (_m *PrometheusBackend) SetUnconfirmedTransactions(_a0 *big.Int, _a1 int64) { _m.Called(_a0, _a1) } +// PrometheusBackend_SetUnconfirmedTransactions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetUnconfirmedTransactions' +type PrometheusBackend_SetUnconfirmedTransactions_Call struct { + *mock.Call +} + +// SetUnconfirmedTransactions is a helper method to define mock.On call +// - _a0 *big.Int +// - _a1 int64 +func (_e *PrometheusBackend_Expecter) SetUnconfirmedTransactions(_a0 interface{}, _a1 interface{}) *PrometheusBackend_SetUnconfirmedTransactions_Call { + return &PrometheusBackend_SetUnconfirmedTransactions_Call{Call: _e.mock.On("SetUnconfirmedTransactions", _a0, _a1)} +} + +func (_c *PrometheusBackend_SetUnconfirmedTransactions_Call) Run(run func(_a0 *big.Int, _a1 int64)) *PrometheusBackend_SetUnconfirmedTransactions_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*big.Int), args[1].(int64)) + }) + return _c +} + +func (_c *PrometheusBackend_SetUnconfirmedTransactions_Call) Return() *PrometheusBackend_SetUnconfirmedTransactions_Call { + _c.Call.Return() + return _c +} + +func (_c *PrometheusBackend_SetUnconfirmedTransactions_Call) RunAndReturn(run func(*big.Int, int64)) *PrometheusBackend_SetUnconfirmedTransactions_Call { + _c.Call.Return(run) + return _c +} + // NewPrometheusBackend creates a new instance of PrometheusBackend. 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 NewPrometheusBackend(t interface { diff --git a/core/internal/testutils/configtest/general_config.go b/core/internal/testutils/configtest/general_config.go index 5ba3bf1724f..63aba18c351 100644 --- a/core/internal/testutils/configtest/general_config.go +++ b/core/internal/testutils/configtest/general_config.go @@ -58,6 +58,8 @@ func overrides(c *chainlink.Config, s *chainlink.Secrets) { c.JobPipeline.ReaperInterval = commonconfig.MustNewDuration(0) c.JobPipeline.VerboseLogging = ptr(true) + c.Mercury.VerboseLogging = ptr(true) + c.P2P.V2.Enabled = ptr(false) c.WebServer.SessionTimeout = commonconfig.MustNewDuration(2 * time.Minute) diff --git a/core/internal/testutils/testutils.go b/core/internal/testutils/testutils.go index 6b4388fccf4..45609488b46 100644 --- a/core/internal/testutils/testutils.go +++ b/core/internal/testutils/testutils.go @@ -367,15 +367,17 @@ func RequireLogMessage(t *testing.T, observedLogs *observer.ObservedLogs, msg st // // observedZapCore, observedLogs := observer.New(zap.DebugLevel) // lggr := logger.TestLogger(t, observedZapCore) -func WaitForLogMessage(t *testing.T, observedLogs *observer.ObservedLogs, msg string) { +func WaitForLogMessage(t *testing.T, observedLogs *observer.ObservedLogs, msg string) (le observer.LoggedEntry) { AssertEventually(t, func() bool { for _, l := range observedLogs.All() { if strings.Contains(l.Message, msg) { + le = l return true } } return false }) + return } // WaitForLogMessageCount waits until at least count log message containing the diff --git a/core/logger/logger.go b/core/logger/logger.go index 1feaf0f5d6d..881c7b6a760 100644 --- a/core/logger/logger.go +++ b/core/logger/logger.go @@ -51,9 +51,6 @@ func init() { var _ common.Logger = (Logger)(nil) -//go:generate mockery --quiet --name Logger --output . --filename logger_mock_test.go --inpackage --case=underscore -//go:generate mockery --quiet --name Logger --output ./mocks/ --case=underscore - // Logger is the main interface of this package. // It implements uber/zap's SugaredLogger interface and adds conditional logging helpers. // diff --git a/core/logger/logger_mock_test.go b/core/logger/logger_mock_test.go deleted file mode 100644 index 8d52734fe57..00000000000 --- a/core/logger/logger_mock_test.go +++ /dev/null @@ -1,319 +0,0 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package logger - -import ( - mock "github.com/stretchr/testify/mock" - zapcore "go.uber.org/zap/zapcore" -) - -// MockLogger is an autogenerated mock type for the Logger type -type MockLogger struct { - mock.Mock -} - -// Critical provides a mock function with given fields: args -func (_m *MockLogger) Critical(args ...interface{}) { - var _ca []interface{} - _ca = append(_ca, args...) - _m.Called(_ca...) -} - -// Criticalf provides a mock function with given fields: format, values -func (_m *MockLogger) Criticalf(format string, values ...interface{}) { - var _ca []interface{} - _ca = append(_ca, format) - _ca = append(_ca, values...) - _m.Called(_ca...) -} - -// Criticalw provides a mock function with given fields: msg, keysAndValues -func (_m *MockLogger) Criticalw(msg string, keysAndValues ...interface{}) { - var _ca []interface{} - _ca = append(_ca, msg) - _ca = append(_ca, keysAndValues...) - _m.Called(_ca...) -} - -// Debug provides a mock function with given fields: args -func (_m *MockLogger) Debug(args ...interface{}) { - var _ca []interface{} - _ca = append(_ca, args...) - _m.Called(_ca...) -} - -// Debugf provides a mock function with given fields: format, values -func (_m *MockLogger) Debugf(format string, values ...interface{}) { - var _ca []interface{} - _ca = append(_ca, format) - _ca = append(_ca, values...) - _m.Called(_ca...) -} - -// Debugw provides a mock function with given fields: msg, keysAndValues -func (_m *MockLogger) Debugw(msg string, keysAndValues ...interface{}) { - var _ca []interface{} - _ca = append(_ca, msg) - _ca = append(_ca, keysAndValues...) - _m.Called(_ca...) -} - -// Error provides a mock function with given fields: args -func (_m *MockLogger) Error(args ...interface{}) { - var _ca []interface{} - _ca = append(_ca, args...) - _m.Called(_ca...) -} - -// Errorf provides a mock function with given fields: format, values -func (_m *MockLogger) Errorf(format string, values ...interface{}) { - var _ca []interface{} - _ca = append(_ca, format) - _ca = append(_ca, values...) - _m.Called(_ca...) -} - -// Errorw provides a mock function with given fields: msg, keysAndValues -func (_m *MockLogger) Errorw(msg string, keysAndValues ...interface{}) { - var _ca []interface{} - _ca = append(_ca, msg) - _ca = append(_ca, keysAndValues...) - _m.Called(_ca...) -} - -// Fatal provides a mock function with given fields: args -func (_m *MockLogger) Fatal(args ...interface{}) { - var _ca []interface{} - _ca = append(_ca, args...) - _m.Called(_ca...) -} - -// Fatalf provides a mock function with given fields: format, values -func (_m *MockLogger) Fatalf(format string, values ...interface{}) { - var _ca []interface{} - _ca = append(_ca, format) - _ca = append(_ca, values...) - _m.Called(_ca...) -} - -// Fatalw provides a mock function with given fields: msg, keysAndValues -func (_m *MockLogger) Fatalw(msg string, keysAndValues ...interface{}) { - var _ca []interface{} - _ca = append(_ca, msg) - _ca = append(_ca, keysAndValues...) - _m.Called(_ca...) -} - -// Helper provides a mock function with given fields: skip -func (_m *MockLogger) Helper(skip int) Logger { - ret := _m.Called(skip) - - if len(ret) == 0 { - panic("no return value specified for Helper") - } - - var r0 Logger - if rf, ok := ret.Get(0).(func(int) Logger); ok { - r0 = rf(skip) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(Logger) - } - } - - return r0 -} - -// Info provides a mock function with given fields: args -func (_m *MockLogger) Info(args ...interface{}) { - var _ca []interface{} - _ca = append(_ca, args...) - _m.Called(_ca...) -} - -// Infof provides a mock function with given fields: format, values -func (_m *MockLogger) Infof(format string, values ...interface{}) { - var _ca []interface{} - _ca = append(_ca, format) - _ca = append(_ca, values...) - _m.Called(_ca...) -} - -// Infow provides a mock function with given fields: msg, keysAndValues -func (_m *MockLogger) Infow(msg string, keysAndValues ...interface{}) { - var _ca []interface{} - _ca = append(_ca, msg) - _ca = append(_ca, keysAndValues...) - _m.Called(_ca...) -} - -// Name provides a mock function with given fields: -func (_m *MockLogger) 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 -} - -// Named provides a mock function with given fields: name -func (_m *MockLogger) Named(name string) Logger { - ret := _m.Called(name) - - if len(ret) == 0 { - panic("no return value specified for Named") - } - - var r0 Logger - if rf, ok := ret.Get(0).(func(string) Logger); ok { - r0 = rf(name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(Logger) - } - } - - return r0 -} - -// Panic provides a mock function with given fields: args -func (_m *MockLogger) Panic(args ...interface{}) { - var _ca []interface{} - _ca = append(_ca, args...) - _m.Called(_ca...) -} - -// Panicf provides a mock function with given fields: format, values -func (_m *MockLogger) Panicf(format string, values ...interface{}) { - var _ca []interface{} - _ca = append(_ca, format) - _ca = append(_ca, values...) - _m.Called(_ca...) -} - -// Panicw provides a mock function with given fields: msg, keysAndValues -func (_m *MockLogger) Panicw(msg string, keysAndValues ...interface{}) { - var _ca []interface{} - _ca = append(_ca, msg) - _ca = append(_ca, keysAndValues...) - _m.Called(_ca...) -} - -// Recover provides a mock function with given fields: panicErr -func (_m *MockLogger) Recover(panicErr interface{}) { - _m.Called(panicErr) -} - -// SetLogLevel provides a mock function with given fields: _a0 -func (_m *MockLogger) SetLogLevel(_a0 zapcore.Level) { - _m.Called(_a0) -} - -// Sync provides a mock function with given fields: -func (_m *MockLogger) Sync() error { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Sync") - } - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Trace provides a mock function with given fields: args -func (_m *MockLogger) Trace(args ...interface{}) { - var _ca []interface{} - _ca = append(_ca, args...) - _m.Called(_ca...) -} - -// Tracef provides a mock function with given fields: format, values -func (_m *MockLogger) Tracef(format string, values ...interface{}) { - var _ca []interface{} - _ca = append(_ca, format) - _ca = append(_ca, values...) - _m.Called(_ca...) -} - -// Tracew provides a mock function with given fields: msg, keysAndValues -func (_m *MockLogger) Tracew(msg string, keysAndValues ...interface{}) { - var _ca []interface{} - _ca = append(_ca, msg) - _ca = append(_ca, keysAndValues...) - _m.Called(_ca...) -} - -// Warn provides a mock function with given fields: args -func (_m *MockLogger) Warn(args ...interface{}) { - var _ca []interface{} - _ca = append(_ca, args...) - _m.Called(_ca...) -} - -// Warnf provides a mock function with given fields: format, values -func (_m *MockLogger) Warnf(format string, values ...interface{}) { - var _ca []interface{} - _ca = append(_ca, format) - _ca = append(_ca, values...) - _m.Called(_ca...) -} - -// Warnw provides a mock function with given fields: msg, keysAndValues -func (_m *MockLogger) Warnw(msg string, keysAndValues ...interface{}) { - var _ca []interface{} - _ca = append(_ca, msg) - _ca = append(_ca, keysAndValues...) - _m.Called(_ca...) -} - -// With provides a mock function with given fields: args -func (_m *MockLogger) With(args ...interface{}) Logger { - var _ca []interface{} - _ca = append(_ca, args...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for With") - } - - var r0 Logger - if rf, ok := ret.Get(0).(func(...interface{}) Logger); ok { - r0 = rf(args...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(Logger) - } - } - - return r0 -} - -// NewMockLogger creates a new instance of MockLogger. 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 NewMockLogger(t interface { - mock.TestingT - Cleanup(func()) -}) *MockLogger { - mock := &MockLogger{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/logger/logger_mocks.go b/core/logger/logger_mocks.go new file mode 100644 index 00000000000..106de3dd61a --- /dev/null +++ b/core/logger/logger_mocks.go @@ -0,0 +1,1384 @@ +// Code generated by mockery v2.43.2. DO NOT EDIT. + +package logger + +import ( + mock "github.com/stretchr/testify/mock" + zapcore "go.uber.org/zap/zapcore" +) + +// MockLogger is an autogenerated mock type for the Logger type +type MockLogger struct { + mock.Mock +} + +type MockLogger_Expecter struct { + mock *mock.Mock +} + +func (_m *MockLogger) EXPECT() *MockLogger_Expecter { + return &MockLogger_Expecter{mock: &_m.Mock} +} + +// Critical provides a mock function with given fields: args +func (_m *MockLogger) Critical(args ...interface{}) { + var _ca []interface{} + _ca = append(_ca, args...) + _m.Called(_ca...) +} + +// MockLogger_Critical_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Critical' +type MockLogger_Critical_Call struct { + *mock.Call +} + +// Critical is a helper method to define mock.On call +// - args ...interface{} +func (_e *MockLogger_Expecter) Critical(args ...interface{}) *MockLogger_Critical_Call { + return &MockLogger_Critical_Call{Call: _e.mock.On("Critical", + append([]interface{}{}, args...)...)} +} + +func (_c *MockLogger_Critical_Call) Run(run func(args ...interface{})) *MockLogger_Critical_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-0) + for i, a := range args[0:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(variadicArgs...) + }) + return _c +} + +func (_c *MockLogger_Critical_Call) Return() *MockLogger_Critical_Call { + _c.Call.Return() + return _c +} + +func (_c *MockLogger_Critical_Call) RunAndReturn(run func(...interface{})) *MockLogger_Critical_Call { + _c.Call.Return(run) + return _c +} + +// Criticalf provides a mock function with given fields: format, values +func (_m *MockLogger) Criticalf(format string, values ...interface{}) { + var _ca []interface{} + _ca = append(_ca, format) + _ca = append(_ca, values...) + _m.Called(_ca...) +} + +// MockLogger_Criticalf_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Criticalf' +type MockLogger_Criticalf_Call struct { + *mock.Call +} + +// Criticalf is a helper method to define mock.On call +// - format string +// - values ...interface{} +func (_e *MockLogger_Expecter) Criticalf(format interface{}, values ...interface{}) *MockLogger_Criticalf_Call { + return &MockLogger_Criticalf_Call{Call: _e.mock.On("Criticalf", + append([]interface{}{format}, values...)...)} +} + +func (_c *MockLogger_Criticalf_Call) Run(run func(format string, values ...interface{})) *MockLogger_Criticalf_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(args[0].(string), variadicArgs...) + }) + return _c +} + +func (_c *MockLogger_Criticalf_Call) Return() *MockLogger_Criticalf_Call { + _c.Call.Return() + return _c +} + +func (_c *MockLogger_Criticalf_Call) RunAndReturn(run func(string, ...interface{})) *MockLogger_Criticalf_Call { + _c.Call.Return(run) + return _c +} + +// Criticalw provides a mock function with given fields: msg, keysAndValues +func (_m *MockLogger) Criticalw(msg string, keysAndValues ...interface{}) { + var _ca []interface{} + _ca = append(_ca, msg) + _ca = append(_ca, keysAndValues...) + _m.Called(_ca...) +} + +// MockLogger_Criticalw_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Criticalw' +type MockLogger_Criticalw_Call struct { + *mock.Call +} + +// Criticalw is a helper method to define mock.On call +// - msg string +// - keysAndValues ...interface{} +func (_e *MockLogger_Expecter) Criticalw(msg interface{}, keysAndValues ...interface{}) *MockLogger_Criticalw_Call { + return &MockLogger_Criticalw_Call{Call: _e.mock.On("Criticalw", + append([]interface{}{msg}, keysAndValues...)...)} +} + +func (_c *MockLogger_Criticalw_Call) Run(run func(msg string, keysAndValues ...interface{})) *MockLogger_Criticalw_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(args[0].(string), variadicArgs...) + }) + return _c +} + +func (_c *MockLogger_Criticalw_Call) Return() *MockLogger_Criticalw_Call { + _c.Call.Return() + return _c +} + +func (_c *MockLogger_Criticalw_Call) RunAndReturn(run func(string, ...interface{})) *MockLogger_Criticalw_Call { + _c.Call.Return(run) + return _c +} + +// Debug provides a mock function with given fields: args +func (_m *MockLogger) Debug(args ...interface{}) { + var _ca []interface{} + _ca = append(_ca, args...) + _m.Called(_ca...) +} + +// MockLogger_Debug_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Debug' +type MockLogger_Debug_Call struct { + *mock.Call +} + +// Debug is a helper method to define mock.On call +// - args ...interface{} +func (_e *MockLogger_Expecter) Debug(args ...interface{}) *MockLogger_Debug_Call { + return &MockLogger_Debug_Call{Call: _e.mock.On("Debug", + append([]interface{}{}, args...)...)} +} + +func (_c *MockLogger_Debug_Call) Run(run func(args ...interface{})) *MockLogger_Debug_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-0) + for i, a := range args[0:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(variadicArgs...) + }) + return _c +} + +func (_c *MockLogger_Debug_Call) Return() *MockLogger_Debug_Call { + _c.Call.Return() + return _c +} + +func (_c *MockLogger_Debug_Call) RunAndReturn(run func(...interface{})) *MockLogger_Debug_Call { + _c.Call.Return(run) + return _c +} + +// Debugf provides a mock function with given fields: format, values +func (_m *MockLogger) Debugf(format string, values ...interface{}) { + var _ca []interface{} + _ca = append(_ca, format) + _ca = append(_ca, values...) + _m.Called(_ca...) +} + +// MockLogger_Debugf_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Debugf' +type MockLogger_Debugf_Call struct { + *mock.Call +} + +// Debugf is a helper method to define mock.On call +// - format string +// - values ...interface{} +func (_e *MockLogger_Expecter) Debugf(format interface{}, values ...interface{}) *MockLogger_Debugf_Call { + return &MockLogger_Debugf_Call{Call: _e.mock.On("Debugf", + append([]interface{}{format}, values...)...)} +} + +func (_c *MockLogger_Debugf_Call) Run(run func(format string, values ...interface{})) *MockLogger_Debugf_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(args[0].(string), variadicArgs...) + }) + return _c +} + +func (_c *MockLogger_Debugf_Call) Return() *MockLogger_Debugf_Call { + _c.Call.Return() + return _c +} + +func (_c *MockLogger_Debugf_Call) RunAndReturn(run func(string, ...interface{})) *MockLogger_Debugf_Call { + _c.Call.Return(run) + return _c +} + +// Debugw provides a mock function with given fields: msg, keysAndValues +func (_m *MockLogger) Debugw(msg string, keysAndValues ...interface{}) { + var _ca []interface{} + _ca = append(_ca, msg) + _ca = append(_ca, keysAndValues...) + _m.Called(_ca...) +} + +// MockLogger_Debugw_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Debugw' +type MockLogger_Debugw_Call struct { + *mock.Call +} + +// Debugw is a helper method to define mock.On call +// - msg string +// - keysAndValues ...interface{} +func (_e *MockLogger_Expecter) Debugw(msg interface{}, keysAndValues ...interface{}) *MockLogger_Debugw_Call { + return &MockLogger_Debugw_Call{Call: _e.mock.On("Debugw", + append([]interface{}{msg}, keysAndValues...)...)} +} + +func (_c *MockLogger_Debugw_Call) Run(run func(msg string, keysAndValues ...interface{})) *MockLogger_Debugw_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(args[0].(string), variadicArgs...) + }) + return _c +} + +func (_c *MockLogger_Debugw_Call) Return() *MockLogger_Debugw_Call { + _c.Call.Return() + return _c +} + +func (_c *MockLogger_Debugw_Call) RunAndReturn(run func(string, ...interface{})) *MockLogger_Debugw_Call { + _c.Call.Return(run) + return _c +} + +// Error provides a mock function with given fields: args +func (_m *MockLogger) Error(args ...interface{}) { + var _ca []interface{} + _ca = append(_ca, args...) + _m.Called(_ca...) +} + +// MockLogger_Error_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Error' +type MockLogger_Error_Call struct { + *mock.Call +} + +// Error is a helper method to define mock.On call +// - args ...interface{} +func (_e *MockLogger_Expecter) Error(args ...interface{}) *MockLogger_Error_Call { + return &MockLogger_Error_Call{Call: _e.mock.On("Error", + append([]interface{}{}, args...)...)} +} + +func (_c *MockLogger_Error_Call) Run(run func(args ...interface{})) *MockLogger_Error_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-0) + for i, a := range args[0:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(variadicArgs...) + }) + return _c +} + +func (_c *MockLogger_Error_Call) Return() *MockLogger_Error_Call { + _c.Call.Return() + return _c +} + +func (_c *MockLogger_Error_Call) RunAndReturn(run func(...interface{})) *MockLogger_Error_Call { + _c.Call.Return(run) + return _c +} + +// Errorf provides a mock function with given fields: format, values +func (_m *MockLogger) Errorf(format string, values ...interface{}) { + var _ca []interface{} + _ca = append(_ca, format) + _ca = append(_ca, values...) + _m.Called(_ca...) +} + +// MockLogger_Errorf_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Errorf' +type MockLogger_Errorf_Call struct { + *mock.Call +} + +// Errorf is a helper method to define mock.On call +// - format string +// - values ...interface{} +func (_e *MockLogger_Expecter) Errorf(format interface{}, values ...interface{}) *MockLogger_Errorf_Call { + return &MockLogger_Errorf_Call{Call: _e.mock.On("Errorf", + append([]interface{}{format}, values...)...)} +} + +func (_c *MockLogger_Errorf_Call) Run(run func(format string, values ...interface{})) *MockLogger_Errorf_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(args[0].(string), variadicArgs...) + }) + return _c +} + +func (_c *MockLogger_Errorf_Call) Return() *MockLogger_Errorf_Call { + _c.Call.Return() + return _c +} + +func (_c *MockLogger_Errorf_Call) RunAndReturn(run func(string, ...interface{})) *MockLogger_Errorf_Call { + _c.Call.Return(run) + return _c +} + +// Errorw provides a mock function with given fields: msg, keysAndValues +func (_m *MockLogger) Errorw(msg string, keysAndValues ...interface{}) { + var _ca []interface{} + _ca = append(_ca, msg) + _ca = append(_ca, keysAndValues...) + _m.Called(_ca...) +} + +// MockLogger_Errorw_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Errorw' +type MockLogger_Errorw_Call struct { + *mock.Call +} + +// Errorw is a helper method to define mock.On call +// - msg string +// - keysAndValues ...interface{} +func (_e *MockLogger_Expecter) Errorw(msg interface{}, keysAndValues ...interface{}) *MockLogger_Errorw_Call { + return &MockLogger_Errorw_Call{Call: _e.mock.On("Errorw", + append([]interface{}{msg}, keysAndValues...)...)} +} + +func (_c *MockLogger_Errorw_Call) Run(run func(msg string, keysAndValues ...interface{})) *MockLogger_Errorw_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(args[0].(string), variadicArgs...) + }) + return _c +} + +func (_c *MockLogger_Errorw_Call) Return() *MockLogger_Errorw_Call { + _c.Call.Return() + return _c +} + +func (_c *MockLogger_Errorw_Call) RunAndReturn(run func(string, ...interface{})) *MockLogger_Errorw_Call { + _c.Call.Return(run) + return _c +} + +// Fatal provides a mock function with given fields: args +func (_m *MockLogger) Fatal(args ...interface{}) { + var _ca []interface{} + _ca = append(_ca, args...) + _m.Called(_ca...) +} + +// MockLogger_Fatal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Fatal' +type MockLogger_Fatal_Call struct { + *mock.Call +} + +// Fatal is a helper method to define mock.On call +// - args ...interface{} +func (_e *MockLogger_Expecter) Fatal(args ...interface{}) *MockLogger_Fatal_Call { + return &MockLogger_Fatal_Call{Call: _e.mock.On("Fatal", + append([]interface{}{}, args...)...)} +} + +func (_c *MockLogger_Fatal_Call) Run(run func(args ...interface{})) *MockLogger_Fatal_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-0) + for i, a := range args[0:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(variadicArgs...) + }) + return _c +} + +func (_c *MockLogger_Fatal_Call) Return() *MockLogger_Fatal_Call { + _c.Call.Return() + return _c +} + +func (_c *MockLogger_Fatal_Call) RunAndReturn(run func(...interface{})) *MockLogger_Fatal_Call { + _c.Call.Return(run) + return _c +} + +// Fatalf provides a mock function with given fields: format, values +func (_m *MockLogger) Fatalf(format string, values ...interface{}) { + var _ca []interface{} + _ca = append(_ca, format) + _ca = append(_ca, values...) + _m.Called(_ca...) +} + +// MockLogger_Fatalf_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Fatalf' +type MockLogger_Fatalf_Call struct { + *mock.Call +} + +// Fatalf is a helper method to define mock.On call +// - format string +// - values ...interface{} +func (_e *MockLogger_Expecter) Fatalf(format interface{}, values ...interface{}) *MockLogger_Fatalf_Call { + return &MockLogger_Fatalf_Call{Call: _e.mock.On("Fatalf", + append([]interface{}{format}, values...)...)} +} + +func (_c *MockLogger_Fatalf_Call) Run(run func(format string, values ...interface{})) *MockLogger_Fatalf_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(args[0].(string), variadicArgs...) + }) + return _c +} + +func (_c *MockLogger_Fatalf_Call) Return() *MockLogger_Fatalf_Call { + _c.Call.Return() + return _c +} + +func (_c *MockLogger_Fatalf_Call) RunAndReturn(run func(string, ...interface{})) *MockLogger_Fatalf_Call { + _c.Call.Return(run) + return _c +} + +// Fatalw provides a mock function with given fields: msg, keysAndValues +func (_m *MockLogger) Fatalw(msg string, keysAndValues ...interface{}) { + var _ca []interface{} + _ca = append(_ca, msg) + _ca = append(_ca, keysAndValues...) + _m.Called(_ca...) +} + +// MockLogger_Fatalw_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Fatalw' +type MockLogger_Fatalw_Call struct { + *mock.Call +} + +// Fatalw is a helper method to define mock.On call +// - msg string +// - keysAndValues ...interface{} +func (_e *MockLogger_Expecter) Fatalw(msg interface{}, keysAndValues ...interface{}) *MockLogger_Fatalw_Call { + return &MockLogger_Fatalw_Call{Call: _e.mock.On("Fatalw", + append([]interface{}{msg}, keysAndValues...)...)} +} + +func (_c *MockLogger_Fatalw_Call) Run(run func(msg string, keysAndValues ...interface{})) *MockLogger_Fatalw_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(args[0].(string), variadicArgs...) + }) + return _c +} + +func (_c *MockLogger_Fatalw_Call) Return() *MockLogger_Fatalw_Call { + _c.Call.Return() + return _c +} + +func (_c *MockLogger_Fatalw_Call) RunAndReturn(run func(string, ...interface{})) *MockLogger_Fatalw_Call { + _c.Call.Return(run) + return _c +} + +// Helper provides a mock function with given fields: skip +func (_m *MockLogger) Helper(skip int) Logger { + ret := _m.Called(skip) + + if len(ret) == 0 { + panic("no return value specified for Helper") + } + + var r0 Logger + if rf, ok := ret.Get(0).(func(int) Logger); ok { + r0 = rf(skip) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(Logger) + } + } + + return r0 +} + +// MockLogger_Helper_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Helper' +type MockLogger_Helper_Call struct { + *mock.Call +} + +// Helper is a helper method to define mock.On call +// - skip int +func (_e *MockLogger_Expecter) Helper(skip interface{}) *MockLogger_Helper_Call { + return &MockLogger_Helper_Call{Call: _e.mock.On("Helper", skip)} +} + +func (_c *MockLogger_Helper_Call) Run(run func(skip int)) *MockLogger_Helper_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int)) + }) + return _c +} + +func (_c *MockLogger_Helper_Call) Return(_a0 Logger) *MockLogger_Helper_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockLogger_Helper_Call) RunAndReturn(run func(int) Logger) *MockLogger_Helper_Call { + _c.Call.Return(run) + return _c +} + +// Info provides a mock function with given fields: args +func (_m *MockLogger) Info(args ...interface{}) { + var _ca []interface{} + _ca = append(_ca, args...) + _m.Called(_ca...) +} + +// MockLogger_Info_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Info' +type MockLogger_Info_Call struct { + *mock.Call +} + +// Info is a helper method to define mock.On call +// - args ...interface{} +func (_e *MockLogger_Expecter) Info(args ...interface{}) *MockLogger_Info_Call { + return &MockLogger_Info_Call{Call: _e.mock.On("Info", + append([]interface{}{}, args...)...)} +} + +func (_c *MockLogger_Info_Call) Run(run func(args ...interface{})) *MockLogger_Info_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-0) + for i, a := range args[0:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(variadicArgs...) + }) + return _c +} + +func (_c *MockLogger_Info_Call) Return() *MockLogger_Info_Call { + _c.Call.Return() + return _c +} + +func (_c *MockLogger_Info_Call) RunAndReturn(run func(...interface{})) *MockLogger_Info_Call { + _c.Call.Return(run) + return _c +} + +// Infof provides a mock function with given fields: format, values +func (_m *MockLogger) Infof(format string, values ...interface{}) { + var _ca []interface{} + _ca = append(_ca, format) + _ca = append(_ca, values...) + _m.Called(_ca...) +} + +// MockLogger_Infof_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Infof' +type MockLogger_Infof_Call struct { + *mock.Call +} + +// Infof is a helper method to define mock.On call +// - format string +// - values ...interface{} +func (_e *MockLogger_Expecter) Infof(format interface{}, values ...interface{}) *MockLogger_Infof_Call { + return &MockLogger_Infof_Call{Call: _e.mock.On("Infof", + append([]interface{}{format}, values...)...)} +} + +func (_c *MockLogger_Infof_Call) Run(run func(format string, values ...interface{})) *MockLogger_Infof_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(args[0].(string), variadicArgs...) + }) + return _c +} + +func (_c *MockLogger_Infof_Call) Return() *MockLogger_Infof_Call { + _c.Call.Return() + return _c +} + +func (_c *MockLogger_Infof_Call) RunAndReturn(run func(string, ...interface{})) *MockLogger_Infof_Call { + _c.Call.Return(run) + return _c +} + +// Infow provides a mock function with given fields: msg, keysAndValues +func (_m *MockLogger) Infow(msg string, keysAndValues ...interface{}) { + var _ca []interface{} + _ca = append(_ca, msg) + _ca = append(_ca, keysAndValues...) + _m.Called(_ca...) +} + +// MockLogger_Infow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Infow' +type MockLogger_Infow_Call struct { + *mock.Call +} + +// Infow is a helper method to define mock.On call +// - msg string +// - keysAndValues ...interface{} +func (_e *MockLogger_Expecter) Infow(msg interface{}, keysAndValues ...interface{}) *MockLogger_Infow_Call { + return &MockLogger_Infow_Call{Call: _e.mock.On("Infow", + append([]interface{}{msg}, keysAndValues...)...)} +} + +func (_c *MockLogger_Infow_Call) Run(run func(msg string, keysAndValues ...interface{})) *MockLogger_Infow_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(args[0].(string), variadicArgs...) + }) + return _c +} + +func (_c *MockLogger_Infow_Call) Return() *MockLogger_Infow_Call { + _c.Call.Return() + return _c +} + +func (_c *MockLogger_Infow_Call) RunAndReturn(run func(string, ...interface{})) *MockLogger_Infow_Call { + _c.Call.Return(run) + return _c +} + +// Name provides a mock function with given fields: +func (_m *MockLogger) 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 +} + +// MockLogger_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type MockLogger_Name_Call struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *MockLogger_Expecter) Name() *MockLogger_Name_Call { + return &MockLogger_Name_Call{Call: _e.mock.On("Name")} +} + +func (_c *MockLogger_Name_Call) Run(run func()) *MockLogger_Name_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockLogger_Name_Call) Return(_a0 string) *MockLogger_Name_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockLogger_Name_Call) RunAndReturn(run func() string) *MockLogger_Name_Call { + _c.Call.Return(run) + return _c +} + +// Named provides a mock function with given fields: name +func (_m *MockLogger) Named(name string) Logger { + ret := _m.Called(name) + + if len(ret) == 0 { + panic("no return value specified for Named") + } + + var r0 Logger + if rf, ok := ret.Get(0).(func(string) Logger); ok { + r0 = rf(name) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(Logger) + } + } + + return r0 +} + +// MockLogger_Named_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Named' +type MockLogger_Named_Call struct { + *mock.Call +} + +// Named is a helper method to define mock.On call +// - name string +func (_e *MockLogger_Expecter) Named(name interface{}) *MockLogger_Named_Call { + return &MockLogger_Named_Call{Call: _e.mock.On("Named", name)} +} + +func (_c *MockLogger_Named_Call) Run(run func(name string)) *MockLogger_Named_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *MockLogger_Named_Call) Return(_a0 Logger) *MockLogger_Named_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockLogger_Named_Call) RunAndReturn(run func(string) Logger) *MockLogger_Named_Call { + _c.Call.Return(run) + return _c +} + +// Panic provides a mock function with given fields: args +func (_m *MockLogger) Panic(args ...interface{}) { + var _ca []interface{} + _ca = append(_ca, args...) + _m.Called(_ca...) +} + +// MockLogger_Panic_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Panic' +type MockLogger_Panic_Call struct { + *mock.Call +} + +// Panic is a helper method to define mock.On call +// - args ...interface{} +func (_e *MockLogger_Expecter) Panic(args ...interface{}) *MockLogger_Panic_Call { + return &MockLogger_Panic_Call{Call: _e.mock.On("Panic", + append([]interface{}{}, args...)...)} +} + +func (_c *MockLogger_Panic_Call) Run(run func(args ...interface{})) *MockLogger_Panic_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-0) + for i, a := range args[0:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(variadicArgs...) + }) + return _c +} + +func (_c *MockLogger_Panic_Call) Return() *MockLogger_Panic_Call { + _c.Call.Return() + return _c +} + +func (_c *MockLogger_Panic_Call) RunAndReturn(run func(...interface{})) *MockLogger_Panic_Call { + _c.Call.Return(run) + return _c +} + +// Panicf provides a mock function with given fields: format, values +func (_m *MockLogger) Panicf(format string, values ...interface{}) { + var _ca []interface{} + _ca = append(_ca, format) + _ca = append(_ca, values...) + _m.Called(_ca...) +} + +// MockLogger_Panicf_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Panicf' +type MockLogger_Panicf_Call struct { + *mock.Call +} + +// Panicf is a helper method to define mock.On call +// - format string +// - values ...interface{} +func (_e *MockLogger_Expecter) Panicf(format interface{}, values ...interface{}) *MockLogger_Panicf_Call { + return &MockLogger_Panicf_Call{Call: _e.mock.On("Panicf", + append([]interface{}{format}, values...)...)} +} + +func (_c *MockLogger_Panicf_Call) Run(run func(format string, values ...interface{})) *MockLogger_Panicf_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(args[0].(string), variadicArgs...) + }) + return _c +} + +func (_c *MockLogger_Panicf_Call) Return() *MockLogger_Panicf_Call { + _c.Call.Return() + return _c +} + +func (_c *MockLogger_Panicf_Call) RunAndReturn(run func(string, ...interface{})) *MockLogger_Panicf_Call { + _c.Call.Return(run) + return _c +} + +// Panicw provides a mock function with given fields: msg, keysAndValues +func (_m *MockLogger) Panicw(msg string, keysAndValues ...interface{}) { + var _ca []interface{} + _ca = append(_ca, msg) + _ca = append(_ca, keysAndValues...) + _m.Called(_ca...) +} + +// MockLogger_Panicw_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Panicw' +type MockLogger_Panicw_Call struct { + *mock.Call +} + +// Panicw is a helper method to define mock.On call +// - msg string +// - keysAndValues ...interface{} +func (_e *MockLogger_Expecter) Panicw(msg interface{}, keysAndValues ...interface{}) *MockLogger_Panicw_Call { + return &MockLogger_Panicw_Call{Call: _e.mock.On("Panicw", + append([]interface{}{msg}, keysAndValues...)...)} +} + +func (_c *MockLogger_Panicw_Call) Run(run func(msg string, keysAndValues ...interface{})) *MockLogger_Panicw_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(args[0].(string), variadicArgs...) + }) + return _c +} + +func (_c *MockLogger_Panicw_Call) Return() *MockLogger_Panicw_Call { + _c.Call.Return() + return _c +} + +func (_c *MockLogger_Panicw_Call) RunAndReturn(run func(string, ...interface{})) *MockLogger_Panicw_Call { + _c.Call.Return(run) + return _c +} + +// Recover provides a mock function with given fields: panicErr +func (_m *MockLogger) Recover(panicErr interface{}) { + _m.Called(panicErr) +} + +// MockLogger_Recover_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Recover' +type MockLogger_Recover_Call struct { + *mock.Call +} + +// Recover is a helper method to define mock.On call +// - panicErr interface{} +func (_e *MockLogger_Expecter) Recover(panicErr interface{}) *MockLogger_Recover_Call { + return &MockLogger_Recover_Call{Call: _e.mock.On("Recover", panicErr)} +} + +func (_c *MockLogger_Recover_Call) Run(run func(panicErr interface{})) *MockLogger_Recover_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(interface{})) + }) + return _c +} + +func (_c *MockLogger_Recover_Call) Return() *MockLogger_Recover_Call { + _c.Call.Return() + return _c +} + +func (_c *MockLogger_Recover_Call) RunAndReturn(run func(interface{})) *MockLogger_Recover_Call { + _c.Call.Return(run) + return _c +} + +// SetLogLevel provides a mock function with given fields: _a0 +func (_m *MockLogger) SetLogLevel(_a0 zapcore.Level) { + _m.Called(_a0) +} + +// MockLogger_SetLogLevel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetLogLevel' +type MockLogger_SetLogLevel_Call struct { + *mock.Call +} + +// SetLogLevel is a helper method to define mock.On call +// - _a0 zapcore.Level +func (_e *MockLogger_Expecter) SetLogLevel(_a0 interface{}) *MockLogger_SetLogLevel_Call { + return &MockLogger_SetLogLevel_Call{Call: _e.mock.On("SetLogLevel", _a0)} +} + +func (_c *MockLogger_SetLogLevel_Call) Run(run func(_a0 zapcore.Level)) *MockLogger_SetLogLevel_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(zapcore.Level)) + }) + return _c +} + +func (_c *MockLogger_SetLogLevel_Call) Return() *MockLogger_SetLogLevel_Call { + _c.Call.Return() + return _c +} + +func (_c *MockLogger_SetLogLevel_Call) RunAndReturn(run func(zapcore.Level)) *MockLogger_SetLogLevel_Call { + _c.Call.Return(run) + return _c +} + +// Sync provides a mock function with given fields: +func (_m *MockLogger) Sync() error { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Sync") + } + + var r0 error + if rf, ok := ret.Get(0).(func() error); ok { + r0 = rf() + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockLogger_Sync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Sync' +type MockLogger_Sync_Call struct { + *mock.Call +} + +// Sync is a helper method to define mock.On call +func (_e *MockLogger_Expecter) Sync() *MockLogger_Sync_Call { + return &MockLogger_Sync_Call{Call: _e.mock.On("Sync")} +} + +func (_c *MockLogger_Sync_Call) Run(run func()) *MockLogger_Sync_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockLogger_Sync_Call) Return(_a0 error) *MockLogger_Sync_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockLogger_Sync_Call) RunAndReturn(run func() error) *MockLogger_Sync_Call { + _c.Call.Return(run) + return _c +} + +// Trace provides a mock function with given fields: args +func (_m *MockLogger) Trace(args ...interface{}) { + var _ca []interface{} + _ca = append(_ca, args...) + _m.Called(_ca...) +} + +// MockLogger_Trace_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Trace' +type MockLogger_Trace_Call struct { + *mock.Call +} + +// Trace is a helper method to define mock.On call +// - args ...interface{} +func (_e *MockLogger_Expecter) Trace(args ...interface{}) *MockLogger_Trace_Call { + return &MockLogger_Trace_Call{Call: _e.mock.On("Trace", + append([]interface{}{}, args...)...)} +} + +func (_c *MockLogger_Trace_Call) Run(run func(args ...interface{})) *MockLogger_Trace_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-0) + for i, a := range args[0:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(variadicArgs...) + }) + return _c +} + +func (_c *MockLogger_Trace_Call) Return() *MockLogger_Trace_Call { + _c.Call.Return() + return _c +} + +func (_c *MockLogger_Trace_Call) RunAndReturn(run func(...interface{})) *MockLogger_Trace_Call { + _c.Call.Return(run) + return _c +} + +// Tracef provides a mock function with given fields: format, values +func (_m *MockLogger) Tracef(format string, values ...interface{}) { + var _ca []interface{} + _ca = append(_ca, format) + _ca = append(_ca, values...) + _m.Called(_ca...) +} + +// MockLogger_Tracef_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Tracef' +type MockLogger_Tracef_Call struct { + *mock.Call +} + +// Tracef is a helper method to define mock.On call +// - format string +// - values ...interface{} +func (_e *MockLogger_Expecter) Tracef(format interface{}, values ...interface{}) *MockLogger_Tracef_Call { + return &MockLogger_Tracef_Call{Call: _e.mock.On("Tracef", + append([]interface{}{format}, values...)...)} +} + +func (_c *MockLogger_Tracef_Call) Run(run func(format string, values ...interface{})) *MockLogger_Tracef_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(args[0].(string), variadicArgs...) + }) + return _c +} + +func (_c *MockLogger_Tracef_Call) Return() *MockLogger_Tracef_Call { + _c.Call.Return() + return _c +} + +func (_c *MockLogger_Tracef_Call) RunAndReturn(run func(string, ...interface{})) *MockLogger_Tracef_Call { + _c.Call.Return(run) + return _c +} + +// Tracew provides a mock function with given fields: msg, keysAndValues +func (_m *MockLogger) Tracew(msg string, keysAndValues ...interface{}) { + var _ca []interface{} + _ca = append(_ca, msg) + _ca = append(_ca, keysAndValues...) + _m.Called(_ca...) +} + +// MockLogger_Tracew_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Tracew' +type MockLogger_Tracew_Call struct { + *mock.Call +} + +// Tracew is a helper method to define mock.On call +// - msg string +// - keysAndValues ...interface{} +func (_e *MockLogger_Expecter) Tracew(msg interface{}, keysAndValues ...interface{}) *MockLogger_Tracew_Call { + return &MockLogger_Tracew_Call{Call: _e.mock.On("Tracew", + append([]interface{}{msg}, keysAndValues...)...)} +} + +func (_c *MockLogger_Tracew_Call) Run(run func(msg string, keysAndValues ...interface{})) *MockLogger_Tracew_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(args[0].(string), variadicArgs...) + }) + return _c +} + +func (_c *MockLogger_Tracew_Call) Return() *MockLogger_Tracew_Call { + _c.Call.Return() + return _c +} + +func (_c *MockLogger_Tracew_Call) RunAndReturn(run func(string, ...interface{})) *MockLogger_Tracew_Call { + _c.Call.Return(run) + return _c +} + +// Warn provides a mock function with given fields: args +func (_m *MockLogger) Warn(args ...interface{}) { + var _ca []interface{} + _ca = append(_ca, args...) + _m.Called(_ca...) +} + +// MockLogger_Warn_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Warn' +type MockLogger_Warn_Call struct { + *mock.Call +} + +// Warn is a helper method to define mock.On call +// - args ...interface{} +func (_e *MockLogger_Expecter) Warn(args ...interface{}) *MockLogger_Warn_Call { + return &MockLogger_Warn_Call{Call: _e.mock.On("Warn", + append([]interface{}{}, args...)...)} +} + +func (_c *MockLogger_Warn_Call) Run(run func(args ...interface{})) *MockLogger_Warn_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-0) + for i, a := range args[0:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(variadicArgs...) + }) + return _c +} + +func (_c *MockLogger_Warn_Call) Return() *MockLogger_Warn_Call { + _c.Call.Return() + return _c +} + +func (_c *MockLogger_Warn_Call) RunAndReturn(run func(...interface{})) *MockLogger_Warn_Call { + _c.Call.Return(run) + return _c +} + +// Warnf provides a mock function with given fields: format, values +func (_m *MockLogger) Warnf(format string, values ...interface{}) { + var _ca []interface{} + _ca = append(_ca, format) + _ca = append(_ca, values...) + _m.Called(_ca...) +} + +// MockLogger_Warnf_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Warnf' +type MockLogger_Warnf_Call struct { + *mock.Call +} + +// Warnf is a helper method to define mock.On call +// - format string +// - values ...interface{} +func (_e *MockLogger_Expecter) Warnf(format interface{}, values ...interface{}) *MockLogger_Warnf_Call { + return &MockLogger_Warnf_Call{Call: _e.mock.On("Warnf", + append([]interface{}{format}, values...)...)} +} + +func (_c *MockLogger_Warnf_Call) Run(run func(format string, values ...interface{})) *MockLogger_Warnf_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(args[0].(string), variadicArgs...) + }) + return _c +} + +func (_c *MockLogger_Warnf_Call) Return() *MockLogger_Warnf_Call { + _c.Call.Return() + return _c +} + +func (_c *MockLogger_Warnf_Call) RunAndReturn(run func(string, ...interface{})) *MockLogger_Warnf_Call { + _c.Call.Return(run) + return _c +} + +// Warnw provides a mock function with given fields: msg, keysAndValues +func (_m *MockLogger) Warnw(msg string, keysAndValues ...interface{}) { + var _ca []interface{} + _ca = append(_ca, msg) + _ca = append(_ca, keysAndValues...) + _m.Called(_ca...) +} + +// MockLogger_Warnw_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Warnw' +type MockLogger_Warnw_Call struct { + *mock.Call +} + +// Warnw is a helper method to define mock.On call +// - msg string +// - keysAndValues ...interface{} +func (_e *MockLogger_Expecter) Warnw(msg interface{}, keysAndValues ...interface{}) *MockLogger_Warnw_Call { + return &MockLogger_Warnw_Call{Call: _e.mock.On("Warnw", + append([]interface{}{msg}, keysAndValues...)...)} +} + +func (_c *MockLogger_Warnw_Call) Run(run func(msg string, keysAndValues ...interface{})) *MockLogger_Warnw_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(args[0].(string), variadicArgs...) + }) + return _c +} + +func (_c *MockLogger_Warnw_Call) Return() *MockLogger_Warnw_Call { + _c.Call.Return() + return _c +} + +func (_c *MockLogger_Warnw_Call) RunAndReturn(run func(string, ...interface{})) *MockLogger_Warnw_Call { + _c.Call.Return(run) + return _c +} + +// With provides a mock function with given fields: args +func (_m *MockLogger) With(args ...interface{}) Logger { + var _ca []interface{} + _ca = append(_ca, args...) + ret := _m.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for With") + } + + var r0 Logger + if rf, ok := ret.Get(0).(func(...interface{}) Logger); ok { + r0 = rf(args...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(Logger) + } + } + + return r0 +} + +// MockLogger_With_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'With' +type MockLogger_With_Call struct { + *mock.Call +} + +// With is a helper method to define mock.On call +// - args ...interface{} +func (_e *MockLogger_Expecter) With(args ...interface{}) *MockLogger_With_Call { + return &MockLogger_With_Call{Call: _e.mock.On("With", + append([]interface{}{}, args...)...)} +} + +func (_c *MockLogger_With_Call) Run(run func(args ...interface{})) *MockLogger_With_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]interface{}, len(args)-0) + for i, a := range args[0:] { + if a != nil { + variadicArgs[i] = a.(interface{}) + } + } + run(variadicArgs...) + }) + return _c +} + +func (_c *MockLogger_With_Call) Return(_a0 Logger) *MockLogger_With_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockLogger_With_Call) RunAndReturn(run func(...interface{}) Logger) *MockLogger_With_Call { + _c.Call.Return(run) + return _c +} + +// NewMockLogger creates a new instance of MockLogger. 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 NewMockLogger(t interface { + mock.TestingT + Cleanup(func()) +}) *MockLogger { + mock := &MockLogger{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/core/logger/mocks/logger.go b/core/logger/mocks/logger.go deleted file mode 100644 index 7e56bf8d22b..00000000000 --- a/core/logger/mocks/logger.go +++ /dev/null @@ -1,321 +0,0 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package mocks - -import ( - logger "github.com/smartcontractkit/chainlink/v2/core/logger" - mock "github.com/stretchr/testify/mock" - - zapcore "go.uber.org/zap/zapcore" -) - -// Logger is an autogenerated mock type for the Logger type -type Logger struct { - mock.Mock -} - -// Critical provides a mock function with given fields: args -func (_m *Logger) Critical(args ...interface{}) { - var _ca []interface{} - _ca = append(_ca, args...) - _m.Called(_ca...) -} - -// Criticalf provides a mock function with given fields: format, values -func (_m *Logger) Criticalf(format string, values ...interface{}) { - var _ca []interface{} - _ca = append(_ca, format) - _ca = append(_ca, values...) - _m.Called(_ca...) -} - -// Criticalw provides a mock function with given fields: msg, keysAndValues -func (_m *Logger) Criticalw(msg string, keysAndValues ...interface{}) { - var _ca []interface{} - _ca = append(_ca, msg) - _ca = append(_ca, keysAndValues...) - _m.Called(_ca...) -} - -// Debug provides a mock function with given fields: args -func (_m *Logger) Debug(args ...interface{}) { - var _ca []interface{} - _ca = append(_ca, args...) - _m.Called(_ca...) -} - -// Debugf provides a mock function with given fields: format, values -func (_m *Logger) Debugf(format string, values ...interface{}) { - var _ca []interface{} - _ca = append(_ca, format) - _ca = append(_ca, values...) - _m.Called(_ca...) -} - -// Debugw provides a mock function with given fields: msg, keysAndValues -func (_m *Logger) Debugw(msg string, keysAndValues ...interface{}) { - var _ca []interface{} - _ca = append(_ca, msg) - _ca = append(_ca, keysAndValues...) - _m.Called(_ca...) -} - -// Error provides a mock function with given fields: args -func (_m *Logger) Error(args ...interface{}) { - var _ca []interface{} - _ca = append(_ca, args...) - _m.Called(_ca...) -} - -// Errorf provides a mock function with given fields: format, values -func (_m *Logger) Errorf(format string, values ...interface{}) { - var _ca []interface{} - _ca = append(_ca, format) - _ca = append(_ca, values...) - _m.Called(_ca...) -} - -// Errorw provides a mock function with given fields: msg, keysAndValues -func (_m *Logger) Errorw(msg string, keysAndValues ...interface{}) { - var _ca []interface{} - _ca = append(_ca, msg) - _ca = append(_ca, keysAndValues...) - _m.Called(_ca...) -} - -// Fatal provides a mock function with given fields: args -func (_m *Logger) Fatal(args ...interface{}) { - var _ca []interface{} - _ca = append(_ca, args...) - _m.Called(_ca...) -} - -// Fatalf provides a mock function with given fields: format, values -func (_m *Logger) Fatalf(format string, values ...interface{}) { - var _ca []interface{} - _ca = append(_ca, format) - _ca = append(_ca, values...) - _m.Called(_ca...) -} - -// Fatalw provides a mock function with given fields: msg, keysAndValues -func (_m *Logger) Fatalw(msg string, keysAndValues ...interface{}) { - var _ca []interface{} - _ca = append(_ca, msg) - _ca = append(_ca, keysAndValues...) - _m.Called(_ca...) -} - -// Helper provides a mock function with given fields: skip -func (_m *Logger) Helper(skip int) logger.Logger { - ret := _m.Called(skip) - - if len(ret) == 0 { - panic("no return value specified for Helper") - } - - var r0 logger.Logger - if rf, ok := ret.Get(0).(func(int) logger.Logger); ok { - r0 = rf(skip) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(logger.Logger) - } - } - - return r0 -} - -// Info provides a mock function with given fields: args -func (_m *Logger) Info(args ...interface{}) { - var _ca []interface{} - _ca = append(_ca, args...) - _m.Called(_ca...) -} - -// Infof provides a mock function with given fields: format, values -func (_m *Logger) Infof(format string, values ...interface{}) { - var _ca []interface{} - _ca = append(_ca, format) - _ca = append(_ca, values...) - _m.Called(_ca...) -} - -// Infow provides a mock function with given fields: msg, keysAndValues -func (_m *Logger) Infow(msg string, keysAndValues ...interface{}) { - var _ca []interface{} - _ca = append(_ca, msg) - _ca = append(_ca, keysAndValues...) - _m.Called(_ca...) -} - -// Name provides a mock function with given fields: -func (_m *Logger) 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 -} - -// Named provides a mock function with given fields: name -func (_m *Logger) Named(name string) logger.Logger { - ret := _m.Called(name) - - if len(ret) == 0 { - panic("no return value specified for Named") - } - - var r0 logger.Logger - if rf, ok := ret.Get(0).(func(string) logger.Logger); ok { - r0 = rf(name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(logger.Logger) - } - } - - return r0 -} - -// Panic provides a mock function with given fields: args -func (_m *Logger) Panic(args ...interface{}) { - var _ca []interface{} - _ca = append(_ca, args...) - _m.Called(_ca...) -} - -// Panicf provides a mock function with given fields: format, values -func (_m *Logger) Panicf(format string, values ...interface{}) { - var _ca []interface{} - _ca = append(_ca, format) - _ca = append(_ca, values...) - _m.Called(_ca...) -} - -// Panicw provides a mock function with given fields: msg, keysAndValues -func (_m *Logger) Panicw(msg string, keysAndValues ...interface{}) { - var _ca []interface{} - _ca = append(_ca, msg) - _ca = append(_ca, keysAndValues...) - _m.Called(_ca...) -} - -// Recover provides a mock function with given fields: panicErr -func (_m *Logger) Recover(panicErr interface{}) { - _m.Called(panicErr) -} - -// SetLogLevel provides a mock function with given fields: _a0 -func (_m *Logger) SetLogLevel(_a0 zapcore.Level) { - _m.Called(_a0) -} - -// Sync provides a mock function with given fields: -func (_m *Logger) Sync() error { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Sync") - } - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Trace provides a mock function with given fields: args -func (_m *Logger) Trace(args ...interface{}) { - var _ca []interface{} - _ca = append(_ca, args...) - _m.Called(_ca...) -} - -// Tracef provides a mock function with given fields: format, values -func (_m *Logger) Tracef(format string, values ...interface{}) { - var _ca []interface{} - _ca = append(_ca, format) - _ca = append(_ca, values...) - _m.Called(_ca...) -} - -// Tracew provides a mock function with given fields: msg, keysAndValues -func (_m *Logger) Tracew(msg string, keysAndValues ...interface{}) { - var _ca []interface{} - _ca = append(_ca, msg) - _ca = append(_ca, keysAndValues...) - _m.Called(_ca...) -} - -// Warn provides a mock function with given fields: args -func (_m *Logger) Warn(args ...interface{}) { - var _ca []interface{} - _ca = append(_ca, args...) - _m.Called(_ca...) -} - -// Warnf provides a mock function with given fields: format, values -func (_m *Logger) Warnf(format string, values ...interface{}) { - var _ca []interface{} - _ca = append(_ca, format) - _ca = append(_ca, values...) - _m.Called(_ca...) -} - -// Warnw provides a mock function with given fields: msg, keysAndValues -func (_m *Logger) Warnw(msg string, keysAndValues ...interface{}) { - var _ca []interface{} - _ca = append(_ca, msg) - _ca = append(_ca, keysAndValues...) - _m.Called(_ca...) -} - -// With provides a mock function with given fields: args -func (_m *Logger) With(args ...interface{}) logger.Logger { - var _ca []interface{} - _ca = append(_ca, args...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for With") - } - - var r0 logger.Logger - if rf, ok := ret.Get(0).(func(...interface{}) logger.Logger); ok { - r0 = rf(args...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(logger.Logger) - } - } - - return r0 -} - -// NewLogger creates a new instance of Logger. 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 NewLogger(t interface { - mock.TestingT - Cleanup(func()) -}) *Logger { - mock := &Logger{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/scripts/common/helpers.go b/core/scripts/common/helpers.go index a71222e8749..57c8c15e405 100644 --- a/core/scripts/common/helpers.go +++ b/core/scripts/common/helpers.go @@ -590,10 +590,11 @@ func IsAvaxNetwork(chainID int64) bool { func IsAvaxSubnet(chainID int64) bool { return chainID == 335 || // DFK testnet chainID == 53935 || // DFK mainnet - chainID == 955081 || // Nexon Dev + chainID == 5668 || // Nexon Dev chainID == 595581 || // Nexon Test chainID == 807424 || // Nexon QA - chainID == 847799 // Nexon Stage + chainID == 847799 || // Nexon Stage + chainID == 60118 // Nexon Mainnet } func UpkeepLink(chainID int64, upkeepID *big.Int) string { diff --git a/core/scripts/common/vrf/setup-envs/main.go b/core/scripts/common/vrf/setup-envs/main.go index a5198f8abbe..f89b91db063 100644 --- a/core/scripts/common/vrf/setup-envs/main.go +++ b/core/scripts/common/vrf/setup-envs/main.go @@ -82,6 +82,7 @@ func main() { bhsJobRunTimeout := flag.String("bhs-job-run-timeout", "1m", "") vrfVersion := flag.String("vrf-version", "v2", "VRF version to use") + coordinatorType := flag.String("coordinator-type", "", "Specify which coordinator type to use: layer1, arbitrum, optimism") deployContractsAndCreateJobs := flag.Bool("deploy-contracts-and-create-jobs", false, "whether to deploy contracts and create jobs") subscriptionBalanceJuelsString := flag.String("subscription-balance", constants.SubscriptionBalanceJuels, "amount to fund subscription with Link token (Juels)") @@ -108,6 +109,10 @@ func main() { linkPremiumPercentage := flag.Int64("link-premium-percentage", 1, "premium percentage for LINK payment") simulationBlock := flag.String("simulation-block", "pending", "simulation block can be 'pending' or 'latest'") + // only necessary for Optimism coordinator contract + optimismL1GasFeeCalculationMode := flag.Uint64("optimism-l1-fee-mode", 0, "Choose Optimism coordinator contract L1 fee calculation mode: 0, 1, 2") + optimismL1GasFeeCoefficient := flag.Uint64("optimism-l1-fee-coefficient", 100, "Choose Optimism coordinator contract L1 fee coefficient percentage [1, 100]") + e := helpers.SetupEnv(false) flag.Parse() nodesMap := make(map[string]model.Node) @@ -117,6 +122,11 @@ func main() { } fmt.Println("Using VRF Version:", *vrfVersion) + if *coordinatorType != "layer1" && *coordinatorType != "arbitrum" && *coordinatorType != "optimism" { + panic(fmt.Sprintf("Invalid Coordinator type `%s`. Only `layer1`, `arbitrum` and `optimism` are supported", *coordinatorType)) + } + fmt.Println("Using Coordinator type:", *coordinatorType) + if *simulationBlock != "pending" && *simulationBlock != "latest" { helpers.PanicErr(fmt.Errorf("simulation block must be 'pending' or 'latest'")) } @@ -303,6 +313,9 @@ func main() { coordinatorJobSpecConfig, bhsJobSpecConfig, *simulationBlock, + *coordinatorType, + uint8(*optimismL1GasFeeCalculationMode), + uint8(*optimismL1GasFeeCoefficient), ) } diff --git a/core/scripts/go.mod b/core/scripts/go.mod index d9819212e1c..0c0c95d392f 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -1,8 +1,6 @@ module github.com/smartcontractkit/chainlink/core/scripts -go 1.22.0 - -toolchain go1.22.3 +go 1.22.5 // Make sure we're working with the latest chainlink libs replace github.com/smartcontractkit/chainlink/v2 => ../../ @@ -14,28 +12,26 @@ require ( github.com/gkampitakis/go-snaps v0.5.4 github.com/google/go-cmp v0.6.0 github.com/google/uuid v1.6.0 - github.com/jmoiron/sqlx v1.3.5 + github.com/jmoiron/sqlx v1.4.0 github.com/joho/godotenv v1.4.0 github.com/jonboulle/clockwork v0.4.0 github.com/manyminds/api2go v0.0.0-20171030193247-e7b693844a6f 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/pelletier/go-toml/v2 v2.2.0 github.com/prometheus/client_golang v1.17.0 github.com/shopspring/decimal v1.3.1 github.com/smartcontractkit/chainlink-automation v1.0.4 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240620164046-1c03d0a97b20 - github.com/smartcontractkit/chainlink-vrf v0.0.0-20240222010609-cd67d123c772 + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240712162033-89bd3351ce6e github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000 - github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c + github.com/smartcontractkit/libocr v0.0.0-20240702141926-063ceef8c42e github.com/spf13/cobra v1.8.0 github.com/spf13/viper v1.15.0 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 - go.dedis.ch/kyber/v3 v3.1.0 - google.golang.org/protobuf v1.33.0 + google.golang.org/protobuf v1.34.1 k8s.io/api v0.30.0 k8s.io/apimachinery v0.30.0 k8s.io/client-go v0.30.0 @@ -48,7 +44,7 @@ require ( cosmossdk.io/depinject v1.0.0-alpha.3 // indirect cosmossdk.io/errors v1.0.0 // indirect cosmossdk.io/math v1.0.1 // indirect - filippo.io/edwards25519 v1.0.0 // indirect + filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 // indirect @@ -76,7 +72,7 @@ require ( github.com/buger/jsonparser v1.1.1 // indirect github.com/bytedance/sonic v1.10.1 // indirect github.com/cenkalti/backoff v2.2.1+incompatible // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect @@ -161,7 +157,7 @@ require ( github.com/gofrs/flock v0.8.1 // indirect github.com/gogo/protobuf v1.3.3 // indirect github.com/golang-jwt/jwt/v5 v5.2.0 // indirect - github.com/golang/glog v1.1.2 // indirect + github.com/golang/glog v1.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect @@ -179,10 +175,10 @@ require ( 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 - 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 + github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1 // indirect + github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect 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 @@ -234,6 +230,7 @@ require ( github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect + github.com/mfridman/interpolate v0.0.2 // indirect github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect @@ -256,7 +253,7 @@ require ( github.com/pkg/errors v0.9.1 // indirect 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/pressly/goose/v3 v3.21.1 // 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 @@ -272,22 +269,22 @@ require ( github.com/sethvargo/go-retry v0.2.4 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/shirou/gopsutil/v3 v3.24.3 // indirect - github.com/sirupsen/logrus v1.9.3 // indirect github.com/smartcontractkit/chain-selectors v1.0.10 // indirect - github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d // indirect - github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 // indirect - github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917 // indirect - github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240605170242-555ff582f36a // indirect - github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240531021326-99118e47f696 // indirect + github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45 // indirect + github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240716180914-6fd88994c89c // indirect + github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827 // indirect + github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240712132946-267a37c5ac6e // indirect + github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799 // indirect github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 // indirect github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 // indirect - github.com/smartcontractkit/wsrpc v0.8.1 // indirect + github.com/smartcontractkit/wsrpc v0.7.3 // indirect github.com/spf13/afero v1.9.5 // indirect github.com/spf13/cast v1.6.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/status-im/keycard-go v0.2.0 // indirect github.com/streamingfast/logging v0.0.0-20220405224725-2755dab2ce75 // indirect + github.com/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 @@ -315,39 +312,39 @@ require ( github.com/zondax/hid v0.9.1 // indirect github.com/zondax/ledger-go v0.14.1 // indirect go.dedis.ch/fixbuf v1.0.3 // indirect + go.dedis.ch/kyber/v3 v3.1.0 // indirect go.etcd.io/bbolt v1.3.7 // indirect go.mongodb.org/mongo-driver v1.15.0 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.49.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 // indirect - 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.24.0 // indirect - go.opentelemetry.io/otel/sdk v1.21.0 // indirect - go.opentelemetry.io/otel/trace v1.24.0 // indirect - go.opentelemetry.io/proto/otlp v1.0.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 // indirect + go.opentelemetry.io/otel v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/sdk v1.27.0 // indirect + go.opentelemetry.io/otel/trace v1.27.0 // indirect + go.opentelemetry.io/proto/otlp v1.2.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/ratelimit v0.3.0 // indirect go.uber.org/zap v1.26.0 // indirect golang.org/x/arch v0.7.0 // indirect - golang.org/x/crypto v0.22.0 // indirect - golang.org/x/exp v0.0.0-20240213143201-ec583247a57a // indirect - golang.org/x/mod v0.15.0 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/oauth2 v0.17.0 // indirect - golang.org/x/sync v0.6.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/term v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect + golang.org/x/crypto v0.24.0 // indirect + golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 // indirect + golang.org/x/mod v0.17.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/oauth2 v0.20.0 // indirect + golang.org/x/sync v0.7.0 // indirect + golang.org/x/sys v0.21.0 // indirect + golang.org/x/term v0.21.0 // indirect + golang.org/x/text v0.16.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.18.0 // indirect + golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect gonum.org/v1/gonum v0.14.0 // indirect - google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect - google.golang.org/grpc v1.59.0 // indirect + google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/grpc v1.64.0 // indirect gopkg.in/guregu/null.v4 v4.0.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect diff --git a/core/scripts/go.sum b/core/scripts/go.sum index abb1d0c460f..5b991e1a608 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -18,23 +18,22 @@ cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHOb cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go v0.110.9 h1:e7ITSqGFFk4rbz/JFIqZh3G4VEHguhAL4BQcFlWtU68= -cloud.google.com/go v0.110.9/go.mod h1:rpxevX/0Lqvlbc88b7Sc1SPNdyK1riNBTUU6JXhYNpM= +cloud.google.com/go v0.112.1 h1:uJSeirPke5UNZHIb4SxfZklVSiWWVqW4oXlETwZziwM= +cloud.google.com/go v0.112.1/go.mod h1:+Vbu+Y1UU+I1rjmzeMOb/8RfkKJK2Gyxi1X6jJCZLo4= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= -cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/compute v1.25.1 h1:ZRpHJedLtTpKgr3RV1Fx23NuaAEN1Zfx9hw1u4aJdjU= +cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= +cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/iam v1.1.4 h1:K6n/GZHFTtEoKT5aUG3l9diPi0VduZNQ1PfdnpkkIFk= -cloud.google.com/go/iam v1.1.4/go.mod h1:l/rg8l1AaA+VFMho/HYx2Vv6xinPSLMF8qfhRPIZ0L8= +cloud.google.com/go/iam v1.1.6 h1:bEa06k05IO4f4uJonbB5iAgKTPpABy1ayxaIZV/GHVc= +cloud.google.com/go/iam v1.1.6/go.mod h1:O0zxdPeGBoFdWW3HWmBxJsk0pfvNM/p/qa82rWOGTwI= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -45,8 +44,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/oNM= -cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= +cloud.google.com/go/storage v1.38.0 h1:Az68ZRGlnNTpIBbLjSMIV2BDcwwXYlRlQzis0llkpJg= +cloud.google.com/go/storage v1.38.0/go.mod h1:tlUADB0mAb9BgYls9lq+8MGkfzOXuLrnHXlpHmvFJoY= contrib.go.opencensus.io/exporter/stackdriver v0.12.6/go.mod h1:8x999/OcIPy5ivx/wDiV7Gx4D+VUPODf0mWRGRc5kSk= contrib.go.opencensus.io/exporter/stackdriver v0.13.4/go.mod h1:aXENhDJ1Y4lIg4EUaVTwzvYETVNZk10Pu26tevFKLUc= contrib.go.opencensus.io/exporter/stackdriver v0.13.5 h1:TNaexHK16gPUoc7uzELKOU7JULqccn1NDuqUxmxSqfo= @@ -67,8 +66,8 @@ cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw cosmossdk.io/tools/rosetta v0.2.1/go.mod h1:Pqdc1FdvkNV3LcNIkYWt2RQY6IP1ge6YWZk8MhhO9Hw= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= -filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= -filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= +filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= +filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= @@ -85,10 +84,6 @@ github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbi github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= -github.com/ClickHouse/ch-go v0.58.2 h1:jSm2szHbT9MCAB1rJ3WuCJqmGLi5UTjlNu+f530UTS0= -github.com/ClickHouse/ch-go v0.58.2/go.mod h1:Ap/0bEmiLa14gYjCiRkYGbXvbe8vwdrfTYWhsuQ99aw= -github.com/ClickHouse/clickhouse-go/v2 v2.15.0 h1:G0hTKyO8fXXR1bGnZ0DY3vTG01xYfOGW76zgjg5tmC4= -github.com/ClickHouse/clickhouse-go/v2 v2.15.0/go.mod h1:kXt1SRq0PIRa6aKZD7TnFnY9PQKmc2b13sHtOYcK6cQ= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= github.com/CosmWasm/wasmd v0.40.1 h1:LxbO78t/6S8TkeQlUrJ0m5O87HtAwLx4RGHq3rdrOEU= @@ -139,8 +134,6 @@ github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax github.com/allegro/bigcache v1.2.1 h1:hg1sY1raCwic3Vnsvje6TT7/pnZba83LeFck5NrFKSc= github.com/allegro/bigcache v1.2.1/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129/go.mod h1:rFgpPQZYZ8vdbc+48xibu8ALc3yeyd64IhHS+PU6Yyg= -github.com/andybalholm/brotli v1.0.6 h1:Yf9fFpf49Zrxb9NlQaluyE92/+X7UVHlhMNJN2sxfOI= -github.com/andybalholm/brotli v1.0.6/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/appleboy/gofight/v2 v2.1.2 h1:VOy3jow4vIK8BRQJoC/I9muxyYlJ2yb9ht2hZoS3rf4= github.com/appleboy/gofight/v2 v2.1.2/go.mod h1:frW+U1QZEdDgixycTj4CygQ48yLTUhplt43+Wczp3rw= @@ -211,8 +204,8 @@ github.com/bytedance/sonic v1.10.1 h1:7a1wuFXL1cMy7a3f7/VFcEtriuXQnUBhtoVfOZiays github.com/bytedance/sonic v1.10.1/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v1.1.1 h1:nCb6ZLdB7NRaqsm91JtQTAme2SKJzXVsdPIPkyJr1MU= github.com/cespare/cp v1.1.1/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= @@ -238,8 +231,6 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= @@ -273,8 +264,8 @@ github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/Yj github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M= github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY= -github.com/containerd/continuity v0.4.3 h1:6HVkalIp+2u1ZLH1J/pYX2oBVXlJZvh1X1A7bEZ9Su8= -github.com/containerd/continuity v0.4.3/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= +github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -359,8 +350,6 @@ github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUn github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/docker/cli v24.0.7+incompatible h1:wa/nIwYFW7BVTGa7SWPVyyXU9lgORqUb1xfI36MSkFg= -github.com/docker/cli v24.0.7+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= @@ -377,10 +366,6 @@ github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+m github.com/dvsekhvalnov/jose2go v1.7.0 h1:bnQc8+GMnidJZA8zc6lLEAb4xNrIqHwO+9TzqvtQZPo= github.com/dvsekhvalnov/jose2go v1.7.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= -github.com/elastic/go-sysinfo v1.11.1 h1:g9mwl05njS4r69TisC+vwHWTSKywZFYYUu3so3T/Lao= -github.com/elastic/go-sysinfo v1.11.1/go.mod h1:6KQb31j0QeWBDF88jIdWSxE8cwoOB9tO4Y4osN7Q70E= -github.com/elastic/go-windows v1.0.1 h1:AlYZOldA+UJ0/2nBuqWdo90GFCgG9xuyw9SYzGUtJm0= -github.com/elastic/go-windows v1.0.1/go.mod h1:FoVvqWSun28vaDQPbj2Elfc0JahhPB7WQEGa3c814Ss= github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -390,8 +375,6 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= -github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= github.com/esote/minmaxheap v1.0.0 h1:rgA7StnXXpZG6qlM0S7pUmEv1KpWe32rYT4x8J8ntaA= github.com/esote/minmaxheap v1.0.0/go.mod h1:Ln8+i7fS1k3PLgZI2JAo0iA1as95QnIYiGCrqSJ5FZk= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= @@ -412,8 +395,8 @@ github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYF github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= -github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= @@ -475,10 +458,6 @@ github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclK github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= -github.com/go-faster/city v1.0.1 h1:4WAxSZ3V2Ws4QRDrscLEDcibJY8uf41H6AhXDrNDcGw= -github.com/go-faster/city v1.0.1/go.mod h1:jKcUJId49qdW3L1qKHH/3wPeUstCVpVSXTM6vO3VcTw= -github.com/go-faster/errors v0.6.1 h1:nNIPOBkprlKzkThvS/0YaX8Zs9KewLCOSFQS5BU06FI= -github.com/go-faster/errors v0.6.1/go.mod h1:5MGV2/2T9yvlrbhe9pD9LO5Z/2zCSq2T8j+Jpi2LAyY= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -526,9 +505,8 @@ github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91 github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos= github.com/go-playground/validator/v10 v10.15.5 h1:LEBecTWb/1j5TNY1YYG2RcOUN3R7NLylN+x8TTueE24= github.com/go-playground/validator/v10 v10.15.5/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= -github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= -github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= +github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= +github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= @@ -561,8 +539,8 @@ github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w github.com/golang-jwt/jwt/v5 v5.2.0 h1:d/ix8ftRUorsN+5eMIlF4T6J8CAt9rch3My2winC1Jw= github.com/golang-jwt/jwt/v5 v5.2.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= -github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= +github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= +github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -653,19 +631,18 @@ github.com/google/pprof v0.0.0-20231023181126-ff6d637d2a7b/go.mod h1:czg5+yv1E0Z github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.3.1 h1:SBWmZhjUDRorQxrN0nwzf+AHBxnbFjViHQS4P0yVpmQ= -github.com/googleapis/enterprise-certificate-proxy v0.3.1/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= +github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= +github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= -github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= +github.com/googleapis/gax-go/v2 v2.12.2 h1:mhN09QQW1jEWeMF74zGR81R30z4VJzjZsfkUhuHF+DA= +github.com/googleapis/gax-go/v2 v2.12.2/go.mod h1:61M8vcyyXR2kqKFxKrfA22jaA8JGF7Dc8App1U3H6jc= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8= @@ -694,16 +671,16 @@ github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLt github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= -github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.0 h1:f4tggROQKKcnh4eItay6z/HbHLqghBxS8g7pyMhmDio= -github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.0/go.mod h1:hKAkSgNkL0FII46ZkJcpVEAai4KV+swlIWCKfekd1pA= -github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.3 h1:o95KDiV/b1xdkumY5YbLR0/n2+wBxUpgf3HgfKgTyLI= -github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.3/go.mod h1:hTxjzRcX49ogbTGVJ1sM5mz5s+SSgiGIyL3jjPxl32E= +github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1 h1:qnpSQwGEnkcRpTqNOIR6bJbR0gAorgP9CSALpRcKoAA= +github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1/go.mod h1:lXGCsh6c22WGtjr+qGHj1otzZpV/1kwTMAqkwZsnWRU= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0 h1:pRhl55Yx1eC7BZ1N+BBWwnKaMyD8uC+34TLdndZMAKk= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0/go.mod h1:XKMd7iuf/RGPSMJ/U4HP0zS2Z9Fh8Ps9a+6X26m/tmI= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= @@ -755,6 +732,8 @@ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v0.6.0 h1:uL2shRDx7RTrOrTCUZEGP/wJUFiUI8QT6E7z5o8jga4= github.com/hashicorp/golang-lru v0.6.0/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -840,14 +819,9 @@ github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQ github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs= github.com/jackc/pgx/v4 v4.18.2 h1:xVpYkNR5pk5bMCZGfClbO962UIqVABcAGt7ha1s/FeU= github.com/jackc/pgx/v4 v4.18.2/go.mod h1:Ey4Oru5tH5sB6tV7hDmfWFahwF15Eb7DNXlRKx2CkVw= -github.com/jackc/pgx/v5 v5.5.0 h1:NxstgwndsTRy7eq9/kqYc/BZh5w2hHJV86wjvO+1xPw= -github.com/jackc/pgx/v5 v5.5.0/go.mod h1:Ig06C2Vu0t5qXC60W8sqIthScaEnFvojjj9dSljmHRA= github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle v1.3.0 h1:eHK/5clGOatcjX3oWGBO/MpxpbHzSwud5EWTSCI+MX0= -github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk= -github.com/jackc/puddle/v2 v2.2.1/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= @@ -859,10 +833,8 @@ github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9Y github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= -github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= -github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= -github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 h1:rp+c0RAYOWj8l6qbCUTSiRLG/iKnW3K3/QfPPuSsBt4= -github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak= +github.com/jmoiron/sqlx v1.4.0 h1:1PLqN7S1UYp5t4SrVVnt4nUVNemrDAtxlulVe+Qgm3o= +github.com/jmoiron/sqlx v1.4.0/go.mod h1:ZrZ7UsYB/weZdl2Bxg6jCRO9c3YHl8r3ahlKmRT4JLY= github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg= github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= @@ -887,8 +859,6 @@ github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYb github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= @@ -975,7 +945,7 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= +github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/mattn/go-sqlite3 v2.0.3+incompatible h1:gXHsfypPkaMZrKbD5209QV9jbUTJKjyR5WD3HYQSd+U= github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= @@ -983,6 +953,8 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5 github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= +github.com/mfridman/interpolate v0.0.2 h1:pnuTK7MQIxxFz1Gr+rjSIx9u7qVjf5VOoM/u6BbAxPY= +github.com/mfridman/interpolate v0.0.2/go.mod h1:p+7uk6oE07mpE/Ik1b8EckO0O4ZXiGAfshKBWLUM9Xg= github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= @@ -1008,8 +980,8 @@ github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8oh github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= -github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= -github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= +github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae h1:O4SWKdcHVCvYqyDV+9CJA1fcDN2L11Bule0iFy3YlAI= +github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -1036,6 +1008,8 @@ github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5Vgl github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4= +github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nkovacs/streamquote v0.0.0-20170412213628-49af9bddb229/go.mod h1:0aYXnNPJ8l7uZxf45rWW1a/uME32OF0rhiYGNQ2oF2E= github.com/nsf/jsondiff v0.0.0-20210926074059-1e845ec5d249 h1:NHrXEjTNQY7P0Zfx1aMrNhpgxHmow66XQtm0aQLY0AE= @@ -1071,33 +1045,27 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= -github.com/opencontainers/runc v1.1.10 h1:EaL5WeO9lv9wmS6SASjszOeQdSctvpbu0DdBQBizE40= -github.com/opencontainers/runc v1.1.10/go.mod h1:+/R6+KmDlh+hOO8NkjmgkG9Qzvypzk0yXxAPYYR65+M= +github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= +github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= -github.com/ory/dockertest/v3 v3.10.0 h1:4K3z2VMe8Woe++invjaTB7VRyQXQy5UY+loujO4aNE4= -github.com/ory/dockertest/v3 v3.10.0/go.mod h1:nr57ZbRWMqfsdGdFNLHz5jjNdDb7VVFnzAeW1n5N1Lg= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= -github.com/paulmach/orb v0.10.0 h1:guVYVqzxHE/CQ1KpfGO077TR0ATHSNjp4s6XGLn3W9s= -github.com/paulmach/orb v0.10.0/go.mod h1:5mULz1xQfs3bmQm63QEJA6lNGujuRafwA5S/EnuLaLU= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= -github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= -github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= +github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 h1:hDSdbBuw3Lefr6R18ax0tZ2BJeNB3NehB3trOwYBsdU= github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= -github.com/pierrec/lz4/v4 v4.1.18 h1:xaKrnTkyoqfh1YItXl56+6KJNVYWlEEPuAQW9xsplYQ= -github.com/pierrec/lz4/v4 v4.1.18/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -1112,8 +1080,8 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/pressly/goose/v3 v3.16.0 h1:xMJUsZdHLqSnCqESyKSqEfcYVYsUuup1nrOhaEFftQg= -github.com/pressly/goose/v3 v3.16.0/go.mod h1:JwdKVnmCRhnF6XLQs2mHEQtucFD49cQBdRM4UiwkxsM= +github.com/pressly/goose/v3 v3.21.1 h1:5SSAKKWej8LVVzNLuT6KIvP1eFDuPvxa+B6H0w78buQ= +github.com/pressly/goose/v3 v3.21.1/go.mod h1:sqthmzV8PitchEkjecFJII//l43dLOCzfWh8pHEe+vE= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= @@ -1187,8 +1155,6 @@ github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtm github.com/scylladb/go-reflectx v1.0.1 h1:b917wZM7189pZdlND9PbIJ6NQxfDPfBvUaQ7cjj1iZQ= github.com/scylladb/go-reflectx v1.0.1/go.mod h1:rWnOfDIRWBGN0miMLIcoPt/Dhi2doCMZqwMCJ3KupFc= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys= -github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sethvargo/go-retry v0.2.4 h1:T+jHEQy/zKJf5s95UkguisicE0zuF9y7+/vgz08Ocec= github.com/sethvargo/go-retry v0.2.4/go.mod h1:1afjQuvh7s4gflMObvjLPaWgluLLyhA1wmVZ6KLpICw= @@ -1212,32 +1178,30 @@ github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCq github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8= github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240620164046-1c03d0a97b20 h1:Ea3shtV50R1qMkLbDaOwio2C+Ia1dB7pJQzpm7vHzxM= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240620164046-1c03d0a97b20/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= -github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d h1:5tgMC5Gi2UAOKZ+m28W8ubjLeR0pQCAcrz6eQ0rW510= -github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d/go.mod h1:0UNuO3nDt9MFsZPaHJBEUolxVkN0iC69j1ccDp95e8k= -github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo= -github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540/go.mod h1:sjAmX8K2kbQhvDarZE1ZZgDgmHJ50s0BBc/66vKY2ek= -github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917 h1:MD80ZRCTvxxJ8PBmhtrKoTnky8cVNYrCrIBLVRbrOM0= -github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917/go.mod h1:jwVxhctE6BgLOSSsVq9wbREpZ8Ev34H+UBxeUhESZRs= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240605170242-555ff582f36a h1:/QIQciKjhZy+iBB74WG4pP88O2FwS1KZtSXO5COTTgI= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240605170242-555ff582f36a/go.mod h1:QqcZSwLgEIn7YraAIRmomnBMAuVFephiHrIWVlkWbFI= -github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240531021326-99118e47f696 h1:h1E87+z+JcUEfvbJVF56SnZA/YUFE5ewUE61MaR/Ewg= -github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240531021326-99118e47f696/go.mod h1:OiWUTrrpSLLTMh7FINWjEh6mmDJCVPaC4yEsDCVaWdU= -github.com/smartcontractkit/chainlink-vrf v0.0.0-20240222010609-cd67d123c772 h1:LQmRsrzzaYYN3wEU1l5tWiccznhvbyGnu2N+wHSXZAo= -github.com/smartcontractkit/chainlink-vrf v0.0.0-20240222010609-cd67d123c772/go.mod h1:Kn1Hape05UzFZ7bOUnm3GVsHzP0TNrVmpfXYNHdqGGs= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240712162033-89bd3351ce6e h1:vKVNJfFXy4Wdq5paOV0/fNgql2GoXkei10+D+SmC+Qs= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240712162033-89bd3351ce6e/go.mod h1:fh9eBbrReCmv31bfz52ENCAMa7nTKQbdhb2B3+S2VGo= +github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45 h1:NBQLtqk8zsyY4qTJs+NElI3aDFTcAo83JHvqD04EvB0= +github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45/go.mod h1:LV0h7QBQUpoC2UUi6TcUvcIFm1xjP/DtEcqV8+qeLUs= +github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240716180914-6fd88994c89c h1:xKj2jtIUhVcIm+RH9r7aTrxFdzM7VsaPLD4biUQj5Dg= +github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240716180914-6fd88994c89c/go.mod h1:6DgCnHMGdBaIh0bLs1dK0MtdeMZfeNhc/nvBUN6KIUg= +github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827 h1:BCHu4pNP6arrcHLEWx61XjLaonOd2coQNyL0NTUcaMc= +github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827/go.mod h1:OPX+wC2TWQsyLNpR7daMt2vMpmsNcoBxbZyGTHr6tiA= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240712132946-267a37c5ac6e h1:PzwzlHNv1YbJ6ZIdl/pIFRoOuOS4V4WLvjZvFUnZFL4= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240712132946-267a37c5ac6e/go.mod h1:hsFhop+SlQHKD+DEFjZrMJmbauT1A/wvtZIeeo4PxFU= +github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799 h1:HyLTySm7BR+oNfZqDTkVJ25wnmcTtxBBD31UkFL+kEM= +github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799/go.mod h1:UVFRacRkP7O7TQAzFmR52v5mUlxf+G1ovMlCQAB/cHU= github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16 h1:TFe+FvzxClblt6qRfqEhUfa4kFQx5UobuoFGO2W4mMo= github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI= github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f h1:hgJif132UCdjo8u43i7iPN1/MFnu49hv7lFGFftCHKU= github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f/go.mod h1:MvMXoufZAtqExNexqi4cjrNYE9MefKddKylxjS+//n0= -github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c h1:lIyMbTaF2H0Q71vkwZHX/Ew4KF2BxiKhqEXwF8rn+KI= -github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c/go.mod h1:fb1ZDVXACvu4frX3APHZaEBp0xi1DIm34DcA0CwTsZM= +github.com/smartcontractkit/libocr v0.0.0-20240702141926-063ceef8c42e h1:9ypZ/8aW8Vm497i1gXHcT96oNLiu88jbg9QdX+IUE3E= +github.com/smartcontractkit/libocr v0.0.0-20240702141926-063ceef8c42e/go.mod h1:fb1ZDVXACvu4frX3APHZaEBp0xi1DIm34DcA0CwTsZM= github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 h1:yiKnypAqP8l0OX0P3klzZ7SCcBUxy5KqTAKZmQOvSQE= github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1/go.mod h1:q6f4fe39oZPdsh1i57WznEZgxd8siidMaSFq3wdPmVg= github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 h1:Dai1bn+Q5cpeGMQwRdjOdVjG8mmFFROVkSKuUgBErRQ= github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1/go.mod h1:G5Sd/yzHWf26rQ+X0nG9E0buKPqRGPMJAfk2gwCzOOw= -github.com/smartcontractkit/wsrpc v0.8.1 h1:kk0SXLqWrWaZ3J6c7n8D0NZ2uTMBBBpG5dZZXZX8UGE= -github.com/smartcontractkit/wsrpc v0.8.1/go.mod h1:yfg8v8fPLXkb6Mcnx6Pm/snP6jJ0r5Kf762Yd1a/KpA= +github.com/smartcontractkit/wsrpc v0.7.3 h1:CKYZfawZShZGfvsQep1F9oBansnFk9ByZPCdTMpLphw= +github.com/smartcontractkit/wsrpc v0.7.3/go.mod h1:sj7QX2NQibhkhxTfs3KOhAj/5xwgqMipTvJVSssT9i0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= @@ -1363,8 +1327,6 @@ github.com/valyala/fastjson v1.4.1/go.mod h1:nV6MsjxL2IMJQUoHDIrjEI7oLyeqK6aBD7E github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/vertica/vertica-sql-go v1.3.3 h1:fL+FKEAEy5ONmsvya2WH5T8bhkvY27y/Ik3ReR2T+Qw= -github.com/vertica/vertica-sql-go v1.3.3/go.mod h1:jnn2GFuv+O2Jcjktb7zyc4Utlbu9YVqpHH/lx63+1M4= github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc= github.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+xBAnxjb1X5vnTw= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= @@ -1373,21 +1335,13 @@ github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= -github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= -github.com/ydb-platform/ydb-go-genproto v0.0.0-20231012155159-f85a672542fd h1:dzWP1Lu+A40W883dK/Mr3xyDSM/2MggS8GtHT0qgAnE= -github.com/ydb-platform/ydb-go-genproto v0.0.0-20231012155159-f85a672542fd/go.mod h1:Er+FePu1dNUieD+XTMDduGpQuCPssK5Q4BjF+IIXJ3I= -github.com/ydb-platform/ydb-go-sdk/v3 v3.54.2 h1:E0yUuuX7UmPxXm92+yQCjMveLFO3zfvYFIJVuAqsVRA= -github.com/ydb-platform/ydb-go-sdk/v3 v3.54.2/go.mod h1:fjBLQ2TdQNl4bMjuWl9adoTGBypwUTPoGC+EqYqiIcU= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= @@ -1413,7 +1367,6 @@ go.dedis.ch/kyber/v3 v3.1.0 h1:ghu+kiRgM5JyD9TJ0hTIxTLQlJBR/ehjWvWwYW3XsC0= go.dedis.ch/kyber/v3 v3.1.0/go.mod h1:kXy7p3STAurkADD+/aZcsznZGKVHEqbtmdIzvPfrs1U= go.dedis.ch/protobuf v1.0.5/go.mod h1:eIV4wicvi6JK0q/QnfIEGeSFNG0ZeB24kzut5+HaRLo= go.dedis.ch/protobuf v1.0.7/go.mod h1:pv5ysfkDX/EawiPqcW3ikOxsL5t+BqnV6xHSmE79KI4= -go.dedis.ch/protobuf v1.0.11 h1:FTYVIEzY/bfl37lu3pR4lIj+F9Vp1jE8oh91VmxKgLo= go.dedis.ch/protobuf v1.0.11/go.mod h1:97QR256dnkimeNdfmURz0wAMNVbd1VmLXhG1CrTYrJ4= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= @@ -1432,26 +1385,28 @@ 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.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/google.golang.org/grpc/otelgrpc v0.52.0 h1:vS1Ao/R55RNV4O7TA2Qopok8yN+X0LIP6RVWLFkprck= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0/go.mod h1:BMsdeOxN04K0L5FNUBfjFdvwWGNe/rkmSwH4Aelu/X0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= 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.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 v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= 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.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.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= +go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= +go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -1478,6 +1433,7 @@ go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.14.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= +go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= @@ -1510,8 +1466,8 @@ golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= -golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= -golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= +golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= +golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1522,8 +1478,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20240213143201-ec583247a57a h1:HinSgX1tJRX3KsL//Gxynpw5CTOAIPhgL4W8PNiIpVE= -golang.org/x/exp v0.0.0-20240213143201-ec583247a57a/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= +golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 h1:aAcj0Da7eBAtrTp03QXWvm88pSyOt+UgdZw2BFZ+lEw= +golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8/go.mod h1:CQ1k9gNrJ50XIzaKCRR2hssIjF07kZFEiieALBM/ARQ= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1551,8 +1507,8 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= -golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1601,7 +1557,6 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210331212208-0fccb6fa2b5c/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210423184538-5f58ad60dda6/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -1610,8 +1565,8 @@ golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1621,9 +1576,8 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210413134643-5e61552d6c78/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= -golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= +golang.org/x/oauth2 v0.20.0 h1:4mQdhULixXKP1rwYBW0vAijoXnkTG0BLCDRzfe1idMo= +golang.org/x/oauth2 v0.20.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1637,8 +1591,8 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1714,7 +1668,6 @@ golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1725,8 +1678,8 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -1734,8 +1687,8 @@ golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuX golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= -golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= -golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= +golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= +golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1745,12 +1698,11 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1822,8 +1774,8 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= -golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1831,8 +1783,6 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= gonum.org/v1/gonum v0.14.0 h1:2NiG67LD1tEH0D7kM+ps2V+fXmsAnpUeec7n8tcr4S0= gonum.org/v1/gonum v0.14.0/go.mod h1:AoWeoz0becf9QMWtE8iWXNXc27fK4fNeHNf/oMejGfU= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= @@ -1855,8 +1805,8 @@ google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz513 google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.149.0 h1:b2CqT6kG+zqJIVKRQ3ELJVLN1PwHZ6DJ3dW8yl82rgY= -google.golang.org/api v0.149.0/go.mod h1:Mwn1B7JTXrzXtnvmzQE2BD6bYZQ8DShKZDZbeN9I7qI= +google.golang.org/api v0.169.0 h1:QwWPy71FgMWqJN/l6jVlFHUa29a7dcUy02I8o799nPY= +google.golang.org/api v0.169.0/go.mod h1:gpNOiMA2tZ4mf5R9Iwf4rK/Dcz0fbdIgWYWVoxmsyLg= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1865,8 +1815,6 @@ google.golang.org/appengine v1.6.2/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -1901,7 +1849,6 @@ google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEY google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -1912,12 +1859,12 @@ google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210401141331-865547bb08e2/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 h1:I6WNifs6pF9tNdSob2W24JtyxIYjzFB9qDlpUC76q+U= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405/go.mod h1:3WDQMjmJk36UQhjQ89emUzb1mdaHcPeeAh4SCBKznB4= -google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b h1:CIC2YMXmIhYw6evmhPxBKJ4fmLbOFtXQN/GV3XOZR8k= -google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:IBQ646DjkDkvUIsVq/cc03FUFQ9wbZu7yE396YcL870= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= +google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y= +google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s= +google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 h1:P8OJ/WCl/Xo4E4zoe4/bifHpSmmKwARqyqE4nW6J2GQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -1939,11 +1886,9 @@ google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -google.golang.org/grpc/examples v0.0.0-20210424002626-9572fd6faeae/go.mod h1:Ly7ZA/ARzg8fnPU9TyZIxoz33sEUuWX7txiqs8lPTgE= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1957,8 +1902,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -2013,8 +1958,6 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= -howett.net/plist v1.0.0 h1:7CrbWYbPPO/PyNy38b2EB/+gYbjCe2DXBxgtOOZbSQM= -howett.net/plist v1.0.0/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g= k8s.io/api v0.30.0 h1:siWhRq7cNjy2iHssOB9SCGNCl2spiF1dO3dABqZ8niA= k8s.io/api v0.30.0/go.mod h1:OPlaYhoHs8EQ1ql0R/TsUgaRPhpKNxIMrKQfWUp8QSE= k8s.io/apimachinery v0.30.0 h1:qxVPsyDM5XS96NIh9Oj6LavoVFYff/Pon9cZeDIkHHA= @@ -2027,28 +1970,22 @@ k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7F k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -lukechampine.com/uint128 v1.3.0 h1:cDdUVfRwDUDovz610ABgFD17nXD4/uDgVHl2sC3+sbo= -lukechampine.com/uint128 v1.3.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= -modernc.org/cc/v3 v3.41.0 h1:QoR1Sn3YWlmA1T4vLaKZfawdVtSiGx8H+cEojbC7v1Q= -modernc.org/cc/v3 v3.41.0/go.mod h1:Ni4zjJYJ04CDOhG7dn640WGfwBzfE0ecX8TyMB0Fv0Y= -modernc.org/ccgo/v3 v3.16.15 h1:KbDR3ZAVU+wiLyMESPtbtE/Add4elztFyfsWoNTgxS0= -modernc.org/ccgo/v3 v3.16.15/go.mod h1:yT7B+/E2m43tmMOT51GMoM98/MtHIcQQSleGnddkUNI= -modernc.org/libc v1.32.0 h1:yXatHTrACp3WaKNRCoZwUK7qj5V8ep1XyY0ka4oYcNc= -modernc.org/libc v1.32.0/go.mod h1:YAXkAZ8ktnkCKaN9sw/UDeUVkGYJ/YquGO4FTi5nmHE= +modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6 h1:5D53IMaUuA5InSeMu9eJtlQXS2NxAhyWQvkKEgXZhHI= +modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6/go.mod h1:Qz0X07sNOR1jWYCrJMEnbW/X55x206Q7Vt4mz6/wHp4= +modernc.org/libc v1.41.0 h1:g9YAc6BkKlgORsUWj+JwqoB1wU3o4DE3bM3yvA3k+Gk= +modernc.org/libc v1.41.0/go.mod h1:w0eszPsiXoOnoMJgrXjglgLuDy/bt5RR4y3QzUUeodY= modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4= modernc.org/mathutil v1.6.0/go.mod h1:Ui5Q9q1TR2gFm0AQRqQUaBWFLAhQpCwNcuhBOSedWPo= modernc.org/memory v1.7.2 h1:Klh90S215mmH8c9gO98QxQFsY+W451E8AnzjoE2ee1E= modernc.org/memory v1.7.2/go.mod h1:NO4NVCQy0N7ln+T9ngWqOQfi7ley4vpwvARR+Hjw95E= -modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4= -modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= -modernc.org/sqlite v1.27.0 h1:MpKAHoyYB7xqcwnUwkuD+npwEa0fojF0B5QRbN+auJ8= -modernc.org/sqlite v1.27.0/go.mod h1:Qxpazz0zH8Z1xCFyi5GSL3FzbtZ3fvbjmywNogldEW0= +modernc.org/sqlite v1.29.6 h1:0lOXGrycJPptfHDuohfYgNqoe4hu+gYuN/pKgY5XjS4= +modernc.org/sqlite v1.29.6/go.mod h1:S02dvcmm7TnTRvGhv8IGYyLnIt7AS2KPaB1F/71p75U= modernc.org/strutil v1.2.0 h1:agBi9dp1I+eOnxXeiZawM8F4LawKv4NzGWSaLfyeNZA= modernc.org/strutil v1.2.0/go.mod h1:/mdcBmfOibveCTBxUl5B5l6W+TTH1FXPLHZE6bTosX0= modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= -nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g= -nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= +nhooyr.io/websocket v1.8.10 h1:mv4p+MnGrLDcPlBoWsvPP7XCzTYMXP9F9eIGoKbgx7Q= +nhooyr.io/websocket v1.8.10/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c= nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= pgregory.net/rapid v0.5.5 h1:jkgx1TjbQPD/feRoK+S/mXw9e1uj6WilpHrXJowi6oA= pgregory.net/rapid v0.5.5/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= diff --git a/core/scripts/keystone/src/05_deploy_initialize_capabilities_registry.go b/core/scripts/keystone/src/05_deploy_initialize_capabilities_registry.go index 291ef131496..338a582a768 100644 --- a/core/scripts/keystone/src/05_deploy_initialize_capabilities_registry.go +++ b/core/scripts/keystone/src/05_deploy_initialize_capabilities_registry.go @@ -313,7 +313,7 @@ func (c *deployAndInitializeCapabilitiesRegistryCommand) Run(args []string) { CapabilityId: ocrid, }, } - _, err = reg.AddDON(env.Owner, ps, cfgs, false, true, 2) + _, err = reg.AddDON(env.Owner, ps, cfgs, true, true, 2) if err != nil { log.Printf("workflowDON: failed to AddDON: %s", err) } diff --git a/core/scripts/ocr2vrf/main.go b/core/scripts/ocr2vrf/main.go deleted file mode 100644 index e7da4589951..00000000000 --- a/core/scripts/ocr2vrf/main.go +++ /dev/null @@ -1,455 +0,0 @@ -package main - -import ( - "context" - "flag" - "fmt" - "math/big" - "os" - "strings" - "time" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/shopspring/decimal" - - ocr2vrftypes "github.com/smartcontractkit/chainlink-vrf/types" - - helpers "github.com/smartcontractkit/chainlink/core/scripts/common" - "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/link_token_interface" -) - -type commonSetConfigArgs struct { - onchainPubKeys string - offchainPubKeys string - configPubKeys string - peerIDs string - transmitters string - schedule string - f uint - deltaProgress time.Duration - deltaResend time.Duration - deltaRound time.Duration - deltaGrace time.Duration - deltaStage time.Duration - maxRounds uint8 - maxDurationQuery time.Duration - maxDurationObservation time.Duration - maxDurationReport time.Duration - maxDurationAccept time.Duration - maxDurationTransmit time.Duration -} - -type dkgSetConfigArgs struct { - commonSetConfigArgs - dkgEncryptionPubKeys string - dkgSigningPubKeys string - keyID string -} - -type vrfBeaconSetConfigArgs struct { - commonSetConfigArgs - confDelays string - coordinatorConfig ocr2vrftypes.CoordinatorConfig -} - -func main() { - e := helpers.SetupEnv(false) - - switch os.Args[1] { - case "dkg-deploy": - deployDKG(e) - case "coordinator-deploy": - cmd := flag.NewFlagSet("coordinator-deploy", flag.ExitOnError) - beaconPeriodBlocks := cmd.Int64("beacon-period-blocks", 1, "beacon period in number of blocks") - linkAddress := cmd.String("link-address", "", "link contract address") - linkEthFeed := cmd.String("link-eth-feed", "", "link/eth feed address") - helpers.ParseArgs(cmd, os.Args[2:], "beacon-period-blocks", "link-address", "link-eth-feed") - deployVRFCoordinator(e, big.NewInt(*beaconPeriodBlocks), *linkAddress, *linkEthFeed) - case "beacon-deploy": - cmd := flag.NewFlagSet("beacon-deploy", flag.ExitOnError) - coordinatorAddress := cmd.String("coordinator-address", "", "coordinator contract address") - linkAddress := cmd.String("link-address", "", "link contract address") - dkgAddress := cmd.String("dkg-address", "", "dkg contract address") - keyID := cmd.String("key-id", "", "key ID") - helpers.ParseArgs(cmd, os.Args[2:], "beacon-deploy", "coordinator-address", "link-address", "dkg-address", "key-id") - deployVRFBeacon(e, *coordinatorAddress, *linkAddress, *dkgAddress, *keyID) - case "dkg-add-client": - cmd := flag.NewFlagSet("dkg-add-client", flag.ExitOnError) - dkgAddress := cmd.String("dkg-address", "", "DKG contract address") - keyID := cmd.String("key-id", "", "key ID") - clientAddress := cmd.String("client-address", "", "client address") - helpers.ParseArgs(cmd, os.Args[2:], "dkg-address", "key-id", "client-address") - addClientToDKG(e, *dkgAddress, *keyID, *clientAddress) - case "dkg-remove-client": - cmd := flag.NewFlagSet("dkg-add-client", flag.ExitOnError) - dkgAddress := cmd.String("dkg-address", "", "DKG contract address") - keyID := cmd.String("key-id", "", "key ID") - clientAddress := cmd.String("client-address", "", "client address") - helpers.ParseArgs(cmd, os.Args[2:], "dkg-address", "key-id", "client-address") - removeClientFromDKG(e, *dkgAddress, *keyID, *clientAddress) - case "dkg-set-config": - cmd := flag.NewFlagSet("dkg-set-config", flag.ExitOnError) - dkgAddress := cmd.String("dkg-address", "", "DKG contract address") - keyID := cmd.String("key-id", "", "key ID") - onchainPubKeys := cmd.String("onchain-pub-keys", "", "comma-separated list of OCR on-chain pubkeys") - offchainPubKeys := cmd.String("offchain-pub-keys", "", "comma-separated list of OCR off-chain pubkeys") - configPubKeys := cmd.String("config-pub-keys", "", "comma-separated list of OCR config pubkeys") - peerIDs := cmd.String("peer-ids", "", "comma-separated list of peer IDs") - transmitters := cmd.String("transmitters", "", "comma-separated list transmitters") - dkgEncryptionPubKeys := cmd.String("dkg-encryption-pub-keys", "", "comma-separated list of DKG encryption pubkeys") - dkgSigningPubKeys := cmd.String("dkg-signing-pub-keys", "", "comma-separated list of DKG signing pubkeys") - schedule := cmd.String("schedule", "", "comma-separted list of transmission schedule") - f := cmd.Uint("f", 1, "number of faulty oracles") - deltaProgress := cmd.Duration("delta-progress", 30*time.Second, "duration of delta progress") - deltaResend := cmd.Duration("delta-resend", 10*time.Second, "duration of delta resend") - deltaRound := cmd.Duration("delta-round", 10*time.Second, "duration of delta round") - deltaGrace := cmd.Duration("delta-grace", 20*time.Second, "duration of delta grace") - deltaStage := cmd.Duration("delta-stage", 20*time.Second, "duration of delta stage") - maxRounds := cmd.Uint("max-rounds", 3, "maximum number of rounds") - maxDurationQuery := cmd.Duration("max-duration-query", 10*time.Millisecond, "maximum duration of query") - maxDurationObservation := cmd.Duration("max-duration-observation", 10*time.Second, "maximum duration of observation method") - maxDurationReport := cmd.Duration("max-duration-report", 10*time.Second, "maximum duration of report method") - maxDurationAccept := cmd.Duration("max-duration-accept", 10*time.Millisecond, "maximum duration of shouldAcceptFinalizedReport method") - maxDurationTransmit := cmd.Duration("max-duration-transmit", 1*time.Second, "maximum duration of shouldTransmitAcceptedReport method") - - helpers.ParseArgs(cmd, - os.Args[2:], - "dkg-address", - "key-id", - "onchain-pub-keys", - "offchain-pub-keys", - "config-pub-keys", - "peer-ids", - "transmitters", - "dkg-encryption-pub-keys", - "dkg-signing-pub-keys", - "schedule") - - commands := dkgSetConfigArgs{ - commonSetConfigArgs: commonSetConfigArgs{ - onchainPubKeys: *onchainPubKeys, - offchainPubKeys: *offchainPubKeys, - configPubKeys: *configPubKeys, - peerIDs: *peerIDs, - transmitters: *transmitters, - schedule: *schedule, - f: *f, - deltaProgress: *deltaProgress, - deltaResend: *deltaResend, - deltaRound: *deltaRound, - deltaGrace: *deltaGrace, - deltaStage: *deltaStage, - maxRounds: uint8(*maxRounds), - maxDurationQuery: *maxDurationQuery, - maxDurationObservation: *maxDurationObservation, - maxDurationReport: *maxDurationReport, - maxDurationAccept: *maxDurationAccept, - maxDurationTransmit: *maxDurationTransmit, - }, - dkgEncryptionPubKeys: *dkgEncryptionPubKeys, - dkgSigningPubKeys: *dkgSigningPubKeys, - keyID: *keyID, - } - - setDKGConfig(e, *dkgAddress, commands) - case "beacon-set-config": - cmd := flag.NewFlagSet("beacon-set-config", flag.ExitOnError) - beaconAddress := cmd.String("beacon-address", "", "VRF beacon contract address") - confDelays := cmd.String("conf-delays", "1,2,3,4,5,6,7,8", "comma-separted list of 8 confirmation delays") - onchainPubKeys := cmd.String("onchain-pub-keys", "", "comma-separated list of OCR on-chain pubkeys") - offchainPubKeys := cmd.String("offchain-pub-keys", "", "comma-separated list of OCR off-chain pubkeys") - configPubKeys := cmd.String("config-pub-keys", "", "comma-separated list of OCR config pubkeys") - peerIDs := cmd.String("peer-ids", "", "comma-separated list of peer IDs") - transmitters := cmd.String("transmitters", "", "comma-separated list transmitters") - schedule := cmd.String("schedule", "", "comma-separted list of transmission schedule") - f := cmd.Uint("f", 1, "number of faulty oracles") - // TODO: Adjust default delta* and maxDuration* values below after benchmarking latency - deltaProgress := cmd.Duration("delta-progress", 30*time.Second, "duration of delta progress") - deltaResend := cmd.Duration("delta-resend", 10*time.Second, "duration of delta resend") - deltaRound := cmd.Duration("delta-round", 10*time.Second, "duration of delta round") - deltaGrace := cmd.Duration("delta-grace", 20*time.Second, "duration of delta grace") - deltaStage := cmd.Duration("delta-stage", 20*time.Second, "duration of delta stage") - cacheEvictionWindowSeconds := cmd.Int64("cache-eviction-window", 60, "cache eviction window, in seconds") - batchGasLimit := cmd.Int64("batch-gas-limit", 5_000_000, "batch gas limit") - coordinatorOverhead := cmd.Int64("coordinator-overhead", 50_000, "coordinator overhead") - callbackOverhead := cmd.Int64("callback-overhead", 50_000, "callback overhead") - blockGasOverhead := cmd.Int64("block-gas-overhead", 50_000, "block gas overhead") - lookbackBlocks := cmd.Uint64("lookback-blocks", 1000, "lookback blocks") - maxRounds := cmd.Uint("max-rounds", 3, "maximum number of rounds") - maxDurationQuery := cmd.Duration("max-duration-query", 10*time.Millisecond, "maximum duration of query") - maxDurationObservation := cmd.Duration("max-duration-observation", 10*time.Second, "maximum duration of observation method") - maxDurationReport := cmd.Duration("max-duration-report", 10*time.Second, "maximum duration of report method") - maxDurationAccept := cmd.Duration("max-duration-accept", 5*time.Second, "maximum duration of shouldAcceptFinalizedReport method") - maxDurationTransmit := cmd.Duration("max-duration-transmit", 1*time.Second, "maximum duration of shouldTransmitAcceptedReport method") - - helpers.ParseArgs(cmd, - os.Args[2:], - "beacon-address", - "onchain-pub-keys", - "offchain-pub-keys", - "config-pub-keys", - "peer-ids", - "transmitters", - "schedule") - - commands := vrfBeaconSetConfigArgs{ - commonSetConfigArgs: commonSetConfigArgs{ - onchainPubKeys: *onchainPubKeys, - offchainPubKeys: *offchainPubKeys, - configPubKeys: *configPubKeys, - peerIDs: *peerIDs, - transmitters: *transmitters, - schedule: *schedule, - f: *f, - deltaProgress: *deltaProgress, - deltaResend: *deltaResend, - deltaRound: *deltaRound, - deltaGrace: *deltaGrace, - deltaStage: *deltaStage, - maxRounds: uint8(*maxRounds), - maxDurationQuery: *maxDurationQuery, - maxDurationObservation: *maxDurationObservation, - maxDurationReport: *maxDurationReport, - maxDurationAccept: *maxDurationAccept, - maxDurationTransmit: *maxDurationTransmit, - }, - confDelays: *confDelays, - coordinatorConfig: ocr2vrftypes.CoordinatorConfig{ - CacheEvictionWindowSeconds: *cacheEvictionWindowSeconds, - BatchGasLimit: *batchGasLimit, - CoordinatorOverhead: *coordinatorOverhead, - CallbackOverhead: *callbackOverhead, - BlockGasOverhead: *blockGasOverhead, - LookbackBlocks: *lookbackBlocks, - }, - } - - commands.setVRFBeaconConfig(e, *beaconAddress) - case "coordinator-set-producer": - cmd := flag.NewFlagSet("coordinator-set-producer", flag.ExitOnError) - coordinatorAddress := cmd.String("coordinator-address", "", "VRF coordinator contract address") - beaconAddress := cmd.String("beacon-address", "", "VRF beacon contract address") - helpers.ParseArgs(cmd, os.Args[2:], "coordinator-address", "beacon-address") - setProducer(e, *coordinatorAddress, *beaconAddress) - case "coordinator-request-randomness": - cmd := flag.NewFlagSet("coordinator-request-randomness", flag.ExitOnError) - coordinatorAddress := cmd.String("coordinator-address", "", "VRF coordinator contract address") - numWords := cmd.Uint("num-words", 1, "number of words to request") - subID := cmd.String("sub-id", "", "subscription ID") - confDelay := cmd.Int64("conf-delay", 1, "confirmation delay") - helpers.ParseArgs(cmd, os.Args[2:], "coordinator-address", "sub-id") - requestRandomness( - e, - *coordinatorAddress, - uint16(*numWords), - decimal.RequireFromString(*subID).BigInt(), - big.NewInt(*confDelay)) - case "coordinator-redeem-randomness": - cmd := flag.NewFlagSet("coordinator-redeem-randomness", flag.ExitOnError) - coordinatorAddress := cmd.String("coordinator-address", "", "VRF coordinator contract address") - subID := cmd.String("sub-id", "", "subscription ID") - requestID := cmd.Int64("request-id", 0, "request ID") - helpers.ParseArgs(cmd, os.Args[2:], "coordinator-address", "sub-id", "request-id") - redeemRandomness( - e, - *coordinatorAddress, - decimal.RequireFromString(*subID).BigInt(), - big.NewInt(*requestID)) - case "beacon-info": - cmd := flag.NewFlagSet("beacon-info", flag.ExitOnError) - beaconAddress := cmd.String("beacon-address", "", "VRF beacon contract address") - helpers.ParseArgs(cmd, os.Args[2:], "beacon-address") - beacon := newVRFBeacon(common.HexToAddress(*beaconAddress), e.Ec) - keyID, err := beacon.SKeyID(nil) - helpers.PanicErr(err) - fmt.Println("beacon key id:", hexutil.Encode(keyID[:])) - keyHash, err := beacon.SProvingKeyHash(nil) - helpers.PanicErr(err) - fmt.Println("beacon proving key hash:", hexutil.Encode(keyHash[:])) - case "coordinator-create-sub": - cmd := flag.NewFlagSet("coordinator-create-sub", flag.ExitOnError) - coordinatorAddress := cmd.String("coordinator-address", "", "VRF coordinator contract address") - helpers.ParseArgs(cmd, os.Args[2:], "coordinator-address") - createSubscription(e, *coordinatorAddress) - case "coordinator-add-consumer": - cmd := flag.NewFlagSet("coordinator-add-consumer", flag.ExitOnError) - coordinatorAddress := cmd.String("coordinator-address", "", "VRF coordinator contract address") - consumerAddress := cmd.String("consumer-address", "", "VRF consumer contract address") - subId := cmd.String("sub-id", "", "subscription ID") - helpers.ParseArgs(cmd, os.Args[2:], "coordinator-address", "consumer-address") - addConsumer(e, *coordinatorAddress, *consumerAddress, decimal.RequireFromString(*subId).BigInt()) - case "coordinator-get-sub": - cmd := flag.NewFlagSet("coordinator-get-sub", flag.ExitOnError) - coordinatorAddress := cmd.String("coordinator-address", "", "VRF coordinator contract address") - subId := cmd.String("sub-id", "", "subscription ID") - helpers.ParseArgs(cmd, os.Args[2:], "coordinator-address") - sub := getSubscription(e, *coordinatorAddress, decimal.RequireFromString(*subId).BigInt()) - fmt.Println("subscription ID:", *subId) - fmt.Println("balance:", sub.Balance) - fmt.Println("consumers:", sub.Consumers) - fmt.Println("owner:", sub.Owner) - case "link-balance": - cmd := flag.NewFlagSet("link-balance", flag.ExitOnError) - linkAddress := cmd.String("link-address", "", "link address") - helpers.ParseArgs(cmd, os.Args[2:], "link-address") - - l, err := link_token_interface.NewLinkToken(common.HexToAddress(*linkAddress), e.Ec) - helpers.PanicErr(err) - - bal, err := l.BalanceOf(nil, e.Owner.From) - helpers.PanicErr(err) - fmt.Println("link balance of", e.Owner.From, "is", assets.NewWei(bal).String()) - case "get-balances": - cmd := flag.NewFlagSet("get-balances", flag.ExitOnError) - addresses := cmd.String("addresses", "", "comma-separated list of addresses") - helpers.ParseArgs(cmd, os.Args[2:], "addresses") - - for _, account := range strings.Split(*addresses, ",") { - bal, err := e.Ec.BalanceAt(context.Background(), common.HexToAddress(account), nil) - helpers.PanicErr(err) - - fmt.Println("ETH balance of", account, "is", assets.NewWei(bal).String()) - } - case "coordinator-fund-sub": - cmd := flag.NewFlagSet("coordinator-fund-sub", flag.ExitOnError) - coordinatorAddress := cmd.String("coordinator-address", "", "VRF coordinator contract address") - linkAddress := cmd.String("link-address", "", "link-address") - fundingAmount := cmd.String("funding-amount", "5e18", "funding amount in juels. can use scientific notation, e.g 10e18 for 10 LINK") // 5 LINK - subID := cmd.String("sub-id", "", "subscription ID") - helpers.ParseArgs(cmd, os.Args[2:], "coordinator-address", "link-address") - eoaFundSubscription(e, *coordinatorAddress, *linkAddress, decimal.RequireFromString(*fundingAmount).BigInt(), decimal.RequireFromString(*subID).BigInt()) - case "beacon-set-payees": - cmd := flag.NewFlagSet("beacon-set-payees", flag.ExitOnError) - beaconAddress := cmd.String("beacon-address", "", "VRF beacon contract address") - transmitters := cmd.String("transmitters", "", "comma-separated list of transmitters") - payees := cmd.String("payees", "", "comma-separated list of payees") - helpers.ParseArgs(cmd, os.Args[2:], "beacon-address", "transmitters", "payees") - setPayees(e, *beaconAddress, helpers.ParseAddressSlice(*transmitters), helpers.ParseAddressSlice(*payees)) - case "consumer-deploy": - cmd := flag.NewFlagSet("consumer-deploy", flag.ExitOnError) - coordinatorAddress := cmd.String("coordinator-address", "", "VRF coordinator address") - shouldFail := cmd.Bool("should-fail", false, "shouldFail flag") - beaconPeriodBlocks := cmd.Int64("beacon-period-blocks", 1, "beacon period in number of blocks") - helpers.ParseArgs(cmd, os.Args[2:], "coordinator-address", "beacon-period-blocks") - deployVRFBeaconCoordinatorConsumer(e, *coordinatorAddress, *shouldFail, big.NewInt(*beaconPeriodBlocks)) - case "consumer-request-randomness": - cmd := flag.NewFlagSet("consumer-request-randomness", flag.ExitOnError) - consumerAddress := cmd.String("consumer-address", "", "VRF coordinator consumer address") - numWords := cmd.Uint("num-words", 1, "number of words to request") - subID := cmd.String("sub-id", "", "subscription ID") - confDelay := cmd.Int64("conf-delay", 1, "confirmation delay") - helpers.ParseArgs(cmd, os.Args[2:], "consumer-address", "sub-id") - requestRandomnessFromConsumer(e, *consumerAddress, uint16(*numWords), decimal.RequireFromString(*subID).BigInt(), big.NewInt(*confDelay)) - case "consumer-redeem-randomness": - cmd := flag.NewFlagSet("consumer-redeem-randomness", flag.ExitOnError) - consumerAddress := cmd.String("consumer-address", "", "VRF coordinator consumer address") - subID := cmd.String("sub-id", "", "subscription ID") - requestID := cmd.String("request-id", "0", "request ID") - numWords := cmd.Int64("num-words", 1, "number of words to print after redeeming") - helpers.ParseArgs(cmd, os.Args[2:], "consumer-address", "request-id") - reqIdInt := decimal.RequireFromString(*requestID).BigInt() - redeemRandomnessFromConsumer(e, *consumerAddress, decimal.RequireFromString(*subID).BigInt(), reqIdInt, *numWords) - case "consumer-request-callback": - cmd := flag.NewFlagSet("consumer-request-callback", flag.ExitOnError) - consumerAddress := cmd.String("consumer-address", "", "VRF coordinator consumer address") - numWords := cmd.Uint("num-words", 1, "number of words to request") - subID := cmd.String("sub-id", "", "subscription ID") - confDelay := cmd.Int64("conf-delay", 1, "confirmation delay") - callbackGasLimit := cmd.Uint("cb-gas-limit", 100_000, "callback gas limit") - helpers.ParseArgs(cmd, os.Args[2:], "consumer-address") - requestRandomnessCallback( - e, - *consumerAddress, - uint16(*numWords), - decimal.RequireFromString(*subID).BigInt(), - big.NewInt(*confDelay), - uint32(*callbackGasLimit), - nil, // test consumer doesn't use any args - ) - case "consumer-read-randomness": - cmd := flag.NewFlagSet("consumer-read-randomness", flag.ExitOnError) - consumerAddress := cmd.String("consumer-address", "", "VRF coordinator consumer address") - requestID := cmd.String("request-id", "", "VRF request ID") - numWords := cmd.Int("num-words", 1, "number of words to fetch") - helpers.ParseArgs(cmd, os.Args[2:], "consumer-address") - readRandomness(e, *consumerAddress, decimal.RequireFromString(*requestID).BigInt(), *numWords) - case "consumer-request-callback-batch": - cmd := flag.NewFlagSet("consumer-request-callback", flag.ExitOnError) - consumerAddress := cmd.String("consumer-address", "", "VRF beacon consumer address") - numWords := cmd.Uint("num-words", 1, "number of words to request") - subID := cmd.String("sub-id", "", "subscription ID") - confDelay := cmd.Int64("conf-delay", 1, "confirmation delay") - batchSize := cmd.Int64("batch-size", 1, "batch size") - callbackGasLimit := cmd.Uint("cb-gas-limit", 200_000, "callback gas limit") - helpers.ParseArgs(cmd, os.Args[2:], "consumer-address") - requestRandomnessCallbackBatch( - e, - *consumerAddress, - uint16(*numWords), - decimal.RequireFromString(*subID).BigInt(), - big.NewInt(*confDelay), - uint32(*callbackGasLimit), - nil, // test consumer doesn't use any args, - big.NewInt(*batchSize), - ) - case "consumer-request-callback-batch-load-test": - cmd := flag.NewFlagSet("consumer-request-callback-load-test", flag.ExitOnError) - consumerAddress := cmd.String("consumer-address", "", "VRF beacon batch consumer address") - numWords := cmd.Uint("num-words", 1, "number of words to request") - subID := cmd.String("sub-id", "", "subscription ID") - confDelay := cmd.Int64("conf-delay", 1, "confirmation delay") - batchSize := cmd.Int64("batch-size", 1, "batch size") - batchCount := cmd.Int64("batch-count", 1, "number of batches to run") - callbackGasLimit := cmd.Uint("cb-gas-limit", 200_000, "callback gas limit") - helpers.ParseArgs(cmd, os.Args[2:], "consumer-address") - - for i := int64(0); i < *batchCount; i++ { - requestRandomnessCallbackBatch( - e, - *consumerAddress, - uint16(*numWords), - decimal.RequireFromString(*subID).BigInt(), - big.NewInt(*confDelay), - uint32(*callbackGasLimit), - nil, // test consumer doesn't use any args, - big.NewInt(*batchSize), - ) - } - case "deploy-load-test-consumer": - cmd := flag.NewFlagSet("deploy-load-test-consumer", flag.ExitOnError) - coordinatorAddress := cmd.String("coordinator-address", "", "coordinator address") - beaconPeriodBlocks := cmd.Int64("beacon-period-blocks", 1, "beacon period in number of blocks") - helpers.ParseArgs(cmd, os.Args[2:], "coordinator-address", "beacon-period-blocks") - - deployLoadTestVRFBeaconCoordinatorConsumer(e, *coordinatorAddress, false, big.NewInt(*beaconPeriodBlocks)) - case "get-load-test-results": - cmd := flag.NewFlagSet("get-load-test-results", flag.ExitOnError) - consumerAddress := cmd.String("consumer-address", "", "Load test contract address") - helpers.ParseArgs(cmd, os.Args[2:], "consumer-address") - - printLoadtestResults(e, *consumerAddress) - case "verify-beacon-randomness": - cmd := flag.NewFlagSet("verify-randomness", flag.ExitOnError) - dkgAddress := cmd.String("dkg-address", "", "DKG contract address") - beaconAddress := cmd.String("beacon-address", "", "VRF beacon contract address") - coordinatorAddress := cmd.String("coordinator-address", "", "VRF coordinator contract address") - height := cmd.Uint64("height", 0, "block height of VRF beacon output") - confDelay := cmd.Uint64("conf-delay", 1, "confirmation delay of VRF beacon output") - searchWindow := cmd.Uint64("search-window", 200, "search space size for beacon transmission. Number of blocks after beacon height") - helpers.ParseArgs(cmd, os.Args[2:], "dkg-address", "coordinator-address", "beacon-address", "height", "conf-delay") - - verifyBeaconRandomness(e, *dkgAddress, *beaconAddress, *coordinatorAddress, *height, *confDelay, *searchWindow) - case "dkg-setup": - setupDKGNodes(e) - case "ocr2vrf-setup": - setupOCR2VRFNodes(e) - case "ocr2vrf-setup-infra-forwarder": - setupOCR2VRFNodesForInfraWithForwarder(e) - case "ocr2vrf-fund-nodes": - fundOCR2VRFNodes(e) - default: - panic("unrecognized subcommand: " + os.Args[1]) - } -} diff --git a/core/scripts/ocr2vrf/readiness/main.go b/core/scripts/ocr2vrf/readiness/main.go deleted file mode 100644 index 9b43009d2f2..00000000000 --- a/core/scripts/ocr2vrf/readiness/main.go +++ /dev/null @@ -1,214 +0,0 @@ -package main - -import ( - "bytes" - "encoding/json" - "flag" - "fmt" - "io" - "os" - "strings" - - "github.com/urfave/cli" - - helpers "github.com/smartcontractkit/chainlink/core/scripts/common" - clcmd "github.com/smartcontractkit/chainlink/v2/core/cmd" - "github.com/smartcontractkit/chainlink/v2/core/web/presenters" -) - -func newApp(remoteNodeURL string, writer io.Writer) (*clcmd.Shell, *cli.App) { - prompter := clcmd.NewTerminalPrompter() - client := &clcmd.Shell{ - Renderer: clcmd.RendererJSON{Writer: writer}, - AppFactory: clcmd.ChainlinkAppFactory{}, - KeyStoreAuthenticator: clcmd.TerminalKeyStoreAuthenticator{Prompter: prompter}, - FallbackAPIInitializer: clcmd.NewPromptingAPIInitializer(prompter), - Runner: clcmd.ChainlinkRunner{}, - PromptingSessionRequestBuilder: clcmd.NewPromptingSessionRequestBuilder(prompter), - ChangePasswordPrompter: clcmd.NewChangePasswordPrompter(), - PasswordPrompter: clcmd.NewPasswordPrompter(), - } - app := clcmd.NewApp(client) - fs := flag.NewFlagSet("blah", flag.ContinueOnError) - fs.Bool("json", true, "") - fs.String("remote-node-url", remoteNodeURL, "") - helpers.PanicErr(app.Before(cli.NewContext(nil, fs, nil))) - // overwrite renderer since it's set to stdout after Before() is called - client.Renderer = clcmd.RendererJSON{Writer: writer} - return client, app -} - -var ( - remoteNodeURLs = flag.String("remote-node-urls", "", "remote node URL") - checkMarkEmoji = "✅" - xEmoji = "❌" - infoEmoji = "ℹ️" -) - -type ocr2Bundle struct { - ID string `json:"id"` - ChainType string `json:"chainType"` - OnchainPublicKey string `json:"onchainPublicKey"` - OffchainPublicKey string `json:"offchainPublicKey"` - ConfigPublicKey string `json:"configPublicKey"` -} - -func main() { - flag.Parse() - - if remoteNodeURLs == nil { - fmt.Println("flag -remote-node-urls required") - os.Exit(1) - } - - urls := strings.Split(*remoteNodeURLs, ",") - var ( - allDKGSignKeys []string - allDKGEncryptKeys []string - allOCR2KeyIDs []string - allOCR2OffchainPubkeys []string - allOCR2OnchainPubkeys []string - allOCR2ConfigPubkeys []string - allETHKeys []string - allPeerIDs []string - ) - for _, remoteNodeURL := range urls { - output := &bytes.Buffer{} - client, app := newApp(remoteNodeURL, output) - - // login first to establish the session - fmt.Println("logging in to:", remoteNodeURL) - loginFs := flag.NewFlagSet("test", flag.ContinueOnError) - loginFs.String("file", "", "") - loginFs.Bool("bypass-version-check", true, "") - loginCtx := cli.NewContext(app, loginFs, nil) - err := client.RemoteLogin(loginCtx) - helpers.PanicErr(err) - output.Reset() - fmt.Println() - - // check for DKG signing keys - err = clcmd.NewDKGSignKeysClient(client).ListKeys(&cli.Context{ - App: app, - }) - helpers.PanicErr(err) - var dkgSignKeys []presenters.DKGSignKeyResource - helpers.PanicErr(json.Unmarshal(output.Bytes(), &dkgSignKeys)) - switch len(dkgSignKeys) { - case 1: - fmt.Println(checkMarkEmoji, "found 1 DKG sign key on", remoteNodeURL) - case 0: - fmt.Println(xEmoji, "did not find any DKG sign keys on", remoteNodeURL, ", please create one") - default: - fmt.Println(infoEmoji, "found more than 1 DKG sign key on", remoteNodeURL, ", consider removing all but one") - } - output.Reset() - fmt.Println() - - // check for DKG encryption keys - err = clcmd.NewDKGEncryptKeysClient(client).ListKeys(&cli.Context{ - App: app, - }) - helpers.PanicErr(err) - var dkgEncryptKeys []presenters.DKGEncryptKeyResource - helpers.PanicErr(json.Unmarshal(output.Bytes(), &dkgEncryptKeys)) - switch len(dkgEncryptKeys) { - case 1: - fmt.Println(checkMarkEmoji, "found 1 DKG encrypt key on", remoteNodeURL) - case 0: - fmt.Println(xEmoji, "did not find any DKG encrypt keys on", remoteNodeURL, ", please create one") - default: - fmt.Println(infoEmoji, "found more than 1 DKG encrypt key on", remoteNodeURL, ", consider removing all but one") - } - output.Reset() - fmt.Println() - - // check for OCR2 keys - err = client.ListOCR2KeyBundles(&cli.Context{ - App: app, - }) - helpers.PanicErr(err) - var ocr2Keys []ocr2Bundle - helpers.PanicErr(json.Unmarshal(output.Bytes(), &ocr2Keys)) - ethBundle := func() *ocr2Bundle { - for _, b := range ocr2Keys { - if b.ChainType == "evm" { - return &b - } - } - return nil - }() - if ethBundle != nil { - fmt.Println(checkMarkEmoji, "found ocr evm key bundle on", remoteNodeURL) - } else { - fmt.Println(xEmoji, "did not find ocr evm key bundle on", remoteNodeURL, ", please create one") - } - output.Reset() - fmt.Println() - - // check for ETH keys - err = client.ListETHKeys(&cli.Context{ - App: app, - }) - helpers.PanicErr(err) - var ethKeys []presenters.ETHKeyResource - helpers.PanicErr(json.Unmarshal(output.Bytes(), ðKeys)) - switch { - case len(ethKeys) >= 5: - fmt.Println(checkMarkEmoji, "found", len(ethKeys), "eth keys on", remoteNodeURL) - case len(ethKeys) < 5: - fmt.Println(xEmoji, "found only", len(ethKeys), "eth keys on", remoteNodeURL, ", consider creating more") - } - output.Reset() - fmt.Println() - - // check for peer ids - err = client.ListP2PKeys(&cli.Context{ - App: app, - }) - helpers.PanicErr(err) - var p2pKeys []presenters.P2PKeyResource - helpers.PanicErr(json.Unmarshal(output.Bytes(), &p2pKeys)) - switch len(p2pKeys) { - case 1: - fmt.Println(checkMarkEmoji, "found P2P key on", remoteNodeURL) - case 0: - fmt.Println(xEmoji, "no P2P keys found on", remoteNodeURL, ", please create one") - default: - fmt.Println(infoEmoji, "found", len(p2pKeys), "P2P keys on", remoteNodeURL, ", consider removing all but one") - } - output.Reset() - fmt.Println() - - for _, dkgSign := range dkgSignKeys { - allDKGSignKeys = append(allDKGSignKeys, dkgSign.PublicKey) - } - for _, dkgEncrypt := range dkgEncryptKeys { - allDKGEncryptKeys = append(allDKGEncryptKeys, dkgEncrypt.PublicKey) - } - for _, ocr2Bundle := range ocr2Keys { - if ocr2Bundle.ChainType == "evm" { - allOCR2KeyIDs = append(allOCR2KeyIDs, ocr2Bundle.ID) - allOCR2ConfigPubkeys = append(allOCR2ConfigPubkeys, strings.TrimPrefix(ocr2Bundle.ConfigPublicKey, "ocr2cfg_evm_")) - allOCR2OffchainPubkeys = append(allOCR2OffchainPubkeys, strings.TrimPrefix(ocr2Bundle.OffchainPublicKey, "ocr2off_evm_")) - allOCR2OnchainPubkeys = append(allOCR2OnchainPubkeys, strings.TrimPrefix(ocr2Bundle.OnchainPublicKey, "ocr2on_evm_")) - } - } - for _, ethKey := range ethKeys { - allETHKeys = append(allETHKeys, ethKey.Address) - } - for _, peerKey := range p2pKeys { - allPeerIDs = append(allPeerIDs, strings.TrimPrefix(peerKey.PeerID, "p2p_")) - } - } - - fmt.Println("------------- NODE INFORMATION -------------") - fmt.Println("DKG sign keys:", strings.Join(allDKGSignKeys, ",")) - fmt.Println("DKG encrypt keys:", strings.Join(allDKGEncryptKeys, ",")) - fmt.Println("OCR2 key IDs:", strings.Join(allOCR2KeyIDs, ",")) - fmt.Println("OCR2 config public keys:", strings.Join(allOCR2ConfigPubkeys, ",")) - fmt.Println("OCR2 onchain public keys:", strings.Join(allOCR2OnchainPubkeys, ",")) - fmt.Println("OCR2 offchain public keys:", strings.Join(allOCR2OffchainPubkeys, ",")) - fmt.Println("ETH addresses:", strings.Join(allETHKeys, ",")) - fmt.Println("Peer IDs:", strings.Join(allPeerIDs, ",")) -} diff --git a/core/scripts/ocr2vrf/setup_dkg.go b/core/scripts/ocr2vrf/setup_dkg.go deleted file mode 100644 index 834e9177f21..00000000000 --- a/core/scripts/ocr2vrf/setup_dkg.go +++ /dev/null @@ -1,101 +0,0 @@ -package main - -import ( - "flag" - "fmt" - "math/big" - "os" - "strings" - - helpers "github.com/smartcontractkit/chainlink/core/scripts/common" -) - -func setupDKGNodes(e helpers.Environment) { - // Websocket URL & HTTP url required. - wsUrl := os.Getenv("ETH_URL") - httpUrl := os.Getenv("ETH_HTTP_URL") - if len(wsUrl) == 0 || len(httpUrl) == 0 { - fmt.Println("ETH_URL & ETH_HTTP_URL are required for this script.") - os.Exit(1) - } - - cmd := flag.NewFlagSet("dkg-setup", flag.ExitOnError) - keyID := cmd.String("key-id", "aee00d81f822f882b6fe28489822f59ebb21ea95c0ae21d9f67c0239461148fc", "key ID") - apiFile := cmd.String("api", "../../../tools/secrets/apicredentials", "api credentials file") - passwordFile := cmd.String("password", "../../../tools/secrets/password.txt", "password file") - databasePrefix := cmd.String("database-prefix", "postgres://postgres:postgres_password_padded_for_security@localhost:5432/dkg-test", "database prefix") - databaseSuffixes := cmd.String("database-suffixes", "sslmode=disable", "database parameters to be added") - nodeCount := cmd.Int("node-count", 6, "number of nodes") - fundingAmount := cmd.Int64("funding-amount", 10000000000000000, "amount to fund nodes") // .1 ETH - helpers.ParseArgs(cmd, os.Args[2:]) - - if *nodeCount < 6 { - fmt.Println("Node count too low for DKG job, need at least 6.") - os.Exit(1) - } - - //Deploy DKG contract. - // uncomment for faster txs - // e.Owner.GasPrice = e.Owner.GasPrice.Mul(e.Owner.GasPrice, big.NewInt(2)) - dkgAddress := deployDKG(e).String() - - // Initialize dkg-set-config arguments. - onChainPublicKeys := []string{} - offChainPublicKeys := []string{} - configPublicKeys := []string{} - peerIDs := []string{} - transmitters := []string{} - dkgEncrypters := []string{} - dkgSigners := []string{} - - // Iterate through all nodes and create jobs. - for i := 0; i < *nodeCount; i++ { - flagSet := flag.NewFlagSet("run-dkg-job-creation", flag.ExitOnError) - flagSet.String("api", *apiFile, "api file") - flagSet.String("password", *passwordFile, "password file") - flagSet.String("bootstrapPort", fmt.Sprintf("%d", 8000), "port of bootstrap") - flagSet.String("job-type", string(jobTypeDKG), "the job type") - flagSet.String("keyID", *keyID, "") - flagSet.String("contractID", dkgAddress, "the contract address of the DKG") - flagSet.Int64("chainID", e.ChainID, "the chain ID") - flagSet.Bool("dangerWillRobinson", true, "for resetting databases") - flagSet.Bool("isBootstrapper", i == 0, "is first node") - bootstrapperPeerID := "" - if len(peerIDs) != 0 { - bootstrapperPeerID = peerIDs[0] - } - flagSet.String("bootstrapperPeerID", bootstrapperPeerID, "peerID of first node") - - // Setup DKG node. - payload := SetupNode(e, flagSet, i, *databasePrefix, *databaseSuffixes, false, true, wsUrl, httpUrl) - - // Append arguments for dkg-set-config command. - onChainPublicKeys = append(onChainPublicKeys, payload.OnChainPublicKey) - offChainPublicKeys = append(offChainPublicKeys, payload.OffChainPublicKey) - configPublicKeys = append(configPublicKeys, payload.ConfigPublicKey) - peerIDs = append(peerIDs, payload.PeerID) - transmitters = append(transmitters, payload.Transmitter) - dkgEncrypters = append(dkgEncrypters, payload.DkgEncrypt) - dkgSigners = append(dkgSigners, payload.DkgSign) - } - - // Fund transmitters with funding amount. - helpers.FundNodes(e, transmitters, big.NewInt(*fundingAmount)) - - // Construct and print dkg-set-config command. - fmt.Println("Generated setConfig Command:") - command := fmt.Sprintf( - "go run . dkg-set-config --dkg-address %s -key-id %s -onchain-pub-keys %s -offchain-pub-keys %s -config-pub-keys %s -peer-ids %s -transmitters %s -dkg-encryption-pub-keys %s -dkg-signing-pub-keys %s -schedule 1,1,1,1,1", - dkgAddress, - *keyID, - strings.Join(onChainPublicKeys[1:], ","), - strings.Join(offChainPublicKeys[1:], ","), - strings.Join(configPublicKeys[1:], ","), - strings.Join(peerIDs[1:], ","), - strings.Join(transmitters[1:], ","), - strings.Join(dkgEncrypters[1:], ","), - strings.Join(dkgSigners[1:], ","), - ) - - fmt.Println(command) -} diff --git a/core/scripts/ocr2vrf/setup_ocr2vrf.go b/core/scripts/ocr2vrf/setup_ocr2vrf.go deleted file mode 100644 index 35d529b0262..00000000000 --- a/core/scripts/ocr2vrf/setup_ocr2vrf.go +++ /dev/null @@ -1,572 +0,0 @@ -package main - -import ( - "flag" - "fmt" - "math/big" - "os" - "strings" - - "github.com/ethereum/go-ethereum/common" - "github.com/shopspring/decimal" - "github.com/urfave/cli" - - helpers "github.com/smartcontractkit/chainlink/core/scripts/common" - "github.com/smartcontractkit/chainlink/v2/core/cmd" -) - -type jobType string - -const ( - jobTypeDKG jobType = "DKG" - jobTypeOCR2VRF jobType = "OCR2VRF" -) - -func fundOCR2VRFNodes(e helpers.Environment) { - fs := flag.NewFlagSet("ocr2vrf-setup", flag.ExitOnError) - ethSendingKeysString := fs.String("eth-sending-keys", "", "eth sending keys") - fundingAmount := fs.String("funding-amount", "1e18", "funding amount in wei. can use scientific notation, e.g 10e18 for 10 ether") // 1 ETH - helpers.ParseArgs(fs, os.Args[2:], "eth-sending-keys") - - flatSendingKeys := strings.Split(*ethSendingKeysString, ",") - helpers.FundNodes(e, flatSendingKeys, decimal.RequireFromString(*fundingAmount).BigInt()) -} - -func setupOCR2VRFNodes(e helpers.Environment) { - // Websocket URL & HTTP url required. - wsUrl := os.Getenv("ETH_URL") - httpUrl := os.Getenv("ETH_HTTP_URL") - if len(wsUrl) == 0 || len(httpUrl) == 0 { - fmt.Println("ETH_URL & ETH_HTTP_URL are required for this script.") - os.Exit(1) - } - - fs := flag.NewFlagSet("ocr2vrf-setup", flag.ExitOnError) - - keyID := fs.String("key-id", "aee00d81f822f882b6fe28489822f59ebb21ea95c0ae21d9f67c0239461148fc", "key ID") - linkAddress := fs.String("link-address", "", "LINK token address") - linkEthFeed := fs.String("link-eth-feed", "", "LINK-ETH feed address") - useForwarder := fs.Bool("use-forwarder", false, "boolean to use the forwarder") - confDelays := fs.String("conf-delays", "1,2,3,4,5,6,7,8", "8 confirmation delays") - weiPerUnitLink := fs.String("wei-per-unit-link", "6e16", "wei per unit link price for feed") - beaconPeriodBlocks := fs.Int64("beacon-period-blocks", 3, "beacon period in blocks") - subscriptionBalanceString := fs.String("subscription-balance", "1e19", "amount to fund subscription") - maxCallbackGasLimit := fs.Uint("max-cb-gas-limit", 2.5e6, "max callback gas limit") - maxCallbackArgumentsLength := fs.Uint("max-cb-args-length", 32*10 /* 10 EVM words */, "max callback arguments length") - - apiFile := fs.String("api", "../../../tools/secrets/apicredentials", "api credentials file") - passwordFile := fs.String("password", "../../../tools/secrets/password.txt", "password file") - databasePrefix := fs.String("database-prefix", "postgres://postgres:postgres_password_padded_for_security@localhost:5432/ocr2vrf-test", "database prefix") - databaseSuffixes := fs.String("database-suffixes", "sslmode=disable", "database parameters to be added") - nodeCount := fs.Int("node-count", 6, "number of nodes") - fundingAmount := fs.Int64("funding-amount", 1e17, "amount to fund nodes") // .1 ETH - resetDatabase := fs.Bool("reset-database", true, "boolean to reset database") - - helpers.ParseArgs(fs, os.Args[2:]) - - if *nodeCount < 6 { - fmt.Println("Node count too low for OCR2VRF job, need at least 6.") - os.Exit(1) - } - - delays := helpers.ParseIntSlice(*confDelays) - if len(delays) != 8 { - fmt.Println("confDelays must have a length of 8") - os.Exit(1) - } - - var link common.Address - if *linkAddress == "" { - link = helpers.DeployLinkToken(e) - } else { - link = common.HexToAddress(*linkAddress) - } - - // Deploy DKG and VRF contracts, and add VRF - // as a consumer of DKG events. - fmt.Println("Deploying DKG contract...") - dkgAddress := deployDKG(e) - - // Deploy a new feed if needed - var feedAddress common.Address - if *linkEthFeed == "" { - fmt.Println("Deploying LINK-ETH feed...") - feedAddress = helpers.DeployLinkEthFeed(e, *linkAddress, decimal.RequireFromString(*weiPerUnitLink).BigInt()) - } else { - feedAddress = common.HexToAddress(*linkEthFeed) - } - - fmt.Println("Deploying VRF coordinator...") - vrfCoordinatorAddress, vrfCoordinator := deployVRFCoordinator(e, big.NewInt(*beaconPeriodBlocks), link.String(), feedAddress.String()) - - fmt.Println("Configuring VRF coordinator...") - configureVRFCoordinator(e, vrfCoordinator, uint32(*maxCallbackGasLimit), uint32(*maxCallbackArgumentsLength)) - - fmt.Println("Deploying VRF beacon...") - vrfBeaconAddress := deployVRFBeacon(e, vrfCoordinatorAddress.String(), link.String(), dkgAddress.String(), *keyID) - - fmt.Println("Adding VRF Beacon as DKG client...") - addClientToDKG(e, dkgAddress.String(), *keyID, vrfBeaconAddress.String()) - - fmt.Println("Adding VRF Beacon as producer in VRF Coordinator") - setProducer(e, vrfCoordinatorAddress.String(), vrfBeaconAddress.String()) - - fmt.Println("Deploying beacon consumer...") - consumerAddress := deployVRFBeaconCoordinatorConsumer(e, vrfCoordinatorAddress.String(), false, big.NewInt(*beaconPeriodBlocks)) - - fmt.Println("Creating subscription...") - createSubscription(e, vrfCoordinatorAddress.String()) - subID := findSubscriptionID(e, vrfCoordinatorAddress.String()) - - fmt.Println("Adding consumer to subscription...") - addConsumer(e, vrfCoordinatorAddress.String(), consumerAddress.String(), subID) - - subscriptionBalance := decimal.RequireFromString(*subscriptionBalanceString).BigInt() - if subscriptionBalance.Cmp(big.NewInt(0)) > 0 { - fmt.Println("\nFunding subscription with", subscriptionBalance, "juels...") - eoaFundSubscription(e, vrfCoordinatorAddress.String(), link.String(), subscriptionBalance, subID) - } else { - fmt.Println("Subscription", subID, "NOT getting funded. You must fund the subscription in order to use it!") - } - - var forwarderAddresses []common.Address - var forwarderAddressesStrings []string - // If using the forwarder, set up a forwarder for each node. - if *useForwarder { - fmt.Println("Deploying transaction forwarders...") - for i := 0; i < *nodeCount-1; i++ { - // Deploy an authorized forwarder, and add it to the list of forwarders. - f := deployAuthorizedForwarder(e, link, e.Owner.From) - forwarderAddresses = append(forwarderAddresses, f) - forwarderAddressesStrings = append(forwarderAddressesStrings, f.String()) - } - fmt.Printf("ForwarderAddresses : %v", forwarderAddressesStrings) - } - - fmt.Println("Deploying batch beacon consumer...") - loadTestConsumerAddress := deployLoadTestVRFBeaconCoordinatorConsumer(e, vrfCoordinatorAddress.String(), false, big.NewInt(*beaconPeriodBlocks)) - addConsumer(e, vrfCoordinatorAddress.String(), loadTestConsumerAddress.String(), subID) - - fmt.Println("Configuring nodes with OCR2VRF jobs...") - var ( - onChainPublicKeys []string - offChainPublicKeys []string - configPublicKeys []string - peerIDs []string - transmitters []string - dkgEncrypters []string - dkgSigners []string - sendingKeys [][]string - ) - - for i := 0; i < *nodeCount; i++ { - flagSet := flag.NewFlagSet("run-ocr2vrf-job-creation", flag.ExitOnError) - flagSet.String("api", *apiFile, "api file") - flagSet.String("password", *passwordFile, "password file") - flagSet.String("vrfpassword", *passwordFile, "vrf password file") - flagSet.String("bootstrapPort", fmt.Sprintf("%d", 8000), "port of bootstrap") - flagSet.Int64("chainID", e.ChainID, "the chain ID") - flagSet.Bool("applyInitServerConfig", true, "override for using initServerConfig in App.Before") - - flagSet.String("job-type", string(jobTypeOCR2VRF), "the job type") - - // used by bootstrap template instantiation - flagSet.String("contractID", dkgAddress.String(), "the contract to get peers from") - - // DKG args - flagSet.String("keyID", *keyID, "") - flagSet.String("dkg-address", dkgAddress.String(), "the contract address of the DKG") - - // VRF args - flagSet.String("vrf-beacon-address", vrfBeaconAddress.String(), "the contract address of the VRF Beacon") - flagSet.String("vrf-coordinator-address", vrfCoordinatorAddress.String(), "the contract address of the VRF Coordinator") - flagSet.String("link-eth-feed-address", feedAddress.Hex(), "link eth feed address") - - // Apply forwarder args if using the forwarder. - if i > 0 && *useForwarder { - flagSet.Bool("use-forwarder", *useForwarder, "use a transaction forwarder") - flagSet.String("forwarder-address", forwarderAddressesStrings[i-1], "transaction forwarder address") - } - - flagSet.Bool("dangerWillRobinson", *resetDatabase, "for resetting databases") - flagSet.Bool("isBootstrapper", i == 0, "is first node") - bootstrapperPeerID := "" - if len(peerIDs) != 0 { - bootstrapperPeerID = peerIDs[0] - } - flagSet.String("bootstrapperPeerID", bootstrapperPeerID, "peerID of first node") - - payload := SetupNode(e, flagSet, i, *databasePrefix, *databaseSuffixes, *useForwarder, *resetDatabase, wsUrl, httpUrl) - - onChainPublicKeys = append(onChainPublicKeys, payload.OnChainPublicKey) - offChainPublicKeys = append(offChainPublicKeys, payload.OffChainPublicKey) - configPublicKeys = append(configPublicKeys, payload.ConfigPublicKey) - peerIDs = append(peerIDs, payload.PeerID) - transmitters = append(transmitters, payload.Transmitter) - dkgEncrypters = append(dkgEncrypters, payload.DkgEncrypt) - dkgSigners = append(dkgSigners, payload.DkgSign) - sendingKeys = append(sendingKeys, payload.SendingKeys) - } - - var nodesToFund []string - - // If using the forwarder, set up a forwarder for each node. - if *useForwarder { - fmt.Println("Setting authorized senders...") - for i, f := range forwarderAddresses { - // Convert the sending strings for a transmitter to addresses. - var sendinKeysAddresses []common.Address - sendingKeysStrings := sendingKeys[i+1] - for _, s := range sendingKeysStrings { - sendinKeysAddresses = append(sendinKeysAddresses, common.HexToAddress(s)) - } - - // Set authorized senders for the corresponding forwarder. - setAuthorizedSenders(e, f, sendinKeysAddresses) - - // Fund the sending keys. - nodesToFund = append(nodesToFund, sendingKeysStrings...) - - // Set the authorized forwarder as the OCR transmitter. - transmitters[i+1] = f.String() - } - } else { - nodesToFund = append(nodesToFund, transmitters[1:]...) - } - - var payees []common.Address - var reportTransmitters []common.Address // all transmitters excluding bootstrap - for _, t := range transmitters[1:] { - payees = append(payees, e.Owner.From) - reportTransmitters = append(reportTransmitters, common.HexToAddress(t)) - } - - fmt.Printf("Setting EOA: %s as payee for transmitters: %v \n", e.Owner.From, reportTransmitters) - setPayees(e, vrfBeaconAddress.String(), reportTransmitters, payees) - - fmt.Println("Funding transmitters...") - helpers.FundNodes(e, nodesToFund, big.NewInt(*fundingAmount)) - - printStandardCommands( - dkgAddress, - vrfBeaconAddress, - consumerAddress, - loadTestConsumerAddress, - keyID, - confDelays, - onChainPublicKeys[1:], - offChainPublicKeys[1:], - configPublicKeys[1:], - peerIDs[1:], - transmitters[1:], - dkgEncrypters[1:], - dkgSigners[1:], - subID.String(), - ) -} - -func setupOCR2VRFNodesForInfraWithForwarder(e helpers.Environment) { - fs := flag.NewFlagSet("ocr2vrf-setup-infra", flag.ExitOnError) - - keyID := fs.String("key-id", "aee00d81f822f882b6fe28489822f59ebb21ea95c0ae21d9f67c0239461148fc", "key ID") - linkAddress := fs.String("link-address", "", "LINK token address") - linkEthFeed := fs.String("link-eth-feed", "", "LINK-ETH feed address") - confDelays := fs.String("conf-delays", "1,2,3,4,5,6,7,8", "8 confirmation delays") - beaconPeriodBlocks := fs.Int64("beacon-period-blocks", 3, "beacon period in blocks") - subscriptionBalanceString := fs.String("subscription-balance", "1e19", "amount to fund subscription") - - peerIDsString := fs.String("peer-ids", "", "peer ids") - dkgSignersString := fs.String("dkg-sign-keys", "", "dkg signing keys") - dkgEncryptersString := fs.String("dkg-encrypt-keys", "", "dkg encrypt keys") - ocr2KeyBundleIDsString := fs.String("key-bundle-ids", "", "ocr2 key bundle ids") - onChainPublicKeysString := fs.String("on-chain-public-keys", "", "ocr2 on-chain public keys") - offChainPublicKeysString := fs.String("off-chain-public-keys", "", "ocr2 off-chain public keys") - configPublicKeysString := fs.String("config-public-keys", "", "ocr2 config public keys") - ethSendingKeysString := fs.String("eth-sending-keys", "", "eth sending keys") - - nodeCount := fs.Int("node-count", 6, "number of nodes") - fundingAmount := fs.Int64("funding-amount", 1e17, "amount to fund nodes") // .1 ETH - - helpers.ParseArgs( - fs, - os.Args[2:], - "link-address", - "link-eth-feed", - "dkg-sign-keys", - "dkg-encrypt-keys", - "key-bundle-ids", - "on-chain-public-keys", - "off-chain-public-keys", - "config-public-keys", - "eth-sending-keys", - "peer-ids", - ) - - peerIDs := strings.Split(*peerIDsString, ",") - dkgSigners := strings.Split(*dkgSignersString, ",") - dkgEncrypters := strings.Split(*dkgEncryptersString, ",") - ocr2KeyBundleIDs := strings.Split(*ocr2KeyBundleIDsString, ",") - onChainPublicKeys := strings.Split(*onChainPublicKeysString, ",") - offChainPublicKeys := strings.Split(*offChainPublicKeysString, ",") - configPublicKeys := strings.Split(*configPublicKeysString, ",") - - var sendingKeys [][]string - flatSendingKeys := strings.Split(*ethSendingKeysString, ",") - sendingKeysPerNode := len(flatSendingKeys) / (*nodeCount - 1) - for i := 0; i < *nodeCount-1; i++ { - sendingKeys = append(sendingKeys, flatSendingKeys[i*sendingKeysPerNode:i*sendingKeysPerNode+sendingKeysPerNode]) - } - - if *nodeCount < 6 { - fmt.Println("Node count too low for OCR2VRF job, need at least 6.") - os.Exit(1) - } - - delays := helpers.ParseIntSlice(*confDelays) - if len(delays) != 8 { - fmt.Println("confDelays must have a length of 8") - os.Exit(1) - } - - link := common.HexToAddress(*linkAddress) - feedAddress := common.HexToAddress(*linkEthFeed) - - // Deploy DKG and VRF contracts, and add VRF - // as a consumer of DKG events. - fmt.Println("Deploying DKG contract...") - dkgAddress := deployDKG(e) - - fmt.Println("Deploying VRF coordinator...") - vrfCoordinatorAddress, _ := deployVRFCoordinator(e, big.NewInt(*beaconPeriodBlocks), link.String(), feedAddress.String()) - - fmt.Println("Deploying VRF beacon...") - vrfBeaconAddress := deployVRFBeacon(e, vrfCoordinatorAddress.String(), link.String(), dkgAddress.String(), *keyID) - - fmt.Println("Adding VRF Beacon as DKG client...") - addClientToDKG(e, dkgAddress.String(), *keyID, vrfBeaconAddress.String()) - - fmt.Println("Adding VRF Beacon as producer in VRF Coordinator") - setProducer(e, vrfCoordinatorAddress.String(), vrfBeaconAddress.String()) - - fmt.Println("Deploying beacon consumer...") - consumerAddress := deployVRFBeaconCoordinatorConsumer(e, vrfCoordinatorAddress.String(), false, big.NewInt(*beaconPeriodBlocks)) - - fmt.Println("Creating subscription...") - createSubscription(e, vrfCoordinatorAddress.String()) - - subID := findSubscriptionID(e, vrfCoordinatorAddress.String()) - - fmt.Println("Adding consumer to subscription...") - addConsumer(e, vrfCoordinatorAddress.String(), consumerAddress.String(), subID) - - subscriptionBalance := decimal.RequireFromString(*subscriptionBalanceString).BigInt() - if subscriptionBalance.Cmp(big.NewInt(0)) > 0 { - fmt.Println("\nFunding subscription with", subscriptionBalance, "juels...") - eoaFundSubscription(e, vrfCoordinatorAddress.String(), link.String(), subscriptionBalance, subID) - } else { - fmt.Println("Subscription", subID, "NOT getting funded. You must fund the subscription in order to use it!") - } - - var forwarderAddresses []common.Address - var forwarderAddressesStrings []string - var nodesToFund []string - var transmitters []string - - // Set up a forwarder for each node. - fmt.Println("Deploying transaction forwarders...") - for i := 0; i < *nodeCount-1; i++ { - // Deploy an authorized forwarder, and add it to the list of forwarders. - f := deployAuthorizedForwarder(e, link, e.Owner.From) - forwarderAddresses = append(forwarderAddresses, f) - forwarderAddressesStrings = append(forwarderAddressesStrings, f.String()) - } - - // Assign the sending keys to the deployed forwarders. - fmt.Printf("ForwarderAddresses : %v\n", forwarderAddressesStrings) - for i, f := range forwarderAddresses { - // Convert the sending strings for a transmitter to addresses. - var sendinKeysAddresses []common.Address - sendingKeysStrings := sendingKeys[i] - for _, s := range sendingKeysStrings { - sendinKeysAddresses = append(sendinKeysAddresses, common.HexToAddress(s)) - } - - // Set authorized senders for the corresponding forwarder. - setAuthorizedSenders(e, f, sendinKeysAddresses) - - // Fund the sending keys. - nodesToFund = append(nodesToFund, sendingKeysStrings...) - - // Set the authorized forwarder as the OCR transmitter. - transmitters = append(transmitters, f.String()) - } - - var payees []common.Address - var reportTransmitters []common.Address - for _, t := range transmitters { - payees = append(payees, e.Owner.From) - reportTransmitters = append(reportTransmitters, common.HexToAddress(t)) - } - - fmt.Printf("Setting EOA: %s as payee for transmitters: %v \n", e.Owner.From, reportTransmitters) - setPayees(e, vrfBeaconAddress.String(), reportTransmitters, payees) - - fmt.Println("Funding transmitters...") - helpers.FundNodes(e, nodesToFund, big.NewInt(*fundingAmount)) - - fmt.Println("Deploying batch beacon consumer...") - loadTestConsumerAddress := deployLoadTestVRFBeaconCoordinatorConsumer(e, vrfCoordinatorAddress.String(), false, big.NewInt(*beaconPeriodBlocks)) - addConsumer(e, vrfCoordinatorAddress.String(), loadTestConsumerAddress.String(), subID) - - for i := 0; i < *nodeCount; i++ { - // Apply forwarder args if using the forwarder. - if i > 0 { - adjustedIndex := i - 1 - vrfJob := fmt.Sprintf( - cmd.OCR2VRFTemplate, - e.ChainID, - vrfBeaconAddress.String(), - ocr2KeyBundleIDs[adjustedIndex], - forwarderAddresses[adjustedIndex].String(), - true, // forwardingAllowed - "", // P2P Bootstrapper - e.ChainID, - sendingKeys[adjustedIndex], - dkgEncrypters[adjustedIndex], - dkgSigners[adjustedIndex], - *keyID, - dkgAddress.String(), - vrfCoordinatorAddress.String(), - *linkEthFeed, - ) - fmt.Printf("VRF JOB FOR NODE %d:\n%v\n", i-1, vrfJob) // zero-based index to match infra. - } else { - bootstrapJob := fmt.Sprintf(cmd.BootstrapTemplate, e.ChainID, dkgAddress.String(), e.ChainID) - fmt.Printf("VRF BOOTSTRAP JOB:\n%v\n", bootstrapJob) - } - } - printStandardCommands( - dkgAddress, - vrfBeaconAddress, - consumerAddress, - loadTestConsumerAddress, - keyID, - confDelays, - onChainPublicKeys, - offChainPublicKeys, - configPublicKeys, - peerIDs, - transmitters, - dkgEncrypters, - dkgSigners, - subID.String(), - ) -} - -func printStandardCommands( - dkgAddress common.Address, - vrfBeaconAddress common.Address, - consumerAddress common.Address, - loadTestConsumerAddress common.Address, - keyID *string, - confDelays *string, - onChainPublicKeys []string, - offChainPublicKeys []string, - configPublicKeys []string, - peerIDs []string, - transmitters []string, - dkgEncrypters []string, - dkgSigners []string, - subID string, -) { - fmt.Println("Generated dkg setConfig command:") - dkgCommand := fmt.Sprintf( - "go run . dkg-set-config -dkg-address %s -key-id %s -onchain-pub-keys %s -offchain-pub-keys %s -config-pub-keys %s -peer-ids %s -transmitters %s -dkg-encryption-pub-keys %s -dkg-signing-pub-keys %s -schedule 1,1,1,1,1", - dkgAddress.String(), - *keyID, - strings.Join(onChainPublicKeys, ","), - strings.Join(offChainPublicKeys, ","), - strings.Join(configPublicKeys, ","), - strings.Join(peerIDs, ","), - strings.Join(transmitters, ","), - strings.Join(dkgEncrypters, ","), - strings.Join(dkgSigners, ","), - ) - fmt.Println(dkgCommand) - - fmt.Println() - fmt.Println("Generated vrf setConfig command:") - vrfCommand := fmt.Sprintf( - "go run . beacon-set-config -beacon-address %s -conf-delays %s -onchain-pub-keys %s -offchain-pub-keys %s -config-pub-keys %s -peer-ids %s -transmitters %s -schedule 1,1,1,1,1", - vrfBeaconAddress.String(), - *confDelays, - strings.Join(onChainPublicKeys, ","), - strings.Join(offChainPublicKeys, ","), - strings.Join(configPublicKeys, ","), - strings.Join(peerIDs, ","), - strings.Join(transmitters, ","), - ) - fmt.Println(vrfCommand) - - fmt.Println() - fmt.Println("Consumer address:", consumerAddress.String()) - fmt.Println("Consumer request command:") - requestCommand := fmt.Sprintf( - "go run . consumer-request-randomness -consumer-address %s -sub-id %s", - consumerAddress.Hex(), subID) - fmt.Println(requestCommand) - fmt.Println() - - fmt.Println("Consumer callback request command:") - callbackCommand := fmt.Sprintf( - "go run . consumer-request-callback -consumer-address %s -sub-id %s", - consumerAddress.Hex(), subID) - fmt.Println(callbackCommand) - fmt.Println() - - fmt.Println("Consumer callback batch request command:") - callbackCommand = fmt.Sprintf( - "go run . consumer-request-callback-batch -consumer-address %s -sub-id %s -batch-size ", - loadTestConsumerAddress.Hex(), subID) - fmt.Println(callbackCommand) - fmt.Println() - - fmt.Println("Consumer redeem randomness command:") - redeemCommand := fmt.Sprintf( - "go run . consumer-redeem-randomness -consumer-address %s -sub-id %s -request-id ", - consumerAddress.Hex(), subID) - fmt.Println(redeemCommand) - fmt.Println() -} - -func SetupNode( - e helpers.Environment, - flagSet *flag.FlagSet, - nodeIdx int, - databasePrefix, - databaseSuffixes string, - useForwarder bool, - resetDB bool, - wsUrl string, - httpUrl string, -) *cmd.SetupOCR2VRFNodePayload { - configureEnvironmentVariables((useForwarder) && (nodeIdx > 0), e.ChainID, wsUrl, httpUrl, nodeIdx, databasePrefix, databaseSuffixes) - - client := newSetupClient() - app := cmd.NewApp(client) - ctx := cli.NewContext(app, flagSet, nil) - - defer func() { - err := app.After(ctx) - helpers.PanicErr(err) - }() - - err := app.Before(ctx) - helpers.PanicErr(err) - - if resetDB { - resetDatabase(client, ctx) - } - - return setupOCR2VRFNodeFromClient(client, ctx, e) -} diff --git a/core/scripts/ocr2vrf/util.go b/core/scripts/ocr2vrf/util.go deleted file mode 100644 index d19e7289ab4..00000000000 --- a/core/scripts/ocr2vrf/util.go +++ /dev/null @@ -1,619 +0,0 @@ -package main - -import ( - "context" - "crypto/ed25519" - "encoding/hex" - "fmt" - "math/big" - "os" - "strconv" - "strings" - - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - gethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/ethclient" - "github.com/urfave/cli" - "go.dedis.ch/kyber/v3" - "go.dedis.ch/kyber/v3/group/edwards25519" - "go.dedis.ch/kyber/v3/pairing" - - "github.com/smartcontractkit/libocr/offchainreporting2plus/confighelper" - "github.com/smartcontractkit/libocr/offchainreporting2plus/types" - - "github.com/smartcontractkit/chainlink-vrf/altbn_128" - "github.com/smartcontractkit/chainlink-vrf/dkg" - "github.com/smartcontractkit/chainlink-vrf/ocr2vrf" - ocr2vrftypes "github.com/smartcontractkit/chainlink-vrf/types" - - "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils" - "github.com/smartcontractkit/chainlink/v2/core/cmd" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/authorized_forwarder" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/link_token_interface" - dkgContract "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/dkg" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/load_test_beacon_consumer" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/vrf_beacon" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/vrf_beacon_consumer" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/vrf_coordinator" - - helpers "github.com/smartcontractkit/chainlink/core/scripts/common" -) - -var ( - suite pairing.Suite = &altbn_128.PairingSuite{} - g1 = suite.G1() - g2 = suite.G2() - tomlConfigTemplate = ` - [P2P.V2] - ListenAddresses = ["127.0.0.1:8000"] - - [Feature] - LogPoller = true - - [OCR2] - Enabled = true - - [[EVM]] - FinalityDepth = 10 - ChainID = '%d' - - [EVM.Transactions] - ForwardersEnabled = %t - - [EVM.HeadTracker] - HistoryDepth = 1 - - [[EVM.Nodes]] - Name = "chain1" - HTTPURL = "%s" - WSURL = "%s" - ` -) - -func deployDKG(e helpers.Environment) common.Address { - _, tx, _, err := dkgContract.DeployDKG(e.Owner, e.Ec) - helpers.PanicErr(err) - return helpers.ConfirmContractDeployed(context.Background(), e.Ec, tx, e.ChainID) -} - -func deployVRFCoordinator(e helpers.Environment, beaconPeriodBlocks *big.Int, linkAddress, linkEthFeed string) (common.Address, *vrf_coordinator.VRFCoordinator) { - _, tx, coordinator, err := vrf_coordinator.DeployVRFCoordinator( - e.Owner, - e.Ec, - beaconPeriodBlocks, - common.HexToAddress(linkAddress), - ) - helpers.PanicErr(err) - return helpers.ConfirmContractDeployed(context.Background(), e.Ec, tx, e.ChainID), coordinator -} - -func configureVRFCoordinator(e helpers.Environment, coordinator *vrf_coordinator.VRFCoordinator, maxCbGasLimit, maxCbArgsLen uint32) *gethtypes.Receipt { - tx, err := coordinator.SetCallbackConfig(e.Owner, vrf_coordinator.VRFCoordinatorCallbackConfig{ - MaxCallbackGasLimit: maxCbGasLimit, - MaxCallbackArgumentsLength: maxCbArgsLen, - }) - helpers.PanicErr(err) - return helpers.ConfirmTXMined(context.Background(), e.Ec, tx, e.ChainID, "vrf coordinator setConfig") -} - -func deployAuthorizedForwarder(e helpers.Environment, link common.Address, owner common.Address) common.Address { - _, tx, _, err := authorized_forwarder.DeployAuthorizedForwarder(e.Owner, e.Ec, link, owner, common.Address{}, []byte{}) - helpers.PanicErr(err) - return helpers.ConfirmContractDeployed(context.Background(), e.Ec, tx, e.ChainID) -} - -func setAuthorizedSenders(e helpers.Environment, forwarder common.Address, senders []common.Address) { - f, err := authorized_forwarder.NewAuthorizedForwarder(forwarder, e.Ec) - helpers.PanicErr(err) - tx, err := f.SetAuthorizedSenders(e.Owner, senders) - helpers.PanicErr(err) - helpers.ConfirmTXMined(context.Background(), e.Ec, tx, e.ChainID) -} - -func deployVRFBeacon(e helpers.Environment, coordinatorAddress, linkAddress, dkgAddress, keyID string) common.Address { - keyIDBytes := decodeHexTo32ByteArray(keyID) - _, tx, _, err := vrf_beacon.DeployVRFBeacon(e.Owner, e.Ec, common.HexToAddress(linkAddress), common.HexToAddress(coordinatorAddress), common.HexToAddress(dkgAddress), keyIDBytes) - helpers.PanicErr(err) - return helpers.ConfirmContractDeployed(context.Background(), e.Ec, tx, e.ChainID) -} - -func deployVRFBeaconCoordinatorConsumer(e helpers.Environment, coordinatorAddress string, shouldFail bool, beaconPeriodBlocks *big.Int) common.Address { - _, tx, _, err := vrf_beacon_consumer.DeployBeaconVRFConsumer(e.Owner, e.Ec, common.HexToAddress(coordinatorAddress), shouldFail, beaconPeriodBlocks) - helpers.PanicErr(err) - return helpers.ConfirmContractDeployed(context.Background(), e.Ec, tx, e.ChainID) -} - -func deployLoadTestVRFBeaconCoordinatorConsumer(e helpers.Environment, coordinatorAddress string, shouldFail bool, beaconPeriodBlocks *big.Int) common.Address { - _, tx, _, err := load_test_beacon_consumer.DeployLoadTestBeaconVRFConsumer(e.Owner, e.Ec, common.HexToAddress(coordinatorAddress), shouldFail, beaconPeriodBlocks) - helpers.PanicErr(err) - return helpers.ConfirmContractDeployed(context.Background(), e.Ec, tx, e.ChainID) -} - -func addClientToDKG(e helpers.Environment, dkgAddress string, keyID string, clientAddress string) { - keyIDBytes := decodeHexTo32ByteArray(keyID) - - dkg, err := dkgContract.NewDKG(common.HexToAddress(dkgAddress), e.Ec) - helpers.PanicErr(err) - - tx, err := dkg.AddClient(e.Owner, keyIDBytes, common.HexToAddress(clientAddress)) - helpers.PanicErr(err) - helpers.ConfirmTXMined(context.Background(), e.Ec, tx, e.ChainID) -} - -func removeClientFromDKG(e helpers.Environment, dkgAddress string, keyID string, clientAddress string) { - keyIDBytes := decodeHexTo32ByteArray(keyID) - - dkg, err := dkgContract.NewDKG(common.HexToAddress(dkgAddress), e.Ec) - helpers.PanicErr(err) - - tx, err := dkg.RemoveClient(e.Owner, keyIDBytes, common.HexToAddress(clientAddress)) - helpers.PanicErr(err) - helpers.ConfirmTXMined(context.Background(), e.Ec, tx, e.ChainID) -} - -func setDKGConfig(e helpers.Environment, dkgAddress string, c dkgSetConfigArgs) { - oracleIdentities := toOraclesIdentityList( - helpers.ParseAddressSlice(c.onchainPubKeys), - strings.Split(c.offchainPubKeys, ","), - strings.Split(c.configPubKeys, ","), - strings.Split(c.peerIDs, ","), - strings.Split(c.transmitters, ",")) - - ed25519Suite := edwards25519.NewBlakeSHA256Ed25519() - var signingKeys []kyber.Point - for _, signingKey := range strings.Split(c.dkgSigningPubKeys, ",") { - signingKeyBytes, err := hex.DecodeString(signingKey) - helpers.PanicErr(err) - signingKeyPoint := ed25519Suite.Point() - helpers.PanicErr(signingKeyPoint.UnmarshalBinary(signingKeyBytes)) - signingKeys = append(signingKeys, signingKeyPoint) - } - - altbn128Suite := &altbn_128.PairingSuite{} - var encryptionKeys []kyber.Point - for _, encryptionKey := range strings.Split(c.dkgEncryptionPubKeys, ",") { - encryptionKeyBytes, err := hex.DecodeString(encryptionKey) - helpers.PanicErr(err) - encryptionKeyPoint := altbn128Suite.G1().Point() - helpers.PanicErr(encryptionKeyPoint.UnmarshalBinary(encryptionKeyBytes)) - encryptionKeys = append(encryptionKeys, encryptionKeyPoint) - } - - keyIDBytes := decodeHexTo32ByteArray(c.keyID) - - offchainConfig, err := dkg.OffchainConfig(encryptionKeys, signingKeys, &altbn_128.G1{}, &ocr2vrftypes.PairingTranslation{ - Suite: &altbn_128.PairingSuite{}, - }) - helpers.PanicErr(err) - onchainConfig, err := dkg.OnchainConfig(dkg.KeyID(keyIDBytes)) - helpers.PanicErr(err) - - fmt.Println("dkg offchain config:", hex.EncodeToString(offchainConfig)) - fmt.Println("dkg onchain config:", hex.EncodeToString(onchainConfig)) - - _, _, f, onchainConfig, offchainConfigVersion, offchainConfig, err := confighelper.ContractSetConfigArgsForTests( - c.deltaProgress, - c.deltaResend, - c.deltaRound, - c.deltaGrace, - c.deltaStage, - c.maxRounds, - helpers.ParseIntSlice(c.schedule), - oracleIdentities, - offchainConfig, - c.maxDurationQuery, - c.maxDurationObservation, - c.maxDurationReport, - c.maxDurationAccept, - c.maxDurationTransmit, - int(c.f), - onchainConfig) - - helpers.PanicErr(err) - - dkg := newDKG(common.HexToAddress(dkgAddress), e.Ec) - - tx, err := dkg.SetConfig(e.Owner, helpers.ParseAddressSlice(c.onchainPubKeys), helpers.ParseAddressSlice(c.transmitters), f, onchainConfig, offchainConfigVersion, offchainConfig) - helpers.PanicErr(err) - helpers.ConfirmTXMined(context.Background(), e.Ec, tx, e.ChainID) -} - -func (c *vrfBeaconSetConfigArgs) setVRFBeaconConfig(e helpers.Environment, vrfBeaconAddr string) { - oracleIdentities := toOraclesIdentityList( - helpers.ParseAddressSlice(c.onchainPubKeys), - strings.Split(c.offchainPubKeys, ","), - strings.Split(c.configPubKeys, ","), - strings.Split(c.peerIDs, ","), - strings.Split(c.transmitters, ",")) - - confDelays := make(map[uint32]struct{}) - for _, c := range strings.Split(c.confDelays, ",") { - confDelay, err := strconv.ParseUint(c, 0, 32) - helpers.PanicErr(err) - confDelays[uint32(confDelay)] = struct{}{} - } - - onchainConfig := ocr2vrf.OnchainConfig(confDelays) - - _, _, f, onchainConfig, offchainConfigVersion, offchainConfig, err := confighelper.ContractSetConfigArgsForTests( - c.deltaProgress, - c.deltaResend, - c.deltaRound, - c.deltaGrace, - c.deltaStage, - c.maxRounds, - helpers.ParseIntSlice(c.schedule), - oracleIdentities, - ocr2vrf.OffchainConfig(&c.coordinatorConfig), // off-chain config - c.maxDurationQuery, - c.maxDurationObservation, - c.maxDurationReport, - c.maxDurationAccept, - c.maxDurationTransmit, - int(c.f), - onchainConfig) - - helpers.PanicErr(err) - - beacon := newVRFBeacon(common.HexToAddress(vrfBeaconAddr), e.Ec) - - tx, err := beacon.SetConfig(e.Owner, helpers.ParseAddressSlice(c.onchainPubKeys), helpers.ParseAddressSlice(c.transmitters), f, onchainConfig, offchainConfigVersion, offchainConfig) - helpers.PanicErr(err) - helpers.ConfirmTXMined(context.Background(), e.Ec, tx, e.ChainID) -} - -func setProducer(e helpers.Environment, vrfCoordinatorAddr, vrfBeaconAddr string) { - coordinator := newVRFCoordinator(common.HexToAddress(vrfCoordinatorAddr), e.Ec) - - tx, err := coordinator.SetProducer(e.Owner, common.HexToAddress(vrfBeaconAddr)) - helpers.PanicErr(err) - helpers.ConfirmTXMined(context.Background(), e.Ec, tx, e.ChainID) -} - -func createSubscription(e helpers.Environment, vrfCoordinatorAddr string) { - coordinator := newVRFCoordinator(common.HexToAddress(vrfCoordinatorAddr), e.Ec) - - tx, err := coordinator.CreateSubscription(e.Owner) - helpers.PanicErr(err) - helpers.ConfirmTXMined(context.Background(), e.Ec, tx, e.ChainID) -} - -func getSubscription(e helpers.Environment, vrfCoordinatorAddr string, subId *big.Int) vrf_coordinator.GetSubscription { - coordinator := newVRFCoordinator(common.HexToAddress(vrfCoordinatorAddr), e.Ec) - - sub, err := coordinator.GetSubscription(nil, subId) - helpers.PanicErr(err) - return sub -} - -// returns subscription ID that belongs to the given owner. Returns result found first -func findSubscriptionID(e helpers.Environment, vrfCoordinatorAddr string) *big.Int { - // Use most recent 500 blocks as search window. - head, err := e.Ec.BlockNumber(context.Background()) - helpers.PanicErr(err) - fopts := &bind.FilterOpts{ - Start: head - 500, - } - - coordinator := newVRFCoordinator(common.HexToAddress(vrfCoordinatorAddr), e.Ec) - subscriptionIterator, err := coordinator.FilterSubscriptionCreated(fopts, nil, []common.Address{e.Owner.From}) - helpers.PanicErr(err) - - if !subscriptionIterator.Next() { - helpers.PanicErr(fmt.Errorf("expected at leats 1 subID for the given owner %s", e.Owner.From.Hex())) - } - return subscriptionIterator.Event.SubId -} - -func addConsumer(e helpers.Environment, vrfCoordinatorAddr, consumerAddr string, subId *big.Int) { - coordinator := newVRFCoordinator(common.HexToAddress(vrfCoordinatorAddr), e.Ec) - - tx, err := coordinator.AddConsumer(e.Owner, subId, common.HexToAddress(consumerAddr)) - helpers.PanicErr(err) - helpers.ConfirmTXMined(context.Background(), e.Ec, tx, e.ChainID) -} - -func setPayees(e helpers.Environment, vrfBeaconAddr string, transmitters, payees []common.Address) { - beacon := newVRFBeacon(common.HexToAddress(vrfBeaconAddr), e.Ec) - - tx, err := beacon.SetPayees(e.Owner, transmitters, payees) - helpers.PanicErr(err) - helpers.ConfirmTXMined(context.Background(), e.Ec, tx, e.ChainID) -} - -func eoaFundSubscription(e helpers.Environment, coordinatorAddress, linkAddress string, amount, subID *big.Int) { - linkToken, err := link_token_interface.NewLinkToken(common.HexToAddress(linkAddress), e.Ec) - helpers.PanicErr(err) - bal, err := linkToken.BalanceOf(nil, e.Owner.From) - helpers.PanicErr(err) - fmt.Println("Initial account balance:", bal, e.Owner.From.String(), "Funding amount:", amount.String()) - b, err := utils.ABIEncode(`[{"type":"uint256"}]`, subID) - helpers.PanicErr(err) - tx, err := linkToken.TransferAndCall(e.Owner, common.HexToAddress(coordinatorAddress), amount, b) - helpers.PanicErr(err) - helpers.ConfirmTXMined(context.Background(), e.Ec, tx, e.ChainID, fmt.Sprintf("sub ID: %d", subID)) -} - -func toOraclesIdentityList(onchainPubKeys []common.Address, offchainPubKeys, configPubKeys, peerIDs, transmitters []string) []confighelper.OracleIdentityExtra { - offchainPubKeysBytes := []types.OffchainPublicKey{} - for _, pkHex := range offchainPubKeys { - pkBytes, err := hex.DecodeString(pkHex) - helpers.PanicErr(err) - pkBytesFixed := [ed25519.PublicKeySize]byte{} - n := copy(pkBytesFixed[:], pkBytes) - if n != ed25519.PublicKeySize { - panic("wrong num elements copied") - } - - offchainPubKeysBytes = append(offchainPubKeysBytes, types.OffchainPublicKey(pkBytesFixed)) - } - - configPubKeysBytes := []types.ConfigEncryptionPublicKey{} - for _, pkHex := range configPubKeys { - pkBytes, err := hex.DecodeString(pkHex) - helpers.PanicErr(err) - - pkBytesFixed := [ed25519.PublicKeySize]byte{} - n := copy(pkBytesFixed[:], pkBytes) - if n != ed25519.PublicKeySize { - panic("wrong num elements copied") - } - - configPubKeysBytes = append(configPubKeysBytes, types.ConfigEncryptionPublicKey(pkBytesFixed)) - } - - o := []confighelper.OracleIdentityExtra{} - for index := range configPubKeys { - o = append(o, confighelper.OracleIdentityExtra{ - OracleIdentity: confighelper.OracleIdentity{ - OnchainPublicKey: onchainPubKeys[index][:], - OffchainPublicKey: offchainPubKeysBytes[index], - PeerID: peerIDs[index], - TransmitAccount: types.Account(transmitters[index]), - }, - ConfigEncryptionPublicKey: configPubKeysBytes[index], - }) - } - return o -} - -func requestRandomness(e helpers.Environment, coordinatorAddress string, numWords uint16, subID, confDelay *big.Int) { - coordinator := newVRFCoordinator(common.HexToAddress(coordinatorAddress), e.Ec) - - tx, err := coordinator.RequestRandomness(e.Owner, confDelay, numWords, confDelay, nil) - helpers.PanicErr(err) - helpers.ConfirmTXMined(context.Background(), e.Ec, tx, e.ChainID) -} - -func redeemRandomness(e helpers.Environment, coordinatorAddress string, requestID, subID *big.Int) { - coordinator := newVRFCoordinator(common.HexToAddress(coordinatorAddress), e.Ec) - - tx, err := coordinator.RedeemRandomness(e.Owner, subID, requestID, nil) - helpers.PanicErr(err) - helpers.ConfirmTXMined(context.Background(), e.Ec, tx, e.ChainID) -} - -func requestRandomnessFromConsumer(e helpers.Environment, consumerAddress string, numWords uint16, subID, confDelay *big.Int) *big.Int { - consumer := newVRFBeaconCoordinatorConsumer(common.HexToAddress(consumerAddress), e.Ec) - - tx, err := consumer.TestRequestRandomness(e.Owner, numWords, subID, confDelay) - helpers.PanicErr(err) - receipt := helpers.ConfirmTXMined(context.Background(), e.Ec, tx, e.ChainID) - - periodBlocks, err := consumer.IBeaconPeriodBlocks(nil) - helpers.PanicErr(err) - - blockNumber := receipt.BlockNumber - periodOffset := new(big.Int).Mod(blockNumber, periodBlocks) - nextBeaconOutputHeight := new(big.Int).Sub(new(big.Int).Add(blockNumber, periodBlocks), periodOffset) - - fmt.Println("nextBeaconOutputHeight: ", nextBeaconOutputHeight) - - requestID, err := consumer.SRequestsIDs(nil, nextBeaconOutputHeight, confDelay) - helpers.PanicErr(err) - fmt.Println("requestID: ", requestID) - - return requestID -} - -func readRandomness( - e helpers.Environment, - consumerAddress string, - requestID *big.Int, - numWords int) { - consumer := newVRFBeaconCoordinatorConsumer(common.HexToAddress(consumerAddress), e.Ec) - for i := 0; i < numWords; i++ { - r, err := consumer.SReceivedRandomnessByRequestID(nil, requestID, big.NewInt(int64(i))) - helpers.PanicErr(err) - fmt.Println("random word", i, ":", r.String()) - } -} - -func requestRandomnessCallback( - e helpers.Environment, - consumerAddress string, - numWords uint16, - subID, confDelay *big.Int, - callbackGasLimit uint32, - args []byte, -) (requestID *big.Int) { - consumer := newVRFBeaconCoordinatorConsumer(common.HexToAddress(consumerAddress), e.Ec) - - tx, err := consumer.TestRequestRandomnessFulfillment(e.Owner, subID, numWords, confDelay, callbackGasLimit, args) - helpers.PanicErr(err) - receipt := helpers.ConfirmTXMined(context.Background(), e.Ec, tx, e.ChainID, "TestRequestRandomnessFulfillment") - - periodBlocks, err := consumer.IBeaconPeriodBlocks(nil) - helpers.PanicErr(err) - - blockNumber := receipt.BlockNumber - periodOffset := new(big.Int).Mod(blockNumber, periodBlocks) - nextBeaconOutputHeight := new(big.Int).Sub(new(big.Int).Add(blockNumber, periodBlocks), periodOffset) - - fmt.Println("nextBeaconOutputHeight: ", nextBeaconOutputHeight) - - requestID, err = consumer.SRequestsIDs(nil, nextBeaconOutputHeight, confDelay) - helpers.PanicErr(err) - fmt.Println("requestID: ", requestID) - - return requestID -} - -func redeemRandomnessFromConsumer(e helpers.Environment, consumerAddress string, subID, requestID *big.Int, numWords int64) { - consumer := newVRFBeaconCoordinatorConsumer(common.HexToAddress(consumerAddress), e.Ec) - - tx, err := consumer.TestRedeemRandomness(e.Owner, subID, requestID) - helpers.PanicErr(err) - helpers.ConfirmTXMined(context.Background(), e.Ec, tx, e.ChainID) - - printRandomnessFromConsumer(consumer, requestID, numWords) -} - -func printRandomnessFromConsumer(consumer *vrf_beacon_consumer.BeaconVRFConsumer, requestID *big.Int, numWords int64) { - for i := int64(0); i < numWords; i++ { - randomness, err := consumer.SReceivedRandomnessByRequestID(nil, requestID, big.NewInt(0)) - helpers.PanicErr(err) - fmt.Println("random words index", i, ":", randomness.String()) - } -} - -func newVRFCoordinator(addr common.Address, client *ethclient.Client) *vrf_coordinator.VRFCoordinator { - coordinator, err := vrf_coordinator.NewVRFCoordinator(addr, client) - helpers.PanicErr(err) - return coordinator -} - -func newDKG(addr common.Address, client *ethclient.Client) *dkgContract.DKG { - dkg, err := dkgContract.NewDKG(addr, client) - helpers.PanicErr(err) - return dkg -} - -func newVRFBeaconCoordinatorConsumer(addr common.Address, client *ethclient.Client) *vrf_beacon_consumer.BeaconVRFConsumer { - consumer, err := vrf_beacon_consumer.NewBeaconVRFConsumer(addr, client) - helpers.PanicErr(err) - return consumer -} - -func newLoadTestVRFBeaconCoordinatorConsumer(addr common.Address, client *ethclient.Client) *load_test_beacon_consumer.LoadTestBeaconVRFConsumer { - consumer, err := load_test_beacon_consumer.NewLoadTestBeaconVRFConsumer(addr, client) - helpers.PanicErr(err) - return consumer -} - -func newVRFBeacon(addr common.Address, client *ethclient.Client) *vrf_beacon.VRFBeacon { - beacon, err := vrf_beacon.NewVRFBeacon(addr, client) - helpers.PanicErr(err) - return beacon -} - -func decodeHexTo32ByteArray(val string) (byteArray [32]byte) { - decoded, err := hex.DecodeString(val) - helpers.PanicErr(err) - if len(decoded) != 32 { - panic(fmt.Sprintf("expected value to be 32 bytes but received %d bytes", len(decoded))) - } - copy(byteArray[:], decoded) - return -} - -func setupOCR2VRFNodeFromClient(client *cmd.Shell, context *cli.Context, e helpers.Environment) *cmd.SetupOCR2VRFNodePayload { - payload, err := client.ConfigureOCR2VRFNode(context, e.Owner, e.Ec) - helpers.PanicErr(err) - - return payload -} - -func configureEnvironmentVariables(useForwarder bool, chainID int64, wsUrl string, ethURL string, index int, databasePrefix string, databaseSuffixes string) { - // Set permitted envars for v2. - helpers.PanicErr(os.Setenv("CL_DATABASE_URL", fmt.Sprintf("%s-%d?%s", databasePrefix, index, databaseSuffixes))) - helpers.PanicErr(os.Setenv("CL_CONFIG", fmt.Sprintf(tomlConfigTemplate, chainID, useForwarder, ethURL, wsUrl))) - - // Unset prohibited envars for v2. - helpers.PanicErr(os.Unsetenv("ETH_URL")) - helpers.PanicErr(os.Unsetenv("ETH_HTTP_URL")) - helpers.PanicErr(os.Unsetenv("ETH_CHAIN_ID")) -} - -func resetDatabase(client *cmd.Shell, context *cli.Context) { - helpers.PanicErr(client.ResetDatabase(context)) -} - -func newSetupClient() *cmd.Shell { - prompter := cmd.NewTerminalPrompter() - return &cmd.Shell{ - Renderer: cmd.RendererTable{Writer: os.Stdout}, - AppFactory: cmd.ChainlinkAppFactory{}, - KeyStoreAuthenticator: cmd.TerminalKeyStoreAuthenticator{Prompter: prompter}, - FallbackAPIInitializer: cmd.NewPromptingAPIInitializer(prompter), - Runner: cmd.ChainlinkRunner{}, - PromptingSessionRequestBuilder: cmd.NewPromptingSessionRequestBuilder(prompter), - ChangePasswordPrompter: cmd.NewChangePasswordPrompter(), - PasswordPrompter: cmd.NewPasswordPrompter(), - } -} - -func requestRandomnessCallbackBatch( - e helpers.Environment, - consumerAddress string, - numWords uint16, - subID, confDelay *big.Int, - callbackGasLimit uint32, - args []byte, - batchSize *big.Int, -) (requestID *big.Int) { - consumer := newLoadTestVRFBeaconCoordinatorConsumer(common.HexToAddress(consumerAddress), e.Ec) - - tx, err := consumer.TestRequestRandomnessFulfillmentBatch(e.Owner, subID, numWords, confDelay, callbackGasLimit, args, batchSize) - helpers.PanicErr(err) - receipt := helpers.ConfirmTXMined(context.Background(), e.Ec, tx, e.ChainID, "TestRequestRandomnessFulfillment") - - periodBlocks, err := consumer.IBeaconPeriodBlocks(nil) - helpers.PanicErr(err) - - blockNumber := receipt.BlockNumber - periodOffset := new(big.Int).Mod(blockNumber, periodBlocks) - nextBeaconOutputHeight := new(big.Int).Sub(new(big.Int).Add(blockNumber, periodBlocks), periodOffset) - - fmt.Println("nextBeaconOutputHeight: ", nextBeaconOutputHeight) - - requestID, err = consumer.SRequestsIDs(nil, nextBeaconOutputHeight, confDelay) - helpers.PanicErr(err) - fmt.Println("requestID: ", requestID) - - return requestID -} - -func printLoadtestResults(e helpers.Environment, consumerAddress string) { - consumer := newLoadTestVRFBeaconCoordinatorConsumer(common.HexToAddress(consumerAddress), e.Ec) - - totalRequests, err := consumer.STotalRequests(nil) - helpers.PanicErr(err) - - totalFulfilled, err := consumer.STotalFulfilled(nil) - helpers.PanicErr(err) - - avgBlocksInMil, err := consumer.SAverageFulfillmentInMillions(nil) - helpers.PanicErr(err) - - slowestBlocks, err := consumer.SSlowestFulfillment(nil) - helpers.PanicErr(err) - - fastestBlock, err := consumer.SFastestFulfillment(nil) - helpers.PanicErr(err) - - slowestRequest, err := consumer.SSlowestRequestID(nil) - helpers.PanicErr(err) - - pendingRequests, err := consumer.PendingRequests(nil) - helpers.PanicErr(err) - - fmt.Println("Total Requests: ", totalRequests.Uint64()) - fmt.Println("Total Fulfilled: ", totalFulfilled.Uint64()) - fmt.Println("Average Fulfillment Delay in Blocks: ", float64(avgBlocksInMil.Uint64())/1000000) - fmt.Println("Slowest Fulfillment Delay in Blocks: ", slowestBlocks.Uint64()) - fmt.Println("Slowest Request ID: ", slowestRequest.Uint64()) - fmt.Println("Fastest Fulfillment Delay in Blocks: ", fastestBlock.Uint64()) - fmt.Println("Pending Requests: ", pendingRequests) -} diff --git a/core/scripts/ocr2vrf/verify.go b/core/scripts/ocr2vrf/verify.go deleted file mode 100644 index 7d7fb94496a..00000000000 --- a/core/scripts/ocr2vrf/verify.go +++ /dev/null @@ -1,181 +0,0 @@ -package main - -import ( - "context" - "fmt" - "math/big" - - "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/vm" - bn256 "github.com/ethereum/go-ethereum/crypto/bn256/google" - "go.dedis.ch/kyber/v3" - "go.dedis.ch/kyber/v3/group/mod" - "go.dedis.ch/kyber/v3/pairing" - - "github.com/smartcontractkit/chainlink-vrf/altbn_128" - ocr2vrftypes "github.com/smartcontractkit/chainlink-vrf/types" - - helpers "github.com/smartcontractkit/chainlink/core/scripts/common" - dkgContract "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/dkg" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/vrf_beacon" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/vrf_coordinator" -) - -func getDKGLatestConfigDetails(e helpers.Environment, dkgAddress string) dkgContract.LatestConfigDetails { - dkg := newDKG(common.HexToAddress(dkgAddress), e.Ec) - dkgConfig, err := dkg.LatestConfigDetails(nil) - helpers.PanicErr(err) - - return dkgConfig -} - -func getVRFLatestConfigDetails(e helpers.Environment, beaconAddress string) vrf_beacon.LatestConfigDetails { - beacon := newVRFBeacon(common.HexToAddress(beaconAddress), e.Ec) - beaconConfig, err := beacon.LatestConfigDetails(nil) - helpers.PanicErr(err) - - return beaconConfig -} - -func getDKGKeyData(e helpers.Environment, dkgAddress string, keyID, configDigest [32]byte) dkgContract.KeyDataStructKeyData { - dkg := newDKG(common.HexToAddress(dkgAddress), e.Ec) - keyData, err := dkg.GetKey(nil, keyID, configDigest) - helpers.PanicErr(err) - - return keyData -} - -func getKeyID(e helpers.Environment, beaconAddress string) [32]byte { - beacon := newVRFBeacon(common.HexToAddress(beaconAddress), e.Ec) - keyID, err := beacon.SKeyID(nil) - helpers.PanicErr(err) - return keyID -} - -func getPublicKey(e helpers.Environment, dkgAddress string, keyID, configDigest [32]byte) kyber.Point { - keyData := getDKGKeyData(e, dkgAddress, keyID, configDigest) - kg := &altbn_128.G2{} - pk := kg.Point() - err := pk.UnmarshalBinary(keyData.PublicKey) - helpers.PanicErr(err) - return pk -} - -func getHashToCurveMessage(e helpers.Environment, height uint64, confDelay uint32, vrfConfigDigest [32]byte, pk kyber.Point) *altbn_128.HashProof { - blockNumber := big.NewInt(0).SetUint64(height) - block, err := e.Ec.BlockByNumber(context.Background(), blockNumber) - helpers.PanicErr(err) - b := ocr2vrftypes.Block{ - Height: height, - ConfirmationDelay: confDelay, - Hash: block.Hash(), - } - h := b.VRFHash(vrfConfigDigest, pk) - return altbn_128.NewHashProof(h) -} - -func getVRFSignature(e helpers.Environment, coordinatorAddress string, height, confDelay, searchWindow uint64) (proofG1X, proofG1Y *big.Int) { - // get transmission logs from requested block to requested block + search window blocks - // TODO: index transmission logs by height and confirmation delay to - // make the FilterQuery call more efficient - query := ethereum.FilterQuery{ - FromBlock: big.NewInt(0).SetUint64(height), - ToBlock: big.NewInt(0).SetUint64(height + searchWindow), - Addresses: []common.Address{ - common.HexToAddress(coordinatorAddress), - }, - Topics: [][]common.Hash{ - { - vrf_coordinator.VRFCoordinatorOutputsServed{}.Topic(), - }, - }, - } - logs, err := e.Ec.FilterLogs(context.Background(), query) - helpers.PanicErr(err) - - coordinator := newVRFCoordinator(common.HexToAddress(coordinatorAddress), e.Ec) - for _, log := range logs { - t, err := coordinator.ParseOutputsServed(log) - helpers.PanicErr(err) - for _, o := range t.OutputsServed { - if o.ConfirmationDelay.Uint64() == confDelay && o.Height == height { - proofG1X = o.ProofG1X - proofG1Y = o.ProofG1Y - } - } - } - return -} - -func verifyBeaconRandomness(e helpers.Environment, dkgAddress, beaconAddress string, coordinatorAddress string, height, confDelay, searchWindow uint64) bool { - dkgConfig := getDKGLatestConfigDetails(e, dkgAddress) - vrfConfig := getVRFLatestConfigDetails(e, beaconAddress) - keyID := getKeyID(e, beaconAddress) - pk := getPublicKey(e, dkgAddress, keyID, dkgConfig.ConfigDigest) - h := getHashToCurveMessage(e, height, uint32(confDelay), vrfConfig.ConfigDigest, pk) - hpoint := h.HashPoint - negHpoint := g1.Point() - negHpoint.Neg(hpoint) - g2Base := g2.Point().Base() - - // get BLS signature for the given height and confirmation delay - proofG1X, proofG1Y := getVRFSignature(e, coordinatorAddress, height, confDelay, searchWindow) - if proofG1X.Cmp(big.NewInt(0)) == 0 || proofG1Y.Cmp(big.NewInt(0)) == 0 { - panic("signature not found") - } - g1Proof, err := altbn_128.CoordinatesToG1(mod.NewInt(proofG1X, bn256.P), mod.NewInt(proofG1Y, bn256.P)) - helpers.PanicErr(err) - - // Perform verification of BLS signature is done using pairing function - isValid := validateSignature(suite, hpoint, pk, g1Proof) - fmt.Println("Verification Result: ", isValid) - - // Perform the same verification as above using precompiled contract 0x8 - // This should always result in same result as validateSignature() - // signature is valid iff contract0x8(-b_x, -b_y, pk_x, pk_y, p_x, p_y, g2_x, g2_y) == 1 - input := make([]byte, 384) - hb := altbn_128.LongMarshal(negHpoint) - if len(hb) != 64 { - panic("wrong length of hpoint") - } - copy(input[:64], hb[:]) - - pkb, err := pk.MarshalBinary() - helpers.PanicErr(err) - if len(pkb) != 128 { - panic("wrong length of public key") - } - copy(input[64:192], pkb) - - if len(proofG1X.Bytes()) != 32 { - panic("wrong length of VRF signature x-coordinator") - } - if len(proofG1Y.Bytes()) != 32 { - panic("wrong length of VRF signature y-coordinator") - } - copy(input[192:224], proofG1X.Bytes()) - copy(input[224:256], proofG1Y.Bytes()) - - g2b, err := g2Base.MarshalBinary() - helpers.PanicErr(err) - if len(g2b) != 128 { - panic("wrong length of altbn_128 base points") - } - copy(input[256:384], g2b) - - contract := vm.PrecompiledContractsByzantium[common.HexToAddress("0x8")] - res, err := contract.Run(input) - helpers.PanicErr(err) - isValidPrecompiledContract := big.NewInt(0).SetBytes(res).Uint64() == 1 - fmt.Println("Verification Result Using Precompiled Contract 0x8: ", isValidPrecompiledContract) - - if isValid && isValidPrecompiledContract { - return true - } - return false -} - -func validateSignature(p pairing.Suite, msg, publicKey, signature kyber.Point) bool { - return p.Pair(msg, publicKey).Equal(p.Pair(signature, p.G2().Point().Base())) -} diff --git a/core/scripts/setup_testdb.sh b/core/scripts/setup_testdb.sh index 534c980feb9..85aa5812e23 100755 --- a/core/scripts/setup_testdb.sh +++ b/core/scripts/setup_testdb.sh @@ -57,7 +57,7 @@ echo $db_url repo=$(git rev-parse --show-toplevel) pushd $repo export $db_url -make testdb || exit_error "Failed to create test database" +make testdb-force || exit_error "Failed to create test database" popd # Set the database URL in the .dbenv file diff --git a/core/scripts/vrfv2plus/testnet/main.go b/core/scripts/vrfv2plus/testnet/main.go index 1fabd20b60f..a37a5391021 100644 --- a/core/scripts/vrfv2plus/testnet/main.go +++ b/core/scripts/vrfv2plus/testnet/main.go @@ -17,6 +17,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/chain_specific_util_helper" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrf_coordinator_v2_5" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrf_coordinator_v2_5_optimism" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrf_coordinator_v2plus_interface" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrf_v2plus_load_test_with_metrics" @@ -43,6 +44,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrf_v2plus_sub_owner" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrfv2plus_wrapper" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrfv2plus_wrapper_consumer_example" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrfv2plus_wrapper_optimism" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/blockhashstore" "github.com/smartcontractkit/chainlink/v2/core/services/keystore" @@ -519,11 +521,12 @@ func main() { v2plusscripts.DeployBHS(e) case "coordinator-deploy": coordinatorDeployCmd := flag.NewFlagSet("coordinator-deploy", flag.ExitOnError) + coordinatorType := flag.String("coordinator-type", "", "Specify which coordinator type to use: layer1, arbitrum, optimism") coordinatorDeployLinkAddress := coordinatorDeployCmd.String("link-address", "", "address of link token") coordinatorDeployBHSAddress := coordinatorDeployCmd.String("bhs-address", "", "address of bhs") coordinatorDeployLinkEthFeedAddress := coordinatorDeployCmd.String("link-eth-feed", "", "address of link-eth-feed") - helpers.ParseArgs(coordinatorDeployCmd, os.Args[2:], "link-address", "bhs-address", "link-eth-feed") - v2plusscripts.DeployCoordinator(e, *coordinatorDeployLinkAddress, *coordinatorDeployBHSAddress, *coordinatorDeployLinkEthFeedAddress) + helpers.ParseArgs(coordinatorDeployCmd, os.Args[2:], "coordinator-type", "link-address", "bhs-address", "link-eth-feed") + v2plusscripts.DeployCoordinator(e, *coordinatorDeployLinkAddress, *coordinatorDeployBHSAddress, *coordinatorDeployLinkEthFeedAddress, *coordinatorType) case "coordinator-get-config": cmd := flag.NewFlagSet("coordinator-get-config", flag.ExitOnError) coordinatorAddress := cmd.String("coordinator-address", "", "coordinator address") @@ -563,6 +566,28 @@ func main() { uint8(*nativePremiumPercentage), uint8(*linkPremiumPercentage), ) + case "coordinator-get-l1-fee-calculation": + cmd := flag.NewFlagSet("coordinator-get-l1-fee-calculation", flag.ExitOnError) + coordinatorAddress := cmd.String("coordinator-address", "", "address of the VRFCoordinatorV2_5_Optimism contract") + helpers.ParseArgs(cmd, os.Args[2:], "coordinator-address") + coordinator, err := vrf_coordinator_v2_5_optimism.NewVRFCoordinatorV25Optimism(common.HexToAddress(*coordinatorAddress), e.Ec) + helpers.PanicErr(err) + mode, err := coordinator.SL1FeeCalculationMode(nil) + helpers.PanicErr(err) + coefficient, err := coordinator.SL1FeeCoefficient(nil) + helpers.PanicErr(err) + fmt.Println("L1 calculation config for the coordinator contract", *coordinatorAddress, "is mode =", mode, "and coefficient =", coefficient) + case "coordinator-set-l1-fee-calculation": + cmd := flag.NewFlagSet("coordinator-set-l1-fee-calculation", flag.ExitOnError) + coordinatorAddress := cmd.String("coordinator-address", "", "address of the VRFCoordinatorV2_5_Optimism contract") + mode := cmd.Uint("mode", 0, "L1 fee calculation mode: 0, 1, 2") + coefficient := cmd.Uint("coefficient", 100, "L1 fee calculation coefficient") + helpers.ParseArgs(cmd, os.Args[2:], "coordinator-address", "mode", "coefficient") + coordinator, err := vrf_coordinator_v2_5_optimism.NewVRFCoordinatorV25Optimism(common.HexToAddress(*coordinatorAddress), e.Ec) + helpers.PanicErr(err) + tx, err := coordinator.SetL1FeeCalculation(e.Owner, uint8(*mode), uint8(*coefficient)) + helpers.PanicErr(err) + helpers.ConfirmTXMined(context.Background(), e.Ec, tx, e.ChainID, "set L1 fee calculation mode and coefficient") case "coordinator-register-key": coordinatorRegisterKey := flag.NewFlagSet("coordinator-register-key", flag.ExitOnError) registerKeyAddress := coordinatorRegisterKey.String("address", "", "coordinator address") @@ -777,7 +802,9 @@ func main() { helpers.ParseArgs(createSubCmd, os.Args[2:], "coordinator-address") coordinator, err := vrf_coordinator_v2_5.NewVRFCoordinatorV25(common.HexToAddress(*coordinatorAddress), e.Ec) helpers.PanicErr(err) - v2plusscripts.EoaCreateSub(e, *coordinator) + subId, err := v2plusscripts.EoaCreateSub(e, *coordinator) + helpers.PanicErr(err) + fmt.Println("Created subscription ID: ", subId) case "eoa-add-sub-consumer": addSubConsCmd := flag.NewFlagSet("eoa-add-sub-consumer", flag.ExitOnError) coordinatorAddress := addSubConsCmd.String("coordinator-address", "", "coordinator address") @@ -1174,19 +1201,21 @@ func main() { fmt.Printf("Register transaction included in block %s\n", registerReceipt.BlockNumber.String()) case "wrapper-deploy": cmd := flag.NewFlagSet("wrapper-deploy", flag.ExitOnError) + wrapperType := flag.String("wrapper-type", "", "Specify which wrapper type to use: layer1, arbitrum, optimism") linkAddress := cmd.String("link-address", "", "address of link token") linkETHFeedAddress := cmd.String("link-eth-feed", "", "address of link-eth-feed") - coordinatorAddress := cmd.String("coordinator-address", "", "address of the vrf coordinator v2 contract") + coordinatorAddress := cmd.String("coordinator-address", "", "address of the vrf coordinator v2plus contract") subID := cmd.String("subscription-id", "", "subscription ID for the wrapper") - helpers.ParseArgs(cmd, os.Args[2:], "link-address", "link-eth-feed", "coordinator-address", "subscription-id") + helpers.ParseArgs(cmd, os.Args[2:], "wrapper-type", "link-address", "link-eth-feed", "coordinator-address", "subscription-id") v2plusscripts.WrapperDeploy(e, common.HexToAddress(*linkAddress), common.HexToAddress(*linkETHFeedAddress), common.HexToAddress(*coordinatorAddress), - parseUInt256String(*subID)) + parseUInt256String(*subID), + *wrapperType) case "wrapper-withdraw": cmd := flag.NewFlagSet("wrapper-withdraw", flag.ExitOnError) - wrapperAddress := cmd.String("wrapper-address", "", "address of the VRFV2Wrapper contract") + wrapperAddress := cmd.String("wrapper-address", "", "address of the VRFV2PlusWrapper contract") recipientAddress := cmd.String("recipient-address", "", "address to withdraw to") linkAddress := cmd.String("link-address", "", "address of link token") helpers.ParseArgs(cmd, os.Args[2:], "wrapper-address", "recipient-address", "link-address") @@ -1201,7 +1230,7 @@ func main() { helpers.ConfirmTXMined(context.Background(), e.Ec, tx, e.ChainID, "withdrawing", balance.String(), "Juels from", *wrapperAddress, "to", *recipientAddress) case "wrapper-get-subscription-id": cmd := flag.NewFlagSet("wrapper-get-subscription-id", flag.ExitOnError) - wrapperAddress := cmd.String("wrapper-address", "", "address of the VRFV2Wrapper contract") + wrapperAddress := cmd.String("wrapper-address", "", "address of the VRFV2PlusWrapper contract") helpers.ParseArgs(cmd, os.Args[2:], "wrapper-address") wrapper, err := vrfv2plus_wrapper.NewVRFV2PlusWrapper(common.HexToAddress(*wrapperAddress), e.Ec) helpers.PanicErr(err) @@ -1210,7 +1239,7 @@ func main() { fmt.Println("subscription id of wrapper", *wrapperAddress, "is:", subID) case "wrapper-configure": cmd := flag.NewFlagSet("wrapper-configure", flag.ExitOnError) - wrapperAddress := cmd.String("wrapper-address", "", "address of the VRFV2Wrapper contract") + wrapperAddress := cmd.String("wrapper-address", "", "address of the VRFV2PlusWrapper contract") wrapperGasOverhead := cmd.Uint("wrapper-gas-overhead", 50_000, "amount of gas overhead in wrapper fulfillment") coordinatorGasOverheadNative := cmd.Uint("coordinator-gas-overhead-native", 52_000, "amount of gas overhead in coordinator fulfillment for native payment") coordinatorGasOverheadLink := cmd.Uint("coordinator-gas-overhead-link", 52_000, "amount of gas overhead in coordinator fulfillment for link payment") @@ -1248,7 +1277,7 @@ func main() { v2plusscripts.PrintWrapperConfig(wrapper) 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") + wrapperAddress := cmd.String("wrapper-address", "", "address of the VRFV2PlusWrapper contract") helpers.ParseArgs(cmd, os.Args[2:], "wrapper-address") wrapper, err := vrfv2plus_wrapper.NewVRFV2PlusWrapper(common.HexToAddress(*wrapperAddress), e.Ec) helpers.PanicErr(err) @@ -1257,7 +1286,7 @@ func main() { fmt.Println("fulfillment tx size of wrapper", *wrapperAddress, "is:", size) case "wrapper-set-fulfillment-tx-size": cmd := flag.NewFlagSet("wrapper-set-fulfillment-tx-size", flag.ExitOnError) - wrapperAddress := cmd.String("wrapper-address", "", "address of the VRFV2Wrapper contract") + wrapperAddress := cmd.String("wrapper-address", "", "address of the VRFV2PlusWrapper contract") size := cmd.Uint("size", 0, "size of the fulfillment transaction") helpers.ParseArgs(cmd, os.Args[2:], "wrapper-address", "size") wrapper, err := vrfv2plus_wrapper.NewVRFV2PlusWrapper(common.HexToAddress(*wrapperAddress), e.Ec) @@ -1265,10 +1294,32 @@ func main() { tx, err := wrapper.SetFulfillmentTxSize(e.Owner, uint32(*size)) helpers.PanicErr(err) helpers.ConfirmTXMined(context.Background(), e.Ec, tx, e.ChainID, "set fulfillment tx size") + case "wrapper-get-l1-fee-calculation": + cmd := flag.NewFlagSet("wrapper-get-l1-fee-calculation", flag.ExitOnError) + wrapperAddress := cmd.String("wrapper-address", "", "address of the VRFV2PlusWrapper_Optimism contract") + helpers.ParseArgs(cmd, os.Args[2:], "wrapper-address") + wrapper, err := vrfv2plus_wrapper_optimism.NewVRFV2PlusWrapperOptimism(common.HexToAddress(*wrapperAddress), e.Ec) + helpers.PanicErr(err) + mode, err := wrapper.SL1FeeCalculationMode(nil) + helpers.PanicErr(err) + coefficient, err := wrapper.SL1FeeCoefficient(nil) + helpers.PanicErr(err) + fmt.Println("L1 calculation config for the wrapper contract", *wrapperAddress, "is mode =", mode, "and coefficient =", coefficient) + case "wrapper-set-l1-fee-calculation": + cmd := flag.NewFlagSet("wrapper-set-l1-fee-calculation", flag.ExitOnError) + wrapperAddress := cmd.String("wrapper-address", "", "address of the VRFV2PlusWrapper_Optimism contract") + mode := cmd.Uint("mode", 0, "L1 fee calculation mode: 0, 1, 2") + coefficient := cmd.Uint("coefficient", 100, "L1 fee calculation coefficient") + helpers.ParseArgs(cmd, os.Args[2:], "wrapper-address", "mode", "coefficient") + wrapper, err := vrfv2plus_wrapper_optimism.NewVRFV2PlusWrapperOptimism(common.HexToAddress(*wrapperAddress), e.Ec) + helpers.PanicErr(err) + tx, err := wrapper.SetL1FeeCalculation(e.Owner, uint8(*mode), uint8(*coefficient)) + helpers.PanicErr(err) + helpers.ConfirmTXMined(context.Background(), e.Ec, tx, e.ChainID, "set L1 fee calculation mode and coefficient") case "wrapper-consumer-deploy": cmd := flag.NewFlagSet("wrapper-consumer-deploy", flag.ExitOnError) linkAddress := cmd.String("link-address", "", "address of link token") - wrapperAddress := cmd.String("wrapper-address", "", "address of the VRFV2Wrapper contract") + wrapperAddress := cmd.String("wrapper-address", "", "address of the VRFV2PlusWrapper contract") helpers.ParseArgs(cmd, os.Args[2:], "link-address", "wrapper-address") v2plusscripts.WrapperConsumerDeploy(e, diff --git a/core/scripts/vrfv2plus/testnet/v2plusscripts/super_scripts.go b/core/scripts/vrfv2plus/testnet/v2plusscripts/super_scripts.go index f749a8a2ef7..cd5aad9ea27 100644 --- a/core/scripts/vrfv2plus/testnet/v2plusscripts/super_scripts.go +++ b/core/scripts/vrfv2plus/testnet/v2plusscripts/super_scripts.go @@ -54,6 +54,7 @@ func SmokeTestVRF(e helpers.Environment) { smokeCmd := flag.NewFlagSet("smoke", flag.ExitOnError) // required flags + coordinatorType := smokeCmd.String("coordinator-type", "", "Specify which coordinator type to use: layer1, arbitrum, optimism") linkAddress := smokeCmd.String("link-address", "", "address of link token") linkNativeAddress := smokeCmd.String("link-native-feed", "", "address of link native feed") bhsAddressStr := smokeCmd.String("bhs-address", "", "address of blockhash store") @@ -119,8 +120,8 @@ func SmokeTestVRF(e helpers.Environment) { var coordinatorAddress common.Address if len(*coordinatorAddressStr) == 0 { - fmt.Println("\nDeploying Coordinator...") - coordinatorAddress = DeployCoordinator(e, *linkAddress, bhsContractAddress.String(), *linkNativeAddress) + fmt.Printf("\nDeploying Coordinator [type=%s]...\n", *coordinatorType) + coordinatorAddress = DeployCoordinator(e, *linkAddress, bhsContractAddress.String(), *linkNativeAddress, *coordinatorType) } else { coordinatorAddress = common.HexToAddress(*coordinatorAddressStr) } @@ -236,9 +237,7 @@ func SmokeTestVRF(e helpers.Environment) { consumerAddress := EoaDeployConsumer(e, coordinatorAddress.String(), *linkAddress) fmt.Println("\nAdding subscription...") - EoaCreateSub(e, *coordinator) - - subID := FindSubscriptionID(e, coordinator) + subID, err := EoaCreateSub(e, *coordinator) helpers.PanicErr(err) fmt.Println("\nAdding consumer to subscription...") @@ -468,6 +467,37 @@ func sendTx(e helpers.Environment, to common.Address, data []byte) (*types.Recei e.ChainID, "send tx", signedTx.Hash().String(), "to", to.String()), signedTx.Hash() } +func sendNativeTokens(e helpers.Environment, to common.Address, amount *big.Int) (*types.Receipt, common.Hash) { + nonce, err := e.Ec.PendingNonceAt(context.Background(), e.Owner.From) + helpers.PanicErr(err) + gasPrice, err := e.Ec.SuggestGasPrice(context.Background()) + helpers.PanicErr(err) + msg := ethereum.CallMsg{ + From: e.Owner.From, + To: &to, + Value: amount, + Gas: 0, + GasPrice: big.NewInt(0), + Data: nil, + } + gasLimit, err := e.Ec.EstimateGas(context.Background(), msg) + helpers.PanicErr(err) + rawTx := types.NewTx(&types.LegacyTx{ + Nonce: nonce, + To: &to, + Data: nil, + Value: amount, + Gas: gasLimit, + GasPrice: gasPrice, + }) + signedTx, err := e.Owner.Signer(e.Owner.From, rawTx) + helpers.PanicErr(err) + err = e.Ec.SendTransaction(context.Background(), signedTx) + helpers.PanicErr(err) + return helpers.ConfirmTXMined(context.Background(), e.Ec, signedTx, + e.ChainID, "send tx", signedTx.Hash().String(), "to", to.String()), signedTx.Hash() +} + func DeployUniverseViaCLI(e helpers.Environment) { deployCmd := flag.NewFlagSet("deploy-universe", flag.ExitOnError) @@ -478,6 +508,7 @@ func DeployUniverseViaCLI(e helpers.Environment) { bhsContractAddressString := deployCmd.String("bhs-address", "", "address of BHS contract") batchBHSAddressString := deployCmd.String("batch-bhs-address", "", "address of Batch BHS contract") coordinatorAddressString := deployCmd.String("coordinator-address", "", "address of VRF Coordinator contract") + coordinatorType := deployCmd.String("coordinator-type", "", "Specify which coordinator type to use: layer1, arbitrum, optimism") batchCoordinatorAddressString := deployCmd.String("batch-coordinator-address", "", "address Batch VRF Coordinator contract") subscriptionBalanceJuelsString := deployCmd.String("subscription-balance", "1e19", "amount to fund subscription with Link token (Juels)") subscriptionBalanceNativeWeiString := deployCmd.String("subscription-balance-native", "1e18", "amount to fund subscription with native token (Wei)") @@ -509,10 +540,18 @@ func DeployUniverseViaCLI(e helpers.Environment) { linkPremiumPercentage := deployCmd.Int64("link-premium-percentage", 1, "premium percentage for LINK payment") provingKeyMaxGasPriceString := deployCmd.String("proving-key-max-gas-price", "1e12", "gas lane max gas price") + // only necessary for Optimism coordinator contract + optimismL1GasFeeCalculationMode := deployCmd.Uint64("optimism-l1-fee-mode", 0, "Choose Optimism coordinator contract L1 fee calculation mode: 0, 1, 2") + optimismL1GasFeeCoefficient := deployCmd.Uint64("optimism-l1-fee-coefficient", 100, "Choose Optimism coordinator contract L1 fee coefficient percentage [1, 100]") + helpers.ParseArgs( deployCmd, os.Args[2:], ) + if *coordinatorType != "layer1" && *coordinatorType != "arbitrum" && *coordinatorType != "optimism" { + panic(fmt.Sprintf("Invalid Coordinator type `%s`. Only `layer1`, `arbitrum` and `optimism` are supported", *coordinatorType)) + } + if *nativeOnly { if *linkAddress != "" || *linkNativeAddress != "" { panic("native-only flag is set, but link address or link native address is provided") @@ -602,6 +641,9 @@ func DeployUniverseViaCLI(e helpers.Environment) { coordinatorJobSpecConfig, bhsJobSpecConfig, *simulationBlock, + *coordinatorType, + uint8(*optimismL1GasFeeCalculationMode), + uint8(*optimismL1GasFeeCoefficient), ) vrfPrimaryNode := nodesMap[model.VRFPrimaryNodeName] @@ -623,6 +665,9 @@ func VRFV2PlusDeployUniverse(e helpers.Environment, coordinatorJobSpecConfig model.CoordinatorJobSpecConfig, bhsJobSpecConfig model.BHSJobSpecConfig, simulationBlock string, + coordinatorType string, + optimismL1FeeMode uint8, + optimismL1FeeCoefficient uint8, ) model.JobSpecs { var compressedPkHex string var keyHash common.Hash @@ -672,8 +717,8 @@ func VRFV2PlusDeployUniverse(e helpers.Environment, } if contractAddresses.CoordinatorAddress.String() == "0x0000000000000000000000000000000000000000" { - fmt.Println("\nDeploying Coordinator...") - contractAddresses.CoordinatorAddress = DeployCoordinator(e, contractAddresses.LinkAddress, contractAddresses.BhsContractAddress.String(), contractAddresses.LinkEthAddress) + fmt.Printf("\nDeploying Coordinator [type=%s]...\n", coordinatorType) + contractAddresses.CoordinatorAddress = DeployCoordinator(e, contractAddresses.LinkAddress, contractAddresses.BhsContractAddress.String(), contractAddresses.LinkEthAddress, coordinatorType) } coordinator, err := vrf_coordinator_v2_5.NewVRFCoordinatorV25(contractAddresses.CoordinatorAddress, e.Ec) @@ -699,6 +744,11 @@ func VRFV2PlusDeployUniverse(e helpers.Environment, coordinatorConfig.LinkPremiumPercentage, ) + if coordinatorType == "optimism" { + fmt.Println("\nSetting L1 gas fee calculation...") + SetCoordinatorL1FeeCalculation(e, contractAddresses.CoordinatorAddress, optimismL1FeeMode, optimismL1FeeCoefficient) + } + fmt.Println("\nConfig set, getting current config from deployed contract...") PrintCoordinatorConfig(coordinator) @@ -721,9 +771,8 @@ func VRFV2PlusDeployUniverse(e helpers.Environment, consumerAddress := EoaV2PlusLoadTestConsumerWithMetricsDeploy(e, contractAddresses.CoordinatorAddress.String()) fmt.Println("\nAdding subscription...") - EoaCreateSub(e, *coordinator) - - subID := FindSubscriptionID(e, coordinator) + subID, err := EoaCreateSub(e, *coordinator) + helpers.PanicErr(err) fmt.Println("\nAdding consumer to subscription...") EoaAddConsumerToSub(e, *coordinator, subID, consumerAddress.String()) @@ -864,9 +913,10 @@ func VRFV2PlusDeployUniverse(e helpers.Environment, func DeployWrapperUniverse(e helpers.Environment) { cmd := flag.NewFlagSet("wrapper-universe-deploy", flag.ExitOnError) + wrapperType := cmd.String("wrapper-type", "", "Specify which wrapper type to use: layer1, arbitrum, optimism") linkAddress := cmd.String("link-address", "", "address of link token") linkNativeFeedAddress := cmd.String("link-native-feed", "", "address of link-native-feed") - coordinatorAddress := cmd.String("coordinator-address", "", "address of the vrf coordinator v2 contract") + coordinatorAddress := cmd.String("coordinator-address", "", "address of the vrf coordinator v2plus contract") subscriptionID := cmd.String("subscription-id", "", "subscription ID for the wrapper") wrapperGasOverhead := cmd.Uint("wrapper-gas-overhead", 50_000, "amount of gas overhead in wrapper fulfillment") coordinatorGasOverheadNative := cmd.Uint("coordinator-gas-overhead-native", 52_000, "amount of gas overhead in coordinator fulfillment for native payment") @@ -876,27 +926,70 @@ func DeployWrapperUniverse(e helpers.Environment) { 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") + subFundingLink := cmd.String("sub-funding-link", "10000000000000000000", "amount in LINK to fund the subscription with") + subFundingNative := cmd.String("sub-funding-native", "10000000000000000000", "amount in native to fund the subscription with") + consumerFundingLink := cmd.String("consumer-funding-link", "10000000000000000000", "amount in LINK to fund the consumer with") + consumerFundingNative := cmd.String("consumer-funding-native", "10000000000000000000", "amount in native 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") 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-native-feed", "coordinator-address", "key-hash", "fallback-wei-per-unit-link") + // only necessary for Optimism coordinator contract + optimismL1GasFeeCalculationMode := cmd.Uint64("optimism-l1-fee-mode", 0, "Choose Optimism coordinator contract L1 fee calculation mode: 0, 1, 2") + optimismL1GasFeeCoefficient := cmd.Uint64("optimism-l1-fee-coefficient", 100, "Choose Optimism coordinator contract L1 fee coefficient percentage [1, 100]") + helpers.ParseArgs(cmd, os.Args[2:], "wrapper-type", "link-address", "link-native-feed", "coordinator-address", "key-hash", "fallback-wei-per-unit-link") + + if *wrapperType != "layer1" && *wrapperType != "arbitrum" && *wrapperType != "optimism" { + panic(fmt.Sprintf("Invalid Wrapper type `%s`. Only `layer1`, `arbitrum` and `optimism` are supported", *wrapperType)) + } - amount, s := big.NewInt(0).SetString(*subFunding, 10) + subAmountLink, s := big.NewInt(0).SetString(*subFundingLink, 10) if !s { - panic(fmt.Sprintf("failed to parse top up amount '%s'", *subFunding)) + panic(fmt.Sprintf("failed to parse subscription top up amount '%s'", *subFundingLink)) } - subId := parseSubID(*subscriptionID) + subAmountNative, s := big.NewInt(0).SetString(*subFundingNative, 10) + if !s { + panic(fmt.Sprintf("failed to parse subscription top up amount '%s'", *subFundingNative)) + } + + consumerAmountLink, s := big.NewInt(0).SetString(*consumerFundingLink, 10) + if !s { + panic(fmt.Sprintf("failed to parse consumer top up amount '%s'", *consumerFundingLink)) + } + + consumerAmountNative, s := big.NewInt(0).SetString(*consumerFundingNative, 10) + if !s { + panic(fmt.Sprintf("failed to parse consumer top up amount '%s'", *consumerFundingNative)) + } + + coordinator, err := vrf_coordinator_v2_5.NewVRFCoordinatorV25(common.HexToAddress(*coordinatorAddress), e.Ec) + helpers.PanicErr(err) + + var subId *big.Int + if *subscriptionID == "" { + subId, err = EoaCreateSub(e, *coordinator) + helpers.PanicErr(err) + fmt.Println("Created subscription ID:", subId) + } else { + subId = parseSubID(*subscriptionID) + fmt.Println("Using existing subscription ID:", subId) + } + + fmt.Println() + wrapper := WrapperDeploy(e, common.HexToAddress(*linkAddress), common.HexToAddress(*linkNativeFeedAddress), common.HexToAddress(*coordinatorAddress), subId, + *wrapperType, ) + fmt.Println("Deployed wrapper:", wrapper.String()) + fmt.Println("Wrapper type:", *wrapperType) + fmt.Println() + WrapperConfigure(e, wrapper, *wrapperGasOverhead, @@ -913,29 +1006,54 @@ func DeployWrapperUniverse(e helpers.Environment) { uint32(*fulfillmentFlatFeeLinkDiscountPPM), ) + fmt.Println("Configured wrapper") + fmt.Println() + + if *wrapperType == "optimism" { + WrapperSetL1FeeCalculation(e, wrapper, uint8(*optimismL1GasFeeCalculationMode), uint8(*optimismL1GasFeeCoefficient)) + fmt.Println("Set L1 gas fee calculation") + fmt.Println() + } + consumer := WrapperConsumerDeploy(e, common.HexToAddress(*linkAddress), wrapper) - coordinator, err := vrf_coordinator_v2_5.NewVRFCoordinatorV25(common.HexToAddress(*coordinatorAddress), e.Ec) - helpers.PanicErr(err) + fmt.Println("Deployed wrapper consumer:", consumer.String()) + fmt.Println() - EoaFundSubWithLink(e, *coordinator, *linkAddress, amount, subId) + // for v2plus we need to add wrapper as a consumer to the subscription + EoaAddConsumerToSub(e, *coordinator, subId, wrapper.String()) + + fmt.Println("Added wrapper as the subscription consumer") + fmt.Println() link, err := link_token_interface.NewLinkToken(common.HexToAddress(*linkAddress), e.Ec) helpers.PanicErr(err) - consumerAmount, s := big.NewInt(0).SetString(*consumerFunding, 10) - if !s { - panic(fmt.Sprintf("failed to parse top up amount '%s'", *consumerFunding)) - } - tx, err := link.Transfer(e.Owner, consumer, consumerAmount) + tx, err := link.Transfer(e.Owner, consumer, consumerAmountLink) helpers.PanicErr(err) helpers.ConfirmTXMined(context.Background(), e.Ec, tx, e.ChainID, "link transfer to consumer") - fmt.Println("wrapper universe deployment complete") - fmt.Println("wrapper address:", wrapper.String()) - fmt.Println("wrapper consumer address:", consumer.String()) + sendNativeTokens(e, consumer, consumerAmountNative) + + fmt.Println("Funded wrapper consumer") + fmt.Println() + + EoaFundSubWithLink(e, *coordinator, *linkAddress, subAmountLink, subId) + // e.Owner.Value is hardcoded inside this helper function, make sure to run it as the last one in the script + EoaFundSubWithNative(e, common.HexToAddress(*coordinatorAddress), subId, subAmountNative) + + fmt.Println("Funded wrapper subscription") + fmt.Println() + + fmt.Println("Wrapper universe deployment complete") + fmt.Println("Wrapper address:", wrapper.String()) + fmt.Println("Wrapper type:", *wrapperType) + fmt.Println("Wrapper consumer address:", consumer.String()) + fmt.Println("Wrapper subscription ID:", subId) + fmt.Printf("Send native request example: go run . wrapper-consumer-request --consumer-address=%s --cb-gas-limit=1000000 --native-payment=true\n", consumer.String()) + fmt.Printf("Send LINK request example: go run . wrapper-consumer-request --consumer-address=%s --cb-gas-limit=1000000 --native-payment=false\n", consumer.String()) } func parseSubID(subID string) *big.Int { diff --git a/core/scripts/vrfv2plus/testnet/v2plusscripts/util.go b/core/scripts/vrfv2plus/testnet/v2plusscripts/util.go index 091b324443a..a06df9bcc33 100644 --- a/core/scripts/vrfv2plus/testnet/v2plusscripts/util.go +++ b/core/scripts/vrfv2plus/testnet/v2plusscripts/util.go @@ -3,7 +3,9 @@ package v2plusscripts import ( "context" "encoding/hex" + "errors" "fmt" + "log" "math/big" "github.com/montanaflynn/stats" @@ -12,6 +14,7 @@ import ( "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/crypto" helpers "github.com/smartcontractkit/chainlink/core/scripts/common" @@ -21,9 +24,13 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/blockhash_store" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/link_token_interface" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrf_coordinator_v2_5" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrf_coordinator_v2_5_arbitrum" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrf_coordinator_v2_5_optimism" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrf_v2plus_sub_owner" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrfv2plus_wrapper" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrfv2plus_wrapper_arbitrum" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrfv2plus_wrapper_consumer_example" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrfv2plus_wrapper_optimism" ) func DeployBHS(e helpers.Environment) (blockhashStoreAddress common.Address) { @@ -43,18 +50,36 @@ func DeployCoordinator( linkAddress string, bhsAddress string, linkEthAddress string, + coordinatorType string, ) (coordinatorAddress common.Address) { - _, tx, _, err := vrf_coordinator_v2_5.DeployVRFCoordinatorV25( - e.Owner, - e.Ec, - common.HexToAddress(bhsAddress)) + var tx *types.Transaction + var err error + if coordinatorType == "layer1" { + _, tx, _, err = vrf_coordinator_v2_5.DeployVRFCoordinatorV25( + e.Owner, + e.Ec, + common.HexToAddress(bhsAddress)) + } else if coordinatorType == "arbitrum" { + _, tx, _, err = vrf_coordinator_v2_5_arbitrum.DeployVRFCoordinatorV25Arbitrum( + e.Owner, + e.Ec, + common.HexToAddress(bhsAddress)) + } else if coordinatorType == "optimism" { + _, tx, _, err = vrf_coordinator_v2_5_optimism.DeployVRFCoordinatorV25Optimism( + e.Owner, + e.Ec, + common.HexToAddress(bhsAddress)) + } else { + panic(fmt.Sprintf("Coordinator type not supported '%s'", coordinatorType)) + } helpers.PanicErr(err) coordinatorAddress = helpers.ConfirmContractDeployed(context.Background(), e.Ec, tx, e.ChainID) - // Set LINK and LINK ETH + // all coordinator types share VRFCoordinatorV25 interface so it's okay to use it coordinator, err := vrf_coordinator_v2_5.NewVRFCoordinatorV25(coordinatorAddress, e.Ec) helpers.PanicErr(err) + // Set LINK and LINK ETH if linkAddress != "" && linkEthAddress != "" { linkTx, err := coordinator.SetLINKAndLINKNativeFeed(e.Owner, common.HexToAddress(linkAddress), common.HexToAddress(linkEthAddress)) @@ -81,10 +106,24 @@ func EoaAddConsumerToSub( helpers.ConfirmTXMined(context.Background(), e.Ec, txadd, e.ChainID) } -func EoaCreateSub(e helpers.Environment, coordinator vrf_coordinator_v2_5.VRFCoordinatorV25) { +func EoaCreateSub(e helpers.Environment, coordinator vrf_coordinator_v2_5.VRFCoordinatorV25) (*big.Int, error) { tx, err := coordinator.CreateSubscription(e.Owner) helpers.PanicErr(err) helpers.ConfirmTXMined(context.Background(), e.Ec, tx, e.ChainID) + + receipt, err := e.Ec.TransactionReceipt(context.Background(), tx.Hash()) + if err != nil { + log.Fatalf("Failed to get transaction receipt: %v", err) + } + + for _, log := range receipt.Logs { + subCreatedLog, err := coordinator.ParseSubscriptionCreated(*log) + if err == nil { + return subCreatedLog.SubId, nil + } + } + + return nil, errors.New("expected SubscriptionCreated log") } // returns subscription ID that belongs to the given owner. Returns result found first @@ -181,6 +220,25 @@ func SetCoordinatorConfig( helpers.ConfirmTXMined(context.Background(), e.Ec, tx, e.ChainID) } +func SetCoordinatorL1FeeCalculation( + e helpers.Environment, + coordinatorAddress common.Address, + l1FeeCalculationMode uint8, + l1FeeCostCoefficient uint8, +) { + wrapper, err := vrf_coordinator_v2_5_optimism.NewVRFCoordinatorV25Optimism(coordinatorAddress, e.Ec) + helpers.PanicErr(err) + + tx, err := wrapper.SetL1FeeCalculation( + e.Owner, + l1FeeCalculationMode, + l1FeeCostCoefficient, + ) + + helpers.PanicErr(err) + helpers.ConfirmTXMined(context.Background(), e.Ec, tx, e.ChainID) +} + func RegisterCoordinatorProvingKey(e helpers.Environment, coordinator vrf_coordinator_v2_5.VRFCoordinatorV25, uncompressed string, gasLaneMaxGas uint64) { pubBytes, err := hex.DecodeString(uncompressed) @@ -237,13 +295,32 @@ func MigrateSub( func WrapperDeploy( e helpers.Environment, - link, linkEthFeed, coordinator common.Address, subID *big.Int, + link, linkEthFeed, coordinator common.Address, subID *big.Int, wrapperType string, ) common.Address { - address, tx, _, err := vrfv2plus_wrapper.DeployVRFV2PlusWrapper(e.Owner, e.Ec, - link, - linkEthFeed, - coordinator, - subID) + var address common.Address + var tx *types.Transaction + var err error + if wrapperType == "layer1" { + address, tx, _, err = vrfv2plus_wrapper.DeployVRFV2PlusWrapper(e.Owner, e.Ec, + link, + linkEthFeed, + coordinator, + subID) + } else if wrapperType == "arbitrum" { + address, tx, _, err = vrfv2plus_wrapper_arbitrum.DeployVRFV2PlusWrapperArbitrum(e.Owner, e.Ec, + link, + linkEthFeed, + coordinator, + subID) + } else if wrapperType == "optimism" { + address, tx, _, err = vrfv2plus_wrapper_optimism.DeployVRFV2PlusWrapperOptimism(e.Owner, e.Ec, + link, + linkEthFeed, + coordinator, + subID) + } else { + panic(fmt.Sprintf("Wrapper type not supported '%s'", wrapperType)) + } helpers.PanicErr(err) helpers.ConfirmContractDeployed(context.Background(), e.Ec, tx, e.ChainID) @@ -289,6 +366,25 @@ func WrapperConfigure( helpers.ConfirmTXMined(context.Background(), e.Ec, tx, e.ChainID) } +func WrapperSetL1FeeCalculation( + e helpers.Environment, + wrapperAddress common.Address, + l1FeeCalculationMode uint8, + l1FeeCostCoefficient uint8, +) { + wrapper, err := vrfv2plus_wrapper_optimism.NewVRFV2PlusWrapperOptimism(wrapperAddress, e.Ec) + helpers.PanicErr(err) + + tx, err := wrapper.SetL1FeeCalculation( + e.Owner, + l1FeeCalculationMode, + l1FeeCostCoefficient, + ) + + helpers.PanicErr(err) + helpers.ConfirmTXMined(context.Background(), e.Ec, tx, e.ChainID) +} + func PrintWrapperConfig(wrapper *vrfv2plus_wrapper.VRFV2PlusWrapper) { cfg, err := wrapper.GetConfig(nil) helpers.PanicErr(err) diff --git a/core/services/blockhashstore/common.go b/core/services/blockhashstore/common.go index 30208296a4f..037802becf9 100644 --- a/core/services/blockhashstore/common.go +++ b/core/services/blockhashstore/common.go @@ -33,8 +33,6 @@ type Event struct { } // BHS defines an interface for interacting with a BlockhashStore contract. -// -//go:generate mockery --quiet --name BHS --output ./mocks/ --case=underscore type BHS interface { // Store the hash associated with blockNum. Store(ctx context.Context, blockNum uint64) error diff --git a/core/services/blockhashstore/delegate.go b/core/services/blockhashstore/delegate.go index 172dbafc4a4..7c3d6074c66 100644 --- a/core/services/blockhashstore/delegate.go +++ b/core/services/blockhashstore/delegate.go @@ -21,7 +21,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/utils" ) var _ job.ServiceCtx = &service{} @@ -234,7 +233,7 @@ func (s *service) Start(context.Context) error { defer s.wg.Done() ctx, cancel := s.stopCh.NewCtx() defer cancel() - ticker := time.NewTicker(utils.WithJitter(s.pollPeriod)) + ticker := services.NewTicker(s.pollPeriod) defer ticker.Stop() for { select { diff --git a/core/services/blockhashstore/feeder.go b/core/services/blockhashstore/feeder.go index 8cc607db9b3..e5367cba697 100644 --- a/core/services/blockhashstore/feeder.go +++ b/core/services/blockhashstore/feeder.go @@ -72,7 +72,6 @@ type Feeder struct { errsLock sync.Mutex } -//go:generate mockery --quiet --name Timer --output ./mocks/ --case=underscore type Timer interface { After(d time.Duration) <-chan time.Time } diff --git a/core/services/blockhashstore/feeder_test.go b/core/services/blockhashstore/feeder_test.go index 945359dd81f..9f7a64500fd 100644 --- a/core/services/blockhashstore/feeder_test.go +++ b/core/services/blockhashstore/feeder_test.go @@ -27,7 +27,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrf_coordinator_v2plus_interface" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" - loggermocks "github.com/smartcontractkit/chainlink/v2/core/logger/mocks" ) const ( @@ -230,7 +229,7 @@ func TestStartHeartbeats(t *testing.T) { t.Run("bhs_heartbeat_happy_path", func(t *testing.T) { expectedDuration := 600 * time.Second mockBHS := bhsmocks.NewBHS(t) - mockLogger := loggermocks.NewLogger(t) + mockLogger := logger.NewMockLogger(t) feeder := NewFeeder( mockLogger, &TestCoordinator{}, // Not used for this test @@ -275,7 +274,7 @@ func TestStartHeartbeats(t *testing.T) { expectedDuration := 600 * time.Second expectedError := fmt.Errorf("insufficient gas") mockBHS := bhsmocks.NewBHS(t) - mockLogger := loggermocks.NewLogger(t) + mockLogger := logger.NewMockLogger(t) feeder := NewFeeder( mockLogger, &TestCoordinator{}, // Not used for this test @@ -322,7 +321,7 @@ func TestStartHeartbeats(t *testing.T) { t.Run("bhs_heartbeat_sad_path_heartbeat_0", func(t *testing.T) { expectedDuration := 0 * time.Second mockBHS := bhsmocks.NewBHS(t) - mockLogger := loggermocks.NewLogger(t) + mockLogger := logger.NewMockLogger(t) feeder := NewFeeder( mockLogger, &TestCoordinator{}, // Not used for this test diff --git a/core/services/blockhashstore/mocks/bhs.go b/core/services/blockhashstore/mocks/bhs.go index 43b4769c029..eff827d0597 100644 --- a/core/services/blockhashstore/mocks/bhs.go +++ b/core/services/blockhashstore/mocks/bhs.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -15,6 +15,14 @@ type BHS struct { mock.Mock } +type BHS_Expecter struct { + mock *mock.Mock +} + +func (_m *BHS) EXPECT() *BHS_Expecter { + return &BHS_Expecter{mock: &_m.Mock} +} + // IsStored provides a mock function with given fields: ctx, blockNum func (_m *BHS) IsStored(ctx context.Context, blockNum uint64) (bool, error) { ret := _m.Called(ctx, blockNum) @@ -43,6 +51,35 @@ func (_m *BHS) IsStored(ctx context.Context, blockNum uint64) (bool, error) { return r0, r1 } +// BHS_IsStored_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsStored' +type BHS_IsStored_Call struct { + *mock.Call +} + +// IsStored is a helper method to define mock.On call +// - ctx context.Context +// - blockNum uint64 +func (_e *BHS_Expecter) IsStored(ctx interface{}, blockNum interface{}) *BHS_IsStored_Call { + return &BHS_IsStored_Call{Call: _e.mock.On("IsStored", ctx, blockNum)} +} + +func (_c *BHS_IsStored_Call) Run(run func(ctx context.Context, blockNum uint64)) *BHS_IsStored_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint64)) + }) + return _c +} + +func (_c *BHS_IsStored_Call) Return(_a0 bool, _a1 error) *BHS_IsStored_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BHS_IsStored_Call) RunAndReturn(run func(context.Context, uint64) (bool, error)) *BHS_IsStored_Call { + _c.Call.Return(run) + return _c +} + // IsTrusted provides a mock function with given fields: func (_m *BHS) IsTrusted() bool { ret := _m.Called() @@ -61,6 +98,33 @@ func (_m *BHS) IsTrusted() bool { return r0 } +// BHS_IsTrusted_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsTrusted' +type BHS_IsTrusted_Call struct { + *mock.Call +} + +// IsTrusted is a helper method to define mock.On call +func (_e *BHS_Expecter) IsTrusted() *BHS_IsTrusted_Call { + return &BHS_IsTrusted_Call{Call: _e.mock.On("IsTrusted")} +} + +func (_c *BHS_IsTrusted_Call) Run(run func()) *BHS_IsTrusted_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *BHS_IsTrusted_Call) Return(_a0 bool) *BHS_IsTrusted_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BHS_IsTrusted_Call) RunAndReturn(run func() bool) *BHS_IsTrusted_Call { + _c.Call.Return(run) + return _c +} + // Store provides a mock function with given fields: ctx, blockNum func (_m *BHS) Store(ctx context.Context, blockNum uint64) error { ret := _m.Called(ctx, blockNum) @@ -79,6 +143,35 @@ func (_m *BHS) Store(ctx context.Context, blockNum uint64) error { return r0 } +// BHS_Store_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Store' +type BHS_Store_Call struct { + *mock.Call +} + +// Store is a helper method to define mock.On call +// - ctx context.Context +// - blockNum uint64 +func (_e *BHS_Expecter) Store(ctx interface{}, blockNum interface{}) *BHS_Store_Call { + return &BHS_Store_Call{Call: _e.mock.On("Store", ctx, blockNum)} +} + +func (_c *BHS_Store_Call) Run(run func(ctx context.Context, blockNum uint64)) *BHS_Store_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint64)) + }) + return _c +} + +func (_c *BHS_Store_Call) Return(_a0 error) *BHS_Store_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BHS_Store_Call) RunAndReturn(run func(context.Context, uint64) error) *BHS_Store_Call { + _c.Call.Return(run) + return _c +} + // StoreEarliest provides a mock function with given fields: ctx func (_m *BHS) StoreEarliest(ctx context.Context) error { ret := _m.Called(ctx) @@ -97,6 +190,34 @@ func (_m *BHS) StoreEarliest(ctx context.Context) error { return r0 } +// BHS_StoreEarliest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StoreEarliest' +type BHS_StoreEarliest_Call struct { + *mock.Call +} + +// StoreEarliest is a helper method to define mock.On call +// - ctx context.Context +func (_e *BHS_Expecter) StoreEarliest(ctx interface{}) *BHS_StoreEarliest_Call { + return &BHS_StoreEarliest_Call{Call: _e.mock.On("StoreEarliest", ctx)} +} + +func (_c *BHS_StoreEarliest_Call) Run(run func(ctx context.Context)) *BHS_StoreEarliest_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *BHS_StoreEarliest_Call) Return(_a0 error) *BHS_StoreEarliest_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BHS_StoreEarliest_Call) RunAndReturn(run func(context.Context) error) *BHS_StoreEarliest_Call { + _c.Call.Return(run) + return _c +} + // StoreTrusted provides a mock function with given fields: ctx, blockNums, blockhashes, recentBlock, recentBlockhash func (_m *BHS) StoreTrusted(ctx context.Context, blockNums []uint64, blockhashes []common.Hash, recentBlock uint64, recentBlockhash common.Hash) error { ret := _m.Called(ctx, blockNums, blockhashes, recentBlock, recentBlockhash) @@ -115,6 +236,38 @@ func (_m *BHS) StoreTrusted(ctx context.Context, blockNums []uint64, blockhashes return r0 } +// BHS_StoreTrusted_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StoreTrusted' +type BHS_StoreTrusted_Call struct { + *mock.Call +} + +// StoreTrusted is a helper method to define mock.On call +// - ctx context.Context +// - blockNums []uint64 +// - blockhashes []common.Hash +// - recentBlock uint64 +// - recentBlockhash common.Hash +func (_e *BHS_Expecter) StoreTrusted(ctx interface{}, blockNums interface{}, blockhashes interface{}, recentBlock interface{}, recentBlockhash interface{}) *BHS_StoreTrusted_Call { + return &BHS_StoreTrusted_Call{Call: _e.mock.On("StoreTrusted", ctx, blockNums, blockhashes, recentBlock, recentBlockhash)} +} + +func (_c *BHS_StoreTrusted_Call) Run(run func(ctx context.Context, blockNums []uint64, blockhashes []common.Hash, recentBlock uint64, recentBlockhash common.Hash)) *BHS_StoreTrusted_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]uint64), args[2].([]common.Hash), args[3].(uint64), args[4].(common.Hash)) + }) + return _c +} + +func (_c *BHS_StoreTrusted_Call) Return(_a0 error) *BHS_StoreTrusted_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BHS_StoreTrusted_Call) RunAndReturn(run func(context.Context, []uint64, []common.Hash, uint64, common.Hash) error) *BHS_StoreTrusted_Call { + _c.Call.Return(run) + return _c +} + // NewBHS creates a new instance of BHS. 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 NewBHS(t interface { diff --git a/core/services/blockhashstore/mocks/timer.go b/core/services/blockhashstore/mocks/timer.go index 46212b4c021..d0bc27edab7 100644 --- a/core/services/blockhashstore/mocks/timer.go +++ b/core/services/blockhashstore/mocks/timer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -13,6 +13,14 @@ type Timer struct { mock.Mock } +type Timer_Expecter struct { + mock *mock.Mock +} + +func (_m *Timer) EXPECT() *Timer_Expecter { + return &Timer_Expecter{mock: &_m.Mock} +} + // After provides a mock function with given fields: d func (_m *Timer) After(d time.Duration) <-chan time.Time { ret := _m.Called(d) @@ -33,6 +41,34 @@ func (_m *Timer) After(d time.Duration) <-chan time.Time { return r0 } +// Timer_After_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'After' +type Timer_After_Call struct { + *mock.Call +} + +// After is a helper method to define mock.On call +// - d time.Duration +func (_e *Timer_Expecter) After(d interface{}) *Timer_After_Call { + return &Timer_After_Call{Call: _e.mock.On("After", d)} +} + +func (_c *Timer_After_Call) Run(run func(d time.Duration)) *Timer_After_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(time.Duration)) + }) + return _c +} + +func (_c *Timer_After_Call) Return(_a0 <-chan time.Time) *Timer_After_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Timer_After_Call) RunAndReturn(run func(time.Duration) <-chan time.Time) *Timer_After_Call { + _c.Call.Return(run) + return _c +} + // NewTimer creates a new instance of Timer. 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 NewTimer(t interface { diff --git a/core/services/blockheaderfeeder/delegate.go b/core/services/blockheaderfeeder/delegate.go index 830c2e23377..046941aa154 100644 --- a/core/services/blockheaderfeeder/delegate.go +++ b/core/services/blockheaderfeeder/delegate.go @@ -21,7 +21,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/blockhashstore" "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/keystore" - "github.com/smartcontractkit/chainlink/v2/core/utils" ) var _ job.ServiceCtx = &service{} @@ -241,7 +240,7 @@ func (s *service) Start(context.Context) error { defer close(s.done) ctx, cancel := s.stopCh.NewCtx() defer cancel() - ticker := time.NewTicker(utils.WithJitter(s.pollPeriod)) + ticker := services.NewTicker(s.pollPeriod) defer ticker.Stop() for { select { diff --git a/core/services/ccip/mocks/orm.go b/core/services/ccip/mocks/orm.go index ea6b07dc637..8a987c21602 100644 --- a/core/services/ccip/mocks/orm.go +++ b/core/services/ccip/mocks/orm.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -15,6 +15,14 @@ type ORM struct { mock.Mock } +type ORM_Expecter struct { + mock *mock.Mock +} + +func (_m *ORM) EXPECT() *ORM_Expecter { + return &ORM_Expecter{mock: &_m.Mock} +} + // ClearGasPricesByDestChain provides a mock function with given fields: ctx, destChainSelector, expireSec func (_m *ORM) ClearGasPricesByDestChain(ctx context.Context, destChainSelector uint64, expireSec int) error { ret := _m.Called(ctx, destChainSelector, expireSec) @@ -33,6 +41,36 @@ func (_m *ORM) ClearGasPricesByDestChain(ctx context.Context, destChainSelector return r0 } +// ORM_ClearGasPricesByDestChain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClearGasPricesByDestChain' +type ORM_ClearGasPricesByDestChain_Call struct { + *mock.Call +} + +// ClearGasPricesByDestChain is a helper method to define mock.On call +// - ctx context.Context +// - destChainSelector uint64 +// - expireSec int +func (_e *ORM_Expecter) ClearGasPricesByDestChain(ctx interface{}, destChainSelector interface{}, expireSec interface{}) *ORM_ClearGasPricesByDestChain_Call { + return &ORM_ClearGasPricesByDestChain_Call{Call: _e.mock.On("ClearGasPricesByDestChain", ctx, destChainSelector, expireSec)} +} + +func (_c *ORM_ClearGasPricesByDestChain_Call) Run(run func(ctx context.Context, destChainSelector uint64, expireSec int)) *ORM_ClearGasPricesByDestChain_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint64), args[2].(int)) + }) + return _c +} + +func (_c *ORM_ClearGasPricesByDestChain_Call) Return(_a0 error) *ORM_ClearGasPricesByDestChain_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_ClearGasPricesByDestChain_Call) RunAndReturn(run func(context.Context, uint64, int) error) *ORM_ClearGasPricesByDestChain_Call { + _c.Call.Return(run) + return _c +} + // ClearTokenPricesByDestChain provides a mock function with given fields: ctx, destChainSelector, expireSec func (_m *ORM) ClearTokenPricesByDestChain(ctx context.Context, destChainSelector uint64, expireSec int) error { ret := _m.Called(ctx, destChainSelector, expireSec) @@ -51,6 +89,36 @@ func (_m *ORM) ClearTokenPricesByDestChain(ctx context.Context, destChainSelecto return r0 } +// ORM_ClearTokenPricesByDestChain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClearTokenPricesByDestChain' +type ORM_ClearTokenPricesByDestChain_Call struct { + *mock.Call +} + +// ClearTokenPricesByDestChain is a helper method to define mock.On call +// - ctx context.Context +// - destChainSelector uint64 +// - expireSec int +func (_e *ORM_Expecter) ClearTokenPricesByDestChain(ctx interface{}, destChainSelector interface{}, expireSec interface{}) *ORM_ClearTokenPricesByDestChain_Call { + return &ORM_ClearTokenPricesByDestChain_Call{Call: _e.mock.On("ClearTokenPricesByDestChain", ctx, destChainSelector, expireSec)} +} + +func (_c *ORM_ClearTokenPricesByDestChain_Call) Run(run func(ctx context.Context, destChainSelector uint64, expireSec int)) *ORM_ClearTokenPricesByDestChain_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint64), args[2].(int)) + }) + return _c +} + +func (_c *ORM_ClearTokenPricesByDestChain_Call) Return(_a0 error) *ORM_ClearTokenPricesByDestChain_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_ClearTokenPricesByDestChain_Call) RunAndReturn(run func(context.Context, uint64, int) error) *ORM_ClearTokenPricesByDestChain_Call { + _c.Call.Return(run) + return _c +} + // GetGasPricesByDestChain provides a mock function with given fields: ctx, destChainSelector func (_m *ORM) GetGasPricesByDestChain(ctx context.Context, destChainSelector uint64) ([]ccip.GasPrice, error) { ret := _m.Called(ctx, destChainSelector) @@ -81,6 +149,35 @@ func (_m *ORM) GetGasPricesByDestChain(ctx context.Context, destChainSelector ui return r0, r1 } +// ORM_GetGasPricesByDestChain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGasPricesByDestChain' +type ORM_GetGasPricesByDestChain_Call struct { + *mock.Call +} + +// GetGasPricesByDestChain is a helper method to define mock.On call +// - ctx context.Context +// - destChainSelector uint64 +func (_e *ORM_Expecter) GetGasPricesByDestChain(ctx interface{}, destChainSelector interface{}) *ORM_GetGasPricesByDestChain_Call { + return &ORM_GetGasPricesByDestChain_Call{Call: _e.mock.On("GetGasPricesByDestChain", ctx, destChainSelector)} +} + +func (_c *ORM_GetGasPricesByDestChain_Call) Run(run func(ctx context.Context, destChainSelector uint64)) *ORM_GetGasPricesByDestChain_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint64)) + }) + return _c +} + +func (_c *ORM_GetGasPricesByDestChain_Call) Return(_a0 []ccip.GasPrice, _a1 error) *ORM_GetGasPricesByDestChain_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ORM_GetGasPricesByDestChain_Call) RunAndReturn(run func(context.Context, uint64) ([]ccip.GasPrice, error)) *ORM_GetGasPricesByDestChain_Call { + _c.Call.Return(run) + return _c +} + // GetTokenPricesByDestChain provides a mock function with given fields: ctx, destChainSelector func (_m *ORM) GetTokenPricesByDestChain(ctx context.Context, destChainSelector uint64) ([]ccip.TokenPrice, error) { ret := _m.Called(ctx, destChainSelector) @@ -111,6 +208,35 @@ func (_m *ORM) GetTokenPricesByDestChain(ctx context.Context, destChainSelector return r0, r1 } +// ORM_GetTokenPricesByDestChain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTokenPricesByDestChain' +type ORM_GetTokenPricesByDestChain_Call struct { + *mock.Call +} + +// GetTokenPricesByDestChain is a helper method to define mock.On call +// - ctx context.Context +// - destChainSelector uint64 +func (_e *ORM_Expecter) GetTokenPricesByDestChain(ctx interface{}, destChainSelector interface{}) *ORM_GetTokenPricesByDestChain_Call { + return &ORM_GetTokenPricesByDestChain_Call{Call: _e.mock.On("GetTokenPricesByDestChain", ctx, destChainSelector)} +} + +func (_c *ORM_GetTokenPricesByDestChain_Call) Run(run func(ctx context.Context, destChainSelector uint64)) *ORM_GetTokenPricesByDestChain_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint64)) + }) + return _c +} + +func (_c *ORM_GetTokenPricesByDestChain_Call) Return(_a0 []ccip.TokenPrice, _a1 error) *ORM_GetTokenPricesByDestChain_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ORM_GetTokenPricesByDestChain_Call) RunAndReturn(run func(context.Context, uint64) ([]ccip.TokenPrice, error)) *ORM_GetTokenPricesByDestChain_Call { + _c.Call.Return(run) + return _c +} + // InsertGasPricesForDestChain provides a mock function with given fields: ctx, destChainSelector, jobId, gasPrices func (_m *ORM) InsertGasPricesForDestChain(ctx context.Context, destChainSelector uint64, jobId int32, gasPrices []ccip.GasPriceUpdate) error { ret := _m.Called(ctx, destChainSelector, jobId, gasPrices) @@ -129,6 +255,37 @@ func (_m *ORM) InsertGasPricesForDestChain(ctx context.Context, destChainSelecto return r0 } +// ORM_InsertGasPricesForDestChain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsertGasPricesForDestChain' +type ORM_InsertGasPricesForDestChain_Call struct { + *mock.Call +} + +// InsertGasPricesForDestChain is a helper method to define mock.On call +// - ctx context.Context +// - destChainSelector uint64 +// - jobId int32 +// - gasPrices []ccip.GasPriceUpdate +func (_e *ORM_Expecter) InsertGasPricesForDestChain(ctx interface{}, destChainSelector interface{}, jobId interface{}, gasPrices interface{}) *ORM_InsertGasPricesForDestChain_Call { + return &ORM_InsertGasPricesForDestChain_Call{Call: _e.mock.On("InsertGasPricesForDestChain", ctx, destChainSelector, jobId, gasPrices)} +} + +func (_c *ORM_InsertGasPricesForDestChain_Call) Run(run func(ctx context.Context, destChainSelector uint64, jobId int32, gasPrices []ccip.GasPriceUpdate)) *ORM_InsertGasPricesForDestChain_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint64), args[2].(int32), args[3].([]ccip.GasPriceUpdate)) + }) + return _c +} + +func (_c *ORM_InsertGasPricesForDestChain_Call) Return(_a0 error) *ORM_InsertGasPricesForDestChain_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_InsertGasPricesForDestChain_Call) RunAndReturn(run func(context.Context, uint64, int32, []ccip.GasPriceUpdate) error) *ORM_InsertGasPricesForDestChain_Call { + _c.Call.Return(run) + return _c +} + // InsertTokenPricesForDestChain provides a mock function with given fields: ctx, destChainSelector, jobId, tokenPrices func (_m *ORM) InsertTokenPricesForDestChain(ctx context.Context, destChainSelector uint64, jobId int32, tokenPrices []ccip.TokenPriceUpdate) error { ret := _m.Called(ctx, destChainSelector, jobId, tokenPrices) @@ -147,6 +304,37 @@ func (_m *ORM) InsertTokenPricesForDestChain(ctx context.Context, destChainSelec return r0 } +// ORM_InsertTokenPricesForDestChain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsertTokenPricesForDestChain' +type ORM_InsertTokenPricesForDestChain_Call struct { + *mock.Call +} + +// InsertTokenPricesForDestChain is a helper method to define mock.On call +// - ctx context.Context +// - destChainSelector uint64 +// - jobId int32 +// - tokenPrices []ccip.TokenPriceUpdate +func (_e *ORM_Expecter) InsertTokenPricesForDestChain(ctx interface{}, destChainSelector interface{}, jobId interface{}, tokenPrices interface{}) *ORM_InsertTokenPricesForDestChain_Call { + return &ORM_InsertTokenPricesForDestChain_Call{Call: _e.mock.On("InsertTokenPricesForDestChain", ctx, destChainSelector, jobId, tokenPrices)} +} + +func (_c *ORM_InsertTokenPricesForDestChain_Call) Run(run func(ctx context.Context, destChainSelector uint64, jobId int32, tokenPrices []ccip.TokenPriceUpdate)) *ORM_InsertTokenPricesForDestChain_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint64), args[2].(int32), args[3].([]ccip.TokenPriceUpdate)) + }) + return _c +} + +func (_c *ORM_InsertTokenPricesForDestChain_Call) Return(_a0 error) *ORM_InsertTokenPricesForDestChain_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_InsertTokenPricesForDestChain_Call) RunAndReturn(run func(context.Context, uint64, int32, []ccip.TokenPriceUpdate) error) *ORM_InsertTokenPricesForDestChain_Call { + _c.Call.Return(run) + return _c +} + // NewORM creates a new instance of ORM. 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 NewORM(t interface { diff --git a/core/services/ccip/orm.go b/core/services/ccip/orm.go index 6c21520d435..d074ea7473e 100644 --- a/core/services/ccip/orm.go +++ b/core/services/ccip/orm.go @@ -32,7 +32,6 @@ type TokenPriceUpdate struct { TokenPrice *assets.Wei } -//go:generate mockery --quiet --name ORM --output ./mocks/ --case=underscore type ORM interface { GetGasPricesByDestChain(ctx context.Context, destChainSelector uint64) ([]GasPrice, error) GetTokenPricesByDestChain(ctx context.Context, destChainSelector uint64) ([]TokenPrice, error) diff --git a/core/services/chainlink/application.go b/core/services/chainlink/application.go index c885a3b2104..fd263470a8d 100644 --- a/core/services/chainlink/application.go +++ b/core/services/chainlink/application.go @@ -59,6 +59,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/periodicbackup" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" "github.com/smartcontractkit/chainlink/v2/core/services/promreporter" + "github.com/smartcontractkit/chainlink/v2/core/services/registrysyncer" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/wsrpc" "github.com/smartcontractkit/chainlink/v2/core/services/streams" @@ -74,8 +75,6 @@ import ( ) // Application implements the common functions used in the core node. -// -//go:generate mockery --quiet --name Application --output ../../internal/mocks/ --case=underscore type Application interface { Start(ctx context.Context) error Stop() error @@ -214,11 +213,6 @@ func NewApplication(opts ApplicationOpts) (Application, error) { srvcs = append(srvcs, externalPeerWrapper) - networkSetup, err := capabilities.NewHardcodedDonNetworkSetup() - if err != nil { - return nil, fmt.Errorf("failed to create hardcoded Don network setup: %w", err) - } - dispatcher := remote.NewDispatcher(externalPeerWrapper, signer, opts.CapabilitiesRegistry, globalLogger) rid := cfg.Capabilities().ExternalRegistry().RelayID() @@ -228,12 +222,8 @@ func NewApplication(opts ApplicationOpts) (Application, error) { return nil, fmt.Errorf("could not fetch relayer %s configured for capabilities registry: %w", rid, err) } - registrySyncer, err := capabilities.NewRegistrySyncer( - externalPeerWrapper, - opts.CapabilitiesRegistry, - dispatcher, + registrySyncer, err := registrysyncer.New( globalLogger, - networkSetup, relayer, registryAddress, ) @@ -241,8 +231,16 @@ func NewApplication(opts ApplicationOpts) (Application, error) { return nil, fmt.Errorf("could not configure syncer: %w", err) } - getLocalNode = registrySyncer.LocalNode - srvcs = append(srvcs, dispatcher, registrySyncer) + wfLauncher := capabilities.NewLauncher( + globalLogger, + externalPeerWrapper, + dispatcher, + opts.CapabilitiesRegistry, + ) + registrySyncer.AddLauncher(wfLauncher) + + getLocalNode = wfLauncher.LocalNode + srvcs = append(srvcs, dispatcher, wfLauncher, registrySyncer) } // LOOPs can be created as options, in the case of LOOP relayers, or @@ -353,7 +351,7 @@ func NewApplication(opts ApplicationOpts) (Application, error) { jobORM = job.NewORM(opts.DS, pipelineORM, bridgeORM, keyStore, globalLogger) txmORM = txmgr.NewTxStore(opts.DS, globalLogger) streamRegistry = streams.NewRegistry(globalLogger, pipelineRunner) - workflowORM = workflowstore.NewDBStore(opts.DS, clockwork.NewRealClock()) + workflowORM = workflowstore.NewDBStore(opts.DS, globalLogger, clockwork.NewRealClock()) ) for _, chain := range legacyEVMChains.Slice() { @@ -500,8 +498,6 @@ func NewApplication(opts ApplicationOpts) (Application, error) { globalLogger, ocr2DelegateConfig, keyStore.OCR2(), - keyStore.DKGSign(), - keyStore.DKGEncrypt(), keyStore.Eth(), opts.RelayerChainInteroperators, mailMon, @@ -869,7 +865,7 @@ func (app *ChainlinkApplication) RunJobV2( }, } } - runID, _, err = app.pipelineRunner.ExecuteAndInsertFinishedRun(ctx, *jb.PipelineSpec, pipeline.NewVarsFrom(vars), app.logger, saveTasks) + runID, _, err = app.pipelineRunner.ExecuteAndInsertFinishedRun(ctx, *jb.PipelineSpec, pipeline.NewVarsFrom(vars), saveTasks) } return runID, err } diff --git a/core/services/chainlink/config.go b/core/services/chainlink/config.go index 200d4973ed1..dc301c0967f 100644 --- a/core/services/chainlink/config.go +++ b/core/services/chainlink/config.go @@ -42,6 +42,32 @@ type Config struct { Solana solcfg.TOMLConfigs `toml:",omitempty"` Starknet stkcfg.TOMLConfigs `toml:",omitempty"` + + Aptos RawConfigs `toml:",omitempty"` +} + +// RawConfigs is a list of RawConfig. +type RawConfigs []RawConfig + +// RawConfig is the config used for chains that are not embedded. +type RawConfig map[string]any + +// ValidateConfig returns an error if the Config is not valid for use, as-is. +func (c *RawConfig) ValidateConfig() (err error) { + if v, ok := (*c)["Enabled"]; ok { + if _, ok := v.(*bool); !ok { + err = multierr.Append(err, commonconfig.ErrInvalid{Name: "Enabled", Value: v, Msg: "expected *bool"}) + } + } + return err +} + +func (c *RawConfig) IsEnabled() bool { + if c == nil { + return false + } + + return (*c)["Enabled"] == nil || *(*c)["Enabled"].(*bool) } // TOMLString returns a TOML encoded string. diff --git a/core/services/chainlink/config_general.go b/core/services/chainlink/config_general.go index 5b4a6271d52..5b6b839fb5e 100644 --- a/core/services/chainlink/config_general.go +++ b/core/services/chainlink/config_general.go @@ -345,6 +345,15 @@ func (g *generalConfig) StarkNetEnabled() bool { return false } +func (g *generalConfig) AptosEnabled() bool { + for _, c := range g.c.Aptos { + if c.IsEnabled() { + return true + } + } + return false +} + func (g *generalConfig) WebServer() config.WebServer { return &webServerConfig{c: g.c.WebServer, s: g.secrets.WebServer, rootDir: g.RootDir} } diff --git a/core/services/chainlink/config_mercury.go b/core/services/chainlink/config_mercury.go index 1b64e0bde45..bc4aed6fb07 100644 --- a/core/services/chainlink/config_mercury.go +++ b/core/services/chainlink/config_mercury.go @@ -81,3 +81,7 @@ func (m *mercuryConfig) TLS() config.MercuryTLS { func (m *mercuryConfig) Transmitter() config.MercuryTransmitter { return &mercuryTransmitterConfig{c: m.c.Transmitter} } + +func (m *mercuryConfig) VerboseLogging() bool { + return *m.c.VerboseLogging +} diff --git a/core/services/chainlink/config_test.go b/core/services/chainlink/config_test.go index b6b656c3a08..c8cd5ec4790 100644 --- a/core/services/chainlink/config_test.go +++ b/core/services/chainlink/config_test.go @@ -101,8 +101,9 @@ var ( { ChainID: ubig.NewI(1), Chain: evmcfg.Chain{ - FinalityDepth: ptr[uint32](26), - FinalityTagEnabled: ptr[bool](false), + FinalityDepth: ptr[uint32](26), + FinalityTagEnabled: ptr[bool](false), + FinalizedBlockOffset: ptr[uint32](12), }, Nodes: []*evmcfg.Node{ { @@ -504,6 +505,7 @@ func TestConfig_Marshal(t *testing.T) { FinalityDepth: ptr[uint32](42), FinalityTagEnabled: ptr[bool](false), FlagsContractAddress: mustAddress("0xae4E781a6218A8031764928E88d457937A954fC3"), + FinalizedBlockOffset: ptr[uint32](16), GasEstimator: evmcfg.GasEstimator{ Mode: ptr("SuggestedPrice"), @@ -593,6 +595,8 @@ func TestConfig_Marshal(t *testing.T) { LeaseDuration: &zeroSeconds, NodeIsSyncingEnabled: ptr(true), FinalizedBlockPollInterval: &second, + EnforceRepeatableRead: ptr(true), + DeathDeclarationDelay: &minute, Errors: evmcfg.ClientErrors{ NonceTooLow: ptr[string]("(: |^)nonce too low"), NonceTooHigh: ptr[string]("(: |^)nonce too high"), @@ -725,6 +729,7 @@ func TestConfig_Marshal(t *testing.T) { TransmitQueueMaxSize: ptr(uint32(123)), TransmitTimeout: commoncfg.MustNewDuration(234 * time.Second), }, + VerboseLogging: ptr(true), } for _, tt := range []struct { @@ -990,6 +995,7 @@ NoNewHeadsThreshold = '1m0s' OperatorFactoryAddress = '0xa5B85635Be42F21f94F28034B7DA440EeFF0F418' RPCDefaultBatchSize = 17 RPCBlockQueryDelay = 10 +FinalizedBlockOffset = 16 [EVM.Transactions] ForwardersEnabled = true @@ -1060,6 +1066,8 @@ SyncThreshold = 13 LeaseDuration = '0s' NodeIsSyncingEnabled = true FinalizedBlockPollInterval = '1s' +EnforceRepeatableRead = true +DeathDeclarationDelay = '1m0s' [EVM.NodePool.Errors] NonceTooLow = '(: |^)nonce too low' @@ -1179,6 +1187,8 @@ URL = 'http://stark.node' APIKey = 'key' `}, {"Mercury", Config{Core: toml.Core{Mercury: full.Mercury}}, `[Mercury] +VerboseLogging = true + [Mercury.Cache] LatestReportTTL = '1m40s' MaxStaleAge = '1m41s' @@ -1257,7 +1267,7 @@ func TestConfig_Validate(t *testing.T) { toml string exp string }{ - {name: "invalid", toml: invalidTOML, exp: `invalid configuration: 7 errors: + {name: "invalid", toml: invalidTOML, exp: `invalid configuration: 8 errors: - P2P.V2.Enabled: invalid value (false): P2P required for OCR or OCR2. Please enable P2P or disable OCR/OCR2. - Database.Lock.LeaseRefreshInterval: invalid value (6s): must be less than or equal to half of LeaseDuration (10s) - WebServer: 8 errors: @@ -1287,10 +1297,11 @@ func TestConfig_Validate(t *testing.T) { - WSURL: missing: required for primary nodes - HTTPURL: missing: required for all nodes - 1.HTTPURL: missing: required for all nodes - - 1: 9 errors: + - 1: 10 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, celo, gnosis, kroma, metis, optimismBedrock, scroll, wemix, xlayer, zkevm, zksync or omitted + - HeadTracker.HistoryDepth: invalid value (30): must be greater than or equal to FinalizedBlockOffset - GasEstimator.BumpThreshold: invalid value (0): cannot be 0 if auto-purge feature is enabled for Foo - Transactions.AutoPurge.Threshold: missing: needs to be set if auto-purge feature is enabled for Foo - Transactions.AutoPurge.MinAttempts: missing: needs to be set if auto-purge feature is enabled for Foo @@ -1349,7 +1360,8 @@ func TestConfig_Validate(t *testing.T) { - 0.ChainID: missing: required for all chains - 1: 2 errors: - ChainID: missing: required for all chains - - Nodes: missing: must have at least one node`}, + - Nodes: missing: must have at least one node + - Aptos.0.Enabled: invalid value (1): expected *bool`}, } { t.Run(tt.name, func(t *testing.T) { var c Config diff --git a/core/services/chainlink/mocks/general_config.go b/core/services/chainlink/mocks/general_config.go index c7e224f4f2a..c42ed5c7014 100644 --- a/core/services/chainlink/mocks/general_config.go +++ b/core/services/chainlink/mocks/general_config.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -26,6 +26,14 @@ type GeneralConfig struct { mock.Mock } +type GeneralConfig_Expecter struct { + mock *mock.Mock +} + +func (_m *GeneralConfig) EXPECT() *GeneralConfig_Expecter { + return &GeneralConfig_Expecter{mock: &_m.Mock} +} + // AppID provides a mock function with given fields: func (_m *GeneralConfig) AppID() uuid.UUID { ret := _m.Called() @@ -46,6 +54,78 @@ func (_m *GeneralConfig) AppID() uuid.UUID { return r0 } +// GeneralConfig_AppID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AppID' +type GeneralConfig_AppID_Call struct { + *mock.Call +} + +// AppID is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) AppID() *GeneralConfig_AppID_Call { + return &GeneralConfig_AppID_Call{Call: _e.mock.On("AppID")} +} + +func (_c *GeneralConfig_AppID_Call) Run(run func()) *GeneralConfig_AppID_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_AppID_Call) Return(_a0 uuid.UUID) *GeneralConfig_AppID_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_AppID_Call) RunAndReturn(run func() uuid.UUID) *GeneralConfig_AppID_Call { + _c.Call.Return(run) + return _c +} + +// AptosEnabled provides a mock function with given fields: +func (_m *GeneralConfig) AptosEnabled() bool { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for AptosEnabled") + } + + var r0 bool + if rf, ok := ret.Get(0).(func() bool); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// GeneralConfig_AptosEnabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AptosEnabled' +type GeneralConfig_AptosEnabled_Call struct { + *mock.Call +} + +// AptosEnabled is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) AptosEnabled() *GeneralConfig_AptosEnabled_Call { + return &GeneralConfig_AptosEnabled_Call{Call: _e.mock.On("AptosEnabled")} +} + +func (_c *GeneralConfig_AptosEnabled_Call) Run(run func()) *GeneralConfig_AptosEnabled_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_AptosEnabled_Call) Return(_a0 bool) *GeneralConfig_AptosEnabled_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_AptosEnabled_Call) RunAndReturn(run func() bool) *GeneralConfig_AptosEnabled_Call { + _c.Call.Return(run) + return _c +} + // AuditLogger provides a mock function with given fields: func (_m *GeneralConfig) AuditLogger() config.AuditLogger { ret := _m.Called() @@ -66,6 +146,33 @@ func (_m *GeneralConfig) AuditLogger() config.AuditLogger { return r0 } +// GeneralConfig_AuditLogger_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AuditLogger' +type GeneralConfig_AuditLogger_Call struct { + *mock.Call +} + +// AuditLogger is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) AuditLogger() *GeneralConfig_AuditLogger_Call { + return &GeneralConfig_AuditLogger_Call{Call: _e.mock.On("AuditLogger")} +} + +func (_c *GeneralConfig_AuditLogger_Call) Run(run func()) *GeneralConfig_AuditLogger_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_AuditLogger_Call) Return(_a0 config.AuditLogger) *GeneralConfig_AuditLogger_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_AuditLogger_Call) RunAndReturn(run func() config.AuditLogger) *GeneralConfig_AuditLogger_Call { + _c.Call.Return(run) + return _c +} + // AutoPprof provides a mock function with given fields: func (_m *GeneralConfig) AutoPprof() config.AutoPprof { ret := _m.Called() @@ -86,6 +193,33 @@ func (_m *GeneralConfig) AutoPprof() config.AutoPprof { return r0 } +// GeneralConfig_AutoPprof_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AutoPprof' +type GeneralConfig_AutoPprof_Call struct { + *mock.Call +} + +// AutoPprof is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) AutoPprof() *GeneralConfig_AutoPprof_Call { + return &GeneralConfig_AutoPprof_Call{Call: _e.mock.On("AutoPprof")} +} + +func (_c *GeneralConfig_AutoPprof_Call) Run(run func()) *GeneralConfig_AutoPprof_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_AutoPprof_Call) Return(_a0 config.AutoPprof) *GeneralConfig_AutoPprof_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_AutoPprof_Call) RunAndReturn(run func() config.AutoPprof) *GeneralConfig_AutoPprof_Call { + _c.Call.Return(run) + return _c +} + // Capabilities provides a mock function with given fields: func (_m *GeneralConfig) Capabilities() config.Capabilities { ret := _m.Called() @@ -106,6 +240,33 @@ func (_m *GeneralConfig) Capabilities() config.Capabilities { return r0 } +// GeneralConfig_Capabilities_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Capabilities' +type GeneralConfig_Capabilities_Call struct { + *mock.Call +} + +// Capabilities is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) Capabilities() *GeneralConfig_Capabilities_Call { + return &GeneralConfig_Capabilities_Call{Call: _e.mock.On("Capabilities")} +} + +func (_c *GeneralConfig_Capabilities_Call) Run(run func()) *GeneralConfig_Capabilities_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_Capabilities_Call) Return(_a0 config.Capabilities) *GeneralConfig_Capabilities_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_Capabilities_Call) RunAndReturn(run func() config.Capabilities) *GeneralConfig_Capabilities_Call { + _c.Call.Return(run) + return _c +} + // ConfigTOML provides a mock function with given fields: func (_m *GeneralConfig) ConfigTOML() (string, string) { ret := _m.Called() @@ -134,6 +295,33 @@ func (_m *GeneralConfig) ConfigTOML() (string, string) { return r0, r1 } +// GeneralConfig_ConfigTOML_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ConfigTOML' +type GeneralConfig_ConfigTOML_Call struct { + *mock.Call +} + +// ConfigTOML is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) ConfigTOML() *GeneralConfig_ConfigTOML_Call { + return &GeneralConfig_ConfigTOML_Call{Call: _e.mock.On("ConfigTOML")} +} + +func (_c *GeneralConfig_ConfigTOML_Call) Run(run func()) *GeneralConfig_ConfigTOML_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_ConfigTOML_Call) Return(user string, effective string) *GeneralConfig_ConfigTOML_Call { + _c.Call.Return(user, effective) + return _c +} + +func (_c *GeneralConfig_ConfigTOML_Call) RunAndReturn(run func() (string, string)) *GeneralConfig_ConfigTOML_Call { + _c.Call.Return(run) + return _c +} + // CosmosConfigs provides a mock function with given fields: func (_m *GeneralConfig) CosmosConfigs() cosmosconfig.TOMLConfigs { ret := _m.Called() @@ -154,6 +342,33 @@ func (_m *GeneralConfig) CosmosConfigs() cosmosconfig.TOMLConfigs { return r0 } +// GeneralConfig_CosmosConfigs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CosmosConfigs' +type GeneralConfig_CosmosConfigs_Call struct { + *mock.Call +} + +// CosmosConfigs is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) CosmosConfigs() *GeneralConfig_CosmosConfigs_Call { + return &GeneralConfig_CosmosConfigs_Call{Call: _e.mock.On("CosmosConfigs")} +} + +func (_c *GeneralConfig_CosmosConfigs_Call) Run(run func()) *GeneralConfig_CosmosConfigs_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_CosmosConfigs_Call) Return(_a0 cosmosconfig.TOMLConfigs) *GeneralConfig_CosmosConfigs_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_CosmosConfigs_Call) RunAndReturn(run func() cosmosconfig.TOMLConfigs) *GeneralConfig_CosmosConfigs_Call { + _c.Call.Return(run) + return _c +} + // CosmosEnabled provides a mock function with given fields: func (_m *GeneralConfig) CosmosEnabled() bool { ret := _m.Called() @@ -172,6 +387,33 @@ func (_m *GeneralConfig) CosmosEnabled() bool { return r0 } +// GeneralConfig_CosmosEnabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CosmosEnabled' +type GeneralConfig_CosmosEnabled_Call struct { + *mock.Call +} + +// CosmosEnabled is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) CosmosEnabled() *GeneralConfig_CosmosEnabled_Call { + return &GeneralConfig_CosmosEnabled_Call{Call: _e.mock.On("CosmosEnabled")} +} + +func (_c *GeneralConfig_CosmosEnabled_Call) Run(run func()) *GeneralConfig_CosmosEnabled_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_CosmosEnabled_Call) Return(_a0 bool) *GeneralConfig_CosmosEnabled_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_CosmosEnabled_Call) RunAndReturn(run func() bool) *GeneralConfig_CosmosEnabled_Call { + _c.Call.Return(run) + return _c +} + // Database provides a mock function with given fields: func (_m *GeneralConfig) Database() config.Database { ret := _m.Called() @@ -192,6 +434,33 @@ func (_m *GeneralConfig) Database() config.Database { return r0 } +// GeneralConfig_Database_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Database' +type GeneralConfig_Database_Call struct { + *mock.Call +} + +// Database is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) Database() *GeneralConfig_Database_Call { + return &GeneralConfig_Database_Call{Call: _e.mock.On("Database")} +} + +func (_c *GeneralConfig_Database_Call) Run(run func()) *GeneralConfig_Database_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_Database_Call) Return(_a0 config.Database) *GeneralConfig_Database_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_Database_Call) RunAndReturn(run func() config.Database) *GeneralConfig_Database_Call { + _c.Call.Return(run) + return _c +} + // EVMConfigs provides a mock function with given fields: func (_m *GeneralConfig) EVMConfigs() toml.EVMConfigs { ret := _m.Called() @@ -212,6 +481,33 @@ func (_m *GeneralConfig) EVMConfigs() toml.EVMConfigs { return r0 } +// GeneralConfig_EVMConfigs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EVMConfigs' +type GeneralConfig_EVMConfigs_Call struct { + *mock.Call +} + +// EVMConfigs is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) EVMConfigs() *GeneralConfig_EVMConfigs_Call { + return &GeneralConfig_EVMConfigs_Call{Call: _e.mock.On("EVMConfigs")} +} + +func (_c *GeneralConfig_EVMConfigs_Call) Run(run func()) *GeneralConfig_EVMConfigs_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_EVMConfigs_Call) Return(_a0 toml.EVMConfigs) *GeneralConfig_EVMConfigs_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_EVMConfigs_Call) RunAndReturn(run func() toml.EVMConfigs) *GeneralConfig_EVMConfigs_Call { + _c.Call.Return(run) + return _c +} + // EVMEnabled provides a mock function with given fields: func (_m *GeneralConfig) EVMEnabled() bool { ret := _m.Called() @@ -230,6 +526,33 @@ func (_m *GeneralConfig) EVMEnabled() bool { return r0 } +// GeneralConfig_EVMEnabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EVMEnabled' +type GeneralConfig_EVMEnabled_Call struct { + *mock.Call +} + +// EVMEnabled is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) EVMEnabled() *GeneralConfig_EVMEnabled_Call { + return &GeneralConfig_EVMEnabled_Call{Call: _e.mock.On("EVMEnabled")} +} + +func (_c *GeneralConfig_EVMEnabled_Call) Run(run func()) *GeneralConfig_EVMEnabled_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_EVMEnabled_Call) Return(_a0 bool) *GeneralConfig_EVMEnabled_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_EVMEnabled_Call) RunAndReturn(run func() bool) *GeneralConfig_EVMEnabled_Call { + _c.Call.Return(run) + return _c +} + // EVMRPCEnabled provides a mock function with given fields: func (_m *GeneralConfig) EVMRPCEnabled() bool { ret := _m.Called() @@ -248,6 +571,33 @@ func (_m *GeneralConfig) EVMRPCEnabled() bool { return r0 } +// GeneralConfig_EVMRPCEnabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EVMRPCEnabled' +type GeneralConfig_EVMRPCEnabled_Call struct { + *mock.Call +} + +// EVMRPCEnabled is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) EVMRPCEnabled() *GeneralConfig_EVMRPCEnabled_Call { + return &GeneralConfig_EVMRPCEnabled_Call{Call: _e.mock.On("EVMRPCEnabled")} +} + +func (_c *GeneralConfig_EVMRPCEnabled_Call) Run(run func()) *GeneralConfig_EVMRPCEnabled_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_EVMRPCEnabled_Call) Return(_a0 bool) *GeneralConfig_EVMRPCEnabled_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_EVMRPCEnabled_Call) RunAndReturn(run func() bool) *GeneralConfig_EVMRPCEnabled_Call { + _c.Call.Return(run) + return _c +} + // Feature provides a mock function with given fields: func (_m *GeneralConfig) Feature() config.Feature { ret := _m.Called() @@ -268,6 +618,33 @@ func (_m *GeneralConfig) Feature() config.Feature { return r0 } +// GeneralConfig_Feature_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Feature' +type GeneralConfig_Feature_Call struct { + *mock.Call +} + +// Feature is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) Feature() *GeneralConfig_Feature_Call { + return &GeneralConfig_Feature_Call{Call: _e.mock.On("Feature")} +} + +func (_c *GeneralConfig_Feature_Call) Run(run func()) *GeneralConfig_Feature_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_Feature_Call) Return(_a0 config.Feature) *GeneralConfig_Feature_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_Feature_Call) RunAndReturn(run func() config.Feature) *GeneralConfig_Feature_Call { + _c.Call.Return(run) + return _c +} + // FluxMonitor provides a mock function with given fields: func (_m *GeneralConfig) FluxMonitor() config.FluxMonitor { ret := _m.Called() @@ -288,6 +665,33 @@ func (_m *GeneralConfig) FluxMonitor() config.FluxMonitor { return r0 } +// GeneralConfig_FluxMonitor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FluxMonitor' +type GeneralConfig_FluxMonitor_Call struct { + *mock.Call +} + +// FluxMonitor is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) FluxMonitor() *GeneralConfig_FluxMonitor_Call { + return &GeneralConfig_FluxMonitor_Call{Call: _e.mock.On("FluxMonitor")} +} + +func (_c *GeneralConfig_FluxMonitor_Call) Run(run func()) *GeneralConfig_FluxMonitor_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_FluxMonitor_Call) Return(_a0 config.FluxMonitor) *GeneralConfig_FluxMonitor_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_FluxMonitor_Call) RunAndReturn(run func() config.FluxMonitor) *GeneralConfig_FluxMonitor_Call { + _c.Call.Return(run) + return _c +} + // Insecure provides a mock function with given fields: func (_m *GeneralConfig) Insecure() config.Insecure { ret := _m.Called() @@ -308,6 +712,33 @@ func (_m *GeneralConfig) Insecure() config.Insecure { return r0 } +// GeneralConfig_Insecure_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Insecure' +type GeneralConfig_Insecure_Call struct { + *mock.Call +} + +// Insecure is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) Insecure() *GeneralConfig_Insecure_Call { + return &GeneralConfig_Insecure_Call{Call: _e.mock.On("Insecure")} +} + +func (_c *GeneralConfig_Insecure_Call) Run(run func()) *GeneralConfig_Insecure_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_Insecure_Call) Return(_a0 config.Insecure) *GeneralConfig_Insecure_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_Insecure_Call) RunAndReturn(run func() config.Insecure) *GeneralConfig_Insecure_Call { + _c.Call.Return(run) + return _c +} + // InsecureFastScrypt provides a mock function with given fields: func (_m *GeneralConfig) InsecureFastScrypt() bool { ret := _m.Called() @@ -326,6 +757,33 @@ func (_m *GeneralConfig) InsecureFastScrypt() bool { return r0 } +// GeneralConfig_InsecureFastScrypt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsecureFastScrypt' +type GeneralConfig_InsecureFastScrypt_Call struct { + *mock.Call +} + +// InsecureFastScrypt is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) InsecureFastScrypt() *GeneralConfig_InsecureFastScrypt_Call { + return &GeneralConfig_InsecureFastScrypt_Call{Call: _e.mock.On("InsecureFastScrypt")} +} + +func (_c *GeneralConfig_InsecureFastScrypt_Call) Run(run func()) *GeneralConfig_InsecureFastScrypt_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_InsecureFastScrypt_Call) Return(_a0 bool) *GeneralConfig_InsecureFastScrypt_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_InsecureFastScrypt_Call) RunAndReturn(run func() bool) *GeneralConfig_InsecureFastScrypt_Call { + _c.Call.Return(run) + return _c +} + // JobPipeline provides a mock function with given fields: func (_m *GeneralConfig) JobPipeline() config.JobPipeline { ret := _m.Called() @@ -346,6 +804,33 @@ func (_m *GeneralConfig) JobPipeline() config.JobPipeline { return r0 } +// GeneralConfig_JobPipeline_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'JobPipeline' +type GeneralConfig_JobPipeline_Call struct { + *mock.Call +} + +// JobPipeline is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) JobPipeline() *GeneralConfig_JobPipeline_Call { + return &GeneralConfig_JobPipeline_Call{Call: _e.mock.On("JobPipeline")} +} + +func (_c *GeneralConfig_JobPipeline_Call) Run(run func()) *GeneralConfig_JobPipeline_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_JobPipeline_Call) Return(_a0 config.JobPipeline) *GeneralConfig_JobPipeline_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_JobPipeline_Call) RunAndReturn(run func() config.JobPipeline) *GeneralConfig_JobPipeline_Call { + _c.Call.Return(run) + return _c +} + // Keeper provides a mock function with given fields: func (_m *GeneralConfig) Keeper() config.Keeper { ret := _m.Called() @@ -366,6 +851,33 @@ func (_m *GeneralConfig) Keeper() config.Keeper { return r0 } +// GeneralConfig_Keeper_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Keeper' +type GeneralConfig_Keeper_Call struct { + *mock.Call +} + +// Keeper is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) Keeper() *GeneralConfig_Keeper_Call { + return &GeneralConfig_Keeper_Call{Call: _e.mock.On("Keeper")} +} + +func (_c *GeneralConfig_Keeper_Call) Run(run func()) *GeneralConfig_Keeper_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_Keeper_Call) Return(_a0 config.Keeper) *GeneralConfig_Keeper_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_Keeper_Call) RunAndReturn(run func() config.Keeper) *GeneralConfig_Keeper_Call { + _c.Call.Return(run) + return _c +} + // Log provides a mock function with given fields: func (_m *GeneralConfig) Log() config.Log { ret := _m.Called() @@ -386,11 +898,67 @@ func (_m *GeneralConfig) Log() config.Log { return r0 } +// GeneralConfig_Log_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Log' +type GeneralConfig_Log_Call struct { + *mock.Call +} + +// Log is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) Log() *GeneralConfig_Log_Call { + return &GeneralConfig_Log_Call{Call: _e.mock.On("Log")} +} + +func (_c *GeneralConfig_Log_Call) Run(run func()) *GeneralConfig_Log_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_Log_Call) Return(_a0 config.Log) *GeneralConfig_Log_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_Log_Call) RunAndReturn(run func() config.Log) *GeneralConfig_Log_Call { + _c.Call.Return(run) + return _c +} + // LogConfiguration provides a mock function with given fields: log, warn func (_m *GeneralConfig) LogConfiguration(log config.LogfFn, warn config.LogfFn) { _m.Called(log, warn) } +// GeneralConfig_LogConfiguration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LogConfiguration' +type GeneralConfig_LogConfiguration_Call struct { + *mock.Call +} + +// LogConfiguration is a helper method to define mock.On call +// - log config.LogfFn +// - warn config.LogfFn +func (_e *GeneralConfig_Expecter) LogConfiguration(log interface{}, warn interface{}) *GeneralConfig_LogConfiguration_Call { + return &GeneralConfig_LogConfiguration_Call{Call: _e.mock.On("LogConfiguration", log, warn)} +} + +func (_c *GeneralConfig_LogConfiguration_Call) Run(run func(log config.LogfFn, warn config.LogfFn)) *GeneralConfig_LogConfiguration_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(config.LogfFn), args[1].(config.LogfFn)) + }) + return _c +} + +func (_c *GeneralConfig_LogConfiguration_Call) Return() *GeneralConfig_LogConfiguration_Call { + _c.Call.Return() + return _c +} + +func (_c *GeneralConfig_LogConfiguration_Call) RunAndReturn(run func(config.LogfFn, config.LogfFn)) *GeneralConfig_LogConfiguration_Call { + _c.Call.Return(run) + return _c +} + // Mercury provides a mock function with given fields: func (_m *GeneralConfig) Mercury() config.Mercury { ret := _m.Called() @@ -411,6 +979,33 @@ func (_m *GeneralConfig) Mercury() config.Mercury { return r0 } +// GeneralConfig_Mercury_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Mercury' +type GeneralConfig_Mercury_Call struct { + *mock.Call +} + +// Mercury is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) Mercury() *GeneralConfig_Mercury_Call { + return &GeneralConfig_Mercury_Call{Call: _e.mock.On("Mercury")} +} + +func (_c *GeneralConfig_Mercury_Call) Run(run func()) *GeneralConfig_Mercury_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_Mercury_Call) Return(_a0 config.Mercury) *GeneralConfig_Mercury_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_Mercury_Call) RunAndReturn(run func() config.Mercury) *GeneralConfig_Mercury_Call { + _c.Call.Return(run) + return _c +} + // OCR provides a mock function with given fields: func (_m *GeneralConfig) OCR() config.OCR { ret := _m.Called() @@ -431,6 +1026,33 @@ func (_m *GeneralConfig) OCR() config.OCR { return r0 } +// GeneralConfig_OCR_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OCR' +type GeneralConfig_OCR_Call struct { + *mock.Call +} + +// OCR is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) OCR() *GeneralConfig_OCR_Call { + return &GeneralConfig_OCR_Call{Call: _e.mock.On("OCR")} +} + +func (_c *GeneralConfig_OCR_Call) Run(run func()) *GeneralConfig_OCR_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_OCR_Call) Return(_a0 config.OCR) *GeneralConfig_OCR_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_OCR_Call) RunAndReturn(run func() config.OCR) *GeneralConfig_OCR_Call { + _c.Call.Return(run) + return _c +} + // OCR2 provides a mock function with given fields: func (_m *GeneralConfig) OCR2() config.OCR2 { ret := _m.Called() @@ -451,6 +1073,33 @@ func (_m *GeneralConfig) OCR2() config.OCR2 { return r0 } +// GeneralConfig_OCR2_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OCR2' +type GeneralConfig_OCR2_Call struct { + *mock.Call +} + +// OCR2 is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) OCR2() *GeneralConfig_OCR2_Call { + return &GeneralConfig_OCR2_Call{Call: _e.mock.On("OCR2")} +} + +func (_c *GeneralConfig_OCR2_Call) Run(run func()) *GeneralConfig_OCR2_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_OCR2_Call) Return(_a0 config.OCR2) *GeneralConfig_OCR2_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_OCR2_Call) RunAndReturn(run func() config.OCR2) *GeneralConfig_OCR2_Call { + _c.Call.Return(run) + return _c +} + // P2P provides a mock function with given fields: func (_m *GeneralConfig) P2P() config.P2P { ret := _m.Called() @@ -471,6 +1120,33 @@ func (_m *GeneralConfig) P2P() config.P2P { return r0 } +// GeneralConfig_P2P_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'P2P' +type GeneralConfig_P2P_Call struct { + *mock.Call +} + +// P2P is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) P2P() *GeneralConfig_P2P_Call { + return &GeneralConfig_P2P_Call{Call: _e.mock.On("P2P")} +} + +func (_c *GeneralConfig_P2P_Call) Run(run func()) *GeneralConfig_P2P_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_P2P_Call) Return(_a0 config.P2P) *GeneralConfig_P2P_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_P2P_Call) RunAndReturn(run func() config.P2P) *GeneralConfig_P2P_Call { + _c.Call.Return(run) + return _c +} + // Password provides a mock function with given fields: func (_m *GeneralConfig) Password() config.Password { ret := _m.Called() @@ -491,6 +1167,33 @@ func (_m *GeneralConfig) Password() config.Password { return r0 } +// GeneralConfig_Password_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Password' +type GeneralConfig_Password_Call struct { + *mock.Call +} + +// Password is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) Password() *GeneralConfig_Password_Call { + return &GeneralConfig_Password_Call{Call: _e.mock.On("Password")} +} + +func (_c *GeneralConfig_Password_Call) Run(run func()) *GeneralConfig_Password_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_Password_Call) Return(_a0 config.Password) *GeneralConfig_Password_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_Password_Call) RunAndReturn(run func() config.Password) *GeneralConfig_Password_Call { + _c.Call.Return(run) + return _c +} + // Prometheus provides a mock function with given fields: func (_m *GeneralConfig) Prometheus() config.Prometheus { ret := _m.Called() @@ -511,6 +1214,33 @@ func (_m *GeneralConfig) Prometheus() config.Prometheus { return r0 } +// GeneralConfig_Prometheus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Prometheus' +type GeneralConfig_Prometheus_Call struct { + *mock.Call +} + +// Prometheus is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) Prometheus() *GeneralConfig_Prometheus_Call { + return &GeneralConfig_Prometheus_Call{Call: _e.mock.On("Prometheus")} +} + +func (_c *GeneralConfig_Prometheus_Call) Run(run func()) *GeneralConfig_Prometheus_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_Prometheus_Call) Return(_a0 config.Prometheus) *GeneralConfig_Prometheus_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_Prometheus_Call) RunAndReturn(run func() config.Prometheus) *GeneralConfig_Prometheus_Call { + _c.Call.Return(run) + return _c +} + // Pyroscope provides a mock function with given fields: func (_m *GeneralConfig) Pyroscope() config.Pyroscope { ret := _m.Called() @@ -531,6 +1261,33 @@ func (_m *GeneralConfig) Pyroscope() config.Pyroscope { return r0 } +// GeneralConfig_Pyroscope_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Pyroscope' +type GeneralConfig_Pyroscope_Call struct { + *mock.Call +} + +// Pyroscope is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) Pyroscope() *GeneralConfig_Pyroscope_Call { + return &GeneralConfig_Pyroscope_Call{Call: _e.mock.On("Pyroscope")} +} + +func (_c *GeneralConfig_Pyroscope_Call) Run(run func()) *GeneralConfig_Pyroscope_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_Pyroscope_Call) Return(_a0 config.Pyroscope) *GeneralConfig_Pyroscope_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_Pyroscope_Call) RunAndReturn(run func() config.Pyroscope) *GeneralConfig_Pyroscope_Call { + _c.Call.Return(run) + return _c +} + // RootDir provides a mock function with given fields: func (_m *GeneralConfig) RootDir() string { ret := _m.Called() @@ -549,6 +1306,33 @@ func (_m *GeneralConfig) RootDir() string { return r0 } +// GeneralConfig_RootDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RootDir' +type GeneralConfig_RootDir_Call struct { + *mock.Call +} + +// RootDir is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) RootDir() *GeneralConfig_RootDir_Call { + return &GeneralConfig_RootDir_Call{Call: _e.mock.On("RootDir")} +} + +func (_c *GeneralConfig_RootDir_Call) Run(run func()) *GeneralConfig_RootDir_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_RootDir_Call) Return(_a0 string) *GeneralConfig_RootDir_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_RootDir_Call) RunAndReturn(run func() string) *GeneralConfig_RootDir_Call { + _c.Call.Return(run) + return _c +} + // Sentry provides a mock function with given fields: func (_m *GeneralConfig) Sentry() config.Sentry { ret := _m.Called() @@ -569,6 +1353,33 @@ func (_m *GeneralConfig) Sentry() config.Sentry { return r0 } +// GeneralConfig_Sentry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Sentry' +type GeneralConfig_Sentry_Call struct { + *mock.Call +} + +// Sentry is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) Sentry() *GeneralConfig_Sentry_Call { + return &GeneralConfig_Sentry_Call{Call: _e.mock.On("Sentry")} +} + +func (_c *GeneralConfig_Sentry_Call) Run(run func()) *GeneralConfig_Sentry_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_Sentry_Call) Return(_a0 config.Sentry) *GeneralConfig_Sentry_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_Sentry_Call) RunAndReturn(run func() config.Sentry) *GeneralConfig_Sentry_Call { + _c.Call.Return(run) + return _c +} + // SetLogLevel provides a mock function with given fields: lvl func (_m *GeneralConfig) SetLogLevel(lvl zapcore.Level) error { ret := _m.Called(lvl) @@ -587,16 +1398,101 @@ func (_m *GeneralConfig) SetLogLevel(lvl zapcore.Level) error { return r0 } +// GeneralConfig_SetLogLevel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetLogLevel' +type GeneralConfig_SetLogLevel_Call struct { + *mock.Call +} + +// SetLogLevel is a helper method to define mock.On call +// - lvl zapcore.Level +func (_e *GeneralConfig_Expecter) SetLogLevel(lvl interface{}) *GeneralConfig_SetLogLevel_Call { + return &GeneralConfig_SetLogLevel_Call{Call: _e.mock.On("SetLogLevel", lvl)} +} + +func (_c *GeneralConfig_SetLogLevel_Call) Run(run func(lvl zapcore.Level)) *GeneralConfig_SetLogLevel_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(zapcore.Level)) + }) + return _c +} + +func (_c *GeneralConfig_SetLogLevel_Call) Return(_a0 error) *GeneralConfig_SetLogLevel_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_SetLogLevel_Call) RunAndReturn(run func(zapcore.Level) error) *GeneralConfig_SetLogLevel_Call { + _c.Call.Return(run) + return _c +} + // SetLogSQL provides a mock function with given fields: logSQL func (_m *GeneralConfig) SetLogSQL(logSQL bool) { _m.Called(logSQL) } +// GeneralConfig_SetLogSQL_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetLogSQL' +type GeneralConfig_SetLogSQL_Call struct { + *mock.Call +} + +// SetLogSQL is a helper method to define mock.On call +// - logSQL bool +func (_e *GeneralConfig_Expecter) SetLogSQL(logSQL interface{}) *GeneralConfig_SetLogSQL_Call { + return &GeneralConfig_SetLogSQL_Call{Call: _e.mock.On("SetLogSQL", logSQL)} +} + +func (_c *GeneralConfig_SetLogSQL_Call) Run(run func(logSQL bool)) *GeneralConfig_SetLogSQL_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bool)) + }) + return _c +} + +func (_c *GeneralConfig_SetLogSQL_Call) Return() *GeneralConfig_SetLogSQL_Call { + _c.Call.Return() + return _c +} + +func (_c *GeneralConfig_SetLogSQL_Call) RunAndReturn(run func(bool)) *GeneralConfig_SetLogSQL_Call { + _c.Call.Return(run) + return _c +} + // SetPasswords provides a mock function with given fields: keystore, vrf func (_m *GeneralConfig) SetPasswords(keystore *string, vrf *string) { _m.Called(keystore, vrf) } +// GeneralConfig_SetPasswords_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPasswords' +type GeneralConfig_SetPasswords_Call struct { + *mock.Call +} + +// SetPasswords is a helper method to define mock.On call +// - keystore *string +// - vrf *string +func (_e *GeneralConfig_Expecter) SetPasswords(keystore interface{}, vrf interface{}) *GeneralConfig_SetPasswords_Call { + return &GeneralConfig_SetPasswords_Call{Call: _e.mock.On("SetPasswords", keystore, vrf)} +} + +func (_c *GeneralConfig_SetPasswords_Call) Run(run func(keystore *string, vrf *string)) *GeneralConfig_SetPasswords_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*string), args[1].(*string)) + }) + return _c +} + +func (_c *GeneralConfig_SetPasswords_Call) Return() *GeneralConfig_SetPasswords_Call { + _c.Call.Return() + return _c +} + +func (_c *GeneralConfig_SetPasswords_Call) RunAndReturn(run func(*string, *string)) *GeneralConfig_SetPasswords_Call { + _c.Call.Return(run) + return _c +} + // ShutdownGracePeriod provides a mock function with given fields: func (_m *GeneralConfig) ShutdownGracePeriod() time.Duration { ret := _m.Called() @@ -615,6 +1511,33 @@ func (_m *GeneralConfig) ShutdownGracePeriod() time.Duration { return r0 } +// GeneralConfig_ShutdownGracePeriod_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ShutdownGracePeriod' +type GeneralConfig_ShutdownGracePeriod_Call struct { + *mock.Call +} + +// ShutdownGracePeriod is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) ShutdownGracePeriod() *GeneralConfig_ShutdownGracePeriod_Call { + return &GeneralConfig_ShutdownGracePeriod_Call{Call: _e.mock.On("ShutdownGracePeriod")} +} + +func (_c *GeneralConfig_ShutdownGracePeriod_Call) Run(run func()) *GeneralConfig_ShutdownGracePeriod_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_ShutdownGracePeriod_Call) Return(_a0 time.Duration) *GeneralConfig_ShutdownGracePeriod_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_ShutdownGracePeriod_Call) RunAndReturn(run func() time.Duration) *GeneralConfig_ShutdownGracePeriod_Call { + _c.Call.Return(run) + return _c +} + // SolanaConfigs provides a mock function with given fields: func (_m *GeneralConfig) SolanaConfigs() solanaconfig.TOMLConfigs { ret := _m.Called() @@ -635,6 +1558,33 @@ func (_m *GeneralConfig) SolanaConfigs() solanaconfig.TOMLConfigs { return r0 } +// GeneralConfig_SolanaConfigs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SolanaConfigs' +type GeneralConfig_SolanaConfigs_Call struct { + *mock.Call +} + +// SolanaConfigs is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) SolanaConfigs() *GeneralConfig_SolanaConfigs_Call { + return &GeneralConfig_SolanaConfigs_Call{Call: _e.mock.On("SolanaConfigs")} +} + +func (_c *GeneralConfig_SolanaConfigs_Call) Run(run func()) *GeneralConfig_SolanaConfigs_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_SolanaConfigs_Call) Return(_a0 solanaconfig.TOMLConfigs) *GeneralConfig_SolanaConfigs_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_SolanaConfigs_Call) RunAndReturn(run func() solanaconfig.TOMLConfigs) *GeneralConfig_SolanaConfigs_Call { + _c.Call.Return(run) + return _c +} + // SolanaEnabled provides a mock function with given fields: func (_m *GeneralConfig) SolanaEnabled() bool { ret := _m.Called() @@ -653,6 +1603,33 @@ func (_m *GeneralConfig) SolanaEnabled() bool { return r0 } +// GeneralConfig_SolanaEnabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SolanaEnabled' +type GeneralConfig_SolanaEnabled_Call struct { + *mock.Call +} + +// SolanaEnabled is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) SolanaEnabled() *GeneralConfig_SolanaEnabled_Call { + return &GeneralConfig_SolanaEnabled_Call{Call: _e.mock.On("SolanaEnabled")} +} + +func (_c *GeneralConfig_SolanaEnabled_Call) Run(run func()) *GeneralConfig_SolanaEnabled_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_SolanaEnabled_Call) Return(_a0 bool) *GeneralConfig_SolanaEnabled_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_SolanaEnabled_Call) RunAndReturn(run func() bool) *GeneralConfig_SolanaEnabled_Call { + _c.Call.Return(run) + return _c +} + // StarkNetEnabled provides a mock function with given fields: func (_m *GeneralConfig) StarkNetEnabled() bool { ret := _m.Called() @@ -671,6 +1648,33 @@ func (_m *GeneralConfig) StarkNetEnabled() bool { return r0 } +// GeneralConfig_StarkNetEnabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StarkNetEnabled' +type GeneralConfig_StarkNetEnabled_Call struct { + *mock.Call +} + +// StarkNetEnabled is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) StarkNetEnabled() *GeneralConfig_StarkNetEnabled_Call { + return &GeneralConfig_StarkNetEnabled_Call{Call: _e.mock.On("StarkNetEnabled")} +} + +func (_c *GeneralConfig_StarkNetEnabled_Call) Run(run func()) *GeneralConfig_StarkNetEnabled_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_StarkNetEnabled_Call) Return(_a0 bool) *GeneralConfig_StarkNetEnabled_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_StarkNetEnabled_Call) RunAndReturn(run func() bool) *GeneralConfig_StarkNetEnabled_Call { + _c.Call.Return(run) + return _c +} + // StarknetConfigs provides a mock function with given fields: func (_m *GeneralConfig) StarknetConfigs() chainlinkconfig.TOMLConfigs { ret := _m.Called() @@ -691,6 +1695,33 @@ func (_m *GeneralConfig) StarknetConfigs() chainlinkconfig.TOMLConfigs { return r0 } +// GeneralConfig_StarknetConfigs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StarknetConfigs' +type GeneralConfig_StarknetConfigs_Call struct { + *mock.Call +} + +// StarknetConfigs is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) StarknetConfigs() *GeneralConfig_StarknetConfigs_Call { + return &GeneralConfig_StarknetConfigs_Call{Call: _e.mock.On("StarknetConfigs")} +} + +func (_c *GeneralConfig_StarknetConfigs_Call) Run(run func()) *GeneralConfig_StarknetConfigs_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_StarknetConfigs_Call) Return(_a0 chainlinkconfig.TOMLConfigs) *GeneralConfig_StarknetConfigs_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_StarknetConfigs_Call) RunAndReturn(run func() chainlinkconfig.TOMLConfigs) *GeneralConfig_StarknetConfigs_Call { + _c.Call.Return(run) + return _c +} + // TelemetryIngress provides a mock function with given fields: func (_m *GeneralConfig) TelemetryIngress() config.TelemetryIngress { ret := _m.Called() @@ -711,6 +1742,33 @@ func (_m *GeneralConfig) TelemetryIngress() config.TelemetryIngress { return r0 } +// GeneralConfig_TelemetryIngress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TelemetryIngress' +type GeneralConfig_TelemetryIngress_Call struct { + *mock.Call +} + +// TelemetryIngress is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) TelemetryIngress() *GeneralConfig_TelemetryIngress_Call { + return &GeneralConfig_TelemetryIngress_Call{Call: _e.mock.On("TelemetryIngress")} +} + +func (_c *GeneralConfig_TelemetryIngress_Call) Run(run func()) *GeneralConfig_TelemetryIngress_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_TelemetryIngress_Call) Return(_a0 config.TelemetryIngress) *GeneralConfig_TelemetryIngress_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_TelemetryIngress_Call) RunAndReturn(run func() config.TelemetryIngress) *GeneralConfig_TelemetryIngress_Call { + _c.Call.Return(run) + return _c +} + // Threshold provides a mock function with given fields: func (_m *GeneralConfig) Threshold() config.Threshold { ret := _m.Called() @@ -731,6 +1789,33 @@ func (_m *GeneralConfig) Threshold() config.Threshold { return r0 } +// GeneralConfig_Threshold_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Threshold' +type GeneralConfig_Threshold_Call struct { + *mock.Call +} + +// Threshold is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) Threshold() *GeneralConfig_Threshold_Call { + return &GeneralConfig_Threshold_Call{Call: _e.mock.On("Threshold")} +} + +func (_c *GeneralConfig_Threshold_Call) Run(run func()) *GeneralConfig_Threshold_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_Threshold_Call) Return(_a0 config.Threshold) *GeneralConfig_Threshold_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_Threshold_Call) RunAndReturn(run func() config.Threshold) *GeneralConfig_Threshold_Call { + _c.Call.Return(run) + return _c +} + // Tracing provides a mock function with given fields: func (_m *GeneralConfig) Tracing() config.Tracing { ret := _m.Called() @@ -751,6 +1836,33 @@ func (_m *GeneralConfig) Tracing() config.Tracing { return r0 } +// GeneralConfig_Tracing_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Tracing' +type GeneralConfig_Tracing_Call struct { + *mock.Call +} + +// Tracing is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) Tracing() *GeneralConfig_Tracing_Call { + return &GeneralConfig_Tracing_Call{Call: _e.mock.On("Tracing")} +} + +func (_c *GeneralConfig_Tracing_Call) Run(run func()) *GeneralConfig_Tracing_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_Tracing_Call) Return(_a0 config.Tracing) *GeneralConfig_Tracing_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_Tracing_Call) RunAndReturn(run func() config.Tracing) *GeneralConfig_Tracing_Call { + _c.Call.Return(run) + return _c +} + // Validate provides a mock function with given fields: func (_m *GeneralConfig) Validate() error { ret := _m.Called() @@ -769,6 +1881,33 @@ func (_m *GeneralConfig) Validate() error { return r0 } +// GeneralConfig_Validate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Validate' +type GeneralConfig_Validate_Call struct { + *mock.Call +} + +// Validate is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) Validate() *GeneralConfig_Validate_Call { + return &GeneralConfig_Validate_Call{Call: _e.mock.On("Validate")} +} + +func (_c *GeneralConfig_Validate_Call) Run(run func()) *GeneralConfig_Validate_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_Validate_Call) Return(_a0 error) *GeneralConfig_Validate_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_Validate_Call) RunAndReturn(run func() error) *GeneralConfig_Validate_Call { + _c.Call.Return(run) + return _c +} + // ValidateDB provides a mock function with given fields: func (_m *GeneralConfig) ValidateDB() error { ret := _m.Called() @@ -787,6 +1926,33 @@ func (_m *GeneralConfig) ValidateDB() error { return r0 } +// GeneralConfig_ValidateDB_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateDB' +type GeneralConfig_ValidateDB_Call struct { + *mock.Call +} + +// ValidateDB is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) ValidateDB() *GeneralConfig_ValidateDB_Call { + return &GeneralConfig_ValidateDB_Call{Call: _e.mock.On("ValidateDB")} +} + +func (_c *GeneralConfig_ValidateDB_Call) Run(run func()) *GeneralConfig_ValidateDB_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_ValidateDB_Call) Return(_a0 error) *GeneralConfig_ValidateDB_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_ValidateDB_Call) RunAndReturn(run func() error) *GeneralConfig_ValidateDB_Call { + _c.Call.Return(run) + return _c +} + // WebServer provides a mock function with given fields: func (_m *GeneralConfig) WebServer() config.WebServer { ret := _m.Called() @@ -807,6 +1973,33 @@ func (_m *GeneralConfig) WebServer() config.WebServer { return r0 } +// GeneralConfig_WebServer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WebServer' +type GeneralConfig_WebServer_Call struct { + *mock.Call +} + +// WebServer is a helper method to define mock.On call +func (_e *GeneralConfig_Expecter) WebServer() *GeneralConfig_WebServer_Call { + return &GeneralConfig_WebServer_Call{Call: _e.mock.On("WebServer")} +} + +func (_c *GeneralConfig_WebServer_Call) Run(run func()) *GeneralConfig_WebServer_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GeneralConfig_WebServer_Call) Return(_a0 config.WebServer) *GeneralConfig_WebServer_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GeneralConfig_WebServer_Call) RunAndReturn(run func() config.WebServer) *GeneralConfig_WebServer_Call { + _c.Call.Return(run) + return _c +} + // NewGeneralConfig creates a new instance of GeneralConfig. 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 NewGeneralConfig(t interface { diff --git a/core/services/chainlink/relayer_chain_interoperators.go b/core/services/chainlink/relayer_chain_interoperators.go index 32bcc9f18a4..60381c0d479 100644 --- a/core/services/chainlink/relayer_chain_interoperators.go +++ b/core/services/chainlink/relayer_chain_interoperators.go @@ -69,6 +69,10 @@ type ChainsNodesStatuser interface { var _ RelayerChainInteroperators = &CoreRelayerChainInteroperators{} +type DummyFactory interface { + NewDummy(config DummyFactoryConfig) (loop.Relayer, error) +} + // CoreRelayerChainInteroperators implements [RelayerChainInteroperators] // as needed for the core [chainlink.Application] type CoreRelayerChainInteroperators struct { @@ -76,6 +80,8 @@ type CoreRelayerChainInteroperators struct { loopRelayers map[types.RelayID]loop.Relayer legacyChains legacyChains + dummyFactory DummyFactory + // we keep an explicit list of services because the legacy implementations have more than // just the relayer service srvs []services.ServiceCtx @@ -98,6 +104,14 @@ func NewCoreRelayerChainInteroperators(initFuncs ...CoreRelayerChainInitFunc) (* // CoreRelayerChainInitFunc is a hook in the constructor to create relayers from a factory. type CoreRelayerChainInitFunc func(op *CoreRelayerChainInteroperators) error +// InitDummy instantiates a dummy relayer +func InitDummy(ctx context.Context, factory RelayerFactory) CoreRelayerChainInitFunc { + return func(op *CoreRelayerChainInteroperators) error { + op.dummyFactory = &factory + return nil + } +} + // InitEVM is a option for instantiating evm relayers func InitEVM(ctx context.Context, factory RelayerFactory, config EVMFactoryConfig) CoreRelayerChainInitFunc { return func(op *CoreRelayerChainInteroperators) (err error) { @@ -178,6 +192,16 @@ func (rs *CoreRelayerChainInteroperators) Get(id types.RelayID) (loop.Relayer, e defer rs.mu.Unlock() lr, exist := rs.loopRelayers[id] if !exist { + // lazily create dummy relayers + if id.Network == "dummy" { + var err error + lr, err = rs.dummyFactory.NewDummy(DummyFactoryConfig{id.ChainID}) + if err != nil { + return nil, err + } + rs.loopRelayers[id] = lr + return lr, nil + } return nil, fmt.Errorf("%w: %s", ErrNoSuchRelayer, id) } return lr, nil diff --git a/core/services/chainlink/relayer_chain_interoperators_test.go b/core/services/chainlink/relayer_chain_interoperators_test.go index c4fbd26861e..aaf458c76c8 100644 --- a/core/services/chainlink/relayer_chain_interoperators_test.go +++ b/core/services/chainlink/relayer_chain_interoperators_test.go @@ -198,6 +198,10 @@ func TestCoreRelayerChainInteroperators(t *testing.T) { expectedStarknetNodeCnt int expectedStarknetRelayerIds []types.RelayID + expectedDummyChainCnt int + expectedDummyNodeCnt int + expectedDummyRelayerIds []types.RelayID + expectedCosmosChainCnt int expectedCosmosNodeCnt int expectedCosmosRelayerIds []types.RelayID @@ -368,6 +372,8 @@ func TestCoreRelayerChainInteroperators(t *testing.T) { expectedChainCnt, expectedNodeCnt = tt.expectedSolanaChainCnt, tt.expectedSolanaNodeCnt case relay.NetworkStarkNet: expectedChainCnt, expectedNodeCnt = tt.expectedStarknetChainCnt, tt.expectedStarknetNodeCnt + case relay.NetworkDummy: + expectedChainCnt, expectedNodeCnt = tt.expectedDummyChainCnt, tt.expectedDummyNodeCnt case relay.NetworkAptos: t.Skip("aptos doesn't need a CoreRelayerChainInteroperator") diff --git a/core/services/chainlink/relayer_factory.go b/core/services/chainlink/relayer_factory.go index 528678652fa..ae222f56c61 100644 --- a/core/services/chainlink/relayer_factory.go +++ b/core/services/chainlink/relayer_factory.go @@ -26,6 +26,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/keystore" corerelay "github.com/smartcontractkit/chainlink/v2/core/services/relay" + "github.com/smartcontractkit/chainlink/v2/core/services/relay/dummy" evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/wsrpc" "github.com/smartcontractkit/chainlink/v2/plugins" @@ -39,6 +40,14 @@ type RelayerFactory struct { CapabilitiesRegistry *capabilities.Registry } +type DummyFactoryConfig struct { + ChainID string +} + +func (r *RelayerFactory) NewDummy(config DummyFactoryConfig) (loop.Relayer, error) { + return dummy.NewRelayer(r.Logger, config.ChainID), nil +} + type EVMFactoryConfig struct { legacyevm.ChainOpts evmrelay.CSAETHKeystore @@ -143,7 +152,7 @@ func (r *RelayerFactory) NewSolana(ks keystore.Solana, chainCfgs solcfg.TOMLConf return nil, fmt.Errorf("failed to create Solana LOOP command: %w", err) } - solanaRelayers[relayID] = loop.NewRelayerService(lggr, r.GRPCOpts, solCmdFn, string(cfgTOML), signer) + solanaRelayers[relayID] = loop.NewRelayerService(lggr, r.GRPCOpts, solCmdFn, string(cfgTOML), signer, r.CapabilitiesRegistry) } else { // fallback to embedded chain opts := solana.ChainOpts{ @@ -155,7 +164,7 @@ func (r *RelayerFactory) NewSolana(ks keystore.Solana, chainCfgs solcfg.TOMLConf if err != nil { return nil, err } - solanaRelayers[relayID] = relay.NewServerAdapter(solana.NewRelayer(lggr, chain), chain) + solanaRelayers[relayID] = relay.NewServerAdapter(solana.NewRelayer(lggr, chain, r.CapabilitiesRegistry), chain) } } return solanaRelayers, nil @@ -217,7 +226,7 @@ func (r *RelayerFactory) NewStarkNet(ks keystore.StarkNet, chainCfgs config.TOML } // the starknet relayer service has a delicate keystore dependency. the value that is passed to NewRelayerService must // be compatible with instantiating a starknet transaction manager KeystoreAdapter within the LOOPp executable. - starknetRelayers[relayID] = loop.NewRelayerService(lggr, r.GRPCOpts, starknetCmdFn, string(cfgTOML), loopKs) + starknetRelayers[relayID] = loop.NewRelayerService(lggr, r.GRPCOpts, starknetCmdFn, string(cfgTOML), loopKs, r.CapabilitiesRegistry) } else { // fallback to embedded chain opts := starkchain.ChainOpts{ @@ -230,7 +239,7 @@ func (r *RelayerFactory) NewStarkNet(ks keystore.StarkNet, chainCfgs config.TOML return nil, err } - starknetRelayers[relayID] = relay.NewServerAdapter(pkgstarknet.NewRelayer(lggr, chain), chain) + starknetRelayers[relayID] = relay.NewServerAdapter(pkgstarknet.NewRelayer(lggr, chain, r.CapabilitiesRegistry), chain) } } return starknetRelayers, nil diff --git a/core/services/chainlink/testdata/config-empty-effective.toml b/core/services/chainlink/testdata/config-empty-effective.toml index 7ee0143870f..1bad3fd91c6 100644 --- a/core/services/chainlink/testdata/config-empty-effective.toml +++ b/core/services/chainlink/testdata/config-empty-effective.toml @@ -222,6 +222,8 @@ Mode = 'tls' TLSCertPath = '' [Mercury] +VerboseLogging = false + [Mercury.Cache] LatestReportTTL = '1s' MaxStaleAge = '1h0m0s' diff --git a/core/services/chainlink/testdata/config-full.toml b/core/services/chainlink/testdata/config-full.toml index fd51d523576..78f52805dfe 100644 --- a/core/services/chainlink/testdata/config-full.toml +++ b/core/services/chainlink/testdata/config-full.toml @@ -232,6 +232,8 @@ env = 'dev' test = 'load' [Mercury] +VerboseLogging = true + [Mercury.Cache] LatestReportTTL = '1m40s' MaxStaleAge = '1m41s' @@ -287,6 +289,7 @@ NoNewHeadsThreshold = '1m0s' OperatorFactoryAddress = '0xa5B85635Be42F21f94F28034B7DA440EeFF0F418' RPCDefaultBatchSize = 17 RPCBlockQueryDelay = 10 +FinalizedBlockOffset = 16 [EVM.Transactions] ForwardersEnabled = true @@ -357,6 +360,8 @@ SyncThreshold = 13 LeaseDuration = '0s' NodeIsSyncingEnabled = true FinalizedBlockPollInterval = '1s' +EnforceRepeatableRead = true +DeathDeclarationDelay = '1m0s' [EVM.NodePool.Errors] NonceTooLow = '(: |^)nonce too low' diff --git a/core/services/chainlink/testdata/config-invalid.toml b/core/services/chainlink/testdata/config-invalid.toml index 68feeeb0451..ca22e68c22c 100644 --- a/core/services/chainlink/testdata/config-invalid.toml +++ b/core/services/chainlink/testdata/config-invalid.toml @@ -53,6 +53,7 @@ SendOnly = true ChainID = '1' ChainType = 'Foo' FinalityDepth = 32 +FinalizedBlockOffset = 64 [EVM.Transactions.AutoPurge] Enabled = true @@ -158,6 +159,9 @@ APIKey = 'key' [[Starknet]] +[[Aptos]] +Enabled = 1 + [OCR2] Enabled = true diff --git a/core/services/chainlink/testdata/config-multi-chain-effective.toml b/core/services/chainlink/testdata/config-multi-chain-effective.toml index 13aac2db7fa..61c5e3fa266 100644 --- a/core/services/chainlink/testdata/config-multi-chain-effective.toml +++ b/core/services/chainlink/testdata/config-multi-chain-effective.toml @@ -222,6 +222,8 @@ Mode = 'tls' TLSCertPath = '' [Mercury] +VerboseLogging = false + [Mercury.Cache] LatestReportTTL = '1s' MaxStaleAge = '1h0m0s' @@ -274,6 +276,7 @@ NoNewHeadsThreshold = '3m0s' OperatorFactoryAddress = '0x3E64Cd889482443324F91bFA9c84fE72A511f48A' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 12 [EVM.Transactions] ForwardersEnabled = false @@ -328,6 +331,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [EVM.OCR] ContractConfirmations = 4 @@ -370,6 +375,7 @@ NoNewHeadsThreshold = '3m0s' OperatorFactoryAddress = '0x8007e24251b1D2Fc518Eb843A701d9cD21fe0aA3' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [EVM.Transactions] ForwardersEnabled = false @@ -424,6 +430,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [EVM.OCR] ContractConfirmations = 4 @@ -460,6 +468,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '30s' RPCDefaultBatchSize = 100 RPCBlockQueryDelay = 10 +FinalizedBlockOffset = 0 [EVM.Transactions] ForwardersEnabled = false @@ -514,6 +523,8 @@ SyncThreshold = 10 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [EVM.OCR] ContractConfirmations = 4 diff --git a/core/services/chainlink/testdata/config-multi-chain.toml b/core/services/chainlink/testdata/config-multi-chain.toml index e45255a4373..5373e0e62d3 100644 --- a/core/services/chainlink/testdata/config-multi-chain.toml +++ b/core/services/chainlink/testdata/config-multi-chain.toml @@ -39,6 +39,7 @@ CPUProfileRate = 7 ChainID = '1' FinalityDepth = 26 FinalityTagEnabled = false +FinalizedBlockOffset = 12 [[EVM.Nodes]] Name = 'primary' diff --git a/core/services/chainlink/types.go b/core/services/chainlink/types.go index 4c7550142a2..4aa37825493 100644 --- a/core/services/chainlink/types.go +++ b/core/services/chainlink/types.go @@ -9,8 +9,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/config" ) -//go:generate mockery --quiet --name GeneralConfig --output ./mocks/ --case=underscore - type GeneralConfig interface { config.AppConfig toml.HasEVMConfigs diff --git a/core/services/cron/cron.go b/core/services/cron/cron.go index 500192554fb..9f9d2efbce8 100644 --- a/core/services/cron/cron.go +++ b/core/services/cron/cron.go @@ -32,6 +32,9 @@ func NewCronFromJobSpec( "jobID", jobSpec.ID, "schedule", jobSpec.CronSpec.CronSchedule, ) + if id := jobSpec.CronSpec.EVMChainID; id != nil { + cronLogger = logger.With("evmChainID", id) + } return &Cron{ cronRunner: cronRunner(), @@ -48,7 +51,7 @@ func (cr *Cron) Start(context.Context) error { _, err := cr.cronRunner.AddFunc(cr.jobSpec.CronSpec.CronSchedule, cr.runPipeline) if err != nil { - cr.logger.Errorw(fmt.Sprintf("Error running cron job %d", cr.jobSpec.ID), "err", err, "schedule", cr.jobSpec.CronSpec.CronSchedule, "jobID", cr.jobSpec.ID) + cr.logger.Errorw(fmt.Sprintf("Error running cron job %d", cr.jobSpec.ID), "err", err) return err } cr.cronRunner.Start() @@ -67,12 +70,17 @@ func (cr *Cron) runPipeline() { ctx, cancel := cr.chStop.NewCtx() defer cancel() + jobSpec := map[string]interface{}{ + "databaseID": cr.jobSpec.ID, + "externalJobID": cr.jobSpec.ExternalJobID, + "name": cr.jobSpec.Name.ValueOrZero(), + } + if id := cr.jobSpec.CronSpec.EVMChainID; id != nil { + jobSpec["evmChainID"] = id.String() + } + vars := pipeline.NewVarsFrom(map[string]interface{}{ - "jobSpec": map[string]interface{}{ - "databaseID": cr.jobSpec.ID, - "externalJobID": cr.jobSpec.ExternalJobID, - "name": cr.jobSpec.Name.ValueOrZero(), - }, + "jobSpec": jobSpec, "jobRun": map[string]interface{}{ "meta": map[string]interface{}{}, }, @@ -80,7 +88,7 @@ func (cr *Cron) runPipeline() { run := pipeline.NewRun(*cr.jobSpec.PipelineSpec, vars) - _, err := cr.pipelineRunner.Run(ctx, run, cr.logger, false, nil) + _, err := cr.pipelineRunner.Run(ctx, run, false, nil) if err != nil { cr.logger.Errorf("Error executing new run for jobSpec ID %v", cr.jobSpec.ID) } diff --git a/core/services/directrequest/delegate.go b/core/services/directrequest/delegate.go index 26f2c5f9c84..844bd0a12c9 100644 --- a/core/services/directrequest/delegate.go +++ b/core/services/directrequest/delegate.go @@ -375,7 +375,7 @@ func (l *listener) handleOracleRequest(ctx context.Context, request *operator_wr }, }) run := pipeline.NewRun(*l.job.PipelineSpec, vars) - _, err := l.pipelineRunner.Run(ctx, run, l.logger, true, func(tx sqlutil.DataSource) error { + _, err := l.pipelineRunner.Run(ctx, run, true, func(tx sqlutil.DataSource) error { l.markLogConsumed(ctx, tx, lb) return nil }) diff --git a/core/services/directrequest/delegate_test.go b/core/services/directrequest/delegate_test.go index e754713b010..0876031fb9a 100644 --- a/core/services/directrequest/delegate_test.go +++ b/core/services/directrequest/delegate_test.go @@ -163,11 +163,11 @@ func TestDelegate_ServicesListenerHandleLog(t *testing.T) { uni.logBroadcaster.On("MarkConsumed", mock.Anything, mock.Anything, mock.Anything).Return(nil) runBeganAwaiter := cltest.NewAwaiter() - uni.runner.On("Run", mock.Anything, mock.AnythingOfType("*pipeline.Run"), mock.Anything, mock.Anything, mock.Anything). + uni.runner.On("Run", mock.Anything, mock.AnythingOfType("*pipeline.Run"), mock.Anything, mock.Anything). Return(false, nil). Run(func(args mock.Arguments) { runBeganAwaiter.ItHappened() - fn := args.Get(4).(func(source sqlutil.DataSource) error) + fn := args.Get(3).(func(source sqlutil.DataSource) error) require.NoError(t, fn(nil)) }).Once() @@ -227,7 +227,7 @@ func TestDelegate_ServicesListenerHandleLog(t *testing.T) { uni.runner.On("Run", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything). Run(func(args mock.Arguments) { runBeganAwaiter.ItHappened() - fn := args.Get(4).(func(sqlutil.DataSource) error) + fn := args.Get(3).(func(sqlutil.DataSource) error) require.NoError(t, fn(nil)) }).Once().Return(false, nil) @@ -393,9 +393,9 @@ func TestDelegate_ServicesListenerHandleLog(t *testing.T) { uni.logBroadcaster.On("MarkConsumed", mock.Anything, mock.Anything, mock.Anything).Return(nil) runBeganAwaiter := cltest.NewAwaiter() - uni.runner.On("Run", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Run(func(args mock.Arguments) { + uni.runner.On("Run", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Run(func(args mock.Arguments) { runBeganAwaiter.ItHappened() - fn := args.Get(4).(func(sqlutil.DataSource) error) + fn := args.Get(3).(func(sqlutil.DataSource) error) require.NoError(t, fn(nil)) }).Once().Return(false, nil) @@ -492,9 +492,9 @@ func TestDelegate_ServicesListenerHandleLog(t *testing.T) { }).Return(nil) runBeganAwaiter := cltest.NewAwaiter() - uni.runner.On("Run", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Run(func(args mock.Arguments) { + uni.runner.On("Run", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Run(func(args mock.Arguments) { runBeganAwaiter.ItHappened() - fn := args.Get(4).(func(sqlutil.DataSource) error) + fn := args.Get(3).(func(sqlutil.DataSource) error) require.NoError(t, fn(nil)) }).Once().Return(false, nil) diff --git a/core/services/feeds/connection_manager.go b/core/services/feeds/connection_manager.go index d388bc0899f..ad7e1318e74 100644 --- a/core/services/feeds/connection_manager.go +++ b/core/services/feeds/connection_manager.go @@ -15,8 +15,6 @@ import ( pb "github.com/smartcontractkit/chainlink/v2/core/services/feeds/proto" ) -//go:generate mockery --quiet --name ConnectionsManager --output ./mocks/ --case=underscore - type ConnectionsManager interface { Connect(opts ConnectOpts) Disconnect(id int64) error diff --git a/core/services/feeds/mocks/connections_manager.go b/core/services/feeds/mocks/connections_manager.go index 06cb0eeb5aa..c35c2be6550 100644 --- a/core/services/feeds/mocks/connections_manager.go +++ b/core/services/feeds/mocks/connections_manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -14,16 +14,79 @@ type ConnectionsManager struct { mock.Mock } +type ConnectionsManager_Expecter struct { + mock *mock.Mock +} + +func (_m *ConnectionsManager) EXPECT() *ConnectionsManager_Expecter { + return &ConnectionsManager_Expecter{mock: &_m.Mock} +} + // Close provides a mock function with given fields: func (_m *ConnectionsManager) Close() { _m.Called() } +// ConnectionsManager_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type ConnectionsManager_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *ConnectionsManager_Expecter) Close() *ConnectionsManager_Close_Call { + return &ConnectionsManager_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *ConnectionsManager_Close_Call) Run(run func()) *ConnectionsManager_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ConnectionsManager_Close_Call) Return() *ConnectionsManager_Close_Call { + _c.Call.Return() + return _c +} + +func (_c *ConnectionsManager_Close_Call) RunAndReturn(run func()) *ConnectionsManager_Close_Call { + _c.Call.Return(run) + return _c +} + // Connect provides a mock function with given fields: opts func (_m *ConnectionsManager) Connect(opts feeds.ConnectOpts) { _m.Called(opts) } +// ConnectionsManager_Connect_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Connect' +type ConnectionsManager_Connect_Call struct { + *mock.Call +} + +// Connect is a helper method to define mock.On call +// - opts feeds.ConnectOpts +func (_e *ConnectionsManager_Expecter) Connect(opts interface{}) *ConnectionsManager_Connect_Call { + return &ConnectionsManager_Connect_Call{Call: _e.mock.On("Connect", opts)} +} + +func (_c *ConnectionsManager_Connect_Call) Run(run func(opts feeds.ConnectOpts)) *ConnectionsManager_Connect_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(feeds.ConnectOpts)) + }) + return _c +} + +func (_c *ConnectionsManager_Connect_Call) Return() *ConnectionsManager_Connect_Call { + _c.Call.Return() + return _c +} + +func (_c *ConnectionsManager_Connect_Call) RunAndReturn(run func(feeds.ConnectOpts)) *ConnectionsManager_Connect_Call { + _c.Call.Return(run) + return _c +} + // Disconnect provides a mock function with given fields: id func (_m *ConnectionsManager) Disconnect(id int64) error { ret := _m.Called(id) @@ -42,6 +105,34 @@ func (_m *ConnectionsManager) Disconnect(id int64) error { return r0 } +// ConnectionsManager_Disconnect_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Disconnect' +type ConnectionsManager_Disconnect_Call struct { + *mock.Call +} + +// Disconnect is a helper method to define mock.On call +// - id int64 +func (_e *ConnectionsManager_Expecter) Disconnect(id interface{}) *ConnectionsManager_Disconnect_Call { + return &ConnectionsManager_Disconnect_Call{Call: _e.mock.On("Disconnect", id)} +} + +func (_c *ConnectionsManager_Disconnect_Call) Run(run func(id int64)) *ConnectionsManager_Disconnect_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64)) + }) + return _c +} + +func (_c *ConnectionsManager_Disconnect_Call) Return(_a0 error) *ConnectionsManager_Disconnect_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ConnectionsManager_Disconnect_Call) RunAndReturn(run func(int64) error) *ConnectionsManager_Disconnect_Call { + _c.Call.Return(run) + return _c +} + // GetClient provides a mock function with given fields: id func (_m *ConnectionsManager) GetClient(id int64) (proto.FeedsManagerClient, error) { ret := _m.Called(id) @@ -72,6 +163,34 @@ func (_m *ConnectionsManager) GetClient(id int64) (proto.FeedsManagerClient, err return r0, r1 } +// ConnectionsManager_GetClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetClient' +type ConnectionsManager_GetClient_Call struct { + *mock.Call +} + +// GetClient is a helper method to define mock.On call +// - id int64 +func (_e *ConnectionsManager_Expecter) GetClient(id interface{}) *ConnectionsManager_GetClient_Call { + return &ConnectionsManager_GetClient_Call{Call: _e.mock.On("GetClient", id)} +} + +func (_c *ConnectionsManager_GetClient_Call) Run(run func(id int64)) *ConnectionsManager_GetClient_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64)) + }) + return _c +} + +func (_c *ConnectionsManager_GetClient_Call) Return(_a0 proto.FeedsManagerClient, _a1 error) *ConnectionsManager_GetClient_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ConnectionsManager_GetClient_Call) RunAndReturn(run func(int64) (proto.FeedsManagerClient, error)) *ConnectionsManager_GetClient_Call { + _c.Call.Return(run) + return _c +} + // IsConnected provides a mock function with given fields: id func (_m *ConnectionsManager) IsConnected(id int64) bool { ret := _m.Called(id) @@ -90,6 +209,34 @@ func (_m *ConnectionsManager) IsConnected(id int64) bool { return r0 } +// ConnectionsManager_IsConnected_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsConnected' +type ConnectionsManager_IsConnected_Call struct { + *mock.Call +} + +// IsConnected is a helper method to define mock.On call +// - id int64 +func (_e *ConnectionsManager_Expecter) IsConnected(id interface{}) *ConnectionsManager_IsConnected_Call { + return &ConnectionsManager_IsConnected_Call{Call: _e.mock.On("IsConnected", id)} +} + +func (_c *ConnectionsManager_IsConnected_Call) Run(run func(id int64)) *ConnectionsManager_IsConnected_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(int64)) + }) + return _c +} + +func (_c *ConnectionsManager_IsConnected_Call) Return(_a0 bool) *ConnectionsManager_IsConnected_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ConnectionsManager_IsConnected_Call) RunAndReturn(run func(int64) bool) *ConnectionsManager_IsConnected_Call { + _c.Call.Return(run) + return _c +} + // NewConnectionsManager creates a new instance of ConnectionsManager. 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 NewConnectionsManager(t interface { diff --git a/core/services/feeds/mocks/feeds_manager_client.go b/core/services/feeds/mocks/feeds_manager_client.go index 71c8786da3e..e140cf59bee 100644 --- a/core/services/feeds/mocks/feeds_manager_client.go +++ b/core/services/feeds/mocks/feeds_manager_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -14,6 +14,14 @@ type FeedsManagerClient struct { mock.Mock } +type FeedsManagerClient_Expecter struct { + mock *mock.Mock +} + +func (_m *FeedsManagerClient) EXPECT() *FeedsManagerClient_Expecter { + return &FeedsManagerClient_Expecter{mock: &_m.Mock} +} + // ApprovedJob provides a mock function with given fields: ctx, in func (_m *FeedsManagerClient) ApprovedJob(ctx context.Context, in *proto.ApprovedJobRequest) (*proto.ApprovedJobResponse, error) { ret := _m.Called(ctx, in) @@ -44,6 +52,35 @@ func (_m *FeedsManagerClient) ApprovedJob(ctx context.Context, in *proto.Approve return r0, r1 } +// FeedsManagerClient_ApprovedJob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApprovedJob' +type FeedsManagerClient_ApprovedJob_Call struct { + *mock.Call +} + +// ApprovedJob is a helper method to define mock.On call +// - ctx context.Context +// - in *proto.ApprovedJobRequest +func (_e *FeedsManagerClient_Expecter) ApprovedJob(ctx interface{}, in interface{}) *FeedsManagerClient_ApprovedJob_Call { + return &FeedsManagerClient_ApprovedJob_Call{Call: _e.mock.On("ApprovedJob", ctx, in)} +} + +func (_c *FeedsManagerClient_ApprovedJob_Call) Run(run func(ctx context.Context, in *proto.ApprovedJobRequest)) *FeedsManagerClient_ApprovedJob_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*proto.ApprovedJobRequest)) + }) + return _c +} + +func (_c *FeedsManagerClient_ApprovedJob_Call) Return(_a0 *proto.ApprovedJobResponse, _a1 error) *FeedsManagerClient_ApprovedJob_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FeedsManagerClient_ApprovedJob_Call) RunAndReturn(run func(context.Context, *proto.ApprovedJobRequest) (*proto.ApprovedJobResponse, error)) *FeedsManagerClient_ApprovedJob_Call { + _c.Call.Return(run) + return _c +} + // CancelledJob provides a mock function with given fields: ctx, in func (_m *FeedsManagerClient) CancelledJob(ctx context.Context, in *proto.CancelledJobRequest) (*proto.CancelledJobResponse, error) { ret := _m.Called(ctx, in) @@ -74,6 +111,35 @@ func (_m *FeedsManagerClient) CancelledJob(ctx context.Context, in *proto.Cancel return r0, r1 } +// FeedsManagerClient_CancelledJob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CancelledJob' +type FeedsManagerClient_CancelledJob_Call struct { + *mock.Call +} + +// CancelledJob is a helper method to define mock.On call +// - ctx context.Context +// - in *proto.CancelledJobRequest +func (_e *FeedsManagerClient_Expecter) CancelledJob(ctx interface{}, in interface{}) *FeedsManagerClient_CancelledJob_Call { + return &FeedsManagerClient_CancelledJob_Call{Call: _e.mock.On("CancelledJob", ctx, in)} +} + +func (_c *FeedsManagerClient_CancelledJob_Call) Run(run func(ctx context.Context, in *proto.CancelledJobRequest)) *FeedsManagerClient_CancelledJob_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*proto.CancelledJobRequest)) + }) + return _c +} + +func (_c *FeedsManagerClient_CancelledJob_Call) Return(_a0 *proto.CancelledJobResponse, _a1 error) *FeedsManagerClient_CancelledJob_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FeedsManagerClient_CancelledJob_Call) RunAndReturn(run func(context.Context, *proto.CancelledJobRequest) (*proto.CancelledJobResponse, error)) *FeedsManagerClient_CancelledJob_Call { + _c.Call.Return(run) + return _c +} + // Healthcheck provides a mock function with given fields: ctx, in func (_m *FeedsManagerClient) Healthcheck(ctx context.Context, in *proto.HealthcheckRequest) (*proto.HealthcheckResponse, error) { ret := _m.Called(ctx, in) @@ -104,6 +170,35 @@ func (_m *FeedsManagerClient) Healthcheck(ctx context.Context, in *proto.Healthc return r0, r1 } +// FeedsManagerClient_Healthcheck_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Healthcheck' +type FeedsManagerClient_Healthcheck_Call struct { + *mock.Call +} + +// Healthcheck is a helper method to define mock.On call +// - ctx context.Context +// - in *proto.HealthcheckRequest +func (_e *FeedsManagerClient_Expecter) Healthcheck(ctx interface{}, in interface{}) *FeedsManagerClient_Healthcheck_Call { + return &FeedsManagerClient_Healthcheck_Call{Call: _e.mock.On("Healthcheck", ctx, in)} +} + +func (_c *FeedsManagerClient_Healthcheck_Call) Run(run func(ctx context.Context, in *proto.HealthcheckRequest)) *FeedsManagerClient_Healthcheck_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*proto.HealthcheckRequest)) + }) + return _c +} + +func (_c *FeedsManagerClient_Healthcheck_Call) Return(_a0 *proto.HealthcheckResponse, _a1 error) *FeedsManagerClient_Healthcheck_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FeedsManagerClient_Healthcheck_Call) RunAndReturn(run func(context.Context, *proto.HealthcheckRequest) (*proto.HealthcheckResponse, error)) *FeedsManagerClient_Healthcheck_Call { + _c.Call.Return(run) + return _c +} + // RejectedJob provides a mock function with given fields: ctx, in func (_m *FeedsManagerClient) RejectedJob(ctx context.Context, in *proto.RejectedJobRequest) (*proto.RejectedJobResponse, error) { ret := _m.Called(ctx, in) @@ -134,6 +229,35 @@ func (_m *FeedsManagerClient) RejectedJob(ctx context.Context, in *proto.Rejecte return r0, r1 } +// FeedsManagerClient_RejectedJob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RejectedJob' +type FeedsManagerClient_RejectedJob_Call struct { + *mock.Call +} + +// RejectedJob is a helper method to define mock.On call +// - ctx context.Context +// - in *proto.RejectedJobRequest +func (_e *FeedsManagerClient_Expecter) RejectedJob(ctx interface{}, in interface{}) *FeedsManagerClient_RejectedJob_Call { + return &FeedsManagerClient_RejectedJob_Call{Call: _e.mock.On("RejectedJob", ctx, in)} +} + +func (_c *FeedsManagerClient_RejectedJob_Call) Run(run func(ctx context.Context, in *proto.RejectedJobRequest)) *FeedsManagerClient_RejectedJob_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*proto.RejectedJobRequest)) + }) + return _c +} + +func (_c *FeedsManagerClient_RejectedJob_Call) Return(_a0 *proto.RejectedJobResponse, _a1 error) *FeedsManagerClient_RejectedJob_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FeedsManagerClient_RejectedJob_Call) RunAndReturn(run func(context.Context, *proto.RejectedJobRequest) (*proto.RejectedJobResponse, error)) *FeedsManagerClient_RejectedJob_Call { + _c.Call.Return(run) + return _c +} + // UpdateNode provides a mock function with given fields: ctx, in func (_m *FeedsManagerClient) UpdateNode(ctx context.Context, in *proto.UpdateNodeRequest) (*proto.UpdateNodeResponse, error) { ret := _m.Called(ctx, in) @@ -164,6 +288,35 @@ func (_m *FeedsManagerClient) UpdateNode(ctx context.Context, in *proto.UpdateNo return r0, r1 } +// FeedsManagerClient_UpdateNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateNode' +type FeedsManagerClient_UpdateNode_Call struct { + *mock.Call +} + +// UpdateNode is a helper method to define mock.On call +// - ctx context.Context +// - in *proto.UpdateNodeRequest +func (_e *FeedsManagerClient_Expecter) UpdateNode(ctx interface{}, in interface{}) *FeedsManagerClient_UpdateNode_Call { + return &FeedsManagerClient_UpdateNode_Call{Call: _e.mock.On("UpdateNode", ctx, in)} +} + +func (_c *FeedsManagerClient_UpdateNode_Call) Run(run func(ctx context.Context, in *proto.UpdateNodeRequest)) *FeedsManagerClient_UpdateNode_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*proto.UpdateNodeRequest)) + }) + return _c +} + +func (_c *FeedsManagerClient_UpdateNode_Call) Return(_a0 *proto.UpdateNodeResponse, _a1 error) *FeedsManagerClient_UpdateNode_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *FeedsManagerClient_UpdateNode_Call) RunAndReturn(run func(context.Context, *proto.UpdateNodeRequest) (*proto.UpdateNodeResponse, error)) *FeedsManagerClient_UpdateNode_Call { + _c.Call.Return(run) + return _c +} + // NewFeedsManagerClient creates a new instance of FeedsManagerClient. 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 NewFeedsManagerClient(t interface { diff --git a/core/services/feeds/mocks/orm.go b/core/services/feeds/mocks/orm.go index 625a0b41d9a..3fce89eb60a 100644 --- a/core/services/feeds/mocks/orm.go +++ b/core/services/feeds/mocks/orm.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks diff --git a/core/services/feeds/mocks/service.go b/core/services/feeds/mocks/service.go index 1e2e6393276..a660420759e 100644 --- a/core/services/feeds/mocks/service.go +++ b/core/services/feeds/mocks/service.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -14,6 +14,14 @@ type Service struct { mock.Mock } +type Service_Expecter struct { + mock *mock.Mock +} + +func (_m *Service) EXPECT() *Service_Expecter { + return &Service_Expecter{mock: &_m.Mock} +} + // ApproveSpec provides a mock function with given fields: ctx, id, force func (_m *Service) ApproveSpec(ctx context.Context, id int64, force bool) error { ret := _m.Called(ctx, id, force) @@ -32,6 +40,36 @@ func (_m *Service) ApproveSpec(ctx context.Context, id int64, force bool) error return r0 } +// Service_ApproveSpec_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApproveSpec' +type Service_ApproveSpec_Call struct { + *mock.Call +} + +// ApproveSpec is a helper method to define mock.On call +// - ctx context.Context +// - id int64 +// - force bool +func (_e *Service_Expecter) ApproveSpec(ctx interface{}, id interface{}, force interface{}) *Service_ApproveSpec_Call { + return &Service_ApproveSpec_Call{Call: _e.mock.On("ApproveSpec", ctx, id, force)} +} + +func (_c *Service_ApproveSpec_Call) Run(run func(ctx context.Context, id int64, force bool)) *Service_ApproveSpec_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64), args[2].(bool)) + }) + return _c +} + +func (_c *Service_ApproveSpec_Call) Return(_a0 error) *Service_ApproveSpec_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Service_ApproveSpec_Call) RunAndReturn(run func(context.Context, int64, bool) error) *Service_ApproveSpec_Call { + _c.Call.Return(run) + return _c +} + // CancelSpec provides a mock function with given fields: ctx, id func (_m *Service) CancelSpec(ctx context.Context, id int64) error { ret := _m.Called(ctx, id) @@ -50,6 +88,35 @@ func (_m *Service) CancelSpec(ctx context.Context, id int64) error { return r0 } +// Service_CancelSpec_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CancelSpec' +type Service_CancelSpec_Call struct { + *mock.Call +} + +// CancelSpec is a helper method to define mock.On call +// - ctx context.Context +// - id int64 +func (_e *Service_Expecter) CancelSpec(ctx interface{}, id interface{}) *Service_CancelSpec_Call { + return &Service_CancelSpec_Call{Call: _e.mock.On("CancelSpec", ctx, id)} +} + +func (_c *Service_CancelSpec_Call) Run(run func(ctx context.Context, id int64)) *Service_CancelSpec_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64)) + }) + return _c +} + +func (_c *Service_CancelSpec_Call) Return(_a0 error) *Service_CancelSpec_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Service_CancelSpec_Call) RunAndReturn(run func(context.Context, int64) error) *Service_CancelSpec_Call { + _c.Call.Return(run) + return _c +} + // Close provides a mock function with given fields: func (_m *Service) Close() error { ret := _m.Called() @@ -68,6 +135,33 @@ func (_m *Service) Close() error { return r0 } +// Service_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type Service_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *Service_Expecter) Close() *Service_Close_Call { + return &Service_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *Service_Close_Call) Run(run func()) *Service_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Service_Close_Call) Return(_a0 error) *Service_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Service_Close_Call) RunAndReturn(run func() error) *Service_Close_Call { + _c.Call.Return(run) + return _c +} + // CountJobProposalsByStatus provides a mock function with given fields: ctx func (_m *Service) CountJobProposalsByStatus(ctx context.Context) (*feeds.JobProposalCounts, error) { ret := _m.Called(ctx) @@ -98,6 +192,34 @@ func (_m *Service) CountJobProposalsByStatus(ctx context.Context) (*feeds.JobPro return r0, r1 } +// Service_CountJobProposalsByStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CountJobProposalsByStatus' +type Service_CountJobProposalsByStatus_Call struct { + *mock.Call +} + +// CountJobProposalsByStatus is a helper method to define mock.On call +// - ctx context.Context +func (_e *Service_Expecter) CountJobProposalsByStatus(ctx interface{}) *Service_CountJobProposalsByStatus_Call { + return &Service_CountJobProposalsByStatus_Call{Call: _e.mock.On("CountJobProposalsByStatus", ctx)} +} + +func (_c *Service_CountJobProposalsByStatus_Call) Run(run func(ctx context.Context)) *Service_CountJobProposalsByStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Service_CountJobProposalsByStatus_Call) Return(_a0 *feeds.JobProposalCounts, _a1 error) *Service_CountJobProposalsByStatus_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Service_CountJobProposalsByStatus_Call) RunAndReturn(run func(context.Context) (*feeds.JobProposalCounts, error)) *Service_CountJobProposalsByStatus_Call { + _c.Call.Return(run) + return _c +} + // CountManagers provides a mock function with given fields: ctx func (_m *Service) CountManagers(ctx context.Context) (int64, error) { ret := _m.Called(ctx) @@ -126,6 +248,34 @@ func (_m *Service) CountManagers(ctx context.Context) (int64, error) { return r0, r1 } +// Service_CountManagers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CountManagers' +type Service_CountManagers_Call struct { + *mock.Call +} + +// CountManagers is a helper method to define mock.On call +// - ctx context.Context +func (_e *Service_Expecter) CountManagers(ctx interface{}) *Service_CountManagers_Call { + return &Service_CountManagers_Call{Call: _e.mock.On("CountManagers", ctx)} +} + +func (_c *Service_CountManagers_Call) Run(run func(ctx context.Context)) *Service_CountManagers_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Service_CountManagers_Call) Return(_a0 int64, _a1 error) *Service_CountManagers_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Service_CountManagers_Call) RunAndReturn(run func(context.Context) (int64, error)) *Service_CountManagers_Call { + _c.Call.Return(run) + return _c +} + // CreateChainConfig provides a mock function with given fields: ctx, cfg func (_m *Service) CreateChainConfig(ctx context.Context, cfg feeds.ChainConfig) (int64, error) { ret := _m.Called(ctx, cfg) @@ -154,6 +304,35 @@ func (_m *Service) CreateChainConfig(ctx context.Context, cfg feeds.ChainConfig) return r0, r1 } +// Service_CreateChainConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateChainConfig' +type Service_CreateChainConfig_Call struct { + *mock.Call +} + +// CreateChainConfig is a helper method to define mock.On call +// - ctx context.Context +// - cfg feeds.ChainConfig +func (_e *Service_Expecter) CreateChainConfig(ctx interface{}, cfg interface{}) *Service_CreateChainConfig_Call { + return &Service_CreateChainConfig_Call{Call: _e.mock.On("CreateChainConfig", ctx, cfg)} +} + +func (_c *Service_CreateChainConfig_Call) Run(run func(ctx context.Context, cfg feeds.ChainConfig)) *Service_CreateChainConfig_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(feeds.ChainConfig)) + }) + return _c +} + +func (_c *Service_CreateChainConfig_Call) Return(_a0 int64, _a1 error) *Service_CreateChainConfig_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Service_CreateChainConfig_Call) RunAndReturn(run func(context.Context, feeds.ChainConfig) (int64, error)) *Service_CreateChainConfig_Call { + _c.Call.Return(run) + return _c +} + // DeleteChainConfig provides a mock function with given fields: ctx, id func (_m *Service) DeleteChainConfig(ctx context.Context, id int64) (int64, error) { ret := _m.Called(ctx, id) @@ -182,6 +361,35 @@ func (_m *Service) DeleteChainConfig(ctx context.Context, id int64) (int64, erro return r0, r1 } +// Service_DeleteChainConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteChainConfig' +type Service_DeleteChainConfig_Call struct { + *mock.Call +} + +// DeleteChainConfig is a helper method to define mock.On call +// - ctx context.Context +// - id int64 +func (_e *Service_Expecter) DeleteChainConfig(ctx interface{}, id interface{}) *Service_DeleteChainConfig_Call { + return &Service_DeleteChainConfig_Call{Call: _e.mock.On("DeleteChainConfig", ctx, id)} +} + +func (_c *Service_DeleteChainConfig_Call) Run(run func(ctx context.Context, id int64)) *Service_DeleteChainConfig_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64)) + }) + return _c +} + +func (_c *Service_DeleteChainConfig_Call) Return(_a0 int64, _a1 error) *Service_DeleteChainConfig_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Service_DeleteChainConfig_Call) RunAndReturn(run func(context.Context, int64) (int64, error)) *Service_DeleteChainConfig_Call { + _c.Call.Return(run) + return _c +} + // DeleteJob provides a mock function with given fields: ctx, args func (_m *Service) DeleteJob(ctx context.Context, args *feeds.DeleteJobArgs) (int64, error) { ret := _m.Called(ctx, args) @@ -210,6 +418,35 @@ func (_m *Service) DeleteJob(ctx context.Context, args *feeds.DeleteJobArgs) (in return r0, r1 } +// Service_DeleteJob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteJob' +type Service_DeleteJob_Call struct { + *mock.Call +} + +// DeleteJob is a helper method to define mock.On call +// - ctx context.Context +// - args *feeds.DeleteJobArgs +func (_e *Service_Expecter) DeleteJob(ctx interface{}, args interface{}) *Service_DeleteJob_Call { + return &Service_DeleteJob_Call{Call: _e.mock.On("DeleteJob", ctx, args)} +} + +func (_c *Service_DeleteJob_Call) Run(run func(ctx context.Context, args *feeds.DeleteJobArgs)) *Service_DeleteJob_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*feeds.DeleteJobArgs)) + }) + return _c +} + +func (_c *Service_DeleteJob_Call) Return(_a0 int64, _a1 error) *Service_DeleteJob_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Service_DeleteJob_Call) RunAndReturn(run func(context.Context, *feeds.DeleteJobArgs) (int64, error)) *Service_DeleteJob_Call { + _c.Call.Return(run) + return _c +} + // GetChainConfig provides a mock function with given fields: ctx, id func (_m *Service) GetChainConfig(ctx context.Context, id int64) (*feeds.ChainConfig, error) { ret := _m.Called(ctx, id) @@ -240,6 +477,35 @@ func (_m *Service) GetChainConfig(ctx context.Context, id int64) (*feeds.ChainCo return r0, r1 } +// Service_GetChainConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetChainConfig' +type Service_GetChainConfig_Call struct { + *mock.Call +} + +// GetChainConfig is a helper method to define mock.On call +// - ctx context.Context +// - id int64 +func (_e *Service_Expecter) GetChainConfig(ctx interface{}, id interface{}) *Service_GetChainConfig_Call { + return &Service_GetChainConfig_Call{Call: _e.mock.On("GetChainConfig", ctx, id)} +} + +func (_c *Service_GetChainConfig_Call) Run(run func(ctx context.Context, id int64)) *Service_GetChainConfig_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64)) + }) + return _c +} + +func (_c *Service_GetChainConfig_Call) Return(_a0 *feeds.ChainConfig, _a1 error) *Service_GetChainConfig_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Service_GetChainConfig_Call) RunAndReturn(run func(context.Context, int64) (*feeds.ChainConfig, error)) *Service_GetChainConfig_Call { + _c.Call.Return(run) + return _c +} + // GetJobProposal provides a mock function with given fields: ctx, id func (_m *Service) GetJobProposal(ctx context.Context, id int64) (*feeds.JobProposal, error) { ret := _m.Called(ctx, id) @@ -270,6 +536,35 @@ func (_m *Service) GetJobProposal(ctx context.Context, id int64) (*feeds.JobProp return r0, r1 } +// Service_GetJobProposal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetJobProposal' +type Service_GetJobProposal_Call struct { + *mock.Call +} + +// GetJobProposal is a helper method to define mock.On call +// - ctx context.Context +// - id int64 +func (_e *Service_Expecter) GetJobProposal(ctx interface{}, id interface{}) *Service_GetJobProposal_Call { + return &Service_GetJobProposal_Call{Call: _e.mock.On("GetJobProposal", ctx, id)} +} + +func (_c *Service_GetJobProposal_Call) Run(run func(ctx context.Context, id int64)) *Service_GetJobProposal_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64)) + }) + return _c +} + +func (_c *Service_GetJobProposal_Call) Return(_a0 *feeds.JobProposal, _a1 error) *Service_GetJobProposal_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Service_GetJobProposal_Call) RunAndReturn(run func(context.Context, int64) (*feeds.JobProposal, error)) *Service_GetJobProposal_Call { + _c.Call.Return(run) + return _c +} + // GetManager provides a mock function with given fields: ctx, id func (_m *Service) GetManager(ctx context.Context, id int64) (*feeds.FeedsManager, error) { ret := _m.Called(ctx, id) @@ -300,6 +595,35 @@ func (_m *Service) GetManager(ctx context.Context, id int64) (*feeds.FeedsManage return r0, r1 } +// Service_GetManager_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetManager' +type Service_GetManager_Call struct { + *mock.Call +} + +// GetManager is a helper method to define mock.On call +// - ctx context.Context +// - id int64 +func (_e *Service_Expecter) GetManager(ctx interface{}, id interface{}) *Service_GetManager_Call { + return &Service_GetManager_Call{Call: _e.mock.On("GetManager", ctx, id)} +} + +func (_c *Service_GetManager_Call) Run(run func(ctx context.Context, id int64)) *Service_GetManager_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64)) + }) + return _c +} + +func (_c *Service_GetManager_Call) Return(_a0 *feeds.FeedsManager, _a1 error) *Service_GetManager_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Service_GetManager_Call) RunAndReturn(run func(context.Context, int64) (*feeds.FeedsManager, error)) *Service_GetManager_Call { + _c.Call.Return(run) + return _c +} + // GetSpec provides a mock function with given fields: ctx, id func (_m *Service) GetSpec(ctx context.Context, id int64) (*feeds.JobProposalSpec, error) { ret := _m.Called(ctx, id) @@ -330,6 +654,35 @@ func (_m *Service) GetSpec(ctx context.Context, id int64) (*feeds.JobProposalSpe return r0, r1 } +// Service_GetSpec_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSpec' +type Service_GetSpec_Call struct { + *mock.Call +} + +// GetSpec is a helper method to define mock.On call +// - ctx context.Context +// - id int64 +func (_e *Service_Expecter) GetSpec(ctx interface{}, id interface{}) *Service_GetSpec_Call { + return &Service_GetSpec_Call{Call: _e.mock.On("GetSpec", ctx, id)} +} + +func (_c *Service_GetSpec_Call) Run(run func(ctx context.Context, id int64)) *Service_GetSpec_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64)) + }) + return _c +} + +func (_c *Service_GetSpec_Call) Return(_a0 *feeds.JobProposalSpec, _a1 error) *Service_GetSpec_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Service_GetSpec_Call) RunAndReturn(run func(context.Context, int64) (*feeds.JobProposalSpec, error)) *Service_GetSpec_Call { + _c.Call.Return(run) + return _c +} + // IsJobManaged provides a mock function with given fields: ctx, jobID func (_m *Service) IsJobManaged(ctx context.Context, jobID int64) (bool, error) { ret := _m.Called(ctx, jobID) @@ -358,6 +711,35 @@ func (_m *Service) IsJobManaged(ctx context.Context, jobID int64) (bool, error) return r0, r1 } +// Service_IsJobManaged_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsJobManaged' +type Service_IsJobManaged_Call struct { + *mock.Call +} + +// IsJobManaged is a helper method to define mock.On call +// - ctx context.Context +// - jobID int64 +func (_e *Service_Expecter) IsJobManaged(ctx interface{}, jobID interface{}) *Service_IsJobManaged_Call { + return &Service_IsJobManaged_Call{Call: _e.mock.On("IsJobManaged", ctx, jobID)} +} + +func (_c *Service_IsJobManaged_Call) Run(run func(ctx context.Context, jobID int64)) *Service_IsJobManaged_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64)) + }) + return _c +} + +func (_c *Service_IsJobManaged_Call) Return(_a0 bool, _a1 error) *Service_IsJobManaged_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Service_IsJobManaged_Call) RunAndReturn(run func(context.Context, int64) (bool, error)) *Service_IsJobManaged_Call { + _c.Call.Return(run) + return _c +} + // ListChainConfigsByManagerIDs provides a mock function with given fields: ctx, mgrIDs func (_m *Service) ListChainConfigsByManagerIDs(ctx context.Context, mgrIDs []int64) ([]feeds.ChainConfig, error) { ret := _m.Called(ctx, mgrIDs) @@ -388,6 +770,35 @@ func (_m *Service) ListChainConfigsByManagerIDs(ctx context.Context, mgrIDs []in return r0, r1 } +// Service_ListChainConfigsByManagerIDs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListChainConfigsByManagerIDs' +type Service_ListChainConfigsByManagerIDs_Call struct { + *mock.Call +} + +// ListChainConfigsByManagerIDs is a helper method to define mock.On call +// - ctx context.Context +// - mgrIDs []int64 +func (_e *Service_Expecter) ListChainConfigsByManagerIDs(ctx interface{}, mgrIDs interface{}) *Service_ListChainConfigsByManagerIDs_Call { + return &Service_ListChainConfigsByManagerIDs_Call{Call: _e.mock.On("ListChainConfigsByManagerIDs", ctx, mgrIDs)} +} + +func (_c *Service_ListChainConfigsByManagerIDs_Call) Run(run func(ctx context.Context, mgrIDs []int64)) *Service_ListChainConfigsByManagerIDs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]int64)) + }) + return _c +} + +func (_c *Service_ListChainConfigsByManagerIDs_Call) Return(_a0 []feeds.ChainConfig, _a1 error) *Service_ListChainConfigsByManagerIDs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Service_ListChainConfigsByManagerIDs_Call) RunAndReturn(run func(context.Context, []int64) ([]feeds.ChainConfig, error)) *Service_ListChainConfigsByManagerIDs_Call { + _c.Call.Return(run) + return _c +} + // ListJobProposals provides a mock function with given fields: ctx func (_m *Service) ListJobProposals(ctx context.Context) ([]feeds.JobProposal, error) { ret := _m.Called(ctx) @@ -418,6 +829,34 @@ func (_m *Service) ListJobProposals(ctx context.Context) ([]feeds.JobProposal, e return r0, r1 } +// Service_ListJobProposals_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListJobProposals' +type Service_ListJobProposals_Call struct { + *mock.Call +} + +// ListJobProposals is a helper method to define mock.On call +// - ctx context.Context +func (_e *Service_Expecter) ListJobProposals(ctx interface{}) *Service_ListJobProposals_Call { + return &Service_ListJobProposals_Call{Call: _e.mock.On("ListJobProposals", ctx)} +} + +func (_c *Service_ListJobProposals_Call) Run(run func(ctx context.Context)) *Service_ListJobProposals_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Service_ListJobProposals_Call) Return(_a0 []feeds.JobProposal, _a1 error) *Service_ListJobProposals_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Service_ListJobProposals_Call) RunAndReturn(run func(context.Context) ([]feeds.JobProposal, error)) *Service_ListJobProposals_Call { + _c.Call.Return(run) + return _c +} + // ListJobProposalsByManagersIDs provides a mock function with given fields: ctx, ids func (_m *Service) ListJobProposalsByManagersIDs(ctx context.Context, ids []int64) ([]feeds.JobProposal, error) { ret := _m.Called(ctx, ids) @@ -448,6 +887,35 @@ func (_m *Service) ListJobProposalsByManagersIDs(ctx context.Context, ids []int6 return r0, r1 } +// Service_ListJobProposalsByManagersIDs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListJobProposalsByManagersIDs' +type Service_ListJobProposalsByManagersIDs_Call struct { + *mock.Call +} + +// ListJobProposalsByManagersIDs is a helper method to define mock.On call +// - ctx context.Context +// - ids []int64 +func (_e *Service_Expecter) ListJobProposalsByManagersIDs(ctx interface{}, ids interface{}) *Service_ListJobProposalsByManagersIDs_Call { + return &Service_ListJobProposalsByManagersIDs_Call{Call: _e.mock.On("ListJobProposalsByManagersIDs", ctx, ids)} +} + +func (_c *Service_ListJobProposalsByManagersIDs_Call) Run(run func(ctx context.Context, ids []int64)) *Service_ListJobProposalsByManagersIDs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]int64)) + }) + return _c +} + +func (_c *Service_ListJobProposalsByManagersIDs_Call) Return(_a0 []feeds.JobProposal, _a1 error) *Service_ListJobProposalsByManagersIDs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Service_ListJobProposalsByManagersIDs_Call) RunAndReturn(run func(context.Context, []int64) ([]feeds.JobProposal, error)) *Service_ListJobProposalsByManagersIDs_Call { + _c.Call.Return(run) + return _c +} + // ListManagers provides a mock function with given fields: ctx func (_m *Service) ListManagers(ctx context.Context) ([]feeds.FeedsManager, error) { ret := _m.Called(ctx) @@ -478,6 +946,34 @@ func (_m *Service) ListManagers(ctx context.Context) ([]feeds.FeedsManager, erro return r0, r1 } +// Service_ListManagers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListManagers' +type Service_ListManagers_Call struct { + *mock.Call +} + +// ListManagers is a helper method to define mock.On call +// - ctx context.Context +func (_e *Service_Expecter) ListManagers(ctx interface{}) *Service_ListManagers_Call { + return &Service_ListManagers_Call{Call: _e.mock.On("ListManagers", ctx)} +} + +func (_c *Service_ListManagers_Call) Run(run func(ctx context.Context)) *Service_ListManagers_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Service_ListManagers_Call) Return(_a0 []feeds.FeedsManager, _a1 error) *Service_ListManagers_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Service_ListManagers_Call) RunAndReturn(run func(context.Context) ([]feeds.FeedsManager, error)) *Service_ListManagers_Call { + _c.Call.Return(run) + return _c +} + // ListManagersByIDs provides a mock function with given fields: ctx, ids func (_m *Service) ListManagersByIDs(ctx context.Context, ids []int64) ([]feeds.FeedsManager, error) { ret := _m.Called(ctx, ids) @@ -508,6 +1004,35 @@ func (_m *Service) ListManagersByIDs(ctx context.Context, ids []int64) ([]feeds. return r0, r1 } +// Service_ListManagersByIDs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListManagersByIDs' +type Service_ListManagersByIDs_Call struct { + *mock.Call +} + +// ListManagersByIDs is a helper method to define mock.On call +// - ctx context.Context +// - ids []int64 +func (_e *Service_Expecter) ListManagersByIDs(ctx interface{}, ids interface{}) *Service_ListManagersByIDs_Call { + return &Service_ListManagersByIDs_Call{Call: _e.mock.On("ListManagersByIDs", ctx, ids)} +} + +func (_c *Service_ListManagersByIDs_Call) Run(run func(ctx context.Context, ids []int64)) *Service_ListManagersByIDs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]int64)) + }) + return _c +} + +func (_c *Service_ListManagersByIDs_Call) Return(_a0 []feeds.FeedsManager, _a1 error) *Service_ListManagersByIDs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Service_ListManagersByIDs_Call) RunAndReturn(run func(context.Context, []int64) ([]feeds.FeedsManager, error)) *Service_ListManagersByIDs_Call { + _c.Call.Return(run) + return _c +} + // ListSpecsByJobProposalIDs provides a mock function with given fields: ctx, ids func (_m *Service) ListSpecsByJobProposalIDs(ctx context.Context, ids []int64) ([]feeds.JobProposalSpec, error) { ret := _m.Called(ctx, ids) @@ -538,6 +1063,35 @@ func (_m *Service) ListSpecsByJobProposalIDs(ctx context.Context, ids []int64) ( return r0, r1 } +// Service_ListSpecsByJobProposalIDs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListSpecsByJobProposalIDs' +type Service_ListSpecsByJobProposalIDs_Call struct { + *mock.Call +} + +// ListSpecsByJobProposalIDs is a helper method to define mock.On call +// - ctx context.Context +// - ids []int64 +func (_e *Service_Expecter) ListSpecsByJobProposalIDs(ctx interface{}, ids interface{}) *Service_ListSpecsByJobProposalIDs_Call { + return &Service_ListSpecsByJobProposalIDs_Call{Call: _e.mock.On("ListSpecsByJobProposalIDs", ctx, ids)} +} + +func (_c *Service_ListSpecsByJobProposalIDs_Call) Run(run func(ctx context.Context, ids []int64)) *Service_ListSpecsByJobProposalIDs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]int64)) + }) + return _c +} + +func (_c *Service_ListSpecsByJobProposalIDs_Call) Return(_a0 []feeds.JobProposalSpec, _a1 error) *Service_ListSpecsByJobProposalIDs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Service_ListSpecsByJobProposalIDs_Call) RunAndReturn(run func(context.Context, []int64) ([]feeds.JobProposalSpec, error)) *Service_ListSpecsByJobProposalIDs_Call { + _c.Call.Return(run) + return _c +} + // ProposeJob provides a mock function with given fields: ctx, args func (_m *Service) ProposeJob(ctx context.Context, args *feeds.ProposeJobArgs) (int64, error) { ret := _m.Called(ctx, args) @@ -566,6 +1120,35 @@ func (_m *Service) ProposeJob(ctx context.Context, args *feeds.ProposeJobArgs) ( return r0, r1 } +// Service_ProposeJob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProposeJob' +type Service_ProposeJob_Call struct { + *mock.Call +} + +// ProposeJob is a helper method to define mock.On call +// - ctx context.Context +// - args *feeds.ProposeJobArgs +func (_e *Service_Expecter) ProposeJob(ctx interface{}, args interface{}) *Service_ProposeJob_Call { + return &Service_ProposeJob_Call{Call: _e.mock.On("ProposeJob", ctx, args)} +} + +func (_c *Service_ProposeJob_Call) Run(run func(ctx context.Context, args *feeds.ProposeJobArgs)) *Service_ProposeJob_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*feeds.ProposeJobArgs)) + }) + return _c +} + +func (_c *Service_ProposeJob_Call) Return(_a0 int64, _a1 error) *Service_ProposeJob_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Service_ProposeJob_Call) RunAndReturn(run func(context.Context, *feeds.ProposeJobArgs) (int64, error)) *Service_ProposeJob_Call { + _c.Call.Return(run) + return _c +} + // RegisterManager provides a mock function with given fields: ctx, params func (_m *Service) RegisterManager(ctx context.Context, params feeds.RegisterManagerParams) (int64, error) { ret := _m.Called(ctx, params) @@ -594,6 +1177,35 @@ func (_m *Service) RegisterManager(ctx context.Context, params feeds.RegisterMan return r0, r1 } +// Service_RegisterManager_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterManager' +type Service_RegisterManager_Call struct { + *mock.Call +} + +// RegisterManager is a helper method to define mock.On call +// - ctx context.Context +// - params feeds.RegisterManagerParams +func (_e *Service_Expecter) RegisterManager(ctx interface{}, params interface{}) *Service_RegisterManager_Call { + return &Service_RegisterManager_Call{Call: _e.mock.On("RegisterManager", ctx, params)} +} + +func (_c *Service_RegisterManager_Call) Run(run func(ctx context.Context, params feeds.RegisterManagerParams)) *Service_RegisterManager_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(feeds.RegisterManagerParams)) + }) + return _c +} + +func (_c *Service_RegisterManager_Call) Return(_a0 int64, _a1 error) *Service_RegisterManager_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Service_RegisterManager_Call) RunAndReturn(run func(context.Context, feeds.RegisterManagerParams) (int64, error)) *Service_RegisterManager_Call { + _c.Call.Return(run) + return _c +} + // RejectSpec provides a mock function with given fields: ctx, id func (_m *Service) RejectSpec(ctx context.Context, id int64) error { ret := _m.Called(ctx, id) @@ -612,6 +1224,35 @@ func (_m *Service) RejectSpec(ctx context.Context, id int64) error { return r0 } +// Service_RejectSpec_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RejectSpec' +type Service_RejectSpec_Call struct { + *mock.Call +} + +// RejectSpec is a helper method to define mock.On call +// - ctx context.Context +// - id int64 +func (_e *Service_Expecter) RejectSpec(ctx interface{}, id interface{}) *Service_RejectSpec_Call { + return &Service_RejectSpec_Call{Call: _e.mock.On("RejectSpec", ctx, id)} +} + +func (_c *Service_RejectSpec_Call) Run(run func(ctx context.Context, id int64)) *Service_RejectSpec_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64)) + }) + return _c +} + +func (_c *Service_RejectSpec_Call) Return(_a0 error) *Service_RejectSpec_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Service_RejectSpec_Call) RunAndReturn(run func(context.Context, int64) error) *Service_RejectSpec_Call { + _c.Call.Return(run) + return _c +} + // RevokeJob provides a mock function with given fields: ctx, args func (_m *Service) RevokeJob(ctx context.Context, args *feeds.RevokeJobArgs) (int64, error) { ret := _m.Called(ctx, args) @@ -640,6 +1281,35 @@ func (_m *Service) RevokeJob(ctx context.Context, args *feeds.RevokeJobArgs) (in return r0, r1 } +// Service_RevokeJob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RevokeJob' +type Service_RevokeJob_Call struct { + *mock.Call +} + +// RevokeJob is a helper method to define mock.On call +// - ctx context.Context +// - args *feeds.RevokeJobArgs +func (_e *Service_Expecter) RevokeJob(ctx interface{}, args interface{}) *Service_RevokeJob_Call { + return &Service_RevokeJob_Call{Call: _e.mock.On("RevokeJob", ctx, args)} +} + +func (_c *Service_RevokeJob_Call) Run(run func(ctx context.Context, args *feeds.RevokeJobArgs)) *Service_RevokeJob_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*feeds.RevokeJobArgs)) + }) + return _c +} + +func (_c *Service_RevokeJob_Call) Return(_a0 int64, _a1 error) *Service_RevokeJob_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Service_RevokeJob_Call) RunAndReturn(run func(context.Context, *feeds.RevokeJobArgs) (int64, error)) *Service_RevokeJob_Call { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: ctx func (_m *Service) Start(ctx context.Context) error { ret := _m.Called(ctx) @@ -658,6 +1328,34 @@ func (_m *Service) Start(ctx context.Context) error { return r0 } +// Service_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type Service_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - ctx context.Context +func (_e *Service_Expecter) Start(ctx interface{}) *Service_Start_Call { + return &Service_Start_Call{Call: _e.mock.On("Start", ctx)} +} + +func (_c *Service_Start_Call) Run(run func(ctx context.Context)) *Service_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Service_Start_Call) Return(_a0 error) *Service_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Service_Start_Call) RunAndReturn(run func(context.Context) error) *Service_Start_Call { + _c.Call.Return(run) + return _c +} + // SyncNodeInfo provides a mock function with given fields: ctx, id func (_m *Service) SyncNodeInfo(ctx context.Context, id int64) error { ret := _m.Called(ctx, id) @@ -676,6 +1374,35 @@ func (_m *Service) SyncNodeInfo(ctx context.Context, id int64) error { return r0 } +// Service_SyncNodeInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SyncNodeInfo' +type Service_SyncNodeInfo_Call struct { + *mock.Call +} + +// SyncNodeInfo is a helper method to define mock.On call +// - ctx context.Context +// - id int64 +func (_e *Service_Expecter) SyncNodeInfo(ctx interface{}, id interface{}) *Service_SyncNodeInfo_Call { + return &Service_SyncNodeInfo_Call{Call: _e.mock.On("SyncNodeInfo", ctx, id)} +} + +func (_c *Service_SyncNodeInfo_Call) Run(run func(ctx context.Context, id int64)) *Service_SyncNodeInfo_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64)) + }) + return _c +} + +func (_c *Service_SyncNodeInfo_Call) Return(_a0 error) *Service_SyncNodeInfo_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Service_SyncNodeInfo_Call) RunAndReturn(run func(context.Context, int64) error) *Service_SyncNodeInfo_Call { + _c.Call.Return(run) + return _c +} + // UpdateChainConfig provides a mock function with given fields: ctx, cfg func (_m *Service) UpdateChainConfig(ctx context.Context, cfg feeds.ChainConfig) (int64, error) { ret := _m.Called(ctx, cfg) @@ -704,6 +1431,35 @@ func (_m *Service) UpdateChainConfig(ctx context.Context, cfg feeds.ChainConfig) return r0, r1 } +// Service_UpdateChainConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateChainConfig' +type Service_UpdateChainConfig_Call struct { + *mock.Call +} + +// UpdateChainConfig is a helper method to define mock.On call +// - ctx context.Context +// - cfg feeds.ChainConfig +func (_e *Service_Expecter) UpdateChainConfig(ctx interface{}, cfg interface{}) *Service_UpdateChainConfig_Call { + return &Service_UpdateChainConfig_Call{Call: _e.mock.On("UpdateChainConfig", ctx, cfg)} +} + +func (_c *Service_UpdateChainConfig_Call) Run(run func(ctx context.Context, cfg feeds.ChainConfig)) *Service_UpdateChainConfig_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(feeds.ChainConfig)) + }) + return _c +} + +func (_c *Service_UpdateChainConfig_Call) Return(_a0 int64, _a1 error) *Service_UpdateChainConfig_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Service_UpdateChainConfig_Call) RunAndReturn(run func(context.Context, feeds.ChainConfig) (int64, error)) *Service_UpdateChainConfig_Call { + _c.Call.Return(run) + return _c +} + // UpdateManager provides a mock function with given fields: ctx, mgr func (_m *Service) UpdateManager(ctx context.Context, mgr feeds.FeedsManager) error { ret := _m.Called(ctx, mgr) @@ -722,6 +1478,35 @@ func (_m *Service) UpdateManager(ctx context.Context, mgr feeds.FeedsManager) er return r0 } +// Service_UpdateManager_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateManager' +type Service_UpdateManager_Call struct { + *mock.Call +} + +// UpdateManager is a helper method to define mock.On call +// - ctx context.Context +// - mgr feeds.FeedsManager +func (_e *Service_Expecter) UpdateManager(ctx interface{}, mgr interface{}) *Service_UpdateManager_Call { + return &Service_UpdateManager_Call{Call: _e.mock.On("UpdateManager", ctx, mgr)} +} + +func (_c *Service_UpdateManager_Call) Run(run func(ctx context.Context, mgr feeds.FeedsManager)) *Service_UpdateManager_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(feeds.FeedsManager)) + }) + return _c +} + +func (_c *Service_UpdateManager_Call) Return(_a0 error) *Service_UpdateManager_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Service_UpdateManager_Call) RunAndReturn(run func(context.Context, feeds.FeedsManager) error) *Service_UpdateManager_Call { + _c.Call.Return(run) + return _c +} + // UpdateSpecDefinition provides a mock function with given fields: ctx, id, spec func (_m *Service) UpdateSpecDefinition(ctx context.Context, id int64, spec string) error { ret := _m.Called(ctx, id, spec) @@ -740,6 +1525,36 @@ func (_m *Service) UpdateSpecDefinition(ctx context.Context, id int64, spec stri return r0 } +// Service_UpdateSpecDefinition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateSpecDefinition' +type Service_UpdateSpecDefinition_Call struct { + *mock.Call +} + +// UpdateSpecDefinition is a helper method to define mock.On call +// - ctx context.Context +// - id int64 +// - spec string +func (_e *Service_Expecter) UpdateSpecDefinition(ctx interface{}, id interface{}, spec interface{}) *Service_UpdateSpecDefinition_Call { + return &Service_UpdateSpecDefinition_Call{Call: _e.mock.On("UpdateSpecDefinition", ctx, id, spec)} +} + +func (_c *Service_UpdateSpecDefinition_Call) Run(run func(ctx context.Context, id int64, spec string)) *Service_UpdateSpecDefinition_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64), args[2].(string)) + }) + return _c +} + +func (_c *Service_UpdateSpecDefinition_Call) Return(_a0 error) *Service_UpdateSpecDefinition_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Service_UpdateSpecDefinition_Call) RunAndReturn(run func(context.Context, int64, string) error) *Service_UpdateSpecDefinition_Call { + _c.Call.Return(run) + return _c +} + // NewService creates a new instance of Service. 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 NewService(t interface { diff --git a/core/services/feeds/orm.go b/core/services/feeds/orm.go index 23d7044879e..d130316fb2d 100644 --- a/core/services/feeds/orm.go +++ b/core/services/feeds/orm.go @@ -13,8 +13,6 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" ) -//go:generate mockery --with-expecter=true --quiet --name ORM --output ./mocks/ --case=underscore - type ORM interface { CountManagers(ctx context.Context) (int64, error) CreateManager(ctx context.Context, ms *FeedsManager) (int64, error) diff --git a/core/services/feeds/service.go b/core/services/feeds/service.go index a58137eb11b..b11b2b0167a 100644 --- a/core/services/feeds/service.go +++ b/core/services/feeds/service.go @@ -36,9 +36,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/utils/crypto" ) -//go:generate mockery --quiet --name Service --output ./mocks/ --case=underscore -//go:generate mockery --quiet --dir ./proto --name FeedsManagerClient --output ./mocks/ --case=underscore - var ( ErrOCR2Disabled = errors.New("ocr2 is disabled") ErrOCRDisabled = errors.New("ocr is disabled") diff --git a/core/services/fluxmonitorv2/contract_submitter.go b/core/services/fluxmonitorv2/contract_submitter.go index c8d98a1a2f2..bd7aad005db 100644 --- a/core/services/fluxmonitorv2/contract_submitter.go +++ b/core/services/fluxmonitorv2/contract_submitter.go @@ -10,8 +10,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/flux_aggregator_wrapper" ) -//go:generate mockery --quiet --name ContractSubmitter --output ./mocks/ --case=underscore - // FluxAggregatorABI initializes the Flux Aggregator ABI var FluxAggregatorABI = evmtypes.MustGetABI(flux_aggregator_wrapper.FluxAggregatorABI) diff --git a/core/services/fluxmonitorv2/flags.go b/core/services/fluxmonitorv2/flags.go index c50a767ae1c..a02b818674a 100644 --- a/core/services/fluxmonitorv2/flags.go +++ b/core/services/fluxmonitorv2/flags.go @@ -12,8 +12,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/flags_wrapper" ) -//go:generate mockery --quiet --name Flags --output ./mocks/ --case=underscore --structname Flags --filename flags.go - type Flags interface { ContractExists() bool IsLowered(contractAddr common.Address) (bool, error) diff --git a/core/services/fluxmonitorv2/flux_monitor.go b/core/services/fluxmonitorv2/flux_monitor.go index 31db95f2626..9175feb1a68 100644 --- a/core/services/fluxmonitorv2/flux_monitor.go +++ b/core/services/fluxmonitorv2/flux_monitor.go @@ -749,12 +749,12 @@ func (fm *FluxMonitor) respondToNewRoundLog(log flux_aggregator_wrapper.FluxAggr }) // Call the v2 pipeline to execute a new job run - run, results, err := fm.runner.ExecuteRun(ctx, fm.spec, vars, fm.logger) + run, results, err := fm.runner.ExecuteRun(ctx, fm.spec, vars) if err != nil { newRoundLogger.Errorw(fmt.Sprintf("error executing new run for job ID %v name %v", fm.spec.JobID, fm.spec.JobName), "err", err) return } - result, err := results.FinalResult(newRoundLogger).SingularResult() + result, err := results.FinalResult().SingularResult() if err != nil || result.Error != nil { newRoundLogger.Errorw("can't fetch answer", "err", err, "result", result) fm.jobORM.TryRecordError(ctx, fm.spec.JobID, "Error polling") @@ -956,13 +956,13 @@ func (fm *FluxMonitor) pollIfEligible(pollReq PollRequestType, deviationChecker }, }) - run, results, err := fm.runner.ExecuteRun(ctx, fm.spec, vars, fm.logger) + run, results, err := fm.runner.ExecuteRun(ctx, fm.spec, vars) if err != nil { l.Errorw("can't fetch answer", "err", err) fm.jobORM.TryRecordError(ctx, fm.spec.JobID, "Error polling") return } - result, err := results.FinalResult(l).SingularResult() + result, err := results.FinalResult().SingularResult() if err != nil || result.Error != nil { l.Errorw("can't fetch answer", "err", err, "result", result) fm.jobORM.TryRecordError(ctx, fm.spec.JobID, "Error polling") diff --git a/core/services/fluxmonitorv2/key_store.go b/core/services/fluxmonitorv2/key_store.go index 070d392a922..da91024b204 100644 --- a/core/services/fluxmonitorv2/key_store.go +++ b/core/services/fluxmonitorv2/key_store.go @@ -10,8 +10,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" ) -//go:generate mockery --quiet --name KeyStoreInterface --output ./mocks/ --case=underscore - // KeyStoreInterface defines an interface to interact with the keystore type KeyStoreInterface interface { EnabledKeysForChain(ctx context.Context, chainID *big.Int) ([]ethkey.KeyV2, error) diff --git a/core/services/fluxmonitorv2/mocks/contract_submitter.go b/core/services/fluxmonitorv2/mocks/contract_submitter.go index ac67c353cfb..ac9ad599f03 100644 --- a/core/services/fluxmonitorv2/mocks/contract_submitter.go +++ b/core/services/fluxmonitorv2/mocks/contract_submitter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -14,6 +14,14 @@ type ContractSubmitter struct { mock.Mock } +type ContractSubmitter_Expecter struct { + mock *mock.Mock +} + +func (_m *ContractSubmitter) EXPECT() *ContractSubmitter_Expecter { + return &ContractSubmitter_Expecter{mock: &_m.Mock} +} + // Submit provides a mock function with given fields: ctx, roundID, submission, idempotencyKey func (_m *ContractSubmitter) Submit(ctx context.Context, roundID *big.Int, submission *big.Int, idempotencyKey *string) error { ret := _m.Called(ctx, roundID, submission, idempotencyKey) @@ -32,6 +40,37 @@ func (_m *ContractSubmitter) Submit(ctx context.Context, roundID *big.Int, submi return r0 } +// ContractSubmitter_Submit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Submit' +type ContractSubmitter_Submit_Call struct { + *mock.Call +} + +// Submit is a helper method to define mock.On call +// - ctx context.Context +// - roundID *big.Int +// - submission *big.Int +// - idempotencyKey *string +func (_e *ContractSubmitter_Expecter) Submit(ctx interface{}, roundID interface{}, submission interface{}, idempotencyKey interface{}) *ContractSubmitter_Submit_Call { + return &ContractSubmitter_Submit_Call{Call: _e.mock.On("Submit", ctx, roundID, submission, idempotencyKey)} +} + +func (_c *ContractSubmitter_Submit_Call) Run(run func(ctx context.Context, roundID *big.Int, submission *big.Int, idempotencyKey *string)) *ContractSubmitter_Submit_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*big.Int), args[2].(*big.Int), args[3].(*string)) + }) + return _c +} + +func (_c *ContractSubmitter_Submit_Call) Return(_a0 error) *ContractSubmitter_Submit_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ContractSubmitter_Submit_Call) RunAndReturn(run func(context.Context, *big.Int, *big.Int, *string) error) *ContractSubmitter_Submit_Call { + _c.Call.Return(run) + return _c +} + // NewContractSubmitter creates a new instance of ContractSubmitter. 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 NewContractSubmitter(t interface { diff --git a/core/services/fluxmonitorv2/mocks/flags.go b/core/services/fluxmonitorv2/mocks/flags.go index 0585611ed03..89e00d65304 100644 --- a/core/services/fluxmonitorv2/mocks/flags.go +++ b/core/services/fluxmonitorv2/mocks/flags.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -17,6 +17,14 @@ type Flags struct { mock.Mock } +type Flags_Expecter struct { + mock *mock.Mock +} + +func (_m *Flags) EXPECT() *Flags_Expecter { + return &Flags_Expecter{mock: &_m.Mock} +} + // Address provides a mock function with given fields: func (_m *Flags) Address() common.Address { ret := _m.Called() @@ -37,6 +45,33 @@ func (_m *Flags) Address() common.Address { return r0 } +// Flags_Address_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Address' +type Flags_Address_Call struct { + *mock.Call +} + +// Address is a helper method to define mock.On call +func (_e *Flags_Expecter) Address() *Flags_Address_Call { + return &Flags_Address_Call{Call: _e.mock.On("Address")} +} + +func (_c *Flags_Address_Call) Run(run func()) *Flags_Address_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Flags_Address_Call) Return(_a0 common.Address) *Flags_Address_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Flags_Address_Call) RunAndReturn(run func() common.Address) *Flags_Address_Call { + _c.Call.Return(run) + return _c +} + // ContractExists provides a mock function with given fields: func (_m *Flags) ContractExists() bool { ret := _m.Called() @@ -55,6 +90,33 @@ func (_m *Flags) ContractExists() bool { return r0 } +// Flags_ContractExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ContractExists' +type Flags_ContractExists_Call struct { + *mock.Call +} + +// ContractExists is a helper method to define mock.On call +func (_e *Flags_Expecter) ContractExists() *Flags_ContractExists_Call { + return &Flags_ContractExists_Call{Call: _e.mock.On("ContractExists")} +} + +func (_c *Flags_ContractExists_Call) Run(run func()) *Flags_ContractExists_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Flags_ContractExists_Call) Return(_a0 bool) *Flags_ContractExists_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Flags_ContractExists_Call) RunAndReturn(run func() bool) *Flags_ContractExists_Call { + _c.Call.Return(run) + return _c +} + // IsLowered provides a mock function with given fields: contractAddr func (_m *Flags) IsLowered(contractAddr common.Address) (bool, error) { ret := _m.Called(contractAddr) @@ -83,6 +145,34 @@ func (_m *Flags) IsLowered(contractAddr common.Address) (bool, error) { return r0, r1 } +// Flags_IsLowered_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsLowered' +type Flags_IsLowered_Call struct { + *mock.Call +} + +// IsLowered is a helper method to define mock.On call +// - contractAddr common.Address +func (_e *Flags_Expecter) IsLowered(contractAddr interface{}) *Flags_IsLowered_Call { + return &Flags_IsLowered_Call{Call: _e.mock.On("IsLowered", contractAddr)} +} + +func (_c *Flags_IsLowered_Call) Run(run func(contractAddr common.Address)) *Flags_IsLowered_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(common.Address)) + }) + return _c +} + +func (_c *Flags_IsLowered_Call) Return(_a0 bool, _a1 error) *Flags_IsLowered_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_IsLowered_Call) RunAndReturn(run func(common.Address) (bool, error)) *Flags_IsLowered_Call { + _c.Call.Return(run) + return _c +} + // ParseLog provides a mock function with given fields: log func (_m *Flags) ParseLog(log types.Log) (generated.AbigenLog, error) { ret := _m.Called(log) @@ -113,6 +203,34 @@ func (_m *Flags) ParseLog(log types.Log) (generated.AbigenLog, error) { return r0, r1 } +// Flags_ParseLog_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseLog' +type Flags_ParseLog_Call struct { + *mock.Call +} + +// ParseLog is a helper method to define mock.On call +// - log types.Log +func (_e *Flags_Expecter) ParseLog(log interface{}) *Flags_ParseLog_Call { + return &Flags_ParseLog_Call{Call: _e.mock.On("ParseLog", log)} +} + +func (_c *Flags_ParseLog_Call) Run(run func(log types.Log)) *Flags_ParseLog_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *Flags_ParseLog_Call) Return(_a0 generated.AbigenLog, _a1 error) *Flags_ParseLog_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Flags_ParseLog_Call) RunAndReturn(run func(types.Log) (generated.AbigenLog, error)) *Flags_ParseLog_Call { + _c.Call.Return(run) + return _c +} + // NewFlags creates a new instance of Flags. 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 NewFlags(t interface { diff --git a/core/services/fluxmonitorv2/mocks/key_store_interface.go b/core/services/fluxmonitorv2/mocks/key_store_interface.go index f831c854ce4..8850d88842f 100644 --- a/core/services/fluxmonitorv2/mocks/key_store_interface.go +++ b/core/services/fluxmonitorv2/mocks/key_store_interface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -18,6 +18,14 @@ type KeyStoreInterface struct { mock.Mock } +type KeyStoreInterface_Expecter struct { + mock *mock.Mock +} + +func (_m *KeyStoreInterface) EXPECT() *KeyStoreInterface_Expecter { + return &KeyStoreInterface_Expecter{mock: &_m.Mock} +} + // EnabledKeysForChain provides a mock function with given fields: ctx, chainID func (_m *KeyStoreInterface) EnabledKeysForChain(ctx context.Context, chainID *big.Int) ([]ethkey.KeyV2, error) { ret := _m.Called(ctx, chainID) @@ -48,6 +56,35 @@ func (_m *KeyStoreInterface) EnabledKeysForChain(ctx context.Context, chainID *b return r0, r1 } +// KeyStoreInterface_EnabledKeysForChain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnabledKeysForChain' +type KeyStoreInterface_EnabledKeysForChain_Call struct { + *mock.Call +} + +// EnabledKeysForChain is a helper method to define mock.On call +// - ctx context.Context +// - chainID *big.Int +func (_e *KeyStoreInterface_Expecter) EnabledKeysForChain(ctx interface{}, chainID interface{}) *KeyStoreInterface_EnabledKeysForChain_Call { + return &KeyStoreInterface_EnabledKeysForChain_Call{Call: _e.mock.On("EnabledKeysForChain", ctx, chainID)} +} + +func (_c *KeyStoreInterface_EnabledKeysForChain_Call) Run(run func(ctx context.Context, chainID *big.Int)) *KeyStoreInterface_EnabledKeysForChain_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*big.Int)) + }) + return _c +} + +func (_c *KeyStoreInterface_EnabledKeysForChain_Call) Return(_a0 []ethkey.KeyV2, _a1 error) *KeyStoreInterface_EnabledKeysForChain_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *KeyStoreInterface_EnabledKeysForChain_Call) RunAndReturn(run func(context.Context, *big.Int) ([]ethkey.KeyV2, error)) *KeyStoreInterface_EnabledKeysForChain_Call { + _c.Call.Return(run) + return _c +} + // GetRoundRobinAddress provides a mock function with given fields: ctx, chainID, addrs func (_m *KeyStoreInterface) GetRoundRobinAddress(ctx context.Context, chainID *big.Int, addrs ...common.Address) (common.Address, error) { _va := make([]interface{}, len(addrs)) @@ -85,6 +122,43 @@ func (_m *KeyStoreInterface) GetRoundRobinAddress(ctx context.Context, chainID * return r0, r1 } +// KeyStoreInterface_GetRoundRobinAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRoundRobinAddress' +type KeyStoreInterface_GetRoundRobinAddress_Call struct { + *mock.Call +} + +// GetRoundRobinAddress is a helper method to define mock.On call +// - ctx context.Context +// - chainID *big.Int +// - addrs ...common.Address +func (_e *KeyStoreInterface_Expecter) GetRoundRobinAddress(ctx interface{}, chainID interface{}, addrs ...interface{}) *KeyStoreInterface_GetRoundRobinAddress_Call { + return &KeyStoreInterface_GetRoundRobinAddress_Call{Call: _e.mock.On("GetRoundRobinAddress", + append([]interface{}{ctx, chainID}, addrs...)...)} +} + +func (_c *KeyStoreInterface_GetRoundRobinAddress_Call) Run(run func(ctx context.Context, chainID *big.Int, addrs ...common.Address)) *KeyStoreInterface_GetRoundRobinAddress_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]common.Address, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(common.Address) + } + } + run(args[0].(context.Context), args[1].(*big.Int), variadicArgs...) + }) + return _c +} + +func (_c *KeyStoreInterface_GetRoundRobinAddress_Call) Return(_a0 common.Address, _a1 error) *KeyStoreInterface_GetRoundRobinAddress_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *KeyStoreInterface_GetRoundRobinAddress_Call) RunAndReturn(run func(context.Context, *big.Int, ...common.Address) (common.Address, error)) *KeyStoreInterface_GetRoundRobinAddress_Call { + _c.Call.Return(run) + return _c +} + // NewKeyStoreInterface creates a new instance of KeyStoreInterface. 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 NewKeyStoreInterface(t interface { diff --git a/core/services/fluxmonitorv2/mocks/orm.go b/core/services/fluxmonitorv2/mocks/orm.go index 7755543b405..7a351f3708a 100644 --- a/core/services/fluxmonitorv2/mocks/orm.go +++ b/core/services/fluxmonitorv2/mocks/orm.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -19,6 +19,14 @@ type ORM struct { mock.Mock } +type ORM_Expecter struct { + mock *mock.Mock +} + +func (_m *ORM) EXPECT() *ORM_Expecter { + return &ORM_Expecter{mock: &_m.Mock} +} + // CountFluxMonitorRoundStats provides a mock function with given fields: ctx func (_m *ORM) CountFluxMonitorRoundStats(ctx context.Context) (int, error) { ret := _m.Called(ctx) @@ -47,6 +55,34 @@ func (_m *ORM) CountFluxMonitorRoundStats(ctx context.Context) (int, error) { return r0, r1 } +// ORM_CountFluxMonitorRoundStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CountFluxMonitorRoundStats' +type ORM_CountFluxMonitorRoundStats_Call struct { + *mock.Call +} + +// CountFluxMonitorRoundStats is a helper method to define mock.On call +// - ctx context.Context +func (_e *ORM_Expecter) CountFluxMonitorRoundStats(ctx interface{}) *ORM_CountFluxMonitorRoundStats_Call { + return &ORM_CountFluxMonitorRoundStats_Call{Call: _e.mock.On("CountFluxMonitorRoundStats", ctx)} +} + +func (_c *ORM_CountFluxMonitorRoundStats_Call) Run(run func(ctx context.Context)) *ORM_CountFluxMonitorRoundStats_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *ORM_CountFluxMonitorRoundStats_Call) Return(count int, err error) *ORM_CountFluxMonitorRoundStats_Call { + _c.Call.Return(count, err) + return _c +} + +func (_c *ORM_CountFluxMonitorRoundStats_Call) RunAndReturn(run func(context.Context) (int, error)) *ORM_CountFluxMonitorRoundStats_Call { + _c.Call.Return(run) + return _c +} + // 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 uint64, idempotencyKey *string) error { ret := _m.Called(ctx, fromAddress, toAddress, payload, gasLimit, idempotencyKey) @@ -65,6 +101,39 @@ func (_m *ORM) CreateEthTransaction(ctx context.Context, fromAddress common.Addr return r0 } +// ORM_CreateEthTransaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateEthTransaction' +type ORM_CreateEthTransaction_Call struct { + *mock.Call +} + +// CreateEthTransaction is a helper method to define mock.On call +// - ctx context.Context +// - fromAddress common.Address +// - toAddress common.Address +// - payload []byte +// - gasLimit uint64 +// - idempotencyKey *string +func (_e *ORM_Expecter) CreateEthTransaction(ctx interface{}, fromAddress interface{}, toAddress interface{}, payload interface{}, gasLimit interface{}, idempotencyKey interface{}) *ORM_CreateEthTransaction_Call { + return &ORM_CreateEthTransaction_Call{Call: _e.mock.On("CreateEthTransaction", ctx, fromAddress, toAddress, payload, gasLimit, idempotencyKey)} +} + +func (_c *ORM_CreateEthTransaction_Call) Run(run func(ctx context.Context, fromAddress common.Address, toAddress common.Address, payload []byte, gasLimit uint64, idempotencyKey *string)) *ORM_CreateEthTransaction_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(common.Address), args[3].([]byte), args[4].(uint64), args[5].(*string)) + }) + return _c +} + +func (_c *ORM_CreateEthTransaction_Call) Return(_a0 error) *ORM_CreateEthTransaction_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_CreateEthTransaction_Call) RunAndReturn(run func(context.Context, common.Address, common.Address, []byte, uint64, *string) error) *ORM_CreateEthTransaction_Call { + _c.Call.Return(run) + return _c +} + // DeleteFluxMonitorRoundsBackThrough provides a mock function with given fields: ctx, aggregator, roundID func (_m *ORM) DeleteFluxMonitorRoundsBackThrough(ctx context.Context, aggregator common.Address, roundID uint32) error { ret := _m.Called(ctx, aggregator, roundID) @@ -83,6 +152,36 @@ func (_m *ORM) DeleteFluxMonitorRoundsBackThrough(ctx context.Context, aggregato return r0 } +// ORM_DeleteFluxMonitorRoundsBackThrough_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteFluxMonitorRoundsBackThrough' +type ORM_DeleteFluxMonitorRoundsBackThrough_Call struct { + *mock.Call +} + +// DeleteFluxMonitorRoundsBackThrough is a helper method to define mock.On call +// - ctx context.Context +// - aggregator common.Address +// - roundID uint32 +func (_e *ORM_Expecter) DeleteFluxMonitorRoundsBackThrough(ctx interface{}, aggregator interface{}, roundID interface{}) *ORM_DeleteFluxMonitorRoundsBackThrough_Call { + return &ORM_DeleteFluxMonitorRoundsBackThrough_Call{Call: _e.mock.On("DeleteFluxMonitorRoundsBackThrough", ctx, aggregator, roundID)} +} + +func (_c *ORM_DeleteFluxMonitorRoundsBackThrough_Call) Run(run func(ctx context.Context, aggregator common.Address, roundID uint32)) *ORM_DeleteFluxMonitorRoundsBackThrough_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(uint32)) + }) + return _c +} + +func (_c *ORM_DeleteFluxMonitorRoundsBackThrough_Call) Return(_a0 error) *ORM_DeleteFluxMonitorRoundsBackThrough_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_DeleteFluxMonitorRoundsBackThrough_Call) RunAndReturn(run func(context.Context, common.Address, uint32) error) *ORM_DeleteFluxMonitorRoundsBackThrough_Call { + _c.Call.Return(run) + return _c +} + // FindOrCreateFluxMonitorRoundStats provides a mock function with given fields: ctx, aggregator, roundID, newRoundLogs func (_m *ORM) FindOrCreateFluxMonitorRoundStats(ctx context.Context, aggregator common.Address, roundID uint32, newRoundLogs uint) (fluxmonitorv2.FluxMonitorRoundStatsV2, error) { ret := _m.Called(ctx, aggregator, roundID, newRoundLogs) @@ -111,6 +210,37 @@ func (_m *ORM) FindOrCreateFluxMonitorRoundStats(ctx context.Context, aggregator return r0, r1 } +// ORM_FindOrCreateFluxMonitorRoundStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindOrCreateFluxMonitorRoundStats' +type ORM_FindOrCreateFluxMonitorRoundStats_Call struct { + *mock.Call +} + +// FindOrCreateFluxMonitorRoundStats is a helper method to define mock.On call +// - ctx context.Context +// - aggregator common.Address +// - roundID uint32 +// - newRoundLogs uint +func (_e *ORM_Expecter) FindOrCreateFluxMonitorRoundStats(ctx interface{}, aggregator interface{}, roundID interface{}, newRoundLogs interface{}) *ORM_FindOrCreateFluxMonitorRoundStats_Call { + return &ORM_FindOrCreateFluxMonitorRoundStats_Call{Call: _e.mock.On("FindOrCreateFluxMonitorRoundStats", ctx, aggregator, roundID, newRoundLogs)} +} + +func (_c *ORM_FindOrCreateFluxMonitorRoundStats_Call) Run(run func(ctx context.Context, aggregator common.Address, roundID uint32, newRoundLogs uint)) *ORM_FindOrCreateFluxMonitorRoundStats_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(uint32), args[3].(uint)) + }) + return _c +} + +func (_c *ORM_FindOrCreateFluxMonitorRoundStats_Call) Return(_a0 fluxmonitorv2.FluxMonitorRoundStatsV2, _a1 error) *ORM_FindOrCreateFluxMonitorRoundStats_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ORM_FindOrCreateFluxMonitorRoundStats_Call) RunAndReturn(run func(context.Context, common.Address, uint32, uint) (fluxmonitorv2.FluxMonitorRoundStatsV2, error)) *ORM_FindOrCreateFluxMonitorRoundStats_Call { + _c.Call.Return(run) + return _c +} + // MostRecentFluxMonitorRoundID provides a mock function with given fields: ctx, aggregator func (_m *ORM) MostRecentFluxMonitorRoundID(ctx context.Context, aggregator common.Address) (uint32, error) { ret := _m.Called(ctx, aggregator) @@ -139,6 +269,35 @@ func (_m *ORM) MostRecentFluxMonitorRoundID(ctx context.Context, aggregator comm return r0, r1 } +// ORM_MostRecentFluxMonitorRoundID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MostRecentFluxMonitorRoundID' +type ORM_MostRecentFluxMonitorRoundID_Call struct { + *mock.Call +} + +// MostRecentFluxMonitorRoundID is a helper method to define mock.On call +// - ctx context.Context +// - aggregator common.Address +func (_e *ORM_Expecter) MostRecentFluxMonitorRoundID(ctx interface{}, aggregator interface{}) *ORM_MostRecentFluxMonitorRoundID_Call { + return &ORM_MostRecentFluxMonitorRoundID_Call{Call: _e.mock.On("MostRecentFluxMonitorRoundID", ctx, aggregator)} +} + +func (_c *ORM_MostRecentFluxMonitorRoundID_Call) Run(run func(ctx context.Context, aggregator common.Address)) *ORM_MostRecentFluxMonitorRoundID_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address)) + }) + return _c +} + +func (_c *ORM_MostRecentFluxMonitorRoundID_Call) Return(_a0 uint32, _a1 error) *ORM_MostRecentFluxMonitorRoundID_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ORM_MostRecentFluxMonitorRoundID_Call) RunAndReturn(run func(context.Context, common.Address) (uint32, error)) *ORM_MostRecentFluxMonitorRoundID_Call { + _c.Call.Return(run) + return _c +} + // UpdateFluxMonitorRoundStats provides a mock function with given fields: ctx, aggregator, roundID, runID, newRoundLogsAddition func (_m *ORM) UpdateFluxMonitorRoundStats(ctx context.Context, aggregator common.Address, roundID uint32, runID int64, newRoundLogsAddition uint) error { ret := _m.Called(ctx, aggregator, roundID, runID, newRoundLogsAddition) @@ -157,6 +316,38 @@ func (_m *ORM) UpdateFluxMonitorRoundStats(ctx context.Context, aggregator commo return r0 } +// ORM_UpdateFluxMonitorRoundStats_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateFluxMonitorRoundStats' +type ORM_UpdateFluxMonitorRoundStats_Call struct { + *mock.Call +} + +// UpdateFluxMonitorRoundStats is a helper method to define mock.On call +// - ctx context.Context +// - aggregator common.Address +// - roundID uint32 +// - runID int64 +// - newRoundLogsAddition uint +func (_e *ORM_Expecter) UpdateFluxMonitorRoundStats(ctx interface{}, aggregator interface{}, roundID interface{}, runID interface{}, newRoundLogsAddition interface{}) *ORM_UpdateFluxMonitorRoundStats_Call { + return &ORM_UpdateFluxMonitorRoundStats_Call{Call: _e.mock.On("UpdateFluxMonitorRoundStats", ctx, aggregator, roundID, runID, newRoundLogsAddition)} +} + +func (_c *ORM_UpdateFluxMonitorRoundStats_Call) Run(run func(ctx context.Context, aggregator common.Address, roundID uint32, runID int64, newRoundLogsAddition uint)) *ORM_UpdateFluxMonitorRoundStats_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(uint32), args[3].(int64), args[4].(uint)) + }) + return _c +} + +func (_c *ORM_UpdateFluxMonitorRoundStats_Call) Return(_a0 error) *ORM_UpdateFluxMonitorRoundStats_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_UpdateFluxMonitorRoundStats_Call) RunAndReturn(run func(context.Context, common.Address, uint32, int64, uint) error) *ORM_UpdateFluxMonitorRoundStats_Call { + _c.Call.Return(run) + return _c +} + // WithDataSource provides a mock function with given fields: _a0 func (_m *ORM) WithDataSource(_a0 sqlutil.DataSource) fluxmonitorv2.ORM { ret := _m.Called(_a0) @@ -177,6 +368,34 @@ func (_m *ORM) WithDataSource(_a0 sqlutil.DataSource) fluxmonitorv2.ORM { return r0 } +// ORM_WithDataSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithDataSource' +type ORM_WithDataSource_Call struct { + *mock.Call +} + +// WithDataSource is a helper method to define mock.On call +// - _a0 sqlutil.DataSource +func (_e *ORM_Expecter) WithDataSource(_a0 interface{}) *ORM_WithDataSource_Call { + return &ORM_WithDataSource_Call{Call: _e.mock.On("WithDataSource", _a0)} +} + +func (_c *ORM_WithDataSource_Call) Run(run func(_a0 sqlutil.DataSource)) *ORM_WithDataSource_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(sqlutil.DataSource)) + }) + return _c +} + +func (_c *ORM_WithDataSource_Call) Return(_a0 fluxmonitorv2.ORM) *ORM_WithDataSource_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_WithDataSource_Call) RunAndReturn(run func(sqlutil.DataSource) fluxmonitorv2.ORM) *ORM_WithDataSource_Call { + _c.Call.Return(run) + return _c +} + // NewORM creates a new instance of ORM. 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 NewORM(t interface { diff --git a/core/services/fluxmonitorv2/orm.go b/core/services/fluxmonitorv2/orm.go index 2f7411d1190..9e3bc67f80c 100644 --- a/core/services/fluxmonitorv2/orm.go +++ b/core/services/fluxmonitorv2/orm.go @@ -17,8 +17,6 @@ type transmitter interface { CreateTransaction(ctx context.Context, txRequest txmgr.TxRequest) (tx txmgr.Tx, err error) } -//go:generate mockery --quiet --name ORM --output ./mocks/ --case=underscore - // ORM defines an interface for database commands related to Flux Monitor v2 type ORM interface { MostRecentFluxMonitorRoundID(ctx context.Context, aggregator common.Address) (uint32, error) diff --git a/core/services/functions/external_adapter_client.go b/core/services/functions/external_adapter_client.go index 09ce8defdca..08118f2f381 100644 --- a/core/services/functions/external_adapter_client.go +++ b/core/services/functions/external_adapter_client.go @@ -25,8 +25,6 @@ import ( // // Both endpoints share the same response format. // All methods are thread-safe. -// -//go:generate mockery --quiet --name ExternalAdapterClient --output ./mocks/ --case=underscore type ExternalAdapterClient interface { RunComputation( ctx context.Context, @@ -51,7 +49,6 @@ type externalAdapterClient struct { var _ ExternalAdapterClient = (*externalAdapterClient)(nil) -//go:generate mockery --quiet --name BridgeAccessor --output ./mocks/ --case=underscore type BridgeAccessor interface { NewExternalAdapterClient(context.Context) (ExternalAdapterClient, error) } diff --git a/core/services/functions/listener.go b/core/services/functions/listener.go index bfcbf10f692..64c05a34c8d 100644 --- a/core/services/functions/listener.go +++ b/core/services/functions/listener.go @@ -116,7 +116,6 @@ const ( FlagSecretsMaxSize uint32 = 2 ) -//go:generate mockery --quiet --name FunctionsListener --output ./mocks/ --case=underscore type FunctionsListener interface { job.ServiceCtx diff --git a/core/services/functions/mocks/bridge_accessor.go b/core/services/functions/mocks/bridge_accessor.go index 797007d7886..0627ddd5990 100644 --- a/core/services/functions/mocks/bridge_accessor.go +++ b/core/services/functions/mocks/bridge_accessor.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -14,6 +14,14 @@ type BridgeAccessor struct { mock.Mock } +type BridgeAccessor_Expecter struct { + mock *mock.Mock +} + +func (_m *BridgeAccessor) EXPECT() *BridgeAccessor_Expecter { + return &BridgeAccessor_Expecter{mock: &_m.Mock} +} + // NewExternalAdapterClient provides a mock function with given fields: _a0 func (_m *BridgeAccessor) NewExternalAdapterClient(_a0 context.Context) (functions.ExternalAdapterClient, error) { ret := _m.Called(_a0) @@ -44,6 +52,34 @@ func (_m *BridgeAccessor) NewExternalAdapterClient(_a0 context.Context) (functio return r0, r1 } +// BridgeAccessor_NewExternalAdapterClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewExternalAdapterClient' +type BridgeAccessor_NewExternalAdapterClient_Call struct { + *mock.Call +} + +// NewExternalAdapterClient is a helper method to define mock.On call +// - _a0 context.Context +func (_e *BridgeAccessor_Expecter) NewExternalAdapterClient(_a0 interface{}) *BridgeAccessor_NewExternalAdapterClient_Call { + return &BridgeAccessor_NewExternalAdapterClient_Call{Call: _e.mock.On("NewExternalAdapterClient", _a0)} +} + +func (_c *BridgeAccessor_NewExternalAdapterClient_Call) Run(run func(_a0 context.Context)) *BridgeAccessor_NewExternalAdapterClient_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *BridgeAccessor_NewExternalAdapterClient_Call) Return(_a0 functions.ExternalAdapterClient, _a1 error) *BridgeAccessor_NewExternalAdapterClient_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BridgeAccessor_NewExternalAdapterClient_Call) RunAndReturn(run func(context.Context) (functions.ExternalAdapterClient, error)) *BridgeAccessor_NewExternalAdapterClient_Call { + _c.Call.Return(run) + return _c +} + // NewBridgeAccessor creates a new instance of BridgeAccessor. 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 NewBridgeAccessor(t interface { diff --git a/core/services/functions/mocks/external_adapter_client.go b/core/services/functions/mocks/external_adapter_client.go index cd402c1e6a5..cdd67bcc419 100644 --- a/core/services/functions/mocks/external_adapter_client.go +++ b/core/services/functions/mocks/external_adapter_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -14,6 +14,14 @@ type ExternalAdapterClient struct { mock.Mock } +type ExternalAdapterClient_Expecter struct { + mock *mock.Mock +} + +func (_m *ExternalAdapterClient) EXPECT() *ExternalAdapterClient_Expecter { + return &ExternalAdapterClient_Expecter{mock: &_m.Mock} +} + // FetchEncryptedSecrets provides a mock function with given fields: ctx, encryptedSecretsUrls, requestId, jobName func (_m *ExternalAdapterClient) FetchEncryptedSecrets(ctx context.Context, encryptedSecretsUrls []byte, requestId string, jobName string) ([]byte, []byte, error) { ret := _m.Called(ctx, encryptedSecretsUrls, requestId, jobName) @@ -53,6 +61,37 @@ func (_m *ExternalAdapterClient) FetchEncryptedSecrets(ctx context.Context, encr return r0, r1, r2 } +// ExternalAdapterClient_FetchEncryptedSecrets_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FetchEncryptedSecrets' +type ExternalAdapterClient_FetchEncryptedSecrets_Call struct { + *mock.Call +} + +// FetchEncryptedSecrets is a helper method to define mock.On call +// - ctx context.Context +// - encryptedSecretsUrls []byte +// - requestId string +// - jobName string +func (_e *ExternalAdapterClient_Expecter) FetchEncryptedSecrets(ctx interface{}, encryptedSecretsUrls interface{}, requestId interface{}, jobName interface{}) *ExternalAdapterClient_FetchEncryptedSecrets_Call { + return &ExternalAdapterClient_FetchEncryptedSecrets_Call{Call: _e.mock.On("FetchEncryptedSecrets", ctx, encryptedSecretsUrls, requestId, jobName)} +} + +func (_c *ExternalAdapterClient_FetchEncryptedSecrets_Call) Run(run func(ctx context.Context, encryptedSecretsUrls []byte, requestId string, jobName string)) *ExternalAdapterClient_FetchEncryptedSecrets_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]byte), args[2].(string), args[3].(string)) + }) + return _c +} + +func (_c *ExternalAdapterClient_FetchEncryptedSecrets_Call) Return(encryptedSecrets []byte, userError []byte, err error) *ExternalAdapterClient_FetchEncryptedSecrets_Call { + _c.Call.Return(encryptedSecrets, userError, err) + return _c +} + +func (_c *ExternalAdapterClient_FetchEncryptedSecrets_Call) RunAndReturn(run func(context.Context, []byte, string, string) ([]byte, []byte, error)) *ExternalAdapterClient_FetchEncryptedSecrets_Call { + _c.Call.Return(run) + return _c +} + // RunComputation provides a mock function with given fields: ctx, requestId, jobName, subscriptionOwner, subscriptionId, flags, nodeProvidedSecrets, requestData func (_m *ExternalAdapterClient) RunComputation(ctx context.Context, requestId string, jobName string, subscriptionOwner string, subscriptionId uint64, flags functions.RequestFlags, nodeProvidedSecrets string, requestData *functions.RequestData) ([]byte, []byte, []string, error) { ret := _m.Called(ctx, requestId, jobName, subscriptionOwner, subscriptionId, flags, nodeProvidedSecrets, requestData) @@ -101,6 +140,41 @@ func (_m *ExternalAdapterClient) RunComputation(ctx context.Context, requestId s return r0, r1, r2, r3 } +// ExternalAdapterClient_RunComputation_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RunComputation' +type ExternalAdapterClient_RunComputation_Call struct { + *mock.Call +} + +// RunComputation is a helper method to define mock.On call +// - ctx context.Context +// - requestId string +// - jobName string +// - subscriptionOwner string +// - subscriptionId uint64 +// - flags functions.RequestFlags +// - nodeProvidedSecrets string +// - requestData *functions.RequestData +func (_e *ExternalAdapterClient_Expecter) RunComputation(ctx interface{}, requestId interface{}, jobName interface{}, subscriptionOwner interface{}, subscriptionId interface{}, flags interface{}, nodeProvidedSecrets interface{}, requestData interface{}) *ExternalAdapterClient_RunComputation_Call { + return &ExternalAdapterClient_RunComputation_Call{Call: _e.mock.On("RunComputation", ctx, requestId, jobName, subscriptionOwner, subscriptionId, flags, nodeProvidedSecrets, requestData)} +} + +func (_c *ExternalAdapterClient_RunComputation_Call) Run(run func(ctx context.Context, requestId string, jobName string, subscriptionOwner string, subscriptionId uint64, flags functions.RequestFlags, nodeProvidedSecrets string, requestData *functions.RequestData)) *ExternalAdapterClient_RunComputation_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(uint64), args[5].(functions.RequestFlags), args[6].(string), args[7].(*functions.RequestData)) + }) + return _c +} + +func (_c *ExternalAdapterClient_RunComputation_Call) Return(userResult []byte, userError []byte, domains []string, err error) *ExternalAdapterClient_RunComputation_Call { + _c.Call.Return(userResult, userError, domains, err) + return _c +} + +func (_c *ExternalAdapterClient_RunComputation_Call) RunAndReturn(run func(context.Context, string, string, string, uint64, functions.RequestFlags, string, *functions.RequestData) ([]byte, []byte, []string, error)) *ExternalAdapterClient_RunComputation_Call { + _c.Call.Return(run) + return _c +} + // NewExternalAdapterClient creates a new instance of ExternalAdapterClient. 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 NewExternalAdapterClient(t interface { diff --git a/core/services/functions/mocks/functions_listener.go b/core/services/functions/mocks/functions_listener.go index fed369fd659..b990568b0c2 100644 --- a/core/services/functions/mocks/functions_listener.go +++ b/core/services/functions/mocks/functions_listener.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -14,6 +14,14 @@ type FunctionsListener struct { mock.Mock } +type FunctionsListener_Expecter struct { + mock *mock.Mock +} + +func (_m *FunctionsListener) EXPECT() *FunctionsListener_Expecter { + return &FunctionsListener_Expecter{mock: &_m.Mock} +} + // Close provides a mock function with given fields: func (_m *FunctionsListener) Close() error { ret := _m.Called() @@ -32,6 +40,33 @@ func (_m *FunctionsListener) Close() error { return r0 } +// FunctionsListener_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type FunctionsListener_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *FunctionsListener_Expecter) Close() *FunctionsListener_Close_Call { + return &FunctionsListener_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *FunctionsListener_Close_Call) Run(run func()) *FunctionsListener_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *FunctionsListener_Close_Call) Return(_a0 error) *FunctionsListener_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *FunctionsListener_Close_Call) RunAndReturn(run func() error) *FunctionsListener_Close_Call { + _c.Call.Return(run) + return _c +} + // HandleOffchainRequest provides a mock function with given fields: ctx, request func (_m *FunctionsListener) HandleOffchainRequest(ctx context.Context, request *functions.OffchainRequest) error { ret := _m.Called(ctx, request) @@ -50,6 +85,35 @@ func (_m *FunctionsListener) HandleOffchainRequest(ctx context.Context, request return r0 } +// FunctionsListener_HandleOffchainRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HandleOffchainRequest' +type FunctionsListener_HandleOffchainRequest_Call struct { + *mock.Call +} + +// HandleOffchainRequest is a helper method to define mock.On call +// - ctx context.Context +// - request *functions.OffchainRequest +func (_e *FunctionsListener_Expecter) HandleOffchainRequest(ctx interface{}, request interface{}) *FunctionsListener_HandleOffchainRequest_Call { + return &FunctionsListener_HandleOffchainRequest_Call{Call: _e.mock.On("HandleOffchainRequest", ctx, request)} +} + +func (_c *FunctionsListener_HandleOffchainRequest_Call) Run(run func(ctx context.Context, request *functions.OffchainRequest)) *FunctionsListener_HandleOffchainRequest_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*functions.OffchainRequest)) + }) + return _c +} + +func (_c *FunctionsListener_HandleOffchainRequest_Call) Return(_a0 error) *FunctionsListener_HandleOffchainRequest_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *FunctionsListener_HandleOffchainRequest_Call) RunAndReturn(run func(context.Context, *functions.OffchainRequest) error) *FunctionsListener_HandleOffchainRequest_Call { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *FunctionsListener) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -68,6 +132,34 @@ func (_m *FunctionsListener) Start(_a0 context.Context) error { return r0 } +// FunctionsListener_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type FunctionsListener_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *FunctionsListener_Expecter) Start(_a0 interface{}) *FunctionsListener_Start_Call { + return &FunctionsListener_Start_Call{Call: _e.mock.On("Start", _a0)} +} + +func (_c *FunctionsListener_Start_Call) Run(run func(_a0 context.Context)) *FunctionsListener_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *FunctionsListener_Start_Call) Return(_a0 error) *FunctionsListener_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *FunctionsListener_Start_Call) RunAndReturn(run func(context.Context) error) *FunctionsListener_Start_Call { + _c.Call.Return(run) + return _c +} + // NewFunctionsListener creates a new instance of FunctionsListener. 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 NewFunctionsListener(t interface { diff --git a/core/services/functions/mocks/offchain_transmitter.go b/core/services/functions/mocks/offchain_transmitter.go index 1e1422b8d46..77154f1c020 100644 --- a/core/services/functions/mocks/offchain_transmitter.go +++ b/core/services/functions/mocks/offchain_transmitter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -14,6 +14,14 @@ type OffchainTransmitter struct { mock.Mock } +type OffchainTransmitter_Expecter struct { + mock *mock.Mock +} + +func (_m *OffchainTransmitter) EXPECT() *OffchainTransmitter_Expecter { + return &OffchainTransmitter_Expecter{mock: &_m.Mock} +} + // ReportChannel provides a mock function with given fields: func (_m *OffchainTransmitter) ReportChannel() chan *functions.OffchainResponse { ret := _m.Called() @@ -34,6 +42,33 @@ func (_m *OffchainTransmitter) ReportChannel() chan *functions.OffchainResponse return r0 } +// OffchainTransmitter_ReportChannel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReportChannel' +type OffchainTransmitter_ReportChannel_Call struct { + *mock.Call +} + +// ReportChannel is a helper method to define mock.On call +func (_e *OffchainTransmitter_Expecter) ReportChannel() *OffchainTransmitter_ReportChannel_Call { + return &OffchainTransmitter_ReportChannel_Call{Call: _e.mock.On("ReportChannel")} +} + +func (_c *OffchainTransmitter_ReportChannel_Call) Run(run func()) *OffchainTransmitter_ReportChannel_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *OffchainTransmitter_ReportChannel_Call) Return(_a0 chan *functions.OffchainResponse) *OffchainTransmitter_ReportChannel_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *OffchainTransmitter_ReportChannel_Call) RunAndReturn(run func() chan *functions.OffchainResponse) *OffchainTransmitter_ReportChannel_Call { + _c.Call.Return(run) + return _c +} + // TransmitReport provides a mock function with given fields: ctx, report func (_m *OffchainTransmitter) TransmitReport(ctx context.Context, report *functions.OffchainResponse) error { ret := _m.Called(ctx, report) @@ -52,6 +87,35 @@ func (_m *OffchainTransmitter) TransmitReport(ctx context.Context, report *funct return r0 } +// OffchainTransmitter_TransmitReport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransmitReport' +type OffchainTransmitter_TransmitReport_Call struct { + *mock.Call +} + +// TransmitReport is a helper method to define mock.On call +// - ctx context.Context +// - report *functions.OffchainResponse +func (_e *OffchainTransmitter_Expecter) TransmitReport(ctx interface{}, report interface{}) *OffchainTransmitter_TransmitReport_Call { + return &OffchainTransmitter_TransmitReport_Call{Call: _e.mock.On("TransmitReport", ctx, report)} +} + +func (_c *OffchainTransmitter_TransmitReport_Call) Run(run func(ctx context.Context, report *functions.OffchainResponse)) *OffchainTransmitter_TransmitReport_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*functions.OffchainResponse)) + }) + return _c +} + +func (_c *OffchainTransmitter_TransmitReport_Call) Return(_a0 error) *OffchainTransmitter_TransmitReport_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *OffchainTransmitter_TransmitReport_Call) RunAndReturn(run func(context.Context, *functions.OffchainResponse) error) *OffchainTransmitter_TransmitReport_Call { + _c.Call.Return(run) + return _c +} + // NewOffchainTransmitter creates a new instance of OffchainTransmitter. 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 NewOffchainTransmitter(t interface { diff --git a/core/services/functions/mocks/orm.go b/core/services/functions/mocks/orm.go index c921fda5c69..8affdc0aa26 100644 --- a/core/services/functions/mocks/orm.go +++ b/core/services/functions/mocks/orm.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -16,6 +16,14 @@ type ORM struct { mock.Mock } +type ORM_Expecter struct { + mock *mock.Mock +} + +func (_m *ORM) EXPECT() *ORM_Expecter { + return &ORM_Expecter{mock: &_m.Mock} +} + // CreateRequest provides a mock function with given fields: ctx, request func (_m *ORM) CreateRequest(ctx context.Context, request *functions.Request) error { ret := _m.Called(ctx, request) @@ -34,6 +42,35 @@ func (_m *ORM) CreateRequest(ctx context.Context, request *functions.Request) er return r0 } +// ORM_CreateRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateRequest' +type ORM_CreateRequest_Call struct { + *mock.Call +} + +// CreateRequest is a helper method to define mock.On call +// - ctx context.Context +// - request *functions.Request +func (_e *ORM_Expecter) CreateRequest(ctx interface{}, request interface{}) *ORM_CreateRequest_Call { + return &ORM_CreateRequest_Call{Call: _e.mock.On("CreateRequest", ctx, request)} +} + +func (_c *ORM_CreateRequest_Call) Run(run func(ctx context.Context, request *functions.Request)) *ORM_CreateRequest_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*functions.Request)) + }) + return _c +} + +func (_c *ORM_CreateRequest_Call) Return(_a0 error) *ORM_CreateRequest_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_CreateRequest_Call) RunAndReturn(run func(context.Context, *functions.Request) error) *ORM_CreateRequest_Call { + _c.Call.Return(run) + return _c +} + // FindById provides a mock function with given fields: ctx, requestID func (_m *ORM) FindById(ctx context.Context, requestID functions.RequestID) (*functions.Request, error) { ret := _m.Called(ctx, requestID) @@ -64,6 +101,35 @@ func (_m *ORM) FindById(ctx context.Context, requestID functions.RequestID) (*fu return r0, r1 } +// ORM_FindById_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindById' +type ORM_FindById_Call struct { + *mock.Call +} + +// FindById is a helper method to define mock.On call +// - ctx context.Context +// - requestID functions.RequestID +func (_e *ORM_Expecter) FindById(ctx interface{}, requestID interface{}) *ORM_FindById_Call { + return &ORM_FindById_Call{Call: _e.mock.On("FindById", ctx, requestID)} +} + +func (_c *ORM_FindById_Call) Run(run func(ctx context.Context, requestID functions.RequestID)) *ORM_FindById_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(functions.RequestID)) + }) + return _c +} + +func (_c *ORM_FindById_Call) Return(_a0 *functions.Request, _a1 error) *ORM_FindById_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ORM_FindById_Call) RunAndReturn(run func(context.Context, functions.RequestID) (*functions.Request, error)) *ORM_FindById_Call { + _c.Call.Return(run) + return _c +} + // FindOldestEntriesByState provides a mock function with given fields: ctx, state, limit func (_m *ORM) FindOldestEntriesByState(ctx context.Context, state functions.RequestState, limit uint32) ([]functions.Request, error) { ret := _m.Called(ctx, state, limit) @@ -94,6 +160,36 @@ func (_m *ORM) FindOldestEntriesByState(ctx context.Context, state functions.Req return r0, r1 } +// ORM_FindOldestEntriesByState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindOldestEntriesByState' +type ORM_FindOldestEntriesByState_Call struct { + *mock.Call +} + +// FindOldestEntriesByState is a helper method to define mock.On call +// - ctx context.Context +// - state functions.RequestState +// - limit uint32 +func (_e *ORM_Expecter) FindOldestEntriesByState(ctx interface{}, state interface{}, limit interface{}) *ORM_FindOldestEntriesByState_Call { + return &ORM_FindOldestEntriesByState_Call{Call: _e.mock.On("FindOldestEntriesByState", ctx, state, limit)} +} + +func (_c *ORM_FindOldestEntriesByState_Call) Run(run func(ctx context.Context, state functions.RequestState, limit uint32)) *ORM_FindOldestEntriesByState_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(functions.RequestState), args[2].(uint32)) + }) + return _c +} + +func (_c *ORM_FindOldestEntriesByState_Call) Return(_a0 []functions.Request, _a1 error) *ORM_FindOldestEntriesByState_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ORM_FindOldestEntriesByState_Call) RunAndReturn(run func(context.Context, functions.RequestState, uint32) ([]functions.Request, error)) *ORM_FindOldestEntriesByState_Call { + _c.Call.Return(run) + return _c +} + // PruneOldestRequests provides a mock function with given fields: ctx, maxRequestsInDB, batchSize func (_m *ORM) PruneOldestRequests(ctx context.Context, maxRequestsInDB uint32, batchSize uint32) (uint32, uint32, error) { ret := _m.Called(ctx, maxRequestsInDB, batchSize) @@ -129,6 +225,36 @@ func (_m *ORM) PruneOldestRequests(ctx context.Context, maxRequestsInDB uint32, return r0, r1, r2 } +// ORM_PruneOldestRequests_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PruneOldestRequests' +type ORM_PruneOldestRequests_Call struct { + *mock.Call +} + +// PruneOldestRequests is a helper method to define mock.On call +// - ctx context.Context +// - maxRequestsInDB uint32 +// - batchSize uint32 +func (_e *ORM_Expecter) PruneOldestRequests(ctx interface{}, maxRequestsInDB interface{}, batchSize interface{}) *ORM_PruneOldestRequests_Call { + return &ORM_PruneOldestRequests_Call{Call: _e.mock.On("PruneOldestRequests", ctx, maxRequestsInDB, batchSize)} +} + +func (_c *ORM_PruneOldestRequests_Call) Run(run func(ctx context.Context, maxRequestsInDB uint32, batchSize uint32)) *ORM_PruneOldestRequests_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint32), args[2].(uint32)) + }) + return _c +} + +func (_c *ORM_PruneOldestRequests_Call) Return(total uint32, pruned uint32, err error) *ORM_PruneOldestRequests_Call { + _c.Call.Return(total, pruned, err) + return _c +} + +func (_c *ORM_PruneOldestRequests_Call) RunAndReturn(run func(context.Context, uint32, uint32) (uint32, uint32, error)) *ORM_PruneOldestRequests_Call { + _c.Call.Return(run) + return _c +} + // SetConfirmed provides a mock function with given fields: ctx, requestID func (_m *ORM) SetConfirmed(ctx context.Context, requestID functions.RequestID) error { ret := _m.Called(ctx, requestID) @@ -147,6 +273,35 @@ func (_m *ORM) SetConfirmed(ctx context.Context, requestID functions.RequestID) return r0 } +// ORM_SetConfirmed_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetConfirmed' +type ORM_SetConfirmed_Call struct { + *mock.Call +} + +// SetConfirmed is a helper method to define mock.On call +// - ctx context.Context +// - requestID functions.RequestID +func (_e *ORM_Expecter) SetConfirmed(ctx interface{}, requestID interface{}) *ORM_SetConfirmed_Call { + return &ORM_SetConfirmed_Call{Call: _e.mock.On("SetConfirmed", ctx, requestID)} +} + +func (_c *ORM_SetConfirmed_Call) Run(run func(ctx context.Context, requestID functions.RequestID)) *ORM_SetConfirmed_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(functions.RequestID)) + }) + return _c +} + +func (_c *ORM_SetConfirmed_Call) Return(_a0 error) *ORM_SetConfirmed_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_SetConfirmed_Call) RunAndReturn(run func(context.Context, functions.RequestID) error) *ORM_SetConfirmed_Call { + _c.Call.Return(run) + return _c +} + // SetError provides a mock function with given fields: ctx, requestID, errorType, computationError, readyAt, readyForProcessing func (_m *ORM) SetError(ctx context.Context, requestID functions.RequestID, errorType functions.ErrType, computationError []byte, readyAt time.Time, readyForProcessing bool) error { ret := _m.Called(ctx, requestID, errorType, computationError, readyAt, readyForProcessing) @@ -165,6 +320,39 @@ func (_m *ORM) SetError(ctx context.Context, requestID functions.RequestID, erro return r0 } +// ORM_SetError_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetError' +type ORM_SetError_Call struct { + *mock.Call +} + +// SetError is a helper method to define mock.On call +// - ctx context.Context +// - requestID functions.RequestID +// - errorType functions.ErrType +// - computationError []byte +// - readyAt time.Time +// - readyForProcessing bool +func (_e *ORM_Expecter) SetError(ctx interface{}, requestID interface{}, errorType interface{}, computationError interface{}, readyAt interface{}, readyForProcessing interface{}) *ORM_SetError_Call { + return &ORM_SetError_Call{Call: _e.mock.On("SetError", ctx, requestID, errorType, computationError, readyAt, readyForProcessing)} +} + +func (_c *ORM_SetError_Call) Run(run func(ctx context.Context, requestID functions.RequestID, errorType functions.ErrType, computationError []byte, readyAt time.Time, readyForProcessing bool)) *ORM_SetError_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(functions.RequestID), args[2].(functions.ErrType), args[3].([]byte), args[4].(time.Time), args[5].(bool)) + }) + return _c +} + +func (_c *ORM_SetError_Call) Return(_a0 error) *ORM_SetError_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_SetError_Call) RunAndReturn(run func(context.Context, functions.RequestID, functions.ErrType, []byte, time.Time, bool) error) *ORM_SetError_Call { + _c.Call.Return(run) + return _c +} + // SetFinalized provides a mock function with given fields: ctx, requestID, reportedResult, reportedError func (_m *ORM) SetFinalized(ctx context.Context, requestID functions.RequestID, reportedResult []byte, reportedError []byte) error { ret := _m.Called(ctx, requestID, reportedResult, reportedError) @@ -183,6 +371,37 @@ func (_m *ORM) SetFinalized(ctx context.Context, requestID functions.RequestID, return r0 } +// ORM_SetFinalized_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetFinalized' +type ORM_SetFinalized_Call struct { + *mock.Call +} + +// SetFinalized is a helper method to define mock.On call +// - ctx context.Context +// - requestID functions.RequestID +// - reportedResult []byte +// - reportedError []byte +func (_e *ORM_Expecter) SetFinalized(ctx interface{}, requestID interface{}, reportedResult interface{}, reportedError interface{}) *ORM_SetFinalized_Call { + return &ORM_SetFinalized_Call{Call: _e.mock.On("SetFinalized", ctx, requestID, reportedResult, reportedError)} +} + +func (_c *ORM_SetFinalized_Call) Run(run func(ctx context.Context, requestID functions.RequestID, reportedResult []byte, reportedError []byte)) *ORM_SetFinalized_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(functions.RequestID), args[2].([]byte), args[3].([]byte)) + }) + return _c +} + +func (_c *ORM_SetFinalized_Call) Return(_a0 error) *ORM_SetFinalized_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_SetFinalized_Call) RunAndReturn(run func(context.Context, functions.RequestID, []byte, []byte) error) *ORM_SetFinalized_Call { + _c.Call.Return(run) + return _c +} + // SetResult provides a mock function with given fields: ctx, requestID, computationResult, readyAt func (_m *ORM) SetResult(ctx context.Context, requestID functions.RequestID, computationResult []byte, readyAt time.Time) error { ret := _m.Called(ctx, requestID, computationResult, readyAt) @@ -201,6 +420,37 @@ func (_m *ORM) SetResult(ctx context.Context, requestID functions.RequestID, com return r0 } +// ORM_SetResult_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetResult' +type ORM_SetResult_Call struct { + *mock.Call +} + +// SetResult is a helper method to define mock.On call +// - ctx context.Context +// - requestID functions.RequestID +// - computationResult []byte +// - readyAt time.Time +func (_e *ORM_Expecter) SetResult(ctx interface{}, requestID interface{}, computationResult interface{}, readyAt interface{}) *ORM_SetResult_Call { + return &ORM_SetResult_Call{Call: _e.mock.On("SetResult", ctx, requestID, computationResult, readyAt)} +} + +func (_c *ORM_SetResult_Call) Run(run func(ctx context.Context, requestID functions.RequestID, computationResult []byte, readyAt time.Time)) *ORM_SetResult_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(functions.RequestID), args[2].([]byte), args[3].(time.Time)) + }) + return _c +} + +func (_c *ORM_SetResult_Call) Return(_a0 error) *ORM_SetResult_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_SetResult_Call) RunAndReturn(run func(context.Context, functions.RequestID, []byte, time.Time) error) *ORM_SetResult_Call { + _c.Call.Return(run) + return _c +} + // TimeoutExpiredResults provides a mock function with given fields: ctx, cutoff, limit func (_m *ORM) TimeoutExpiredResults(ctx context.Context, cutoff time.Time, limit uint32) ([]functions.RequestID, error) { ret := _m.Called(ctx, cutoff, limit) @@ -231,6 +481,36 @@ func (_m *ORM) TimeoutExpiredResults(ctx context.Context, cutoff time.Time, limi return r0, r1 } +// ORM_TimeoutExpiredResults_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TimeoutExpiredResults' +type ORM_TimeoutExpiredResults_Call struct { + *mock.Call +} + +// TimeoutExpiredResults is a helper method to define mock.On call +// - ctx context.Context +// - cutoff time.Time +// - limit uint32 +func (_e *ORM_Expecter) TimeoutExpiredResults(ctx interface{}, cutoff interface{}, limit interface{}) *ORM_TimeoutExpiredResults_Call { + return &ORM_TimeoutExpiredResults_Call{Call: _e.mock.On("TimeoutExpiredResults", ctx, cutoff, limit)} +} + +func (_c *ORM_TimeoutExpiredResults_Call) Run(run func(ctx context.Context, cutoff time.Time, limit uint32)) *ORM_TimeoutExpiredResults_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(time.Time), args[2].(uint32)) + }) + return _c +} + +func (_c *ORM_TimeoutExpiredResults_Call) Return(_a0 []functions.RequestID, _a1 error) *ORM_TimeoutExpiredResults_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ORM_TimeoutExpiredResults_Call) RunAndReturn(run func(context.Context, time.Time, uint32) ([]functions.RequestID, error)) *ORM_TimeoutExpiredResults_Call { + _c.Call.Return(run) + return _c +} + // NewORM creates a new instance of ORM. 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 NewORM(t interface { diff --git a/core/services/functions/offchain_transmitter.go b/core/services/functions/offchain_transmitter.go index 63527937f92..b35a0985d66 100644 --- a/core/services/functions/offchain_transmitter.go +++ b/core/services/functions/offchain_transmitter.go @@ -8,8 +8,6 @@ import ( // Simple wrapper around a channel to transmit offchain reports between // OCR plugin and Gateway connector -// -//go:generate mockery --quiet --name OffchainTransmitter --output ./mocks/ --case=underscore type OffchainTransmitter interface { TransmitReport(ctx context.Context, report *OffchainResponse) error ReportChannel() chan *OffchainResponse diff --git a/core/services/functions/orm.go b/core/services/functions/orm.go index f45effa9354..7e8cc6fbc8f 100644 --- a/core/services/functions/orm.go +++ b/core/services/functions/orm.go @@ -12,8 +12,6 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" ) -//go:generate mockery --quiet --name ORM --output ./mocks/ --case=underscore - type ORM interface { CreateRequest(ctx context.Context, request *Request) error diff --git a/core/services/gateway/connector/connector.go b/core/services/gateway/connector/connector.go index 4e9de2df40e..64ae46e6206 100644 --- a/core/services/gateway/connector/connector.go +++ b/core/services/gateway/connector/connector.go @@ -21,10 +21,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/utils" ) -//go:generate mockery --quiet --name GatewayConnector --output ./mocks/ --case=underscore -//go:generate mockery --quiet --name Signer --output ./mocks/ --case=underscore -//go:generate mockery --quiet --name GatewayConnectorHandler --output ./mocks/ --case=underscore - // GatewayConnector is a component run by Nodes to connect to a set of Gateways. type GatewayConnector interface { job.ServiceCtx diff --git a/core/services/gateway/connector/mocks/gateway_connector.go b/core/services/gateway/connector/mocks/gateway_connector.go index 0f37ee6040a..931aac8c772 100644 --- a/core/services/gateway/connector/mocks/gateway_connector.go +++ b/core/services/gateway/connector/mocks/gateway_connector.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -17,6 +17,14 @@ type GatewayConnector struct { mock.Mock } +type GatewayConnector_Expecter struct { + mock *mock.Mock +} + +func (_m *GatewayConnector) EXPECT() *GatewayConnector_Expecter { + return &GatewayConnector_Expecter{mock: &_m.Mock} +} + // ChallengeResponse provides a mock function with given fields: _a0, challenge func (_m *GatewayConnector) ChallengeResponse(_a0 *url.URL, challenge []byte) ([]byte, error) { ret := _m.Called(_a0, challenge) @@ -47,6 +55,35 @@ func (_m *GatewayConnector) ChallengeResponse(_a0 *url.URL, challenge []byte) ([ return r0, r1 } +// GatewayConnector_ChallengeResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChallengeResponse' +type GatewayConnector_ChallengeResponse_Call struct { + *mock.Call +} + +// ChallengeResponse is a helper method to define mock.On call +// - _a0 *url.URL +// - challenge []byte +func (_e *GatewayConnector_Expecter) ChallengeResponse(_a0 interface{}, challenge interface{}) *GatewayConnector_ChallengeResponse_Call { + return &GatewayConnector_ChallengeResponse_Call{Call: _e.mock.On("ChallengeResponse", _a0, challenge)} +} + +func (_c *GatewayConnector_ChallengeResponse_Call) Run(run func(_a0 *url.URL, challenge []byte)) *GatewayConnector_ChallengeResponse_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*url.URL), args[1].([]byte)) + }) + return _c +} + +func (_c *GatewayConnector_ChallengeResponse_Call) Return(_a0 []byte, _a1 error) *GatewayConnector_ChallengeResponse_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayConnector_ChallengeResponse_Call) RunAndReturn(run func(*url.URL, []byte) ([]byte, error)) *GatewayConnector_ChallengeResponse_Call { + _c.Call.Return(run) + return _c +} + // Close provides a mock function with given fields: func (_m *GatewayConnector) Close() error { ret := _m.Called() @@ -65,6 +102,33 @@ func (_m *GatewayConnector) Close() error { return r0 } +// GatewayConnector_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type GatewayConnector_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *GatewayConnector_Expecter) Close() *GatewayConnector_Close_Call { + return &GatewayConnector_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *GatewayConnector_Close_Call) Run(run func()) *GatewayConnector_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GatewayConnector_Close_Call) Return(_a0 error) *GatewayConnector_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GatewayConnector_Close_Call) RunAndReturn(run func() error) *GatewayConnector_Close_Call { + _c.Call.Return(run) + return _c +} + // NewAuthHeader provides a mock function with given fields: _a0 func (_m *GatewayConnector) NewAuthHeader(_a0 *url.URL) ([]byte, error) { ret := _m.Called(_a0) @@ -95,6 +159,34 @@ func (_m *GatewayConnector) NewAuthHeader(_a0 *url.URL) ([]byte, error) { return r0, r1 } +// GatewayConnector_NewAuthHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewAuthHeader' +type GatewayConnector_NewAuthHeader_Call struct { + *mock.Call +} + +// NewAuthHeader is a helper method to define mock.On call +// - _a0 *url.URL +func (_e *GatewayConnector_Expecter) NewAuthHeader(_a0 interface{}) *GatewayConnector_NewAuthHeader_Call { + return &GatewayConnector_NewAuthHeader_Call{Call: _e.mock.On("NewAuthHeader", _a0)} +} + +func (_c *GatewayConnector_NewAuthHeader_Call) Run(run func(_a0 *url.URL)) *GatewayConnector_NewAuthHeader_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*url.URL)) + }) + return _c +} + +func (_c *GatewayConnector_NewAuthHeader_Call) Return(_a0 []byte, _a1 error) *GatewayConnector_NewAuthHeader_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *GatewayConnector_NewAuthHeader_Call) RunAndReturn(run func(*url.URL) ([]byte, error)) *GatewayConnector_NewAuthHeader_Call { + _c.Call.Return(run) + return _c +} + // SendToGateway provides a mock function with given fields: ctx, gatewayId, msg func (_m *GatewayConnector) SendToGateway(ctx context.Context, gatewayId string, msg *api.Message) error { ret := _m.Called(ctx, gatewayId, msg) @@ -113,6 +205,36 @@ func (_m *GatewayConnector) SendToGateway(ctx context.Context, gatewayId string, return r0 } +// GatewayConnector_SendToGateway_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendToGateway' +type GatewayConnector_SendToGateway_Call struct { + *mock.Call +} + +// SendToGateway is a helper method to define mock.On call +// - ctx context.Context +// - gatewayId string +// - msg *api.Message +func (_e *GatewayConnector_Expecter) SendToGateway(ctx interface{}, gatewayId interface{}, msg interface{}) *GatewayConnector_SendToGateway_Call { + return &GatewayConnector_SendToGateway_Call{Call: _e.mock.On("SendToGateway", ctx, gatewayId, msg)} +} + +func (_c *GatewayConnector_SendToGateway_Call) Run(run func(ctx context.Context, gatewayId string, msg *api.Message)) *GatewayConnector_SendToGateway_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(*api.Message)) + }) + return _c +} + +func (_c *GatewayConnector_SendToGateway_Call) Return(_a0 error) *GatewayConnector_SendToGateway_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GatewayConnector_SendToGateway_Call) RunAndReturn(run func(context.Context, string, *api.Message) error) *GatewayConnector_SendToGateway_Call { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *GatewayConnector) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -131,6 +253,34 @@ func (_m *GatewayConnector) Start(_a0 context.Context) error { return r0 } +// GatewayConnector_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type GatewayConnector_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *GatewayConnector_Expecter) Start(_a0 interface{}) *GatewayConnector_Start_Call { + return &GatewayConnector_Start_Call{Call: _e.mock.On("Start", _a0)} +} + +func (_c *GatewayConnector_Start_Call) Run(run func(_a0 context.Context)) *GatewayConnector_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *GatewayConnector_Start_Call) Return(_a0 error) *GatewayConnector_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GatewayConnector_Start_Call) RunAndReturn(run func(context.Context) error) *GatewayConnector_Start_Call { + _c.Call.Return(run) + return _c +} + // NewGatewayConnector creates a new instance of GatewayConnector. 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 NewGatewayConnector(t interface { diff --git a/core/services/gateway/connector/mocks/gateway_connector_handler.go b/core/services/gateway/connector/mocks/gateway_connector_handler.go index c21528134f7..7b988a4e66a 100644 --- a/core/services/gateway/connector/mocks/gateway_connector_handler.go +++ b/core/services/gateway/connector/mocks/gateway_connector_handler.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -15,6 +15,14 @@ type GatewayConnectorHandler struct { mock.Mock } +type GatewayConnectorHandler_Expecter struct { + mock *mock.Mock +} + +func (_m *GatewayConnectorHandler) EXPECT() *GatewayConnectorHandler_Expecter { + return &GatewayConnectorHandler_Expecter{mock: &_m.Mock} +} + // Close provides a mock function with given fields: func (_m *GatewayConnectorHandler) Close() error { ret := _m.Called() @@ -33,11 +41,68 @@ func (_m *GatewayConnectorHandler) Close() error { return r0 } +// GatewayConnectorHandler_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type GatewayConnectorHandler_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *GatewayConnectorHandler_Expecter) Close() *GatewayConnectorHandler_Close_Call { + return &GatewayConnectorHandler_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *GatewayConnectorHandler_Close_Call) Run(run func()) *GatewayConnectorHandler_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *GatewayConnectorHandler_Close_Call) Return(_a0 error) *GatewayConnectorHandler_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GatewayConnectorHandler_Close_Call) RunAndReturn(run func() error) *GatewayConnectorHandler_Close_Call { + _c.Call.Return(run) + return _c +} + // HandleGatewayMessage provides a mock function with given fields: ctx, gatewayId, msg func (_m *GatewayConnectorHandler) HandleGatewayMessage(ctx context.Context, gatewayId string, msg *api.Message) { _m.Called(ctx, gatewayId, msg) } +// GatewayConnectorHandler_HandleGatewayMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HandleGatewayMessage' +type GatewayConnectorHandler_HandleGatewayMessage_Call struct { + *mock.Call +} + +// HandleGatewayMessage is a helper method to define mock.On call +// - ctx context.Context +// - gatewayId string +// - msg *api.Message +func (_e *GatewayConnectorHandler_Expecter) HandleGatewayMessage(ctx interface{}, gatewayId interface{}, msg interface{}) *GatewayConnectorHandler_HandleGatewayMessage_Call { + return &GatewayConnectorHandler_HandleGatewayMessage_Call{Call: _e.mock.On("HandleGatewayMessage", ctx, gatewayId, msg)} +} + +func (_c *GatewayConnectorHandler_HandleGatewayMessage_Call) Run(run func(ctx context.Context, gatewayId string, msg *api.Message)) *GatewayConnectorHandler_HandleGatewayMessage_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(*api.Message)) + }) + return _c +} + +func (_c *GatewayConnectorHandler_HandleGatewayMessage_Call) Return() *GatewayConnectorHandler_HandleGatewayMessage_Call { + _c.Call.Return() + return _c +} + +func (_c *GatewayConnectorHandler_HandleGatewayMessage_Call) RunAndReturn(run func(context.Context, string, *api.Message)) *GatewayConnectorHandler_HandleGatewayMessage_Call { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *GatewayConnectorHandler) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -56,6 +121,34 @@ func (_m *GatewayConnectorHandler) Start(_a0 context.Context) error { return r0 } +// GatewayConnectorHandler_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type GatewayConnectorHandler_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *GatewayConnectorHandler_Expecter) Start(_a0 interface{}) *GatewayConnectorHandler_Start_Call { + return &GatewayConnectorHandler_Start_Call{Call: _e.mock.On("Start", _a0)} +} + +func (_c *GatewayConnectorHandler_Start_Call) Run(run func(_a0 context.Context)) *GatewayConnectorHandler_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *GatewayConnectorHandler_Start_Call) Return(_a0 error) *GatewayConnectorHandler_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GatewayConnectorHandler_Start_Call) RunAndReturn(run func(context.Context) error) *GatewayConnectorHandler_Start_Call { + _c.Call.Return(run) + return _c +} + // NewGatewayConnectorHandler creates a new instance of GatewayConnectorHandler. 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 NewGatewayConnectorHandler(t interface { diff --git a/core/services/gateway/connector/mocks/signer.go b/core/services/gateway/connector/mocks/signer.go index bb4c3648397..85d0d87a8a0 100644 --- a/core/services/gateway/connector/mocks/signer.go +++ b/core/services/gateway/connector/mocks/signer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -9,6 +9,14 @@ type Signer struct { mock.Mock } +type Signer_Expecter struct { + mock *mock.Mock +} + +func (_m *Signer) EXPECT() *Signer_Expecter { + return &Signer_Expecter{mock: &_m.Mock} +} + // Sign provides a mock function with given fields: data func (_m *Signer) Sign(data ...[]byte) ([]byte, error) { _va := make([]interface{}, len(data)) @@ -45,6 +53,41 @@ func (_m *Signer) Sign(data ...[]byte) ([]byte, error) { return r0, r1 } +// Signer_Sign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Sign' +type Signer_Sign_Call struct { + *mock.Call +} + +// Sign is a helper method to define mock.On call +// - data ...[]byte +func (_e *Signer_Expecter) Sign(data ...interface{}) *Signer_Sign_Call { + return &Signer_Sign_Call{Call: _e.mock.On("Sign", + append([]interface{}{}, data...)...)} +} + +func (_c *Signer_Sign_Call) Run(run func(data ...[]byte)) *Signer_Sign_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([][]byte, len(args)-0) + for i, a := range args[0:] { + if a != nil { + variadicArgs[i] = a.([]byte) + } + } + run(variadicArgs...) + }) + return _c +} + +func (_c *Signer_Sign_Call) Return(_a0 []byte, _a1 error) *Signer_Sign_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Signer_Sign_Call) RunAndReturn(run func(...[]byte) ([]byte, error)) *Signer_Sign_Call { + _c.Call.Return(run) + return _c +} + // NewSigner creates a new instance of Signer. 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 NewSigner(t interface { diff --git a/core/services/gateway/handlers/functions/allowlist/allowlist.go b/core/services/gateway/handlers/functions/allowlist/allowlist.go index d180195865d..605d5df3772 100644 --- a/core/services/gateway/handlers/functions/allowlist/allowlist.go +++ b/core/services/gateway/handlers/functions/allowlist/allowlist.go @@ -49,8 +49,6 @@ type OnchainAllowlistConfig struct { // Use UpdateFromContract() for a one-time update or set OnchainAllowlistConfig.UpdateFrequencySec // for repeated updates. // All methods are thread-safe. -// -//go:generate mockery --quiet --name OnchainAllowlist --output ./mocks/ --case=underscore type OnchainAllowlist interface { job.ServiceCtx diff --git a/core/services/gateway/handlers/functions/allowlist/mocks/onchain_allowlist.go b/core/services/gateway/handlers/functions/allowlist/mocks/onchain_allowlist.go index 7581414d00f..389880370fa 100644 --- a/core/services/gateway/handlers/functions/allowlist/mocks/onchain_allowlist.go +++ b/core/services/gateway/handlers/functions/allowlist/mocks/onchain_allowlist.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -15,6 +15,14 @@ type OnchainAllowlist struct { mock.Mock } +type OnchainAllowlist_Expecter struct { + mock *mock.Mock +} + +func (_m *OnchainAllowlist) EXPECT() *OnchainAllowlist_Expecter { + return &OnchainAllowlist_Expecter{mock: &_m.Mock} +} + // Allow provides a mock function with given fields: _a0 func (_m *OnchainAllowlist) Allow(_a0 common.Address) bool { ret := _m.Called(_a0) @@ -33,6 +41,34 @@ func (_m *OnchainAllowlist) Allow(_a0 common.Address) bool { return r0 } +// OnchainAllowlist_Allow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Allow' +type OnchainAllowlist_Allow_Call struct { + *mock.Call +} + +// Allow is a helper method to define mock.On call +// - _a0 common.Address +func (_e *OnchainAllowlist_Expecter) Allow(_a0 interface{}) *OnchainAllowlist_Allow_Call { + return &OnchainAllowlist_Allow_Call{Call: _e.mock.On("Allow", _a0)} +} + +func (_c *OnchainAllowlist_Allow_Call) Run(run func(_a0 common.Address)) *OnchainAllowlist_Allow_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(common.Address)) + }) + return _c +} + +func (_c *OnchainAllowlist_Allow_Call) Return(_a0 bool) *OnchainAllowlist_Allow_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *OnchainAllowlist_Allow_Call) RunAndReturn(run func(common.Address) bool) *OnchainAllowlist_Allow_Call { + _c.Call.Return(run) + return _c +} + // Close provides a mock function with given fields: func (_m *OnchainAllowlist) Close() error { ret := _m.Called() @@ -51,6 +87,33 @@ func (_m *OnchainAllowlist) Close() error { return r0 } +// OnchainAllowlist_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type OnchainAllowlist_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *OnchainAllowlist_Expecter) Close() *OnchainAllowlist_Close_Call { + return &OnchainAllowlist_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *OnchainAllowlist_Close_Call) Run(run func()) *OnchainAllowlist_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *OnchainAllowlist_Close_Call) Return(_a0 error) *OnchainAllowlist_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *OnchainAllowlist_Close_Call) RunAndReturn(run func() error) *OnchainAllowlist_Close_Call { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *OnchainAllowlist) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -69,6 +132,34 @@ func (_m *OnchainAllowlist) Start(_a0 context.Context) error { return r0 } +// OnchainAllowlist_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type OnchainAllowlist_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *OnchainAllowlist_Expecter) Start(_a0 interface{}) *OnchainAllowlist_Start_Call { + return &OnchainAllowlist_Start_Call{Call: _e.mock.On("Start", _a0)} +} + +func (_c *OnchainAllowlist_Start_Call) Run(run func(_a0 context.Context)) *OnchainAllowlist_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *OnchainAllowlist_Start_Call) Return(_a0 error) *OnchainAllowlist_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *OnchainAllowlist_Start_Call) RunAndReturn(run func(context.Context) error) *OnchainAllowlist_Start_Call { + _c.Call.Return(run) + return _c +} + // UpdateFromContract provides a mock function with given fields: ctx func (_m *OnchainAllowlist) UpdateFromContract(ctx context.Context) error { ret := _m.Called(ctx) @@ -87,6 +178,34 @@ func (_m *OnchainAllowlist) UpdateFromContract(ctx context.Context) error { return r0 } +// OnchainAllowlist_UpdateFromContract_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateFromContract' +type OnchainAllowlist_UpdateFromContract_Call struct { + *mock.Call +} + +// UpdateFromContract is a helper method to define mock.On call +// - ctx context.Context +func (_e *OnchainAllowlist_Expecter) UpdateFromContract(ctx interface{}) *OnchainAllowlist_UpdateFromContract_Call { + return &OnchainAllowlist_UpdateFromContract_Call{Call: _e.mock.On("UpdateFromContract", ctx)} +} + +func (_c *OnchainAllowlist_UpdateFromContract_Call) Run(run func(ctx context.Context)) *OnchainAllowlist_UpdateFromContract_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *OnchainAllowlist_UpdateFromContract_Call) Return(_a0 error) *OnchainAllowlist_UpdateFromContract_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *OnchainAllowlist_UpdateFromContract_Call) RunAndReturn(run func(context.Context) error) *OnchainAllowlist_UpdateFromContract_Call { + _c.Call.Return(run) + return _c +} + // NewOnchainAllowlist creates a new instance of OnchainAllowlist. 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 NewOnchainAllowlist(t interface { diff --git a/core/services/gateway/handlers/functions/allowlist/mocks/orm.go b/core/services/gateway/handlers/functions/allowlist/mocks/orm.go index c1d47169c51..919dcb389a6 100644 --- a/core/services/gateway/handlers/functions/allowlist/mocks/orm.go +++ b/core/services/gateway/handlers/functions/allowlist/mocks/orm.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -15,6 +15,14 @@ type ORM struct { mock.Mock } +type ORM_Expecter struct { + mock *mock.Mock +} + +func (_m *ORM) EXPECT() *ORM_Expecter { + return &ORM_Expecter{mock: &_m.Mock} +} + // CreateAllowedSenders provides a mock function with given fields: ctx, allowedSenders func (_m *ORM) CreateAllowedSenders(ctx context.Context, allowedSenders []common.Address) error { ret := _m.Called(ctx, allowedSenders) @@ -33,6 +41,35 @@ func (_m *ORM) CreateAllowedSenders(ctx context.Context, allowedSenders []common return r0 } +// ORM_CreateAllowedSenders_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateAllowedSenders' +type ORM_CreateAllowedSenders_Call struct { + *mock.Call +} + +// CreateAllowedSenders is a helper method to define mock.On call +// - ctx context.Context +// - allowedSenders []common.Address +func (_e *ORM_Expecter) CreateAllowedSenders(ctx interface{}, allowedSenders interface{}) *ORM_CreateAllowedSenders_Call { + return &ORM_CreateAllowedSenders_Call{Call: _e.mock.On("CreateAllowedSenders", ctx, allowedSenders)} +} + +func (_c *ORM_CreateAllowedSenders_Call) Run(run func(ctx context.Context, allowedSenders []common.Address)) *ORM_CreateAllowedSenders_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]common.Address)) + }) + return _c +} + +func (_c *ORM_CreateAllowedSenders_Call) Return(_a0 error) *ORM_CreateAllowedSenders_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_CreateAllowedSenders_Call) RunAndReturn(run func(context.Context, []common.Address) error) *ORM_CreateAllowedSenders_Call { + _c.Call.Return(run) + return _c +} + // DeleteAllowedSenders provides a mock function with given fields: ctx, blockedSenders func (_m *ORM) DeleteAllowedSenders(ctx context.Context, blockedSenders []common.Address) error { ret := _m.Called(ctx, blockedSenders) @@ -51,6 +88,35 @@ func (_m *ORM) DeleteAllowedSenders(ctx context.Context, blockedSenders []common return r0 } +// ORM_DeleteAllowedSenders_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteAllowedSenders' +type ORM_DeleteAllowedSenders_Call struct { + *mock.Call +} + +// DeleteAllowedSenders is a helper method to define mock.On call +// - ctx context.Context +// - blockedSenders []common.Address +func (_e *ORM_Expecter) DeleteAllowedSenders(ctx interface{}, blockedSenders interface{}) *ORM_DeleteAllowedSenders_Call { + return &ORM_DeleteAllowedSenders_Call{Call: _e.mock.On("DeleteAllowedSenders", ctx, blockedSenders)} +} + +func (_c *ORM_DeleteAllowedSenders_Call) Run(run func(ctx context.Context, blockedSenders []common.Address)) *ORM_DeleteAllowedSenders_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]common.Address)) + }) + return _c +} + +func (_c *ORM_DeleteAllowedSenders_Call) Return(_a0 error) *ORM_DeleteAllowedSenders_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_DeleteAllowedSenders_Call) RunAndReturn(run func(context.Context, []common.Address) error) *ORM_DeleteAllowedSenders_Call { + _c.Call.Return(run) + return _c +} + // GetAllowedSenders provides a mock function with given fields: ctx, offset, limit func (_m *ORM) GetAllowedSenders(ctx context.Context, offset uint, limit uint) ([]common.Address, error) { ret := _m.Called(ctx, offset, limit) @@ -81,6 +147,36 @@ func (_m *ORM) GetAllowedSenders(ctx context.Context, offset uint, limit uint) ( return r0, r1 } +// ORM_GetAllowedSenders_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllowedSenders' +type ORM_GetAllowedSenders_Call struct { + *mock.Call +} + +// GetAllowedSenders is a helper method to define mock.On call +// - ctx context.Context +// - offset uint +// - limit uint +func (_e *ORM_Expecter) GetAllowedSenders(ctx interface{}, offset interface{}, limit interface{}) *ORM_GetAllowedSenders_Call { + return &ORM_GetAllowedSenders_Call{Call: _e.mock.On("GetAllowedSenders", ctx, offset, limit)} +} + +func (_c *ORM_GetAllowedSenders_Call) Run(run func(ctx context.Context, offset uint, limit uint)) *ORM_GetAllowedSenders_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint), args[2].(uint)) + }) + return _c +} + +func (_c *ORM_GetAllowedSenders_Call) Return(_a0 []common.Address, _a1 error) *ORM_GetAllowedSenders_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ORM_GetAllowedSenders_Call) RunAndReturn(run func(context.Context, uint, uint) ([]common.Address, error)) *ORM_GetAllowedSenders_Call { + _c.Call.Return(run) + return _c +} + // PurgeAllowedSenders provides a mock function with given fields: ctx func (_m *ORM) PurgeAllowedSenders(ctx context.Context) error { ret := _m.Called(ctx) @@ -99,6 +195,34 @@ func (_m *ORM) PurgeAllowedSenders(ctx context.Context) error { return r0 } +// ORM_PurgeAllowedSenders_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PurgeAllowedSenders' +type ORM_PurgeAllowedSenders_Call struct { + *mock.Call +} + +// PurgeAllowedSenders is a helper method to define mock.On call +// - ctx context.Context +func (_e *ORM_Expecter) PurgeAllowedSenders(ctx interface{}) *ORM_PurgeAllowedSenders_Call { + return &ORM_PurgeAllowedSenders_Call{Call: _e.mock.On("PurgeAllowedSenders", ctx)} +} + +func (_c *ORM_PurgeAllowedSenders_Call) Run(run func(ctx context.Context)) *ORM_PurgeAllowedSenders_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *ORM_PurgeAllowedSenders_Call) Return(_a0 error) *ORM_PurgeAllowedSenders_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_PurgeAllowedSenders_Call) RunAndReturn(run func(context.Context) error) *ORM_PurgeAllowedSenders_Call { + _c.Call.Return(run) + return _c +} + // NewORM creates a new instance of ORM. 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 NewORM(t interface { diff --git a/core/services/gateway/handlers/functions/allowlist/orm.go b/core/services/gateway/handlers/functions/allowlist/orm.go index 20a8ed15252..060ba163b03 100644 --- a/core/services/gateway/handlers/functions/allowlist/orm.go +++ b/core/services/gateway/handlers/functions/allowlist/orm.go @@ -12,7 +12,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/logger" ) -//go:generate mockery --quiet --name ORM --output ./mocks/ --case=underscore type ORM interface { GetAllowedSenders(ctx context.Context, offset, limit uint) ([]common.Address, error) CreateAllowedSenders(ctx context.Context, allowedSenders []common.Address) error diff --git a/core/services/gateway/handlers/functions/subscriptions/mocks/onchain_subscriptions.go b/core/services/gateway/handlers/functions/subscriptions/mocks/onchain_subscriptions.go index 93b476820a4..0d82332547c 100644 --- a/core/services/gateway/handlers/functions/subscriptions/mocks/onchain_subscriptions.go +++ b/core/services/gateway/handlers/functions/subscriptions/mocks/onchain_subscriptions.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -16,6 +16,14 @@ type OnchainSubscriptions struct { mock.Mock } +type OnchainSubscriptions_Expecter struct { + mock *mock.Mock +} + +func (_m *OnchainSubscriptions) EXPECT() *OnchainSubscriptions_Expecter { + return &OnchainSubscriptions_Expecter{mock: &_m.Mock} +} + // Close provides a mock function with given fields: func (_m *OnchainSubscriptions) Close() error { ret := _m.Called() @@ -34,6 +42,33 @@ func (_m *OnchainSubscriptions) Close() error { return r0 } +// OnchainSubscriptions_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type OnchainSubscriptions_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *OnchainSubscriptions_Expecter) Close() *OnchainSubscriptions_Close_Call { + return &OnchainSubscriptions_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *OnchainSubscriptions_Close_Call) Run(run func()) *OnchainSubscriptions_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *OnchainSubscriptions_Close_Call) Return(_a0 error) *OnchainSubscriptions_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *OnchainSubscriptions_Close_Call) RunAndReturn(run func() error) *OnchainSubscriptions_Close_Call { + _c.Call.Return(run) + return _c +} + // GetMaxUserBalance provides a mock function with given fields: _a0 func (_m *OnchainSubscriptions) GetMaxUserBalance(_a0 common.Address) (*big.Int, error) { ret := _m.Called(_a0) @@ -64,6 +99,34 @@ func (_m *OnchainSubscriptions) GetMaxUserBalance(_a0 common.Address) (*big.Int, return r0, r1 } +// OnchainSubscriptions_GetMaxUserBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMaxUserBalance' +type OnchainSubscriptions_GetMaxUserBalance_Call struct { + *mock.Call +} + +// GetMaxUserBalance is a helper method to define mock.On call +// - _a0 common.Address +func (_e *OnchainSubscriptions_Expecter) GetMaxUserBalance(_a0 interface{}) *OnchainSubscriptions_GetMaxUserBalance_Call { + return &OnchainSubscriptions_GetMaxUserBalance_Call{Call: _e.mock.On("GetMaxUserBalance", _a0)} +} + +func (_c *OnchainSubscriptions_GetMaxUserBalance_Call) Run(run func(_a0 common.Address)) *OnchainSubscriptions_GetMaxUserBalance_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(common.Address)) + }) + return _c +} + +func (_c *OnchainSubscriptions_GetMaxUserBalance_Call) Return(_a0 *big.Int, _a1 error) *OnchainSubscriptions_GetMaxUserBalance_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *OnchainSubscriptions_GetMaxUserBalance_Call) RunAndReturn(run func(common.Address) (*big.Int, error)) *OnchainSubscriptions_GetMaxUserBalance_Call { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *OnchainSubscriptions) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -82,6 +145,34 @@ func (_m *OnchainSubscriptions) Start(_a0 context.Context) error { return r0 } +// OnchainSubscriptions_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type OnchainSubscriptions_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *OnchainSubscriptions_Expecter) Start(_a0 interface{}) *OnchainSubscriptions_Start_Call { + return &OnchainSubscriptions_Start_Call{Call: _e.mock.On("Start", _a0)} +} + +func (_c *OnchainSubscriptions_Start_Call) Run(run func(_a0 context.Context)) *OnchainSubscriptions_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *OnchainSubscriptions_Start_Call) Return(_a0 error) *OnchainSubscriptions_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *OnchainSubscriptions_Start_Call) RunAndReturn(run func(context.Context) error) *OnchainSubscriptions_Start_Call { + _c.Call.Return(run) + return _c +} + // NewOnchainSubscriptions creates a new instance of OnchainSubscriptions. 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 NewOnchainSubscriptions(t interface { diff --git a/core/services/gateway/handlers/functions/subscriptions/mocks/orm.go b/core/services/gateway/handlers/functions/subscriptions/mocks/orm.go index 614ba83af17..56a0e00673c 100644 --- a/core/services/gateway/handlers/functions/subscriptions/mocks/orm.go +++ b/core/services/gateway/handlers/functions/subscriptions/mocks/orm.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -14,6 +14,14 @@ type ORM struct { mock.Mock } +type ORM_Expecter struct { + mock *mock.Mock +} + +func (_m *ORM) EXPECT() *ORM_Expecter { + return &ORM_Expecter{mock: &_m.Mock} +} + // GetSubscriptions provides a mock function with given fields: ctx, offset, limit func (_m *ORM) GetSubscriptions(ctx context.Context, offset uint, limit uint) ([]subscriptions.StoredSubscription, error) { ret := _m.Called(ctx, offset, limit) @@ -44,6 +52,36 @@ func (_m *ORM) GetSubscriptions(ctx context.Context, offset uint, limit uint) ([ return r0, r1 } +// ORM_GetSubscriptions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSubscriptions' +type ORM_GetSubscriptions_Call struct { + *mock.Call +} + +// GetSubscriptions is a helper method to define mock.On call +// - ctx context.Context +// - offset uint +// - limit uint +func (_e *ORM_Expecter) GetSubscriptions(ctx interface{}, offset interface{}, limit interface{}) *ORM_GetSubscriptions_Call { + return &ORM_GetSubscriptions_Call{Call: _e.mock.On("GetSubscriptions", ctx, offset, limit)} +} + +func (_c *ORM_GetSubscriptions_Call) Run(run func(ctx context.Context, offset uint, limit uint)) *ORM_GetSubscriptions_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint), args[2].(uint)) + }) + return _c +} + +func (_c *ORM_GetSubscriptions_Call) Return(_a0 []subscriptions.StoredSubscription, _a1 error) *ORM_GetSubscriptions_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ORM_GetSubscriptions_Call) RunAndReturn(run func(context.Context, uint, uint) ([]subscriptions.StoredSubscription, error)) *ORM_GetSubscriptions_Call { + _c.Call.Return(run) + return _c +} + // UpsertSubscription provides a mock function with given fields: ctx, subscription func (_m *ORM) UpsertSubscription(ctx context.Context, subscription subscriptions.StoredSubscription) error { ret := _m.Called(ctx, subscription) @@ -62,6 +100,35 @@ func (_m *ORM) UpsertSubscription(ctx context.Context, subscription subscription return r0 } +// ORM_UpsertSubscription_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpsertSubscription' +type ORM_UpsertSubscription_Call struct { + *mock.Call +} + +// UpsertSubscription is a helper method to define mock.On call +// - ctx context.Context +// - subscription subscriptions.StoredSubscription +func (_e *ORM_Expecter) UpsertSubscription(ctx interface{}, subscription interface{}) *ORM_UpsertSubscription_Call { + return &ORM_UpsertSubscription_Call{Call: _e.mock.On("UpsertSubscription", ctx, subscription)} +} + +func (_c *ORM_UpsertSubscription_Call) Run(run func(ctx context.Context, subscription subscriptions.StoredSubscription)) *ORM_UpsertSubscription_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(subscriptions.StoredSubscription)) + }) + return _c +} + +func (_c *ORM_UpsertSubscription_Call) Return(_a0 error) *ORM_UpsertSubscription_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_UpsertSubscription_Call) RunAndReturn(run func(context.Context, subscriptions.StoredSubscription) error) *ORM_UpsertSubscription_Call { + _c.Call.Return(run) + return _c +} + // NewORM creates a new instance of ORM. 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 NewORM(t interface { diff --git a/core/services/gateway/handlers/functions/subscriptions/orm.go b/core/services/gateway/handlers/functions/subscriptions/orm.go index d97437a39dc..51fd6fd62cc 100644 --- a/core/services/gateway/handlers/functions/subscriptions/orm.go +++ b/core/services/gateway/handlers/functions/subscriptions/orm.go @@ -14,7 +14,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/logger" ) -//go:generate mockery --quiet --name ORM --output ./mocks/ --case=underscore type ORM interface { GetSubscriptions(ctx context.Context, offset, limit uint) ([]StoredSubscription, error) UpsertSubscription(ctx context.Context, subscription StoredSubscription) error diff --git a/core/services/gateway/handlers/functions/subscriptions/subscriptions.go b/core/services/gateway/handlers/functions/subscriptions/subscriptions.go index c2b2835099f..5e067269fc2 100644 --- a/core/services/gateway/handlers/functions/subscriptions/subscriptions.go +++ b/core/services/gateway/handlers/functions/subscriptions/subscriptions.go @@ -32,8 +32,6 @@ type OnchainSubscriptionsConfig struct { // OnchainSubscriptions maintains a mirror of all subscriptions fetched from the blockchain (EVM-only). // All methods are thread-safe. -// -//go:generate mockery --quiet --name OnchainSubscriptions --output ./mocks/ --case=underscore type OnchainSubscriptions interface { job.ServiceCtx diff --git a/core/services/gateway/handlers/handler.go b/core/services/gateway/handlers/handler.go index 9b2d1bb9012..6994488707f 100644 --- a/core/services/gateway/handlers/handler.go +++ b/core/services/gateway/handlers/handler.go @@ -7,9 +7,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/job" ) -//go:generate mockery --quiet --name Handler --output ./mocks/ --case=underscore -//go:generate mockery --quiet --name DON --output ./mocks/ --case=underscore - // UserCallbackPayload is a response to user request sent to HandleUserMessage(). // Each message needs to receive at most one response on the provided channel. type UserCallbackPayload struct { diff --git a/core/services/gateway/handlers/mocks/don.go b/core/services/gateway/handlers/mocks/don.go index 91c162b2f55..465aebc67fe 100644 --- a/core/services/gateway/handlers/mocks/don.go +++ b/core/services/gateway/handlers/mocks/don.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -15,6 +15,14 @@ type DON struct { mock.Mock } +type DON_Expecter struct { + mock *mock.Mock +} + +func (_m *DON) EXPECT() *DON_Expecter { + return &DON_Expecter{mock: &_m.Mock} +} + // SendToNode provides a mock function with given fields: ctx, nodeAddress, msg func (_m *DON) SendToNode(ctx context.Context, nodeAddress string, msg *api.Message) error { ret := _m.Called(ctx, nodeAddress, msg) @@ -33,6 +41,36 @@ func (_m *DON) SendToNode(ctx context.Context, nodeAddress string, msg *api.Mess return r0 } +// DON_SendToNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendToNode' +type DON_SendToNode_Call struct { + *mock.Call +} + +// SendToNode is a helper method to define mock.On call +// - ctx context.Context +// - nodeAddress string +// - msg *api.Message +func (_e *DON_Expecter) SendToNode(ctx interface{}, nodeAddress interface{}, msg interface{}) *DON_SendToNode_Call { + return &DON_SendToNode_Call{Call: _e.mock.On("SendToNode", ctx, nodeAddress, msg)} +} + +func (_c *DON_SendToNode_Call) Run(run func(ctx context.Context, nodeAddress string, msg *api.Message)) *DON_SendToNode_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(*api.Message)) + }) + return _c +} + +func (_c *DON_SendToNode_Call) Return(_a0 error) *DON_SendToNode_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *DON_SendToNode_Call) RunAndReturn(run func(context.Context, string, *api.Message) error) *DON_SendToNode_Call { + _c.Call.Return(run) + return _c +} + // NewDON creates a new instance of DON. 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 NewDON(t interface { diff --git a/core/services/gateway/handlers/mocks/handler.go b/core/services/gateway/handlers/mocks/handler.go index e22c7f158f3..aa069adbeae 100644 --- a/core/services/gateway/handlers/mocks/handler.go +++ b/core/services/gateway/handlers/mocks/handler.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -17,6 +17,14 @@ type Handler struct { mock.Mock } +type Handler_Expecter struct { + mock *mock.Mock +} + +func (_m *Handler) EXPECT() *Handler_Expecter { + return &Handler_Expecter{mock: &_m.Mock} +} + // Close provides a mock function with given fields: func (_m *Handler) Close() error { ret := _m.Called() @@ -35,6 +43,33 @@ func (_m *Handler) Close() error { return r0 } +// Handler_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type Handler_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *Handler_Expecter) Close() *Handler_Close_Call { + return &Handler_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *Handler_Close_Call) Run(run func()) *Handler_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Handler_Close_Call) Return(_a0 error) *Handler_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Handler_Close_Call) RunAndReturn(run func() error) *Handler_Close_Call { + _c.Call.Return(run) + return _c +} + // HandleNodeMessage provides a mock function with given fields: ctx, msg, nodeAddr func (_m *Handler) HandleNodeMessage(ctx context.Context, msg *api.Message, nodeAddr string) error { ret := _m.Called(ctx, msg, nodeAddr) @@ -53,6 +88,36 @@ func (_m *Handler) HandleNodeMessage(ctx context.Context, msg *api.Message, node return r0 } +// Handler_HandleNodeMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HandleNodeMessage' +type Handler_HandleNodeMessage_Call struct { + *mock.Call +} + +// HandleNodeMessage is a helper method to define mock.On call +// - ctx context.Context +// - msg *api.Message +// - nodeAddr string +func (_e *Handler_Expecter) HandleNodeMessage(ctx interface{}, msg interface{}, nodeAddr interface{}) *Handler_HandleNodeMessage_Call { + return &Handler_HandleNodeMessage_Call{Call: _e.mock.On("HandleNodeMessage", ctx, msg, nodeAddr)} +} + +func (_c *Handler_HandleNodeMessage_Call) Run(run func(ctx context.Context, msg *api.Message, nodeAddr string)) *Handler_HandleNodeMessage_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*api.Message), args[2].(string)) + }) + return _c +} + +func (_c *Handler_HandleNodeMessage_Call) Return(_a0 error) *Handler_HandleNodeMessage_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Handler_HandleNodeMessage_Call) RunAndReturn(run func(context.Context, *api.Message, string) error) *Handler_HandleNodeMessage_Call { + _c.Call.Return(run) + return _c +} + // HandleUserMessage provides a mock function with given fields: ctx, msg, callbackCh func (_m *Handler) HandleUserMessage(ctx context.Context, msg *api.Message, callbackCh chan<- handlers.UserCallbackPayload) error { ret := _m.Called(ctx, msg, callbackCh) @@ -71,6 +136,36 @@ func (_m *Handler) HandleUserMessage(ctx context.Context, msg *api.Message, call return r0 } +// Handler_HandleUserMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HandleUserMessage' +type Handler_HandleUserMessage_Call struct { + *mock.Call +} + +// HandleUserMessage is a helper method to define mock.On call +// - ctx context.Context +// - msg *api.Message +// - callbackCh chan<- handlers.UserCallbackPayload +func (_e *Handler_Expecter) HandleUserMessage(ctx interface{}, msg interface{}, callbackCh interface{}) *Handler_HandleUserMessage_Call { + return &Handler_HandleUserMessage_Call{Call: _e.mock.On("HandleUserMessage", ctx, msg, callbackCh)} +} + +func (_c *Handler_HandleUserMessage_Call) Run(run func(ctx context.Context, msg *api.Message, callbackCh chan<- handlers.UserCallbackPayload)) *Handler_HandleUserMessage_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*api.Message), args[2].(chan<- handlers.UserCallbackPayload)) + }) + return _c +} + +func (_c *Handler_HandleUserMessage_Call) Return(_a0 error) *Handler_HandleUserMessage_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Handler_HandleUserMessage_Call) RunAndReturn(run func(context.Context, *api.Message, chan<- handlers.UserCallbackPayload) error) *Handler_HandleUserMessage_Call { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *Handler) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -89,6 +184,34 @@ func (_m *Handler) Start(_a0 context.Context) error { return r0 } +// Handler_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type Handler_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *Handler_Expecter) Start(_a0 interface{}) *Handler_Start_Call { + return &Handler_Start_Call{Call: _e.mock.On("Start", _a0)} +} + +func (_c *Handler_Start_Call) Run(run func(_a0 context.Context)) *Handler_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Handler_Start_Call) Return(_a0 error) *Handler_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Handler_Start_Call) RunAndReturn(run func(context.Context) error) *Handler_Start_Call { + _c.Call.Return(run) + return _c +} + // NewHandler creates a new instance of Handler. 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 NewHandler(t interface { diff --git a/core/services/gateway/network/handshake.go b/core/services/gateway/network/handshake.go index 253ce369115..77575b287fe 100644 --- a/core/services/gateway/network/handshake.go +++ b/core/services/gateway/network/handshake.go @@ -21,8 +21,6 @@ import ( // ChallengeResponse() // ---------response---------> // FinalizeHandshake() -// -//go:generate mockery --quiet --name ConnectionInitiator --output ./mocks/ --case=underscore type ConnectionInitiator interface { // Generate authentication header value specific to node and gateway NewAuthHeader(url *url.URL) ([]byte, error) @@ -31,7 +29,6 @@ type ConnectionInitiator interface { ChallengeResponse(url *url.URL, challenge []byte) ([]byte, error) } -//go:generate mockery --quiet --name ConnectionAcceptor --output ./mocks/ --case=underscore type ConnectionAcceptor interface { // Verify auth header, save state of the attempt and generate a challenge for the node. StartHandshake(authHeader []byte) (attemptId string, challenge []byte, err error) diff --git a/core/services/gateway/network/httpserver.go b/core/services/gateway/network/httpserver.go index d4340a92e98..e7b622fc33c 100644 --- a/core/services/gateway/network/httpserver.go +++ b/core/services/gateway/network/httpserver.go @@ -13,7 +13,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/job" ) -//go:generate mockery --quiet --name HttpServer --output ./mocks/ --case=underscore type HttpServer interface { job.ServiceCtx @@ -24,7 +23,6 @@ type HttpServer interface { GetPort() int } -//go:generate mockery --quiet --name HTTPRequestHandler --output ./mocks/ --case=underscore type HTTPRequestHandler interface { ProcessRequest(ctx context.Context, rawRequest []byte) (rawResponse []byte, httpStatusCode int) } diff --git a/core/services/gateway/network/mocks/connection_acceptor.go b/core/services/gateway/network/mocks/connection_acceptor.go index 37ebc7b8c9e..427c41fe047 100644 --- a/core/services/gateway/network/mocks/connection_acceptor.go +++ b/core/services/gateway/network/mocks/connection_acceptor.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -13,11 +13,47 @@ type ConnectionAcceptor struct { mock.Mock } +type ConnectionAcceptor_Expecter struct { + mock *mock.Mock +} + +func (_m *ConnectionAcceptor) EXPECT() *ConnectionAcceptor_Expecter { + return &ConnectionAcceptor_Expecter{mock: &_m.Mock} +} + // AbortHandshake provides a mock function with given fields: attemptId func (_m *ConnectionAcceptor) AbortHandshake(attemptId string) { _m.Called(attemptId) } +// ConnectionAcceptor_AbortHandshake_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AbortHandshake' +type ConnectionAcceptor_AbortHandshake_Call struct { + *mock.Call +} + +// AbortHandshake is a helper method to define mock.On call +// - attemptId string +func (_e *ConnectionAcceptor_Expecter) AbortHandshake(attemptId interface{}) *ConnectionAcceptor_AbortHandshake_Call { + return &ConnectionAcceptor_AbortHandshake_Call{Call: _e.mock.On("AbortHandshake", attemptId)} +} + +func (_c *ConnectionAcceptor_AbortHandshake_Call) Run(run func(attemptId string)) *ConnectionAcceptor_AbortHandshake_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *ConnectionAcceptor_AbortHandshake_Call) Return() *ConnectionAcceptor_AbortHandshake_Call { + _c.Call.Return() + return _c +} + +func (_c *ConnectionAcceptor_AbortHandshake_Call) RunAndReturn(run func(string)) *ConnectionAcceptor_AbortHandshake_Call { + _c.Call.Return(run) + return _c +} + // FinalizeHandshake provides a mock function with given fields: attemptId, response, conn func (_m *ConnectionAcceptor) FinalizeHandshake(attemptId string, response []byte, conn *websocket.Conn) error { ret := _m.Called(attemptId, response, conn) @@ -36,6 +72,36 @@ func (_m *ConnectionAcceptor) FinalizeHandshake(attemptId string, response []byt return r0 } +// ConnectionAcceptor_FinalizeHandshake_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FinalizeHandshake' +type ConnectionAcceptor_FinalizeHandshake_Call struct { + *mock.Call +} + +// FinalizeHandshake is a helper method to define mock.On call +// - attemptId string +// - response []byte +// - conn *websocket.Conn +func (_e *ConnectionAcceptor_Expecter) FinalizeHandshake(attemptId interface{}, response interface{}, conn interface{}) *ConnectionAcceptor_FinalizeHandshake_Call { + return &ConnectionAcceptor_FinalizeHandshake_Call{Call: _e.mock.On("FinalizeHandshake", attemptId, response, conn)} +} + +func (_c *ConnectionAcceptor_FinalizeHandshake_Call) Run(run func(attemptId string, response []byte, conn *websocket.Conn)) *ConnectionAcceptor_FinalizeHandshake_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].([]byte), args[2].(*websocket.Conn)) + }) + return _c +} + +func (_c *ConnectionAcceptor_FinalizeHandshake_Call) Return(_a0 error) *ConnectionAcceptor_FinalizeHandshake_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ConnectionAcceptor_FinalizeHandshake_Call) RunAndReturn(run func(string, []byte, *websocket.Conn) error) *ConnectionAcceptor_FinalizeHandshake_Call { + _c.Call.Return(run) + return _c +} + // StartHandshake provides a mock function with given fields: authHeader func (_m *ConnectionAcceptor) StartHandshake(authHeader []byte) (string, []byte, error) { ret := _m.Called(authHeader) @@ -73,6 +139,34 @@ func (_m *ConnectionAcceptor) StartHandshake(authHeader []byte) (string, []byte, return r0, r1, r2 } +// ConnectionAcceptor_StartHandshake_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StartHandshake' +type ConnectionAcceptor_StartHandshake_Call struct { + *mock.Call +} + +// StartHandshake is a helper method to define mock.On call +// - authHeader []byte +func (_e *ConnectionAcceptor_Expecter) StartHandshake(authHeader interface{}) *ConnectionAcceptor_StartHandshake_Call { + return &ConnectionAcceptor_StartHandshake_Call{Call: _e.mock.On("StartHandshake", authHeader)} +} + +func (_c *ConnectionAcceptor_StartHandshake_Call) Run(run func(authHeader []byte)) *ConnectionAcceptor_StartHandshake_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]byte)) + }) + return _c +} + +func (_c *ConnectionAcceptor_StartHandshake_Call) Return(attemptId string, challenge []byte, err error) *ConnectionAcceptor_StartHandshake_Call { + _c.Call.Return(attemptId, challenge, err) + return _c +} + +func (_c *ConnectionAcceptor_StartHandshake_Call) RunAndReturn(run func([]byte) (string, []byte, error)) *ConnectionAcceptor_StartHandshake_Call { + _c.Call.Return(run) + return _c +} + // NewConnectionAcceptor creates a new instance of ConnectionAcceptor. 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 NewConnectionAcceptor(t interface { diff --git a/core/services/gateway/network/mocks/connection_initiator.go b/core/services/gateway/network/mocks/connection_initiator.go index 7efac288ba8..db13b166d52 100644 --- a/core/services/gateway/network/mocks/connection_initiator.go +++ b/core/services/gateway/network/mocks/connection_initiator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -13,6 +13,14 @@ type ConnectionInitiator struct { mock.Mock } +type ConnectionInitiator_Expecter struct { + mock *mock.Mock +} + +func (_m *ConnectionInitiator) EXPECT() *ConnectionInitiator_Expecter { + return &ConnectionInitiator_Expecter{mock: &_m.Mock} +} + // ChallengeResponse provides a mock function with given fields: _a0, challenge func (_m *ConnectionInitiator) ChallengeResponse(_a0 *url.URL, challenge []byte) ([]byte, error) { ret := _m.Called(_a0, challenge) @@ -43,6 +51,35 @@ func (_m *ConnectionInitiator) ChallengeResponse(_a0 *url.URL, challenge []byte) return r0, r1 } +// ConnectionInitiator_ChallengeResponse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ChallengeResponse' +type ConnectionInitiator_ChallengeResponse_Call struct { + *mock.Call +} + +// ChallengeResponse is a helper method to define mock.On call +// - _a0 *url.URL +// - challenge []byte +func (_e *ConnectionInitiator_Expecter) ChallengeResponse(_a0 interface{}, challenge interface{}) *ConnectionInitiator_ChallengeResponse_Call { + return &ConnectionInitiator_ChallengeResponse_Call{Call: _e.mock.On("ChallengeResponse", _a0, challenge)} +} + +func (_c *ConnectionInitiator_ChallengeResponse_Call) Run(run func(_a0 *url.URL, challenge []byte)) *ConnectionInitiator_ChallengeResponse_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*url.URL), args[1].([]byte)) + }) + return _c +} + +func (_c *ConnectionInitiator_ChallengeResponse_Call) Return(_a0 []byte, _a1 error) *ConnectionInitiator_ChallengeResponse_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ConnectionInitiator_ChallengeResponse_Call) RunAndReturn(run func(*url.URL, []byte) ([]byte, error)) *ConnectionInitiator_ChallengeResponse_Call { + _c.Call.Return(run) + return _c +} + // NewAuthHeader provides a mock function with given fields: _a0 func (_m *ConnectionInitiator) NewAuthHeader(_a0 *url.URL) ([]byte, error) { ret := _m.Called(_a0) @@ -73,6 +110,34 @@ func (_m *ConnectionInitiator) NewAuthHeader(_a0 *url.URL) ([]byte, error) { return r0, r1 } +// ConnectionInitiator_NewAuthHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewAuthHeader' +type ConnectionInitiator_NewAuthHeader_Call struct { + *mock.Call +} + +// NewAuthHeader is a helper method to define mock.On call +// - _a0 *url.URL +func (_e *ConnectionInitiator_Expecter) NewAuthHeader(_a0 interface{}) *ConnectionInitiator_NewAuthHeader_Call { + return &ConnectionInitiator_NewAuthHeader_Call{Call: _e.mock.On("NewAuthHeader", _a0)} +} + +func (_c *ConnectionInitiator_NewAuthHeader_Call) Run(run func(_a0 *url.URL)) *ConnectionInitiator_NewAuthHeader_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*url.URL)) + }) + return _c +} + +func (_c *ConnectionInitiator_NewAuthHeader_Call) Return(_a0 []byte, _a1 error) *ConnectionInitiator_NewAuthHeader_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ConnectionInitiator_NewAuthHeader_Call) RunAndReturn(run func(*url.URL) ([]byte, error)) *ConnectionInitiator_NewAuthHeader_Call { + _c.Call.Return(run) + return _c +} + // NewConnectionInitiator creates a new instance of ConnectionInitiator. 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 NewConnectionInitiator(t interface { diff --git a/core/services/gateway/network/mocks/http_request_handler.go b/core/services/gateway/network/mocks/http_request_handler.go index 0cbcf3eb6b1..b2601203c22 100644 --- a/core/services/gateway/network/mocks/http_request_handler.go +++ b/core/services/gateway/network/mocks/http_request_handler.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -13,6 +13,14 @@ type HTTPRequestHandler struct { mock.Mock } +type HTTPRequestHandler_Expecter struct { + mock *mock.Mock +} + +func (_m *HTTPRequestHandler) EXPECT() *HTTPRequestHandler_Expecter { + return &HTTPRequestHandler_Expecter{mock: &_m.Mock} +} + // ProcessRequest provides a mock function with given fields: ctx, rawRequest func (_m *HTTPRequestHandler) ProcessRequest(ctx context.Context, rawRequest []byte) ([]byte, int) { ret := _m.Called(ctx, rawRequest) @@ -43,6 +51,35 @@ func (_m *HTTPRequestHandler) ProcessRequest(ctx context.Context, rawRequest []b return r0, r1 } +// HTTPRequestHandler_ProcessRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ProcessRequest' +type HTTPRequestHandler_ProcessRequest_Call struct { + *mock.Call +} + +// ProcessRequest is a helper method to define mock.On call +// - ctx context.Context +// - rawRequest []byte +func (_e *HTTPRequestHandler_Expecter) ProcessRequest(ctx interface{}, rawRequest interface{}) *HTTPRequestHandler_ProcessRequest_Call { + return &HTTPRequestHandler_ProcessRequest_Call{Call: _e.mock.On("ProcessRequest", ctx, rawRequest)} +} + +func (_c *HTTPRequestHandler_ProcessRequest_Call) Run(run func(ctx context.Context, rawRequest []byte)) *HTTPRequestHandler_ProcessRequest_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]byte)) + }) + return _c +} + +func (_c *HTTPRequestHandler_ProcessRequest_Call) Return(rawResponse []byte, httpStatusCode int) *HTTPRequestHandler_ProcessRequest_Call { + _c.Call.Return(rawResponse, httpStatusCode) + return _c +} + +func (_c *HTTPRequestHandler_ProcessRequest_Call) RunAndReturn(run func(context.Context, []byte) ([]byte, int)) *HTTPRequestHandler_ProcessRequest_Call { + _c.Call.Return(run) + return _c +} + // NewHTTPRequestHandler creates a new instance of HTTPRequestHandler. 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 NewHTTPRequestHandler(t interface { diff --git a/core/services/gateway/network/mocks/http_server.go b/core/services/gateway/network/mocks/http_server.go index 586677c604c..d5570ddd2e7 100644 --- a/core/services/gateway/network/mocks/http_server.go +++ b/core/services/gateway/network/mocks/http_server.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -14,6 +14,14 @@ type HttpServer struct { mock.Mock } +type HttpServer_Expecter struct { + mock *mock.Mock +} + +func (_m *HttpServer) EXPECT() *HttpServer_Expecter { + return &HttpServer_Expecter{mock: &_m.Mock} +} + // Close provides a mock function with given fields: func (_m *HttpServer) Close() error { ret := _m.Called() @@ -32,6 +40,33 @@ func (_m *HttpServer) Close() error { return r0 } +// HttpServer_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type HttpServer_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *HttpServer_Expecter) Close() *HttpServer_Close_Call { + return &HttpServer_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *HttpServer_Close_Call) Run(run func()) *HttpServer_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *HttpServer_Close_Call) Return(_a0 error) *HttpServer_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *HttpServer_Close_Call) RunAndReturn(run func() error) *HttpServer_Close_Call { + _c.Call.Return(run) + return _c +} + // GetPort provides a mock function with given fields: func (_m *HttpServer) GetPort() int { ret := _m.Called() @@ -50,11 +85,66 @@ func (_m *HttpServer) GetPort() int { return r0 } +// HttpServer_GetPort_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPort' +type HttpServer_GetPort_Call struct { + *mock.Call +} + +// GetPort is a helper method to define mock.On call +func (_e *HttpServer_Expecter) GetPort() *HttpServer_GetPort_Call { + return &HttpServer_GetPort_Call{Call: _e.mock.On("GetPort")} +} + +func (_c *HttpServer_GetPort_Call) Run(run func()) *HttpServer_GetPort_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *HttpServer_GetPort_Call) Return(_a0 int) *HttpServer_GetPort_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *HttpServer_GetPort_Call) RunAndReturn(run func() int) *HttpServer_GetPort_Call { + _c.Call.Return(run) + return _c +} + // SetHTTPRequestHandler provides a mock function with given fields: handler func (_m *HttpServer) SetHTTPRequestHandler(handler network.HTTPRequestHandler) { _m.Called(handler) } +// HttpServer_SetHTTPRequestHandler_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetHTTPRequestHandler' +type HttpServer_SetHTTPRequestHandler_Call struct { + *mock.Call +} + +// SetHTTPRequestHandler is a helper method to define mock.On call +// - handler network.HTTPRequestHandler +func (_e *HttpServer_Expecter) SetHTTPRequestHandler(handler interface{}) *HttpServer_SetHTTPRequestHandler_Call { + return &HttpServer_SetHTTPRequestHandler_Call{Call: _e.mock.On("SetHTTPRequestHandler", handler)} +} + +func (_c *HttpServer_SetHTTPRequestHandler_Call) Run(run func(handler network.HTTPRequestHandler)) *HttpServer_SetHTTPRequestHandler_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(network.HTTPRequestHandler)) + }) + return _c +} + +func (_c *HttpServer_SetHTTPRequestHandler_Call) Return() *HttpServer_SetHTTPRequestHandler_Call { + _c.Call.Return() + return _c +} + +func (_c *HttpServer_SetHTTPRequestHandler_Call) RunAndReturn(run func(network.HTTPRequestHandler)) *HttpServer_SetHTTPRequestHandler_Call { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *HttpServer) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -73,6 +163,34 @@ func (_m *HttpServer) Start(_a0 context.Context) error { return r0 } +// HttpServer_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type HttpServer_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *HttpServer_Expecter) Start(_a0 interface{}) *HttpServer_Start_Call { + return &HttpServer_Start_Call{Call: _e.mock.On("Start", _a0)} +} + +func (_c *HttpServer_Start_Call) Run(run func(_a0 context.Context)) *HttpServer_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *HttpServer_Start_Call) Return(_a0 error) *HttpServer_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *HttpServer_Start_Call) RunAndReturn(run func(context.Context) error) *HttpServer_Start_Call { + _c.Call.Return(run) + return _c +} + // NewHttpServer creates a new instance of HttpServer. 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 NewHttpServer(t interface { diff --git a/core/services/gateway/network/mocks/web_socket_server.go b/core/services/gateway/network/mocks/web_socket_server.go index fb880193c7e..0f5eff08379 100644 --- a/core/services/gateway/network/mocks/web_socket_server.go +++ b/core/services/gateway/network/mocks/web_socket_server.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -13,6 +13,14 @@ type WebSocketServer struct { mock.Mock } +type WebSocketServer_Expecter struct { + mock *mock.Mock +} + +func (_m *WebSocketServer) EXPECT() *WebSocketServer_Expecter { + return &WebSocketServer_Expecter{mock: &_m.Mock} +} + // Close provides a mock function with given fields: func (_m *WebSocketServer) Close() error { ret := _m.Called() @@ -31,6 +39,33 @@ func (_m *WebSocketServer) Close() error { return r0 } +// WebSocketServer_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type WebSocketServer_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *WebSocketServer_Expecter) Close() *WebSocketServer_Close_Call { + return &WebSocketServer_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *WebSocketServer_Close_Call) Run(run func()) *WebSocketServer_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *WebSocketServer_Close_Call) Return(_a0 error) *WebSocketServer_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *WebSocketServer_Close_Call) RunAndReturn(run func() error) *WebSocketServer_Close_Call { + _c.Call.Return(run) + return _c +} + // GetPort provides a mock function with given fields: func (_m *WebSocketServer) GetPort() int { ret := _m.Called() @@ -49,6 +84,33 @@ func (_m *WebSocketServer) GetPort() int { return r0 } +// WebSocketServer_GetPort_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPort' +type WebSocketServer_GetPort_Call struct { + *mock.Call +} + +// GetPort is a helper method to define mock.On call +func (_e *WebSocketServer_Expecter) GetPort() *WebSocketServer_GetPort_Call { + return &WebSocketServer_GetPort_Call{Call: _e.mock.On("GetPort")} +} + +func (_c *WebSocketServer_GetPort_Call) Run(run func()) *WebSocketServer_GetPort_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *WebSocketServer_GetPort_Call) Return(_a0 int) *WebSocketServer_GetPort_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *WebSocketServer_GetPort_Call) RunAndReturn(run func() int) *WebSocketServer_GetPort_Call { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *WebSocketServer) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -67,6 +129,34 @@ func (_m *WebSocketServer) Start(_a0 context.Context) error { return r0 } +// WebSocketServer_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type WebSocketServer_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *WebSocketServer_Expecter) Start(_a0 interface{}) *WebSocketServer_Start_Call { + return &WebSocketServer_Start_Call{Call: _e.mock.On("Start", _a0)} +} + +func (_c *WebSocketServer_Start_Call) Run(run func(_a0 context.Context)) *WebSocketServer_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *WebSocketServer_Start_Call) Return(_a0 error) *WebSocketServer_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *WebSocketServer_Start_Call) RunAndReturn(run func(context.Context) error) *WebSocketServer_Start_Call { + _c.Call.Return(run) + return _c +} + // NewWebSocketServer creates a new instance of WebSocketServer. 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 NewWebSocketServer(t interface { diff --git a/core/services/gateway/network/wsserver.go b/core/services/gateway/network/wsserver.go index 58b2dfe663c..361fe5c0fd6 100644 --- a/core/services/gateway/network/wsserver.go +++ b/core/services/gateway/network/wsserver.go @@ -15,7 +15,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/job" ) -//go:generate mockery --quiet --name WebSocketServer --output ./mocks/ --case=underscore type WebSocketServer interface { job.ServiceCtx diff --git a/core/services/health.go b/core/services/health.go index 32e97fd8db3..907187eb143 100644 --- a/core/services/health.go +++ b/core/services/health.go @@ -16,8 +16,6 @@ import ( var _ Checker = (*services.HealthChecker)(nil) // Checker provides a service which can be probed for system health. -// -//go:generate mockery --quiet --name Checker --output ./mocks/ --case=underscore type Checker interface { // Register a service for health checks. Register(service services.HealthReporter) error @@ -34,37 +32,40 @@ type Checker interface { Close() error } -type InBackupHealthReport struct { +type StartUpHealthReport struct { server http.Server lggr logger.Logger + mux *http.ServeMux } -func (i *InBackupHealthReport) Stop() { +func (i *StartUpHealthReport) Stop() { shutdownCtx, shutdownRelease := context.WithTimeout(context.Background(), time.Second) defer shutdownRelease() if err := i.server.Shutdown(shutdownCtx); err != nil { - i.lggr.Errorf("InBackupHealthReport shutdown error: %v", err) + i.lggr.Errorf("StartUpHealthReport shutdown error: %v", err) } - i.lggr.Info("InBackupHealthReport shutdown complete") + i.lggr.Info("StartUpHealthReport shutdown complete") } -func (i *InBackupHealthReport) Start() { +func (i *StartUpHealthReport) Start() { go func() { - http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) { + i.mux.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusNoContent) }) - i.lggr.Info("Starting InBackupHealthReport") + i.lggr.Info("Starting StartUpHealthReport") if err := i.server.ListenAndServe(); !errors.Is(err, http.ErrServerClosed) { - i.lggr.Errorf("InBackupHealthReport server error: %v", err) + i.lggr.Errorf("StartUpHealthReport server error: %v", err) } }() } -// NewInBackupHealthReport creates a new InBackupHealthReport that will serve the /health endpoint, useful for -// preventing shutdowns due to health-checks when running long backup tasks -func NewInBackupHealthReport(port uint16, lggr logger.Logger) *InBackupHealthReport { - return &InBackupHealthReport{ - server: http.Server{Addr: fmt.Sprintf(":%d", port), ReadHeaderTimeout: time.Second * 5}, +// NewStartUpHealthReport creates a new StartUpHealthReport that will serve the /health endpoint, useful for +// preventing shutdowns due to health-checks when running long backup tasks or migrations +func NewStartUpHealthReport(port uint16, lggr logger.Logger) *StartUpHealthReport { + mux := http.NewServeMux() + return &StartUpHealthReport{ lggr: lggr, + mux: mux, + server: http.Server{Addr: fmt.Sprintf(":%d", port), ReadHeaderTimeout: time.Second * 5, Handler: mux}, } } diff --git a/core/services/health_test.go b/core/services/health_test.go index b95b266ca19..3e5b6d9a2df 100644 --- a/core/services/health_test.go +++ b/core/services/health_test.go @@ -13,13 +13,13 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services" ) -func TestNewInBackupHealthReport(t *testing.T) { +func TestNewStartUpHealthReport(t *testing.T) { lggr, observed := logger.TestLoggerObserved(t, zapcore.InfoLevel) - ibhr := services.NewInBackupHealthReport(1234, lggr) + ibhr := services.NewStartUpHealthReport(1234, lggr) ibhr.Start() require.Eventually(t, func() bool { return observed.Len() >= 1 }, time.Second*5, time.Millisecond*100) - require.Equal(t, "Starting InBackupHealthReport", observed.TakeAll()[0].Message) + require.Equal(t, "Starting StartUpHealthReport", observed.TakeAll()[0].Message) req, err := http.NewRequestWithContext(tests.Context(t), "GET", "http://localhost:1234/health", nil) require.NoError(t, err) @@ -29,5 +29,5 @@ func TestNewInBackupHealthReport(t *testing.T) { ibhr.Stop() require.Eventually(t, func() bool { return observed.Len() >= 1 }, time.Second*5, time.Millisecond*100) - require.Equal(t, "InBackupHealthReport shutdown complete", observed.TakeAll()[0].Message) + require.Equal(t, "StartUpHealthReport shutdown complete", observed.TakeAll()[0].Message) } diff --git a/core/services/job/common.go b/core/services/job/common.go index 055195440b0..92978dd74e2 100644 --- a/core/services/job/common.go +++ b/core/services/job/common.go @@ -5,8 +5,6 @@ import ( "net/url" ) -//go:generate mockery --quiet --name ServiceCtx --output ./mocks/ --case=underscore - type Service interface { Start() error Close() error diff --git a/core/services/job/job_orm_test.go b/core/services/job/job_orm_test.go index 764c517e8e4..6defdeeb614 100644 --- a/core/services/job/job_orm_test.go +++ b/core/services/job/job_orm_test.go @@ -997,6 +997,18 @@ func TestORM_ValidateKeyStoreMatch(t *testing.T) { require.NoError(t, err) }) + t.Run(("test Aptos key validation"), func(t *testing.T) { + ctx := testutils.Context(t) + jb.OCR2OracleSpec.Relay = relay.NetworkAptos + err := job.ValidateKeyStoreMatch(ctx, jb.OCR2OracleSpec, keyStore, "bad key") + require.EqualError(t, err, "no Aptos key matching: \"bad key\"") + + aptosKey, err := keyStore.Aptos().Create(ctx) + require.NoError(t, err) + err = job.ValidateKeyStoreMatch(ctx, jb.OCR2OracleSpec, keyStore, aptosKey.ID()) + require.NoError(t, err) + }) + t.Run("test Mercury ETH key validation", func(t *testing.T) { ctx := testutils.Context(t) jb.OCR2OracleSpec.PluginType = types.Mercury diff --git a/core/services/job/job_pipeline_orm_integration_test.go b/core/services/job/job_pipeline_orm_integration_test.go index f8a43bca34d..ca6cc6f832e 100644 --- a/core/services/job/job_pipeline_orm_integration_test.go +++ b/core/services/job/job_pipeline_orm_integration_test.go @@ -175,7 +175,7 @@ func TestPipelineORM_Integration(t *testing.T) { pipelineSpecID := pipelineSpecs[0].ID // Create the run - runID, _, err := runner.ExecuteAndInsertFinishedRun(testutils.Context(t), pipelineSpecs[0], pipeline.NewVarsFrom(nil), lggr, true) + runID, _, err := runner.ExecuteAndInsertFinishedRun(testutils.Context(t), pipelineSpecs[0], pipeline.NewVarsFrom(nil), true) require.NoError(t, err) // Check the DB for the pipeline.Run diff --git a/core/services/job/kv_orm.go b/core/services/job/kv_orm.go index ba2b8d5f9ab..4f9955b48eb 100644 --- a/core/services/job/kv_orm.go +++ b/core/services/job/kv_orm.go @@ -10,8 +10,6 @@ import ( ) // 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(ctx context.Context, key string, val []byte) error Get(ctx context.Context, key string) ([]byte, error) diff --git a/core/services/job/mocks/kv_store.go b/core/services/job/mocks/kv_store.go index 270a6c1d554..58fb68b4d9c 100644 --- a/core/services/job/mocks/kv_store.go +++ b/core/services/job/mocks/kv_store.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -13,6 +13,14 @@ type KVStore struct { mock.Mock } +type KVStore_Expecter struct { + mock *mock.Mock +} + +func (_m *KVStore) EXPECT() *KVStore_Expecter { + return &KVStore_Expecter{mock: &_m.Mock} +} + // Get provides a mock function with given fields: ctx, key func (_m *KVStore) Get(ctx context.Context, key string) ([]byte, error) { ret := _m.Called(ctx, key) @@ -43,6 +51,35 @@ func (_m *KVStore) Get(ctx context.Context, key string) ([]byte, error) { return r0, r1 } +// KVStore_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type KVStore_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - ctx context.Context +// - key string +func (_e *KVStore_Expecter) Get(ctx interface{}, key interface{}) *KVStore_Get_Call { + return &KVStore_Get_Call{Call: _e.mock.On("Get", ctx, key)} +} + +func (_c *KVStore_Get_Call) Run(run func(ctx context.Context, key string)) *KVStore_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *KVStore_Get_Call) Return(_a0 []byte, _a1 error) *KVStore_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *KVStore_Get_Call) RunAndReturn(run func(context.Context, string) ([]byte, error)) *KVStore_Get_Call { + _c.Call.Return(run) + return _c +} + // Store provides a mock function with given fields: ctx, key, val func (_m *KVStore) Store(ctx context.Context, key string, val []byte) error { ret := _m.Called(ctx, key, val) @@ -61,6 +98,36 @@ func (_m *KVStore) Store(ctx context.Context, key string, val []byte) error { return r0 } +// KVStore_Store_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Store' +type KVStore_Store_Call struct { + *mock.Call +} + +// Store is a helper method to define mock.On call +// - ctx context.Context +// - key string +// - val []byte +func (_e *KVStore_Expecter) Store(ctx interface{}, key interface{}, val interface{}) *KVStore_Store_Call { + return &KVStore_Store_Call{Call: _e.mock.On("Store", ctx, key, val)} +} + +func (_c *KVStore_Store_Call) Run(run func(ctx context.Context, key string, val []byte)) *KVStore_Store_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].([]byte)) + }) + return _c +} + +func (_c *KVStore_Store_Call) Return(_a0 error) *KVStore_Store_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *KVStore_Store_Call) RunAndReturn(run func(context.Context, string, []byte) error) *KVStore_Store_Call { + _c.Call.Return(run) + return _c +} + // 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 { diff --git a/core/services/job/mocks/orm.go b/core/services/job/mocks/orm.go index e8911b25af3..0174d6208cc 100644 --- a/core/services/job/mocks/orm.go +++ b/core/services/job/mocks/orm.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -26,6 +26,14 @@ type ORM struct { mock.Mock } +type ORM_Expecter struct { + mock *mock.Mock +} + +func (_m *ORM) EXPECT() *ORM_Expecter { + return &ORM_Expecter{mock: &_m.Mock} +} + // AssertBridgesExist provides a mock function with given fields: ctx, p func (_m *ORM) AssertBridgesExist(ctx context.Context, p pipeline.Pipeline) error { ret := _m.Called(ctx, p) @@ -44,6 +52,35 @@ func (_m *ORM) AssertBridgesExist(ctx context.Context, p pipeline.Pipeline) erro return r0 } +// ORM_AssertBridgesExist_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AssertBridgesExist' +type ORM_AssertBridgesExist_Call struct { + *mock.Call +} + +// AssertBridgesExist is a helper method to define mock.On call +// - ctx context.Context +// - p pipeline.Pipeline +func (_e *ORM_Expecter) AssertBridgesExist(ctx interface{}, p interface{}) *ORM_AssertBridgesExist_Call { + return &ORM_AssertBridgesExist_Call{Call: _e.mock.On("AssertBridgesExist", ctx, p)} +} + +func (_c *ORM_AssertBridgesExist_Call) Run(run func(ctx context.Context, p pipeline.Pipeline)) *ORM_AssertBridgesExist_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(pipeline.Pipeline)) + }) + return _c +} + +func (_c *ORM_AssertBridgesExist_Call) Return(_a0 error) *ORM_AssertBridgesExist_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_AssertBridgesExist_Call) RunAndReturn(run func(context.Context, pipeline.Pipeline) error) *ORM_AssertBridgesExist_Call { + _c.Call.Return(run) + return _c +} + // Close provides a mock function with given fields: func (_m *ORM) Close() error { ret := _m.Called() @@ -62,6 +99,33 @@ func (_m *ORM) Close() error { return r0 } +// ORM_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type ORM_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *ORM_Expecter) Close() *ORM_Close_Call { + return &ORM_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *ORM_Close_Call) Run(run func()) *ORM_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ORM_Close_Call) Return(_a0 error) *ORM_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_Close_Call) RunAndReturn(run func() error) *ORM_Close_Call { + _c.Call.Return(run) + return _c +} + // CountPipelineRunsByJobID provides a mock function with given fields: ctx, jobID func (_m *ORM) CountPipelineRunsByJobID(ctx context.Context, jobID int32) (int32, error) { ret := _m.Called(ctx, jobID) @@ -90,6 +154,35 @@ func (_m *ORM) CountPipelineRunsByJobID(ctx context.Context, jobID int32) (int32 return r0, r1 } +// ORM_CountPipelineRunsByJobID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CountPipelineRunsByJobID' +type ORM_CountPipelineRunsByJobID_Call struct { + *mock.Call +} + +// CountPipelineRunsByJobID is a helper method to define mock.On call +// - ctx context.Context +// - jobID int32 +func (_e *ORM_Expecter) CountPipelineRunsByJobID(ctx interface{}, jobID interface{}) *ORM_CountPipelineRunsByJobID_Call { + return &ORM_CountPipelineRunsByJobID_Call{Call: _e.mock.On("CountPipelineRunsByJobID", ctx, jobID)} +} + +func (_c *ORM_CountPipelineRunsByJobID_Call) Run(run func(ctx context.Context, jobID int32)) *ORM_CountPipelineRunsByJobID_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int32)) + }) + return _c +} + +func (_c *ORM_CountPipelineRunsByJobID_Call) Return(count int32, err error) *ORM_CountPipelineRunsByJobID_Call { + _c.Call.Return(count, err) + return _c +} + +func (_c *ORM_CountPipelineRunsByJobID_Call) RunAndReturn(run func(context.Context, int32) (int32, error)) *ORM_CountPipelineRunsByJobID_Call { + _c.Call.Return(run) + return _c +} + // CreateJob provides a mock function with given fields: ctx, jb func (_m *ORM) CreateJob(ctx context.Context, jb *job.Job) error { ret := _m.Called(ctx, jb) @@ -108,6 +201,35 @@ func (_m *ORM) CreateJob(ctx context.Context, jb *job.Job) error { return r0 } +// ORM_CreateJob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateJob' +type ORM_CreateJob_Call struct { + *mock.Call +} + +// CreateJob is a helper method to define mock.On call +// - ctx context.Context +// - jb *job.Job +func (_e *ORM_Expecter) CreateJob(ctx interface{}, jb interface{}) *ORM_CreateJob_Call { + return &ORM_CreateJob_Call{Call: _e.mock.On("CreateJob", ctx, jb)} +} + +func (_c *ORM_CreateJob_Call) Run(run func(ctx context.Context, jb *job.Job)) *ORM_CreateJob_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*job.Job)) + }) + return _c +} + +func (_c *ORM_CreateJob_Call) Return(_a0 error) *ORM_CreateJob_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_CreateJob_Call) RunAndReturn(run func(context.Context, *job.Job) error) *ORM_CreateJob_Call { + _c.Call.Return(run) + return _c +} + // DataSource provides a mock function with given fields: func (_m *ORM) DataSource() sqlutil.DataSource { ret := _m.Called() @@ -128,6 +250,33 @@ func (_m *ORM) DataSource() sqlutil.DataSource { return r0 } +// ORM_DataSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DataSource' +type ORM_DataSource_Call struct { + *mock.Call +} + +// DataSource is a helper method to define mock.On call +func (_e *ORM_Expecter) DataSource() *ORM_DataSource_Call { + return &ORM_DataSource_Call{Call: _e.mock.On("DataSource")} +} + +func (_c *ORM_DataSource_Call) Run(run func()) *ORM_DataSource_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ORM_DataSource_Call) Return(_a0 sqlutil.DataSource) *ORM_DataSource_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_DataSource_Call) RunAndReturn(run func() sqlutil.DataSource) *ORM_DataSource_Call { + _c.Call.Return(run) + return _c +} + // DeleteJob provides a mock function with given fields: ctx, id func (_m *ORM) DeleteJob(ctx context.Context, id int32) error { ret := _m.Called(ctx, id) @@ -146,6 +295,35 @@ func (_m *ORM) DeleteJob(ctx context.Context, id int32) error { return r0 } +// ORM_DeleteJob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteJob' +type ORM_DeleteJob_Call struct { + *mock.Call +} + +// DeleteJob is a helper method to define mock.On call +// - ctx context.Context +// - id int32 +func (_e *ORM_Expecter) DeleteJob(ctx interface{}, id interface{}) *ORM_DeleteJob_Call { + return &ORM_DeleteJob_Call{Call: _e.mock.On("DeleteJob", ctx, id)} +} + +func (_c *ORM_DeleteJob_Call) Run(run func(ctx context.Context, id int32)) *ORM_DeleteJob_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int32)) + }) + return _c +} + +func (_c *ORM_DeleteJob_Call) Return(_a0 error) *ORM_DeleteJob_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_DeleteJob_Call) RunAndReturn(run func(context.Context, int32) error) *ORM_DeleteJob_Call { + _c.Call.Return(run) + return _c +} + // DismissError provides a mock function with given fields: ctx, errorID func (_m *ORM) DismissError(ctx context.Context, errorID int64) error { ret := _m.Called(ctx, errorID) @@ -164,6 +342,35 @@ func (_m *ORM) DismissError(ctx context.Context, errorID int64) error { return r0 } +// ORM_DismissError_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DismissError' +type ORM_DismissError_Call struct { + *mock.Call +} + +// DismissError is a helper method to define mock.On call +// - ctx context.Context +// - errorID int64 +func (_e *ORM_Expecter) DismissError(ctx interface{}, errorID interface{}) *ORM_DismissError_Call { + return &ORM_DismissError_Call{Call: _e.mock.On("DismissError", ctx, errorID)} +} + +func (_c *ORM_DismissError_Call) Run(run func(ctx context.Context, errorID int64)) *ORM_DismissError_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64)) + }) + return _c +} + +func (_c *ORM_DismissError_Call) Return(_a0 error) *ORM_DismissError_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_DismissError_Call) RunAndReturn(run func(context.Context, int64) error) *ORM_DismissError_Call { + _c.Call.Return(run) + return _c +} + // FindJob provides a mock function with given fields: ctx, id func (_m *ORM) FindJob(ctx context.Context, id int32) (job.Job, error) { ret := _m.Called(ctx, id) @@ -192,6 +399,35 @@ func (_m *ORM) FindJob(ctx context.Context, id int32) (job.Job, error) { return r0, r1 } +// ORM_FindJob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindJob' +type ORM_FindJob_Call struct { + *mock.Call +} + +// FindJob is a helper method to define mock.On call +// - ctx context.Context +// - id int32 +func (_e *ORM_Expecter) FindJob(ctx interface{}, id interface{}) *ORM_FindJob_Call { + return &ORM_FindJob_Call{Call: _e.mock.On("FindJob", ctx, id)} +} + +func (_c *ORM_FindJob_Call) Run(run func(ctx context.Context, id int32)) *ORM_FindJob_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int32)) + }) + return _c +} + +func (_c *ORM_FindJob_Call) Return(_a0 job.Job, _a1 error) *ORM_FindJob_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ORM_FindJob_Call) RunAndReturn(run func(context.Context, int32) (job.Job, error)) *ORM_FindJob_Call { + _c.Call.Return(run) + return _c +} + // FindJobByExternalJobID provides a mock function with given fields: ctx, _a1 func (_m *ORM) FindJobByExternalJobID(ctx context.Context, _a1 uuid.UUID) (job.Job, error) { ret := _m.Called(ctx, _a1) @@ -220,6 +456,35 @@ func (_m *ORM) FindJobByExternalJobID(ctx context.Context, _a1 uuid.UUID) (job.J return r0, r1 } +// ORM_FindJobByExternalJobID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindJobByExternalJobID' +type ORM_FindJobByExternalJobID_Call struct { + *mock.Call +} + +// FindJobByExternalJobID is a helper method to define mock.On call +// - ctx context.Context +// - _a1 uuid.UUID +func (_e *ORM_Expecter) FindJobByExternalJobID(ctx interface{}, _a1 interface{}) *ORM_FindJobByExternalJobID_Call { + return &ORM_FindJobByExternalJobID_Call{Call: _e.mock.On("FindJobByExternalJobID", ctx, _a1)} +} + +func (_c *ORM_FindJobByExternalJobID_Call) Run(run func(ctx context.Context, _a1 uuid.UUID)) *ORM_FindJobByExternalJobID_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID)) + }) + return _c +} + +func (_c *ORM_FindJobByExternalJobID_Call) Return(_a0 job.Job, _a1 error) *ORM_FindJobByExternalJobID_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ORM_FindJobByExternalJobID_Call) RunAndReturn(run func(context.Context, uuid.UUID) (job.Job, error)) *ORM_FindJobByExternalJobID_Call { + _c.Call.Return(run) + return _c +} + // FindJobIDByAddress provides a mock function with given fields: ctx, address, evmChainID func (_m *ORM) FindJobIDByAddress(ctx context.Context, address types.EIP55Address, evmChainID *big.Big) (int32, error) { ret := _m.Called(ctx, address, evmChainID) @@ -248,6 +513,36 @@ func (_m *ORM) FindJobIDByAddress(ctx context.Context, address types.EIP55Addres return r0, r1 } +// ORM_FindJobIDByAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindJobIDByAddress' +type ORM_FindJobIDByAddress_Call struct { + *mock.Call +} + +// FindJobIDByAddress is a helper method to define mock.On call +// - ctx context.Context +// - address types.EIP55Address +// - evmChainID *big.Big +func (_e *ORM_Expecter) FindJobIDByAddress(ctx interface{}, address interface{}, evmChainID interface{}) *ORM_FindJobIDByAddress_Call { + return &ORM_FindJobIDByAddress_Call{Call: _e.mock.On("FindJobIDByAddress", ctx, address, evmChainID)} +} + +func (_c *ORM_FindJobIDByAddress_Call) Run(run func(ctx context.Context, address types.EIP55Address, evmChainID *big.Big)) *ORM_FindJobIDByAddress_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.EIP55Address), args[2].(*big.Big)) + }) + return _c +} + +func (_c *ORM_FindJobIDByAddress_Call) Return(_a0 int32, _a1 error) *ORM_FindJobIDByAddress_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ORM_FindJobIDByAddress_Call) RunAndReturn(run func(context.Context, types.EIP55Address, *big.Big) (int32, error)) *ORM_FindJobIDByAddress_Call { + _c.Call.Return(run) + return _c +} + // FindJobIDByWorkflow provides a mock function with given fields: ctx, spec func (_m *ORM) FindJobIDByWorkflow(ctx context.Context, spec job.WorkflowSpec) (int32, error) { ret := _m.Called(ctx, spec) @@ -276,6 +571,35 @@ func (_m *ORM) FindJobIDByWorkflow(ctx context.Context, spec job.WorkflowSpec) ( return r0, r1 } +// ORM_FindJobIDByWorkflow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindJobIDByWorkflow' +type ORM_FindJobIDByWorkflow_Call struct { + *mock.Call +} + +// FindJobIDByWorkflow is a helper method to define mock.On call +// - ctx context.Context +// - spec job.WorkflowSpec +func (_e *ORM_Expecter) FindJobIDByWorkflow(ctx interface{}, spec interface{}) *ORM_FindJobIDByWorkflow_Call { + return &ORM_FindJobIDByWorkflow_Call{Call: _e.mock.On("FindJobIDByWorkflow", ctx, spec)} +} + +func (_c *ORM_FindJobIDByWorkflow_Call) Run(run func(ctx context.Context, spec job.WorkflowSpec)) *ORM_FindJobIDByWorkflow_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(job.WorkflowSpec)) + }) + return _c +} + +func (_c *ORM_FindJobIDByWorkflow_Call) Return(_a0 int32, _a1 error) *ORM_FindJobIDByWorkflow_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ORM_FindJobIDByWorkflow_Call) RunAndReturn(run func(context.Context, job.WorkflowSpec) (int32, error)) *ORM_FindJobIDByWorkflow_Call { + _c.Call.Return(run) + return _c +} + // FindJobIDsWithBridge provides a mock function with given fields: ctx, name func (_m *ORM) FindJobIDsWithBridge(ctx context.Context, name string) ([]int32, error) { ret := _m.Called(ctx, name) @@ -306,6 +630,35 @@ func (_m *ORM) FindJobIDsWithBridge(ctx context.Context, name string) ([]int32, return r0, r1 } +// ORM_FindJobIDsWithBridge_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindJobIDsWithBridge' +type ORM_FindJobIDsWithBridge_Call struct { + *mock.Call +} + +// FindJobIDsWithBridge is a helper method to define mock.On call +// - ctx context.Context +// - name string +func (_e *ORM_Expecter) FindJobIDsWithBridge(ctx interface{}, name interface{}) *ORM_FindJobIDsWithBridge_Call { + return &ORM_FindJobIDsWithBridge_Call{Call: _e.mock.On("FindJobIDsWithBridge", ctx, name)} +} + +func (_c *ORM_FindJobIDsWithBridge_Call) Run(run func(ctx context.Context, name string)) *ORM_FindJobIDsWithBridge_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *ORM_FindJobIDsWithBridge_Call) Return(_a0 []int32, _a1 error) *ORM_FindJobIDsWithBridge_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ORM_FindJobIDsWithBridge_Call) RunAndReturn(run func(context.Context, string) ([]int32, error)) *ORM_FindJobIDsWithBridge_Call { + _c.Call.Return(run) + return _c +} + // FindJobTx provides a mock function with given fields: ctx, id func (_m *ORM) FindJobTx(ctx context.Context, id int32) (job.Job, error) { ret := _m.Called(ctx, id) @@ -334,6 +687,35 @@ func (_m *ORM) FindJobTx(ctx context.Context, id int32) (job.Job, error) { return r0, r1 } +// ORM_FindJobTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindJobTx' +type ORM_FindJobTx_Call struct { + *mock.Call +} + +// FindJobTx is a helper method to define mock.On call +// - ctx context.Context +// - id int32 +func (_e *ORM_Expecter) FindJobTx(ctx interface{}, id interface{}) *ORM_FindJobTx_Call { + return &ORM_FindJobTx_Call{Call: _e.mock.On("FindJobTx", ctx, id)} +} + +func (_c *ORM_FindJobTx_Call) Run(run func(ctx context.Context, id int32)) *ORM_FindJobTx_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int32)) + }) + return _c +} + +func (_c *ORM_FindJobTx_Call) Return(_a0 job.Job, _a1 error) *ORM_FindJobTx_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ORM_FindJobTx_Call) RunAndReturn(run func(context.Context, int32) (job.Job, error)) *ORM_FindJobTx_Call { + _c.Call.Return(run) + return _c +} + // FindJobWithoutSpecErrors provides a mock function with given fields: ctx, id func (_m *ORM) FindJobWithoutSpecErrors(ctx context.Context, id int32) (job.Job, error) { ret := _m.Called(ctx, id) @@ -362,6 +744,35 @@ func (_m *ORM) FindJobWithoutSpecErrors(ctx context.Context, id int32) (job.Job, return r0, r1 } +// ORM_FindJobWithoutSpecErrors_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindJobWithoutSpecErrors' +type ORM_FindJobWithoutSpecErrors_Call struct { + *mock.Call +} + +// FindJobWithoutSpecErrors is a helper method to define mock.On call +// - ctx context.Context +// - id int32 +func (_e *ORM_Expecter) FindJobWithoutSpecErrors(ctx interface{}, id interface{}) *ORM_FindJobWithoutSpecErrors_Call { + return &ORM_FindJobWithoutSpecErrors_Call{Call: _e.mock.On("FindJobWithoutSpecErrors", ctx, id)} +} + +func (_c *ORM_FindJobWithoutSpecErrors_Call) Run(run func(ctx context.Context, id int32)) *ORM_FindJobWithoutSpecErrors_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int32)) + }) + return _c +} + +func (_c *ORM_FindJobWithoutSpecErrors_Call) Return(jb job.Job, err error) *ORM_FindJobWithoutSpecErrors_Call { + _c.Call.Return(jb, err) + return _c +} + +func (_c *ORM_FindJobWithoutSpecErrors_Call) RunAndReturn(run func(context.Context, int32) (job.Job, error)) *ORM_FindJobWithoutSpecErrors_Call { + _c.Call.Return(run) + return _c +} + // FindJobs provides a mock function with given fields: ctx, offset, limit func (_m *ORM) FindJobs(ctx context.Context, offset int, limit int) ([]job.Job, int, error) { ret := _m.Called(ctx, offset, limit) @@ -399,6 +810,36 @@ func (_m *ORM) FindJobs(ctx context.Context, offset int, limit int) ([]job.Job, return r0, r1, r2 } +// ORM_FindJobs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindJobs' +type ORM_FindJobs_Call struct { + *mock.Call +} + +// FindJobs is a helper method to define mock.On call +// - ctx context.Context +// - offset int +// - limit int +func (_e *ORM_Expecter) FindJobs(ctx interface{}, offset interface{}, limit interface{}) *ORM_FindJobs_Call { + return &ORM_FindJobs_Call{Call: _e.mock.On("FindJobs", ctx, offset, limit)} +} + +func (_c *ORM_FindJobs_Call) Run(run func(ctx context.Context, offset int, limit int)) *ORM_FindJobs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int), args[2].(int)) + }) + return _c +} + +func (_c *ORM_FindJobs_Call) Return(_a0 []job.Job, _a1 int, _a2 error) *ORM_FindJobs_Call { + _c.Call.Return(_a0, _a1, _a2) + return _c +} + +func (_c *ORM_FindJobs_Call) RunAndReturn(run func(context.Context, int, int) ([]job.Job, int, error)) *ORM_FindJobs_Call { + _c.Call.Return(run) + return _c +} + // FindJobsByPipelineSpecIDs provides a mock function with given fields: ctx, ids func (_m *ORM) FindJobsByPipelineSpecIDs(ctx context.Context, ids []int32) ([]job.Job, error) { ret := _m.Called(ctx, ids) @@ -429,6 +870,35 @@ func (_m *ORM) FindJobsByPipelineSpecIDs(ctx context.Context, ids []int32) ([]jo return r0, r1 } +// ORM_FindJobsByPipelineSpecIDs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindJobsByPipelineSpecIDs' +type ORM_FindJobsByPipelineSpecIDs_Call struct { + *mock.Call +} + +// FindJobsByPipelineSpecIDs is a helper method to define mock.On call +// - ctx context.Context +// - ids []int32 +func (_e *ORM_Expecter) FindJobsByPipelineSpecIDs(ctx interface{}, ids interface{}) *ORM_FindJobsByPipelineSpecIDs_Call { + return &ORM_FindJobsByPipelineSpecIDs_Call{Call: _e.mock.On("FindJobsByPipelineSpecIDs", ctx, ids)} +} + +func (_c *ORM_FindJobsByPipelineSpecIDs_Call) Run(run func(ctx context.Context, ids []int32)) *ORM_FindJobsByPipelineSpecIDs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]int32)) + }) + return _c +} + +func (_c *ORM_FindJobsByPipelineSpecIDs_Call) Return(_a0 []job.Job, _a1 error) *ORM_FindJobsByPipelineSpecIDs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ORM_FindJobsByPipelineSpecIDs_Call) RunAndReturn(run func(context.Context, []int32) ([]job.Job, error)) *ORM_FindJobsByPipelineSpecIDs_Call { + _c.Call.Return(run) + return _c +} + // FindOCR2JobIDByAddress provides a mock function with given fields: ctx, contractID, feedID func (_m *ORM) FindOCR2JobIDByAddress(ctx context.Context, contractID string, feedID *common.Hash) (int32, error) { ret := _m.Called(ctx, contractID, feedID) @@ -457,6 +927,36 @@ func (_m *ORM) FindOCR2JobIDByAddress(ctx context.Context, contractID string, fe return r0, r1 } +// ORM_FindOCR2JobIDByAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindOCR2JobIDByAddress' +type ORM_FindOCR2JobIDByAddress_Call struct { + *mock.Call +} + +// FindOCR2JobIDByAddress is a helper method to define mock.On call +// - ctx context.Context +// - contractID string +// - feedID *common.Hash +func (_e *ORM_Expecter) FindOCR2JobIDByAddress(ctx interface{}, contractID interface{}, feedID interface{}) *ORM_FindOCR2JobIDByAddress_Call { + return &ORM_FindOCR2JobIDByAddress_Call{Call: _e.mock.On("FindOCR2JobIDByAddress", ctx, contractID, feedID)} +} + +func (_c *ORM_FindOCR2JobIDByAddress_Call) Run(run func(ctx context.Context, contractID string, feedID *common.Hash)) *ORM_FindOCR2JobIDByAddress_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(*common.Hash)) + }) + return _c +} + +func (_c *ORM_FindOCR2JobIDByAddress_Call) Return(_a0 int32, _a1 error) *ORM_FindOCR2JobIDByAddress_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ORM_FindOCR2JobIDByAddress_Call) RunAndReturn(run func(context.Context, string, *common.Hash) (int32, error)) *ORM_FindOCR2JobIDByAddress_Call { + _c.Call.Return(run) + return _c +} + // FindPipelineRunByID provides a mock function with given fields: ctx, id func (_m *ORM) FindPipelineRunByID(ctx context.Context, id int64) (pipeline.Run, error) { ret := _m.Called(ctx, id) @@ -485,6 +985,35 @@ func (_m *ORM) FindPipelineRunByID(ctx context.Context, id int64) (pipeline.Run, return r0, r1 } +// ORM_FindPipelineRunByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindPipelineRunByID' +type ORM_FindPipelineRunByID_Call struct { + *mock.Call +} + +// FindPipelineRunByID is a helper method to define mock.On call +// - ctx context.Context +// - id int64 +func (_e *ORM_Expecter) FindPipelineRunByID(ctx interface{}, id interface{}) *ORM_FindPipelineRunByID_Call { + return &ORM_FindPipelineRunByID_Call{Call: _e.mock.On("FindPipelineRunByID", ctx, id)} +} + +func (_c *ORM_FindPipelineRunByID_Call) Run(run func(ctx context.Context, id int64)) *ORM_FindPipelineRunByID_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64)) + }) + return _c +} + +func (_c *ORM_FindPipelineRunByID_Call) Return(_a0 pipeline.Run, _a1 error) *ORM_FindPipelineRunByID_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ORM_FindPipelineRunByID_Call) RunAndReturn(run func(context.Context, int64) (pipeline.Run, error)) *ORM_FindPipelineRunByID_Call { + _c.Call.Return(run) + return _c +} + // FindPipelineRunIDsByJobID provides a mock function with given fields: ctx, jobID, offset, limit func (_m *ORM) FindPipelineRunIDsByJobID(ctx context.Context, jobID int32, offset int, limit int) ([]int64, error) { ret := _m.Called(ctx, jobID, offset, limit) @@ -515,6 +1044,37 @@ func (_m *ORM) FindPipelineRunIDsByJobID(ctx context.Context, jobID int32, offse return r0, r1 } +// ORM_FindPipelineRunIDsByJobID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindPipelineRunIDsByJobID' +type ORM_FindPipelineRunIDsByJobID_Call struct { + *mock.Call +} + +// FindPipelineRunIDsByJobID is a helper method to define mock.On call +// - ctx context.Context +// - jobID int32 +// - offset int +// - limit int +func (_e *ORM_Expecter) FindPipelineRunIDsByJobID(ctx interface{}, jobID interface{}, offset interface{}, limit interface{}) *ORM_FindPipelineRunIDsByJobID_Call { + return &ORM_FindPipelineRunIDsByJobID_Call{Call: _e.mock.On("FindPipelineRunIDsByJobID", ctx, jobID, offset, limit)} +} + +func (_c *ORM_FindPipelineRunIDsByJobID_Call) Run(run func(ctx context.Context, jobID int32, offset int, limit int)) *ORM_FindPipelineRunIDsByJobID_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int32), args[2].(int), args[3].(int)) + }) + return _c +} + +func (_c *ORM_FindPipelineRunIDsByJobID_Call) Return(ids []int64, err error) *ORM_FindPipelineRunIDsByJobID_Call { + _c.Call.Return(ids, err) + return _c +} + +func (_c *ORM_FindPipelineRunIDsByJobID_Call) RunAndReturn(run func(context.Context, int32, int, int) ([]int64, error)) *ORM_FindPipelineRunIDsByJobID_Call { + _c.Call.Return(run) + return _c +} + // FindPipelineRunsByIDs provides a mock function with given fields: ctx, ids func (_m *ORM) FindPipelineRunsByIDs(ctx context.Context, ids []int64) ([]pipeline.Run, error) { ret := _m.Called(ctx, ids) @@ -545,6 +1105,35 @@ func (_m *ORM) FindPipelineRunsByIDs(ctx context.Context, ids []int64) ([]pipeli return r0, r1 } +// ORM_FindPipelineRunsByIDs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindPipelineRunsByIDs' +type ORM_FindPipelineRunsByIDs_Call struct { + *mock.Call +} + +// FindPipelineRunsByIDs is a helper method to define mock.On call +// - ctx context.Context +// - ids []int64 +func (_e *ORM_Expecter) FindPipelineRunsByIDs(ctx interface{}, ids interface{}) *ORM_FindPipelineRunsByIDs_Call { + return &ORM_FindPipelineRunsByIDs_Call{Call: _e.mock.On("FindPipelineRunsByIDs", ctx, ids)} +} + +func (_c *ORM_FindPipelineRunsByIDs_Call) Run(run func(ctx context.Context, ids []int64)) *ORM_FindPipelineRunsByIDs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]int64)) + }) + return _c +} + +func (_c *ORM_FindPipelineRunsByIDs_Call) Return(runs []pipeline.Run, err error) *ORM_FindPipelineRunsByIDs_Call { + _c.Call.Return(runs, err) + return _c +} + +func (_c *ORM_FindPipelineRunsByIDs_Call) RunAndReturn(run func(context.Context, []int64) ([]pipeline.Run, error)) *ORM_FindPipelineRunsByIDs_Call { + _c.Call.Return(run) + return _c +} + // FindSpecError provides a mock function with given fields: ctx, id func (_m *ORM) FindSpecError(ctx context.Context, id int64) (job.SpecError, error) { ret := _m.Called(ctx, id) @@ -573,6 +1162,35 @@ func (_m *ORM) FindSpecError(ctx context.Context, id int64) (job.SpecError, erro return r0, r1 } +// ORM_FindSpecError_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindSpecError' +type ORM_FindSpecError_Call struct { + *mock.Call +} + +// FindSpecError is a helper method to define mock.On call +// - ctx context.Context +// - id int64 +func (_e *ORM_Expecter) FindSpecError(ctx interface{}, id interface{}) *ORM_FindSpecError_Call { + return &ORM_FindSpecError_Call{Call: _e.mock.On("FindSpecError", ctx, id)} +} + +func (_c *ORM_FindSpecError_Call) Run(run func(ctx context.Context, id int64)) *ORM_FindSpecError_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64)) + }) + return _c +} + +func (_c *ORM_FindSpecError_Call) Return(_a0 job.SpecError, _a1 error) *ORM_FindSpecError_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ORM_FindSpecError_Call) RunAndReturn(run func(context.Context, int64) (job.SpecError, error)) *ORM_FindSpecError_Call { + _c.Call.Return(run) + return _c +} + // FindSpecErrorsByJobIDs provides a mock function with given fields: ctx, ids func (_m *ORM) FindSpecErrorsByJobIDs(ctx context.Context, ids []int32) ([]job.SpecError, error) { ret := _m.Called(ctx, ids) @@ -603,6 +1221,35 @@ func (_m *ORM) FindSpecErrorsByJobIDs(ctx context.Context, ids []int32) ([]job.S return r0, r1 } +// ORM_FindSpecErrorsByJobIDs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindSpecErrorsByJobIDs' +type ORM_FindSpecErrorsByJobIDs_Call struct { + *mock.Call +} + +// FindSpecErrorsByJobIDs is a helper method to define mock.On call +// - ctx context.Context +// - ids []int32 +func (_e *ORM_Expecter) FindSpecErrorsByJobIDs(ctx interface{}, ids interface{}) *ORM_FindSpecErrorsByJobIDs_Call { + return &ORM_FindSpecErrorsByJobIDs_Call{Call: _e.mock.On("FindSpecErrorsByJobIDs", ctx, ids)} +} + +func (_c *ORM_FindSpecErrorsByJobIDs_Call) Run(run func(ctx context.Context, ids []int32)) *ORM_FindSpecErrorsByJobIDs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]int32)) + }) + return _c +} + +func (_c *ORM_FindSpecErrorsByJobIDs_Call) Return(_a0 []job.SpecError, _a1 error) *ORM_FindSpecErrorsByJobIDs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ORM_FindSpecErrorsByJobIDs_Call) RunAndReturn(run func(context.Context, []int32) ([]job.SpecError, error)) *ORM_FindSpecErrorsByJobIDs_Call { + _c.Call.Return(run) + return _c +} + // FindTaskResultByRunIDAndTaskName provides a mock function with given fields: ctx, runID, taskName func (_m *ORM) FindTaskResultByRunIDAndTaskName(ctx context.Context, runID int64, taskName string) ([]byte, error) { ret := _m.Called(ctx, runID, taskName) @@ -633,6 +1280,36 @@ func (_m *ORM) FindTaskResultByRunIDAndTaskName(ctx context.Context, runID int64 return r0, r1 } +// ORM_FindTaskResultByRunIDAndTaskName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindTaskResultByRunIDAndTaskName' +type ORM_FindTaskResultByRunIDAndTaskName_Call struct { + *mock.Call +} + +// FindTaskResultByRunIDAndTaskName is a helper method to define mock.On call +// - ctx context.Context +// - runID int64 +// - taskName string +func (_e *ORM_Expecter) FindTaskResultByRunIDAndTaskName(ctx interface{}, runID interface{}, taskName interface{}) *ORM_FindTaskResultByRunIDAndTaskName_Call { + return &ORM_FindTaskResultByRunIDAndTaskName_Call{Call: _e.mock.On("FindTaskResultByRunIDAndTaskName", ctx, runID, taskName)} +} + +func (_c *ORM_FindTaskResultByRunIDAndTaskName_Call) Run(run func(ctx context.Context, runID int64, taskName string)) *ORM_FindTaskResultByRunIDAndTaskName_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64), args[2].(string)) + }) + return _c +} + +func (_c *ORM_FindTaskResultByRunIDAndTaskName_Call) Return(_a0 []byte, _a1 error) *ORM_FindTaskResultByRunIDAndTaskName_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ORM_FindTaskResultByRunIDAndTaskName_Call) RunAndReturn(run func(context.Context, int64, string) ([]byte, error)) *ORM_FindTaskResultByRunIDAndTaskName_Call { + _c.Call.Return(run) + return _c +} + // InsertJob provides a mock function with given fields: ctx, _a1 func (_m *ORM) InsertJob(ctx context.Context, _a1 *job.Job) error { ret := _m.Called(ctx, _a1) @@ -651,6 +1328,35 @@ func (_m *ORM) InsertJob(ctx context.Context, _a1 *job.Job) error { return r0 } +// ORM_InsertJob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsertJob' +type ORM_InsertJob_Call struct { + *mock.Call +} + +// InsertJob is a helper method to define mock.On call +// - ctx context.Context +// - _a1 *job.Job +func (_e *ORM_Expecter) InsertJob(ctx interface{}, _a1 interface{}) *ORM_InsertJob_Call { + return &ORM_InsertJob_Call{Call: _e.mock.On("InsertJob", ctx, _a1)} +} + +func (_c *ORM_InsertJob_Call) Run(run func(ctx context.Context, _a1 *job.Job)) *ORM_InsertJob_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*job.Job)) + }) + return _c +} + +func (_c *ORM_InsertJob_Call) Return(_a0 error) *ORM_InsertJob_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_InsertJob_Call) RunAndReturn(run func(context.Context, *job.Job) error) *ORM_InsertJob_Call { + _c.Call.Return(run) + return _c +} + // InsertWebhookSpec provides a mock function with given fields: ctx, webhookSpec func (_m *ORM) InsertWebhookSpec(ctx context.Context, webhookSpec *job.WebhookSpec) error { ret := _m.Called(ctx, webhookSpec) @@ -669,6 +1375,35 @@ func (_m *ORM) InsertWebhookSpec(ctx context.Context, webhookSpec *job.WebhookSp return r0 } +// ORM_InsertWebhookSpec_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsertWebhookSpec' +type ORM_InsertWebhookSpec_Call struct { + *mock.Call +} + +// InsertWebhookSpec is a helper method to define mock.On call +// - ctx context.Context +// - webhookSpec *job.WebhookSpec +func (_e *ORM_Expecter) InsertWebhookSpec(ctx interface{}, webhookSpec interface{}) *ORM_InsertWebhookSpec_Call { + return &ORM_InsertWebhookSpec_Call{Call: _e.mock.On("InsertWebhookSpec", ctx, webhookSpec)} +} + +func (_c *ORM_InsertWebhookSpec_Call) Run(run func(ctx context.Context, webhookSpec *job.WebhookSpec)) *ORM_InsertWebhookSpec_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*job.WebhookSpec)) + }) + return _c +} + +func (_c *ORM_InsertWebhookSpec_Call) Return(_a0 error) *ORM_InsertWebhookSpec_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_InsertWebhookSpec_Call) RunAndReturn(run func(context.Context, *job.WebhookSpec) error) *ORM_InsertWebhookSpec_Call { + _c.Call.Return(run) + return _c +} + // PipelineRuns provides a mock function with given fields: ctx, jobID, offset, size func (_m *ORM) PipelineRuns(ctx context.Context, jobID *int32, offset int, size int) ([]pipeline.Run, int, error) { ret := _m.Called(ctx, jobID, offset, size) @@ -706,6 +1441,37 @@ func (_m *ORM) PipelineRuns(ctx context.Context, jobID *int32, offset int, size return r0, r1, r2 } +// ORM_PipelineRuns_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PipelineRuns' +type ORM_PipelineRuns_Call struct { + *mock.Call +} + +// PipelineRuns is a helper method to define mock.On call +// - ctx context.Context +// - jobID *int32 +// - offset int +// - size int +func (_e *ORM_Expecter) PipelineRuns(ctx interface{}, jobID interface{}, offset interface{}, size interface{}) *ORM_PipelineRuns_Call { + return &ORM_PipelineRuns_Call{Call: _e.mock.On("PipelineRuns", ctx, jobID, offset, size)} +} + +func (_c *ORM_PipelineRuns_Call) Run(run func(ctx context.Context, jobID *int32, offset int, size int)) *ORM_PipelineRuns_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*int32), args[2].(int), args[3].(int)) + }) + return _c +} + +func (_c *ORM_PipelineRuns_Call) Return(_a0 []pipeline.Run, _a1 int, _a2 error) *ORM_PipelineRuns_Call { + _c.Call.Return(_a0, _a1, _a2) + return _c +} + +func (_c *ORM_PipelineRuns_Call) RunAndReturn(run func(context.Context, *int32, int, int) ([]pipeline.Run, int, error)) *ORM_PipelineRuns_Call { + _c.Call.Return(run) + return _c +} + // RecordError provides a mock function with given fields: ctx, jobID, description func (_m *ORM) RecordError(ctx context.Context, jobID int32, description string) error { ret := _m.Called(ctx, jobID, description) @@ -724,11 +1490,71 @@ func (_m *ORM) RecordError(ctx context.Context, jobID int32, description string) return r0 } +// ORM_RecordError_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RecordError' +type ORM_RecordError_Call struct { + *mock.Call +} + +// RecordError is a helper method to define mock.On call +// - ctx context.Context +// - jobID int32 +// - description string +func (_e *ORM_Expecter) RecordError(ctx interface{}, jobID interface{}, description interface{}) *ORM_RecordError_Call { + return &ORM_RecordError_Call{Call: _e.mock.On("RecordError", ctx, jobID, description)} +} + +func (_c *ORM_RecordError_Call) Run(run func(ctx context.Context, jobID int32, description string)) *ORM_RecordError_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int32), args[2].(string)) + }) + return _c +} + +func (_c *ORM_RecordError_Call) Return(_a0 error) *ORM_RecordError_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_RecordError_Call) RunAndReturn(run func(context.Context, int32, string) error) *ORM_RecordError_Call { + _c.Call.Return(run) + return _c +} + // TryRecordError provides a mock function with given fields: ctx, jobID, description func (_m *ORM) TryRecordError(ctx context.Context, jobID int32, description string) { _m.Called(ctx, jobID, description) } +// ORM_TryRecordError_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TryRecordError' +type ORM_TryRecordError_Call struct { + *mock.Call +} + +// TryRecordError is a helper method to define mock.On call +// - ctx context.Context +// - jobID int32 +// - description string +func (_e *ORM_Expecter) TryRecordError(ctx interface{}, jobID interface{}, description interface{}) *ORM_TryRecordError_Call { + return &ORM_TryRecordError_Call{Call: _e.mock.On("TryRecordError", ctx, jobID, description)} +} + +func (_c *ORM_TryRecordError_Call) Run(run func(ctx context.Context, jobID int32, description string)) *ORM_TryRecordError_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int32), args[2].(string)) + }) + return _c +} + +func (_c *ORM_TryRecordError_Call) Return() *ORM_TryRecordError_Call { + _c.Call.Return() + return _c +} + +func (_c *ORM_TryRecordError_Call) RunAndReturn(run func(context.Context, int32, string)) *ORM_TryRecordError_Call { + _c.Call.Return(run) + return _c +} + // WithDataSource provides a mock function with given fields: source func (_m *ORM) WithDataSource(source sqlutil.DataSource) job.ORM { ret := _m.Called(source) @@ -749,6 +1575,34 @@ func (_m *ORM) WithDataSource(source sqlutil.DataSource) job.ORM { return r0 } +// ORM_WithDataSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithDataSource' +type ORM_WithDataSource_Call struct { + *mock.Call +} + +// WithDataSource is a helper method to define mock.On call +// - source sqlutil.DataSource +func (_e *ORM_Expecter) WithDataSource(source interface{}) *ORM_WithDataSource_Call { + return &ORM_WithDataSource_Call{Call: _e.mock.On("WithDataSource", source)} +} + +func (_c *ORM_WithDataSource_Call) Run(run func(source sqlutil.DataSource)) *ORM_WithDataSource_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(sqlutil.DataSource)) + }) + return _c +} + +func (_c *ORM_WithDataSource_Call) Return(_a0 job.ORM) *ORM_WithDataSource_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_WithDataSource_Call) RunAndReturn(run func(sqlutil.DataSource) job.ORM) *ORM_WithDataSource_Call { + _c.Call.Return(run) + return _c +} + // NewORM creates a new instance of ORM. 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 NewORM(t interface { diff --git a/core/services/job/mocks/service_ctx.go b/core/services/job/mocks/service_ctx.go index d01ef619be3..1bacc42c1aa 100644 --- a/core/services/job/mocks/service_ctx.go +++ b/core/services/job/mocks/service_ctx.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -13,6 +13,14 @@ type ServiceCtx struct { mock.Mock } +type ServiceCtx_Expecter struct { + mock *mock.Mock +} + +func (_m *ServiceCtx) EXPECT() *ServiceCtx_Expecter { + return &ServiceCtx_Expecter{mock: &_m.Mock} +} + // Close provides a mock function with given fields: func (_m *ServiceCtx) Close() error { ret := _m.Called() @@ -31,6 +39,33 @@ func (_m *ServiceCtx) Close() error { return r0 } +// ServiceCtx_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type ServiceCtx_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *ServiceCtx_Expecter) Close() *ServiceCtx_Close_Call { + return &ServiceCtx_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *ServiceCtx_Close_Call) Run(run func()) *ServiceCtx_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ServiceCtx_Close_Call) Return(_a0 error) *ServiceCtx_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ServiceCtx_Close_Call) RunAndReturn(run func() error) *ServiceCtx_Close_Call { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *ServiceCtx) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -49,6 +84,34 @@ func (_m *ServiceCtx) Start(_a0 context.Context) error { return r0 } +// ServiceCtx_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type ServiceCtx_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *ServiceCtx_Expecter) Start(_a0 interface{}) *ServiceCtx_Start_Call { + return &ServiceCtx_Start_Call{Call: _e.mock.On("Start", _a0)} +} + +func (_c *ServiceCtx_Start_Call) Run(run func(_a0 context.Context)) *ServiceCtx_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *ServiceCtx_Start_Call) Return(_a0 error) *ServiceCtx_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ServiceCtx_Start_Call) RunAndReturn(run func(context.Context) error) *ServiceCtx_Start_Call { + _c.Call.Return(run) + return _c +} + // NewServiceCtx creates a new instance of ServiceCtx. 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 NewServiceCtx(t interface { diff --git a/core/services/job/mocks/spawner.go b/core/services/job/mocks/spawner.go index 7127636cdbb..d44d9bda179 100644 --- a/core/services/job/mocks/spawner.go +++ b/core/services/job/mocks/spawner.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -16,6 +16,14 @@ type Spawner struct { mock.Mock } +type Spawner_Expecter struct { + mock *mock.Mock +} + +func (_m *Spawner) EXPECT() *Spawner_Expecter { + return &Spawner_Expecter{mock: &_m.Mock} +} + // ActiveJobs provides a mock function with given fields: func (_m *Spawner) ActiveJobs() map[int32]job.Job { ret := _m.Called() @@ -36,6 +44,33 @@ func (_m *Spawner) ActiveJobs() map[int32]job.Job { return r0 } +// Spawner_ActiveJobs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ActiveJobs' +type Spawner_ActiveJobs_Call struct { + *mock.Call +} + +// ActiveJobs is a helper method to define mock.On call +func (_e *Spawner_Expecter) ActiveJobs() *Spawner_ActiveJobs_Call { + return &Spawner_ActiveJobs_Call{Call: _e.mock.On("ActiveJobs")} +} + +func (_c *Spawner_ActiveJobs_Call) Run(run func()) *Spawner_ActiveJobs_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Spawner_ActiveJobs_Call) Return(_a0 map[int32]job.Job) *Spawner_ActiveJobs_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Spawner_ActiveJobs_Call) RunAndReturn(run func() map[int32]job.Job) *Spawner_ActiveJobs_Call { + _c.Call.Return(run) + return _c +} + // Close provides a mock function with given fields: func (_m *Spawner) Close() error { ret := _m.Called() @@ -54,6 +89,33 @@ func (_m *Spawner) Close() error { return r0 } +// Spawner_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type Spawner_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *Spawner_Expecter) Close() *Spawner_Close_Call { + return &Spawner_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *Spawner_Close_Call) Run(run func()) *Spawner_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Spawner_Close_Call) Return(_a0 error) *Spawner_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Spawner_Close_Call) RunAndReturn(run func() error) *Spawner_Close_Call { + _c.Call.Return(run) + return _c +} + // CreateJob provides a mock function with given fields: ctx, ds, jb func (_m *Spawner) CreateJob(ctx context.Context, ds sqlutil.DataSource, jb *job.Job) error { ret := _m.Called(ctx, ds, jb) @@ -72,6 +134,36 @@ func (_m *Spawner) CreateJob(ctx context.Context, ds sqlutil.DataSource, jb *job return r0 } +// Spawner_CreateJob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateJob' +type Spawner_CreateJob_Call struct { + *mock.Call +} + +// CreateJob is a helper method to define mock.On call +// - ctx context.Context +// - ds sqlutil.DataSource +// - jb *job.Job +func (_e *Spawner_Expecter) CreateJob(ctx interface{}, ds interface{}, jb interface{}) *Spawner_CreateJob_Call { + return &Spawner_CreateJob_Call{Call: _e.mock.On("CreateJob", ctx, ds, jb)} +} + +func (_c *Spawner_CreateJob_Call) Run(run func(ctx context.Context, ds sqlutil.DataSource, jb *job.Job)) *Spawner_CreateJob_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(sqlutil.DataSource), args[2].(*job.Job)) + }) + return _c +} + +func (_c *Spawner_CreateJob_Call) Return(err error) *Spawner_CreateJob_Call { + _c.Call.Return(err) + return _c +} + +func (_c *Spawner_CreateJob_Call) RunAndReturn(run func(context.Context, sqlutil.DataSource, *job.Job) error) *Spawner_CreateJob_Call { + _c.Call.Return(run) + return _c +} + // DeleteJob provides a mock function with given fields: ctx, ds, jobID func (_m *Spawner) DeleteJob(ctx context.Context, ds sqlutil.DataSource, jobID int32) error { ret := _m.Called(ctx, ds, jobID) @@ -90,6 +182,36 @@ func (_m *Spawner) DeleteJob(ctx context.Context, ds sqlutil.DataSource, jobID i return r0 } +// Spawner_DeleteJob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteJob' +type Spawner_DeleteJob_Call struct { + *mock.Call +} + +// DeleteJob is a helper method to define mock.On call +// - ctx context.Context +// - ds sqlutil.DataSource +// - jobID int32 +func (_e *Spawner_Expecter) DeleteJob(ctx interface{}, ds interface{}, jobID interface{}) *Spawner_DeleteJob_Call { + return &Spawner_DeleteJob_Call{Call: _e.mock.On("DeleteJob", ctx, ds, jobID)} +} + +func (_c *Spawner_DeleteJob_Call) Run(run func(ctx context.Context, ds sqlutil.DataSource, jobID int32)) *Spawner_DeleteJob_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(sqlutil.DataSource), args[2].(int32)) + }) + return _c +} + +func (_c *Spawner_DeleteJob_Call) Return(_a0 error) *Spawner_DeleteJob_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Spawner_DeleteJob_Call) RunAndReturn(run func(context.Context, sqlutil.DataSource, int32) error) *Spawner_DeleteJob_Call { + _c.Call.Return(run) + return _c +} + // HealthReport provides a mock function with given fields: func (_m *Spawner) HealthReport() map[string]error { ret := _m.Called() @@ -110,6 +232,33 @@ func (_m *Spawner) HealthReport() map[string]error { return r0 } +// Spawner_HealthReport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HealthReport' +type Spawner_HealthReport_Call struct { + *mock.Call +} + +// HealthReport is a helper method to define mock.On call +func (_e *Spawner_Expecter) HealthReport() *Spawner_HealthReport_Call { + return &Spawner_HealthReport_Call{Call: _e.mock.On("HealthReport")} +} + +func (_c *Spawner_HealthReport_Call) Run(run func()) *Spawner_HealthReport_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Spawner_HealthReport_Call) Return(_a0 map[string]error) *Spawner_HealthReport_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Spawner_HealthReport_Call) RunAndReturn(run func() map[string]error) *Spawner_HealthReport_Call { + _c.Call.Return(run) + return _c +} + // Name provides a mock function with given fields: func (_m *Spawner) Name() string { ret := _m.Called() @@ -128,6 +277,33 @@ func (_m *Spawner) Name() string { return r0 } +// Spawner_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type Spawner_Name_Call struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *Spawner_Expecter) Name() *Spawner_Name_Call { + return &Spawner_Name_Call{Call: _e.mock.On("Name")} +} + +func (_c *Spawner_Name_Call) Run(run func()) *Spawner_Name_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Spawner_Name_Call) Return(_a0 string) *Spawner_Name_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Spawner_Name_Call) RunAndReturn(run func() string) *Spawner_Name_Call { + _c.Call.Return(run) + return _c +} + // Ready provides a mock function with given fields: func (_m *Spawner) Ready() error { ret := _m.Called() @@ -146,6 +322,33 @@ func (_m *Spawner) Ready() error { return r0 } +// Spawner_Ready_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ready' +type Spawner_Ready_Call struct { + *mock.Call +} + +// Ready is a helper method to define mock.On call +func (_e *Spawner_Expecter) Ready() *Spawner_Ready_Call { + return &Spawner_Ready_Call{Call: _e.mock.On("Ready")} +} + +func (_c *Spawner_Ready_Call) Run(run func()) *Spawner_Ready_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Spawner_Ready_Call) Return(_a0 error) *Spawner_Ready_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Spawner_Ready_Call) RunAndReturn(run func() error) *Spawner_Ready_Call { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *Spawner) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -164,6 +367,34 @@ func (_m *Spawner) Start(_a0 context.Context) error { return r0 } +// Spawner_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type Spawner_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *Spawner_Expecter) Start(_a0 interface{}) *Spawner_Start_Call { + return &Spawner_Start_Call{Call: _e.mock.On("Start", _a0)} +} + +func (_c *Spawner_Start_Call) Run(run func(_a0 context.Context)) *Spawner_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Spawner_Start_Call) Return(_a0 error) *Spawner_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Spawner_Start_Call) RunAndReturn(run func(context.Context) error) *Spawner_Start_Call { + _c.Call.Return(run) + return _c +} + // StartService provides a mock function with given fields: ctx, spec func (_m *Spawner) StartService(ctx context.Context, spec job.Job) error { ret := _m.Called(ctx, spec) @@ -182,6 +413,35 @@ func (_m *Spawner) StartService(ctx context.Context, spec job.Job) error { return r0 } +// Spawner_StartService_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StartService' +type Spawner_StartService_Call struct { + *mock.Call +} + +// StartService is a helper method to define mock.On call +// - ctx context.Context +// - spec job.Job +func (_e *Spawner_Expecter) StartService(ctx interface{}, spec interface{}) *Spawner_StartService_Call { + return &Spawner_StartService_Call{Call: _e.mock.On("StartService", ctx, spec)} +} + +func (_c *Spawner_StartService_Call) Run(run func(ctx context.Context, spec job.Job)) *Spawner_StartService_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(job.Job)) + }) + return _c +} + +func (_c *Spawner_StartService_Call) Return(_a0 error) *Spawner_StartService_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Spawner_StartService_Call) RunAndReturn(run func(context.Context, job.Job) error) *Spawner_StartService_Call { + _c.Call.Return(run) + return _c +} + // NewSpawner creates a new instance of Spawner. 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 NewSpawner(t interface { diff --git a/core/services/job/models.go b/core/services/job/models.go index 5457768141d..2f864efe300 100644 --- a/core/services/job/models.go +++ b/core/services/job/models.go @@ -156,6 +156,7 @@ type Job struct { BlockhashStoreSpec *BlockhashStoreSpec BlockHeaderFeederSpecID *int32 BlockHeaderFeederSpec *BlockHeaderFeederSpec + BALSpecID *int32 LegacyGasStationServerSpecID *int32 LegacyGasStationServerSpec *LegacyGasStationServerSpec LegacyGasStationSidecarSpecID *int32 @@ -352,7 +353,7 @@ type ocr2Config interface { SimulateTransactions() bool } -var ForwardersSupportedPlugins = []types.OCR2PluginType{types.Median, types.DKG, types.OCR2VRF, types.OCR2Keeper, types.Functions} +var ForwardersSupportedPlugins = []types.OCR2PluginType{types.Median, types.OCR2Keeper, types.Functions} // OCR2OracleSpec defines the job spec for OCR2 jobs. // Relay config is chain specific config for a relay (chain adapter). @@ -490,6 +491,7 @@ type DirectRequestSpec struct { type CronSpec struct { ID int32 `toml:"-"` CronSchedule string `toml:"schedule"` + EVMChainID *big.Big `toml:"evmChainID"` CreatedAt time.Time `toml:"-"` UpdatedAt time.Time `toml:"-"` } diff --git a/core/services/job/orm.go b/core/services/job/orm.go index efcb0882840..d13decc7208 100644 --- a/core/services/job/orm.go +++ b/core/services/job/orm.go @@ -42,8 +42,6 @@ var ( ErrNoSuchPublicKey = errors.New("no such public key exists") ) -//go:generate mockery --quiet --name ORM --output ./mocks/ --case=underscore - type ORM interface { InsertWebhookSpec(ctx context.Context, webhookSpec *WebhookSpec) error InsertJob(ctx context.Context, job *Job) error @@ -502,8 +500,8 @@ func (o *orm) insertKeeperSpec(ctx context.Context, spec *KeeperSpec) (specID in } func (o *orm) insertCronSpec(ctx context.Context, spec *CronSpec) (specID int32, err error) { - return o.prepareQuerySpecID(ctx, `INSERT INTO cron_specs (cron_schedule, created_at, updated_at) - VALUES (:cron_schedule, NOW(), NOW()) + return o.prepareQuerySpecID(ctx, `INSERT INTO cron_specs (cron_schedule, evm_chain_id, created_at, updated_at) + VALUES (:cron_schedule, :evm_chain_id, NOW(), NOW()) RETURNING id;`, spec) } @@ -602,8 +600,10 @@ func validateKeyStoreMatchForRelay(ctx context.Context, network string, keyStore return errors.Errorf("no Starknet key matching: %q", key) } case relay.NetworkAptos: - // TODO BCI-2953 - return nil + _, err := keyStore.Aptos().Get(key) + if err != nil { + return errors.Errorf("no Aptos key matching: %q", key) + } } return nil } diff --git a/core/services/job/runner_integration_test.go b/core/services/job/runner_integration_test.go index 0232fbadd9f..0b55b14250e 100644 --- a/core/services/job/runner_integration_test.go +++ b/core/services/job/runner_integration_test.go @@ -127,10 +127,10 @@ func TestRunner(t *testing.T) { m, err := bridges.MarshalBridgeMetaData(big.NewInt(10), big.NewInt(100)) require.NoError(t, err) - runID, taskResults, err := runner.ExecuteAndInsertFinishedRun(testutils.Context(t), *jb.PipelineSpec, pipeline.NewVarsFrom(map[string]interface{}{"jobRun": map[string]interface{}{"meta": m}}), logger.TestLogger(t), true) + runID, taskResults, err := runner.ExecuteAndInsertFinishedRun(testutils.Context(t), *jb.PipelineSpec, pipeline.NewVarsFrom(map[string]interface{}{"jobRun": map[string]interface{}{"meta": m}}), true) require.NoError(t, err) - results := taskResults.FinalResult(logger.TestLogger(t)) + results := taskResults.FinalResult() require.Len(t, results.Values, 2) require.GreaterOrEqual(t, len(results.FatalErrors), 2) assert.Nil(t, results.FatalErrors[0]) @@ -318,10 +318,10 @@ answer1 [type=median index=0]; err := jobORM.CreateJob(ctx, jb) require.NoError(t, err) - runID, taskResults, err := runner.ExecuteAndInsertFinishedRun(testutils.Context(t), *jb.PipelineSpec, pipeline.NewVarsFrom(nil), logger.TestLogger(t), true) + runID, taskResults, err := runner.ExecuteAndInsertFinishedRun(testutils.Context(t), *jb.PipelineSpec, pipeline.NewVarsFrom(nil), true) require.NoError(t, err) - results := taskResults.FinalResult(logger.TestLogger(t)) + results := taskResults.FinalResult() assert.Len(t, results.FatalErrors, 1) assert.Len(t, results.Values, 1) assert.Contains(t, results.FatalErrors[0].Error(), "type cannot be converted to decimal.Decimal") @@ -364,10 +364,10 @@ answer1 [type=median index=0]; err := jobORM.CreateJob(testutils.Context(t), jb) require.NoError(t, err) - runID, taskResults, err := runner.ExecuteAndInsertFinishedRun(testutils.Context(t), *jb.PipelineSpec, pipeline.NewVarsFrom(nil), logger.TestLogger(t), true) + runID, taskResults, err := runner.ExecuteAndInsertFinishedRun(testutils.Context(t), *jb.PipelineSpec, pipeline.NewVarsFrom(nil), true) require.NoError(t, err) - results := taskResults.FinalResult(logger.TestLogger(t)) + results := taskResults.FinalResult() assert.Len(t, results.Values, 1) assert.Len(t, results.FatalErrors, 1) assert.Contains(t, results.FatalErrors[0].Error(), pipeline.ErrTooManyErrors.Error()) @@ -409,10 +409,10 @@ answer1 [type=median index=0]; err := jobORM.CreateJob(testutils.Context(t), jb) require.NoError(t, err) - runID, taskResults, err := runner.ExecuteAndInsertFinishedRun(testutils.Context(t), *jb.PipelineSpec, pipeline.NewVarsFrom(nil), logger.TestLogger(t), true) + runID, taskResults, err := runner.ExecuteAndInsertFinishedRun(testutils.Context(t), *jb.PipelineSpec, pipeline.NewVarsFrom(nil), true) require.NoError(t, err) - results := taskResults.FinalResult(logger.TestLogger(t)) + results := taskResults.FinalResult() assert.Len(t, results.Values, 1) assert.Contains(t, results.FatalErrors[0].Error(), "type cannot be converted to decimal.Decimal") assert.Nil(t, results.Values[0]) @@ -697,9 +697,9 @@ answer1 [type=median index=0]; err := jobORM.CreateJob(ctx, jb) require.NoError(t, err) - _, taskResults, err := runner.ExecuteAndInsertFinishedRun(testutils.Context(t), *jb.PipelineSpec, pipeline.NewVarsFrom(nil), logger.TestLogger(t), true) + _, taskResults, err := runner.ExecuteAndInsertFinishedRun(testutils.Context(t), *jb.PipelineSpec, pipeline.NewVarsFrom(nil), true) require.NoError(t, err) - results := taskResults.FinalResult(logger.TestLogger(t)) + results := taskResults.FinalResult() assert.Nil(t, results.Values[0]) // No task timeout should succeed. @@ -707,9 +707,9 @@ answer1 [type=median index=0]; jb.Name = null.NewString("a job 2", true) err = jobORM.CreateJob(ctx, jb) require.NoError(t, err) - _, taskResults, err = runner.ExecuteAndInsertFinishedRun(testutils.Context(t), *jb.PipelineSpec, pipeline.NewVarsFrom(nil), logger.TestLogger(t), true) + _, taskResults, err = runner.ExecuteAndInsertFinishedRun(testutils.Context(t), *jb.PipelineSpec, pipeline.NewVarsFrom(nil), true) require.NoError(t, err) - results = taskResults.FinalResult(logger.TestLogger(t)) + results = taskResults.FinalResult() assert.Equal(t, 10.1, results.Values[0]) assert.Nil(t, results.FatalErrors[0]) @@ -720,9 +720,9 @@ answer1 [type=median index=0]; err = jobORM.CreateJob(ctx, jb) require.NoError(t, err) - _, taskResults, err = runner.ExecuteAndInsertFinishedRun(testutils.Context(t), *jb.PipelineSpec, pipeline.NewVarsFrom(nil), logger.TestLogger(t), true) + _, taskResults, err = runner.ExecuteAndInsertFinishedRun(testutils.Context(t), *jb.PipelineSpec, pipeline.NewVarsFrom(nil), true) require.NoError(t, err) - resultsNoFatalErrs := taskResults.FinalResult(logger.TestLogger(t)) + resultsNoFatalErrs := taskResults.FinalResult() assert.NotNil(t, resultsNoFatalErrs.FatalErrors[0]) }) @@ -740,9 +740,9 @@ answer1 [type=median index=0]; err := jobORM.CreateJob(ctx, jb) require.NoError(t, err) - _, taskResults, err := runner.ExecuteAndInsertFinishedRun(testutils.Context(t), *jb.PipelineSpec, pipeline.NewVarsFrom(nil), logger.TestLogger(t), true) + _, taskResults, err := runner.ExecuteAndInsertFinishedRun(testutils.Context(t), *jb.PipelineSpec, pipeline.NewVarsFrom(nil), true) require.NoError(t, err) - results := taskResults.FinalResult(logger.TestLogger(t)) + results := taskResults.FinalResult() assert.Len(t, results.Values, 1) assert.Nil(t, results.FatalErrors[0]) assert.Equal(t, "4242", results.Values[0].(decimal.Decimal).String()) @@ -752,7 +752,7 @@ answer1 [type=median index=0]; require.NoError(t, err) // Create another run, it should fail - _, _, err = runner.ExecuteAndInsertFinishedRun(testutils.Context(t), *jb.PipelineSpec, pipeline.NewVarsFrom(nil), logger.TestLogger(t), true) + _, _, err = runner.ExecuteAndInsertFinishedRun(testutils.Context(t), *jb.PipelineSpec, pipeline.NewVarsFrom(nil), true) require.Error(t, err) }) } diff --git a/core/services/job/spawner.go b/core/services/job/spawner.go index f7cd5e2bcb3..16889cbe10b 100644 --- a/core/services/job/spawner.go +++ b/core/services/job/spawner.go @@ -16,8 +16,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/logger" ) -//go:generate mockery --quiet --name Spawner --output ./mocks/ --case=underscore - type ( // Spawner manages the spinning up and down of the long-running // services that perform the work described by job specs. Each active job spec diff --git a/core/services/job/spawner_test.go b/core/services/job/spawner_test.go index 4abb81eda3a..86f0324e6a0 100644 --- a/core/services/job/spawner_test.go +++ b/core/services/job/spawner_test.go @@ -20,6 +20,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/utils/mailbox/mailboxtest" "github.com/smartcontractkit/chainlink/v2/core/capabilities" + "github.com/smartcontractkit/chainlink/v2/plugins" "github.com/smartcontractkit/chainlink/v2/core/bridges" mocklp "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller/mocks" @@ -38,7 +39,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm" evmrelayer "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm" - "github.com/smartcontractkit/chainlink/v2/plugins" ) type delegate struct { @@ -316,7 +316,7 @@ func TestSpawner_CreateJobDeleteJob(t *testing.T) { ocr2DelegateConfig := ocr2.NewDelegateConfig(config.OCR2(), config.Mercury(), config.Threshold(), config.Insecure(), config.JobPipeline(), processConfig) d := ocr2.NewDelegate(nil, orm, nil, nil, nil, nil, nil, monitoringEndpoint, legacyChains, lggr, ocr2DelegateConfig, - keyStore.OCR2(), keyStore.DKGSign(), keyStore.DKGEncrypt(), ethKeyStore, testRelayGetter, mailMon, capabilities.NewRegistry(lggr)) + keyStore.OCR2(), ethKeyStore, testRelayGetter, mailMon, capabilities.NewRegistry(lggr)) delegateOCR2 := &delegate{jobOCR2Keeper.Type, []job.ServiceCtx{}, 0, nil, d} spawner := job.NewSpawner(orm, config.Database(), noopChecker{}, map[job.Type]job.Delegate{ diff --git a/core/services/keeper/upkeep_executer.go b/core/services/keeper/upkeep_executer.go index c66f2d31c5a..170546287e5 100644 --- a/core/services/keeper/upkeep_executer.go +++ b/core/services/keeper/upkeep_executer.go @@ -227,7 +227,7 @@ func (ex *UpkeepExecuter) execute(upkeep UpkeepRegistration, head *evmtypes.Head ex.job.PipelineSpec.DotDagSource = pipeline.KeepersObservationSource run := pipeline.NewRun(*ex.job.PipelineSpec, vars) - if _, err := ex.pr.Run(ctxService, run, svcLogger, true, nil); err != nil { + if _, err := ex.pr.Run(ctxService, run, true, nil); err != nil { svcLogger.Error(errors.Wrap(err, "failed executing run")) return } diff --git a/core/services/keystore/aptos.go b/core/services/keystore/aptos.go new file mode 100644 index 00000000000..c93e7107fe1 --- /dev/null +++ b/core/services/keystore/aptos.go @@ -0,0 +1,180 @@ +package keystore + +import ( + "context" + "fmt" + + "github.com/pkg/errors" + + "github.com/smartcontractkit/chainlink-common/pkg/loop" + "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/aptoskey" +) + +type Aptos interface { + Get(id string) (aptoskey.Key, error) + GetAll() ([]aptoskey.Key, error) + Create(ctx context.Context) (aptoskey.Key, error) + Add(ctx context.Context, key aptoskey.Key) error + Delete(ctx context.Context, id string) (aptoskey.Key, error) + Import(ctx context.Context, keyJSON []byte, password string) (aptoskey.Key, error) + Export(id string, password string) ([]byte, error) + EnsureKey(ctx context.Context) error + Sign(ctx context.Context, id string, msg []byte) (signature []byte, err error) +} + +type aptos struct { + *keyManager +} + +var _ Aptos = &aptos{} + +func newAptosKeyStore(km *keyManager) *aptos { + return &aptos{ + km, + } +} + +func (ks *aptos) Get(id string) (aptoskey.Key, error) { + ks.lock.RLock() + defer ks.lock.RUnlock() + if ks.isLocked() { + return aptoskey.Key{}, ErrLocked + } + return ks.getByID(id) +} + +func (ks *aptos) GetAll() (keys []aptoskey.Key, _ error) { + ks.lock.RLock() + defer ks.lock.RUnlock() + if ks.isLocked() { + return nil, ErrLocked + } + for _, key := range ks.keyRing.Aptos { + keys = append(keys, key) + } + return keys, nil +} + +func (ks *aptos) Create(ctx context.Context) (aptoskey.Key, error) { + ks.lock.Lock() + defer ks.lock.Unlock() + if ks.isLocked() { + return aptoskey.Key{}, ErrLocked + } + key, err := aptoskey.New() + if err != nil { + return aptoskey.Key{}, err + } + return key, ks.safeAddKey(ctx, key) +} + +func (ks *aptos) Add(ctx context.Context, key aptoskey.Key) error { + ks.lock.Lock() + defer ks.lock.Unlock() + if ks.isLocked() { + return ErrLocked + } + if _, found := ks.keyRing.Aptos[key.ID()]; found { + return fmt.Errorf("key with ID %s already exists", key.ID()) + } + return ks.safeAddKey(ctx, key) +} + +func (ks *aptos) Delete(ctx context.Context, id string) (aptoskey.Key, error) { + ks.lock.Lock() + defer ks.lock.Unlock() + if ks.isLocked() { + return aptoskey.Key{}, ErrLocked + } + key, err := ks.getByID(id) + if err != nil { + return aptoskey.Key{}, err + } + err = ks.safeRemoveKey(ctx, key) + return key, err +} + +func (ks *aptos) Import(ctx context.Context, keyJSON []byte, password string) (aptoskey.Key, error) { + ks.lock.Lock() + defer ks.lock.Unlock() + if ks.isLocked() { + return aptoskey.Key{}, ErrLocked + } + key, err := aptoskey.FromEncryptedJSON(keyJSON, password) + if err != nil { + return aptoskey.Key{}, errors.Wrap(err, "AptosKeyStore#ImportKey failed to decrypt key") + } + if _, found := ks.keyRing.Aptos[key.ID()]; found { + return aptoskey.Key{}, fmt.Errorf("key with ID %s already exists", key.ID()) + } + return key, ks.keyManager.safeAddKey(ctx, key) +} + +func (ks *aptos) Export(id string, password string) ([]byte, error) { + ks.lock.RLock() + defer ks.lock.RUnlock() + if ks.isLocked() { + return nil, ErrLocked + } + key, err := ks.getByID(id) + if err != nil { + return nil, err + } + return key.ToEncryptedJSON(password, ks.scryptParams) +} + +func (ks *aptos) EnsureKey(ctx context.Context) error { + ks.lock.Lock() + defer ks.lock.Unlock() + if ks.isLocked() { + return ErrLocked + } + if len(ks.keyRing.Aptos) > 0 { + return nil + } + + key, err := aptoskey.New() + if err != nil { + return err + } + + ks.logger.Infof("Created Aptos key with ID %s", key.ID()) + + return ks.safeAddKey(ctx, key) +} + +func (ks *aptos) Sign(_ context.Context, id string, msg []byte) (signature []byte, err error) { + k, err := ks.Get(id) + if err != nil { + return nil, err + } + return k.Sign(msg) +} + +func (ks *aptos) getByID(id string) (aptoskey.Key, error) { + key, found := ks.keyRing.Aptos[id] + if !found { + return aptoskey.Key{}, KeyNotFoundError{ID: id, KeyType: "Aptos"} + } + return key, nil +} + +// AptosSigner implements [github.com/smartcontractkit/chainlink-common/pkg/loop.Keystore] interface and the requirements +// Handles signing for Apots Messages +type AptosLooppSigner struct { + Aptos +} + +var _ loop.Keystore = &AptosLooppSigner{} + +// Returns a list of Aptos Public Keys +func (s *AptosLooppSigner) Accounts(ctx context.Context) (accounts []string, err error) { + ks, err := s.GetAll() + if err != nil { + return nil, err + } + for _, k := range ks { + accounts = append(accounts, k.ID()) + } + return +} diff --git a/core/services/keystore/dkgencrypt_test.go b/core/services/keystore/aptos_test.go similarity index 70% rename from core/services/keystore/dkgencrypt_test.go rename to core/services/keystore/aptos_test.go index 4856473a0df..9a2764adff6 100644 --- a/core/services/keystore/dkgencrypt_test.go +++ b/core/services/keystore/aptos_test.go @@ -7,25 +7,23 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/utils" "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" "github.com/smartcontractkit/chainlink/v2/core/services/keystore" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/dkgencryptkey" + "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/aptoskey" ) -func Test_DKGEncryptKeyStore_E2E(t *testing.T) { +func Test_AptosKeyStore_E2E(t *testing.T) { db := pgtest.NewSqlxDB(t) + keyStore := keystore.ExposedNewMaster(t, db) require.NoError(t, keyStore.Unlock(testutils.Context(t), cltest.Password)) - ks := keyStore.DKGEncrypt() - - assert.NotNil(t, ks) - + ks := keyStore.Aptos() reset := func() { ctx := context.Background() // Executed on cleanup - _, err := db.Exec("DELETE FROM encrypted_key_rings") - require.NoError(t, err) + require.NoError(t, utils.JustError(db.Exec("DELETE FROM encrypted_key_rings"))) keyStore.ResetXXXTestOnly() require.NoError(t, keyStore.Unlock(ctx, cltest.Password)) } @@ -60,12 +58,18 @@ func Test_DKGEncryptKeyStore_E2E(t *testing.T) { require.NoError(t, err) exportJSON, err := ks.Export(key.ID(), cltest.Password) require.NoError(t, err) + _, err = ks.Export("non-existent", cltest.Password) + assert.Error(t, err) _, err = ks.Delete(ctx, key.ID()) require.NoError(t, err) _, err = ks.Get(key.ID()) require.Error(t, err) importedKey, err := ks.Import(ctx, exportJSON, cltest.Password) require.NoError(t, err) + _, err = ks.Import(ctx, exportJSON, cltest.Password) + assert.Error(t, err) + _, err = ks.Import(ctx, []byte(""), cltest.Password) + assert.Error(t, err) require.Equal(t, key.ID(), importedKey.ID()) retrievedKey, err := ks.Get(key.ID()) require.NoError(t, err) @@ -75,15 +79,19 @@ func Test_DKGEncryptKeyStore_E2E(t *testing.T) { t.Run("adds an externally created key / deletes a key", func(t *testing.T) { defer reset() ctx := testutils.Context(t) - newKey, err := dkgencryptkey.New() + newKey, err := aptoskey.New() require.NoError(t, err) err = ks.Add(ctx, newKey) require.NoError(t, err) + err = ks.Add(ctx, newKey) + assert.Error(t, err) keys, err := ks.GetAll() require.NoError(t, err) require.Equal(t, 1, len(keys)) _, err = ks.Delete(ctx, newKey.ID()) require.NoError(t, err) + _, err = ks.Delete(ctx, newKey.ID()) + assert.Error(t, err) keys, err = ks.GetAll() require.NoError(t, err) require.Equal(t, 0, len(keys)) @@ -91,40 +99,40 @@ func Test_DKGEncryptKeyStore_E2E(t *testing.T) { require.Error(t, err) }) - t.Run("adds an externally created key/ensures it already exists", func(t *testing.T) { + t.Run("ensures key", func(t *testing.T) { defer reset() ctx := testutils.Context(t) - - newKey, err := dkgencryptkey.New() - assert.NoError(t, err) - err = ks.Add(ctx, newKey) + err := ks.EnsureKey(ctx) assert.NoError(t, err) - err = keyStore.DKGEncrypt().EnsureKey(ctx) + err = ks.EnsureKey(ctx) assert.NoError(t, err) - keys, err2 := ks.GetAll() - assert.NoError(t, err2) + keys, err := ks.GetAll() + require.NoError(t, err) require.Equal(t, 1, len(keys)) - require.Equal(t, newKey.ID(), keys[0].ID()) - require.Equal(t, newKey.PublicKey, keys[0].PublicKey) }) - t.Run("auto creates a key if it doesn't exists when trying to ensure it already exists", func(t *testing.T) { + t.Run("sign tx", func(t *testing.T) { defer reset() ctx := testutils.Context(t) + newKey, err := aptoskey.New() + require.NoError(t, err) + require.NoError(t, ks.Add(ctx, newKey)) - keys, err := ks.GetAll() - assert.NoError(t, err) - assert.Equal(t, 0, len(keys)) - - err = keyStore.DKGEncrypt().EnsureKey(ctx) - assert.NoError(t, err) + // sign unknown ID + _, err = ks.Sign(testutils.Context(t), "not-real", nil) + assert.Error(t, err) - keys, err = ks.GetAll() - assert.NoError(t, err) + // sign known key + payload := []byte{1} + sig, err := ks.Sign(testutils.Context(t), newKey.ID(), payload) + require.NoError(t, err) + directSig, err := newKey.Sign(payload) require.NoError(t, err) - require.Equal(t, 1, len(keys)) + + // signatures should match using keystore sign or key sign + assert.Equal(t, directSig, sig) }) } diff --git a/core/services/keystore/chaintype/chaintype.go b/core/services/keystore/chaintype/chaintype.go index cd149e390ef..8a12322ebfe 100644 --- a/core/services/keystore/chaintype/chaintype.go +++ b/core/services/keystore/chaintype/chaintype.go @@ -19,6 +19,8 @@ const ( Solana ChainType = "solana" // StarkNet for the StarkNet chain StarkNet ChainType = "starknet" + // Aptos for the Aptos chain + Aptos ChainType = "aptos" ) type ChainTypes []ChainType @@ -35,7 +37,7 @@ func (c ChainTypes) String() (out string) { } // SupportedChainTypes contain all chains that are supported -var SupportedChainTypes = ChainTypes{EVM, Cosmos, Solana, StarkNet} +var SupportedChainTypes = ChainTypes{EVM, Cosmos, Solana, StarkNet, Aptos} // ErrInvalidChainType is an error to indicate an unsupported chain type var ErrInvalidChainType error diff --git a/core/services/keystore/cosmos.go b/core/services/keystore/cosmos.go index 76fc5f39816..43370daab45 100644 --- a/core/services/keystore/cosmos.go +++ b/core/services/keystore/cosmos.go @@ -10,8 +10,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/cosmoskey" ) -//go:generate mockery --quiet --name Cosmos --output ./mocks/ --case=underscore --filename cosmos.go - type Cosmos interface { Get(id string) (cosmoskey.Key, error) GetAll() ([]cosmoskey.Key, error) diff --git a/core/services/keystore/csa.go b/core/services/keystore/csa.go index 21b530c0650..004ec2bf373 100644 --- a/core/services/keystore/csa.go +++ b/core/services/keystore/csa.go @@ -9,8 +9,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/csakey" ) -//go:generate mockery --quiet --name CSA --output mocks/ --case=underscore - // ErrCSAKeyExists describes the error when the CSA key already exists var ErrCSAKeyExists = errors.New("can only have 1 CSA key") diff --git a/core/services/keystore/dkgencrypt.go b/core/services/keystore/dkgencrypt.go deleted file mode 100644 index 15d0ae8b24d..00000000000 --- a/core/services/keystore/dkgencrypt.go +++ /dev/null @@ -1,164 +0,0 @@ -package keystore - -import ( - "context" - "fmt" - - "github.com/pkg/errors" - - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/dkgencryptkey" -) - -//go:generate mockery --quiet --name DKGEncrypt --output mocks/ --case=underscore - -// DKGEncrypt provides encryption keys for the DKG. -type DKGEncrypt interface { - Get(id string) (dkgencryptkey.Key, error) - GetAll() ([]dkgencryptkey.Key, error) - Create(ctx context.Context) (dkgencryptkey.Key, error) - Add(ctx context.Context, key dkgencryptkey.Key) error - Delete(ctx context.Context, id string) (dkgencryptkey.Key, error) - Import(ctx context.Context, keyJSON []byte, password string) (dkgencryptkey.Key, error) - Export(id string, password string) ([]byte, error) - EnsureKey(ctx context.Context) error -} - -type dkgEncrypt struct { - *keyManager -} - -func newDKGEncryptKeyStore(km *keyManager) *dkgEncrypt { - return &dkgEncrypt{ - keyManager: km, - } -} - -var _ DKGEncrypt = &dkgEncrypt{} - -// Add implements DKGEncrypt -func (d *dkgEncrypt) Add(ctx context.Context, key dkgencryptkey.Key) error { - d.lock.Lock() - defer d.lock.Unlock() - if d.isLocked() { - return ErrLocked - } - return d.safeAddKey(ctx, key) -} - -// Create implements DKGEncrypt -func (d *dkgEncrypt) Create(ctx context.Context) (dkgencryptkey.Key, error) { - d.lock.Lock() - defer d.lock.Unlock() - if d.isLocked() { - return dkgencryptkey.Key{}, ErrLocked - } - key, err := dkgencryptkey.New() - if err != nil { - return dkgencryptkey.Key{}, errors.Wrap(err, "dkgencryptkey.New()") - } - return key, d.safeAddKey(ctx, key) -} - -// Delete implements DKGEncrypt -func (d *dkgEncrypt) Delete(ctx context.Context, id string) (dkgencryptkey.Key, error) { - d.lock.Lock() - defer d.lock.Unlock() - if d.isLocked() { - return dkgencryptkey.Key{}, ErrLocked - } - key, err := d.getByID(id) - if err != nil { - return dkgencryptkey.Key{}, err - } - - err = d.safeRemoveKey(ctx, key) - return key, errors.Wrap(err, "safe remove key") -} - -// EnsureKey implements DKGEncrypt -func (d *dkgEncrypt) EnsureKey(ctx context.Context) error { - d.lock.Lock() - defer d.lock.Unlock() - if d.isLocked() { - return ErrLocked - } - if len(d.keyRing.DKGEncrypt) > 0 { - return nil - } - - key, err := dkgencryptkey.New() - if err != nil { - return errors.Wrap(err, "dkgencryptkey. New()") - } - - d.logger.Infof("Created DKGEncrypt key with ID %s", key.ID()) - - return d.safeAddKey(ctx, key) -} - -// Export implements DKGEncrypt -func (d *dkgEncrypt) Export(id string, password string) ([]byte, error) { - d.lock.RLock() - defer d.lock.RUnlock() - if d.isLocked() { - return nil, ErrLocked - } - key, err := d.getByID(id) - if err != nil { - return nil, err - } - return key.ToEncryptedJSON(password, d.scryptParams) -} - -// Get implements DKGEncrypt -func (d *dkgEncrypt) Get(id string) (keys dkgencryptkey.Key, err error) { - d.lock.RLock() - defer d.lock.RUnlock() - if d.isLocked() { - return dkgencryptkey.Key{}, ErrLocked - } - return d.getByID(id) -} - -// GetAll implements DKGEncrypt -func (d *dkgEncrypt) GetAll() (keys []dkgencryptkey.Key, err error) { - d.lock.RLock() - defer d.lock.RUnlock() - if d.isLocked() { - return nil, ErrLocked - } - for _, key := range d.keyRing.DKGEncrypt { - keys = append(keys, key) - } - return keys, nil -} - -// Import implements DKGEncrypt -func (d *dkgEncrypt) Import(ctx context.Context, keyJSON []byte, password string) (dkgencryptkey.Key, error) { - d.lock.Lock() - defer d.lock.Unlock() - if d.isLocked() { - return dkgencryptkey.Key{}, ErrLocked - } - key, err := dkgencryptkey.FromEncryptedJSON(keyJSON, password) - if err != nil { - return dkgencryptkey.Key{}, errors.Wrap(err, "from encrypted json") - } - _, err = d.getByID(key.ID()) - if err == nil { - return dkgencryptkey.Key{}, fmt.Errorf("key with ID %s already exists", key.ID()) - } - return key, d.keyManager.safeAddKey(ctx, key) -} - -// caller must hold lock -func (d *dkgEncrypt) getByID(id string) (dkgencryptkey.Key, error) { - key, found := d.keyRing.DKGEncrypt[id] - if !found { - return dkgencryptkey.Key{}, KeyNotFoundError{ - ID: id, - KeyType: "DKGEncrypt", - } - } - return key, nil -} diff --git a/core/services/keystore/dkgsign.go b/core/services/keystore/dkgsign.go deleted file mode 100644 index 385323fc0fa..00000000000 --- a/core/services/keystore/dkgsign.go +++ /dev/null @@ -1,164 +0,0 @@ -package keystore - -import ( - "context" - "fmt" - - "github.com/pkg/errors" - - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/dkgsignkey" -) - -//go:generate mockery --quiet --name DKGSign --output mocks/ --case=underscore - -// DKGSign provides signing keys for the DKG. -type DKGSign interface { - Get(id string) (dkgsignkey.Key, error) - GetAll() ([]dkgsignkey.Key, error) - Create(ctx context.Context) (dkgsignkey.Key, error) - Add(ctx context.Context, key dkgsignkey.Key) error - Delete(ctx context.Context, id string) (dkgsignkey.Key, error) - Import(ctx context.Context, keyJSON []byte, password string) (dkgsignkey.Key, error) - Export(id string, password string) ([]byte, error) - EnsureKey(ctx context.Context) error -} - -type dkgSign struct { - *keyManager -} - -func newDKGSignKeyStore(km *keyManager) *dkgSign { - return &dkgSign{ - keyManager: km, - } -} - -var _ DKGSign = &dkgSign{} - -// Add implements DKGSign -func (d *dkgSign) Add(ctx context.Context, key dkgsignkey.Key) error { - d.lock.Lock() - defer d.lock.Unlock() - if d.isLocked() { - return ErrLocked - } - return d.safeAddKey(ctx, key) -} - -// Create implements DKGSign -func (d *dkgSign) Create(ctx context.Context) (dkgsignkey.Key, error) { - d.lock.Lock() - defer d.lock.Unlock() - if d.isLocked() { - return dkgsignkey.Key{}, ErrLocked - } - key, err := dkgsignkey.New() - if err != nil { - return dkgsignkey.Key{}, errors.Wrap(err, "dkgsignkey New()") - } - return key, d.safeAddKey(ctx, key) -} - -// Delete implements DKGSign -func (d *dkgSign) Delete(ctx context.Context, id string) (dkgsignkey.Key, error) { - d.lock.Lock() - defer d.lock.Unlock() - if d.isLocked() { - return dkgsignkey.Key{}, ErrLocked - } - key, err := d.getByID(id) - if err != nil { - return dkgsignkey.Key{}, err - } - - err = d.safeRemoveKey(ctx, key) - return key, errors.Wrap(err, "safe remove key") -} - -// EnsureKey implements DKGSign -func (d *dkgSign) EnsureKey(ctx context.Context) error { - d.lock.Lock() - defer d.lock.Unlock() - if d.isLocked() { - return ErrLocked - } - if len(d.keyRing.DKGSign) > 0 { - return nil - } - - key, err := dkgsignkey.New() - if err != nil { - return errors.Wrap(err, "dkgsignkey New()") - } - - d.logger.Infof("Created DKGSign key with ID %s", key.ID()) - - return d.safeAddKey(ctx, key) -} - -// Export implements DKGSign -func (d *dkgSign) Export(id string, password string) ([]byte, error) { - d.lock.RLock() - defer d.lock.RUnlock() - if d.isLocked() { - return nil, ErrLocked - } - key, err := d.getByID(id) - if err != nil { - return nil, err - } - return key.ToEncryptedJSON(password, d.scryptParams) -} - -// Get implements DKGSign -func (d *dkgSign) Get(id string) (keys dkgsignkey.Key, err error) { - d.lock.RLock() - defer d.lock.RUnlock() - if d.isLocked() { - return dkgsignkey.Key{}, ErrLocked - } - return d.getByID(id) -} - -// GetAll implements DKGSign -func (d *dkgSign) GetAll() (keys []dkgsignkey.Key, err error) { - d.lock.RLock() - defer d.lock.RUnlock() - if d.isLocked() { - return nil, ErrLocked - } - for _, key := range d.keyRing.DKGSign { - keys = append(keys, key) - } - return keys, nil -} - -// Import implements DKGSign -func (d *dkgSign) Import(ctx context.Context, keyJSON []byte, password string) (dkgsignkey.Key, error) { - d.lock.Lock() - defer d.lock.Unlock() - if d.isLocked() { - return dkgsignkey.Key{}, ErrLocked - } - key, err := dkgsignkey.FromEncryptedJSON(keyJSON, password) - if err != nil { - return dkgsignkey.Key{}, errors.Wrap(err, "from encrypted json") - } - _, err = d.getByID(key.ID()) - if err == nil { - return dkgsignkey.Key{}, fmt.Errorf("key with ID %s already exists", key.ID()) - } - return key, d.keyManager.safeAddKey(ctx, key) -} - -// caller must hold lock -func (d *dkgSign) getByID(id string) (dkgsignkey.Key, error) { - key, found := d.keyRing.DKGSign[id] - if !found { - return dkgsignkey.Key{}, KeyNotFoundError{ - ID: id, - KeyType: "DKGSign", - } - } - return key, nil -} diff --git a/core/services/keystore/dkgsign_test.go b/core/services/keystore/dkgsign_test.go deleted file mode 100644 index 8aa8cb1ad74..00000000000 --- a/core/services/keystore/dkgsign_test.go +++ /dev/null @@ -1,129 +0,0 @@ -package keystore_test - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "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" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/dkgsignkey" -) - -func Test_DKGSignKeyStore_E2E(t *testing.T) { - db := pgtest.NewSqlxDB(t) - keyStore := keystore.ExposedNewMaster(t, db) - require.NoError(t, keyStore.Unlock(testutils.Context(t), cltest.Password)) - ks := keyStore.DKGSign() - - assert.NotNil(t, ks) - - reset := func() { - ctx := context.Background() // Executed on cleanup - _, err := db.Exec("DELETE FROM encrypted_key_rings") - require.NoError(t, err) - keyStore.ResetXXXTestOnly() - require.NoError(t, keyStore.Unlock(ctx, cltest.Password)) - } - - t.Run("initializes with an empty state", func(t *testing.T) { - defer reset() - keys, err := ks.GetAll() - require.NoError(t, err) - require.Equal(t, 0, len(keys)) - }) - - t.Run("errors when getting non-existent ID", func(t *testing.T) { - defer reset() - _, err := ks.Get("non-existent-id") - require.Error(t, err) - }) - - t.Run("creates a key", func(t *testing.T) { - defer reset() - ctx := testutils.Context(t) - key, err := ks.Create(ctx) - require.NoError(t, err) - retrievedKey, err := ks.Get(key.ID()) - require.NoError(t, err) - require.Equal(t, key, retrievedKey) - }) - - t.Run("imports and exports a key", func(t *testing.T) { - defer reset() - ctx := testutils.Context(t) - key, err := ks.Create(ctx) - require.NoError(t, err) - exportJSON, err := ks.Export(key.ID(), cltest.Password) - require.NoError(t, err) - _, err = ks.Delete(ctx, key.ID()) - require.NoError(t, err) - _, err = ks.Get(key.ID()) - require.Error(t, err) - importedKey, err := ks.Import(ctx, exportJSON, cltest.Password) - require.NoError(t, err) - require.Equal(t, key.ID(), importedKey.ID()) - retrievedKey, err := ks.Get(key.ID()) - require.NoError(t, err) - require.Equal(t, importedKey, retrievedKey) - }) - - t.Run("adds an externally created key / deletes a key", func(t *testing.T) { - defer reset() - ctx := testutils.Context(t) - newKey, err := dkgsignkey.New() - require.NoError(t, err) - err = ks.Add(ctx, newKey) - require.NoError(t, err) - keys, err := ks.GetAll() - require.NoError(t, err) - require.Equal(t, 1, len(keys)) - _, err = ks.Delete(ctx, newKey.ID()) - require.NoError(t, err) - keys, err = ks.GetAll() - require.NoError(t, err) - require.Equal(t, 0, len(keys)) - _, err = ks.Get(newKey.ID()) - require.Error(t, err) - }) - - t.Run("adds an externally created key/ensures it already exists", func(t *testing.T) { - defer reset() - ctx := testutils.Context(t) - newKey, err := dkgsignkey.New() - assert.NoError(t, err) - err = ks.Add(ctx, newKey) - assert.NoError(t, err) - - err = keyStore.DKGSign().EnsureKey(ctx) - assert.NoError(t, err) - keys, err2 := ks.GetAll() - assert.NoError(t, err2) - - require.Equal(t, 1, len(keys)) - require.Equal(t, newKey.ID(), keys[0].ID()) - require.Equal(t, newKey.PublicKey, keys[0].PublicKey) - }) - - t.Run("auto creates a key if it doesn't exists when trying to ensure it already exists", func(t *testing.T) { - defer reset() - ctx := testutils.Context(t) - - keys, err := ks.GetAll() - assert.NoError(t, err) - assert.Equal(t, 0, len(keys)) - - err = keyStore.DKGSign().EnsureKey(ctx) - assert.NoError(t, err) - - keys, err = ks.GetAll() - assert.NoError(t, err) - - require.NoError(t, err) - require.Equal(t, 1, len(keys)) - }) -} diff --git a/core/services/keystore/eth.go b/core/services/keystore/eth.go index a4365eb9092..ee1c4f23a91 100644 --- a/core/services/keystore/eth.go +++ b/core/services/keystore/eth.go @@ -19,8 +19,6 @@ import ( ) // Eth is the external interface for EthKeyStore -// -//go:generate mockery --quiet --name Eth --output mocks/ --case=underscore type Eth interface { Get(ctx context.Context, id string) (ethkey.KeyV2, error) GetAll(ctx context.Context) ([]ethkey.KeyV2, error) diff --git a/core/services/keystore/keys/aptoskey/account.go b/core/services/keystore/keys/aptoskey/account.go new file mode 100644 index 00000000000..89f62d33011 --- /dev/null +++ b/core/services/keystore/keys/aptoskey/account.go @@ -0,0 +1,72 @@ +package aptoskey + +import ( + "encoding/hex" + "errors" + "fmt" + "strings" +) + +// AccountAddress is a 32 byte address on the Aptos blockchain +// It can represent an Object, an Account, and much more. +// +// AccountAddress is copied from the aptos sdk because: +// 1. There are still breaking changes in sdk and we don't want the dependency. +// 2. AccountAddress is just a wrapper and can be easily extracted out. +// +// https://github.com/aptos-labs/aptos-go-sdk/blob/main/internal/types/account.go +type AccountAddress [32]byte + +// IsSpecial Returns whether the address is a "special" address. Addresses are considered +// special if the first 63 characters of the hex string are zero. In other words, +// an address is special if the first 31 bytes are zero and the last byte is +// smaller than `0b10000` (16). In other words, special is defined as an address +// that matches the following regex: `^0x0{63}[0-9a-f]$`. In short form this means +// the addresses in the range from `0x0` to `0xf` (inclusive) are special. +// For more details see the v1 address standard defined as part of AIP-40: +// https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md +func (aa *AccountAddress) IsSpecial() bool { + for _, b := range aa[:31] { + if b != 0 { + return false + } + } + return aa[31] < 0x10 +} + +// String Returns the canonical string representation of the AccountAddress +func (aa *AccountAddress) String() string { + if aa.IsSpecial() { + return fmt.Sprintf("0x%x", aa[31]) + } + return BytesToHex(aa[:]) +} + +// ParseStringRelaxed parses a string into an AccountAddress +func (aa *AccountAddress) ParseStringRelaxed(x string) error { + x = strings.TrimPrefix(x, "0x") + if len(x) < 1 { + return ErrAddressTooShort + } + if len(x) > 64 { + return ErrAddressTooLong + } + if len(x)%2 != 0 { + x = "0" + x + } + bytes, err := hex.DecodeString(x) + if err != nil { + return err + } + // zero-prefix/right-align what bytes we got + copy((*aa)[32-len(bytes):], bytes) + + return nil +} + +var ErrAddressTooShort = errors.New("AccountAddress too short") +var ErrAddressTooLong = errors.New("AccountAddress too long") + +func BytesToHex(bytes []byte) string { + return "0x" + hex.EncodeToString(bytes) +} diff --git a/core/services/keystore/keys/aptoskey/account_test.go b/core/services/keystore/keys/aptoskey/account_test.go new file mode 100644 index 00000000000..b9ed4ea04a5 --- /dev/null +++ b/core/services/keystore/keys/aptoskey/account_test.go @@ -0,0 +1,141 @@ +package aptoskey + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +// Tests extracted from +// https://github.com/aptos-labs/aptos-go-sdk/blob/5ee5ac308e5881b508c0a5124f5e0b8df27a4d40/internal/types/account_test.go + +func TestStringOutput(t *testing.T) { + inputs := [][]byte{ + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}, + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F}, + {0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef}, + {0x02, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef}, + {0x00, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef}, + {0x00, 0x04, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef}, + {0x00, 0x00, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x12, 0x34, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef}, + } + expected := []string{ + "0x0", + "0x1", + "0xf", + "0x1234123412341234123412341234123412341234123412340123456789abcdef", + "0x0234123412341234123412341234123412341234123412340123456789abcdef", + "0x0034123412341234123412341234123412341234123412340123456789abcdef", + "0x0004123412341234123412341234123412341234123412340123456789abcdef", + "0x0000123412341234123412341234123412341234123412340123456789abcdef", + } + + for i := 0; i < len(inputs); i++ { + addr := AccountAddress(inputs[i]) + assert.Equal(t, expected[i], addr.String()) + } +} + +func TestAccountAddress_ParseStringRelaxed_Error(t *testing.T) { + var owner AccountAddress + err := owner.ParseStringRelaxed("0x") + assert.Error(t, err) + err = owner.ParseStringRelaxed("0xF1234567812345678123456781234567812345678123456781234567812345678") + assert.Error(t, err) + err = owner.ParseStringRelaxed("NotHex") + assert.Error(t, err) +} + +func TestAccountAddress_String(t *testing.T) { + testCases := []struct { + name string + address AccountAddress + expected string + }{ + { + name: "Special address", + address: AccountAddress{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}, + expected: "0x1", + }, + { + name: "Non-special address", + address: AccountAddress{0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0, 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0, 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0, 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0}, + expected: "0x123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + assert.Equal(t, tc.expected, tc.address.String()) + }) + } +} + +func TestAccountAddress_IsSpecial(t *testing.T) { + testCases := []struct { + name string + address AccountAddress + expected bool + }{ + { + name: "Special address", + address: AccountAddress{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}, + expected: true, + }, + { + name: "Non-special address", + address: AccountAddress{0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0, 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0, 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0, 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0}, + expected: false, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + assert.Equal(t, tc.expected, tc.address.IsSpecial()) + }) + } +} + +func TestBytesToHex(t *testing.T) { + testCases := []struct { + name string + bytes []byte + expected string + }{ + { + name: "Empty bytes", + bytes: []byte{}, + expected: "0x", + }, + { + name: "Non-empty bytes", + bytes: []byte{0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0}, + expected: "0x123456789abcdef0", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + assert.Equal(t, tc.expected, BytesToHex(tc.bytes)) + }) + } +} + +func TestAccountSpecialString(t *testing.T) { + var aa AccountAddress + aa[31] = 3 + aas := aa.String() + if aas != "0x3" { + t.Errorf("wanted 0x3 got %s", aas) + } + + var aa2 AccountAddress + err := aa2.ParseStringRelaxed("0x3") + if err != nil { + t.Errorf("unexpected err %s", err) + } + if aa2 != aa { + t.Errorf("aa2 != aa") + } +} diff --git a/core/services/keystore/keys/dkgsignkey/export.go b/core/services/keystore/keys/aptoskey/export.go similarity index 74% rename from core/services/keystore/keys/dkgsignkey/export.go rename to core/services/keystore/keys/aptoskey/export.go index 3c421760d63..23553ef9dca 100644 --- a/core/services/keystore/keys/dkgsignkey/export.go +++ b/core/services/keystore/keys/aptoskey/export.go @@ -1,15 +1,17 @@ -package dkgsignkey +package aptoskey import ( + "encoding/hex" + "github.com/ethereum/go-ethereum/accounts/keystore" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys" "github.com/smartcontractkit/chainlink/v2/core/utils" ) -const keyTypeIdentifier = "DKGSign" +const keyTypeIdentifier = "Aptos" -// FromEncryptedJSON returns a dkgsignkey.Key from encrypted data in go-ethereum keystore format. +// FromEncryptedJSON gets key from json and password func FromEncryptedJSON(keyJSON []byte, password string) (Key, error) { return keys.FromEncryptedJSON( keyTypeIdentifier, @@ -22,7 +24,7 @@ func FromEncryptedJSON(keyJSON []byte, password string) (Key, error) { ) } -// ToEncryptedJSON exports this key into a JSON object following the format of EncryptedDKGSignKeyExport +// ToEncryptedJSON returns encrypted JSON representing key func (key Key) ToEncryptedJSON(password string, scryptParams utils.ScryptParams) (export []byte, err error) { return keys.ToEncryptedJSON( keyTypeIdentifier, @@ -34,7 +36,7 @@ func (key Key) ToEncryptedJSON(password string, scryptParams utils.ScryptParams) func(id string, key Key, cryptoJSON keystore.CryptoJSON) keys.EncryptedKeyExport { return keys.EncryptedKeyExport{ KeyType: id, - PublicKey: key.PublicKeyString(), + PublicKey: hex.EncodeToString(key.pubKey), Crypto: cryptoJSON, } }, @@ -42,5 +44,5 @@ func (key Key) ToEncryptedJSON(password string, scryptParams utils.ScryptParams) } func adulteratedPassword(password string) string { - return "dkgsignkey" + password + return "aptoskey" + password } diff --git a/core/services/keystore/keys/dkgsignkey/export_test.go b/core/services/keystore/keys/aptoskey/export_test.go similarity index 83% rename from core/services/keystore/keys/dkgsignkey/export_test.go rename to core/services/keystore/keys/aptoskey/export_test.go index 90d8f66ab38..a920e432298 100644 --- a/core/services/keystore/keys/dkgsignkey/export_test.go +++ b/core/services/keystore/keys/aptoskey/export_test.go @@ -1,4 +1,4 @@ -package dkgsignkey +package aptoskey import ( "testing" @@ -6,7 +6,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys" ) -func TestDKGSignKeys_ExportImport(t *testing.T) { +func TestAptosKeys_ExportImport(t *testing.T) { keys.RunKeyExportImportTestcase(t, createKey, decryptKey) } diff --git a/core/services/keystore/keys/aptoskey/key.go b/core/services/keystore/keys/aptoskey/key.go new file mode 100644 index 00000000000..ec9b27a3596 --- /dev/null +++ b/core/services/keystore/keys/aptoskey/key.go @@ -0,0 +1,103 @@ +package aptoskey + +import ( + "crypto" + "crypto/ed25519" + crypto_rand "crypto/rand" + "fmt" + "io" + + "github.com/mr-tron/base58" +) + +// Raw represents the Aptos private key +type Raw []byte + +// Key gets the Key +func (raw Raw) Key() Key { + privKey := ed25519.NewKeyFromSeed(raw) + pubKey := privKey.Public().(ed25519.PublicKey) + return Key{ + privkey: privKey, + pubKey: pubKey, + } +} + +// String returns description +func (raw Raw) String() string { + return "" +} + +// GoString wraps String() +func (raw Raw) GoString() string { + return raw.String() +} + +var _ fmt.GoStringer = &Key{} + +// Key represents Aptos key +type Key struct { + privkey ed25519.PrivateKey + pubKey ed25519.PublicKey +} + +// New creates new Key +func New() (Key, error) { + return newFrom(crypto_rand.Reader) +} + +// MustNewInsecure return Key if no error +func MustNewInsecure(reader io.Reader) Key { + key, err := newFrom(reader) + if err != nil { + panic(err) + } + return key +} + +// newFrom creates new Key from a provided random reader +func newFrom(reader io.Reader) (Key, error) { + pub, priv, err := ed25519.GenerateKey(reader) + if err != nil { + return Key{}, err + } + return Key{ + privkey: priv, + pubKey: pub, + }, nil +} + +// ID gets Key ID +func (key Key) ID() string { + return key.PublicKeyStr() +} + +// GetPublic get Key's public key +func (key Key) GetPublic() ed25519.PublicKey { + return key.pubKey +} + +// PublicKeyStr return base58 encoded public key +func (key Key) PublicKeyStr() string { + return base58.Encode(key.pubKey) +} + +// Raw returns the seed from private key +func (key Key) Raw() Raw { + return key.privkey.Seed() +} + +// String is the print-friendly format of the Key +func (key Key) String() string { + return fmt.Sprintf("AptosKey{PrivateKey: , Public Key: %s}", key.PublicKeyStr()) +} + +// GoString wraps String() +func (key Key) GoString() string { + return key.String() +} + +// Sign is used to sign a message +func (key Key) Sign(msg []byte) ([]byte, error) { + return key.privkey.Sign(crypto_rand.Reader, msg, crypto.Hash(0)) // no specific hash function used +} diff --git a/core/services/keystore/keys/dkgencryptkey/export.go b/core/services/keystore/keys/dkgencryptkey/export.go deleted file mode 100644 index 3bccf1a07ba..00000000000 --- a/core/services/keystore/keys/dkgencryptkey/export.go +++ /dev/null @@ -1,44 +0,0 @@ -package dkgencryptkey - -import ( - "github.com/ethereum/go-ethereum/accounts/keystore" - - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys" - "github.com/smartcontractkit/chainlink/v2/core/utils" -) - -const keyTypeIdentifier = "DKGEncrypt" - -// FromEncryptedJSON returns a dkgencryptkey.KeyV2 from encrypted data in go-ethereum keystore format. -func FromEncryptedJSON(keyJSON []byte, password string) (Key, error) { - return keys.FromEncryptedJSON( - keyTypeIdentifier, - keyJSON, - password, - adulteratedPassword, - func(_ keys.EncryptedKeyExport, rawPrivKey []byte) (Key, error) { - return Raw(rawPrivKey).Key(), nil - }) -} - -// ToEncryptedJSON exports this key into a JSON object following the format of EncryptedDKGEncryptKeyExport -func (k Key) ToEncryptedJSON(password string, scryptParams utils.ScryptParams) (export []byte, err error) { - return keys.ToEncryptedJSON( - keyTypeIdentifier, - k.Raw(), - k, - password, - scryptParams, - adulteratedPassword, - func(id string, key Key, cryptoJSON keystore.CryptoJSON) keys.EncryptedKeyExport { - return keys.EncryptedKeyExport{ - KeyType: id, - PublicKey: key.PublicKeyString(), - Crypto: cryptoJSON, - } - }) -} - -func adulteratedPassword(password string) string { - return "dkgencryptkey" + password -} diff --git a/core/services/keystore/keys/dkgencryptkey/export_test.go b/core/services/keystore/keys/dkgencryptkey/export_test.go deleted file mode 100644 index 952c786d8ab..00000000000 --- a/core/services/keystore/keys/dkgencryptkey/export_test.go +++ /dev/null @@ -1,19 +0,0 @@ -package dkgencryptkey - -import ( - "testing" - - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys" -) - -func TestDKGEncryptKeys_ExportImport(t *testing.T) { - keys.RunKeyExportImportTestcase(t, createKey, decryptKey) -} - -func createKey() (keys.KeyType, error) { - return New() -} - -func decryptKey(keyJSON []byte, password string) (keys.KeyType, error) { - return FromEncryptedJSON(keyJSON, password) -} diff --git a/core/services/keystore/keys/dkgencryptkey/key.go b/core/services/keystore/keys/dkgencryptkey/key.go deleted file mode 100644 index e94f2a6bdf4..00000000000 --- a/core/services/keystore/keys/dkgencryptkey/key.go +++ /dev/null @@ -1,116 +0,0 @@ -package dkgencryptkey - -import ( - "encoding/hex" - "fmt" - "math/big" - - "github.com/pkg/errors" - "go.dedis.ch/kyber/v3" - "go.dedis.ch/kyber/v3/pairing" - - "github.com/smartcontractkit/chainlink-vrf/altbn_128" -) - -var suite pairing.Suite = &altbn_128.PairingSuite{} -var g1 = suite.G1() - -type Raw []byte - -func (r Raw) Key() Key { - scalar := g1.Scalar() - err := scalar.UnmarshalBinary(r) - if err != nil { - panic(err) // should never happen6 - } - key, err := keyFromScalar(scalar) - if err != nil { - panic(err) // should never happen - } - return key -} - -func (r Raw) String() string { - return "" -} - -func (r Raw) GoString() string { - return r.String() -} - -type Key struct { - privateKey kyber.Scalar - publicKeyBytes []byte - PublicKey kyber.Point -} - -// New returns a new dkgencryptkey key -func New() (Key, error) { - return keyFromScalar(g1.Scalar().Pick(suite.RandomStream())) -} - -// MustNewXXXTestingOnly creates a new DKGEncrypt key from the given secret key. -// NOTE: for testing only. -func MustNewXXXTestingOnly(sk *big.Int) Key { - key, err := keyFromScalar(g1.Scalar().SetInt64(sk.Int64())) - if err != nil { - panic(err) - } - return key -} - -var _ fmt.GoStringer = &Key{} - -// GoString implements fmt.GoStringer -func (k Key) GoString() string { - return k.String() -} - -// String returns the string representation of this key -func (k Key) String() string { - return fmt.Sprintf("DKGEncryptKey{PrivateKey: , PublicKey: %s", k.PublicKeyString()) -} - -// ID returns the ID of this key -func (k Key) ID() string { - return k.PublicKeyString() -} - -// PublicKeyString returns the hex representation of this key's public key -func (k Key) PublicKeyString() string { - return hex.EncodeToString(k.publicKeyBytes) -} - -// Raw returns the key raw data -func (k Key) Raw() Raw { - raw, err := k.privateKey.MarshalBinary() - if err != nil { - panic(err) // should never happen - } - return Raw(raw) -} - -// KyberScalar returns the private key as a kyber.Scalar object -func (k Key) KyberScalar() kyber.Scalar { - return g1.Scalar().Set(k.privateKey) -} - -// KyberPoint returns the public key as a kyber.Point object -func (k Key) KyberPoint() kyber.Point { - return g1.Point().Base().Mul(k.privateKey, nil) -} - -// keyFromScalar creates a new dkgencryptkey key from the given scalar. -// the given scalar must be a scalar of the g1 group in the altbn_128 pairing. -func keyFromScalar(k kyber.Scalar) (Key, error) { - publicKey := g1.Point().Base().Mul(k, nil) - publicKeyBytes, err := publicKey.MarshalBinary() - if err != nil { - return Key{}, errors.Wrap(err, "kyber point MarshalBinary") - } - return Key{ - privateKey: k, - PublicKey: publicKey, - publicKeyBytes: publicKeyBytes, - }, nil -} diff --git a/core/services/keystore/keys/dkgencryptkey/key_test.go b/core/services/keystore/keys/dkgencryptkey/key_test.go deleted file mode 100644 index 3bf12772a46..00000000000 --- a/core/services/keystore/keys/dkgencryptkey/key_test.go +++ /dev/null @@ -1,58 +0,0 @@ -package dkgencryptkey - -import ( - "math/big" - "testing" - - "github.com/stretchr/testify/assert" - - "github.com/smartcontractkit/chainlink/v2/core/utils" -) - -func TestNew(t *testing.T) { - key, err := New() - assert.NoError(t, err) - assert.NotNil(t, key.privateKey) - assert.NotNil(t, key.PublicKey) - assert.NotNil(t, key.publicKeyBytes) -} - -func TestStringers(t *testing.T) { - key := MustNewXXXTestingOnly(big.NewInt(1337)) - assert.Equal(t, "26578c46722826d18dc5f5a954c65c5c78e0d215a465356502ff8f002aff36ef", key.PublicKeyString()) - assert.Equal(t, - "DKGEncryptKey{PrivateKey: , PublicKey: 26578c46722826d18dc5f5a954c65c5c78e0d215a465356502ff8f002aff36ef", - key.String()) - assert.Equal(t, - "DKGEncryptKey{PrivateKey: , PublicKey: 26578c46722826d18dc5f5a954c65c5c78e0d215a465356502ff8f002aff36ef", - key.GoString()) - assert.Equal(t, - "26578c46722826d18dc5f5a954c65c5c78e0d215a465356502ff8f002aff36ef", - key.ID()) -} - -func TestRaw(t *testing.T) { - key := MustNewXXXTestingOnly(big.NewInt(1337)) - rawFromKey := key.Raw() - scalar := g1.Scalar().SetBytes(rawFromKey) - assert.True(t, scalar.Equal(key.privateKey)) - - keyFromRaw := rawFromKey.Key() - assert.True(t, keyFromRaw.privateKey.Equal(key.privateKey)) - - assert.Equal(t, "", rawFromKey.GoString()) - assert.Equal(t, "", rawFromKey.String()) -} - -func TestExportImport(t *testing.T) { - password := "helloworld" - key := MustNewXXXTestingOnly(big.NewInt(1337)) - encryptedJSON, err := key.ToEncryptedJSON(password, utils.DefaultScryptParams) - assert.NoError(t, err) - - decryptedKey, err := FromEncryptedJSON(encryptedJSON, password) - assert.NoError(t, err) - assert.True(t, decryptedKey.privateKey.Equal(key.privateKey)) - assert.True(t, decryptedKey.PublicKey.Equal(key.PublicKey)) - assert.ElementsMatch(t, decryptedKey.publicKeyBytes, key.publicKeyBytes) -} diff --git a/core/services/keystore/keys/dkgsignkey/key.go b/core/services/keystore/keys/dkgsignkey/key.go deleted file mode 100644 index 6ab18810689..00000000000 --- a/core/services/keystore/keys/dkgsignkey/key.go +++ /dev/null @@ -1,92 +0,0 @@ -package dkgsignkey - -import ( - "encoding/hex" - "fmt" - "math/big" - - "go.dedis.ch/kyber/v3" - "go.dedis.ch/kyber/v3/group/edwards25519" -) - -var suite = edwards25519.NewBlakeSHA256Ed25519() - -// Raw represents a raw dkgsign secret key in little-endian byte order. -type Raw []byte - -// Key returns a Key object from this raw data. -func (r Raw) Key() Key { - privKey := suite.Scalar().SetBytes(r) - key, err := keyFromScalar(privKey) - if err != nil { - panic(err) // should never happen - } - return key -} - -func (r Raw) String() string { - return "" -} - -func (r Raw) GoString() string { - return r.String() -} - -// Key is DKG signing key that conforms to the keystore.Key interface -type Key struct { - privateKey kyber.Scalar - publicKeyBytes []byte - PublicKey kyber.Point -} - -// New creates a new DKGSign key -func New() (Key, error) { - privateKey := suite.Scalar().Pick(suite.RandomStream()) - return keyFromScalar(privateKey) -} - -// MustNewXXXTestingOnly creates a new DKGSign key from the given secret key. -// NOTE: for testing only. -func MustNewXXXTestingOnly(sk *big.Int) Key { - key, err := keyFromScalar(scalarFromBig(sk)) - if err != nil { - panic(err) - } - return key -} - -var _ fmt.GoStringer = &Key{} - -// GoString implements fmt.GoStringer -func (k Key) GoString() string { - return k.String() -} - -// String returns the string representation of this key -func (k Key) String() string { - return fmt.Sprintf("DKGSignKey{PrivateKey: , PublicKey: %s", k.PublicKey) -} - -// ID returns the ID of this key -func (k Key) ID() string { - return k.PublicKeyString() -} - -// PublicKeyString returns the hex representation of this key's public key -func (k Key) PublicKeyString() string { - return hex.EncodeToString(k.publicKeyBytes) -} - -// Raw returns the key raw data -func (k Key) Raw() Raw { - raw, err := k.privateKey.MarshalBinary() - if err != nil { - panic(err) // should never happen - } - return Raw(raw) -} - -// KyberScalar returns the private key as a kyber.Scalar object -func (k Key) KyberScalar() kyber.Scalar { - return suite.Scalar().Set(k.privateKey) -} diff --git a/core/services/keystore/keys/dkgsignkey/key_test.go b/core/services/keystore/keys/dkgsignkey/key_test.go deleted file mode 100644 index 736aca34f64..00000000000 --- a/core/services/keystore/keys/dkgsignkey/key_test.go +++ /dev/null @@ -1,58 +0,0 @@ -package dkgsignkey - -import ( - "math/big" - "testing" - - "github.com/stretchr/testify/assert" - - "github.com/smartcontractkit/chainlink/v2/core/utils" -) - -func TestNew(t *testing.T) { - key, err := New() - assert.NoError(t, err) - assert.NotNil(t, key.privateKey) - assert.NotNil(t, key.PublicKey) - assert.NotNil(t, key.publicKeyBytes) -} - -func TestStringers(t *testing.T) { - key := MustNewXXXTestingOnly(big.NewInt(1337)) - assert.Equal(t, "becd7a86af89b2f3ffd11fabe897de820b74cd2956c6e047a14e35d090ade17d", key.PublicKeyString()) - assert.Equal(t, - "DKGSignKey{PrivateKey: , PublicKey: becd7a86af89b2f3ffd11fabe897de820b74cd2956c6e047a14e35d090ade17d", - key.String()) - assert.Equal(t, - "DKGSignKey{PrivateKey: , PublicKey: becd7a86af89b2f3ffd11fabe897de820b74cd2956c6e047a14e35d090ade17d", - key.GoString()) - assert.Equal(t, - "becd7a86af89b2f3ffd11fabe897de820b74cd2956c6e047a14e35d090ade17d", - key.ID()) -} - -func TestRaw(t *testing.T) { - key := MustNewXXXTestingOnly(big.NewInt(1337)) - rawFromKey := key.Raw() - scalar := suite.Scalar().SetBytes(rawFromKey) - assert.True(t, scalar.Equal(key.privateKey)) - - keyFromRaw := rawFromKey.Key() - assert.True(t, keyFromRaw.privateKey.Equal(key.privateKey)) - - assert.Equal(t, "", rawFromKey.GoString()) - assert.Equal(t, "", rawFromKey.String()) -} - -func TestExportImport(t *testing.T) { - password := "helloworld" - key := MustNewXXXTestingOnly(big.NewInt(1337)) - encryptedJSON, err := key.ToEncryptedJSON(password, utils.DefaultScryptParams) - assert.NoError(t, err) - - decryptedKey, err := FromEncryptedJSON(encryptedJSON, password) - assert.NoError(t, err) - assert.True(t, decryptedKey.privateKey.Equal(key.privateKey)) - assert.True(t, decryptedKey.PublicKey.Equal(key.PublicKey)) - assert.ElementsMatch(t, decryptedKey.publicKeyBytes, key.publicKeyBytes) -} diff --git a/core/services/keystore/keys/dkgsignkey/utils.go b/core/services/keystore/keys/dkgsignkey/utils.go deleted file mode 100644 index 8b4add1ed1e..00000000000 --- a/core/services/keystore/keys/dkgsignkey/utils.go +++ /dev/null @@ -1,39 +0,0 @@ -package dkgsignkey - -import ( - "math/big" - - "github.com/pkg/errors" - "go.dedis.ch/kyber/v3" -) - -// scalarFromBig creates a kyber.Scalar belonging to the edwards25519 -// kyber suite from a big integer. This is useful for testing. -func scalarFromBig(i *big.Int) kyber.Scalar { - scalar := suite.Scalar() - // big.Int.Bytes() returns a byte slice in big-endian order, - // need to reverse the slice before we SetBytes since - // SetBytes interprets it in little-endian order. - b := i.Bytes() - reverseSliceInPlace(b) - return scalar.SetBytes(b) -} - -func keyFromScalar(k kyber.Scalar) (Key, error) { - publicKey := suite.Point().Base().Mul(k, nil) - publicKeyBytes, err := publicKey.MarshalBinary() - if err != nil { - return Key{}, errors.Wrap(err, "kyber point MarshalBinary") - } - return Key{ - privateKey: k, - PublicKey: publicKey, - publicKeyBytes: publicKeyBytes, - }, nil -} - -func reverseSliceInPlace[T any](elems []T) { - for i := 0; i < len(elems)/2; i++ { - elems[i], elems[len(elems)-i-1] = elems[len(elems)-i-1], elems[i] - } -} diff --git a/core/services/keystore/keys/ocr2key/aptos_keyring.go b/core/services/keystore/keys/ocr2key/aptos_keyring.go new file mode 100644 index 00000000000..51e6c3a9c8f --- /dev/null +++ b/core/services/keystore/keys/ocr2key/aptos_keyring.go @@ -0,0 +1,118 @@ +package ocr2key + +import ( + "crypto/ed25519" + "encoding/binary" + "io" + + "github.com/hdevalence/ed25519consensus" + "github.com/pkg/errors" + "golang.org/x/crypto/blake2s" + + "github.com/smartcontractkit/chainlink/v2/core/utils" + + "github.com/smartcontractkit/libocr/offchainreporting2/types" + "github.com/smartcontractkit/libocr/offchainreporting2plus/chains/evmutil" + ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" +) + +var _ ocrtypes.OnchainKeyring = &aptosKeyring{} + +type aptosKeyring struct { + privKey ed25519.PrivateKey + pubKey ed25519.PublicKey +} + +func newAptosKeyring(material io.Reader) (*aptosKeyring, error) { + pubKey, privKey, err := ed25519.GenerateKey(material) + if err != nil { + return nil, err + } + return &aptosKeyring{pubKey: pubKey, privKey: privKey}, nil +} + +func (akr *aptosKeyring) PublicKey() ocrtypes.OnchainPublicKey { + return []byte(akr.pubKey) +} + +func (akr *aptosKeyring) reportToSigData(reportCtx ocrtypes.ReportContext, report ocrtypes.Report) ([]byte, error) { + rawReportContext := evmutil.RawReportContext(reportCtx) + h, err := blake2s.New256(nil) + if err != nil { + return nil, err + } + reportLen := make([]byte, 4) + binary.BigEndian.PutUint32(reportLen[0:], uint32(len(report))) + h.Write(reportLen[:]) + h.Write(report) + h.Write(rawReportContext[0][:]) + h.Write(rawReportContext[1][:]) + h.Write(rawReportContext[2][:]) + return h.Sum(nil), nil +} + +func (akr *aptosKeyring) Sign(reportCtx ocrtypes.ReportContext, report ocrtypes.Report) ([]byte, error) { + sigData, err := akr.reportToSigData(reportCtx, report) + if err != nil { + return nil, err + } + return akr.signBlob(sigData) +} + +func (akr *aptosKeyring) Sign3(digest types.ConfigDigest, seqNr uint64, r ocrtypes.Report) (signature []byte, err error) { + return nil, errors.New("not implemented") +} + +func (akr *aptosKeyring) signBlob(b []byte) ([]byte, error) { + signedMsg := ed25519.Sign(akr.privKey, b) + // match on-chain parsing (first 32 bytes are for pubkey, remaining are for signature) + return utils.ConcatBytes(akr.PublicKey(), signedMsg), nil +} + +func (akr *aptosKeyring) Verify(publicKey ocrtypes.OnchainPublicKey, reportCtx ocrtypes.ReportContext, report ocrtypes.Report, signature []byte) bool { + hash, err := akr.reportToSigData(reportCtx, report) + if err != nil { + return false + } + return akr.verifyBlob(publicKey, hash, signature) +} + +func (akr *aptosKeyring) Verify3(publicKey ocrtypes.OnchainPublicKey, cd ocrtypes.ConfigDigest, seqNr uint64, r ocrtypes.Report, signature []byte) bool { + return false +} + +func (akr *aptosKeyring) verifyBlob(pubkey ocrtypes.OnchainPublicKey, b, sig []byte) bool { + // Ed25519 signatures are always 64 bytes and the + // public key (always prefixed, see Sign above) is always, + // 32 bytes, so we always require the max signature length. + if len(sig) != akr.MaxSignatureLength() { + return false + } + if len(pubkey) != ed25519.PublicKeySize { + return false + } + return ed25519consensus.Verify(ed25519.PublicKey(pubkey), b, sig[32:]) +} + +func (akr *aptosKeyring) MaxSignatureLength() int { + // Reference: https://pkg.go.dev/crypto/ed25519 + return ed25519.PublicKeySize + ed25519.SignatureSize // 32 + 64 +} + +func (akr *aptosKeyring) Marshal() ([]byte, error) { + return akr.privKey.Seed(), nil +} + +func (akr *aptosKeyring) Unmarshal(in []byte) error { + if len(in) != ed25519.SeedSize { + return errors.Errorf("unexpected seed size, got %d want %d", len(in), ed25519.SeedSize) + } + privKey := ed25519.NewKeyFromSeed(in) + akr.privKey = privKey + pubKey, ok := privKey.Public().(ed25519.PublicKey) + if !ok { + return errors.New("failed to cast public key to ed25519.PublicKey") + } + akr.pubKey = pubKey + return nil +} diff --git a/core/services/keystore/keys/ocr2key/aptos_keyring_test.go b/core/services/keystore/keys/ocr2key/aptos_keyring_test.go new file mode 100644 index 00000000000..2b88d61065c --- /dev/null +++ b/core/services/keystore/keys/ocr2key/aptos_keyring_test.go @@ -0,0 +1,58 @@ +package ocr2key + +import ( + "bytes" + cryptorand "crypto/rand" + "testing" + + "github.com/stretchr/testify/assert" + + ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + "github.com/stretchr/testify/require" +) + +func TestAptosKeyRing_Sign_Verify(t *testing.T) { + kr1, err := newAptosKeyring(cryptorand.Reader) + require.NoError(t, err) + kr2, err := newAptosKeyring(cryptorand.Reader) + require.NoError(t, err) + ctx := ocrtypes.ReportContext{} + + t.Run("can verify", func(t *testing.T) { + report := ocrtypes.Report{} + sig, err := kr1.Sign(ctx, report) + require.NoError(t, err) + t.Log(len(sig)) + result := kr2.Verify(kr1.PublicKey(), ctx, report, sig) + require.True(t, result) + }) + + t.Run("invalid sig", func(t *testing.T) { + report := ocrtypes.Report{} + result := kr2.Verify(kr1.PublicKey(), ctx, report, []byte{0x01}) + require.False(t, result) + }) + + t.Run("invalid pubkey", func(t *testing.T) { + report := ocrtypes.Report{} + sig, err := kr1.Sign(ctx, report) + require.NoError(t, err) + result := kr2.Verify([]byte{0x01}, ctx, report, sig) + require.False(t, result) + }) +} + +func TestAptosKeyRing_Marshalling(t *testing.T) { + kr1, err := newAptosKeyring(cryptorand.Reader) + require.NoError(t, err) + m, err := kr1.Marshal() + require.NoError(t, err) + kr2 := aptosKeyring{} + err = kr2.Unmarshal(m) + require.NoError(t, err) + assert.True(t, bytes.Equal(kr1.pubKey, kr2.pubKey)) + assert.True(t, bytes.Equal(kr1.privKey, kr2.privKey)) + + // Invalid seed size should error + require.Error(t, kr2.Unmarshal([]byte{0x01})) +} diff --git a/core/services/keystore/keys/ocr2key/cosmos_keyring.go b/core/services/keystore/keys/ocr2key/cosmos_keyring.go index 5f1b9b98198..1d1a477f2d0 100644 --- a/core/services/keystore/keys/ocr2key/cosmos_keyring.go +++ b/core/services/keystore/keys/ocr2key/cosmos_keyring.go @@ -7,12 +7,13 @@ import ( "github.com/hdevalence/ed25519consensus" "github.com/pkg/errors" - "github.com/smartcontractkit/libocr/offchainreporting2/types" - "github.com/smartcontractkit/libocr/offchainreporting2plus/chains/evmutil" - ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" "golang.org/x/crypto/blake2s" "github.com/smartcontractkit/chainlink/v2/core/utils" + + "github.com/smartcontractkit/libocr/offchainreporting2/types" + "github.com/smartcontractkit/libocr/offchainreporting2plus/chains/evmutil" + ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" ) var _ ocrtypes.OnchainKeyring = &cosmosKeyring{} @@ -108,6 +109,10 @@ func (ckr *cosmosKeyring) Unmarshal(in []byte) error { } privKey := ed25519.NewKeyFromSeed(in) ckr.privKey = privKey - ckr.pubKey = privKey.Public().(ed25519.PublicKey) + pubKey, ok := privKey.Public().(ed25519.PublicKey) + if !ok { + return errors.New("failed to cast public key to ed25519.PublicKey") + } + ckr.pubKey = pubKey return nil } diff --git a/core/services/keystore/keys/ocr2key/export.go b/core/services/keystore/keys/ocr2key/export.go index 5487e310462..8fa5ffedfed 100644 --- a/core/services/keystore/keys/ocr2key/export.go +++ b/core/services/keystore/keys/ocr2key/export.go @@ -46,6 +46,8 @@ func FromEncryptedJSON(keyJSON []byte, password string) (KeyBundle, error) { kb = newKeyBundle(new(solanaKeyring)) case chaintype.StarkNet: kb = newKeyBundle(new(starkkey.OCR2Key)) + case chaintype.Aptos: + kb = newKeyBundle(new(aptosKeyring)) default: return nil, chaintype.NewErrInvalidChainType(export.ChainType) } diff --git a/core/services/keystore/keys/ocr2key/export_test.go b/core/services/keystore/keys/ocr2key/export_test.go index dfa820eb2be..b0ffa2db009 100644 --- a/core/services/keystore/keys/ocr2key/export_test.go +++ b/core/services/keystore/keys/ocr2key/export_test.go @@ -18,6 +18,7 @@ func TestExport(t *testing.T) { {chain: chaintype.Cosmos}, {chain: chaintype.Solana}, {chain: chaintype.StarkNet}, + {chain: chaintype.Aptos}, } for _, tc := range tt { tc := tc diff --git a/core/services/keystore/keys/ocr2key/key_bundle.go b/core/services/keystore/keys/ocr2key/key_bundle.go index 2c3a4bebeb0..2c25a159fef 100644 --- a/core/services/keystore/keys/ocr2key/key_bundle.go +++ b/core/services/keystore/keys/ocr2key/key_bundle.go @@ -43,6 +43,7 @@ var _ KeyBundle = &keyBundle[*evmKeyring]{} var _ KeyBundle = &keyBundle[*cosmosKeyring]{} var _ KeyBundle = &keyBundle[*solanaKeyring]{} var _ KeyBundle = &keyBundle[*starkkey.OCR2Key]{} +var _ KeyBundle = &keyBundle[*aptosKeyring]{} var curve = secp256k1.S256() @@ -57,6 +58,8 @@ func New(chainType chaintype.ChainType) (KeyBundle, error) { return newKeyBundleRand(chaintype.Solana, newSolanaKeyring) case chaintype.StarkNet: return newKeyBundleRand(chaintype.StarkNet, starkkey.NewOCR2Key) + case chaintype.Aptos: + return newKeyBundleRand(chaintype.Aptos, newAptosKeyring) } return nil, chaintype.NewErrInvalidChainType(chainType) } @@ -72,6 +75,8 @@ func MustNewInsecure(reader io.Reader, chainType chaintype.ChainType) KeyBundle return mustNewKeyBundleInsecure(chaintype.Solana, newSolanaKeyring, reader) case chaintype.StarkNet: return mustNewKeyBundleInsecure(chaintype.StarkNet, starkkey.NewOCR2Key, reader) + case chaintype.Aptos: + return mustNewKeyBundleInsecure(chaintype.Aptos, newAptosKeyring, reader) } panic(chaintype.NewErrInvalidChainType(chainType)) } @@ -121,6 +126,8 @@ func (raw Raw) Key() (kb KeyBundle) { kb = newKeyBundle(new(solanaKeyring)) case chaintype.StarkNet: kb = newKeyBundle(new(starkkey.OCR2Key)) + case chaintype.Aptos: + kb = newKeyBundle(new(aptosKeyring)) default: return nil } diff --git a/core/services/keystore/keys/solkey/key.go b/core/services/keystore/keys/solkey/key.go index bcec5e89404..c6cdd62d3bf 100644 --- a/core/services/keystore/keys/solkey/key.go +++ b/core/services/keystore/keys/solkey/key.go @@ -11,7 +11,7 @@ import ( "github.com/mr-tron/base58" ) -// Raw represents the ETH private key +// Raw represents the Solana private key type Raw []byte // Key gets the Key diff --git a/core/services/keystore/keystoretest.go b/core/services/keystore/keystoretest.go index 91dc87ffe95..e179b51bb54 100644 --- a/core/services/keystore/keystoretest.go +++ b/core/services/keystore/keystoretest.go @@ -73,8 +73,7 @@ func NewInMemory(ds sqlutil.DataSource, scryptParams utils.ScryptParams, lggr lo p2p: newP2PKeyStore(km), solana: newSolanaKeyStore(km), starknet: newStarkNetKeyStore(km), + aptos: newAptosKeyStore(km), vrf: newVRFKeyStore(km), - dkgSign: newDKGSignKeyStore(km), - dkgEncrypt: newDKGEncryptKeyStore(km), } } diff --git a/core/services/keystore/master.go b/core/services/keystore/master.go index bb5b21a96f0..47136f1f2ec 100644 --- a/core/services/keystore/master.go +++ b/core/services/keystore/master.go @@ -11,10 +11,9 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink/v2/core/logger" + "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/aptoskey" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/cosmoskey" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/csakey" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/dkgencryptkey" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/dkgsignkey" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocr2key" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocrkey" @@ -35,12 +34,8 @@ var ( // necessary because it is lazily evaluated type DefaultEVMChainIDFunc func() (defaultEVMChainID *big.Int, err error) -//go:generate mockery --quiet --name Master --output ./mocks/ --case=underscore - type Master interface { CSA() CSA - DKGSign() DKGSign - DKGEncrypt() DKGEncrypt Eth() Eth OCR() OCR OCR2() OCR2 @@ -48,6 +43,7 @@ type Master interface { Solana() Solana Cosmos() Cosmos StarkNet() StarkNet + Aptos() Aptos VRF() VRF Unlock(ctx context.Context, password string) error IsEmpty(ctx context.Context) (bool, error) @@ -55,17 +51,16 @@ type Master interface { type master struct { *keyManager - cosmos *cosmos - csa *csa - eth *eth - ocr *ocr - ocr2 ocr2 - p2p *p2p - solana *solana - starknet *starknet - vrf *vrf - dkgSign *dkgSign - dkgEncrypt *dkgEncrypt + cosmos *cosmos + csa *csa + eth *eth + ocr *ocr + ocr2 ocr2 + p2p *p2p + solana *solana + starknet *starknet + aptos *aptos + vrf *vrf } func New(ds sqlutil.DataSource, scryptParams utils.ScryptParams, lggr logger.Logger) Master { @@ -92,20 +87,11 @@ func newMaster(ds sqlutil.DataSource, scryptParams utils.ScryptParams, lggr logg p2p: newP2PKeyStore(km), solana: newSolanaKeyStore(km), starknet: newStarkNetKeyStore(km), + aptos: newAptosKeyStore(km), vrf: newVRFKeyStore(km), - dkgSign: newDKGSignKeyStore(km), - dkgEncrypt: newDKGEncryptKeyStore(km), } } -func (ks *master) DKGEncrypt() DKGEncrypt { - return ks.dkgEncrypt -} - -func (ks master) DKGSign() DKGSign { - return ks.dkgSign -} - func (ks master) CSA() CSA { return ks.csa } @@ -138,6 +124,10 @@ func (ks *master) StarkNet() StarkNet { return ks.starknet } +func (ks *master) Aptos() Aptos { + return ks.aptos +} + func (ks *master) VRF() VRF { return ks.vrf } @@ -273,12 +263,10 @@ func GetFieldNameForKey(unknownKey Key) (string, error) { return "Solana", nil case starkkey.Key: return "StarkNet", nil + case aptoskey.Key: + return "Aptos", nil case vrfkey.KeyV2: return "VRF", nil - case dkgsignkey.Key: - return "DKGSign", nil - case dkgencryptkey.Key: - return "DKGEncrypt", nil } return "", fmt.Errorf("unknown key type: %T", unknownKey) } diff --git a/core/services/keystore/mocks/aptos.go b/core/services/keystore/mocks/aptos.go new file mode 100644 index 00000000000..775f5d275e9 --- /dev/null +++ b/core/services/keystore/mocks/aptos.go @@ -0,0 +1,534 @@ +// Code generated by mockery v2.43.2. DO NOT EDIT. + +package mocks + +import ( + context "context" + + aptoskey "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/aptoskey" + + mock "github.com/stretchr/testify/mock" +) + +// Aptos is an autogenerated mock type for the Aptos type +type Aptos struct { + mock.Mock +} + +type Aptos_Expecter struct { + mock *mock.Mock +} + +func (_m *Aptos) EXPECT() *Aptos_Expecter { + return &Aptos_Expecter{mock: &_m.Mock} +} + +// Add provides a mock function with given fields: ctx, key +func (_m *Aptos) Add(ctx context.Context, key aptoskey.Key) error { + ret := _m.Called(ctx, key) + + if len(ret) == 0 { + panic("no return value specified for Add") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, aptoskey.Key) error); ok { + r0 = rf(ctx, key) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// Aptos_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add' +type Aptos_Add_Call struct { + *mock.Call +} + +// Add is a helper method to define mock.On call +// - ctx context.Context +// - key aptoskey.Key +func (_e *Aptos_Expecter) Add(ctx interface{}, key interface{}) *Aptos_Add_Call { + return &Aptos_Add_Call{Call: _e.mock.On("Add", ctx, key)} +} + +func (_c *Aptos_Add_Call) Run(run func(ctx context.Context, key aptoskey.Key)) *Aptos_Add_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(aptoskey.Key)) + }) + return _c +} + +func (_c *Aptos_Add_Call) Return(_a0 error) *Aptos_Add_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Aptos_Add_Call) RunAndReturn(run func(context.Context, aptoskey.Key) error) *Aptos_Add_Call { + _c.Call.Return(run) + return _c +} + +// Create provides a mock function with given fields: ctx +func (_m *Aptos) Create(ctx context.Context) (aptoskey.Key, error) { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for Create") + } + + var r0 aptoskey.Key + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (aptoskey.Key, error)); ok { + return rf(ctx) + } + if rf, ok := ret.Get(0).(func(context.Context) aptoskey.Key); ok { + r0 = rf(ctx) + } else { + r0 = ret.Get(0).(aptoskey.Key) + } + + if rf, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = rf(ctx) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Aptos_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type Aptos_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - ctx context.Context +func (_e *Aptos_Expecter) Create(ctx interface{}) *Aptos_Create_Call { + return &Aptos_Create_Call{Call: _e.mock.On("Create", ctx)} +} + +func (_c *Aptos_Create_Call) Run(run func(ctx context.Context)) *Aptos_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Aptos_Create_Call) Return(_a0 aptoskey.Key, _a1 error) *Aptos_Create_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Aptos_Create_Call) RunAndReturn(run func(context.Context) (aptoskey.Key, error)) *Aptos_Create_Call { + _c.Call.Return(run) + return _c +} + +// Delete provides a mock function with given fields: ctx, id +func (_m *Aptos) Delete(ctx context.Context, id string) (aptoskey.Key, error) { + ret := _m.Called(ctx, id) + + if len(ret) == 0 { + panic("no return value specified for Delete") + } + + var r0 aptoskey.Key + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (aptoskey.Key, error)); ok { + return rf(ctx, id) + } + if rf, ok := ret.Get(0).(func(context.Context, string) aptoskey.Key); ok { + r0 = rf(ctx, id) + } else { + r0 = ret.Get(0).(aptoskey.Key) + } + + if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = rf(ctx, id) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Aptos_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' +type Aptos_Delete_Call struct { + *mock.Call +} + +// Delete is a helper method to define mock.On call +// - ctx context.Context +// - id string +func (_e *Aptos_Expecter) Delete(ctx interface{}, id interface{}) *Aptos_Delete_Call { + return &Aptos_Delete_Call{Call: _e.mock.On("Delete", ctx, id)} +} + +func (_c *Aptos_Delete_Call) Run(run func(ctx context.Context, id string)) *Aptos_Delete_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *Aptos_Delete_Call) Return(_a0 aptoskey.Key, _a1 error) *Aptos_Delete_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Aptos_Delete_Call) RunAndReturn(run func(context.Context, string) (aptoskey.Key, error)) *Aptos_Delete_Call { + _c.Call.Return(run) + return _c +} + +// EnsureKey provides a mock function with given fields: ctx +func (_m *Aptos) EnsureKey(ctx context.Context) error { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for EnsureKey") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context) error); ok { + r0 = rf(ctx) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// Aptos_EnsureKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureKey' +type Aptos_EnsureKey_Call struct { + *mock.Call +} + +// EnsureKey is a helper method to define mock.On call +// - ctx context.Context +func (_e *Aptos_Expecter) EnsureKey(ctx interface{}) *Aptos_EnsureKey_Call { + return &Aptos_EnsureKey_Call{Call: _e.mock.On("EnsureKey", ctx)} +} + +func (_c *Aptos_EnsureKey_Call) Run(run func(ctx context.Context)) *Aptos_EnsureKey_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Aptos_EnsureKey_Call) Return(_a0 error) *Aptos_EnsureKey_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Aptos_EnsureKey_Call) RunAndReturn(run func(context.Context) error) *Aptos_EnsureKey_Call { + _c.Call.Return(run) + return _c +} + +// Export provides a mock function with given fields: id, password +func (_m *Aptos) Export(id string, password string) ([]byte, error) { + ret := _m.Called(id, password) + + if len(ret) == 0 { + panic("no return value specified for Export") + } + + var r0 []byte + var r1 error + if rf, ok := ret.Get(0).(func(string, string) ([]byte, error)); ok { + return rf(id, password) + } + if rf, ok := ret.Get(0).(func(string, string) []byte); ok { + r0 = rf(id, password) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + + if rf, ok := ret.Get(1).(func(string, string) error); ok { + r1 = rf(id, password) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Aptos_Export_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Export' +type Aptos_Export_Call struct { + *mock.Call +} + +// Export is a helper method to define mock.On call +// - id string +// - password string +func (_e *Aptos_Expecter) Export(id interface{}, password interface{}) *Aptos_Export_Call { + return &Aptos_Export_Call{Call: _e.mock.On("Export", id, password)} +} + +func (_c *Aptos_Export_Call) Run(run func(id string, password string)) *Aptos_Export_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string)) + }) + return _c +} + +func (_c *Aptos_Export_Call) Return(_a0 []byte, _a1 error) *Aptos_Export_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Aptos_Export_Call) RunAndReturn(run func(string, string) ([]byte, error)) *Aptos_Export_Call { + _c.Call.Return(run) + return _c +} + +// Get provides a mock function with given fields: id +func (_m *Aptos) Get(id string) (aptoskey.Key, error) { + ret := _m.Called(id) + + if len(ret) == 0 { + panic("no return value specified for Get") + } + + var r0 aptoskey.Key + var r1 error + if rf, ok := ret.Get(0).(func(string) (aptoskey.Key, error)); ok { + return rf(id) + } + if rf, ok := ret.Get(0).(func(string) aptoskey.Key); ok { + r0 = rf(id) + } else { + r0 = ret.Get(0).(aptoskey.Key) + } + + if rf, ok := ret.Get(1).(func(string) error); ok { + r1 = rf(id) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Aptos_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type Aptos_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - id string +func (_e *Aptos_Expecter) Get(id interface{}) *Aptos_Get_Call { + return &Aptos_Get_Call{Call: _e.mock.On("Get", id)} +} + +func (_c *Aptos_Get_Call) Run(run func(id string)) *Aptos_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *Aptos_Get_Call) Return(_a0 aptoskey.Key, _a1 error) *Aptos_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Aptos_Get_Call) RunAndReturn(run func(string) (aptoskey.Key, error)) *Aptos_Get_Call { + _c.Call.Return(run) + return _c +} + +// GetAll provides a mock function with given fields: +func (_m *Aptos) GetAll() ([]aptoskey.Key, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetAll") + } + + var r0 []aptoskey.Key + var r1 error + if rf, ok := ret.Get(0).(func() ([]aptoskey.Key, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() []aptoskey.Key); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]aptoskey.Key) + } + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Aptos_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll' +type Aptos_GetAll_Call struct { + *mock.Call +} + +// GetAll is a helper method to define mock.On call +func (_e *Aptos_Expecter) GetAll() *Aptos_GetAll_Call { + return &Aptos_GetAll_Call{Call: _e.mock.On("GetAll")} +} + +func (_c *Aptos_GetAll_Call) Run(run func()) *Aptos_GetAll_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Aptos_GetAll_Call) Return(_a0 []aptoskey.Key, _a1 error) *Aptos_GetAll_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Aptos_GetAll_Call) RunAndReturn(run func() ([]aptoskey.Key, error)) *Aptos_GetAll_Call { + _c.Call.Return(run) + return _c +} + +// Import provides a mock function with given fields: ctx, keyJSON, password +func (_m *Aptos) Import(ctx context.Context, keyJSON []byte, password string) (aptoskey.Key, error) { + ret := _m.Called(ctx, keyJSON, password) + + if len(ret) == 0 { + panic("no return value specified for Import") + } + + var r0 aptoskey.Key + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, []byte, string) (aptoskey.Key, error)); ok { + return rf(ctx, keyJSON, password) + } + if rf, ok := ret.Get(0).(func(context.Context, []byte, string) aptoskey.Key); ok { + r0 = rf(ctx, keyJSON, password) + } else { + r0 = ret.Get(0).(aptoskey.Key) + } + + if rf, ok := ret.Get(1).(func(context.Context, []byte, string) error); ok { + r1 = rf(ctx, keyJSON, password) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Aptos_Import_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Import' +type Aptos_Import_Call struct { + *mock.Call +} + +// Import is a helper method to define mock.On call +// - ctx context.Context +// - keyJSON []byte +// - password string +func (_e *Aptos_Expecter) Import(ctx interface{}, keyJSON interface{}, password interface{}) *Aptos_Import_Call { + return &Aptos_Import_Call{Call: _e.mock.On("Import", ctx, keyJSON, password)} +} + +func (_c *Aptos_Import_Call) Run(run func(ctx context.Context, keyJSON []byte, password string)) *Aptos_Import_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]byte), args[2].(string)) + }) + return _c +} + +func (_c *Aptos_Import_Call) Return(_a0 aptoskey.Key, _a1 error) *Aptos_Import_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Aptos_Import_Call) RunAndReturn(run func(context.Context, []byte, string) (aptoskey.Key, error)) *Aptos_Import_Call { + _c.Call.Return(run) + return _c +} + +// Sign provides a mock function with given fields: ctx, id, msg +func (_m *Aptos) Sign(ctx context.Context, id string, msg []byte) ([]byte, error) { + ret := _m.Called(ctx, id, msg) + + if len(ret) == 0 { + panic("no return value specified for Sign") + } + + var r0 []byte + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, []byte) ([]byte, error)); ok { + return rf(ctx, id, msg) + } + if rf, ok := ret.Get(0).(func(context.Context, string, []byte) []byte); ok { + r0 = rf(ctx, id, msg) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, []byte) error); ok { + r1 = rf(ctx, id, msg) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Aptos_Sign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Sign' +type Aptos_Sign_Call struct { + *mock.Call +} + +// Sign is a helper method to define mock.On call +// - ctx context.Context +// - id string +// - msg []byte +func (_e *Aptos_Expecter) Sign(ctx interface{}, id interface{}, msg interface{}) *Aptos_Sign_Call { + return &Aptos_Sign_Call{Call: _e.mock.On("Sign", ctx, id, msg)} +} + +func (_c *Aptos_Sign_Call) Run(run func(ctx context.Context, id string, msg []byte)) *Aptos_Sign_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].([]byte)) + }) + return _c +} + +func (_c *Aptos_Sign_Call) Return(signature []byte, err error) *Aptos_Sign_Call { + _c.Call.Return(signature, err) + return _c +} + +func (_c *Aptos_Sign_Call) RunAndReturn(run func(context.Context, string, []byte) ([]byte, error)) *Aptos_Sign_Call { + _c.Call.Return(run) + return _c +} + +// NewAptos creates a new instance of Aptos. 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 NewAptos(t interface { + mock.TestingT + Cleanup(func()) +}) *Aptos { + mock := &Aptos{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/core/services/keystore/mocks/cosmos.go b/core/services/keystore/mocks/cosmos.go index 5e16a1a3c34..59e1de542e8 100644 --- a/core/services/keystore/mocks/cosmos.go +++ b/core/services/keystore/mocks/cosmos.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -15,6 +15,14 @@ type Cosmos struct { mock.Mock } +type Cosmos_Expecter struct { + mock *mock.Mock +} + +func (_m *Cosmos) EXPECT() *Cosmos_Expecter { + return &Cosmos_Expecter{mock: &_m.Mock} +} + // Add provides a mock function with given fields: ctx, key func (_m *Cosmos) Add(ctx context.Context, key cosmoskey.Key) error { ret := _m.Called(ctx, key) @@ -33,6 +41,35 @@ func (_m *Cosmos) Add(ctx context.Context, key cosmoskey.Key) error { return r0 } +// Cosmos_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add' +type Cosmos_Add_Call struct { + *mock.Call +} + +// Add is a helper method to define mock.On call +// - ctx context.Context +// - key cosmoskey.Key +func (_e *Cosmos_Expecter) Add(ctx interface{}, key interface{}) *Cosmos_Add_Call { + return &Cosmos_Add_Call{Call: _e.mock.On("Add", ctx, key)} +} + +func (_c *Cosmos_Add_Call) Run(run func(ctx context.Context, key cosmoskey.Key)) *Cosmos_Add_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(cosmoskey.Key)) + }) + return _c +} + +func (_c *Cosmos_Add_Call) Return(_a0 error) *Cosmos_Add_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Cosmos_Add_Call) RunAndReturn(run func(context.Context, cosmoskey.Key) error) *Cosmos_Add_Call { + _c.Call.Return(run) + return _c +} + // Create provides a mock function with given fields: ctx func (_m *Cosmos) Create(ctx context.Context) (cosmoskey.Key, error) { ret := _m.Called(ctx) @@ -61,6 +98,34 @@ func (_m *Cosmos) Create(ctx context.Context) (cosmoskey.Key, error) { return r0, r1 } +// Cosmos_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type Cosmos_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - ctx context.Context +func (_e *Cosmos_Expecter) Create(ctx interface{}) *Cosmos_Create_Call { + return &Cosmos_Create_Call{Call: _e.mock.On("Create", ctx)} +} + +func (_c *Cosmos_Create_Call) Run(run func(ctx context.Context)) *Cosmos_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Cosmos_Create_Call) Return(_a0 cosmoskey.Key, _a1 error) *Cosmos_Create_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Cosmos_Create_Call) RunAndReturn(run func(context.Context) (cosmoskey.Key, error)) *Cosmos_Create_Call { + _c.Call.Return(run) + return _c +} + // Delete provides a mock function with given fields: ctx, id func (_m *Cosmos) Delete(ctx context.Context, id string) (cosmoskey.Key, error) { ret := _m.Called(ctx, id) @@ -89,6 +154,35 @@ func (_m *Cosmos) Delete(ctx context.Context, id string) (cosmoskey.Key, error) return r0, r1 } +// Cosmos_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' +type Cosmos_Delete_Call struct { + *mock.Call +} + +// Delete is a helper method to define mock.On call +// - ctx context.Context +// - id string +func (_e *Cosmos_Expecter) Delete(ctx interface{}, id interface{}) *Cosmos_Delete_Call { + return &Cosmos_Delete_Call{Call: _e.mock.On("Delete", ctx, id)} +} + +func (_c *Cosmos_Delete_Call) Run(run func(ctx context.Context, id string)) *Cosmos_Delete_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *Cosmos_Delete_Call) Return(_a0 cosmoskey.Key, _a1 error) *Cosmos_Delete_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Cosmos_Delete_Call) RunAndReturn(run func(context.Context, string) (cosmoskey.Key, error)) *Cosmos_Delete_Call { + _c.Call.Return(run) + return _c +} + // EnsureKey provides a mock function with given fields: ctx func (_m *Cosmos) EnsureKey(ctx context.Context) error { ret := _m.Called(ctx) @@ -107,6 +201,34 @@ func (_m *Cosmos) EnsureKey(ctx context.Context) error { return r0 } +// Cosmos_EnsureKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureKey' +type Cosmos_EnsureKey_Call struct { + *mock.Call +} + +// EnsureKey is a helper method to define mock.On call +// - ctx context.Context +func (_e *Cosmos_Expecter) EnsureKey(ctx interface{}) *Cosmos_EnsureKey_Call { + return &Cosmos_EnsureKey_Call{Call: _e.mock.On("EnsureKey", ctx)} +} + +func (_c *Cosmos_EnsureKey_Call) Run(run func(ctx context.Context)) *Cosmos_EnsureKey_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Cosmos_EnsureKey_Call) Return(_a0 error) *Cosmos_EnsureKey_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Cosmos_EnsureKey_Call) RunAndReturn(run func(context.Context) error) *Cosmos_EnsureKey_Call { + _c.Call.Return(run) + return _c +} + // Export provides a mock function with given fields: id, password func (_m *Cosmos) Export(id string, password string) ([]byte, error) { ret := _m.Called(id, password) @@ -137,6 +259,35 @@ func (_m *Cosmos) Export(id string, password string) ([]byte, error) { return r0, r1 } +// Cosmos_Export_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Export' +type Cosmos_Export_Call struct { + *mock.Call +} + +// Export is a helper method to define mock.On call +// - id string +// - password string +func (_e *Cosmos_Expecter) Export(id interface{}, password interface{}) *Cosmos_Export_Call { + return &Cosmos_Export_Call{Call: _e.mock.On("Export", id, password)} +} + +func (_c *Cosmos_Export_Call) Run(run func(id string, password string)) *Cosmos_Export_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string)) + }) + return _c +} + +func (_c *Cosmos_Export_Call) Return(_a0 []byte, _a1 error) *Cosmos_Export_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Cosmos_Export_Call) RunAndReturn(run func(string, string) ([]byte, error)) *Cosmos_Export_Call { + _c.Call.Return(run) + return _c +} + // Get provides a mock function with given fields: id func (_m *Cosmos) Get(id string) (cosmoskey.Key, error) { ret := _m.Called(id) @@ -165,6 +316,34 @@ func (_m *Cosmos) Get(id string) (cosmoskey.Key, error) { return r0, r1 } +// Cosmos_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type Cosmos_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - id string +func (_e *Cosmos_Expecter) Get(id interface{}) *Cosmos_Get_Call { + return &Cosmos_Get_Call{Call: _e.mock.On("Get", id)} +} + +func (_c *Cosmos_Get_Call) Run(run func(id string)) *Cosmos_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *Cosmos_Get_Call) Return(_a0 cosmoskey.Key, _a1 error) *Cosmos_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Cosmos_Get_Call) RunAndReturn(run func(string) (cosmoskey.Key, error)) *Cosmos_Get_Call { + _c.Call.Return(run) + return _c +} + // GetAll provides a mock function with given fields: func (_m *Cosmos) GetAll() ([]cosmoskey.Key, error) { ret := _m.Called() @@ -195,6 +374,33 @@ func (_m *Cosmos) GetAll() ([]cosmoskey.Key, error) { return r0, r1 } +// Cosmos_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll' +type Cosmos_GetAll_Call struct { + *mock.Call +} + +// GetAll is a helper method to define mock.On call +func (_e *Cosmos_Expecter) GetAll() *Cosmos_GetAll_Call { + return &Cosmos_GetAll_Call{Call: _e.mock.On("GetAll")} +} + +func (_c *Cosmos_GetAll_Call) Run(run func()) *Cosmos_GetAll_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Cosmos_GetAll_Call) Return(_a0 []cosmoskey.Key, _a1 error) *Cosmos_GetAll_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Cosmos_GetAll_Call) RunAndReturn(run func() ([]cosmoskey.Key, error)) *Cosmos_GetAll_Call { + _c.Call.Return(run) + return _c +} + // Import provides a mock function with given fields: ctx, keyJSON, password func (_m *Cosmos) Import(ctx context.Context, keyJSON []byte, password string) (cosmoskey.Key, error) { ret := _m.Called(ctx, keyJSON, password) @@ -223,6 +429,36 @@ func (_m *Cosmos) Import(ctx context.Context, keyJSON []byte, password string) ( return r0, r1 } +// Cosmos_Import_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Import' +type Cosmos_Import_Call struct { + *mock.Call +} + +// Import is a helper method to define mock.On call +// - ctx context.Context +// - keyJSON []byte +// - password string +func (_e *Cosmos_Expecter) Import(ctx interface{}, keyJSON interface{}, password interface{}) *Cosmos_Import_Call { + return &Cosmos_Import_Call{Call: _e.mock.On("Import", ctx, keyJSON, password)} +} + +func (_c *Cosmos_Import_Call) Run(run func(ctx context.Context, keyJSON []byte, password string)) *Cosmos_Import_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]byte), args[2].(string)) + }) + return _c +} + +func (_c *Cosmos_Import_Call) Return(_a0 cosmoskey.Key, _a1 error) *Cosmos_Import_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Cosmos_Import_Call) RunAndReturn(run func(context.Context, []byte, string) (cosmoskey.Key, error)) *Cosmos_Import_Call { + _c.Call.Return(run) + return _c +} + // NewCosmos creates a new instance of Cosmos. 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 NewCosmos(t interface { diff --git a/core/services/keystore/mocks/csa.go b/core/services/keystore/mocks/csa.go index c99fef9de8c..56ca7d9dab2 100644 --- a/core/services/keystore/mocks/csa.go +++ b/core/services/keystore/mocks/csa.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -15,6 +15,14 @@ type CSA struct { mock.Mock } +type CSA_Expecter struct { + mock *mock.Mock +} + +func (_m *CSA) EXPECT() *CSA_Expecter { + return &CSA_Expecter{mock: &_m.Mock} +} + // Add provides a mock function with given fields: ctx, key func (_m *CSA) Add(ctx context.Context, key csakey.KeyV2) error { ret := _m.Called(ctx, key) @@ -33,6 +41,35 @@ func (_m *CSA) Add(ctx context.Context, key csakey.KeyV2) error { return r0 } +// CSA_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add' +type CSA_Add_Call struct { + *mock.Call +} + +// Add is a helper method to define mock.On call +// - ctx context.Context +// - key csakey.KeyV2 +func (_e *CSA_Expecter) Add(ctx interface{}, key interface{}) *CSA_Add_Call { + return &CSA_Add_Call{Call: _e.mock.On("Add", ctx, key)} +} + +func (_c *CSA_Add_Call) Run(run func(ctx context.Context, key csakey.KeyV2)) *CSA_Add_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(csakey.KeyV2)) + }) + return _c +} + +func (_c *CSA_Add_Call) Return(_a0 error) *CSA_Add_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *CSA_Add_Call) RunAndReturn(run func(context.Context, csakey.KeyV2) error) *CSA_Add_Call { + _c.Call.Return(run) + return _c +} + // Create provides a mock function with given fields: ctx func (_m *CSA) Create(ctx context.Context) (csakey.KeyV2, error) { ret := _m.Called(ctx) @@ -61,6 +98,34 @@ func (_m *CSA) Create(ctx context.Context) (csakey.KeyV2, error) { return r0, r1 } +// CSA_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type CSA_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - ctx context.Context +func (_e *CSA_Expecter) Create(ctx interface{}) *CSA_Create_Call { + return &CSA_Create_Call{Call: _e.mock.On("Create", ctx)} +} + +func (_c *CSA_Create_Call) Run(run func(ctx context.Context)) *CSA_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *CSA_Create_Call) Return(_a0 csakey.KeyV2, _a1 error) *CSA_Create_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *CSA_Create_Call) RunAndReturn(run func(context.Context) (csakey.KeyV2, error)) *CSA_Create_Call { + _c.Call.Return(run) + return _c +} + // Delete provides a mock function with given fields: ctx, id func (_m *CSA) Delete(ctx context.Context, id string) (csakey.KeyV2, error) { ret := _m.Called(ctx, id) @@ -89,6 +154,35 @@ func (_m *CSA) Delete(ctx context.Context, id string) (csakey.KeyV2, error) { return r0, r1 } +// CSA_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' +type CSA_Delete_Call struct { + *mock.Call +} + +// Delete is a helper method to define mock.On call +// - ctx context.Context +// - id string +func (_e *CSA_Expecter) Delete(ctx interface{}, id interface{}) *CSA_Delete_Call { + return &CSA_Delete_Call{Call: _e.mock.On("Delete", ctx, id)} +} + +func (_c *CSA_Delete_Call) Run(run func(ctx context.Context, id string)) *CSA_Delete_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *CSA_Delete_Call) Return(_a0 csakey.KeyV2, _a1 error) *CSA_Delete_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *CSA_Delete_Call) RunAndReturn(run func(context.Context, string) (csakey.KeyV2, error)) *CSA_Delete_Call { + _c.Call.Return(run) + return _c +} + // EnsureKey provides a mock function with given fields: ctx func (_m *CSA) EnsureKey(ctx context.Context) error { ret := _m.Called(ctx) @@ -107,6 +201,34 @@ func (_m *CSA) EnsureKey(ctx context.Context) error { return r0 } +// CSA_EnsureKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureKey' +type CSA_EnsureKey_Call struct { + *mock.Call +} + +// EnsureKey is a helper method to define mock.On call +// - ctx context.Context +func (_e *CSA_Expecter) EnsureKey(ctx interface{}) *CSA_EnsureKey_Call { + return &CSA_EnsureKey_Call{Call: _e.mock.On("EnsureKey", ctx)} +} + +func (_c *CSA_EnsureKey_Call) Run(run func(ctx context.Context)) *CSA_EnsureKey_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *CSA_EnsureKey_Call) Return(_a0 error) *CSA_EnsureKey_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *CSA_EnsureKey_Call) RunAndReturn(run func(context.Context) error) *CSA_EnsureKey_Call { + _c.Call.Return(run) + return _c +} + // Export provides a mock function with given fields: id, password func (_m *CSA) Export(id string, password string) ([]byte, error) { ret := _m.Called(id, password) @@ -137,6 +259,35 @@ func (_m *CSA) Export(id string, password string) ([]byte, error) { return r0, r1 } +// CSA_Export_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Export' +type CSA_Export_Call struct { + *mock.Call +} + +// Export is a helper method to define mock.On call +// - id string +// - password string +func (_e *CSA_Expecter) Export(id interface{}, password interface{}) *CSA_Export_Call { + return &CSA_Export_Call{Call: _e.mock.On("Export", id, password)} +} + +func (_c *CSA_Export_Call) Run(run func(id string, password string)) *CSA_Export_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string)) + }) + return _c +} + +func (_c *CSA_Export_Call) Return(_a0 []byte, _a1 error) *CSA_Export_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *CSA_Export_Call) RunAndReturn(run func(string, string) ([]byte, error)) *CSA_Export_Call { + _c.Call.Return(run) + return _c +} + // Get provides a mock function with given fields: id func (_m *CSA) Get(id string) (csakey.KeyV2, error) { ret := _m.Called(id) @@ -165,6 +316,34 @@ func (_m *CSA) Get(id string) (csakey.KeyV2, error) { return r0, r1 } +// CSA_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type CSA_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - id string +func (_e *CSA_Expecter) Get(id interface{}) *CSA_Get_Call { + return &CSA_Get_Call{Call: _e.mock.On("Get", id)} +} + +func (_c *CSA_Get_Call) Run(run func(id string)) *CSA_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *CSA_Get_Call) Return(_a0 csakey.KeyV2, _a1 error) *CSA_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *CSA_Get_Call) RunAndReturn(run func(string) (csakey.KeyV2, error)) *CSA_Get_Call { + _c.Call.Return(run) + return _c +} + // GetAll provides a mock function with given fields: func (_m *CSA) GetAll() ([]csakey.KeyV2, error) { ret := _m.Called() @@ -195,6 +374,33 @@ func (_m *CSA) GetAll() ([]csakey.KeyV2, error) { return r0, r1 } +// CSA_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll' +type CSA_GetAll_Call struct { + *mock.Call +} + +// GetAll is a helper method to define mock.On call +func (_e *CSA_Expecter) GetAll() *CSA_GetAll_Call { + return &CSA_GetAll_Call{Call: _e.mock.On("GetAll")} +} + +func (_c *CSA_GetAll_Call) Run(run func()) *CSA_GetAll_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *CSA_GetAll_Call) Return(_a0 []csakey.KeyV2, _a1 error) *CSA_GetAll_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *CSA_GetAll_Call) RunAndReturn(run func() ([]csakey.KeyV2, error)) *CSA_GetAll_Call { + _c.Call.Return(run) + return _c +} + // Import provides a mock function with given fields: ctx, keyJSON, password func (_m *CSA) Import(ctx context.Context, keyJSON []byte, password string) (csakey.KeyV2, error) { ret := _m.Called(ctx, keyJSON, password) @@ -223,6 +429,36 @@ func (_m *CSA) Import(ctx context.Context, keyJSON []byte, password string) (csa return r0, r1 } +// CSA_Import_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Import' +type CSA_Import_Call struct { + *mock.Call +} + +// Import is a helper method to define mock.On call +// - ctx context.Context +// - keyJSON []byte +// - password string +func (_e *CSA_Expecter) Import(ctx interface{}, keyJSON interface{}, password interface{}) *CSA_Import_Call { + return &CSA_Import_Call{Call: _e.mock.On("Import", ctx, keyJSON, password)} +} + +func (_c *CSA_Import_Call) Run(run func(ctx context.Context, keyJSON []byte, password string)) *CSA_Import_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]byte), args[2].(string)) + }) + return _c +} + +func (_c *CSA_Import_Call) Return(_a0 csakey.KeyV2, _a1 error) *CSA_Import_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *CSA_Import_Call) RunAndReturn(run func(context.Context, []byte, string) (csakey.KeyV2, error)) *CSA_Import_Call { + _c.Call.Return(run) + return _c +} + // NewCSA creates a new instance of CSA. 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 NewCSA(t interface { diff --git a/core/services/keystore/mocks/dkg_encrypt.go b/core/services/keystore/mocks/dkg_encrypt.go deleted file mode 100644 index 48f50b3cec7..00000000000 --- a/core/services/keystore/mocks/dkg_encrypt.go +++ /dev/null @@ -1,238 +0,0 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package mocks - -import ( - context "context" - - dkgencryptkey "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/dkgencryptkey" - - mock "github.com/stretchr/testify/mock" -) - -// DKGEncrypt is an autogenerated mock type for the DKGEncrypt type -type DKGEncrypt struct { - mock.Mock -} - -// Add provides a mock function with given fields: ctx, key -func (_m *DKGEncrypt) Add(ctx context.Context, key dkgencryptkey.Key) error { - ret := _m.Called(ctx, key) - - if len(ret) == 0 { - panic("no return value specified for Add") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, dkgencryptkey.Key) error); ok { - r0 = rf(ctx, key) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Create provides a mock function with given fields: ctx -func (_m *DKGEncrypt) Create(ctx context.Context) (dkgencryptkey.Key, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 dkgencryptkey.Key - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (dkgencryptkey.Key, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) dkgencryptkey.Key); ok { - r0 = rf(ctx) - } else { - r0 = ret.Get(0).(dkgencryptkey.Key) - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Delete provides a mock function with given fields: ctx, id -func (_m *DKGEncrypt) Delete(ctx context.Context, id string) (dkgencryptkey.Key, error) { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 dkgencryptkey.Key - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (dkgencryptkey.Key, error)); ok { - return rf(ctx, id) - } - if rf, ok := ret.Get(0).(func(context.Context, string) dkgencryptkey.Key); ok { - r0 = rf(ctx, id) - } else { - r0 = ret.Get(0).(dkgencryptkey.Key) - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, id) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// EnsureKey provides a mock function with given fields: ctx -func (_m *DKGEncrypt) EnsureKey(ctx context.Context) error { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for EnsureKey") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context) error); ok { - r0 = rf(ctx) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Export provides a mock function with given fields: id, password -func (_m *DKGEncrypt) Export(id string, password string) ([]byte, error) { - ret := _m.Called(id, password) - - if len(ret) == 0 { - panic("no return value specified for Export") - } - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func(string, string) ([]byte, error)); ok { - return rf(id, password) - } - if rf, ok := ret.Get(0).(func(string, string) []byte); ok { - r0 = rf(id, password) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func(string, string) error); ok { - r1 = rf(id, password) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Get provides a mock function with given fields: id -func (_m *DKGEncrypt) Get(id string) (dkgencryptkey.Key, error) { - ret := _m.Called(id) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 dkgencryptkey.Key - var r1 error - if rf, ok := ret.Get(0).(func(string) (dkgencryptkey.Key, error)); ok { - return rf(id) - } - if rf, ok := ret.Get(0).(func(string) dkgencryptkey.Key); ok { - r0 = rf(id) - } else { - r0 = ret.Get(0).(dkgencryptkey.Key) - } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(id) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetAll provides a mock function with given fields: -func (_m *DKGEncrypt) GetAll() ([]dkgencryptkey.Key, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetAll") - } - - var r0 []dkgencryptkey.Key - var r1 error - if rf, ok := ret.Get(0).(func() ([]dkgencryptkey.Key, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() []dkgencryptkey.Key); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]dkgencryptkey.Key) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Import provides a mock function with given fields: ctx, keyJSON, password -func (_m *DKGEncrypt) Import(ctx context.Context, keyJSON []byte, password string) (dkgencryptkey.Key, error) { - ret := _m.Called(ctx, keyJSON, password) - - if len(ret) == 0 { - panic("no return value specified for Import") - } - - var r0 dkgencryptkey.Key - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, []byte, string) (dkgencryptkey.Key, error)); ok { - return rf(ctx, keyJSON, password) - } - if rf, ok := ret.Get(0).(func(context.Context, []byte, string) dkgencryptkey.Key); ok { - r0 = rf(ctx, keyJSON, password) - } else { - r0 = ret.Get(0).(dkgencryptkey.Key) - } - - if rf, ok := ret.Get(1).(func(context.Context, []byte, string) error); ok { - r1 = rf(ctx, keyJSON, password) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NewDKGEncrypt creates a new instance of DKGEncrypt. 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 NewDKGEncrypt(t interface { - mock.TestingT - Cleanup(func()) -}) *DKGEncrypt { - mock := &DKGEncrypt{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/services/keystore/mocks/dkg_sign.go b/core/services/keystore/mocks/dkg_sign.go deleted file mode 100644 index fd16f573a87..00000000000 --- a/core/services/keystore/mocks/dkg_sign.go +++ /dev/null @@ -1,238 +0,0 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package mocks - -import ( - context "context" - - dkgsignkey "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/dkgsignkey" - - mock "github.com/stretchr/testify/mock" -) - -// DKGSign is an autogenerated mock type for the DKGSign type -type DKGSign struct { - mock.Mock -} - -// Add provides a mock function with given fields: ctx, key -func (_m *DKGSign) Add(ctx context.Context, key dkgsignkey.Key) error { - ret := _m.Called(ctx, key) - - if len(ret) == 0 { - panic("no return value specified for Add") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, dkgsignkey.Key) error); ok { - r0 = rf(ctx, key) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Create provides a mock function with given fields: ctx -func (_m *DKGSign) Create(ctx context.Context) (dkgsignkey.Key, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 dkgsignkey.Key - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (dkgsignkey.Key, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) dkgsignkey.Key); ok { - r0 = rf(ctx) - } else { - r0 = ret.Get(0).(dkgsignkey.Key) - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Delete provides a mock function with given fields: ctx, id -func (_m *DKGSign) Delete(ctx context.Context, id string) (dkgsignkey.Key, error) { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 dkgsignkey.Key - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (dkgsignkey.Key, error)); ok { - return rf(ctx, id) - } - if rf, ok := ret.Get(0).(func(context.Context, string) dkgsignkey.Key); ok { - r0 = rf(ctx, id) - } else { - r0 = ret.Get(0).(dkgsignkey.Key) - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, id) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// EnsureKey provides a mock function with given fields: ctx -func (_m *DKGSign) EnsureKey(ctx context.Context) error { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for EnsureKey") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context) error); ok { - r0 = rf(ctx) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Export provides a mock function with given fields: id, password -func (_m *DKGSign) Export(id string, password string) ([]byte, error) { - ret := _m.Called(id, password) - - if len(ret) == 0 { - panic("no return value specified for Export") - } - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func(string, string) ([]byte, error)); ok { - return rf(id, password) - } - if rf, ok := ret.Get(0).(func(string, string) []byte); ok { - r0 = rf(id, password) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func(string, string) error); ok { - r1 = rf(id, password) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Get provides a mock function with given fields: id -func (_m *DKGSign) Get(id string) (dkgsignkey.Key, error) { - ret := _m.Called(id) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 dkgsignkey.Key - var r1 error - if rf, ok := ret.Get(0).(func(string) (dkgsignkey.Key, error)); ok { - return rf(id) - } - if rf, ok := ret.Get(0).(func(string) dkgsignkey.Key); ok { - r0 = rf(id) - } else { - r0 = ret.Get(0).(dkgsignkey.Key) - } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(id) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetAll provides a mock function with given fields: -func (_m *DKGSign) GetAll() ([]dkgsignkey.Key, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetAll") - } - - var r0 []dkgsignkey.Key - var r1 error - if rf, ok := ret.Get(0).(func() ([]dkgsignkey.Key, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() []dkgsignkey.Key); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]dkgsignkey.Key) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Import provides a mock function with given fields: ctx, keyJSON, password -func (_m *DKGSign) Import(ctx context.Context, keyJSON []byte, password string) (dkgsignkey.Key, error) { - ret := _m.Called(ctx, keyJSON, password) - - if len(ret) == 0 { - panic("no return value specified for Import") - } - - var r0 dkgsignkey.Key - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, []byte, string) (dkgsignkey.Key, error)); ok { - return rf(ctx, keyJSON, password) - } - if rf, ok := ret.Get(0).(func(context.Context, []byte, string) dkgsignkey.Key); ok { - r0 = rf(ctx, keyJSON, password) - } else { - r0 = ret.Get(0).(dkgsignkey.Key) - } - - if rf, ok := ret.Get(1).(func(context.Context, []byte, string) error); ok { - r1 = rf(ctx, keyJSON, password) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NewDKGSign creates a new instance of DKGSign. 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 NewDKGSign(t interface { - mock.TestingT - Cleanup(func()) -}) *DKGSign { - mock := &DKGSign{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/services/keystore/mocks/eth.go b/core/services/keystore/mocks/eth.go index f4a2bea1b02..4a9dd68fbc2 100644 --- a/core/services/keystore/mocks/eth.go +++ b/core/services/keystore/mocks/eth.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -20,6 +20,14 @@ type Eth struct { mock.Mock } +type Eth_Expecter struct { + mock *mock.Mock +} + +func (_m *Eth) EXPECT() *Eth_Expecter { + return &Eth_Expecter{mock: &_m.Mock} +} + // Add provides a mock function with given fields: ctx, address, chainID func (_m *Eth) Add(ctx context.Context, address common.Address, chainID *big.Int) error { ret := _m.Called(ctx, address, chainID) @@ -38,6 +46,36 @@ func (_m *Eth) Add(ctx context.Context, address common.Address, chainID *big.Int return r0 } +// Eth_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add' +type Eth_Add_Call struct { + *mock.Call +} + +// Add is a helper method to define mock.On call +// - ctx context.Context +// - address common.Address +// - chainID *big.Int +func (_e *Eth_Expecter) Add(ctx interface{}, address interface{}, chainID interface{}) *Eth_Add_Call { + return &Eth_Add_Call{Call: _e.mock.On("Add", ctx, address, chainID)} +} + +func (_c *Eth_Add_Call) Run(run func(ctx context.Context, address common.Address, chainID *big.Int)) *Eth_Add_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(*big.Int)) + }) + return _c +} + +func (_c *Eth_Add_Call) Return(_a0 error) *Eth_Add_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Eth_Add_Call) RunAndReturn(run func(context.Context, common.Address, *big.Int) error) *Eth_Add_Call { + _c.Call.Return(run) + return _c +} + // 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) @@ -56,6 +94,36 @@ func (_m *Eth) CheckEnabled(ctx context.Context, address common.Address, chainID return r0 } +// Eth_CheckEnabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckEnabled' +type Eth_CheckEnabled_Call struct { + *mock.Call +} + +// CheckEnabled is a helper method to define mock.On call +// - ctx context.Context +// - address common.Address +// - chainID *big.Int +func (_e *Eth_Expecter) CheckEnabled(ctx interface{}, address interface{}, chainID interface{}) *Eth_CheckEnabled_Call { + return &Eth_CheckEnabled_Call{Call: _e.mock.On("CheckEnabled", ctx, address, chainID)} +} + +func (_c *Eth_CheckEnabled_Call) Run(run func(ctx context.Context, address common.Address, chainID *big.Int)) *Eth_CheckEnabled_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(*big.Int)) + }) + return _c +} + +func (_c *Eth_CheckEnabled_Call) Return(_a0 error) *Eth_CheckEnabled_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Eth_CheckEnabled_Call) RunAndReturn(run func(context.Context, common.Address, *big.Int) error) *Eth_CheckEnabled_Call { + _c.Call.Return(run) + return _c +} + // Create provides a mock function with given fields: ctx, chainIDs func (_m *Eth) Create(ctx context.Context, chainIDs ...*big.Int) (ethkey.KeyV2, error) { _va := make([]interface{}, len(chainIDs)) @@ -91,6 +159,42 @@ func (_m *Eth) Create(ctx context.Context, chainIDs ...*big.Int) (ethkey.KeyV2, return r0, r1 } +// Eth_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type Eth_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - ctx context.Context +// - chainIDs ...*big.Int +func (_e *Eth_Expecter) Create(ctx interface{}, chainIDs ...interface{}) *Eth_Create_Call { + return &Eth_Create_Call{Call: _e.mock.On("Create", + append([]interface{}{ctx}, chainIDs...)...)} +} + +func (_c *Eth_Create_Call) Run(run func(ctx context.Context, chainIDs ...*big.Int)) *Eth_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]*big.Int, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(*big.Int) + } + } + run(args[0].(context.Context), variadicArgs...) + }) + return _c +} + +func (_c *Eth_Create_Call) Return(_a0 ethkey.KeyV2, _a1 error) *Eth_Create_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Eth_Create_Call) RunAndReturn(run func(context.Context, ...*big.Int) (ethkey.KeyV2, error)) *Eth_Create_Call { + _c.Call.Return(run) + return _c +} + // Delete provides a mock function with given fields: ctx, id func (_m *Eth) Delete(ctx context.Context, id string) (ethkey.KeyV2, error) { ret := _m.Called(ctx, id) @@ -119,6 +223,35 @@ func (_m *Eth) Delete(ctx context.Context, id string) (ethkey.KeyV2, error) { return r0, r1 } +// Eth_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' +type Eth_Delete_Call struct { + *mock.Call +} + +// Delete is a helper method to define mock.On call +// - ctx context.Context +// - id string +func (_e *Eth_Expecter) Delete(ctx interface{}, id interface{}) *Eth_Delete_Call { + return &Eth_Delete_Call{Call: _e.mock.On("Delete", ctx, id)} +} + +func (_c *Eth_Delete_Call) Run(run func(ctx context.Context, id string)) *Eth_Delete_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *Eth_Delete_Call) Return(_a0 ethkey.KeyV2, _a1 error) *Eth_Delete_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Eth_Delete_Call) RunAndReturn(run func(context.Context, string) (ethkey.KeyV2, error)) *Eth_Delete_Call { + _c.Call.Return(run) + return _c +} + // Disable provides a mock function with given fields: ctx, address, chainID func (_m *Eth) Disable(ctx context.Context, address common.Address, chainID *big.Int) error { ret := _m.Called(ctx, address, chainID) @@ -137,6 +270,36 @@ func (_m *Eth) Disable(ctx context.Context, address common.Address, chainID *big return r0 } +// Eth_Disable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Disable' +type Eth_Disable_Call struct { + *mock.Call +} + +// Disable is a helper method to define mock.On call +// - ctx context.Context +// - address common.Address +// - chainID *big.Int +func (_e *Eth_Expecter) Disable(ctx interface{}, address interface{}, chainID interface{}) *Eth_Disable_Call { + return &Eth_Disable_Call{Call: _e.mock.On("Disable", ctx, address, chainID)} +} + +func (_c *Eth_Disable_Call) Run(run func(ctx context.Context, address common.Address, chainID *big.Int)) *Eth_Disable_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(*big.Int)) + }) + return _c +} + +func (_c *Eth_Disable_Call) Return(_a0 error) *Eth_Disable_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Eth_Disable_Call) RunAndReturn(run func(context.Context, common.Address, *big.Int) error) *Eth_Disable_Call { + _c.Call.Return(run) + return _c +} + // Enable provides a mock function with given fields: ctx, address, chainID func (_m *Eth) Enable(ctx context.Context, address common.Address, chainID *big.Int) error { ret := _m.Called(ctx, address, chainID) @@ -155,6 +318,36 @@ func (_m *Eth) Enable(ctx context.Context, address common.Address, chainID *big. return r0 } +// Eth_Enable_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Enable' +type Eth_Enable_Call struct { + *mock.Call +} + +// Enable is a helper method to define mock.On call +// - ctx context.Context +// - address common.Address +// - chainID *big.Int +func (_e *Eth_Expecter) Enable(ctx interface{}, address interface{}, chainID interface{}) *Eth_Enable_Call { + return &Eth_Enable_Call{Call: _e.mock.On("Enable", ctx, address, chainID)} +} + +func (_c *Eth_Enable_Call) Run(run func(ctx context.Context, address common.Address, chainID *big.Int)) *Eth_Enable_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(*big.Int)) + }) + return _c +} + +func (_c *Eth_Enable_Call) Return(_a0 error) *Eth_Enable_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Eth_Enable_Call) RunAndReturn(run func(context.Context, common.Address, *big.Int) error) *Eth_Enable_Call { + _c.Call.Return(run) + return _c +} + // 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) @@ -185,6 +378,35 @@ func (_m *Eth) EnabledAddressesForChain(ctx context.Context, chainID *big.Int) ( return r0, r1 } +// Eth_EnabledAddressesForChain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnabledAddressesForChain' +type Eth_EnabledAddressesForChain_Call struct { + *mock.Call +} + +// EnabledAddressesForChain is a helper method to define mock.On call +// - ctx context.Context +// - chainID *big.Int +func (_e *Eth_Expecter) EnabledAddressesForChain(ctx interface{}, chainID interface{}) *Eth_EnabledAddressesForChain_Call { + return &Eth_EnabledAddressesForChain_Call{Call: _e.mock.On("EnabledAddressesForChain", ctx, chainID)} +} + +func (_c *Eth_EnabledAddressesForChain_Call) Run(run func(ctx context.Context, chainID *big.Int)) *Eth_EnabledAddressesForChain_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*big.Int)) + }) + return _c +} + +func (_c *Eth_EnabledAddressesForChain_Call) Return(addresses []common.Address, err error) *Eth_EnabledAddressesForChain_Call { + _c.Call.Return(addresses, err) + return _c +} + +func (_c *Eth_EnabledAddressesForChain_Call) RunAndReturn(run func(context.Context, *big.Int) ([]common.Address, error)) *Eth_EnabledAddressesForChain_Call { + _c.Call.Return(run) + return _c +} + // EnabledKeysForChain provides a mock function with given fields: ctx, chainID func (_m *Eth) EnabledKeysForChain(ctx context.Context, chainID *big.Int) ([]ethkey.KeyV2, error) { ret := _m.Called(ctx, chainID) @@ -215,6 +437,35 @@ func (_m *Eth) EnabledKeysForChain(ctx context.Context, chainID *big.Int) ([]eth return r0, r1 } +// Eth_EnabledKeysForChain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnabledKeysForChain' +type Eth_EnabledKeysForChain_Call struct { + *mock.Call +} + +// EnabledKeysForChain is a helper method to define mock.On call +// - ctx context.Context +// - chainID *big.Int +func (_e *Eth_Expecter) EnabledKeysForChain(ctx interface{}, chainID interface{}) *Eth_EnabledKeysForChain_Call { + return &Eth_EnabledKeysForChain_Call{Call: _e.mock.On("EnabledKeysForChain", ctx, chainID)} +} + +func (_c *Eth_EnabledKeysForChain_Call) Run(run func(ctx context.Context, chainID *big.Int)) *Eth_EnabledKeysForChain_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*big.Int)) + }) + return _c +} + +func (_c *Eth_EnabledKeysForChain_Call) Return(keys []ethkey.KeyV2, err error) *Eth_EnabledKeysForChain_Call { + _c.Call.Return(keys, err) + return _c +} + +func (_c *Eth_EnabledKeysForChain_Call) RunAndReturn(run func(context.Context, *big.Int) ([]ethkey.KeyV2, error)) *Eth_EnabledKeysForChain_Call { + _c.Call.Return(run) + return _c +} + // EnsureKeys provides a mock function with given fields: ctx, chainIDs func (_m *Eth) EnsureKeys(ctx context.Context, chainIDs ...*big.Int) error { _va := make([]interface{}, len(chainIDs)) @@ -240,6 +491,42 @@ func (_m *Eth) EnsureKeys(ctx context.Context, chainIDs ...*big.Int) error { return r0 } +// Eth_EnsureKeys_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureKeys' +type Eth_EnsureKeys_Call struct { + *mock.Call +} + +// EnsureKeys is a helper method to define mock.On call +// - ctx context.Context +// - chainIDs ...*big.Int +func (_e *Eth_Expecter) EnsureKeys(ctx interface{}, chainIDs ...interface{}) *Eth_EnsureKeys_Call { + return &Eth_EnsureKeys_Call{Call: _e.mock.On("EnsureKeys", + append([]interface{}{ctx}, chainIDs...)...)} +} + +func (_c *Eth_EnsureKeys_Call) Run(run func(ctx context.Context, chainIDs ...*big.Int)) *Eth_EnsureKeys_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]*big.Int, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(*big.Int) + } + } + run(args[0].(context.Context), variadicArgs...) + }) + return _c +} + +func (_c *Eth_EnsureKeys_Call) Return(_a0 error) *Eth_EnsureKeys_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Eth_EnsureKeys_Call) RunAndReturn(run func(context.Context, ...*big.Int) error) *Eth_EnsureKeys_Call { + _c.Call.Return(run) + return _c +} + // Export provides a mock function with given fields: ctx, id, password func (_m *Eth) Export(ctx context.Context, id string, password string) ([]byte, error) { ret := _m.Called(ctx, id, password) @@ -270,6 +557,36 @@ func (_m *Eth) Export(ctx context.Context, id string, password string) ([]byte, return r0, r1 } +// Eth_Export_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Export' +type Eth_Export_Call struct { + *mock.Call +} + +// Export is a helper method to define mock.On call +// - ctx context.Context +// - id string +// - password string +func (_e *Eth_Expecter) Export(ctx interface{}, id interface{}, password interface{}) *Eth_Export_Call { + return &Eth_Export_Call{Call: _e.mock.On("Export", ctx, id, password)} +} + +func (_c *Eth_Export_Call) Run(run func(ctx context.Context, id string, password string)) *Eth_Export_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string)) + }) + return _c +} + +func (_c *Eth_Export_Call) Return(_a0 []byte, _a1 error) *Eth_Export_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Eth_Export_Call) RunAndReturn(run func(context.Context, string, string) ([]byte, error)) *Eth_Export_Call { + _c.Call.Return(run) + return _c +} + // Get provides a mock function with given fields: ctx, id func (_m *Eth) Get(ctx context.Context, id string) (ethkey.KeyV2, error) { ret := _m.Called(ctx, id) @@ -298,6 +615,35 @@ func (_m *Eth) Get(ctx context.Context, id string) (ethkey.KeyV2, error) { return r0, r1 } +// Eth_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type Eth_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - ctx context.Context +// - id string +func (_e *Eth_Expecter) Get(ctx interface{}, id interface{}) *Eth_Get_Call { + return &Eth_Get_Call{Call: _e.mock.On("Get", ctx, id)} +} + +func (_c *Eth_Get_Call) Run(run func(ctx context.Context, id string)) *Eth_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *Eth_Get_Call) Return(_a0 ethkey.KeyV2, _a1 error) *Eth_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Eth_Get_Call) RunAndReturn(run func(context.Context, string) (ethkey.KeyV2, error)) *Eth_Get_Call { + _c.Call.Return(run) + return _c +} + // GetAll provides a mock function with given fields: ctx func (_m *Eth) GetAll(ctx context.Context) ([]ethkey.KeyV2, error) { ret := _m.Called(ctx) @@ -328,6 +674,34 @@ func (_m *Eth) GetAll(ctx context.Context) ([]ethkey.KeyV2, error) { return r0, r1 } +// Eth_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll' +type Eth_GetAll_Call struct { + *mock.Call +} + +// GetAll is a helper method to define mock.On call +// - ctx context.Context +func (_e *Eth_Expecter) GetAll(ctx interface{}) *Eth_GetAll_Call { + return &Eth_GetAll_Call{Call: _e.mock.On("GetAll", ctx)} +} + +func (_c *Eth_GetAll_Call) Run(run func(ctx context.Context)) *Eth_GetAll_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Eth_GetAll_Call) Return(_a0 []ethkey.KeyV2, _a1 error) *Eth_GetAll_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Eth_GetAll_Call) RunAndReturn(run func(context.Context) ([]ethkey.KeyV2, error)) *Eth_GetAll_Call { + _c.Call.Return(run) + return _c +} + // GetRoundRobinAddress provides a mock function with given fields: ctx, chainID, addresses func (_m *Eth) GetRoundRobinAddress(ctx context.Context, chainID *big.Int, addresses ...common.Address) (common.Address, error) { _va := make([]interface{}, len(addresses)) @@ -365,6 +739,43 @@ func (_m *Eth) GetRoundRobinAddress(ctx context.Context, chainID *big.Int, addre return r0, r1 } +// Eth_GetRoundRobinAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRoundRobinAddress' +type Eth_GetRoundRobinAddress_Call struct { + *mock.Call +} + +// GetRoundRobinAddress is a helper method to define mock.On call +// - ctx context.Context +// - chainID *big.Int +// - addresses ...common.Address +func (_e *Eth_Expecter) GetRoundRobinAddress(ctx interface{}, chainID interface{}, addresses ...interface{}) *Eth_GetRoundRobinAddress_Call { + return &Eth_GetRoundRobinAddress_Call{Call: _e.mock.On("GetRoundRobinAddress", + append([]interface{}{ctx, chainID}, addresses...)...)} +} + +func (_c *Eth_GetRoundRobinAddress_Call) Run(run func(ctx context.Context, chainID *big.Int, addresses ...common.Address)) *Eth_GetRoundRobinAddress_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]common.Address, len(args)-2) + for i, a := range args[2:] { + if a != nil { + variadicArgs[i] = a.(common.Address) + } + } + run(args[0].(context.Context), args[1].(*big.Int), variadicArgs...) + }) + return _c +} + +func (_c *Eth_GetRoundRobinAddress_Call) Return(address common.Address, err error) *Eth_GetRoundRobinAddress_Call { + _c.Call.Return(address, err) + return _c +} + +func (_c *Eth_GetRoundRobinAddress_Call) RunAndReturn(run func(context.Context, *big.Int, ...common.Address) (common.Address, error)) *Eth_GetRoundRobinAddress_Call { + _c.Call.Return(run) + return _c +} + // GetState provides a mock function with given fields: ctx, id, chainID func (_m *Eth) GetState(ctx context.Context, id string, chainID *big.Int) (ethkey.State, error) { ret := _m.Called(ctx, id, chainID) @@ -393,6 +804,36 @@ func (_m *Eth) GetState(ctx context.Context, id string, chainID *big.Int) (ethke return r0, r1 } +// Eth_GetState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetState' +type Eth_GetState_Call struct { + *mock.Call +} + +// GetState is a helper method to define mock.On call +// - ctx context.Context +// - id string +// - chainID *big.Int +func (_e *Eth_Expecter) GetState(ctx interface{}, id interface{}, chainID interface{}) *Eth_GetState_Call { + return &Eth_GetState_Call{Call: _e.mock.On("GetState", ctx, id, chainID)} +} + +func (_c *Eth_GetState_Call) Run(run func(ctx context.Context, id string, chainID *big.Int)) *Eth_GetState_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(*big.Int)) + }) + return _c +} + +func (_c *Eth_GetState_Call) Return(_a0 ethkey.State, _a1 error) *Eth_GetState_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Eth_GetState_Call) RunAndReturn(run func(context.Context, string, *big.Int) (ethkey.State, error)) *Eth_GetState_Call { + _c.Call.Return(run) + return _c +} + // GetStateForKey provides a mock function with given fields: ctx, key func (_m *Eth) GetStateForKey(ctx context.Context, key ethkey.KeyV2) (ethkey.State, error) { ret := _m.Called(ctx, key) @@ -421,6 +862,35 @@ func (_m *Eth) GetStateForKey(ctx context.Context, key ethkey.KeyV2) (ethkey.Sta return r0, r1 } +// Eth_GetStateForKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStateForKey' +type Eth_GetStateForKey_Call struct { + *mock.Call +} + +// GetStateForKey is a helper method to define mock.On call +// - ctx context.Context +// - key ethkey.KeyV2 +func (_e *Eth_Expecter) GetStateForKey(ctx interface{}, key interface{}) *Eth_GetStateForKey_Call { + return &Eth_GetStateForKey_Call{Call: _e.mock.On("GetStateForKey", ctx, key)} +} + +func (_c *Eth_GetStateForKey_Call) Run(run func(ctx context.Context, key ethkey.KeyV2)) *Eth_GetStateForKey_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ethkey.KeyV2)) + }) + return _c +} + +func (_c *Eth_GetStateForKey_Call) Return(_a0 ethkey.State, _a1 error) *Eth_GetStateForKey_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Eth_GetStateForKey_Call) RunAndReturn(run func(context.Context, ethkey.KeyV2) (ethkey.State, error)) *Eth_GetStateForKey_Call { + _c.Call.Return(run) + return _c +} + // GetStatesForChain provides a mock function with given fields: ctx, chainID func (_m *Eth) GetStatesForChain(ctx context.Context, chainID *big.Int) ([]ethkey.State, error) { ret := _m.Called(ctx, chainID) @@ -451,6 +921,35 @@ func (_m *Eth) GetStatesForChain(ctx context.Context, chainID *big.Int) ([]ethke return r0, r1 } +// Eth_GetStatesForChain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatesForChain' +type Eth_GetStatesForChain_Call struct { + *mock.Call +} + +// GetStatesForChain is a helper method to define mock.On call +// - ctx context.Context +// - chainID *big.Int +func (_e *Eth_Expecter) GetStatesForChain(ctx interface{}, chainID interface{}) *Eth_GetStatesForChain_Call { + return &Eth_GetStatesForChain_Call{Call: _e.mock.On("GetStatesForChain", ctx, chainID)} +} + +func (_c *Eth_GetStatesForChain_Call) Run(run func(ctx context.Context, chainID *big.Int)) *Eth_GetStatesForChain_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*big.Int)) + }) + return _c +} + +func (_c *Eth_GetStatesForChain_Call) Return(_a0 []ethkey.State, _a1 error) *Eth_GetStatesForChain_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Eth_GetStatesForChain_Call) RunAndReturn(run func(context.Context, *big.Int) ([]ethkey.State, error)) *Eth_GetStatesForChain_Call { + _c.Call.Return(run) + return _c +} + // GetStatesForKeys provides a mock function with given fields: ctx, keys func (_m *Eth) GetStatesForKeys(ctx context.Context, keys []ethkey.KeyV2) ([]ethkey.State, error) { ret := _m.Called(ctx, keys) @@ -481,6 +980,35 @@ func (_m *Eth) GetStatesForKeys(ctx context.Context, keys []ethkey.KeyV2) ([]eth return r0, r1 } +// Eth_GetStatesForKeys_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetStatesForKeys' +type Eth_GetStatesForKeys_Call struct { + *mock.Call +} + +// GetStatesForKeys is a helper method to define mock.On call +// - ctx context.Context +// - keys []ethkey.KeyV2 +func (_e *Eth_Expecter) GetStatesForKeys(ctx interface{}, keys interface{}) *Eth_GetStatesForKeys_Call { + return &Eth_GetStatesForKeys_Call{Call: _e.mock.On("GetStatesForKeys", ctx, keys)} +} + +func (_c *Eth_GetStatesForKeys_Call) Run(run func(ctx context.Context, keys []ethkey.KeyV2)) *Eth_GetStatesForKeys_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]ethkey.KeyV2)) + }) + return _c +} + +func (_c *Eth_GetStatesForKeys_Call) Return(_a0 []ethkey.State, _a1 error) *Eth_GetStatesForKeys_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Eth_GetStatesForKeys_Call) RunAndReturn(run func(context.Context, []ethkey.KeyV2) ([]ethkey.State, error)) *Eth_GetStatesForKeys_Call { + _c.Call.Return(run) + return _c +} + // Import provides a mock function with given fields: ctx, keyJSON, password, chainIDs func (_m *Eth) Import(ctx context.Context, keyJSON []byte, password string, chainIDs ...*big.Int) (ethkey.KeyV2, error) { _va := make([]interface{}, len(chainIDs)) @@ -516,6 +1044,44 @@ func (_m *Eth) Import(ctx context.Context, keyJSON []byte, password string, chai return r0, r1 } +// Eth_Import_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Import' +type Eth_Import_Call struct { + *mock.Call +} + +// Import is a helper method to define mock.On call +// - ctx context.Context +// - keyJSON []byte +// - password string +// - chainIDs ...*big.Int +func (_e *Eth_Expecter) Import(ctx interface{}, keyJSON interface{}, password interface{}, chainIDs ...interface{}) *Eth_Import_Call { + return &Eth_Import_Call{Call: _e.mock.On("Import", + append([]interface{}{ctx, keyJSON, password}, chainIDs...)...)} +} + +func (_c *Eth_Import_Call) Run(run func(ctx context.Context, keyJSON []byte, password string, chainIDs ...*big.Int)) *Eth_Import_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]*big.Int, len(args)-3) + for i, a := range args[3:] { + if a != nil { + variadicArgs[i] = a.(*big.Int) + } + } + run(args[0].(context.Context), args[1].([]byte), args[2].(string), variadicArgs...) + }) + return _c +} + +func (_c *Eth_Import_Call) Return(_a0 ethkey.KeyV2, _a1 error) *Eth_Import_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Eth_Import_Call) RunAndReturn(run func(context.Context, []byte, string, ...*big.Int) (ethkey.KeyV2, error)) *Eth_Import_Call { + _c.Call.Return(run) + return _c +} + // 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) @@ -546,6 +1112,37 @@ func (_m *Eth) SignTx(ctx context.Context, fromAddress common.Address, tx *types return r0, r1 } +// Eth_SignTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SignTx' +type Eth_SignTx_Call struct { + *mock.Call +} + +// SignTx is a helper method to define mock.On call +// - ctx context.Context +// - fromAddress common.Address +// - tx *types.Transaction +// - chainID *big.Int +func (_e *Eth_Expecter) SignTx(ctx interface{}, fromAddress interface{}, tx interface{}, chainID interface{}) *Eth_SignTx_Call { + return &Eth_SignTx_Call{Call: _e.mock.On("SignTx", ctx, fromAddress, tx, chainID)} +} + +func (_c *Eth_SignTx_Call) Run(run func(ctx context.Context, fromAddress common.Address, tx *types.Transaction, chainID *big.Int)) *Eth_SignTx_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address), args[2].(*types.Transaction), args[3].(*big.Int)) + }) + return _c +} + +func (_c *Eth_SignTx_Call) Return(_a0 *types.Transaction, _a1 error) *Eth_SignTx_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Eth_SignTx_Call) RunAndReturn(run func(context.Context, common.Address, *types.Transaction, *big.Int) (*types.Transaction, error)) *Eth_SignTx_Call { + _c.Call.Return(run) + return _c +} + // SubscribeToKeyChanges provides a mock function with given fields: ctx func (_m *Eth) SubscribeToKeyChanges(ctx context.Context) (chan struct{}, func()) { ret := _m.Called(ctx) @@ -578,16 +1175,102 @@ func (_m *Eth) SubscribeToKeyChanges(ctx context.Context) (chan struct{}, func() return r0, r1 } +// Eth_SubscribeToKeyChanges_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SubscribeToKeyChanges' +type Eth_SubscribeToKeyChanges_Call struct { + *mock.Call +} + +// SubscribeToKeyChanges is a helper method to define mock.On call +// - ctx context.Context +func (_e *Eth_Expecter) SubscribeToKeyChanges(ctx interface{}) *Eth_SubscribeToKeyChanges_Call { + return &Eth_SubscribeToKeyChanges_Call{Call: _e.mock.On("SubscribeToKeyChanges", ctx)} +} + +func (_c *Eth_SubscribeToKeyChanges_Call) Run(run func(ctx context.Context)) *Eth_SubscribeToKeyChanges_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Eth_SubscribeToKeyChanges_Call) Return(ch chan struct{}, unsub func()) *Eth_SubscribeToKeyChanges_Call { + _c.Call.Return(ch, unsub) + return _c +} + +func (_c *Eth_SubscribeToKeyChanges_Call) RunAndReturn(run func(context.Context) (chan struct{}, func())) *Eth_SubscribeToKeyChanges_Call { + _c.Call.Return(run) + return _c +} + // XXXTestingOnlyAdd provides a mock function with given fields: ctx, key func (_m *Eth) XXXTestingOnlyAdd(ctx context.Context, key ethkey.KeyV2) { _m.Called(ctx, key) } +// Eth_XXXTestingOnlyAdd_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'XXXTestingOnlyAdd' +type Eth_XXXTestingOnlyAdd_Call struct { + *mock.Call +} + +// XXXTestingOnlyAdd is a helper method to define mock.On call +// - ctx context.Context +// - key ethkey.KeyV2 +func (_e *Eth_Expecter) XXXTestingOnlyAdd(ctx interface{}, key interface{}) *Eth_XXXTestingOnlyAdd_Call { + return &Eth_XXXTestingOnlyAdd_Call{Call: _e.mock.On("XXXTestingOnlyAdd", ctx, key)} +} + +func (_c *Eth_XXXTestingOnlyAdd_Call) Run(run func(ctx context.Context, key ethkey.KeyV2)) *Eth_XXXTestingOnlyAdd_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ethkey.KeyV2)) + }) + return _c +} + +func (_c *Eth_XXXTestingOnlyAdd_Call) Return() *Eth_XXXTestingOnlyAdd_Call { + _c.Call.Return() + return _c +} + +func (_c *Eth_XXXTestingOnlyAdd_Call) RunAndReturn(run func(context.Context, ethkey.KeyV2)) *Eth_XXXTestingOnlyAdd_Call { + _c.Call.Return(run) + return _c +} + // XXXTestingOnlySetState provides a mock function with given fields: ctx, keyState func (_m *Eth) XXXTestingOnlySetState(ctx context.Context, keyState ethkey.State) { _m.Called(ctx, keyState) } +// Eth_XXXTestingOnlySetState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'XXXTestingOnlySetState' +type Eth_XXXTestingOnlySetState_Call struct { + *mock.Call +} + +// XXXTestingOnlySetState is a helper method to define mock.On call +// - ctx context.Context +// - keyState ethkey.State +func (_e *Eth_Expecter) XXXTestingOnlySetState(ctx interface{}, keyState interface{}) *Eth_XXXTestingOnlySetState_Call { + return &Eth_XXXTestingOnlySetState_Call{Call: _e.mock.On("XXXTestingOnlySetState", ctx, keyState)} +} + +func (_c *Eth_XXXTestingOnlySetState_Call) Run(run func(ctx context.Context, keyState ethkey.State)) *Eth_XXXTestingOnlySetState_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ethkey.State)) + }) + return _c +} + +func (_c *Eth_XXXTestingOnlySetState_Call) Return() *Eth_XXXTestingOnlySetState_Call { + _c.Call.Return() + return _c +} + +func (_c *Eth_XXXTestingOnlySetState_Call) RunAndReturn(run func(context.Context, ethkey.State)) *Eth_XXXTestingOnlySetState_Call { + _c.Call.Return(run) + return _c +} + // 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 { diff --git a/core/services/keystore/mocks/master.go b/core/services/keystore/mocks/master.go index 2739c4bbe34..c027a9c2105 100644 --- a/core/services/keystore/mocks/master.go +++ b/core/services/keystore/mocks/master.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -14,86 +14,155 @@ type Master struct { mock.Mock } -// CSA provides a mock function with given fields: -func (_m *Master) CSA() keystore.CSA { +type Master_Expecter struct { + mock *mock.Mock +} + +func (_m *Master) EXPECT() *Master_Expecter { + return &Master_Expecter{mock: &_m.Mock} +} + +// Aptos provides a mock function with given fields: +func (_m *Master) Aptos() keystore.Aptos { ret := _m.Called() if len(ret) == 0 { - panic("no return value specified for CSA") + panic("no return value specified for Aptos") } - var r0 keystore.CSA - if rf, ok := ret.Get(0).(func() keystore.CSA); ok { + var r0 keystore.Aptos + if rf, ok := ret.Get(0).(func() keystore.Aptos); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(keystore.CSA) + r0 = ret.Get(0).(keystore.Aptos) } } return r0 } -// Cosmos provides a mock function with given fields: -func (_m *Master) Cosmos() keystore.Cosmos { - ret := _m.Called() +// Master_Aptos_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Aptos' +type Master_Aptos_Call struct { + *mock.Call +} - if len(ret) == 0 { - panic("no return value specified for Cosmos") - } +// Aptos is a helper method to define mock.On call +func (_e *Master_Expecter) Aptos() *Master_Aptos_Call { + return &Master_Aptos_Call{Call: _e.mock.On("Aptos")} +} - var r0 keystore.Cosmos - if rf, ok := ret.Get(0).(func() keystore.Cosmos); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(keystore.Cosmos) - } - } +func (_c *Master_Aptos_Call) Run(run func()) *Master_Aptos_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} - return r0 +func (_c *Master_Aptos_Call) Return(_a0 keystore.Aptos) *Master_Aptos_Call { + _c.Call.Return(_a0) + return _c } -// DKGEncrypt provides a mock function with given fields: -func (_m *Master) DKGEncrypt() keystore.DKGEncrypt { +func (_c *Master_Aptos_Call) RunAndReturn(run func() keystore.Aptos) *Master_Aptos_Call { + _c.Call.Return(run) + return _c +} + +// CSA provides a mock function with given fields: +func (_m *Master) CSA() keystore.CSA { ret := _m.Called() if len(ret) == 0 { - panic("no return value specified for DKGEncrypt") + panic("no return value specified for CSA") } - var r0 keystore.DKGEncrypt - if rf, ok := ret.Get(0).(func() keystore.DKGEncrypt); ok { + var r0 keystore.CSA + if rf, ok := ret.Get(0).(func() keystore.CSA); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(keystore.DKGEncrypt) + r0 = ret.Get(0).(keystore.CSA) } } return r0 } -// DKGSign provides a mock function with given fields: -func (_m *Master) DKGSign() keystore.DKGSign { +// Master_CSA_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CSA' +type Master_CSA_Call struct { + *mock.Call +} + +// CSA is a helper method to define mock.On call +func (_e *Master_Expecter) CSA() *Master_CSA_Call { + return &Master_CSA_Call{Call: _e.mock.On("CSA")} +} + +func (_c *Master_CSA_Call) Run(run func()) *Master_CSA_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Master_CSA_Call) Return(_a0 keystore.CSA) *Master_CSA_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Master_CSA_Call) RunAndReturn(run func() keystore.CSA) *Master_CSA_Call { + _c.Call.Return(run) + return _c +} + +// Cosmos provides a mock function with given fields: +func (_m *Master) Cosmos() keystore.Cosmos { ret := _m.Called() if len(ret) == 0 { - panic("no return value specified for DKGSign") + panic("no return value specified for Cosmos") } - var r0 keystore.DKGSign - if rf, ok := ret.Get(0).(func() keystore.DKGSign); ok { + var r0 keystore.Cosmos + if rf, ok := ret.Get(0).(func() keystore.Cosmos); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(keystore.DKGSign) + r0 = ret.Get(0).(keystore.Cosmos) } } return r0 } +// Master_Cosmos_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Cosmos' +type Master_Cosmos_Call struct { + *mock.Call +} + +// Cosmos is a helper method to define mock.On call +func (_e *Master_Expecter) Cosmos() *Master_Cosmos_Call { + return &Master_Cosmos_Call{Call: _e.mock.On("Cosmos")} +} + +func (_c *Master_Cosmos_Call) Run(run func()) *Master_Cosmos_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Master_Cosmos_Call) Return(_a0 keystore.Cosmos) *Master_Cosmos_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Master_Cosmos_Call) RunAndReturn(run func() keystore.Cosmos) *Master_Cosmos_Call { + _c.Call.Return(run) + return _c +} + // Eth provides a mock function with given fields: func (_m *Master) Eth() keystore.Eth { ret := _m.Called() @@ -114,6 +183,33 @@ func (_m *Master) Eth() keystore.Eth { return r0 } +// Master_Eth_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Eth' +type Master_Eth_Call struct { + *mock.Call +} + +// Eth is a helper method to define mock.On call +func (_e *Master_Expecter) Eth() *Master_Eth_Call { + return &Master_Eth_Call{Call: _e.mock.On("Eth")} +} + +func (_c *Master_Eth_Call) Run(run func()) *Master_Eth_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Master_Eth_Call) Return(_a0 keystore.Eth) *Master_Eth_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Master_Eth_Call) RunAndReturn(run func() keystore.Eth) *Master_Eth_Call { + _c.Call.Return(run) + return _c +} + // IsEmpty provides a mock function with given fields: ctx func (_m *Master) IsEmpty(ctx context.Context) (bool, error) { ret := _m.Called(ctx) @@ -142,6 +238,34 @@ func (_m *Master) IsEmpty(ctx context.Context) (bool, error) { return r0, r1 } +// Master_IsEmpty_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsEmpty' +type Master_IsEmpty_Call struct { + *mock.Call +} + +// IsEmpty is a helper method to define mock.On call +// - ctx context.Context +func (_e *Master_Expecter) IsEmpty(ctx interface{}) *Master_IsEmpty_Call { + return &Master_IsEmpty_Call{Call: _e.mock.On("IsEmpty", ctx)} +} + +func (_c *Master_IsEmpty_Call) Run(run func(ctx context.Context)) *Master_IsEmpty_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Master_IsEmpty_Call) Return(_a0 bool, _a1 error) *Master_IsEmpty_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Master_IsEmpty_Call) RunAndReturn(run func(context.Context) (bool, error)) *Master_IsEmpty_Call { + _c.Call.Return(run) + return _c +} + // OCR provides a mock function with given fields: func (_m *Master) OCR() keystore.OCR { ret := _m.Called() @@ -162,6 +286,33 @@ func (_m *Master) OCR() keystore.OCR { return r0 } +// Master_OCR_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OCR' +type Master_OCR_Call struct { + *mock.Call +} + +// OCR is a helper method to define mock.On call +func (_e *Master_Expecter) OCR() *Master_OCR_Call { + return &Master_OCR_Call{Call: _e.mock.On("OCR")} +} + +func (_c *Master_OCR_Call) Run(run func()) *Master_OCR_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Master_OCR_Call) Return(_a0 keystore.OCR) *Master_OCR_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Master_OCR_Call) RunAndReturn(run func() keystore.OCR) *Master_OCR_Call { + _c.Call.Return(run) + return _c +} + // OCR2 provides a mock function with given fields: func (_m *Master) OCR2() keystore.OCR2 { ret := _m.Called() @@ -182,6 +333,33 @@ func (_m *Master) OCR2() keystore.OCR2 { return r0 } +// Master_OCR2_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OCR2' +type Master_OCR2_Call struct { + *mock.Call +} + +// OCR2 is a helper method to define mock.On call +func (_e *Master_Expecter) OCR2() *Master_OCR2_Call { + return &Master_OCR2_Call{Call: _e.mock.On("OCR2")} +} + +func (_c *Master_OCR2_Call) Run(run func()) *Master_OCR2_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Master_OCR2_Call) Return(_a0 keystore.OCR2) *Master_OCR2_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Master_OCR2_Call) RunAndReturn(run func() keystore.OCR2) *Master_OCR2_Call { + _c.Call.Return(run) + return _c +} + // P2P provides a mock function with given fields: func (_m *Master) P2P() keystore.P2P { ret := _m.Called() @@ -202,6 +380,33 @@ func (_m *Master) P2P() keystore.P2P { return r0 } +// Master_P2P_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'P2P' +type Master_P2P_Call struct { + *mock.Call +} + +// P2P is a helper method to define mock.On call +func (_e *Master_Expecter) P2P() *Master_P2P_Call { + return &Master_P2P_Call{Call: _e.mock.On("P2P")} +} + +func (_c *Master_P2P_Call) Run(run func()) *Master_P2P_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Master_P2P_Call) Return(_a0 keystore.P2P) *Master_P2P_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Master_P2P_Call) RunAndReturn(run func() keystore.P2P) *Master_P2P_Call { + _c.Call.Return(run) + return _c +} + // Solana provides a mock function with given fields: func (_m *Master) Solana() keystore.Solana { ret := _m.Called() @@ -222,6 +427,33 @@ func (_m *Master) Solana() keystore.Solana { return r0 } +// Master_Solana_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Solana' +type Master_Solana_Call struct { + *mock.Call +} + +// Solana is a helper method to define mock.On call +func (_e *Master_Expecter) Solana() *Master_Solana_Call { + return &Master_Solana_Call{Call: _e.mock.On("Solana")} +} + +func (_c *Master_Solana_Call) Run(run func()) *Master_Solana_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Master_Solana_Call) Return(_a0 keystore.Solana) *Master_Solana_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Master_Solana_Call) RunAndReturn(run func() keystore.Solana) *Master_Solana_Call { + _c.Call.Return(run) + return _c +} + // StarkNet provides a mock function with given fields: func (_m *Master) StarkNet() keystore.StarkNet { ret := _m.Called() @@ -242,6 +474,33 @@ func (_m *Master) StarkNet() keystore.StarkNet { return r0 } +// Master_StarkNet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StarkNet' +type Master_StarkNet_Call struct { + *mock.Call +} + +// StarkNet is a helper method to define mock.On call +func (_e *Master_Expecter) StarkNet() *Master_StarkNet_Call { + return &Master_StarkNet_Call{Call: _e.mock.On("StarkNet")} +} + +func (_c *Master_StarkNet_Call) Run(run func()) *Master_StarkNet_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Master_StarkNet_Call) Return(_a0 keystore.StarkNet) *Master_StarkNet_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Master_StarkNet_Call) RunAndReturn(run func() keystore.StarkNet) *Master_StarkNet_Call { + _c.Call.Return(run) + return _c +} + // Unlock provides a mock function with given fields: ctx, password func (_m *Master) Unlock(ctx context.Context, password string) error { ret := _m.Called(ctx, password) @@ -260,6 +519,35 @@ func (_m *Master) Unlock(ctx context.Context, password string) error { return r0 } +// Master_Unlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unlock' +type Master_Unlock_Call struct { + *mock.Call +} + +// Unlock is a helper method to define mock.On call +// - ctx context.Context +// - password string +func (_e *Master_Expecter) Unlock(ctx interface{}, password interface{}) *Master_Unlock_Call { + return &Master_Unlock_Call{Call: _e.mock.On("Unlock", ctx, password)} +} + +func (_c *Master_Unlock_Call) Run(run func(ctx context.Context, password string)) *Master_Unlock_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *Master_Unlock_Call) Return(_a0 error) *Master_Unlock_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Master_Unlock_Call) RunAndReturn(run func(context.Context, string) error) *Master_Unlock_Call { + _c.Call.Return(run) + return _c +} + // VRF provides a mock function with given fields: func (_m *Master) VRF() keystore.VRF { ret := _m.Called() @@ -280,6 +568,33 @@ func (_m *Master) VRF() keystore.VRF { return r0 } +// Master_VRF_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VRF' +type Master_VRF_Call struct { + *mock.Call +} + +// VRF is a helper method to define mock.On call +func (_e *Master_Expecter) VRF() *Master_VRF_Call { + return &Master_VRF_Call{Call: _e.mock.On("VRF")} +} + +func (_c *Master_VRF_Call) Run(run func()) *Master_VRF_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Master_VRF_Call) Return(_a0 keystore.VRF) *Master_VRF_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Master_VRF_Call) RunAndReturn(run func() keystore.VRF) *Master_VRF_Call { + _c.Call.Return(run) + return _c +} + // NewMaster creates a new instance of Master. 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 NewMaster(t interface { diff --git a/core/services/keystore/mocks/ocr.go b/core/services/keystore/mocks/ocr.go index 76659d0d4d1..255167dff66 100644 --- a/core/services/keystore/mocks/ocr.go +++ b/core/services/keystore/mocks/ocr.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -15,6 +15,14 @@ type OCR struct { mock.Mock } +type OCR_Expecter struct { + mock *mock.Mock +} + +func (_m *OCR) EXPECT() *OCR_Expecter { + return &OCR_Expecter{mock: &_m.Mock} +} + // Add provides a mock function with given fields: ctx, key func (_m *OCR) Add(ctx context.Context, key ocrkey.KeyV2) error { ret := _m.Called(ctx, key) @@ -33,6 +41,35 @@ func (_m *OCR) Add(ctx context.Context, key ocrkey.KeyV2) error { return r0 } +// OCR_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add' +type OCR_Add_Call struct { + *mock.Call +} + +// Add is a helper method to define mock.On call +// - ctx context.Context +// - key ocrkey.KeyV2 +func (_e *OCR_Expecter) Add(ctx interface{}, key interface{}) *OCR_Add_Call { + return &OCR_Add_Call{Call: _e.mock.On("Add", ctx, key)} +} + +func (_c *OCR_Add_Call) Run(run func(ctx context.Context, key ocrkey.KeyV2)) *OCR_Add_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ocrkey.KeyV2)) + }) + return _c +} + +func (_c *OCR_Add_Call) Return(_a0 error) *OCR_Add_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *OCR_Add_Call) RunAndReturn(run func(context.Context, ocrkey.KeyV2) error) *OCR_Add_Call { + _c.Call.Return(run) + return _c +} + // Create provides a mock function with given fields: ctx func (_m *OCR) Create(ctx context.Context) (ocrkey.KeyV2, error) { ret := _m.Called(ctx) @@ -61,6 +98,34 @@ func (_m *OCR) Create(ctx context.Context) (ocrkey.KeyV2, error) { return r0, r1 } +// OCR_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type OCR_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - ctx context.Context +func (_e *OCR_Expecter) Create(ctx interface{}) *OCR_Create_Call { + return &OCR_Create_Call{Call: _e.mock.On("Create", ctx)} +} + +func (_c *OCR_Create_Call) Run(run func(ctx context.Context)) *OCR_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *OCR_Create_Call) Return(_a0 ocrkey.KeyV2, _a1 error) *OCR_Create_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *OCR_Create_Call) RunAndReturn(run func(context.Context) (ocrkey.KeyV2, error)) *OCR_Create_Call { + _c.Call.Return(run) + return _c +} + // Delete provides a mock function with given fields: ctx, id func (_m *OCR) Delete(ctx context.Context, id string) (ocrkey.KeyV2, error) { ret := _m.Called(ctx, id) @@ -89,6 +154,35 @@ func (_m *OCR) Delete(ctx context.Context, id string) (ocrkey.KeyV2, error) { return r0, r1 } +// OCR_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' +type OCR_Delete_Call struct { + *mock.Call +} + +// Delete is a helper method to define mock.On call +// - ctx context.Context +// - id string +func (_e *OCR_Expecter) Delete(ctx interface{}, id interface{}) *OCR_Delete_Call { + return &OCR_Delete_Call{Call: _e.mock.On("Delete", ctx, id)} +} + +func (_c *OCR_Delete_Call) Run(run func(ctx context.Context, id string)) *OCR_Delete_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *OCR_Delete_Call) Return(_a0 ocrkey.KeyV2, _a1 error) *OCR_Delete_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *OCR_Delete_Call) RunAndReturn(run func(context.Context, string) (ocrkey.KeyV2, error)) *OCR_Delete_Call { + _c.Call.Return(run) + return _c +} + // EnsureKey provides a mock function with given fields: ctx func (_m *OCR) EnsureKey(ctx context.Context) error { ret := _m.Called(ctx) @@ -107,6 +201,34 @@ func (_m *OCR) EnsureKey(ctx context.Context) error { return r0 } +// OCR_EnsureKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureKey' +type OCR_EnsureKey_Call struct { + *mock.Call +} + +// EnsureKey is a helper method to define mock.On call +// - ctx context.Context +func (_e *OCR_Expecter) EnsureKey(ctx interface{}) *OCR_EnsureKey_Call { + return &OCR_EnsureKey_Call{Call: _e.mock.On("EnsureKey", ctx)} +} + +func (_c *OCR_EnsureKey_Call) Run(run func(ctx context.Context)) *OCR_EnsureKey_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *OCR_EnsureKey_Call) Return(_a0 error) *OCR_EnsureKey_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *OCR_EnsureKey_Call) RunAndReturn(run func(context.Context) error) *OCR_EnsureKey_Call { + _c.Call.Return(run) + return _c +} + // Export provides a mock function with given fields: id, password func (_m *OCR) Export(id string, password string) ([]byte, error) { ret := _m.Called(id, password) @@ -137,6 +259,35 @@ func (_m *OCR) Export(id string, password string) ([]byte, error) { return r0, r1 } +// OCR_Export_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Export' +type OCR_Export_Call struct { + *mock.Call +} + +// Export is a helper method to define mock.On call +// - id string +// - password string +func (_e *OCR_Expecter) Export(id interface{}, password interface{}) *OCR_Export_Call { + return &OCR_Export_Call{Call: _e.mock.On("Export", id, password)} +} + +func (_c *OCR_Export_Call) Run(run func(id string, password string)) *OCR_Export_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string)) + }) + return _c +} + +func (_c *OCR_Export_Call) Return(_a0 []byte, _a1 error) *OCR_Export_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *OCR_Export_Call) RunAndReturn(run func(string, string) ([]byte, error)) *OCR_Export_Call { + _c.Call.Return(run) + return _c +} + // Get provides a mock function with given fields: id func (_m *OCR) Get(id string) (ocrkey.KeyV2, error) { ret := _m.Called(id) @@ -165,6 +316,34 @@ func (_m *OCR) Get(id string) (ocrkey.KeyV2, error) { return r0, r1 } +// OCR_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type OCR_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - id string +func (_e *OCR_Expecter) Get(id interface{}) *OCR_Get_Call { + return &OCR_Get_Call{Call: _e.mock.On("Get", id)} +} + +func (_c *OCR_Get_Call) Run(run func(id string)) *OCR_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *OCR_Get_Call) Return(_a0 ocrkey.KeyV2, _a1 error) *OCR_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *OCR_Get_Call) RunAndReturn(run func(string) (ocrkey.KeyV2, error)) *OCR_Get_Call { + _c.Call.Return(run) + return _c +} + // GetAll provides a mock function with given fields: func (_m *OCR) GetAll() ([]ocrkey.KeyV2, error) { ret := _m.Called() @@ -195,6 +374,33 @@ func (_m *OCR) GetAll() ([]ocrkey.KeyV2, error) { return r0, r1 } +// OCR_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll' +type OCR_GetAll_Call struct { + *mock.Call +} + +// GetAll is a helper method to define mock.On call +func (_e *OCR_Expecter) GetAll() *OCR_GetAll_Call { + return &OCR_GetAll_Call{Call: _e.mock.On("GetAll")} +} + +func (_c *OCR_GetAll_Call) Run(run func()) *OCR_GetAll_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *OCR_GetAll_Call) Return(_a0 []ocrkey.KeyV2, _a1 error) *OCR_GetAll_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *OCR_GetAll_Call) RunAndReturn(run func() ([]ocrkey.KeyV2, error)) *OCR_GetAll_Call { + _c.Call.Return(run) + return _c +} + // Import provides a mock function with given fields: ctx, keyJSON, password func (_m *OCR) Import(ctx context.Context, keyJSON []byte, password string) (ocrkey.KeyV2, error) { ret := _m.Called(ctx, keyJSON, password) @@ -223,6 +429,36 @@ func (_m *OCR) Import(ctx context.Context, keyJSON []byte, password string) (ocr return r0, r1 } +// OCR_Import_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Import' +type OCR_Import_Call struct { + *mock.Call +} + +// Import is a helper method to define mock.On call +// - ctx context.Context +// - keyJSON []byte +// - password string +func (_e *OCR_Expecter) Import(ctx interface{}, keyJSON interface{}, password interface{}) *OCR_Import_Call { + return &OCR_Import_Call{Call: _e.mock.On("Import", ctx, keyJSON, password)} +} + +func (_c *OCR_Import_Call) Run(run func(ctx context.Context, keyJSON []byte, password string)) *OCR_Import_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]byte), args[2].(string)) + }) + return _c +} + +func (_c *OCR_Import_Call) Return(_a0 ocrkey.KeyV2, _a1 error) *OCR_Import_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *OCR_Import_Call) RunAndReturn(run func(context.Context, []byte, string) (ocrkey.KeyV2, error)) *OCR_Import_Call { + _c.Call.Return(run) + return _c +} + // NewOCR creates a new instance of OCR. 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 NewOCR(t interface { diff --git a/core/services/keystore/mocks/ocr2.go b/core/services/keystore/mocks/ocr2.go index 74c8eed70cc..d1312a7a5e1 100644 --- a/core/services/keystore/mocks/ocr2.go +++ b/core/services/keystore/mocks/ocr2.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -17,6 +17,14 @@ type OCR2 struct { mock.Mock } +type OCR2_Expecter struct { + mock *mock.Mock +} + +func (_m *OCR2) EXPECT() *OCR2_Expecter { + return &OCR2_Expecter{mock: &_m.Mock} +} + // Add provides a mock function with given fields: ctx, key func (_m *OCR2) Add(ctx context.Context, key ocr2key.KeyBundle) error { ret := _m.Called(ctx, key) @@ -35,6 +43,35 @@ func (_m *OCR2) Add(ctx context.Context, key ocr2key.KeyBundle) error { return r0 } +// OCR2_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add' +type OCR2_Add_Call struct { + *mock.Call +} + +// Add is a helper method to define mock.On call +// - ctx context.Context +// - key ocr2key.KeyBundle +func (_e *OCR2_Expecter) Add(ctx interface{}, key interface{}) *OCR2_Add_Call { + return &OCR2_Add_Call{Call: _e.mock.On("Add", ctx, key)} +} + +func (_c *OCR2_Add_Call) Run(run func(ctx context.Context, key ocr2key.KeyBundle)) *OCR2_Add_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ocr2key.KeyBundle)) + }) + return _c +} + +func (_c *OCR2_Add_Call) Return(_a0 error) *OCR2_Add_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *OCR2_Add_Call) RunAndReturn(run func(context.Context, ocr2key.KeyBundle) error) *OCR2_Add_Call { + _c.Call.Return(run) + return _c +} + // Create provides a mock function with given fields: _a0, _a1 func (_m *OCR2) Create(_a0 context.Context, _a1 chaintype.ChainType) (ocr2key.KeyBundle, error) { ret := _m.Called(_a0, _a1) @@ -65,6 +102,35 @@ func (_m *OCR2) Create(_a0 context.Context, _a1 chaintype.ChainType) (ocr2key.Ke return r0, r1 } +// OCR2_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type OCR2_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 chaintype.ChainType +func (_e *OCR2_Expecter) Create(_a0 interface{}, _a1 interface{}) *OCR2_Create_Call { + return &OCR2_Create_Call{Call: _e.mock.On("Create", _a0, _a1)} +} + +func (_c *OCR2_Create_Call) Run(run func(_a0 context.Context, _a1 chaintype.ChainType)) *OCR2_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(chaintype.ChainType)) + }) + return _c +} + +func (_c *OCR2_Create_Call) Return(_a0 ocr2key.KeyBundle, _a1 error) *OCR2_Create_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *OCR2_Create_Call) RunAndReturn(run func(context.Context, chaintype.ChainType) (ocr2key.KeyBundle, error)) *OCR2_Create_Call { + _c.Call.Return(run) + return _c +} + // Delete provides a mock function with given fields: ctx, id func (_m *OCR2) Delete(ctx context.Context, id string) error { ret := _m.Called(ctx, id) @@ -83,6 +149,35 @@ func (_m *OCR2) Delete(ctx context.Context, id string) error { return r0 } +// OCR2_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' +type OCR2_Delete_Call struct { + *mock.Call +} + +// Delete is a helper method to define mock.On call +// - ctx context.Context +// - id string +func (_e *OCR2_Expecter) Delete(ctx interface{}, id interface{}) *OCR2_Delete_Call { + return &OCR2_Delete_Call{Call: _e.mock.On("Delete", ctx, id)} +} + +func (_c *OCR2_Delete_Call) Run(run func(ctx context.Context, id string)) *OCR2_Delete_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *OCR2_Delete_Call) Return(_a0 error) *OCR2_Delete_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *OCR2_Delete_Call) RunAndReturn(run func(context.Context, string) error) *OCR2_Delete_Call { + _c.Call.Return(run) + return _c +} + // EnsureKeys provides a mock function with given fields: ctx, enabledChains func (_m *OCR2) EnsureKeys(ctx context.Context, enabledChains ...chaintype.ChainType) error { _va := make([]interface{}, len(enabledChains)) @@ -108,6 +203,42 @@ func (_m *OCR2) EnsureKeys(ctx context.Context, enabledChains ...chaintype.Chain return r0 } +// OCR2_EnsureKeys_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureKeys' +type OCR2_EnsureKeys_Call struct { + *mock.Call +} + +// EnsureKeys is a helper method to define mock.On call +// - ctx context.Context +// - enabledChains ...chaintype.ChainType +func (_e *OCR2_Expecter) EnsureKeys(ctx interface{}, enabledChains ...interface{}) *OCR2_EnsureKeys_Call { + return &OCR2_EnsureKeys_Call{Call: _e.mock.On("EnsureKeys", + append([]interface{}{ctx}, enabledChains...)...)} +} + +func (_c *OCR2_EnsureKeys_Call) Run(run func(ctx context.Context, enabledChains ...chaintype.ChainType)) *OCR2_EnsureKeys_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]chaintype.ChainType, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(chaintype.ChainType) + } + } + run(args[0].(context.Context), variadicArgs...) + }) + return _c +} + +func (_c *OCR2_EnsureKeys_Call) Return(_a0 error) *OCR2_EnsureKeys_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *OCR2_EnsureKeys_Call) RunAndReturn(run func(context.Context, ...chaintype.ChainType) error) *OCR2_EnsureKeys_Call { + _c.Call.Return(run) + return _c +} + // Export provides a mock function with given fields: id, password func (_m *OCR2) Export(id string, password string) ([]byte, error) { ret := _m.Called(id, password) @@ -138,6 +269,35 @@ func (_m *OCR2) Export(id string, password string) ([]byte, error) { return r0, r1 } +// OCR2_Export_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Export' +type OCR2_Export_Call struct { + *mock.Call +} + +// Export is a helper method to define mock.On call +// - id string +// - password string +func (_e *OCR2_Expecter) Export(id interface{}, password interface{}) *OCR2_Export_Call { + return &OCR2_Export_Call{Call: _e.mock.On("Export", id, password)} +} + +func (_c *OCR2_Export_Call) Run(run func(id string, password string)) *OCR2_Export_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string)) + }) + return _c +} + +func (_c *OCR2_Export_Call) Return(_a0 []byte, _a1 error) *OCR2_Export_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *OCR2_Export_Call) RunAndReturn(run func(string, string) ([]byte, error)) *OCR2_Export_Call { + _c.Call.Return(run) + return _c +} + // Get provides a mock function with given fields: id func (_m *OCR2) Get(id string) (ocr2key.KeyBundle, error) { ret := _m.Called(id) @@ -168,6 +328,34 @@ func (_m *OCR2) Get(id string) (ocr2key.KeyBundle, error) { return r0, r1 } +// OCR2_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type OCR2_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - id string +func (_e *OCR2_Expecter) Get(id interface{}) *OCR2_Get_Call { + return &OCR2_Get_Call{Call: _e.mock.On("Get", id)} +} + +func (_c *OCR2_Get_Call) Run(run func(id string)) *OCR2_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *OCR2_Get_Call) Return(_a0 ocr2key.KeyBundle, _a1 error) *OCR2_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *OCR2_Get_Call) RunAndReturn(run func(string) (ocr2key.KeyBundle, error)) *OCR2_Get_Call { + _c.Call.Return(run) + return _c +} + // GetAll provides a mock function with given fields: func (_m *OCR2) GetAll() ([]ocr2key.KeyBundle, error) { ret := _m.Called() @@ -198,6 +386,33 @@ func (_m *OCR2) GetAll() ([]ocr2key.KeyBundle, error) { return r0, r1 } +// OCR2_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll' +type OCR2_GetAll_Call struct { + *mock.Call +} + +// GetAll is a helper method to define mock.On call +func (_e *OCR2_Expecter) GetAll() *OCR2_GetAll_Call { + return &OCR2_GetAll_Call{Call: _e.mock.On("GetAll")} +} + +func (_c *OCR2_GetAll_Call) Run(run func()) *OCR2_GetAll_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *OCR2_GetAll_Call) Return(_a0 []ocr2key.KeyBundle, _a1 error) *OCR2_GetAll_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *OCR2_GetAll_Call) RunAndReturn(run func() ([]ocr2key.KeyBundle, error)) *OCR2_GetAll_Call { + _c.Call.Return(run) + return _c +} + // GetAllOfType provides a mock function with given fields: _a0 func (_m *OCR2) GetAllOfType(_a0 chaintype.ChainType) ([]ocr2key.KeyBundle, error) { ret := _m.Called(_a0) @@ -228,6 +443,34 @@ func (_m *OCR2) GetAllOfType(_a0 chaintype.ChainType) ([]ocr2key.KeyBundle, erro return r0, r1 } +// OCR2_GetAllOfType_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllOfType' +type OCR2_GetAllOfType_Call struct { + *mock.Call +} + +// GetAllOfType is a helper method to define mock.On call +// - _a0 chaintype.ChainType +func (_e *OCR2_Expecter) GetAllOfType(_a0 interface{}) *OCR2_GetAllOfType_Call { + return &OCR2_GetAllOfType_Call{Call: _e.mock.On("GetAllOfType", _a0)} +} + +func (_c *OCR2_GetAllOfType_Call) Run(run func(_a0 chaintype.ChainType)) *OCR2_GetAllOfType_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(chaintype.ChainType)) + }) + return _c +} + +func (_c *OCR2_GetAllOfType_Call) Return(_a0 []ocr2key.KeyBundle, _a1 error) *OCR2_GetAllOfType_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *OCR2_GetAllOfType_Call) RunAndReturn(run func(chaintype.ChainType) ([]ocr2key.KeyBundle, error)) *OCR2_GetAllOfType_Call { + _c.Call.Return(run) + return _c +} + // Import provides a mock function with given fields: ctx, keyJSON, password func (_m *OCR2) Import(ctx context.Context, keyJSON []byte, password string) (ocr2key.KeyBundle, error) { ret := _m.Called(ctx, keyJSON, password) @@ -258,6 +501,36 @@ func (_m *OCR2) Import(ctx context.Context, keyJSON []byte, password string) (oc return r0, r1 } +// OCR2_Import_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Import' +type OCR2_Import_Call struct { + *mock.Call +} + +// Import is a helper method to define mock.On call +// - ctx context.Context +// - keyJSON []byte +// - password string +func (_e *OCR2_Expecter) Import(ctx interface{}, keyJSON interface{}, password interface{}) *OCR2_Import_Call { + return &OCR2_Import_Call{Call: _e.mock.On("Import", ctx, keyJSON, password)} +} + +func (_c *OCR2_Import_Call) Run(run func(ctx context.Context, keyJSON []byte, password string)) *OCR2_Import_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]byte), args[2].(string)) + }) + return _c +} + +func (_c *OCR2_Import_Call) Return(_a0 ocr2key.KeyBundle, _a1 error) *OCR2_Import_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *OCR2_Import_Call) RunAndReturn(run func(context.Context, []byte, string) (ocr2key.KeyBundle, error)) *OCR2_Import_Call { + _c.Call.Return(run) + return _c +} + // NewOCR2 creates a new instance of OCR2. 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 NewOCR2(t interface { diff --git a/core/services/keystore/mocks/p2p.go b/core/services/keystore/mocks/p2p.go index cb5a9329e54..5b9c7037938 100644 --- a/core/services/keystore/mocks/p2p.go +++ b/core/services/keystore/mocks/p2p.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -15,6 +15,14 @@ type P2P struct { mock.Mock } +type P2P_Expecter struct { + mock *mock.Mock +} + +func (_m *P2P) EXPECT() *P2P_Expecter { + return &P2P_Expecter{mock: &_m.Mock} +} + // Add provides a mock function with given fields: ctx, key func (_m *P2P) Add(ctx context.Context, key p2pkey.KeyV2) error { ret := _m.Called(ctx, key) @@ -33,6 +41,35 @@ func (_m *P2P) Add(ctx context.Context, key p2pkey.KeyV2) error { return r0 } +// P2P_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add' +type P2P_Add_Call struct { + *mock.Call +} + +// Add is a helper method to define mock.On call +// - ctx context.Context +// - key p2pkey.KeyV2 +func (_e *P2P_Expecter) Add(ctx interface{}, key interface{}) *P2P_Add_Call { + return &P2P_Add_Call{Call: _e.mock.On("Add", ctx, key)} +} + +func (_c *P2P_Add_Call) Run(run func(ctx context.Context, key p2pkey.KeyV2)) *P2P_Add_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(p2pkey.KeyV2)) + }) + return _c +} + +func (_c *P2P_Add_Call) Return(_a0 error) *P2P_Add_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *P2P_Add_Call) RunAndReturn(run func(context.Context, p2pkey.KeyV2) error) *P2P_Add_Call { + _c.Call.Return(run) + return _c +} + // Create provides a mock function with given fields: ctx func (_m *P2P) Create(ctx context.Context) (p2pkey.KeyV2, error) { ret := _m.Called(ctx) @@ -61,6 +98,34 @@ func (_m *P2P) Create(ctx context.Context) (p2pkey.KeyV2, error) { return r0, r1 } +// P2P_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type P2P_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - ctx context.Context +func (_e *P2P_Expecter) Create(ctx interface{}) *P2P_Create_Call { + return &P2P_Create_Call{Call: _e.mock.On("Create", ctx)} +} + +func (_c *P2P_Create_Call) Run(run func(ctx context.Context)) *P2P_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *P2P_Create_Call) Return(_a0 p2pkey.KeyV2, _a1 error) *P2P_Create_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *P2P_Create_Call) RunAndReturn(run func(context.Context) (p2pkey.KeyV2, error)) *P2P_Create_Call { + _c.Call.Return(run) + return _c +} + // Delete provides a mock function with given fields: ctx, id func (_m *P2P) Delete(ctx context.Context, id p2pkey.PeerID) (p2pkey.KeyV2, error) { ret := _m.Called(ctx, id) @@ -89,6 +154,35 @@ func (_m *P2P) Delete(ctx context.Context, id p2pkey.PeerID) (p2pkey.KeyV2, erro return r0, r1 } +// P2P_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' +type P2P_Delete_Call struct { + *mock.Call +} + +// Delete is a helper method to define mock.On call +// - ctx context.Context +// - id p2pkey.PeerID +func (_e *P2P_Expecter) Delete(ctx interface{}, id interface{}) *P2P_Delete_Call { + return &P2P_Delete_Call{Call: _e.mock.On("Delete", ctx, id)} +} + +func (_c *P2P_Delete_Call) Run(run func(ctx context.Context, id p2pkey.PeerID)) *P2P_Delete_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(p2pkey.PeerID)) + }) + return _c +} + +func (_c *P2P_Delete_Call) Return(_a0 p2pkey.KeyV2, _a1 error) *P2P_Delete_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *P2P_Delete_Call) RunAndReturn(run func(context.Context, p2pkey.PeerID) (p2pkey.KeyV2, error)) *P2P_Delete_Call { + _c.Call.Return(run) + return _c +} + // EnsureKey provides a mock function with given fields: ctx func (_m *P2P) EnsureKey(ctx context.Context) error { ret := _m.Called(ctx) @@ -107,6 +201,34 @@ func (_m *P2P) EnsureKey(ctx context.Context) error { return r0 } +// P2P_EnsureKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureKey' +type P2P_EnsureKey_Call struct { + *mock.Call +} + +// EnsureKey is a helper method to define mock.On call +// - ctx context.Context +func (_e *P2P_Expecter) EnsureKey(ctx interface{}) *P2P_EnsureKey_Call { + return &P2P_EnsureKey_Call{Call: _e.mock.On("EnsureKey", ctx)} +} + +func (_c *P2P_EnsureKey_Call) Run(run func(ctx context.Context)) *P2P_EnsureKey_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *P2P_EnsureKey_Call) Return(_a0 error) *P2P_EnsureKey_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *P2P_EnsureKey_Call) RunAndReturn(run func(context.Context) error) *P2P_EnsureKey_Call { + _c.Call.Return(run) + return _c +} + // Export provides a mock function with given fields: id, password func (_m *P2P) Export(id p2pkey.PeerID, password string) ([]byte, error) { ret := _m.Called(id, password) @@ -137,6 +259,35 @@ func (_m *P2P) Export(id p2pkey.PeerID, password string) ([]byte, error) { return r0, r1 } +// P2P_Export_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Export' +type P2P_Export_Call struct { + *mock.Call +} + +// Export is a helper method to define mock.On call +// - id p2pkey.PeerID +// - password string +func (_e *P2P_Expecter) Export(id interface{}, password interface{}) *P2P_Export_Call { + return &P2P_Export_Call{Call: _e.mock.On("Export", id, password)} +} + +func (_c *P2P_Export_Call) Run(run func(id p2pkey.PeerID, password string)) *P2P_Export_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(p2pkey.PeerID), args[1].(string)) + }) + return _c +} + +func (_c *P2P_Export_Call) Return(_a0 []byte, _a1 error) *P2P_Export_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *P2P_Export_Call) RunAndReturn(run func(p2pkey.PeerID, string) ([]byte, error)) *P2P_Export_Call { + _c.Call.Return(run) + return _c +} + // Get provides a mock function with given fields: id func (_m *P2P) Get(id p2pkey.PeerID) (p2pkey.KeyV2, error) { ret := _m.Called(id) @@ -165,6 +316,34 @@ func (_m *P2P) Get(id p2pkey.PeerID) (p2pkey.KeyV2, error) { return r0, r1 } +// P2P_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type P2P_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - id p2pkey.PeerID +func (_e *P2P_Expecter) Get(id interface{}) *P2P_Get_Call { + return &P2P_Get_Call{Call: _e.mock.On("Get", id)} +} + +func (_c *P2P_Get_Call) Run(run func(id p2pkey.PeerID)) *P2P_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(p2pkey.PeerID)) + }) + return _c +} + +func (_c *P2P_Get_Call) Return(_a0 p2pkey.KeyV2, _a1 error) *P2P_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *P2P_Get_Call) RunAndReturn(run func(p2pkey.PeerID) (p2pkey.KeyV2, error)) *P2P_Get_Call { + _c.Call.Return(run) + return _c +} + // GetAll provides a mock function with given fields: func (_m *P2P) GetAll() ([]p2pkey.KeyV2, error) { ret := _m.Called() @@ -195,6 +374,33 @@ func (_m *P2P) GetAll() ([]p2pkey.KeyV2, error) { return r0, r1 } +// P2P_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll' +type P2P_GetAll_Call struct { + *mock.Call +} + +// GetAll is a helper method to define mock.On call +func (_e *P2P_Expecter) GetAll() *P2P_GetAll_Call { + return &P2P_GetAll_Call{Call: _e.mock.On("GetAll")} +} + +func (_c *P2P_GetAll_Call) Run(run func()) *P2P_GetAll_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *P2P_GetAll_Call) Return(_a0 []p2pkey.KeyV2, _a1 error) *P2P_GetAll_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *P2P_GetAll_Call) RunAndReturn(run func() ([]p2pkey.KeyV2, error)) *P2P_GetAll_Call { + _c.Call.Return(run) + return _c +} + // GetOrFirst provides a mock function with given fields: id func (_m *P2P) GetOrFirst(id p2pkey.PeerID) (p2pkey.KeyV2, error) { ret := _m.Called(id) @@ -223,6 +429,34 @@ func (_m *P2P) GetOrFirst(id p2pkey.PeerID) (p2pkey.KeyV2, error) { return r0, r1 } +// P2P_GetOrFirst_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetOrFirst' +type P2P_GetOrFirst_Call struct { + *mock.Call +} + +// GetOrFirst is a helper method to define mock.On call +// - id p2pkey.PeerID +func (_e *P2P_Expecter) GetOrFirst(id interface{}) *P2P_GetOrFirst_Call { + return &P2P_GetOrFirst_Call{Call: _e.mock.On("GetOrFirst", id)} +} + +func (_c *P2P_GetOrFirst_Call) Run(run func(id p2pkey.PeerID)) *P2P_GetOrFirst_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(p2pkey.PeerID)) + }) + return _c +} + +func (_c *P2P_GetOrFirst_Call) Return(_a0 p2pkey.KeyV2, _a1 error) *P2P_GetOrFirst_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *P2P_GetOrFirst_Call) RunAndReturn(run func(p2pkey.PeerID) (p2pkey.KeyV2, error)) *P2P_GetOrFirst_Call { + _c.Call.Return(run) + return _c +} + // Import provides a mock function with given fields: ctx, keyJSON, password func (_m *P2P) Import(ctx context.Context, keyJSON []byte, password string) (p2pkey.KeyV2, error) { ret := _m.Called(ctx, keyJSON, password) @@ -251,6 +485,36 @@ func (_m *P2P) Import(ctx context.Context, keyJSON []byte, password string) (p2p return r0, r1 } +// P2P_Import_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Import' +type P2P_Import_Call struct { + *mock.Call +} + +// Import is a helper method to define mock.On call +// - ctx context.Context +// - keyJSON []byte +// - password string +func (_e *P2P_Expecter) Import(ctx interface{}, keyJSON interface{}, password interface{}) *P2P_Import_Call { + return &P2P_Import_Call{Call: _e.mock.On("Import", ctx, keyJSON, password)} +} + +func (_c *P2P_Import_Call) Run(run func(ctx context.Context, keyJSON []byte, password string)) *P2P_Import_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]byte), args[2].(string)) + }) + return _c +} + +func (_c *P2P_Import_Call) Return(_a0 p2pkey.KeyV2, _a1 error) *P2P_Import_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *P2P_Import_Call) RunAndReturn(run func(context.Context, []byte, string) (p2pkey.KeyV2, error)) *P2P_Import_Call { + _c.Call.Return(run) + return _c +} + // NewP2P creates a new instance of P2P. 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 NewP2P(t interface { diff --git a/core/services/keystore/mocks/solana.go b/core/services/keystore/mocks/solana.go index 2f9514cc1da..561daef439a 100644 --- a/core/services/keystore/mocks/solana.go +++ b/core/services/keystore/mocks/solana.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -15,6 +15,14 @@ type Solana struct { mock.Mock } +type Solana_Expecter struct { + mock *mock.Mock +} + +func (_m *Solana) EXPECT() *Solana_Expecter { + return &Solana_Expecter{mock: &_m.Mock} +} + // Add provides a mock function with given fields: ctx, key func (_m *Solana) Add(ctx context.Context, key solkey.Key) error { ret := _m.Called(ctx, key) @@ -33,6 +41,35 @@ func (_m *Solana) Add(ctx context.Context, key solkey.Key) error { return r0 } +// Solana_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add' +type Solana_Add_Call struct { + *mock.Call +} + +// Add is a helper method to define mock.On call +// - ctx context.Context +// - key solkey.Key +func (_e *Solana_Expecter) Add(ctx interface{}, key interface{}) *Solana_Add_Call { + return &Solana_Add_Call{Call: _e.mock.On("Add", ctx, key)} +} + +func (_c *Solana_Add_Call) Run(run func(ctx context.Context, key solkey.Key)) *Solana_Add_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(solkey.Key)) + }) + return _c +} + +func (_c *Solana_Add_Call) Return(_a0 error) *Solana_Add_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Solana_Add_Call) RunAndReturn(run func(context.Context, solkey.Key) error) *Solana_Add_Call { + _c.Call.Return(run) + return _c +} + // Create provides a mock function with given fields: ctx func (_m *Solana) Create(ctx context.Context) (solkey.Key, error) { ret := _m.Called(ctx) @@ -61,6 +98,34 @@ func (_m *Solana) Create(ctx context.Context) (solkey.Key, error) { return r0, r1 } +// Solana_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type Solana_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - ctx context.Context +func (_e *Solana_Expecter) Create(ctx interface{}) *Solana_Create_Call { + return &Solana_Create_Call{Call: _e.mock.On("Create", ctx)} +} + +func (_c *Solana_Create_Call) Run(run func(ctx context.Context)) *Solana_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Solana_Create_Call) Return(_a0 solkey.Key, _a1 error) *Solana_Create_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Solana_Create_Call) RunAndReturn(run func(context.Context) (solkey.Key, error)) *Solana_Create_Call { + _c.Call.Return(run) + return _c +} + // Delete provides a mock function with given fields: ctx, id func (_m *Solana) Delete(ctx context.Context, id string) (solkey.Key, error) { ret := _m.Called(ctx, id) @@ -89,6 +154,35 @@ func (_m *Solana) Delete(ctx context.Context, id string) (solkey.Key, error) { return r0, r1 } +// Solana_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' +type Solana_Delete_Call struct { + *mock.Call +} + +// Delete is a helper method to define mock.On call +// - ctx context.Context +// - id string +func (_e *Solana_Expecter) Delete(ctx interface{}, id interface{}) *Solana_Delete_Call { + return &Solana_Delete_Call{Call: _e.mock.On("Delete", ctx, id)} +} + +func (_c *Solana_Delete_Call) Run(run func(ctx context.Context, id string)) *Solana_Delete_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *Solana_Delete_Call) Return(_a0 solkey.Key, _a1 error) *Solana_Delete_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Solana_Delete_Call) RunAndReturn(run func(context.Context, string) (solkey.Key, error)) *Solana_Delete_Call { + _c.Call.Return(run) + return _c +} + // EnsureKey provides a mock function with given fields: ctx func (_m *Solana) EnsureKey(ctx context.Context) error { ret := _m.Called(ctx) @@ -107,6 +201,34 @@ func (_m *Solana) EnsureKey(ctx context.Context) error { return r0 } +// Solana_EnsureKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureKey' +type Solana_EnsureKey_Call struct { + *mock.Call +} + +// EnsureKey is a helper method to define mock.On call +// - ctx context.Context +func (_e *Solana_Expecter) EnsureKey(ctx interface{}) *Solana_EnsureKey_Call { + return &Solana_EnsureKey_Call{Call: _e.mock.On("EnsureKey", ctx)} +} + +func (_c *Solana_EnsureKey_Call) Run(run func(ctx context.Context)) *Solana_EnsureKey_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Solana_EnsureKey_Call) Return(_a0 error) *Solana_EnsureKey_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Solana_EnsureKey_Call) RunAndReturn(run func(context.Context) error) *Solana_EnsureKey_Call { + _c.Call.Return(run) + return _c +} + // Export provides a mock function with given fields: id, password func (_m *Solana) Export(id string, password string) ([]byte, error) { ret := _m.Called(id, password) @@ -137,6 +259,35 @@ func (_m *Solana) Export(id string, password string) ([]byte, error) { return r0, r1 } +// Solana_Export_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Export' +type Solana_Export_Call struct { + *mock.Call +} + +// Export is a helper method to define mock.On call +// - id string +// - password string +func (_e *Solana_Expecter) Export(id interface{}, password interface{}) *Solana_Export_Call { + return &Solana_Export_Call{Call: _e.mock.On("Export", id, password)} +} + +func (_c *Solana_Export_Call) Run(run func(id string, password string)) *Solana_Export_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string)) + }) + return _c +} + +func (_c *Solana_Export_Call) Return(_a0 []byte, _a1 error) *Solana_Export_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Solana_Export_Call) RunAndReturn(run func(string, string) ([]byte, error)) *Solana_Export_Call { + _c.Call.Return(run) + return _c +} + // Get provides a mock function with given fields: id func (_m *Solana) Get(id string) (solkey.Key, error) { ret := _m.Called(id) @@ -165,6 +316,34 @@ func (_m *Solana) Get(id string) (solkey.Key, error) { return r0, r1 } +// Solana_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type Solana_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - id string +func (_e *Solana_Expecter) Get(id interface{}) *Solana_Get_Call { + return &Solana_Get_Call{Call: _e.mock.On("Get", id)} +} + +func (_c *Solana_Get_Call) Run(run func(id string)) *Solana_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *Solana_Get_Call) Return(_a0 solkey.Key, _a1 error) *Solana_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Solana_Get_Call) RunAndReturn(run func(string) (solkey.Key, error)) *Solana_Get_Call { + _c.Call.Return(run) + return _c +} + // GetAll provides a mock function with given fields: func (_m *Solana) GetAll() ([]solkey.Key, error) { ret := _m.Called() @@ -195,6 +374,33 @@ func (_m *Solana) GetAll() ([]solkey.Key, error) { return r0, r1 } +// Solana_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll' +type Solana_GetAll_Call struct { + *mock.Call +} + +// GetAll is a helper method to define mock.On call +func (_e *Solana_Expecter) GetAll() *Solana_GetAll_Call { + return &Solana_GetAll_Call{Call: _e.mock.On("GetAll")} +} + +func (_c *Solana_GetAll_Call) Run(run func()) *Solana_GetAll_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Solana_GetAll_Call) Return(_a0 []solkey.Key, _a1 error) *Solana_GetAll_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Solana_GetAll_Call) RunAndReturn(run func() ([]solkey.Key, error)) *Solana_GetAll_Call { + _c.Call.Return(run) + return _c +} + // Import provides a mock function with given fields: ctx, keyJSON, password func (_m *Solana) Import(ctx context.Context, keyJSON []byte, password string) (solkey.Key, error) { ret := _m.Called(ctx, keyJSON, password) @@ -223,6 +429,36 @@ func (_m *Solana) Import(ctx context.Context, keyJSON []byte, password string) ( return r0, r1 } +// Solana_Import_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Import' +type Solana_Import_Call struct { + *mock.Call +} + +// Import is a helper method to define mock.On call +// - ctx context.Context +// - keyJSON []byte +// - password string +func (_e *Solana_Expecter) Import(ctx interface{}, keyJSON interface{}, password interface{}) *Solana_Import_Call { + return &Solana_Import_Call{Call: _e.mock.On("Import", ctx, keyJSON, password)} +} + +func (_c *Solana_Import_Call) Run(run func(ctx context.Context, keyJSON []byte, password string)) *Solana_Import_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]byte), args[2].(string)) + }) + return _c +} + +func (_c *Solana_Import_Call) Return(_a0 solkey.Key, _a1 error) *Solana_Import_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Solana_Import_Call) RunAndReturn(run func(context.Context, []byte, string) (solkey.Key, error)) *Solana_Import_Call { + _c.Call.Return(run) + return _c +} + // Sign provides a mock function with given fields: ctx, id, msg func (_m *Solana) Sign(ctx context.Context, id string, msg []byte) ([]byte, error) { ret := _m.Called(ctx, id, msg) @@ -253,6 +489,36 @@ func (_m *Solana) Sign(ctx context.Context, id string, msg []byte) ([]byte, erro return r0, r1 } +// Solana_Sign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Sign' +type Solana_Sign_Call struct { + *mock.Call +} + +// Sign is a helper method to define mock.On call +// - ctx context.Context +// - id string +// - msg []byte +func (_e *Solana_Expecter) Sign(ctx interface{}, id interface{}, msg interface{}) *Solana_Sign_Call { + return &Solana_Sign_Call{Call: _e.mock.On("Sign", ctx, id, msg)} +} + +func (_c *Solana_Sign_Call) Run(run func(ctx context.Context, id string, msg []byte)) *Solana_Sign_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].([]byte)) + }) + return _c +} + +func (_c *Solana_Sign_Call) Return(signature []byte, err error) *Solana_Sign_Call { + _c.Call.Return(signature, err) + return _c +} + +func (_c *Solana_Sign_Call) RunAndReturn(run func(context.Context, string, []byte) ([]byte, error)) *Solana_Sign_Call { + _c.Call.Return(run) + return _c +} + // NewSolana creates a new instance of Solana. 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 NewSolana(t interface { diff --git a/core/services/keystore/mocks/starknet.go b/core/services/keystore/mocks/starknet.go index a6cc0d5e5f3..512e417e76e 100644 --- a/core/services/keystore/mocks/starknet.go +++ b/core/services/keystore/mocks/starknet.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -15,6 +15,14 @@ type StarkNet struct { mock.Mock } +type StarkNet_Expecter struct { + mock *mock.Mock +} + +func (_m *StarkNet) EXPECT() *StarkNet_Expecter { + return &StarkNet_Expecter{mock: &_m.Mock} +} + // Add provides a mock function with given fields: ctx, key func (_m *StarkNet) Add(ctx context.Context, key starkkey.Key) error { ret := _m.Called(ctx, key) @@ -33,6 +41,35 @@ func (_m *StarkNet) Add(ctx context.Context, key starkkey.Key) error { return r0 } +// StarkNet_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add' +type StarkNet_Add_Call struct { + *mock.Call +} + +// Add is a helper method to define mock.On call +// - ctx context.Context +// - key starkkey.Key +func (_e *StarkNet_Expecter) Add(ctx interface{}, key interface{}) *StarkNet_Add_Call { + return &StarkNet_Add_Call{Call: _e.mock.On("Add", ctx, key)} +} + +func (_c *StarkNet_Add_Call) Run(run func(ctx context.Context, key starkkey.Key)) *StarkNet_Add_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(starkkey.Key)) + }) + return _c +} + +func (_c *StarkNet_Add_Call) Return(_a0 error) *StarkNet_Add_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *StarkNet_Add_Call) RunAndReturn(run func(context.Context, starkkey.Key) error) *StarkNet_Add_Call { + _c.Call.Return(run) + return _c +} + // Create provides a mock function with given fields: ctx func (_m *StarkNet) Create(ctx context.Context) (starkkey.Key, error) { ret := _m.Called(ctx) @@ -61,6 +98,34 @@ func (_m *StarkNet) Create(ctx context.Context) (starkkey.Key, error) { return r0, r1 } +// StarkNet_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type StarkNet_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - ctx context.Context +func (_e *StarkNet_Expecter) Create(ctx interface{}) *StarkNet_Create_Call { + return &StarkNet_Create_Call{Call: _e.mock.On("Create", ctx)} +} + +func (_c *StarkNet_Create_Call) Run(run func(ctx context.Context)) *StarkNet_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *StarkNet_Create_Call) Return(_a0 starkkey.Key, _a1 error) *StarkNet_Create_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *StarkNet_Create_Call) RunAndReturn(run func(context.Context) (starkkey.Key, error)) *StarkNet_Create_Call { + _c.Call.Return(run) + return _c +} + // Delete provides a mock function with given fields: ctx, id func (_m *StarkNet) Delete(ctx context.Context, id string) (starkkey.Key, error) { ret := _m.Called(ctx, id) @@ -89,6 +154,35 @@ func (_m *StarkNet) Delete(ctx context.Context, id string) (starkkey.Key, error) return r0, r1 } +// StarkNet_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' +type StarkNet_Delete_Call struct { + *mock.Call +} + +// Delete is a helper method to define mock.On call +// - ctx context.Context +// - id string +func (_e *StarkNet_Expecter) Delete(ctx interface{}, id interface{}) *StarkNet_Delete_Call { + return &StarkNet_Delete_Call{Call: _e.mock.On("Delete", ctx, id)} +} + +func (_c *StarkNet_Delete_Call) Run(run func(ctx context.Context, id string)) *StarkNet_Delete_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *StarkNet_Delete_Call) Return(_a0 starkkey.Key, _a1 error) *StarkNet_Delete_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *StarkNet_Delete_Call) RunAndReturn(run func(context.Context, string) (starkkey.Key, error)) *StarkNet_Delete_Call { + _c.Call.Return(run) + return _c +} + // EnsureKey provides a mock function with given fields: ctx func (_m *StarkNet) EnsureKey(ctx context.Context) error { ret := _m.Called(ctx) @@ -107,6 +201,34 @@ func (_m *StarkNet) EnsureKey(ctx context.Context) error { return r0 } +// StarkNet_EnsureKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureKey' +type StarkNet_EnsureKey_Call struct { + *mock.Call +} + +// EnsureKey is a helper method to define mock.On call +// - ctx context.Context +func (_e *StarkNet_Expecter) EnsureKey(ctx interface{}) *StarkNet_EnsureKey_Call { + return &StarkNet_EnsureKey_Call{Call: _e.mock.On("EnsureKey", ctx)} +} + +func (_c *StarkNet_EnsureKey_Call) Run(run func(ctx context.Context)) *StarkNet_EnsureKey_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *StarkNet_EnsureKey_Call) Return(_a0 error) *StarkNet_EnsureKey_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *StarkNet_EnsureKey_Call) RunAndReturn(run func(context.Context) error) *StarkNet_EnsureKey_Call { + _c.Call.Return(run) + return _c +} + // Export provides a mock function with given fields: id, password func (_m *StarkNet) Export(id string, password string) ([]byte, error) { ret := _m.Called(id, password) @@ -137,6 +259,35 @@ func (_m *StarkNet) Export(id string, password string) ([]byte, error) { return r0, r1 } +// StarkNet_Export_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Export' +type StarkNet_Export_Call struct { + *mock.Call +} + +// Export is a helper method to define mock.On call +// - id string +// - password string +func (_e *StarkNet_Expecter) Export(id interface{}, password interface{}) *StarkNet_Export_Call { + return &StarkNet_Export_Call{Call: _e.mock.On("Export", id, password)} +} + +func (_c *StarkNet_Export_Call) Run(run func(id string, password string)) *StarkNet_Export_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string)) + }) + return _c +} + +func (_c *StarkNet_Export_Call) Return(_a0 []byte, _a1 error) *StarkNet_Export_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *StarkNet_Export_Call) RunAndReturn(run func(string, string) ([]byte, error)) *StarkNet_Export_Call { + _c.Call.Return(run) + return _c +} + // Get provides a mock function with given fields: id func (_m *StarkNet) Get(id string) (starkkey.Key, error) { ret := _m.Called(id) @@ -165,6 +316,34 @@ func (_m *StarkNet) Get(id string) (starkkey.Key, error) { return r0, r1 } +// StarkNet_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type StarkNet_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - id string +func (_e *StarkNet_Expecter) Get(id interface{}) *StarkNet_Get_Call { + return &StarkNet_Get_Call{Call: _e.mock.On("Get", id)} +} + +func (_c *StarkNet_Get_Call) Run(run func(id string)) *StarkNet_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *StarkNet_Get_Call) Return(_a0 starkkey.Key, _a1 error) *StarkNet_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *StarkNet_Get_Call) RunAndReturn(run func(string) (starkkey.Key, error)) *StarkNet_Get_Call { + _c.Call.Return(run) + return _c +} + // GetAll provides a mock function with given fields: func (_m *StarkNet) GetAll() ([]starkkey.Key, error) { ret := _m.Called() @@ -195,6 +374,33 @@ func (_m *StarkNet) GetAll() ([]starkkey.Key, error) { return r0, r1 } +// StarkNet_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll' +type StarkNet_GetAll_Call struct { + *mock.Call +} + +// GetAll is a helper method to define mock.On call +func (_e *StarkNet_Expecter) GetAll() *StarkNet_GetAll_Call { + return &StarkNet_GetAll_Call{Call: _e.mock.On("GetAll")} +} + +func (_c *StarkNet_GetAll_Call) Run(run func()) *StarkNet_GetAll_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *StarkNet_GetAll_Call) Return(_a0 []starkkey.Key, _a1 error) *StarkNet_GetAll_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *StarkNet_GetAll_Call) RunAndReturn(run func() ([]starkkey.Key, error)) *StarkNet_GetAll_Call { + _c.Call.Return(run) + return _c +} + // Import provides a mock function with given fields: ctx, keyJSON, password func (_m *StarkNet) Import(ctx context.Context, keyJSON []byte, password string) (starkkey.Key, error) { ret := _m.Called(ctx, keyJSON, password) @@ -223,6 +429,36 @@ func (_m *StarkNet) Import(ctx context.Context, keyJSON []byte, password string) return r0, r1 } +// StarkNet_Import_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Import' +type StarkNet_Import_Call struct { + *mock.Call +} + +// Import is a helper method to define mock.On call +// - ctx context.Context +// - keyJSON []byte +// - password string +func (_e *StarkNet_Expecter) Import(ctx interface{}, keyJSON interface{}, password interface{}) *StarkNet_Import_Call { + return &StarkNet_Import_Call{Call: _e.mock.On("Import", ctx, keyJSON, password)} +} + +func (_c *StarkNet_Import_Call) Run(run func(ctx context.Context, keyJSON []byte, password string)) *StarkNet_Import_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]byte), args[2].(string)) + }) + return _c +} + +func (_c *StarkNet_Import_Call) Return(_a0 starkkey.Key, _a1 error) *StarkNet_Import_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *StarkNet_Import_Call) RunAndReturn(run func(context.Context, []byte, string) (starkkey.Key, error)) *StarkNet_Import_Call { + _c.Call.Return(run) + return _c +} + // NewStarkNet creates a new instance of StarkNet. 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 NewStarkNet(t interface { diff --git a/core/services/keystore/mocks/vrf.go b/core/services/keystore/mocks/vrf.go index 87c6a724bdb..36be39f539e 100644 --- a/core/services/keystore/mocks/vrf.go +++ b/core/services/keystore/mocks/vrf.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -16,6 +16,14 @@ type VRF struct { mock.Mock } +type VRF_Expecter struct { + mock *mock.Mock +} + +func (_m *VRF) EXPECT() *VRF_Expecter { + return &VRF_Expecter{mock: &_m.Mock} +} + // Add provides a mock function with given fields: ctx, key func (_m *VRF) Add(ctx context.Context, key vrfkey.KeyV2) error { ret := _m.Called(ctx, key) @@ -34,6 +42,35 @@ func (_m *VRF) Add(ctx context.Context, key vrfkey.KeyV2) error { return r0 } +// VRF_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add' +type VRF_Add_Call struct { + *mock.Call +} + +// Add is a helper method to define mock.On call +// - ctx context.Context +// - key vrfkey.KeyV2 +func (_e *VRF_Expecter) Add(ctx interface{}, key interface{}) *VRF_Add_Call { + return &VRF_Add_Call{Call: _e.mock.On("Add", ctx, key)} +} + +func (_c *VRF_Add_Call) Run(run func(ctx context.Context, key vrfkey.KeyV2)) *VRF_Add_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(vrfkey.KeyV2)) + }) + return _c +} + +func (_c *VRF_Add_Call) Return(_a0 error) *VRF_Add_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *VRF_Add_Call) RunAndReturn(run func(context.Context, vrfkey.KeyV2) error) *VRF_Add_Call { + _c.Call.Return(run) + return _c +} + // Create provides a mock function with given fields: ctx func (_m *VRF) Create(ctx context.Context) (vrfkey.KeyV2, error) { ret := _m.Called(ctx) @@ -62,6 +99,34 @@ func (_m *VRF) Create(ctx context.Context) (vrfkey.KeyV2, error) { return r0, r1 } +// VRF_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type VRF_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - ctx context.Context +func (_e *VRF_Expecter) Create(ctx interface{}) *VRF_Create_Call { + return &VRF_Create_Call{Call: _e.mock.On("Create", ctx)} +} + +func (_c *VRF_Create_Call) Run(run func(ctx context.Context)) *VRF_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *VRF_Create_Call) Return(_a0 vrfkey.KeyV2, _a1 error) *VRF_Create_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRF_Create_Call) RunAndReturn(run func(context.Context) (vrfkey.KeyV2, error)) *VRF_Create_Call { + _c.Call.Return(run) + return _c +} + // Delete provides a mock function with given fields: ctx, id func (_m *VRF) Delete(ctx context.Context, id string) (vrfkey.KeyV2, error) { ret := _m.Called(ctx, id) @@ -90,6 +155,35 @@ func (_m *VRF) Delete(ctx context.Context, id string) (vrfkey.KeyV2, error) { return r0, r1 } +// VRF_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' +type VRF_Delete_Call struct { + *mock.Call +} + +// Delete is a helper method to define mock.On call +// - ctx context.Context +// - id string +func (_e *VRF_Expecter) Delete(ctx interface{}, id interface{}) *VRF_Delete_Call { + return &VRF_Delete_Call{Call: _e.mock.On("Delete", ctx, id)} +} + +func (_c *VRF_Delete_Call) Run(run func(ctx context.Context, id string)) *VRF_Delete_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *VRF_Delete_Call) Return(_a0 vrfkey.KeyV2, _a1 error) *VRF_Delete_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRF_Delete_Call) RunAndReturn(run func(context.Context, string) (vrfkey.KeyV2, error)) *VRF_Delete_Call { + _c.Call.Return(run) + return _c +} + // Export provides a mock function with given fields: id, password func (_m *VRF) Export(id string, password string) ([]byte, error) { ret := _m.Called(id, password) @@ -120,6 +214,35 @@ func (_m *VRF) Export(id string, password string) ([]byte, error) { return r0, r1 } +// VRF_Export_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Export' +type VRF_Export_Call struct { + *mock.Call +} + +// Export is a helper method to define mock.On call +// - id string +// - password string +func (_e *VRF_Expecter) Export(id interface{}, password interface{}) *VRF_Export_Call { + return &VRF_Export_Call{Call: _e.mock.On("Export", id, password)} +} + +func (_c *VRF_Export_Call) Run(run func(id string, password string)) *VRF_Export_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string)) + }) + return _c +} + +func (_c *VRF_Export_Call) Return(_a0 []byte, _a1 error) *VRF_Export_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRF_Export_Call) RunAndReturn(run func(string, string) ([]byte, error)) *VRF_Export_Call { + _c.Call.Return(run) + return _c +} + // GenerateProof provides a mock function with given fields: id, seed func (_m *VRF) GenerateProof(id string, seed *big.Int) (vrfkey.Proof, error) { ret := _m.Called(id, seed) @@ -148,6 +271,35 @@ func (_m *VRF) GenerateProof(id string, seed *big.Int) (vrfkey.Proof, error) { return r0, r1 } +// VRF_GenerateProof_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GenerateProof' +type VRF_GenerateProof_Call struct { + *mock.Call +} + +// GenerateProof is a helper method to define mock.On call +// - id string +// - seed *big.Int +func (_e *VRF_Expecter) GenerateProof(id interface{}, seed interface{}) *VRF_GenerateProof_Call { + return &VRF_GenerateProof_Call{Call: _e.mock.On("GenerateProof", id, seed)} +} + +func (_c *VRF_GenerateProof_Call) Run(run func(id string, seed *big.Int)) *VRF_GenerateProof_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(*big.Int)) + }) + return _c +} + +func (_c *VRF_GenerateProof_Call) Return(_a0 vrfkey.Proof, _a1 error) *VRF_GenerateProof_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRF_GenerateProof_Call) RunAndReturn(run func(string, *big.Int) (vrfkey.Proof, error)) *VRF_GenerateProof_Call { + _c.Call.Return(run) + return _c +} + // Get provides a mock function with given fields: id func (_m *VRF) Get(id string) (vrfkey.KeyV2, error) { ret := _m.Called(id) @@ -176,6 +328,34 @@ func (_m *VRF) Get(id string) (vrfkey.KeyV2, error) { return r0, r1 } +// VRF_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type VRF_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - id string +func (_e *VRF_Expecter) Get(id interface{}) *VRF_Get_Call { + return &VRF_Get_Call{Call: _e.mock.On("Get", id)} +} + +func (_c *VRF_Get_Call) Run(run func(id string)) *VRF_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *VRF_Get_Call) Return(_a0 vrfkey.KeyV2, _a1 error) *VRF_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRF_Get_Call) RunAndReturn(run func(string) (vrfkey.KeyV2, error)) *VRF_Get_Call { + _c.Call.Return(run) + return _c +} + // GetAll provides a mock function with given fields: func (_m *VRF) GetAll() ([]vrfkey.KeyV2, error) { ret := _m.Called() @@ -206,6 +386,33 @@ func (_m *VRF) GetAll() ([]vrfkey.KeyV2, error) { return r0, r1 } +// VRF_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll' +type VRF_GetAll_Call struct { + *mock.Call +} + +// GetAll is a helper method to define mock.On call +func (_e *VRF_Expecter) GetAll() *VRF_GetAll_Call { + return &VRF_GetAll_Call{Call: _e.mock.On("GetAll")} +} + +func (_c *VRF_GetAll_Call) Run(run func()) *VRF_GetAll_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *VRF_GetAll_Call) Return(_a0 []vrfkey.KeyV2, _a1 error) *VRF_GetAll_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRF_GetAll_Call) RunAndReturn(run func() ([]vrfkey.KeyV2, error)) *VRF_GetAll_Call { + _c.Call.Return(run) + return _c +} + // Import provides a mock function with given fields: ctx, keyJSON, password func (_m *VRF) Import(ctx context.Context, keyJSON []byte, password string) (vrfkey.KeyV2, error) { ret := _m.Called(ctx, keyJSON, password) @@ -234,6 +441,36 @@ func (_m *VRF) Import(ctx context.Context, keyJSON []byte, password string) (vrf return r0, r1 } +// VRF_Import_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Import' +type VRF_Import_Call struct { + *mock.Call +} + +// Import is a helper method to define mock.On call +// - ctx context.Context +// - keyJSON []byte +// - password string +func (_e *VRF_Expecter) Import(ctx interface{}, keyJSON interface{}, password interface{}) *VRF_Import_Call { + return &VRF_Import_Call{Call: _e.mock.On("Import", ctx, keyJSON, password)} +} + +func (_c *VRF_Import_Call) Run(run func(ctx context.Context, keyJSON []byte, password string)) *VRF_Import_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]byte), args[2].(string)) + }) + return _c +} + +func (_c *VRF_Import_Call) Return(_a0 vrfkey.KeyV2, _a1 error) *VRF_Import_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRF_Import_Call) RunAndReturn(run func(context.Context, []byte, string) (vrfkey.KeyV2, error)) *VRF_Import_Call { + _c.Call.Return(run) + return _c +} + // NewVRF creates a new instance of VRF. 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 NewVRF(t interface { diff --git a/core/services/keystore/models.go b/core/services/keystore/models.go index bb84efdd024..d5eec6802b9 100644 --- a/core/services/keystore/models.go +++ b/core/services/keystore/models.go @@ -11,10 +11,9 @@ import ( "github.com/pkg/errors" "github.com/smartcontractkit/chainlink/v2/core/logger" + "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/aptoskey" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/cosmoskey" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/csakey" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/dkgencryptkey" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/dkgsignkey" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocr2key" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocrkey" @@ -157,25 +156,23 @@ type keyRing struct { Cosmos map[string]cosmoskey.Key Solana map[string]solkey.Key StarkNet map[string]starkkey.Key + Aptos map[string]aptoskey.Key VRF map[string]vrfkey.KeyV2 - DKGSign map[string]dkgsignkey.Key - DKGEncrypt map[string]dkgencryptkey.Key LegacyKeys LegacyKeyStorage } func newKeyRing() *keyRing { return &keyRing{ - CSA: make(map[string]csakey.KeyV2), - Eth: make(map[string]ethkey.KeyV2), - OCR: make(map[string]ocrkey.KeyV2), - OCR2: make(map[string]ocr2key.KeyBundle), - P2P: make(map[string]p2pkey.KeyV2), - Cosmos: make(map[string]cosmoskey.Key), - Solana: make(map[string]solkey.Key), - StarkNet: make(map[string]starkkey.Key), - VRF: make(map[string]vrfkey.KeyV2), - DKGSign: make(map[string]dkgsignkey.Key), - DKGEncrypt: make(map[string]dkgencryptkey.Key), + CSA: make(map[string]csakey.KeyV2), + Eth: make(map[string]ethkey.KeyV2), + OCR: make(map[string]ocrkey.KeyV2), + OCR2: make(map[string]ocr2key.KeyBundle), + P2P: make(map[string]p2pkey.KeyV2), + Cosmos: make(map[string]cosmoskey.Key), + Solana: make(map[string]solkey.Key), + StarkNet: make(map[string]starkkey.Key), + Aptos: make(map[string]aptoskey.Key), + VRF: make(map[string]vrfkey.KeyV2), } } @@ -233,15 +230,12 @@ func (kr *keyRing) raw() (rawKeys rawKeyRing) { for _, starkkey := range kr.StarkNet { rawKeys.StarkNet = append(rawKeys.StarkNet, starkkey.Raw()) } + for _, aptoskey := range kr.Aptos { + rawKeys.Aptos = append(rawKeys.Aptos, aptoskey.Raw()) + } for _, vrfKey := range kr.VRF { rawKeys.VRF = append(rawKeys.VRF, vrfKey.Raw()) } - for _, dkgSignKey := range kr.DKGSign { - rawKeys.DKGSign = append(rawKeys.DKGSign, dkgSignKey.Raw()) - } - for _, dkgEncryptKey := range kr.DKGEncrypt { - rawKeys.DKGEncrypt = append(rawKeys.DKGEncrypt, dkgEncryptKey.Raw()) - } return rawKeys } @@ -279,18 +273,14 @@ func (kr *keyRing) logPubKeys(lggr logger.Logger) { for _, starkkey := range kr.StarkNet { starknetIDs = append(starknetIDs, starkkey.ID()) } + var aptosIDs []string + for _, aptosKey := range kr.Aptos { + aptosIDs = append(aptosIDs, aptosKey.ID()) + } var vrfIDs []string for _, VRFKey := range kr.VRF { vrfIDs = append(vrfIDs, VRFKey.ID()) } - var dkgSignIDs []string - for _, dkgSignKey := range kr.DKGSign { - dkgSignIDs = append(dkgSignIDs, dkgSignKey.ID()) - } - var dkgEncryptIDs []string - for _, dkgEncryptKey := range kr.DKGEncrypt { - dkgEncryptIDs = append(dkgEncryptIDs, dkgEncryptKey.ID()) - } if len(csaIDs) > 0 { lggr.Infow(fmt.Sprintf("Unlocked %d CSA keys", len(csaIDs)), "keys", csaIDs) } @@ -315,15 +305,12 @@ func (kr *keyRing) logPubKeys(lggr logger.Logger) { if len(starknetIDs) > 0 { lggr.Infow(fmt.Sprintf("Unlocked %d StarkNet keys", len(starknetIDs)), "keys", starknetIDs) } + if len(aptosIDs) > 0 { + lggr.Infow(fmt.Sprintf("Unlocked %d Aptos keys", len(aptosIDs)), "keys", aptosIDs) + } if len(vrfIDs) > 0 { lggr.Infow(fmt.Sprintf("Unlocked %d VRF keys", len(vrfIDs)), "keys", vrfIDs) } - if len(dkgSignIDs) > 0 { - lggr.Infow(fmt.Sprintf("Unlocked %d DKGSign keys", len(dkgSignIDs)), "keys", dkgSignIDs) - } - if len(dkgEncryptIDs) > 0 { - lggr.Infow(fmt.Sprintf("Unlocked %d DKGEncrypt keys", len(dkgEncryptIDs)), "keys", dkgEncryptIDs) - } if len(kr.LegacyKeys.legacyRawKeys) > 0 { lggr.Infow(fmt.Sprintf("%d keys stored in legacy system", kr.LegacyKeys.legacyRawKeys.len())) } @@ -341,9 +328,8 @@ type rawKeyRing struct { Cosmos []cosmoskey.Raw Solana []solkey.Raw StarkNet []starkkey.Raw + Aptos []aptoskey.Raw VRF []vrfkey.Raw - DKGSign []dkgsignkey.Raw - DKGEncrypt []dkgencryptkey.Raw LegacyKeys LegacyKeyStorage `json:"-"` } @@ -382,18 +368,14 @@ func (rawKeys rawKeyRing) keys() (*keyRing, error) { starkKey := rawStarkNetKey.Key() keyRing.StarkNet[starkKey.ID()] = starkKey } + for _, rawAptosKey := range rawKeys.Aptos { + aptosKey := rawAptosKey.Key() + keyRing.Aptos[aptosKey.ID()] = aptosKey + } for _, rawVRFKey := range rawKeys.VRF { vrfKey := rawVRFKey.Key() keyRing.VRF[vrfKey.ID()] = vrfKey } - for _, rawDKGSignKey := range rawKeys.DKGSign { - dkgSignKey := rawDKGSignKey.Key() - keyRing.DKGSign[dkgSignKey.ID()] = dkgSignKey - } - for _, rawDKGEncryptKey := range rawKeys.DKGEncrypt { - dkgEncryptKey := rawDKGEncryptKey.Key() - keyRing.DKGEncrypt[dkgEncryptKey.ID()] = dkgEncryptKey - } keyRing.LegacyKeys = rawKeys.LegacyKeys return keyRing, nil diff --git a/core/services/keystore/models_test.go b/core/services/keystore/models_test.go index 25331a3b218..8f7881809ea 100644 --- a/core/services/keystore/models_test.go +++ b/core/services/keystore/models_test.go @@ -11,8 +11,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/keystore/chaintype" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/cosmoskey" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/csakey" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/dkgencryptkey" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/dkgsignkey" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocr2key" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocrkey" @@ -42,19 +40,15 @@ func TestKeyRing_Encrypt_Decrypt(t *testing.T) { sol1, sol2 := solkey.MustNewInsecure(rand.Reader), solkey.MustNewInsecure(rand.Reader) vrf1, vrf2 := vrfkey.MustNewV2XXXTestingOnly(big.NewInt(1)), vrfkey.MustNewV2XXXTestingOnly(big.NewInt(2)) tk1, tk2 := cosmoskey.MustNewInsecure(rand.Reader), cosmoskey.MustNewInsecure(rand.Reader) - dkgsign1, dkgsign2 := dkgsignkey.MustNewXXXTestingOnly(big.NewInt(1)), dkgsignkey.MustNewXXXTestingOnly(big.NewInt(2)) - dkgencrypt1, dkgencrypt2 := dkgencryptkey.MustNewXXXTestingOnly(big.NewInt(1)), dkgencryptkey.MustNewXXXTestingOnly(big.NewInt(2)) originalKeyRingRaw := rawKeyRing{ - CSA: []csakey.Raw{csa1.Raw(), csa2.Raw()}, - Eth: []ethkey.Raw{eth1.Raw(), eth2.Raw()}, - OCR: []ocrkey.Raw{ocr[0].Raw(), ocr[1].Raw()}, - OCR2: ocr2_raw, - P2P: []p2pkey.Raw{p2p1.Raw(), p2p2.Raw()}, - Solana: []solkey.Raw{sol1.Raw(), sol2.Raw()}, - VRF: []vrfkey.Raw{vrf1.Raw(), vrf2.Raw()}, - Cosmos: []cosmoskey.Raw{tk1.Raw(), tk2.Raw()}, - DKGSign: []dkgsignkey.Raw{dkgsign1.Raw(), dkgsign2.Raw()}, - DKGEncrypt: []dkgencryptkey.Raw{dkgencrypt1.Raw(), dkgencrypt2.Raw()}, + CSA: []csakey.Raw{csa1.Raw(), csa2.Raw()}, + Eth: []ethkey.Raw{eth1.Raw(), eth2.Raw()}, + OCR: []ocrkey.Raw{ocr[0].Raw(), ocr[1].Raw()}, + OCR2: ocr2_raw, + P2P: []p2pkey.Raw{p2p1.Raw(), p2p2.Raw()}, + Solana: []solkey.Raw{sol1.Raw(), sol2.Raw()}, + VRF: []vrfkey.Raw{vrf1.Raw(), vrf2.Raw()}, + Cosmos: []cosmoskey.Raw{tk1.Raw(), tk2.Raw()}, } originalKeyRing, kerr := originalKeyRingRaw.keys() require.NoError(t, kerr) @@ -109,14 +103,6 @@ func TestKeyRing_Encrypt_Decrypt(t *testing.T) { require.Equal(t, 2, len(decryptedKeyRing.VRF)) require.Equal(t, originalKeyRing.VRF[vrf1.ID()].PublicKey, decryptedKeyRing.VRF[vrf1.ID()].PublicKey) require.Equal(t, originalKeyRing.VRF[vrf2.ID()].PublicKey, decryptedKeyRing.VRF[vrf2.ID()].PublicKey) - // compare dkgsign keys - require.Equal(t, 2, len(decryptedKeyRing.DKGSign)) - require.Equal(t, originalKeyRing.DKGSign[dkgsign1.ID()].PublicKey, decryptedKeyRing.DKGSign[dkgsign1.ID()].PublicKey) - require.Equal(t, originalKeyRing.DKGSign[dkgsign2.ID()].PublicKey, decryptedKeyRing.DKGSign[dkgsign2.ID()].PublicKey) - // compare dkgencrypt keys - require.Equal(t, 2, len(decryptedKeyRing.DKGEncrypt)) - require.Equal(t, originalKeyRing.DKGEncrypt[dkgencrypt1.ID()].PublicKey, decryptedKeyRing.DKGEncrypt[dkgencrypt1.ID()].PublicKey) - require.Equal(t, originalKeyRing.DKGEncrypt[dkgencrypt2.ID()].PublicKey, decryptedKeyRing.DKGEncrypt[dkgencrypt2.ID()].PublicKey) }) t.Run("test legacy system", func(t *testing.T) { diff --git a/core/services/keystore/ocr.go b/core/services/keystore/ocr.go index 7cacbbfff97..6ef9bd2d637 100644 --- a/core/services/keystore/ocr.go +++ b/core/services/keystore/ocr.go @@ -9,8 +9,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocrkey" ) -//go:generate mockery --quiet --name OCR --output ./mocks/ --case=underscore - type OCR interface { Get(id string) (ocrkey.KeyV2, error) GetAll() ([]ocrkey.KeyV2, error) diff --git a/core/services/keystore/ocr2.go b/core/services/keystore/ocr2.go index 4edbe2ba741..bc95852a309 100644 --- a/core/services/keystore/ocr2.go +++ b/core/services/keystore/ocr2.go @@ -10,8 +10,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocr2key" ) -//go:generate mockery --quiet --name OCR2 --output mocks/ --case=underscore - type OCR2 interface { Get(id string) (ocr2key.KeyBundle, error) GetAll() ([]ocr2key.KeyBundle, error) diff --git a/core/services/keystore/p2p.go b/core/services/keystore/p2p.go index ee5bc647b5d..e4dc7b0ff39 100644 --- a/core/services/keystore/p2p.go +++ b/core/services/keystore/p2p.go @@ -11,8 +11,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" ) -//go:generate mockery --quiet --name P2P --output ./mocks/ --case=underscore --filename p2p.go - type P2P interface { Get(id p2pkey.PeerID) (p2pkey.KeyV2, error) GetAll() ([]p2pkey.KeyV2, error) diff --git a/core/services/keystore/solana.go b/core/services/keystore/solana.go index e95af37a7fa..5391ef6d2e7 100644 --- a/core/services/keystore/solana.go +++ b/core/services/keystore/solana.go @@ -6,11 +6,10 @@ import ( "github.com/pkg/errors" + "github.com/smartcontractkit/chainlink-common/pkg/loop" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/solkey" ) -//go:generate mockery --quiet --name Solana --output ./mocks/ --case=underscore --filename solana.go - type Solana interface { Get(id string) (solkey.Key, error) GetAll() ([]solkey.Key, error) @@ -28,6 +27,8 @@ type SolanaSigner struct { Solana } +var _ loop.Keystore = &SolanaSigner{} + func (s *SolanaSigner) Accounts(ctx context.Context) (accounts []string, err error) { ks, err := s.GetAll() if err != nil { diff --git a/core/services/keystore/starknet.go b/core/services/keystore/starknet.go index 19f8ccb7b3f..1aa213b86e9 100644 --- a/core/services/keystore/starknet.go +++ b/core/services/keystore/starknet.go @@ -14,7 +14,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/starkkey" ) -//go:generate mockery --quiet --name StarkNet --output ./mocks/ --case=underscore --filename starknet.go type StarkNet interface { Get(id string) (starkkey.Key, error) GetAll() ([]starkkey.Key, error) diff --git a/core/services/keystore/vrf.go b/core/services/keystore/vrf.go index 7b222e193d1..bb8a56aec2a 100644 --- a/core/services/keystore/vrf.go +++ b/core/services/keystore/vrf.go @@ -10,8 +10,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/vrfkey" ) -//go:generate mockery --quiet --name VRF --output ./mocks/ --case=underscore --filename vrf.go - type VRF interface { Get(id string) (vrfkey.KeyV2, error) GetAll() ([]vrfkey.KeyV2, error) diff --git a/core/services/llo/bm/dummy_transmitter.go b/core/services/llo/bm/dummy_transmitter.go index b998c19cb29..a0adf5e477a 100644 --- a/core/services/llo/bm/dummy_transmitter.go +++ b/core/services/llo/bm/dummy_transmitter.go @@ -2,8 +2,6 @@ package bm import ( "context" - "crypto/ed25519" - "fmt" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" @@ -12,6 +10,8 @@ import ( "github.com/smartcontractkit/libocr/offchainreporting2plus/types" ocr2types "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + "github.com/smartcontractkit/chainlink-data-streams/llo" + "github.com/smartcontractkit/chainlink-common/pkg/services" llotypes "github.com/smartcontractkit/chainlink-common/pkg/types/llo" @@ -37,10 +37,10 @@ type transmitter struct { fromAccount string } -func NewTransmitter(lggr logger.Logger, fromAccount ed25519.PublicKey) Transmitter { +func NewTransmitter(lggr logger.Logger, fromAccount string) Transmitter { return &transmitter{ lggr.Named("DummyTransmitter"), - fmt.Sprintf("%x", fromAccount), + fromAccount, } } @@ -59,8 +59,26 @@ func (t *transmitter) Transmit( report ocr3types.ReportWithInfo[llotypes.ReportInfo], sigs []types.AttributedOnchainSignature, ) error { + lggr := t.lggr + switch report.Info.ReportFormat { + case llotypes.ReportFormatJSON: + r, err := (llo.JSONReportCodec{}).Decode(report.Report) + if err != nil { + lggr.Debugw("Failed to decode JSON report", "err", err) + } + lggr = lggr.With( + "report.Report.ConfigDigest", r.ConfigDigest, + "report.Report.ChainSelector", r.ChainSelector, + "report.Report.SeqNr", r.SeqNr, + "report.Report.ChannelID", r.ChannelID, + "report.Report.ValidAfterSeconds", r.ValidAfterSeconds, + "report.Report.ValidUntilSeconds", r.ValidUntilSeconds, + "report.Report.Values", r.Values, + "report.Report.Specimen", r.Specimen, + ) + } transmitSuccessCount.Inc() - t.lggr.Debugw("Transmit", "digest", digest, "seqNr", seqNr, "report.Report", report.Report, "report.Info", report.Info, "sigs", sigs) + lggr.Infow("Transmit (dummy)", "digest", digest, "seqNr", seqNr, "report.Report", report.Report, "report.Info", report.Info, "sigs", sigs) return nil } diff --git a/core/services/llo/bm/dummy_transmitter_test.go b/core/services/llo/bm/dummy_transmitter_test.go index 055b150ad13..e6c59e2f9e9 100644 --- a/core/services/llo/bm/dummy_transmitter_test.go +++ b/core/services/llo/bm/dummy_transmitter_test.go @@ -1,7 +1,6 @@ package bm import ( - "crypto/ed25519" "testing" "github.com/stretchr/testify/require" @@ -19,7 +18,7 @@ import ( func Test_DummyTransmitter(t *testing.T) { lggr, observedLogs := logger.TestLoggerObserved(t, zapcore.DebugLevel) - tr := NewTransmitter(lggr, ed25519.PublicKey("dummy")) + tr := NewTransmitter(lggr, "dummy") servicetest.Run(t, tr) diff --git a/core/services/llo/data_source.go b/core/services/llo/data_source.go index a9c3744f9e3..596f3a884a9 100644 --- a/core/services/llo/data_source.go +++ b/core/services/llo/data_source.go @@ -4,15 +4,18 @@ import ( "context" "fmt" "math/big" + "sort" "sync" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" + "golang.org/x/exp/maps" llotypes "github.com/smartcontractkit/chainlink-common/pkg/types/llo" "github.com/smartcontractkit/chainlink-data-streams/llo" "github.com/smartcontractkit/chainlink/v2/core/logger" + "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" "github.com/smartcontractkit/chainlink/v2/core/services/streams" ) @@ -31,16 +34,35 @@ var ( ) ) -type ErrMissingStream struct { - id string -} - type Registry interface { Get(streamID streams.StreamID) (strm streams.Stream, exists bool) } -func (e ErrMissingStream) Error() string { - return fmt.Sprintf("missing stream definition for: %q", e.id) +type ErrObservationFailed struct { + inner error + reason string + streamID streams.StreamID + run *pipeline.Run +} + +func (e *ErrObservationFailed) Error() string { + s := fmt.Sprintf("StreamID: %d; Reason: %s", e.streamID, e.reason) + if e.inner != nil { + s += fmt.Sprintf("; Err: %v", e.inner) + } + if e.run != nil { + // NOTE: Could log more info about the run here if necessary + s += fmt.Sprintf("; RunID: %d; RunErrors: %v", e.run.ID, e.run.AllErrors) + } + return s +} + +func (e *ErrObservationFailed) String() string { + return e.Error() +} + +func (e *ErrObservationFailed) Unwrap() error { + return e.inner } var _ llo.DataSource = &dataSource{} @@ -54,50 +76,86 @@ func newDataSource(lggr logger.Logger, registry Registry) llo.DataSource { return &dataSource{lggr.Named("DataSource"), registry} } -// Observe looks up all streams in the registry and returns a map of stream ID => value -func (d *dataSource) Observe(ctx context.Context, streamIDs map[llotypes.StreamID]struct{}) (llo.StreamValues, error) { +// Observe looks up all streams in the registry and populates a map of stream ID => value +func (d *dataSource) Observe(ctx context.Context, streamValues llo.StreamValues, opts llo.DSOpts) error { var wg sync.WaitGroup - wg.Add(len(streamIDs)) - sv := make(llo.StreamValues) - var mu sync.Mutex + wg.Add(len(streamValues)) + var svmu sync.Mutex + var errors []ErrObservationFailed + var errmu sync.Mutex + + if opts.VerboseLogging() { + streamIDs := make([]streams.StreamID, 0, len(streamValues)) + for streamID := range streamValues { + streamIDs = append(streamIDs, streamID) + } + sort.Slice(streamIDs, func(i, j int) bool { return streamIDs[i] < streamIDs[j] }) + d.lggr.Debugw("Observing streams", "streamIDs", streamIDs, "seqNr", opts.SeqNr()) + } - for streamID := range streamIDs { + for _, streamID := range maps.Keys(streamValues) { go func(streamID llotypes.StreamID) { defer wg.Done() - var res llo.ObsResult[*big.Int] + var val *big.Int stream, exists := d.registry.Get(streamID) - if exists { - run, trrs, err := stream.Run(ctx) - if err != nil { - var runID int64 - if run != nil { - runID = run.ID - } - d.lggr.Debugw("Observation failed for stream", "err", err, "streamID", streamID, "runID", runID) - promObservationErrorCount.WithLabelValues(fmt.Sprintf("%d", streamID)).Inc() - } else { - // TODO: support types other than *big.Int - // https://smartcontract-it.atlassian.net/browse/MERC-3525 - val, err := streams.ExtractBigInt(trrs) - if err == nil { - res.Val = val - res.Valid = true - } - } - } else { - d.lggr.Errorw(fmt.Sprintf("Missing stream: %q", streamID), "streamID", streamID) + if !exists { + errmu.Lock() + errors = append(errors, ErrObservationFailed{streamID: streamID, reason: fmt.Sprintf("missing stream: %d", streamID)}) + errmu.Unlock() promMissingStreamCount.WithLabelValues(fmt.Sprintf("%d", streamID)).Inc() + return + } + run, trrs, err := stream.Run(ctx) + if err != nil { + errmu.Lock() + errors = append(errors, ErrObservationFailed{inner: err, run: run, streamID: streamID, reason: "pipeline run failed"}) + errmu.Unlock() + promObservationErrorCount.WithLabelValues(fmt.Sprintf("%d", streamID)).Inc() + return + } + // TODO: support types other than *big.Int + // https://smartcontract-it.atlassian.net/browse/MERC-3525 + val, err = streams.ExtractBigInt(trrs) + if err != nil { + errmu.Lock() + errors = append(errors, ErrObservationFailed{inner: err, run: run, streamID: streamID, reason: "failed to extract big.Int"}) + errmu.Unlock() + return } - mu.Lock() - defer mu.Unlock() - sv[streamID] = res + if val != nil { + svmu.Lock() + defer svmu.Unlock() + streamValues[streamID] = val + } }(streamID) } wg.Wait() - return sv, nil + // Failed observations are always logged at warn level + var failedStreamIDs []streams.StreamID + if len(errors) > 0 { + sort.Slice(errors, func(i, j int) bool { return errors[i].streamID < errors[j].streamID }) + failedStreamIDs = make([]streams.StreamID, len(errors)) + for i, e := range errors { + failedStreamIDs[i] = e.streamID + } + d.lggr.Warnw("Observation failed for streams", "failedStreamIDs", failedStreamIDs, "errors", errors, "seqNr", opts.SeqNr()) + } + + if opts.VerboseLogging() { + successes := make([]streams.StreamID, 0, len(streamValues)) + for strmID, res := range streamValues { + if res != nil { + successes = append(successes, strmID) + } + } + sort.Slice(successes, func(i, j int) bool { return successes[i] < successes[j] }) + d.lggr.Debugw("Observation complete", "successfulStreamIDs", successes, "failedStreamIDs", failedStreamIDs, "values", streamValues, "seqNr", opts.SeqNr()) + } + + return nil } diff --git a/core/services/llo/data_source_test.go b/core/services/llo/data_source_test.go index c956e3770c9..a975468c933 100644 --- a/core/services/llo/data_source_test.go +++ b/core/services/llo/data_source_test.go @@ -41,40 +41,46 @@ func makeStreamWithSingleResult[T any](res T, err error) *mockStream { } } +func makeStreamValues() llo.StreamValues { + return llo.StreamValues{ + 1: nil, + 2: nil, + 3: nil, + } +} + +type mockOpts struct{} + +func (m mockOpts) VerboseLogging() bool { return true } +func (m mockOpts) SeqNr() uint64 { return 42 } + func Test_DataSource(t *testing.T) { lggr := logger.TestLogger(t) reg := &mockRegistry{make(map[streams.StreamID]*mockStream)} ds := newDataSource(lggr, reg) ctx := testutils.Context(t) - streamIDs := make(map[streams.StreamID]struct{}) - streamIDs[streams.StreamID(1)] = struct{}{} - streamIDs[streams.StreamID(2)] = struct{}{} - streamIDs[streams.StreamID(3)] = struct{}{} - t.Run("Observe", func(t *testing.T) { - t.Run("returns errors if no streams are defined", func(t *testing.T) { - vals, err := ds.Observe(ctx, streamIDs) + t.Run("doesn't set any values if no streams are defined", func(t *testing.T) { + vals := makeStreamValues() + err := ds.Observe(ctx, vals, mockOpts{}) assert.NoError(t, err) - assert.Equal(t, llo.StreamValues{ - 2: llo.ObsResult[*big.Int]{Val: nil, Valid: false}, - 1: llo.ObsResult[*big.Int]{Val: nil, Valid: false}, - 3: llo.ObsResult[*big.Int]{Val: nil, Valid: false}, - }, vals) + assert.Equal(t, makeStreamValues(), vals) }) t.Run("observes each stream with success and returns values matching map argument", func(t *testing.T) { reg.streams[1] = makeStreamWithSingleResult[*big.Int](big.NewInt(2181), nil) reg.streams[2] = makeStreamWithSingleResult[*big.Int](big.NewInt(40602), nil) reg.streams[3] = makeStreamWithSingleResult[*big.Int](big.NewInt(15), nil) - vals, err := ds.Observe(ctx, streamIDs) + vals := makeStreamValues() + err := ds.Observe(ctx, vals, mockOpts{}) assert.NoError(t, err) assert.Equal(t, llo.StreamValues{ - 2: llo.ObsResult[*big.Int]{Val: big.NewInt(40602), Valid: true}, - 1: llo.ObsResult[*big.Int]{Val: big.NewInt(2181), Valid: true}, - 3: llo.ObsResult[*big.Int]{Val: big.NewInt(15), Valid: true}, + 2: big.NewInt(40602), + 1: big.NewInt(2181), + 3: big.NewInt(15), }, vals) }) t.Run("observes each stream and returns success/errors", func(t *testing.T) { @@ -82,13 +88,14 @@ func Test_DataSource(t *testing.T) { reg.streams[2] = makeStreamWithSingleResult[*big.Int](big.NewInt(40602), nil) reg.streams[3] = makeStreamWithSingleResult[*big.Int](nil, errors.New("something exploded 2")) - vals, err := ds.Observe(ctx, streamIDs) + vals := makeStreamValues() + err := ds.Observe(ctx, vals, mockOpts{}) assert.NoError(t, err) assert.Equal(t, llo.StreamValues{ - 2: llo.ObsResult[*big.Int]{Val: big.NewInt(40602), Valid: true}, - 1: llo.ObsResult[*big.Int]{Val: nil, Valid: false}, - 3: llo.ObsResult[*big.Int]{Val: nil, Valid: false}, + 2: big.NewInt(40602), + 1: nil, + 3: nil, }, vals) }) }) diff --git a/core/services/llo/delegate.go b/core/services/llo/delegate.go index 6cdad6290fc..fcb379d1fbc 100644 --- a/core/services/llo/delegate.go +++ b/core/services/llo/delegate.go @@ -51,6 +51,7 @@ type DelegateConfig struct { // LLO ChannelDefinitionCache llotypes.ChannelDefinitionCache + ReportingPluginConfig llo.Config // OCR3 BinaryNetworkEndpointFactory ocr2types.BinaryNetworkEndpointFactory @@ -107,7 +108,7 @@ func (d *delegate) Start(ctx context.Context) error { OffchainKeyring: d.cfg.OffchainKeyring, OnchainKeyring: d.cfg.OnchainKeyring, ReportingPluginFactory: llo.NewPluginFactory( - d.prrc, d.src, d.cfg.ChannelDefinitionCache, d.ds, d.cfg.Logger.Named("LLOReportingPlugin"), d.codecs, + d.cfg.ReportingPluginConfig, d.prrc, d.src, d.cfg.ChannelDefinitionCache, d.ds, d.cfg.Logger.Named("LLOReportingPlugin"), d.codecs, ), MetricsRegisterer: prometheus.WrapRegistererWith(map[string]string{"job_name": d.cfg.JobName.ValueOrZero()}, prometheus.DefaultRegisterer), }) diff --git a/core/services/llo/onchain_channel_definition_cache.go b/core/services/llo/onchain_channel_definition_cache.go index d72079d0b1e..5c89561481a 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/utils" ) type ChannelDefinitionCacheORM interface { @@ -114,7 +113,8 @@ const pollInterval = 1 * time.Second func (c *channelDefinitionCache) poll() { defer c.wg.Done() - pollT := time.NewTicker(utils.WithJitter(pollInterval)) + pollT := services.NewTicker(pollInterval) + defer pollT.Stop() for { select { diff --git a/core/services/llo/onchain_config.go b/core/services/llo/onchain_config.go new file mode 100644 index 00000000000..7b5cfffaa9f --- /dev/null +++ b/core/services/llo/onchain_config.go @@ -0,0 +1,21 @@ +package llo + +type OnchainConfig struct{} + +type OnchainConfigCodec interface { + Encode(OnchainConfig) ([]byte, error) + Decode([]byte) (OnchainConfig, error) +} + +var _ OnchainConfigCodec = &JSONOnchainConfigCodec{} + +// TODO: Replace this with protobuf, if it is actually used for something +type JSONOnchainConfigCodec struct{} + +func (c *JSONOnchainConfigCodec) Encode(OnchainConfig) ([]byte, error) { + return nil, nil +} + +func (c *JSONOnchainConfigCodec) Decode([]byte) (OnchainConfig, error) { + return OnchainConfig{}, nil +} diff --git a/core/services/llo/static_channel_definitions_cache.go b/core/services/llo/static_channel_definitions_cache.go index bf26dd781ee..98ef3642cb7 100644 --- a/core/services/llo/static_channel_definitions_cache.go +++ b/core/services/llo/static_channel_definitions_cache.go @@ -32,6 +32,7 @@ func NewStaticChannelDefinitionCache(lggr logger.Logger, dfnstr string) (llotype func (s *staticCDC) Start(context.Context) error { return s.StartOnce("StaticChannelDefinitionCache", func() error { + s.lggr.Infow("Initialized static channel definition cache", "definitions", s.definitions) return nil }) } diff --git a/core/services/mocks/checker.go b/core/services/mocks/checker.go index 09be8c23453..55ff97f764c 100644 --- a/core/services/mocks/checker.go +++ b/core/services/mocks/checker.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -12,6 +12,14 @@ type Checker struct { mock.Mock } +type Checker_Expecter struct { + mock *mock.Mock +} + +func (_m *Checker) EXPECT() *Checker_Expecter { + return &Checker_Expecter{mock: &_m.Mock} +} + // Close provides a mock function with given fields: func (_m *Checker) Close() error { ret := _m.Called() @@ -30,6 +38,33 @@ func (_m *Checker) Close() error { return r0 } +// Checker_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type Checker_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *Checker_Expecter) Close() *Checker_Close_Call { + return &Checker_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *Checker_Close_Call) Run(run func()) *Checker_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Checker_Close_Call) Return(_a0 error) *Checker_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Checker_Close_Call) RunAndReturn(run func() error) *Checker_Close_Call { + _c.Call.Return(run) + return _c +} + // IsHealthy provides a mock function with given fields: func (_m *Checker) IsHealthy() (bool, map[string]error) { ret := _m.Called() @@ -60,6 +95,33 @@ func (_m *Checker) IsHealthy() (bool, map[string]error) { return r0, r1 } +// Checker_IsHealthy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsHealthy' +type Checker_IsHealthy_Call struct { + *mock.Call +} + +// IsHealthy is a helper method to define mock.On call +func (_e *Checker_Expecter) IsHealthy() *Checker_IsHealthy_Call { + return &Checker_IsHealthy_Call{Call: _e.mock.On("IsHealthy")} +} + +func (_c *Checker_IsHealthy_Call) Run(run func()) *Checker_IsHealthy_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Checker_IsHealthy_Call) Return(healthy bool, errors map[string]error) *Checker_IsHealthy_Call { + _c.Call.Return(healthy, errors) + return _c +} + +func (_c *Checker_IsHealthy_Call) RunAndReturn(run func() (bool, map[string]error)) *Checker_IsHealthy_Call { + _c.Call.Return(run) + return _c +} + // IsReady provides a mock function with given fields: func (_m *Checker) IsReady() (bool, map[string]error) { ret := _m.Called() @@ -90,6 +152,33 @@ func (_m *Checker) IsReady() (bool, map[string]error) { return r0, r1 } +// Checker_IsReady_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsReady' +type Checker_IsReady_Call struct { + *mock.Call +} + +// IsReady is a helper method to define mock.On call +func (_e *Checker_Expecter) IsReady() *Checker_IsReady_Call { + return &Checker_IsReady_Call{Call: _e.mock.On("IsReady")} +} + +func (_c *Checker_IsReady_Call) Run(run func()) *Checker_IsReady_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Checker_IsReady_Call) Return(ready bool, errors map[string]error) *Checker_IsReady_Call { + _c.Call.Return(ready, errors) + return _c +} + +func (_c *Checker_IsReady_Call) RunAndReturn(run func() (bool, map[string]error)) *Checker_IsReady_Call { + _c.Call.Return(run) + return _c +} + // Register provides a mock function with given fields: service func (_m *Checker) Register(service pkgservices.HealthReporter) error { ret := _m.Called(service) @@ -108,6 +197,34 @@ func (_m *Checker) Register(service pkgservices.HealthReporter) error { return r0 } +// Checker_Register_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Register' +type Checker_Register_Call struct { + *mock.Call +} + +// Register is a helper method to define mock.On call +// - service pkgservices.HealthReporter +func (_e *Checker_Expecter) Register(service interface{}) *Checker_Register_Call { + return &Checker_Register_Call{Call: _e.mock.On("Register", service)} +} + +func (_c *Checker_Register_Call) Run(run func(service pkgservices.HealthReporter)) *Checker_Register_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(pkgservices.HealthReporter)) + }) + return _c +} + +func (_c *Checker_Register_Call) Return(_a0 error) *Checker_Register_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Checker_Register_Call) RunAndReturn(run func(pkgservices.HealthReporter) error) *Checker_Register_Call { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: func (_m *Checker) Start() error { ret := _m.Called() @@ -126,6 +243,33 @@ func (_m *Checker) Start() error { return r0 } +// Checker_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type Checker_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +func (_e *Checker_Expecter) Start() *Checker_Start_Call { + return &Checker_Start_Call{Call: _e.mock.On("Start")} +} + +func (_c *Checker_Start_Call) Run(run func()) *Checker_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Checker_Start_Call) Return(_a0 error) *Checker_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Checker_Start_Call) RunAndReturn(run func() error) *Checker_Start_Call { + _c.Call.Return(run) + return _c +} + // Unregister provides a mock function with given fields: name func (_m *Checker) Unregister(name string) error { ret := _m.Called(name) @@ -144,6 +288,34 @@ func (_m *Checker) Unregister(name string) error { return r0 } +// Checker_Unregister_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unregister' +type Checker_Unregister_Call struct { + *mock.Call +} + +// Unregister is a helper method to define mock.On call +// - name string +func (_e *Checker_Expecter) Unregister(name interface{}) *Checker_Unregister_Call { + return &Checker_Unregister_Call{Call: _e.mock.On("Unregister", name)} +} + +func (_c *Checker_Unregister_Call) Run(run func(name string)) *Checker_Unregister_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string)) + }) + return _c +} + +func (_c *Checker_Unregister_Call) Return(_a0 error) *Checker_Unregister_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Checker_Unregister_Call) RunAndReturn(run func(string) error) *Checker_Unregister_Call { + _c.Call.Return(run) + return _c +} + // NewChecker creates a new instance of Checker. 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 NewChecker(t interface { diff --git a/core/services/ocr/contract_tracker.go b/core/services/ocr/contract_tracker.go index 8da17908d11..11dfacd1d1a 100644 --- a/core/services/ocr/contract_tracker.go +++ b/core/services/ocr/contract_tracker.go @@ -47,7 +47,6 @@ var ( OCRContractLatestRoundRequested = getEventTopic("RoundRequested") ) -//go:generate mockery --quiet --name OCRContractTrackerDB --output ./mocks/ --case=underscore type ( // OCRContractTracker complies with ContractConfigTracker interface and // handles log events related to the contract more generally diff --git a/core/services/ocr/mocks/ocr_contract_tracker_db.go b/core/services/ocr/mocks/ocr_contract_tracker_db.go index d3dcce2641b..6fd94a8e59a 100644 --- a/core/services/ocr/mocks/ocr_contract_tracker_db.go +++ b/core/services/ocr/mocks/ocr_contract_tracker_db.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -18,6 +18,14 @@ type OCRContractTrackerDB struct { mock.Mock } +type OCRContractTrackerDB_Expecter struct { + mock *mock.Mock +} + +func (_m *OCRContractTrackerDB) EXPECT() *OCRContractTrackerDB_Expecter { + return &OCRContractTrackerDB_Expecter{mock: &_m.Mock} +} + // LoadLatestRoundRequested provides a mock function with given fields: ctx func (_m *OCRContractTrackerDB) LoadLatestRoundRequested(ctx context.Context) (offchainaggregator.OffchainAggregatorRoundRequested, error) { ret := _m.Called(ctx) @@ -46,6 +54,34 @@ func (_m *OCRContractTrackerDB) LoadLatestRoundRequested(ctx context.Context) (o return r0, r1 } +// OCRContractTrackerDB_LoadLatestRoundRequested_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadLatestRoundRequested' +type OCRContractTrackerDB_LoadLatestRoundRequested_Call struct { + *mock.Call +} + +// LoadLatestRoundRequested is a helper method to define mock.On call +// - ctx context.Context +func (_e *OCRContractTrackerDB_Expecter) LoadLatestRoundRequested(ctx interface{}) *OCRContractTrackerDB_LoadLatestRoundRequested_Call { + return &OCRContractTrackerDB_LoadLatestRoundRequested_Call{Call: _e.mock.On("LoadLatestRoundRequested", ctx)} +} + +func (_c *OCRContractTrackerDB_LoadLatestRoundRequested_Call) Run(run func(ctx context.Context)) *OCRContractTrackerDB_LoadLatestRoundRequested_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *OCRContractTrackerDB_LoadLatestRoundRequested_Call) Return(rr offchainaggregator.OffchainAggregatorRoundRequested, err error) *OCRContractTrackerDB_LoadLatestRoundRequested_Call { + _c.Call.Return(rr, err) + return _c +} + +func (_c *OCRContractTrackerDB_LoadLatestRoundRequested_Call) RunAndReturn(run func(context.Context) (offchainaggregator.OffchainAggregatorRoundRequested, error)) *OCRContractTrackerDB_LoadLatestRoundRequested_Call { + _c.Call.Return(run) + return _c +} + // SaveLatestRoundRequested provides a mock function with given fields: ctx, rr func (_m *OCRContractTrackerDB) SaveLatestRoundRequested(ctx context.Context, rr offchainaggregator.OffchainAggregatorRoundRequested) error { ret := _m.Called(ctx, rr) @@ -64,6 +100,35 @@ func (_m *OCRContractTrackerDB) SaveLatestRoundRequested(ctx context.Context, rr return r0 } +// OCRContractTrackerDB_SaveLatestRoundRequested_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveLatestRoundRequested' +type OCRContractTrackerDB_SaveLatestRoundRequested_Call struct { + *mock.Call +} + +// SaveLatestRoundRequested is a helper method to define mock.On call +// - ctx context.Context +// - rr offchainaggregator.OffchainAggregatorRoundRequested +func (_e *OCRContractTrackerDB_Expecter) SaveLatestRoundRequested(ctx interface{}, rr interface{}) *OCRContractTrackerDB_SaveLatestRoundRequested_Call { + return &OCRContractTrackerDB_SaveLatestRoundRequested_Call{Call: _e.mock.On("SaveLatestRoundRequested", ctx, rr)} +} + +func (_c *OCRContractTrackerDB_SaveLatestRoundRequested_Call) Run(run func(ctx context.Context, rr offchainaggregator.OffchainAggregatorRoundRequested)) *OCRContractTrackerDB_SaveLatestRoundRequested_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(offchainaggregator.OffchainAggregatorRoundRequested)) + }) + return _c +} + +func (_c *OCRContractTrackerDB_SaveLatestRoundRequested_Call) Return(_a0 error) *OCRContractTrackerDB_SaveLatestRoundRequested_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *OCRContractTrackerDB_SaveLatestRoundRequested_Call) RunAndReturn(run func(context.Context, offchainaggregator.OffchainAggregatorRoundRequested) error) *OCRContractTrackerDB_SaveLatestRoundRequested_Call { + _c.Call.Return(run) + return _c +} + // WithDataSource provides a mock function with given fields: _a0 func (_m *OCRContractTrackerDB) WithDataSource(_a0 sqlutil.DataSource) ocr.OCRContractTrackerDB { ret := _m.Called(_a0) @@ -84,6 +149,34 @@ func (_m *OCRContractTrackerDB) WithDataSource(_a0 sqlutil.DataSource) ocr.OCRCo return r0 } +// OCRContractTrackerDB_WithDataSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithDataSource' +type OCRContractTrackerDB_WithDataSource_Call struct { + *mock.Call +} + +// WithDataSource is a helper method to define mock.On call +// - _a0 sqlutil.DataSource +func (_e *OCRContractTrackerDB_Expecter) WithDataSource(_a0 interface{}) *OCRContractTrackerDB_WithDataSource_Call { + return &OCRContractTrackerDB_WithDataSource_Call{Call: _e.mock.On("WithDataSource", _a0)} +} + +func (_c *OCRContractTrackerDB_WithDataSource_Call) Run(run func(_a0 sqlutil.DataSource)) *OCRContractTrackerDB_WithDataSource_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(sqlutil.DataSource)) + }) + return _c +} + +func (_c *OCRContractTrackerDB_WithDataSource_Call) Return(_a0 ocr.OCRContractTrackerDB) *OCRContractTrackerDB_WithDataSource_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *OCRContractTrackerDB_WithDataSource_Call) RunAndReturn(run func(sqlutil.DataSource) ocr.OCRContractTrackerDB) *OCRContractTrackerDB_WithDataSource_Call { + _c.Call.Return(run) + return _c +} + // NewOCRContractTrackerDB creates a new instance of OCRContractTrackerDB. 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 NewOCRContractTrackerDB(t interface { diff --git a/core/services/ocr2/delegate.go b/core/services/ocr2/delegate.go index a1a1c41774f..a6843401aa7 100644 --- a/core/services/ocr2/delegate.go +++ b/core/services/ocr2/delegate.go @@ -35,10 +35,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/types/core" llotypes "github.com/smartcontractkit/chainlink-common/pkg/types/llo" "github.com/smartcontractkit/chainlink-common/pkg/utils/mailbox" - - "github.com/smartcontractkit/chainlink-vrf/altbn_128" - dkgpkg "github.com/smartcontractkit/chainlink-vrf/dkg" - "github.com/smartcontractkit/chainlink-vrf/ocr2vrf" + datastreamsllo "github.com/smartcontractkit/chainlink-data-streams/llo" "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm" @@ -50,8 +47,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/keystore/chaintype" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ocr2key" "github.com/smartcontractkit/chainlink/v2/core/services/llo" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/dkg" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/dkg/persistence" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/functions" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/generic" lloconfig "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/llo/config" @@ -61,12 +56,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/autotelemetry21" ocr2keeper21core "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" - ocr2vrfconfig "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2vrf/config" - ocr2coordinator "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2vrf/coordinator" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2vrf/juelsfeecoin" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2vrf/reasonablegasprice" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2vrf/reportserializer" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/promwrapper" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/validate" "github.com/smartcontractkit/chainlink/v2/core/services/ocrcommon" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" @@ -121,8 +110,6 @@ type Delegate struct { cfg DelegateConfig lggr logger.Logger ks keystore.OCR2 - dkgSignKs keystore.DKGSign - dkgEncryptKs keystore.DKGEncrypt ethKs keystore.Eth RelayGetter isNewlyCreatedJob bool // Set to true if this is a new job freshly added, false if job was present already on node boot. @@ -199,6 +186,7 @@ type mercuryConfig interface { Cache() coreconfig.MercuryCache TLS() coreconfig.MercuryTLS Transmitter() coreconfig.MercuryTransmitter + VerboseLogging() bool } type thresholdConfig interface { @@ -231,8 +219,6 @@ func NewDelegate( lggr logger.Logger, cfg DelegateConfig, ks keystore.OCR2, - dkgSignKs keystore.DKGSign, - dkgEncryptKs keystore.DKGEncrypt, ethKs keystore.Eth, relayers RelayGetter, mailMon *mailbox.Monitor, @@ -251,8 +237,6 @@ func NewDelegate( cfg: cfg, lggr: lggr.Named("OCR2"), ks: ks, - dkgSignKs: dkgSignKs, - dkgEncryptKs: dkgEncryptKs, ethKs: ethKs, RelayGetter: relayers, isNewlyCreatedJob: false, @@ -310,11 +294,6 @@ func (d *Delegate) cleanupEVM(ctx context.Context, jb job.Job, relayID types.Rel var filters []string switch spec.PluginType { - case types.OCR2VRF: - filters, err = ocr2coordinator.FilterNamesFromSpec(spec) - if err != nil { - d.lggr.Errorw("failed to derive ocr2vrf filter names from spec", "err", err, "spec", spec) - } case types.OCR2Keeper: // Not worth the effort to validate and parse the job spec config to figure out whether this is v2.0 or v2.1, // simpler and faster to just Unregister them both @@ -453,12 +432,6 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, jb job.Job) ([]job.Servi case types.Median: return d.newServicesMedian(ctx, lggr, jb, bootstrapPeers, kb, kvStore, ocrDB, lc) - case types.DKG: - return d.newServicesDKG(lggr, jb, bootstrapPeers, kb, ocrDB, lc) - - case types.OCR2VRF: - return d.newServicesOCR2VRF(ctx, lggr, jb, bootstrapPeers, kb, ocrDB, lc) - case types.OCR2Keeper: return d.newServicesOCR2Keepers(ctx, lggr, jb, bootstrapPeers, kb, ocrDB, lc) @@ -494,8 +467,8 @@ func GetEVMEffectiveTransmitterID(ctx context.Context, jb *job.Job, chain legacy if err != nil { return "", err } - if len(sendingKeys) > 1 && spec.PluginType != types.OCR2VRF { - return "", errors.New("only ocr2 vrf should have more than 1 sending key") + if len(sendingKeys) > 1 { + return "", errors.New("no plugin should have more than 1 sending key") } spec.TransmitterID = null.StringFrom(sendingKeys[0]) } @@ -802,7 +775,7 @@ func (d *Delegate) newServicesMercury( return nil, ErrJobSpecNoRelayer{Err: err, PluginName: "mercury"} } if rid.Network != relay.NetworkEVM { - return nil, fmt.Errorf("mercury services: expected EVM relayer got %s", rid.Network) + return nil, fmt.Errorf("mercury services: expected EVM relayer got %q", rid.Network) } relayer, err := d.RelayGetter.Get(rid) if err != nil { @@ -895,9 +868,6 @@ func (d *Delegate) newServicesLLO( if err != nil { return nil, ErrJobSpecNoRelayer{Err: err, PluginName: "streams"} } - if rid.Network != relay.NetworkEVM { - return nil, fmt.Errorf("streams services: expected EVM relayer got %s", rid.Network) - } relayer, err := d.RelayGetter.Get(rid) if err != nil { return nil, ErrRelayNotEnabled{Err: err, Relay: spec.Relay, PluginName: "streams"} @@ -998,6 +968,9 @@ func (d *Delegate) newServicesLLO( OffchainKeyring: kb, OnchainKeyring: kr, OCRLogger: ocrLogger, + + // Enable verbose logging if either Mercury.VerboseLogging is on or OCR2.TraceLogging is on + ReportingPluginConfig: datastreamsllo.Config{VerboseLogging: d.cfg.Mercury().VerboseLogging() || d.cfg.OCR2().TraceLogging()}, } oracle, err := llo.NewDelegate(cfg) if err != nil { @@ -1065,245 +1038,6 @@ func (d *Delegate) newServicesMedian( return medianServices, err2 } -func (d *Delegate) newServicesDKG( - lggr logger.SugaredLogger, - jb job.Job, - bootstrapPeers []commontypes.BootstrapperLocator, - kb ocr2key.KeyBundle, - ocrDB *db, - lc ocrtypes.LocalConfig, -) ([]job.ServiceCtx, error) { - spec := jb.OCR2OracleSpec - rid, err := spec.RelayID() - if err != nil { - return nil, ErrJobSpecNoRelayer{Err: err, PluginName: "DKG"} - } - if rid.Network != relay.NetworkEVM { - return nil, fmt.Errorf("DKG services: expected EVM relayer got %s", rid.Network) - } - - chain, err2 := d.legacyChains.Get(rid.ChainID) - if err2 != nil { - return nil, fmt.Errorf("DKG services: failed to get chain %s: %w", rid.ChainID, err2) - } - ocr2vrfRelayer := evmrelay.NewOCR2VRFRelayer(chain, lggr.Named("OCR2VRFRelayer"), d.ethKs) - dkgProvider, err2 := ocr2vrfRelayer.NewDKGProvider( - types.RelayArgs{ - ExternalJobID: jb.ExternalJobID, - JobID: jb.ID, - ContractID: spec.ContractID, - New: d.isNewlyCreatedJob, - RelayConfig: spec.RelayConfig.Bytes(), - }, types.PluginArgs{ - TransmitterID: spec.TransmitterID.String, - PluginConfig: spec.PluginConfig.Bytes(), - }) - if err2 != nil { - return nil, err2 - } - ocrLogger := ocrcommon.NewOCRWrapper(lggr, d.cfg.OCR2().TraceLogging(), func(ctx context.Context, msg string) { - lggr.ErrorIf(d.jobORM.RecordError(ctx, jb.ID, msg), "unable to record error") - }) - noopMonitoringEndpoint := telemetry.NoopAgent{} - oracleArgsNoPlugin := libocr2.OCR2OracleArgs{ - BinaryNetworkEndpointFactory: d.peerWrapper.Peer2, - V2Bootstrappers: bootstrapPeers, - ContractTransmitter: dkgProvider.ContractTransmitter(), - ContractConfigTracker: dkgProvider.ContractConfigTracker(), - Database: ocrDB, - LocalConfig: lc, - Logger: ocrLogger, - // Telemetry ingress for DKG is currently not supported so a noop monitoring endpoint is being used - MonitoringEndpoint: &noopMonitoringEndpoint, - OffchainConfigDigester: dkgProvider.OffchainConfigDigester(), - OffchainKeyring: kb, - OnchainKeyring: kb, - MetricsRegisterer: prometheus.WrapRegistererWith(map[string]string{"job_name": jb.Name.ValueOrZero()}, prometheus.DefaultRegisterer), - } - services, err := dkg.NewDKGServices(jb, dkgProvider, lggr, ocrLogger, d.dkgSignKs, d.dkgEncryptKs, chain.Client(), oracleArgsNoPlugin, d.ds, chain.ID(), spec.Relay) - if err != nil { - return nil, err - } - services = append(services, ocrLogger) - return services, nil -} - -func (d *Delegate) newServicesOCR2VRF( - ctx context.Context, - lggr logger.SugaredLogger, - jb job.Job, - bootstrapPeers []commontypes.BootstrapperLocator, - kb ocr2key.KeyBundle, - ocrDB *db, - lc ocrtypes.LocalConfig, -) ([]job.ServiceCtx, error) { - spec := jb.OCR2OracleSpec - - rid, err := spec.RelayID() - if err != nil { - return nil, ErrJobSpecNoRelayer{Err: err, PluginName: "VRF"} - } - if rid.Network != relay.NetworkEVM { - return nil, fmt.Errorf("VRF services: expected EVM relayer got %s", rid.Network) - } - chain, err2 := d.legacyChains.Get(rid.ChainID) - if err2 != nil { - return nil, fmt.Errorf("VRF services: failed to get chain (%s): %w", rid.ChainID, err2) - } - if jb.ForwardingAllowed != chain.Config().EVM().Transactions().ForwardersEnabled() { - return nil, errors.New("transaction forwarding settings must be consistent for ocr2vrf") - } - - var cfg ocr2vrfconfig.PluginConfig - err2 = json.Unmarshal(spec.PluginConfig.Bytes(), &cfg) - if err2 != nil { - return nil, errors.Wrap(err2, "unmarshal ocr2vrf plugin config") - } - - err2 = ocr2vrfconfig.ValidatePluginConfig(cfg, d.dkgSignKs, d.dkgEncryptKs) - if err2 != nil { - return nil, errors.Wrap(err2, "validate ocr2vrf plugin config") - } - - ocr2vrfRelayer := evmrelay.NewOCR2VRFRelayer(chain, lggr.Named("OCR2VRFRelayer"), d.ethKs) - transmitterID := spec.TransmitterID.String - - vrfProvider, err2 := ocr2vrfRelayer.NewOCR2VRFProvider( - types.RelayArgs{ - ExternalJobID: jb.ExternalJobID, - JobID: jb.ID, - ContractID: spec.ContractID, - New: d.isNewlyCreatedJob, - RelayConfig: spec.RelayConfig.Bytes(), - }, types.PluginArgs{ - TransmitterID: transmitterID, - PluginConfig: spec.PluginConfig.Bytes(), - }) - if err2 != nil { - return nil, errors.Wrap(err2, "new vrf provider") - } - - dkgProvider, err2 := ocr2vrfRelayer.NewDKGProvider( - types.RelayArgs{ - ExternalJobID: jb.ExternalJobID, - JobID: jb.ID, - ContractID: cfg.DKGContractAddress, - RelayConfig: spec.RelayConfig.Bytes(), - }, types.PluginArgs{ - TransmitterID: transmitterID, - PluginConfig: spec.PluginConfig.Bytes(), - }) - if err2 != nil { - return nil, errors.Wrap(err2, "new dkg provider") - } - - dkgContract, err2 := dkg.NewOnchainDKGClient(cfg.DKGContractAddress, chain.Client()) - if err2 != nil { - return nil, errors.Wrap(err2, "new onchain dkg client") - } - - timeout := 5 * time.Second - interval := 60 * time.Second - juelsLogger := lggr.Named("JuelsFeeCoin").With("contract", cfg.LinkEthFeedAddress, "timeout", timeout, "interval", interval) - juelsPerFeeCoin, err2 := juelsfeecoin.NewLinkEthPriceProvider( - common.HexToAddress(cfg.LinkEthFeedAddress), chain.Client(), timeout, interval, juelsLogger) - if err2 != nil { - return nil, errors.Wrap(err2, "new link eth price provider") - } - - reasonableGasPrice := reasonablegasprice.NewReasonableGasPriceProvider( - chain.GasEstimator(), - timeout, - chain.Config().EVM().GasEstimator().PriceMax(), - chain.Config().EVM().GasEstimator().EIP1559DynamicFees(), - ) - - encryptionSecretKey, err2 := d.dkgEncryptKs.Get(cfg.DKGEncryptionPublicKey) - if err2 != nil { - return nil, errors.Wrap(err2, "get DKG encryption key") - } - signingSecretKey, err2 := d.dkgSignKs.Get(cfg.DKGSigningPublicKey) - if err2 != nil { - return nil, errors.Wrap(err2, "get DKG signing key") - } - keyID, err2 := dkg.DecodeKeyID(cfg.DKGKeyID) - if err2 != nil { - return nil, errors.Wrap(err2, "decode DKG key ID") - } - - coordinator, err2 := ocr2coordinator.New( - ctx, - lggr.Named("OCR2VRFCoordinator"), - common.HexToAddress(spec.ContractID), - common.HexToAddress(cfg.VRFCoordinatorAddress), - common.HexToAddress(cfg.DKGContractAddress), - chain.Client(), - chain.LogPoller(), - chain.Config().EVM().FinalityDepth(), - ) - if err2 != nil { - return nil, errors.Wrap(err2, "create ocr2vrf coordinator") - } - l := lggr.Named("OCR2VRF").With( - "jobName", jb.Name.ValueOrZero(), - "jobID", jb.ID, - ) - vrfLogger := ocrcommon.NewOCRWrapper(l.With("vrfContractID", spec.ContractID), d.cfg.OCR2().TraceLogging(), func(ctx context.Context, msg string) { - lggr.ErrorIf(d.jobORM.RecordError(ctx, jb.ID, msg), "unable to record error") - }) - dkgLogger := ocrcommon.NewOCRWrapper(l.With("dkgContractID", cfg.DKGContractAddress), d.cfg.OCR2().TraceLogging(), func(ctx context.Context, msg string) { - lggr.ErrorIf(d.jobORM.RecordError(ctx, jb.ID, msg), "unable to record error") - }) - dkgReportingPluginFactoryDecorator := func(wrapped ocrtypes.ReportingPluginFactory) ocrtypes.ReportingPluginFactory { - return promwrapper.NewPromFactory(wrapped, "DKG", string(relay.NetworkEVM), chain.ID()) - } - vrfReportingPluginFactoryDecorator := func(wrapped ocrtypes.ReportingPluginFactory) ocrtypes.ReportingPluginFactory { - return promwrapper.NewPromFactory(wrapped, "OCR2VRF", string(relay.NetworkEVM), chain.ID()) - } - noopMonitoringEndpoint := telemetry.NoopAgent{} - oracles, err2 := ocr2vrf.NewOCR2VRF(ocr2vrf.DKGVRFArgs{ - VRFLogger: vrfLogger, - DKGLogger: dkgLogger, - BinaryNetworkEndpointFactory: d.peerWrapper.Peer2, - V2Bootstrappers: bootstrapPeers, - OffchainKeyring: kb, - OnchainKeyring: kb, - VRFOffchainConfigDigester: vrfProvider.OffchainConfigDigester(), - VRFContractConfigTracker: vrfProvider.ContractConfigTracker(), - VRFContractTransmitter: vrfProvider.ContractTransmitter(), - VRFDatabase: ocrDB, - VRFLocalConfig: lc, - VRFMonitoringEndpoint: d.monitoringEndpointGen.GenMonitoringEndpoint(rid.Network, rid.ChainID, spec.ContractID, synchronization.OCR2VRF), - DKGContractConfigTracker: dkgProvider.ContractConfigTracker(), - DKGOffchainConfigDigester: dkgProvider.OffchainConfigDigester(), - DKGContract: dkgpkg.NewOnchainContract(dkgContract, &altbn_128.G2{}), - DKGContractTransmitter: dkgProvider.ContractTransmitter(), - DKGDatabase: ocrDB, - DKGLocalConfig: lc, - // Telemetry ingress for DKG is currently not supported so a noop monitoring endpoint is being used - DKGMonitoringEndpoint: &noopMonitoringEndpoint, - Serializer: reportserializer.NewReportSerializer(&altbn_128.G1{}), - JuelsPerFeeCoin: juelsPerFeeCoin, - ReasonableGasPrice: reasonableGasPrice, - Coordinator: coordinator, - Esk: encryptionSecretKey.KyberScalar(), - Ssk: signingSecretKey.KyberScalar(), - KeyID: keyID, - DKGReportingPluginFactoryDecorator: dkgReportingPluginFactoryDecorator, - VRFReportingPluginFactoryDecorator: vrfReportingPluginFactoryDecorator, - DKGSharePersistence: persistence.NewShareDB(d.ds, lggr.Named("DKGShareDB"), chain.ID(), spec.Relay), - }) - if err2 != nil { - return nil, errors.Wrap(err2, "new ocr2vrf") - } - - // NOTE: we return from here with the services because the OCR2VRF oracles are defined - // and exported from the ocr2vrf library. It takes care of running the DKG and OCR2VRF - // oracles under the hood together. - oracleCtx := job.NewServiceAdapter(oracles) - return []job.ServiceCtx{vrfProvider, dkgProvider, oracleCtx}, nil -} - func (d *Delegate) newServicesOCR2Keepers( ctx context.Context, lggr logger.SugaredLogger, @@ -1358,7 +1092,7 @@ func (d *Delegate) newServicesOCR2Keepers21( return nil, ErrJobSpecNoRelayer{Err: err, PluginName: "keeper2"} } if rid.Network != relay.NetworkEVM { - return nil, fmt.Errorf("keeper2 services: expected EVM relayer got %s", rid.Network) + return nil, fmt.Errorf("keeper2 services: expected EVM relayer got %q", rid.Network) } transmitterID := spec.TransmitterID.String @@ -1511,7 +1245,7 @@ func (d *Delegate) newServicesOCR2Keepers20( return nil, ErrJobSpecNoRelayer{Err: err, PluginName: "keepers2.0"} } if rid.Network != relay.NetworkEVM { - return nil, fmt.Errorf("keepers2.0 services: expected EVM relayer got %s", rid.Network) + return nil, fmt.Errorf("keepers2.0 services: expected EVM relayer got %q", rid.Network) } chain, err2 := d.legacyChains.Get(rid.ChainID) if err2 != nil { @@ -1639,7 +1373,7 @@ func (d *Delegate) newServicesOCR2Functions( return nil, ErrJobSpecNoRelayer{Err: err, PluginName: "functions"} } if rid.Network != relay.NetworkEVM { - return nil, fmt.Errorf("functions services: expected EVM relayer got %s", rid.Network) + return nil, fmt.Errorf("functions services: expected EVM relayer got %q", rid.Network) } chain, err := d.legacyChains.Get(rid.ChainID) if err != nil { diff --git a/core/services/ocr2/delegate_test.go b/core/services/ocr2/delegate_test.go index 1e4be66c7d1..9015928ade1 100644 --- a/core/services/ocr2/delegate_test.go +++ b/core/services/ocr2/delegate_test.go @@ -99,12 +99,6 @@ func TestGetEVMEffectiveTransmitterID(t *testing.T) { sendingKeys: []any{"0x7e57000000000000000000000000000000000001", "0x7e57000000000000000000000000000000000002", "0x7e57000000000000000000000000000000000003"}, expectedError: true, }, - { - name: "when transmitterID is not defined and plugin is ocr2vrf, it should allow>1 sendingKeys and set transmitterID to the first one", - pluginType: types.OCR2VRF, - sendingKeys: []any{"0x7e57000000000000000000000000000000000000", "0x7e57000000000000000000000000000000000001", "0x7e57000000000000000000000000000000000002"}, - expectedTransmitterID: "0x7e57000000000000000000000000000000000000", - }, { name: "when transmitterID is not defined, it should set transmitterID to first sendingKey", sendingKeys: []any{"0x7e57000000000000000000000000000000000004"}, @@ -117,23 +111,6 @@ func TestGetEVMEffectiveTransmitterID(t *testing.T) { getForwarderForEOAArg: common.HexToAddress("0x7e57000000000000000000000000000000000001"), expectedTransmitterID: "0x7e58000000000000000000000000000000000000", }, - { - name: "when forwarders are enabled and when transmitterID is not defined, it should use first sendingKey to retrieve forwarder address", - pluginType: types.OCR2VRF, - forwardingEnabled: true, - sendingKeys: []any{"0x7e57000000000000000000000000000000000001", "0x7e57000000000000000000000000000000000002"}, - getForwarderForEOAArg: common.HexToAddress("0x7e57000000000000000000000000000000000001"), - expectedTransmitterID: "0x7e58000000000000000000000000000000000000", - }, - { - name: "when forwarders are enabled but forwarder address fails to be retrieved and when transmitterID is not defined, it should default to using first sendingKey", - pluginType: types.OCR2VRF, - forwardingEnabled: true, - sendingKeys: []any{"0x7e57000000000000000000000000000000000001", "0x7e57000000000000000000000000000000000002"}, - getForwarderForEOAArg: common.HexToAddress("0x7e57000000000000000000000000000000000001"), - getForwarderForEOAErr: true, - expectedTransmitterID: "0x7e57000000000000000000000000000000000001", - }, { name: "when forwarders are enabled but forwarder address fails to be retrieved and when transmitterID is defined, it should default to using spec transmitterID", forwardingEnabled: true, diff --git a/core/services/ocr2/plugins/dkg/config/config.go b/core/services/ocr2/plugins/dkg/config/config.go deleted file mode 100644 index b848b9b3e2e..00000000000 --- a/core/services/ocr2/plugins/dkg/config/config.go +++ /dev/null @@ -1,28 +0,0 @@ -package config - -import ( - "github.com/pkg/errors" - - "github.com/smartcontractkit/chainlink/v2/core/services/keystore" -) - -// PluginConfig contains custom arguments for the DKG plugin. -type PluginConfig struct { - EncryptionPublicKey string `json:"encryptionPublicKey"` - SigningPublicKey string `json:"signingPublicKey"` - KeyID string `json:"keyID"` -} - -// ValidatePluginConfig validates that the given DKG plugin configuration is correct. -func ValidatePluginConfig(config PluginConfig, dkgSignKs keystore.DKGSign, dkgEncryptKs keystore.DKGEncrypt) error { - _, err := dkgEncryptKs.Get(config.EncryptionPublicKey) - if err != nil { - return errors.Wrapf(err, "DKG encryption key: %s not found in key store", config.EncryptionPublicKey) - } - _, err = dkgSignKs.Get(config.SigningPublicKey) - if err != nil { - return errors.Wrapf(err, "DKG sign key: %s not found in key store", config.SigningPublicKey) - } - - return nil -} diff --git a/core/services/ocr2/plugins/dkg/config/config_test.go b/core/services/ocr2/plugins/dkg/config/config_test.go deleted file mode 100644 index f8cc1265ee1..00000000000 --- a/core/services/ocr2/plugins/dkg/config/config_test.go +++ /dev/null @@ -1,64 +0,0 @@ -package config_test - -import ( - "encoding/hex" - "testing" - - "github.com/stretchr/testify/require" - - "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" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/dkg/config" -) - -func TestValidatePluginConfig(t *testing.T) { - t.Parallel() - ctx := testutils.Context(t) - - db := pgtest.NewSqlxDB(t) - kst := cltest.NewKeyStore(t, db) - - dkgEncryptKey, err := kst.DKGEncrypt().Create(ctx) - require.NoError(t, err) - dkgSignKey, err := kst.DKGSign().Create(ctx) - require.NoError(t, err) - - encryptKeyBytes, err := dkgEncryptKey.PublicKey.MarshalBinary() - require.NoError(t, err) - encryptKey := hex.EncodeToString(encryptKeyBytes) - - signKeyBytes, err := dkgSignKey.PublicKey.MarshalBinary() - require.NoError(t, err) - signKey := hex.EncodeToString(signKeyBytes) - - pluginConfig := config.PluginConfig{ - EncryptionPublicKey: encryptKey, - SigningPublicKey: signKey, - } - t.Run("no error when keys are found", func(t *testing.T) { - err = config.ValidatePluginConfig(pluginConfig, kst.DKGSign(), kst.DKGEncrypt()) - require.NoError(t, err) - }) - - t.Run("error when encryption key not found", func(t *testing.T) { - pluginConfig = config.PluginConfig{ - EncryptionPublicKey: "wrongKey", - SigningPublicKey: signKey, - } - err = config.ValidatePluginConfig(pluginConfig, kst.DKGSign(), kst.DKGEncrypt()) - require.Error(t, err) - require.Contains(t, err.Error(), "DKG encryption key: wrongKey not found in key store") - }) - - t.Run("error when sign key not found", func(t *testing.T) { - pluginConfig = config.PluginConfig{ - EncryptionPublicKey: encryptKey, - SigningPublicKey: "wrongKey", - } - - err = config.ValidatePluginConfig(pluginConfig, kst.DKGSign(), kst.DKGEncrypt()) - require.Error(t, err) - require.Contains(t, err.Error(), "DKG sign key: wrongKey not found in key store") - }) -} diff --git a/core/services/ocr2/plugins/dkg/key_consumer.go b/core/services/ocr2/plugins/dkg/key_consumer.go deleted file mode 100644 index 23ca7e795bf..00000000000 --- a/core/services/ocr2/plugins/dkg/key_consumer.go +++ /dev/null @@ -1,24 +0,0 @@ -package dkg - -import ( - "encoding/hex" - "fmt" - - "github.com/smartcontractkit/chainlink-vrf/dkg" -) - -type dummyKeyConsumer struct{} - -func (d dummyKeyConsumer) KeyInvalidated(keyID dkg.KeyID) { - fmt.Println("KEY INVALIDATED:", hex.EncodeToString(keyID[:])) -} - -func (d dummyKeyConsumer) NewKey(keyID dkg.KeyID, data *dkg.KeyData) { - fmt.Println("NEW KEY FOR KEY ID:", hex.EncodeToString(keyID[:]), "KEY:", data) -} - -var _ dkg.KeyConsumer = dummyKeyConsumer{} - -func newDummyKeyConsumer() dummyKeyConsumer { - return dummyKeyConsumer{} -} diff --git a/core/services/ocr2/plugins/dkg/onchain_contract.go b/core/services/ocr2/plugins/dkg/onchain_contract.go deleted file mode 100644 index c6ea84de235..00000000000 --- a/core/services/ocr2/plugins/dkg/onchain_contract.go +++ /dev/null @@ -1,90 +0,0 @@ -package dkg - -import ( - "context" - - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/pkg/errors" - "go.dedis.ch/kyber/v3/sign/anon" - - "github.com/smartcontractkit/chainlink-vrf/dkg" - dkgwrapper "github.com/smartcontractkit/chainlink-vrf/gethwrappers/dkg" - ocr2vrftypes "github.com/smartcontractkit/chainlink-vrf/types" - - evmclient "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" -) - -type onchainContract struct { - wrapper *dkgwrapper.DKG - dkgAddress common.Address -} - -var _ dkg.DKG = &onchainContract{} - -func NewOnchainDKGClient(dkgAddress string, ethClient evmclient.Client) (dkg.DKG, error) { - dkgAddr := common.HexToAddress(dkgAddress) - wrapper, err := dkgwrapper.NewDKG(dkgAddr, ethClient) - if err != nil { - return nil, errors.Wrap(err, "new dkg wrapper") - } - return &onchainContract{ - wrapper: wrapper, - dkgAddress: dkgAddr, - }, nil -} - -func (o *onchainContract) GetKey( - ctx context.Context, - keyID dkg.KeyID, - configDigest [32]byte, -) (dkg.OnchainKeyData, error) { - keyData, err := o.wrapper.GetKey(&bind.CallOpts{ - Context: ctx, - }, keyID, configDigest) - if err != nil { - return dkg.OnchainKeyData{}, errors.Wrap(err, "wrapper GetKey") - } - return dkg.OnchainKeyData{ - PublicKey: keyData.PublicKey, - Hashes: keyData.Hashes, - }, nil -} - -func (o *onchainContract) Address() common.Address { - return o.dkgAddress -} - -func (o *onchainContract) CurrentCommittee(ctx context.Context) (ocr2vrftypes.OCRCommittee, error) { - // NOTE: this is only ever used in tests in the ocr2vrf repo. - // Since this isn't really used for production DKG running, - // there's no point in implementing it. - panic("unimplemented") -} - -func (o *onchainContract) InitiateDKG( - ctx context.Context, - committee ocr2vrftypes.OCRCommittee, - f ocr2vrftypes.PlayerIdxInt, - keyID dkg.KeyID, - epks dkg.EncryptionPublicKeys, - spks dkg.SigningPublicKeys, - encGroup anon.Suite, - translator ocr2vrftypes.PubKeyTranslation, -) error { - // NOTE: this is only ever used in tests, the idea here is to call setConfig - // on the DKG contract to get the OCR process going. Since this isn't really - // used for production DKG running, there's no point in implementing it. - panic("unimplemented") -} - -func (o *onchainContract) AddClient( - ctx context.Context, - keyID [32]byte, - clientAddress common.Address, -) error { - // NOTE: this is only ever used in tests in the ocr2vrf repo. - // Since this isn't really used for production DKG running, - // there's no point in implementing it. - panic("unimplemented") -} diff --git a/core/services/ocr2/plugins/dkg/persistence/db.go b/core/services/ocr2/plugins/dkg/persistence/db.go deleted file mode 100644 index 07dad494ed7..00000000000 --- a/core/services/ocr2/plugins/dkg/persistence/db.go +++ /dev/null @@ -1,224 +0,0 @@ -package persistence - -import ( - "bytes" - "context" - "database/sql" - "fmt" - "math/big" - "time" - - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/jmoiron/sqlx" - "github.com/pkg/errors" - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/promauto" - - ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" - - "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" - ocr2vrftypes "github.com/smartcontractkit/chainlink-vrf/types" - "github.com/smartcontractkit/chainlink-vrf/types/hash" - - "github.com/smartcontractkit/chainlink/v2/core/logger" -) - -var ( - _ ocr2vrftypes.DKGSharePersistence = &shareDB{} - zeroHash hash.Hash - buckets = []float64{ - float64(100 * time.Millisecond), - float64(200 * time.Millisecond), - float64(500 * time.Millisecond), - float64(1 * time.Second), - float64(2 * time.Second), - float64(5 * time.Second), - float64(10 * time.Second), - float64(30 * time.Second), - } - labels = []string{ - "chainType", "chainID", - } - promWriteShareRecords = promauto.NewHistogramVec(prometheus.HistogramOpts{ - Name: "write_share_records_time", - Help: "The duration of the DKG WriteShareRecords call", - Buckets: buckets, - }, labels) - promReadShareRecords = promauto.NewHistogramVec(prometheus.HistogramOpts{ - Name: "read_share_records_time", - Help: "The duration of the DKG ReadShareRecords call.", - Buckets: buckets, - }, labels) -) - -type shareDB struct { - ds sqlutil.DataSource - lggr logger.Logger - chainID *big.Int - chainType string -} - -// NewShareDB creates a new DKG share database. -func NewShareDB(ds sqlutil.DataSource, lggr logger.Logger, chainID *big.Int, chainType string) ocr2vrftypes.DKGSharePersistence { - return &shareDB{ - ds: ds, - lggr: lggr, - chainID: chainID, - chainType: chainType, - } -} - -// WriteShareRecords writes the provided (already encrypted) -// share records to the Chainlink database. -func (s *shareDB) WriteShareRecords( - ctx context.Context, - cfgDgst ocrtypes.ConfigDigest, - keyID [32]byte, - shareRecords []ocr2vrftypes.PersistentShareSetRecord, -) error { - lggr := s.lggr.With( - "configDigest", hexutil.Encode(cfgDgst[:]), - "keyID", hexutil.Encode(keyID[:])) - - start := time.Now() - defer func() { - duration := time.Since(start) - promWriteShareRecords.WithLabelValues(s.chainType, s.chainID.String()).Observe(float64(duration)) - // lggr.Debugw("Inserted DKG shares into DB", "duration", duration) // see ocr2vrf code for logs - }() - - var named []dkgShare - for _, record := range shareRecords { - if bytes.Equal(record.Hash[:], zeroHash[:]) { - // see ocr2vrf for logging - // lggr.Warnw("skipping record with zero hash", - // "player", record.Dealer.String(), - // "hash", hexutil.Encode(record.Hash[:]), - // ) - continue - } - - // XXX: this might be expensive, but is a good sanity check. - localHash := hash.GetHash(record.MarshaledShareRecord) - if !bytes.Equal(record.Hash[:], localHash[:]) { - return fmt.Errorf("local hash doesn't match given hash in record, expected: %x, got: %x", - localHash[:], record.Hash[:]) - } - - var h hash.Hash - if copied := copy(h[:], record.Hash[:]); copied != 32 { - return fmt.Errorf("wrong number of bytes copied in hash (dealer:%s) %x: %d", - record.Dealer.String(), record.Hash[:], copied) - } - - named = append(named, dkgShare{ - ConfigDigest: cfgDgst[:], - KeyID: keyID[:], - Dealer: record.Dealer.Marshal(), - MarshaledShareRecord: record.MarshaledShareRecord, - /* TODO/WTF: can't do "record.Hash[:]": this leads to store the last record's hash for all the records! */ - RecordHash: h[:], - }) - } - - if len(named) == 0 { - lggr.Infow("No valid share records to insert") - return nil - } - - // see ocr2vrf for logging - // lggr.Infow("Inserting DKG shares into DB", - // "shareHashes", shareHashes(shareRecords), - // "numRecords", len(shareRecords), - // "numNamed", len(named)) - - // Always upsert because we want the number of rows in the table to match - // the number of members of the committee. - _, err := s.ds.NamedExecContext(ctx, ` -INSERT INTO dkg_shares (config_digest, key_id, dealer, marshaled_share_record, record_hash) -VALUES (:config_digest, :key_id, :dealer, :marshaled_share_record, :record_hash) -ON CONFLICT ON CONSTRAINT dkg_shares_pkey -DO UPDATE SET marshaled_share_record = EXCLUDED.marshaled_share_record, record_hash = EXCLUDED.record_hash -`, named[:]) - return err -} - -// ReadShareRecords retrieves any share records in the database that correspond -// to the provided config digest and DKG key ID. -func (s *shareDB) ReadShareRecords( - cfgDgst ocrtypes.ConfigDigest, - keyID [32]byte, -) ( - retrievedShares []ocr2vrftypes.PersistentShareSetRecord, - err error, -) { - ctx := context.Background() //TODO https://smartcontract-it.atlassian.net/browse/BCF-2887 - lggr := s.lggr.With( - "configDigest", hexutil.Encode(cfgDgst[:]), - "keyID", hexutil.Encode(keyID[:])) - - start := time.Now() - defer func() { - duration := time.Since(start) - promReadShareRecords.WithLabelValues(s.chainType, s.chainID.String()).Observe(float64(duration)) - lggr.Debugw("Finished reading DKG shares from DB", "duration", duration) - }() - - a := map[string]any{ - "config_digest": cfgDgst[:], - "key_id": keyID[:], - } - query, args, err := sqlx.Named( - ` -SELECT * -FROM dkg_shares -WHERE config_digest = :config_digest - AND key_id = :key_id -`, a) - if err != nil { - return nil, errors.Wrap(err, "sqlx Named") - } - query = s.ds.Rebind(query) - var dkgShares []dkgShare - err = s.ds.SelectContext(ctx, &dkgShares, query, args...) - if errors.Is(err, sql.ErrNoRows) { - return nil, nil - } - if err != nil { - return nil, err - } - - for _, share := range dkgShares { - playerIdx, _, err := ocr2vrftypes.UnmarshalPlayerIdx(share.Dealer) - if err != nil { - return nil, errors.Wrapf(err, "unmarshalling %x", share.Dealer) - } - var h hash.Hash - if copied := copy(h[:], share.RecordHash); copied != 32 { - return nil, fmt.Errorf("wrong number of bytes copied in hash %x: %d", share.RecordHash, copied) - } - - // NOTE: no integrity check on share.MarshaledShareRecord - // because caller will do it anyways, so it'd be wasteful. - retrievedShares = append(retrievedShares, ocr2vrftypes.PersistentShareSetRecord{ - Dealer: *playerIdx, - MarshaledShareRecord: share.MarshaledShareRecord, - Hash: h, - }) - } - - lggr.Debugw("Read DKG shares from DB", - "shareRecords", shareHashes(retrievedShares), - "numRecords", len(dkgShares), - ) - - return retrievedShares, nil -} - -func shareHashes(shareRecords []ocr2vrftypes.PersistentShareSetRecord) []string { - r := make([]string, len(shareRecords)) - for i, record := range shareRecords { - r[i] = hexutil.Encode(record.Hash[:]) - } - return r -} diff --git a/core/services/ocr2/plugins/dkg/persistence/db_test.go b/core/services/ocr2/plugins/dkg/persistence/db_test.go deleted file mode 100644 index 06f1bf3583f..00000000000 --- a/core/services/ocr2/plugins/dkg/persistence/db_test.go +++ /dev/null @@ -1,183 +0,0 @@ -package persistence - -import ( - "fmt" - "math/big" - "testing" - - "github.com/ethereum/go-ethereum/crypto" - "github.com/jmoiron/sqlx" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - ocr2vrftypes "github.com/smartcontractkit/chainlink-vrf/types" - "github.com/smartcontractkit/chainlink-vrf/types/hash" - - "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" - "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" - "github.com/smartcontractkit/chainlink/v2/core/logger" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" -) - -func setup(t testing.TB) (ocr2vrftypes.DKGSharePersistence, *sqlx.DB) { - db := pgtest.NewSqlxDB(t) - lggr := logger.TestLogger(t) - return NewShareDB(db, lggr, big.NewInt(1337), relay.NetworkEVM), db -} - -func TestShareDB_WriteShareRecords(t *testing.T) { - configDigest := testutils.Random32Byte() - keyID := testutils.Random32Byte() - - t.Run("valid input", func(tt *testing.T) { - shareDB, db := setup(tt) - var expectedRecords []ocr2vrftypes.PersistentShareSetRecord - - // Starting from 1 because player indexes must not be 0 - for i := 1; i < 4; i++ { - b := ocr2vrftypes.RawMarshalPlayerIdxInt(ocr2vrftypes.PlayerIdxInt(i)) - playerIdx, _, err := ocr2vrftypes.UnmarshalPlayerIdx(b) - require.NoError(t, err) - shareRecord := crypto.Keccak256Hash([]byte(fmt.Sprintf("%d", i))) - shareRecordHash := hash.GetHash(shareRecord[:]) - var h hash.Hash - copy(h[:], shareRecordHash[:]) - rec := ocr2vrftypes.PersistentShareSetRecord{ - Dealer: *playerIdx, - MarshaledShareRecord: shareRecord[:], - Hash: h, - } - expectedRecords = append(expectedRecords, rec) - } - - err := shareDB.WriteShareRecords(testutils.Context(t), configDigest, keyID, expectedRecords) - require.NoError(tt, err) - - rows, err := db.Query(`SELECT COUNT(*) AS count FROM dkg_shares`) - require.NoError(tt, err) - t.Cleanup(func() { assert.NoError(t, rows.Close()) }) - - var count int - for rows.Next() { - require.NoError(tt, rows.Scan(&count)) - } - require.NoError(tt, rows.Err()) - - require.Equal(tt, 3, count) - }) - - t.Run("bad input, zero hash", func(tt *testing.T) { - shareDB, db := setup(tt) - b := ocr2vrftypes.RawMarshalPlayerIdxInt(ocr2vrftypes.PlayerIdxInt(1)) - dealer, _, err := ocr2vrftypes.UnmarshalPlayerIdx(b) - require.NoError(tt, err) - records := []ocr2vrftypes.PersistentShareSetRecord{ - { - Dealer: *dealer, - MarshaledShareRecord: []byte{1}, - Hash: hash.Hash{}, // There's a problem here - }, - } - - // no error, but there will be no rows inserted in the db - err = shareDB.WriteShareRecords(testutils.Context(t), configDigest, keyID, records) - require.NoError(tt, err) - - rows, err := db.Query(`SELECT COUNT(*) AS count FROM dkg_shares`) - require.NoError(tt, err) - t.Cleanup(func() { assert.NoError(t, rows.Close()) }) - - var count int - for rows.Next() { - require.NoError(tt, rows.Scan(&count)) - } - require.NoError(tt, rows.Err()) - - require.Equal(tt, 0, count) - }) - - t.Run("bad input, nonmatching hash", func(tt *testing.T) { - shareDB, db := setup(tt) - var records []ocr2vrftypes.PersistentShareSetRecord - - // Starting from 1 because player indexes must not be 0 - for i := 1; i < 4; i++ { - b := ocr2vrftypes.RawMarshalPlayerIdxInt(ocr2vrftypes.PlayerIdxInt(i)) - playerIdx, _, err := ocr2vrftypes.UnmarshalPlayerIdx(b) - require.NoError(t, err) - shareRecord := crypto.Keccak256Hash([]byte(fmt.Sprintf("%d", i))) - // Expected hash is SHA256, not Keccak256. - shareRecordHash := crypto.Keccak256Hash(shareRecord[:]) - var h hash.Hash - copy(h[:], shareRecordHash[:]) - rec := ocr2vrftypes.PersistentShareSetRecord{ - Dealer: *playerIdx, - MarshaledShareRecord: shareRecord[:], - Hash: h, - } - records = append(records, rec) - } - - err := shareDB.WriteShareRecords(testutils.Context(t), configDigest, keyID, records) - require.Error(tt, err) - - // no rows should have been inserted - rows, err := db.Query(`SELECT COUNT(*) AS count FROM dkg_shares`) - require.NoError(tt, err) - t.Cleanup(func() { assert.NoError(t, rows.Close()) }) - - var count int - for rows.Next() { - require.NoError(tt, rows.Scan(&count)) - } - require.NoError(tt, rows.Err()) - - require.Equal(tt, 0, count) - }) -} - -func TestShareDBE2E(t *testing.T) { - shareDB, _ := setup(t) - - // create some fake data to insert and retrieve - configDigest := testutils.Random32Byte() - keyID := testutils.Random32Byte() - var expectedRecords []ocr2vrftypes.PersistentShareSetRecord - expectedRecordsMap := make(map[ocr2vrftypes.PlayerIdx]ocr2vrftypes.PersistentShareSetRecord) - - // Starting from 1 because player indexes must not be 0 - for i := 1; i < 4; i++ { - b := ocr2vrftypes.RawMarshalPlayerIdxInt(ocr2vrftypes.PlayerIdxInt(i)) - playerIdx, _, err := ocr2vrftypes.UnmarshalPlayerIdx(b) - require.NoError(t, err) - shareRecord := crypto.Keccak256Hash([]byte(fmt.Sprintf("%d", i))) - shareRecordHash := hash.GetHash(shareRecord[:]) - var h hash.Hash - copy(h[:], shareRecordHash[:]) - rec := ocr2vrftypes.PersistentShareSetRecord{ - Dealer: *playerIdx, - MarshaledShareRecord: shareRecord[:], - Hash: h, - } - expectedRecords = append(expectedRecords, rec) - expectedRecordsMap[*playerIdx] = rec - } - - err := shareDB.WriteShareRecords(testutils.Context(t), configDigest, keyID, expectedRecords) - require.NoError(t, err) - - actualRecords, err := shareDB.ReadShareRecords(configDigest, keyID) - require.NoError(t, err) - - assert.Equal(t, len(expectedRecords), len(actualRecords)) - numAssertions := 0 - for _, actualRecord := range actualRecords { - expectedRecord, ok := expectedRecordsMap[actualRecord.Dealer] - require.True(t, ok) - require.Equal(t, expectedRecord.MarshaledShareRecord, actualRecord.MarshaledShareRecord) - require.Equal(t, expectedRecord.Hash[:], actualRecord.Hash[:]) - numAssertions++ - } - - require.Equal(t, len(expectedRecords), numAssertions) -} diff --git a/core/services/ocr2/plugins/dkg/persistence/models.go b/core/services/ocr2/plugins/dkg/persistence/models.go deleted file mode 100644 index 02c63393a3b..00000000000 --- a/core/services/ocr2/plugins/dkg/persistence/models.go +++ /dev/null @@ -1,9 +0,0 @@ -package persistence - -type dkgShare struct { - ConfigDigest []byte `db:"config_digest"` - KeyID []byte `db:"key_id"` - Dealer []byte `db:"dealer"` - MarshaledShareRecord []byte `db:"marshaled_share_record"` - RecordHash []byte `db:"record_hash"` -} diff --git a/core/services/ocr2/plugins/dkg/plugin.go b/core/services/ocr2/plugins/dkg/plugin.go deleted file mode 100644 index 0364c5d9ab0..00000000000 --- a/core/services/ocr2/plugins/dkg/plugin.go +++ /dev/null @@ -1,96 +0,0 @@ -package dkg - -import ( - "encoding/hex" - "encoding/json" - "fmt" - "math/big" - - "github.com/pkg/errors" - - "github.com/smartcontractkit/libocr/commontypes" - libocr2 "github.com/smartcontractkit/libocr/offchainreporting2plus" - - "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" - "github.com/smartcontractkit/chainlink-vrf/altbn_128" - "github.com/smartcontractkit/chainlink-vrf/dkg" - - evmclient "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" - "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/ocr2/plugins/dkg/config" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/dkg/persistence" - evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm" -) - -func NewDKGServices( - jb job.Job, - ocr2Provider evmrelay.DKGProvider, - lggr logger.Logger, - ocrLogger commontypes.Logger, - dkgSignKs keystore.DKGSign, - dkgEncryptKs keystore.DKGEncrypt, - ethClient evmclient.Client, - oracleArgsNoPlugin libocr2.OCR2OracleArgs, - ds sqlutil.DataSource, - chainID *big.Int, - network string, -) ([]job.ServiceCtx, error) { - var pluginConfig config.PluginConfig - err := json.Unmarshal(jb.OCR2OracleSpec.PluginConfig.Bytes(), &pluginConfig) - if err != nil { - return nil, errors.Wrap(err, "json unmarshal plugin config") - } - err = config.ValidatePluginConfig(pluginConfig, dkgSignKs, dkgEncryptKs) - if err != nil { - return nil, errors.Wrap(err, "validate plugin config") - } - signKey, err := dkgSignKs.Get(pluginConfig.SigningPublicKey) - if err != nil { - return nil, errors.Wrap(err, "get dkgsign key") - } - encryptKey, err := dkgEncryptKs.Get(pluginConfig.EncryptionPublicKey) - if err != nil { - return nil, errors.Wrap(err, "get dkgencrypt key") - } - onchainDKGClient, err := NewOnchainDKGClient( - jb.OCR2OracleSpec.ContractID, - ethClient) - if err != nil { - return nil, errors.Wrap(err, "new onchain dkg client") - } - onchainContract := dkg.NewOnchainContract(onchainDKGClient, &altbn_128.G2{}) - keyConsumer := newDummyKeyConsumer() - keyID, err := DecodeKeyID(pluginConfig.KeyID) - if err != nil { - return nil, errors.Wrap(err, "decode key ID") - } - shareDB := persistence.NewShareDB(ds, lggr.Named("DKGShareDB"), chainID, network) - oracleArgsNoPlugin.ReportingPluginFactory = dkg.NewReportingPluginFactory( - encryptKey.KyberScalar(), - signKey.KyberScalar(), - keyID, - onchainContract, - ocrLogger, - keyConsumer, - shareDB, - ) - oracle, err := libocr2.NewOracle(oracleArgsNoPlugin) - if err != nil { - return nil, errors.Wrap(err, "error calling NewOracle") - } - return []job.ServiceCtx{ocr2Provider, job.NewServiceAdapter(oracle)}, nil -} - -func DecodeKeyID(val string) (byteArray [32]byte, err error) { - decoded, err := hex.DecodeString(val) - if err != nil { - return [32]byte{}, errors.Wrap(err, "hex decode string") - } - if len(decoded) != 32 { - return [32]byte{}, fmt.Errorf("expected value to be 32 bytes but received %d bytes", len(decoded)) - } - copy(byteArray[:], decoded) - return -} 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 3f96b49cfe0..6d704b50f97 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 @@ -234,6 +234,7 @@ func StartNewChainWithContracts(t *testing.T, nClients int) (*bind.TransactOpts, OperationFeeCentsUsd: uint16(0), FallbackUsdPerUnitLink: uint64(1_400_000_000), FallbackUsdPerUnitLinkDecimals: uint8(8), + TransmitTxSizeBytes: uint16(1764), } require.NoError(t, err) coordinatorAddress, _, coordinatorContract, err := functions_coordinator.DeployFunctionsCoordinator(owner, b, routerAddress, coordinatorConfig, linkEthFeedAddr, linkUsdFeedAddr) diff --git a/core/services/ocr2/plugins/generic/pipeline_runner_adapter.go b/core/services/ocr2/plugins/generic/pipeline_runner_adapter.go index 22217b83660..994f043ebca 100644 --- a/core/services/ocr2/plugins/generic/pipeline_runner_adapter.go +++ b/core/services/ocr2/plugins/generic/pipeline_runner_adapter.go @@ -15,7 +15,7 @@ import ( var _ core.PipelineRunnerService = (*PipelineRunnerAdapter)(nil) type pipelineRunner interface { - ExecuteAndInsertFinishedRun(ctx context.Context, spec pipeline.Spec, vars pipeline.Vars, l logger.Logger, saveSuccessfulTaskRuns bool) (runID int64, results pipeline.TaskRunResults, err error) + ExecuteAndInsertFinishedRun(ctx context.Context, spec pipeline.Spec, vars pipeline.Vars, saveSuccessfulTaskRuns bool) (runID int64, results pipeline.TaskRunResults, err error) } type PipelineRunnerAdapter struct { @@ -45,7 +45,7 @@ func (p *PipelineRunnerAdapter) ExecuteRun(ctx context.Context, spec string, var merge(defaultVars, vars.Vars) finalVars := pipeline.NewVarsFrom(defaultVars) - _, trrs, err := p.runner.ExecuteAndInsertFinishedRun(ctx, s, finalVars, p.logger, true) + _, trrs, err := p.runner.ExecuteAndInsertFinishedRun(ctx, s, finalVars, true) if err != nil { return nil, err } diff --git a/core/services/ocr2/plugins/generic/pipeline_runner_adapter_test.go b/core/services/ocr2/plugins/generic/pipeline_runner_adapter_test.go index a33ab2a1bd2..f9c51cfb660 100644 --- a/core/services/ocr2/plugins/generic/pipeline_runner_adapter_test.go +++ b/core/services/ocr2/plugins/generic/pipeline_runner_adapter_test.go @@ -97,7 +97,7 @@ type mockPipelineRunner struct { vars pipeline.Vars } -func (m *mockPipelineRunner) ExecuteAndInsertFinishedRun(ctx context.Context, spec pipeline.Spec, vars pipeline.Vars, l logger.Logger, saveSuccessfulTaskRuns bool) (runID int64, results pipeline.TaskRunResults, err error) { +func (m *mockPipelineRunner) ExecuteAndInsertFinishedRun(ctx context.Context, spec pipeline.Spec, vars pipeline.Vars, saveSuccessfulTaskRuns bool) (runID int64, results pipeline.TaskRunResults, err error) { m.spec = spec m.vars = vars // We never attach a run to the mock, so we can't return a runID diff --git a/core/services/ocr2/plugins/generic/relayerset_test.go b/core/services/ocr2/plugins/generic/relayerset_test.go index 90a22411775..b5eb16682de 100644 --- a/core/services/ocr2/plugins/generic/relayerset_test.go +++ b/core/services/ocr2/plugins/generic/relayerset_test.go @@ -150,6 +150,10 @@ func (t *TestRelayer) Ready() error { panic("implement me") } func (t *TestRelayer) HealthReport() map[string]error { panic("implement me") } +func (t *TestRelayer) NewChainWriter(_ context.Context, _ []byte) (types.ChainWriter, error) { + panic("implement me") +} + func (t *TestRelayer) NewContractReader(_ context.Context, _ []byte) (types.ContractReader, error) { panic("implement me") } diff --git a/core/services/ocr2/plugins/llo/config/config.go b/core/services/ocr2/plugins/llo/config/config.go index 1a6e528980b..892229c46c8 100644 --- a/core/services/ocr2/plugins/llo/config/config.go +++ b/core/services/ocr2/plugins/llo/config/config.go @@ -26,7 +26,7 @@ type PluginConfig struct { ChannelDefinitionsContractFromBlock int64 `json:"channelDefinitionsContractFromBlock" toml:"channelDefinitionsContractFromBlock"` // NOTE: ChannelDefinitions is an override. - // If Channe}lDefinitions is specified, values for + // If ChannelDefinitions is specified, values for // ChannelDefinitionsContractAddress and // ChannelDefinitionsContractFromBlock will be ignored ChannelDefinitions string `json:"channelDefinitions" toml:"channelDefinitions"` @@ -41,6 +41,10 @@ type PluginConfig struct { KeyBundleIDs map[string]string `json:"keyBundleIDs" toml:"keyBundleIDs"` } +func (p *PluginConfig) Unmarshal(data []byte) error { + return json.Unmarshal(data, p) +} + func (p PluginConfig) Validate() (merr error) { if p.RawServerURL == "" { merr = errors.New("llo: ServerURL must be specified") diff --git a/core/services/ocr2/plugins/llo/helpers_test.go b/core/services/ocr2/plugins/llo/helpers_test.go index 73f7fedc926..b993ec6dadc 100644 --- a/core/services/ocr2/plugins/llo/helpers_test.go +++ b/core/services/ocr2/plugins/llo/helpers_test.go @@ -59,7 +59,7 @@ type request struct { } func (r request) TransmitterID() ocr2types.Account { - return ocr2types.Account(r.pk.String()) + return ocr2types.Account(fmt.Sprintf("%x", r.pk)) } type mercuryServer struct { @@ -114,7 +114,7 @@ func startMercuryServer(t *testing.T, srv *mercuryServer, pubKeys []ed25519.Publ t.Fatalf("[MAIN] failed to listen: %v", err) } serverURL = lis.Addr().String() - s := wsrpc.NewServer(wsrpc.WithCreds(srv.privKey, pubKeys)) + s := wsrpc.NewServer(wsrpc.Creds(srv.privKey, pubKeys)) // Register mercury implementation with the wsrpc server pb.RegisterMercuryServer(s, srv) @@ -130,6 +130,7 @@ type Node struct { App chainlink.Application ClientPubKey credentials.StaticSizedPublicKey KeyBundle ocr2key.KeyBundle + ObservedLogs *observer.ObservedLogs } func (node *Node) AddStreamJob(t *testing.T, spec string) { @@ -197,7 +198,11 @@ func setupNode( }) lggr, observedLogs := logger.TestLoggerObserved(t, zapcore.DebugLevel) - app = cltest.NewApplicationWithConfigV2OnSimulatedBlockchain(t, config, backend, p2pKey, ocr2kb, csaKey, lggr.Named(dbName)) + if backend != nil { + app = cltest.NewApplicationWithConfigV2OnSimulatedBlockchain(t, config, backend, p2pKey, ocr2kb, csaKey, lggr.Named(dbName)) + } else { + app = cltest.NewApplicationWithConfig(t, config, p2pKey, ocr2kb, csaKey, lggr.Named(dbName)) + } err := app.Start(testutils.Context(t)) require.NoError(t, err) @@ -236,74 +241,79 @@ observationSource = """ bridgeName, )) } -func addBootstrapJob(t *testing.T, bootstrapNode Node, chainID *big.Int, verifierAddress common.Address, name string) { + +func addBootstrapJob(t *testing.T, bootstrapNode Node, verifierAddress common.Address, name string, relayType, relayConfig string) { bootstrapNode.AddBootstrapJob(t, fmt.Sprintf(` type = "bootstrap" -relay = "evm" +relay = "%s" schemaVersion = 1 name = "boot-%s" contractID = "%s" contractConfigTrackerPollInterval = "1s" [relayConfig] -chainID = %s -providerType = "llo" - `, name, verifierAddress.Hex(), chainID.String())) +%s +providerType = "llo"`, relayType, name, verifierAddress.Hex(), relayConfig)) } func addLLOJob( t *testing.T, node Node, - verifierAddress, - configStoreAddress common.Address, + verifierAddress common.Address, bootstrapPeerID string, bootstrapNodePort int, - serverURL string, - serverPubKey, clientPubKey ed25519.PublicKey, jobName string, - chainID *big.Int, - fromBlock int, + pluginConfig, + relayType, + relayConfig string, ) { node.AddLLOJob(t, fmt.Sprintf(` type = "offchainreporting2" schemaVersion = 1 -name = "%[1]s" +name = "%s" forwardingAllowed = false maxTaskDuration = "1s" -contractID = "%[2]s" +contractID = "%s" contractConfigTrackerPollInterval = "1s" -ocrKeyBundleID = "%[3]s" +ocrKeyBundleID = "%s" p2pv2Bootstrappers = [ - "%[4]s" + "%s" ] -relay = "evm" +relay = "%s" pluginType = "llo" -transmitterID = "%[5]x" +transmitterID = "%x" [pluginConfig] -serverURL = "%[6]s" -serverPubKey = "%[7]x" -channelDefinitionsContractFromBlock = %[8]d -channelDefinitionsContractAddress = "%[9]s" +%s [relayConfig] -chainID = %[10]s -fromBlock = 1`, +%s`, jobName, verifierAddress.Hex(), node.KeyBundle.ID(), fmt.Sprintf("%s@127.0.0.1:%d", bootstrapPeerID, bootstrapNodePort), + relayType, clientPubKey, - serverURL, - serverPubKey, - fromBlock, - configStoreAddress.Hex(), - chainID.String(), + pluginConfig, + relayConfig, )) } -func addOCRJobs(t *testing.T, streams []Stream, serverPubKey ed25519.PublicKey, serverURL string, verifierAddress common.Address, bootstrapPeerID string, bootstrapNodePort int, nodes []Node, configStoreAddress common.Address, clientPubKeys []ed25519.PublicKey, chainID *big.Int, fromBlock int) { +func addOCRJobs( + t *testing.T, + streams []Stream, + serverPubKey ed25519.PublicKey, + serverURL string, + verifierAddress common.Address, + bootstrapPeerID string, + bootstrapNodePort int, + nodes []Node, + configStoreAddress common.Address, + clientPubKeys []ed25519.PublicKey, + pluginConfig, + relayType, + relayConfig string) { ctx := testutils.Context(t) createBridge := func(name string, i int, p *big.Int, borm bridges.ORM) (bridgeName string) { bridge := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { @@ -343,15 +353,13 @@ func addOCRJobs(t *testing.T, streams []Stream, serverPubKey ed25519.PublicKey, t, node, verifierAddress, - configStoreAddress, bootstrapPeerID, bootstrapNodePort, - serverURL, - serverPubKey, clientPubKeys[i], "feed-1", - chainID, - fromBlock, + pluginConfig, + relayType, + relayConfig, ) } } diff --git a/core/services/ocr2/plugins/llo/integration_test.go b/core/services/ocr2/plugins/llo/integration_test.go index fd955879f56..75cc7edc5d9 100644 --- a/core/services/ocr2/plugins/llo/integration_test.go +++ b/core/services/ocr2/plugins/llo/integration_test.go @@ -3,6 +3,7 @@ package llo_test import ( "crypto/ed25519" "encoding/hex" + "encoding/json" "fmt" "math/big" "math/rand" @@ -20,6 +21,7 @@ import ( "github.com/stretchr/testify/require" chainselectors "github.com/smartcontractkit/chain-selectors" + "github.com/smartcontractkit/libocr/offchainreporting2/types" "github.com/smartcontractkit/libocr/offchainreporting2plus/confighelper" "github.com/smartcontractkit/libocr/offchainreporting2plus/ocr3confighelper" ocr2types "github.com/smartcontractkit/libocr/offchainreporting2plus/types" @@ -72,28 +74,31 @@ type Stream struct { baseBenchmarkPrice *big.Int } -func TestIntegration_LLO(t *testing.T) { - testStartTimeStamp := uint32(time.Now().Unix()) - - const fromBlock = 1 // cannot use zero, start from block 1 - - // streams - btcStream := Stream{ +var ( + btcStream = Stream{ id: 51, baseBenchmarkPrice: big.NewInt(20_000 * multiplier), } - ethStream := Stream{ + ethStream = Stream{ id: 52, baseBenchmarkPrice: big.NewInt(1_568 * multiplier), } - linkStream := Stream{ + linkStream = Stream{ id: 53, baseBenchmarkPrice: big.NewInt(7150 * multiplier / 1000), } - dogeStream := Stream{ + dogeStream = Stream{ id: 54, baseBenchmarkPrice: big.NewInt(2_020 * multiplier), } +) + +func TestIntegration_LLO(t *testing.T) { + testStartTimeStamp := uint32(time.Now().Unix()) + + const fromBlock = 1 // cannot use zero, start from block 1 + + // streams streams := []Stream{btcStream, ethStream, linkStream, dogeStream} streamMap := make(map[uint32]Stream) for _, strm := range streams { @@ -131,10 +136,10 @@ func TestIntegration_LLO(t *testing.T) { ) ports := freeport.GetN(t, nNodes) for i := 0; i < nNodes; i++ { - app, peerID, transmitter, kb, _ := setupNode(t, ports[i], fmt.Sprintf("oracle_streams_%d", i), backend, clientCSAKeys[i]) + app, peerID, transmitter, kb, observedLogs := setupNode(t, ports[i], fmt.Sprintf("oracle_streams_%d", i), backend, clientCSAKeys[i]) nodes = append(nodes, Node{ - app, transmitter, kb, + app, transmitter, kb, observedLogs, }) offchainPublicKey, _ := hex.DecodeString(strings.TrimPrefix(kb.OnChainPublicKey(), "0x")) oracles = append(oracles, confighelper.OracleIdentityExtra{ @@ -159,8 +164,16 @@ func TestIntegration_LLO(t *testing.T) { configDigest := setConfig(t, steve, backend, verifierContract, verifierAddress, nodes, oracles) channelDefinitions := setChannelDefinitions(t, steve, backend, configStoreContract, streams) - addBootstrapJob(t, bootstrapNode, chainID, verifierAddress, "job-1") - addOCRJobs(t, streams, serverPubKey, serverURL, verifierAddress, bootstrapPeerID, bootstrapNodePort, nodes, configStoreAddress, clientPubKeys, chainID, fromBlock) + relayType := "evm" + relayConfig := fmt.Sprintf(`chainID = %s +fromBlock = %d`, chainID.String(), fromBlock) + addBootstrapJob(t, bootstrapNode, verifierAddress, "job-1", relayType, relayConfig) + + pluginConfig := fmt.Sprintf(`serverURL = "%s" +serverPubKey = "%x" +channelDefinitionsContractFromBlock = %d +channelDefinitionsContractAddress = "%s"`, serverURL, serverPubKey, fromBlock, configStoreAddress.String()) + addOCRJobs(t, streams, serverPubKey, serverURL, verifierAddress, bootstrapPeerID, bootstrapNodePort, nodes, configStoreAddress, clientPubKeys, pluginConfig, relayType, relayConfig) t.Run("receives at least one report per feed from each oracle when EAs are at 100% reliability", func(t *testing.T) { // Expect at least one report per channel from each oracle (keyed by transmitter ID) seen := make(map[ocr2types.Account]map[llotypes.ChannelID]struct{}) @@ -254,17 +267,24 @@ func TestIntegration_LLO(t *testing.T) { // TODO: test verification } -func setConfig(t *testing.T, steve *bind.TransactOpts, backend *backends.SimulatedBackend, verifierContract *channel_verifier.ChannelVerifier, verifierAddress common.Address, nodes []Node, oracles []confighelper.OracleIdentityExtra) ocr2types.ConfigDigest { +func generateConfig(t *testing.T, nodes []Node, oracles []confighelper.OracleIdentityExtra) ( + signers []types.OnchainPublicKey, + transmitters []types.Account, + f uint8, + onchainConfig []byte, + offchainConfigVersion uint64, + offchainConfig []byte, +) { // Setup config on contract - rawOnchainConfig := datastreamsllo.OnchainConfig{} - onchainConfig, err := (&datastreamsllo.JSONOnchainConfigCodec{}).Encode(rawOnchainConfig) + rawOnchainConfig := llo.OnchainConfig{} + onchainConfig, err := (&llo.JSONOnchainConfigCodec{}).Encode(rawOnchainConfig) require.NoError(t, err) rawReportingPluginConfig := datastreamsllo.OffchainConfig{} reportingPluginConfig, err := rawReportingPluginConfig.Encode() require.NoError(t, err) - signers, _, _, _, offchainConfigVersion, offchainConfig, err := ocr3confighelper.ContractSetConfigArgsForTests( + signers, transmitters, f, onchainConfig, offchainConfigVersion, offchainConfig, err = ocr3confighelper.ContractSetConfigArgsForTests( 2*time.Second, // DeltaProgress 20*time.Second, // DeltaResend 400*time.Millisecond, // DeltaInitial @@ -285,24 +305,24 @@ func setConfig(t *testing.T, steve *bind.TransactOpts, backend *backends.Simulat ) require.NoError(t, err) + + return +} + +func setConfig(t *testing.T, steve *bind.TransactOpts, backend *backends.SimulatedBackend, verifierContract *channel_verifier.ChannelVerifier, verifierAddress common.Address, nodes []Node, oracles []confighelper.OracleIdentityExtra) ocr2types.ConfigDigest { + signers, _, _, _, offchainConfigVersion, offchainConfig := generateConfig(t, nodes, oracles) + signerAddresses, err := evm.OnchainPublicKeyToAddress(signers) require.NoError(t, err) - offchainTransmitters := make([][32]byte, nNodes) for i := 0; i < nNodes; i++ { offchainTransmitters[i] = nodes[i].ClientPubKey } - _, err = verifierContract.SetConfig(steve, signerAddresses, offchainTransmitters, fNodes, offchainConfig, offchainConfigVersion, offchainConfig, nil) require.NoError(t, err) backend.Commit() - accounts := make([]ocr2types.Account, len(offchainTransmitters)) - for i := range offchainTransmitters { - accounts[i] = ocr2types.Account(fmt.Sprintf("%x", offchainTransmitters[i])) - } - l, err := verifierContract.LatestConfigDigestAndEpoch(&bind.CallOpts{}) require.NoError(t, err) @@ -367,3 +387,139 @@ func setChannelDefinitions(t *testing.T, steve *bind.TransactOpts, backend *back return channelDefinitions } + +func TestIntegration_LLO_Dummy(t *testing.T) { + testStartTimeStamp := time.Now() + + streams := []Stream{btcStream, ethStream, linkStream, dogeStream} + streamMap := make(map[uint32]Stream) + for _, strm := range streams { + streamMap[strm.id] = strm + } + + clientCSAKeys := make([]csakey.KeyV2, nNodes) + clientPubKeys := make([]ed25519.PublicKey, nNodes) + for i := 0; i < nNodes; i++ { + k := big.NewInt(int64(i)) + key := csakey.MustNewV2XXXTestingOnly(k) + clientCSAKeys[i] = key + clientPubKeys[i] = key.PublicKey + } + + // Setup bootstrap + bootstrapCSAKey := csakey.MustNewV2XXXTestingOnly(big.NewInt(-1)) + bootstrapNodePort := freeport.GetOne(t) + appBootstrap, bootstrapPeerID, _, bootstrapKb, _ := setupNode(t, bootstrapNodePort, "bootstrap_mercury", nil, bootstrapCSAKey) + bootstrapNode := Node{App: appBootstrap, KeyBundle: bootstrapKb} + + t.Run("with at least one channel", func(t *testing.T) { + // Setup oracle nodes + var ( + oracles []confighelper.OracleIdentityExtra + nodes []Node + ) + ports := freeport.GetN(t, nNodes) + for i := 0; i < nNodes; i++ { + app, peerID, transmitter, kb, observedLogs := setupNode(t, ports[i], fmt.Sprintf("oracle_streams_%d", i), nil, clientCSAKeys[i]) + + nodes = append(nodes, Node{ + app, transmitter, kb, observedLogs, + }) + offchainPublicKey, _ := hex.DecodeString(strings.TrimPrefix(kb.OnChainPublicKey(), "0x")) + oracles = append(oracles, confighelper.OracleIdentityExtra{ + OracleIdentity: confighelper.OracleIdentity{ + OnchainPublicKey: offchainPublicKey, + TransmitAccount: ocr2types.Account(fmt.Sprintf("%x", transmitter[:])), + OffchainPublicKey: kb.OffchainPublicKey(), + PeerID: peerID, + }, + ConfigEncryptionPublicKey: kb.ConfigEncryptionPublicKey(), + }) + } + + verifierAddress := common.Address{} + chainID := "llo-dummy" + relayType := "dummy" + cd := "0x0102030405060708010203040506070801020304050607080102030405060708" + signers, transmitters, f, onchainConfig, offchainConfigVersion, offchainConfig := generateConfig(t, nodes, oracles) + var signersMarshalled, transmittersMarshalled []byte + { + var err error + signersHex := make([]string, len(signers)) + for i, signer := range signers { + signersHex[i] = fmt.Sprintf("0x%x", signer) + } + signersMarshalled, err = json.Marshal(signersHex) + require.NoError(t, err) + + transmittersMarshalled, err = json.Marshal(transmitters) + require.NoError(t, err) + } + + relayConfig := fmt.Sprintf(`chainID = "%s" +configTracker = { + configDigest = "%s", + configCount = 0, + signers = %s, + transmitters = %s, + f = %d, + onchainConfig = "0x%x", + offchainConfigVersion = %d, + offchainConfig = "0x%x", + blockHeight = 10 +}`, chainID, cd, string(signersMarshalled), string(transmittersMarshalled), f, onchainConfig, offchainConfigVersion, offchainConfig) + addBootstrapJob(t, bootstrapNode, verifierAddress, "job-1", relayType, relayConfig) + + serverKey := csakey.MustNewV2XXXTestingOnly(big.NewInt(-1)) + serverPubKey := serverKey.PublicKey + serverURL := "foo" + configStoreAddress := common.Address{} + + // NOTE: Don't actually care about the chain ID, it just needs to be + // a valid chainSelector + chainSelector, err := chainselectors.SelectorFromChainId(testutils.SimulatedChainID.Uint64()) + require.NoError(t, err) + + channelDefinitions := fmt.Sprintf(`{ +"42": { + "reportFormat": %d, + "chainSelector": %d, + "streamIds": [51, 52] + } +}`, llotypes.ReportFormatJSON, chainSelector) + + pluginConfig := fmt.Sprintf(`serverURL = "foo" +serverPubKey = "%x" +channelDefinitions = %q`, serverPubKey, channelDefinitions) + addOCRJobs(t, streams, serverPubKey, serverURL, verifierAddress, bootstrapPeerID, bootstrapNodePort, nodes, configStoreAddress, clientPubKeys, pluginConfig, relayType, relayConfig) + + for _, node := range nodes { + le := testutils.WaitForLogMessage(t, node.ObservedLogs, "Transmit") + fields := le.ContextMap() + assert.Equal(t, cd[2:], fields["digest"]) + assert.Equal(t, llotypes.ReportInfo{LifeCycleStage: "production", ReportFormat: llotypes.ReportFormatJSON}, fields["report.Info"]) + + if fields["report.Report"] == nil { + t.Fatal("FAIL: expected log fields to contain 'report.Report'") + } + binaryReport := fields["report.Report"].(types.Report) + report, err := (datastreamsllo.JSONReportCodec{}).Decode(binaryReport) + require.NoError(t, err) + assert.Equal(t, datastreamsllo.Report{ + ConfigDigest: types.ConfigDigest{0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8}, + ChainSelector: 0x2ee634951ef71b46, + SeqNr: fields["seqNr"].(uint64), + ChannelID: 0x2a, + ValidAfterSeconds: report.ValidAfterSeconds, // tested separately below + ValidUntilSeconds: report.ValidUntilSeconds, // tested separately below + Values: []*big.Int{big.NewInt(2000002000000), big.NewInt(156802000000)}, + Specimen: false, + }, report) + assert.GreaterOrEqual(t, report.ValidUntilSeconds, uint32(testStartTimeStamp.Unix())) + assert.GreaterOrEqual(t, report.ValidAfterSeconds, uint32(testStartTimeStamp.Unix())) + assert.GreaterOrEqual(t, report.ValidUntilSeconds, report.ValidAfterSeconds) + + assert.GreaterOrEqual(t, int(fields["seqNr"].(uint64)), 0) + } + }) +} 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 ea8f64c02fa..8529ad89450 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 @@ -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/headtracker" "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/internal/cltest" @@ -84,8 +85,9 @@ func Test_ChannelDefinitionCache_Integration(t *testing.T) { RpcBatchSize: 2, KeepFinalizedBlocksDepth: 1000, } + ht := headtracker.NewSimulatedHeadTracker(ethClient, lpOpts.UseFinalityTag, lpOpts.FinalityDepth) lp := logpoller.NewLogPoller( - logpoller.NewORM(testutils.SimulatedChainID, db, lggr), ethClient, lggr, lpOpts) + logpoller.NewORM(testutils.SimulatedChainID, db, lggr), ethClient, lggr, ht, lpOpts) servicetest.Run(t, lp) cdc := llo.NewChannelDefinitionCache(lggr, orm, lp, configStoreAddress, 0) @@ -156,8 +158,9 @@ func Test_ChannelDefinitionCache_Integration(t *testing.T) { RpcBatchSize: 2, KeepFinalizedBlocksDepth: 1000, } + ht := headtracker.NewSimulatedHeadTracker(ethClient, lpOpts.UseFinalityTag, lpOpts.FinalityDepth) lp := &mockLogPoller{ - LogPoller: logpoller.NewLogPoller(logpoller.NewORM(testutils.SimulatedChainID, db, lggr), ethClient, lggr, lpOpts), + LogPoller: logpoller.NewLogPoller(logpoller.NewORM(testutils.SimulatedChainID, db, lggr), ethClient, lggr, ht, lpOpts), LatestBlockFn: func(ctx context.Context) (int64, error) { return 0, nil }, @@ -198,7 +201,8 @@ func Test_ChannelDefinitionCache_Integration(t *testing.T) { RpcBatchSize: 2, KeepFinalizedBlocksDepth: 1000, } - lp := logpoller.NewLogPoller(logpoller.NewORM(testutils.SimulatedChainID, db, lggr), ethClient, lggr, lpOpts) + ht := headtracker.NewSimulatedHeadTracker(ethClient, lpOpts.UseFinalityTag, lpOpts.FinalityDepth) + lp := logpoller.NewLogPoller(logpoller.NewORM(testutils.SimulatedChainID, db, lggr), ethClient, lggr, ht, lpOpts) servicetest.Run(t, lp) cdc := llo.NewChannelDefinitionCache(lggr, orm, lp, configStoreAddress, channel2Block.Number().Int64()+1) diff --git a/core/services/ocr2/plugins/mercury/helpers_test.go b/core/services/ocr2/plugins/mercury/helpers_test.go index fbb51557eb1..43d709453b7 100644 --- a/core/services/ocr2/plugins/mercury/helpers_test.go +++ b/core/services/ocr2/plugins/mercury/helpers_test.go @@ -103,7 +103,7 @@ func startMercuryServer(t *testing.T, srv *mercuryServer, pubKeys []ed25519.Publ t.Fatalf("[MAIN] failed to listen: %v", err) } serverURL = lis.Addr().String() - s := wsrpc.NewServer(wsrpc.WithCreds(srv.privKey, pubKeys)) + s := wsrpc.NewServer(wsrpc.Creds(srv.privKey, pubKeys)) // Register mercury implementation with the wsrpc server pb.RegisterMercuryServer(s, srv) diff --git a/core/services/ocr2/plugins/mercury/integration_plugin_test.go b/core/services/ocr2/plugins/mercury/integration_plugin_test.go index 4089cc485c4..1dedaadcb54 100644 --- a/core/services/ocr2/plugins/mercury/integration_plugin_test.go +++ b/core/services/ocr2/plugins/mercury/integration_plugin_test.go @@ -6,23 +6,19 @@ import ( "testing" "github.com/smartcontractkit/chainlink/v2/core/config/env" - "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" ) func TestIntegration_MercuryV1_Plugin(t *testing.T) { t.Setenv(string(env.MercuryPlugin.Cmd), "chainlink-mercury") - integration_MercuryV1(t) } func TestIntegration_MercuryV2_Plugin(t *testing.T) { - testutils.SkipFlakey(t, "https://smartcontract-it.atlassian.net/browse/MERC-5697") t.Setenv(string(env.MercuryPlugin.Cmd), "chainlink-mercury") integration_MercuryV2(t) } func TestIntegration_MercuryV3_Plugin(t *testing.T) { t.Setenv(string(env.MercuryPlugin.Cmd), "chainlink-mercury") - integration_MercuryV3(t) } diff --git a/core/services/ocr2/plugins/mercury/integration_test.go b/core/services/ocr2/plugins/mercury/integration_test.go index 16d992974c3..832a39237ee 100644 --- a/core/services/ocr2/plugins/mercury/integration_test.go +++ b/core/services/ocr2/plugins/mercury/integration_test.go @@ -126,7 +126,6 @@ func setupBlockchain(t *testing.T) (*bind.TransactOpts, *backends.SimulatedBacke } func TestIntegration_MercuryV1(t *testing.T) { - testutils.SkipFlakey(t, "https://smartcontract-it.atlassian.net/browse/MERC-5697") t.Parallel() integration_MercuryV1(t) @@ -228,8 +227,8 @@ func integration_MercuryV1(t *testing.T) { createBridge := func(name string, i int, p *big.Int, borm bridges.ORM) (bridgeName string) { bridge := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { - b, err := io.ReadAll(req.Body) - require.NoError(t, err) + b, herr := io.ReadAll(req.Body) + require.NoError(t, herr) require.Equal(t, `{"data":{"from":"ETH","to":"USD"}}`, string(b)) r := rand.Int63n(101) @@ -237,13 +236,13 @@ func integration_MercuryV1(t *testing.T) { res.WriteHeader(http.StatusOK) val := decimal.NewFromBigInt(p, 0).Div(decimal.NewFromInt(multiplier)).Add(decimal.NewFromInt(int64(i)).Div(decimal.NewFromInt(100))).String() resp := fmt.Sprintf(`{"result": %s}`, val) - _, err = res.Write([]byte(resp)) - require.NoError(t, err) + _, herr = res.Write([]byte(resp)) + require.NoError(t, herr) } else { res.WriteHeader(http.StatusInternalServerError) resp := `{"error": "pError test error"}` - _, err = res.Write([]byte(resp)) - require.NoError(t, err) + _, herr = res.Write([]byte(resp)) + require.NoError(t, herr) } })) t.Cleanup(bridge.Close) @@ -330,7 +329,7 @@ func integration_MercuryV1(t *testing.T) { "offchainConfig", offchainConfig, ) - _, err = verifier.SetConfig( + _, ferr := verifier.SetConfig( steve, feed.id, signerAddresses, @@ -341,7 +340,7 @@ func integration_MercuryV1(t *testing.T) { offchainConfig, nil, ) - require.NoError(t, err) + require.NoError(t, ferr) backend.Commit() } @@ -582,9 +581,8 @@ func integration_MercuryV2(t *testing.T) { createBridge := func(name string, i int, p *big.Int, borm bridges.ORM) (bridgeName string) { bridge := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { - var b []byte - b, err = io.ReadAll(req.Body) - require.NoError(t, err) + b, herr := io.ReadAll(req.Body) + require.NoError(t, herr) require.Equal(t, `{"data":{"from":"ETH","to":"USD"}}`, string(b)) r := rand.Int63n(101) @@ -592,13 +590,13 @@ func integration_MercuryV2(t *testing.T) { res.WriteHeader(http.StatusOK) val := decimal.NewFromBigInt(p, 0).Div(decimal.NewFromInt(multiplier)).Add(decimal.NewFromInt(int64(i)).Div(decimal.NewFromInt(100))).String() resp := fmt.Sprintf(`{"result": %s}`, val) - _, err = res.Write([]byte(resp)) - require.NoError(t, err) + _, herr = res.Write([]byte(resp)) + require.NoError(t, herr) } else { res.WriteHeader(http.StatusInternalServerError) resp := `{"error": "pError test error"}` - _, err = res.Write([]byte(resp)) - require.NoError(t, err) + _, herr = res.Write([]byte(resp)) + require.NoError(t, herr) } })) t.Cleanup(bridge.Close) @@ -670,7 +668,7 @@ func integration_MercuryV2(t *testing.T) { } for _, feed := range feeds { - _, err = verifier.SetConfig( + _, ferr := verifier.SetConfig( steve, feed.id, signerAddresses, @@ -681,7 +679,7 @@ func integration_MercuryV2(t *testing.T) { offchainConfig, nil, ) - require.NoError(t, err) + require.NoError(t, ferr) backend.Commit() } @@ -872,9 +870,8 @@ func integration_MercuryV3(t *testing.T) { createBridge := func(name string, i int, p *big.Int, borm bridges.ORM) (bridgeName string) { bridge := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { - var b []byte - b, err = io.ReadAll(req.Body) - require.NoError(t, err) + b, herr := io.ReadAll(req.Body) + require.NoError(t, herr) require.Equal(t, `{"data":{"from":"ETH","to":"USD"}}`, string(b)) r := rand.Int63n(101) @@ -882,13 +879,13 @@ func integration_MercuryV3(t *testing.T) { res.WriteHeader(http.StatusOK) val := decimal.NewFromBigInt(p, 0).Div(decimal.NewFromInt(multiplier)).Add(decimal.NewFromInt(int64(i)).Div(decimal.NewFromInt(100))).String() resp := fmt.Sprintf(`{"result": %s}`, val) - _, err = res.Write([]byte(resp)) - require.NoError(t, err) + _, herr = res.Write([]byte(resp)) + require.NoError(t, herr) } else { res.WriteHeader(http.StatusInternalServerError) resp := `{"error": "pError test error"}` - _, err = res.Write([]byte(resp)) - require.NoError(t, err) + _, herr = res.Write([]byte(resp)) + require.NoError(t, herr) } })) t.Cleanup(bridge.Close) @@ -963,7 +960,7 @@ func integration_MercuryV3(t *testing.T) { } for _, feed := range feeds { - _, err = verifier.SetConfig( + _, ferr := verifier.SetConfig( steve, feed.id, signerAddresses, @@ -974,7 +971,7 @@ func integration_MercuryV3(t *testing.T) { offchainConfig, nil, ) - require.NoError(t, err) + require.NoError(t, ferr) backend.Commit() } diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/mocks/registry.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/mocks/registry.go index 0e2f87d0821..e8d9dd49ccb 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/mocks/registry.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/mocks/registry.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -21,6 +21,14 @@ type Registry struct { mock.Mock } +type Registry_Expecter struct { + mock *mock.Mock +} + +func (_m *Registry) EXPECT() *Registry_Expecter { + return &Registry_Expecter{mock: &_m.Mock} +} + // GetActiveUpkeepIDs provides a mock function with given fields: opts, startIndex, maxCount func (_m *Registry) GetActiveUpkeepIDs(opts *bind.CallOpts, startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) { ret := _m.Called(opts, startIndex, maxCount) @@ -51,6 +59,36 @@ func (_m *Registry) GetActiveUpkeepIDs(opts *bind.CallOpts, startIndex *big.Int, return r0, r1 } +// Registry_GetActiveUpkeepIDs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetActiveUpkeepIDs' +type Registry_GetActiveUpkeepIDs_Call struct { + *mock.Call +} + +// GetActiveUpkeepIDs is a helper method to define mock.On call +// - opts *bind.CallOpts +// - startIndex *big.Int +// - maxCount *big.Int +func (_e *Registry_Expecter) GetActiveUpkeepIDs(opts interface{}, startIndex interface{}, maxCount interface{}) *Registry_GetActiveUpkeepIDs_Call { + return &Registry_GetActiveUpkeepIDs_Call{Call: _e.mock.On("GetActiveUpkeepIDs", opts, startIndex, maxCount)} +} + +func (_c *Registry_GetActiveUpkeepIDs_Call) Run(run func(opts *bind.CallOpts, startIndex *big.Int, maxCount *big.Int)) *Registry_GetActiveUpkeepIDs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts), args[1].(*big.Int), args[2].(*big.Int)) + }) + return _c +} + +func (_c *Registry_GetActiveUpkeepIDs_Call) Return(_a0 []*big.Int, _a1 error) *Registry_GetActiveUpkeepIDs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Registry_GetActiveUpkeepIDs_Call) RunAndReturn(run func(*bind.CallOpts, *big.Int, *big.Int) ([]*big.Int, error)) *Registry_GetActiveUpkeepIDs_Call { + _c.Call.Return(run) + return _c +} + // GetState provides a mock function with given fields: opts func (_m *Registry) GetState(opts *bind.CallOpts) (keeper_registry_wrapper2_0.GetState, error) { ret := _m.Called(opts) @@ -79,6 +117,34 @@ func (_m *Registry) GetState(opts *bind.CallOpts) (keeper_registry_wrapper2_0.Ge return r0, r1 } +// Registry_GetState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetState' +type Registry_GetState_Call struct { + *mock.Call +} + +// GetState is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *Registry_Expecter) GetState(opts interface{}) *Registry_GetState_Call { + return &Registry_GetState_Call{Call: _e.mock.On("GetState", opts)} +} + +func (_c *Registry_GetState_Call) Run(run func(opts *bind.CallOpts)) *Registry_GetState_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *Registry_GetState_Call) Return(_a0 keeper_registry_wrapper2_0.GetState, _a1 error) *Registry_GetState_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Registry_GetState_Call) RunAndReturn(run func(*bind.CallOpts) (keeper_registry_wrapper2_0.GetState, error)) *Registry_GetState_Call { + _c.Call.Return(run) + return _c +} + // GetUpkeep provides a mock function with given fields: opts, id func (_m *Registry) GetUpkeep(opts *bind.CallOpts, id *big.Int) (keeper_registry_wrapper2_0.UpkeepInfo, error) { ret := _m.Called(opts, id) @@ -107,6 +173,35 @@ func (_m *Registry) GetUpkeep(opts *bind.CallOpts, id *big.Int) (keeper_registry return r0, r1 } +// Registry_GetUpkeep_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUpkeep' +type Registry_GetUpkeep_Call struct { + *mock.Call +} + +// GetUpkeep is a helper method to define mock.On call +// - opts *bind.CallOpts +// - id *big.Int +func (_e *Registry_Expecter) GetUpkeep(opts interface{}, id interface{}) *Registry_GetUpkeep_Call { + return &Registry_GetUpkeep_Call{Call: _e.mock.On("GetUpkeep", opts, id)} +} + +func (_c *Registry_GetUpkeep_Call) Run(run func(opts *bind.CallOpts, id *big.Int)) *Registry_GetUpkeep_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts), args[1].(*big.Int)) + }) + return _c +} + +func (_c *Registry_GetUpkeep_Call) Return(_a0 keeper_registry_wrapper2_0.UpkeepInfo, _a1 error) *Registry_GetUpkeep_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Registry_GetUpkeep_Call) RunAndReturn(run func(*bind.CallOpts, *big.Int) (keeper_registry_wrapper2_0.UpkeepInfo, error)) *Registry_GetUpkeep_Call { + _c.Call.Return(run) + return _c +} + // ParseLog provides a mock function with given fields: log func (_m *Registry) ParseLog(log types.Log) (generated.AbigenLog, error) { ret := _m.Called(log) @@ -137,6 +232,34 @@ func (_m *Registry) ParseLog(log types.Log) (generated.AbigenLog, error) { return r0, r1 } +// Registry_ParseLog_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseLog' +type Registry_ParseLog_Call struct { + *mock.Call +} + +// ParseLog is a helper method to define mock.On call +// - log types.Log +func (_e *Registry_Expecter) ParseLog(log interface{}) *Registry_ParseLog_Call { + return &Registry_ParseLog_Call{Call: _e.mock.On("ParseLog", log)} +} + +func (_c *Registry_ParseLog_Call) Run(run func(log types.Log)) *Registry_ParseLog_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *Registry_ParseLog_Call) Return(_a0 generated.AbigenLog, _a1 error) *Registry_ParseLog_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Registry_ParseLog_Call) RunAndReturn(run func(types.Log) (generated.AbigenLog, error)) *Registry_ParseLog_Call { + _c.Call.Return(run) + return _c +} + // NewRegistry creates a new instance of Registry. 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 NewRegistry(t interface { diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/registry.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/registry.go index ce7325a96be..9e9ac23ffeb 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/registry.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/registry.go @@ -59,7 +59,6 @@ var ( logEventLookback int64 = 250 ) -//go:generate mockery --quiet --name Registry --output ./mocks/ --case=underscore type Registry interface { GetUpkeep(opts *bind.CallOpts, id *big.Int) (keeper_registry_wrapper2_0.UpkeepInfo, error) GetState(opts *bind.CallOpts) (keeper_registry_wrapper2_0.GetState, error) @@ -594,16 +593,21 @@ func (r *EvmRegistry) checkUpkeeps(ctx context.Context, keys []ocr2keepers.Upkee return nil, err } + args := []interface{}{ + map[string]interface{}{ + "to": r.addr.Hex(), + "data": hexutil.Bytes(payload), + }, + } + + if opts.BlockNumber != nil { + args = append(args, hexutil.EncodeBig(opts.BlockNumber)) + } + var result string checkReqs[i] = rpc.BatchElem{ Method: "eth_call", - Args: []interface{}{ - map[string]interface{}{ - "to": r.addr.Hex(), - "data": hexutil.Bytes(payload), - }, - hexutil.EncodeBig(opts.BlockNumber), - }, + Args: args, Result: &result, } @@ -660,16 +664,21 @@ func (r *EvmRegistry) simulatePerformUpkeeps(ctx context.Context, checkResults [ return nil, err } + args := []interface{}{ + map[string]interface{}{ + "to": r.addr.Hex(), + "data": hexutil.Bytes(payload), + }, + } + + if opts.BlockNumber != nil { + args = append(args, hexutil.EncodeBig(opts.BlockNumber)) + } + var result string performReqs = append(performReqs, rpc.BatchElem{ Method: "eth_call", - Args: []interface{}{ - map[string]interface{}{ - "to": r.addr.Hex(), - "data": hexutil.Bytes(payload), - }, - hexutil.EncodeBig(opts.BlockNumber), - }, + Args: args, Result: &result, }) @@ -726,16 +735,21 @@ func (r *EvmRegistry) getUpkeepConfigs(ctx context.Context, ids []*big.Int) ([]a return nil, fmt.Errorf("failed to pack id with abi: %s", err) } + args := []interface{}{ + map[string]interface{}{ + "to": r.addr.Hex(), + "data": hexutil.Bytes(payload), + }, + } + + if opts.BlockNumber != nil { + args = append(args, hexutil.EncodeBig(opts.BlockNumber)) + } + var result string uReqs[i] = rpc.BatchElem{ Method: "eth_call", - Args: []interface{}{ - map[string]interface{}{ - "to": r.addr.Hex(), - "data": hexutil.Bytes(payload), - }, - hexutil.EncodeBig(opts.BlockNumber), - }, + Args: args, Result: &result, } diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/interfaces.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/interfaces.go index 4dd4d387a80..32d6a389f7d 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/interfaces.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/interfaces.go @@ -7,8 +7,6 @@ import ( ) // UpkeepStateReader is the interface for reading the current state of upkeeps. -// -//go:generate mockery --quiet --name UpkeepStateReader --output ./mocks/ --case=underscore type UpkeepStateReader interface { SelectByWorkIDs(ctx context.Context, workIDs ...string) ([]ocr2keepers.UpkeepState, error) } diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/mocks/upkeep_state_reader.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/mocks/upkeep_state_reader.go index 0e9badc2ac3..52ac4f1b0e9 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/mocks/upkeep_state_reader.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/mocks/upkeep_state_reader.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -15,6 +15,14 @@ type UpkeepStateReader struct { mock.Mock } +type UpkeepStateReader_Expecter struct { + mock *mock.Mock +} + +func (_m *UpkeepStateReader) EXPECT() *UpkeepStateReader_Expecter { + return &UpkeepStateReader_Expecter{mock: &_m.Mock} +} + // SelectByWorkIDs provides a mock function with given fields: ctx, workIDs func (_m *UpkeepStateReader) SelectByWorkIDs(ctx context.Context, workIDs ...string) ([]automation.UpkeepState, error) { _va := make([]interface{}, len(workIDs)) @@ -52,6 +60,42 @@ func (_m *UpkeepStateReader) SelectByWorkIDs(ctx context.Context, workIDs ...str return r0, r1 } +// UpkeepStateReader_SelectByWorkIDs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SelectByWorkIDs' +type UpkeepStateReader_SelectByWorkIDs_Call struct { + *mock.Call +} + +// SelectByWorkIDs is a helper method to define mock.On call +// - ctx context.Context +// - workIDs ...string +func (_e *UpkeepStateReader_Expecter) SelectByWorkIDs(ctx interface{}, workIDs ...interface{}) *UpkeepStateReader_SelectByWorkIDs_Call { + return &UpkeepStateReader_SelectByWorkIDs_Call{Call: _e.mock.On("SelectByWorkIDs", + append([]interface{}{ctx}, workIDs...)...)} +} + +func (_c *UpkeepStateReader_SelectByWorkIDs_Call) Run(run func(ctx context.Context, workIDs ...string)) *UpkeepStateReader_SelectByWorkIDs_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]string, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(string) + } + } + run(args[0].(context.Context), variadicArgs...) + }) + return _c +} + +func (_c *UpkeepStateReader_SelectByWorkIDs_Call) Return(_a0 []automation.UpkeepState, _a1 error) *UpkeepStateReader_SelectByWorkIDs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *UpkeepStateReader_SelectByWorkIDs_Call) RunAndReturn(run func(context.Context, ...string) ([]automation.UpkeepState, error)) *UpkeepStateReader_SelectByWorkIDs_Call { + _c.Call.Return(run) + return _c +} + // NewUpkeepStateReader creates a new instance of UpkeepStateReader. 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 NewUpkeepStateReader(t interface { diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/buffer_v1.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/buffer_v1.go index fe15e962e53..e58d5ad9c93 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/buffer_v1.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/buffer_v1.go @@ -1,7 +1,6 @@ package logprovider import ( - "math" "math/big" "sort" "sync" @@ -22,11 +21,11 @@ type LogBuffer interface { // given upkeep was exceeded. Returns the number of logs that were added and number of logs that were dropped. Enqueue(id *big.Int, logs ...logpoller.Log) (added int, dropped int) // Dequeue pulls logs from the buffer that are within the given block window, - // with a maximum number of logs per upkeep and a total maximum number of logs to return. - // It also accepts a function to select upkeeps. + // with a maximum number of logs to return. + // It also accepts a boolean to identify if we are operating under minimum dequeue. // Returns logs (associated to upkeeps) and the number of remaining // logs in that window for the involved upkeeps. - Dequeue(block int64, blockRate, upkeepLimit, maxResults int, upkeepSelector func(id *big.Int) bool) ([]BufferedLog, int) + Dequeue(startWindowBlock int64, maxResults int, minimumDequeue bool) ([]BufferedLog, int) // SetConfig sets the buffer size and the maximum number of logs to keep for each upkeep. SetConfig(lookback, blockRate, logLimit uint32) // NumOfUpkeeps returns the number of upkeeps that are being tracked by the buffer. @@ -35,10 +34,6 @@ type LogBuffer interface { SyncFilters(filterStore UpkeepFilterStore) error } -func DefaultUpkeepSelector(id *big.Int) bool { - return true -} - type logBufferOptions struct { // number of blocks to keep in the buffer lookback *atomic.Uint32 @@ -46,6 +41,8 @@ type logBufferOptions struct { blockRate *atomic.Uint32 // max number of logs to keep in the buffer for each upkeep per window (LogLimit*10) windowLimit *atomic.Uint32 + // number of logs we need to dequeue per upkeep per block window at a minimum + logLimit *atomic.Uint32 } func newLogBufferOptions(lookback, blockRate, logLimit uint32) *logBufferOptions { @@ -53,6 +50,7 @@ func newLogBufferOptions(lookback, blockRate, logLimit uint32) *logBufferOptions windowLimit: new(atomic.Uint32), lookback: new(atomic.Uint32), blockRate: new(atomic.Uint32), + logLimit: new(atomic.Uint32), } opts.override(lookback, blockRate, logLimit) @@ -63,10 +61,7 @@ func (o *logBufferOptions) override(lookback, blockRate, logLimit uint32) { o.windowLimit.Store(logLimit * 10) o.lookback.Store(lookback) o.blockRate.Store(blockRate) -} - -func (o *logBufferOptions) windows() int { - return int(math.Ceil(float64(o.lookback.Load()) / float64(o.blockRate.Load()))) + o.logLimit.Store(logLimit) } type logBuffer struct { @@ -75,21 +70,21 @@ type logBuffer struct { // last block number seen by the buffer lastBlockSeen *atomic.Int64 // map of upkeep id to its queue - queues map[string]*upkeepLogQueue - lock sync.RWMutex + queues map[string]*upkeepLogQueue + queueIDs []string + blockHashes map[int64]string - // map for then number of times we have enqueued logs for a block number - enqueuedBlocks map[int64]map[string]int - enqueuedBlockLock sync.RWMutex + lock sync.RWMutex } func NewLogBuffer(lggr logger.Logger, lookback, blockRate, logLimit uint32) LogBuffer { return &logBuffer{ - lggr: lggr.Named("KeepersRegistry.LogEventBufferV1"), - opts: newLogBufferOptions(lookback, blockRate, logLimit), - lastBlockSeen: new(atomic.Int64), - enqueuedBlocks: map[int64]map[string]int{}, - queues: make(map[string]*upkeepLogQueue), + lggr: lggr.Named("KeepersRegistry.LogEventBufferV1"), + opts: newLogBufferOptions(lookback, blockRate, logLimit), + lastBlockSeen: new(atomic.Int64), + queueIDs: []string{}, + blockHashes: map[int64]string{}, + queues: make(map[string]*upkeepLogQueue), } } @@ -99,67 +94,64 @@ func NewLogBuffer(lggr logger.Logger, lookback, blockRate, logLimit uint32) LogB // All logs for an upkeep on a particular block will be enqueued in a single Enqueue call. // Returns the number of logs that were added and number of logs that were dropped. func (b *logBuffer) Enqueue(uid *big.Int, logs ...logpoller.Log) (int, int) { + b.lock.Lock() + defer b.lock.Unlock() + buf, ok := b.getUpkeepQueue(uid) if !ok || buf == nil { buf = newUpkeepLogQueue(b.lggr, uid, b.opts) b.setUpkeepQueue(uid, buf) } - latestLogBlock, uniqueBlocks := blockStatistics(logs...) + latestLogBlock, reorgBlocks := b.blockStatistics(logs...) + + if len(reorgBlocks) > 0 { + b.evictReorgdLogs(reorgBlocks) + } + if lastBlockSeen := b.lastBlockSeen.Load(); lastBlockSeen < latestLogBlock { b.lastBlockSeen.Store(latestLogBlock) } else if latestLogBlock < lastBlockSeen { b.lggr.Debugw("enqueuing logs with a latest block older older than latest seen block", "logBlock", latestLogBlock, "lastBlockSeen", lastBlockSeen) } - b.trackBlockNumbersForUpkeep(uid, uniqueBlocks) - blockThreshold := b.lastBlockSeen.Load() - int64(b.opts.lookback.Load()) + blockThreshold, _ = getBlockWindow(blockThreshold, int(b.opts.blockRate.Load())) if blockThreshold <= 0 { blockThreshold = 1 } - b.cleanupEnqueuedBlocks(blockThreshold) - return buf.enqueue(blockThreshold, logs...) } -func (b *logBuffer) cleanupEnqueuedBlocks(blockThreshold int64) { - b.enqueuedBlockLock.Lock() - defer b.enqueuedBlockLock.Unlock() - // clean up enqueued block counts - for block := range b.enqueuedBlocks { - if block < blockThreshold { - delete(b.enqueuedBlocks, block) +// blockStatistics returns the latest block number from the given logs, and updates any blocks that have been reorgd +func (b *logBuffer) blockStatistics(logs ...logpoller.Log) (int64, map[int64]bool) { + var latest int64 + reorgBlocks := map[int64]bool{} + + for _, l := range logs { + if l.BlockNumber > latest { + latest = l.BlockNumber } + if hash, ok := b.blockHashes[l.BlockNumber]; ok { + if hash != l.BlockHash.String() { + reorgBlocks[l.BlockNumber] = true + b.lggr.Debugw("encountered reorgd block", "blockNumber", l.BlockNumber) + } + } + b.blockHashes[l.BlockNumber] = l.BlockHash.String() } -} -// trackBlockNumbersForUpkeep keeps track of the number of times we enqueue logs for an upkeep, -// for a specific block number. The expectation is that we will only enqueue logs for an upkeep for a -// specific block number once, i.e. all logs for an upkeep for a block, will be enqueued in a single -// enqueue call. In the event that we see upkeep logs enqueued for a particular block more than once, -// we log a message. -func (b *logBuffer) trackBlockNumbersForUpkeep(uid *big.Int, uniqueBlocks map[int64]bool) { - b.enqueuedBlockLock.Lock() - defer b.enqueuedBlockLock.Unlock() - - if uid == nil { - return - } + return latest, reorgBlocks +} - for blockNumber := range uniqueBlocks { - if blockNumbers, ok := b.enqueuedBlocks[blockNumber]; ok { - if upkeepBlockInstances, ok := blockNumbers[uid.String()]; ok { - blockNumbers[uid.String()] = upkeepBlockInstances + 1 - b.lggr.Debugw("enqueuing logs again for a previously seen block for this upkeep", "blockNumber", blockNumber, "numberOfEnqueues", b.enqueuedBlocks[blockNumber], "upkeepID", uid.String()) - } else { - blockNumbers[uid.String()] = 1 - } - b.enqueuedBlocks[blockNumber] = blockNumbers - } else { - b.enqueuedBlocks[blockNumber] = map[string]int{ - uid.String(): 1, +func (b *logBuffer) evictReorgdLogs(reorgBlocks map[int64]bool) { + for blockNumber := range reorgBlocks { + start, _ := getBlockWindow(blockNumber, int(b.opts.blockRate.Load())) + for _, queue := range b.queues { + if _, ok := queue.logs[blockNumber]; ok { + queue.logs[blockNumber] = []logpoller.Log{} + queue.dequeued[start] = 0 } } } @@ -167,27 +159,36 @@ func (b *logBuffer) trackBlockNumbersForUpkeep(uid *big.Int, uniqueBlocks map[in // Dequeue greedly pulls logs from the buffers. // Returns logs and the number of remaining logs in the buffer. -func (b *logBuffer) Dequeue(block int64, blockRate, upkeepLimit, maxResults int, upkeepSelector func(id *big.Int) bool) ([]BufferedLog, int) { +func (b *logBuffer) Dequeue(startWindowBlock int64, maxResults int, bestEffort bool) ([]BufferedLog, int) { b.lock.RLock() defer b.lock.RUnlock() - start, end := getBlockWindow(block, blockRate) - return b.dequeue(start, end, upkeepLimit, maxResults, upkeepSelector) + return b.dequeue(startWindowBlock, maxResults, bestEffort) } -// dequeue pulls logs from the buffers, depends the given selector (upkeepSelector), -// in block range [start,end] with minimum number of results per upkeep (upkeepLimit) -// and the maximum number of results (capacity). +// dequeue pulls logs from the buffers, in block range [start,end] with minimum number +// of results per upkeep (upkeepLimit) and the maximum number of results (capacity). +// If operating under minimum dequeue, upkeeps are skipped when the minimum number +// of logs have been dequeued for that upkeep. // Returns logs and the number of remaining logs in the buffer for the given range and selector. // NOTE: this method is not thread safe and should be called within a lock. -func (b *logBuffer) dequeue(start, end int64, upkeepLimit, capacity int, upkeepSelector func(id *big.Int) bool) ([]BufferedLog, int) { +func (b *logBuffer) dequeue(start int64, capacity int, minimumDequeue bool) ([]BufferedLog, int) { var result []BufferedLog var remainingLogs int - for _, q := range b.queues { - if !upkeepSelector(q.id) { - // if the upkeep is not selected, skip it + minimumDequeueMet := 0 + + logLimit := int(b.opts.logLimit.Load()) + end := start + int64(b.opts.blockRate.Load()) + + for _, qid := range b.queueIDs { + q := b.queues[qid] + + if minimumDequeue && q.dequeued[start] >= logLimit { + // if we have already dequeued the minimum commitment for this window, skip it + minimumDequeueMet++ continue } + logsInRange := q.sizeOfRange(start, end) if logsInRange == 0 { // if there are no logs in the range, skip the upkeep @@ -198,17 +199,26 @@ func (b *logBuffer) dequeue(start, end int64, upkeepLimit, capacity int, upkeepS remainingLogs += logsInRange continue } - if upkeepLimit > capacity { - // adjust limit if it is higher than the actual capacity - upkeepLimit = capacity + + var logs []logpoller.Log + remaining := 0 + + if minimumDequeue { + logs, remaining = q.dequeue(start, end, min(capacity, logLimit-q.dequeued[start])) + } else { + logs, remaining = q.dequeue(start, end, capacity) } - logs, remaining := q.dequeue(start, end, upkeepLimit) + for _, l := range logs { result = append(result, BufferedLog{ID: q.id, Log: l}) capacity-- } remainingLogs += remaining + + // update the buffer with how many logs we have dequeued for this window + q.dequeued[start] += len(logs) } + b.lggr.Debugw("minimum commitment logs dequeued", "start", start, "end", end, "numUpkeeps", len(b.queues), "minimumDequeueMet", minimumDequeueMet) return result, remainingLogs } @@ -230,30 +240,34 @@ func (b *logBuffer) SyncFilters(filterStore UpkeepFilterStore) error { b.lock.Lock() defer b.lock.Unlock() - for upkeepID := range b.queues { + var newQueueIDs []string + + for _, upkeepID := range b.queueIDs { uid := new(big.Int) _, ok := uid.SetString(upkeepID, 10) if ok && !filterStore.Has(uid) { // remove upkeep that is not in the filter store delete(b.queues, upkeepID) + } else { + newQueueIDs = append(newQueueIDs, upkeepID) } } + b.queueIDs = newQueueIDs + return nil } func (b *logBuffer) getUpkeepQueue(uid *big.Int) (*upkeepLogQueue, bool) { - b.lock.RLock() - defer b.lock.RUnlock() - ub, ok := b.queues[uid.String()] return ub, ok } func (b *logBuffer) setUpkeepQueue(uid *big.Int, buf *upkeepLogQueue) { - b.lock.Lock() - defer b.lock.Unlock() - + if _, ok := b.queues[uid.String()]; !ok { + b.queueIDs = append(b.queueIDs, uid.String()) + sort.Slice(b.queueIDs, func(i, j int) bool { return b.queueIDs[i] < b.queueIDs[j] }) + } b.queues[uid.String()] = buf } @@ -287,21 +301,25 @@ type upkeepLogQueue struct { opts *logBufferOptions // logs is the buffer of logs for the upkeep - logs []logpoller.Log + logs map[int64][]logpoller.Log + blockNumbers []int64 + // states keeps track of the state of the logs that are known to the queue // and the block number they were seen at - states map[string]logTriggerStateEntry - lock sync.RWMutex + states map[string]logTriggerStateEntry + dequeued map[int64]int + lock sync.RWMutex } func newUpkeepLogQueue(lggr logger.Logger, id *big.Int, opts *logBufferOptions) *upkeepLogQueue { - maxLogs := int(opts.windowLimit.Load()) * opts.windows() // limit per window * windows return &upkeepLogQueue{ - lggr: lggr.With("upkeepID", id.String()), - id: id, - opts: opts, - logs: make([]logpoller.Log, 0, maxLogs), - states: make(map[string]logTriggerStateEntry), + lggr: lggr.With("upkeepID", id.String()), + id: id, + opts: opts, + logs: map[int64][]logpoller.Log{}, + blockNumbers: make([]int64, 0), + states: make(map[string]logTriggerStateEntry), + dequeued: map[int64]int{}, } } @@ -311,9 +329,9 @@ func (q *upkeepLogQueue) sizeOfRange(start, end int64) int { defer q.lock.RUnlock() size := 0 - for _, l := range q.logs { - if l.BlockNumber >= start && l.BlockNumber <= end { - size++ + for blockNumber, logs := range q.logs { + if blockNumber >= start && blockNumber <= end { + size += len(logs) } } return size @@ -331,9 +349,11 @@ func (q *upkeepLogQueue) dequeue(start, end int64, limit int) ([]logpoller.Log, var results []logpoller.Log var remaining int - updatedLogs := make([]logpoller.Log, 0) - for _, l := range q.logs { - if l.BlockNumber >= start && l.BlockNumber <= end { + + for blockNumber := start; blockNumber <= end; blockNumber++ { + updatedLogs := make([]logpoller.Log, 0) + blockResults := 0 + for _, l := range q.logs[blockNumber] { if len(results) < limit { results = append(results, l) lid := logID(l) @@ -341,15 +361,18 @@ func (q *upkeepLogQueue) dequeue(start, end int64, limit int) ([]logpoller.Log, s.state = logTriggerStateDequeued q.states[lid] = s } - continue + blockResults++ + } else { + remaining++ + updatedLogs = append(updatedLogs, l) } - remaining++ } - updatedLogs = append(updatedLogs, l) + if blockResults > 0 { + q.logs[blockNumber] = updatedLogs + } } if len(results) > 0 { - q.logs = updatedLogs q.lggr.Debugw("Dequeued logs", "start", start, "end", end, "limit", limit, "results", len(results), "remaining", remaining) } @@ -362,10 +385,6 @@ func (q *upkeepLogQueue) dequeue(start, end int64, limit int) ([]logpoller.Log, // given upkeep was exceeded. Additionally, it will drop logs that are older than blockThreshold. // Returns the number of logs that were added and number of logs that were dropped. func (q *upkeepLogQueue) enqueue(blockThreshold int64, logsToAdd ...logpoller.Log) (int, int) { - q.lock.Lock() - defer q.lock.Unlock() - - logs := q.logs var added int for _, log := range logsToAdd { if log.BlockNumber < blockThreshold { @@ -379,9 +398,15 @@ func (q *upkeepLogQueue) enqueue(blockThreshold int64, logsToAdd ...logpoller.Lo } q.states[lid] = logTriggerStateEntry{state: logTriggerStateEnqueued, block: log.BlockNumber} added++ - logs = append(logs, log) + if logList, ok := q.logs[log.BlockNumber]; ok { + logList = append(logList, log) + q.logs[log.BlockNumber] = logList + } else { + q.logs[log.BlockNumber] = []logpoller.Log{log} + q.blockNumbers = append(q.blockNumbers, log.BlockNumber) + sort.Slice(q.blockNumbers, func(i, j int) bool { return q.blockNumbers[i] < q.blockNumbers[j] }) + } } - q.logs = logs var dropped int if added > 0 { @@ -402,70 +427,99 @@ func (q *upkeepLogQueue) orderLogs() { // sort logs by block number, tx hash and log index // to keep the q sorted and to ensure that logs can be // grouped by block windows for the cleanup - sort.SliceStable(q.logs, func(i, j int) bool { - return LogSorter(q.logs[i], q.logs[j]) - }) + for _, blockNumber := range q.blockNumbers { + toSort := q.logs[blockNumber] + sort.SliceStable(toSort, func(i, j int) bool { + return LogSorter(toSort[i], toSort[j]) + }) + q.logs[blockNumber] = toSort + } } // clean removes logs that are older than blockThreshold and drops logs if the limit for the // given upkeep was exceeded. Returns the number of logs that were dropped. // NOTE: this method is not thread safe and should be called within a lock. func (q *upkeepLogQueue) clean(blockThreshold int64) int { - var dropped, expired int + var totalDropped int + blockRate := int(q.opts.blockRate.Load()) windowLimit := int(q.opts.windowLimit.Load()) - updated := make([]logpoller.Log, 0) // helper variables to keep track of the current window capacity currentWindowCapacity, currentWindowStart := 0, int64(0) - for _, l := range q.logs { - if blockThreshold > l.BlockNumber { // old log, removed - prommetrics.AutomationLogBufferFlow.WithLabelValues(prommetrics.LogBufferFlowDirectionExpired).Inc() - // q.lggr.Debugw("Expiring old log", "blockNumber", l.BlockNumber, "blockThreshold", blockThreshold, "logIndex", l.LogIndex) - logid := logID(l) - delete(q.states, logid) - expired++ - continue - } - start, _ := getBlockWindow(l.BlockNumber, blockRate) - if start != currentWindowStart { - // new window, reset capacity - currentWindowStart = start - currentWindowCapacity = 0 + oldBlockNumbers := make([]int64, 0) + blockNumbers := make([]int64, 0) + + for _, blockNumber := range q.blockNumbers { + var dropped, expired int + + logs := q.logs[blockNumber] + updated := make([]logpoller.Log, 0) + + if blockThreshold > blockNumber { + oldBlockNumbers = append(oldBlockNumbers, blockNumber) + } else { + blockNumbers = append(blockNumbers, blockNumber) } - currentWindowCapacity++ - // if capacity has been reached, drop the log - if currentWindowCapacity > windowLimit { - lid := logID(l) - if s, ok := q.states[lid]; ok { - s.state = logTriggerStateDropped - q.states[lid] = s + + for _, l := range logs { + if blockThreshold > l.BlockNumber { // old log, removed + prommetrics.AutomationLogBufferFlow.WithLabelValues(prommetrics.LogBufferFlowDirectionExpired).Inc() + // q.lggr.Debugw("Expiring old log", "blockNumber", l.BlockNumber, "blockThreshold", blockThreshold, "logIndex", l.LogIndex) + logid := logID(l) + delete(q.states, logid) + expired++ + continue + } + start, _ := getBlockWindow(l.BlockNumber, blockRate) + if start != currentWindowStart { + // new window, reset capacity + currentWindowStart = start + currentWindowCapacity = 0 } - dropped++ - prommetrics.AutomationLogBufferFlow.WithLabelValues(prommetrics.LogBufferFlowDirectionDropped).Inc() - q.lggr.Debugw("Reached log buffer limits, dropping log", "blockNumber", l.BlockNumber, - "blockHash", l.BlockHash, "txHash", l.TxHash, "logIndex", l.LogIndex, "len updated", len(updated), - "currentWindowStart", currentWindowStart, "currentWindowCapacity", currentWindowCapacity, - "maxLogsPerWindow", windowLimit, "blockRate", blockRate) + currentWindowCapacity++ + // if capacity has been reached, drop the log + if currentWindowCapacity > windowLimit { + lid := logID(l) + if s, ok := q.states[lid]; ok { + s.state = logTriggerStateDropped + q.states[lid] = s + } + dropped++ + prommetrics.AutomationLogBufferFlow.WithLabelValues(prommetrics.LogBufferFlowDirectionDropped).Inc() + q.lggr.Debugw("Reached log buffer limits, dropping log", "blockNumber", l.BlockNumber, + "blockHash", l.BlockHash, "txHash", l.TxHash, "logIndex", l.LogIndex, "len updated", len(updated), + "currentWindowStart", currentWindowStart, "currentWindowCapacity", currentWindowCapacity, + "maxLogsPerWindow", windowLimit, "blockRate", blockRate) + continue + } + updated = append(updated, l) + } + + if dropped > 0 || expired > 0 { + totalDropped += dropped + q.logs[blockNumber] = updated + q.lggr.Debugw("Cleaned logs", "dropped", dropped, "expired", expired, "blockThreshold", blockThreshold, "len updated", len(updated), "len before", len(q.logs)) continue } - updated = append(updated, l) } - if dropped > 0 || expired > 0 { - q.lggr.Debugw("Cleaned logs", "dropped", dropped, "expired", expired, "blockThreshold", blockThreshold, "len updated", len(updated), "len before", len(q.logs)) - q.logs = updated + for _, blockNumber := range oldBlockNumbers { + delete(q.logs, blockNumber) + startWindow, _ := getBlockWindow(blockNumber, int(q.opts.blockRate.Load())) + delete(q.dequeued, startWindow) } + q.blockNumbers = blockNumbers q.cleanStates(blockThreshold) - return dropped + return totalDropped } // cleanStates removes states that are older than blockThreshold. // NOTE: this method is not thread safe and should be called within a lock. func (q *upkeepLogQueue) cleanStates(blockThreshold int64) { for lid, s := range q.states { - if s.block <= blockThreshold { + if s.block < blockThreshold { delete(q.states, lid) } } diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/buffer_v1_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/buffer_v1_test.go index c41dd3d9bcc..f742d39689c 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/buffer_v1_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/buffer_v1_test.go @@ -23,12 +23,12 @@ func TestLogEventBufferV1(t *testing.T) { logpoller.Log{BlockNumber: 2, TxHash: common.HexToHash("0x2"), LogIndex: 0}, logpoller.Log{BlockNumber: 2, TxHash: common.HexToHash("0x1"), LogIndex: 2}, ) - results, remaining := buf.Dequeue(int64(1), 10, 1, 2, DefaultUpkeepSelector) + results, remaining := buf.Dequeue(int64(1), 2, true) require.Equal(t, 2, len(results)) require.Equal(t, 2, remaining) require.True(t, results[0].ID.Cmp(results[1].ID) != 0) - results, remaining = buf.Dequeue(int64(1), 10, 1, 2, DefaultUpkeepSelector) - require.Equal(t, 2, len(results)) + results, remaining = buf.Dequeue(int64(1), 2, true) + require.Equal(t, 0, len(results)) require.Equal(t, 0, remaining) } @@ -97,8 +97,6 @@ func TestLogEventBufferV1_EnqueueViolations(t *testing.T) { logpoller.Log{BlockNumber: 1, TxHash: common.HexToHash("0x2"), LogIndex: 0}, ) - assert.Equal(t, 1, buf.enqueuedBlocks[2]["1"]) - assert.Equal(t, 1, buf.enqueuedBlocks[1]["2"]) assert.True(t, true, logReceived) }) @@ -134,9 +132,6 @@ func TestLogEventBufferV1_EnqueueViolations(t *testing.T) { logpoller.Log{BlockNumber: 3, TxHash: common.HexToHash("0x3b"), LogIndex: 0}, ) - assert.Equal(t, 1, buf.enqueuedBlocks[2]["2"]) - assert.Equal(t, 1, buf.enqueuedBlocks[1]["1"]) - assert.Equal(t, 2, buf.enqueuedBlocks[3]["3"]) assert.True(t, true, logReceived) }) } @@ -153,7 +148,7 @@ func TestLogEventBufferV1_Dequeue(t *testing.T) { { name: "empty", logsInBuffer: map[*big.Int][]logpoller.Log{}, - args: newDequeueArgs(10, 1, 1, 10, nil), + args: newDequeueArgs(10, 1, 1, 10), lookback: 20, results: []logpoller.Log{}, }, @@ -165,7 +160,7 @@ func TestLogEventBufferV1_Dequeue(t *testing.T) { {BlockNumber: 14, TxHash: common.HexToHash("0x15"), LogIndex: 1}, }, }, - args: newDequeueArgs(10, 5, 3, 10, nil), + args: newDequeueArgs(10, 5, 3, 10), lookback: 20, results: []logpoller.Log{ {}, {}, @@ -191,7 +186,7 @@ func TestLogEventBufferV1_Dequeue(t *testing.T) { {BlockNumber: 14, TxHash: common.HexToHash("0x14"), LogIndex: 12}, }, }, - args: newDequeueArgs(10, 5, 2, 10, nil), + args: newDequeueArgs(10, 5, 2, 10), lookback: 20, results: []logpoller.Log{ {}, {}, {}, {}, @@ -204,25 +199,13 @@ func TestLogEventBufferV1_Dequeue(t *testing.T) { big.NewInt(1): append(createDummyLogSequence(2, 0, 12, common.HexToHash("0x12")), createDummyLogSequence(2, 0, 13, common.HexToHash("0x13"))...), big.NewInt(2): append(createDummyLogSequence(2, 10, 12, common.HexToHash("0x12")), createDummyLogSequence(2, 10, 13, common.HexToHash("0x13"))...), }, - args: newDequeueArgs(10, 5, 3, 4, nil), + args: newDequeueArgs(10, 5, 3, 4), lookback: 20, results: []logpoller.Log{ {}, {}, {}, {}, }, remaining: 4, }, - { - name: "with upkeep selector", - logsInBuffer: map[*big.Int][]logpoller.Log{ - big.NewInt(1): { - {BlockNumber: 12, TxHash: common.HexToHash("0x12"), LogIndex: 0}, - {BlockNumber: 14, TxHash: common.HexToHash("0x15"), LogIndex: 1}, - }, - }, - args: newDequeueArgs(10, 5, 5, 10, func(id *big.Int) bool { return false }), - lookback: 20, - results: []logpoller.Log{}, - }, } for _, tc := range tests { @@ -232,7 +215,9 @@ func TestLogEventBufferV1_Dequeue(t *testing.T) { added, dropped := buf.Enqueue(id, logs...) require.Equal(t, len(logs), added+dropped) } - results, remaining := buf.Dequeue(tc.args.block, tc.args.blockRate, tc.args.upkeepLimit, tc.args.maxResults, tc.args.upkeepSelector) + start, _ := getBlockWindow(tc.args.block, tc.args.blockRate) + + results, remaining := buf.Dequeue(start, tc.args.maxResults, true) require.Equal(t, len(tc.results), len(results)) require.Equal(t, tc.remaining, remaining) }) @@ -518,25 +503,20 @@ func TestLogEventBufferV1_BlockWindow(t *testing.T) { } type dequeueArgs struct { - block int64 - blockRate int - upkeepLimit int - maxResults int - upkeepSelector func(id *big.Int) bool + block int64 + blockRate int + upkeepLimit int + maxResults int } -func newDequeueArgs(block int64, blockRate int, upkeepLimit int, maxResults int, upkeepSelector func(id *big.Int) bool) dequeueArgs { +func newDequeueArgs(block int64, blockRate int, upkeepLimit int, maxResults int) dequeueArgs { args := dequeueArgs{ - block: block, - blockRate: blockRate, - upkeepLimit: upkeepLimit, - maxResults: maxResults, - upkeepSelector: upkeepSelector, + block: block, + blockRate: blockRate, + upkeepLimit: upkeepLimit, + maxResults: maxResults, } - if upkeepSelector == nil { - args.upkeepSelector = DefaultUpkeepSelector - } if blockRate == 0 { args.blockRate = 1 } @@ -561,107 +541,3 @@ func createDummyLogSequence(n, startIndex int, block int64, tx common.Hash) []lo } return logs } - -func Test_trackBlockNumbersForUpkeep(t *testing.T) { - buf := NewLogBuffer(logger.TestLogger(t), 10, 20, 1) - - logBuffer := buf.(*logBuffer) - - for _, tc := range []struct { - uid *big.Int - uniqueBlocks map[int64]bool - wantEnqueuedBlocks map[int64]map[string]int - }{ - { - uid: big.NewInt(1), - uniqueBlocks: map[int64]bool{ - 1: true, - 2: true, - 3: true, - }, - wantEnqueuedBlocks: map[int64]map[string]int{ - 1: { - "1": 1, - }, - 2: { - "1": 1, - }, - 3: { - "1": 1, - }, - }, - }, - { - uid: big.NewInt(2), - uniqueBlocks: map[int64]bool{ - 1: true, - 2: true, - 3: true, - }, - wantEnqueuedBlocks: map[int64]map[string]int{ - 1: { - "1": 1, - "2": 1, - }, - 2: { - "1": 1, - "2": 1, - }, - 3: { - "1": 1, - "2": 1, - }, - }, - }, - { - uid: big.NewInt(2), - uniqueBlocks: map[int64]bool{ - 3: true, - 4: true, - }, - wantEnqueuedBlocks: map[int64]map[string]int{ - 1: { - "1": 1, - "2": 1, - }, - 2: { - "1": 1, - "2": 1, - }, - 3: { - "1": 1, - "2": 2, - }, - 4: { - "2": 1, - }, - }, - }, - { - uniqueBlocks: map[int64]bool{ - 3: true, - 4: true, - }, - wantEnqueuedBlocks: map[int64]map[string]int{ - 1: { - "1": 1, - "2": 1, - }, - 2: { - "1": 1, - "2": 1, - }, - 3: { - "1": 1, - "2": 2, - }, - 4: { - "2": 1, - }, - }, - }, - } { - logBuffer.trackBlockNumbersForUpkeep(tc.uid, tc.uniqueBlocks) - assert.Equal(t, tc.wantEnqueuedBlocks, logBuffer.enqueuedBlocks) - } -} diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/factory.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/factory.go index 64833f9269b..19302624b49 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/factory.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/factory.go @@ -63,7 +63,7 @@ func NewOptions(finalityDepth int64, chainID *big.Int) LogTriggersOptions { // NOTE: o.LookbackBlocks should be set only from within tests func (o *LogTriggersOptions) Defaults(finalityDepth int64) { if o.LookbackBlocks == 0 { - lookbackBlocks := int64(200) + lookbackBlocks := int64(100) if lookbackBlocks < finalityDepth { lookbackBlocks = finalityDepth } @@ -86,7 +86,7 @@ func (o *LogTriggersOptions) Defaults(finalityDepth int64) { func (o *LogTriggersOptions) defaultBlockRate() uint32 { switch o.chainID.Int64() { case 42161, 421613, 421614: // Arbitrum - return 4 + return 2 default: return 1 } @@ -94,13 +94,11 @@ func (o *LogTriggersOptions) defaultBlockRate() uint32 { func (o *LogTriggersOptions) defaultLogLimit() uint32 { switch o.chainID.Int64() { - case 42161, 421613, 421614: // Arbitrum - return 1 case 1, 4, 5, 42, 11155111: // Eth return 20 case 10, 420, 56, 97, 137, 80001, 43113, 43114, 8453, 84531: // Optimism, BSC, Polygon, Avax, Base return 5 default: - return 2 + return 1 } } 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 ace17ca2dbc..cdd800071da 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 @@ -6,8 +6,6 @@ import ( "testing" "time" - "github.com/smartcontractkit/chainlink-automation/pkg/v3/types" - "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/accounts/abi/bind/backends" "github.com/ethereum/go-ethereum/common" @@ -17,10 +15,13 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/zap/zapcore" + "github.com/smartcontractkit/chainlink-automation/pkg/v3/types" + ocr2keepers "github.com/smartcontractkit/chainlink-common/pkg/types/automation" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" evmclient "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/headtracker" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/log_upkeep_counter_wrapper" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" @@ -505,7 +506,8 @@ func setupDependencies(t *testing.T, db *sqlx.DB, backend *backends.SimulatedBac RpcBatchSize: 2, KeepFinalizedBlocksDepth: 1000, } - lp := logpoller.NewLogPoller(lorm, ethClient, pollerLggr, lpOpts) + ht := headtracker.NewSimulatedHeadTracker(ethClient, lpOpts.UseFinalityTag, lpOpts.FinalityDepth) + lp := logpoller.NewLogPoller(lorm, ethClient, pollerLggr, ht, lpOpts) return lp, ethClient } diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/log.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/log.go index 9603d6da5be..ba577f57130 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/log.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/log.go @@ -56,18 +56,3 @@ func logID(l logpoller.Log) string { copy(ext.BlockHash[:], l.BlockHash[:]) return hex.EncodeToString(ext.LogIdentifier()) } - -// blockStatistics returns the latest block number from the given logs, and a map of unique block numbers -func blockStatistics(logs ...logpoller.Log) (int64, map[int64]bool) { - var latest int64 - uniqueBlocks := map[int64]bool{} - - for _, l := range logs { - if l.BlockNumber > latest { - latest = l.BlockNumber - } - uniqueBlocks[l.BlockNumber] = true - } - - return latest, uniqueBlocks -} 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 633188c8396..3609d0a4654 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider.go @@ -48,8 +48,6 @@ var ( readerThreads = 4 bufferSyncInterval = 10 * time.Minute - // logLimitMinimum is how low the log limit can go. - logLimitMinimum = 1 ) // LogTriggerConfig is an alias for log trigger config. @@ -253,29 +251,6 @@ func (p *logEventProvider) createPayload(id *big.Int, log logpoller.Log) (ocr2ke return payload, nil } -// getBufferDequeueArgs returns the arguments for the buffer to dequeue logs. -// It adjust the log limit low based on the number of upkeeps to ensure that more upkeeps get slots in the result set. -func (p *logEventProvider) getBufferDequeueArgs() (blockRate, logLimitLow, maxResults, numOfUpkeeps int) { - blockRate, logLimitLow, maxResults, numOfUpkeeps = int(p.opts.BlockRate), int(p.opts.LogLimit), MaxPayloads, p.bufferV1.NumOfUpkeeps() - // in case we have more upkeeps than the max results, we reduce the log limit low - // so that more upkeeps will get slots in the result set. - for numOfUpkeeps > maxResults/logLimitLow { - if logLimitLow == logLimitMinimum { - // Log limit low can't go less than logLimitMinimum (1). - // If some upkeeps are not getting slots in the result set, they supposed to be picked up - // in the next iteration if the range is still applicable. - // TODO: alerts to notify the system is at full capacity. - // TODO: handle this case properly by distributing available slots across upkeeps to avoid - // starvation when log volume is high. - p.lggr.Warnw("The system is at full capacity", "maxResults", maxResults, "numOfUpkeeps", numOfUpkeeps, "logLimitLow", logLimitLow) - break - } - p.lggr.Debugw("Too many upkeeps, reducing the log limit low", "maxResults", maxResults, "numOfUpkeeps", numOfUpkeeps, "logLimitLow_before", logLimitLow) - logLimitLow-- - } - return -} - func (p *logEventProvider) getLogsFromBuffer(latestBlock int64) []ocr2keepers.UpkeepPayload { var payloads []ocr2keepers.UpkeepPayload @@ -286,25 +261,11 @@ func (p *logEventProvider) getLogsFromBuffer(latestBlock int64) []ocr2keepers.Up switch p.opts.BufferVersion { case BufferVersionV1: - // in v1, we use a greedy approach - we keep dequeuing logs until we reach the max results or cover the entire range. - blockRate, logLimitLow, maxResults, _ := p.getBufferDequeueArgs() - for len(payloads) < maxResults && start <= latestBlock { - logs, remaining := p.bufferV1.Dequeue(start, blockRate, logLimitLow, maxResults-len(payloads), DefaultUpkeepSelector) - if len(logs) > 0 { - p.lggr.Debugw("Dequeued logs", "start", start, "latestBlock", latestBlock, "logs", len(logs)) - } - for _, l := range logs { - payload, err := p.createPayload(l.ID, l.Log) - if err == nil { - payloads = append(payloads, payload) - } - } - if remaining > 0 { - p.lggr.Debugw("Remaining logs", "start", start, "latestBlock", latestBlock, "remaining", remaining) - // TODO: handle remaining logs in a better way than consuming the entire window, e.g. do not repeat more than x times - continue - } - start += int64(blockRate) + payloads = p.minimumCommitmentDequeue(latestBlock, start) + + // if we have remaining capacity following minimum commitment dequeue, perform a best effort dequeue + if len(payloads) < MaxPayloads { + payloads = p.bestEffortDequeue(latestBlock, start, payloads) } default: logs := p.buffer.dequeueRange(start, latestBlock, AllowedLogsPerUpkeep, MaxPayloads) @@ -319,6 +280,59 @@ func (p *logEventProvider) getLogsFromBuffer(latestBlock int64) []ocr2keepers.Up return payloads } +// minimumCommitmentDequeue dequeues the minimum number of logs per upkeep per block window, when available. +func (p *logEventProvider) minimumCommitmentDequeue(latestBlock, start int64) []ocr2keepers.UpkeepPayload { + var payloads []ocr2keepers.UpkeepPayload + + blockRate := int(p.opts.BlockRate) + + for len(payloads) < MaxPayloads && start <= latestBlock { + startWindow, _ := getBlockWindow(start, blockRate) + + // dequeue the minimum number logs (log limit, varies by chain) per upkeep for this block window + logs, remaining := p.bufferV1.Dequeue(startWindow, MaxPayloads-len(payloads), true) + if len(logs) > 0 { + p.lggr.Debugw("minimum commitment dequeue", "start", start, "latestBlock", latestBlock, "logs", len(logs), "remaining", remaining) + } + for _, l := range logs { + payload, err := p.createPayload(l.ID, l.Log) + if err == nil { + payloads = append(payloads, payload) + } + } + + start += int64(blockRate) + } + + return payloads +} + +// bestEffortDequeue dequeues the remaining logs from the buffer, after the minimum number of logs +// have been dequeued for every upkeep in every block window. +func (p *logEventProvider) bestEffortDequeue(latestBlock, start int64, payloads []ocr2keepers.UpkeepPayload) []ocr2keepers.UpkeepPayload { + blockRate := int(p.opts.BlockRate) + + for len(payloads) < MaxPayloads && start <= latestBlock { + startWindow, _ := getBlockWindow(start, blockRate) + + // dequeue as many logs as we can, based on remaining capacity, for this block window + logs, remaining := p.bufferV1.Dequeue(startWindow, MaxPayloads-len(payloads), false) + if len(logs) > 0 { + p.lggr.Debugw("best effort dequeue", "start", start, "latestBlock", latestBlock, "logs", len(logs), "remaining", remaining) + } + for _, l := range logs { + payload, err := p.createPayload(l.ID, l.Log) + if err == nil { + payloads = append(payloads, payload) + } + } + + start += int64(blockRate) + } + + return payloads +} + // ReadLogs fetches the logs for the given upkeeps. func (p *logEventProvider) ReadLogs(pctx context.Context, ids ...*big.Int) error { ctx, cancel := context.WithTimeout(pctx, readLogsTimeout) 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 c5bc047e8f4..282f89d370c 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 @@ -8,6 +8,8 @@ import ( "testing" "time" + "github.com/stretchr/testify/assert" + "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" @@ -315,6 +317,352 @@ func newEntry(p *logEventProvider, i int, args ...string) (LogTriggerConfig, upk return cfg, f } +func countRemainingLogs(logs map[int64][]logpoller.Log) int { + count := 0 + for _, logList := range logs { + count += len(logList) + } + return count +} + +func remainingBlockWindowCounts(queues map[string]*upkeepLogQueue, blockRate int) map[int64]int { + blockWindowCounts := map[int64]int{} + + for _, q := range queues { + for blockNumber, logs := range q.logs { + start, _ := getBlockWindow(blockNumber, blockRate) + + blockWindowCounts[start] += len(logs) + } + } + + return blockWindowCounts +} + +func TestLogEventProvider_GetLatestPayloads(t *testing.T) { + t.Run("dequeuing from an empty buffer returns 0 logs", func(t *testing.T) { + opts := NewOptions(200, big.NewInt(42161)) + opts.BufferVersion = "v1" + + logPoller := &mockLogPoller{ + LatestBlockFn: func(ctx context.Context) (int64, error) { + return 100, nil + }, + } + + provider := NewLogProvider(logger.TestLogger(t), logPoller, big.NewInt(42161), &mockedPacker{}, nil, opts) + + ctx := context.Background() + + payloads, err := provider.GetLatestPayloads(ctx) + assert.NoError(t, err) + assert.Equal(t, 0, len(payloads)) + }) + + t.Run("a single log for a single upkeep gets dequeued", func(t *testing.T) { + opts := NewOptions(200, big.NewInt(42161)) + opts.BufferVersion = "v1" + + logPoller := &mockLogPoller{ + LatestBlockFn: func(ctx context.Context) (int64, error) { + return 100, nil + }, + } + + provider := NewLogProvider(logger.TestLogger(t), logPoller, big.NewInt(42161), &mockedPacker{}, nil, opts) + + ctx := context.Background() + + buffer := provider.bufferV1 + + buffer.Enqueue(big.NewInt(1), logpoller.Log{BlockNumber: 1, TxHash: common.HexToHash("0x1"), LogIndex: 0}) + + payloads, err := provider.GetLatestPayloads(ctx) + assert.NoError(t, err) + assert.Equal(t, 1, len(payloads)) + }) + + t.Run("a log per upkeep for 4 upkeeps across 4 blocks (2 separate block windows) is dequeued, for a total of 4 payloads", func(t *testing.T) { + opts := NewOptions(200, big.NewInt(42161)) + opts.BufferVersion = "v1" + + logPoller := &mockLogPoller{ + LatestBlockFn: func(ctx context.Context) (int64, error) { + return 100, nil + }, + } + + provider := NewLogProvider(logger.TestLogger(t), logPoller, big.NewInt(42161), &mockedPacker{}, nil, opts) + + ctx := context.Background() + + buffer := provider.bufferV1 + + buffer.Enqueue(big.NewInt(1), logpoller.Log{BlockNumber: 1, TxHash: common.HexToHash("0x1"), LogIndex: 0}) + buffer.Enqueue(big.NewInt(2), logpoller.Log{BlockNumber: 2, TxHash: common.HexToHash("0x2"), LogIndex: 0}) + buffer.Enqueue(big.NewInt(3), logpoller.Log{BlockNumber: 3, TxHash: common.HexToHash("0x3"), LogIndex: 0}) + buffer.Enqueue(big.NewInt(4), logpoller.Log{BlockNumber: 4, TxHash: common.HexToHash("0x4"), LogIndex: 0}) + + payloads, err := provider.GetLatestPayloads(ctx) + assert.NoError(t, err) + assert.Equal(t, 4, len(payloads)) + }) + + t.Run("100 logs are dequeued for a single upkeep, 1 log for every block window across 100 blocks followed by best effort", func(t *testing.T) { + opts := NewOptions(200, big.NewInt(42161)) + opts.BufferVersion = "v1" + + logPoller := &mockLogPoller{ + LatestBlockFn: func(ctx context.Context) (int64, error) { + return 101, nil + }, + } + + provider := NewLogProvider(logger.TestLogger(t), logPoller, big.NewInt(42161), &mockedPacker{}, nil, opts) + + ctx := context.Background() + + buffer := provider.bufferV1.(*logBuffer) + + for i := 0; i < 100; i++ { + buffer.Enqueue(big.NewInt(1), logpoller.Log{BlockNumber: int64(i + 1), TxHash: common.HexToHash(fmt.Sprintf("0x%d", i+1)), LogIndex: 0}) + } + + assert.Equal(t, 100, countRemainingLogs(buffer.queues["1"].logs)) + + payloads, err := provider.GetLatestPayloads(ctx) + assert.NoError(t, err) + assert.Equal(t, 100, len(payloads)) + + assert.Equal(t, 0, countRemainingLogs(buffer.queues["1"].logs)) + }) + + t.Run("100 logs are dequeued for two upkeeps, 25 logs each as min commitment (50 logs total best effort), followed by best effort", func(t *testing.T) { + opts := NewOptions(200, big.NewInt(42161)) + opts.BufferVersion = "v1" + + logPoller := &mockLogPoller{ + LatestBlockFn: func(ctx context.Context) (int64, error) { + return 101, nil + }, + } + + provider := NewLogProvider(logger.TestLogger(t), logPoller, big.NewInt(42161), &mockedPacker{}, nil, opts) + + ctx := context.Background() + + buffer := provider.bufferV1.(*logBuffer) + + for i := 0; i < 100; i++ { + buffer.Enqueue(big.NewInt(1), logpoller.Log{BlockNumber: int64(i + 1), TxHash: common.HexToHash(fmt.Sprintf("0x1%d", i+1)), LogIndex: 0}) + buffer.Enqueue(big.NewInt(2), logpoller.Log{BlockNumber: int64(i + 1), TxHash: common.HexToHash(fmt.Sprintf("0x2%d", i+1)), LogIndex: 0}) + } + + assert.Equal(t, 100, countRemainingLogs(buffer.queues["1"].logs)) + assert.Equal(t, 100, countRemainingLogs(buffer.queues["2"].logs)) + + payloads, err := provider.GetLatestPayloads(ctx) + assert.NoError(t, err) + assert.Equal(t, 100, len(payloads)) + + assert.Equal(t, 50, countRemainingLogs(buffer.queues["1"].logs)) + assert.Equal(t, 50, countRemainingLogs(buffer.queues["2"].logs)) + + windowCount := remainingBlockWindowCounts(buffer.queues, 4) + + assert.Equal(t, 2, windowCount[0]) + assert.Equal(t, 4, windowCount[48]) + assert.Equal(t, 4, windowCount[96]) + + // the second dequeue call will retrieve the remaining 100 logs and exhaust the queues + payloads, err = provider.GetLatestPayloads(ctx) + assert.NoError(t, err) + assert.Equal(t, 100, len(payloads)) + + assert.Equal(t, 0, countRemainingLogs(buffer.queues["1"].logs)) + assert.Equal(t, 0, countRemainingLogs(buffer.queues["2"].logs)) + + windowCount = remainingBlockWindowCounts(buffer.queues, 4) + + assert.Equal(t, 0, windowCount[0]) + assert.Equal(t, 0, windowCount[48]) + assert.Equal(t, 0, windowCount[96]) + }) + + t.Run("minimum guaranteed for all windows including an incomplete window followed by best effort", func(t *testing.T) { + opts := NewOptions(200, big.NewInt(42161)) + opts.BufferVersion = "v1" + + logPoller := &mockLogPoller{ + LatestBlockFn: func(ctx context.Context) (int64, error) { + return 102, nil + }, + } + + provider := NewLogProvider(logger.TestLogger(t), logPoller, big.NewInt(42161), &mockedPacker{}, nil, opts) + + ctx := context.Background() + + buffer := provider.bufferV1.(*logBuffer) + + for i := 0; i < 102; i++ { + buffer.Enqueue(big.NewInt(1), logpoller.Log{BlockNumber: int64(i + 1), TxHash: common.HexToHash(fmt.Sprintf("0x1%d", i+1)), LogIndex: 0}) + buffer.Enqueue(big.NewInt(2), logpoller.Log{BlockNumber: int64(i + 1), TxHash: common.HexToHash(fmt.Sprintf("0x2%d", i+1)), LogIndex: 0}) + } + + assert.Equal(t, 102, countRemainingLogs(buffer.queues["1"].logs)) + assert.Equal(t, 102, countRemainingLogs(buffer.queues["2"].logs)) + + payloads, err := provider.GetLatestPayloads(ctx) + assert.NoError(t, err) + assert.Equal(t, 100, len(payloads)) + + windowCount := remainingBlockWindowCounts(buffer.queues, 4) + + assert.Equal(t, 6, windowCount[100]) + + payloads, err = provider.GetLatestPayloads(ctx) + assert.NoError(t, err) + assert.Equal(t, 100, len(payloads)) + + // upkeep 1 has had the minimum number of logs dequeued on the latest (incomplete) window + assert.Equal(t, 1, buffer.queues["1"].dequeued[100]) + // upkeep 2 has had the minimum number of logs dequeued on the latest (incomplete) window + assert.Equal(t, 1, buffer.queues["2"].dequeued[100]) + + // the third dequeue call will retrieve the remaining 100 logs and exhaust the queues + payloads, err = provider.GetLatestPayloads(ctx) + assert.NoError(t, err) + assert.Equal(t, 4, len(payloads)) + + assert.Equal(t, 0, countRemainingLogs(buffer.queues["1"].logs)) + assert.Equal(t, 0, countRemainingLogs(buffer.queues["2"].logs)) + + windowCount = remainingBlockWindowCounts(buffer.queues, 4) + + assert.Equal(t, 0, windowCount[0]) + assert.Equal(t, 0, windowCount[28]) + assert.Equal(t, 0, windowCount[32]) + assert.Equal(t, 0, windowCount[36]) + assert.Equal(t, 0, windowCount[48]) + assert.Equal(t, 0, windowCount[96]) + assert.Equal(t, 0, windowCount[100]) + }) + + t.Run("min dequeue followed by best effort followed by reorg followed by best effort", func(t *testing.T) { + opts := NewOptions(200, big.NewInt(42161)) + opts.BufferVersion = "v1" + + logPoller := &mockLogPoller{ + LatestBlockFn: func(ctx context.Context) (int64, error) { + return 101, nil + }, + } + + provider := NewLogProvider(logger.TestLogger(t), logPoller, big.NewInt(42161), &mockedPacker{}, nil, opts) + + ctx := context.Background() + + buffer := provider.bufferV1.(*logBuffer) + + for i := 0; i < 100; i++ { + buffer.Enqueue(big.NewInt(1), logpoller.Log{BlockNumber: int64(i + 1), TxHash: common.HexToHash(fmt.Sprintf("0x1%d", i+1)), LogIndex: 0}) + buffer.Enqueue(big.NewInt(2), logpoller.Log{BlockNumber: int64(i + 1), TxHash: common.HexToHash(fmt.Sprintf("0x2%d", i+1)), LogIndex: 0}) + } + + assert.Equal(t, 100, countRemainingLogs(buffer.queues["1"].logs)) + assert.Equal(t, 100, countRemainingLogs(buffer.queues["2"].logs)) + + payloads, err := provider.GetLatestPayloads(ctx) + assert.NoError(t, err) + assert.Equal(t, 100, len(payloads)) + + windowCount := remainingBlockWindowCounts(buffer.queues, 4) + + assert.Equal(t, 4, windowCount[28]) + + // reorg block 28 + buffer.Enqueue(big.NewInt(1), logpoller.Log{BlockNumber: int64(28), TxHash: common.HexToHash(fmt.Sprintf("0xreorg1%d", 28)), LogIndex: 0, BlockHash: common.BytesToHash([]byte("reorg"))}) + buffer.Enqueue(big.NewInt(2), logpoller.Log{BlockNumber: int64(28), TxHash: common.HexToHash(fmt.Sprintf("0xreorg2%d", 28)), LogIndex: 0, BlockHash: common.BytesToHash([]byte("reorg"))}) + + windowCount = remainingBlockWindowCounts(buffer.queues, 4) + + assert.Equal(t, 6, windowCount[28]) + + // the second dequeue call will retrieve the remaining 100 logs and exhaust the queues + payloads, err = provider.GetLatestPayloads(ctx) + assert.NoError(t, err) + assert.Equal(t, 100, len(payloads)) + + windowCount = remainingBlockWindowCounts(buffer.queues, 4) + + assert.Equal(t, 0, windowCount[0]) + assert.Equal(t, 0, windowCount[28]) + assert.Equal(t, 0, windowCount[32]) + assert.Equal(t, 0, windowCount[36]) + assert.Equal(t, 0, windowCount[48]) + assert.Equal(t, 2, windowCount[96]) // these 2 remaining logs are because of the 2 re orgd logs taking up dequeue space + }) + + t.Run("sparsely populated blocks", func(t *testing.T) { + opts := NewOptions(200, big.NewInt(42161)) + opts.BufferVersion = "v1" + + logPoller := &mockLogPoller{ + LatestBlockFn: func(ctx context.Context) (int64, error) { + return 100, nil + }, + } + + provider := NewLogProvider(logger.TestLogger(t), logPoller, big.NewInt(42161), &mockedPacker{}, nil, opts) + + ctx := context.Background() + + buffer := provider.bufferV1.(*logBuffer) + + upkeepOmittedOnBlocks := map[int64][]int{ + 1: {5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100}, // upkeep 1 won't have logs on 20 blocks + 2: {2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100}, // upkeep 2 won't have logs on 50 blocks + 3: {3, 13, 23, 33, 43, 53, 63, 73, 83, 93}, // upkeep 3 won't appear on 10 blocks + 4: {1, 25, 50, 75, 100}, // upkeep 4 won't appear on 5 blocks + 5: {}, // upkeep 5 appears on all blocks + } + + for upkeep, skipBlocks := range upkeepOmittedOnBlocks { + blockLoop: + for i := 0; i < 100; i++ { + for _, block := range skipBlocks { + if block == i+1 { + continue blockLoop + } + } + buffer.Enqueue(big.NewInt(upkeep), logpoller.Log{BlockNumber: int64(i + 1), TxHash: common.HexToHash(fmt.Sprintf("0x1%d", i+1)), LogIndex: 0}) + } + } + + assert.Equal(t, 80, countRemainingLogs(buffer.queues["1"].logs)) + assert.Equal(t, 50, countRemainingLogs(buffer.queues["2"].logs)) + assert.Equal(t, 90, countRemainingLogs(buffer.queues["3"].logs)) + assert.Equal(t, 95, countRemainingLogs(buffer.queues["4"].logs)) + assert.Equal(t, 100, countRemainingLogs(buffer.queues["5"].logs)) + + // perform two dequeues + payloads, err := provider.GetLatestPayloads(ctx) + assert.NoError(t, err) + assert.Equal(t, 100, len(payloads)) + + payloads, err = provider.GetLatestPayloads(ctx) + assert.NoError(t, err) + assert.Equal(t, 100, len(payloads)) + + assert.Equal(t, 40, countRemainingLogs(buffer.queues["1"].logs)) + assert.Equal(t, 10, countRemainingLogs(buffer.queues["2"].logs)) + assert.Equal(t, 50, countRemainingLogs(buffer.queues["3"].logs)) + assert.Equal(t, 55, countRemainingLogs(buffer.queues["4"].logs)) + assert.Equal(t, 60, countRemainingLogs(buffer.queues["5"].logs)) + }) +} + type mockedPacker struct { } 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 f00459dee67..9e41008ed83 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/recoverer.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/recoverer.go @@ -149,14 +149,14 @@ func (r *logRecoverer) Start(ctx context.Context) error { }) r.threadCtrl.Go(func(ctx context.Context) { - cleanupTicker := time.NewTicker(utils.WithJitter(GCInterval)) + cleanupTicker := services.NewTicker(GCInterval) defer cleanupTicker.Stop() for { select { case <-cleanupTicker.C: r.clean(ctx) - cleanupTicker.Reset(utils.WithJitter(GCInterval)) + cleanupTicker.Reset() case <-ctx.Done(): return } diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/v03/v03_request_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/v03/v03_request_test.go index be99296d153..cce00646aeb 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/v03/v03_request_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/v03/v03_request_test.go @@ -232,6 +232,7 @@ func TestV03_DoMercuryRequestV03_MultipleFeedsSuccess(t *testing.T) { } func TestV03_DoMercuryRequestV03_Timeout(t *testing.T) { + t.Skip("TODO: MERC-5965") t.Parallel() upkeepId, _ := new(big.Int).SetString("88786950015966611018675766524283132478093844178961698330929478019253453382042", 10) pluginRetryKey := "88786950015966611018675766524283132478093844178961698330929478019253453382042|34" diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mocks/http_client.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mocks/http_client.go index ab8e9f04940..8c969040868 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mocks/http_client.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mocks/http_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -13,6 +13,14 @@ type HttpClient struct { mock.Mock } +type HttpClient_Expecter struct { + mock *mock.Mock +} + +func (_m *HttpClient) EXPECT() *HttpClient_Expecter { + return &HttpClient_Expecter{mock: &_m.Mock} +} + // Do provides a mock function with given fields: req func (_m *HttpClient) Do(req *http.Request) (*http.Response, error) { ret := _m.Called(req) @@ -43,6 +51,34 @@ func (_m *HttpClient) Do(req *http.Request) (*http.Response, error) { return r0, r1 } +// HttpClient_Do_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Do' +type HttpClient_Do_Call struct { + *mock.Call +} + +// Do is a helper method to define mock.On call +// - req *http.Request +func (_e *HttpClient_Expecter) Do(req interface{}) *HttpClient_Do_Call { + return &HttpClient_Do_Call{Call: _e.mock.On("Do", req)} +} + +func (_c *HttpClient_Do_Call) Run(run func(req *http.Request)) *HttpClient_Do_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*http.Request)) + }) + return _c +} + +func (_c *HttpClient_Do_Call) Return(_a0 *http.Response, _a1 error) *HttpClient_Do_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *HttpClient_Do_Call) RunAndReturn(run func(*http.Request) (*http.Response, error)) *HttpClient_Do_Call { + _c.Call.Return(run) + return _c +} + // NewHttpClient creates a new instance of HttpClient. 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 NewHttpClient(t interface { 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 c68e7094cca..9a4d09a0b15 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mocks/registry.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mocks/registry.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -21,6 +21,14 @@ type Registry struct { mock.Mock } +type Registry_Expecter struct { + mock *mock.Mock +} + +func (_m *Registry) EXPECT() *Registry_Expecter { + return &Registry_Expecter{mock: &_m.Mock} +} + // 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_automation_v21_plus_common.CheckCallback, error) { ret := _m.Called(opts, id, values, extraData) @@ -49,6 +57,37 @@ func (_m *Registry) CheckCallback(opts *bind.CallOpts, id *big.Int, values [][]b return r0, r1 } +// Registry_CheckCallback_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckCallback' +type Registry_CheckCallback_Call struct { + *mock.Call +} + +// CheckCallback is a helper method to define mock.On call +// - opts *bind.CallOpts +// - id *big.Int +// - values [][]byte +// - extraData []byte +func (_e *Registry_Expecter) CheckCallback(opts interface{}, id interface{}, values interface{}, extraData interface{}) *Registry_CheckCallback_Call { + return &Registry_CheckCallback_Call{Call: _e.mock.On("CheckCallback", opts, id, values, extraData)} +} + +func (_c *Registry_CheckCallback_Call) Run(run func(opts *bind.CallOpts, id *big.Int, values [][]byte, extraData []byte)) *Registry_CheckCallback_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts), args[1].(*big.Int), args[2].([][]byte), args[3].([]byte)) + }) + return _c +} + +func (_c *Registry_CheckCallback_Call) Return(_a0 i_automation_v21_plus_common.CheckCallback, _a1 error) *Registry_CheckCallback_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Registry_CheckCallback_Call) RunAndReturn(run func(*bind.CallOpts, *big.Int, [][]byte, []byte) (i_automation_v21_plus_common.CheckCallback, error)) *Registry_CheckCallback_Call { + _c.Call.Return(run) + return _c +} + // GetActiveUpkeepIDs provides a mock function with given fields: opts, startIndex, maxCount func (_m *Registry) GetActiveUpkeepIDs(opts *bind.CallOpts, startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) { ret := _m.Called(opts, startIndex, maxCount) @@ -79,6 +118,36 @@ func (_m *Registry) GetActiveUpkeepIDs(opts *bind.CallOpts, startIndex *big.Int, return r0, r1 } +// Registry_GetActiveUpkeepIDs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetActiveUpkeepIDs' +type Registry_GetActiveUpkeepIDs_Call struct { + *mock.Call +} + +// GetActiveUpkeepIDs is a helper method to define mock.On call +// - opts *bind.CallOpts +// - startIndex *big.Int +// - maxCount *big.Int +func (_e *Registry_Expecter) GetActiveUpkeepIDs(opts interface{}, startIndex interface{}, maxCount interface{}) *Registry_GetActiveUpkeepIDs_Call { + return &Registry_GetActiveUpkeepIDs_Call{Call: _e.mock.On("GetActiveUpkeepIDs", opts, startIndex, maxCount)} +} + +func (_c *Registry_GetActiveUpkeepIDs_Call) Run(run func(opts *bind.CallOpts, startIndex *big.Int, maxCount *big.Int)) *Registry_GetActiveUpkeepIDs_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts), args[1].(*big.Int), args[2].(*big.Int)) + }) + return _c +} + +func (_c *Registry_GetActiveUpkeepIDs_Call) Return(_a0 []*big.Int, _a1 error) *Registry_GetActiveUpkeepIDs_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Registry_GetActiveUpkeepIDs_Call) RunAndReturn(run func(*bind.CallOpts, *big.Int, *big.Int) ([]*big.Int, error)) *Registry_GetActiveUpkeepIDs_Call { + _c.Call.Return(run) + return _c +} + // GetState provides a mock function with given fields: opts func (_m *Registry) GetState(opts *bind.CallOpts) (i_automation_v21_plus_common.GetState, error) { ret := _m.Called(opts) @@ -107,6 +176,34 @@ func (_m *Registry) GetState(opts *bind.CallOpts) (i_automation_v21_plus_common. return r0, r1 } +// Registry_GetState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetState' +type Registry_GetState_Call struct { + *mock.Call +} + +// GetState is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *Registry_Expecter) GetState(opts interface{}) *Registry_GetState_Call { + return &Registry_GetState_Call{Call: _e.mock.On("GetState", opts)} +} + +func (_c *Registry_GetState_Call) Run(run func(opts *bind.CallOpts)) *Registry_GetState_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *Registry_GetState_Call) Return(_a0 i_automation_v21_plus_common.GetState, _a1 error) *Registry_GetState_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Registry_GetState_Call) RunAndReturn(run func(*bind.CallOpts) (i_automation_v21_plus_common.GetState, error)) *Registry_GetState_Call { + _c.Call.Return(run) + return _c +} + // GetUpkeep provides a mock function with given fields: opts, id func (_m *Registry) GetUpkeep(opts *bind.CallOpts, id *big.Int) (i_automation_v21_plus_common.IAutomationV21PlusCommonUpkeepInfoLegacy, error) { ret := _m.Called(opts, id) @@ -135,6 +232,35 @@ func (_m *Registry) GetUpkeep(opts *bind.CallOpts, id *big.Int) (i_automation_v2 return r0, r1 } +// Registry_GetUpkeep_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUpkeep' +type Registry_GetUpkeep_Call struct { + *mock.Call +} + +// GetUpkeep is a helper method to define mock.On call +// - opts *bind.CallOpts +// - id *big.Int +func (_e *Registry_Expecter) GetUpkeep(opts interface{}, id interface{}) *Registry_GetUpkeep_Call { + return &Registry_GetUpkeep_Call{Call: _e.mock.On("GetUpkeep", opts, id)} +} + +func (_c *Registry_GetUpkeep_Call) Run(run func(opts *bind.CallOpts, id *big.Int)) *Registry_GetUpkeep_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts), args[1].(*big.Int)) + }) + return _c +} + +func (_c *Registry_GetUpkeep_Call) Return(_a0 i_automation_v21_plus_common.IAutomationV21PlusCommonUpkeepInfoLegacy, _a1 error) *Registry_GetUpkeep_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Registry_GetUpkeep_Call) RunAndReturn(run func(*bind.CallOpts, *big.Int) (i_automation_v21_plus_common.IAutomationV21PlusCommonUpkeepInfoLegacy, error)) *Registry_GetUpkeep_Call { + _c.Call.Return(run) + return _c +} + // GetUpkeepPrivilegeConfig provides a mock function with given fields: opts, upkeepId func (_m *Registry) GetUpkeepPrivilegeConfig(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) { ret := _m.Called(opts, upkeepId) @@ -165,6 +291,35 @@ func (_m *Registry) GetUpkeepPrivilegeConfig(opts *bind.CallOpts, upkeepId *big. return r0, r1 } +// Registry_GetUpkeepPrivilegeConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUpkeepPrivilegeConfig' +type Registry_GetUpkeepPrivilegeConfig_Call struct { + *mock.Call +} + +// GetUpkeepPrivilegeConfig is a helper method to define mock.On call +// - opts *bind.CallOpts +// - upkeepId *big.Int +func (_e *Registry_Expecter) GetUpkeepPrivilegeConfig(opts interface{}, upkeepId interface{}) *Registry_GetUpkeepPrivilegeConfig_Call { + return &Registry_GetUpkeepPrivilegeConfig_Call{Call: _e.mock.On("GetUpkeepPrivilegeConfig", opts, upkeepId)} +} + +func (_c *Registry_GetUpkeepPrivilegeConfig_Call) Run(run func(opts *bind.CallOpts, upkeepId *big.Int)) *Registry_GetUpkeepPrivilegeConfig_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts), args[1].(*big.Int)) + }) + return _c +} + +func (_c *Registry_GetUpkeepPrivilegeConfig_Call) Return(_a0 []byte, _a1 error) *Registry_GetUpkeepPrivilegeConfig_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Registry_GetUpkeepPrivilegeConfig_Call) RunAndReturn(run func(*bind.CallOpts, *big.Int) ([]byte, error)) *Registry_GetUpkeepPrivilegeConfig_Call { + _c.Call.Return(run) + return _c +} + // GetUpkeepTriggerConfig provides a mock function with given fields: opts, upkeepId func (_m *Registry) GetUpkeepTriggerConfig(opts *bind.CallOpts, upkeepId *big.Int) ([]byte, error) { ret := _m.Called(opts, upkeepId) @@ -195,6 +350,35 @@ func (_m *Registry) GetUpkeepTriggerConfig(opts *bind.CallOpts, upkeepId *big.In return r0, r1 } +// Registry_GetUpkeepTriggerConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUpkeepTriggerConfig' +type Registry_GetUpkeepTriggerConfig_Call struct { + *mock.Call +} + +// GetUpkeepTriggerConfig is a helper method to define mock.On call +// - opts *bind.CallOpts +// - upkeepId *big.Int +func (_e *Registry_Expecter) GetUpkeepTriggerConfig(opts interface{}, upkeepId interface{}) *Registry_GetUpkeepTriggerConfig_Call { + return &Registry_GetUpkeepTriggerConfig_Call{Call: _e.mock.On("GetUpkeepTriggerConfig", opts, upkeepId)} +} + +func (_c *Registry_GetUpkeepTriggerConfig_Call) Run(run func(opts *bind.CallOpts, upkeepId *big.Int)) *Registry_GetUpkeepTriggerConfig_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts), args[1].(*big.Int)) + }) + return _c +} + +func (_c *Registry_GetUpkeepTriggerConfig_Call) Return(_a0 []byte, _a1 error) *Registry_GetUpkeepTriggerConfig_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Registry_GetUpkeepTriggerConfig_Call) RunAndReturn(run func(*bind.CallOpts, *big.Int) ([]byte, error)) *Registry_GetUpkeepTriggerConfig_Call { + _c.Call.Return(run) + return _c +} + // ParseLog provides a mock function with given fields: log func (_m *Registry) ParseLog(log types.Log) (generated.AbigenLog, error) { ret := _m.Called(log) @@ -225,6 +409,34 @@ func (_m *Registry) ParseLog(log types.Log) (generated.AbigenLog, error) { return r0, r1 } +// Registry_ParseLog_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseLog' +type Registry_ParseLog_Call struct { + *mock.Call +} + +// ParseLog is a helper method to define mock.On call +// - log types.Log +func (_e *Registry_Expecter) ParseLog(log interface{}) *Registry_ParseLog_Call { + return &Registry_ParseLog_Call{Call: _e.mock.On("ParseLog", log)} +} + +func (_c *Registry_ParseLog_Call) Run(run func(log types.Log)) *Registry_ParseLog_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *Registry_ParseLog_Call) Return(_a0 generated.AbigenLog, _a1 error) *Registry_ParseLog_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Registry_ParseLog_Call) RunAndReturn(run func(types.Log) (generated.AbigenLog, error)) *Registry_ParseLog_Call { + _c.Call.Return(run) + return _c +} + // NewRegistry creates a new instance of Registry. 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 NewRegistry(t interface { diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/registry.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/registry.go index cb7e689b042..16b8627cf74 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/registry.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/registry.go @@ -66,7 +66,6 @@ var ( logEventLookback int64 = 250 ) -//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) (ac.GetState, error) @@ -77,7 +76,6 @@ type Registry interface { ParseLog(log coreTypes.Log) (generated.AbigenLog, error) } -//go:generate mockery --quiet --name HttpClient --output ./mocks/ --case=underscore type HttpClient interface { Do(req *http.Request) (*http.Response, error) } diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/registry_check_pipeline.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/registry_check_pipeline.go index f14c9865c35..6927f5ba4ca 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/registry_check_pipeline.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/registry_check_pipeline.go @@ -233,17 +233,22 @@ func (r *EvmRegistry) checkUpkeeps(ctx context.Context, payloads []ocr2keepers.U indices[len(checkReqs)] = i results[i] = encoding.GetIneligibleCheckResultWithoutPerformData(p, encoding.UpkeepFailureReasonNone, encoding.NoPipelineError, false) + args := []interface{}{ + map[string]interface{}{ + "from": zeroAddress, + "to": r.addr.Hex(), + "data": hexutil.Bytes(payload), + }, + } + + if opts.BlockNumber != nil { + args = append(args, hexutil.EncodeBig(opts.BlockNumber)) + } + var result string checkReqs = append(checkReqs, rpc.BatchElem{ Method: "eth_call", - Args: []interface{}{ - map[string]interface{}{ - "from": zeroAddress, - "to": r.addr.Hex(), - "data": hexutil.Bytes(payload), - }, - hexutil.EncodeBig(opts.BlockNumber), - }, + Args: args, Result: &result, }) @@ -334,17 +339,23 @@ func (r *EvmRegistry) simulatePerformUpkeeps(ctx context.Context, checkResults [ } opts := r.buildCallOpts(ctx, block) + + args := []interface{}{ + map[string]interface{}{ + "from": zeroAddress, + "to": r.addr.Hex(), + "data": hexutil.Bytes(payload), + }, + } + + if opts.BlockNumber != nil { + args = append(args, hexutil.EncodeBig(opts.BlockNumber)) + } + var result string performReqs = append(performReqs, rpc.BatchElem{ Method: "eth_call", - Args: []interface{}{ - map[string]interface{}{ - "from": zeroAddress, - "to": r.addr.Hex(), - "data": hexutil.Bytes(payload), - }, - hexutil.EncodeBig(opts.BlockNumber), - }, + Args: args, Result: &result, }) diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeepstate/store.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeepstate/store.go index bf7a62aad48..e6486ca56ae 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeepstate/store.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/upkeepstate/store.go @@ -108,7 +108,7 @@ func (u *upkeepStateStore) Start(pctx context.Context) error { u.lggr.Debug("Starting upkeep state store") u.threadCtrl.Go(func(ctx context.Context) { - ticker := time.NewTicker(utils.WithJitter(u.cleanCadence)) + ticker := services.NewTicker(u.cleanCadence) defer ticker.Stop() flushTicker := newTickerFn(utils.WithJitter(flushCadence)) @@ -120,7 +120,7 @@ func (u *upkeepStateStore) Start(pctx context.Context) error { if err := u.cleanup(ctx); err != nil { u.lggr.Errorw("unable to clean old state values", "err", err) } - ticker.Reset(utils.WithJitter(u.cleanCadence)) + ticker.Reset() case <-flushTicker.C: u.flush(ctx) flushTicker.Reset(utils.WithJitter(flushCadence)) diff --git a/core/services/ocr2/plugins/ocr2keeper/integration_21_test.go b/core/services/ocr2/plugins/ocr2keeper/integration_21_test.go index cd992b1ea61..a79237cf046 100644 --- a/core/services/ocr2/plugins/ocr2keeper/integration_21_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/integration_21_test.go @@ -1166,6 +1166,7 @@ func (c *feedLookupUpkeepController) EmitEvents( ctx := testutils.Context(t) for i := 0; i < count && ctx.Err() == nil; i++ { + blockBeforeOrder, _ := backend.BlockByHash(ctx, backend.Commit()) _, err := c.protocol.ExecuteLimitOrder(c.protocolOwner, big.NewInt(1000), big.NewInt(10000), c.logSrcAddr) require.NoError(t, err, "no error expected from limit order exec") @@ -1182,7 +1183,7 @@ func (c *feedLookupUpkeepController) EmitEvents( iter, _ := c.protocol.FilterLimitOrderExecuted( &bind.FilterOpts{ Context: testutils.Context(t), - Start: block.NumberU64() - 1, + Start: blockBeforeOrder.NumberU64() - 1, }, []*big.Int{big.NewInt(1000)}, []*big.Int{big.NewInt(10000)}, diff --git a/core/services/ocr2/plugins/ocr2vrf/config/config.go b/core/services/ocr2/plugins/ocr2vrf/config/config.go deleted file mode 100644 index 9df02c23344..00000000000 --- a/core/services/ocr2/plugins/ocr2vrf/config/config.go +++ /dev/null @@ -1,57 +0,0 @@ -package config - -import ( - "github.com/pkg/errors" - - "github.com/smartcontractkit/chainlink/v2/core/services/keystore" - dkgconfig "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/dkg/config" -) - -// PluginConfig contains custom arguments for the OCR2VRF plugin. -// -// The OCR2VRF plugin runs a DKG under the hood, so it will need both -// DKG and OCR2VRF configuration fields. -// -// The DKG contract address is provided in the plugin configuration, -// however the OCR2VRF contract address is provided in the OCR2 job spec -// under the 'contractID' key. -type PluginConfig struct { - // DKG configuration fields. - DKGEncryptionPublicKey string `json:"dkgEncryptionPublicKey"` - DKGSigningPublicKey string `json:"dkgSigningPublicKey"` - DKGKeyID string `json:"dkgKeyID"` - DKGContractAddress string `json:"dkgContractAddress"` - - // VRF configuration fields - VRFCoordinatorAddress string `json:"vrfCoordinatorAddress"` - LinkEthFeedAddress string `json:"linkEthFeedAddress"` -} - -// ValidatePluginConfig validates that the given OCR2VRF plugin configuration is correct. -func ValidatePluginConfig(config PluginConfig, dkgSignKs keystore.DKGSign, dkgEncryptKs keystore.DKGEncrypt) error { - err := dkgconfig.ValidatePluginConfig(dkgconfig.PluginConfig{ - EncryptionPublicKey: config.DKGEncryptionPublicKey, - SigningPublicKey: config.DKGSigningPublicKey, - KeyID: config.DKGKeyID, - }, dkgSignKs, dkgEncryptKs) - if err != nil { - return err - } - - // NOTE: a better validation would be to call a method on the on-chain contract pointed to by this - // address. - if config.DKGContractAddress == "" { - return errors.New("dkgContractAddress field must be provided") - } - - if config.VRFCoordinatorAddress == "" { - return errors.New("vrfCoordinatorAddress field must be provided") - } - - // NOTE: similar to the above. - if config.LinkEthFeedAddress == "" { - return errors.New("linkEthFieldAddress field must be provided") - } - - return nil -} diff --git a/core/services/ocr2/plugins/ocr2vrf/coordinator/coordinator.go b/core/services/ocr2/plugins/ocr2vrf/coordinator/coordinator.go deleted file mode 100644 index f77b99b3568..00000000000 --- a/core/services/ocr2/plugins/ocr2vrf/coordinator/coordinator.go +++ /dev/null @@ -1,1156 +0,0 @@ -package coordinator - -import ( - "bytes" - "context" - "encoding/binary" - "encoding/json" - "fmt" - "math/big" - "sort" - "time" - - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/core/types" - "github.com/pkg/errors" - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/promauto" - "golang.org/x/exp/maps" - "google.golang.org/protobuf/proto" - - "github.com/smartcontractkit/libocr/commontypes" - ocr2Types "github.com/smartcontractkit/libocr/offchainreporting2plus/types" - - "github.com/smartcontractkit/chainlink-common/pkg/utils/mathutil" - - "github.com/smartcontractkit/chainlink-vrf/dkg" - ocr2vrftypes "github.com/smartcontractkit/chainlink-vrf/types" - - evmclient "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" - "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" - evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" - dkg_wrapper "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/dkg" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/vrf_beacon" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/vrf_coordinator" - 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" - ocr2vrfconfig "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2vrf/config" -) - -var _ ocr2vrftypes.CoordinatorInterface = &coordinator{} - -var ( - dkgABI = evmtypes.MustGetABI(dkg_wrapper.DKGMetaData.ABI) - vrfBeaconABI = evmtypes.MustGetABI(vrf_beacon.VRFBeaconMetaData.ABI) - vrfCoordinatorABI = evmtypes.MustGetABI(vrf_coordinator.VRFCoordinatorMetaData.ABI) - counterBuckets = []float64{ - 0, - 1, - 2, - 4, - 8, - 16, - 32, - 64, - 128, - 256, - 512, - 1024, - 2048, - } - timingBuckets = []float64{ - float64(1 * time.Millisecond), - float64(5 * time.Millisecond), - float64(10 * time.Millisecond), - float64(50 * time.Millisecond), - float64(100 * time.Millisecond), - float64(500 * time.Millisecond), - float64(time.Second), - float64(5 * time.Second), - float64(10 * time.Second), - float64(30 * time.Second), - } - promLabels = []string{"evmChainID", "oracleID", "configDigest"} - promBlocksToReport = promauto.NewHistogramVec(prometheus.HistogramOpts{ - Name: "ocr2vrf_coordinator_blocks_to_report", - Help: "Number of unfulfilled and in-flight blocks that fit in current report in reportBlocks", - Buckets: counterBuckets, - }, promLabels) - promCallbacksToReport = promauto.NewHistogramVec(prometheus.HistogramOpts{ - Name: "ocr2vrf_coordinator_callbacks_to_report", - Help: "Number of unfulfilled and in-flight callbacks fit in current report in reportBlocks", - Buckets: counterBuckets, - }, promLabels) - promBlocksInReport = promauto.NewHistogramVec(prometheus.HistogramOpts{ - Name: "ocr2vrf_coordinator_blocks_in_report", - Help: "Number of blocks found in reportWillBeTransmitted", - Buckets: counterBuckets, - }, promLabels) - promCallbacksInReport = promauto.NewHistogramVec(prometheus.HistogramOpts{ - Name: "ocr2vrf_coordinator_callbacks_in_report", - Help: "Number of callbacks found in reportWillBeTransmitted", - Buckets: counterBuckets, - }, promLabels) - promMethodDuration = promauto.NewHistogramVec(prometheus.HistogramOpts{ - Name: "ocr2vrf_coordinator_method_time", - Help: "The amount of time elapsed for given method call", - Buckets: timingBuckets, - }, append(promLabels, "methodName")) -) - -const ( - // VRF-only events. - randomnessRequestedEvent string = "RandomnessRequested" - randomnessFulfillmentRequestedEvent string = "RandomnessFulfillmentRequested" - randomWordsFulfilledEvent string = "RandomWordsFulfilled" - newTransmissionEvent string = "NewTransmission" - outputsServedEvent string = "OutputsServed" - - // Both VRF and DKG contracts emit this, it's an OCR event. - configSetEvent = "ConfigSet" -) - -// block is used to key into a set that tracks beacon blocks. -type block struct { - blockNumber uint64 - confDelay uint32 -} - -type blockInReport struct { - block - recentBlockHeight uint64 - recentBlockHash common.Hash -} - -type callback struct { - blockNumber uint64 - requestID *big.Int -} - -type callbackInReport struct { - callback - recentBlockHeight uint64 - recentBlockHash common.Hash -} - -type coordinator struct { - lggr logger.Logger - - lp logpoller.LogPoller - topics - finalityDepth uint32 - - onchainRouter VRFBeaconCoordinator - coordinatorAddress common.Address - beaconAddress common.Address - - // We need to keep track of DKG ConfigSet events as well. - dkgAddress common.Address - - evmClient evmclient.Client - - // set of blocks that have been scheduled for transmission. - toBeTransmittedBlocks *ocrCache[blockInReport] - // set of request id's that have been scheduled for transmission. - toBeTransmittedCallbacks *ocrCache[callbackInReport] - blockhashLookback uint64 - coordinatorConfig *ocr2vrftypes.CoordinatorConfig - configDigest ocr2Types.ConfigDigest - oracleID commontypes.OracleID -} - -// New creates a new CoordinatorInterface implementor. -func New( - ctx context.Context, - lggr logger.Logger, - beaconAddress common.Address, - coordinatorAddress common.Address, - dkgAddress common.Address, - client evmclient.Client, - logPoller logpoller.LogPoller, - finalityDepth uint32, -) (ocr2vrftypes.CoordinatorInterface, error) { - onchainRouter, err := newRouter(lggr, beaconAddress, coordinatorAddress, client) - if err != nil { - return nil, errors.Wrap(err, "onchain router creation") - } - - t := newTopics() - - // Add log filters for the log poller so that it can poll and find the logs that - // we need. - err = logPoller.RegisterFilter(ctx, logpoller.Filter{ - Name: filterName(beaconAddress, coordinatorAddress, dkgAddress), - EventSigs: []common.Hash{ - t.randomnessRequestedTopic, - t.randomnessFulfillmentRequestedTopic, - t.randomWordsFulfilledTopic, - t.configSetTopic, - t.outputsServedTopic, - t.newTransmissionTopic}, Addresses: []common.Address{beaconAddress, coordinatorAddress, dkgAddress}}) - if err != nil { - return nil, err - } - - cacheEvictionWindowSeconds := int64(60) - cacheEvictionWindow := time.Duration(cacheEvictionWindowSeconds * int64(time.Second)) - lookbackBlocks := uint64(1_000) - - return &coordinator{ - onchainRouter: onchainRouter, - coordinatorAddress: coordinatorAddress, - beaconAddress: beaconAddress, - dkgAddress: dkgAddress, - lp: logPoller, - topics: t, - finalityDepth: finalityDepth, - evmClient: client, - lggr: lggr.Named("OCR2VRFCoordinator"), - toBeTransmittedBlocks: NewBlockCache[blockInReport](cacheEvictionWindow), - toBeTransmittedCallbacks: NewBlockCache[callbackInReport](cacheEvictionWindow), - blockhashLookback: mathutil.Min(256, lookbackBlocks), - // defaults - coordinatorConfig: &ocr2vrftypes.CoordinatorConfig{ - CacheEvictionWindowSeconds: cacheEvictionWindowSeconds, - BatchGasLimit: 5_000_000, - CoordinatorOverhead: 50_000, - BlockGasOverhead: 50_000, - CallbackOverhead: 50_000, - LookbackBlocks: lookbackBlocks, - }, - }, nil -} - -func (c *coordinator) CurrentChainHeight(ctx context.Context) (uint64, error) { - head, err := c.lp.LatestBlock(ctx) - if err != nil { - return 0, err - } - return uint64(head.BlockNumber), nil -} - -// ReportIsOnchain returns true iff a report for the given OCR epoch/round is -// present onchain. -func (c *coordinator) ReportIsOnchain( - ctx context.Context, - epoch uint32, - round uint8, - configDigest [32]byte, -) (presentOnchain bool, err error) { - now := time.Now().UTC() - defer c.logAndEmitFunctionDuration("ReportIsOnchain", now) - - // Check if a NewTransmission event was emitted on-chain with the - // provided epoch and round. - - epochAndRound := toEpochAndRoundUint40(epoch, round) - - // this is technically NOT a hash in the regular meaning, - // however it has the same size as a common.Hash. We need - // to left-pad by bytes because it has to be 256 (or 32 bytes) - // long in order to use as a topic filter. - enrTopic := common.BytesToHash(common.LeftPadBytes(epochAndRound.Bytes(), 32)) - - 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) - if err != nil { - return false, errors.Wrap(err, "log poller IndexedLogs") - } - - // Filter for valid logs that match the current config digest. - var logsWithCorrectConfigDigest []logpoller.Log - for i := 0; i < len(logs); i++ { - rawLog := toGethLog(logs[i]) - unpacked, err := c.onchainRouter.ParseLog(rawLog) - if err != nil { - c.lggr.Warnw("Incorrect log found in NewTransmissions", "log", logs[i], "err", err) - continue - } - nt, ok := unpacked.(*vrf_beacon.VRFBeaconNewTransmission) - if !ok { - c.lggr.Warnw("Type error for log in NewTransmissisons", "log", logs[i], "err", err) - continue - } - if nt.ConfigDigest == configDigest { - logsWithCorrectConfigDigest = append(logsWithCorrectConfigDigest, logs[i]) - } - } - - c.lggr.Info(fmt.Sprintf("NewTransmission logs: %+v", logsWithCorrectConfigDigest)) - - return len(logsWithCorrectConfigDigest) >= 1, nil -} - -// ReportBlocks returns the heights and hashes of the blocks which require VRF -// proofs in the current report, and the callback requests which should be -// served as part of processing that report. Everything returned by this -// should concern blocks older than the corresponding confirmationDelay. -// Blocks and callbacks it has returned previously may be returned again, as -// long as retransmissionDelay blocks have passed since they were last -// returned. The callbacks returned do not have to correspond to the blocks. -// -// The implementor is responsible for only returning well-funded callback -// requests, and blocks for which clients have actually requested random output -// -// This can be implemented on ethereum using the RandomnessRequested and -// RandomnessFulfillmentRequested events, to identify which blocks and -// callbacks need to be served, along with the NewTransmission and -// RandomWordsFulfilled events, to identify which have already been served. -func (c *coordinator) ReportBlocks( - ctx context.Context, - slotInterval uint16, // TODO: unused for now - confirmationDelays map[uint32]struct{}, - retransmissionDelay time.Duration, // TODO: unused for now - maxBlocks, // TODO: unused for now - maxCallbacks int, // TODO: unused for now -) ( - blocks []ocr2vrftypes.Block, - callbacks []ocr2vrftypes.AbstractCostedCallbackRequest, - recentBlockHashesStartHeight uint64, - recentBlockHashes []common.Hash, - err error, -) { - now := time.Now().UTC() - defer c.logAndEmitFunctionDuration("ReportBlocks", now) - - // Instantiate the gas used by this batch. - currentBatchGasLimit := c.coordinatorConfig.CoordinatorOverhead - - // TODO: use head broadcaster instead? - currentHeight, err := c.CurrentChainHeight(ctx) - if err != nil { - err = errors.Wrap(err, "header by number") - return - } - - // Evict expired items from the cache. - c.toBeTransmittedBlocks.EvictExpiredItems(now) - c.toBeTransmittedCallbacks.EvictExpiredItems(now) - - c.lggr.Infow("current chain height", "currentHeight", currentHeight) - - logs, err := c.lp.LogsWithSigs( - ctx, - int64(currentHeight-c.coordinatorConfig.LookbackBlocks), - int64(currentHeight), - []common.Hash{ - c.randomnessRequestedTopic, - c.randomnessFulfillmentRequestedTopic, - c.randomWordsFulfilledTopic, - c.outputsServedTopic, - }, - c.coordinatorAddress) - if err != nil { - err = errors.Wrapf(err, "logs with topics. address: %s", c.coordinatorAddress) - return - } - - c.lggr.Tracew("logsWithSigs", "logs", logs) - - randomnessRequestedLogs, - randomnessFulfillmentRequestedLogs, - randomWordsFulfilledLogs, - outputsServedLogs, - err := c.unmarshalLogs(logs) - if err != nil { - err = errors.Wrap(err, "unmarshal logs") - return - } - - c.lggr.Tracew( - "finished unmarshalLogs", - "RandomnessRequested", randomnessRequestedLogs, - "RandomnessFulfillmentRequested", randomnessFulfillmentRequestedLogs, - "RandomWordsFulfilled", randomWordsFulfilledLogs, - "OutputsServed", outputsServedLogs, - ) - - // Get start height for recent blockhashes. - recentBlockHashesStartHeight = uint64(0) - if currentHeight >= c.blockhashLookback { - recentBlockHashesStartHeight = currentHeight - c.blockhashLookback + 1 - } - - // Get blockhashes that pertain to requested blocks. - blockhashesMapping, err := c.getBlockhashesMappingFromRequests( - ctx, - randomnessRequestedLogs, - randomnessFulfillmentRequestedLogs, - currentHeight, - recentBlockHashesStartHeight, - ) - if err != nil { - err = errors.Wrap(err, "get blockhashes in ReportBlocks") - return - } - - // TODO BELOW: Write tests for the new blockhash retrieval. - // Obtain recent blockhashes, ordered by ascending block height. - for i := recentBlockHashesStartHeight; i <= currentHeight; i++ { - recentBlockHashes = append(recentBlockHashes, blockhashesMapping[i]) - } - - blocksRequested := make(map[block]struct{}) - redeemRandomnessBlocksRequested := make(map[block]struct{}) - unfulfilled, err := c.filterEligibleRandomnessRequests(randomnessRequestedLogs, confirmationDelays, currentHeight, blockhashesMapping) - if err != nil { - err = errors.Wrap(err, "filter requests in ReportBlocks") - return - } - for _, uf := range unfulfilled { - blocksRequested[uf] = struct{}{} - redeemRandomnessBlocksRequested[uf] = struct{}{} - } - - c.lggr.Tracew("filtered eligible randomness requests", "blocks", unfulfilled) - - callbacksRequested, unfulfilled, err := c.filterEligibleCallbacks(randomnessFulfillmentRequestedLogs, confirmationDelays, currentHeight, blockhashesMapping) - if err != nil { - err = errors.Wrap(err, "filter callbacks in ReportBlocks") - return - } - for _, uf := range unfulfilled { - blocksRequested[uf] = struct{}{} - } - - c.lggr.Tracew("filtered eligible callbacks and blocks", "callbacks", callbacksRequested, "blocks", maps.Keys(blocksRequested)) - - // Remove blocks that have already received responses so that we don't - // respond to them again. - fulfilledBlocks := c.getFulfilledBlocks(outputsServedLogs) - for _, f := range fulfilledBlocks { - delete(blocksRequested, f) - delete(redeemRandomnessBlocksRequested, f) - } - - c.lggr.Tracew("got fulfilled blocks", "fulfilled", fulfilledBlocks) - - // Fill blocks slice with valid requested blocks. - blocks = []ocr2vrftypes.Block{} - for block := range blocksRequested { - if c.coordinatorConfig.BatchGasLimit-currentBatchGasLimit < c.coordinatorConfig.BlockGasOverhead { - break - } - _, redeemRandomnessRequested := redeemRandomnessBlocksRequested[block] - blocks = append(blocks, ocr2vrftypes.Block{ - Hash: blockhashesMapping[block.blockNumber], - Height: block.blockNumber, - ConfirmationDelay: block.confDelay, - ShouldStore: redeemRandomnessRequested, - }) - currentBatchGasLimit += c.coordinatorConfig.BlockGasOverhead - } - - c.lggr.Tracew("got elligible blocks", "blocks", blocks) - - // Find unfulfilled callback requests by filtering out already fulfilled callbacks. - fulfilledRequestIDs := c.getFulfilledRequestIDs(randomWordsFulfilledLogs) - callbacks = c.filterUnfulfilledCallbacks(callbacksRequested, fulfilledRequestIDs, confirmationDelays, currentHeight, currentBatchGasLimit) - c.emitReportBlocksMetrics(len(blocks), len(callbacks)) - - // Pull request IDs from elligible callbacks for logging. There should only be - // at most 100-200 elligible callbacks in a report. - var reqIDs []*big.Int - for _, c := range callbacks { - reqIDs = append(reqIDs, c.RequestID) - } - c.lggr.Debugw("reporting blocks and callbacks", "blocks", blocks, "callbacks", reqIDs) - c.lggr.Tracew("alreday fulfilled blocks and callbacks", "blocks", fulfilledBlocks, "callbacks", maps.Keys(fulfilledRequestIDs)) - - return -} - -// getBlockhashesMappingFromRequests returns the blockhashes for enqueued request blocks. -func (c *coordinator) getBlockhashesMappingFromRequests( - ctx context.Context, - randomnessRequestedLogs []*vrf_wrapper.VRFCoordinatorRandomnessRequested, - randomnessFulfillmentRequestedLogs []*vrf_wrapper.VRFCoordinatorRandomnessFulfillmentRequested, - currentHeight uint64, - recentBlockHashesStartHeight uint64, -) (blockhashesMapping map[uint64]common.Hash, err error) { - // Get all request + callback requests into a mapping. - rawBlocksRequested := make(map[uint64]struct{}) - for _, l := range randomnessRequestedLogs { - if isBlockEligible(l.NextBeaconOutputHeight, l.ConfDelay, currentHeight) { - rawBlocksRequested[l.NextBeaconOutputHeight] = struct{}{} - - // Also get the blockhash for the most recent cached report on this block, - // if one exists. - cacheKey := getBlockCacheKey(l.NextBeaconOutputHeight, l.ConfDelay.Uint64()) - t := c.toBeTransmittedBlocks.GetItem(cacheKey) - if t != nil { - rawBlocksRequested[t.recentBlockHeight] = struct{}{} - } - } - } - for _, l := range randomnessFulfillmentRequestedLogs { - if isBlockEligible(l.NextBeaconOutputHeight, l.ConfDelay, currentHeight) { - rawBlocksRequested[l.NextBeaconOutputHeight] = struct{}{} - - // Also get the blockhash for the most recent cached report on this callback, - // if one exists. - cacheKey := getCallbackCacheKey(l.RequestID) - t := c.toBeTransmittedCallbacks.GetItem(cacheKey) - if t != nil { - rawBlocksRequested[t.recentBlockHeight] = struct{}{} - } - } - } - - // Fill a unique list of request blocks. - requestedBlockNumbers := []uint64{} - for k := range rawBlocksRequested { - requestedBlockNumbers = append(requestedBlockNumbers, k) - } - - // Get a mapping of block numbers to block hashes. - blockhashesMapping, err = c.getBlockhashesMapping(ctx, append(requestedBlockNumbers, currentHeight, recentBlockHashesStartHeight)) - if err != nil { - err = errors.Wrap(err, "get blockhashes for ReportBlocks") - } - return -} - -func (c *coordinator) getFulfilledBlocks(outputsServedLogs []*vrf_coordinator.VRFCoordinatorOutputsServed) (fulfilled []block) { - for _, r := range outputsServedLogs { - for _, o := range r.OutputsServed { - fulfilled = append(fulfilled, block{ - blockNumber: o.Height, - confDelay: uint32(o.ConfirmationDelay.Uint64()), - }) - } - } - return -} - -// getBlockhashesMapping returns the blockhashes corresponding to a slice of block numbers. -func (c *coordinator) getBlockhashesMapping( - ctx context.Context, - blockNumbers []uint64, -) (blockhashesMapping map[uint64]common.Hash, err error) { - // GetBlocks doesn't necessarily need a sorted blockNumbers array, - // but sorting it is helpful for testing. - sort.Slice(blockNumbers, func(a, b int) bool { - return blockNumbers[a] < blockNumbers[b] - }) - - heads, err := c.lp.GetBlocksRange(ctx, blockNumbers) - if err != nil { - return nil, errors.Wrap(err, "logpoller.GetBlocks") - } - - blockhashesMapping = make(map[uint64]common.Hash) - for _, head := range heads { - blockhashesMapping[uint64(head.BlockNumber)] = head.BlockHash - } - - // Ensure that every requested block received a blockhash. - for _, b := range blockNumbers { - if _, ok := blockhashesMapping[b]; !ok { - err = fmt.Errorf("could not find all heads in db: want %d got %d", len(blockNumbers), len(heads)) - return - } - } - return -} - -// getFulfilledRequestIDs returns the request IDs referenced by the given RandomWordsFulfilled logs slice. -func (c *coordinator) getFulfilledRequestIDs(randomWordsFulfilledLogs []*vrf_wrapper.VRFCoordinatorRandomWordsFulfilled) map[uint64]struct{} { - fulfilledRequestIDs := make(map[uint64]struct{}) - for _, r := range randomWordsFulfilledLogs { - for _, requestID := range r.RequestIDs { - fulfilledRequestIDs[requestID.Uint64()] = struct{}{} - } - } - return fulfilledRequestIDs -} - -// filterUnfulfilledCallbacks returns unfulfilled callback requests given the -// callback request logs and the already fulfilled callback request IDs. -func (c *coordinator) filterUnfulfilledCallbacks( - callbacksRequested []*vrf_wrapper.VRFCoordinatorRandomnessFulfillmentRequested, - fulfilledRequestIDs map[uint64]struct{}, - confirmationDelays map[uint32]struct{}, - currentHeight uint64, - currentBatchGasLimit int64, -) (callbacks []ocr2vrftypes.AbstractCostedCallbackRequest) { - /** - * Callback batch ordering: - * - Callbacks are first ordered by beacon output + confirmation delay (ascending), in other words - * the fulfillments at the oldest block are first in line. - * - Within the same block, fulfillments are ordered by gasAllowance (ascending), i.e the callbacks with - * the lowest gasAllowance are first in line. - * - This ordering ensures that the oldest callbacks can be picked up first, and that as many callbacks as - * possible can be fit into a batch. - * - * Example: - * Unsorted: (outputHeight: 1, gasAllowance: 200k), (outputHeight: 3, gasAllowance: 100k), (outputHeight: 1, gasAllowance: 100k) - * Sorted: (outputHeight: 1, gasAllowance: 100k), (outputHeight: 1, gasAllowance: 200k), (outputHeight: 3, gasAllowance: 100k) - * - */ - sort.Slice(callbacksRequested, func(a, b int) bool { - aHeight := callbacksRequested[a].NextBeaconOutputHeight + callbacksRequested[a].ConfDelay.Uint64() - bHeight := callbacksRequested[b].NextBeaconOutputHeight + callbacksRequested[b].ConfDelay.Uint64() - if aHeight == bHeight { - return callbacksRequested[a].GasAllowance < callbacksRequested[b].GasAllowance - } - return aHeight < bHeight - }) - - for _, r := range callbacksRequested { - // Check if there is room left in the batch. If there is no room left, the coordinator - // will keep iterating, until it either finds a callback in a subsequent output height that - // can fit into the current batch or reaches the end of the sorted callbacks slice. - if c.coordinatorConfig.BatchGasLimit-currentBatchGasLimit < (int64(r.GasAllowance) + c.coordinatorConfig.CallbackOverhead) { - continue - } - - requestID := r.RequestID - if _, ok := fulfilledRequestIDs[requestID.Uint64()]; !ok { - // The on-chain machinery will revert requests that specify an unsupported - // confirmation delay, so this is more of a sanity check than anything else. - if _, ok := confirmationDelays[uint32(r.ConfDelay.Uint64())]; !ok { - // if we can't find the conf delay in the map then just ignore this request - c.lggr.Errorw("ignoring bad request, unsupported conf delay", - "confDelay", r.ConfDelay.String(), - "supportedConfDelays", confirmationDelays) - continue - } - - // NOTE: we already check if the callback has been fulfilled in filterEligibleCallbacks, - // so we don't need to do that again here. - if isBlockEligible(r.NextBeaconOutputHeight, r.ConfDelay, currentHeight) { - callbacks = append(callbacks, ocr2vrftypes.AbstractCostedCallbackRequest{ - BeaconHeight: r.NextBeaconOutputHeight, - ConfirmationDelay: uint32(r.ConfDelay.Uint64()), - SubscriptionID: r.SubID, - Price: big.NewInt(0), // TODO: no price tracking - RequestID: requestID, - NumWords: r.NumWords, - Requester: r.Requester, - Arguments: r.Arguments, - GasAllowance: big.NewInt(int64(r.GasAllowance)), - GasPrice: r.GasPrice, - WeiPerUnitLink: r.WeiPerUnitLink, - }) - currentBatchGasLimit += int64(r.GasAllowance) - c.lggr.Debugw("Request is unfulfilled", "requestID", requestID) - } - } - } - return callbacks -} - -// filterEligibleCallbacks extracts valid callback requests from the given logs, -// based on their readiness to be fulfilled. It also returns any unfulfilled blocks -// associated with those callbacks. -func (c *coordinator) filterEligibleCallbacks( - randomnessFulfillmentRequestedLogs []*vrf_wrapper.VRFCoordinatorRandomnessFulfillmentRequested, - confirmationDelays map[uint32]struct{}, - currentHeight uint64, - blockhashesMapping map[uint64]common.Hash, -) (callbacks []*vrf_wrapper.VRFCoordinatorRandomnessFulfillmentRequested, unfulfilled []block, err error) { - for _, r := range randomnessFulfillmentRequestedLogs { - // The on-chain machinery will revert requests that specify an unsupported - // confirmation delay, so this is more of a sanity check than anything else. - if _, ok := confirmationDelays[uint32(r.ConfDelay.Uint64())]; !ok { - // if we can't find the conf delay in the map then just ignore this request - c.lggr.Errorw("ignoring bad request, unsupported conf delay", - "confDelay", r.ConfDelay.String(), - "supportedConfDelays", confirmationDelays) - continue - } - - // Check that the callback is elligible. - if isBlockEligible(r.NextBeaconOutputHeight, r.ConfDelay, currentHeight) { - cacheKey := getCallbackCacheKey(r.RequestID) - t := c.toBeTransmittedCallbacks.GetItem(cacheKey) - // If the callback is found in the cache and the recentBlockHash from the report containing the callback - // is correct, then the callback is in-flight and should not be included in the current observation. If that - // report gets re-orged, then the recentBlockHash of the report will become invalid, in which case - // the cached callback is ignored, and the callback is added to the current observation. - inflightTransmission := (t != nil) && (t.recentBlockHash == blockhashesMapping[t.recentBlockHeight]) - if inflightTransmission { - c.lggr.Debugw("Request is in-flight", "requestID", r.RequestID) - continue - } - - callbacks = append(callbacks, r) - - // We could have a callback request that was made in a different block than what we - // have possibly already received from regular requests. - unfulfilled = append(unfulfilled, block{ - blockNumber: r.NextBeaconOutputHeight, - confDelay: uint32(r.ConfDelay.Uint64()), - }) - c.lggr.Debugw("Request is eligible", "requestID", r.RequestID) - } - } - return -} - -// filterEligibleRandomnessRequests extracts valid randomness requests from the given logs, -// based on their readiness to be fulfilled. -func (c *coordinator) filterEligibleRandomnessRequests( - randomnessRequestedLogs []*vrf_wrapper.VRFCoordinatorRandomnessRequested, - confirmationDelays map[uint32]struct{}, - currentHeight uint64, - blockhashesMapping map[uint64]common.Hash, -) (unfulfilled []block, err error) { - for _, r := range randomnessRequestedLogs { - // The on-chain machinery will revert requests that specify an unsupported - // confirmation delay, so this is more of a sanity check than anything else. - if _, ok := confirmationDelays[uint32(r.ConfDelay.Uint64())]; !ok { - // if we can't find the conf delay in the map then just ignore this request - c.lggr.Errorw("ignoring bad request, unsupported conf delay", - "confDelay", r.ConfDelay.String(), - "supportedConfDelays", confirmationDelays) - continue - } - - // Check that the block is elligible. - if isBlockEligible(r.NextBeaconOutputHeight, r.ConfDelay, currentHeight) { - cacheKey := getBlockCacheKey(r.NextBeaconOutputHeight, r.ConfDelay.Uint64()) - t := c.toBeTransmittedBlocks.GetItem(cacheKey) - // If the block is found in the cache and the recentBlockHash from the report containing the block - // is correct, then the block is in-flight and should not be included in the current observation. If that - // report gets re-orged, then the recentBlockHash of the report will become invalid, in which case - // the cached block is ignored and the block is added to the current observation. - validTransmission := (t != nil) && (t.recentBlockHash == blockhashesMapping[t.recentBlockHeight]) - if validTransmission { - c.lggr.Debugw("Block is in-flight", "blockNumber", r.NextBeaconOutputHeight, "confDelay", r.ConfDelay) - continue - } - - unfulfilled = append(unfulfilled, block{ - blockNumber: r.NextBeaconOutputHeight, - confDelay: uint32(r.ConfDelay.Uint64()), - }) - c.lggr.Debugw("Block is eligible", "blockNumber", r.NextBeaconOutputHeight, "confDelay", r.ConfDelay) - } - } - return -} - -func (c *coordinator) unmarshalLogs( - logs []logpoller.Log, -) ( - randomnessRequestedLogs []*vrf_wrapper.VRFCoordinatorRandomnessRequested, - randomnessFulfillmentRequestedLogs []*vrf_wrapper.VRFCoordinatorRandomnessFulfillmentRequested, - randomWordsFulfilledLogs []*vrf_wrapper.VRFCoordinatorRandomWordsFulfilled, - outputsServedLogs []*vrf_wrapper.VRFCoordinatorOutputsServed, - err error, -) { - for _, lg := range logs { - rawLog := toGethLog(lg) - switch lg.EventSig { - case c.randomnessRequestedTopic: - unpacked, err2 := c.onchainRouter.ParseLog(rawLog) - if err2 != nil { - // should never happen - err = errors.Wrap(err2, "unmarshal RandomnessRequested log") - return - } - rr, ok := unpacked.(*vrf_wrapper.VRFCoordinatorRandomnessRequested) - if !ok { - // should never happen - err = errors.New("cast to *VRFCoordinatorRandomnessRequested") - return - } - randomnessRequestedLogs = append(randomnessRequestedLogs, rr) - case c.randomnessFulfillmentRequestedTopic: - unpacked, err2 := c.onchainRouter.ParseLog(rawLog) - if err2 != nil { - // should never happen - err = errors.Wrap(err2, "unmarshal RandomnessFulfillmentRequested log") - return - } - rfr, ok := unpacked.(*vrf_wrapper.VRFCoordinatorRandomnessFulfillmentRequested) - if !ok { - // should never happen - err = errors.New("cast to *VRFCoordinatorRandomnessFulfillmentRequested") - return - } - randomnessFulfillmentRequestedLogs = append(randomnessFulfillmentRequestedLogs, rfr) - case c.randomWordsFulfilledTopic: - unpacked, err2 := c.onchainRouter.ParseLog(rawLog) - if err2 != nil { - // should never happen - err = errors.Wrap(err2, "unmarshal RandomWordsFulfilled log") - return - } - rwf, ok := unpacked.(*vrf_wrapper.VRFCoordinatorRandomWordsFulfilled) - if !ok { - // should never happen - err = errors.New("cast to *VRFCoordinatorRandomWordsFulfilled") - return - } - randomWordsFulfilledLogs = append(randomWordsFulfilledLogs, rwf) - case c.outputsServedTopic: - unpacked, err2 := c.onchainRouter.ParseLog(rawLog) - if err2 != nil { - // should never happen - err = errors.Wrap(err2, "unmarshal OutputsServed log") - return - } - nt, ok := unpacked.(*vrf_coordinator.VRFCoordinatorOutputsServed) - if !ok { - // should never happen - err = errors.New("cast to *vrf_coordinator.VRFCoordinatorOutputsServed") - } - outputsServedLogs = append(outputsServedLogs, nt) - default: - c.lggr.Error(fmt.Sprintf("Unexpected event sig: %s", lg.EventSig)) - c.lggr.Error(fmt.Sprintf("expected one of: %s (RandomnessRequested) %s (RandomnessFulfillmentRequested) %s (RandomWordsFulfilled) %s (OutputsServed), got %s", - hexutil.Encode(c.randomnessRequestedTopic[:]), - hexutil.Encode(c.randomnessFulfillmentRequestedTopic[:]), - hexutil.Encode(c.randomWordsFulfilledTopic[:]), - hexutil.Encode(c.outputsServedTopic[:]), - lg.EventSig)) - } - } - return -} - -// ReportWillBeTransmitted registers to the CoordinatorInterface that the -// local node has accepted the AbstractReport for transmission, so that its -// blocks and callbacks can be tracked for possible later retransmission -func (c *coordinator) ReportWillBeTransmitted(ctx context.Context, report ocr2vrftypes.AbstractReport) error { - now := time.Now().UTC() - defer c.logAndEmitFunctionDuration("ReportWillBeTransmitted", now) - - // Evict expired items from the cache. - c.toBeTransmittedBlocks.EvictExpiredItems(now) - c.toBeTransmittedCallbacks.EvictExpiredItems(now) - - // Check for a re-org, and return an error if one is present. - blockhashesMapping, err := c.getBlockhashesMapping(ctx, []uint64{report.RecentBlockHeight}) - if err != nil { - return errors.Wrap(err, "getting blockhash mapping in ReportWillBeTransmitted") - } - if blockhashesMapping[report.RecentBlockHeight] != report.RecentBlockHash { - return errors.Errorf("blockhash of report does not match most recent blockhash in ReportWillBeTransmitted") - } - - blocksRequested := []blockInReport{} - callbacksRequested := []callbackInReport{} - - // Get all requested blocks and callbacks. - for _, output := range report.Outputs { - // If the VRF proof size is 0, the block is not included in this output. We still - // check for callbacks in the ouptut. - if len(output.VRFProof) > 0 { - bR := blockInReport{ - block: block{ - blockNumber: output.BlockHeight, - confDelay: output.ConfirmationDelay, - }, - recentBlockHeight: report.RecentBlockHeight, - recentBlockHash: report.RecentBlockHash, - } - // Store block in blocksRequested.br - blocksRequested = append(blocksRequested, bR) - } - - // Iterate through callbacks for output. - for _, cb := range output.Callbacks { - cbR := callbackInReport{ - callback: callback{ - blockNumber: cb.BeaconHeight, - requestID: cb.RequestID, - }, - recentBlockHeight: report.RecentBlockHeight, - recentBlockHash: report.RecentBlockHash, - } - - // Add callback to callbacksRequested. - callbacksRequested = append(callbacksRequested, cbR) - } - } - - // Apply blockhashes to blocks and mark them as transmitted. - for _, b := range blocksRequested { - cacheKey := getBlockCacheKey(b.blockNumber, uint64(b.confDelay)) - c.toBeTransmittedBlocks.CacheItem(b, cacheKey, now) - c.lggr.Debugw("Block is being transmitted", "blockNumber", b.blockNumber, "confDelay", b.confDelay) - } - - // Add the corresponding blockhashes to callbacks and mark them as transmitted. - for _, cb := range callbacksRequested { - cacheKey := getCallbackCacheKey(cb.requestID) - c.toBeTransmittedCallbacks.CacheItem(cb, cacheKey, now) - c.lggr.Debugw("Request is being transmitted", "requestID", cb.requestID) - } - - c.emitReportWillBeTransmittedMetrics(len(blocksRequested), len(callbacksRequested)) - - return nil -} - -// DKGVRFCommittees returns the addresses of the signers and transmitters -// for the DKG and VRF OCR committees. On ethereum, these can be retrieved -// from the most recent ConfigSet events for each contract. -func (c *coordinator) DKGVRFCommittees(ctx context.Context) (dkgCommittee, vrfCommittee ocr2vrftypes.OCRCommittee, err error) { - startTime := time.Now().UTC() - defer c.logAndEmitFunctionDuration("DKGVRFCommittees", startTime) - - latestVRF, err := c.lp.LatestLogByEventSigWithConfs( - ctx, - c.configSetTopic, - c.beaconAddress, - evmtypes.Confirmations(c.finalityDepth), - ) - if err != nil { - err = errors.Wrap(err, "latest vrf ConfigSet by sig with confs") - return - } - - latestDKG, err := c.lp.LatestLogByEventSigWithConfs( - ctx, - c.configSetTopic, - c.dkgAddress, - evmtypes.Confirmations(c.finalityDepth), - ) - if err != nil { - err = errors.Wrap(err, "latest dkg ConfigSet by sig with confs") - return - } - - var vrfConfigSetLog vrf_beacon.VRFBeaconConfigSet - err = vrfBeaconABI.UnpackIntoInterface(&vrfConfigSetLog, configSetEvent, latestVRF.Data) - if err != nil { - err = errors.Wrap(err, "unpack vrf ConfigSet into interface") - return - } - - var dkgConfigSetLog dkg_wrapper.DKGConfigSet - err = dkgABI.UnpackIntoInterface(&dkgConfigSetLog, configSetEvent, latestDKG.Data) - if err != nil { - err = errors.Wrap(err, "unpack dkg ConfigSet into interface") - return - } - - // len(signers) == len(transmitters), this is guaranteed by libocr. - for i := range vrfConfigSetLog.Signers { - vrfCommittee.Signers = append(vrfCommittee.Signers, vrfConfigSetLog.Signers[i]) - vrfCommittee.Transmitters = append(vrfCommittee.Transmitters, vrfConfigSetLog.Transmitters[i]) - } - - for i := range dkgConfigSetLog.Signers { - dkgCommittee.Signers = append(dkgCommittee.Signers, dkgConfigSetLog.Signers[i]) - dkgCommittee.Transmitters = append(dkgCommittee.Transmitters, dkgConfigSetLog.Transmitters[i]) - } - - return -} - -// ProvingKeyHash returns the VRF current proving block, in view of the local -// node. On ethereum this can be retrieved from the VRF contract's attribute -// s_provingKeyHash -func (c *coordinator) ProvingKeyHash(ctx context.Context) (common.Hash, error) { - h, err := c.onchainRouter.SProvingKeyHash(&bind.CallOpts{ - Context: ctx, - }) - if err != nil { - return [32]byte{}, errors.Wrap(err, "get proving block hash") - } - - return h, nil -} - -// BeaconPeriod returns the period used in the coordinator's contract -func (c *coordinator) BeaconPeriod(ctx context.Context) (uint16, error) { - beaconPeriodBlocks, err := c.onchainRouter.IBeaconPeriodBlocks(&bind.CallOpts{ - Context: ctx, - }) - if err != nil { - return 0, errors.Wrap(err, "get beacon period blocks") - } - - return uint16(beaconPeriodBlocks.Int64()), nil -} - -// ConfirmationDelays returns the list of confirmation delays defined in the coordinator's contract -func (c *coordinator) ConfirmationDelays(ctx context.Context) ([]uint32, error) { - confDelays, err := c.onchainRouter.GetConfirmationDelays(&bind.CallOpts{ - Context: ctx, - }) - if err != nil { - return nil, errors.Wrap(err, "could not get confirmation delays") - } - var result []uint32 - for _, c := range confDelays { - result = append(result, uint32(c.Uint64())) - } - return result, nil -} - -// KeyID returns the key ID from coordinator's contract -func (c *coordinator) KeyID(ctx context.Context) (dkg.KeyID, error) { - keyID, err := c.onchainRouter.SKeyID(&bind.CallOpts{Context: ctx}) - if err != nil { - return dkg.KeyID{}, errors.Wrap(err, "could not get key ID") - } - return keyID, nil -} - -// isBlockEligible returns true if and only if the nextBeaconOutputHeight plus -// the confDelay is less than the current blockchain height, meaning that the beacon -// output height has enough confirmations. -// -// NextBeaconOutputHeight is always greater than the request block, therefore -// a number of confirmations on the beacon block is always enough confirmations -// for the request block. -func isBlockEligible(nextBeaconOutputHeight uint64, confDelay *big.Int, currentHeight uint64) bool { - cond := confDelay.Uint64() < currentHeight // Edge case: for simulated chains with low block numbers - cond = cond && (nextBeaconOutputHeight+confDelay.Uint64()) < currentHeight - return cond -} - -// toEpochAndRoundUint40 returns a single unsigned 40 bit big.Int object -// that has the epoch in the first 32 bytes and the round in the last 8 bytes, -// in a big-endian fashion. -func toEpochAndRoundUint40(epoch uint32, round uint8) *big.Int { - return big.NewInt((int64(epoch) << 8) + int64(round)) -} - -func toGethLog(lg logpoller.Log) types.Log { - var topics []common.Hash - for _, b := range lg.Topics { - topics = append(topics, common.BytesToHash(b)) - } - return types.Log{ - Data: lg.Data, - Address: lg.Address, - BlockHash: lg.BlockHash, - BlockNumber: uint64(lg.BlockNumber), - Topics: topics, - TxHash: lg.TxHash, - Index: uint(lg.LogIndex), - } -} - -// getBlockCacheKey returns a cache key for a requested block -// The blockhash of the block does not need to be included in the key. Instead, -// the block cached at a given key contains a blockhash that is checked for validity -// against the log poller's current state. -func getBlockCacheKey(blockNumber uint64, confDelay uint64) common.Hash { - var blockNumberBytes [8]byte - var confDelayBytes [8]byte - - binary.BigEndian.PutUint64(blockNumberBytes[:], blockNumber) - binary.BigEndian.PutUint64(confDelayBytes[:], confDelay) - - return common.BytesToHash(bytes.Join([][]byte{blockNumberBytes[:], confDelayBytes[:]}, nil)) -} - -// getBlockCacheKey returns a cache key for a requested callback -// The blockhash of the callback does not need to be included in the key. Instead, -// the callback cached at a given key contains a blockhash that is checked for validity -// against the log poller's current state. -func getCallbackCacheKey(requestID *big.Int) common.Hash { - return common.BigToHash(requestID) -} - -// logAndEmitFunctionDuration logs the time in milliseconds and emits metrics in nanosecond for function duration -func (c *coordinator) logAndEmitFunctionDuration(funcName string, startTime time.Time) { - elapsed := time.Now().UTC().Sub(startTime) - c.lggr.Debugf("%s took %d milliseconds to complete", funcName, elapsed.Milliseconds()) - promMethodDuration.WithLabelValues( - append(c.labelValues(), funcName)..., - ).Observe(float64(elapsed.Nanoseconds())) -} - -func (c *coordinator) UpdateConfiguration( - b []byte, - configDigest ocr2Types.ConfigDigest, - oracleID commontypes.OracleID, -) error { - // Update config digest & oracle ID for epoch. - c.configDigest = configDigest - c.oracleID = oracleID - - // Unmarshal off-chain config. - err := proto.Unmarshal(b, c.coordinatorConfig) - if err != nil { - return errors.Wrap(err, "error setting offchain config on coordinator") - } - - // Update local caches with new eviction window. - cacheEvictionWindowSeconds := c.coordinatorConfig.CacheEvictionWindowSeconds - cacheEvictionWindow := time.Duration(cacheEvictionWindowSeconds * int64(time.Second)) - c.toBeTransmittedBlocks.SetEvictonWindow(cacheEvictionWindow) - c.toBeTransmittedCallbacks.SetEvictonWindow(cacheEvictionWindow) - - c.blockhashLookback = mathutil.Min(256, c.coordinatorConfig.LookbackBlocks) - c.lggr.Infow("set offchain config", - offchainConfigFields(c.coordinatorConfig)..., - ) - - return nil -} - -func offchainConfigFields(coordinatorConfig *ocr2vrftypes.CoordinatorConfig) []any { - return []any{ - "cacheEvictionWindowSeconds", coordinatorConfig.CacheEvictionWindowSeconds, - "batchGasLimit", coordinatorConfig.BatchGasLimit, - "coordinatorOverhead", coordinatorConfig.CoordinatorOverhead, - "lookbackBlocks", coordinatorConfig.LookbackBlocks, - "blockGasOverhead", coordinatorConfig.BlockGasOverhead, - "callbackOverhead", coordinatorConfig.CallbackOverhead, - } -} - -func (c *coordinator) labelValues() []string { - chainId := c.evmClient.ConfiguredChainID() - return []string{chainId.String(), fmt.Sprintf("%d", c.oracleID), common.Bytes2Hex(c.configDigest[:])} -} - -func (c *coordinator) emitReportBlocksMetrics( - numBlocks int, - numCallbacks int) { - promBlocksToReport.WithLabelValues(c.labelValues()...).Observe(float64(numBlocks)) - promCallbacksToReport.WithLabelValues(c.labelValues()...).Observe(float64(numCallbacks)) -} - -func (c *coordinator) emitReportWillBeTransmittedMetrics( - numBlocks int, - numCallbacks int) { - promBlocksInReport.WithLabelValues(c.labelValues()...).Observe(float64(numBlocks)) - promCallbacksInReport.WithLabelValues(c.labelValues()...).Observe(float64(numCallbacks)) -} - -func filterName(beaconAddress, coordinatorAddress, dkgAddress common.Address) string { - return logpoller.FilterName("VRF Coordinator", beaconAddress, coordinatorAddress, dkgAddress) -} - -func FilterNamesFromSpec(spec *job.OCR2OracleSpec) (names []string, err error) { - var cfg ocr2vrfconfig.PluginConfig - 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 = 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 - } - } - } - - return nil, err -} diff --git a/core/services/ocr2/plugins/ocr2vrf/coordinator/coordinator_test.go b/core/services/ocr2/plugins/ocr2vrf/coordinator/coordinator_test.go deleted file mode 100644 index d0f89ae4ca9..00000000000 --- a/core/services/ocr2/plugins/ocr2vrf/coordinator/coordinator_test.go +++ /dev/null @@ -1,1787 +0,0 @@ -package coordinator - -import ( - "bytes" - "crypto/rand" - "fmt" - "math/big" - "sort" - "testing" - "time" - - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - gethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/crypto" - "github.com/pkg/errors" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" - - "github.com/smartcontractkit/libocr/commontypes" - ocr2Types "github.com/smartcontractkit/libocr/offchainreporting2plus/types" - - "github.com/smartcontractkit/chainlink-vrf/dkg" - "github.com/smartcontractkit/chainlink-vrf/ocr2vrf" - ocr2vrftypes "github.com/smartcontractkit/chainlink-vrf/types" - evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" - - "github.com/smartcontractkit/chainlink-common/pkg/types" - "github.com/smartcontractkit/chainlink-common/pkg/utils/mathutil" - - evmclimocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client/mocks" - "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" - lp_mocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller/mocks" - dkg_wrapper "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/dkg" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/vrf_beacon" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/vrf_coordinator" - "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/ocr2/plugins/ocr2vrf/coordinator/mocks" -) - -func TestCoordinator_BeaconPeriod(t *testing.T) { - t.Parallel() - - t.Run("valid output", func(t *testing.T) { - onchainRouter := mocks.NewVRFBeaconCoordinator(t) - onchainRouter. - On("IBeaconPeriodBlocks", mock.Anything). - Return(big.NewInt(10), nil) - c := &coordinator{ - onchainRouter: onchainRouter, - } - period, err := c.BeaconPeriod(testutils.Context(t)) - assert.NoError(t, err) - assert.Equal(t, uint16(10), period) - }) - - t.Run("invalid output", func(t *testing.T) { - onchainRouter := mocks.NewVRFBeaconCoordinator(t) - onchainRouter. - On("IBeaconPeriodBlocks", mock.Anything). - Return(nil, errors.New("rpc error")) - c := &coordinator{ - onchainRouter: onchainRouter, - } - _, err := c.BeaconPeriod(testutils.Context(t)) - assert.Error(t, err) - }) -} - -func TestCoordinator_DKGVRFCommittees(t *testing.T) { - t.Parallel() - evmClient := evmclimocks.NewClient(t) - evmClient.On("ConfiguredChainID").Return(big.NewInt(1)) - - t.Run("happy path", func(t *testing.T) { - // In this test the DKG and VRF committees have the same signers and - // transmitters. This may (?) be different in practice. - - lp := lp_mocks.NewLogPoller(t) - tp := newTopics() - - coordinatorAddress := newAddress(t) - beaconAddress := newAddress(t) - dkgAddress := newAddress(t) - lp.On("LatestLogByEventSigWithConfs", mock.Anything, tp.configSetTopic, beaconAddress, evmtypes.Confirmations(10)). - Return(&logpoller.Log{ - Data: hexutil.MustDecode("0x0000000000000000000000000000000000000000000000000000000000a6fca200010576e704b4a519484d6239ef17f1f5b4a82e330b0daf827ed4dc2789971b0000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000002e000000000000000000000000000000000000000000000000000000000000000050000000000000000000000000a8cbea12a06869d3ec432ab9682dab6c761d591000000000000000000000000f4f9db7bb1d16b7cdfb18ec68994c26964f5985300000000000000000000000022fb3f90c539457f00d8484438869135e604a65500000000000000000000000033cbcedccb11c9773ad78e214ba342e979255ab30000000000000000000000006ffaa96256fbc1012325cca88c79f725c33eed80000000000000000000000000000000000000000000000000000000000000000500000000000000000000000074103cf8b436465870b26aa9fa2f62ad62b22e3500000000000000000000000038a6cb196f805cc3041f6645a5a6cec27b64430d00000000000000000000000047d7095cfebf8285bdaa421bc8268d0db87d933c000000000000000000000000a8842be973800ff61d80d2d53fa62c3a685380eb0000000000000000000000003750e31321aee8c024751877070e8d5f704ce98700000000000000000000000000000000000000000000000000000000000000206f3b82406688b8ddb944c6f2e6d808f014c8fa8d568d639c25019568c715fbf000000000000000000000000000000000000000000000000000000000000004220880d88ee16f1080c8afa0251880c8afa025208090dfc04a288090dfc04a30033a05010101010142206c5ca6f74b532222ac927dd3de235d46a943e372c0563393a33b01dcfd3f371c4220855114d25c2ef5e85fffe4f20a365672d8f2dba3b2ec82333f494168a2039c0442200266e835634db00977cbc1caa4db10e1676c1a4c0fcbc6ba7f09300f0d1831824220980cd91f7a73f20f4b0d51d00cd4e00373dc2beafbb299ca3c609757ab98c8304220eb6d36e2af8922085ff510bbe1eb8932a0e3295ca9f047fef25d90e69c52948f4a34313244334b6f6f574463364b7232644542684b59326b336e685057694676544565325331703978544532544b74344d7572716f684a34313244334b6f6f574b436e4367724b637743324a3577576a626e355435335068646b6b6f57454e534a39546537544b7836366f4a4a34313244334b6f6f575239616f675948786b357a38636b624c4c56346e426f7a777a747871664a7050586671336d4a7232796452474a34313244334b6f6f5744695444635565675637776b313133473366476a69616259756f54436f3157726f6f53656741343263556f544a34313244334b6f6f574e64687072586b5472665370354d5071736270467a70364167394a53787358694341434442676454424c656652820300050e416c74424e2d3132382047e282810e86e8cf899ae9a1b43e023bbe8825b103659bb8d6d4e54f6a3cfae7b106069c216a812d7616e47f0bd38fa4863f48fbcda6a38af4c58d2233dfa7cf79620947042d09f923e0a2f7a2270391e8b058d8bdb8f79fe082b7b627f025651c7290382fdff97c3181d15d162c146ce87ff752499d2acc2b26011439a12e29571a6f1e1defb1751c3be4258c493984fd9f0f6b4a26c539870b5f15bfed3d8ffac92499eb62dbd2beb7c1524275a8019022f6ce6a7e86c9e65e3099452a2b96fc2432b127a112970e1adf615f823b2b2180754c2f0ee01f1b389e56df55ca09702cd0401b66ff71779d2dd67222503a85ab921b28c329cc1832800b192d0b0247c0776e1b9653dc00df48daa6364287c84c0382f5165e7269fef06d10bc67c1bba252305d1af0dc7bb0fe92558eb4c5f38c23163dee1cfb34a72020669dbdfe337c16f3307472616e736c61746f722066726f6d20416c74424e2d3132382047e2828120746f20416c74424e2d3132382047e282825880ade2046080c8afa0256880c8afa0257080ade204788094ebdc0382019e010a205034214e0bd4373f38e162cf9fc9133e2f3b71441faa4c3d1ac01c1877f1cd2712200e03e975b996f911abba2b79d2596c2150bc94510963c40a1137a03df6edacdb1a107dee1cdb894163813bb3da604c9c133c1a10bb33302eeafbd55d352e35dcc5d2b3311a10d2c658b6b93d74a02d467849b6fe75251a10fea5308cc1fea69e7246eafe7ca8a3a51a1048efe1ad873b6f025ac0243bdef715f8000000000000000000000000000000000000000000000000000000000000"), - }, nil) - lp.On("LatestLogByEventSigWithConfs", mock.Anything, tp.configSetTopic, dkgAddress, evmtypes.Confirmations(10)). - Return(&logpoller.Log{ - Data: hexutil.MustDecode("0x0000000000000000000000000000000000000000000000000000000000a6fca200010576e704b4a519484d6239ef17f1f5b4a82e330b0daf827ed4dc2789971b0000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000002e000000000000000000000000000000000000000000000000000000000000000050000000000000000000000000a8cbea12a06869d3ec432ab9682dab6c761d591000000000000000000000000f4f9db7bb1d16b7cdfb18ec68994c26964f5985300000000000000000000000022fb3f90c539457f00d8484438869135e604a65500000000000000000000000033cbcedccb11c9773ad78e214ba342e979255ab30000000000000000000000006ffaa96256fbc1012325cca88c79f725c33eed80000000000000000000000000000000000000000000000000000000000000000500000000000000000000000074103cf8b436465870b26aa9fa2f62ad62b22e3500000000000000000000000038a6cb196f805cc3041f6645a5a6cec27b64430d00000000000000000000000047d7095cfebf8285bdaa421bc8268d0db87d933c000000000000000000000000a8842be973800ff61d80d2d53fa62c3a685380eb0000000000000000000000003750e31321aee8c024751877070e8d5f704ce98700000000000000000000000000000000000000000000000000000000000000206f3b82406688b8ddb944c6f2e6d808f014c8fa8d568d639c25019568c715fbf000000000000000000000000000000000000000000000000000000000000004220880d88ee16f1080c8afa0251880c8afa025208090dfc04a288090dfc04a30033a05010101010142206c5ca6f74b532222ac927dd3de235d46a943e372c0563393a33b01dcfd3f371c4220855114d25c2ef5e85fffe4f20a365672d8f2dba3b2ec82333f494168a2039c0442200266e835634db00977cbc1caa4db10e1676c1a4c0fcbc6ba7f09300f0d1831824220980cd91f7a73f20f4b0d51d00cd4e00373dc2beafbb299ca3c609757ab98c8304220eb6d36e2af8922085ff510bbe1eb8932a0e3295ca9f047fef25d90e69c52948f4a34313244334b6f6f574463364b7232644542684b59326b336e685057694676544565325331703978544532544b74344d7572716f684a34313244334b6f6f574b436e4367724b637743324a3577576a626e355435335068646b6b6f57454e534a39546537544b7836366f4a4a34313244334b6f6f575239616f675948786b357a38636b624c4c56346e426f7a777a747871664a7050586671336d4a7232796452474a34313244334b6f6f5744695444635565675637776b313133473366476a69616259756f54436f3157726f6f53656741343263556f544a34313244334b6f6f574e64687072586b5472665370354d5071736270467a70364167394a53787358694341434442676454424c656652820300050e416c74424e2d3132382047e282810e86e8cf899ae9a1b43e023bbe8825b103659bb8d6d4e54f6a3cfae7b106069c216a812d7616e47f0bd38fa4863f48fbcda6a38af4c58d2233dfa7cf79620947042d09f923e0a2f7a2270391e8b058d8bdb8f79fe082b7b627f025651c7290382fdff97c3181d15d162c146ce87ff752499d2acc2b26011439a12e29571a6f1e1defb1751c3be4258c493984fd9f0f6b4a26c539870b5f15bfed3d8ffac92499eb62dbd2beb7c1524275a8019022f6ce6a7e86c9e65e3099452a2b96fc2432b127a112970e1adf615f823b2b2180754c2f0ee01f1b389e56df55ca09702cd0401b66ff71779d2dd67222503a85ab921b28c329cc1832800b192d0b0247c0776e1b9653dc00df48daa6364287c84c0382f5165e7269fef06d10bc67c1bba252305d1af0dc7bb0fe92558eb4c5f38c23163dee1cfb34a72020669dbdfe337c16f3307472616e736c61746f722066726f6d20416c74424e2d3132382047e2828120746f20416c74424e2d3132382047e282825880ade2046080c8afa0256880c8afa0257080ade204788094ebdc0382019e010a205034214e0bd4373f38e162cf9fc9133e2f3b71441faa4c3d1ac01c1877f1cd2712200e03e975b996f911abba2b79d2596c2150bc94510963c40a1137a03df6edacdb1a107dee1cdb894163813bb3da604c9c133c1a10bb33302eeafbd55d352e35dcc5d2b3311a10d2c658b6b93d74a02d467849b6fe75251a10fea5308cc1fea69e7246eafe7ca8a3a51a1048efe1ad873b6f025ac0243bdef715f8000000000000000000000000000000000000000000000000000000000000"), - }, nil) - - expectedDKGVRF := ocr2vrftypes.OCRCommittee{ - Signers: []common.Address{ - common.HexToAddress("0x0A8cbEA12a06869d3EC432aB9682DAb6C761D591"), - common.HexToAddress("0xF4f9db7BB1d16b7CDfb18Ec68994c26964F59853"), - common.HexToAddress("0x22fB3F90C539457f00d8484438869135E604a655"), - common.HexToAddress("0x33CbCedccb11c9773AD78e214Ba342E979255ab3"), - common.HexToAddress("0x6ffaA96256fbC1012325cca88C79F725c33eED80"), - }, - Transmitters: []common.Address{ - common.HexToAddress("0x74103Cf8b436465870b26aa9Fa2F62AD62b22E35"), - common.HexToAddress("0x38A6Cb196f805cC3041F6645a5A6CEC27B64430D"), - common.HexToAddress("0x47d7095CFEBF8285BdAa421Bc8268D0DB87D933C"), - common.HexToAddress("0xa8842BE973800fF61D80d2d53fa62C3a685380eB"), - common.HexToAddress("0x3750e31321aEE8c024751877070E8d5F704cE987"), - }, - } - - c := &coordinator{ - lp: lp, - lggr: logger.TestLogger(t), - topics: tp, - beaconAddress: beaconAddress, - coordinatorAddress: coordinatorAddress, - dkgAddress: dkgAddress, - finalityDepth: 10, - evmClient: evmClient, - } - actualDKG, actualVRF, err := c.DKGVRFCommittees(testutils.Context(t)) - assert.NoError(t, err) - assert.ElementsMatch(t, expectedDKGVRF.Signers, actualDKG.Signers) - assert.ElementsMatch(t, expectedDKGVRF.Transmitters, actualDKG.Transmitters) - assert.ElementsMatch(t, expectedDKGVRF.Signers, actualVRF.Signers) - assert.ElementsMatch(t, expectedDKGVRF.Transmitters, actualVRF.Transmitters) - }) - - t.Run("vrf log poll fails", func(t *testing.T) { - lp := lp_mocks.NewLogPoller(t) - tp := newTopics() - - beaconAddress := newAddress(t) - lp.On("LatestLogByEventSigWithConfs", mock.Anything, tp.configSetTopic, beaconAddress, evmtypes.Confirmations(10)). - Return(nil, errors.New("rpc error")) - - c := &coordinator{ - lp: lp, - lggr: logger.TestLogger(t), - topics: tp, - beaconAddress: beaconAddress, - finalityDepth: 10, - evmClient: evmClient, - } - - _, _, err := c.DKGVRFCommittees(testutils.Context(t)) - assert.Error(t, err) - }) - - t.Run("dkg log poll fails", func(t *testing.T) { - lp := lp_mocks.NewLogPoller(t) - tp := newTopics() - beaconAddress := newAddress(t) - coordinatorAddress := newAddress(t) - dkgAddress := newAddress(t) - lp.On("LatestLogByEventSigWithConfs", mock.Anything, tp.configSetTopic, beaconAddress, evmtypes.Confirmations(10)). - Return(&logpoller.Log{ - Data: hexutil.MustDecode("0x0000000000000000000000000000000000000000000000000000000000a6fca200010576e704b4a519484d6239ef17f1f5b4a82e330b0daf827ed4dc2789971b0000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000002e000000000000000000000000000000000000000000000000000000000000000050000000000000000000000000a8cbea12a06869d3ec432ab9682dab6c761d591000000000000000000000000f4f9db7bb1d16b7cdfb18ec68994c26964f5985300000000000000000000000022fb3f90c539457f00d8484438869135e604a65500000000000000000000000033cbcedccb11c9773ad78e214ba342e979255ab30000000000000000000000006ffaa96256fbc1012325cca88c79f725c33eed80000000000000000000000000000000000000000000000000000000000000000500000000000000000000000074103cf8b436465870b26aa9fa2f62ad62b22e3500000000000000000000000038a6cb196f805cc3041f6645a5a6cec27b64430d00000000000000000000000047d7095cfebf8285bdaa421bc8268d0db87d933c000000000000000000000000a8842be973800ff61d80d2d53fa62c3a685380eb0000000000000000000000003750e31321aee8c024751877070e8d5f704ce98700000000000000000000000000000000000000000000000000000000000000206f3b82406688b8ddb944c6f2e6d808f014c8fa8d568d639c25019568c715fbf000000000000000000000000000000000000000000000000000000000000004220880d88ee16f1080c8afa0251880c8afa025208090dfc04a288090dfc04a30033a05010101010142206c5ca6f74b532222ac927dd3de235d46a943e372c0563393a33b01dcfd3f371c4220855114d25c2ef5e85fffe4f20a365672d8f2dba3b2ec82333f494168a2039c0442200266e835634db00977cbc1caa4db10e1676c1a4c0fcbc6ba7f09300f0d1831824220980cd91f7a73f20f4b0d51d00cd4e00373dc2beafbb299ca3c609757ab98c8304220eb6d36e2af8922085ff510bbe1eb8932a0e3295ca9f047fef25d90e69c52948f4a34313244334b6f6f574463364b7232644542684b59326b336e685057694676544565325331703978544532544b74344d7572716f684a34313244334b6f6f574b436e4367724b637743324a3577576a626e355435335068646b6b6f57454e534a39546537544b7836366f4a4a34313244334b6f6f575239616f675948786b357a38636b624c4c56346e426f7a777a747871664a7050586671336d4a7232796452474a34313244334b6f6f5744695444635565675637776b313133473366476a69616259756f54436f3157726f6f53656741343263556f544a34313244334b6f6f574e64687072586b5472665370354d5071736270467a70364167394a53787358694341434442676454424c656652820300050e416c74424e2d3132382047e282810e86e8cf899ae9a1b43e023bbe8825b103659bb8d6d4e54f6a3cfae7b106069c216a812d7616e47f0bd38fa4863f48fbcda6a38af4c58d2233dfa7cf79620947042d09f923e0a2f7a2270391e8b058d8bdb8f79fe082b7b627f025651c7290382fdff97c3181d15d162c146ce87ff752499d2acc2b26011439a12e29571a6f1e1defb1751c3be4258c493984fd9f0f6b4a26c539870b5f15bfed3d8ffac92499eb62dbd2beb7c1524275a8019022f6ce6a7e86c9e65e3099452a2b96fc2432b127a112970e1adf615f823b2b2180754c2f0ee01f1b389e56df55ca09702cd0401b66ff71779d2dd67222503a85ab921b28c329cc1832800b192d0b0247c0776e1b9653dc00df48daa6364287c84c0382f5165e7269fef06d10bc67c1bba252305d1af0dc7bb0fe92558eb4c5f38c23163dee1cfb34a72020669dbdfe337c16f3307472616e736c61746f722066726f6d20416c74424e2d3132382047e2828120746f20416c74424e2d3132382047e282825880ade2046080c8afa0256880c8afa0257080ade204788094ebdc0382019e010a205034214e0bd4373f38e162cf9fc9133e2f3b71441faa4c3d1ac01c1877f1cd2712200e03e975b996f911abba2b79d2596c2150bc94510963c40a1137a03df6edacdb1a107dee1cdb894163813bb3da604c9c133c1a10bb33302eeafbd55d352e35dcc5d2b3311a10d2c658b6b93d74a02d467849b6fe75251a10fea5308cc1fea69e7246eafe7ca8a3a51a1048efe1ad873b6f025ac0243bdef715f8000000000000000000000000000000000000000000000000000000000000"), - }, nil) - lp.On("LatestLogByEventSigWithConfs", mock.Anything, tp.configSetTopic, dkgAddress, evmtypes.Confirmations(10)). - Return(nil, errors.New("rpc error")) - - c := &coordinator{ - lp: lp, - topics: tp, - lggr: logger.TestLogger(t), - beaconAddress: beaconAddress, - coordinatorAddress: coordinatorAddress, - dkgAddress: dkgAddress, - finalityDepth: 10, - evmClient: evmClient, - } - _, _, err := c.DKGVRFCommittees(testutils.Context(t)) - assert.Error(t, err) - }) -} - -func TestCoordinator_ProvingKeyHash(t *testing.T) { - t.Parallel() - - t.Run("valid output", func(t *testing.T) { - h := crypto.Keccak256Hash([]byte("hello world")) - var expected [32]byte - copy(expected[:], h.Bytes()) - onchainRouter := mocks.NewVRFBeaconCoordinator(t) - onchainRouter. - On("SProvingKeyHash", mock.Anything). - Return(expected, nil) - c := &coordinator{ - onchainRouter: onchainRouter, - } - provingKeyHash, err := c.ProvingKeyHash(testutils.Context(t)) - assert.NoError(t, err) - assert.ElementsMatch(t, expected[:], provingKeyHash[:]) - }) - - t.Run("invalid output", func(t *testing.T) { - onchainRouter := mocks.NewVRFBeaconCoordinator(t) - onchainRouter. - On("SProvingKeyHash", mock.Anything). - Return([32]byte{}, errors.New("rpc error")) - c := &coordinator{ - onchainRouter: onchainRouter, - } - _, err := c.ProvingKeyHash(testutils.Context(t)) - assert.Error(t, err) - }) -} - -func TestCoordinator_ReportBlocks(t *testing.T) { - lggr := logger.TestLogger(t) - proofG1X := big.NewInt(1) - proofG1Y := big.NewInt(2) - evmClient := evmclimocks.NewClient(t) - evmClient.On("ConfiguredChainID").Return(big.NewInt(1)) - t.Run("happy path, beacon requests", func(t *testing.T) { - beaconAddress := newAddress(t) - coordinatorAddress := newAddress(t) - - latestHeadNumber := uint64(200) - onchainRouter, err := newRouter(lggr, beaconAddress, coordinatorAddress, evmClient) - require.NoError(t, err) - - tp := newTopics() - - lookbackBlocks := uint64(5) - lp := getLogPoller(t, []uint64{195}, latestHeadNumber, true, true, lookbackBlocks) - lp.On( - "LogsWithSigs", - mock.Anything, - int64(latestHeadNumber-lookbackBlocks), - int64(latestHeadNumber), - []common.Hash{ - tp.randomnessRequestedTopic, - tp.randomnessFulfillmentRequestedTopic, - tp.randomWordsFulfilledTopic, - tp.outputsServedTopic, - }, - coordinatorAddress, - ).Return([]logpoller.Log{ - newRandomnessRequestedLog(t, 3, 195, 191, 0, coordinatorAddress), - newRandomnessRequestedLog(t, 3, 195, 192, 1, coordinatorAddress), - newRandomnessRequestedLog(t, 3, 195, 193, 2, coordinatorAddress), - }, nil).Once() - - c := &coordinator{ - onchainRouter: onchainRouter, - beaconAddress: beaconAddress, - coordinatorAddress: coordinatorAddress, - lp: lp, - lggr: logger.TestLogger(t), - topics: tp, - evmClient: evmClient, - toBeTransmittedBlocks: NewBlockCache[blockInReport](time.Duration(int64(lookbackBlocks) * int64(time.Second))), - toBeTransmittedCallbacks: NewBlockCache[callbackInReport](time.Duration(int64(lookbackBlocks) * int64(time.Second))), - coordinatorConfig: newCoordinatorConfig(lookbackBlocks), - blockhashLookback: lookbackBlocks, - } - - blocks, callbacks, recentHeightStart, recentBlocks, err := c.ReportBlocks( - testutils.Context(t), - 0, // slotInterval: unused - map[uint32]struct{}{3: {}}, - time.Duration(0), - 100, // maxBlocks: unused - 100, // maxCallbacks: unused - ) - assert.NoError(t, err) - assert.Len(t, blocks, 1) - assert.Len(t, callbacks, 0) - assert.Equal(t, latestHeadNumber-lookbackBlocks+1, recentHeightStart) - assert.Len(t, recentBlocks, int(lookbackBlocks)) - }) - - t.Run("happy path, callback requests", func(t *testing.T) { - beaconAddress := newAddress(t) - coordinatorAddress := newAddress(t) - - latestHeadNumber := uint64(200) - onchainRouter, err := newRouter(lggr, beaconAddress, coordinatorAddress, evmClient) - require.NoError(t, err) - - tp := newTopics() - - lookbackBlocks := uint64(5) - lp := getLogPoller(t, []uint64{195}, latestHeadNumber, true, true, lookbackBlocks) - lp.On( - "LogsWithSigs", - mock.Anything, - int64(latestHeadNumber-lookbackBlocks), - int64(latestHeadNumber), - []common.Hash{ - tp.randomnessRequestedTopic, - tp.randomnessFulfillmentRequestedTopic, - tp.randomWordsFulfilledTopic, - tp.outputsServedTopic, - }, - coordinatorAddress, - ).Return([]logpoller.Log{ - newRandomnessFulfillmentRequestedLog(t, 3, 195, 191, 1, 1000, coordinatorAddress), - newRandomnessFulfillmentRequestedLog(t, 3, 195, 192, 2, 1000, coordinatorAddress), - newRandomnessFulfillmentRequestedLog(t, 3, 195, 193, 3, 1000, coordinatorAddress), - }, nil).Once() - - c := &coordinator{ - onchainRouter: onchainRouter, - beaconAddress: beaconAddress, - coordinatorAddress: coordinatorAddress, - lp: lp, - lggr: logger.TestLogger(t), - topics: tp, - evmClient: evmClient, - toBeTransmittedBlocks: NewBlockCache[blockInReport](time.Duration(int64(lookbackBlocks) * int64(time.Second))), - toBeTransmittedCallbacks: NewBlockCache[callbackInReport](time.Duration(int64(lookbackBlocks) * int64(time.Second))), - coordinatorConfig: newCoordinatorConfig(lookbackBlocks), - blockhashLookback: lookbackBlocks, - } - - blocks, callbacks, recentHeightStart, recentBlocks, err := c.ReportBlocks( - testutils.Context(t), - 0, // slotInterval: unused - map[uint32]struct{}{3: {}}, - time.Duration(0), - 100, // maxBlocks: unused - 100, // maxCallbacks: unused - ) - assert.NoError(t, err) - assert.Len(t, blocks, 1) - for _, b := range blocks { - assert.False(t, b.ShouldStore) - } - assert.Len(t, callbacks, 3) - assert.Equal(t, latestHeadNumber-lookbackBlocks+1, recentHeightStart) - assert.Len(t, recentBlocks, int(lookbackBlocks)) - }) - - t.Run("happy path, beacon requests, beacon fulfillments", func(t *testing.T) { - beaconAddress := newAddress(t) - coordinatorAddress := newAddress(t) - - latestHeadNumber := uint64(200) - onchainRouter, err := newRouter(lggr, beaconAddress, coordinatorAddress, evmClient) - require.NoError(t, err) - - tp := newTopics() - - lookbackBlocks := uint64(5) - lp := getLogPoller(t, []uint64{195}, latestHeadNumber, true, true, lookbackBlocks) - lp.On( - "LogsWithSigs", - mock.Anything, - int64(latestHeadNumber-lookbackBlocks), - int64(latestHeadNumber), - []common.Hash{ - tp.randomnessRequestedTopic, - tp.randomnessFulfillmentRequestedTopic, - tp.randomWordsFulfilledTopic, - tp.outputsServedTopic, - }, - coordinatorAddress, - ).Return([]logpoller.Log{ - newRandomnessRequestedLog(t, 3, 195, 191, 0, coordinatorAddress), - newRandomnessRequestedLog(t, 3, 195, 192, 1, coordinatorAddress), - newRandomnessRequestedLog(t, 3, 195, 193, 2, coordinatorAddress), - newOutputsServedLog(t, []vrf_coordinator.VRFBeaconTypesOutputServed{ - { - Height: 195, - ConfirmationDelay: big.NewInt(3), - ProofG1X: proofG1X, - ProofG1Y: proofG1Y, - }, - }, coordinatorAddress), - }, nil).Once() - - c := &coordinator{ - onchainRouter: onchainRouter, - beaconAddress: beaconAddress, - coordinatorAddress: coordinatorAddress, - lp: lp, - lggr: logger.TestLogger(t), - topics: tp, - evmClient: evmClient, - toBeTransmittedBlocks: NewBlockCache[blockInReport](time.Duration(int64(lookbackBlocks) * int64(time.Second))), - toBeTransmittedCallbacks: NewBlockCache[callbackInReport](time.Duration(int64(lookbackBlocks) * int64(time.Second))), - coordinatorConfig: newCoordinatorConfig(lookbackBlocks), - blockhashLookback: lookbackBlocks, - } - - blocks, callbacks, recentHeightStart, recentBlocks, err := c.ReportBlocks( - testutils.Context(t), - 0, // slotInterval: unused - map[uint32]struct{}{3: {}}, - time.Duration(0), - 100, // maxBlocks: unused - 100, // maxCallbacks: unused - ) - assert.NoError(t, err) - assert.Len(t, blocks, 0) - assert.Len(t, callbacks, 0) - assert.Equal(t, latestHeadNumber-lookbackBlocks+1, recentHeightStart) - assert.Len(t, recentBlocks, int(lookbackBlocks)) - }) - - t.Run("happy path, callback requests, callback fulfillments", func(t *testing.T) { - beaconAddress := newAddress(t) - coordinatorAddress := newAddress(t) - - latestHeadNumber := uint64(200) - onchainRouter, err := newRouter(lggr, beaconAddress, coordinatorAddress, evmClient) - require.NoError(t, err) - - tp := newTopics() - - lookbackBlocks := uint64(5) - lp := getLogPoller(t, []uint64{195}, latestHeadNumber, true, true, lookbackBlocks) - // Both RandomWordsFulfilled and NewTransmission events are emitted - // when a VRF fulfillment happens on chain. - lp.On( - "LogsWithSigs", - mock.Anything, - int64(latestHeadNumber-lookbackBlocks), - int64(latestHeadNumber), - []common.Hash{ - tp.randomnessRequestedTopic, - tp.randomnessFulfillmentRequestedTopic, - tp.randomWordsFulfilledTopic, - tp.outputsServedTopic, - }, - coordinatorAddress, - ).Return([]logpoller.Log{ - newRandomnessFulfillmentRequestedLog(t, 3, 195, 191, 1, 1000, coordinatorAddress), - newRandomnessFulfillmentRequestedLog(t, 3, 195, 192, 2, 1000, coordinatorAddress), - newRandomnessFulfillmentRequestedLog(t, 3, 195, 193, 3, 1000, coordinatorAddress), - // Regardless of success or failure, if the fulfillment has been tried once do not report again. - newRandomWordsFulfilledLog(t, []*big.Int{big.NewInt(1), big.NewInt(2), big.NewInt(3)}, []byte{1, 0, 0}, coordinatorAddress), - newOutputsServedLog(t, []vrf_coordinator.VRFBeaconTypesOutputServed{ - { - Height: 195, - ConfirmationDelay: big.NewInt(3), - ProofG1X: proofG1X, - ProofG1Y: proofG1Y, - }, - }, coordinatorAddress), - }, nil).Once() - - c := &coordinator{ - onchainRouter: onchainRouter, - beaconAddress: beaconAddress, - coordinatorAddress: coordinatorAddress, - lp: lp, - lggr: logger.TestLogger(t), - topics: tp, - evmClient: evmClient, - toBeTransmittedBlocks: NewBlockCache[blockInReport](time.Duration(int64(lookbackBlocks) * int64(time.Second))), - toBeTransmittedCallbacks: NewBlockCache[callbackInReport](time.Duration(int64(lookbackBlocks) * int64(time.Second))), - coordinatorConfig: newCoordinatorConfig(lookbackBlocks), - blockhashLookback: lookbackBlocks, - } - - blocks, callbacks, recentHeightStart, recentBlocks, err := c.ReportBlocks( - testutils.Context(t), - 0, // slotInterval: unused - map[uint32]struct{}{3: {}}, - time.Duration(0), - 100, // maxBlocks: unused - 100, // maxCallbacks: unused - ) - assert.NoError(t, err) - assert.Len(t, blocks, 0) - assert.Len(t, callbacks, 0) - assert.Equal(t, latestHeadNumber-lookbackBlocks+1, recentHeightStart) - assert.Len(t, recentBlocks, int(lookbackBlocks)) - }) - - t.Run("happy path, only beacon fulfillment", func(t *testing.T) { - beaconAddress := newAddress(t) - coordinatorAddress := newAddress(t) - - latestHeadNumber := uint64(200) - onchainRouter, err := newRouter(lggr, beaconAddress, coordinatorAddress, evmClient) - require.NoError(t, err) - - tp := newTopics() - - lookbackBlocks := uint64(5) - lp := getLogPoller(t, []uint64{}, latestHeadNumber, true, true, lookbackBlocks) - lp.On( - "LogsWithSigs", - mock.Anything, - int64(latestHeadNumber-lookbackBlocks), - int64(latestHeadNumber), - []common.Hash{ - tp.randomnessRequestedTopic, - tp.randomnessFulfillmentRequestedTopic, - tp.randomWordsFulfilledTopic, - tp.outputsServedTopic, - }, - coordinatorAddress, - ).Return([]logpoller.Log{newOutputsServedLog(t, []vrf_coordinator.VRFBeaconTypesOutputServed{ - { - Height: 195, - ConfirmationDelay: big.NewInt(3), - ProofG1X: proofG1X, - ProofG1Y: proofG1Y, - }, - }, coordinatorAddress)}, nil).Once() - - c := &coordinator{ - onchainRouter: onchainRouter, - beaconAddress: beaconAddress, - coordinatorAddress: coordinatorAddress, - lp: lp, - lggr: logger.TestLogger(t), - topics: tp, - evmClient: evmClient, - toBeTransmittedBlocks: NewBlockCache[blockInReport](time.Duration(int64(lookbackBlocks) * int64(time.Second))), - toBeTransmittedCallbacks: NewBlockCache[callbackInReport](time.Duration(int64(lookbackBlocks) * int64(time.Second))), - coordinatorConfig: newCoordinatorConfig(lookbackBlocks), - blockhashLookback: lookbackBlocks, - } - - blocks, callbacks, recentHeightStart, recentBlocks, err := c.ReportBlocks( - testutils.Context(t), - 0, // slotInterval: unused - map[uint32]struct{}{3: {}}, - time.Duration(0), - 100, // maxBlocks: unused - 100, // maxCallbacks: unused - ) - assert.NoError(t, err) - assert.Len(t, blocks, 0) - assert.Len(t, callbacks, 0) - assert.Equal(t, latestHeadNumber-lookbackBlocks+1, recentHeightStart) - assert.Len(t, recentBlocks, int(lookbackBlocks)) - }) - - t.Run("happy path, callback requests & callback fulfillments in-flight", func(t *testing.T) { - beaconAddress := newAddress(t) - coordinatorAddress := newAddress(t) - - latestHeadNumber := uint64(200) - onchainRouter, err := newRouter(lggr, beaconAddress, coordinatorAddress, evmClient) - require.NoError(t, err) - - tp := newTopics() - - lookbackBlocks := uint64(5) - // Do not include latestHeadNumber in "GetBlocksRange" call for initial "ReportWillBeTransmitted." - // Do not include recent blockhashes in range either. - lp := getLogPoller(t, []uint64{195}, latestHeadNumber, false, false /* includeLatestHeadInRange */, 0) - - c := &coordinator{ - onchainRouter: onchainRouter, - beaconAddress: beaconAddress, - coordinatorAddress: coordinatorAddress, - lp: lp, - lggr: logger.TestLogger(t), - topics: tp, - evmClient: evmClient, - toBeTransmittedBlocks: NewBlockCache[blockInReport](time.Duration(int64(lookbackBlocks) * int64(time.Second))), - toBeTransmittedCallbacks: NewBlockCache[callbackInReport](time.Duration(int64(lookbackBlocks) * int64(time.Second))), - coordinatorConfig: newCoordinatorConfig(lookbackBlocks), - blockhashLookback: lookbackBlocks, - } - - report := ocr2vrftypes.AbstractReport{ - RecentBlockHeight: 195, - RecentBlockHash: common.HexToHash("0x001"), - Outputs: []ocr2vrftypes.AbstractVRFOutput{ - { - BlockHeight: 195, - ConfirmationDelay: 195, - Callbacks: []ocr2vrftypes.AbstractCostedCallbackRequest{ - { - RequestID: big.NewInt(1), - BeaconHeight: 195, - }, - { - RequestID: big.NewInt(2), - BeaconHeight: 195, - }, - { - RequestID: big.NewInt(3), - BeaconHeight: 195, - }, - }, - }, - }, - } - - err = c.ReportWillBeTransmitted(testutils.Context(t), report) - require.NoError(t, err) - - // Include latestHeadNumber in "GetBlocksRange" call for "ReportBlocks" call. - // Include recent blockhashes in range. - lp = getLogPoller(t, []uint64{195}, latestHeadNumber, true, true /* includeLatestHeadInRange */, lookbackBlocks) - c.lp = lp - lp.On( - "LogsWithSigs", - mock.Anything, - int64(latestHeadNumber-lookbackBlocks), - int64(latestHeadNumber), - []common.Hash{ - tp.randomnessRequestedTopic, - tp.randomnessFulfillmentRequestedTopic, - tp.randomWordsFulfilledTopic, - tp.outputsServedTopic, - }, - coordinatorAddress, - ).Return([]logpoller.Log{ - newRandomnessFulfillmentRequestedLog(t, 3, 195, 191, 1, 1000, coordinatorAddress), - newRandomnessFulfillmentRequestedLog(t, 3, 195, 192, 2, 1000, coordinatorAddress), - newRandomnessFulfillmentRequestedLog(t, 3, 195, 193, 3, 1000, coordinatorAddress), - newOutputsServedLog(t, []vrf_coordinator.VRFBeaconTypesOutputServed{ - { - Height: 195, - ConfirmationDelay: big.NewInt(3), - ProofG1X: proofG1X, - ProofG1Y: proofG1Y, - }, - }, coordinatorAddress), - }, nil).Once() - - blocks, callbacks, recentHeightStart, recentBlocks, err := c.ReportBlocks( - testutils.Context(t), - 0, // slotInterval: unused - map[uint32]struct{}{3: {}}, - time.Duration(0), - 100, // maxBlocks: unused - 100, // maxCallbacks: unused - ) - assert.NoError(t, err) - assert.Len(t, blocks, 0) - assert.Len(t, callbacks, 0) - assert.Equal(t, latestHeadNumber-lookbackBlocks+1, recentHeightStart) - assert.Len(t, recentBlocks, int(lookbackBlocks)) - }) - - t.Run("happy path, blocks requested hits batch gas limit", func(t *testing.T) { - coordinatorAddress := newAddress(t) - beaconAddress := newAddress(t) - onchainRouter, err := newRouter(lggr, beaconAddress, coordinatorAddress, evmClient) - require.NoError(t, err) - - latestHeadNumber := uint64(400) - lookbackBlocks := uint64(400) - blockhashLookback := uint64(256) - - tp := newTopics() - - logs := []logpoller.Log{} - requestedBlocks := []uint64{} - - // Populate 200 request blocks. - for i := 0; i < 400; i += 2 { - logs = append(logs, newRandomnessRequestedLog(t, 1, uint64(i), 0, int64(i), coordinatorAddress)) - requestedBlocks = append(requestedBlocks, uint64(i)) - } - lp := getLogPoller(t, requestedBlocks, latestHeadNumber, true, true, blockhashLookback) - lp.On( - "LogsWithSigs", - mock.Anything, - int64(latestHeadNumber-lookbackBlocks), - int64(latestHeadNumber), - []common.Hash{ - tp.randomnessRequestedTopic, - tp.randomnessFulfillmentRequestedTopic, - tp.randomWordsFulfilledTopic, - tp.outputsServedTopic, - }, - coordinatorAddress, - ).Return(logs, nil) - - c := &coordinator{ - onchainRouter: onchainRouter, - beaconAddress: beaconAddress, - coordinatorAddress: coordinatorAddress, - lp: lp, - lggr: logger.TestLogger(t), - topics: tp, - evmClient: evmClient, - toBeTransmittedBlocks: NewBlockCache[blockInReport](time.Duration(int64(lookbackBlocks) * int64(time.Second))), - toBeTransmittedCallbacks: NewBlockCache[callbackInReport](time.Duration(int64(lookbackBlocks) * int64(time.Second))), - coordinatorConfig: newCoordinatorConfig(lookbackBlocks), - blockhashLookback: blockhashLookback, - } - - blocks, callbacks, recentHeightStart, recentBlocks, err := c.ReportBlocks( - testutils.Context(t), - 0, // slotInterval: unused - map[uint32]struct{}{1: {}}, - time.Duration(0), - 100, // maxBlocks: unused - 100, // maxCallbacks: unused - ) - - // Coordinator should allow 99 blocks, i.e 100 blocks - 1 block's worth of gas - // for the coordinator overhead. - assert.NoError(t, err) - assert.Len(t, blocks, 99) - for _, b := range blocks { - assert.True(t, b.ShouldStore) - } - assert.Len(t, callbacks, 0) - assert.Equal(t, latestHeadNumber-blockhashLookback+1, recentHeightStart) - assert.Len(t, recentBlocks, int(blockhashLookback)) - }) - - t.Run("happy path, last callback hits batch gas limit", func(t *testing.T) { - coordinatorAddress := newAddress(t) - beaconAddress := newAddress(t) - onchainRouter, err := newRouter(lggr, beaconAddress, coordinatorAddress, evmClient) - require.NoError(t, err) - - latestHeadNumber := uint64(200) - lookbackBlocks := uint64(5) - - tp := newTopics() - - requestedBlocks := []uint64{195} - lp := getLogPoller(t, requestedBlocks, latestHeadNumber, true, true, lookbackBlocks) - lp.On( - "LogsWithSigs", - mock.Anything, - int64(latestHeadNumber-lookbackBlocks), - int64(latestHeadNumber), - []common.Hash{ - tp.randomnessRequestedTopic, - tp.randomnessFulfillmentRequestedTopic, - tp.randomWordsFulfilledTopic, - tp.outputsServedTopic, - }, - coordinatorAddress, - ).Return([]logpoller.Log{ - newRandomnessRequestedLog(t, 3, 195, 191, 0, coordinatorAddress), - newRandomnessFulfillmentRequestedLog(t, 3, 195, 191, 1, 2_000_000, coordinatorAddress), - newRandomnessFulfillmentRequestedLog(t, 3, 195, 192, 2, 2_900_000, coordinatorAddress), - newRandomnessFulfillmentRequestedLog(t, 3, 195, 193, 3, 1, coordinatorAddress), - }, nil) - - c := &coordinator{ - onchainRouter: onchainRouter, - beaconAddress: beaconAddress, - coordinatorAddress: coordinatorAddress, - lp: lp, - lggr: logger.TestLogger(t), - topics: tp, - evmClient: evmClient, - toBeTransmittedBlocks: NewBlockCache[blockInReport](time.Duration(int64(lookbackBlocks) * int64(time.Second))), - toBeTransmittedCallbacks: NewBlockCache[callbackInReport](time.Duration(int64(lookbackBlocks) * int64(time.Second))), - coordinatorConfig: newCoordinatorConfig(lookbackBlocks), - blockhashLookback: lookbackBlocks, - } - - blocks, callbacks, recentHeightStart, recentBlocks, err := c.ReportBlocks( - testutils.Context(t), - 0, // slotInterval: unused - map[uint32]struct{}{3: {}}, - time.Duration(0), - 100, // maxBlocks: unused - 100, // maxCallbacks: unused - ) - - // Should allow the first two callbacks, which add up to 4_950_000 + 50_000 (1 block) = 5_000_000, - // then reject the last callback for being out of gas. - assert.NoError(t, err) - assert.Len(t, blocks, 1) - for _, b := range blocks { - assert.True(t, b.ShouldStore) - } - assert.Len(t, callbacks, 2) - assert.Equal(t, latestHeadNumber-lookbackBlocks+1, recentHeightStart) - assert.Len(t, recentBlocks, int(lookbackBlocks)) - }) - - t.Run("happy path, sandwiched callbacks hit batch gas limit", func(t *testing.T) { - coordinatorAddress := newAddress(t) - beaconAddress := newAddress(t) - onchainRouter, err := newRouter(lggr, beaconAddress, coordinatorAddress, evmClient) - require.NoError(t, err) - - latestHeadNumber := uint64(200) - lookbackBlocks := uint64(5) - - tp := newTopics() - - requestedBlocks := []uint64{195} - lp := getLogPoller(t, requestedBlocks, latestHeadNumber, true, true, lookbackBlocks) - lp.On( - "LogsWithSigs", - mock.Anything, - int64(latestHeadNumber-lookbackBlocks), - int64(latestHeadNumber), - []common.Hash{ - tp.randomnessRequestedTopic, - tp.randomnessFulfillmentRequestedTopic, - tp.randomWordsFulfilledTopic, - tp.outputsServedTopic, - }, - coordinatorAddress, - ).Return([]logpoller.Log{ - newRandomnessRequestedLog(t, 3, 195, 191, 0, coordinatorAddress), - newRandomnessFulfillmentRequestedLog(t, 3, 195, 191, 1, 10_000_000, coordinatorAddress), - newRandomnessFulfillmentRequestedLog(t, 3, 195, 192, 2, 1000, coordinatorAddress), - newRandomnessFulfillmentRequestedLog(t, 3, 195, 193, 3, 10_000_000, coordinatorAddress), - }, nil) - - c := &coordinator{ - onchainRouter: onchainRouter, - beaconAddress: beaconAddress, - coordinatorAddress: coordinatorAddress, - lp: lp, - lggr: logger.TestLogger(t), - topics: tp, - evmClient: evmClient, - toBeTransmittedBlocks: NewBlockCache[blockInReport](time.Duration(int64(lookbackBlocks) * int64(time.Second))), - toBeTransmittedCallbacks: NewBlockCache[callbackInReport](time.Duration(int64(lookbackBlocks) * int64(time.Second))), - coordinatorConfig: newCoordinatorConfig(lookbackBlocks), - blockhashLookback: lookbackBlocks, - } - - blocks, callbacks, recentHeightStart, recentBlocks, err := c.ReportBlocks( - testutils.Context(t), - 0, // slotInterval: unused - map[uint32]struct{}{3: {}}, - time.Duration(0), - 100, // maxBlocks: unused - 100, // maxCallbacks: unused - ) - - // Should allow the middle callback, with an acceptable gas allowance, to be processed. - assert.NoError(t, err) - assert.Len(t, blocks, 1) - assert.Len(t, callbacks, 1) - assert.Equal(t, latestHeadNumber-lookbackBlocks+1, recentHeightStart) - assert.Len(t, recentBlocks, int(lookbackBlocks)) - }) - - t.Run("happy path, sandwiched callbacks with valid callback in next block hit batch gas limit", func(t *testing.T) { - coordinatorAddress := newAddress(t) - beaconAddress := newAddress(t) - onchainRouter, err := newRouter(lggr, beaconAddress, coordinatorAddress, evmClient) - require.NoError(t, err) - - latestHeadNumber := uint64(200) - lookbackBlocks := uint64(5) - - tp := newTopics() - - requestedBlocks := []uint64{195, 196} - lp := getLogPoller(t, requestedBlocks, latestHeadNumber, true, true, lookbackBlocks) - lp.On( - "LogsWithSigs", - mock.Anything, - int64(latestHeadNumber-lookbackBlocks), - int64(latestHeadNumber), - []common.Hash{ - tp.randomnessRequestedTopic, - tp.randomnessFulfillmentRequestedTopic, - tp.randomWordsFulfilledTopic, - tp.outputsServedTopic, - }, - coordinatorAddress, - ).Return([]logpoller.Log{ - newRandomnessRequestedLog(t, 3, 195, 191, 0, coordinatorAddress), - newRandomnessFulfillmentRequestedLog(t, 3, 195, 191, 1, 10_000_000, coordinatorAddress), - newRandomnessFulfillmentRequestedLog(t, 3, 195, 192, 2, 1000, coordinatorAddress), - newRandomnessFulfillmentRequestedLog(t, 3, 195, 193, 3, 10_000_000, coordinatorAddress), - newRandomnessFulfillmentRequestedLog(t, 3, 196, 194, 4, 1000, coordinatorAddress), - }, nil) - - c := &coordinator{ - onchainRouter: onchainRouter, - beaconAddress: beaconAddress, - coordinatorAddress: coordinatorAddress, - lp: lp, - lggr: logger.TestLogger(t), - topics: tp, - evmClient: evmClient, - toBeTransmittedBlocks: NewBlockCache[blockInReport](time.Duration(int64(lookbackBlocks) * int64(time.Second))), - toBeTransmittedCallbacks: NewBlockCache[callbackInReport](time.Duration(int64(lookbackBlocks) * int64(time.Second))), - coordinatorConfig: newCoordinatorConfig(lookbackBlocks), - blockhashLookback: lookbackBlocks, - } - - blocks, callbacks, recentHeightStart, recentBlocks, err := c.ReportBlocks( - testutils.Context(t), - 0, // slotInterval: unused - map[uint32]struct{}{3: {}}, - time.Duration(0), - 100, // maxBlocks: unused - 100, // maxCallbacks: unused - ) - - // Should allow the middle callback, with an acceptable gas allowance, to be processed, - // then move to the next block and find a suitable callback. Also adds the block 196 for - // that callback. - assert.NoError(t, err) - assert.Len(t, blocks, 2) - assert.Len(t, callbacks, 2) - assert.Equal(t, latestHeadNumber-lookbackBlocks+1, recentHeightStart) - assert.Len(t, recentBlocks, int(lookbackBlocks)) - }) - - t.Run("correct blockhashes are retrieved with the maximum lookback", func(t *testing.T) { - coordinatorAddress := newAddress(t) - beaconAddress := newAddress(t) - onchainRouter, err := newRouter(lggr, beaconAddress, coordinatorAddress, evmClient) - require.NoError(t, err) - - latestHeadNumber := uint64(1000) - lookbackBlocks := uint64(256) - - tp := newTopics() - - requestedBlocks := []uint64{} - lp := getLogPoller(t, requestedBlocks, latestHeadNumber, true, true, lookbackBlocks) - lp.On( - "LogsWithSigs", - mock.Anything, - int64(latestHeadNumber-lookbackBlocks), - int64(latestHeadNumber), - []common.Hash{ - tp.randomnessRequestedTopic, - tp.randomnessFulfillmentRequestedTopic, - tp.randomWordsFulfilledTopic, - tp.outputsServedTopic, - }, - coordinatorAddress, - ).Return([]logpoller.Log{}, nil) - - c := &coordinator{ - onchainRouter: onchainRouter, - beaconAddress: beaconAddress, - coordinatorAddress: coordinatorAddress, - lp: lp, - lggr: logger.TestLogger(t), - topics: tp, - evmClient: evmClient, - toBeTransmittedBlocks: NewBlockCache[blockInReport](time.Duration(int64(lookbackBlocks) * int64(time.Second))), - toBeTransmittedCallbacks: NewBlockCache[callbackInReport](time.Duration(int64(lookbackBlocks) * int64(time.Second))), - coordinatorConfig: newCoordinatorConfig(lookbackBlocks), - blockhashLookback: lookbackBlocks, - } - - _, _, recentHeightStart, recentBlocks, err := c.ReportBlocks( - testutils.Context(t), - 0, // slotInterval: unused - map[uint32]struct{}{3: {}}, - time.Duration(0), - 100, // maxBlocks: unused - 100, // maxCallbacks: unused - ) - - assert.NoError(t, err) - assert.Equal(t, latestHeadNumber-lookbackBlocks+1, recentHeightStart) - assert.Equal(t, common.HexToHash(fmt.Sprintf("0x00%d", 1)), recentBlocks[0]) - assert.Equal(t, common.HexToHash(fmt.Sprintf("0x00%d", lookbackBlocks)), recentBlocks[len(recentBlocks)-1]) - assert.Len(t, recentBlocks, int(lookbackBlocks)) - }) - - t.Run("correct blockhashes are retrieved with a capped lookback (close to genesis block)", func(t *testing.T) { - coordinatorAddress := newAddress(t) - beaconAddress := newAddress(t) - onchainRouter, err := newRouter(lggr, beaconAddress, coordinatorAddress, evmClient) - require.NoError(t, err) - - latestHeadNumber := uint64(100) - lookbackBlocks := uint64(100) - - tp := newTopics() - - requestedBlocks := []uint64{} - lp := getLogPoller(t, requestedBlocks, latestHeadNumber, true, true, lookbackBlocks) - lp.On( - "LogsWithSigs", - mock.Anything, - int64(latestHeadNumber-lookbackBlocks), - int64(latestHeadNumber), - []common.Hash{ - tp.randomnessRequestedTopic, - tp.randomnessFulfillmentRequestedTopic, - tp.randomWordsFulfilledTopic, - tp.outputsServedTopic, - }, - coordinatorAddress, - ).Return([]logpoller.Log{}, nil) - - c := &coordinator{ - onchainRouter: onchainRouter, - beaconAddress: beaconAddress, - coordinatorAddress: coordinatorAddress, - lp: lp, - lggr: logger.TestLogger(t), - topics: tp, - evmClient: evmClient, - toBeTransmittedBlocks: NewBlockCache[blockInReport](time.Duration(int64(lookbackBlocks) * int64(time.Second))), - toBeTransmittedCallbacks: NewBlockCache[callbackInReport](time.Duration(int64(lookbackBlocks) * int64(time.Second))), - coordinatorConfig: newCoordinatorConfig(lookbackBlocks), - blockhashLookback: lookbackBlocks, - } - - _, _, recentHeightStart, recentBlocks, err := c.ReportBlocks( - testutils.Context(t), - 0, // slotInterval: unused - map[uint32]struct{}{3: {}}, - time.Duration(0), - 100, // maxBlocks: unused - 100, // maxCallbacks: unused - ) - - assert.NoError(t, err) - assert.Equal(t, latestHeadNumber-lookbackBlocks+1, recentHeightStart) - assert.Equal(t, common.HexToHash(fmt.Sprintf("0x00%d", 1)), recentBlocks[0]) - assert.Equal(t, common.HexToHash(fmt.Sprintf("0x00%d", lookbackBlocks)), recentBlocks[len(recentBlocks)-1]) - assert.Len(t, recentBlocks, int(lookbackBlocks)) - }) - - t.Run("logpoller GetBlocks returns error", func(tt *testing.T) { - coordinatorAddress := newAddress(t) - beaconAddress := newAddress(t) - onchainRouter, err := newRouter(lggr, beaconAddress, coordinatorAddress, evmClient) - require.NoError(t, err) - - latestHeadNumber := uint64(200) - lookbackBlocks := uint64(5) - - tp := newTopics() - - requestedBlocks := []uint64{195, 196} - lp := lp_mocks.NewLogPoller(t) - lp.On("LatestBlock", mock.Anything). - Return(logpoller.LogPollerBlock{BlockNumber: int64(latestHeadNumber)}, nil) - - 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{ - tp.randomnessRequestedTopic, - tp.randomnessFulfillmentRequestedTopic, - tp.randomWordsFulfilledTopic, - tp.outputsServedTopic, - }, - coordinatorAddress, - ).Return([]logpoller.Log{ - newRandomnessRequestedLog(t, 3, 195, 191, 0, coordinatorAddress), - newRandomnessFulfillmentRequestedLog(t, 3, 195, 191, 1, 10_000_000, coordinatorAddress), - newRandomnessFulfillmentRequestedLog(t, 3, 195, 192, 2, 1000, coordinatorAddress), - newRandomnessFulfillmentRequestedLog(t, 3, 195, 193, 3, 10_000_000, coordinatorAddress), - newRandomnessFulfillmentRequestedLog(t, 3, 196, 194, 4, 1000, coordinatorAddress), - }, nil) - - c := &coordinator{ - onchainRouter: onchainRouter, - beaconAddress: beaconAddress, - coordinatorAddress: coordinatorAddress, - lp: lp, - lggr: logger.TestLogger(t), - topics: tp, - evmClient: evmClient, - toBeTransmittedBlocks: NewBlockCache[blockInReport](time.Duration(int64(lookbackBlocks) * int64(time.Second))), - toBeTransmittedCallbacks: NewBlockCache[callbackInReport](time.Duration(int64(lookbackBlocks) * int64(time.Second))), - coordinatorConfig: newCoordinatorConfig(lookbackBlocks), - blockhashLookback: lookbackBlocks, - } - - blocks, callbacks, _, _, err := c.ReportBlocks( - testutils.Context(t), - 0, // slotInterval: unused - map[uint32]struct{}{3: {}}, - time.Duration(0), - 100, // maxBlocks: unused - 100, // maxCallbacks: unused - ) - - assert.Error(tt, err) - assert.EqualError(tt, errors.Cause(err), "GetBlocks error") - assert.Nil(tt, blocks) - assert.Nil(tt, callbacks) - }) -} - -func TestCoordinator_ReportWillBeTransmitted(t *testing.T) { - evmClient := evmclimocks.NewClient(t) - evmClient.On("ConfiguredChainID").Return(big.NewInt(1)) - t.Run("happy path", func(t *testing.T) { - lookbackBlocks := uint64(0) - lp := getLogPoller(t, []uint64{199}, 200, false, false, 0) - c := &coordinator{ - lp: lp, - lggr: logger.TestLogger(t), - toBeTransmittedBlocks: NewBlockCache[blockInReport](time.Duration(int64(lookbackBlocks) * int64(time.Second))), - toBeTransmittedCallbacks: NewBlockCache[callbackInReport](time.Duration(int64(lookbackBlocks) * int64(time.Second))), - coordinatorConfig: newCoordinatorConfig(lookbackBlocks), - evmClient: evmClient, - } - assert.NoError(t, c.ReportWillBeTransmitted(testutils.Context(t), ocr2vrftypes.AbstractReport{ - RecentBlockHeight: 199, - RecentBlockHash: common.HexToHash("0x001"), - })) - }) - - t.Run("re-org", func(t *testing.T) { - lookbackBlocks := uint64(0) - lp := getLogPoller(t, []uint64{199}, 200, false, false, 0) - c := &coordinator{ - lp: lp, - lggr: logger.TestLogger(t), - toBeTransmittedBlocks: NewBlockCache[blockInReport](time.Duration(int64(lookbackBlocks) * int64(time.Second))), - toBeTransmittedCallbacks: NewBlockCache[callbackInReport](time.Duration(int64(lookbackBlocks) * int64(time.Second))), - coordinatorConfig: newCoordinatorConfig(lookbackBlocks), - evmClient: evmClient, - } - assert.Error(t, c.ReportWillBeTransmitted(testutils.Context(t), ocr2vrftypes.AbstractReport{ - RecentBlockHeight: 199, - RecentBlockHash: common.HexToHash("0x009"), - })) - }) -} - -func TestCoordinator_MarshalUnmarshal(t *testing.T) { - t.Parallel() - proofG1X := big.NewInt(1) - proofG1Y := big.NewInt(2) - lggr := logger.TestLogger(t) - evmClient := evmclimocks.NewClient(t) - - coordinatorAddress := newAddress(t) - beaconAddress := newAddress(t) - vrfBeaconCoordinator, err := newRouter(lggr, beaconAddress, coordinatorAddress, evmClient) - require.NoError(t, err) - - lg := newRandomnessRequestedLog(t, 3, 1500, 1450, 1, coordinatorAddress) - rrIface, err := vrfBeaconCoordinator.ParseLog(toGethLog(lg)) - require.NoError(t, err) - rr, ok := rrIface.(*vrf_coordinator.VRFCoordinatorRandomnessRequested) - require.True(t, ok) - assert.Equal(t, uint64(1500), rr.NextBeaconOutputHeight) - assert.Equal(t, int64(3), rr.ConfDelay.Int64()) - - lg = newRandomnessFulfillmentRequestedLog(t, 3, 1500, 1450, 1, 1000, coordinatorAddress) - rfrIface, err := vrfBeaconCoordinator.ParseLog(toGethLog(lg)) - require.NoError(t, err) - rfr, ok := rfrIface.(*vrf_coordinator.VRFCoordinatorRandomnessFulfillmentRequested) - require.True(t, ok) - assert.Equal(t, uint64(1500), rfr.NextBeaconOutputHeight) - assert.Equal(t, int64(3), rfr.ConfDelay.Int64()) - assert.Equal(t, int64(1), rfr.RequestID.Int64()) - - configDigest := common.BigToHash(big.NewInt(10)) - lg = newNewTransmissionLog(t, beaconAddress, configDigest) - ntIface, err := vrfBeaconCoordinator.ParseLog(toGethLog(lg)) - require.NoError(t, err) - nt, ok := ntIface.(*vrf_beacon.VRFBeaconNewTransmission) - require.True(t, ok) - assert.True(t, bytes.Equal(nt.ConfigDigest[:], configDigest[:])) - assert.Equal(t, 0, nt.JuelsPerFeeCoin.Cmp(big.NewInt(1_000))) - assert.Equal(t, 0, nt.EpochAndRound.Cmp(big.NewInt(1))) - - lg = newRandomWordsFulfilledLog(t, []*big.Int{big.NewInt(1), big.NewInt(2), big.NewInt(3)}, []byte{1, 1, 1}, coordinatorAddress) - rwfIface, err := vrfBeaconCoordinator.ParseLog(toGethLog(lg)) - require.NoError(t, err) - rwf, ok := rwfIface.(*vrf_coordinator.VRFCoordinatorRandomWordsFulfilled) - require.True(t, ok) - assert.Equal(t, []int64{1, 2, 3}, []int64{rwf.RequestIDs[0].Int64(), rwf.RequestIDs[1].Int64(), rwf.RequestIDs[2].Int64()}) - assert.Equal(t, []byte{1, 1, 1}, rwf.SuccessfulFulfillment) - - lg = newOutputsServedLog(t, []vrf_coordinator.VRFBeaconTypesOutputServed{ - { - Height: 1500, - ConfirmationDelay: big.NewInt(3), - ProofG1X: proofG1X, - ProofG1Y: proofG1Y, - }, - { - Height: 1505, - ConfirmationDelay: big.NewInt(4), - ProofG1X: proofG1X, - ProofG1Y: proofG1Y, - }, - }, coordinatorAddress) - - osIface, err := vrfBeaconCoordinator.ParseLog(toGethLog(lg)) - require.NoError(t, err) - os, ok := osIface.(*vrf_coordinator.VRFCoordinatorOutputsServed) - require.True(t, ok) - assert.Equal(t, uint64(1500), os.OutputsServed[0].Height) - assert.Equal(t, uint64(1505), os.OutputsServed[1].Height) - assert.Equal(t, int64(3), os.OutputsServed[0].ConfirmationDelay.Int64()) - assert.Equal(t, int64(4), os.OutputsServed[1].ConfirmationDelay.Int64()) -} - -func TestCoordinator_ReportIsOnchain(t *testing.T) { - evmClient := evmclimocks.NewClient(t) - evmClient.On("ConfiguredChainID").Return(big.NewInt(1)) - - t.Run("report is on-chain", func(t *testing.T) { - tp := newTopics() - beaconAddress := newAddress(t) - coordinatorAddress := newAddress(t) - lggr := logger.TestLogger(t) - - onchainRouter, err := newRouter(lggr, beaconAddress, coordinatorAddress, evmClient) - assert.NoError(t, err) - - epoch := uint32(20) - round := uint8(3) - epochAndRound := toEpochAndRoundUint40(epoch, round) - enrTopic := common.BytesToHash(common.LeftPadBytes(epochAndRound.Bytes(), 32)) - lp := lp_mocks.NewLogPoller(t) - configDigest := common.BigToHash(big.NewInt(1337)) - log := newNewTransmissionLog(t, beaconAddress, configDigest) - log.BlockNumber = 195 - lp.On("IndexedLogs", mock.Anything, tp.newTransmissionTopic, beaconAddress, 2, []common.Hash{ - enrTopic, - }, evmtypes.Confirmations(1)).Return([]logpoller.Log{log}, nil) - - c := &coordinator{ - lp: lp, - onchainRouter: onchainRouter, - lggr: logger.TestLogger(t), - beaconAddress: beaconAddress, - topics: tp, - evmClient: evmClient, - } - - present, err := c.ReportIsOnchain(testutils.Context(t), epoch, round, configDigest) - assert.NoError(t, err) - assert.True(t, present) - }) - - t.Run("report is on-chain for old config digest", func(t *testing.T) { - tp := newTopics() - beaconAddress := newAddress(t) - coordinatorAddress := newAddress(t) - lggr := logger.TestLogger(t) - - onchainRouter, err := newRouter(lggr, beaconAddress, coordinatorAddress, evmClient) - assert.NoError(t, err) - - epoch := uint32(20) - round := uint8(3) - epochAndRound := toEpochAndRoundUint40(epoch, round) - enrTopic := common.BytesToHash(common.LeftPadBytes(epochAndRound.Bytes(), 32)) - lp := lp_mocks.NewLogPoller(t) - oldConfigDigest := common.BigToHash(big.NewInt(1337)) - newConfigDigest := common.BigToHash(big.NewInt(8888)) - log := newNewTransmissionLog(t, beaconAddress, oldConfigDigest) - log.BlockNumber = 195 - lp.On("IndexedLogs", mock.Anything, tp.newTransmissionTopic, beaconAddress, 2, []common.Hash{ - enrTopic, - }, evmtypes.Confirmations(1)).Return([]logpoller.Log{log}, nil) - - c := &coordinator{ - lp: lp, - onchainRouter: onchainRouter, - lggr: logger.TestLogger(t), - beaconAddress: beaconAddress, - topics: tp, - evmClient: evmClient, - } - - present, err := c.ReportIsOnchain(testutils.Context(t), epoch, round, newConfigDigest) - assert.NoError(t, err) - assert.False(t, present) - }) - - t.Run("report is not on-chain", func(t *testing.T) { - tp := newTopics() - beaconAddress := newAddress(t) - - epoch := uint32(20) - round := uint8(3) - epochAndRound := toEpochAndRoundUint40(epoch, round) - enrTopic := common.BytesToHash(common.LeftPadBytes(epochAndRound.Bytes(), 32)) - lp := lp_mocks.NewLogPoller(t) - lp.On("IndexedLogs", mock.Anything, tp.newTransmissionTopic, beaconAddress, 2, []common.Hash{ - enrTopic, - }, evmtypes.Confirmations(1)).Return([]logpoller.Log{}, nil) - - c := &coordinator{ - lp: lp, - lggr: logger.TestLogger(t), - beaconAddress: beaconAddress, - topics: tp, - evmClient: evmClient, - } - - configDigest := common.BigToHash(big.NewInt(0)) - present, err := c.ReportIsOnchain(testutils.Context(t), epoch, round, configDigest) - assert.NoError(t, err) - assert.False(t, present) - }) -} - -func TestCoordinator_ConfirmationDelays(t *testing.T) { - t.Parallel() - - t.Run("valid output", func(t *testing.T) { - expected := [8]uint32{1, 2, 3, 4, 5, 6, 7, 8} - ret := [8]*big.Int{} - for i, delay := range expected { - ret[i] = big.NewInt(int64(delay)) - } - onchainRouter := mocks.NewVRFBeaconCoordinator(t) - onchainRouter. - On("GetConfirmationDelays", mock.Anything). - Return(ret, nil) - c := &coordinator{ - onchainRouter: onchainRouter, - } - confDelays, err := c.ConfirmationDelays(testutils.Context(t)) - assert.NoError(t, err) - assert.Equal(t, expected[:], confDelays[:]) - }) - - t.Run("invalid output", func(t *testing.T) { - onchainRouter := mocks.NewVRFBeaconCoordinator(t) - onchainRouter. - On("GetConfirmationDelays", mock.Anything). - Return([8]*big.Int{}, errors.New("rpc error")) - c := &coordinator{ - onchainRouter: onchainRouter, - } - _, err := c.ConfirmationDelays(testutils.Context(t)) - assert.Error(t, err) - }) -} - -func TestCoordinator_getBlockCacheKey(t *testing.T) { - t.Parallel() - - t.Run("calculates key correctly", func(t *testing.T) { - hash := getBlockCacheKey(1, 11) - assert.Equal( - t, - common.HexToHash("0x000000000000000000000000000000000000000000000001000000000000000b"), - hash, - ) - }) -} - -func TestCoordinator_KeyID(t *testing.T) { - t.Parallel() - - t.Run("valid output", func(t *testing.T) { - var keyIDBytes [32]byte - keyIDBytes[0] = 1 - expected := dkg.KeyID(keyIDBytes) - onchainRouter := mocks.NewVRFBeaconCoordinator(t) - onchainRouter. - On("SKeyID", mock.Anything). - Return(keyIDBytes, nil) - c := &coordinator{ - onchainRouter: onchainRouter, - } - keyID, err := c.KeyID(testutils.Context(t)) - assert.NoError(t, err) - assert.Equal(t, expected[:], keyID[:]) - }) - - t.Run("invalid output", func(t *testing.T) { - var emptyBytes [32]byte - onchainRouter := mocks.NewVRFBeaconCoordinator(t) - onchainRouter. - On("SKeyID", mock.Anything). - Return(emptyBytes, errors.New("rpc error")) - c := &coordinator{ - onchainRouter: onchainRouter, - } - _, err := c.KeyID(testutils.Context(t)) - assert.Error(t, err) - }) -} - -func TestTopics_DKGConfigSet_VRFConfigSet(t *testing.T) { - dkgConfigSetTopic := dkg_wrapper.DKGConfigSet{}.Topic() - vrfConfigSetTopic := vrf_beacon.VRFBeaconConfigSet{}.Topic() - assert.Equal(t, dkgConfigSetTopic, vrfConfigSetTopic, "config set topics of vrf and dkg must be equal") -} - -func Test_UpdateConfiguration(t *testing.T) { - t.Parallel() - - t.Run("valid binary", func(t *testing.T) { - c := &coordinator{coordinatorConfig: newCoordinatorConfig(10), lggr: logger.TestLogger(t)} - cacheEvictionWindowSeconds := int64(60) - cacheEvictionWindow := time.Duration(cacheEvictionWindowSeconds * int64(time.Second)) - c.toBeTransmittedBlocks = NewBlockCache[blockInReport](cacheEvictionWindow) - c.toBeTransmittedCallbacks = NewBlockCache[callbackInReport](cacheEvictionWindow) - - newCoordinatorConfig := &ocr2vrftypes.CoordinatorConfig{ - CacheEvictionWindowSeconds: 30, - BatchGasLimit: 1_000_000, - CoordinatorOverhead: 10_000, - CallbackOverhead: 10_000, - BlockGasOverhead: 10_000, - LookbackBlocks: 1_000, - } - - require.Equal(t, cacheEvictionWindow, c.toBeTransmittedBlocks.evictionWindow) - require.Equal(t, cacheEvictionWindow, c.toBeTransmittedCallbacks.evictionWindow) - - expectedConfigDigest := ocr2Types.ConfigDigest(common.HexToHash("asd")) - expectedOracleID := commontypes.OracleID(3) - err := c.UpdateConfiguration(ocr2vrf.OffchainConfig(newCoordinatorConfig), expectedConfigDigest, expectedOracleID) - newCacheEvictionWindow := time.Duration(newCoordinatorConfig.CacheEvictionWindowSeconds * int64(time.Second)) - require.NoError(t, err) - require.Equal(t, newCoordinatorConfig.CacheEvictionWindowSeconds, c.coordinatorConfig.CacheEvictionWindowSeconds) - require.Equal(t, newCoordinatorConfig.BatchGasLimit, c.coordinatorConfig.BatchGasLimit) - require.Equal(t, newCoordinatorConfig.CoordinatorOverhead, c.coordinatorConfig.CoordinatorOverhead) - require.Equal(t, newCoordinatorConfig.CallbackOverhead, c.coordinatorConfig.CallbackOverhead) - require.Equal(t, newCoordinatorConfig.BlockGasOverhead, c.coordinatorConfig.BlockGasOverhead) - require.Equal(t, newCoordinatorConfig.LookbackBlocks, c.coordinatorConfig.LookbackBlocks) - require.Equal(t, newCacheEvictionWindow, c.toBeTransmittedBlocks.evictionWindow) - require.Equal(t, newCacheEvictionWindow, c.toBeTransmittedCallbacks.evictionWindow) - require.Equal(t, expectedConfigDigest, c.configDigest) - require.Equal(t, expectedOracleID, c.oracleID) - }) - - t.Run("invalid binary", func(t *testing.T) { - c := &coordinator{coordinatorConfig: newCoordinatorConfig(10), lggr: logger.TestLogger(t)} - - err := c.UpdateConfiguration([]byte{123}, ocr2Types.ConfigDigest{}, commontypes.OracleID(0)) - require.Error(t, err) - }) -} - -func newCoordinatorConfig(lookbackBlocks uint64) *ocr2vrftypes.CoordinatorConfig { - return &ocr2vrftypes.CoordinatorConfig{ - CacheEvictionWindowSeconds: 60, - BatchGasLimit: 5_000_000, - CoordinatorOverhead: 50_000, - CallbackOverhead: 50_000, - BlockGasOverhead: 50_000, - LookbackBlocks: lookbackBlocks, - } -} - -func newRandomnessRequestedLog( - t *testing.T, - confDelay int64, - nextBeaconOutputHeight uint64, - requestBlock uint64, - requestID int64, - coordinatorAddress common.Address, -) logpoller.Log { - //event RandomnessRequested( - // RequestID indexed requestID, - // address indexed requester, - // uint64 nextBeaconOutputHeight, - // ConfirmationDelay confDelay, - // uint64 subID, - // uint16 numWords - //); - e := vrf_coordinator.VRFCoordinatorRandomnessRequested{ - RequestID: big.NewInt(requestID), - Requester: common.HexToAddress("0x1234567890"), - ConfDelay: big.NewInt(confDelay), - NextBeaconOutputHeight: nextBeaconOutputHeight, - NumWords: 1, - SubID: big.NewInt(1), - CostJuels: big.NewInt(50_000), - NewSubBalance: big.NewInt(100_000), - Raw: gethtypes.Log{ - BlockNumber: requestBlock, - }, - } - var unindexed abi.Arguments - for _, a := range vrfCoordinatorABI.Events[randomnessRequestedEvent].Inputs { - if !a.Indexed { - unindexed = append(unindexed, a) - } - } - nonIndexedData, err := unindexed.Pack(e.Requester, e.NextBeaconOutputHeight, e.ConfDelay, e.SubID, e.NumWords, e.CostJuels, e.NewSubBalance) - require.NoError(t, err) - - requestIDType, err := abi.NewType("uint64", "", nil) - require.NoError(t, err) - - requestIDArg := abi.Arguments{abi.Argument{ - Name: "requestID", - Type: requestIDType, - Indexed: true, - }} - - topic1, err := requestIDArg.Pack(e.RequestID.Uint64()) - require.NoError(t, err) - - topic0 := vrfCoordinatorABI.Events[randomnessRequestedEvent].ID - lg := logpoller.Log{ - Address: coordinatorAddress, - Data: nonIndexedData, - Topics: [][]byte{ - // first topic is the event signature - topic0.Bytes(), - // second topic is requestID since it's indexed - topic1, - }, - BlockNumber: int64(requestBlock), - EventSig: topic0, - } - return lg -} - -func newRandomnessFulfillmentRequestedLog( - t *testing.T, - confDelay int64, - nextBeaconOutputHeight uint64, - requestBlock uint64, - requestID int64, - gasAllowance uint32, - coordinatorAddress common.Address, -) logpoller.Log { - //event RandomnessFulfillmentRequested( - // RequestID indexed requestID, - // address indexed requester, - // uint64 nextBeaconOutputHeight, - // ConfirmationDelay confDelay, - // uint256 subID, - // uint16 numWords, - // uint32 gasAllowance, - // uint256 gasPrice, - // uint256 weiPerUnitLink, - // bytes arguments, - // uint256 costJuels - //); - e := vrf_coordinator.VRFCoordinatorRandomnessFulfillmentRequested{ - ConfDelay: big.NewInt(confDelay), - NextBeaconOutputHeight: nextBeaconOutputHeight, - RequestID: big.NewInt(1), - NumWords: 1, - GasAllowance: gasAllowance, - GasPrice: big.NewInt(0), - WeiPerUnitLink: big.NewInt(0), - SubID: big.NewInt(1), - Requester: common.HexToAddress("0x1234567890"), - CostJuels: big.NewInt(50_000), - NewSubBalance: big.NewInt(100_000), - Raw: gethtypes.Log{ - BlockNumber: requestBlock, - }, - } - var unindexed abi.Arguments - for _, a := range vrfCoordinatorABI.Events[randomnessFulfillmentRequestedEvent].Inputs { - if !a.Indexed { - unindexed = append(unindexed, a) - } - } - nonIndexedData, err := unindexed.Pack(e.Requester, e.NextBeaconOutputHeight, e.ConfDelay, e.SubID, e.NumWords, - e.GasAllowance, e.GasPrice, e.WeiPerUnitLink, e.Arguments, e.CostJuels, e.NewSubBalance) - require.NoError(t, err) - - requestIDType, err := abi.NewType("uint64", "", nil) - require.NoError(t, err) - - requestIDArg := abi.Arguments{abi.Argument{ - Name: "requestID", - Type: requestIDType, - Indexed: true, - }} - - topic0 := vrfCoordinatorABI.Events[randomnessFulfillmentRequestedEvent].ID - topic1, err := requestIDArg.Pack(e.RequestID.Uint64()) - require.NoError(t, err) - return logpoller.Log{ - Address: coordinatorAddress, - Data: nonIndexedData, - EventSig: topic0, - Topics: [][]byte{ - topic0.Bytes(), - topic1, - }, - BlockNumber: int64(requestBlock), - } -} - -func newRandomWordsFulfilledLog( - t *testing.T, - requestIDs []*big.Int, - successfulFulfillment []byte, - coordinatorAddress common.Address, -) logpoller.Log { - //event RandomWordsFulfilled( - // RequestID[] requestIDs, - // bytes successfulFulfillment, - // bytes[] truncatedErrorData - //); - e := vrf_coordinator.VRFCoordinatorRandomWordsFulfilled{ - RequestIDs: requestIDs, - SuccessfulFulfillment: successfulFulfillment, - } - packed, err := vrfCoordinatorABI.Events[randomWordsFulfilledEvent].Inputs.Pack( - e.RequestIDs, e.SuccessfulFulfillment, e.TruncatedErrorData, e.SubBalances, e.SubIDs) - require.NoError(t, err) - topic0 := vrfCoordinatorABI.Events[randomWordsFulfilledEvent].ID - return logpoller.Log{ - Address: coordinatorAddress, - Data: packed, - EventSig: topic0, - Topics: [][]byte{topic0.Bytes()}, - } -} - -func newOutputsServedLog( - t *testing.T, - outputsServed []vrf_coordinator.VRFBeaconTypesOutputServed, - beaconAddress common.Address, -) logpoller.Log { - // event OutputsServed( - // uint64 recentBlockHeight, - // address transmitter, - // uint192 juelsPerFeeCoin, - // OutputServed[] outputsServed - // ); - e := vrf_coordinator.VRFCoordinatorOutputsServed{ - RecentBlockHeight: 0, - // AggregatorRoundId: 1, - OutputsServed: outputsServed, - JuelsPerFeeCoin: big.NewInt(0), - ReasonableGasPrice: 0, - // EpochAndRound: big.NewInt(1), - // ConfigDigest: crypto.Keccak256Hash([]byte("hello world")), - } - var unindexed abi.Arguments - for _, a := range vrfCoordinatorABI.Events[outputsServedEvent].Inputs { - if !a.Indexed { - unindexed = append(unindexed, a) - } - } - nonIndexedData, err := unindexed.Pack(e.RecentBlockHeight, e.JuelsPerFeeCoin, e.ReasonableGasPrice, e.OutputsServed) - require.NoError(t, err) - - topic0 := vrfCoordinatorABI.Events[outputsServedEvent].ID - return logpoller.Log{ - Address: beaconAddress, - Data: nonIndexedData, - Topics: [][]byte{ - topic0.Bytes(), - }, - EventSig: topic0, - } -} - -func newNewTransmissionLog( - t *testing.T, - beaconAddress common.Address, - configDigest [32]byte, -) logpoller.Log { - // event NewTransmission( - // uint32 indexed aggregatorRoundId, - // uint40 indexed epochAndRound, - // address transmitter, - // uint192 juelsPerFeeCoin, - // bytes32 configDigest - // ); - e := vrf_beacon.VRFBeaconNewTransmission{ - JuelsPerFeeCoin: big.NewInt(1_000), - ReasonableGasPrice: 1_000, - EpochAndRound: big.NewInt(1), - ConfigDigest: configDigest, - Transmitter: newAddress(t), - } - var unindexed abi.Arguments - for _, a := range vrfBeaconABI.Events[newTransmissionEvent].Inputs { - if !a.Indexed { - unindexed = append(unindexed, a) - } - } - nonIndexedData, err := unindexed.Pack( - e.Transmitter, e.JuelsPerFeeCoin, e.ReasonableGasPrice, e.ConfigDigest) - require.NoError(t, err) - - // epochAndRound is indexed - epochAndRoundType, err := abi.NewType("uint40", "", nil) - require.NoError(t, err) - indexedArgs := abi.Arguments{ - { - Name: "epochAndRound", - Type: epochAndRoundType, - }, - } - epochAndRoundPacked, err := indexedArgs.Pack(e.EpochAndRound) - require.NoError(t, err) - - topic0 := vrfBeaconABI.Events[newTransmissionEvent].ID - return logpoller.Log{ - Address: beaconAddress, - Data: nonIndexedData, - Topics: [][]byte{ - topic0.Bytes(), - epochAndRoundPacked, - }, - EventSig: topic0, - } -} - -func newAddress(t *testing.T) common.Address { - b := make([]byte, 20) - _, err := rand.Read(b) - require.NoError(t, err) - return common.HexToAddress(hexutil.Encode(b)) -} - -func getLogPoller( - t *testing.T, - requestedBlocks []uint64, - latestHeadNumber uint64, - needsLatestBlock bool, - includeLatestHeadInRange bool, - blockhashLookback uint64, -) *lp_mocks.LogPoller { - lp := lp_mocks.NewLogPoller(t) - if needsLatestBlock { - lp.On("LatestBlock", mock.Anything). - Return(logpoller.LogPollerBlock{BlockNumber: int64(latestHeadNumber)}, nil) - } - var logPollerBlocks []logpoller.LogPollerBlock - - // If provided, ajust the blockhash range such that it starts at the most recent head. - if includeLatestHeadInRange { - requestedBlocks = append(requestedBlocks, latestHeadNumber) - } - - // If provided, adjust the blockhash range such that it includes all recent available blockhashes. - if blockhashLookback != 0 { - requestedBlocks = append(requestedBlocks, latestHeadNumber-blockhashLookback+1) - } - - // Sort the blocks to match the coordinator's calls. - sort.Slice(requestedBlocks, func(a, b int) bool { - return requestedBlocks[a] < requestedBlocks[b] - }) - - // Fill range of blocks based on requestedBlocks - // example: requestedBlocks [195, 197] -> [{BlockNumber: 195, BlockHash: 0x001}, {BlockNumber: 196, BlockHash: 0x002}, {BlockNumber: 197, BlockHash: 0x003}] - minRequestedBlock := mathutil.Min(requestedBlocks[0], requestedBlocks[1:]...) - maxRequestedBlock := mathutil.Max(requestedBlocks[0], requestedBlocks[1:]...) - for i := minRequestedBlock; i <= maxRequestedBlock; i++ { - logPollerBlocks = append(logPollerBlocks, logpoller.LogPollerBlock{ - BlockNumber: int64(i), - BlockHash: common.HexToHash(fmt.Sprintf("0x00%d", i-minRequestedBlock+1)), - }) - } - - lp.On("GetBlocksRange", mock.Anything, requestedBlocks). - Return(logPollerBlocks, nil) - - return lp -} - -func TestFilterNamesFromSpec(t *testing.T) { - beaconAddress := newAddress(t) - coordinatorAddress := newAddress(t) - dkgAddress := newAddress(t) - - spec := &job.OCR2OracleSpec{ - ContractID: beaconAddress.String(), - PluginType: types.OCR2VRF, - PluginConfig: job.JSONConfig{ - "VRFCoordinatorAddress": coordinatorAddress.String(), - "DKGContractAddress": dkgAddress.String(), - }, - } - - names, err := FilterNamesFromSpec(spec) - require.NoError(t, err) - - assert.Len(t, names, 1) - assert.Equal(t, logpoller.FilterName("VRF Coordinator", beaconAddress, coordinatorAddress, dkgAddress), names[0]) - - spec = &job.OCR2OracleSpec{ - PluginType: types.OCR2VRF, - ContractID: beaconAddress.String(), - PluginConfig: nil, // missing coordinator & dkg addresses - } - _, err = FilterNamesFromSpec(spec) - require.ErrorContains(t, err, "is not a valid EIP55 formatted address") -} diff --git a/core/services/ocr2/plugins/ocr2vrf/coordinator/interfaces.go b/core/services/ocr2/plugins/ocr2vrf/coordinator/interfaces.go deleted file mode 100644 index 67dd567b68d..00000000000 --- a/core/services/ocr2/plugins/ocr2vrf/coordinator/interfaces.go +++ /dev/null @@ -1,31 +0,0 @@ -package coordinator - -import ( - "math/big" - - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/core/types" - - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" -) - -//go:generate mockery --quiet --name VRFBeaconCoordinator --output ./mocks/ --case=underscore - -// VRFBeaconCoordinator is an interface that defines methods needed by the off-chain coordinator -type VRFBeaconCoordinator interface { - // SProvingKeyHash retrieves the proving key hash from the on-chain contract. - SProvingKeyHash(opts *bind.CallOpts) ([32]byte, error) - - // SKeyID retrieves the keyID from the on-chain contract. - SKeyID(opts *bind.CallOpts) ([32]byte, error) - - // IBeaconPeriodBlocks retrieves the beacon period in blocks from the on-chain contract. - IBeaconPeriodBlocks(opts *bind.CallOpts) (*big.Int, error) - - // ParseLog parses the raw log data and topics into a go object. - // The returned object must be casted to the expected type. - ParseLog(log types.Log) (generated.AbigenLog, error) - - // GetConfirmationDelays retrieves confirmation delays from the on-chain contract. - GetConfirmationDelays(opts *bind.CallOpts) ([8]*big.Int, error) -} diff --git a/core/services/ocr2/plugins/ocr2vrf/coordinator/mocks/vrf_beacon.go b/core/services/ocr2/plugins/ocr2vrf/coordinator/mocks/vrf_beacon.go deleted file mode 100644 index 1aeb0ea85c4..00000000000 --- a/core/services/ocr2/plugins/ocr2vrf/coordinator/mocks/vrf_beacon.go +++ /dev/null @@ -1,2179 +0,0 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package mocks - -import ( - big "math/big" - - bind "github.com/ethereum/go-ethereum/accounts/abi/bind" - common "github.com/ethereum/go-ethereum/common" - - event "github.com/ethereum/go-ethereum/event" - - generated "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" - - mock "github.com/stretchr/testify/mock" - - types "github.com/ethereum/go-ethereum/core/types" - - vrf_beacon "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/vrf_beacon" -) - -// VRFBeaconInterface is an autogenerated mock type for the VRFBeaconInterface type -type VRFBeaconInterface struct { - mock.Mock -} - -// AcceptOwnership provides a mock function with given fields: opts -func (_m *VRFBeaconInterface) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for AcceptOwnership") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts) (*types.Transaction, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts) *types.Transaction); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// AcceptPayeeship provides a mock function with given fields: opts, transmitter -func (_m *VRFBeaconInterface) AcceptPayeeship(opts *bind.TransactOpts, transmitter common.Address) (*types.Transaction, error) { - ret := _m.Called(opts, transmitter) - - if len(ret) == 0 { - panic("no return value specified for AcceptPayeeship") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, common.Address) (*types.Transaction, error)); ok { - return rf(opts, transmitter) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, common.Address) *types.Transaction); ok { - r0 = rf(opts, transmitter) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts, common.Address) error); ok { - r1 = rf(opts, transmitter) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Address provides a mock function with given fields: -func (_m *VRFBeaconInterface) Address() common.Address { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Address") - } - - var r0 common.Address - if rf, ok := ret.Get(0).(func() common.Address); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Address) - } - } - - return r0 -} - -// ExposeType provides a mock function with given fields: opts, arg0 -func (_m *VRFBeaconInterface) ExposeType(opts *bind.TransactOpts, arg0 vrf_beacon.VRFBeaconReportReport) (*types.Transaction, error) { - ret := _m.Called(opts, arg0) - - if len(ret) == 0 { - panic("no return value specified for ExposeType") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, vrf_beacon.VRFBeaconReportReport) (*types.Transaction, error)); ok { - return rf(opts, arg0) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, vrf_beacon.VRFBeaconReportReport) *types.Transaction); ok { - r0 = rf(opts, arg0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts, vrf_beacon.VRFBeaconReportReport) error); ok { - r1 = rf(opts, arg0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterBillingAccessControllerSet provides a mock function with given fields: opts -func (_m *VRFBeaconInterface) FilterBillingAccessControllerSet(opts *bind.FilterOpts) (*vrf_beacon.VRFBeaconBillingAccessControllerSetIterator, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for FilterBillingAccessControllerSet") - } - - var r0 *vrf_beacon.VRFBeaconBillingAccessControllerSetIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts) (*vrf_beacon.VRFBeaconBillingAccessControllerSetIterator, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts) *vrf_beacon.VRFBeaconBillingAccessControllerSetIterator); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_beacon.VRFBeaconBillingAccessControllerSetIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterBillingSet provides a mock function with given fields: opts -func (_m *VRFBeaconInterface) FilterBillingSet(opts *bind.FilterOpts) (*vrf_beacon.VRFBeaconBillingSetIterator, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for FilterBillingSet") - } - - var r0 *vrf_beacon.VRFBeaconBillingSetIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts) (*vrf_beacon.VRFBeaconBillingSetIterator, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts) *vrf_beacon.VRFBeaconBillingSetIterator); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_beacon.VRFBeaconBillingSetIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterConfigSet provides a mock function with given fields: opts -func (_m *VRFBeaconInterface) FilterConfigSet(opts *bind.FilterOpts) (*vrf_beacon.VRFBeaconConfigSetIterator, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for FilterConfigSet") - } - - var r0 *vrf_beacon.VRFBeaconConfigSetIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts) (*vrf_beacon.VRFBeaconConfigSetIterator, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts) *vrf_beacon.VRFBeaconConfigSetIterator); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_beacon.VRFBeaconConfigSetIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterNewTransmission provides a mock function with given fields: opts, epochAndRound -func (_m *VRFBeaconInterface) FilterNewTransmission(opts *bind.FilterOpts, epochAndRound []*big.Int) (*vrf_beacon.VRFBeaconNewTransmissionIterator, error) { - ret := _m.Called(opts, epochAndRound) - - if len(ret) == 0 { - panic("no return value specified for FilterNewTransmission") - } - - var r0 *vrf_beacon.VRFBeaconNewTransmissionIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []*big.Int) (*vrf_beacon.VRFBeaconNewTransmissionIterator, error)); ok { - return rf(opts, epochAndRound) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []*big.Int) *vrf_beacon.VRFBeaconNewTransmissionIterator); ok { - r0 = rf(opts, epochAndRound) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_beacon.VRFBeaconNewTransmissionIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts, []*big.Int) error); ok { - r1 = rf(opts, epochAndRound) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterOraclePaid provides a mock function with given fields: opts, transmitter, payee, linkToken -func (_m *VRFBeaconInterface) FilterOraclePaid(opts *bind.FilterOpts, transmitter []common.Address, payee []common.Address, linkToken []common.Address) (*vrf_beacon.VRFBeaconOraclePaidIterator, error) { - ret := _m.Called(opts, transmitter, payee, linkToken) - - if len(ret) == 0 { - panic("no return value specified for FilterOraclePaid") - } - - var r0 *vrf_beacon.VRFBeaconOraclePaidIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []common.Address, []common.Address, []common.Address) (*vrf_beacon.VRFBeaconOraclePaidIterator, error)); ok { - return rf(opts, transmitter, payee, linkToken) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []common.Address, []common.Address, []common.Address) *vrf_beacon.VRFBeaconOraclePaidIterator); ok { - r0 = rf(opts, transmitter, payee, linkToken) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_beacon.VRFBeaconOraclePaidIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts, []common.Address, []common.Address, []common.Address) error); ok { - r1 = rf(opts, transmitter, payee, linkToken) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterOutputsServed provides a mock function with given fields: opts -func (_m *VRFBeaconInterface) FilterOutputsServed(opts *bind.FilterOpts) (*vrf_beacon.VRFBeaconOutputsServedIterator, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for FilterOutputsServed") - } - - var r0 *vrf_beacon.VRFBeaconOutputsServedIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts) (*vrf_beacon.VRFBeaconOutputsServedIterator, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts) *vrf_beacon.VRFBeaconOutputsServedIterator); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_beacon.VRFBeaconOutputsServedIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterOwnershipTransferRequested provides a mock function with given fields: opts, from, to -func (_m *VRFBeaconInterface) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*vrf_beacon.VRFBeaconOwnershipTransferRequestedIterator, error) { - ret := _m.Called(opts, from, to) - - if len(ret) == 0 { - panic("no return value specified for FilterOwnershipTransferRequested") - } - - var r0 *vrf_beacon.VRFBeaconOwnershipTransferRequestedIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []common.Address, []common.Address) (*vrf_beacon.VRFBeaconOwnershipTransferRequestedIterator, error)); ok { - return rf(opts, from, to) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []common.Address, []common.Address) *vrf_beacon.VRFBeaconOwnershipTransferRequestedIterator); ok { - r0 = rf(opts, from, to) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_beacon.VRFBeaconOwnershipTransferRequestedIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts, []common.Address, []common.Address) error); ok { - r1 = rf(opts, from, to) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterOwnershipTransferred provides a mock function with given fields: opts, from, to -func (_m *VRFBeaconInterface) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*vrf_beacon.VRFBeaconOwnershipTransferredIterator, error) { - ret := _m.Called(opts, from, to) - - if len(ret) == 0 { - panic("no return value specified for FilterOwnershipTransferred") - } - - var r0 *vrf_beacon.VRFBeaconOwnershipTransferredIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []common.Address, []common.Address) (*vrf_beacon.VRFBeaconOwnershipTransferredIterator, error)); ok { - return rf(opts, from, to) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []common.Address, []common.Address) *vrf_beacon.VRFBeaconOwnershipTransferredIterator); ok { - r0 = rf(opts, from, to) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_beacon.VRFBeaconOwnershipTransferredIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts, []common.Address, []common.Address) error); ok { - r1 = rf(opts, from, to) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterPayeeshipTransferRequested provides a mock function with given fields: opts, transmitter, current, proposed -func (_m *VRFBeaconInterface) FilterPayeeshipTransferRequested(opts *bind.FilterOpts, transmitter []common.Address, current []common.Address, proposed []common.Address) (*vrf_beacon.VRFBeaconPayeeshipTransferRequestedIterator, error) { - ret := _m.Called(opts, transmitter, current, proposed) - - if len(ret) == 0 { - panic("no return value specified for FilterPayeeshipTransferRequested") - } - - var r0 *vrf_beacon.VRFBeaconPayeeshipTransferRequestedIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []common.Address, []common.Address, []common.Address) (*vrf_beacon.VRFBeaconPayeeshipTransferRequestedIterator, error)); ok { - return rf(opts, transmitter, current, proposed) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []common.Address, []common.Address, []common.Address) *vrf_beacon.VRFBeaconPayeeshipTransferRequestedIterator); ok { - r0 = rf(opts, transmitter, current, proposed) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_beacon.VRFBeaconPayeeshipTransferRequestedIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts, []common.Address, []common.Address, []common.Address) error); ok { - r1 = rf(opts, transmitter, current, proposed) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterPayeeshipTransferred provides a mock function with given fields: opts, transmitter, previous, current -func (_m *VRFBeaconInterface) FilterPayeeshipTransferred(opts *bind.FilterOpts, transmitter []common.Address, previous []common.Address, current []common.Address) (*vrf_beacon.VRFBeaconPayeeshipTransferredIterator, error) { - ret := _m.Called(opts, transmitter, previous, current) - - if len(ret) == 0 { - panic("no return value specified for FilterPayeeshipTransferred") - } - - var r0 *vrf_beacon.VRFBeaconPayeeshipTransferredIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []common.Address, []common.Address, []common.Address) (*vrf_beacon.VRFBeaconPayeeshipTransferredIterator, error)); ok { - return rf(opts, transmitter, previous, current) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []common.Address, []common.Address, []common.Address) *vrf_beacon.VRFBeaconPayeeshipTransferredIterator); ok { - r0 = rf(opts, transmitter, previous, current) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_beacon.VRFBeaconPayeeshipTransferredIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts, []common.Address, []common.Address, []common.Address) error); ok { - r1 = rf(opts, transmitter, previous, current) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterRandomWordsFulfilled provides a mock function with given fields: opts -func (_m *VRFBeaconInterface) FilterRandomWordsFulfilled(opts *bind.FilterOpts) (*vrf_beacon.VRFBeaconRandomWordsFulfilledIterator, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for FilterRandomWordsFulfilled") - } - - var r0 *vrf_beacon.VRFBeaconRandomWordsFulfilledIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts) (*vrf_beacon.VRFBeaconRandomWordsFulfilledIterator, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts) *vrf_beacon.VRFBeaconRandomWordsFulfilledIterator); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_beacon.VRFBeaconRandomWordsFulfilledIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterRandomnessFulfillmentRequested provides a mock function with given fields: opts, requestID -func (_m *VRFBeaconInterface) FilterRandomnessFulfillmentRequested(opts *bind.FilterOpts, requestID []*big.Int) (*vrf_beacon.VRFBeaconRandomnessFulfillmentRequestedIterator, error) { - ret := _m.Called(opts, requestID) - - if len(ret) == 0 { - panic("no return value specified for FilterRandomnessFulfillmentRequested") - } - - var r0 *vrf_beacon.VRFBeaconRandomnessFulfillmentRequestedIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []*big.Int) (*vrf_beacon.VRFBeaconRandomnessFulfillmentRequestedIterator, error)); ok { - return rf(opts, requestID) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []*big.Int) *vrf_beacon.VRFBeaconRandomnessFulfillmentRequestedIterator); ok { - r0 = rf(opts, requestID) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_beacon.VRFBeaconRandomnessFulfillmentRequestedIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts, []*big.Int) error); ok { - r1 = rf(opts, requestID) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterRandomnessRedeemed provides a mock function with given fields: opts, requestID, requester -func (_m *VRFBeaconInterface) FilterRandomnessRedeemed(opts *bind.FilterOpts, requestID []*big.Int, requester []common.Address) (*vrf_beacon.VRFBeaconRandomnessRedeemedIterator, error) { - ret := _m.Called(opts, requestID, requester) - - if len(ret) == 0 { - panic("no return value specified for FilterRandomnessRedeemed") - } - - var r0 *vrf_beacon.VRFBeaconRandomnessRedeemedIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []*big.Int, []common.Address) (*vrf_beacon.VRFBeaconRandomnessRedeemedIterator, error)); ok { - return rf(opts, requestID, requester) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []*big.Int, []common.Address) *vrf_beacon.VRFBeaconRandomnessRedeemedIterator); ok { - r0 = rf(opts, requestID, requester) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_beacon.VRFBeaconRandomnessRedeemedIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts, []*big.Int, []common.Address) error); ok { - r1 = rf(opts, requestID, requester) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterRandomnessRequested provides a mock function with given fields: opts, requestID -func (_m *VRFBeaconInterface) FilterRandomnessRequested(opts *bind.FilterOpts, requestID []*big.Int) (*vrf_beacon.VRFBeaconRandomnessRequestedIterator, error) { - ret := _m.Called(opts, requestID) - - if len(ret) == 0 { - panic("no return value specified for FilterRandomnessRequested") - } - - var r0 *vrf_beacon.VRFBeaconRandomnessRequestedIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []*big.Int) (*vrf_beacon.VRFBeaconRandomnessRequestedIterator, error)); ok { - return rf(opts, requestID) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []*big.Int) *vrf_beacon.VRFBeaconRandomnessRequestedIterator); ok { - r0 = rf(opts, requestID) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_beacon.VRFBeaconRandomnessRequestedIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts, []*big.Int) error); ok { - r1 = rf(opts, requestID) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetBilling provides a mock function with given fields: opts -func (_m *VRFBeaconInterface) GetBilling(opts *bind.CallOpts) (vrf_beacon.GetBilling, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for GetBilling") - } - - var r0 vrf_beacon.GetBilling - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts) (vrf_beacon.GetBilling, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts) vrf_beacon.GetBilling); ok { - r0 = rf(opts) - } else { - r0 = ret.Get(0).(vrf_beacon.GetBilling) - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetBillingAccessController provides a mock function with given fields: opts -func (_m *VRFBeaconInterface) GetBillingAccessController(opts *bind.CallOpts) (common.Address, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for GetBillingAccessController") - } - - var r0 common.Address - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts) (common.Address, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts) common.Address); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Address) - } - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ICoordinator provides a mock function with given fields: opts -func (_m *VRFBeaconInterface) ICoordinator(opts *bind.CallOpts) (common.Address, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for ICoordinator") - } - - var r0 common.Address - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts) (common.Address, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts) common.Address); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Address) - } - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ILink provides a mock function with given fields: opts -func (_m *VRFBeaconInterface) ILink(opts *bind.CallOpts) (common.Address, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for ILink") - } - - var r0 common.Address - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts) (common.Address, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts) common.Address); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Address) - } - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// KeyGenerated provides a mock function with given fields: opts, kd -func (_m *VRFBeaconInterface) KeyGenerated(opts *bind.TransactOpts, kd vrf_beacon.KeyDataStructKeyData) (*types.Transaction, error) { - ret := _m.Called(opts, kd) - - if len(ret) == 0 { - panic("no return value specified for KeyGenerated") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, vrf_beacon.KeyDataStructKeyData) (*types.Transaction, error)); ok { - return rf(opts, kd) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, vrf_beacon.KeyDataStructKeyData) *types.Transaction); ok { - r0 = rf(opts, kd) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts, vrf_beacon.KeyDataStructKeyData) error); ok { - r1 = rf(opts, kd) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// LatestConfigDetails provides a mock function with given fields: opts -func (_m *VRFBeaconInterface) LatestConfigDetails(opts *bind.CallOpts) (vrf_beacon.LatestConfigDetails, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for LatestConfigDetails") - } - - var r0 vrf_beacon.LatestConfigDetails - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts) (vrf_beacon.LatestConfigDetails, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts) vrf_beacon.LatestConfigDetails); ok { - r0 = rf(opts) - } else { - r0 = ret.Get(0).(vrf_beacon.LatestConfigDetails) - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// LatestConfigDigestAndEpoch provides a mock function with given fields: opts -func (_m *VRFBeaconInterface) LatestConfigDigestAndEpoch(opts *bind.CallOpts) (vrf_beacon.LatestConfigDigestAndEpoch, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for LatestConfigDigestAndEpoch") - } - - var r0 vrf_beacon.LatestConfigDigestAndEpoch - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts) (vrf_beacon.LatestConfigDigestAndEpoch, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts) vrf_beacon.LatestConfigDigestAndEpoch); ok { - r0 = rf(opts) - } else { - r0 = ret.Get(0).(vrf_beacon.LatestConfigDigestAndEpoch) - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// LinkAvailableForPayment provides a mock function with given fields: opts -func (_m *VRFBeaconInterface) LinkAvailableForPayment(opts *bind.CallOpts) (*big.Int, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for LinkAvailableForPayment") - } - - var r0 *big.Int - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts) (*big.Int, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts) *big.Int); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*big.Int) - } - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NUMCONFDELAYS provides a mock function with given fields: opts -func (_m *VRFBeaconInterface) NUMCONFDELAYS(opts *bind.CallOpts) (uint8, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for NUMCONFDELAYS") - } - - var r0 uint8 - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts) (uint8, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts) uint8); ok { - r0 = rf(opts) - } else { - r0 = ret.Get(0).(uint8) - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NewKeyRequested provides a mock function with given fields: opts -func (_m *VRFBeaconInterface) NewKeyRequested(opts *bind.TransactOpts) (*types.Transaction, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for NewKeyRequested") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts) (*types.Transaction, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts) *types.Transaction); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// OwedPayment provides a mock function with given fields: opts, transmitterAddress -func (_m *VRFBeaconInterface) OwedPayment(opts *bind.CallOpts, transmitterAddress common.Address) (*big.Int, error) { - ret := _m.Called(opts, transmitterAddress) - - if len(ret) == 0 { - panic("no return value specified for OwedPayment") - } - - var r0 *big.Int - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts, common.Address) (*big.Int, error)); ok { - return rf(opts, transmitterAddress) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts, common.Address) *big.Int); ok { - r0 = rf(opts, transmitterAddress) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*big.Int) - } - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts, common.Address) error); ok { - r1 = rf(opts, transmitterAddress) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Owner provides a mock function with given fields: opts -func (_m *VRFBeaconInterface) Owner(opts *bind.CallOpts) (common.Address, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for Owner") - } - - var r0 common.Address - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts) (common.Address, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts) common.Address); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Address) - } - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseBillingAccessControllerSet provides a mock function with given fields: log -func (_m *VRFBeaconInterface) ParseBillingAccessControllerSet(log types.Log) (*vrf_beacon.VRFBeaconBillingAccessControllerSet, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseBillingAccessControllerSet") - } - - var r0 *vrf_beacon.VRFBeaconBillingAccessControllerSet - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_beacon.VRFBeaconBillingAccessControllerSet, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_beacon.VRFBeaconBillingAccessControllerSet); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_beacon.VRFBeaconBillingAccessControllerSet) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseBillingSet provides a mock function with given fields: log -func (_m *VRFBeaconInterface) ParseBillingSet(log types.Log) (*vrf_beacon.VRFBeaconBillingSet, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseBillingSet") - } - - var r0 *vrf_beacon.VRFBeaconBillingSet - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_beacon.VRFBeaconBillingSet, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_beacon.VRFBeaconBillingSet); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_beacon.VRFBeaconBillingSet) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseConfigSet provides a mock function with given fields: log -func (_m *VRFBeaconInterface) ParseConfigSet(log types.Log) (*vrf_beacon.VRFBeaconConfigSet, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseConfigSet") - } - - var r0 *vrf_beacon.VRFBeaconConfigSet - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_beacon.VRFBeaconConfigSet, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_beacon.VRFBeaconConfigSet); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_beacon.VRFBeaconConfigSet) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseLog provides a mock function with given fields: log -func (_m *VRFBeaconInterface) ParseLog(log types.Log) (generated.AbigenLog, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseLog") - } - - var r0 generated.AbigenLog - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (generated.AbigenLog, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) generated.AbigenLog); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(generated.AbigenLog) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseNewTransmission provides a mock function with given fields: log -func (_m *VRFBeaconInterface) ParseNewTransmission(log types.Log) (*vrf_beacon.VRFBeaconNewTransmission, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseNewTransmission") - } - - var r0 *vrf_beacon.VRFBeaconNewTransmission - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_beacon.VRFBeaconNewTransmission, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_beacon.VRFBeaconNewTransmission); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_beacon.VRFBeaconNewTransmission) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseOraclePaid provides a mock function with given fields: log -func (_m *VRFBeaconInterface) ParseOraclePaid(log types.Log) (*vrf_beacon.VRFBeaconOraclePaid, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseOraclePaid") - } - - var r0 *vrf_beacon.VRFBeaconOraclePaid - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_beacon.VRFBeaconOraclePaid, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_beacon.VRFBeaconOraclePaid); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_beacon.VRFBeaconOraclePaid) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseOutputsServed provides a mock function with given fields: log -func (_m *VRFBeaconInterface) ParseOutputsServed(log types.Log) (*vrf_beacon.VRFBeaconOutputsServed, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseOutputsServed") - } - - var r0 *vrf_beacon.VRFBeaconOutputsServed - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_beacon.VRFBeaconOutputsServed, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_beacon.VRFBeaconOutputsServed); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_beacon.VRFBeaconOutputsServed) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseOwnershipTransferRequested provides a mock function with given fields: log -func (_m *VRFBeaconInterface) ParseOwnershipTransferRequested(log types.Log) (*vrf_beacon.VRFBeaconOwnershipTransferRequested, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseOwnershipTransferRequested") - } - - var r0 *vrf_beacon.VRFBeaconOwnershipTransferRequested - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_beacon.VRFBeaconOwnershipTransferRequested, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_beacon.VRFBeaconOwnershipTransferRequested); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_beacon.VRFBeaconOwnershipTransferRequested) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseOwnershipTransferred provides a mock function with given fields: log -func (_m *VRFBeaconInterface) ParseOwnershipTransferred(log types.Log) (*vrf_beacon.VRFBeaconOwnershipTransferred, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseOwnershipTransferred") - } - - var r0 *vrf_beacon.VRFBeaconOwnershipTransferred - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_beacon.VRFBeaconOwnershipTransferred, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_beacon.VRFBeaconOwnershipTransferred); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_beacon.VRFBeaconOwnershipTransferred) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParsePayeeshipTransferRequested provides a mock function with given fields: log -func (_m *VRFBeaconInterface) ParsePayeeshipTransferRequested(log types.Log) (*vrf_beacon.VRFBeaconPayeeshipTransferRequested, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParsePayeeshipTransferRequested") - } - - var r0 *vrf_beacon.VRFBeaconPayeeshipTransferRequested - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_beacon.VRFBeaconPayeeshipTransferRequested, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_beacon.VRFBeaconPayeeshipTransferRequested); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_beacon.VRFBeaconPayeeshipTransferRequested) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParsePayeeshipTransferred provides a mock function with given fields: log -func (_m *VRFBeaconInterface) ParsePayeeshipTransferred(log types.Log) (*vrf_beacon.VRFBeaconPayeeshipTransferred, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParsePayeeshipTransferred") - } - - var r0 *vrf_beacon.VRFBeaconPayeeshipTransferred - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_beacon.VRFBeaconPayeeshipTransferred, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_beacon.VRFBeaconPayeeshipTransferred); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_beacon.VRFBeaconPayeeshipTransferred) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseRandomWordsFulfilled provides a mock function with given fields: log -func (_m *VRFBeaconInterface) ParseRandomWordsFulfilled(log types.Log) (*vrf_beacon.VRFBeaconRandomWordsFulfilled, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseRandomWordsFulfilled") - } - - var r0 *vrf_beacon.VRFBeaconRandomWordsFulfilled - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_beacon.VRFBeaconRandomWordsFulfilled, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_beacon.VRFBeaconRandomWordsFulfilled); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_beacon.VRFBeaconRandomWordsFulfilled) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseRandomnessFulfillmentRequested provides a mock function with given fields: log -func (_m *VRFBeaconInterface) ParseRandomnessFulfillmentRequested(log types.Log) (*vrf_beacon.VRFBeaconRandomnessFulfillmentRequested, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseRandomnessFulfillmentRequested") - } - - var r0 *vrf_beacon.VRFBeaconRandomnessFulfillmentRequested - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_beacon.VRFBeaconRandomnessFulfillmentRequested, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_beacon.VRFBeaconRandomnessFulfillmentRequested); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_beacon.VRFBeaconRandomnessFulfillmentRequested) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseRandomnessRedeemed provides a mock function with given fields: log -func (_m *VRFBeaconInterface) ParseRandomnessRedeemed(log types.Log) (*vrf_beacon.VRFBeaconRandomnessRedeemed, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseRandomnessRedeemed") - } - - var r0 *vrf_beacon.VRFBeaconRandomnessRedeemed - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_beacon.VRFBeaconRandomnessRedeemed, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_beacon.VRFBeaconRandomnessRedeemed); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_beacon.VRFBeaconRandomnessRedeemed) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseRandomnessRequested provides a mock function with given fields: log -func (_m *VRFBeaconInterface) ParseRandomnessRequested(log types.Log) (*vrf_beacon.VRFBeaconRandomnessRequested, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseRandomnessRequested") - } - - var r0 *vrf_beacon.VRFBeaconRandomnessRequested - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_beacon.VRFBeaconRandomnessRequested, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_beacon.VRFBeaconRandomnessRequested); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_beacon.VRFBeaconRandomnessRequested) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SKeyID provides a mock function with given fields: opts -func (_m *VRFBeaconInterface) SKeyID(opts *bind.CallOpts) ([32]byte, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for SKeyID") - } - - var r0 [32]byte - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts) ([32]byte, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts) [32]byte); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([32]byte) - } - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SKeyProvider provides a mock function with given fields: opts -func (_m *VRFBeaconInterface) SKeyProvider(opts *bind.CallOpts) (common.Address, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for SKeyProvider") - } - - var r0 common.Address - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts) (common.Address, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts) common.Address); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Address) - } - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SProvingKeyHash provides a mock function with given fields: opts -func (_m *VRFBeaconInterface) SProvingKeyHash(opts *bind.CallOpts) ([32]byte, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for SProvingKeyHash") - } - - var r0 [32]byte - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts) ([32]byte, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts) [32]byte); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([32]byte) - } - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SetBilling provides a mock function with given fields: opts, maximumGasPrice, reasonableGasPrice, observationPayment, transmissionPayment, accountingGas -func (_m *VRFBeaconInterface) SetBilling(opts *bind.TransactOpts, maximumGasPrice uint64, reasonableGasPrice uint64, observationPayment uint64, transmissionPayment uint64, accountingGas *big.Int) (*types.Transaction, error) { - ret := _m.Called(opts, maximumGasPrice, reasonableGasPrice, observationPayment, transmissionPayment, accountingGas) - - if len(ret) == 0 { - panic("no return value specified for SetBilling") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, uint64, uint64, uint64, uint64, *big.Int) (*types.Transaction, error)); ok { - return rf(opts, maximumGasPrice, reasonableGasPrice, observationPayment, transmissionPayment, accountingGas) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, uint64, uint64, uint64, uint64, *big.Int) *types.Transaction); ok { - r0 = rf(opts, maximumGasPrice, reasonableGasPrice, observationPayment, transmissionPayment, accountingGas) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts, uint64, uint64, uint64, uint64, *big.Int) error); ok { - r1 = rf(opts, maximumGasPrice, reasonableGasPrice, observationPayment, transmissionPayment, accountingGas) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SetBillingAccessController provides a mock function with given fields: opts, _billingAccessController -func (_m *VRFBeaconInterface) SetBillingAccessController(opts *bind.TransactOpts, _billingAccessController common.Address) (*types.Transaction, error) { - ret := _m.Called(opts, _billingAccessController) - - if len(ret) == 0 { - panic("no return value specified for SetBillingAccessController") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, common.Address) (*types.Transaction, error)); ok { - return rf(opts, _billingAccessController) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, common.Address) *types.Transaction); ok { - r0 = rf(opts, _billingAccessController) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts, common.Address) error); ok { - r1 = rf(opts, _billingAccessController) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SetConfig provides a mock function with given fields: opts, signers, transmitters, f, onchainConfig, offchainConfigVersion, offchainConfig -func (_m *VRFBeaconInterface) SetConfig(opts *bind.TransactOpts, signers []common.Address, transmitters []common.Address, f uint8, onchainConfig []byte, offchainConfigVersion uint64, offchainConfig []byte) (*types.Transaction, error) { - ret := _m.Called(opts, signers, transmitters, f, onchainConfig, offchainConfigVersion, offchainConfig) - - if len(ret) == 0 { - panic("no return value specified for SetConfig") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, []common.Address, []common.Address, uint8, []byte, uint64, []byte) (*types.Transaction, error)); ok { - return rf(opts, signers, transmitters, f, onchainConfig, offchainConfigVersion, offchainConfig) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, []common.Address, []common.Address, uint8, []byte, uint64, []byte) *types.Transaction); ok { - r0 = rf(opts, signers, transmitters, f, onchainConfig, offchainConfigVersion, offchainConfig) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts, []common.Address, []common.Address, uint8, []byte, uint64, []byte) error); ok { - r1 = rf(opts, signers, transmitters, f, onchainConfig, offchainConfigVersion, offchainConfig) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SetPayees provides a mock function with given fields: opts, transmitters, payees -func (_m *VRFBeaconInterface) SetPayees(opts *bind.TransactOpts, transmitters []common.Address, payees []common.Address) (*types.Transaction, error) { - ret := _m.Called(opts, transmitters, payees) - - if len(ret) == 0 { - panic("no return value specified for SetPayees") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, []common.Address, []common.Address) (*types.Transaction, error)); ok { - return rf(opts, transmitters, payees) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, []common.Address, []common.Address) *types.Transaction); ok { - r0 = rf(opts, transmitters, payees) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts, []common.Address, []common.Address) error); ok { - r1 = rf(opts, transmitters, payees) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// TransferOwnership provides a mock function with given fields: opts, to -func (_m *VRFBeaconInterface) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { - ret := _m.Called(opts, to) - - if len(ret) == 0 { - panic("no return value specified for TransferOwnership") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, common.Address) (*types.Transaction, error)); ok { - return rf(opts, to) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, common.Address) *types.Transaction); ok { - r0 = rf(opts, to) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts, common.Address) error); ok { - r1 = rf(opts, to) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// TransferPayeeship provides a mock function with given fields: opts, transmitter, proposed -func (_m *VRFBeaconInterface) TransferPayeeship(opts *bind.TransactOpts, transmitter common.Address, proposed common.Address) (*types.Transaction, error) { - ret := _m.Called(opts, transmitter, proposed) - - if len(ret) == 0 { - panic("no return value specified for TransferPayeeship") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, common.Address, common.Address) (*types.Transaction, error)); ok { - return rf(opts, transmitter, proposed) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, common.Address, common.Address) *types.Transaction); ok { - r0 = rf(opts, transmitter, proposed) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts, common.Address, common.Address) error); ok { - r1 = rf(opts, transmitter, proposed) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Transmit provides a mock function with given fields: opts, reportContext, report, rs, ss, rawVs -func (_m *VRFBeaconInterface) Transmit(opts *bind.TransactOpts, reportContext [3][32]byte, report []byte, rs [][32]byte, ss [][32]byte, rawVs [32]byte) (*types.Transaction, error) { - ret := _m.Called(opts, reportContext, report, rs, ss, rawVs) - - if len(ret) == 0 { - panic("no return value specified for Transmit") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, [3][32]byte, []byte, [][32]byte, [][32]byte, [32]byte) (*types.Transaction, error)); ok { - return rf(opts, reportContext, report, rs, ss, rawVs) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, [3][32]byte, []byte, [][32]byte, [][32]byte, [32]byte) *types.Transaction); ok { - r0 = rf(opts, reportContext, report, rs, ss, rawVs) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts, [3][32]byte, []byte, [][32]byte, [][32]byte, [32]byte) error); ok { - r1 = rf(opts, reportContext, report, rs, ss, rawVs) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// TypeAndVersion provides a mock function with given fields: opts -func (_m *VRFBeaconInterface) TypeAndVersion(opts *bind.CallOpts) (string, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for TypeAndVersion") - } - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts) (string, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts) string); ok { - r0 = rf(opts) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchBillingAccessControllerSet provides a mock function with given fields: opts, sink -func (_m *VRFBeaconInterface) WatchBillingAccessControllerSet(opts *bind.WatchOpts, sink chan<- *vrf_beacon.VRFBeaconBillingAccessControllerSet) (event.Subscription, error) { - ret := _m.Called(opts, sink) - - if len(ret) == 0 { - panic("no return value specified for WatchBillingAccessControllerSet") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconBillingAccessControllerSet) (event.Subscription, error)); ok { - return rf(opts, sink) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconBillingAccessControllerSet) event.Subscription); ok { - r0 = rf(opts, sink) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconBillingAccessControllerSet) error); ok { - r1 = rf(opts, sink) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchBillingSet provides a mock function with given fields: opts, sink -func (_m *VRFBeaconInterface) WatchBillingSet(opts *bind.WatchOpts, sink chan<- *vrf_beacon.VRFBeaconBillingSet) (event.Subscription, error) { - ret := _m.Called(opts, sink) - - if len(ret) == 0 { - panic("no return value specified for WatchBillingSet") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconBillingSet) (event.Subscription, error)); ok { - return rf(opts, sink) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconBillingSet) event.Subscription); ok { - r0 = rf(opts, sink) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconBillingSet) error); ok { - r1 = rf(opts, sink) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchConfigSet provides a mock function with given fields: opts, sink -func (_m *VRFBeaconInterface) WatchConfigSet(opts *bind.WatchOpts, sink chan<- *vrf_beacon.VRFBeaconConfigSet) (event.Subscription, error) { - ret := _m.Called(opts, sink) - - if len(ret) == 0 { - panic("no return value specified for WatchConfigSet") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconConfigSet) (event.Subscription, error)); ok { - return rf(opts, sink) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconConfigSet) event.Subscription); ok { - r0 = rf(opts, sink) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconConfigSet) error); ok { - r1 = rf(opts, sink) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchNewTransmission provides a mock function with given fields: opts, sink, epochAndRound -func (_m *VRFBeaconInterface) WatchNewTransmission(opts *bind.WatchOpts, sink chan<- *vrf_beacon.VRFBeaconNewTransmission, epochAndRound []*big.Int) (event.Subscription, error) { - ret := _m.Called(opts, sink, epochAndRound) - - if len(ret) == 0 { - panic("no return value specified for WatchNewTransmission") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconNewTransmission, []*big.Int) (event.Subscription, error)); ok { - return rf(opts, sink, epochAndRound) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconNewTransmission, []*big.Int) event.Subscription); ok { - r0 = rf(opts, sink, epochAndRound) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconNewTransmission, []*big.Int) error); ok { - r1 = rf(opts, sink, epochAndRound) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchOraclePaid provides a mock function with given fields: opts, sink, transmitter, payee, linkToken -func (_m *VRFBeaconInterface) WatchOraclePaid(opts *bind.WatchOpts, sink chan<- *vrf_beacon.VRFBeaconOraclePaid, transmitter []common.Address, payee []common.Address, linkToken []common.Address) (event.Subscription, error) { - ret := _m.Called(opts, sink, transmitter, payee, linkToken) - - if len(ret) == 0 { - panic("no return value specified for WatchOraclePaid") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconOraclePaid, []common.Address, []common.Address, []common.Address) (event.Subscription, error)); ok { - return rf(opts, sink, transmitter, payee, linkToken) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconOraclePaid, []common.Address, []common.Address, []common.Address) event.Subscription); ok { - r0 = rf(opts, sink, transmitter, payee, linkToken) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconOraclePaid, []common.Address, []common.Address, []common.Address) error); ok { - r1 = rf(opts, sink, transmitter, payee, linkToken) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchOutputsServed provides a mock function with given fields: opts, sink -func (_m *VRFBeaconInterface) WatchOutputsServed(opts *bind.WatchOpts, sink chan<- *vrf_beacon.VRFBeaconOutputsServed) (event.Subscription, error) { - ret := _m.Called(opts, sink) - - if len(ret) == 0 { - panic("no return value specified for WatchOutputsServed") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconOutputsServed) (event.Subscription, error)); ok { - return rf(opts, sink) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconOutputsServed) event.Subscription); ok { - r0 = rf(opts, sink) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconOutputsServed) error); ok { - r1 = rf(opts, sink) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchOwnershipTransferRequested provides a mock function with given fields: opts, sink, from, to -func (_m *VRFBeaconInterface) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *vrf_beacon.VRFBeaconOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { - ret := _m.Called(opts, sink, from, to) - - if len(ret) == 0 { - panic("no return value specified for WatchOwnershipTransferRequested") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconOwnershipTransferRequested, []common.Address, []common.Address) (event.Subscription, error)); ok { - return rf(opts, sink, from, to) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconOwnershipTransferRequested, []common.Address, []common.Address) event.Subscription); ok { - r0 = rf(opts, sink, from, to) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconOwnershipTransferRequested, []common.Address, []common.Address) error); ok { - r1 = rf(opts, sink, from, to) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchOwnershipTransferred provides a mock function with given fields: opts, sink, from, to -func (_m *VRFBeaconInterface) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *vrf_beacon.VRFBeaconOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { - ret := _m.Called(opts, sink, from, to) - - if len(ret) == 0 { - panic("no return value specified for WatchOwnershipTransferred") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconOwnershipTransferred, []common.Address, []common.Address) (event.Subscription, error)); ok { - return rf(opts, sink, from, to) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconOwnershipTransferred, []common.Address, []common.Address) event.Subscription); ok { - r0 = rf(opts, sink, from, to) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconOwnershipTransferred, []common.Address, []common.Address) error); ok { - r1 = rf(opts, sink, from, to) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchPayeeshipTransferRequested provides a mock function with given fields: opts, sink, transmitter, current, proposed -func (_m *VRFBeaconInterface) WatchPayeeshipTransferRequested(opts *bind.WatchOpts, sink chan<- *vrf_beacon.VRFBeaconPayeeshipTransferRequested, transmitter []common.Address, current []common.Address, proposed []common.Address) (event.Subscription, error) { - ret := _m.Called(opts, sink, transmitter, current, proposed) - - if len(ret) == 0 { - panic("no return value specified for WatchPayeeshipTransferRequested") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconPayeeshipTransferRequested, []common.Address, []common.Address, []common.Address) (event.Subscription, error)); ok { - return rf(opts, sink, transmitter, current, proposed) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconPayeeshipTransferRequested, []common.Address, []common.Address, []common.Address) event.Subscription); ok { - r0 = rf(opts, sink, transmitter, current, proposed) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconPayeeshipTransferRequested, []common.Address, []common.Address, []common.Address) error); ok { - r1 = rf(opts, sink, transmitter, current, proposed) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchPayeeshipTransferred provides a mock function with given fields: opts, sink, transmitter, previous, current -func (_m *VRFBeaconInterface) WatchPayeeshipTransferred(opts *bind.WatchOpts, sink chan<- *vrf_beacon.VRFBeaconPayeeshipTransferred, transmitter []common.Address, previous []common.Address, current []common.Address) (event.Subscription, error) { - ret := _m.Called(opts, sink, transmitter, previous, current) - - if len(ret) == 0 { - panic("no return value specified for WatchPayeeshipTransferred") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconPayeeshipTransferred, []common.Address, []common.Address, []common.Address) (event.Subscription, error)); ok { - return rf(opts, sink, transmitter, previous, current) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconPayeeshipTransferred, []common.Address, []common.Address, []common.Address) event.Subscription); ok { - r0 = rf(opts, sink, transmitter, previous, current) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconPayeeshipTransferred, []common.Address, []common.Address, []common.Address) error); ok { - r1 = rf(opts, sink, transmitter, previous, current) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchRandomWordsFulfilled provides a mock function with given fields: opts, sink -func (_m *VRFBeaconInterface) WatchRandomWordsFulfilled(opts *bind.WatchOpts, sink chan<- *vrf_beacon.VRFBeaconRandomWordsFulfilled) (event.Subscription, error) { - ret := _m.Called(opts, sink) - - if len(ret) == 0 { - panic("no return value specified for WatchRandomWordsFulfilled") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconRandomWordsFulfilled) (event.Subscription, error)); ok { - return rf(opts, sink) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconRandomWordsFulfilled) event.Subscription); ok { - r0 = rf(opts, sink) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconRandomWordsFulfilled) error); ok { - r1 = rf(opts, sink) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchRandomnessFulfillmentRequested provides a mock function with given fields: opts, sink, requestID -func (_m *VRFBeaconInterface) WatchRandomnessFulfillmentRequested(opts *bind.WatchOpts, sink chan<- *vrf_beacon.VRFBeaconRandomnessFulfillmentRequested, requestID []*big.Int) (event.Subscription, error) { - ret := _m.Called(opts, sink, requestID) - - if len(ret) == 0 { - panic("no return value specified for WatchRandomnessFulfillmentRequested") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconRandomnessFulfillmentRequested, []*big.Int) (event.Subscription, error)); ok { - return rf(opts, sink, requestID) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconRandomnessFulfillmentRequested, []*big.Int) event.Subscription); ok { - r0 = rf(opts, sink, requestID) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconRandomnessFulfillmentRequested, []*big.Int) error); ok { - r1 = rf(opts, sink, requestID) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchRandomnessRedeemed provides a mock function with given fields: opts, sink, requestID, requester -func (_m *VRFBeaconInterface) WatchRandomnessRedeemed(opts *bind.WatchOpts, sink chan<- *vrf_beacon.VRFBeaconRandomnessRedeemed, requestID []*big.Int, requester []common.Address) (event.Subscription, error) { - ret := _m.Called(opts, sink, requestID, requester) - - if len(ret) == 0 { - panic("no return value specified for WatchRandomnessRedeemed") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconRandomnessRedeemed, []*big.Int, []common.Address) (event.Subscription, error)); ok { - return rf(opts, sink, requestID, requester) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconRandomnessRedeemed, []*big.Int, []common.Address) event.Subscription); ok { - r0 = rf(opts, sink, requestID, requester) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconRandomnessRedeemed, []*big.Int, []common.Address) error); ok { - r1 = rf(opts, sink, requestID, requester) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchRandomnessRequested provides a mock function with given fields: opts, sink, requestID -func (_m *VRFBeaconInterface) WatchRandomnessRequested(opts *bind.WatchOpts, sink chan<- *vrf_beacon.VRFBeaconRandomnessRequested, requestID []*big.Int) (event.Subscription, error) { - ret := _m.Called(opts, sink, requestID) - - if len(ret) == 0 { - panic("no return value specified for WatchRandomnessRequested") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconRandomnessRequested, []*big.Int) (event.Subscription, error)); ok { - return rf(opts, sink, requestID) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconRandomnessRequested, []*big.Int) event.Subscription); ok { - r0 = rf(opts, sink, requestID) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_beacon.VRFBeaconRandomnessRequested, []*big.Int) error); ok { - r1 = rf(opts, sink, requestID) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WithdrawFunds provides a mock function with given fields: opts, recipient, amount -func (_m *VRFBeaconInterface) WithdrawFunds(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - ret := _m.Called(opts, recipient, amount) - - if len(ret) == 0 { - panic("no return value specified for WithdrawFunds") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, common.Address, *big.Int) (*types.Transaction, error)); ok { - return rf(opts, recipient, amount) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, common.Address, *big.Int) *types.Transaction); ok { - r0 = rf(opts, recipient, amount) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts, common.Address, *big.Int) error); ok { - r1 = rf(opts, recipient, amount) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WithdrawPayment provides a mock function with given fields: opts, transmitter -func (_m *VRFBeaconInterface) WithdrawPayment(opts *bind.TransactOpts, transmitter common.Address) (*types.Transaction, error) { - ret := _m.Called(opts, transmitter) - - if len(ret) == 0 { - panic("no return value specified for WithdrawPayment") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, common.Address) (*types.Transaction, error)); ok { - return rf(opts, transmitter) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, common.Address) *types.Transaction); ok { - r0 = rf(opts, transmitter) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts, common.Address) error); ok { - r1 = rf(opts, transmitter) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NewVRFBeaconInterface creates a new instance of VRFBeaconInterface. 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 NewVRFBeaconInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *VRFBeaconInterface { - mock := &VRFBeaconInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/services/ocr2/plugins/ocr2vrf/coordinator/mocks/vrf_beacon_coordinator.go b/core/services/ocr2/plugins/ocr2vrf/coordinator/mocks/vrf_beacon_coordinator.go deleted file mode 100644 index d62a08f6a86..00000000000 --- a/core/services/ocr2/plugins/ocr2vrf/coordinator/mocks/vrf_beacon_coordinator.go +++ /dev/null @@ -1,184 +0,0 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package mocks - -import ( - big "math/big" - - bind "github.com/ethereum/go-ethereum/accounts/abi/bind" - - generated "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" - - mock "github.com/stretchr/testify/mock" - - types "github.com/ethereum/go-ethereum/core/types" -) - -// VRFBeaconCoordinator is an autogenerated mock type for the VRFBeaconCoordinator type -type VRFBeaconCoordinator struct { - mock.Mock -} - -// GetConfirmationDelays provides a mock function with given fields: opts -func (_m *VRFBeaconCoordinator) GetConfirmationDelays(opts *bind.CallOpts) ([8]*big.Int, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for GetConfirmationDelays") - } - - var r0 [8]*big.Int - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts) ([8]*big.Int, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts) [8]*big.Int); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([8]*big.Int) - } - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// IBeaconPeriodBlocks provides a mock function with given fields: opts -func (_m *VRFBeaconCoordinator) IBeaconPeriodBlocks(opts *bind.CallOpts) (*big.Int, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for IBeaconPeriodBlocks") - } - - var r0 *big.Int - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts) (*big.Int, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts) *big.Int); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*big.Int) - } - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseLog provides a mock function with given fields: log -func (_m *VRFBeaconCoordinator) ParseLog(log types.Log) (generated.AbigenLog, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseLog") - } - - var r0 generated.AbigenLog - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (generated.AbigenLog, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) generated.AbigenLog); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(generated.AbigenLog) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SKeyID provides a mock function with given fields: opts -func (_m *VRFBeaconCoordinator) SKeyID(opts *bind.CallOpts) ([32]byte, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for SKeyID") - } - - var r0 [32]byte - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts) ([32]byte, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts) [32]byte); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([32]byte) - } - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SProvingKeyHash provides a mock function with given fields: opts -func (_m *VRFBeaconCoordinator) SProvingKeyHash(opts *bind.CallOpts) ([32]byte, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for SProvingKeyHash") - } - - var r0 [32]byte - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts) ([32]byte, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts) [32]byte); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([32]byte) - } - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NewVRFBeaconCoordinator creates a new instance of VRFBeaconCoordinator. 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 NewVRFBeaconCoordinator(t interface { - mock.TestingT - Cleanup(func()) -}) *VRFBeaconCoordinator { - mock := &VRFBeaconCoordinator{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/services/ocr2/plugins/ocr2vrf/coordinator/mocks/vrf_coordinator.go b/core/services/ocr2/plugins/ocr2vrf/coordinator/mocks/vrf_coordinator.go deleted file mode 100644 index 268dff05237..00000000000 --- a/core/services/ocr2/plugins/ocr2vrf/coordinator/mocks/vrf_coordinator.go +++ /dev/null @@ -1,3093 +0,0 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. - -package mocks - -import ( - big "math/big" - - bind "github.com/ethereum/go-ethereum/accounts/abi/bind" - common "github.com/ethereum/go-ethereum/common" - - event "github.com/ethereum/go-ethereum/event" - - generated "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" - - mock "github.com/stretchr/testify/mock" - - types "github.com/ethereum/go-ethereum/core/types" - - vrf_coordinator "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/vrf_coordinator" -) - -// VRFCoordinatorInterface is an autogenerated mock type for the VRFCoordinatorInterface type -type VRFCoordinatorInterface struct { - mock.Mock -} - -// AcceptOwnership provides a mock function with given fields: opts -func (_m *VRFCoordinatorInterface) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for AcceptOwnership") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts) (*types.Transaction, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts) *types.Transaction); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// AcceptSubscriptionOwnerTransfer provides a mock function with given fields: opts, subId -func (_m *VRFCoordinatorInterface) AcceptSubscriptionOwnerTransfer(opts *bind.TransactOpts, subId *big.Int) (*types.Transaction, error) { - ret := _m.Called(opts, subId) - - if len(ret) == 0 { - panic("no return value specified for AcceptSubscriptionOwnerTransfer") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, *big.Int) (*types.Transaction, error)); ok { - return rf(opts, subId) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, *big.Int) *types.Transaction); ok { - r0 = rf(opts, subId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts, *big.Int) error); ok { - r1 = rf(opts, subId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// AddConsumer provides a mock function with given fields: opts, subId, consumer -func (_m *VRFCoordinatorInterface) AddConsumer(opts *bind.TransactOpts, subId *big.Int, consumer common.Address) (*types.Transaction, error) { - ret := _m.Called(opts, subId, consumer) - - if len(ret) == 0 { - panic("no return value specified for AddConsumer") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, *big.Int, common.Address) (*types.Transaction, error)); ok { - return rf(opts, subId, consumer) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, *big.Int, common.Address) *types.Transaction); ok { - r0 = rf(opts, subId, consumer) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts, *big.Int, common.Address) error); ok { - r1 = rf(opts, subId, consumer) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Address provides a mock function with given fields: -func (_m *VRFCoordinatorInterface) Address() common.Address { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Address") - } - - var r0 common.Address - if rf, ok := ret.Get(0).(func() common.Address); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Address) - } - } - - return r0 -} - -// BatchTransferLink provides a mock function with given fields: opts, recipients, paymentsInJuels -func (_m *VRFCoordinatorInterface) BatchTransferLink(opts *bind.TransactOpts, recipients []common.Address, paymentsInJuels []*big.Int) (*types.Transaction, error) { - ret := _m.Called(opts, recipients, paymentsInJuels) - - if len(ret) == 0 { - panic("no return value specified for BatchTransferLink") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, []common.Address, []*big.Int) (*types.Transaction, error)); ok { - return rf(opts, recipients, paymentsInJuels) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, []common.Address, []*big.Int) *types.Transaction); ok { - r0 = rf(opts, recipients, paymentsInJuels) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts, []common.Address, []*big.Int) error); ok { - r1 = rf(opts, recipients, paymentsInJuels) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// CancelSubscription provides a mock function with given fields: opts, subId, to -func (_m *VRFCoordinatorInterface) CancelSubscription(opts *bind.TransactOpts, subId *big.Int, to common.Address) (*types.Transaction, error) { - ret := _m.Called(opts, subId, to) - - if len(ret) == 0 { - panic("no return value specified for CancelSubscription") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, *big.Int, common.Address) (*types.Transaction, error)); ok { - return rf(opts, subId, to) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, *big.Int, common.Address) *types.Transaction); ok { - r0 = rf(opts, subId, to) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts, *big.Int, common.Address) error); ok { - r1 = rf(opts, subId, to) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// CreateSubscription provides a mock function with given fields: opts -func (_m *VRFCoordinatorInterface) CreateSubscription(opts *bind.TransactOpts) (*types.Transaction, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for CreateSubscription") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts) (*types.Transaction, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts) *types.Transaction); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// DeregisterMigratableCoordinator provides a mock function with given fields: opts, target -func (_m *VRFCoordinatorInterface) DeregisterMigratableCoordinator(opts *bind.TransactOpts, target common.Address) (*types.Transaction, error) { - ret := _m.Called(opts, target) - - if len(ret) == 0 { - panic("no return value specified for DeregisterMigratableCoordinator") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, common.Address) (*types.Transaction, error)); ok { - return rf(opts, target) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, common.Address) *types.Transaction); ok { - r0 = rf(opts, target) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts, common.Address) error); ok { - r1 = rf(opts, target) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterCallbackConfigSet provides a mock function with given fields: opts -func (_m *VRFCoordinatorInterface) FilterCallbackConfigSet(opts *bind.FilterOpts) (*vrf_coordinator.VRFCoordinatorCallbackConfigSetIterator, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for FilterCallbackConfigSet") - } - - var r0 *vrf_coordinator.VRFCoordinatorCallbackConfigSetIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts) (*vrf_coordinator.VRFCoordinatorCallbackConfigSetIterator, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts) *vrf_coordinator.VRFCoordinatorCallbackConfigSetIterator); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorCallbackConfigSetIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterCoordinatorConfigSet provides a mock function with given fields: opts -func (_m *VRFCoordinatorInterface) FilterCoordinatorConfigSet(opts *bind.FilterOpts) (*vrf_coordinator.VRFCoordinatorCoordinatorConfigSetIterator, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for FilterCoordinatorConfigSet") - } - - var r0 *vrf_coordinator.VRFCoordinatorCoordinatorConfigSetIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts) (*vrf_coordinator.VRFCoordinatorCoordinatorConfigSetIterator, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts) *vrf_coordinator.VRFCoordinatorCoordinatorConfigSetIterator); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorCoordinatorConfigSetIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterCoordinatorDeregistered provides a mock function with given fields: opts -func (_m *VRFCoordinatorInterface) FilterCoordinatorDeregistered(opts *bind.FilterOpts) (*vrf_coordinator.VRFCoordinatorCoordinatorDeregisteredIterator, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for FilterCoordinatorDeregistered") - } - - var r0 *vrf_coordinator.VRFCoordinatorCoordinatorDeregisteredIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts) (*vrf_coordinator.VRFCoordinatorCoordinatorDeregisteredIterator, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts) *vrf_coordinator.VRFCoordinatorCoordinatorDeregisteredIterator); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorCoordinatorDeregisteredIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterCoordinatorRegistered provides a mock function with given fields: opts -func (_m *VRFCoordinatorInterface) FilterCoordinatorRegistered(opts *bind.FilterOpts) (*vrf_coordinator.VRFCoordinatorCoordinatorRegisteredIterator, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for FilterCoordinatorRegistered") - } - - var r0 *vrf_coordinator.VRFCoordinatorCoordinatorRegisteredIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts) (*vrf_coordinator.VRFCoordinatorCoordinatorRegisteredIterator, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts) *vrf_coordinator.VRFCoordinatorCoordinatorRegisteredIterator); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorCoordinatorRegisteredIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterMigrationCompleted provides a mock function with given fields: opts, newVersion, subID -func (_m *VRFCoordinatorInterface) FilterMigrationCompleted(opts *bind.FilterOpts, newVersion []uint8, subID []*big.Int) (*vrf_coordinator.VRFCoordinatorMigrationCompletedIterator, error) { - ret := _m.Called(opts, newVersion, subID) - - if len(ret) == 0 { - panic("no return value specified for FilterMigrationCompleted") - } - - var r0 *vrf_coordinator.VRFCoordinatorMigrationCompletedIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []uint8, []*big.Int) (*vrf_coordinator.VRFCoordinatorMigrationCompletedIterator, error)); ok { - return rf(opts, newVersion, subID) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []uint8, []*big.Int) *vrf_coordinator.VRFCoordinatorMigrationCompletedIterator); ok { - r0 = rf(opts, newVersion, subID) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorMigrationCompletedIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts, []uint8, []*big.Int) error); ok { - r1 = rf(opts, newVersion, subID) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterOutputsServed provides a mock function with given fields: opts -func (_m *VRFCoordinatorInterface) FilterOutputsServed(opts *bind.FilterOpts) (*vrf_coordinator.VRFCoordinatorOutputsServedIterator, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for FilterOutputsServed") - } - - var r0 *vrf_coordinator.VRFCoordinatorOutputsServedIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts) (*vrf_coordinator.VRFCoordinatorOutputsServedIterator, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts) *vrf_coordinator.VRFCoordinatorOutputsServedIterator); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorOutputsServedIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterOwnershipTransferRequested provides a mock function with given fields: opts, from, to -func (_m *VRFCoordinatorInterface) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*vrf_coordinator.VRFCoordinatorOwnershipTransferRequestedIterator, error) { - ret := _m.Called(opts, from, to) - - if len(ret) == 0 { - panic("no return value specified for FilterOwnershipTransferRequested") - } - - var r0 *vrf_coordinator.VRFCoordinatorOwnershipTransferRequestedIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []common.Address, []common.Address) (*vrf_coordinator.VRFCoordinatorOwnershipTransferRequestedIterator, error)); ok { - return rf(opts, from, to) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []common.Address, []common.Address) *vrf_coordinator.VRFCoordinatorOwnershipTransferRequestedIterator); ok { - r0 = rf(opts, from, to) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorOwnershipTransferRequestedIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts, []common.Address, []common.Address) error); ok { - r1 = rf(opts, from, to) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterOwnershipTransferred provides a mock function with given fields: opts, from, to -func (_m *VRFCoordinatorInterface) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*vrf_coordinator.VRFCoordinatorOwnershipTransferredIterator, error) { - ret := _m.Called(opts, from, to) - - if len(ret) == 0 { - panic("no return value specified for FilterOwnershipTransferred") - } - - var r0 *vrf_coordinator.VRFCoordinatorOwnershipTransferredIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []common.Address, []common.Address) (*vrf_coordinator.VRFCoordinatorOwnershipTransferredIterator, error)); ok { - return rf(opts, from, to) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []common.Address, []common.Address) *vrf_coordinator.VRFCoordinatorOwnershipTransferredIterator); ok { - r0 = rf(opts, from, to) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorOwnershipTransferredIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts, []common.Address, []common.Address) error); ok { - r1 = rf(opts, from, to) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterPauseFlagChanged provides a mock function with given fields: opts -func (_m *VRFCoordinatorInterface) FilterPauseFlagChanged(opts *bind.FilterOpts) (*vrf_coordinator.VRFCoordinatorPauseFlagChangedIterator, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for FilterPauseFlagChanged") - } - - var r0 *vrf_coordinator.VRFCoordinatorPauseFlagChangedIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts) (*vrf_coordinator.VRFCoordinatorPauseFlagChangedIterator, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts) *vrf_coordinator.VRFCoordinatorPauseFlagChangedIterator); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorPauseFlagChangedIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterRandomWordsFulfilled provides a mock function with given fields: opts -func (_m *VRFCoordinatorInterface) FilterRandomWordsFulfilled(opts *bind.FilterOpts) (*vrf_coordinator.VRFCoordinatorRandomWordsFulfilledIterator, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for FilterRandomWordsFulfilled") - } - - var r0 *vrf_coordinator.VRFCoordinatorRandomWordsFulfilledIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts) (*vrf_coordinator.VRFCoordinatorRandomWordsFulfilledIterator, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts) *vrf_coordinator.VRFCoordinatorRandomWordsFulfilledIterator); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorRandomWordsFulfilledIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterRandomnessFulfillmentRequested provides a mock function with given fields: opts, requestID -func (_m *VRFCoordinatorInterface) FilterRandomnessFulfillmentRequested(opts *bind.FilterOpts, requestID []*big.Int) (*vrf_coordinator.VRFCoordinatorRandomnessFulfillmentRequestedIterator, error) { - ret := _m.Called(opts, requestID) - - if len(ret) == 0 { - panic("no return value specified for FilterRandomnessFulfillmentRequested") - } - - var r0 *vrf_coordinator.VRFCoordinatorRandomnessFulfillmentRequestedIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []*big.Int) (*vrf_coordinator.VRFCoordinatorRandomnessFulfillmentRequestedIterator, error)); ok { - return rf(opts, requestID) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []*big.Int) *vrf_coordinator.VRFCoordinatorRandomnessFulfillmentRequestedIterator); ok { - r0 = rf(opts, requestID) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorRandomnessFulfillmentRequestedIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts, []*big.Int) error); ok { - r1 = rf(opts, requestID) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterRandomnessRedeemed provides a mock function with given fields: opts, requestID, requester -func (_m *VRFCoordinatorInterface) FilterRandomnessRedeemed(opts *bind.FilterOpts, requestID []*big.Int, requester []common.Address) (*vrf_coordinator.VRFCoordinatorRandomnessRedeemedIterator, error) { - ret := _m.Called(opts, requestID, requester) - - if len(ret) == 0 { - panic("no return value specified for FilterRandomnessRedeemed") - } - - var r0 *vrf_coordinator.VRFCoordinatorRandomnessRedeemedIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []*big.Int, []common.Address) (*vrf_coordinator.VRFCoordinatorRandomnessRedeemedIterator, error)); ok { - return rf(opts, requestID, requester) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []*big.Int, []common.Address) *vrf_coordinator.VRFCoordinatorRandomnessRedeemedIterator); ok { - r0 = rf(opts, requestID, requester) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorRandomnessRedeemedIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts, []*big.Int, []common.Address) error); ok { - r1 = rf(opts, requestID, requester) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterRandomnessRequested provides a mock function with given fields: opts, requestID -func (_m *VRFCoordinatorInterface) FilterRandomnessRequested(opts *bind.FilterOpts, requestID []*big.Int) (*vrf_coordinator.VRFCoordinatorRandomnessRequestedIterator, error) { - ret := _m.Called(opts, requestID) - - if len(ret) == 0 { - panic("no return value specified for FilterRandomnessRequested") - } - - var r0 *vrf_coordinator.VRFCoordinatorRandomnessRequestedIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []*big.Int) (*vrf_coordinator.VRFCoordinatorRandomnessRequestedIterator, error)); ok { - return rf(opts, requestID) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []*big.Int) *vrf_coordinator.VRFCoordinatorRandomnessRequestedIterator); ok { - r0 = rf(opts, requestID) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorRandomnessRequestedIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts, []*big.Int) error); ok { - r1 = rf(opts, requestID) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterSubscriptionCanceled provides a mock function with given fields: opts, subId -func (_m *VRFCoordinatorInterface) FilterSubscriptionCanceled(opts *bind.FilterOpts, subId []*big.Int) (*vrf_coordinator.VRFCoordinatorSubscriptionCanceledIterator, error) { - ret := _m.Called(opts, subId) - - if len(ret) == 0 { - panic("no return value specified for FilterSubscriptionCanceled") - } - - var r0 *vrf_coordinator.VRFCoordinatorSubscriptionCanceledIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []*big.Int) (*vrf_coordinator.VRFCoordinatorSubscriptionCanceledIterator, error)); ok { - return rf(opts, subId) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []*big.Int) *vrf_coordinator.VRFCoordinatorSubscriptionCanceledIterator); ok { - r0 = rf(opts, subId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorSubscriptionCanceledIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts, []*big.Int) error); ok { - r1 = rf(opts, subId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterSubscriptionConsumerAdded provides a mock function with given fields: opts, subId -func (_m *VRFCoordinatorInterface) FilterSubscriptionConsumerAdded(opts *bind.FilterOpts, subId []*big.Int) (*vrf_coordinator.VRFCoordinatorSubscriptionConsumerAddedIterator, error) { - ret := _m.Called(opts, subId) - - if len(ret) == 0 { - panic("no return value specified for FilterSubscriptionConsumerAdded") - } - - var r0 *vrf_coordinator.VRFCoordinatorSubscriptionConsumerAddedIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []*big.Int) (*vrf_coordinator.VRFCoordinatorSubscriptionConsumerAddedIterator, error)); ok { - return rf(opts, subId) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []*big.Int) *vrf_coordinator.VRFCoordinatorSubscriptionConsumerAddedIterator); ok { - r0 = rf(opts, subId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorSubscriptionConsumerAddedIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts, []*big.Int) error); ok { - r1 = rf(opts, subId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterSubscriptionConsumerRemoved provides a mock function with given fields: opts, subId -func (_m *VRFCoordinatorInterface) FilterSubscriptionConsumerRemoved(opts *bind.FilterOpts, subId []*big.Int) (*vrf_coordinator.VRFCoordinatorSubscriptionConsumerRemovedIterator, error) { - ret := _m.Called(opts, subId) - - if len(ret) == 0 { - panic("no return value specified for FilterSubscriptionConsumerRemoved") - } - - var r0 *vrf_coordinator.VRFCoordinatorSubscriptionConsumerRemovedIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []*big.Int) (*vrf_coordinator.VRFCoordinatorSubscriptionConsumerRemovedIterator, error)); ok { - return rf(opts, subId) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []*big.Int) *vrf_coordinator.VRFCoordinatorSubscriptionConsumerRemovedIterator); ok { - r0 = rf(opts, subId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorSubscriptionConsumerRemovedIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts, []*big.Int) error); ok { - r1 = rf(opts, subId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterSubscriptionCreated provides a mock function with given fields: opts, subId, owner -func (_m *VRFCoordinatorInterface) FilterSubscriptionCreated(opts *bind.FilterOpts, subId []*big.Int, owner []common.Address) (*vrf_coordinator.VRFCoordinatorSubscriptionCreatedIterator, error) { - ret := _m.Called(opts, subId, owner) - - if len(ret) == 0 { - panic("no return value specified for FilterSubscriptionCreated") - } - - var r0 *vrf_coordinator.VRFCoordinatorSubscriptionCreatedIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []*big.Int, []common.Address) (*vrf_coordinator.VRFCoordinatorSubscriptionCreatedIterator, error)); ok { - return rf(opts, subId, owner) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []*big.Int, []common.Address) *vrf_coordinator.VRFCoordinatorSubscriptionCreatedIterator); ok { - r0 = rf(opts, subId, owner) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorSubscriptionCreatedIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts, []*big.Int, []common.Address) error); ok { - r1 = rf(opts, subId, owner) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterSubscriptionFunded provides a mock function with given fields: opts, subId -func (_m *VRFCoordinatorInterface) FilterSubscriptionFunded(opts *bind.FilterOpts, subId []*big.Int) (*vrf_coordinator.VRFCoordinatorSubscriptionFundedIterator, error) { - ret := _m.Called(opts, subId) - - if len(ret) == 0 { - panic("no return value specified for FilterSubscriptionFunded") - } - - var r0 *vrf_coordinator.VRFCoordinatorSubscriptionFundedIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []*big.Int) (*vrf_coordinator.VRFCoordinatorSubscriptionFundedIterator, error)); ok { - return rf(opts, subId) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []*big.Int) *vrf_coordinator.VRFCoordinatorSubscriptionFundedIterator); ok { - r0 = rf(opts, subId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorSubscriptionFundedIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts, []*big.Int) error); ok { - r1 = rf(opts, subId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterSubscriptionOwnerTransferRequested provides a mock function with given fields: opts, subId -func (_m *VRFCoordinatorInterface) FilterSubscriptionOwnerTransferRequested(opts *bind.FilterOpts, subId []*big.Int) (*vrf_coordinator.VRFCoordinatorSubscriptionOwnerTransferRequestedIterator, error) { - ret := _m.Called(opts, subId) - - if len(ret) == 0 { - panic("no return value specified for FilterSubscriptionOwnerTransferRequested") - } - - var r0 *vrf_coordinator.VRFCoordinatorSubscriptionOwnerTransferRequestedIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []*big.Int) (*vrf_coordinator.VRFCoordinatorSubscriptionOwnerTransferRequestedIterator, error)); ok { - return rf(opts, subId) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []*big.Int) *vrf_coordinator.VRFCoordinatorSubscriptionOwnerTransferRequestedIterator); ok { - r0 = rf(opts, subId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorSubscriptionOwnerTransferRequestedIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts, []*big.Int) error); ok { - r1 = rf(opts, subId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FilterSubscriptionOwnerTransferred provides a mock function with given fields: opts, subId -func (_m *VRFCoordinatorInterface) FilterSubscriptionOwnerTransferred(opts *bind.FilterOpts, subId []*big.Int) (*vrf_coordinator.VRFCoordinatorSubscriptionOwnerTransferredIterator, error) { - ret := _m.Called(opts, subId) - - if len(ret) == 0 { - panic("no return value specified for FilterSubscriptionOwnerTransferred") - } - - var r0 *vrf_coordinator.VRFCoordinatorSubscriptionOwnerTransferredIterator - var r1 error - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []*big.Int) (*vrf_coordinator.VRFCoordinatorSubscriptionOwnerTransferredIterator, error)); ok { - return rf(opts, subId) - } - if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []*big.Int) *vrf_coordinator.VRFCoordinatorSubscriptionOwnerTransferredIterator); ok { - r0 = rf(opts, subId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorSubscriptionOwnerTransferredIterator) - } - } - - if rf, ok := ret.Get(1).(func(*bind.FilterOpts, []*big.Int) error); ok { - r1 = rf(opts, subId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetCallbackMemo provides a mock function with given fields: opts, requestId -func (_m *VRFCoordinatorInterface) GetCallbackMemo(opts *bind.CallOpts, requestId *big.Int) ([32]byte, error) { - ret := _m.Called(opts, requestId) - - if len(ret) == 0 { - panic("no return value specified for GetCallbackMemo") - } - - var r0 [32]byte - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts, *big.Int) ([32]byte, error)); ok { - return rf(opts, requestId) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts, *big.Int) [32]byte); ok { - r0 = rf(opts, requestId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([32]byte) - } - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts, *big.Int) error); ok { - r1 = rf(opts, requestId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetConfirmationDelays provides a mock function with given fields: opts -func (_m *VRFCoordinatorInterface) GetConfirmationDelays(opts *bind.CallOpts) ([8]*big.Int, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for GetConfirmationDelays") - } - - var r0 [8]*big.Int - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts) ([8]*big.Int, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts) [8]*big.Int); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([8]*big.Int) - } - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetFee provides a mock function with given fields: opts, arg0, arg1 -func (_m *VRFCoordinatorInterface) GetFee(opts *bind.CallOpts, arg0 *big.Int, arg1 []byte) (*big.Int, error) { - ret := _m.Called(opts, arg0, arg1) - - if len(ret) == 0 { - panic("no return value specified for GetFee") - } - - var r0 *big.Int - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts, *big.Int, []byte) (*big.Int, error)); ok { - return rf(opts, arg0, arg1) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts, *big.Int, []byte) *big.Int); ok { - r0 = rf(opts, arg0, arg1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*big.Int) - } - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts, *big.Int, []byte) error); ok { - r1 = rf(opts, arg0, arg1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetFulfillmentFee provides a mock function with given fields: opts, arg0, callbackGasLimit, arguments, arg3 -func (_m *VRFCoordinatorInterface) GetFulfillmentFee(opts *bind.CallOpts, arg0 *big.Int, callbackGasLimit uint32, arguments []byte, arg3 []byte) (*big.Int, error) { - ret := _m.Called(opts, arg0, callbackGasLimit, arguments, arg3) - - if len(ret) == 0 { - panic("no return value specified for GetFulfillmentFee") - } - - var r0 *big.Int - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts, *big.Int, uint32, []byte, []byte) (*big.Int, error)); ok { - return rf(opts, arg0, callbackGasLimit, arguments, arg3) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts, *big.Int, uint32, []byte, []byte) *big.Int); ok { - r0 = rf(opts, arg0, callbackGasLimit, arguments, arg3) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*big.Int) - } - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts, *big.Int, uint32, []byte, []byte) error); ok { - r1 = rf(opts, arg0, callbackGasLimit, arguments, arg3) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetSubscription provides a mock function with given fields: opts, subId -func (_m *VRFCoordinatorInterface) GetSubscription(opts *bind.CallOpts, subId *big.Int) (vrf_coordinator.GetSubscription, error) { - ret := _m.Called(opts, subId) - - if len(ret) == 0 { - panic("no return value specified for GetSubscription") - } - - var r0 vrf_coordinator.GetSubscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts, *big.Int) (vrf_coordinator.GetSubscription, error)); ok { - return rf(opts, subId) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts, *big.Int) vrf_coordinator.GetSubscription); ok { - r0 = rf(opts, subId) - } else { - r0 = ret.Get(0).(vrf_coordinator.GetSubscription) - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts, *big.Int) error); ok { - r1 = rf(opts, subId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetSubscriptionLinkBalance provides a mock function with given fields: opts -func (_m *VRFCoordinatorInterface) GetSubscriptionLinkBalance(opts *bind.CallOpts) (*big.Int, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for GetSubscriptionLinkBalance") - } - - var r0 *big.Int - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts) (*big.Int, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts) *big.Int); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*big.Int) - } - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// IBeaconPeriodBlocks provides a mock function with given fields: opts -func (_m *VRFCoordinatorInterface) IBeaconPeriodBlocks(opts *bind.CallOpts) (*big.Int, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for IBeaconPeriodBlocks") - } - - var r0 *big.Int - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts) (*big.Int, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts) *big.Int); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*big.Int) - } - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ILink provides a mock function with given fields: opts -func (_m *VRFCoordinatorInterface) ILink(opts *bind.CallOpts) (common.Address, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for ILink") - } - - var r0 common.Address - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts) (common.Address, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts) common.Address); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Address) - } - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MAXCONSUMERS provides a mock function with given fields: opts -func (_m *VRFCoordinatorInterface) MAXCONSUMERS(opts *bind.CallOpts) (uint16, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for MAXCONSUMERS") - } - - var r0 uint16 - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts) (uint16, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts) uint16); ok { - r0 = rf(opts) - } else { - r0 = ret.Get(0).(uint16) - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MAXNUMWORDS provides a mock function with given fields: opts -func (_m *VRFCoordinatorInterface) MAXNUMWORDS(opts *bind.CallOpts) (*big.Int, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for MAXNUMWORDS") - } - - var r0 *big.Int - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts) (*big.Int, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts) *big.Int); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*big.Int) - } - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Migrate provides a mock function with given fields: opts, newCoordinator, encodedRequest -func (_m *VRFCoordinatorInterface) Migrate(opts *bind.TransactOpts, newCoordinator common.Address, encodedRequest []byte) (*types.Transaction, error) { - ret := _m.Called(opts, newCoordinator, encodedRequest) - - if len(ret) == 0 { - panic("no return value specified for Migrate") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, common.Address, []byte) (*types.Transaction, error)); ok { - return rf(opts, newCoordinator, encodedRequest) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, common.Address, []byte) *types.Transaction); ok { - r0 = rf(opts, newCoordinator, encodedRequest) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts, common.Address, []byte) error); ok { - r1 = rf(opts, newCoordinator, encodedRequest) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// MigrationVersion provides a mock function with given fields: opts -func (_m *VRFCoordinatorInterface) MigrationVersion(opts *bind.CallOpts) (uint8, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for MigrationVersion") - } - - var r0 uint8 - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts) (uint8, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts) uint8); ok { - r0 = rf(opts) - } else { - r0 = ret.Get(0).(uint8) - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NUMCONFDELAYS provides a mock function with given fields: opts -func (_m *VRFCoordinatorInterface) NUMCONFDELAYS(opts *bind.CallOpts) (uint8, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for NUMCONFDELAYS") - } - - var r0 uint8 - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts) (uint8, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts) uint8); ok { - r0 = rf(opts) - } else { - r0 = ret.Get(0).(uint8) - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// OnMigration provides a mock function with given fields: opts, arg0 -func (_m *VRFCoordinatorInterface) OnMigration(opts *bind.CallOpts, arg0 []byte) error { - ret := _m.Called(opts, arg0) - - if len(ret) == 0 { - panic("no return value specified for OnMigration") - } - - var r0 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts, []byte) error); ok { - r0 = rf(opts, arg0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// OnTokenTransfer provides a mock function with given fields: opts, arg0, amount, data -func (_m *VRFCoordinatorInterface) OnTokenTransfer(opts *bind.TransactOpts, arg0 common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { - ret := _m.Called(opts, arg0, amount, data) - - if len(ret) == 0 { - panic("no return value specified for OnTokenTransfer") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, common.Address, *big.Int, []byte) (*types.Transaction, error)); ok { - return rf(opts, arg0, amount, data) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, common.Address, *big.Int, []byte) *types.Transaction); ok { - r0 = rf(opts, arg0, amount, data) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts, common.Address, *big.Int, []byte) error); ok { - r1 = rf(opts, arg0, amount, data) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Owner provides a mock function with given fields: opts -func (_m *VRFCoordinatorInterface) Owner(opts *bind.CallOpts) (common.Address, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for Owner") - } - - var r0 common.Address - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts) (common.Address, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts) common.Address); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Address) - } - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseCallbackConfigSet provides a mock function with given fields: log -func (_m *VRFCoordinatorInterface) ParseCallbackConfigSet(log types.Log) (*vrf_coordinator.VRFCoordinatorCallbackConfigSet, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseCallbackConfigSet") - } - - var r0 *vrf_coordinator.VRFCoordinatorCallbackConfigSet - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_coordinator.VRFCoordinatorCallbackConfigSet, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_coordinator.VRFCoordinatorCallbackConfigSet); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorCallbackConfigSet) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseCoordinatorConfigSet provides a mock function with given fields: log -func (_m *VRFCoordinatorInterface) ParseCoordinatorConfigSet(log types.Log) (*vrf_coordinator.VRFCoordinatorCoordinatorConfigSet, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseCoordinatorConfigSet") - } - - var r0 *vrf_coordinator.VRFCoordinatorCoordinatorConfigSet - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_coordinator.VRFCoordinatorCoordinatorConfigSet, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_coordinator.VRFCoordinatorCoordinatorConfigSet); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorCoordinatorConfigSet) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseCoordinatorDeregistered provides a mock function with given fields: log -func (_m *VRFCoordinatorInterface) ParseCoordinatorDeregistered(log types.Log) (*vrf_coordinator.VRFCoordinatorCoordinatorDeregistered, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseCoordinatorDeregistered") - } - - var r0 *vrf_coordinator.VRFCoordinatorCoordinatorDeregistered - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_coordinator.VRFCoordinatorCoordinatorDeregistered, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_coordinator.VRFCoordinatorCoordinatorDeregistered); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorCoordinatorDeregistered) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseCoordinatorRegistered provides a mock function with given fields: log -func (_m *VRFCoordinatorInterface) ParseCoordinatorRegistered(log types.Log) (*vrf_coordinator.VRFCoordinatorCoordinatorRegistered, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseCoordinatorRegistered") - } - - var r0 *vrf_coordinator.VRFCoordinatorCoordinatorRegistered - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_coordinator.VRFCoordinatorCoordinatorRegistered, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_coordinator.VRFCoordinatorCoordinatorRegistered); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorCoordinatorRegistered) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseLog provides a mock function with given fields: log -func (_m *VRFCoordinatorInterface) ParseLog(log types.Log) (generated.AbigenLog, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseLog") - } - - var r0 generated.AbigenLog - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (generated.AbigenLog, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) generated.AbigenLog); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(generated.AbigenLog) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseMigrationCompleted provides a mock function with given fields: log -func (_m *VRFCoordinatorInterface) ParseMigrationCompleted(log types.Log) (*vrf_coordinator.VRFCoordinatorMigrationCompleted, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseMigrationCompleted") - } - - var r0 *vrf_coordinator.VRFCoordinatorMigrationCompleted - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_coordinator.VRFCoordinatorMigrationCompleted, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_coordinator.VRFCoordinatorMigrationCompleted); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorMigrationCompleted) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseOutputsServed provides a mock function with given fields: log -func (_m *VRFCoordinatorInterface) ParseOutputsServed(log types.Log) (*vrf_coordinator.VRFCoordinatorOutputsServed, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseOutputsServed") - } - - var r0 *vrf_coordinator.VRFCoordinatorOutputsServed - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_coordinator.VRFCoordinatorOutputsServed, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_coordinator.VRFCoordinatorOutputsServed); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorOutputsServed) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseOwnershipTransferRequested provides a mock function with given fields: log -func (_m *VRFCoordinatorInterface) ParseOwnershipTransferRequested(log types.Log) (*vrf_coordinator.VRFCoordinatorOwnershipTransferRequested, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseOwnershipTransferRequested") - } - - var r0 *vrf_coordinator.VRFCoordinatorOwnershipTransferRequested - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_coordinator.VRFCoordinatorOwnershipTransferRequested, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_coordinator.VRFCoordinatorOwnershipTransferRequested); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorOwnershipTransferRequested) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseOwnershipTransferred provides a mock function with given fields: log -func (_m *VRFCoordinatorInterface) ParseOwnershipTransferred(log types.Log) (*vrf_coordinator.VRFCoordinatorOwnershipTransferred, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseOwnershipTransferred") - } - - var r0 *vrf_coordinator.VRFCoordinatorOwnershipTransferred - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_coordinator.VRFCoordinatorOwnershipTransferred, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_coordinator.VRFCoordinatorOwnershipTransferred); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorOwnershipTransferred) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParsePauseFlagChanged provides a mock function with given fields: log -func (_m *VRFCoordinatorInterface) ParsePauseFlagChanged(log types.Log) (*vrf_coordinator.VRFCoordinatorPauseFlagChanged, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParsePauseFlagChanged") - } - - var r0 *vrf_coordinator.VRFCoordinatorPauseFlagChanged - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_coordinator.VRFCoordinatorPauseFlagChanged, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_coordinator.VRFCoordinatorPauseFlagChanged); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorPauseFlagChanged) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseRandomWordsFulfilled provides a mock function with given fields: log -func (_m *VRFCoordinatorInterface) ParseRandomWordsFulfilled(log types.Log) (*vrf_coordinator.VRFCoordinatorRandomWordsFulfilled, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseRandomWordsFulfilled") - } - - var r0 *vrf_coordinator.VRFCoordinatorRandomWordsFulfilled - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_coordinator.VRFCoordinatorRandomWordsFulfilled, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_coordinator.VRFCoordinatorRandomWordsFulfilled); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorRandomWordsFulfilled) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseRandomnessFulfillmentRequested provides a mock function with given fields: log -func (_m *VRFCoordinatorInterface) ParseRandomnessFulfillmentRequested(log types.Log) (*vrf_coordinator.VRFCoordinatorRandomnessFulfillmentRequested, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseRandomnessFulfillmentRequested") - } - - var r0 *vrf_coordinator.VRFCoordinatorRandomnessFulfillmentRequested - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_coordinator.VRFCoordinatorRandomnessFulfillmentRequested, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_coordinator.VRFCoordinatorRandomnessFulfillmentRequested); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorRandomnessFulfillmentRequested) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseRandomnessRedeemed provides a mock function with given fields: log -func (_m *VRFCoordinatorInterface) ParseRandomnessRedeemed(log types.Log) (*vrf_coordinator.VRFCoordinatorRandomnessRedeemed, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseRandomnessRedeemed") - } - - var r0 *vrf_coordinator.VRFCoordinatorRandomnessRedeemed - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_coordinator.VRFCoordinatorRandomnessRedeemed, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_coordinator.VRFCoordinatorRandomnessRedeemed); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorRandomnessRedeemed) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseRandomnessRequested provides a mock function with given fields: log -func (_m *VRFCoordinatorInterface) ParseRandomnessRequested(log types.Log) (*vrf_coordinator.VRFCoordinatorRandomnessRequested, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseRandomnessRequested") - } - - var r0 *vrf_coordinator.VRFCoordinatorRandomnessRequested - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_coordinator.VRFCoordinatorRandomnessRequested, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_coordinator.VRFCoordinatorRandomnessRequested); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorRandomnessRequested) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseSubscriptionCanceled provides a mock function with given fields: log -func (_m *VRFCoordinatorInterface) ParseSubscriptionCanceled(log types.Log) (*vrf_coordinator.VRFCoordinatorSubscriptionCanceled, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseSubscriptionCanceled") - } - - var r0 *vrf_coordinator.VRFCoordinatorSubscriptionCanceled - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_coordinator.VRFCoordinatorSubscriptionCanceled, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_coordinator.VRFCoordinatorSubscriptionCanceled); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorSubscriptionCanceled) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseSubscriptionConsumerAdded provides a mock function with given fields: log -func (_m *VRFCoordinatorInterface) ParseSubscriptionConsumerAdded(log types.Log) (*vrf_coordinator.VRFCoordinatorSubscriptionConsumerAdded, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseSubscriptionConsumerAdded") - } - - var r0 *vrf_coordinator.VRFCoordinatorSubscriptionConsumerAdded - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_coordinator.VRFCoordinatorSubscriptionConsumerAdded, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_coordinator.VRFCoordinatorSubscriptionConsumerAdded); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorSubscriptionConsumerAdded) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseSubscriptionConsumerRemoved provides a mock function with given fields: log -func (_m *VRFCoordinatorInterface) ParseSubscriptionConsumerRemoved(log types.Log) (*vrf_coordinator.VRFCoordinatorSubscriptionConsumerRemoved, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseSubscriptionConsumerRemoved") - } - - var r0 *vrf_coordinator.VRFCoordinatorSubscriptionConsumerRemoved - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_coordinator.VRFCoordinatorSubscriptionConsumerRemoved, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_coordinator.VRFCoordinatorSubscriptionConsumerRemoved); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorSubscriptionConsumerRemoved) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseSubscriptionCreated provides a mock function with given fields: log -func (_m *VRFCoordinatorInterface) ParseSubscriptionCreated(log types.Log) (*vrf_coordinator.VRFCoordinatorSubscriptionCreated, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseSubscriptionCreated") - } - - var r0 *vrf_coordinator.VRFCoordinatorSubscriptionCreated - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_coordinator.VRFCoordinatorSubscriptionCreated, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_coordinator.VRFCoordinatorSubscriptionCreated); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorSubscriptionCreated) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseSubscriptionFunded provides a mock function with given fields: log -func (_m *VRFCoordinatorInterface) ParseSubscriptionFunded(log types.Log) (*vrf_coordinator.VRFCoordinatorSubscriptionFunded, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseSubscriptionFunded") - } - - var r0 *vrf_coordinator.VRFCoordinatorSubscriptionFunded - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_coordinator.VRFCoordinatorSubscriptionFunded, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_coordinator.VRFCoordinatorSubscriptionFunded); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorSubscriptionFunded) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseSubscriptionOwnerTransferRequested provides a mock function with given fields: log -func (_m *VRFCoordinatorInterface) ParseSubscriptionOwnerTransferRequested(log types.Log) (*vrf_coordinator.VRFCoordinatorSubscriptionOwnerTransferRequested, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseSubscriptionOwnerTransferRequested") - } - - var r0 *vrf_coordinator.VRFCoordinatorSubscriptionOwnerTransferRequested - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_coordinator.VRFCoordinatorSubscriptionOwnerTransferRequested, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_coordinator.VRFCoordinatorSubscriptionOwnerTransferRequested); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorSubscriptionOwnerTransferRequested) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParseSubscriptionOwnerTransferred provides a mock function with given fields: log -func (_m *VRFCoordinatorInterface) ParseSubscriptionOwnerTransferred(log types.Log) (*vrf_coordinator.VRFCoordinatorSubscriptionOwnerTransferred, error) { - ret := _m.Called(log) - - if len(ret) == 0 { - panic("no return value specified for ParseSubscriptionOwnerTransferred") - } - - var r0 *vrf_coordinator.VRFCoordinatorSubscriptionOwnerTransferred - var r1 error - if rf, ok := ret.Get(0).(func(types.Log) (*vrf_coordinator.VRFCoordinatorSubscriptionOwnerTransferred, error)); ok { - return rf(log) - } - if rf, ok := ret.Get(0).(func(types.Log) *vrf_coordinator.VRFCoordinatorSubscriptionOwnerTransferred); ok { - r0 = rf(log) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*vrf_coordinator.VRFCoordinatorSubscriptionOwnerTransferred) - } - } - - if rf, ok := ret.Get(1).(func(types.Log) error); ok { - r1 = rf(log) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ProcessVRFOutputs provides a mock function with given fields: opts, vrfOutputs, juelsPerFeeCoin, reasonableGasPrice, blockHeight -func (_m *VRFCoordinatorInterface) ProcessVRFOutputs(opts *bind.TransactOpts, vrfOutputs []vrf_coordinator.VRFBeaconTypesVRFOutput, juelsPerFeeCoin *big.Int, reasonableGasPrice uint64, blockHeight uint64) (*types.Transaction, error) { - ret := _m.Called(opts, vrfOutputs, juelsPerFeeCoin, reasonableGasPrice, blockHeight) - - if len(ret) == 0 { - panic("no return value specified for ProcessVRFOutputs") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, []vrf_coordinator.VRFBeaconTypesVRFOutput, *big.Int, uint64, uint64) (*types.Transaction, error)); ok { - return rf(opts, vrfOutputs, juelsPerFeeCoin, reasonableGasPrice, blockHeight) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, []vrf_coordinator.VRFBeaconTypesVRFOutput, *big.Int, uint64, uint64) *types.Transaction); ok { - r0 = rf(opts, vrfOutputs, juelsPerFeeCoin, reasonableGasPrice, blockHeight) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts, []vrf_coordinator.VRFBeaconTypesVRFOutput, *big.Int, uint64, uint64) error); ok { - r1 = rf(opts, vrfOutputs, juelsPerFeeCoin, reasonableGasPrice, blockHeight) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// RedeemRandomness provides a mock function with given fields: opts, subID, requestID, arg2 -func (_m *VRFCoordinatorInterface) RedeemRandomness(opts *bind.TransactOpts, subID *big.Int, requestID *big.Int, arg2 []byte) (*types.Transaction, error) { - ret := _m.Called(opts, subID, requestID, arg2) - - if len(ret) == 0 { - panic("no return value specified for RedeemRandomness") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, *big.Int, *big.Int, []byte) (*types.Transaction, error)); ok { - return rf(opts, subID, requestID, arg2) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, *big.Int, *big.Int, []byte) *types.Transaction); ok { - r0 = rf(opts, subID, requestID, arg2) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts, *big.Int, *big.Int, []byte) error); ok { - r1 = rf(opts, subID, requestID, arg2) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// RegisterMigratableCoordinator provides a mock function with given fields: opts, target -func (_m *VRFCoordinatorInterface) RegisterMigratableCoordinator(opts *bind.TransactOpts, target common.Address) (*types.Transaction, error) { - ret := _m.Called(opts, target) - - if len(ret) == 0 { - panic("no return value specified for RegisterMigratableCoordinator") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, common.Address) (*types.Transaction, error)); ok { - return rf(opts, target) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, common.Address) *types.Transaction); ok { - r0 = rf(opts, target) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts, common.Address) error); ok { - r1 = rf(opts, target) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// RemoveConsumer provides a mock function with given fields: opts, subId, consumer -func (_m *VRFCoordinatorInterface) RemoveConsumer(opts *bind.TransactOpts, subId *big.Int, consumer common.Address) (*types.Transaction, error) { - ret := _m.Called(opts, subId, consumer) - - if len(ret) == 0 { - panic("no return value specified for RemoveConsumer") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, *big.Int, common.Address) (*types.Transaction, error)); ok { - return rf(opts, subId, consumer) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, *big.Int, common.Address) *types.Transaction); ok { - r0 = rf(opts, subId, consumer) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts, *big.Int, common.Address) error); ok { - r1 = rf(opts, subId, consumer) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// RequestRandomness provides a mock function with given fields: opts, subID, numWords, confDelay, arg3 -func (_m *VRFCoordinatorInterface) RequestRandomness(opts *bind.TransactOpts, subID *big.Int, numWords uint16, confDelay *big.Int, arg3 []byte) (*types.Transaction, error) { - ret := _m.Called(opts, subID, numWords, confDelay, arg3) - - if len(ret) == 0 { - panic("no return value specified for RequestRandomness") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, *big.Int, uint16, *big.Int, []byte) (*types.Transaction, error)); ok { - return rf(opts, subID, numWords, confDelay, arg3) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, *big.Int, uint16, *big.Int, []byte) *types.Transaction); ok { - r0 = rf(opts, subID, numWords, confDelay, arg3) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts, *big.Int, uint16, *big.Int, []byte) error); ok { - r1 = rf(opts, subID, numWords, confDelay, arg3) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// RequestRandomnessFulfillment provides a mock function with given fields: opts, subID, numWords, confDelay, callbackGasLimit, arguments, arg5 -func (_m *VRFCoordinatorInterface) RequestRandomnessFulfillment(opts *bind.TransactOpts, subID *big.Int, numWords uint16, confDelay *big.Int, callbackGasLimit uint32, arguments []byte, arg5 []byte) (*types.Transaction, error) { - ret := _m.Called(opts, subID, numWords, confDelay, callbackGasLimit, arguments, arg5) - - if len(ret) == 0 { - panic("no return value specified for RequestRandomnessFulfillment") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, *big.Int, uint16, *big.Int, uint32, []byte, []byte) (*types.Transaction, error)); ok { - return rf(opts, subID, numWords, confDelay, callbackGasLimit, arguments, arg5) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, *big.Int, uint16, *big.Int, uint32, []byte, []byte) *types.Transaction); ok { - r0 = rf(opts, subID, numWords, confDelay, callbackGasLimit, arguments, arg5) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts, *big.Int, uint16, *big.Int, uint32, []byte, []byte) error); ok { - r1 = rf(opts, subID, numWords, confDelay, callbackGasLimit, arguments, arg5) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// RequestSubscriptionOwnerTransfer provides a mock function with given fields: opts, subId, newOwner -func (_m *VRFCoordinatorInterface) RequestSubscriptionOwnerTransfer(opts *bind.TransactOpts, subId *big.Int, newOwner common.Address) (*types.Transaction, error) { - ret := _m.Called(opts, subId, newOwner) - - if len(ret) == 0 { - panic("no return value specified for RequestSubscriptionOwnerTransfer") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, *big.Int, common.Address) (*types.Transaction, error)); ok { - return rf(opts, subId, newOwner) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, *big.Int, common.Address) *types.Transaction); ok { - r0 = rf(opts, subId, newOwner) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts, *big.Int, common.Address) error); ok { - r1 = rf(opts, subId, newOwner) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SCallbackConfig provides a mock function with given fields: opts -func (_m *VRFCoordinatorInterface) SCallbackConfig(opts *bind.CallOpts) (vrf_coordinator.SCallbackConfig, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for SCallbackConfig") - } - - var r0 vrf_coordinator.SCallbackConfig - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts) (vrf_coordinator.SCallbackConfig, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts) vrf_coordinator.SCallbackConfig); ok { - r0 = rf(opts) - } else { - r0 = ret.Get(0).(vrf_coordinator.SCallbackConfig) - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SCoordinatorConfig provides a mock function with given fields: opts -func (_m *VRFCoordinatorInterface) SCoordinatorConfig(opts *bind.CallOpts) (vrf_coordinator.SCoordinatorConfig, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for SCoordinatorConfig") - } - - var r0 vrf_coordinator.SCoordinatorConfig - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts) (vrf_coordinator.SCoordinatorConfig, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts) vrf_coordinator.SCoordinatorConfig); ok { - r0 = rf(opts) - } else { - r0 = ret.Get(0).(vrf_coordinator.SCoordinatorConfig) - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SPendingRequests provides a mock function with given fields: opts, arg0 -func (_m *VRFCoordinatorInterface) SPendingRequests(opts *bind.CallOpts, arg0 *big.Int) (vrf_coordinator.SPendingRequests, error) { - ret := _m.Called(opts, arg0) - - if len(ret) == 0 { - panic("no return value specified for SPendingRequests") - } - - var r0 vrf_coordinator.SPendingRequests - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts, *big.Int) (vrf_coordinator.SPendingRequests, error)); ok { - return rf(opts, arg0) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts, *big.Int) vrf_coordinator.SPendingRequests); ok { - r0 = rf(opts, arg0) - } else { - r0 = ret.Get(0).(vrf_coordinator.SPendingRequests) - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts, *big.Int) error); ok { - r1 = rf(opts, arg0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SProducer provides a mock function with given fields: opts -func (_m *VRFCoordinatorInterface) SProducer(opts *bind.CallOpts) (common.Address, error) { - ret := _m.Called(opts) - - if len(ret) == 0 { - panic("no return value specified for SProducer") - } - - var r0 common.Address - var r1 error - if rf, ok := ret.Get(0).(func(*bind.CallOpts) (common.Address, error)); ok { - return rf(opts) - } - if rf, ok := ret.Get(0).(func(*bind.CallOpts) common.Address); ok { - r0 = rf(opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(common.Address) - } - } - - if rf, ok := ret.Get(1).(func(*bind.CallOpts) error); ok { - r1 = rf(opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SetCallbackConfig provides a mock function with given fields: opts, config -func (_m *VRFCoordinatorInterface) SetCallbackConfig(opts *bind.TransactOpts, config vrf_coordinator.VRFCoordinatorCallbackConfig) (*types.Transaction, error) { - ret := _m.Called(opts, config) - - if len(ret) == 0 { - panic("no return value specified for SetCallbackConfig") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, vrf_coordinator.VRFCoordinatorCallbackConfig) (*types.Transaction, error)); ok { - return rf(opts, config) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, vrf_coordinator.VRFCoordinatorCallbackConfig) *types.Transaction); ok { - r0 = rf(opts, config) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts, vrf_coordinator.VRFCoordinatorCallbackConfig) error); ok { - r1 = rf(opts, config) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SetConfirmationDelays provides a mock function with given fields: opts, confDelays -func (_m *VRFCoordinatorInterface) SetConfirmationDelays(opts *bind.TransactOpts, confDelays [8]*big.Int) (*types.Transaction, error) { - ret := _m.Called(opts, confDelays) - - if len(ret) == 0 { - panic("no return value specified for SetConfirmationDelays") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, [8]*big.Int) (*types.Transaction, error)); ok { - return rf(opts, confDelays) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, [8]*big.Int) *types.Transaction); ok { - r0 = rf(opts, confDelays) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts, [8]*big.Int) error); ok { - r1 = rf(opts, confDelays) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SetCoordinatorConfig provides a mock function with given fields: opts, coordinatorConfig -func (_m *VRFCoordinatorInterface) SetCoordinatorConfig(opts *bind.TransactOpts, coordinatorConfig vrf_coordinator.VRFBeaconTypesCoordinatorConfig) (*types.Transaction, error) { - ret := _m.Called(opts, coordinatorConfig) - - if len(ret) == 0 { - panic("no return value specified for SetCoordinatorConfig") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, vrf_coordinator.VRFBeaconTypesCoordinatorConfig) (*types.Transaction, error)); ok { - return rf(opts, coordinatorConfig) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, vrf_coordinator.VRFBeaconTypesCoordinatorConfig) *types.Transaction); ok { - r0 = rf(opts, coordinatorConfig) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts, vrf_coordinator.VRFBeaconTypesCoordinatorConfig) error); ok { - r1 = rf(opts, coordinatorConfig) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SetPauseFlag provides a mock function with given fields: opts, pause -func (_m *VRFCoordinatorInterface) SetPauseFlag(opts *bind.TransactOpts, pause bool) (*types.Transaction, error) { - ret := _m.Called(opts, pause) - - if len(ret) == 0 { - panic("no return value specified for SetPauseFlag") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, bool) (*types.Transaction, error)); ok { - return rf(opts, pause) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, bool) *types.Transaction); ok { - r0 = rf(opts, pause) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts, bool) error); ok { - r1 = rf(opts, pause) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SetProducer provides a mock function with given fields: opts, producer -func (_m *VRFCoordinatorInterface) SetProducer(opts *bind.TransactOpts, producer common.Address) (*types.Transaction, error) { - ret := _m.Called(opts, producer) - - if len(ret) == 0 { - panic("no return value specified for SetProducer") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, common.Address) (*types.Transaction, error)); ok { - return rf(opts, producer) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, common.Address) *types.Transaction); ok { - r0 = rf(opts, producer) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts, common.Address) error); ok { - r1 = rf(opts, producer) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// TransferLink provides a mock function with given fields: opts, recipient, juelsAmount -func (_m *VRFCoordinatorInterface) TransferLink(opts *bind.TransactOpts, recipient common.Address, juelsAmount *big.Int) (*types.Transaction, error) { - ret := _m.Called(opts, recipient, juelsAmount) - - if len(ret) == 0 { - panic("no return value specified for TransferLink") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, common.Address, *big.Int) (*types.Transaction, error)); ok { - return rf(opts, recipient, juelsAmount) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, common.Address, *big.Int) *types.Transaction); ok { - r0 = rf(opts, recipient, juelsAmount) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts, common.Address, *big.Int) error); ok { - r1 = rf(opts, recipient, juelsAmount) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// TransferOwnership provides a mock function with given fields: opts, to -func (_m *VRFCoordinatorInterface) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { - ret := _m.Called(opts, to) - - if len(ret) == 0 { - panic("no return value specified for TransferOwnership") - } - - var r0 *types.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, common.Address) (*types.Transaction, error)); ok { - return rf(opts, to) - } - if rf, ok := ret.Get(0).(func(*bind.TransactOpts, common.Address) *types.Transaction); ok { - r0 = rf(opts, to) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*bind.TransactOpts, common.Address) error); ok { - r1 = rf(opts, to) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchCallbackConfigSet provides a mock function with given fields: opts, sink -func (_m *VRFCoordinatorInterface) WatchCallbackConfigSet(opts *bind.WatchOpts, sink chan<- *vrf_coordinator.VRFCoordinatorCallbackConfigSet) (event.Subscription, error) { - ret := _m.Called(opts, sink) - - if len(ret) == 0 { - panic("no return value specified for WatchCallbackConfigSet") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorCallbackConfigSet) (event.Subscription, error)); ok { - return rf(opts, sink) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorCallbackConfigSet) event.Subscription); ok { - r0 = rf(opts, sink) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorCallbackConfigSet) error); ok { - r1 = rf(opts, sink) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchCoordinatorConfigSet provides a mock function with given fields: opts, sink -func (_m *VRFCoordinatorInterface) WatchCoordinatorConfigSet(opts *bind.WatchOpts, sink chan<- *vrf_coordinator.VRFCoordinatorCoordinatorConfigSet) (event.Subscription, error) { - ret := _m.Called(opts, sink) - - if len(ret) == 0 { - panic("no return value specified for WatchCoordinatorConfigSet") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorCoordinatorConfigSet) (event.Subscription, error)); ok { - return rf(opts, sink) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorCoordinatorConfigSet) event.Subscription); ok { - r0 = rf(opts, sink) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorCoordinatorConfigSet) error); ok { - r1 = rf(opts, sink) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchCoordinatorDeregistered provides a mock function with given fields: opts, sink -func (_m *VRFCoordinatorInterface) WatchCoordinatorDeregistered(opts *bind.WatchOpts, sink chan<- *vrf_coordinator.VRFCoordinatorCoordinatorDeregistered) (event.Subscription, error) { - ret := _m.Called(opts, sink) - - if len(ret) == 0 { - panic("no return value specified for WatchCoordinatorDeregistered") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorCoordinatorDeregistered) (event.Subscription, error)); ok { - return rf(opts, sink) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorCoordinatorDeregistered) event.Subscription); ok { - r0 = rf(opts, sink) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorCoordinatorDeregistered) error); ok { - r1 = rf(opts, sink) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchCoordinatorRegistered provides a mock function with given fields: opts, sink -func (_m *VRFCoordinatorInterface) WatchCoordinatorRegistered(opts *bind.WatchOpts, sink chan<- *vrf_coordinator.VRFCoordinatorCoordinatorRegistered) (event.Subscription, error) { - ret := _m.Called(opts, sink) - - if len(ret) == 0 { - panic("no return value specified for WatchCoordinatorRegistered") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorCoordinatorRegistered) (event.Subscription, error)); ok { - return rf(opts, sink) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorCoordinatorRegistered) event.Subscription); ok { - r0 = rf(opts, sink) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorCoordinatorRegistered) error); ok { - r1 = rf(opts, sink) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchMigrationCompleted provides a mock function with given fields: opts, sink, newVersion, subID -func (_m *VRFCoordinatorInterface) WatchMigrationCompleted(opts *bind.WatchOpts, sink chan<- *vrf_coordinator.VRFCoordinatorMigrationCompleted, newVersion []uint8, subID []*big.Int) (event.Subscription, error) { - ret := _m.Called(opts, sink, newVersion, subID) - - if len(ret) == 0 { - panic("no return value specified for WatchMigrationCompleted") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorMigrationCompleted, []uint8, []*big.Int) (event.Subscription, error)); ok { - return rf(opts, sink, newVersion, subID) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorMigrationCompleted, []uint8, []*big.Int) event.Subscription); ok { - r0 = rf(opts, sink, newVersion, subID) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorMigrationCompleted, []uint8, []*big.Int) error); ok { - r1 = rf(opts, sink, newVersion, subID) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchOutputsServed provides a mock function with given fields: opts, sink -func (_m *VRFCoordinatorInterface) WatchOutputsServed(opts *bind.WatchOpts, sink chan<- *vrf_coordinator.VRFCoordinatorOutputsServed) (event.Subscription, error) { - ret := _m.Called(opts, sink) - - if len(ret) == 0 { - panic("no return value specified for WatchOutputsServed") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorOutputsServed) (event.Subscription, error)); ok { - return rf(opts, sink) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorOutputsServed) event.Subscription); ok { - r0 = rf(opts, sink) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorOutputsServed) error); ok { - r1 = rf(opts, sink) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchOwnershipTransferRequested provides a mock function with given fields: opts, sink, from, to -func (_m *VRFCoordinatorInterface) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *vrf_coordinator.VRFCoordinatorOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { - ret := _m.Called(opts, sink, from, to) - - if len(ret) == 0 { - panic("no return value specified for WatchOwnershipTransferRequested") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorOwnershipTransferRequested, []common.Address, []common.Address) (event.Subscription, error)); ok { - return rf(opts, sink, from, to) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorOwnershipTransferRequested, []common.Address, []common.Address) event.Subscription); ok { - r0 = rf(opts, sink, from, to) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorOwnershipTransferRequested, []common.Address, []common.Address) error); ok { - r1 = rf(opts, sink, from, to) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchOwnershipTransferred provides a mock function with given fields: opts, sink, from, to -func (_m *VRFCoordinatorInterface) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *vrf_coordinator.VRFCoordinatorOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { - ret := _m.Called(opts, sink, from, to) - - if len(ret) == 0 { - panic("no return value specified for WatchOwnershipTransferred") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorOwnershipTransferred, []common.Address, []common.Address) (event.Subscription, error)); ok { - return rf(opts, sink, from, to) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorOwnershipTransferred, []common.Address, []common.Address) event.Subscription); ok { - r0 = rf(opts, sink, from, to) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorOwnershipTransferred, []common.Address, []common.Address) error); ok { - r1 = rf(opts, sink, from, to) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchPauseFlagChanged provides a mock function with given fields: opts, sink -func (_m *VRFCoordinatorInterface) WatchPauseFlagChanged(opts *bind.WatchOpts, sink chan<- *vrf_coordinator.VRFCoordinatorPauseFlagChanged) (event.Subscription, error) { - ret := _m.Called(opts, sink) - - if len(ret) == 0 { - panic("no return value specified for WatchPauseFlagChanged") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorPauseFlagChanged) (event.Subscription, error)); ok { - return rf(opts, sink) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorPauseFlagChanged) event.Subscription); ok { - r0 = rf(opts, sink) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorPauseFlagChanged) error); ok { - r1 = rf(opts, sink) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchRandomWordsFulfilled provides a mock function with given fields: opts, sink -func (_m *VRFCoordinatorInterface) WatchRandomWordsFulfilled(opts *bind.WatchOpts, sink chan<- *vrf_coordinator.VRFCoordinatorRandomWordsFulfilled) (event.Subscription, error) { - ret := _m.Called(opts, sink) - - if len(ret) == 0 { - panic("no return value specified for WatchRandomWordsFulfilled") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorRandomWordsFulfilled) (event.Subscription, error)); ok { - return rf(opts, sink) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorRandomWordsFulfilled) event.Subscription); ok { - r0 = rf(opts, sink) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorRandomWordsFulfilled) error); ok { - r1 = rf(opts, sink) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchRandomnessFulfillmentRequested provides a mock function with given fields: opts, sink, requestID -func (_m *VRFCoordinatorInterface) WatchRandomnessFulfillmentRequested(opts *bind.WatchOpts, sink chan<- *vrf_coordinator.VRFCoordinatorRandomnessFulfillmentRequested, requestID []*big.Int) (event.Subscription, error) { - ret := _m.Called(opts, sink, requestID) - - if len(ret) == 0 { - panic("no return value specified for WatchRandomnessFulfillmentRequested") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorRandomnessFulfillmentRequested, []*big.Int) (event.Subscription, error)); ok { - return rf(opts, sink, requestID) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorRandomnessFulfillmentRequested, []*big.Int) event.Subscription); ok { - r0 = rf(opts, sink, requestID) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorRandomnessFulfillmentRequested, []*big.Int) error); ok { - r1 = rf(opts, sink, requestID) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchRandomnessRedeemed provides a mock function with given fields: opts, sink, requestID, requester -func (_m *VRFCoordinatorInterface) WatchRandomnessRedeemed(opts *bind.WatchOpts, sink chan<- *vrf_coordinator.VRFCoordinatorRandomnessRedeemed, requestID []*big.Int, requester []common.Address) (event.Subscription, error) { - ret := _m.Called(opts, sink, requestID, requester) - - if len(ret) == 0 { - panic("no return value specified for WatchRandomnessRedeemed") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorRandomnessRedeemed, []*big.Int, []common.Address) (event.Subscription, error)); ok { - return rf(opts, sink, requestID, requester) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorRandomnessRedeemed, []*big.Int, []common.Address) event.Subscription); ok { - r0 = rf(opts, sink, requestID, requester) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorRandomnessRedeemed, []*big.Int, []common.Address) error); ok { - r1 = rf(opts, sink, requestID, requester) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchRandomnessRequested provides a mock function with given fields: opts, sink, requestID -func (_m *VRFCoordinatorInterface) WatchRandomnessRequested(opts *bind.WatchOpts, sink chan<- *vrf_coordinator.VRFCoordinatorRandomnessRequested, requestID []*big.Int) (event.Subscription, error) { - ret := _m.Called(opts, sink, requestID) - - if len(ret) == 0 { - panic("no return value specified for WatchRandomnessRequested") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorRandomnessRequested, []*big.Int) (event.Subscription, error)); ok { - return rf(opts, sink, requestID) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorRandomnessRequested, []*big.Int) event.Subscription); ok { - r0 = rf(opts, sink, requestID) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorRandomnessRequested, []*big.Int) error); ok { - r1 = rf(opts, sink, requestID) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchSubscriptionCanceled provides a mock function with given fields: opts, sink, subId -func (_m *VRFCoordinatorInterface) WatchSubscriptionCanceled(opts *bind.WatchOpts, sink chan<- *vrf_coordinator.VRFCoordinatorSubscriptionCanceled, subId []*big.Int) (event.Subscription, error) { - ret := _m.Called(opts, sink, subId) - - if len(ret) == 0 { - panic("no return value specified for WatchSubscriptionCanceled") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorSubscriptionCanceled, []*big.Int) (event.Subscription, error)); ok { - return rf(opts, sink, subId) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorSubscriptionCanceled, []*big.Int) event.Subscription); ok { - r0 = rf(opts, sink, subId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorSubscriptionCanceled, []*big.Int) error); ok { - r1 = rf(opts, sink, subId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchSubscriptionConsumerAdded provides a mock function with given fields: opts, sink, subId -func (_m *VRFCoordinatorInterface) WatchSubscriptionConsumerAdded(opts *bind.WatchOpts, sink chan<- *vrf_coordinator.VRFCoordinatorSubscriptionConsumerAdded, subId []*big.Int) (event.Subscription, error) { - ret := _m.Called(opts, sink, subId) - - if len(ret) == 0 { - panic("no return value specified for WatchSubscriptionConsumerAdded") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorSubscriptionConsumerAdded, []*big.Int) (event.Subscription, error)); ok { - return rf(opts, sink, subId) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorSubscriptionConsumerAdded, []*big.Int) event.Subscription); ok { - r0 = rf(opts, sink, subId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorSubscriptionConsumerAdded, []*big.Int) error); ok { - r1 = rf(opts, sink, subId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchSubscriptionConsumerRemoved provides a mock function with given fields: opts, sink, subId -func (_m *VRFCoordinatorInterface) WatchSubscriptionConsumerRemoved(opts *bind.WatchOpts, sink chan<- *vrf_coordinator.VRFCoordinatorSubscriptionConsumerRemoved, subId []*big.Int) (event.Subscription, error) { - ret := _m.Called(opts, sink, subId) - - if len(ret) == 0 { - panic("no return value specified for WatchSubscriptionConsumerRemoved") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorSubscriptionConsumerRemoved, []*big.Int) (event.Subscription, error)); ok { - return rf(opts, sink, subId) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorSubscriptionConsumerRemoved, []*big.Int) event.Subscription); ok { - r0 = rf(opts, sink, subId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorSubscriptionConsumerRemoved, []*big.Int) error); ok { - r1 = rf(opts, sink, subId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchSubscriptionCreated provides a mock function with given fields: opts, sink, subId, owner -func (_m *VRFCoordinatorInterface) WatchSubscriptionCreated(opts *bind.WatchOpts, sink chan<- *vrf_coordinator.VRFCoordinatorSubscriptionCreated, subId []*big.Int, owner []common.Address) (event.Subscription, error) { - ret := _m.Called(opts, sink, subId, owner) - - if len(ret) == 0 { - panic("no return value specified for WatchSubscriptionCreated") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorSubscriptionCreated, []*big.Int, []common.Address) (event.Subscription, error)); ok { - return rf(opts, sink, subId, owner) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorSubscriptionCreated, []*big.Int, []common.Address) event.Subscription); ok { - r0 = rf(opts, sink, subId, owner) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorSubscriptionCreated, []*big.Int, []common.Address) error); ok { - r1 = rf(opts, sink, subId, owner) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchSubscriptionFunded provides a mock function with given fields: opts, sink, subId -func (_m *VRFCoordinatorInterface) WatchSubscriptionFunded(opts *bind.WatchOpts, sink chan<- *vrf_coordinator.VRFCoordinatorSubscriptionFunded, subId []*big.Int) (event.Subscription, error) { - ret := _m.Called(opts, sink, subId) - - if len(ret) == 0 { - panic("no return value specified for WatchSubscriptionFunded") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorSubscriptionFunded, []*big.Int) (event.Subscription, error)); ok { - return rf(opts, sink, subId) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorSubscriptionFunded, []*big.Int) event.Subscription); ok { - r0 = rf(opts, sink, subId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorSubscriptionFunded, []*big.Int) error); ok { - r1 = rf(opts, sink, subId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchSubscriptionOwnerTransferRequested provides a mock function with given fields: opts, sink, subId -func (_m *VRFCoordinatorInterface) WatchSubscriptionOwnerTransferRequested(opts *bind.WatchOpts, sink chan<- *vrf_coordinator.VRFCoordinatorSubscriptionOwnerTransferRequested, subId []*big.Int) (event.Subscription, error) { - ret := _m.Called(opts, sink, subId) - - if len(ret) == 0 { - panic("no return value specified for WatchSubscriptionOwnerTransferRequested") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorSubscriptionOwnerTransferRequested, []*big.Int) (event.Subscription, error)); ok { - return rf(opts, sink, subId) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorSubscriptionOwnerTransferRequested, []*big.Int) event.Subscription); ok { - r0 = rf(opts, sink, subId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorSubscriptionOwnerTransferRequested, []*big.Int) error); ok { - r1 = rf(opts, sink, subId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WatchSubscriptionOwnerTransferred provides a mock function with given fields: opts, sink, subId -func (_m *VRFCoordinatorInterface) WatchSubscriptionOwnerTransferred(opts *bind.WatchOpts, sink chan<- *vrf_coordinator.VRFCoordinatorSubscriptionOwnerTransferred, subId []*big.Int) (event.Subscription, error) { - ret := _m.Called(opts, sink, subId) - - if len(ret) == 0 { - panic("no return value specified for WatchSubscriptionOwnerTransferred") - } - - var r0 event.Subscription - var r1 error - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorSubscriptionOwnerTransferred, []*big.Int) (event.Subscription, error)); ok { - return rf(opts, sink, subId) - } - if rf, ok := ret.Get(0).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorSubscriptionOwnerTransferred, []*big.Int) event.Subscription); ok { - r0 = rf(opts, sink, subId) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - if rf, ok := ret.Get(1).(func(*bind.WatchOpts, chan<- *vrf_coordinator.VRFCoordinatorSubscriptionOwnerTransferred, []*big.Int) error); ok { - r1 = rf(opts, sink, subId) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NewVRFCoordinatorInterface creates a new instance of VRFCoordinatorInterface. 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 NewVRFCoordinatorInterface(t interface { - mock.TestingT - Cleanup(func()) -}) *VRFCoordinatorInterface { - mock := &VRFCoordinatorInterface{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/services/ocr2/plugins/ocr2vrf/coordinator/ocr_cache.go b/core/services/ocr2/plugins/ocr2vrf/coordinator/ocr_cache.go deleted file mode 100644 index 0dab659258e..00000000000 --- a/core/services/ocr2/plugins/ocr2vrf/coordinator/ocr_cache.go +++ /dev/null @@ -1,121 +0,0 @@ -package coordinator - -import ( - "runtime" - "sync" - "time" - - "github.com/ethereum/go-ethereum/common" -) - -// ocrCache is a caching strucuture that allows items to be stored and then evicted -// based on an eviction window. In this package, it is being used to track in-flight -// items the coordinator includes in OCR reports, such that the items can be checked against -// the cache to avoid double-transmissions. -type ocrCache[T any] struct { - evictionWindow time.Duration - cacheMu sync.Mutex - cache map[common.Hash]*cacheItem[T] - cleaner *intervalCacheCleaner[T] -} - -type cacheItem[T any] struct { - item T - itemKey common.Hash - timeStored time.Time -} - -// NewBlockCache constructs a new cache. -func NewBlockCache[T any](evictionWindow time.Duration) *ocrCache[T] { - // Construct cache cleaner to evict old items. - cleaner := &intervalCacheCleaner[T]{ - interval: evictionWindow, - stop: make(chan struct{}, 1), - } - - // Instantiate the cache for type T. - cache := &ocrCache[T]{ - cacheMu: sync.Mutex{}, - cache: make(map[common.Hash]*cacheItem[T]), - evictionWindow: evictionWindow, - cleaner: cleaner, - } - - // Stop the cleaner upon garbage collection of the cache. - runtime.SetFinalizer(cache, func(b *ocrCache[T]) { b.cleaner.stop <- struct{}{} }) - - return cache -} - -// AddItem adds an item to the cache. -func (l *ocrCache[T]) CacheItem(item T, itemKey common.Hash, timeStored time.Time) { - // Construct new item to be stored. - newItem := &cacheItem[T]{ - item: item, - itemKey: itemKey, - timeStored: timeStored, - } - - // Lock, and defer unlock. - l.cacheMu.Lock() - defer l.cacheMu.Unlock() - - // Assign item to key. - l.cache[itemKey] = newItem -} - -func (l *ocrCache[T]) SetEvictonWindow(newWindow time.Duration) { - l.evictionWindow = newWindow -} - -// AddItem adds an item to the cache. -func (l *ocrCache[T]) GetItem(itemKey common.Hash) (item *T) { - // Lock, and defer unlock. - l.cacheMu.Lock() - defer l.cacheMu.Unlock() - - // Construct new item to be stored. - cacheItem := l.cache[itemKey] - - // Return nil if the item is not found, otherwise return item. - if cacheItem == nil { - return - } - - return &cacheItem.item -} - -// EvictExpiredItems removes all expired items stored in the cache. -func (l *ocrCache[T]) EvictExpiredItems(currentTime time.Time) { - // Lock, and defer unlock. - l.cacheMu.Lock() - defer l.cacheMu.Unlock() - - // Iteratively check all item ages, and delete an item if it is expired. - for key, item := range l.cache { - diff := currentTime.Sub(item.timeStored) - if diff > l.evictionWindow { - delete(l.cache, key) - } - } -} - -// A cache cleaner that evicts items on a regular interval. -type intervalCacheCleaner[T any] struct { - interval time.Duration - stop chan struct{} -} - -// Run evicts expired items every n seconds, until the "stop" channel is triggered. -func (ic *intervalCacheCleaner[T]) Run(c *ocrCache[T]) { - ticker := time.NewTicker(ic.interval) - for { - select { - case <-ticker.C: - c.EvictExpiredItems(time.Now().UTC()) - case <-ic.stop: - ticker.Stop() - return - } - } -} diff --git a/core/services/ocr2/plugins/ocr2vrf/coordinator/ocr_cache_test.go b/core/services/ocr2/plugins/ocr2vrf/coordinator/ocr_cache_test.go deleted file mode 100644 index b4be43420b4..00000000000 --- a/core/services/ocr2/plugins/ocr2vrf/coordinator/ocr_cache_test.go +++ /dev/null @@ -1,163 +0,0 @@ -package coordinator - -import ( - "testing" - "time" - - "github.com/ethereum/go-ethereum/common" - "github.com/stretchr/testify/assert" -) - -func TestNewCache(t *testing.T) { - b := NewBlockCache[int](time.Second) - - assert.Equal(t, time.Second, b.evictionWindow, "must set correct blockEvictionWindow") -} - -func TestCache(t *testing.T) { - t.Run("Happy path, no overwrites.", func(t *testing.T) { - now := time.Now().UTC() - - tests := []struct { - Key common.Hash - Value int - }{ - {Key: common.HexToHash("0x0"), Value: 1}, - {Key: common.HexToHash("0x1"), Value: 2}, - {Key: common.HexToHash("0x2"), Value: 3}, - {Key: common.HexToHash("0x3"), Value: 4}, - {Key: common.HexToHash("0x4"), Value: 5}, - } - - c := NewBlockCache[int](100 * time.Second) - - // Populate cache with ordered items. - for i, test := range tests { - c.CacheItem(test.Value, test.Key, getSecondsAfterNow(now, i)) - item := c.GetItem(test.Key) - assert.Equal(t, test.Value, *item) - } - - // Ensure cache has 5 items, with the newest and oldest pointers correct. - assert.Equal(t, 5, len(c.cache), "cache should contain 5 keys") - - // Evict all items. - evictionTime := getSecondsAfterNow(now, 105) - c.EvictExpiredItems(evictionTime) - assert.Equal(t, 0, len(c.cache), "cache should contain 0 keys") - - // Cache a new item. - c.CacheItem(tests[0].Value, tests[0].Key, getSecondsAfterNow(now, 10)) - item := c.GetItem(tests[0].Key) - assert.Equal(t, tests[0].Value, *item) - - // Attempting a new eviction should have no effect. - c.EvictExpiredItems(evictionTime) - assert.Equal(t, 1, len(c.cache), "cache should contain 1 key") - - // Reduce eviction window. - c.SetEvictonWindow(time.Second * 50) - - // Attempting a new eviction will remove the added item. - c.EvictExpiredItems(evictionTime) - assert.Equal(t, 0, len(c.cache), "cache should contain 0 keys") - }) - - t.Run("Happy path, override middle item.", func(t *testing.T) { - now := time.Now().UTC() - - tests := []struct { - Key common.Hash - Value int - }{ - {Key: common.HexToHash("0x0"), Value: 1}, - {Key: common.HexToHash("0x1"), Value: 2}, - {Key: common.HexToHash("0x2"), Value: 3}, - {Key: common.HexToHash("0x3"), Value: 4}, - {Key: common.HexToHash("0x1"), Value: 5}, - } - - c := NewBlockCache[int](100 * time.Second) - - // Populate cache with items. - for i, test := range tests { - c.CacheItem(test.Value, test.Key, getSecondsAfterNow(now, i)) - item := c.GetItem(test.Key) - assert.Equal(t, test.Value, *item) - } - - // Ensure cache has 4 items, with the newest and oldest pointers correct. - assert.Equal(t, 4, len(c.cache), "cache should contain 4 keys") - - // Evict all but two items. - c.EvictExpiredItems(getSecondsAfterNow(now, 103)) - assert.Equal(t, 2, len(c.cache), "cache should contain 2 keys") - - // Evict all but one items. - c.EvictExpiredItems(getSecondsAfterNow(now, 104)) - assert.Equal(t, 1, len(c.cache), "cache should contain 1 keys") - - // Evict remaining item. - c.EvictExpiredItems(getSecondsAfterNow(now, 105)) - assert.Equal(t, 0, len(c.cache), "cache should contain 0 keys") - }) - - t.Run("Happy path, override last item.", func(t *testing.T) { - now := time.Now().UTC() - - tests := []struct { - Key common.Hash - Value int - }{ - {Key: common.HexToHash("0x0"), Value: 1}, - {Key: common.HexToHash("0x1"), Value: 2}, - {Key: common.HexToHash("0x2"), Value: 3}, - {Key: common.HexToHash("0x3"), Value: 4}, - {Key: common.HexToHash("0x0"), Value: 5}, - } - - c := NewBlockCache[int](100 * time.Second) - - // Populate cache with items. - for i, test := range tests { - c.CacheItem(test.Value, test.Key, getSecondsAfterNow(now, i)) - item := c.GetItem(test.Key) - assert.Equal(t, test.Value, *item) - } - - // Ensure cache has 4 items, with the newest and oldest pointers correct. - assert.Equal(t, 4, len(c.cache), "cache should contain 4 keys") - - // Evict all but one item. - c.EvictExpiredItems(getSecondsAfterNow(now, 104)) - assert.Equal(t, 1, len(c.cache), "cache should contain 1 keys") - - // Cache a new item. - c.CacheItem(tests[1].Value, tests[1].Key, getSecondsAfterNow(now, 110)) - item := c.GetItem(tests[1].Key) - assert.Equal(t, tests[1].Value, *item) - - // Assert correct length. - assert.Equal(t, 2, len(c.cache), "cache should contain 2 keys") - - // Replace the oldest item. - c.CacheItem(tests[0].Value, tests[0].Key, getSecondsAfterNow(now, 111)) - item = c.GetItem(tests[0].Key) - assert.Equal(t, tests[0].Value, *item) - - // Assert correct length. - assert.Equal(t, 2, len(c.cache), "cache should contain 2 keys") - - // Replace the newest item. - c.CacheItem(tests[0].Value, tests[0].Key, getSecondsAfterNow(now, 112)) - item = c.GetItem(tests[0].Key) - assert.Equal(t, tests[0].Value, *item) - - // Assert correct length. - assert.Equal(t, 2, len(c.cache), "cache should contain 2 keys") - }) -} - -func getSecondsAfterNow(now time.Time, i int) time.Time { - return now.Add(time.Duration(i) * time.Second) -} diff --git a/core/services/ocr2/plugins/ocr2vrf/coordinator/router.go b/core/services/ocr2/plugins/ocr2vrf/coordinator/router.go deleted file mode 100644 index 77384a085ab..00000000000 --- a/core/services/ocr2/plugins/ocr2vrf/coordinator/router.go +++ /dev/null @@ -1,82 +0,0 @@ -package coordinator - -import ( - "math/big" - - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/pkg/errors" - - evmclient "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/vrf_beacon" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/vrf_coordinator" - "github.com/smartcontractkit/chainlink/v2/core/logger" -) - -var _ VRFBeaconCoordinator = &vrfRouter{} - -// VRFProxy routes requests to VRFBeacon and VRFCoordinator go wrappers and implements VRFBeaconCoordinator interface -type vrfRouter struct { - lggr logger.Logger - beacon vrf_beacon.VRFBeaconInterface - coordinator vrf_coordinator.VRFCoordinatorInterface -} - -func newRouter( - lggr logger.Logger, - beaconAddress common.Address, - coordinatorAddress common.Address, - client evmclient.Client, -) (VRFBeaconCoordinator, error) { - beacon, err := vrf_beacon.NewVRFBeacon(beaconAddress, client) - if err != nil { - return nil, errors.Wrap(err, "beacon wrapper creation") - } - coordinator, err := vrf_coordinator.NewVRFCoordinator(coordinatorAddress, client) - if err != nil { - return nil, errors.Wrap(err, "coordinator wrapper creation") - } - return &vrfRouter{ - lggr: lggr, - beacon: beacon, - coordinator: coordinator, - }, nil -} - -// SProvingKeyHash retrieves the proving key hash from the on-chain contract. -// Calls VRF beacon wrapper to retrieve proving key hash -func (v *vrfRouter) SProvingKeyHash(opts *bind.CallOpts) ([32]byte, error) { - return v.beacon.SProvingKeyHash(opts) -} - -// SKeyID retrieves the keyID from the on-chain contract. -// Calls VRF beacon wrapper to retrieve key ID -func (v *vrfRouter) SKeyID(opts *bind.CallOpts) ([32]byte, error) { - return v.beacon.SKeyID(opts) -} - -// IBeaconPeriodBlocks retrieves the beacon period in blocks from the on-chain contract. -// Calls VRF coordinator wrapper to beacon period blocks -func (v *vrfRouter) IBeaconPeriodBlocks(opts *bind.CallOpts) (*big.Int, error) { - return v.coordinator.IBeaconPeriodBlocks(opts) -} - -// ParseLog parses the raw log data and topics into a go object. -// The returned object must be casted to the expected type. -// Calls either VRF beacon wrapper or VRF coordinator wrapper depending on the addresses of the log -func (v *vrfRouter) ParseLog(log types.Log) (generated.AbigenLog, error) { - if log.Address == v.beacon.Address() { - return v.beacon.ParseLog(log) - } else if log.Address == v.coordinator.Address() { - return v.coordinator.ParseLog(log) - } - return nil, errors.Errorf("failed to parse log. contractAddress: %x logs: %x", log.Address, log.Topics) -} - -// GetConfirmationDelays retrieves confirmation delays from the on-chain contract. -// Calls VRF coordinator to retrieve confirmation delays -func (v *vrfRouter) GetConfirmationDelays(opts *bind.CallOpts) ([8]*big.Int, error) { - return v.coordinator.GetConfirmationDelays(opts) -} diff --git a/core/services/ocr2/plugins/ocr2vrf/coordinator/router_test.go b/core/services/ocr2/plugins/ocr2vrf/coordinator/router_test.go deleted file mode 100644 index 7135fa862e3..00000000000 --- a/core/services/ocr2/plugins/ocr2vrf/coordinator/router_test.go +++ /dev/null @@ -1,130 +0,0 @@ -package coordinator - -import ( - "math/big" - "testing" - - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/core/types" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/vrf_beacon" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/vrf_coordinator" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2vrf/coordinator/mocks" -) - -var nilOpts *bind.CallOpts - -func TestRouter_SProvingKeyHash(t *testing.T) { - beacon := mocks.NewVRFBeaconInterface(t) - keyHash := [32]byte{1} - router := vrfRouter{ - beacon: beacon, - } - beacon.On("SProvingKeyHash", mock.Anything).Return(keyHash, nil).Once() - - result, err := router.SProvingKeyHash(nilOpts) - assert.NoError(t, err) - assert.Equal(t, keyHash, result) -} - -func TestRouter_SKeyID(t *testing.T) { - beacon := mocks.NewVRFBeaconInterface(t) - keyID := [32]byte{2} - router := vrfRouter{ - beacon: beacon, - } - beacon.On("SKeyID", mock.Anything).Return(keyID, nil).Once() - - result, err := router.SKeyID(nilOpts) - assert.NoError(t, err) - assert.Equal(t, keyID, result) -} - -func TestRouter_IBeaconPeriodBlocks(t *testing.T) { - coordinator := mocks.NewVRFCoordinatorInterface(t) - periodBlocks := big.NewInt(3) - router := vrfRouter{ - coordinator: coordinator, - } - coordinator.On("IBeaconPeriodBlocks", mock.Anything).Return(periodBlocks, nil).Once() - - result, err := router.IBeaconPeriodBlocks(nilOpts) - assert.NoError(t, err) - assert.Equal(t, periodBlocks, result) -} - -func TestRouter_GetConfirmationDelays(t *testing.T) { - coordinator := mocks.NewVRFCoordinatorInterface(t) - confDelays := [8]*big.Int{big.NewInt(4)} - router := vrfRouter{ - coordinator: coordinator, - } - coordinator.On("GetConfirmationDelays", mock.Anything).Return(confDelays, nil).Once() - - result, err := router.GetConfirmationDelays(nilOpts) - assert.NoError(t, err) - assert.Equal(t, confDelays, result) -} - -func TestRouter_ParseLog(t *testing.T) { - t.Parallel() - - t.Run("parse beacon log", func(t *testing.T) { - addr := newAddress(t) - log := types.Log{ - Address: addr, - } - parsedLog := vrf_beacon.VRFBeaconNewTransmission{} - beacon := mocks.NewVRFBeaconInterface(t) - router := vrfRouter{ - beacon: beacon, - } - beacon.On("Address").Return(addr).Once() - beacon.On("ParseLog", log).Return(parsedLog, nil).Once() - - result, err := router.ParseLog(log) - assert.NoError(t, err) - assert.Equal(t, result, parsedLog) - }) - - t.Run("parse coordinator log", func(t *testing.T) { - addr := newAddress(t) - log := types.Log{ - Address: addr, - } - parsedLog := vrf_coordinator.VRFCoordinatorRandomnessRequested{} - beacon := mocks.NewVRFBeaconInterface(t) - coordinator := mocks.NewVRFCoordinatorInterface(t) - router := vrfRouter{ - beacon: beacon, - coordinator: coordinator, - } - beacon.On("Address").Return(newAddress(t)).Once() - coordinator.On("Address").Return(addr).Once() - coordinator.On("ParseLog", log).Return(parsedLog, nil).Once() - - result, err := router.ParseLog(log) - assert.NoError(t, err) - assert.Equal(t, result, parsedLog) - }) - - t.Run("parse log unexpected log", func(t *testing.T) { - log := types.Log{ - Address: newAddress(t), - } - beacon := mocks.NewVRFBeaconInterface(t) - coordinator := mocks.NewVRFCoordinatorInterface(t) - router := vrfRouter{ - beacon: beacon, - coordinator: coordinator, - } - beacon.On("Address").Return(newAddress(t)).Once() - coordinator.On("Address").Return(newAddress(t)).Once() - - result, err := router.ParseLog(log) - assert.Nil(t, result) - assert.Contains(t, err.Error(), "failed to parse log") - }) -} diff --git a/core/services/ocr2/plugins/ocr2vrf/coordinator/topics.go b/core/services/ocr2/plugins/ocr2vrf/coordinator/topics.go deleted file mode 100644 index 370f0c5fd00..00000000000 --- a/core/services/ocr2/plugins/ocr2vrf/coordinator/topics.go +++ /dev/null @@ -1,28 +0,0 @@ -package coordinator - -import ( - "github.com/ethereum/go-ethereum/common" - - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/vrf_beacon" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/vrf_coordinator" -) - -type topics struct { - randomnessRequestedTopic common.Hash - randomnessFulfillmentRequestedTopic common.Hash - randomWordsFulfilledTopic common.Hash - configSetTopic common.Hash - newTransmissionTopic common.Hash - outputsServedTopic common.Hash -} - -func newTopics() topics { - return topics{ - randomnessRequestedTopic: vrf_coordinator.VRFCoordinatorRandomnessRequested{}.Topic(), - randomnessFulfillmentRequestedTopic: vrf_coordinator.VRFCoordinatorRandomnessFulfillmentRequested{}.Topic(), - randomWordsFulfilledTopic: vrf_coordinator.VRFCoordinatorRandomWordsFulfilled{}.Topic(), - configSetTopic: vrf_beacon.VRFBeaconConfigSet{}.Topic(), - newTransmissionTopic: vrf_beacon.VRFBeaconNewTransmission{}.Topic(), - outputsServedTopic: vrf_coordinator.VRFCoordinatorOutputsServed{}.Topic(), - } -} diff --git a/core/services/ocr2/plugins/ocr2vrf/internal/ocr2vrf_integration_test.go b/core/services/ocr2/plugins/ocr2vrf/internal/ocr2vrf_integration_test.go deleted file mode 100644 index 8087591a123..00000000000 --- a/core/services/ocr2/plugins/ocr2vrf/internal/ocr2vrf_integration_test.go +++ /dev/null @@ -1,883 +0,0 @@ -package internal_test - -import ( - "crypto/rand" - "encoding/hex" - "errors" - "fmt" - "math/big" - "testing" - "time" - - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/accounts/abi/bind/backends" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/eth/ethconfig" - "github.com/hashicorp/consul/sdk/freeport" - "github.com/onsi/gomega" - "github.com/stretchr/testify/require" - "go.dedis.ch/kyber/v3" - - "github.com/smartcontractkit/libocr/commontypes" - confighelper2 "github.com/smartcontractkit/libocr/offchainreporting2plus/confighelper" - ocrtypes2 "github.com/smartcontractkit/libocr/offchainreporting2plus/types" - - "github.com/smartcontractkit/chainlink-vrf/altbn_128" - ocr2dkg "github.com/smartcontractkit/chainlink-vrf/dkg" - "github.com/smartcontractkit/chainlink-vrf/ocr2vrf" - ocr2vrftypes "github.com/smartcontractkit/chainlink-vrf/types" - - commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" - commonutils "github.com/smartcontractkit/chainlink-common/pkg/utils" - "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" - "github.com/smartcontractkit/chainlink/v2/core/chains/evm/forwarders" - "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/authorized_forwarder" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/link_token_interface" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/mock_v3_aggregator_contract" - dkg_wrapper "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/dkg" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/load_test_beacon_consumer" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/vrf_beacon" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/vrf_beacon_consumer" - vrf_wrapper "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/vrf_coordinator" - "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/dkgencryptkey" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/dkgsignkey" - "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/ocr2key" - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/validate" - "github.com/smartcontractkit/chainlink/v2/core/services/ocrbootstrap" -) - -type ocr2vrfUniverse struct { - owner *bind.TransactOpts - backend *backends.SimulatedBackend - - dkgAddress common.Address - dkg *dkg_wrapper.DKG - - beaconAddress common.Address - coordinatorAddress common.Address - beacon *vrf_beacon.VRFBeacon - coordinator *vrf_wrapper.VRFCoordinator - - linkAddress common.Address - link *link_token_interface.LinkToken - - consumerAddress common.Address - consumer *vrf_beacon_consumer.BeaconVRFConsumer - - loadTestConsumerAddress common.Address - loadTestConsumer *load_test_beacon_consumer.LoadTestBeaconVRFConsumer - - feedAddress common.Address - feed *mock_v3_aggregator_contract.MockV3AggregatorContract - - subID *big.Int -} - -const ( - fundingAmount int64 = 5e18 -) - -type ocr2Node struct { - app *cltest.TestApplication - peerID string - transmitter common.Address - effectiveTransmitter common.Address - keybundle ocr2key.KeyBundle - sendingKeys []string -} - -func setupOCR2VRFContracts( - t *testing.T, beaconPeriod int64, keyID [32]byte, consumerShouldFail bool) ocr2vrfUniverse { - owner := testutils.MustNewSimTransactor(t) - owner.GasPrice = assets.GWei(1).ToInt() - genesisData := core.GenesisAlloc{ - owner.From: { - Balance: assets.Ether(100).ToInt(), - }, - } - b := backends.NewSimulatedBackend(genesisData, ethconfig.Defaults.Miner.GasCeil*2) - - // deploy OCR2VRF contracts, which have the following deploy order: - // * link token - // * link/eth feed - // * DKG - // * VRF (coordinator, and beacon) - // * VRF consumer - linkAddress, _, link, err := link_token_interface.DeployLinkToken( - owner, b) - require.NoError(t, err) - b.Commit() - - feedAddress, _, feed, err := mock_v3_aggregator_contract.DeployMockV3AggregatorContract( - owner, b, 18, assets.GWei(int(1e7)).ToInt()) // 0.01 eth per link - require.NoError(t, err) - b.Commit() - - dkgAddress, _, dkg, err := dkg_wrapper.DeployDKG(owner, b) - require.NoError(t, err) - b.Commit() - - coordinatorAddress, _, coordinator, err := vrf_wrapper.DeployVRFCoordinator( - owner, b, big.NewInt(beaconPeriod), linkAddress) - require.NoError(t, err) - b.Commit() - - require.NoError(t, commonutils.JustError(coordinator.SetCallbackConfig(owner, vrf_wrapper.VRFCoordinatorCallbackConfig{ - MaxCallbackGasLimit: 2.5e6, - MaxCallbackArgumentsLength: 160, // 5 EVM words - }))) - b.Commit() - - require.NoError(t, commonutils.JustError(coordinator.SetCoordinatorConfig(owner, vrf_wrapper.VRFBeaconTypesCoordinatorConfig{ - RedeemableRequestGasOverhead: 50_000, - CallbackRequestGasOverhead: 50_000, - StalenessSeconds: 60, - FallbackWeiPerUnitLink: assets.GWei(int(1e7)).ToInt(), - }))) - b.Commit() - - beaconAddress, _, beacon, err := vrf_beacon.DeployVRFBeacon( - owner, b, linkAddress, coordinatorAddress, dkgAddress, keyID) - require.NoError(t, err) - b.Commit() - - consumerAddress, _, consumer, err := vrf_beacon_consumer.DeployBeaconVRFConsumer( - owner, b, coordinatorAddress, consumerShouldFail, big.NewInt(beaconPeriod)) - require.NoError(t, err) - b.Commit() - - loadTestConsumerAddress, _, loadTestConsumer, err := load_test_beacon_consumer.DeployLoadTestBeaconVRFConsumer( - owner, b, coordinatorAddress, consumerShouldFail, big.NewInt(beaconPeriod)) - require.NoError(t, err) - b.Commit() - - // Set up coordinator subscription for billing. - require.NoError(t, commonutils.JustError(coordinator.CreateSubscription(owner))) - b.Commit() - - fopts := &bind.FilterOpts{} - - subscriptionIterator, err := coordinator.FilterSubscriptionCreated(fopts, nil, []common.Address{owner.From}) - require.NoError(t, err) - - require.True(t, subscriptionIterator.Next()) - subID := subscriptionIterator.Event.SubId - - require.NoError(t, commonutils.JustError(coordinator.AddConsumer(owner, subID, consumerAddress))) - b.Commit() - require.NoError(t, commonutils.JustError(coordinator.AddConsumer(owner, subID, loadTestConsumerAddress))) - b.Commit() - data, err := utils.ABIEncode(`[{"type":"uint256"}]`, subID) - require.NoError(t, err) - require.NoError(t, commonutils.JustError(link.TransferAndCall(owner, coordinatorAddress, big.NewInt(5e18), data))) - b.Commit() - - _, err = dkg.AddClient(owner, keyID, beaconAddress) - require.NoError(t, err) - b.Commit() - - _, err = coordinator.SetProducer(owner, beaconAddress) - require.NoError(t, err) - - // Achieve finality depth so the CL node can work properly. - for i := 0; i < 20; i++ { - b.Commit() - } - - return ocr2vrfUniverse{ - owner: owner, - backend: b, - dkgAddress: dkgAddress, - dkg: dkg, - beaconAddress: beaconAddress, - coordinatorAddress: coordinatorAddress, - beacon: beacon, - coordinator: coordinator, - linkAddress: linkAddress, - link: link, - consumerAddress: consumerAddress, - consumer: consumer, - loadTestConsumerAddress: loadTestConsumerAddress, - loadTestConsumer: loadTestConsumer, - feedAddress: feedAddress, - feed: feed, - subID: subID, - } -} - -func setupNodeOCR2( - t *testing.T, - owner *bind.TransactOpts, - port int, - dbName string, - b *backends.SimulatedBackend, - useForwarders bool, - p2pV2Bootstrappers []commontypes.BootstrapperLocator, -) *ocr2Node { - ctx := testutils.Context(t) - p2pKey := keystest.NewP2PKeyV2(t) - config, _ := heavyweight.FullTestDBV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { - c.Insecure.OCRDevelopmentMode = ptr(true) // Disables ocr spec validation so we can have fast polling for the test. - - c.Feature.LogPoller = ptr(true) - - c.P2P.PeerID = ptr(p2pKey.PeerID()) - c.P2P.V2.Enabled = ptr(true) - c.P2P.V2.DeltaDial = commonconfig.MustNewDuration(500 * time.Millisecond) - c.P2P.V2.DeltaReconcile = commonconfig.MustNewDuration(5 * time.Second) - c.P2P.V2.ListenAddresses = &[]string{fmt.Sprintf("127.0.0.1:%d", port)} - if len(p2pV2Bootstrappers) > 0 { - c.P2P.V2.DefaultBootstrappers = &p2pV2Bootstrappers - } - - c.OCR.Enabled = ptr(false) - c.OCR2.Enabled = ptr(true) - - c.EVM[0].LogPollInterval = commonconfig.MustNewDuration(500 * time.Millisecond) - c.EVM[0].GasEstimator.LimitDefault = ptr[uint64](3_500_000) - c.EVM[0].Transactions.ForwardersEnabled = &useForwarders - c.OCR2.ContractPollInterval = commonconfig.MustNewDuration(10 * time.Second) - }) - - app := cltest.NewApplicationWithConfigV2AndKeyOnSimulatedBlockchain(t, config, b, p2pKey) - - var sendingKeys []ethkey.KeyV2 - { - var err error - sendingKeys, err = app.KeyStore.Eth().EnabledKeysForChain(ctx, testutils.SimulatedChainID) - require.NoError(t, err) - require.Len(t, sendingKeys, 1) - } - transmitter := sendingKeys[0].Address - effectiveTransmitter := sendingKeys[0].Address - - if useForwarders { - sendingKeysAddresses := []common.Address{sendingKeys[0].Address} - - // Add new sending key. - k, err := app.KeyStore.Eth().Create(ctx) - require.NoError(t, err) - require.NoError(t, app.KeyStore.Eth().Add(ctx, k.Address, testutils.SimulatedChainID)) - require.NoError(t, app.KeyStore.Eth().Enable(ctx, k.Address, testutils.SimulatedChainID)) - sendingKeys = append(sendingKeys, k) - sendingKeysAddresses = append(sendingKeysAddresses, k.Address) - - require.Len(t, sendingKeys, 2) - - // Deploy a forwarder. - faddr, _, authorizedForwarder, err := authorized_forwarder.DeployAuthorizedForwarder(owner, b, common.HexToAddress("0x326C977E6efc84E512bB9C30f76E30c160eD06FB"), owner.From, common.Address{}, []byte{}) - require.NoError(t, err) - - // Set the node's sending keys as authorized senders. - _, err = authorizedForwarder.SetAuthorizedSenders(owner, sendingKeysAddresses) - require.NoError(t, err) - b.Commit() - - // Add the forwarder to the node's forwarder manager. - forwarderORM := forwarders.NewORM(app.GetDB()) - chainID := ubig.Big(*b.Blockchain().Config().ChainID) - _, err = forwarderORM.CreateForwarder(testutils.Context(t), faddr, chainID) - require.NoError(t, err) - effectiveTransmitter = faddr - } - - // Fund the sending keys with some ETH. - var sendingKeyStrings []string - for _, k := range sendingKeys { - sendingKeyStrings = append(sendingKeyStrings, k.Address.String()) - n, err := b.NonceAt(ctx, owner.From, nil) - require.NoError(t, err) - - tx := cltest.NewLegacyTransaction( - n, k.Address, - assets.Ether(1).ToInt(), - 21000, - assets.GWei(1).ToInt(), - nil) - signedTx, err := owner.Signer(owner.From, tx) - require.NoError(t, err) - err = b.SendTransaction(ctx, signedTx) - require.NoError(t, err) - b.Commit() - } - - kb, err := app.GetKeyStore().OCR2().Create(ctx, "evm") - require.NoError(t, err) - - return &ocr2Node{ - app: app, - peerID: p2pKey.PeerID().Raw(), - transmitter: transmitter, - effectiveTransmitter: effectiveTransmitter, - keybundle: kb, - sendingKeys: sendingKeyStrings, - } -} - -func TestIntegration_OCR2VRF_ForwarderFlow(t *testing.T) { - testutils.SkipFlakey(t, "https://smartcontract-it.atlassian.net/browse/VRF-688") - runOCR2VRFTest(t, true) -} - -func TestIntegration_OCR2VRF(t *testing.T) { - testutils.SkipFlakey(t, "https://smartcontract-it.atlassian.net/browse/VRF-688") - runOCR2VRFTest(t, false) -} - -func runOCR2VRFTest(t *testing.T, useForwarders bool) { - ctx := testutils.Context(t) - keyID := randomKeyID(t) - uni := setupOCR2VRFContracts(t, 5, keyID, false) - - t.Log("Creating bootstrap node") - - bootstrapNodePort := freeport.GetOne(t) - bootstrapNode := setupNodeOCR2(t, uni.owner, bootstrapNodePort, "bootstrap", uni.backend, false, nil) - numNodes := 5 - - t.Log("Creating OCR2 nodes") - var ( - oracles []confighelper2.OracleIdentityExtra - transmitters []common.Address - payees []common.Address - payeeTransactors []*bind.TransactOpts - effectiveTransmitters []common.Address - onchainPubKeys []common.Address - kbs []ocr2key.KeyBundle - apps []*cltest.TestApplication - dkgEncrypters []dkgencryptkey.Key - dkgSigners []dkgsignkey.Key - sendingKeys [][]string - ) - ports := freeport.GetN(t, numNodes) - for i := 0; i < numNodes; i++ { - // Supply the bootstrap IP and port as a V2 peer address - bootstrappers := []commontypes.BootstrapperLocator{ - {PeerID: bootstrapNode.peerID, Addrs: []string{ - fmt.Sprintf("127.0.0.1:%d", bootstrapNodePort), - }}, - } - node := setupNodeOCR2(t, uni.owner, ports[i], fmt.Sprintf("ocr2vrforacle%d", i), uni.backend, useForwarders, bootstrappers) - sendingKeys = append(sendingKeys, node.sendingKeys) - - dkgSignKey, err := node.app.GetKeyStore().DKGSign().Create(ctx) - require.NoError(t, err) - - dkgEncryptKey, err := node.app.GetKeyStore().DKGEncrypt().Create(ctx) - require.NoError(t, err) - - kbs = append(kbs, node.keybundle) - apps = append(apps, node.app) - transmitters = append(transmitters, node.transmitter) - payeeTransactor := testutils.MustNewSimTransactor(t) - payeeTransactors = append(payeeTransactors, payeeTransactor) - payees = append(payees, payeeTransactor.From) - effectiveTransmitters = append(effectiveTransmitters, node.effectiveTransmitter) - dkgEncrypters = append(dkgEncrypters, dkgEncryptKey) - dkgSigners = append(dkgSigners, dkgSignKey) - onchainPubKeys = append(onchainPubKeys, common.BytesToAddress(node.keybundle.PublicKey())) - oracles = append(oracles, confighelper2.OracleIdentityExtra{ - OracleIdentity: confighelper2.OracleIdentity{ - OnchainPublicKey: node.keybundle.PublicKey(), - TransmitAccount: ocrtypes2.Account(node.transmitter.String()), - OffchainPublicKey: node.keybundle.OffchainPublicKey(), - PeerID: node.peerID, - }, - ConfigEncryptionPublicKey: node.keybundle.ConfigEncryptionPublicKey(), - }) - } - - _, err := uni.beacon.SetPayees(uni.owner, transmitters, payees) - require.NoError(t, err) - - t.Log("starting ticker to commit blocks") - tick := time.NewTicker(1 * time.Second) - defer tick.Stop() - go func() { - for range tick.C { - uni.backend.Commit() - } - }() - - blockBeforeConfig, err := uni.backend.BlockByNumber(ctx, nil) - require.NoError(t, err) - - t.Log("Setting DKG config before block:", blockBeforeConfig.Number().String()) - - // set config for dkg - setDKGConfig( - t, - uni, - onchainPubKeys, - effectiveTransmitters, - 1, - oracles, - dkgSigners, - dkgEncrypters, - keyID, - ) - - t.Log("Adding bootstrap node job") - err = bootstrapNode.app.Start(ctx) - require.NoError(t, err) - - evmChains := bootstrapNode.app.GetRelayers().LegacyEVMChains() - require.NotNil(t, evmChains) - bootstrapJobSpec := fmt.Sprintf(` -type = "bootstrap" -name = "bootstrap" -contractConfigTrackerPollInterval = "15s" -relay = "evm" -schemaVersion = 1 -contractID = "%s" -[relayConfig] -chainID = 1337 -fromBlock = %d -`, uni.dkgAddress.Hex(), blockBeforeConfig.Number().Int64()) - t.Log("Creating bootstrap job:", bootstrapJobSpec) - ocrJob, err := ocrbootstrap.ValidatedBootstrapSpecToml(bootstrapJobSpec) - require.NoError(t, err) - err = bootstrapNode.app.AddJobV2(ctx, &ocrJob) - require.NoError(t, err) - - t.Log("Creating OCR2VRF jobs") - for i := 0; i < numNodes; i++ { - var sendingKeysString = fmt.Sprintf(`"%s"`, sendingKeys[i][0]) - for x := 1; x < len(sendingKeys[i]); x++ { - sendingKeysString = fmt.Sprintf(`%s,"%s"`, sendingKeysString, sendingKeys[i][x]) - } - err = apps[i].Start(ctx) - require.NoError(t, err) - - jobSpec := fmt.Sprintf(` -type = "offchainreporting2" -schemaVersion = 1 -name = "ocr2 vrf integration test" -maxTaskDuration = "30s" -contractID = "%s" -ocrKeyBundleID = "%s" -relay = "evm" -pluginType = "ocr2vrf" -transmitterID = "%s" -forwardingAllowed = %t -contractConfigTrackerPollInterval = "15s" - -[relayConfig] -chainID = 1337 -fromBlock = %d - -[pluginConfig] -dkgEncryptionPublicKey = "%s" -dkgSigningPublicKey = "%s" -dkgKeyID = "%s" -dkgContractAddress = "%s" - -vrfCoordinatorAddress = "%s" -linkEthFeedAddress = "%s" -`, uni.beaconAddress.String(), - kbs[i].ID(), - transmitters[i], - useForwarders, - blockBeforeConfig.Number().Int64(), - dkgEncrypters[i].PublicKeyString(), - dkgSigners[i].PublicKeyString(), - hex.EncodeToString(keyID[:]), - uni.dkgAddress.String(), - uni.coordinatorAddress.String(), - uni.feedAddress.String(), - ) - t.Log("Creating OCR2VRF job with spec:", jobSpec) - ocrJob2, err2 := validate.ValidatedOracleSpecToml(testutils.Context(t), apps[i].Config.OCR2(), apps[i].Config.Insecure(), jobSpec, nil) - require.NoError(t, err2) - err2 = apps[i].AddJobV2(ctx, &ocrJob2) - require.NoError(t, err2) - } - - t.Log("Waiting for DKG key to get written") - // poll until a DKG key is written to the contract - // at that point we can start sending VRF requests - var emptyKH [32]byte - emptyHash := crypto.Keccak256Hash(emptyKH[:]) - gomega.NewWithT(t).Eventually(func() bool { - kh, err2 := uni.beacon.SProvingKeyHash(&bind.CallOpts{ - Context: ctx, - }) - require.NoError(t, err2) - t.Log("proving keyhash:", hexutil.Encode(kh[:])) - return crypto.Keccak256Hash(kh[:]) != emptyHash - }, testutils.WaitTimeout(t), 5*time.Second).Should(gomega.BeTrue()) - - t.Log("DKG key written, setting VRF config") - - // set config for vrf now that dkg is ready - setVRFConfig( - t, - uni, - onchainPubKeys, - effectiveTransmitters, - 1, - oracles, - []int{1, 2, 3, 4, 5, 6, 7, 8}, - keyID) - - t.Log("Sending VRF request") - - initialSub, err := uni.coordinator.GetSubscription(nil, uni.subID) - require.NoError(t, err) - require.Equal(t, assets.Ether(5).ToInt(), initialSub.Balance) - - // Send a beacon VRF request and mine it - _, err = uni.consumer.TestRequestRandomness(uni.owner, 2, uni.subID, big.NewInt(1)) - require.NoError(t, err) - uni.backend.Commit() - - redemptionRequestID, err := uni.consumer.SMostRecentRequestID(nil) - require.NoError(t, err) - - // There is no premium on this request, so the cost of the request should have been: - // = (request overhead) * (gas price) / (LINK/ETH ratio) - // = (50_000 * 1 Gwei) / .01 - // = 5_000_000 GJuels - subAfterBeaconRequest, err := uni.coordinator.GetSubscription(nil, uni.subID) - require.NoError(t, err) - require.Equal(t, big.NewInt(initialSub.Balance.Int64()-assets.GWei(5_000_000).Int64()), subAfterBeaconRequest.Balance) - - // Send a fulfillment VRF request and mine it - _, err = uni.consumer.TestRequestRandomnessFulfillment(uni.owner, uni.subID, 1, big.NewInt(2), 100_000, []byte{}) - require.NoError(t, err) - uni.backend.Commit() - - fulfillmentRequestID, err := uni.consumer.SMostRecentRequestID(nil) - require.NoError(t, err) - - // There is no premium on this request, so the cost of the request should have been: - // = (request overhead + callback gas allowance) * (gas price) / (LINK/ETH ratio) - // = ((50_000 + 100_000) * 1 Gwei) / .01 - // = 15_000_000 GJuels - subAfterFulfillmentRequest, err := uni.coordinator.GetSubscription(nil, uni.subID) - require.NoError(t, err) - require.Equal(t, big.NewInt(subAfterBeaconRequest.Balance.Int64()-assets.GWei(15_000_000).Int64()), subAfterFulfillmentRequest.Balance) - - // Send two batched fulfillment VRF requests and mine them - _, err = uni.loadTestConsumer.TestRequestRandomnessFulfillmentBatch(uni.owner, uni.subID, 1, big.NewInt(2), 200_000, []byte{}, big.NewInt(2)) - require.NoError(t, err) - uni.backend.Commit() - - batchFulfillmentRequestID1, err := uni.loadTestConsumer.SRequestIDs(nil, big.NewInt(0), big.NewInt(0)) - require.NoError(t, err) - - batchFulfillmentRequestID2, err := uni.loadTestConsumer.SRequestIDs(nil, big.NewInt(0), big.NewInt(1)) - require.NoError(t, err) - - // There is no premium on these requests, so the cost of the requests should have been: - // = ((request overhead + callback gas allowance) * (gas price) / (LINK/ETH ratio)) * batch size - // = (((50_000 + 200_000) * 1 Gwei) / .01) * 2 - // = 50_000_000 GJuels - subAfterBatchFulfillmentRequest, err := uni.coordinator.GetSubscription(nil, uni.subID) - require.NoError(t, err) - require.Equal(t, big.NewInt(subAfterFulfillmentRequest.Balance.Int64()-assets.GWei(50_000_000).Int64()), subAfterBatchFulfillmentRequest.Balance) - - t.Logf("sub balance after batch fulfillment request: %d", subAfterBatchFulfillmentRequest.Balance) - - t.Log("waiting for fulfillment") - - var balanceAfterRefund *big.Int - // poll until we're able to redeem the randomness without reverting - // at that point, it's been fulfilled - gomega.NewWithT(t).Eventually(func() bool { - _, err2 := uni.consumer.TestRedeemRandomness(uni.owner, uni.subID, redemptionRequestID) - t.Logf("TestRedeemRandomness err: %+v", err2) - return err2 == nil - }, testutils.WaitTimeout(t), 5*time.Second).Should(gomega.BeTrue()) - - gomega.NewWithT(t).Eventually(func() bool { - // Ensure a refund is provided. Refund amount comes out to ~15_700_000 GJuels. - // We use an upper and lower bound such that this part of the test is not excessively brittle to upstream tweaks. - refundUpperBound := big.NewInt(0).Add(assets.GWei(17_000_000).ToInt(), subAfterBatchFulfillmentRequest.Balance) - refundLowerBound := big.NewInt(0).Add(assets.GWei(15_000_000).ToInt(), subAfterBatchFulfillmentRequest.Balance) - subAfterRefund, err2 := uni.coordinator.GetSubscription(nil, uni.subID) - require.NoError(t, err2) - balanceAfterRefund = subAfterRefund.Balance - if ok := ((balanceAfterRefund.Cmp(refundUpperBound) == -1) && (balanceAfterRefund.Cmp(refundLowerBound) == 1)); !ok { - t.Logf("unexpected sub balance after refund: %d", balanceAfterRefund) - return false - } - return true - }, testutils.WaitTimeout(t), 5*time.Second).Should(gomega.BeTrue()) - - // Mine block after redeeming randomness - uni.backend.Commit() - - // ensure that total sub balance is updated correctly - totalSubBalance, err := uni.coordinator.GetSubscriptionLinkBalance(nil) - require.NoError(t, err) - require.True(t, totalSubBalance.Cmp(balanceAfterRefund) == 0) - // ensure total link balance is correct before any payout - totalLinkBalance, err := uni.link.BalanceOf(nil, uni.coordinatorAddress) - require.NoError(t, err) - require.True(t, totalLinkBalance.Cmp(big.NewInt(fundingAmount)) == 0) - - // get total owed amount to NOPs and ensure linkAvailableForPayment (CLL profit) calculation is correct - nopOwedAmount := new(big.Int) - for _, transmitter := range transmitters { - owedAmount, err2 := uni.beacon.OwedPayment(nil, transmitter) - require.NoError(t, err2) - nopOwedAmount = new(big.Int).Add(nopOwedAmount, owedAmount) - } - linkAvailable, err := uni.beacon.LinkAvailableForPayment(nil) - require.NoError(t, err) - debt := new(big.Int).Add(totalSubBalance, nopOwedAmount) - profit := new(big.Int).Sub(totalLinkBalance, debt) - require.True(t, linkAvailable.Cmp(profit) == 0) - - // test cancel subscription - linkBalanceBeforeCancel, err := uni.link.BalanceOf(nil, uni.owner.From) - require.NoError(t, err) - _, err = uni.coordinator.CancelSubscription(uni.owner, uni.subID, uni.owner.From) - require.NoError(t, err) - uni.backend.Commit() - linkBalanceAfterCancel, err := uni.link.BalanceOf(nil, uni.owner.From) - require.NoError(t, err) - require.True(t, new(big.Int).Add(linkBalanceBeforeCancel, totalSubBalance).Cmp(linkBalanceAfterCancel) == 0) - totalSubBalance, err = uni.coordinator.GetSubscriptionLinkBalance(nil) - require.NoError(t, err) - require.True(t, totalSubBalance.Cmp(big.NewInt(0)) == 0) - totalLinkBalance, err = uni.link.BalanceOf(nil, uni.coordinatorAddress) - require.NoError(t, err) - require.True(t, totalLinkBalance.Cmp(new(big.Int).Sub(big.NewInt(fundingAmount), balanceAfterRefund)) == 0) - - // payout node operators - totalNopPayout := new(big.Int) - for idx, payeeTransactor := range payeeTransactors { - // Fund the payee with some ETH. - n, err2 := uni.backend.NonceAt(ctx, uni.owner.From, nil) - require.NoError(t, err2) - tx := cltest.NewLegacyTransaction( - n, payeeTransactor.From, - assets.Ether(1).ToInt(), - 21000, - assets.GWei(1).ToInt(), - nil) - signedTx, err2 := uni.owner.Signer(uni.owner.From, tx) - require.NoError(t, err2) - err2 = uni.backend.SendTransaction(ctx, signedTx) - require.NoError(t, err2) - - _, err2 = uni.beacon.WithdrawPayment(payeeTransactor, transmitters[idx]) - require.NoError(t, err2) - uni.backend.Commit() - payoutAmount, err2 := uni.link.BalanceOf(nil, payeeTransactor.From) - require.NoError(t, err2) - totalNopPayout = new(big.Int).Add(totalNopPayout, payoutAmount) - owedAmountAfter, err2 := uni.beacon.OwedPayment(nil, transmitters[idx]) - require.NoError(t, err2) - require.True(t, owedAmountAfter.Cmp(big.NewInt(0)) == 0) - } - require.True(t, nopOwedAmount.Cmp(totalNopPayout) == 0) - - // check total link balance after NOP payout - totalLinkBalanceAfterNopPayout, err := uni.link.BalanceOf(nil, uni.coordinatorAddress) - require.NoError(t, err) - require.True(t, totalLinkBalanceAfterNopPayout.Cmp(new(big.Int).Sub(totalLinkBalance, totalNopPayout)) == 0) - totalSubBalance, err = uni.coordinator.GetSubscriptionLinkBalance(nil) - require.NoError(t, err) - require.True(t, totalSubBalance.Cmp(big.NewInt(0)) == 0) - - // withdraw remaining profits after NOP payout - linkAvailable, err = uni.beacon.LinkAvailableForPayment(nil) - require.NoError(t, err) - linkBalanceBeforeWithdraw, err := uni.link.BalanceOf(nil, uni.owner.From) - require.NoError(t, err) - _, err = uni.beacon.WithdrawFunds(uni.owner, uni.owner.From, linkAvailable) - require.NoError(t, err) - uni.backend.Commit() - linkBalanceAfterWithdraw, err := uni.link.BalanceOf(nil, uni.owner.From) - require.NoError(t, err) - require.True(t, linkBalanceAfterWithdraw.Cmp(new(big.Int).Add(linkBalanceBeforeWithdraw, linkAvailable)) == 0) - linkAvailable, err = uni.beacon.LinkAvailableForPayment(nil) - require.NoError(t, err) - require.True(t, linkAvailable.Cmp(big.NewInt(0)) == 0) - - // poll until we're able to verify that consumer contract has stored randomness as expected - // First arg is the request ID, which starts at zero, second is the index into - // the random words. - gomega.NewWithT(t).Eventually(func() bool { - var errs []error - rw1, err2 := uni.consumer.SReceivedRandomnessByRequestID(nil, redemptionRequestID, big.NewInt(0)) - t.Logf("TestRedeemRandomness 1st word err: %+v", err2) - errs = append(errs, err2) - rw2, err2 := uni.consumer.SReceivedRandomnessByRequestID(nil, redemptionRequestID, big.NewInt(1)) - t.Logf("TestRedeemRandomness 2nd word err: %+v", err2) - errs = append(errs, err2) - rw3, err2 := uni.consumer.SReceivedRandomnessByRequestID(nil, fulfillmentRequestID, big.NewInt(0)) - t.Logf("FulfillRandomness 1st word err: %+v", err2) - errs = append(errs, err2) - rw4, err2 := uni.loadTestConsumer.SReceivedRandomnessByRequestID(nil, batchFulfillmentRequestID1, big.NewInt(0)) - t.Logf("Batch FulfillRandomness 1st word err: %+v", err2) - errs = append(errs, err2) - rw5, err2 := uni.loadTestConsumer.SReceivedRandomnessByRequestID(nil, batchFulfillmentRequestID2, big.NewInt(0)) - t.Logf("Batch FulfillRandomness 2nd word err: %+v", err2) - errs = append(errs, err2) - batchTotalRequests, err2 := uni.loadTestConsumer.STotalRequests(nil) - t.Logf("Batch FulfillRandomness total requests err: %+v", err2) - errs = append(errs, err2) - batchTotalFulfillments, err2 := uni.loadTestConsumer.STotalFulfilled(nil) - t.Logf("Batch FulfillRandomness total fulfillments err: %+v", err2) - errs = append(errs, err2) - err2 = nil - if batchTotalRequests.Int64() != batchTotalFulfillments.Int64() { - err2 = errors.New("batchTotalRequests is not equal to batchTotalFulfillments") - errs = append(errs, err2) - } - t.Logf("Batch FulfillRandomness total requests/fulfillments equal err: %+v", err2) - - t.Logf("randomness from redeemRandomness: %s %s", rw1.String(), rw2.String()) - t.Logf("randomness from fulfillRandomness: %s", rw3.String()) - t.Logf("randomness from batch fulfillRandomness: %s %s", rw4.String(), rw5.String()) - t.Logf("total batch requested and fulfilled: %d %d", batchTotalRequests, batchTotalFulfillments) - - for _, err := range errs { - if err != nil { - return false - } - } - return true - }, testutils.WaitTimeout(t), 5*time.Second).Should(gomega.BeTrue()) -} - -func setDKGConfig( - t *testing.T, - uni ocr2vrfUniverse, - onchainPubKeys []common.Address, - transmitters []common.Address, - f uint8, - oracleIdentities []confighelper2.OracleIdentityExtra, - signKeys []dkgsignkey.Key, - encryptKeys []dkgencryptkey.Key, - keyID [32]byte, -) { - var ( - signingPubKeys []kyber.Point - encryptPubKeys []kyber.Point - ) - for i := range signKeys { - signingPubKeys = append(signingPubKeys, signKeys[i].PublicKey) - encryptPubKeys = append(encryptPubKeys, encryptKeys[i].PublicKey) - } - - offchainConfig, err := ocr2dkg.OffchainConfig( - encryptPubKeys, - signingPubKeys, - &altbn_128.G1{}, - &ocr2vrftypes.PairingTranslation{ - Suite: &altbn_128.PairingSuite{}, - }) - require.NoError(t, err) - onchainConfig, err := ocr2dkg.OnchainConfig(keyID) - require.NoError(t, err) - - var schedule []int - for range oracleIdentities { - schedule = append(schedule, 1) - } - - _, _, f, onchainConfig, offchainConfigVersion, offchainConfig, err := confighelper2.ContractSetConfigArgsForTests( - 30*time.Second, - 10*time.Second, - 20*time.Second, - 2*time.Second, - 20*time.Second, - 3, - schedule, - oracleIdentities, - offchainConfig, - 50*time.Millisecond, - 10*time.Second, - 10*time.Second, - 100*time.Millisecond, - 1*time.Second, - int(f), - onchainConfig) - require.NoError(t, err) - - _, err = uni.dkg.SetConfig(uni.owner, onchainPubKeys, transmitters, f, onchainConfig, offchainConfigVersion, offchainConfig) - require.NoError(t, err) - - uni.backend.Commit() -} - -func setVRFConfig( - t *testing.T, - uni ocr2vrfUniverse, - onchainPubKeys []common.Address, - transmitters []common.Address, - f uint8, - oracleIdentities []confighelper2.OracleIdentityExtra, - confDelaysSl []int, - keyID [32]byte, -) { - offchainConfig := ocr2vrf.OffchainConfig(&ocr2vrftypes.CoordinatorConfig{ - CacheEvictionWindowSeconds: 1, - BatchGasLimit: 5_000_000, - CoordinatorOverhead: 50_000, - CallbackOverhead: 50_000, - BlockGasOverhead: 50_000, - LookbackBlocks: 1_000, - }) - - confDelays := make(map[uint32]struct{}) - for _, c := range confDelaysSl { - confDelays[uint32(c)] = struct{}{} - } - - onchainConfig := ocr2vrf.OnchainConfig(confDelays) - - var schedule []int - for range oracleIdentities { - schedule = append(schedule, 1) - } - - _, _, f, onchainConfig, offchainConfigVersion, offchainConfig, err := confighelper2.ContractSetConfigArgsForTests( - 30*time.Second, - 10*time.Second, - 20*time.Second, - 2*time.Second, - 20*time.Second, - 3, - schedule, - oracleIdentities, - offchainConfig, - 50*time.Millisecond, - 10*time.Second, - 10*time.Second, - 100*time.Millisecond, - 1*time.Second, - int(f), - onchainConfig) - require.NoError(t, err) - - _, err = uni.beacon.SetConfig( - uni.owner, onchainPubKeys, transmitters, f, onchainConfig, offchainConfigVersion, offchainConfig) - require.NoError(t, err) - - uni.backend.Commit() -} - -func randomKeyID(t *testing.T) (r [32]byte) { - _, err := rand.Read(r[:]) - require.NoError(t, err) - return -} - -func ptr[T any](v T) *T { return &v } diff --git a/core/services/ocr2/plugins/ocr2vrf/juelsfeecoin/link_eth_price_provider.go b/core/services/ocr2/plugins/ocr2vrf/juelsfeecoin/link_eth_price_provider.go deleted file mode 100644 index 2601ae14668..00000000000 --- a/core/services/ocr2/plugins/ocr2vrf/juelsfeecoin/link_eth_price_provider.go +++ /dev/null @@ -1,109 +0,0 @@ -package juelsfeecoin - -import ( - "context" - "math/big" - "runtime" - "sync" - "time" - - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/pkg/errors" - - "github.com/smartcontractkit/chainlink-vrf/types" - - evmclient "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/aggregator_v3_interface" - "github.com/smartcontractkit/chainlink/v2/core/logger" -) - -// linkEthPriceProvider provides conversation rate between Link and native token using price feeds -type linkEthPriceProvider struct { - aggregator aggregator_v3_interface.AggregatorV3InterfaceInterface - timeout time.Duration - interval time.Duration - lock sync.RWMutex - stop chan struct{} - currentJuelsPerFeeCoin *big.Int - lggr logger.Logger -} - -var _ types.JuelsPerFeeCoin = (*linkEthPriceProvider)(nil) - -func NewLinkEthPriceProvider( - linkEthFeedAddress common.Address, - client evmclient.Client, - timeout time.Duration, - interval time.Duration, - logger logger.Logger, -) (types.JuelsPerFeeCoin, error) { - aggregator, err := aggregator_v3_interface.NewAggregatorV3Interface(linkEthFeedAddress, client) - if err != nil { - return nil, errors.Wrap(err, "new aggregator v3 interface") - } - - if timeout >= interval { - return nil, errors.New("timeout must be less than interval") - } - - p := &linkEthPriceProvider{ - aggregator: aggregator, - timeout: timeout, - interval: interval, - currentJuelsPerFeeCoin: big.NewInt(0), - stop: make(chan struct{}), - lggr: logger, - } - - // Begin updating JuelsPerFeeCoin. - // Stop fetching price updates on garbage collection, as to avoid a leaked goroutine. - go p.run() - runtime.SetFinalizer(p, func(p *linkEthPriceProvider) { p.stop <- struct{}{} }) - - return p, nil -} - -// Run updates the JuelsPerFeeCoin value at a regular interval, until stopped. -// Do not block the main thread, such that updates are always timely. -func (p *linkEthPriceProvider) run() { - ticker := time.NewTicker(p.interval) - for { - select { - case <-ticker.C: - go p.updateJuelsPerFeeCoin() - case <-p.stop: - ticker.Stop() - return - } - } -} - -// JuelsPerFeeCoin returns the current JuelsPerFeeCoin value, threadsafe. -func (p *linkEthPriceProvider) JuelsPerFeeCoin() (*big.Int, error) { - p.lock.RLock() - defer p.lock.RUnlock() - return p.currentJuelsPerFeeCoin, nil -} - -// Get current JuelsPerFeeCoin value from aggregator contract. -// If the RPC call fails, log the error and return. -func (p *linkEthPriceProvider) updateJuelsPerFeeCoin() { - // Ensure writes to currentJuelsPerFeeCoin are threadsafe. - p.lock.Lock() - defer p.lock.Unlock() - - ctx, cancel := context.WithTimeout(context.Background(), p.timeout) - defer cancel() - roundData, err := p.aggregator.LatestRoundData(&bind.CallOpts{Context: ctx}) - - // For RPC issues, set the most recent price to 0. This way, stale prices will not be transmitted, - // and zero-observations can be ignored in OCR and on-chain. - if err != nil { - p.currentJuelsPerFeeCoin = big.NewInt(0) - return - } - - // Update JuelsPerFeeCoin to the obtained value. - p.currentJuelsPerFeeCoin = roundData.Answer -} diff --git a/core/services/ocr2/plugins/ocr2vrf/juelsfeecoin/link_eth_price_provider_test.go b/core/services/ocr2/plugins/ocr2vrf/juelsfeecoin/link_eth_price_provider_test.go deleted file mode 100644 index 73a66d17ead..00000000000 --- a/core/services/ocr2/plugins/ocr2vrf/juelsfeecoin/link_eth_price_provider_test.go +++ /dev/null @@ -1,91 +0,0 @@ -package juelsfeecoin - -import ( - "errors" - "math/big" - "testing" - "time" - - "github.com/ethereum/go-ethereum/common" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" - - evmclimocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client/mocks" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/aggregator_v3_interface" - "github.com/smartcontractkit/chainlink/v2/core/logger" - "github.com/smartcontractkit/chainlink/v2/core/services/vrf/mocks" -) - -func Test_JuelsPerFeeCoin(t *testing.T) { - t.Parallel() - - t.Run("returns juels per fee coin", func(t *testing.T) { - mockAggregator := mocks.NewAggregatorV3Interface(t) - latestRoundData := aggregator_v3_interface.LatestRoundData{Answer: big.NewInt(10000)} - mockAggregator.On("LatestRoundData", mock.Anything).Return(latestRoundData, nil) - - // Start linkEthPriceProvider. - provider := &linkEthPriceProvider{ - aggregator: mockAggregator, - timeout: time.Second / 2, - interval: time.Second, - stop: make(chan struct{}), - currentJuelsPerFeeCoin: big.NewInt(0), - lggr: logger.TestLogger(t), - } - go provider.run() - t.Cleanup(func() { close(provider.stop) }) - - // Assert correct initial price. - price, err := provider.JuelsPerFeeCoin() - require.NoError(t, err) - assert.Equal(t, int64(0), price.Int64()) - - // Wait until the price is updated. - time.Sleep(2 * time.Second) - - // Ensure the correct price is returned. - price, err = provider.JuelsPerFeeCoin() - require.NoError(t, err) - assert.Equal(t, int64(10000), price.Int64()) - }) - - t.Run("returns juels per fee coin (error updating)", func(t *testing.T) { - mockAggregator := mocks.NewAggregatorV3Interface(t) - mockAggregator.On("LatestRoundData", mock.Anything).Return(aggregator_v3_interface.LatestRoundData{}, - errors.New("could not fetch")) - - // Start linkEthPriceProvider. - provider := &linkEthPriceProvider{ - aggregator: mockAggregator, - timeout: time.Second / 2, - interval: time.Second, - stop: make(chan struct{}), - currentJuelsPerFeeCoin: big.NewInt(0), - lggr: logger.TestLogger(t), - } - go provider.run() - t.Cleanup(func() { close(provider.stop) }) - - // Assert correct initial price. - price, err := provider.JuelsPerFeeCoin() - require.NoError(t, err) - assert.Equal(t, int64(0), price.Int64()) - - // Wait until the price is updated. - time.Sleep(2 * time.Second) - - // Ensure the correct price is returned. - price, err = provider.JuelsPerFeeCoin() - require.NoError(t, err) - assert.Equal(t, int64(0), price.Int64()) - }) - - t.Run("errors out for timeout >= interval", func(t *testing.T) { - evmClient := evmclimocks.NewClient(t) - _, err := NewLinkEthPriceProvider(common.Address{}, evmClient, time.Second, time.Second, logger.TestLogger(t)) - require.Error(t, err) - require.Equal(t, "timeout must be less than interval", err.Error()) - }) -} diff --git a/core/services/ocr2/plugins/ocr2vrf/reasonablegasprice/reasonable_gas_price_provider.go b/core/services/ocr2/plugins/ocr2vrf/reasonablegasprice/reasonable_gas_price_provider.go deleted file mode 100644 index 880b8084338..00000000000 --- a/core/services/ocr2/plugins/ocr2vrf/reasonablegasprice/reasonable_gas_price_provider.go +++ /dev/null @@ -1,42 +0,0 @@ -package reasonablegasprice - -import ( - "math/big" - "time" - - "github.com/smartcontractkit/chainlink-vrf/types" - - "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" - "github.com/smartcontractkit/chainlink/v2/core/chains/evm/gas" -) - -// reasonableGasPriceProvider provides an estimate for the average gas price -type reasonableGasPriceProvider struct { - estimator gas.EvmFeeEstimator - timeout time.Duration - maxGasPrice *assets.Wei - supportsDynamicFee bool -} - -var _ types.ReasonableGasPrice = (*reasonableGasPriceProvider)(nil) - -func NewReasonableGasPriceProvider( - estimator gas.EvmFeeEstimator, - timeout time.Duration, - maxGasPrice *assets.Wei, - supportsDynamicFee bool, -) types.ReasonableGasPrice { - return &reasonableGasPriceProvider{ - estimator: estimator, - timeout: timeout, - maxGasPrice: maxGasPrice, - supportsDynamicFee: supportsDynamicFee, - } -} - -// TODO: implement this function to use a gas estimator. This change can be rolled out -// to all nodes while the on-chain `useReasonableGasPrice` flag is disabled. Once reasonable -// gas prices reported by nodes become 'reasonable' the flag can be enabled. -func (r *reasonableGasPriceProvider) ReasonableGasPrice() (*big.Int, error) { - return big.NewInt(0), nil -} diff --git a/core/services/ocr2/plugins/ocr2vrf/reasonablegasprice/reasonable_gas_price_test.go b/core/services/ocr2/plugins/ocr2vrf/reasonablegasprice/reasonable_gas_price_test.go deleted file mode 100644 index ec8b085dea8..00000000000 --- a/core/services/ocr2/plugins/ocr2vrf/reasonablegasprice/reasonable_gas_price_test.go +++ /dev/null @@ -1,22 +0,0 @@ -package reasonablegasprice - -import ( - "testing" - "time" - - "github.com/stretchr/testify/require" - - "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" -) - -func Test_ReasonableGasPrice(t *testing.T) { - t.Parallel() - - t.Run("returns reasonable gas price", func(t *testing.T) { - r := NewReasonableGasPriceProvider(nil, 1*time.Second, assets.GWei(100), true) - g, err := r.ReasonableGasPrice() - require.NoError(t, err) - - require.Equal(t, int64(0), g.Int64()) - }) -} diff --git a/core/services/ocr2/plugins/ocr2vrf/reportserializer/report_serializer.go b/core/services/ocr2/plugins/ocr2vrf/reportserializer/report_serializer.go deleted file mode 100644 index b33c749589f..00000000000 --- a/core/services/ocr2/plugins/ocr2vrf/reportserializer/report_serializer.go +++ /dev/null @@ -1,61 +0,0 @@ -package reportserializer - -import ( - "github.com/pkg/errors" - "go.dedis.ch/kyber/v3" - - "github.com/smartcontractkit/chainlink-vrf/ocr2vrf" - "github.com/smartcontractkit/chainlink-vrf/types" -) - -type reportSerializer struct { - e ocr2vrf.EthereumReportSerializer -} - -var _ types.ReportSerializer = (*reportSerializer)(nil) - -// NewReportSerializer provides a serialization component for sending byte-encoded reports on-chain. -func NewReportSerializer(encryptionGroup kyber.Group) types.ReportSerializer { - return &reportSerializer{ - e: ocr2vrf.EthereumReportSerializer{ - G: encryptionGroup, - }, - } -} - -// SerializeReport serializes an abstract report into abi-encoded bytes. -func (serializer *reportSerializer) SerializeReport(r types.AbstractReport) ([]byte, error) { - packed, err := serializer.e.SerializeReport(r) - - if err != nil { - return nil, errors.Wrap(err, "serialize report") - } - - return packed, nil -} - -// DeserializeReport deserializes a serialized byte array into a report. -func (serializer *reportSerializer) DeserializeReport(reportBytes []byte) (types.AbstractReport, error) { - // Leaving unimplemented, as serialization here is not two-way. The object that is abi-encoded on-chain is a BeaconReport, not an AbstractReport. - // So, the AbstractReport is first converted to a BeaconReport before the encoding. Converting an AbstractReport to a BeaconReport requires - // the removal of some fields, so when it is converted back to a BeaconReport and then deserialized, those fields are missing. - // Consequently, either the returned object from this function will be an abstract report - // that has had some fields removed/zeroed, or the return type will be changed to a BeaconReport, which cannot be re-serialized. - // - // Also, the need for off-chain deserialization is not currently clear. - panic("implement me") -} - -// MaxReportLength gives the max length of a report to be transmitted on-chain. -func (serializer *reportSerializer) MaxReportLength() uint { - return 150_000 // TODO: change this. -} - -// ReportLength provides the expected report length of a report. -func (serializer *reportSerializer) ReportLength(a types.AbstractReport) uint { - s, err := serializer.SerializeReport(a) - if err != nil { - return 0 - } - return uint(len(s)) -} diff --git a/core/services/ocr2/plugins/ocr2vrf/reportserializer/report_serializer_test.go b/core/services/ocr2/plugins/ocr2vrf/reportserializer/report_serializer_test.go deleted file mode 100644 index 32704a55b0f..00000000000 --- a/core/services/ocr2/plugins/ocr2vrf/reportserializer/report_serializer_test.go +++ /dev/null @@ -1,44 +0,0 @@ -package reportserializer_test - -import ( - "math/big" - "testing" - - "github.com/ethereum/go-ethereum/common" - "github.com/stretchr/testify/require" - - "github.com/smartcontractkit/chainlink-vrf/altbn_128" - "github.com/smartcontractkit/chainlink-vrf/types" - - "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2vrf/reportserializer" -) - -func Test_Serialize_Deserialize(t *testing.T) { - altbn128Suite := &altbn_128.PairingSuite{} - reportSerializer := reportserializer.NewReportSerializer(altbn128Suite.G1()) - - unserializedReport := types.AbstractReport{ - JuelsPerFeeCoin: big.NewInt(10), - RecentBlockHeight: 100, - RecentBlockHash: common.HexToHash("0x002"), - Outputs: []types.AbstractVRFOutput{{ - BlockHeight: 10, - ConfirmationDelay: 20, - Callbacks: []types.AbstractCostedCallbackRequest{{ - RequestID: big.NewInt(1), - NumWords: 2, - Requester: common.HexToAddress("0x03"), - Arguments: []byte{4}, - SubscriptionID: big.NewInt(5), - GasAllowance: big.NewInt(6), - Price: big.NewInt(7), - GasPrice: big.NewInt(0), - WeiPerUnitLink: big.NewInt(0), - }}, - }}, - } - r, err := reportSerializer.SerializeReport(unserializedReport) - require.NoError(t, err) - require.Equal(t, uint(len(r)), reportSerializer.ReportLength(unserializedReport)) - // TODO: Add deserialization after this point to verify. -} diff --git a/core/services/ocr2/plugins/promwrapper/mocks/prometheus_backend.go b/core/services/ocr2/plugins/promwrapper/mocks/prometheus_backend.go index 4e4b912c75b..ecbaaba08a0 100644 --- a/core/services/ocr2/plugins/promwrapper/mocks/prometheus_backend.go +++ b/core/services/ocr2/plugins/promwrapper/mocks/prometheus_backend.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -9,56 +9,354 @@ type PrometheusBackend struct { mock.Mock } +type PrometheusBackend_Expecter struct { + mock *mock.Mock +} + +func (_m *PrometheusBackend) EXPECT() *PrometheusBackend_Expecter { + return &PrometheusBackend_Expecter{mock: &_m.Mock} +} + // SetAcceptFinalizedReportToTransmitAcceptedReportLatency provides a mock function with given fields: _a0, _a1 func (_m *PrometheusBackend) SetAcceptFinalizedReportToTransmitAcceptedReportLatency(_a0 []string, _a1 float64) { _m.Called(_a0, _a1) } +// PrometheusBackend_SetAcceptFinalizedReportToTransmitAcceptedReportLatency_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetAcceptFinalizedReportToTransmitAcceptedReportLatency' +type PrometheusBackend_SetAcceptFinalizedReportToTransmitAcceptedReportLatency_Call struct { + *mock.Call +} + +// SetAcceptFinalizedReportToTransmitAcceptedReportLatency is a helper method to define mock.On call +// - _a0 []string +// - _a1 float64 +func (_e *PrometheusBackend_Expecter) SetAcceptFinalizedReportToTransmitAcceptedReportLatency(_a0 interface{}, _a1 interface{}) *PrometheusBackend_SetAcceptFinalizedReportToTransmitAcceptedReportLatency_Call { + return &PrometheusBackend_SetAcceptFinalizedReportToTransmitAcceptedReportLatency_Call{Call: _e.mock.On("SetAcceptFinalizedReportToTransmitAcceptedReportLatency", _a0, _a1)} +} + +func (_c *PrometheusBackend_SetAcceptFinalizedReportToTransmitAcceptedReportLatency_Call) Run(run func(_a0 []string, _a1 float64)) *PrometheusBackend_SetAcceptFinalizedReportToTransmitAcceptedReportLatency_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]string), args[1].(float64)) + }) + return _c +} + +func (_c *PrometheusBackend_SetAcceptFinalizedReportToTransmitAcceptedReportLatency_Call) Return() *PrometheusBackend_SetAcceptFinalizedReportToTransmitAcceptedReportLatency_Call { + _c.Call.Return() + return _c +} + +func (_c *PrometheusBackend_SetAcceptFinalizedReportToTransmitAcceptedReportLatency_Call) RunAndReturn(run func([]string, float64)) *PrometheusBackend_SetAcceptFinalizedReportToTransmitAcceptedReportLatency_Call { + _c.Call.Return(run) + return _c +} + // SetCloseDuration provides a mock function with given fields: _a0, _a1 func (_m *PrometheusBackend) SetCloseDuration(_a0 []string, _a1 float64) { _m.Called(_a0, _a1) } +// PrometheusBackend_SetCloseDuration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetCloseDuration' +type PrometheusBackend_SetCloseDuration_Call struct { + *mock.Call +} + +// SetCloseDuration is a helper method to define mock.On call +// - _a0 []string +// - _a1 float64 +func (_e *PrometheusBackend_Expecter) SetCloseDuration(_a0 interface{}, _a1 interface{}) *PrometheusBackend_SetCloseDuration_Call { + return &PrometheusBackend_SetCloseDuration_Call{Call: _e.mock.On("SetCloseDuration", _a0, _a1)} +} + +func (_c *PrometheusBackend_SetCloseDuration_Call) Run(run func(_a0 []string, _a1 float64)) *PrometheusBackend_SetCloseDuration_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]string), args[1].(float64)) + }) + return _c +} + +func (_c *PrometheusBackend_SetCloseDuration_Call) Return() *PrometheusBackend_SetCloseDuration_Call { + _c.Call.Return() + return _c +} + +func (_c *PrometheusBackend_SetCloseDuration_Call) RunAndReturn(run func([]string, float64)) *PrometheusBackend_SetCloseDuration_Call { + _c.Call.Return(run) + return _c +} + // SetObservationDuration provides a mock function with given fields: _a0, _a1 func (_m *PrometheusBackend) SetObservationDuration(_a0 []string, _a1 float64) { _m.Called(_a0, _a1) } +// PrometheusBackend_SetObservationDuration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetObservationDuration' +type PrometheusBackend_SetObservationDuration_Call struct { + *mock.Call +} + +// SetObservationDuration is a helper method to define mock.On call +// - _a0 []string +// - _a1 float64 +func (_e *PrometheusBackend_Expecter) SetObservationDuration(_a0 interface{}, _a1 interface{}) *PrometheusBackend_SetObservationDuration_Call { + return &PrometheusBackend_SetObservationDuration_Call{Call: _e.mock.On("SetObservationDuration", _a0, _a1)} +} + +func (_c *PrometheusBackend_SetObservationDuration_Call) Run(run func(_a0 []string, _a1 float64)) *PrometheusBackend_SetObservationDuration_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]string), args[1].(float64)) + }) + return _c +} + +func (_c *PrometheusBackend_SetObservationDuration_Call) Return() *PrometheusBackend_SetObservationDuration_Call { + _c.Call.Return() + return _c +} + +func (_c *PrometheusBackend_SetObservationDuration_Call) RunAndReturn(run func([]string, float64)) *PrometheusBackend_SetObservationDuration_Call { + _c.Call.Return(run) + return _c +} + // SetObservationToReportLatency provides a mock function with given fields: _a0, _a1 func (_m *PrometheusBackend) SetObservationToReportLatency(_a0 []string, _a1 float64) { _m.Called(_a0, _a1) } +// PrometheusBackend_SetObservationToReportLatency_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetObservationToReportLatency' +type PrometheusBackend_SetObservationToReportLatency_Call struct { + *mock.Call +} + +// SetObservationToReportLatency is a helper method to define mock.On call +// - _a0 []string +// - _a1 float64 +func (_e *PrometheusBackend_Expecter) SetObservationToReportLatency(_a0 interface{}, _a1 interface{}) *PrometheusBackend_SetObservationToReportLatency_Call { + return &PrometheusBackend_SetObservationToReportLatency_Call{Call: _e.mock.On("SetObservationToReportLatency", _a0, _a1)} +} + +func (_c *PrometheusBackend_SetObservationToReportLatency_Call) Run(run func(_a0 []string, _a1 float64)) *PrometheusBackend_SetObservationToReportLatency_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]string), args[1].(float64)) + }) + return _c +} + +func (_c *PrometheusBackend_SetObservationToReportLatency_Call) Return() *PrometheusBackend_SetObservationToReportLatency_Call { + _c.Call.Return() + return _c +} + +func (_c *PrometheusBackend_SetObservationToReportLatency_Call) RunAndReturn(run func([]string, float64)) *PrometheusBackend_SetObservationToReportLatency_Call { + _c.Call.Return(run) + return _c +} + // SetQueryDuration provides a mock function with given fields: _a0, _a1 func (_m *PrometheusBackend) SetQueryDuration(_a0 []string, _a1 float64) { _m.Called(_a0, _a1) } +// PrometheusBackend_SetQueryDuration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetQueryDuration' +type PrometheusBackend_SetQueryDuration_Call struct { + *mock.Call +} + +// SetQueryDuration is a helper method to define mock.On call +// - _a0 []string +// - _a1 float64 +func (_e *PrometheusBackend_Expecter) SetQueryDuration(_a0 interface{}, _a1 interface{}) *PrometheusBackend_SetQueryDuration_Call { + return &PrometheusBackend_SetQueryDuration_Call{Call: _e.mock.On("SetQueryDuration", _a0, _a1)} +} + +func (_c *PrometheusBackend_SetQueryDuration_Call) Run(run func(_a0 []string, _a1 float64)) *PrometheusBackend_SetQueryDuration_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]string), args[1].(float64)) + }) + return _c +} + +func (_c *PrometheusBackend_SetQueryDuration_Call) Return() *PrometheusBackend_SetQueryDuration_Call { + _c.Call.Return() + return _c +} + +func (_c *PrometheusBackend_SetQueryDuration_Call) RunAndReturn(run func([]string, float64)) *PrometheusBackend_SetQueryDuration_Call { + _c.Call.Return(run) + return _c +} + // SetQueryToObservationLatency provides a mock function with given fields: _a0, _a1 func (_m *PrometheusBackend) SetQueryToObservationLatency(_a0 []string, _a1 float64) { _m.Called(_a0, _a1) } +// PrometheusBackend_SetQueryToObservationLatency_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetQueryToObservationLatency' +type PrometheusBackend_SetQueryToObservationLatency_Call struct { + *mock.Call +} + +// SetQueryToObservationLatency is a helper method to define mock.On call +// - _a0 []string +// - _a1 float64 +func (_e *PrometheusBackend_Expecter) SetQueryToObservationLatency(_a0 interface{}, _a1 interface{}) *PrometheusBackend_SetQueryToObservationLatency_Call { + return &PrometheusBackend_SetQueryToObservationLatency_Call{Call: _e.mock.On("SetQueryToObservationLatency", _a0, _a1)} +} + +func (_c *PrometheusBackend_SetQueryToObservationLatency_Call) Run(run func(_a0 []string, _a1 float64)) *PrometheusBackend_SetQueryToObservationLatency_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]string), args[1].(float64)) + }) + return _c +} + +func (_c *PrometheusBackend_SetQueryToObservationLatency_Call) Return() *PrometheusBackend_SetQueryToObservationLatency_Call { + _c.Call.Return() + return _c +} + +func (_c *PrometheusBackend_SetQueryToObservationLatency_Call) RunAndReturn(run func([]string, float64)) *PrometheusBackend_SetQueryToObservationLatency_Call { + _c.Call.Return(run) + return _c +} + // SetReportDuration provides a mock function with given fields: _a0, _a1 func (_m *PrometheusBackend) SetReportDuration(_a0 []string, _a1 float64) { _m.Called(_a0, _a1) } +// PrometheusBackend_SetReportDuration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetReportDuration' +type PrometheusBackend_SetReportDuration_Call struct { + *mock.Call +} + +// SetReportDuration is a helper method to define mock.On call +// - _a0 []string +// - _a1 float64 +func (_e *PrometheusBackend_Expecter) SetReportDuration(_a0 interface{}, _a1 interface{}) *PrometheusBackend_SetReportDuration_Call { + return &PrometheusBackend_SetReportDuration_Call{Call: _e.mock.On("SetReportDuration", _a0, _a1)} +} + +func (_c *PrometheusBackend_SetReportDuration_Call) Run(run func(_a0 []string, _a1 float64)) *PrometheusBackend_SetReportDuration_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]string), args[1].(float64)) + }) + return _c +} + +func (_c *PrometheusBackend_SetReportDuration_Call) Return() *PrometheusBackend_SetReportDuration_Call { + _c.Call.Return() + return _c +} + +func (_c *PrometheusBackend_SetReportDuration_Call) RunAndReturn(run func([]string, float64)) *PrometheusBackend_SetReportDuration_Call { + _c.Call.Return(run) + return _c +} + // SetReportToAcceptFinalizedReportLatency provides a mock function with given fields: _a0, _a1 func (_m *PrometheusBackend) SetReportToAcceptFinalizedReportLatency(_a0 []string, _a1 float64) { _m.Called(_a0, _a1) } +// PrometheusBackend_SetReportToAcceptFinalizedReportLatency_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetReportToAcceptFinalizedReportLatency' +type PrometheusBackend_SetReportToAcceptFinalizedReportLatency_Call struct { + *mock.Call +} + +// SetReportToAcceptFinalizedReportLatency is a helper method to define mock.On call +// - _a0 []string +// - _a1 float64 +func (_e *PrometheusBackend_Expecter) SetReportToAcceptFinalizedReportLatency(_a0 interface{}, _a1 interface{}) *PrometheusBackend_SetReportToAcceptFinalizedReportLatency_Call { + return &PrometheusBackend_SetReportToAcceptFinalizedReportLatency_Call{Call: _e.mock.On("SetReportToAcceptFinalizedReportLatency", _a0, _a1)} +} + +func (_c *PrometheusBackend_SetReportToAcceptFinalizedReportLatency_Call) Run(run func(_a0 []string, _a1 float64)) *PrometheusBackend_SetReportToAcceptFinalizedReportLatency_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]string), args[1].(float64)) + }) + return _c +} + +func (_c *PrometheusBackend_SetReportToAcceptFinalizedReportLatency_Call) Return() *PrometheusBackend_SetReportToAcceptFinalizedReportLatency_Call { + _c.Call.Return() + return _c +} + +func (_c *PrometheusBackend_SetReportToAcceptFinalizedReportLatency_Call) RunAndReturn(run func([]string, float64)) *PrometheusBackend_SetReportToAcceptFinalizedReportLatency_Call { + _c.Call.Return(run) + return _c +} + // SetShouldAcceptFinalizedReportDuration provides a mock function with given fields: _a0, _a1 func (_m *PrometheusBackend) SetShouldAcceptFinalizedReportDuration(_a0 []string, _a1 float64) { _m.Called(_a0, _a1) } +// PrometheusBackend_SetShouldAcceptFinalizedReportDuration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetShouldAcceptFinalizedReportDuration' +type PrometheusBackend_SetShouldAcceptFinalizedReportDuration_Call struct { + *mock.Call +} + +// SetShouldAcceptFinalizedReportDuration is a helper method to define mock.On call +// - _a0 []string +// - _a1 float64 +func (_e *PrometheusBackend_Expecter) SetShouldAcceptFinalizedReportDuration(_a0 interface{}, _a1 interface{}) *PrometheusBackend_SetShouldAcceptFinalizedReportDuration_Call { + return &PrometheusBackend_SetShouldAcceptFinalizedReportDuration_Call{Call: _e.mock.On("SetShouldAcceptFinalizedReportDuration", _a0, _a1)} +} + +func (_c *PrometheusBackend_SetShouldAcceptFinalizedReportDuration_Call) Run(run func(_a0 []string, _a1 float64)) *PrometheusBackend_SetShouldAcceptFinalizedReportDuration_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]string), args[1].(float64)) + }) + return _c +} + +func (_c *PrometheusBackend_SetShouldAcceptFinalizedReportDuration_Call) Return() *PrometheusBackend_SetShouldAcceptFinalizedReportDuration_Call { + _c.Call.Return() + return _c +} + +func (_c *PrometheusBackend_SetShouldAcceptFinalizedReportDuration_Call) RunAndReturn(run func([]string, float64)) *PrometheusBackend_SetShouldAcceptFinalizedReportDuration_Call { + _c.Call.Return(run) + return _c +} + // SetShouldTransmitAcceptedReportDuration provides a mock function with given fields: _a0, _a1 func (_m *PrometheusBackend) SetShouldTransmitAcceptedReportDuration(_a0 []string, _a1 float64) { _m.Called(_a0, _a1) } +// PrometheusBackend_SetShouldTransmitAcceptedReportDuration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetShouldTransmitAcceptedReportDuration' +type PrometheusBackend_SetShouldTransmitAcceptedReportDuration_Call struct { + *mock.Call +} + +// SetShouldTransmitAcceptedReportDuration is a helper method to define mock.On call +// - _a0 []string +// - _a1 float64 +func (_e *PrometheusBackend_Expecter) SetShouldTransmitAcceptedReportDuration(_a0 interface{}, _a1 interface{}) *PrometheusBackend_SetShouldTransmitAcceptedReportDuration_Call { + return &PrometheusBackend_SetShouldTransmitAcceptedReportDuration_Call{Call: _e.mock.On("SetShouldTransmitAcceptedReportDuration", _a0, _a1)} +} + +func (_c *PrometheusBackend_SetShouldTransmitAcceptedReportDuration_Call) Run(run func(_a0 []string, _a1 float64)) *PrometheusBackend_SetShouldTransmitAcceptedReportDuration_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]string), args[1].(float64)) + }) + return _c +} + +func (_c *PrometheusBackend_SetShouldTransmitAcceptedReportDuration_Call) Return() *PrometheusBackend_SetShouldTransmitAcceptedReportDuration_Call { + _c.Call.Return() + return _c +} + +func (_c *PrometheusBackend_SetShouldTransmitAcceptedReportDuration_Call) RunAndReturn(run func([]string, float64)) *PrometheusBackend_SetShouldTransmitAcceptedReportDuration_Call { + _c.Call.Return(run) + return _c +} + // NewPrometheusBackend creates a new instance of PrometheusBackend. 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 NewPrometheusBackend(t interface { diff --git a/core/services/ocr2/plugins/promwrapper/plugin.go b/core/services/ocr2/plugins/promwrapper/plugin.go index 58d8e171f39..cc6c9d135dd 100644 --- a/core/services/ocr2/plugins/promwrapper/plugin.go +++ b/core/services/ocr2/plugins/promwrapper/plugin.go @@ -132,7 +132,6 @@ var ( ) ) -//go:generate mockery --quiet --name PrometheusBackend --output ./mocks/ --case=underscore type ( // Contains interface for logging OCR telemetry. PrometheusBackend interface { diff --git a/core/services/ocr2/plugins/threshold/decryption_queue.go b/core/services/ocr2/plugins/threshold/decryption_queue.go index 442fcffe8b4..9c5d6d9d84b 100644 --- a/core/services/ocr2/plugins/threshold/decryption_queue.go +++ b/core/services/ocr2/plugins/threshold/decryption_queue.go @@ -13,7 +13,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/job" ) -//go:generate mockery --quiet --name Decryptor --output ./mocks/ --case=underscore type Decryptor interface { Decrypt(ctx context.Context, ciphertextId decryptionPlugin.CiphertextId, ciphertext []byte) ([]byte, error) } diff --git a/core/services/ocr2/plugins/threshold/mocks/decryptor.go b/core/services/ocr2/plugins/threshold/mocks/decryptor.go index daabd6d7de9..1cbf9c2d056 100644 --- a/core/services/ocr2/plugins/threshold/mocks/decryptor.go +++ b/core/services/ocr2/plugins/threshold/mocks/decryptor.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -14,6 +14,14 @@ type Decryptor struct { mock.Mock } +type Decryptor_Expecter struct { + mock *mock.Mock +} + +func (_m *Decryptor) EXPECT() *Decryptor_Expecter { + return &Decryptor_Expecter{mock: &_m.Mock} +} + // Decrypt provides a mock function with given fields: ctx, ciphertextId, ciphertext func (_m *Decryptor) Decrypt(ctx context.Context, ciphertextId decryptionplugin.CiphertextId, ciphertext []byte) ([]byte, error) { ret := _m.Called(ctx, ciphertextId, ciphertext) @@ -44,6 +52,36 @@ func (_m *Decryptor) Decrypt(ctx context.Context, ciphertextId decryptionplugin. return r0, r1 } +// Decryptor_Decrypt_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Decrypt' +type Decryptor_Decrypt_Call struct { + *mock.Call +} + +// Decrypt is a helper method to define mock.On call +// - ctx context.Context +// - ciphertextId decryptionplugin.CiphertextId +// - ciphertext []byte +func (_e *Decryptor_Expecter) Decrypt(ctx interface{}, ciphertextId interface{}, ciphertext interface{}) *Decryptor_Decrypt_Call { + return &Decryptor_Decrypt_Call{Call: _e.mock.On("Decrypt", ctx, ciphertextId, ciphertext)} +} + +func (_c *Decryptor_Decrypt_Call) Run(run func(ctx context.Context, ciphertextId decryptionplugin.CiphertextId, ciphertext []byte)) *Decryptor_Decrypt_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(decryptionplugin.CiphertextId), args[2].([]byte)) + }) + return _c +} + +func (_c *Decryptor_Decrypt_Call) Return(_a0 []byte, _a1 error) *Decryptor_Decrypt_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Decryptor_Decrypt_Call) RunAndReturn(run func(context.Context, decryptionplugin.CiphertextId, []byte) ([]byte, error)) *Decryptor_Decrypt_Call { + _c.Call.Return(run) + return _c +} + // NewDecryptor creates a new instance of Decryptor. 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 NewDecryptor(t interface { diff --git a/core/services/ocr2/validate/validate.go b/core/services/ocr2/validate/validate.go index e39bb6d1c63..2993a67114e 100644 --- a/core/services/ocr2/validate/validate.go +++ b/core/services/ocr2/validate/validate.go @@ -2,7 +2,6 @@ package validate import ( "context" - "encoding/hex" "encoding/json" "errors" "fmt" @@ -20,10 +19,8 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/config/env" "github.com/smartcontractkit/chainlink/v2/core/services/job" - dkgconfig "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/dkg/config" lloconfig "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/llo/config" mercuryconfig "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/mercury/config" - ocr2vrfconfig "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2vrf/config" "github.com/smartcontractkit/chainlink/v2/core/services/ocrcommon" "github.com/smartcontractkit/chainlink/v2/core/services/relay" "github.com/smartcontractkit/chainlink/v2/plugins" @@ -111,10 +108,6 @@ func validateSpec(ctx context.Context, tree *toml.Tree, spec job.Job, rc plugins if spec.Pipeline.Source == "" { return errors.New("no pipeline specified") } - case types.DKG: - return validateDKGSpec(spec.OCR2OracleSpec.PluginConfig) - case types.OCR2VRF: - return validateOCR2VRFSpec(spec.OCR2OracleSpec.PluginConfig) case types.OCR2Keeper: return validateOCR2KeeperSpec(spec.OCR2OracleSpec.PluginConfig) case types.Functions: @@ -312,68 +305,6 @@ func validateGenericPluginSpec(ctx context.Context, spec *job.OCR2OracleSpec, rc return plugin.ValidateConfig(ctx, spec.PluginConfig) } -func validateDKGSpec(jsonConfig job.JSONConfig) error { - if jsonConfig == nil { - return errors.New("pluginConfig is empty") - } - var pluginConfig dkgconfig.PluginConfig - err := json.Unmarshal(jsonConfig.Bytes(), &pluginConfig) - if err != nil { - return pkgerrors.Wrap(err, "error while unmarshaling plugin config") - } - err = validateHexString(pluginConfig.EncryptionPublicKey, 32) - if err != nil { - return pkgerrors.Wrap(err, "validation error for encryptedPublicKey") - } - err = validateHexString(pluginConfig.SigningPublicKey, 32) - if err != nil { - return pkgerrors.Wrap(err, "validation error for signingPublicKey") - } - err = validateHexString(pluginConfig.KeyID, 32) - if err != nil { - return pkgerrors.Wrap(err, "validation error for keyID") - } - - return nil -} - -func validateHexString(val string, expectedLengthInBytes uint) error { - decoded, err := hex.DecodeString(val) - if err != nil { - return pkgerrors.Wrapf(err, "expected hex string but received %s", val) - } - if len(decoded) != int(expectedLengthInBytes) { - return fmt.Errorf("value: %s has unexpected length. Expected %d bytes", val, expectedLengthInBytes) - } - return nil -} - -func validateOCR2VRFSpec(jsonConfig job.JSONConfig) error { - if jsonConfig == nil { - return errors.New("pluginConfig is empty") - } - var cfg ocr2vrfconfig.PluginConfig - err := json.Unmarshal(jsonConfig.Bytes(), &cfg) - if err != nil { - return pkgerrors.Wrap(err, "json unmarshal plugin config") - } - err = validateDKGSpec(job.JSONConfig{ - "encryptionPublicKey": cfg.DKGEncryptionPublicKey, - "signingPublicKey": cfg.DKGSigningPublicKey, - "keyID": cfg.DKGKeyID, - }) - if err != nil { - return err - } - if cfg.LinkEthFeedAddress == "" { - return errors.New("linkEthFeedAddress must be provided") - } - if cfg.DKGContractAddress == "" { - return errors.New("dkgContractAddress must be provided") - } - return nil -} - func validateOCR2KeeperSpec(jsonConfig job.JSONConfig) error { return nil } diff --git a/core/services/ocr2/validate/validate_test.go b/core/services/ocr2/validate/validate_test.go index 05a10caeaf5..b92752c647d 100644 --- a/core/services/ocr2/validate/validate_test.go +++ b/core/services/ocr2/validate/validate_test.go @@ -429,263 +429,6 @@ chainID = 1337 require.Contains(t, err.Error(), "no such relay blerg supported") }, }, - { - name: "valid DKG pluginConfig", - toml: ` -type = "offchainreporting2" -schemaVersion = 1 -name = "dkg" -externalJobID = "6d46d85f-d38c-4f4a-9f00-ac29a25b6330" -maxTaskDuration = "1s" -contractID = "0x3e54dCc49F16411A3aaa4cDbC41A25bCa9763Cee" -ocrKeyBundleID = "08d14c6eed757414d72055d28de6caf06535806c6a14e450f3a2f1c854420e17" -p2pv2Bootstrappers = [ - "12D3KooWSbPRwXY4gxFRJT7LWCnjgGbR4S839nfCRCDgQUiNenxa@127.0.0.1:8000" -] -relay = "evm" -pluginType = "dkg" -transmitterID = "0x74103Cf8b436465870b26aa9Fa2F62AD62b22E35" - -[relayConfig] -chainID = 4 - -[onchainSigningStrategy] -strategyName = "single-chain" -[onchainSigningStrategy.config] -evm = "" -publicKey = "0x1234567890123456789012345678901234567890" - -[pluginConfig] -EncryptionPublicKey = "0e86e8cf899ae9a1b43e023bbe8825b103659bb8d6d4e54f6a3cfae7b106069c" -SigningPublicKey = "eb62dbd2beb7c1524275a8019022f6ce6a7e86c9e65e3099452a2b96fc2432b1" -KeyID = "6f3b82406688b8ddb944c6f2e6d808f014c8fa8d568d639c25019568c715fbf0" -`, - assertion: func(t *testing.T, os job.Job, err error) { - require.NoError(t, err) - }, - }, - { - name: "DKG encryption key is not hex", - toml: ` -type = "offchainreporting2" -schemaVersion = 1 -name = "dkg" -externalJobID = "6d46d85f-d38c-4f4a-9f00-ac29a25b6330" -maxTaskDuration = "1s" -contractID = "0x3e54dCc49F16411A3aaa4cDbC41A25bCa9763Cee" -ocrKeyBundleID = "08d14c6eed757414d72055d28de6caf06535806c6a14e450f3a2f1c854420e17" -p2pv2Bootstrappers = [ - "12D3KooWSbPRwXY4gxFRJT7LWCnjgGbR4S839nfCRCDgQUiNenxa@127.0.0.1:8000" -] -relay = "evm" -pluginType = "dkg" -transmitterID = "0x74103Cf8b436465870b26aa9Fa2F62AD62b22E35" - -[relayConfig] -chainID = 4 - -[onchainSigningStrategy] -strategyName = "single-chain" -[onchainSigningStrategy.config] -evm = "" -publicKey = "0x1234567890123456789012345678901234567890" - -[pluginConfig] -EncryptionPublicKey = "frog" -SigningPublicKey = "eb62dbd2beb7c1524275a8019022f6ce6a7e86c9e65e3099452a2b96fc2432b1" -KeyID = "6f3b82406688b8ddb944c6f2e6d808f014c8fa8d568d639c25019568c715fbf0" -`, - assertion: func(t *testing.T, os job.Job, err error) { - require.Error(t, err) - require.Contains(t, err.Error(), "expected hex string but received frog") - require.Contains(t, err.Error(), "validation error for encryptedPublicKey") - }, - }, - { - name: "DKG encryption key is too short", - toml: ` -type = "offchainreporting2" -schemaVersion = 1 -name = "dkg" -externalJobID = "6d46d85f-d38c-4f4a-9f00-ac29a25b6330" -maxTaskDuration = "1s" -contractID = "0x3e54dCc49F16411A3aaa4cDbC41A25bCa9763Cee" -ocrKeyBundleID = "08d14c6eed757414d72055d28de6caf06535806c6a14e450f3a2f1c854420e17" -p2pv2Bootstrappers = [ - "12D3KooWSbPRwXY4gxFRJT7LWCnjgGbR4S839nfCRCDgQUiNenxa@127.0.0.1:8000" -] -relay = "evm" -pluginType = "dkg" -transmitterID = "0x74103Cf8b436465870b26aa9Fa2F62AD62b22E35" - -[relayConfig] -chainID = 4 - -[onchainSigningStrategy] -strategyName = "single-chain" -[onchainSigningStrategy.config] -evm = "" -publicKey = "0x1234567890123456789012345678901234567890" - -[pluginConfig] -EncryptionPublicKey = "0e86e8cf899ae9a1b43e023bbe8825b103659bb8d6d4e54f6a3cfae7b10606" -SigningPublicKey = "eb62dbd2beb7c1524275a8019022f6ce6a7e86c9e65e3099452a2b96fc2432b1" -KeyID = "6f3b82406688b8ddb944c6f2e6d808f014c8fa8d568d639c25019568c715fbf0" -`, - assertion: func(t *testing.T, os job.Job, err error) { - require.Error(t, err) - require.Contains(t, err.Error(), "value: 0e86e8cf899ae9a1b43e023bbe8825b103659bb8d6d4e54f6a3cfae7b10606 has unexpected length. Expected 32 bytes") - require.Contains(t, err.Error(), "validation error for encryptedPublicKey") - }, - }, - { - name: "DKG signing key is not hex", - toml: ` -type = "offchainreporting2" -schemaVersion = 1 -name = "dkg" -externalJobID = "6d46d85f-d38c-4f4a-9f00-ac29a25b6330" -maxTaskDuration = "1s" -contractID = "0x3e54dCc49F16411A3aaa4cDbC41A25bCa9763Cee" -ocrKeyBundleID = "08d14c6eed757414d72055d28de6caf06535806c6a14e450f3a2f1c854420e17" -p2pv2Bootstrappers = [ - "12D3KooWSbPRwXY4gxFRJT7LWCnjgGbR4S839nfCRCDgQUiNenxa@127.0.0.1:8000" -] -relay = "evm" -pluginType = "dkg" -transmitterID = "0x74103Cf8b436465870b26aa9Fa2F62AD62b22E35" - -[relayConfig] -chainID = 4 - -[onchainSigningStrategy] -strategyName = "single-chain" -[onchainSigningStrategy.config] -evm = "" -publicKey = "0x1234567890123456789012345678901234567890" - -[pluginConfig] -EncryptionPublicKey = "0e86e8cf899ae9a1b43e023bbe8825b103659bb8d6d4e54f6a3cfae7b106069c" -SigningPublicKey = "frog" -KeyID = "6f3b82406688b8ddb944c6f2e6d808f014c8fa8d568d639c25019568c715fbf0" -`, - assertion: func(t *testing.T, os job.Job, err error) { - require.Error(t, err) - require.Contains(t, err.Error(), "expected hex string but received frog") - require.Contains(t, err.Error(), "validation error for signingPublicKey") - }, - }, - { - name: "DKG signing key is too short", - toml: ` -type = "offchainreporting2" -schemaVersion = 1 -name = "dkg" -externalJobID = "6d46d85f-d38c-4f4a-9f00-ac29a25b6330" -maxTaskDuration = "1s" -contractID = "0x3e54dCc49F16411A3aaa4cDbC41A25bCa9763Cee" -ocrKeyBundleID = "08d14c6eed757414d72055d28de6caf06535806c6a14e450f3a2f1c854420e17" -p2pv2Bootstrappers = [ - "12D3KooWSbPRwXY4gxFRJT7LWCnjgGbR4S839nfCRCDgQUiNenxa@127.0.0.1:8000" -] -relay = "evm" -pluginType = "dkg" -transmitterID = "0x74103Cf8b436465870b26aa9Fa2F62AD62b22E35" - -[relayConfig] -chainID = 4 - -[onchainSigningStrategy] -strategyName = "single-chain" -[onchainSigningStrategy.config] -evm = "" -publicKey = "0x1234567890123456789012345678901234567890" - -[pluginConfig] -EncryptionPublicKey = "0e86e8cf899ae9a1b43e023bbe8825b103659bb8d6d4e54f6a3cfae7b106069c" -SigningPublicKey = "eb62dbd2beb7c1524275a8019022f6ce6a7e86c9e65e3099452a2b96fc24" -KeyID = "6f3b82406688b8ddb944c6f2e6d808f014c8fa8d568d639c25019568c715fbf0" -`, - assertion: func(t *testing.T, os job.Job, err error) { - require.Error(t, err) - require.Contains(t, err.Error(), "value: eb62dbd2beb7c1524275a8019022f6ce6a7e86c9e65e3099452a2b96fc24 has unexpected length. Expected 32 bytes") - require.Contains(t, err.Error(), "validation error for signingPublicKey") - }, - }, - { - name: "DKG keyID is not hex", - toml: ` -type = "offchainreporting2" -schemaVersion = 1 -name = "dkg" -externalJobID = "6d46d85f-d38c-4f4a-9f00-ac29a25b6330" -maxTaskDuration = "1s" -contractID = "0x3e54dCc49F16411A3aaa4cDbC41A25bCa9763Cee" -ocrKeyBundleID = "08d14c6eed757414d72055d28de6caf06535806c6a14e450f3a2f1c854420e17" -p2pv2Bootstrappers = [ - "12D3KooWSbPRwXY4gxFRJT7LWCnjgGbR4S839nfCRCDgQUiNenxa@127.0.0.1:8000" -] -relay = "evm" -pluginType = "dkg" -transmitterID = "0x74103Cf8b436465870b26aa9Fa2F62AD62b22E35" - -[relayConfig] -chainID = 4 - -[onchainSigningStrategy] -strategyName = "single-chain" -[onchainSigningStrategy.config] -evm = "" -publicKey = "0x1234567890123456789012345678901234567890" - -[pluginConfig] -EncryptionPublicKey = "0e86e8cf899ae9a1b43e023bbe8825b103659bb8d6d4e54f6a3cfae7b106069c" -SigningPublicKey = "eb62dbd2beb7c1524275a8019022f6ce6a7e86c9e65e3099452a2b96fc2432b1" -KeyID = "frog" -`, - assertion: func(t *testing.T, os job.Job, err error) { - require.Error(t, err) - require.Contains(t, err.Error(), "expected hex string but received frog") - require.Contains(t, err.Error(), "validation error for keyID") - }, - }, - { - name: "DKG keyID is too long", - toml: ` -type = "offchainreporting2" -schemaVersion = 1 -name = "dkg" -externalJobID = "6d46d85f-d38c-4f4a-9f00-ac29a25b6330" -maxTaskDuration = "1s" -contractID = "0x3e54dCc49F16411A3aaa4cDbC41A25bCa9763Cee" -ocrKeyBundleID = "08d14c6eed757414d72055d28de6caf06535806c6a14e450f3a2f1c854420e17" -p2pv2Bootstrappers = [ - "12D3KooWSbPRwXY4gxFRJT7LWCnjgGbR4S839nfCRCDgQUiNenxa@127.0.0.1:8000" -] -relay = "evm" -pluginType = "dkg" -transmitterID = "0x74103Cf8b436465870b26aa9Fa2F62AD62b22E35" - -[relayConfig] -chainID = 4 - -[onchainSigningStrategy] -strategyName = "single-chain" -[onchainSigningStrategy.config] -evm = "" -publicKey = "0x1234567890123456789012345678901234567890" - -[pluginConfig] -EncryptionPublicKey = "0e86e8cf899ae9a1b43e023bbe8825b103659bb8d6d4e54f6a3cfae7b106069c" -SigningPublicKey = "eb62dbd2beb7c1524275a8019022f6ce6a7e86c9e65e3099452a2b96fc2432b1" -KeyID = "6f3b82406688b8ddb944c6f2e6d808f014c8fa8d568d639c25019568c715fbaaaabc" -`, - assertion: func(t *testing.T, os job.Job, err error) { - require.Error(t, err) - require.Contains(t, err.Error(), "value: 6f3b82406688b8ddb944c6f2e6d808f014c8fa8d568d639c25019568c715fbaaaabc has unexpected length. Expected 32 bytes") - require.Contains(t, err.Error(), "validation error for keyID") - }, - }, { name: "Generic public onchain signing strategy with no public key", toml: ` diff --git a/core/services/ocrcommon/data_source.go b/core/services/ocrcommon/data_source.go index 336074f81f8..9e3bde00dc0 100644 --- a/core/services/ocrcommon/data_source.go +++ b/core/services/ocrcommon/data_source.go @@ -193,7 +193,7 @@ func (ds *inMemoryDataSource) executeRun(ctx context.Context) (*pipeline.Run, pi }, }) - run, trrs, err := ds.pipelineRunner.ExecuteRun(ctx, ds.spec, vars, ds.lggr) + run, trrs, err := ds.pipelineRunner.ExecuteRun(ctx, ds.spec, vars) if err != nil { return nil, pipeline.TaskRunResults{}, errors.Wrapf(err, "error executing run for spec ID %v", ds.spec.ID) } @@ -227,7 +227,7 @@ func (ds *inMemoryDataSource) Observe(ctx context.Context, timestamp ocr2types.R return nil, err } - finalResult := trrs.FinalResult(ds.lggr) + finalResult := trrs.FinalResult() setEATelemetry(ds, finalResult, trrs, ObservationTimestamp{ Round: timestamp.Round, Epoch: timestamp.Epoch, @@ -310,7 +310,7 @@ func (ds *inMemoryDataSourceCache) updateCache(ctx context.Context) error { return errors.Wrapf(ds.latestUpdateErr, "error updating in memory data source cache for spec ID %v", ds.spec.ID) } - value, err := ds.inMemoryDataSource.parse(latestTrrs.FinalResult(ds.lggr)) + value, err := ds.inMemoryDataSource.parse(latestTrrs.FinalResult()) if err != nil { ds.latestUpdateErr = errors.Wrapf(err, "invalid result") return ds.latestUpdateErr @@ -318,7 +318,7 @@ func (ds *inMemoryDataSourceCache) updateCache(ctx context.Context) error { // update cache values ds.latestTrrs = latestTrrs - ds.latestResult = ds.latestTrrs.FinalResult(ds.lggr) + ds.latestResult = ds.latestTrrs.FinalResult() ds.latestUpdateErr = nil // backup in case data source fails continuously and node gets rebooted @@ -402,7 +402,7 @@ func (ds *dataSourceBase) observe(ctx context.Context, timestamp ObservationTime // a db write block that. ds.saver.Save(run) - finalResult := trrs.FinalResult(ds.lggr) + finalResult := trrs.FinalResult() setEATelemetry(&ds.inMemoryDataSource, finalResult, trrs, timestamp) return ds.inMemoryDataSource.parse(finalResult) diff --git a/core/services/ocrcommon/peer_wrapper.go b/core/services/ocrcommon/peer_wrapper.go index 762a3d05aa3..325311352fb 100644 --- a/core/services/ocrcommon/peer_wrapper.go +++ b/core/services/ocrcommon/peer_wrapper.go @@ -6,6 +6,7 @@ import ( "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" + "github.com/smartcontractkit/libocr/networking/rageping" ocrnetworking "github.com/smartcontractkit/libocr/networking" ocr1types "github.com/smartcontractkit/libocr/offchainreporting/types" @@ -135,7 +136,8 @@ func (p *SingletonPeerWrapper) peerConfig() (ocrnetworking.PeerConfig, error) { IncomingMessageBufferSize: config.IncomingMessageBufferSize(), OutgoingMessageBufferSize: config.OutgoingMessageBufferSize(), }, - MetricsRegisterer: prometheus.DefaultRegisterer, + MetricsRegisterer: prometheus.DefaultRegisterer, + LatencyMetricsServiceConfigs: rageping.DefaultConfigs(), } return peerConfig, nil diff --git a/core/services/ocrcommon/telemetry.go b/core/services/ocrcommon/telemetry.go index ec50db18aa2..2ef76800a42 100644 --- a/core/services/ocrcommon/telemetry.go +++ b/core/services/ocrcommon/telemetry.go @@ -7,23 +7,20 @@ import ( "math/big" "github.com/ethereum/go-ethereum/common" - - "google.golang.org/protobuf/proto" - "github.com/smartcontractkit/libocr/commontypes" ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + "google.golang.org/protobuf/proto" "github.com/smartcontractkit/chainlink-common/pkg/services" + v1types "github.com/smartcontractkit/chainlink-common/pkg/types/mercury/v1" + v2types "github.com/smartcontractkit/chainlink-common/pkg/types/mercury/v2" + v3types "github.com/smartcontractkit/chainlink-common/pkg/types/mercury/v3" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" mercuryutils "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/utils" "github.com/smartcontractkit/chainlink/v2/core/services/synchronization/telem" "github.com/smartcontractkit/chainlink/v2/core/utils" - - v1types "github.com/smartcontractkit/chainlink-common/pkg/types/mercury/v1" - v2types "github.com/smartcontractkit/chainlink-common/pkg/types/mercury/v2" - v3types "github.com/smartcontractkit/chainlink-common/pkg/types/mercury/v3" ) type eaTelemetry struct { @@ -41,15 +38,16 @@ type EnhancedTelemetryData struct { } type EnhancedTelemetryMercuryData struct { - V1Observation *v1types.Observation - V2Observation *v2types.Observation - V3Observation *v3types.Observation - TaskRunResults pipeline.TaskRunResults - RepTimestamp ocrtypes.ReportTimestamp - FeedVersion mercuryutils.FeedVersion - FetchMaxFinalizedTimestamp bool - IsLinkFeed bool - IsNativeFeed bool + V1Observation *v1types.Observation + V2Observation *v2types.Observation + V3Observation *v3types.Observation + TaskRunResults pipeline.TaskRunResults + RepTimestamp ocrtypes.ReportTimestamp + FeedVersion mercuryutils.FeedVersion + FetchMaxFinalizedTimestamp bool + IsLinkFeed bool + IsNativeFeed bool + DpInvariantViolationDetected bool } type EnhancedTelemetryService[T EnhancedTelemetryData | EnhancedTelemetryMercuryData] struct { @@ -295,7 +293,7 @@ func (e *EnhancedTelemetryService[T]) collectMercuryEnhancedTelemetry(d Enhanced var bt uint64 // v1+v2+v3 fields bp := big.NewInt(0) - //v1+v3 fields + // v1+v3 fields bid := big.NewInt(0) ask := big.NewInt(0) // v2+v3 fields @@ -384,6 +382,7 @@ func (e *EnhancedTelemetryService[T]) collectMercuryEnhancedTelemetry(d Enhanced DpBenchmarkPrice: benchmarkPrice, DpBid: bidPrice, DpAsk: askPrice, + DpInvariantViolationDetected: d.DpInvariantViolationDetected, CurrentBlockNumber: bn, CurrentBlockHash: bh, CurrentBlockTimestamp: bt, diff --git a/core/services/p2p/types/mocks/peer.go b/core/services/p2p/types/mocks/peer.go index 3a2e218c170..4fad5488e86 100644 --- a/core/services/p2p/types/mocks/peer.go +++ b/core/services/p2p/types/mocks/peer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -16,6 +16,14 @@ type Peer struct { mock.Mock } +type Peer_Expecter struct { + mock *mock.Mock +} + +func (_m *Peer) EXPECT() *Peer_Expecter { + return &Peer_Expecter{mock: &_m.Mock} +} + // Close provides a mock function with given fields: func (_m *Peer) Close() error { ret := _m.Called() @@ -34,6 +42,33 @@ func (_m *Peer) Close() error { return r0 } +// Peer_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type Peer_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *Peer_Expecter) Close() *Peer_Close_Call { + return &Peer_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *Peer_Close_Call) Run(run func()) *Peer_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Peer_Close_Call) Return(_a0 error) *Peer_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Peer_Close_Call) RunAndReturn(run func() error) *Peer_Close_Call { + _c.Call.Return(run) + return _c +} + // HealthReport provides a mock function with given fields: func (_m *Peer) HealthReport() map[string]error { ret := _m.Called() @@ -54,6 +89,33 @@ func (_m *Peer) HealthReport() map[string]error { return r0 } +// Peer_HealthReport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HealthReport' +type Peer_HealthReport_Call struct { + *mock.Call +} + +// HealthReport is a helper method to define mock.On call +func (_e *Peer_Expecter) HealthReport() *Peer_HealthReport_Call { + return &Peer_HealthReport_Call{Call: _e.mock.On("HealthReport")} +} + +func (_c *Peer_HealthReport_Call) Run(run func()) *Peer_HealthReport_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Peer_HealthReport_Call) Return(_a0 map[string]error) *Peer_HealthReport_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Peer_HealthReport_Call) RunAndReturn(run func() map[string]error) *Peer_HealthReport_Call { + _c.Call.Return(run) + return _c +} + // ID provides a mock function with given fields: func (_m *Peer) ID() ragep2ptypes.PeerID { ret := _m.Called() @@ -74,6 +136,33 @@ func (_m *Peer) ID() ragep2ptypes.PeerID { return r0 } +// Peer_ID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ID' +type Peer_ID_Call struct { + *mock.Call +} + +// ID is a helper method to define mock.On call +func (_e *Peer_Expecter) ID() *Peer_ID_Call { + return &Peer_ID_Call{Call: _e.mock.On("ID")} +} + +func (_c *Peer_ID_Call) Run(run func()) *Peer_ID_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Peer_ID_Call) Return(_a0 ragep2ptypes.PeerID) *Peer_ID_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Peer_ID_Call) RunAndReturn(run func() ragep2ptypes.PeerID) *Peer_ID_Call { + _c.Call.Return(run) + return _c +} + // Name provides a mock function with given fields: func (_m *Peer) Name() string { ret := _m.Called() @@ -92,6 +181,33 @@ func (_m *Peer) Name() string { return r0 } +// Peer_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type Peer_Name_Call struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *Peer_Expecter) Name() *Peer_Name_Call { + return &Peer_Name_Call{Call: _e.mock.On("Name")} +} + +func (_c *Peer_Name_Call) Run(run func()) *Peer_Name_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Peer_Name_Call) Return(_a0 string) *Peer_Name_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Peer_Name_Call) RunAndReturn(run func() string) *Peer_Name_Call { + _c.Call.Return(run) + return _c +} + // Ready provides a mock function with given fields: func (_m *Peer) Ready() error { ret := _m.Called() @@ -110,6 +226,33 @@ func (_m *Peer) Ready() error { return r0 } +// Peer_Ready_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ready' +type Peer_Ready_Call struct { + *mock.Call +} + +// Ready is a helper method to define mock.On call +func (_e *Peer_Expecter) Ready() *Peer_Ready_Call { + return &Peer_Ready_Call{Call: _e.mock.On("Ready")} +} + +func (_c *Peer_Ready_Call) Run(run func()) *Peer_Ready_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Peer_Ready_Call) Return(_a0 error) *Peer_Ready_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Peer_Ready_Call) RunAndReturn(run func() error) *Peer_Ready_Call { + _c.Call.Return(run) + return _c +} + // Receive provides a mock function with given fields: func (_m *Peer) Receive() <-chan types.Message { ret := _m.Called() @@ -130,6 +273,33 @@ func (_m *Peer) Receive() <-chan types.Message { return r0 } +// Peer_Receive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Receive' +type Peer_Receive_Call struct { + *mock.Call +} + +// Receive is a helper method to define mock.On call +func (_e *Peer_Expecter) Receive() *Peer_Receive_Call { + return &Peer_Receive_Call{Call: _e.mock.On("Receive")} +} + +func (_c *Peer_Receive_Call) Run(run func()) *Peer_Receive_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Peer_Receive_Call) Return(_a0 <-chan types.Message) *Peer_Receive_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Peer_Receive_Call) RunAndReturn(run func() <-chan types.Message) *Peer_Receive_Call { + _c.Call.Return(run) + return _c +} + // 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) @@ -148,6 +318,35 @@ func (_m *Peer) Send(peerID ragep2ptypes.PeerID, msg []byte) error { return r0 } +// Peer_Send_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Send' +type Peer_Send_Call struct { + *mock.Call +} + +// Send is a helper method to define mock.On call +// - peerID ragep2ptypes.PeerID +// - msg []byte +func (_e *Peer_Expecter) Send(peerID interface{}, msg interface{}) *Peer_Send_Call { + return &Peer_Send_Call{Call: _e.mock.On("Send", peerID, msg)} +} + +func (_c *Peer_Send_Call) Run(run func(peerID ragep2ptypes.PeerID, msg []byte)) *Peer_Send_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(ragep2ptypes.PeerID), args[1].([]byte)) + }) + return _c +} + +func (_c *Peer_Send_Call) Return(_a0 error) *Peer_Send_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Peer_Send_Call) RunAndReturn(run func(ragep2ptypes.PeerID, []byte) error) *Peer_Send_Call { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *Peer) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -166,6 +365,34 @@ func (_m *Peer) Start(_a0 context.Context) error { return r0 } +// Peer_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type Peer_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *Peer_Expecter) Start(_a0 interface{}) *Peer_Start_Call { + return &Peer_Start_Call{Call: _e.mock.On("Start", _a0)} +} + +func (_c *Peer_Start_Call) Run(run func(_a0 context.Context)) *Peer_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Peer_Start_Call) Return(_a0 error) *Peer_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Peer_Start_Call) RunAndReturn(run func(context.Context) error) *Peer_Start_Call { + _c.Call.Return(run) + return _c +} + // UpdateConnections provides a mock function with given fields: peers func (_m *Peer) UpdateConnections(peers map[ragep2ptypes.PeerID]types.StreamConfig) error { ret := _m.Called(peers) @@ -184,6 +411,34 @@ func (_m *Peer) UpdateConnections(peers map[ragep2ptypes.PeerID]types.StreamConf return r0 } +// Peer_UpdateConnections_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateConnections' +type Peer_UpdateConnections_Call struct { + *mock.Call +} + +// UpdateConnections is a helper method to define mock.On call +// - peers map[ragep2ptypes.PeerID]types.StreamConfig +func (_e *Peer_Expecter) UpdateConnections(peers interface{}) *Peer_UpdateConnections_Call { + return &Peer_UpdateConnections_Call{Call: _e.mock.On("UpdateConnections", peers)} +} + +func (_c *Peer_UpdateConnections_Call) Run(run func(peers map[ragep2ptypes.PeerID]types.StreamConfig)) *Peer_UpdateConnections_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(map[ragep2ptypes.PeerID]types.StreamConfig)) + }) + return _c +} + +func (_c *Peer_UpdateConnections_Call) Return(_a0 error) *Peer_UpdateConnections_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Peer_UpdateConnections_Call) RunAndReturn(run func(map[ragep2ptypes.PeerID]types.StreamConfig) error) *Peer_UpdateConnections_Call { + _c.Call.Return(run) + return _c +} + // 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 { diff --git a/core/services/p2p/types/mocks/peer_wrapper.go b/core/services/p2p/types/mocks/peer_wrapper.go index cd20dc7ad94..c7b76b58f4e 100644 --- a/core/services/p2p/types/mocks/peer_wrapper.go +++ b/core/services/p2p/types/mocks/peer_wrapper.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -14,6 +14,14 @@ type PeerWrapper struct { mock.Mock } +type PeerWrapper_Expecter struct { + mock *mock.Mock +} + +func (_m *PeerWrapper) EXPECT() *PeerWrapper_Expecter { + return &PeerWrapper_Expecter{mock: &_m.Mock} +} + // Close provides a mock function with given fields: func (_m *PeerWrapper) Close() error { ret := _m.Called() @@ -32,6 +40,33 @@ func (_m *PeerWrapper) Close() error { return r0 } +// PeerWrapper_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type PeerWrapper_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *PeerWrapper_Expecter) Close() *PeerWrapper_Close_Call { + return &PeerWrapper_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *PeerWrapper_Close_Call) Run(run func()) *PeerWrapper_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *PeerWrapper_Close_Call) Return(_a0 error) *PeerWrapper_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *PeerWrapper_Close_Call) RunAndReturn(run func() error) *PeerWrapper_Close_Call { + _c.Call.Return(run) + return _c +} + // GetPeer provides a mock function with given fields: func (_m *PeerWrapper) GetPeer() types.Peer { ret := _m.Called() @@ -52,6 +87,33 @@ func (_m *PeerWrapper) GetPeer() types.Peer { return r0 } +// PeerWrapper_GetPeer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPeer' +type PeerWrapper_GetPeer_Call struct { + *mock.Call +} + +// GetPeer is a helper method to define mock.On call +func (_e *PeerWrapper_Expecter) GetPeer() *PeerWrapper_GetPeer_Call { + return &PeerWrapper_GetPeer_Call{Call: _e.mock.On("GetPeer")} +} + +func (_c *PeerWrapper_GetPeer_Call) Run(run func()) *PeerWrapper_GetPeer_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *PeerWrapper_GetPeer_Call) Return(_a0 types.Peer) *PeerWrapper_GetPeer_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *PeerWrapper_GetPeer_Call) RunAndReturn(run func() types.Peer) *PeerWrapper_GetPeer_Call { + _c.Call.Return(run) + return _c +} + // HealthReport provides a mock function with given fields: func (_m *PeerWrapper) HealthReport() map[string]error { ret := _m.Called() @@ -72,6 +134,33 @@ func (_m *PeerWrapper) HealthReport() map[string]error { return r0 } +// PeerWrapper_HealthReport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HealthReport' +type PeerWrapper_HealthReport_Call struct { + *mock.Call +} + +// HealthReport is a helper method to define mock.On call +func (_e *PeerWrapper_Expecter) HealthReport() *PeerWrapper_HealthReport_Call { + return &PeerWrapper_HealthReport_Call{Call: _e.mock.On("HealthReport")} +} + +func (_c *PeerWrapper_HealthReport_Call) Run(run func()) *PeerWrapper_HealthReport_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *PeerWrapper_HealthReport_Call) Return(_a0 map[string]error) *PeerWrapper_HealthReport_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *PeerWrapper_HealthReport_Call) RunAndReturn(run func() map[string]error) *PeerWrapper_HealthReport_Call { + _c.Call.Return(run) + return _c +} + // Name provides a mock function with given fields: func (_m *PeerWrapper) Name() string { ret := _m.Called() @@ -90,6 +179,33 @@ func (_m *PeerWrapper) Name() string { return r0 } +// PeerWrapper_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type PeerWrapper_Name_Call struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *PeerWrapper_Expecter) Name() *PeerWrapper_Name_Call { + return &PeerWrapper_Name_Call{Call: _e.mock.On("Name")} +} + +func (_c *PeerWrapper_Name_Call) Run(run func()) *PeerWrapper_Name_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *PeerWrapper_Name_Call) Return(_a0 string) *PeerWrapper_Name_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *PeerWrapper_Name_Call) RunAndReturn(run func() string) *PeerWrapper_Name_Call { + _c.Call.Return(run) + return _c +} + // Ready provides a mock function with given fields: func (_m *PeerWrapper) Ready() error { ret := _m.Called() @@ -108,6 +224,33 @@ func (_m *PeerWrapper) Ready() error { return r0 } +// PeerWrapper_Ready_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ready' +type PeerWrapper_Ready_Call struct { + *mock.Call +} + +// Ready is a helper method to define mock.On call +func (_e *PeerWrapper_Expecter) Ready() *PeerWrapper_Ready_Call { + return &PeerWrapper_Ready_Call{Call: _e.mock.On("Ready")} +} + +func (_c *PeerWrapper_Ready_Call) Run(run func()) *PeerWrapper_Ready_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *PeerWrapper_Ready_Call) Return(_a0 error) *PeerWrapper_Ready_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *PeerWrapper_Ready_Call) RunAndReturn(run func() error) *PeerWrapper_Ready_Call { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *PeerWrapper) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -126,6 +269,34 @@ func (_m *PeerWrapper) Start(_a0 context.Context) error { return r0 } +// PeerWrapper_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type PeerWrapper_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *PeerWrapper_Expecter) Start(_a0 interface{}) *PeerWrapper_Start_Call { + return &PeerWrapper_Start_Call{Call: _e.mock.On("Start", _a0)} +} + +func (_c *PeerWrapper_Start_Call) Run(run func(_a0 context.Context)) *PeerWrapper_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *PeerWrapper_Start_Call) Return(_a0 error) *PeerWrapper_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *PeerWrapper_Start_Call) RunAndReturn(run func(context.Context) error) *PeerWrapper_Start_Call { + _c.Call.Return(run) + return _c +} + // 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 { diff --git a/core/services/p2p/types/mocks/signer.go b/core/services/p2p/types/mocks/signer.go index baacbef07bd..e9dd3665b5e 100644 --- a/core/services/p2p/types/mocks/signer.go +++ b/core/services/p2p/types/mocks/signer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -9,6 +9,14 @@ type Signer struct { mock.Mock } +type Signer_Expecter struct { + mock *mock.Mock +} + +func (_m *Signer) EXPECT() *Signer_Expecter { + return &Signer_Expecter{mock: &_m.Mock} +} + // Sign provides a mock function with given fields: data func (_m *Signer) Sign(data []byte) ([]byte, error) { ret := _m.Called(data) @@ -39,6 +47,34 @@ func (_m *Signer) Sign(data []byte) ([]byte, error) { return r0, r1 } +// Signer_Sign_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Sign' +type Signer_Sign_Call struct { + *mock.Call +} + +// Sign is a helper method to define mock.On call +// - data []byte +func (_e *Signer_Expecter) Sign(data interface{}) *Signer_Sign_Call { + return &Signer_Sign_Call{Call: _e.mock.On("Sign", data)} +} + +func (_c *Signer_Sign_Call) Run(run func(data []byte)) *Signer_Sign_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]byte)) + }) + return _c +} + +func (_c *Signer_Sign_Call) Return(_a0 []byte, _a1 error) *Signer_Sign_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Signer_Sign_Call) RunAndReturn(run func([]byte) ([]byte, error)) *Signer_Sign_Call { + _c.Call.Return(run) + return _c +} + // NewSigner creates a new instance of Signer. 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 NewSigner(t interface { diff --git a/core/services/p2p/types/types.go b/core/services/p2p/types/types.go index 837e075860a..a6db2a8fe1d 100644 --- a/core/services/p2p/types/types.go +++ b/core/services/p2p/types/types.go @@ -11,7 +11,6 @@ const PeerIDLength = 32 type PeerID = ragetypes.PeerID -//go:generate mockery --quiet --name Peer --output ./mocks/ --case=underscore type Peer interface { services.Service ID() PeerID @@ -20,13 +19,11 @@ type Peer interface { Receive() <-chan Message } -//go:generate mockery --quiet --name PeerWrapper --output ./mocks/ --case=underscore type PeerWrapper interface { services.Service GetPeer() Peer } -//go:generate mockery --quiet --name Signer --output ./mocks/ --case=underscore type Signer interface { Sign(data []byte) ([]byte, error) } diff --git a/core/services/pg/connection.go b/core/services/pg/connection.go index b76c9bc10ed..c1e6248b13f 100644 --- a/core/services/pg/connection.go +++ b/core/services/pg/connection.go @@ -2,6 +2,7 @@ package pg import ( "database/sql" + "errors" "fmt" "log" "os" @@ -9,6 +10,7 @@ import ( "github.com/XSAM/otelsql" "github.com/google/uuid" + "github.com/jackc/pgconn" "github.com/jackc/pgx/v4" "github.com/jackc/pgx/v4/stdlib" "github.com/jmoiron/sqlx" @@ -130,6 +132,14 @@ func setMaxConns(db *sqlx.DB, config ConnectionConfig) { // See: https://smartcontract-it.atlassian.net/browse/MERC-3654 var cnt int if err := db.Get(&cnt, `SELECT COUNT(*) FROM ocr2_oracle_specs WHERE plugin_type = 'mercury'`); err != nil { + const errUndefinedTable = "42P01" + var pqerr *pgconn.PgError + if errors.As(err, &pqerr) { + if pqerr.Code == errUndefinedTable { + // no mercury jobs defined + return + } + } log.Printf("Error checking mercury jobs: %s", err.Error()) return } diff --git a/core/services/pipeline/common.go b/core/services/pipeline/common.go index 1e2c52dad66..763e50546fd 100644 --- a/core/services/pipeline/common.go +++ b/core/services/pipeline/common.go @@ -3,6 +3,7 @@ package pipeline import ( "context" "errors" + "fmt" "net/url" "reflect" "sort" @@ -43,8 +44,6 @@ const ( StandardCapabilitiesJobType string = "standardcapabilities" ) -//go:generate mockery --quiet --name Config --output ./mocks/ --case=underscore - type ( Task interface { Type() TaskType @@ -231,7 +230,7 @@ func (trrs TaskRunResults) GetTaskRunResultsFinishedAt() time.Time { // FinalResult pulls the FinalResult for the pipeline_run from the task runs // It needs to respect the output index of each task -func (trrs TaskRunResults) FinalResult(l logger.Logger) FinalResult { +func (trrs TaskRunResults) FinalResult() FinalResult { var found bool var fr FinalResult sort.Slice(trrs, func(i, j int) bool { @@ -247,7 +246,7 @@ func (trrs TaskRunResults) FinalResult(l logger.Logger) FinalResult { } if !found { - l.Panicw("Expected at least one task to be final", "tasks", trrs) + panic(fmt.Sprintf("expected at least one task to be final: %v", trrs)) } return fr } diff --git a/core/services/pipeline/common_http.go b/core/services/pipeline/common_http.go index 492cc8f8f76..06a6c1a372c 100644 --- a/core/services/pipeline/common_http.go +++ b/core/services/pipeline/common_http.go @@ -64,7 +64,7 @@ func makeHTTPRequest( if statusCode >= 400 { maybeErr := bestEffortExtractError(responseBytes) - return nil, statusCode, respHeaders, 0, errors.Errorf("got error from %s: (status code %v) %s", url.String(), statusCode, maybeErr) + return responseBytes, statusCode, respHeaders, 0, errors.Errorf("got error from %s: (status code %v) %s", url.String(), statusCode, maybeErr) } return responseBytes, statusCode, respHeaders, elapsed, nil } diff --git a/core/services/pipeline/internal/eautils/eautils.go b/core/services/pipeline/eautils/eautils.go similarity index 61% rename from core/services/pipeline/internal/eautils/eautils.go rename to core/services/pipeline/eautils/eautils.go index 30faa826b22..ddb8de79774 100644 --- a/core/services/pipeline/internal/eautils/eautils.go +++ b/core/services/pipeline/eautils/eautils.go @@ -2,6 +2,7 @@ package eautils import ( "encoding/json" + "fmt" "net/http" ) @@ -37,3 +38,28 @@ func BestEffortExtractEAStatus(responseBytes []byte) (code int, ok bool) { return *status.StatusCode, true } + +type adapterErrorResponse struct { + Error *AdapterError `json:"error"` +} + +type AdapterError struct { + Name string `json:"name"` + Message string `json:"message"` +} + +func (err *AdapterError) Error() string { + return fmt.Sprintf("%s: %s", err.Name, err.Message) +} + +func BestEffortExtractEAError(responseBytes []byte) error { + var errorResponse adapterErrorResponse + err := json.Unmarshal(responseBytes, &errorResponse) + if err != nil { + return nil + } + if errorResponse.Error != nil { + return errorResponse.Error + } + return nil +} diff --git a/core/services/pipeline/internal/eautils/eautils_test.go b/core/services/pipeline/eautils/eautils_test.go similarity index 100% rename from core/services/pipeline/internal/eautils/eautils_test.go rename to core/services/pipeline/eautils/eautils_test.go diff --git a/core/services/pipeline/mocks/config.go b/core/services/pipeline/mocks/config.go index 1c9213443fa..f92c7609c70 100644 --- a/core/services/pipeline/mocks/config.go +++ b/core/services/pipeline/mocks/config.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -14,6 +14,14 @@ type Config struct { mock.Mock } +type Config_Expecter struct { + mock *mock.Mock +} + +func (_m *Config) EXPECT() *Config_Expecter { + return &Config_Expecter{mock: &_m.Mock} +} + // DefaultHTTPLimit provides a mock function with given fields: func (_m *Config) DefaultHTTPLimit() int64 { ret := _m.Called() @@ -32,6 +40,33 @@ func (_m *Config) DefaultHTTPLimit() int64 { return r0 } +// Config_DefaultHTTPLimit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DefaultHTTPLimit' +type Config_DefaultHTTPLimit_Call struct { + *mock.Call +} + +// DefaultHTTPLimit is a helper method to define mock.On call +func (_e *Config_Expecter) DefaultHTTPLimit() *Config_DefaultHTTPLimit_Call { + return &Config_DefaultHTTPLimit_Call{Call: _e.mock.On("DefaultHTTPLimit")} +} + +func (_c *Config_DefaultHTTPLimit_Call) Run(run func()) *Config_DefaultHTTPLimit_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Config_DefaultHTTPLimit_Call) Return(_a0 int64) *Config_DefaultHTTPLimit_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Config_DefaultHTTPLimit_Call) RunAndReturn(run func() int64) *Config_DefaultHTTPLimit_Call { + _c.Call.Return(run) + return _c +} + // DefaultHTTPTimeout provides a mock function with given fields: func (_m *Config) DefaultHTTPTimeout() config.Duration { ret := _m.Called() @@ -50,6 +85,33 @@ func (_m *Config) DefaultHTTPTimeout() config.Duration { return r0 } +// Config_DefaultHTTPTimeout_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DefaultHTTPTimeout' +type Config_DefaultHTTPTimeout_Call struct { + *mock.Call +} + +// DefaultHTTPTimeout is a helper method to define mock.On call +func (_e *Config_Expecter) DefaultHTTPTimeout() *Config_DefaultHTTPTimeout_Call { + return &Config_DefaultHTTPTimeout_Call{Call: _e.mock.On("DefaultHTTPTimeout")} +} + +func (_c *Config_DefaultHTTPTimeout_Call) Run(run func()) *Config_DefaultHTTPTimeout_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Config_DefaultHTTPTimeout_Call) Return(_a0 config.Duration) *Config_DefaultHTTPTimeout_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Config_DefaultHTTPTimeout_Call) RunAndReturn(run func() config.Duration) *Config_DefaultHTTPTimeout_Call { + _c.Call.Return(run) + return _c +} + // MaxRunDuration provides a mock function with given fields: func (_m *Config) MaxRunDuration() time.Duration { ret := _m.Called() @@ -68,6 +130,33 @@ func (_m *Config) MaxRunDuration() time.Duration { return r0 } +// Config_MaxRunDuration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MaxRunDuration' +type Config_MaxRunDuration_Call struct { + *mock.Call +} + +// MaxRunDuration is a helper method to define mock.On call +func (_e *Config_Expecter) MaxRunDuration() *Config_MaxRunDuration_Call { + return &Config_MaxRunDuration_Call{Call: _e.mock.On("MaxRunDuration")} +} + +func (_c *Config_MaxRunDuration_Call) Run(run func()) *Config_MaxRunDuration_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Config_MaxRunDuration_Call) Return(_a0 time.Duration) *Config_MaxRunDuration_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Config_MaxRunDuration_Call) RunAndReturn(run func() time.Duration) *Config_MaxRunDuration_Call { + _c.Call.Return(run) + return _c +} + // ReaperInterval provides a mock function with given fields: func (_m *Config) ReaperInterval() time.Duration { ret := _m.Called() @@ -86,6 +175,33 @@ func (_m *Config) ReaperInterval() time.Duration { return r0 } +// Config_ReaperInterval_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReaperInterval' +type Config_ReaperInterval_Call struct { + *mock.Call +} + +// ReaperInterval is a helper method to define mock.On call +func (_e *Config_Expecter) ReaperInterval() *Config_ReaperInterval_Call { + return &Config_ReaperInterval_Call{Call: _e.mock.On("ReaperInterval")} +} + +func (_c *Config_ReaperInterval_Call) Run(run func()) *Config_ReaperInterval_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Config_ReaperInterval_Call) Return(_a0 time.Duration) *Config_ReaperInterval_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Config_ReaperInterval_Call) RunAndReturn(run func() time.Duration) *Config_ReaperInterval_Call { + _c.Call.Return(run) + return _c +} + // ReaperThreshold provides a mock function with given fields: func (_m *Config) ReaperThreshold() time.Duration { ret := _m.Called() @@ -104,6 +220,33 @@ func (_m *Config) ReaperThreshold() time.Duration { return r0 } +// Config_ReaperThreshold_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReaperThreshold' +type Config_ReaperThreshold_Call struct { + *mock.Call +} + +// ReaperThreshold is a helper method to define mock.On call +func (_e *Config_Expecter) ReaperThreshold() *Config_ReaperThreshold_Call { + return &Config_ReaperThreshold_Call{Call: _e.mock.On("ReaperThreshold")} +} + +func (_c *Config_ReaperThreshold_Call) Run(run func()) *Config_ReaperThreshold_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Config_ReaperThreshold_Call) Return(_a0 time.Duration) *Config_ReaperThreshold_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Config_ReaperThreshold_Call) RunAndReturn(run func() time.Duration) *Config_ReaperThreshold_Call { + _c.Call.Return(run) + return _c +} + // VerboseLogging provides a mock function with given fields: func (_m *Config) VerboseLogging() bool { ret := _m.Called() @@ -122,6 +265,33 @@ func (_m *Config) VerboseLogging() bool { return r0 } +// Config_VerboseLogging_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VerboseLogging' +type Config_VerboseLogging_Call struct { + *mock.Call +} + +// VerboseLogging is a helper method to define mock.On call +func (_e *Config_Expecter) VerboseLogging() *Config_VerboseLogging_Call { + return &Config_VerboseLogging_Call{Call: _e.mock.On("VerboseLogging")} +} + +func (_c *Config_VerboseLogging_Call) Run(run func()) *Config_VerboseLogging_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Config_VerboseLogging_Call) Return(_a0 bool) *Config_VerboseLogging_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Config_VerboseLogging_Call) RunAndReturn(run func() bool) *Config_VerboseLogging_Call { + _c.Call.Return(run) + return _c +} + // 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/mocks/orm.go b/core/services/pipeline/mocks/orm.go index 9bd5ddfbdea..3563fcab08e 100644 --- a/core/services/pipeline/mocks/orm.go +++ b/core/services/pipeline/mocks/orm.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -22,6 +22,14 @@ type ORM struct { mock.Mock } +type ORM_Expecter struct { + mock *mock.Mock +} + +func (_m *ORM) EXPECT() *ORM_Expecter { + return &ORM_Expecter{mock: &_m.Mock} +} + // Close provides a mock function with given fields: func (_m *ORM) Close() error { ret := _m.Called() @@ -40,6 +48,33 @@ func (_m *ORM) Close() error { return r0 } +// ORM_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type ORM_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *ORM_Expecter) Close() *ORM_Close_Call { + return &ORM_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *ORM_Close_Call) Run(run func()) *ORM_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ORM_Close_Call) Return(_a0 error) *ORM_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_Close_Call) RunAndReturn(run func() error) *ORM_Close_Call { + _c.Call.Return(run) + return _c +} + // CreateRun provides a mock function with given fields: ctx, run func (_m *ORM) CreateRun(ctx context.Context, run *pipeline.Run) error { ret := _m.Called(ctx, run) @@ -58,6 +93,35 @@ func (_m *ORM) CreateRun(ctx context.Context, run *pipeline.Run) error { return r0 } +// ORM_CreateRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateRun' +type ORM_CreateRun_Call struct { + *mock.Call +} + +// CreateRun is a helper method to define mock.On call +// - ctx context.Context +// - run *pipeline.Run +func (_e *ORM_Expecter) CreateRun(ctx interface{}, run interface{}) *ORM_CreateRun_Call { + return &ORM_CreateRun_Call{Call: _e.mock.On("CreateRun", ctx, run)} +} + +func (_c *ORM_CreateRun_Call) Run(run func(ctx context.Context, run *pipeline.Run)) *ORM_CreateRun_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*pipeline.Run)) + }) + return _c +} + +func (_c *ORM_CreateRun_Call) Return(err error) *ORM_CreateRun_Call { + _c.Call.Return(err) + return _c +} + +func (_c *ORM_CreateRun_Call) RunAndReturn(run func(context.Context, *pipeline.Run) error) *ORM_CreateRun_Call { + _c.Call.Return(run) + return _c +} + // CreateSpec provides a mock function with given fields: ctx, _a1, maxTaskTimeout func (_m *ORM) CreateSpec(ctx context.Context, _a1 pipeline.Pipeline, maxTaskTimeout models.Interval) (int32, error) { ret := _m.Called(ctx, _a1, maxTaskTimeout) @@ -86,6 +150,36 @@ func (_m *ORM) CreateSpec(ctx context.Context, _a1 pipeline.Pipeline, maxTaskTim return r0, r1 } +// ORM_CreateSpec_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateSpec' +type ORM_CreateSpec_Call struct { + *mock.Call +} + +// CreateSpec is a helper method to define mock.On call +// - ctx context.Context +// - _a1 pipeline.Pipeline +// - maxTaskTimeout models.Interval +func (_e *ORM_Expecter) CreateSpec(ctx interface{}, _a1 interface{}, maxTaskTimeout interface{}) *ORM_CreateSpec_Call { + return &ORM_CreateSpec_Call{Call: _e.mock.On("CreateSpec", ctx, _a1, maxTaskTimeout)} +} + +func (_c *ORM_CreateSpec_Call) Run(run func(ctx context.Context, _a1 pipeline.Pipeline, maxTaskTimeout models.Interval)) *ORM_CreateSpec_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(pipeline.Pipeline), args[2].(models.Interval)) + }) + return _c +} + +func (_c *ORM_CreateSpec_Call) Return(_a0 int32, _a1 error) *ORM_CreateSpec_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ORM_CreateSpec_Call) RunAndReturn(run func(context.Context, pipeline.Pipeline, models.Interval) (int32, error)) *ORM_CreateSpec_Call { + _c.Call.Return(run) + return _c +} + // DataSource provides a mock function with given fields: func (_m *ORM) DataSource() sqlutil.DataSource { ret := _m.Called() @@ -106,6 +200,33 @@ func (_m *ORM) DataSource() sqlutil.DataSource { return r0 } +// ORM_DataSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DataSource' +type ORM_DataSource_Call struct { + *mock.Call +} + +// DataSource is a helper method to define mock.On call +func (_e *ORM_Expecter) DataSource() *ORM_DataSource_Call { + return &ORM_DataSource_Call{Call: _e.mock.On("DataSource")} +} + +func (_c *ORM_DataSource_Call) Run(run func()) *ORM_DataSource_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ORM_DataSource_Call) Return(_a0 sqlutil.DataSource) *ORM_DataSource_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_DataSource_Call) RunAndReturn(run func() sqlutil.DataSource) *ORM_DataSource_Call { + _c.Call.Return(run) + return _c +} + // DeleteRun provides a mock function with given fields: ctx, id func (_m *ORM) DeleteRun(ctx context.Context, id int64) error { ret := _m.Called(ctx, id) @@ -124,6 +245,35 @@ func (_m *ORM) DeleteRun(ctx context.Context, id int64) error { return r0 } +// ORM_DeleteRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteRun' +type ORM_DeleteRun_Call struct { + *mock.Call +} + +// DeleteRun is a helper method to define mock.On call +// - ctx context.Context +// - id int64 +func (_e *ORM_Expecter) DeleteRun(ctx interface{}, id interface{}) *ORM_DeleteRun_Call { + return &ORM_DeleteRun_Call{Call: _e.mock.On("DeleteRun", ctx, id)} +} + +func (_c *ORM_DeleteRun_Call) Run(run func(ctx context.Context, id int64)) *ORM_DeleteRun_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64)) + }) + return _c +} + +func (_c *ORM_DeleteRun_Call) Return(_a0 error) *ORM_DeleteRun_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_DeleteRun_Call) RunAndReturn(run func(context.Context, int64) error) *ORM_DeleteRun_Call { + _c.Call.Return(run) + return _c +} + // DeleteRunsOlderThan provides a mock function with given fields: _a0, _a1 func (_m *ORM) DeleteRunsOlderThan(_a0 context.Context, _a1 time.Duration) error { ret := _m.Called(_a0, _a1) @@ -142,6 +292,35 @@ func (_m *ORM) DeleteRunsOlderThan(_a0 context.Context, _a1 time.Duration) error return r0 } +// ORM_DeleteRunsOlderThan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteRunsOlderThan' +type ORM_DeleteRunsOlderThan_Call struct { + *mock.Call +} + +// DeleteRunsOlderThan is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 time.Duration +func (_e *ORM_Expecter) DeleteRunsOlderThan(_a0 interface{}, _a1 interface{}) *ORM_DeleteRunsOlderThan_Call { + return &ORM_DeleteRunsOlderThan_Call{Call: _e.mock.On("DeleteRunsOlderThan", _a0, _a1)} +} + +func (_c *ORM_DeleteRunsOlderThan_Call) Run(run func(_a0 context.Context, _a1 time.Duration)) *ORM_DeleteRunsOlderThan_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(time.Duration)) + }) + return _c +} + +func (_c *ORM_DeleteRunsOlderThan_Call) Return(_a0 error) *ORM_DeleteRunsOlderThan_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_DeleteRunsOlderThan_Call) RunAndReturn(run func(context.Context, time.Duration) error) *ORM_DeleteRunsOlderThan_Call { + _c.Call.Return(run) + return _c +} + // FindRun provides a mock function with given fields: ctx, id func (_m *ORM) FindRun(ctx context.Context, id int64) (pipeline.Run, error) { ret := _m.Called(ctx, id) @@ -170,6 +349,35 @@ func (_m *ORM) FindRun(ctx context.Context, id int64) (pipeline.Run, error) { return r0, r1 } +// ORM_FindRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindRun' +type ORM_FindRun_Call struct { + *mock.Call +} + +// FindRun is a helper method to define mock.On call +// - ctx context.Context +// - id int64 +func (_e *ORM_Expecter) FindRun(ctx interface{}, id interface{}) *ORM_FindRun_Call { + return &ORM_FindRun_Call{Call: _e.mock.On("FindRun", ctx, id)} +} + +func (_c *ORM_FindRun_Call) Run(run func(ctx context.Context, id int64)) *ORM_FindRun_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int64)) + }) + return _c +} + +func (_c *ORM_FindRun_Call) Return(_a0 pipeline.Run, _a1 error) *ORM_FindRun_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ORM_FindRun_Call) RunAndReturn(run func(context.Context, int64) (pipeline.Run, error)) *ORM_FindRun_Call { + _c.Call.Return(run) + return _c +} + // GetAllRuns provides a mock function with given fields: ctx func (_m *ORM) GetAllRuns(ctx context.Context) ([]pipeline.Run, error) { ret := _m.Called(ctx) @@ -200,6 +408,34 @@ func (_m *ORM) GetAllRuns(ctx context.Context) ([]pipeline.Run, error) { return r0, r1 } +// ORM_GetAllRuns_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAllRuns' +type ORM_GetAllRuns_Call struct { + *mock.Call +} + +// GetAllRuns is a helper method to define mock.On call +// - ctx context.Context +func (_e *ORM_Expecter) GetAllRuns(ctx interface{}) *ORM_GetAllRuns_Call { + return &ORM_GetAllRuns_Call{Call: _e.mock.On("GetAllRuns", ctx)} +} + +func (_c *ORM_GetAllRuns_Call) Run(run func(ctx context.Context)) *ORM_GetAllRuns_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *ORM_GetAllRuns_Call) Return(_a0 []pipeline.Run, _a1 error) *ORM_GetAllRuns_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ORM_GetAllRuns_Call) RunAndReturn(run func(context.Context) ([]pipeline.Run, error)) *ORM_GetAllRuns_Call { + _c.Call.Return(run) + return _c +} + // GetUnfinishedRuns provides a mock function with given fields: _a0, _a1, _a2 func (_m *ORM) GetUnfinishedRuns(_a0 context.Context, _a1 time.Time, _a2 func(pipeline.Run) error) error { ret := _m.Called(_a0, _a1, _a2) @@ -218,6 +454,36 @@ func (_m *ORM) GetUnfinishedRuns(_a0 context.Context, _a1 time.Time, _a2 func(pi return r0 } +// ORM_GetUnfinishedRuns_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUnfinishedRuns' +type ORM_GetUnfinishedRuns_Call struct { + *mock.Call +} + +// GetUnfinishedRuns is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 time.Time +// - _a2 func(pipeline.Run) error +func (_e *ORM_Expecter) GetUnfinishedRuns(_a0 interface{}, _a1 interface{}, _a2 interface{}) *ORM_GetUnfinishedRuns_Call { + return &ORM_GetUnfinishedRuns_Call{Call: _e.mock.On("GetUnfinishedRuns", _a0, _a1, _a2)} +} + +func (_c *ORM_GetUnfinishedRuns_Call) Run(run func(_a0 context.Context, _a1 time.Time, _a2 func(pipeline.Run) error)) *ORM_GetUnfinishedRuns_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(time.Time), args[2].(func(pipeline.Run) error)) + }) + return _c +} + +func (_c *ORM_GetUnfinishedRuns_Call) Return(_a0 error) *ORM_GetUnfinishedRuns_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_GetUnfinishedRuns_Call) RunAndReturn(run func(context.Context, time.Time, func(pipeline.Run) error) error) *ORM_GetUnfinishedRuns_Call { + _c.Call.Return(run) + return _c +} + // HealthReport provides a mock function with given fields: func (_m *ORM) HealthReport() map[string]error { ret := _m.Called() @@ -238,6 +504,33 @@ func (_m *ORM) HealthReport() map[string]error { return r0 } +// ORM_HealthReport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HealthReport' +type ORM_HealthReport_Call struct { + *mock.Call +} + +// HealthReport is a helper method to define mock.On call +func (_e *ORM_Expecter) HealthReport() *ORM_HealthReport_Call { + return &ORM_HealthReport_Call{Call: _e.mock.On("HealthReport")} +} + +func (_c *ORM_HealthReport_Call) Run(run func()) *ORM_HealthReport_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ORM_HealthReport_Call) Return(_a0 map[string]error) *ORM_HealthReport_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_HealthReport_Call) RunAndReturn(run func() map[string]error) *ORM_HealthReport_Call { + _c.Call.Return(run) + return _c +} + // InsertFinishedRun provides a mock function with given fields: ctx, run, saveSuccessfulTaskRuns func (_m *ORM) InsertFinishedRun(ctx context.Context, run *pipeline.Run, saveSuccessfulTaskRuns bool) error { ret := _m.Called(ctx, run, saveSuccessfulTaskRuns) @@ -256,6 +549,36 @@ func (_m *ORM) InsertFinishedRun(ctx context.Context, run *pipeline.Run, saveSuc return r0 } +// ORM_InsertFinishedRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsertFinishedRun' +type ORM_InsertFinishedRun_Call struct { + *mock.Call +} + +// InsertFinishedRun is a helper method to define mock.On call +// - ctx context.Context +// - run *pipeline.Run +// - saveSuccessfulTaskRuns bool +func (_e *ORM_Expecter) InsertFinishedRun(ctx interface{}, run interface{}, saveSuccessfulTaskRuns interface{}) *ORM_InsertFinishedRun_Call { + return &ORM_InsertFinishedRun_Call{Call: _e.mock.On("InsertFinishedRun", ctx, run, saveSuccessfulTaskRuns)} +} + +func (_c *ORM_InsertFinishedRun_Call) Run(run func(ctx context.Context, run *pipeline.Run, saveSuccessfulTaskRuns bool)) *ORM_InsertFinishedRun_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*pipeline.Run), args[2].(bool)) + }) + return _c +} + +func (_c *ORM_InsertFinishedRun_Call) Return(err error) *ORM_InsertFinishedRun_Call { + _c.Call.Return(err) + return _c +} + +func (_c *ORM_InsertFinishedRun_Call) RunAndReturn(run func(context.Context, *pipeline.Run, bool) error) *ORM_InsertFinishedRun_Call { + _c.Call.Return(run) + return _c +} + // InsertFinishedRunWithSpec provides a mock function with given fields: ctx, run, saveSuccessfulTaskRuns func (_m *ORM) InsertFinishedRunWithSpec(ctx context.Context, run *pipeline.Run, saveSuccessfulTaskRuns bool) error { ret := _m.Called(ctx, run, saveSuccessfulTaskRuns) @@ -274,6 +597,36 @@ func (_m *ORM) InsertFinishedRunWithSpec(ctx context.Context, run *pipeline.Run, return r0 } +// ORM_InsertFinishedRunWithSpec_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsertFinishedRunWithSpec' +type ORM_InsertFinishedRunWithSpec_Call struct { + *mock.Call +} + +// InsertFinishedRunWithSpec is a helper method to define mock.On call +// - ctx context.Context +// - run *pipeline.Run +// - saveSuccessfulTaskRuns bool +func (_e *ORM_Expecter) InsertFinishedRunWithSpec(ctx interface{}, run interface{}, saveSuccessfulTaskRuns interface{}) *ORM_InsertFinishedRunWithSpec_Call { + return &ORM_InsertFinishedRunWithSpec_Call{Call: _e.mock.On("InsertFinishedRunWithSpec", ctx, run, saveSuccessfulTaskRuns)} +} + +func (_c *ORM_InsertFinishedRunWithSpec_Call) Run(run func(ctx context.Context, run *pipeline.Run, saveSuccessfulTaskRuns bool)) *ORM_InsertFinishedRunWithSpec_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*pipeline.Run), args[2].(bool)) + }) + return _c +} + +func (_c *ORM_InsertFinishedRunWithSpec_Call) Return(err error) *ORM_InsertFinishedRunWithSpec_Call { + _c.Call.Return(err) + return _c +} + +func (_c *ORM_InsertFinishedRunWithSpec_Call) RunAndReturn(run func(context.Context, *pipeline.Run, bool) error) *ORM_InsertFinishedRunWithSpec_Call { + _c.Call.Return(run) + return _c +} + // InsertFinishedRuns provides a mock function with given fields: ctx, run, saveSuccessfulTaskRuns func (_m *ORM) InsertFinishedRuns(ctx context.Context, run []*pipeline.Run, saveSuccessfulTaskRuns bool) error { ret := _m.Called(ctx, run, saveSuccessfulTaskRuns) @@ -292,6 +645,36 @@ func (_m *ORM) InsertFinishedRuns(ctx context.Context, run []*pipeline.Run, save return r0 } +// ORM_InsertFinishedRuns_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsertFinishedRuns' +type ORM_InsertFinishedRuns_Call struct { + *mock.Call +} + +// InsertFinishedRuns is a helper method to define mock.On call +// - ctx context.Context +// - run []*pipeline.Run +// - saveSuccessfulTaskRuns bool +func (_e *ORM_Expecter) InsertFinishedRuns(ctx interface{}, run interface{}, saveSuccessfulTaskRuns interface{}) *ORM_InsertFinishedRuns_Call { + return &ORM_InsertFinishedRuns_Call{Call: _e.mock.On("InsertFinishedRuns", ctx, run, saveSuccessfulTaskRuns)} +} + +func (_c *ORM_InsertFinishedRuns_Call) Run(run func(ctx context.Context, run []*pipeline.Run, saveSuccessfulTaskRuns bool)) *ORM_InsertFinishedRuns_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]*pipeline.Run), args[2].(bool)) + }) + return _c +} + +func (_c *ORM_InsertFinishedRuns_Call) Return(err error) *ORM_InsertFinishedRuns_Call { + _c.Call.Return(err) + return _c +} + +func (_c *ORM_InsertFinishedRuns_Call) RunAndReturn(run func(context.Context, []*pipeline.Run, bool) error) *ORM_InsertFinishedRuns_Call { + _c.Call.Return(run) + return _c +} + // InsertRun provides a mock function with given fields: ctx, run func (_m *ORM) InsertRun(ctx context.Context, run *pipeline.Run) error { ret := _m.Called(ctx, run) @@ -310,6 +693,35 @@ func (_m *ORM) InsertRun(ctx context.Context, run *pipeline.Run) error { return r0 } +// ORM_InsertRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsertRun' +type ORM_InsertRun_Call struct { + *mock.Call +} + +// InsertRun is a helper method to define mock.On call +// - ctx context.Context +// - run *pipeline.Run +func (_e *ORM_Expecter) InsertRun(ctx interface{}, run interface{}) *ORM_InsertRun_Call { + return &ORM_InsertRun_Call{Call: _e.mock.On("InsertRun", ctx, run)} +} + +func (_c *ORM_InsertRun_Call) Run(run func(ctx context.Context, run *pipeline.Run)) *ORM_InsertRun_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*pipeline.Run)) + }) + return _c +} + +func (_c *ORM_InsertRun_Call) Return(_a0 error) *ORM_InsertRun_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_InsertRun_Call) RunAndReturn(run func(context.Context, *pipeline.Run) error) *ORM_InsertRun_Call { + _c.Call.Return(run) + return _c +} + // Name provides a mock function with given fields: func (_m *ORM) Name() string { ret := _m.Called() @@ -328,6 +740,33 @@ func (_m *ORM) Name() string { return r0 } +// ORM_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type ORM_Name_Call struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *ORM_Expecter) Name() *ORM_Name_Call { + return &ORM_Name_Call{Call: _e.mock.On("Name")} +} + +func (_c *ORM_Name_Call) Run(run func()) *ORM_Name_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ORM_Name_Call) Return(_a0 string) *ORM_Name_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_Name_Call) RunAndReturn(run func() string) *ORM_Name_Call { + _c.Call.Return(run) + return _c +} + // Ready provides a mock function with given fields: func (_m *ORM) Ready() error { ret := _m.Called() @@ -346,6 +785,33 @@ func (_m *ORM) Ready() error { return r0 } +// ORM_Ready_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ready' +type ORM_Ready_Call struct { + *mock.Call +} + +// Ready is a helper method to define mock.On call +func (_e *ORM_Expecter) Ready() *ORM_Ready_Call { + return &ORM_Ready_Call{Call: _e.mock.On("Ready")} +} + +func (_c *ORM_Ready_Call) Run(run func()) *ORM_Ready_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ORM_Ready_Call) Return(_a0 error) *ORM_Ready_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_Ready_Call) RunAndReturn(run func() error) *ORM_Ready_Call { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *ORM) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -364,6 +830,34 @@ func (_m *ORM) Start(_a0 context.Context) error { return r0 } +// ORM_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type ORM_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *ORM_Expecter) Start(_a0 interface{}) *ORM_Start_Call { + return &ORM_Start_Call{Call: _e.mock.On("Start", _a0)} +} + +func (_c *ORM_Start_Call) Run(run func(_a0 context.Context)) *ORM_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *ORM_Start_Call) Return(_a0 error) *ORM_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_Start_Call) RunAndReturn(run func(context.Context) error) *ORM_Start_Call { + _c.Call.Return(run) + return _c +} + // StoreRun provides a mock function with given fields: ctx, run func (_m *ORM) StoreRun(ctx context.Context, run *pipeline.Run) (bool, error) { ret := _m.Called(ctx, run) @@ -392,6 +886,35 @@ func (_m *ORM) StoreRun(ctx context.Context, run *pipeline.Run) (bool, error) { return r0, r1 } +// ORM_StoreRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StoreRun' +type ORM_StoreRun_Call struct { + *mock.Call +} + +// StoreRun is a helper method to define mock.On call +// - ctx context.Context +// - run *pipeline.Run +func (_e *ORM_Expecter) StoreRun(ctx interface{}, run interface{}) *ORM_StoreRun_Call { + return &ORM_StoreRun_Call{Call: _e.mock.On("StoreRun", ctx, run)} +} + +func (_c *ORM_StoreRun_Call) Run(run func(ctx context.Context, run *pipeline.Run)) *ORM_StoreRun_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*pipeline.Run)) + }) + return _c +} + +func (_c *ORM_StoreRun_Call) Return(restart bool, err error) *ORM_StoreRun_Call { + _c.Call.Return(restart, err) + return _c +} + +func (_c *ORM_StoreRun_Call) RunAndReturn(run func(context.Context, *pipeline.Run) (bool, error)) *ORM_StoreRun_Call { + _c.Call.Return(run) + return _c +} + // Transact provides a mock function with given fields: _a0, _a1 func (_m *ORM) Transact(_a0 context.Context, _a1 func(pipeline.ORM) error) error { ret := _m.Called(_a0, _a1) @@ -410,6 +933,35 @@ func (_m *ORM) Transact(_a0 context.Context, _a1 func(pipeline.ORM) error) error return r0 } +// ORM_Transact_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Transact' +type ORM_Transact_Call struct { + *mock.Call +} + +// Transact is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 func(pipeline.ORM) error +func (_e *ORM_Expecter) Transact(_a0 interface{}, _a1 interface{}) *ORM_Transact_Call { + return &ORM_Transact_Call{Call: _e.mock.On("Transact", _a0, _a1)} +} + +func (_c *ORM_Transact_Call) Run(run func(_a0 context.Context, _a1 func(pipeline.ORM) error)) *ORM_Transact_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(func(pipeline.ORM) error)) + }) + return _c +} + +func (_c *ORM_Transact_Call) Return(_a0 error) *ORM_Transact_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_Transact_Call) RunAndReturn(run func(context.Context, func(pipeline.ORM) error) error) *ORM_Transact_Call { + _c.Call.Return(run) + return _c +} + // UpdateTaskRunResult provides a mock function with given fields: ctx, taskID, result func (_m *ORM) UpdateTaskRunResult(ctx context.Context, taskID uuid.UUID, result pipeline.Result) (pipeline.Run, bool, error) { ret := _m.Called(ctx, taskID, result) @@ -445,6 +997,36 @@ func (_m *ORM) UpdateTaskRunResult(ctx context.Context, taskID uuid.UUID, result return r0, r1, r2 } +// ORM_UpdateTaskRunResult_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateTaskRunResult' +type ORM_UpdateTaskRunResult_Call struct { + *mock.Call +} + +// UpdateTaskRunResult is a helper method to define mock.On call +// - ctx context.Context +// - taskID uuid.UUID +// - result pipeline.Result +func (_e *ORM_Expecter) UpdateTaskRunResult(ctx interface{}, taskID interface{}, result interface{}) *ORM_UpdateTaskRunResult_Call { + return &ORM_UpdateTaskRunResult_Call{Call: _e.mock.On("UpdateTaskRunResult", ctx, taskID, result)} +} + +func (_c *ORM_UpdateTaskRunResult_Call) Run(run func(ctx context.Context, taskID uuid.UUID, result pipeline.Result)) *ORM_UpdateTaskRunResult_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(pipeline.Result)) + }) + return _c +} + +func (_c *ORM_UpdateTaskRunResult_Call) Return(run pipeline.Run, start bool, err error) *ORM_UpdateTaskRunResult_Call { + _c.Call.Return(run, start, err) + return _c +} + +func (_c *ORM_UpdateTaskRunResult_Call) RunAndReturn(run func(context.Context, uuid.UUID, pipeline.Result) (pipeline.Run, bool, error)) *ORM_UpdateTaskRunResult_Call { + _c.Call.Return(run) + return _c +} + // WithDataSource provides a mock function with given fields: _a0 func (_m *ORM) WithDataSource(_a0 sqlutil.DataSource) pipeline.ORM { ret := _m.Called(_a0) @@ -465,6 +1047,34 @@ func (_m *ORM) WithDataSource(_a0 sqlutil.DataSource) pipeline.ORM { return r0 } +// ORM_WithDataSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithDataSource' +type ORM_WithDataSource_Call struct { + *mock.Call +} + +// WithDataSource is a helper method to define mock.On call +// - _a0 sqlutil.DataSource +func (_e *ORM_Expecter) WithDataSource(_a0 interface{}) *ORM_WithDataSource_Call { + return &ORM_WithDataSource_Call{Call: _e.mock.On("WithDataSource", _a0)} +} + +func (_c *ORM_WithDataSource_Call) Run(run func(_a0 sqlutil.DataSource)) *ORM_WithDataSource_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(sqlutil.DataSource)) + }) + return _c +} + +func (_c *ORM_WithDataSource_Call) Return(_a0 pipeline.ORM) *ORM_WithDataSource_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_WithDataSource_Call) RunAndReturn(run func(sqlutil.DataSource) pipeline.ORM) *ORM_WithDataSource_Call { + _c.Call.Return(run) + return _c +} + // NewORM creates a new instance of ORM. 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 NewORM(t interface { diff --git a/core/services/pipeline/mocks/pipeline_param_unmarshaler.go b/core/services/pipeline/mocks/pipeline_param_unmarshaler.go index dcc15bf6fc2..53f6b1d12be 100644 --- a/core/services/pipeline/mocks/pipeline_param_unmarshaler.go +++ b/core/services/pipeline/mocks/pipeline_param_unmarshaler.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -9,6 +9,14 @@ type PipelineParamUnmarshaler struct { mock.Mock } +type PipelineParamUnmarshaler_Expecter struct { + mock *mock.Mock +} + +func (_m *PipelineParamUnmarshaler) EXPECT() *PipelineParamUnmarshaler_Expecter { + return &PipelineParamUnmarshaler_Expecter{mock: &_m.Mock} +} + // UnmarshalPipelineParam provides a mock function with given fields: val func (_m *PipelineParamUnmarshaler) UnmarshalPipelineParam(val interface{}) error { ret := _m.Called(val) @@ -27,6 +35,34 @@ func (_m *PipelineParamUnmarshaler) UnmarshalPipelineParam(val interface{}) erro return r0 } +// PipelineParamUnmarshaler_UnmarshalPipelineParam_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnmarshalPipelineParam' +type PipelineParamUnmarshaler_UnmarshalPipelineParam_Call struct { + *mock.Call +} + +// UnmarshalPipelineParam is a helper method to define mock.On call +// - val interface{} +func (_e *PipelineParamUnmarshaler_Expecter) UnmarshalPipelineParam(val interface{}) *PipelineParamUnmarshaler_UnmarshalPipelineParam_Call { + return &PipelineParamUnmarshaler_UnmarshalPipelineParam_Call{Call: _e.mock.On("UnmarshalPipelineParam", val)} +} + +func (_c *PipelineParamUnmarshaler_UnmarshalPipelineParam_Call) Run(run func(val interface{})) *PipelineParamUnmarshaler_UnmarshalPipelineParam_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(interface{})) + }) + return _c +} + +func (_c *PipelineParamUnmarshaler_UnmarshalPipelineParam_Call) Return(_a0 error) *PipelineParamUnmarshaler_UnmarshalPipelineParam_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *PipelineParamUnmarshaler_UnmarshalPipelineParam_Call) RunAndReturn(run func(interface{}) error) *PipelineParamUnmarshaler_UnmarshalPipelineParam_Call { + _c.Call.Return(run) + return _c +} + // NewPipelineParamUnmarshaler creates a new instance of PipelineParamUnmarshaler. 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 NewPipelineParamUnmarshaler(t interface { diff --git a/core/services/pipeline/mocks/runner.go b/core/services/pipeline/mocks/runner.go index 88d71c76c3a..bb424459abf 100644 --- a/core/services/pipeline/mocks/runner.go +++ b/core/services/pipeline/mocks/runner.go @@ -1,14 +1,12 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks import ( context "context" - logger "github.com/smartcontractkit/chainlink/v2/core/logger" - mock "github.com/stretchr/testify/mock" - pipeline "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" + mock "github.com/stretchr/testify/mock" sqlutil "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" @@ -20,6 +18,14 @@ type Runner struct { mock.Mock } +type Runner_Expecter struct { + mock *mock.Mock +} + +func (_m *Runner) EXPECT() *Runner_Expecter { + return &Runner_Expecter{mock: &_m.Mock} +} + // Close provides a mock function with given fields: func (_m *Runner) Close() error { ret := _m.Called() @@ -38,9 +44,36 @@ func (_m *Runner) Close() error { return r0 } -// ExecuteAndInsertFinishedRun provides a mock function with given fields: ctx, spec, vars, l, saveSuccessfulTaskRuns -func (_m *Runner) ExecuteAndInsertFinishedRun(ctx context.Context, spec pipeline.Spec, vars pipeline.Vars, l logger.Logger, saveSuccessfulTaskRuns bool) (int64, pipeline.TaskRunResults, error) { - ret := _m.Called(ctx, spec, vars, l, saveSuccessfulTaskRuns) +// Runner_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type Runner_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *Runner_Expecter) Close() *Runner_Close_Call { + return &Runner_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *Runner_Close_Call) Run(run func()) *Runner_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Runner_Close_Call) Return(_a0 error) *Runner_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Runner_Close_Call) RunAndReturn(run func() error) *Runner_Close_Call { + _c.Call.Return(run) + return _c +} + +// ExecuteAndInsertFinishedRun provides a mock function with given fields: ctx, spec, vars, saveSuccessfulTaskRuns +func (_m *Runner) ExecuteAndInsertFinishedRun(ctx context.Context, spec pipeline.Spec, vars pipeline.Vars, saveSuccessfulTaskRuns bool) (int64, pipeline.TaskRunResults, error) { + ret := _m.Called(ctx, spec, vars, saveSuccessfulTaskRuns) if len(ret) == 0 { panic("no return value specified for ExecuteAndInsertFinishedRun") @@ -49,25 +82,25 @@ func (_m *Runner) ExecuteAndInsertFinishedRun(ctx context.Context, spec pipeline var r0 int64 var r1 pipeline.TaskRunResults var r2 error - if rf, ok := ret.Get(0).(func(context.Context, pipeline.Spec, pipeline.Vars, logger.Logger, bool) (int64, pipeline.TaskRunResults, error)); ok { - return rf(ctx, spec, vars, l, saveSuccessfulTaskRuns) + if rf, ok := ret.Get(0).(func(context.Context, pipeline.Spec, pipeline.Vars, bool) (int64, pipeline.TaskRunResults, error)); ok { + return rf(ctx, spec, vars, saveSuccessfulTaskRuns) } - if rf, ok := ret.Get(0).(func(context.Context, pipeline.Spec, pipeline.Vars, logger.Logger, bool) int64); ok { - r0 = rf(ctx, spec, vars, l, saveSuccessfulTaskRuns) + if rf, ok := ret.Get(0).(func(context.Context, pipeline.Spec, pipeline.Vars, bool) int64); ok { + r0 = rf(ctx, spec, vars, saveSuccessfulTaskRuns) } else { r0 = ret.Get(0).(int64) } - if rf, ok := ret.Get(1).(func(context.Context, pipeline.Spec, pipeline.Vars, logger.Logger, bool) pipeline.TaskRunResults); ok { - r1 = rf(ctx, spec, vars, l, saveSuccessfulTaskRuns) + if rf, ok := ret.Get(1).(func(context.Context, pipeline.Spec, pipeline.Vars, bool) pipeline.TaskRunResults); ok { + r1 = rf(ctx, spec, vars, saveSuccessfulTaskRuns) } else { if ret.Get(1) != nil { r1 = ret.Get(1).(pipeline.TaskRunResults) } } - if rf, ok := ret.Get(2).(func(context.Context, pipeline.Spec, pipeline.Vars, logger.Logger, bool) error); ok { - r2 = rf(ctx, spec, vars, l, saveSuccessfulTaskRuns) + if rf, ok := ret.Get(2).(func(context.Context, pipeline.Spec, pipeline.Vars, bool) error); ok { + r2 = rf(ctx, spec, vars, saveSuccessfulTaskRuns) } else { r2 = ret.Error(2) } @@ -75,9 +108,40 @@ func (_m *Runner) ExecuteAndInsertFinishedRun(ctx context.Context, spec pipeline return r0, r1, r2 } -// ExecuteRun provides a mock function with given fields: ctx, spec, vars, l -func (_m *Runner) ExecuteRun(ctx context.Context, spec pipeline.Spec, vars pipeline.Vars, l logger.Logger) (*pipeline.Run, pipeline.TaskRunResults, error) { - ret := _m.Called(ctx, spec, vars, l) +// Runner_ExecuteAndInsertFinishedRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExecuteAndInsertFinishedRun' +type Runner_ExecuteAndInsertFinishedRun_Call struct { + *mock.Call +} + +// ExecuteAndInsertFinishedRun is a helper method to define mock.On call +// - ctx context.Context +// - spec pipeline.Spec +// - vars pipeline.Vars +// - saveSuccessfulTaskRuns bool +func (_e *Runner_Expecter) ExecuteAndInsertFinishedRun(ctx interface{}, spec interface{}, vars interface{}, saveSuccessfulTaskRuns interface{}) *Runner_ExecuteAndInsertFinishedRun_Call { + return &Runner_ExecuteAndInsertFinishedRun_Call{Call: _e.mock.On("ExecuteAndInsertFinishedRun", ctx, spec, vars, saveSuccessfulTaskRuns)} +} + +func (_c *Runner_ExecuteAndInsertFinishedRun_Call) Run(run func(ctx context.Context, spec pipeline.Spec, vars pipeline.Vars, saveSuccessfulTaskRuns bool)) *Runner_ExecuteAndInsertFinishedRun_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(pipeline.Spec), args[2].(pipeline.Vars), args[3].(bool)) + }) + return _c +} + +func (_c *Runner_ExecuteAndInsertFinishedRun_Call) Return(runID int64, results pipeline.TaskRunResults, err error) *Runner_ExecuteAndInsertFinishedRun_Call { + _c.Call.Return(runID, results, err) + return _c +} + +func (_c *Runner_ExecuteAndInsertFinishedRun_Call) RunAndReturn(run func(context.Context, pipeline.Spec, pipeline.Vars, bool) (int64, pipeline.TaskRunResults, error)) *Runner_ExecuteAndInsertFinishedRun_Call { + _c.Call.Return(run) + return _c +} + +// ExecuteRun provides a mock function with given fields: ctx, spec, vars +func (_m *Runner) ExecuteRun(ctx context.Context, spec pipeline.Spec, vars pipeline.Vars) (*pipeline.Run, pipeline.TaskRunResults, error) { + ret := _m.Called(ctx, spec, vars) if len(ret) == 0 { panic("no return value specified for ExecuteRun") @@ -86,27 +150,27 @@ func (_m *Runner) ExecuteRun(ctx context.Context, spec pipeline.Spec, vars pipel var r0 *pipeline.Run var r1 pipeline.TaskRunResults var r2 error - if rf, ok := ret.Get(0).(func(context.Context, pipeline.Spec, pipeline.Vars, logger.Logger) (*pipeline.Run, pipeline.TaskRunResults, error)); ok { - return rf(ctx, spec, vars, l) + if rf, ok := ret.Get(0).(func(context.Context, pipeline.Spec, pipeline.Vars) (*pipeline.Run, pipeline.TaskRunResults, error)); ok { + return rf(ctx, spec, vars) } - if rf, ok := ret.Get(0).(func(context.Context, pipeline.Spec, pipeline.Vars, logger.Logger) *pipeline.Run); ok { - r0 = rf(ctx, spec, vars, l) + if rf, ok := ret.Get(0).(func(context.Context, pipeline.Spec, pipeline.Vars) *pipeline.Run); ok { + r0 = rf(ctx, spec, vars) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*pipeline.Run) } } - if rf, ok := ret.Get(1).(func(context.Context, pipeline.Spec, pipeline.Vars, logger.Logger) pipeline.TaskRunResults); ok { - r1 = rf(ctx, spec, vars, l) + if rf, ok := ret.Get(1).(func(context.Context, pipeline.Spec, pipeline.Vars) pipeline.TaskRunResults); ok { + r1 = rf(ctx, spec, vars) } else { if ret.Get(1) != nil { r1 = ret.Get(1).(pipeline.TaskRunResults) } } - if rf, ok := ret.Get(2).(func(context.Context, pipeline.Spec, pipeline.Vars, logger.Logger) error); ok { - r2 = rf(ctx, spec, vars, l) + if rf, ok := ret.Get(2).(func(context.Context, pipeline.Spec, pipeline.Vars) error); ok { + r2 = rf(ctx, spec, vars) } else { r2 = ret.Error(2) } @@ -114,6 +178,36 @@ func (_m *Runner) ExecuteRun(ctx context.Context, spec pipeline.Spec, vars pipel return r0, r1, r2 } +// Runner_ExecuteRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ExecuteRun' +type Runner_ExecuteRun_Call struct { + *mock.Call +} + +// ExecuteRun is a helper method to define mock.On call +// - ctx context.Context +// - spec pipeline.Spec +// - vars pipeline.Vars +func (_e *Runner_Expecter) ExecuteRun(ctx interface{}, spec interface{}, vars interface{}) *Runner_ExecuteRun_Call { + return &Runner_ExecuteRun_Call{Call: _e.mock.On("ExecuteRun", ctx, spec, vars)} +} + +func (_c *Runner_ExecuteRun_Call) Run(run func(ctx context.Context, spec pipeline.Spec, vars pipeline.Vars)) *Runner_ExecuteRun_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(pipeline.Spec), args[2].(pipeline.Vars)) + }) + return _c +} + +func (_c *Runner_ExecuteRun_Call) Return(run *pipeline.Run, trrs pipeline.TaskRunResults, err error) *Runner_ExecuteRun_Call { + _c.Call.Return(run, trrs, err) + return _c +} + +func (_c *Runner_ExecuteRun_Call) RunAndReturn(run func(context.Context, pipeline.Spec, pipeline.Vars) (*pipeline.Run, pipeline.TaskRunResults, error)) *Runner_ExecuteRun_Call { + _c.Call.Return(run) + return _c +} + // HealthReport provides a mock function with given fields: func (_m *Runner) HealthReport() map[string]error { ret := _m.Called() @@ -134,6 +228,33 @@ func (_m *Runner) HealthReport() map[string]error { return r0 } +// Runner_HealthReport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HealthReport' +type Runner_HealthReport_Call struct { + *mock.Call +} + +// HealthReport is a helper method to define mock.On call +func (_e *Runner_Expecter) HealthReport() *Runner_HealthReport_Call { + return &Runner_HealthReport_Call{Call: _e.mock.On("HealthReport")} +} + +func (_c *Runner_HealthReport_Call) Run(run func()) *Runner_HealthReport_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Runner_HealthReport_Call) Return(_a0 map[string]error) *Runner_HealthReport_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Runner_HealthReport_Call) RunAndReturn(run func() map[string]error) *Runner_HealthReport_Call { + _c.Call.Return(run) + return _c +} + // InitializePipeline provides a mock function with given fields: spec func (_m *Runner) InitializePipeline(spec pipeline.Spec) (*pipeline.Pipeline, error) { ret := _m.Called(spec) @@ -164,6 +285,34 @@ func (_m *Runner) InitializePipeline(spec pipeline.Spec) (*pipeline.Pipeline, er return r0, r1 } +// Runner_InitializePipeline_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InitializePipeline' +type Runner_InitializePipeline_Call struct { + *mock.Call +} + +// InitializePipeline is a helper method to define mock.On call +// - spec pipeline.Spec +func (_e *Runner_Expecter) InitializePipeline(spec interface{}) *Runner_InitializePipeline_Call { + return &Runner_InitializePipeline_Call{Call: _e.mock.On("InitializePipeline", spec)} +} + +func (_c *Runner_InitializePipeline_Call) Run(run func(spec pipeline.Spec)) *Runner_InitializePipeline_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(pipeline.Spec)) + }) + return _c +} + +func (_c *Runner_InitializePipeline_Call) Return(_a0 *pipeline.Pipeline, _a1 error) *Runner_InitializePipeline_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Runner_InitializePipeline_Call) RunAndReturn(run func(pipeline.Spec) (*pipeline.Pipeline, error)) *Runner_InitializePipeline_Call { + _c.Call.Return(run) + return _c +} + // InsertFinishedRun provides a mock function with given fields: ctx, ds, run, saveSuccessfulTaskRuns func (_m *Runner) InsertFinishedRun(ctx context.Context, ds sqlutil.DataSource, run *pipeline.Run, saveSuccessfulTaskRuns bool) error { ret := _m.Called(ctx, ds, run, saveSuccessfulTaskRuns) @@ -182,6 +331,37 @@ func (_m *Runner) InsertFinishedRun(ctx context.Context, ds sqlutil.DataSource, return r0 } +// Runner_InsertFinishedRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsertFinishedRun' +type Runner_InsertFinishedRun_Call struct { + *mock.Call +} + +// InsertFinishedRun is a helper method to define mock.On call +// - ctx context.Context +// - ds sqlutil.DataSource +// - run *pipeline.Run +// - saveSuccessfulTaskRuns bool +func (_e *Runner_Expecter) InsertFinishedRun(ctx interface{}, ds interface{}, run interface{}, saveSuccessfulTaskRuns interface{}) *Runner_InsertFinishedRun_Call { + return &Runner_InsertFinishedRun_Call{Call: _e.mock.On("InsertFinishedRun", ctx, ds, run, saveSuccessfulTaskRuns)} +} + +func (_c *Runner_InsertFinishedRun_Call) Run(run func(ctx context.Context, ds sqlutil.DataSource, run *pipeline.Run, saveSuccessfulTaskRuns bool)) *Runner_InsertFinishedRun_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(sqlutil.DataSource), args[2].(*pipeline.Run), args[3].(bool)) + }) + return _c +} + +func (_c *Runner_InsertFinishedRun_Call) Return(_a0 error) *Runner_InsertFinishedRun_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Runner_InsertFinishedRun_Call) RunAndReturn(run func(context.Context, sqlutil.DataSource, *pipeline.Run, bool) error) *Runner_InsertFinishedRun_Call { + _c.Call.Return(run) + return _c +} + // InsertFinishedRuns provides a mock function with given fields: ctx, ds, runs, saveSuccessfulTaskRuns func (_m *Runner) InsertFinishedRuns(ctx context.Context, ds sqlutil.DataSource, runs []*pipeline.Run, saveSuccessfulTaskRuns bool) error { ret := _m.Called(ctx, ds, runs, saveSuccessfulTaskRuns) @@ -200,6 +380,37 @@ func (_m *Runner) InsertFinishedRuns(ctx context.Context, ds sqlutil.DataSource, return r0 } +// Runner_InsertFinishedRuns_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsertFinishedRuns' +type Runner_InsertFinishedRuns_Call struct { + *mock.Call +} + +// InsertFinishedRuns is a helper method to define mock.On call +// - ctx context.Context +// - ds sqlutil.DataSource +// - runs []*pipeline.Run +// - saveSuccessfulTaskRuns bool +func (_e *Runner_Expecter) InsertFinishedRuns(ctx interface{}, ds interface{}, runs interface{}, saveSuccessfulTaskRuns interface{}) *Runner_InsertFinishedRuns_Call { + return &Runner_InsertFinishedRuns_Call{Call: _e.mock.On("InsertFinishedRuns", ctx, ds, runs, saveSuccessfulTaskRuns)} +} + +func (_c *Runner_InsertFinishedRuns_Call) Run(run func(ctx context.Context, ds sqlutil.DataSource, runs []*pipeline.Run, saveSuccessfulTaskRuns bool)) *Runner_InsertFinishedRuns_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(sqlutil.DataSource), args[2].([]*pipeline.Run), args[3].(bool)) + }) + return _c +} + +func (_c *Runner_InsertFinishedRuns_Call) Return(_a0 error) *Runner_InsertFinishedRuns_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Runner_InsertFinishedRuns_Call) RunAndReturn(run func(context.Context, sqlutil.DataSource, []*pipeline.Run, bool) error) *Runner_InsertFinishedRuns_Call { + _c.Call.Return(run) + return _c +} + // Name provides a mock function with given fields: func (_m *Runner) Name() string { ret := _m.Called() @@ -218,11 +429,66 @@ func (_m *Runner) Name() string { return r0 } +// Runner_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type Runner_Name_Call struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *Runner_Expecter) Name() *Runner_Name_Call { + return &Runner_Name_Call{Call: _e.mock.On("Name")} +} + +func (_c *Runner_Name_Call) Run(run func()) *Runner_Name_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Runner_Name_Call) Return(_a0 string) *Runner_Name_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Runner_Name_Call) RunAndReturn(run func() string) *Runner_Name_Call { + _c.Call.Return(run) + return _c +} + // OnRunFinished provides a mock function with given fields: _a0 func (_m *Runner) OnRunFinished(_a0 func(*pipeline.Run)) { _m.Called(_a0) } +// Runner_OnRunFinished_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnRunFinished' +type Runner_OnRunFinished_Call struct { + *mock.Call +} + +// OnRunFinished is a helper method to define mock.On call +// - _a0 func(*pipeline.Run) +func (_e *Runner_Expecter) OnRunFinished(_a0 interface{}) *Runner_OnRunFinished_Call { + return &Runner_OnRunFinished_Call{Call: _e.mock.On("OnRunFinished", _a0)} +} + +func (_c *Runner_OnRunFinished_Call) Run(run func(_a0 func(*pipeline.Run))) *Runner_OnRunFinished_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(func(*pipeline.Run))) + }) + return _c +} + +func (_c *Runner_OnRunFinished_Call) Return() *Runner_OnRunFinished_Call { + _c.Call.Return() + return _c +} + +func (_c *Runner_OnRunFinished_Call) RunAndReturn(run func(func(*pipeline.Run))) *Runner_OnRunFinished_Call { + _c.Call.Return(run) + return _c +} + // Ready provides a mock function with given fields: func (_m *Runner) Ready() error { ret := _m.Called() @@ -241,6 +507,33 @@ func (_m *Runner) Ready() error { return r0 } +// Runner_Ready_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ready' +type Runner_Ready_Call struct { + *mock.Call +} + +// Ready is a helper method to define mock.On call +func (_e *Runner_Expecter) Ready() *Runner_Ready_Call { + return &Runner_Ready_Call{Call: _e.mock.On("Ready")} +} + +func (_c *Runner_Ready_Call) Run(run func()) *Runner_Ready_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Runner_Ready_Call) Return(_a0 error) *Runner_Ready_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Runner_Ready_Call) RunAndReturn(run func() error) *Runner_Ready_Call { + _c.Call.Return(run) + return _c +} + // ResumeRun provides a mock function with given fields: ctx, taskID, value, err func (_m *Runner) ResumeRun(ctx context.Context, taskID uuid.UUID, value interface{}, err error) error { ret := _m.Called(ctx, taskID, value, err) @@ -259,9 +552,40 @@ func (_m *Runner) ResumeRun(ctx context.Context, taskID uuid.UUID, value interfa return r0 } -// Run provides a mock function with given fields: ctx, run, l, saveSuccessfulTaskRuns, fn -func (_m *Runner) Run(ctx context.Context, run *pipeline.Run, l logger.Logger, saveSuccessfulTaskRuns bool, fn func(sqlutil.DataSource) error) (bool, error) { - ret := _m.Called(ctx, run, l, saveSuccessfulTaskRuns, fn) +// Runner_ResumeRun_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResumeRun' +type Runner_ResumeRun_Call struct { + *mock.Call +} + +// ResumeRun is a helper method to define mock.On call +// - ctx context.Context +// - taskID uuid.UUID +// - value interface{} +// - err error +func (_e *Runner_Expecter) ResumeRun(ctx interface{}, taskID interface{}, value interface{}, err interface{}) *Runner_ResumeRun_Call { + return &Runner_ResumeRun_Call{Call: _e.mock.On("ResumeRun", ctx, taskID, value, err)} +} + +func (_c *Runner_ResumeRun_Call) Run(run func(ctx context.Context, taskID uuid.UUID, value interface{}, err error)) *Runner_ResumeRun_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(interface{}), args[3].(error)) + }) + return _c +} + +func (_c *Runner_ResumeRun_Call) Return(_a0 error) *Runner_ResumeRun_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Runner_ResumeRun_Call) RunAndReturn(run func(context.Context, uuid.UUID, interface{}, error) error) *Runner_ResumeRun_Call { + _c.Call.Return(run) + return _c +} + +// Run provides a mock function with given fields: ctx, run, saveSuccessfulTaskRuns, fn +func (_m *Runner) Run(ctx context.Context, run *pipeline.Run, saveSuccessfulTaskRuns bool, fn func(sqlutil.DataSource) error) (bool, error) { + ret := _m.Called(ctx, run, saveSuccessfulTaskRuns, fn) if len(ret) == 0 { panic("no return value specified for Run") @@ -269,17 +593,17 @@ func (_m *Runner) Run(ctx context.Context, run *pipeline.Run, l logger.Logger, s var r0 bool var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *pipeline.Run, logger.Logger, bool, func(sqlutil.DataSource) error) (bool, error)); ok { - return rf(ctx, run, l, saveSuccessfulTaskRuns, fn) + if rf, ok := ret.Get(0).(func(context.Context, *pipeline.Run, bool, func(sqlutil.DataSource) error) (bool, error)); ok { + return rf(ctx, run, saveSuccessfulTaskRuns, fn) } - if rf, ok := ret.Get(0).(func(context.Context, *pipeline.Run, logger.Logger, bool, func(sqlutil.DataSource) error) bool); ok { - r0 = rf(ctx, run, l, saveSuccessfulTaskRuns, fn) + if rf, ok := ret.Get(0).(func(context.Context, *pipeline.Run, bool, func(sqlutil.DataSource) error) bool); ok { + r0 = rf(ctx, run, saveSuccessfulTaskRuns, fn) } else { r0 = ret.Get(0).(bool) } - if rf, ok := ret.Get(1).(func(context.Context, *pipeline.Run, logger.Logger, bool, func(sqlutil.DataSource) error) error); ok { - r1 = rf(ctx, run, l, saveSuccessfulTaskRuns, fn) + if rf, ok := ret.Get(1).(func(context.Context, *pipeline.Run, bool, func(sqlutil.DataSource) error) error); ok { + r1 = rf(ctx, run, saveSuccessfulTaskRuns, fn) } else { r1 = ret.Error(1) } @@ -287,6 +611,37 @@ func (_m *Runner) Run(ctx context.Context, run *pipeline.Run, l logger.Logger, s return r0, r1 } +// Runner_Run_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Run' +type Runner_Run_Call struct { + *mock.Call +} + +// Run is a helper method to define mock.On call +// - ctx context.Context +// - run *pipeline.Run +// - saveSuccessfulTaskRuns bool +// - fn func(sqlutil.DataSource) error +func (_e *Runner_Expecter) Run(ctx interface{}, run interface{}, saveSuccessfulTaskRuns interface{}, fn interface{}) *Runner_Run_Call { + return &Runner_Run_Call{Call: _e.mock.On("Run", ctx, run, saveSuccessfulTaskRuns, fn)} +} + +func (_c *Runner_Run_Call) Run(run func(ctx context.Context, run *pipeline.Run, saveSuccessfulTaskRuns bool, fn func(sqlutil.DataSource) error)) *Runner_Run_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*pipeline.Run), args[2].(bool), args[3].(func(sqlutil.DataSource) error)) + }) + return _c +} + +func (_c *Runner_Run_Call) Return(incomplete bool, err error) *Runner_Run_Call { + _c.Call.Return(incomplete, err) + return _c +} + +func (_c *Runner_Run_Call) RunAndReturn(run func(context.Context, *pipeline.Run, bool, func(sqlutil.DataSource) error) (bool, error)) *Runner_Run_Call { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *Runner) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -305,6 +660,34 @@ func (_m *Runner) Start(_a0 context.Context) error { return r0 } +// Runner_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type Runner_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *Runner_Expecter) Start(_a0 interface{}) *Runner_Start_Call { + return &Runner_Start_Call{Call: _e.mock.On("Start", _a0)} +} + +func (_c *Runner_Start_Call) Run(run func(_a0 context.Context)) *Runner_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *Runner_Start_Call) Return(_a0 error) *Runner_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Runner_Start_Call) RunAndReturn(run func(context.Context) error) *Runner_Start_Call { + _c.Call.Return(run) + return _c +} + // NewRunner creates a new instance of Runner. 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 NewRunner(t interface { diff --git a/core/services/pipeline/orm.go b/core/services/pipeline/orm.go index 266b605ed42..872d92a1bbf 100644 --- a/core/services/pipeline/orm.go +++ b/core/services/pipeline/orm.go @@ -74,8 +74,6 @@ type CreateDataSource interface { GetContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error } -//go:generate mockery --quiet --name ORM --output ./mocks/ --case=underscore - type ORM interface { services.Service diff --git a/core/services/pipeline/runner.go b/core/services/pipeline/runner.go index 57c9bfd15b5..586bb7738f3 100644 --- a/core/services/pipeline/runner.go +++ b/core/services/pipeline/runner.go @@ -26,23 +26,20 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/recovery" "github.com/smartcontractkit/chainlink/v2/core/store/models" - "github.com/smartcontractkit/chainlink/v2/core/utils" ) -//go:generate mockery --quiet --name Runner --output ./mocks/ --case=underscore - type Runner interface { services.Service // Run is a blocking call that will execute the run until no further progress can be made. // If `incomplete` is true, the run is only partially complete and is suspended, awaiting to be resumed when more data comes in. // Note that `saveSuccessfulTaskRuns` value is ignored if the run contains async tasks. - Run(ctx context.Context, run *Run, l logger.Logger, saveSuccessfulTaskRuns bool, fn func(tx sqlutil.DataSource) error) (incomplete bool, err error) + Run(ctx context.Context, run *Run, saveSuccessfulTaskRuns bool, fn func(tx sqlutil.DataSource) error) (incomplete bool, err error) ResumeRun(ctx context.Context, taskID uuid.UUID, value interface{}, err error) error // ExecuteRun executes a new run in-memory according to a spec and returns the results. // We expect spec.JobID and spec.JobName to be set for logging/prometheus. - ExecuteRun(ctx context.Context, spec Spec, vars Vars, l logger.Logger) (run *Run, trrs TaskRunResults, err error) + ExecuteRun(ctx context.Context, spec Spec, vars Vars) (run *Run, trrs TaskRunResults, err error) // InsertFinishedRun saves the run results in the database. // ds is an optional override, for example when executing a transaction. InsertFinishedRun(ctx context.Context, ds sqlutil.DataSource, run *Run, saveSuccessfulTaskRuns bool) error @@ -52,7 +49,7 @@ type Runner interface { // It is a combination of ExecuteRun and InsertFinishedRun. // Note that the spec MUST have a DOT graph for this to work. // This will persist the Spec in the DB if it doesn't have an ID. - ExecuteAndInsertFinishedRun(ctx context.Context, spec Spec, vars Vars, l logger.Logger, saveSuccessfulTaskRuns bool) (runID int64, results TaskRunResults, err error) + ExecuteAndInsertFinishedRun(ctx context.Context, spec Spec, vars Vars, saveSuccessfulTaskRuns bool) (runID int64, results TaskRunResults, err error) OnRunFinished(func(*Run)) InitializePipeline(spec Spec) (*Pipeline, error) @@ -210,7 +207,7 @@ func (r *runner) runReaperLoop() { return } - runReaperTicker := time.NewTicker(utils.WithJitter(r.config.ReaperInterval())) + runReaperTicker := services.NewTicker(r.config.ReaperInterval()) defer runReaperTicker.Stop() for { select { @@ -218,7 +215,7 @@ func (r *runner) runReaperLoop() { return case <-runReaperTicker.C: r.runReaperWorker.WakeUp() - runReaperTicker.Reset(utils.WithJitter(r.config.ReaperInterval())) + runReaperTicker.Reset() } } } @@ -291,12 +288,7 @@ func overtimeContext(ctx context.Context) (context.Context, context.CancelFunc) return context.WithoutCancel(ctx), func() {} } -func (r *runner) ExecuteRun( - ctx context.Context, - spec Spec, - vars Vars, - l logger.Logger, -) (*Run, TaskRunResults, error) { +func (r *runner) ExecuteRun(ctx context.Context, spec Spec, vars Vars) (*Run, TaskRunResults, error) { // Pipeline runs may return results after the context is cancelled, so we modify the // deadline to give them time to return before the parent context deadline. var cancel func() @@ -321,7 +313,7 @@ func (r *runner) ExecuteRun( } run := NewRun(spec, vars) - taskRunResults := r.run(ctx, pipeline, run, vars, l) + taskRunResults := r.run(ctx, pipeline, run, vars) if run.Pending { return run, nil, fmt.Errorf("unexpected async run for spec ID %v, tried executing via ExecuteRun", spec.ID) @@ -383,8 +375,8 @@ func (r *runner) InitializePipeline(spec Spec) (pipeline *Pipeline, err error) { return pipeline, nil } -func (r *runner) run(ctx context.Context, pipeline *Pipeline, run *Run, vars Vars, l logger.Logger) TaskRunResults { - l = l.With("run.ID", run.ID, "executionID", uuid.New(), "specID", run.PipelineSpecID, "jobID", run.PipelineSpec.JobID, "jobName", run.PipelineSpec.JobName) +func (r *runner) run(ctx context.Context, pipeline *Pipeline, run *Run, vars Vars) TaskRunResults { + l := r.lggr.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) @@ -611,8 +603,8 @@ func logTaskRunToPrometheus(trr TaskRunResult, spec Spec) { } // ExecuteAndInsertFinishedRun executes a run in memory then inserts the finished run/task run records, returning the final result -func (r *runner) ExecuteAndInsertFinishedRun(ctx context.Context, spec Spec, vars Vars, l logger.Logger, saveSuccessfulTaskRuns bool) (runID int64, results TaskRunResults, err error) { - run, trrs, err := r.ExecuteRun(ctx, spec, vars, l) +func (r *runner) ExecuteAndInsertFinishedRun(ctx context.Context, spec Spec, vars Vars, saveSuccessfulTaskRuns bool) (runID int64, results TaskRunResults, err error) { + run, trrs, err := r.ExecuteRun(ctx, spec, vars) if err != nil { return 0, trrs, pkgerrors.Wrapf(err, "error executing run for spec ID %v", spec.ID) } @@ -633,7 +625,7 @@ func (r *runner) ExecuteAndInsertFinishedRun(ctx context.Context, spec Spec, var return run.ID, trrs, nil } -func (r *runner) Run(ctx context.Context, run *Run, l logger.Logger, saveSuccessfulTaskRuns bool, fn func(tx sqlutil.DataSource) error) (incomplete bool, err error) { +func (r *runner) Run(ctx context.Context, run *Run, saveSuccessfulTaskRuns bool, fn func(tx sqlutil.DataSource) error) (incomplete bool, err error) { pipeline, err := r.InitializePipeline(run.PipelineSpec) if err != nil { return false, err @@ -684,7 +676,7 @@ func (r *runner) Run(ctx context.Context, run *Run, l logger.Logger, saveSuccess } for { - r.run(ctx, pipeline, run, NewVarsFrom(run.Inputs.Val.(map[string]interface{})), l) + r.run(ctx, pipeline, run, NewVarsFrom(run.Inputs.Val.(map[string]interface{}))) if preinsert { // FailSilently = run failed and task was marked failEarly. skip StoreRun and instead delete all trace of it @@ -740,7 +732,9 @@ func (r *runner) ResumeRun(ctx context.Context, taskID uuid.UUID, value interfac if start { // start the runner again go func() { - if _, err := r.Run(context.Background(), &run, r.lggr, false, nil); err != nil { + ctx, cancel := r.chStop.NewCtx() + defer cancel() + if _, err := r.Run(ctx, &run, false, nil); err != nil { r.lggr.Errorw("Resume run failure", "err", err) } r.lggr.Debug("Resume run success") @@ -802,7 +796,7 @@ func (r *runner) scheduleUnfinishedRuns() { go func() { defer wgRunsDone.Done() - _, err := r.Run(ctx, &run, r.lggr, false, nil) + _, err := r.Run(ctx, &run, false, nil) if ctx.Err() != nil { return } else if err != nil { diff --git a/core/services/pipeline/runner_test.go b/core/services/pipeline/runner_test.go index dddc84e7368..022a77c9471 100644 --- a/core/services/pipeline/runner_test.go +++ b/core/services/pipeline/runner_test.go @@ -106,12 +106,11 @@ ds5 [type=http method="GET" url="%s" index=2] spec := pipeline.Spec{DotDagSource: s} vars := pipeline.NewVarsFrom(nil) - lggr := logger.TestLogger(t) - _, trrs, err := r.ExecuteRun(testutils.Context(t), spec, vars, lggr) + _, trrs, err := r.ExecuteRun(testutils.Context(t), spec, vars) require.NoError(t, err) require.Len(t, trrs, len(d.Tasks)) - finalResults := trrs.FinalResult(lggr) + finalResults := trrs.FinalResult() require.Len(t, finalResults.Values, 3) require.Len(t, finalResults.AllErrors, 12) require.Len(t, finalResults.FatalErrors, 3) @@ -282,7 +281,7 @@ func Test_PipelineRunner_ExecuteTaskRunsWithVars(t *testing.T) { spec := pipeline.Spec{ DotDagSource: specStr, } - _, taskRunResults, err := runner.ExecuteRun(testutils.Context(t), spec, pipeline.NewVarsFrom(test.vars), logger.TestLogger(t)) + _, taskRunResults, err := runner.ExecuteRun(testutils.Context(t), spec, pipeline.NewVarsFrom(test.vars)) require.NoError(t, err) require.Len(t, taskRunResults, len(p.Tasks)) @@ -367,12 +366,11 @@ func Test_PipelineRunner_CBORParse(t *testing.T) { } vars := pipeline.NewVarsFrom(global) - lggr := logger.TestLogger(t) - _, trrs, err := r.ExecuteRun(testutils.Context(t), spec, vars, lggr) + _, trrs, err := r.ExecuteRun(testutils.Context(t), spec, vars) require.NoError(t, err) require.Len(t, trrs, len(d.Tasks)) - finalResults := trrs.FinalResult(lggr) + finalResults := trrs.FinalResult() require.Len(t, finalResults.Values, 1) assert.Equal(t, make(map[string]interface{}), finalResults.Values[0]) require.Len(t, finalResults.FatalErrors, 1) @@ -395,12 +393,11 @@ func Test_PipelineRunner_CBORParse(t *testing.T) { } vars := pipeline.NewVarsFrom(global) - lggr := logger.TestLogger(t) - _, trrs, err := r.ExecuteRun(testutils.Context(t), spec, vars, lggr) + _, trrs, err := r.ExecuteRun(testutils.Context(t), spec, vars) require.NoError(t, err) require.Len(t, trrs, len(d.Tasks)) - finalResults := trrs.FinalResult(lggr) + finalResults := trrs.FinalResult() require.Len(t, finalResults.Values, 1) assert.Equal(t, "foo", finalResults.Values[0]) require.Len(t, finalResults.FatalErrors, 1) @@ -450,7 +447,7 @@ answer1 [type=median index=0]; spec := pipeline.Spec{DotDagSource: s} vars := pipeline.NewVarsFrom(nil) - _, trrs, err := r.ExecuteRun(ctx, spec, vars, logger.TestLogger(t)) + _, trrs, err := r.ExecuteRun(ctx, spec, vars) require.NoError(t, err) for _, trr := range trrs { if trr.IsTerminal() { @@ -490,8 +487,8 @@ succeed2 -> final; `} vars := pipeline.NewVarsFrom(nil) - _, taskResults, err := r.ExecuteAndInsertFinishedRun(testutils.Context(t), spec, vars, lggr, false) - finalResult := taskResults.FinalResult(lggr) + _, taskResults, err := r.ExecuteAndInsertFinishedRun(testutils.Context(t), spec, vars, false) + finalResult := taskResults.FinalResult() require.NoError(t, err) assert.True(t, finalResult.HasErrors()) assert.False(t, finalResult.HasFatalErrors()) @@ -529,8 +526,8 @@ succeed2 -> final; `} vars := pipeline.NewVarsFrom(nil) - _, taskResults, err := r.ExecuteAndInsertFinishedRun(testutils.Context(t), spec, vars, lggr, false) - finalResult := taskResults.FinalResult(lggr) + _, taskResults, err := r.ExecuteAndInsertFinishedRun(testutils.Context(t), spec, vars, false) + finalResult := taskResults.FinalResult() require.NoError(t, err) assert.True(t, finalResult.HasErrors()) assert.False(t, finalResult.HasFatalErrors()) @@ -544,7 +541,6 @@ func Test_PipelineRunner_MultipleOutputs(t *testing.T) { btORM := bridgesMocks.NewORM(t) r, _ := newRunner(t, db, btORM, cfg) input := map[string]interface{}{"val": 2} - lggr := logger.TestLogger(t) _, trrs, err := r.ExecuteRun(testutils.Context(t), pipeline.Spec{ DotDagSource: ` a [type=multiply input="$(val)" times=2] @@ -553,16 +549,16 @@ b2 [type=multiply input="$(a)" times=3] c [type=median values=<[ $(b1), $(b2) ]> index=0] a->b1->c; a->b2->c;`, - }, pipeline.NewVarsFrom(input), lggr) + }, pipeline.NewVarsFrom(input)) require.NoError(t, err) require.Equal(t, 4, len(trrs)) - assert.Equal(t, false, trrs.FinalResult(lggr).HasFatalErrors()) + assert.Equal(t, false, trrs.FinalResult().HasFatalErrors()) // a = 4 // (b1 = 8) + (b2 = 12) // c = 20 / 2 - result, err := trrs.FinalResult(lggr).SingularResult() + result, err := trrs.FinalResult().SingularResult() require.NoError(t, err) assert.Equal(t, mustDecimal(t, "10").String(), result.Value.(decimal.Decimal).String()) } @@ -572,7 +568,6 @@ func Test_PipelineRunner_MultipleTerminatingOutputs(t *testing.T) { btORM := bridgesMocks.NewORM(t) r, _ := newRunner(t, pgtest.NewSqlxDB(t), btORM, cfg) input := map[string]interface{}{"val": 2} - lggr := logger.TestLogger(t) _, trrs, err := r.ExecuteRun(testutils.Context(t), pipeline.Spec{ DotDagSource: ` a [type=multiply input="$(val)" times=2] @@ -580,10 +575,10 @@ b1 [type=multiply input="$(a)" times=2 index=0] b2 [type=multiply input="$(a)" times=3 index=1] a->b1; a->b2;`, - }, pipeline.NewVarsFrom(input), lggr) + }, pipeline.NewVarsFrom(input)) require.NoError(t, err) require.Equal(t, 3, len(trrs)) - result := trrs.FinalResult(lggr) + result := trrs.FinalResult() assert.Equal(t, false, result.HasFatalErrors()) assert.Equal(t, mustDecimal(t, "8").String(), result.Values[0].(decimal.Decimal).String()) @@ -672,8 +667,7 @@ ds5 [type=http method="GET" url="%s" index=2] run.ID = 1 // give it a valid "id" }).Once() orm.On("StoreRun", mock.Anything, mock.AnythingOfType("*pipeline.Run")).Return(false, nil).Once() - lggr := logger.TestLogger(t) - incomplete, err := r.Run(testutils.Context(t), run, lggr, false, nil) + incomplete, err := r.Run(testutils.Context(t), run, false, nil) require.NoError(t, err) require.Len(t, run.PipelineTaskRuns, 9) // 3 tasks are suspended: ds1_parse, ds1_multiply, median. ds1 is present, but contains ErrPending require.Equal(t, true, incomplete) // still incomplete @@ -682,7 +676,7 @@ ds5 [type=http method="GET" url="%s" index=2] // Trigger run resumption with no new data orm.On("StoreRun", mock.Anything, mock.AnythingOfType("*pipeline.Run")).Return(false, nil).Once() - incomplete, err = r.Run(testutils.Context(t), run, lggr, false, nil) + incomplete, err = r.Run(testutils.Context(t), run, false, nil) require.NoError(t, err) require.Equal(t, true, incomplete) // still incomplete @@ -695,7 +689,7 @@ ds5 [type=http method="GET" url="%s" index=2] } // Trigger run resumption orm.On("StoreRun", mock.Anything, mock.AnythingOfType("*pipeline.Run")).Return(false, nil).Once() - incomplete, err = r.Run(testutils.Context(t), run, lggr, false, nil) + incomplete, err = r.Run(testutils.Context(t), run, false, nil) require.NoError(t, err) require.Equal(t, false, incomplete) // done require.Len(t, run.PipelineTaskRuns, 12) @@ -815,7 +809,7 @@ ds5 [type=http method="GET" url="%s" index=2] }).Once() // StoreRun is called again to store the final result orm.On("StoreRun", mock.Anything, mock.AnythingOfType("*pipeline.Run")).Return(false, nil).Once() - incomplete, err := r.Run(testutils.Context(t), run, logger.TestLogger(t), false, nil) + incomplete, err := r.Run(testutils.Context(t), run, false, nil) require.NoError(t, err) require.Len(t, run.PipelineTaskRuns, 12) require.Equal(t, false, incomplete) // run is complete @@ -849,17 +843,16 @@ func Test_PipelineRunner_LowercaseOutputs(t *testing.T) { "first": "camelCase", "second": "UPPERCASE", } - lggr := logger.TestLogger(t) _, trrs, err := r.ExecuteRun(testutils.Context(t), pipeline.Spec{ DotDagSource: ` a [type=lowercase input="$(first)"] `, - }, pipeline.NewVarsFrom(input), lggr) + }, pipeline.NewVarsFrom(input)) require.NoError(t, err) require.Equal(t, 1, len(trrs)) - assert.Equal(t, false, trrs.FinalResult(lggr).HasFatalErrors()) + assert.Equal(t, false, trrs.FinalResult().HasFatalErrors()) - result, err := trrs.FinalResult(lggr).SingularResult() + result, err := trrs.FinalResult().SingularResult() require.NoError(t, err) assert.Equal(t, "camelcase", result.Value.(string)) } @@ -872,17 +865,16 @@ func Test_PipelineRunner_UppercaseOutputs(t *testing.T) { input := map[string]interface{}{ "first": "somerAnDomTEST", } - lggr := logger.TestLogger(t) _, trrs, err := r.ExecuteRun(testutils.Context(t), pipeline.Spec{ DotDagSource: ` a [type=uppercase input="$(first)"] `, - }, pipeline.NewVarsFrom(input), lggr) + }, pipeline.NewVarsFrom(input)) require.NoError(t, err) require.Equal(t, 1, len(trrs)) - assert.Equal(t, false, trrs.FinalResult(lggr).HasFatalErrors()) + assert.Equal(t, false, trrs.FinalResult().HasFatalErrors()) - result, err := trrs.FinalResult(lggr).SingularResult() + result, err := trrs.FinalResult().SingularResult() require.NoError(t, err) assert.Equal(t, "SOMERANDOMTEST", result.Value.(string)) } @@ -895,17 +887,16 @@ func Test_PipelineRunner_HexDecodeOutputs(t *testing.T) { input := map[string]interface{}{ "astring": "0x12345678", } - lggr := logger.TestLogger(t) _, trrs, err := r.ExecuteRun(testutils.Context(t), pipeline.Spec{ DotDagSource: ` a [type=hexdecode input="$(astring)"] `, - }, pipeline.NewVarsFrom(input), lggr) + }, pipeline.NewVarsFrom(input)) require.NoError(t, err) require.Equal(t, 1, len(trrs)) - assert.Equal(t, false, trrs.FinalResult(lggr).HasFatalErrors()) + assert.Equal(t, false, trrs.FinalResult().HasFatalErrors()) - result, err := trrs.FinalResult(lggr).SingularResult() + result, err := trrs.FinalResult().SingularResult() require.NoError(t, err) assert.Equal(t, []byte{0x12, 0x34, 0x56, 0x78}, result.Value) } @@ -919,19 +910,18 @@ func Test_PipelineRunner_HexEncodeAndDecode(t *testing.T) { input := map[string]interface{}{ "input_val": inputBytes, } - lggr := logger.TestLogger(t) _, trrs, err := r.ExecuteRun(testutils.Context(t), pipeline.Spec{ DotDagSource: ` en [type=hexencode input="$(input_val)"] de [type=hexdecode] en->de `, - }, pipeline.NewVarsFrom(input), lggr) + }, pipeline.NewVarsFrom(input)) require.NoError(t, err) require.Equal(t, 2, len(trrs)) - assert.Equal(t, false, trrs.FinalResult(lggr).HasFatalErrors()) + assert.Equal(t, false, trrs.FinalResult().HasFatalErrors()) - result, err := trrs.FinalResult(lggr).SingularResult() + result, err := trrs.FinalResult().SingularResult() require.NoError(t, err) assert.Equal(t, inputBytes, result.Value) } @@ -944,17 +934,16 @@ func Test_PipelineRunner_Base64DecodeOutputs(t *testing.T) { input := map[string]interface{}{ "astring": "SGVsbG8sIHBsYXlncm91bmQ=", } - lggr := logger.TestLogger(t) _, trrs, err := r.ExecuteRun(testutils.Context(t), pipeline.Spec{ DotDagSource: ` a [type=base64decode input="$(astring)"] `, - }, pipeline.NewVarsFrom(input), lggr) + }, pipeline.NewVarsFrom(input)) require.NoError(t, err) require.Equal(t, 1, len(trrs)) - assert.Equal(t, false, trrs.FinalResult(lggr).HasFatalErrors()) + assert.Equal(t, false, trrs.FinalResult().HasFatalErrors()) - result, err := trrs.FinalResult(lggr).SingularResult() + result, err := trrs.FinalResult().SingularResult() require.NoError(t, err) assert.Equal(t, []byte("Hello, playground"), result.Value) } @@ -968,19 +957,18 @@ func Test_PipelineRunner_Base64EncodeAndDecode(t *testing.T) { input := map[string]interface{}{ "input_val": inputBytes, } - lggr := logger.TestLogger(t) _, trrs, err := r.ExecuteRun(testutils.Context(t), pipeline.Spec{ DotDagSource: ` en [type=base64encode input="$(input_val)"] de [type=base64decode] en->de `, - }, pipeline.NewVarsFrom(input), lggr) + }, pipeline.NewVarsFrom(input)) require.NoError(t, err) require.Equal(t, 2, len(trrs)) - assert.Equal(t, false, trrs.FinalResult(lggr).HasFatalErrors()) + assert.Equal(t, false, trrs.FinalResult().HasFatalErrors()) - result, err := trrs.FinalResult(lggr).SingularResult() + result, err := trrs.FinalResult().SingularResult() require.NoError(t, err) assert.Equal(t, inputBytes, result.Value) } @@ -1003,7 +991,7 @@ succeed; spec := pipeline.Spec{DotDagSource: fmt.Sprintf(template, 1)} vars := pipeline.NewVarsFrom(nil) - _, trrs, err := r.ExecuteRun(testutils.Context(t), spec, vars, lggr) + _, trrs, err := r.ExecuteRun(testutils.Context(t), spec, vars) require.NoError(t, err) require.Len(t, trrs, 1) assert.Equal(t, "1", trrs[0].Result.Value.(pipeline.ObjectParam).DecimalValue.Decimal().String()) @@ -1018,7 +1006,7 @@ succeed; // even though this is set to 2, it should use the cached version spec.DotDagSource = fmt.Sprintf(template, 2) - _, trrs, err = r.ExecuteRun(testutils.Context(t), spec, vars, lggr) + _, trrs, err = r.ExecuteRun(testutils.Context(t), spec, vars) require.NoError(t, err) require.Len(t, trrs, 1) assert.Equal(t, "1", trrs[0].Result.Value.(pipeline.ObjectParam).DecimalValue.Decimal().String()) diff --git a/core/services/pipeline/task.bridge.go b/core/services/pipeline/task.bridge.go index 103e5664666..8289b283c08 100644 --- a/core/services/pipeline/task.bridge.go +++ b/core/services/pipeline/task.bridge.go @@ -16,7 +16,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/logger" - "github.com/smartcontractkit/chainlink/v2/core/services/pipeline/internal/eautils" + "github.com/smartcontractkit/chainlink/v2/core/services/pipeline/eautils" ) // NOTE: These metrics generate a new label per bridge, this should be safe @@ -178,6 +178,10 @@ func (t *BridgeTask) Run(ctx context.Context, lggr logger.Logger, vars Vars, inp } if err != nil || statusCode != http.StatusOK { + if adapterErr := eautils.BestEffortExtractEAError(responseBytes); adapterErr != nil { + err = adapterErr + } + promBridgeErrors.WithLabelValues(t.Name).Inc() if cacheTTL == 0 { return Result{Error: err}, RunInfo{IsRetryable: isRetryableHTTPError(statusCode, err)} diff --git a/core/services/pipeline/task.bridge_test.go b/core/services/pipeline/task.bridge_test.go index 2efff2af6b6..d7519232eb5 100644 --- a/core/services/pipeline/task.bridge_test.go +++ b/core/services/pipeline/task.bridge_test.go @@ -23,6 +23,7 @@ import ( commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" + "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -32,7 +33,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" - "github.com/smartcontractkit/chainlink/v2/core/services/pipeline/internal/eautils" + "github.com/smartcontractkit/chainlink/v2/core/services/pipeline/eautils" "github.com/smartcontractkit/chainlink/v2/core/store/models" "github.com/smartcontractkit/chainlink/v2/core/utils" ) @@ -1088,12 +1089,6 @@ func TestBridgeTask_AdapterResponseStatusFailure(t *testing.T) { require.NoError(t, err) task.HelperSetDependencies(cfg.JobPipeline(), cfg.WebServer(), orm, specID, uuid.UUID{}, c) - // Insert entry 1m in the past, stale value, should not be used in case of EA failure. - _, err = db.ExecContext(ctx, `INSERT INTO bridge_last_value(dot_id, spec_id, value, finished_at) - VALUES($1, $2, $3, $4) ON CONFLICT ON CONSTRAINT bridge_last_value_pkey - DO UPDATE SET value = $3, finished_at = $4;`, task.DotID(), specID, big.NewInt(9700).Bytes(), time.Now()) - require.NoError(t, err) - vars := pipeline.NewVarsFrom( map[string]interface{}{ "jobRun": map[string]interface{}{ @@ -1104,9 +1099,27 @@ func TestBridgeTask_AdapterResponseStatusFailure(t *testing.T) { }, ) + testAdapterResponse.SetStatusCode(http.StatusInternalServerError) + testAdapterResponse.Error = map[string]interface{}{ + "name": "AdapterLWBAError", + "message": "bid ask violation detected", + } + result, runInfo := task.Run(ctx, logger.TestLogger(t), vars, nil) + + require.ErrorContains(t, result.Error, "AdapterLWBAError: bid ask violation detected") + require.Nil(t, result.Value) + require.True(t, runInfo.IsRetryable) + require.False(t, runInfo.IsPending) + + // Insert entry 1m in the past, stale value, should not be used in case of EA failure. + _, err = db.ExecContext(ctx, `INSERT INTO bridge_last_value(dot_id, spec_id, value, finished_at) + VALUES($1, $2, $3, $4) ON CONFLICT ON CONSTRAINT bridge_last_value_pkey + DO UPDATE SET value = $3, finished_at = $4;`, task.DotID(), specID, big.NewInt(9700).Bytes(), time.Now()) + require.NoError(t, err) + // expect all external adapter response status failures to be served from the cache testAdapterResponse.SetStatusCode(http.StatusBadRequest) - result, runInfo := task.Run(ctx, logger.TestLogger(t), vars, nil) + result, runInfo = task.Run(ctx, logger.TestLogger(t), vars, nil) require.NoError(t, result.Error) require.NotNil(t, result.Value) @@ -1211,3 +1224,47 @@ func TestBridgeTask_AdapterTimeout(t *testing.T) { require.False(t, runInfo.IsPending) }) } + +func TestBridgeTask_PipelineAdapterLWBAError(t *testing.T) { + t.Parallel() + + dag := ` +ds [type=bridge name="adapter-error-bridge" timeout="50ms" requestData="{\"data\":{\"from\":\"ETH\",\"to\":\"USD\"}}"]; +` + + ctx := testutils.Context(t) + db := pgtest.NewSqlxDB(t) + cfg := configtest.NewTestGeneralConfig(t) + orm := bridges.NewORM(db) + r, _ := newRunner(t, db, orm, cfg) + + bridge := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { + b, herr := io.ReadAll(req.Body) + require.NoError(t, herr) + require.Equal(t, `{"data":{"from":"ETH","to":"USD"}}`, string(b)) + + res.WriteHeader(http.StatusInternalServerError) + resp := `{"error": {"name":"AdapterLWBAError", "message": "bid ask violation detected"}}` + _, herr = res.Write([]byte(resp)) + require.NoError(t, herr) + })) + t.Cleanup(bridge.Close) + u, _ := url.Parse(bridge.URL) + require.NoError(t, orm.CreateBridgeType(ctx, &bridges.BridgeType{ + Name: "adapter-error-bridge", + URL: models.WebURL(*u), + })) + + spec := pipeline.Spec{DotDagSource: dag} + vars := pipeline.NewVarsFrom(nil) + + _, trrs, err := r.ExecuteRun(ctx, spec, vars) + + require.NoError(t, err) + require.Len(t, trrs, 1) + + finalResult := trrs[0] + + require.ErrorContains(t, finalResult.Result.Error, "AdapterLWBAError: bid ask violation detected") + require.Nil(t, finalResult.Result.Value) +} diff --git a/core/services/pipeline/task.divide_test.go b/core/services/pipeline/task.divide_test.go index 8eb8e4de063..e13f4512794 100644 --- a/core/services/pipeline/task.divide_test.go +++ b/core/services/pipeline/task.divide_test.go @@ -220,8 +220,7 @@ ds1 -> div_by_ds2 -> multiply; spec := pipeline.Spec{DotDagSource: dag} vars := pipeline.NewVarsFrom(nil) - lggr := logger.TestLogger(t) - _, trrs, err := r.ExecuteRun(testutils.Context(t), spec, vars, lggr) + _, trrs, err := r.ExecuteRun(testutils.Context(t), spec, vars) require.NoError(t, err) require.Len(t, trrs, 4) diff --git a/core/services/pipeline/task_params.go b/core/services/pipeline/task_params.go index 12582f6ef49..c44fd122e9e 100644 --- a/core/services/pipeline/task_params.go +++ b/core/services/pipeline/task_params.go @@ -17,8 +17,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/utils" ) -//go:generate mockery --quiet --name PipelineParamUnmarshaler --output ./mocks/ --case=underscore - type PipelineParamUnmarshaler interface { UnmarshalPipelineParam(val interface{}) error } diff --git a/core/services/promreporter/prom_reporter.go b/core/services/promreporter/prom_reporter.go index 92e674aac44..31d5f1129ef 100644 --- a/core/services/promreporter/prom_reporter.go +++ b/core/services/promreporter/prom_reporter.go @@ -24,7 +24,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/logger" ) -//go:generate mockery --quiet --name PrometheusBackend --output ../../internal/mocks/ --case=underscore type ( promReporter struct { services.StateMachine diff --git a/core/services/promreporter/prom_reporter_test.go b/core/services/promreporter/prom_reporter_test.go index f17b4aafed2..b61fa25bdc4 100644 --- a/core/services/promreporter/prom_reporter_test.go +++ b/core/services/promreporter/prom_reporter_test.go @@ -13,6 +13,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/gas" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/headtracker" "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" @@ -36,7 +37,8 @@ func newLegacyChainContainer(t *testing.T, db *sqlx.DB) legacyevm.LegacyChainCon config, dbConfig, evmConfig := txmgr.MakeTestConfigs(t) keyStore := cltest.NewKeyStore(t, db).Eth() ethClient := evmtest.NewEthClientMockWithDefaultChain(t) - estimator := gas.NewEstimator(logger.TestLogger(t), ethClient, config, evmConfig.GasEstimator()) + estimator, err := gas.NewEstimator(logger.TestLogger(t), ethClient, config, evmConfig.GasEstimator()) + require.NoError(t, err) lggr := logger.TestLogger(t) lpOpts := logpoller.Opts{ PollPeriod: 100 * time.Millisecond, @@ -45,7 +47,8 @@ func newLegacyChainContainer(t *testing.T, db *sqlx.DB) legacyevm.LegacyChainCon RpcBatchSize: 2, KeepFinalizedBlocksDepth: 1000, } - lp := logpoller.NewLogPoller(logpoller.NewORM(testutils.FixtureChainID, db, lggr), ethClient, lggr, lpOpts) + ht := headtracker.NewSimulatedHeadTracker(ethClient, lpOpts.UseFinalityTag, lpOpts.FinalityDepth) + lp := logpoller.NewLogPoller(logpoller.NewORM(testutils.FixtureChainID, db, lggr), ethClient, lggr, ht, lpOpts) txm, err := txmgr.NewTxm( db, diff --git a/core/services/registrysyncer/syncer.go b/core/services/registrysyncer/syncer.go new file mode 100644 index 00000000000..f3c254af6d8 --- /dev/null +++ b/core/services/registrysyncer/syncer.go @@ -0,0 +1,250 @@ +package registrysyncer + +import ( + "context" + "encoding/json" + "fmt" + "sync" + "time" + + "github.com/smartcontractkit/chainlink-common/pkg/services" + "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives" + + kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/capabilities_registry" + "github.com/smartcontractkit/chainlink/v2/core/logger" + p2ptypes "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types" + evmrelaytypes "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" +) + +type HashedCapabilityID [32]byte +type DonID uint32 + +type State struct { + IDsToDONs map[DonID]kcr.CapabilitiesRegistryDONInfo + IDsToNodes map[p2ptypes.PeerID]kcr.CapabilitiesRegistryNodeInfo + IDsToCapabilities map[HashedCapabilityID]kcr.CapabilitiesRegistryCapabilityInfo +} + +type Launcher interface { + Launch(ctx context.Context, state State) error +} + +type Syncer interface { + services.Service + AddLauncher(h ...Launcher) +} + +type registrySyncer struct { + stopCh services.StopChan + launchers []Launcher + reader types.ContractReader + initReader func(ctx context.Context, lggr logger.Logger, relayer contractReaderFactory, registryAddress string) (types.ContractReader, error) + relayer contractReaderFactory + registryAddress string + + wg sync.WaitGroup + lggr logger.Logger + mu sync.RWMutex +} + +var _ services.Service = ®istrySyncer{} + +var ( + defaultTickInterval = 12 * time.Second +) + +// New instantiates a new RegistrySyncer +func New( + lggr logger.Logger, + relayer contractReaderFactory, + registryAddress string, +) (*registrySyncer, error) { + stopCh := make(services.StopChan) + return ®istrySyncer{ + stopCh: stopCh, + lggr: lggr.Named("RegistrySyncer"), + relayer: relayer, + registryAddress: registryAddress, + initReader: newReader, + }, nil +} + +type contractReaderFactory interface { + NewContractReader(context.Context, []byte) (types.ContractReader, error) +} + +// NOTE: this can't be called while initializing the syncer and needs to be called in the sync loop. +// This is because Bind() makes an onchain call to verify that the contract address exists, and if +// called during initialization, this results in a "no live nodes" error. +func newReader(ctx context.Context, lggr logger.Logger, relayer contractReaderFactory, remoteRegistryAddress string) (types.ContractReader, error) { + contractReaderConfig := evmrelaytypes.ChainReaderConfig{ + Contracts: map[string]evmrelaytypes.ChainContractReader{ + "CapabilitiesRegistry": { + ContractABI: kcr.CapabilitiesRegistryABI, + Configs: map[string]*evmrelaytypes.ChainReaderDefinition{ + "getDONs": { + ChainSpecificName: "getDONs", + }, + "getCapabilities": { + ChainSpecificName: "getCapabilities", + }, + "getNodes": { + ChainSpecificName: "getNodes", + }, + }, + }, + }, + } + + contractReaderConfigEncoded, err := json.Marshal(contractReaderConfig) + if err != nil { + return nil, err + } + + cr, err := relayer.NewContractReader(ctx, contractReaderConfigEncoded) + if err != nil { + return nil, err + } + + err = cr.Bind(ctx, []types.BoundContract{ + { + Address: remoteRegistryAddress, + Name: "CapabilitiesRegistry", + }, + }) + + return cr, err +} + +func (s *registrySyncer) Start(ctx context.Context) error { + s.wg.Add(1) + go func() { + defer s.wg.Done() + s.syncLoop() + }() + return nil +} + +func (s *registrySyncer) syncLoop() { + ctx, cancel := s.stopCh.NewCtx() + defer cancel() + + ticker := time.NewTicker(defaultTickInterval) + defer ticker.Stop() + + // Sync for a first time outside the loop; this means we'll start a remote + // sync immediately once spinning up syncLoop, as by default a ticker will + // fire for the first time at T+N, where N is the interval. + s.lggr.Debug("starting initial sync with remote registry") + err := s.sync(ctx) + if err != nil { + s.lggr.Errorw("failed to sync with remote registry", "error", err) + } + + for { + select { + case <-s.stopCh: + return + case <-ticker.C: + s.lggr.Debug("starting regular sync with the remote registry") + err := s.sync(ctx) + if err != nil { + s.lggr.Errorw("failed to sync with remote registry", "error", err) + } + } + } +} + +func (s *registrySyncer) state(ctx context.Context) (State, error) { + dons := []kcr.CapabilitiesRegistryDONInfo{} + err := s.reader.GetLatestValue(ctx, "CapabilitiesRegistry", "getDONs", primitives.Unconfirmed, nil, &dons) + if err != nil { + return State{}, err + } + + idsToDONs := map[DonID]kcr.CapabilitiesRegistryDONInfo{} + for _, d := range dons { + idsToDONs[DonID(d.Id)] = d + } + + caps := []kcr.CapabilitiesRegistryCapabilityInfo{} + err = s.reader.GetLatestValue(ctx, "CapabilitiesRegistry", "getCapabilities", primitives.Unconfirmed, nil, &caps) + if err != nil { + return State{}, err + } + + idsToCapabilities := map[HashedCapabilityID]kcr.CapabilitiesRegistryCapabilityInfo{} + for _, c := range caps { + idsToCapabilities[c.HashedId] = c + } + + nodes := []kcr.CapabilitiesRegistryNodeInfo{} + err = s.reader.GetLatestValue(ctx, "CapabilitiesRegistry", "getNodes", primitives.Unconfirmed, nil, &nodes) + if err != nil { + return State{}, err + } + + idsToNodes := map[p2ptypes.PeerID]kcr.CapabilitiesRegistryNodeInfo{} + for _, node := range nodes { + idsToNodes[node.P2pId] = node + } + + return State{IDsToDONs: idsToDONs, IDsToCapabilities: idsToCapabilities, IDsToNodes: idsToNodes}, nil +} + +func (s *registrySyncer) sync(ctx context.Context) error { + s.mu.RLock() + defer s.mu.RUnlock() + + if len(s.launchers) == 0 { + s.lggr.Warn("sync called, but no launchers are registered; nooping") + return nil + } + + if s.reader == nil { + reader, err := s.initReader(ctx, s.lggr, s.relayer, s.registryAddress) + if err != nil { + return err + } + + s.reader = reader + } + + state, err := s.state(ctx) + if err != nil { + return fmt.Errorf("failed to sync with remote registry: %w", err) + } + + for _, h := range s.launchers { + if err := h.Launch(ctx, state); err != nil { + s.lggr.Errorf("error calling launcher: %s", err) + } + } + + return nil +} + +func (s *registrySyncer) AddLauncher(launchers ...Launcher) { + s.mu.Lock() + defer s.mu.Unlock() + s.launchers = append(s.launchers, launchers...) +} + +func (s *registrySyncer) Close() error { + close(s.stopCh) + s.wg.Wait() + return nil +} + +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/reader_test.go b/core/services/registrysyncer/syncer_test.go similarity index 89% rename from core/capabilities/reader_test.go rename to core/services/registrysyncer/syncer_test.go index cc61628c541..c239cead43f 100644 --- a/core/capabilities/reader_test.go +++ b/core/services/registrysyncer/syncer_test.go @@ -1,4 +1,4 @@ -package capabilities +package registrysyncer import ( "context" @@ -17,9 +17,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/smartcontractkit/chainlink-common/pkg/services" "github.com/smartcontractkit/chainlink-common/pkg/types" + evmclient "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/headtracker" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/capabilities_registry" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -39,7 +40,8 @@ var writeChainCapability = kcr.CapabilitiesRegistryCapability{ func startNewChainWithRegistry(t *testing.T) (*kcr.CapabilitiesRegistry, common.Address, *bind.TransactOpts, *backends.SimulatedBackend) { owner := testutils.MustNewSimTransactor(t) - oneEth, _ := new(big.Int).SetString("100000000000000000000", 10) + i := &big.Int{} + oneEth, _ := i.SetString("100000000000000000000", 10) gasLimit := ethconfig.Defaults.Miner.GasCeil * 2 // 60 M blocks simulatedBackend := backends.NewSimulatedBackend(core.GenesisAlloc{owner.From: { @@ -58,6 +60,7 @@ func startNewChainWithRegistry(t *testing.T) (*kcr.CapabilitiesRegistry, common. type crFactory struct { lggr logger.Logger + ht logpoller.HeadTracker logPoller logpoller.LogPoller client evmclient.Client } @@ -67,7 +70,8 @@ func (c *crFactory) NewContractReader(ctx context.Context, cfg []byte) (types.Co if err := json.Unmarshal(cfg, crCfg); err != nil { return nil, err } - svc, err := evm.NewChainReaderService(ctx, c.lggr, c.logPoller, c.client, *crCfg) + + svc, err := evm.NewChainReaderService(ctx, c.lggr, c.logPoller, c.ht, c.client, *crCfg) if err != nil { return nil, err } @@ -83,13 +87,16 @@ func newContractReaderFactory(t *testing.T, simulatedBackend *backends.Simulated testutils.SimulatedChainID, ) db := pgtest.NewSqlxDB(t) + const finalityDepth = 2 + ht := headtracker.NewSimulatedHeadTracker(client, false, finalityDepth) lp := logpoller.NewLogPoller( logpoller.NewORM(testutils.SimulatedChainID, db, lggr), client, lggr, + ht, logpoller.Opts{ PollPeriod: 100 * time.Millisecond, - FinalityDepth: 2, + FinalityDepth: finalityDepth, BackfillBatchSize: 3, RpcBatchSize: 2, KeepFinalizedBlocksDepth: 1000, @@ -98,6 +105,7 @@ func newContractReaderFactory(t *testing.T, simulatedBackend *backends.Simulated return &crFactory{ lggr: lggr, client: client, + ht: ht, logPoller: lp, } } @@ -111,22 +119,13 @@ func randomWord() [32]byte { return [32]byte(word) } -type mockWrapper struct { - services.Service - peer p2ptypes.Peer -} - -func (m mockWrapper) GetPeer() p2ptypes.Peer { - return m.peer -} - -type mockPeer struct { - p2ptypes.Peer - peerID p2ptypes.PeerID +type launcher struct { + localRegistry State } -func (m mockPeer) ID() p2ptypes.PeerID { - return m.peerID +func (l *launcher) Launch(ctx context.Context, localRegistry State) error { + l.localRegistry = localRegistry + return nil } func TestReader_Integration(t *testing.T) { @@ -205,15 +204,14 @@ func TestReader_Integration(t *testing.T) { require.NoError(t, err) factory := newContractReaderFactory(t, sim) - pw := mockWrapper{ - peer: mockPeer{ - peerID: nodeSet[0], - }, - } - reader, err := newRemoteRegistryReader(ctx, logger.TestLogger(t), pw, factory, regAddress.Hex()) + syncer, err := New(logger.TestLogger(t), factory, regAddress.Hex()) require.NoError(t, err) - s, err := reader.state(ctx) + l := &launcher{} + syncer.AddLauncher(l) + + err = syncer.sync(ctx) + s := l.localRegistry require.NoError(t, err) assert.Len(t, s.IDsToCapabilities, 1) @@ -277,10 +275,4 @@ func TestReader_Integration(t *testing.T) { nodeSet[1]: nodesInfo[1], nodeSet[2]: nodesInfo[2], }, s.IDsToNodes) - - node, err := reader.LocalNode(ctx) - require.NoError(t, err) - - assert.Equal(t, p2ptypes.PeerID(nodeSet[0]), *node.PeerID) - assert.Equal(t, fmt.Sprint(1), node.WorkflowDON.ID) } diff --git a/core/services/relay/dummy/config_digester.go b/core/services/relay/dummy/config_digester.go new file mode 100644 index 00000000000..a74e007b0ba --- /dev/null +++ b/core/services/relay/dummy/config_digester.go @@ -0,0 +1,26 @@ +package dummy + +import ( + ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" +) + +// Stub config digester that uses a static config digest + +type configDigester struct { + configDigest ocrtypes.ConfigDigest +} + +func NewOffchainConfigDigester(cd ocrtypes.ConfigDigest) (ocrtypes.OffchainConfigDigester, error) { + return &configDigester{cd}, nil +} + +// Compute ConfigDigest for the given ContractConfig. The first two bytes of the +// ConfigDigest must be the big-endian encoding of ConfigDigestPrefix! +func (cd *configDigester) ConfigDigest(ocrtypes.ContractConfig) (ocrtypes.ConfigDigest, error) { + return cd.configDigest, nil +} + +// This should return the same constant value on every invocation +func (cd *configDigester) ConfigDigestPrefix() (ocrtypes.ConfigDigestPrefix, error) { + return ocrtypes.ConfigDigestPrefixFromConfigDigest(cd.configDigest), nil +} diff --git a/core/services/relay/dummy/config_provider.go b/core/services/relay/dummy/config_provider.go new file mode 100644 index 00000000000..10662ee296d --- /dev/null +++ b/core/services/relay/dummy/config_provider.go @@ -0,0 +1,97 @@ +package dummy + +import ( + "context" + + "github.com/ethereum/go-ethereum/common/hexutil" + ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + + "github.com/smartcontractkit/chainlink/v2/core/logger" + + "github.com/smartcontractkit/chainlink-common/pkg/types" +) + +// Stub ConfigTracker that uses static config + +// interim struct used for unmarshalling from relay config +type ConfigTrackerCfg struct { + // OCR Config + ConfigDigest hexutil.Bytes + ConfigCount uint64 + Signers []hexutil.Bytes + Transmitters []string + F uint8 + OnchainConfig hexutil.Bytes + OffchainConfigVersion uint64 + OffchainConfig hexutil.Bytes + + // Tracker config + ChangedInBlock uint64 + BlockHeight uint64 +} + +func (cfg ConfigTrackerCfg) ToContractConfig() (ocrtypes.ContractConfig, error) { + cd, err := ocrtypes.BytesToConfigDigest(cfg.ConfigDigest) + if err != nil { + return ocrtypes.ContractConfig{}, err + } + signers := make([]ocrtypes.OnchainPublicKey, len(cfg.Signers)) + for i, s := range cfg.Signers { + signers[i] = ocrtypes.OnchainPublicKey(s) + } + transmitters := make([]ocrtypes.Account, len(cfg.Transmitters)) + for i, t := range cfg.Transmitters { + transmitters[i] = ocrtypes.Account(t) + } + return ocrtypes.ContractConfig{ + ConfigDigest: cd, + ConfigCount: cfg.ConfigCount, + Signers: signers, + Transmitters: transmitters, + F: cfg.F, + OnchainConfig: cfg.OnchainConfig, + OffchainConfigVersion: cfg.OffchainConfigVersion, + OffchainConfig: cfg.OffchainConfig, + }, nil +} + +type configProvider struct { + lggr logger.Logger + + digester ocrtypes.OffchainConfigDigester + tracker ocrtypes.ContractConfigTracker +} + +func NewConfigProvider(lggr logger.Logger, cfg RelayConfig) (types.ConfigProvider, error) { + cp := &configProvider{lggr: lggr.Named("DummyConfigProvider")} + + { + contractConfig, err := cfg.ConfigTracker.ToContractConfig() + if err != nil { + return nil, err + } + + cp.digester, err = NewOffchainConfigDigester(contractConfig.ConfigDigest) + if err != nil { + return nil, err + } + } + var err error + cp.tracker, err = NewContractConfigTracker(cp.lggr, cfg.ConfigTracker) + if err != nil { + return nil, err + } + return cp, nil +} + +func (cp *configProvider) OffchainConfigDigester() ocrtypes.OffchainConfigDigester { + return cp.digester +} +func (cp *configProvider) ContractConfigTracker() ocrtypes.ContractConfigTracker { return cp.tracker } +func (cp *configProvider) Name() string { return cp.lggr.Name() } +func (*configProvider) Start(context.Context) error { return nil } +func (*configProvider) Close() error { return nil } +func (*configProvider) Ready() error { return nil } +func (cp *configProvider) HealthReport() map[string]error { + return map[string]error{cp.lggr.Name(): nil} +} diff --git a/core/services/relay/dummy/config_tracker.go b/core/services/relay/dummy/config_tracker.go new file mode 100644 index 00000000000..0ae188361fa --- /dev/null +++ b/core/services/relay/dummy/config_tracker.go @@ -0,0 +1,51 @@ +package dummy + +import ( + "context" + + ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + + "github.com/smartcontractkit/chainlink/v2/core/logger" +) + +type configTracker struct { + lggr logger.Logger + cfg ocrtypes.ContractConfig + + changedInBlock uint64 + blockHeight uint64 +} + +func NewContractConfigTracker(lggr logger.Logger, cfg ConfigTrackerCfg) (ocrtypes.ContractConfigTracker, error) { + contractConfig, err := cfg.ToContractConfig() + if err != nil { + return nil, err + } + return &configTracker{lggr.Named("DummyConfigProvider"), contractConfig, cfg.ChangedInBlock, cfg.BlockHeight}, nil +} + +// Notify may optionally emit notification events when the contract's +// configuration changes. This is purely used as an optimization reducing +// the delay between a configuration change and its enactment. Implementors +// who don't care about this may simply return a nil channel. +// +// The returned channel should never be closed. +func (ct *configTracker) Notify() <-chan struct{} { + return nil +} + +// LatestConfigDetails returns information about the latest configuration, +// but not the configuration itself. +func (ct *configTracker) LatestConfigDetails(ctx context.Context) (changedInBlock uint64, configDigest ocrtypes.ConfigDigest, err error) { + return ct.changedInBlock, ct.cfg.ConfigDigest, nil +} + +// LatestConfig returns the latest configuration. +func (ct *configTracker) LatestConfig(ctx context.Context, changedInBlock uint64) (ocrtypes.ContractConfig, error) { + return ct.cfg, nil +} + +// LatestBlockHeight returns the height of the most recent block in the chain. +func (ct *configTracker) LatestBlockHeight(ctx context.Context) (blockHeight uint64, err error) { + return ct.blockHeight, nil // set LatestBlockHeight to a high number so that OCR considers it to be confirmed +} diff --git a/core/services/relay/dummy/llo_provider.go b/core/services/relay/dummy/llo_provider.go new file mode 100644 index 00000000000..4aeb21bed8a --- /dev/null +++ b/core/services/relay/dummy/llo_provider.go @@ -0,0 +1,86 @@ +package dummy + +import ( + "context" + "errors" + + ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + + "github.com/smartcontractkit/chainlink-common/pkg/services" + commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" + relaytypes "github.com/smartcontractkit/chainlink-common/pkg/types" + llotypes "github.com/smartcontractkit/chainlink-common/pkg/types/llo" + "github.com/smartcontractkit/chainlink/v2/core/logger" + "github.com/smartcontractkit/chainlink/v2/core/services/llo" +) + +var _ commontypes.LLOProvider = (*lloProvider)(nil) + +type lloProvider struct { + cp commontypes.ConfigProvider + transmitter llo.Transmitter + logger logger.Logger + channelDefinitionCache llotypes.ChannelDefinitionCache + + ms services.MultiStart +} + +func NewLLOProvider( + lggr logger.Logger, + cp commontypes.ConfigProvider, + transmitter llo.Transmitter, + channelDefinitionCache llotypes.ChannelDefinitionCache, +) relaytypes.LLOProvider { + return &lloProvider{ + cp, + transmitter, + lggr.Named("LLOProvider"), + channelDefinitionCache, + services.MultiStart{}, + } +} + +func (p *lloProvider) Start(ctx context.Context) error { + err := p.ms.Start(ctx, p.cp, p.transmitter, p.channelDefinitionCache) + return err +} + +func (p *lloProvider) Close() error { + return p.ms.Close() +} + +func (p *lloProvider) Ready() error { + return errors.Join(p.cp.Ready(), p.transmitter.Ready(), p.channelDefinitionCache.Ready()) +} + +func (p *lloProvider) Name() string { + return p.logger.Name() +} + +func (p *lloProvider) HealthReport() map[string]error { + report := map[string]error{p.Name(): nil} + services.CopyHealth(report, p.cp.HealthReport()) + services.CopyHealth(report, p.transmitter.HealthReport()) + services.CopyHealth(report, p.channelDefinitionCache.HealthReport()) + return report +} + +func (p *lloProvider) ContractConfigTracker() ocrtypes.ContractConfigTracker { + return p.cp.ContractConfigTracker() +} + +func (p *lloProvider) OffchainConfigDigester() ocrtypes.OffchainConfigDigester { + return p.cp.OffchainConfigDigester() +} + +func (p *lloProvider) OnchainConfigCodec() llo.OnchainConfigCodec { + return &llo.JSONOnchainConfigCodec{} +} + +func (p *lloProvider) ContractTransmitter() llotypes.Transmitter { + return p.transmitter +} + +func (p *lloProvider) ChannelDefinitionCache() llotypes.ChannelDefinitionCache { + return p.channelDefinitionCache +} diff --git a/core/services/relay/dummy/relayer.go b/core/services/relay/dummy/relayer.go new file mode 100644 index 00000000000..cf3aa732c47 --- /dev/null +++ b/core/services/relay/dummy/relayer.go @@ -0,0 +1,82 @@ +package dummy + +import ( + "context" + "encoding/json" + "math/big" + + "github.com/smartcontractkit/chainlink-common/pkg/loop" + "github.com/smartcontractkit/chainlink-common/pkg/types" + + "github.com/smartcontractkit/chainlink/v2/core/logger" + "github.com/smartcontractkit/chainlink/v2/core/services/llo" + "github.com/smartcontractkit/chainlink/v2/core/services/llo/bm" + "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/llo/config" +) + +// The dummy relayer is a simple reference implementation that doesn't actually +// connect to any chain. It's useful for testing and as a reference for +// implementing a new relayer. + +type RelayConfig struct { + ConfigTracker ConfigTrackerCfg +} + +type relayer struct { + lggr logger.Logger + chainID string +} + +func NewRelayer(lggr logger.Logger, chainID string) loop.Relayer { + return &relayer{lggr, chainID} +} + +func (r *relayer) NewChainWriter(ctx context.Context, chainWriterConfig []byte) (types.ChainWriter, error) { + return nil, nil +} + +func (r *relayer) NewContractReader(ctx context.Context, contractReaderConfig []byte) (types.ContractReader, error) { + return nil, nil +} +func (r *relayer) NewConfigProvider(_ context.Context, rargs types.RelayArgs) (types.ConfigProvider, error) { + var cfg RelayConfig + if err := json.Unmarshal(rargs.RelayConfig, &cfg); err != nil { + return nil, err + } + return NewConfigProvider(r.lggr, cfg) +} +func (r *relayer) NewPluginProvider(context.Context, types.RelayArgs, types.PluginArgs) (types.PluginProvider, error) { + return nil, nil +} +func (r *relayer) NewLLOProvider(ctx context.Context, rargs types.RelayArgs, pargs types.PluginArgs) (types.LLOProvider, error) { + cp, err := r.NewConfigProvider(ctx, rargs) + if err != nil { + return nil, err + } + transmitter := bm.NewTransmitter(r.lggr, pargs.TransmitterID) + pluginCfg := new(config.PluginConfig) + if err = pluginCfg.Unmarshal(pargs.PluginConfig); err != nil { + return nil, err + } + cdc, err := llo.NewStaticChannelDefinitionCache(r.lggr, pluginCfg.ChannelDefinitions) + if err != nil { + return nil, err + } + return NewLLOProvider(r.lggr, cp, transmitter, cdc), nil +} +func (r *relayer) GetChainStatus(ctx context.Context) (types.ChainStatus, error) { + return types.ChainStatus{}, nil +} +func (r *relayer) ListNodeStatuses(ctx context.Context, pageSize int32, pageToken string) (stats []types.NodeStatus, nextPageToken string, total int, err error) { + return nil, "", 0, nil +} +func (r *relayer) Transact(ctx context.Context, from, to string, amount *big.Int, balanceCheck bool) error { + return nil +} +func (r *relayer) Name() string { return r.lggr.Name() } +func (r *relayer) Start(context.Context) error { return nil } +func (r *relayer) Close() error { return nil } +func (r *relayer) Ready() error { return nil } +func (r *relayer) HealthReport() map[string]error { + return map[string]error{r.lggr.Name(): nil} +} diff --git a/core/services/relay/evm/batch_caller.go b/core/services/relay/evm/batch_caller.go new file mode 100644 index 00000000000..3ee4525827a --- /dev/null +++ b/core/services/relay/evm/batch_caller.go @@ -0,0 +1,311 @@ +package evm + +import ( + "context" + "fmt" + "math/big" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/rpc" + "github.com/pkg/errors" + "golang.org/x/sync/errgroup" + + "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" + "github.com/smartcontractkit/chainlink/v2/core/logger" +) + +var errEmptyOutput = errors.New("rpc call output is empty (make sure that the contract method exists and rpc is healthy)") + +const ( + // DefaultRpcBatchSizeLimit defines the maximum number of rpc requests to be included in a batch. + DefaultRpcBatchSizeLimit = 100 + + // DefaultRpcBatchBackOffMultiplier defines the rate of reducing the batch size limit for retried calls. + // For example if limit is 20 and multiplier is 4: + // 1. 20 + // 2. 20/4 = 5 + // 3. 5/4 = 1 + DefaultRpcBatchBackOffMultiplier = 5 + + // DefaultMaxParallelRpcCalls defines the default maximum number of individual in-parallel rpc calls. + DefaultMaxParallelRpcCalls = 10 +) + +// BatchResult is organised by contracts names, key is contract name. +type BatchResult map[string]ContractResults +type ContractResults []MethodCallResult +type MethodCallResult struct { + MethodName string + ReturnValue any + Err error +} + +type BatchCall []Call +type Call struct { + ContractAddress common.Address + ContractName, MethodName string + Params, ReturnVal any +} + +func (c BatchCall) String() string { + callString := "" + for _, call := range c { + callString += fmt.Sprintf("%s\n", call.String()) + } + return callString +} + +// Implement the String method for the Call struct +func (c Call) String() string { + return fmt.Sprintf("contractAddress: %s, contractName: %s, method: %s, params: %+v returnValType: %T", + c.ContractAddress.Hex(), c.ContractName, c.MethodName, c.Params, c.ReturnVal) +} + +type BatchCaller interface { + // BatchCall executes all the provided BatchRequest and returns the results in the same order + // of the calls. Pass blockNumber=0 to use the latest block. + BatchCall(ctx context.Context, blockNumber uint64, batchRequests BatchCall) (BatchResult, error) +} + +// dynamicLimitedBatchCaller makes batched rpc calls and perform retries by reducing the batch size on each retry. +type dynamicLimitedBatchCaller struct { + bc *defaultEvmBatchCaller +} + +func NewDynamicLimitedBatchCaller(lggr logger.Logger, codec types.Codec, evmClient client.Client, batchSizeLimit, backOffMultiplier, parallelRpcCallsLimit uint) BatchCaller { + return &dynamicLimitedBatchCaller{ + bc: newDefaultEvmBatchCaller(lggr, evmClient, codec, batchSizeLimit, backOffMultiplier, parallelRpcCallsLimit), + } +} + +func (c *dynamicLimitedBatchCaller) BatchCall(ctx context.Context, blockNumber uint64, reqs BatchCall) (BatchResult, error) { + return c.bc.batchCallDynamicLimitRetries(ctx, blockNumber, reqs) +} + +type defaultEvmBatchCaller struct { + lggr logger.Logger + evmClient client.Client + codec types.Codec + batchSizeLimit uint + parallelRpcCallsLimit uint + backOffMultiplier uint +} + +// NewDefaultEvmBatchCaller returns a new batch caller instance. +// batchCallLimit defines the maximum number of calls for BatchCallLimit method, pass 0 to keep the default. +// backOffMultiplier defines the back-off strategy for retries on BatchCallDynamicLimitRetries method, pass 0 to keep the default. +func newDefaultEvmBatchCaller( + lggr logger.Logger, evmClient client.Client, codec types.Codec, batchSizeLimit, backOffMultiplier, parallelRpcCallsLimit uint, +) *defaultEvmBatchCaller { + batchSize := uint(DefaultRpcBatchSizeLimit) + if batchSizeLimit > 0 { + batchSize = batchSizeLimit + } + + multiplier := uint(DefaultRpcBatchBackOffMultiplier) + if backOffMultiplier > 0 { + multiplier = backOffMultiplier + } + + parallelRpcCalls := uint(DefaultMaxParallelRpcCalls) + if parallelRpcCallsLimit > 0 { + parallelRpcCalls = parallelRpcCallsLimit + } + + return &defaultEvmBatchCaller{ + lggr: lggr, + evmClient: evmClient, + codec: codec, + batchSizeLimit: batchSize, + parallelRpcCallsLimit: parallelRpcCalls, + backOffMultiplier: multiplier, + } +} + +func (c *defaultEvmBatchCaller) batchCall(ctx context.Context, blockNumber uint64, batchCall BatchCall) ([]dataAndErr, error) { + if len(batchCall) == 0 { + return nil, nil + } + + packedOutputs := make([]string, len(batchCall)) + rpcBatchCalls := make([]rpc.BatchElem, len(batchCall)) + for i, call := range batchCall { + data, err := c.codec.Encode(ctx, call.Params, WrapItemType(call.ContractName, call.MethodName, true)) + if err != nil { + return nil, err + } + + blockNumStr := "latest" + if blockNumber > 0 { + blockNumStr = hexutil.EncodeBig(big.NewInt(0).SetUint64(blockNumber)) + } + + rpcBatchCalls[i] = rpc.BatchElem{ + Method: "eth_call", + Args: []any{ + map[string]interface{}{ + "from": common.Address{}, + "to": call.ContractAddress, + "data": data, + }, + blockNumStr, + }, + Result: &packedOutputs[i], + } + } + + if err := c.evmClient.BatchCallContext(ctx, rpcBatchCalls); err != nil { + return nil, fmt.Errorf("batch call context: %w", err) + } + + results := make([]dataAndErr, len(batchCall)) + for i, call := range batchCall { + results[i] = dataAndErr{ + contractName: call.ContractName, + methodName: call.MethodName, + returnVal: call.ReturnVal, + } + + if rpcBatchCalls[i].Error != nil { + results[i].err = rpcBatchCalls[i].Error + continue + } + + if packedOutputs[i] == "" { + // Some RPCs instead of returning "0x" are returning an empty string. + // We are overriding this behaviour for consistent handling of this scenario. + packedOutputs[i] = "0x" + } + + b, err := hexutil.Decode(packedOutputs[i]) + if err != nil { + return nil, fmt.Errorf("decode result %s: packedOutputs %s: %w", call, packedOutputs[i], err) + } + + if err = c.codec.Decode(ctx, b, call.ReturnVal, WrapItemType(call.ContractName, call.MethodName, false)); err != nil { + if len(b) == 0 { + results[i].err = fmt.Errorf("unpack result %s: %s: %w", call, err.Error(), errEmptyOutput) + } else { + results[i].err = fmt.Errorf("unpack result %s: %w", call, err) + } + continue + } + results[i].returnVal = call.ReturnVal + } + + return results, nil +} + +func (c *defaultEvmBatchCaller) batchCallDynamicLimitRetries(ctx context.Context, blockNumber uint64, calls BatchCall) (BatchResult, error) { + lim := c.batchSizeLimit + // Limit the batch size to the number of calls + if uint(len(calls)) < lim { + lim = uint(len(calls)) + } + for { + results, err := c.batchCallLimit(ctx, blockNumber, calls, lim) + if err == nil { + return results, nil + } + + if lim <= 1 { + return nil, errors.Wrapf(err, "calls %+v", calls) + } + + newLim := lim / c.backOffMultiplier + if newLim == 0 || newLim == lim { + newLim = 1 + } + lim = newLim + c.lggr.Errorf("retrying batch call with %d calls and %d limit that failed with error=%s", + len(calls), lim, err) + } +} + +type dataAndErr struct { + contractName, methodName string + returnVal any + err error +} + +func (c *defaultEvmBatchCaller) batchCallLimit(ctx context.Context, blockNumber uint64, calls BatchCall, batchSizeLimit uint) (BatchResult, error) { + if batchSizeLimit <= 0 { + res, err := c.batchCall(ctx, blockNumber, calls) + return convertToBatchResult(res), err + } + + type job struct { + blockNumber uint64 + calls BatchCall + results []dataAndErr + } + + jobs := make([]job, 0) + for i := 0; i < len(calls); i += int(batchSizeLimit) { + idxFrom := i + idxTo := idxFrom + int(batchSizeLimit) + if idxTo > len(calls) { + idxTo = len(calls) + } + jobs = append(jobs, job{blockNumber: blockNumber, calls: calls[idxFrom:idxTo], results: nil}) + } + + if c.parallelRpcCallsLimit > 1 { + eg := new(errgroup.Group) + eg.SetLimit(int(c.parallelRpcCallsLimit)) + for jobIdx := range jobs { + jobIdx := jobIdx + eg.Go(func() error { + res, err := c.batchCall(ctx, jobs[jobIdx].blockNumber, jobs[jobIdx].calls) + if err != nil { + return err + } + jobs[jobIdx].results = res + return nil + }) + } + if err := eg.Wait(); err != nil { + return nil, err + } + } else { + var err error + for jobIdx := range jobs { + jobs[jobIdx].results, err = c.batchCall(ctx, jobs[jobIdx].blockNumber, jobs[jobIdx].calls) + if err != nil { + return nil, err + } + } + } + + var results []dataAndErr + for _, jb := range jobs { + results = append(results, jb.results...) + } + + return convertToBatchResult(results), nil +} + +func convertToBatchResult(data []dataAndErr) BatchResult { + if data == nil { + return nil + } + + batchResult := make(BatchResult) + for _, d := range data { + methodCall := MethodCallResult{ + MethodName: d.methodName, + ReturnValue: d.returnVal, + Err: d.err, + } + + if _, exists := batchResult[d.contractName]; !exists { + batchResult[d.contractName] = ContractResults{} + } + + batchResult[d.contractName] = append(batchResult[d.contractName], methodCall) + } + + return batchResult +} diff --git a/core/services/relay/evm/batch_caller_test.go b/core/services/relay/evm/batch_caller_test.go new file mode 100644 index 00000000000..995e47618cc --- /dev/null +++ b/core/services/relay/evm/batch_caller_test.go @@ -0,0 +1,192 @@ +package evm_test + +import ( + "encoding/hex" + "fmt" + "math/big" + "testing" + + "github.com/cometbft/cometbft/libs/rand" + "github.com/ethereum/go-ethereum/rpc" + "github.com/pkg/errors" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + + chainmocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client/mocks" + "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" + "github.com/smartcontractkit/chainlink/v2/core/logger" + "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm" + "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mocks" + evmtypes "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" +) + +func TestDefaultEvmBatchCaller_BatchCallDynamicLimit(t *testing.T) { + testCases := []struct { + name string + maxBatchSize uint + backOffMultiplier uint + numCalls int + expectedBatchSizesOnEachRetry []int + }{ + { + name: "defaults", + maxBatchSize: evm.DefaultRpcBatchSizeLimit, + backOffMultiplier: evm.DefaultRpcBatchBackOffMultiplier, + numCalls: 200, + expectedBatchSizesOnEachRetry: []int{100, 20, 4, 1}, + }, + { + name: "base simple scenario", + maxBatchSize: 20, + backOffMultiplier: 2, + numCalls: 100, + expectedBatchSizesOnEachRetry: []int{20, 10, 5, 2, 1}, + }, + { + name: "remainder", + maxBatchSize: 99, + backOffMultiplier: 5, + numCalls: 100, + expectedBatchSizesOnEachRetry: []int{99, 19, 3, 1}, + }, + { + name: "large back off multiplier", + maxBatchSize: 20, + backOffMultiplier: 18, + numCalls: 100, + expectedBatchSizesOnEachRetry: []int{20, 1}, + }, + { + name: "back off equal to batch size", + maxBatchSize: 20, + backOffMultiplier: 20, + numCalls: 100, + expectedBatchSizesOnEachRetry: []int{20, 1}, + }, + { + name: "back off larger than batch size", + maxBatchSize: 20, + backOffMultiplier: 220, + numCalls: 100, + expectedBatchSizesOnEachRetry: []int{20, 1}, + }, + { + name: "back off 1", + maxBatchSize: 20, + backOffMultiplier: 1, + numCalls: 100, + expectedBatchSizesOnEachRetry: []int{20, 1}, + }, + } + + mockCodec := mocks.NewCodec(t) + mockCodec.On("Encode", mock.Anything, mock.Anything, mock.Anything).Return([]byte{}, nil) + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + batchSizes := make([]int, 0) + ec := chainmocks.NewClient(t) + ec.On("BatchCallContext", mock.Anything, mock.Anything).Run(func(args mock.Arguments) { + evmCalls := args.Get(1).([]rpc.BatchElem) + batchSizes = append(batchSizes, len(evmCalls)) + }).Return(errors.New("some error")) + + calls := make(evm.BatchCall, tc.numCalls) + for i := range calls { + calls[i] = evm.Call{} + } + + bc := evm.NewDynamicLimitedBatchCaller(logger.TestLogger(t), mockCodec, ec, tc.maxBatchSize, tc.backOffMultiplier, 1) + _, _ = bc.BatchCall(testutils.Context(t), 123, calls) + assert.Equal(t, tc.expectedBatchSizesOnEachRetry, batchSizes) + }) + } +} + +func TestDefaultEvmBatchCaller_batchCallLimit(t *testing.T) { + ctx := testutils.Context(t) + testCases := []struct { + numCalls uint + batchSize uint + parallelRpcCallsLimit uint + }{ + {numCalls: 100, batchSize: 10, parallelRpcCallsLimit: 5}, + {numCalls: 10, batchSize: 100, parallelRpcCallsLimit: 10}, + {numCalls: 1, batchSize: 100, parallelRpcCallsLimit: 10}, + {numCalls: 1000, batchSize: 10, parallelRpcCallsLimit: 2}, + {numCalls: rand.Uint() % 1000, batchSize: rand.Uint() % 500, parallelRpcCallsLimit: rand.Uint() % 500}, + } + + type MethodParam struct { + A uint64 + } + type MethodReturn struct { + B uint64 + } + paramABI := `[{"type":"uint64","name":"A"}]` + returnABI := `[{"type":"uint64","name":"B"}]` + codecConfig := evmtypes.CodecConfig{Configs: map[string]evmtypes.ChainCodecConfig{}} + + for i, tc := range testCases { + t.Run(fmt.Sprintf("%v", tc), func(t *testing.T) { + ec := chainmocks.NewClient(t) + calls := make(evm.BatchCall, tc.numCalls) + for j := range calls { + contractName := fmt.Sprintf("testCase_%d", i) + methodName := fmt.Sprintf("method_%d", j) + codecConfig.Configs[fmt.Sprintf("params.%s.%s", contractName, methodName)] = evmtypes.ChainCodecConfig{TypeABI: paramABI} + codecConfig.Configs[fmt.Sprintf("return.%s.%s", contractName, methodName)] = evmtypes.ChainCodecConfig{TypeABI: returnABI} + + params := MethodParam{A: uint64(j)} + var returnVal MethodReturn + calls[j] = evm.Call{ + ContractName: contractName, + MethodName: methodName, + Params: ¶ms, + ReturnVal: &returnVal, + } + } + + ec.On("BatchCallContext", mock.Anything, mock.Anything). + Run(func(args mock.Arguments) { + evmCalls := args.Get(1).([]rpc.BatchElem) + for i := range evmCalls { + arg := evmCalls[i].Args[0].(map[string]interface{})["data"].([]uint8) + bytes, err := hex.DecodeString(fmt.Sprintf("%x", arg)) + require.NoError(t, err) + str, isOk := evmCalls[i].Result.(*string) + require.True(t, isOk) + *str = fmt.Sprintf("0x%064x", new(big.Int).SetBytes(bytes[24:]).Uint64()) + } + }).Return(nil) + + testCodec, err := evm.NewCodec(codecConfig) + require.NoError(t, err) + bc := evm.NewDynamicLimitedBatchCaller(logger.TestLogger(t), testCodec, ec, tc.batchSize, 99999, tc.parallelRpcCallsLimit) + + // make the call and make sure the results are there + results, err := bc.BatchCall(ctx, 0, calls) + require.NoError(t, err) + for _, call := range calls { + contractResults, ok := results[call.ContractName] + if !ok { + t.Errorf("missing contract name %s", call.ContractName) + } + hasResult := false + for j, result := range contractResults { + if hasResult = result.MethodName == call.MethodName; hasResult { + require.NoError(t, result.Err) + resNum, isOk := result.ReturnValue.(*MethodReturn) + require.True(t, isOk) + require.Equal(t, uint64(j), resNum.B) + break + } + } + if !hasResult { + t.Errorf("missing method name %s", call.MethodName) + } + } + }) + } +} diff --git a/core/services/relay/evm/binding.go b/core/services/relay/evm/binding.go index 9c7fd186dec..412e33c6094 100644 --- a/core/services/relay/evm/binding.go +++ b/core/services/relay/evm/binding.go @@ -5,6 +5,7 @@ import ( commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-common/pkg/types/query" + "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives" ) type readBinding interface { @@ -12,6 +13,6 @@ type readBinding interface { SetCodec(codec commontypes.RemoteCodec) Register(ctx context.Context) error Unregister(ctx context.Context) error - GetLatestValue(ctx context.Context, params, returnVal any) error + GetLatestValue(ctx context.Context, confidenceLevel primitives.ConfidenceLevel, params, returnVal any) error QueryKey(ctx context.Context, filter query.KeyFilter, limitAndSort query.LimitAndSort, sequenceDataType any) ([]commontypes.Sequence, error) } diff --git a/core/services/relay/evm/bindings.go b/core/services/relay/evm/bindings.go index 9ad73c01926..4d4760db52c 100644 --- a/core/services/relay/evm/bindings.go +++ b/core/services/relay/evm/bindings.go @@ -9,11 +9,15 @@ import ( ) // bindings manage all contract bindings, key is contract name. -type bindings map[string]*contractBinding + +type bindings struct { + contractBindings map[string]*contractBinding + BatchCaller +} func (b bindings) GetReadBinding(contractName, readName string) (readBinding, error) { // GetReadBindings should only be called after Chain Reader init. - cb, cbExists := b[contractName] + cb, cbExists := b.contractBindings[contractName] if !cbExists { return nil, fmt.Errorf("%w: no contract named %s", commontypes.ErrInvalidType, contractName) } @@ -27,13 +31,13 @@ func (b bindings) GetReadBinding(contractName, readName string) (readBinding, er // AddReadBinding adds read bindings. Calling this outside of Chain Reader init is not thread safe. func (b bindings) AddReadBinding(contractName, readName string, rb readBinding) { - cb, cbExists := b[contractName] + cb, cbExists := b.contractBindings[contractName] if !cbExists { cb = &contractBinding{ name: contractName, readBindings: make(map[string]readBinding), } - b[contractName] = cb + b.contractBindings[contractName] = cb } cb.readBindings[readName] = rb } @@ -42,7 +46,7 @@ func (b bindings) AddReadBinding(contractName, readName string, rb readBinding) // Bind also registers the common contract polling filter and eventBindings polling filters. func (b bindings) Bind(ctx context.Context, lp logpoller.LogPoller, boundContracts []commontypes.BoundContract) error { for _, bc := range boundContracts { - cb, cbExists := b[bc.Name] + cb, cbExists := b.contractBindings[bc.Name] if !cbExists { return fmt.Errorf("%w: no contract named %s", commontypes.ErrInvalidConfig, bc.Name) } @@ -60,8 +64,54 @@ func (b bindings) Bind(ctx context.Context, lp logpoller.LogPoller, boundContrac return nil } +func (b bindings) BatchGetLatestValues(ctx context.Context, request commontypes.BatchGetLatestValuesRequest) (commontypes.BatchGetLatestValuesResult, error) { + var batchCall BatchCall + toChainAgnosticMethodName := make(map[string]string) + for contractName, contractBatch := range request { + cb := b.contractBindings[contractName] + for i := range contractBatch { + req := contractBatch[i] + switch rb := cb.readBindings[req.ReadName].(type) { + case *methodBinding: + toChainAgnosticMethodName[rb.method] = req.ReadName + batchCall = append(batchCall, Call{ + ContractAddress: rb.address, + ContractName: cb.name, + MethodName: rb.method, + Params: req.Params, + ReturnVal: req.ReturnVal, + }) + // results here will have chain specific method names. + case *eventBinding: + // TODO Use FilteredLogs to batch? This isn't a priority right now, but should get implemented at some point. + return nil, fmt.Errorf("%w: events are not yet supported in batch get latest values", commontypes.ErrInvalidType) + default: + return nil, fmt.Errorf("%w: missing read binding type for contract: %s read: %s", commontypes.ErrInvalidType, contractName, req.ReadName) + } + } + } + + results, err := b.BatchCall(ctx, 0, batchCall) + if err != nil { + return nil, err + } + + // reconstruct results from batchCall and filteredLogs into common type while maintaining order from request. + batchGetLatestValuesResults := make(commontypes.BatchGetLatestValuesResult) + for contractName, contractResult := range results { + batchGetLatestValuesResults[contractName] = commontypes.ContractBatchResults{} + for _, methodResult := range contractResult { + brr := commontypes.BatchReadResult{ReadName: toChainAgnosticMethodName[methodResult.MethodName]} + brr.SetResult(methodResult.ReturnValue, methodResult.Err) + batchGetLatestValuesResults[contractName] = append(batchGetLatestValuesResults[contractName], brr) + } + } + + return batchGetLatestValuesResults, err +} + func (b bindings) ForEach(ctx context.Context, fn func(context.Context, *contractBinding) error) error { - for _, cb := range b { + for _, cb := range b.contractBindings { if err := fn(ctx, cb); err != nil { return err } diff --git a/core/services/relay/evm/cap_encoder.go b/core/services/relay/evm/cap_encoder.go index ef78cb07b48..790114e4c03 100644 --- a/core/services/relay/evm/cap_encoder.go +++ b/core/services/relay/evm/cap_encoder.go @@ -104,9 +104,9 @@ func prependMetadataFields(meta consensustypes.Metadata, userPayload []byte) ([] result = append(result, tsBytes...) // 4. DON ID (4 bytes) - if result, err = decodeAndAppend(meta.DONID, 4, result, "DONID"); err != nil { - return nil, err - } + donIDBytes := make([]byte, 4) + binary.BigEndian.PutUint32(donIDBytes, meta.DONID) + result = append(result, donIDBytes...) // 5. DON config version (4 bytes) cfgVersionBytes := make([]byte, 4) diff --git a/core/services/relay/evm/cap_encoder_test.go b/core/services/relay/evm/cap_encoder_test.go index b56d3828c42..d290a7fd2b0 100644 --- a/core/services/relay/evm/cap_encoder_test.go +++ b/core/services/relay/evm/cap_encoder_test.go @@ -20,7 +20,8 @@ var ( workflowID = "15c631d295ef5e32deb99a10ee6804bc4af1385568f9b3363f6552ac6dbb2cef" workflowName = "aabbccddeeaabbccddee" - donID = "00010203" + donID = uint32(2) + donIDHex = "00000002" executionID = "8d4e66421db647dd916d3ec28d56188c8d7dae5f808e03d03339ed2562f13bb0" workflowOwnerID = "0000000000000000000000000000000000000000" reportID = "9988" @@ -217,7 +218,7 @@ func TestEVMEncoder_InvalidIDs(t *testing.T) { } func getHexMetadata() string { - return "01" + executionID + timestampHex + donID + configVersionHex + workflowID + workflowName + workflowOwnerID + reportID + return "01" + executionID + timestampHex + donIDHex + configVersionHex + workflowID + workflowName + workflowOwnerID + reportID } func getMetadata(cid string) consensustypes.Metadata { diff --git a/core/services/relay/evm/chain_reader.go b/core/services/relay/evm/chain_reader.go index 9cfe846d55d..d84c2f00a9c 100644 --- a/core/services/relay/evm/chain_reader.go +++ b/core/services/relay/evm/chain_reader.go @@ -13,11 +13,10 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/smartcontractkit/chainlink-common/pkg/codec" - "github.com/smartcontractkit/chainlink-common/pkg/types/query" - "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives" - commonservices "github.com/smartcontractkit/chainlink-common/pkg/services" commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/types/query" + "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives" evmclient "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" @@ -33,12 +32,13 @@ type ChainReaderService interface { } type chainReader struct { - lggr logger.Logger - lp logpoller.LogPoller - client evmclient.Client - contractBindings bindings - parsed *parsedTypes - codec commontypes.RemoteCodec + lggr logger.Logger + ht logpoller.HeadTracker + lp logpoller.LogPoller + client evmclient.Client + parsed *ParsedTypes + bindings + codec commontypes.RemoteCodec commonservices.StateMachine } @@ -47,13 +47,14 @@ var _ commontypes.ContractTypeProvider = &chainReader{} // NewChainReaderService is a constructor for ChainReader, returns nil if there is any error // Note that the ChainReaderService returned does not support anonymous events. -func NewChainReaderService(ctx context.Context, lggr logger.Logger, lp logpoller.LogPoller, client evmclient.Client, config types.ChainReaderConfig) (ChainReaderService, error) { +func NewChainReaderService(ctx context.Context, lggr logger.Logger, lp logpoller.LogPoller, ht logpoller.HeadTracker, client evmclient.Client, config types.ChainReaderConfig) (ChainReaderService, error) { cr := &chainReader{ - lggr: lggr.Named("ChainReader"), - lp: lp, - client: client, - contractBindings: bindings{}, - parsed: &parsedTypes{encoderDefs: map[string]types.CodecEntry{}, decoderDefs: map[string]types.CodecEntry{}}, + lggr: lggr.Named("ChainReader"), + ht: ht, + lp: lp, + client: client, + bindings: bindings{contractBindings: make(map[string]*contractBinding)}, + parsed: &ParsedTypes{EncoderDefs: map[string]types.CodecEntry{}, DecoderDefs: map[string]types.CodecEntry{}}, } var err error @@ -61,11 +62,20 @@ func NewChainReaderService(ctx context.Context, lggr logger.Logger, lp logpoller return nil, err } - if cr.codec, err = cr.parsed.toCodec(); err != nil { + if cr.codec, err = cr.parsed.ToCodec(); err != nil { return nil, err } - err = cr.contractBindings.ForEach(ctx, func(c context.Context, cb *contractBinding) error { + cr.bindings.BatchCaller = NewDynamicLimitedBatchCaller( + cr.lggr, + cr.codec, + cr.client, + DefaultRpcBatchSizeLimit, + DefaultRpcBatchBackOffMultiplier, + DefaultMaxParallelRpcCalls, + ) + + err = cr.bindings.ForEach(ctx, func(c context.Context, cb *contractBinding) error { for _, rb := range cb.readBindings { rb.SetCodec(cr.codec) } @@ -118,7 +128,7 @@ func (cr *chainReader) init(chainContractReaders map[string]types.ChainContractR return err } } - cr.contractBindings[contractName].pollingFilter = chainContractReader.PollingFilter.ToLPFilter(eventSigsForContractFilter) + cr.bindings.contractBindings[contractName].pollingFilter = chainContractReader.PollingFilter.ToLPFilter(eventSigsForContractFilter) } return nil } @@ -128,7 +138,7 @@ func (cr *chainReader) Name() string { return cr.lggr.Name() } // Start registers polling filters if contracts are already bound. func (cr *chainReader) Start(ctx context.Context) error { return cr.StartOnce("ChainReader", func() error { - return cr.contractBindings.ForEach(ctx, func(c context.Context, cb *contractBinding) error { + return cr.bindings.ForEach(ctx, func(c context.Context, cb *contractBinding) error { for _, rb := range cb.readBindings { if err := rb.Register(ctx); err != nil { return err @@ -144,7 +154,7 @@ func (cr *chainReader) Close() error { return cr.StopOnce("ChainReader", func() error { ctx, cancel := context.WithTimeout(context.Background(), time.Second) defer cancel() - return cr.contractBindings.ForEach(ctx, func(c context.Context, cb *contractBinding) error { + return cr.bindings.ForEach(ctx, func(c context.Context, cb *contractBinding) error { for _, rb := range cb.readBindings { if err := rb.Unregister(ctx); err != nil { return err @@ -161,21 +171,25 @@ func (cr *chainReader) HealthReport() map[string]error { return map[string]error{cr.Name(): nil} } -func (cr *chainReader) GetLatestValue(ctx context.Context, contractName, method string, params any, returnVal any) error { - b, err := cr.contractBindings.GetReadBinding(contractName, method) +func (cr *chainReader) GetLatestValue(ctx context.Context, contractName, method string, confidenceLevel primitives.ConfidenceLevel, params, returnVal any) error { + b, err := cr.bindings.GetReadBinding(contractName, method) if err != nil { return err } - return b.GetLatestValue(ctx, params, returnVal) + return b.GetLatestValue(ctx, confidenceLevel, params, returnVal) +} + +func (cr *chainReader) BatchGetLatestValues(ctx context.Context, request commontypes.BatchGetLatestValuesRequest) (commontypes.BatchGetLatestValuesResult, error) { + return cr.bindings.BatchGetLatestValues(ctx, request) } func (cr *chainReader) Bind(ctx context.Context, bindings []commontypes.BoundContract) error { - return cr.contractBindings.Bind(ctx, cr.lp, bindings) + return cr.bindings.Bind(ctx, cr.lp, bindings) } func (cr *chainReader) QueryKey(ctx context.Context, contractName string, filter query.KeyFilter, limitAndSort query.LimitAndSort, sequenceDataType any) ([]commontypes.Sequence, error) { - b, err := cr.contractBindings.GetReadBinding(contractName, filter.Key) + b, err := cr.bindings.GetReadBinding(contractName, filter.Key) if err != nil { return nil, err } @@ -184,10 +198,10 @@ func (cr *chainReader) QueryKey(ctx context.Context, contractName string, filter } func (cr *chainReader) CreateContractType(contractName, itemType string, forEncoding bool) (any, error) { - return cr.codec.CreateType(wrapItemType(contractName, itemType, forEncoding), forEncoding) + return cr.codec.CreateType(WrapItemType(contractName, itemType, forEncoding), forEncoding) } -func wrapItemType(contractName, itemType string, isParams bool) string { +func WrapItemType(contractName, itemType string, isParams bool) string { if isParams { return fmt.Sprintf("params.%s.%s", contractName, itemType) } @@ -204,17 +218,25 @@ func (cr *chainReader) addMethod( return fmt.Errorf("%w: method %s doesn't exist", commontypes.ErrInvalidConfig, chainReaderDefinition.ChainSpecificName) } - cr.contractBindings.AddReadBinding(contractName, methodName, &methodBinding{ - contractName: contractName, - method: methodName, - client: cr.client, + confirmations, err := ConfirmationsFromConfig(chainReaderDefinition.ConfidenceConfirmations) + if err != nil { + return err + } + + cr.bindings.AddReadBinding(contractName, methodName, &methodBinding{ + lggr: cr.lggr, + contractName: contractName, + method: methodName, + ht: cr.ht, + client: cr.client, + confirmationsMapping: confirmations, }) - if err := cr.addEncoderDef(contractName, methodName, method.Inputs, method.ID, chainReaderDefinition); err != nil { + if err := cr.addEncoderDef(contractName, methodName, method.Inputs, method.ID, chainReaderDefinition.InputModifications); err != nil { return err } - return cr.addDecoderDef(contractName, methodName, method.Outputs, chainReaderDefinition) + return cr.addDecoderDef(contractName, methodName, method.Outputs, chainReaderDefinition.OutputModifications) } func (cr *chainReader) addEvent(contractName, eventName string, a abi.ABI, chainReaderDefinition types.ChainReaderDefinition) error { @@ -238,7 +260,7 @@ func (cr *chainReader) addEvent(contractName, eventName string, a abi.ABI, chain } // Encoder def's codec won't be used to encode, only for its type as input for GetLatestValue - if err := cr.addEncoderDef(contractName, eventName, filterArgs, nil, chainReaderDefinition); err != nil { + if err := cr.addEncoderDef(contractName, eventName, filterArgs, nil, chainReaderDefinition.InputModifications); err != nil { return err } @@ -247,7 +269,7 @@ func (cr *chainReader) addEvent(contractName, eventName string, a abi.ABI, chain return err } - confirmations, err := confirmationsFromConfig(chainReaderDefinition.ConfidenceConfirmations) + confirmations, err := ConfirmationsFromConfig(chainReaderDefinition.ConfidenceConfirmations) if err != nil { return err } @@ -280,9 +302,9 @@ func (cr *chainReader) addEvent(contractName, eventName string, a abi.ABI, chain cr.addQueryingReadBindings(contractName, eventDefinitions.GenericTopicNames, event.Inputs, eb) } - cr.contractBindings.AddReadBinding(contractName, eventName, eb) + cr.bindings.AddReadBinding(contractName, eventName, eb) - return cr.addDecoderDef(contractName, eventName, event.Inputs, chainReaderDefinition) + return cr.addDecoderDef(contractName, eventName, event.Inputs, chainReaderDefinition.OutputModifications) } // addQueryingReadBindings reuses the eventBinding and maps it to topic and dataWord keys used for QueryKey. @@ -296,19 +318,19 @@ func (cr *chainReader) addQueryingReadBindings(contractName string, genericTopic Index: uint64(topicIndex), } } - cr.contractBindings.AddReadBinding(contractName, genericTopicName, eb) + cr.bindings.AddReadBinding(contractName, genericTopicName, eb) } // add data word readBindings for QueryKey for genericDataWordName := range eb.eventDataWords { - cr.contractBindings.AddReadBinding(contractName, genericDataWordName, eb) + cr.bindings.AddReadBinding(contractName, genericDataWordName, eb) } } func (cr *chainReader) getEventInput(def types.ChainReaderDefinition, contractName, eventName string) ( types.CodecEntry, codec.Modifier, error) { - inputInfo := cr.parsed.encoderDefs[wrapItemType(contractName, eventName, true)] - inMod, err := def.InputModifications.ToModifier(evmDecoderHooks...) + inputInfo := cr.parsed.EncoderDefs[WrapItemType(contractName, eventName, true)] + inMod, err := def.InputModifications.ToModifier(DecoderHooks...) if err != nil { return nil, nil, err } @@ -330,9 +352,9 @@ func verifyEventIndexedInputsUsed(eventName string, inputFields []string, indexA return nil } -func (cr *chainReader) addEncoderDef(contractName, itemType string, args abi.Arguments, prefix []byte, chainReaderDefinition types.ChainReaderDefinition) error { +func (cr *chainReader) addEncoderDef(contractName, itemType string, args abi.Arguments, prefix []byte, inputModifications codec.ModifiersConfig) error { // ABI.Pack prepends the method.ID to the encodings, we'll need the encoder to do the same. - inputMod, err := chainReaderDefinition.InputModifications.ToModifier(evmDecoderHooks...) + inputMod, err := inputModifications.ToModifier(DecoderHooks...) if err != nil { return err } @@ -342,17 +364,17 @@ func (cr *chainReader) addEncoderDef(contractName, itemType string, args abi.Arg return err } - cr.parsed.encoderDefs[wrapItemType(contractName, itemType, true)] = input + cr.parsed.EncoderDefs[WrapItemType(contractName, itemType, true)] = input return nil } -func (cr *chainReader) addDecoderDef(contractName, itemType string, outputs abi.Arguments, def types.ChainReaderDefinition) error { - mod, err := def.OutputModifications.ToModifier(evmDecoderHooks...) +func (cr *chainReader) addDecoderDef(contractName, itemType string, outputs abi.Arguments, outputModifications codec.ModifiersConfig) error { + mod, err := outputModifications.ToModifier(DecoderHooks...) if err != nil { return err } output := types.NewCodecEntry(outputs, nil, mod) - cr.parsed.decoderDefs[wrapItemType(contractName, itemType, false)] = output + cr.parsed.DecoderDefs[WrapItemType(contractName, itemType, false)] = output return output.Init() } @@ -389,7 +411,8 @@ func setupEventInput(event abi.Event, inputFields []string) ([]abi.Argument, typ return filterArgs, types.NewCodecEntry(inputArgs, nil, nil), indexArgNames } -func confirmationsFromConfig(values map[string]int) (map[primitives.ConfidenceLevel]evmtypes.Confirmations, error) { +// ConfirmationsFromConfig maps chain agnostic confidence levels defined in config to predefined EVM finality. +func ConfirmationsFromConfig(values map[string]int) (map[primitives.ConfidenceLevel]evmtypes.Confirmations, error) { mappings := map[primitives.ConfidenceLevel]evmtypes.Confirmations{ primitives.Unconfirmed: evmtypes.Unconfirmed, primitives.Finalized: evmtypes.Finalized, @@ -410,3 +433,12 @@ func confirmationsFromConfig(values map[string]int) (map[primitives.ConfidenceLe return mappings, nil } + +// confidenceToConfirmations matches predefined chain agnostic confidence levels to predefined EVM finality. +func confidenceToConfirmations(confirmationsMapping map[primitives.ConfidenceLevel]evmtypes.Confirmations, confidenceLevel primitives.ConfidenceLevel) (evmtypes.Confirmations, error) { + confirmations, exists := confirmationsMapping[confidenceLevel] + if !exists { + return 0, fmt.Errorf("missing mapping for confidence level: %s", confidenceLevel) + } + return confirmations, nil +} diff --git a/core/services/relay/evm/chain_reader_test.go b/core/services/relay/evm/chain_reader_test.go index 888b662c160..f30bba0e449 100644 --- a/core/services/relay/evm/chain_reader_test.go +++ b/core/services/relay/evm/chain_reader_test.go @@ -12,7 +12,6 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/accounts/abi/bind/backends" - "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/crypto" "github.com/jmoiron/sqlx" @@ -21,6 +20,9 @@ import ( clcommontypes "github.com/smartcontractkit/chainlink-common/pkg/types" . "github.com/smartcontractkit/chainlink-common/pkg/types/interfacetests" //nolint common practice to import test mods with . + "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" + "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" + "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" @@ -132,7 +134,7 @@ func TestChainReaderEventsInitValidation(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - _, err := evm.NewChainReaderService(testutils.Context(t), logger.NullLogger, nil, nil, types.ChainReaderConfig{Contracts: tt.chainContractReaders}) + _, err := evm.NewChainReaderService(testutils.Context(t), logger.NullLogger, nil, nil, nil, types.ChainReaderConfig{Contracts: tt.chainContractReaders}) require.Error(t, err) if err != nil { assert.Contains(t, err.Error(), tt.expectedError.Error()) @@ -144,20 +146,9 @@ func TestChainReaderEventsInitValidation(t *testing.T) { func TestChainReader(t *testing.T) { t.Parallel() it := &EVMChainReaderInterfaceTester[*testing.T]{Helper: &helper{}} + // add new subtests here so that it can be run on real chains too RunChainReaderEvmTests(t, it) RunChainReaderInterfaceTests[*testing.T](t, commontestutils.WrapChainReaderTesterForLoop(it)) - - t.Run("Bind returns error on missing contract at address", func(t *testing.T) { - t.Parallel() - it.Setup(t) - - addr := common.BigToAddress(big.NewInt(42)) - reader := it.GetChainReader(t) - - err := reader.Bind(context.Background(), []clcommontypes.BoundContract{{Name: AnyContractName, Address: addr.Hex(), Pending: true}}) - - require.ErrorIs(t, err, evm.NoContractExistsError{Address: addr}) - }) } type helper struct { @@ -165,6 +156,10 @@ type helper struct { auth *bind.TransactOpts } +func (h *helper) MustGenerateRandomKey(t *testing.T) ethkey.KeyV2 { + return cltest.MustGenerateRandomKey(t) +} + func (h *helper) GasPriceBufferPercent() int64 { return 0 } diff --git a/core/services/relay/evm/chain_writer.go b/core/services/relay/evm/chain_writer.go index e36aad044aa..f188ffeced2 100644 --- a/core/services/relay/evm/chain_writer.go +++ b/core/services/relay/evm/chain_writer.go @@ -8,7 +8,6 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" - "github.com/google/uuid" commonservices "github.com/smartcontractkit/chainlink-common/pkg/services" commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" @@ -46,7 +45,7 @@ func NewChainWriterService(logger logger.Logger, client evmclient.Client, txm ev sendStrategy: txmgr.NewSendEveryStrategy(), contracts: config.Contracts, - parsedContracts: &parsedTypes{encoderDefs: map[string]types.CodecEntry{}, decoderDefs: map[string]types.CodecEntry{}}, + parsedContracts: &ParsedTypes{EncoderDefs: map[string]types.CodecEntry{}, DecoderDefs: map[string]types.CodecEntry{}}, } if config.SendStrategy != nil { @@ -58,7 +57,7 @@ func NewChainWriterService(logger logger.Logger, client evmclient.Client, txm ev } var err error - if w.encoder, err = w.parsedContracts.toCodec(); err != nil { + if w.encoder, err = w.parsedContracts.ToCodec(); err != nil { return nil, fmt.Errorf("%w: failed to create codec", err) } @@ -76,7 +75,7 @@ type chainWriter struct { sendStrategy txmgrtypes.TxStrategy contracts map[string]*types.ContractConfig - parsedContracts *parsedTypes + parsedContracts *ParsedTypes encoder commontypes.Encoder } @@ -101,7 +100,7 @@ func (w *chainWriter) SubmitTransaction(ctx context.Context, contract, method st return fmt.Errorf("method config not found: %v", method) } - calldata, err := w.encoder.Encode(ctx, args, wrapItemType(contract, method, true)) + calldata, err := w.encoder.Encode(ctx, args, WrapItemType(contract, method, true)) if err != nil { return fmt.Errorf("%w: failed to encode args", err) } @@ -111,14 +110,28 @@ func (w *chainWriter) SubmitTransaction(ctx context.Context, contract, method st checker.CheckerType = txmgrtypes.TransmitCheckerType(methodConfig.Checker) } + v := big.NewInt(0) + if value != nil { + v = value + } + + var txMeta *txmgrtypes.TxMeta[common.Address, common.Hash] + if meta != nil && meta.WorkflowExecutionID != nil { + txMeta = &txmgrtypes.TxMeta[common.Address, common.Hash]{ + WorkflowExecutionID: meta.WorkflowExecutionID, + } + } + req := evmtxmgr.TxRequest{ FromAddress: methodConfig.FromAddress, ToAddress: common.HexToAddress(toAddress), EncodedPayload: calldata, FeeLimit: methodConfig.GasLimit, - Meta: &txmgrtypes.TxMeta[common.Address, common.Hash]{WorkflowExecutionID: meta.WorkflowExecutionID}, + Meta: txMeta, + IdempotencyKey: &transactionID, Strategy: w.sendStrategy, Checker: checker, + Value: *v, } _, err = w.txm.CreateTransaction(ctx, req) @@ -143,7 +156,7 @@ func (w *chainWriter) parseContracts() error { } // ABI.Pack prepends the method.ID to the encodings, we'll need the encoder to do the same. - inputMod, err := methodConfig.InputModifications.ToModifier(evmDecoderHooks...) + inputMod, err := methodConfig.InputModifications.ToModifier(DecoderHooks...) if err != nil { return fmt.Errorf("%w: failed to create input mods", err) } @@ -154,15 +167,15 @@ func (w *chainWriter) parseContracts() error { return fmt.Errorf("%w: failed to init codec entry for method %s", err, method) } - w.parsedContracts.encoderDefs[wrapItemType(contract, method, true)] = input + w.parsedContracts.EncoderDefs[WrapItemType(contract, method, true)] = input } } return nil } -func (w *chainWriter) GetTransactionStatus(ctx context.Context, transactionID uuid.UUID) (commontypes.TransactionStatus, error) { - return commontypes.Unknown, fmt.Errorf("not implemented") +func (w *chainWriter) GetTransactionStatus(ctx context.Context, transactionID string) (commontypes.TransactionStatus, error) { + return w.txm.GetTransactionStatus(ctx, transactionID) } // GetFeeComponents the execution and data availability (L1Oracle) fees for the chain. diff --git a/core/services/relay/evm/chain_writer_test.go b/core/services/relay/evm/chain_writer_test.go index 9344279da60..66c85bfc2c3 100644 --- a/core/services/relay/evm/chain_writer_test.go +++ b/core/services/relay/evm/chain_writer_test.go @@ -5,11 +5,13 @@ import ( "math/big" "testing" + "github.com/google/uuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/types" + commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" evmclimocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client/mocks" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/gas" @@ -33,7 +35,6 @@ func TestChainWriter(t *testing.T) { chainWriterConfig := newBaseChainWriterConfig() cw, err := NewChainWriterService(lggr, client, txm, ge, chainWriterConfig) - require.NoError(t, err) t.Run("Initialization", func(t *testing.T) { @@ -60,6 +61,30 @@ func TestChainWriter(t *testing.T) { // TODO: implement }) + t.Run("GetTransactionStatus", func(t *testing.T) { + txs := []struct { + txid string + status commontypes.TransactionStatus + }{ + {uuid.NewString(), commontypes.Unknown}, + {uuid.NewString(), commontypes.Unconfirmed}, + {uuid.NewString(), commontypes.Finalized}, + {uuid.NewString(), commontypes.Failed}, + {uuid.NewString(), commontypes.Fatal}, + } + + for _, tx := range txs { + txm.On("GetTransactionStatus", mock.Anything, tx.txid).Return(tx.status, nil).Once() + } + + for _, tx := range txs { + var status commontypes.TransactionStatus + status, err = cw.GetTransactionStatus(ctx, tx.txid) + require.NoError(t, err) + require.Equal(t, tx.status, status) + } + }) + t.Run("GetFeeComponents", func(t *testing.T) { ge.On("GetFee", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(gas.EvmFee{ Legacy: assets.NewWei(big.NewInt(1000000001)), diff --git a/core/services/relay/evm/codec.go b/core/services/relay/evm/codec.go index 9636996c2ae..2f01adfbdcb 100644 --- a/core/services/relay/evm/codec.go +++ b/core/services/relay/evm/codec.go @@ -18,6 +18,8 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" ) +// DecoderHooks +// // decodeAccountAndAllowArraySliceHook allows: // // strings to be converted to [32]byte allowing config to represent them as 0x... @@ -29,7 +31,7 @@ import ( // SliceToArrayVerifySizeHook verifies that slices have the correct size when converting to an array // sizeVerifyBigIntHook allows our custom types that verify the number fits in the on-chain type to be converted as-if // it was a *big.Int -var evmDecoderHooks = []mapstructure.DecodeHookFunc{ +var DecoderHooks = []mapstructure.DecodeHookFunc{ decodeAccountAndAllowArraySliceHook, codec.BigIntHook, codec.SliceToArrayVerifySizeHook, @@ -45,9 +47,9 @@ var evmDecoderHooks = []mapstructure.DecodeHookFunc{ // you need to use the Go name instead of the name on-chain. // eg: rename FooBar -> Bar, not foo_bar_ to Bar if the name on-chain is foo_bar_ func NewCodec(conf types.CodecConfig) (commontypes.RemoteCodec, error) { - parsed := &parsedTypes{ - encoderDefs: map[string]types.CodecEntry{}, - decoderDefs: map[string]types.CodecEntry{}, + parsed := &ParsedTypes{ + EncoderDefs: map[string]types.CodecEntry{}, + DecoderDefs: map[string]types.CodecEntry{}, } for k, v := range conf.Configs { @@ -56,7 +58,7 @@ func NewCodec(conf types.CodecConfig) (commontypes.RemoteCodec, error) { return nil, err } - mod, err := v.ModifierConfigs.ToModifier(evmDecoderHooks...) + mod, err := v.ModifierConfigs.ToModifier(DecoderHooks...) if err != nil { return nil, err } @@ -66,25 +68,25 @@ func NewCodec(conf types.CodecConfig) (commontypes.RemoteCodec, error) { return nil, err } - parsed.encoderDefs[k] = item - parsed.decoderDefs[k] = item + parsed.EncoderDefs[k] = item + parsed.DecoderDefs[k] = item } - return parsed.toCodec() + return parsed.ToCodec() } type evmCodec struct { *encoder *decoder - *parsedTypes + *ParsedTypes } func (c *evmCodec) CreateType(itemType string, forEncoding bool) (any, error) { var itemTypes map[string]types.CodecEntry if forEncoding { - itemTypes = c.encoderDefs + itemTypes = c.EncoderDefs } else { - itemTypes = c.decoderDefs + itemTypes = c.DecoderDefs } def, ok := itemTypes[itemType] diff --git a/core/services/relay/evm/codec_test.go b/core/services/relay/evm/codec_test.go index 638a9afd706..af3170abf0e 100644 --- a/core/services/relay/evm/codec_test.go +++ b/core/services/relay/evm/codec_test.go @@ -13,6 +13,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/codec" + "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/evmtesting" looptestutils "github.com/smartcontractkit/chainlink-common/pkg/loop/testutils" //nolint common practice to import test mods with . commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" @@ -21,7 +22,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/chain_reader_tester" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm" - "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/evmtesting" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" ) diff --git a/core/services/relay/evm/config_poller_test.go b/core/services/relay/evm/config_poller_test.go index 8c02c4e2e7e..caf48caf490 100644 --- a/core/services/relay/evm/config_poller_test.go +++ b/core/services/relay/evm/config_poller_test.go @@ -32,6 +32,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" evmclient "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" evmClientMocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client/mocks" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/headtracker" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller/mocks" evmutils "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils" @@ -99,7 +100,8 @@ func TestConfigPoller(t *testing.T) { RpcBatchSize: 2, KeepFinalizedBlocksDepth: 1000, } - lp = logpoller.NewLogPoller(lorm, ethClient, lggr, lpOpts) + ht := headtracker.NewSimulatedHeadTracker(ethClient, lpOpts.UseFinalityTag, lpOpts.FinalityDepth) + lp = logpoller.NewLogPoller(lorm, ethClient, lggr, ht, lpOpts) servicetest.Run(t, lp) } diff --git a/core/services/relay/evm/contract_transmitter.go b/core/services/relay/evm/contract_transmitter.go index 724bbbe4aa0..d594dfb9214 100644 --- a/core/services/relay/evm/contract_transmitter.go +++ b/core/services/relay/evm/contract_transmitter.go @@ -40,6 +40,28 @@ func reportToEvmTxMetaNoop([]byte) (*txmgr.TxMeta, error) { return nil, nil } +type OCRTransmitterOption func(transmitter *contractTransmitter) + +func WithExcludeSignatures() OCRTransmitterOption { + return func(ct *contractTransmitter) { + ct.excludeSigs = true + } +} + +func WithRetention(retention time.Duration) OCRTransmitterOption { + return func(ct *contractTransmitter) { + ct.retention = retention + } +} + +func WithReportToEthMetadata(reportToEvmTxMeta ReportToEthMetadata) OCRTransmitterOption { + return func(ct *contractTransmitter) { + if reportToEvmTxMeta != nil { + ct.reportToEvmTxMeta = reportToEvmTxMeta + } + } +} + type contractTransmitter struct { contractAddress gethcommon.Address contractABI abi.ABI @@ -48,7 +70,10 @@ type contractTransmitter struct { contractReader contractReader lp logpoller.LogPoller lggr logger.Logger - reportToEvmTxMeta ReportToEthMetadata + // Options + reportToEvmTxMeta ReportToEthMetadata + excludeSigs bool + retention time.Duration } func transmitterFilterName(addr common.Address) string { @@ -63,37 +88,14 @@ func NewOCRContractTransmitter( transmitter Transmitter, lp logpoller.LogPoller, lggr logger.Logger, - reportToEvmTxMeta ReportToEthMetadata, -) (*contractTransmitter, error) { - return NewOCRContractTransmitterWithRetention(ctx, address, caller, contractABI, transmitter, lp, lggr, reportToEvmTxMeta, 0) -} - -func NewOCRContractTransmitterWithRetention( - ctx context.Context, - address gethcommon.Address, - caller contractReader, - contractABI abi.ABI, - transmitter Transmitter, - lp logpoller.LogPoller, - lggr logger.Logger, - reportToEvmTxMeta ReportToEthMetadata, - retention time.Duration, + opts ...OCRTransmitterOption, ) (*contractTransmitter, error) { transmitted, ok := contractABI.Events["Transmitted"] if !ok { return nil, errors.New("invalid ABI, missing transmitted") } - // TODO It would be better to keep MaxLogsKept = 1 for the OCR contract transmitter instead of Retention. We are always interested only in the latest log. - // Although MaxLogsKept is present in the Filter struct, it is not supported by LogPoller yet. - err := lp.RegisterFilter(ctx, logpoller.Filter{Name: transmitterFilterName(address), EventSigs: []common.Hash{transmitted.ID}, Addresses: []common.Address{address}, Retention: retention}) - if err != nil { - return nil, err - } - if reportToEvmTxMeta == nil { - reportToEvmTxMeta = reportToEvmTxMetaNoop - } - return &contractTransmitter{ + newContractTransmitter := &contractTransmitter{ contractAddress: address, contractABI: contractABI, transmitter: transmitter, @@ -101,8 +103,22 @@ func NewOCRContractTransmitterWithRetention( lp: lp, contractReader: caller, lggr: lggr.Named("OCRContractTransmitter"), - reportToEvmTxMeta: reportToEvmTxMeta, - }, nil + reportToEvmTxMeta: reportToEvmTxMetaNoop, + excludeSigs: false, + retention: 0, + } + + for _, opt := range opts { + opt(newContractTransmitter) + } + + // TODO It would be better to keep MaxLogsKept = 1 for the OCR contract transmitter instead of Retention. We are always interested only in the latest log. + // Although MaxLogsKept is present in the Filter struct, it is not supported by LogPoller yet. + err := lp.RegisterFilter(ctx, logpoller.Filter{Name: transmitterFilterName(address), EventSigs: []common.Hash{transmitted.ID}, Addresses: []common.Address{address}, Retention: newContractTransmitter.retention}) + if err != nil { + return nil, err + } + return newContractTransmitter, nil } // Transmit sends the report to the on-chain smart contract's Transmit method. @@ -118,9 +134,11 @@ func (oc *contractTransmitter) Transmit(ctx context.Context, reportCtx ocrtypes. if err != nil { panic("eventTransmit(ev): error in SplitSignature") } - rs = append(rs, r) - ss = append(ss, s) - vs[i] = v + if !oc.excludeSigs { + rs = append(rs, r) + ss = append(ss, s) + vs[i] = v + } } rawReportCtx := evmutil.RawReportContext(reportCtx) diff --git a/core/services/relay/evm/contract_transmitter_test.go b/core/services/relay/evm/contract_transmitter_test.go index 930ef0249e6..182cda63ced 100644 --- a/core/services/relay/evm/contract_transmitter_test.go +++ b/core/services/relay/evm/contract_transmitter_test.go @@ -8,7 +8,6 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" gethcommon "github.com/ethereum/go-ethereum/common" - "github.com/smartcontractkit/libocr/gethwrappers2/ocr2aggregator" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" @@ -19,16 +18,27 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/txmgr" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" + + "github.com/smartcontractkit/libocr/commontypes" + "github.com/smartcontractkit/libocr/gethwrappers2/ocr2aggregator" + "github.com/smartcontractkit/libocr/offchainreporting2plus/chains/evmutil" + "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + libocr "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" ) var sampleAddress = testutils.NewAddress() -type mockTransmitter struct{} +type mockTransmitter struct { + lastPayload []byte +} -func (mockTransmitter) CreateEthTransaction(ctx context.Context, toAddress gethcommon.Address, payload []byte, _ *txmgr.TxMeta) error { +func (m *mockTransmitter) CreateEthTransaction(ctx context.Context, toAddress gethcommon.Address, payload []byte, _ *txmgr.TxMeta) error { + m.lastPayload = payload return nil } -func (mockTransmitter) FromAddress() gethcommon.Address { return sampleAddress } + +func (*mockTransmitter) FromAddress() gethcommon.Address { return sampleAddress } func TestContractTransmitter(t *testing.T) { t.Parallel() @@ -43,11 +53,13 @@ func TestContractTransmitter(t *testing.T) { "000130da6b9315bd59af6b0a3f5463c0d0a39e92eaa34cbcbdbace7b3bfcc776" + // config digest "0000000000000000000000000000000000000000000000000000000000000002") // epoch c.On("CallContract", mock.Anything, mock.Anything, mock.Anything).Return(digestAndEpochDontScanLogs, nil).Once() - contractABI, _ := abi.JSON(strings.NewReader(ocr2aggregator.OCR2AggregatorABI)) + contractABI, _ := abi.JSON(strings.NewReader(ocr2aggregator.OCR2AggregatorMetaData.ABI)) 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) { + reportToEvmTxMeta := func(b []byte) (*txmgr.TxMeta, error) { return &txmgr.TxMeta{}, nil - }) + } + ot, err := NewOCRContractTransmitter(ctx, gethcommon.Address{}, c, contractABI, &mockTransmitter{}, lp, lggr, + WithReportToEthMetadata(reportToEvmTxMeta)) require.NoError(t, err) digest, epoch, err := ot.LatestConfigDigestAndEpoch(testutils.Context(t)) require.NoError(t, err) @@ -75,3 +87,85 @@ func TestContractTransmitter(t *testing.T) { require.NoError(t, err) assert.Equal(t, sampleAddress.String(), string(from)) } + +func Test_contractTransmitterNoSignatures_Transmit_SignaturesAreNotTransmitted(t *testing.T) { + t.Parallel() + + transmitter := &mockTransmitter{} + + ctx := context.Background() + reportCtx := types.ReportContext{} + report := types.Report{} + var signatures = oneSignature() + + oc := createContractTransmitter(ctx, t, transmitter, WithExcludeSignatures()) + + err := oc.Transmit(ctx, reportCtx, report, signatures) + require.NoError(t, err) + + var emptyRs [][32]byte + var emptySs [][32]byte + var emptyVs [32]byte + emptySignaturesPayload, err := oc.contractABI.Pack("transmit", evmutil.RawReportContext(reportCtx), []byte(report), emptyRs, emptySs, emptyVs) + require.NoError(t, err) + require.Equal(t, transmitter.lastPayload, emptySignaturesPayload) +} + +func Test_contractTransmitter_Transmit_SignaturesAreTransmitted(t *testing.T) { + t.Parallel() + + transmitter := &mockTransmitter{} + + ctx := context.Background() + reportCtx := types.ReportContext{} + report := types.Report{} + var signatures = oneSignature() + + oc := createContractTransmitter(ctx, t, transmitter) + + err := oc.Transmit(ctx, reportCtx, report, signatures) + require.NoError(t, err) + + rs, ss, vs := signaturesAsPayload(t, signatures) + withSignaturesPayload, err := oc.contractABI.Pack("transmit", evmutil.RawReportContext(reportCtx), []byte(report), rs, ss, vs) + require.NoError(t, err) + require.Equal(t, transmitter.lastPayload, withSignaturesPayload) +} + +func signaturesAsPayload(t *testing.T, signatures []ocrtypes.AttributedOnchainSignature) ([][32]byte, [][32]byte, [32]byte) { + var rs [][32]byte + var ss [][32]byte + var vs [32]byte + r, s, v, err := evmutil.SplitSignature(signatures[0].Signature) + require.NoError(t, err) + rs = append(rs, r) + ss = append(ss, s) + vs[0] = v + return rs, ss, vs +} + +func oneSignature() []ocrtypes.AttributedOnchainSignature { + signaturesData := make([]byte, 65) + signaturesData[9] = 8 + signaturesData[7] = 6 + return []libocr.AttributedOnchainSignature{{Signature: signaturesData, Signer: commontypes.OracleID(54)}} +} + +func createContractTransmitter(ctx context.Context, t *testing.T, transmitter Transmitter, ops ...OCRTransmitterOption) *contractTransmitter { + contractABI, err := abi.JSON(strings.NewReader(ocr2aggregator.OCR2AggregatorMetaData.ABI)) + require.NoError(t, err) + lp := lpmocks.NewLogPoller(t) + lp.On("RegisterFilter", mock.Anything, mock.Anything).Return(nil) + contractTransmitter, err := NewOCRContractTransmitter( + ctx, + gethcommon.Address{}, + evmclimocks.NewClient(t), + contractABI, + transmitter, + lp, + logger.TestLogger(t), + ops..., + ) + require.NoError(t, err) + return contractTransmitter +} diff --git a/core/services/relay/evm/decoder.go b/core/services/relay/evm/decoder.go index fdecf002020..732ee91d9e5 100644 --- a/core/services/relay/evm/decoder.go +++ b/core/services/relay/evm/decoder.go @@ -93,7 +93,7 @@ func setElements(length int, rDecode reflect.Value, iInto reflect.Value) error { func mapstructureDecode(src, dest any) error { mDecoder, err := mapstructure.NewDecoder(&mapstructure.DecoderConfig{ - DecodeHook: mapstructure.ComposeDecodeHookFunc(evmDecoderHooks...), + DecodeHook: mapstructure.ComposeDecodeHookFunc(DecoderHooks...), Result: dest, Squash: true, }) diff --git a/core/services/relay/evm/event_binding.go b/core/services/relay/evm/event_binding.go index a3f1fa9d6a2..acfb1aa6300 100644 --- a/core/services/relay/evm/event_binding.go +++ b/core/services/relay/evm/event_binding.go @@ -29,9 +29,8 @@ type eventBinding struct { // filterRegisterer in eventBinding is to be used as an override for lp filter defined in the contract binding. // If filterRegisterer is nil, this event should be registered with the lp filter defined in the contract binding. *filterRegisterer - hash common.Hash - codec commontypes.RemoteCodec - pending bool + hash common.Hash + codec commontypes.RemoteCodec // bound determines if address is set to the contract binding. bound bool bindLock sync.Mutex @@ -72,7 +71,6 @@ func (e *eventBinding) Bind(ctx context.Context, binding commontypes.BoundContra } e.address = common.HexToAddress(binding.Address) - e.pending = binding.Pending // filterRegisterer isn't required here because the event can also be polled for by the contractBinding common filter. if e.filterRegisterer != nil { @@ -136,22 +134,21 @@ func (e *eventBinding) Unregister(ctx context.Context) error { return nil } -func (e *eventBinding) GetLatestValue(ctx context.Context, params, into any) error { +func (e *eventBinding) GetLatestValue(ctx context.Context, confidenceLevel primitives.ConfidenceLevel, params, into any) error { if err := e.validateBound(); err != nil { return err } - // TODO BCF-3247 change GetLatestValue to use chain agnostic confidence levels - confs := evmtypes.Finalized - if e.pending { - confs = evmtypes.Unconfirmed + confirmations, err := confidenceToConfirmations(e.confirmationsMapping, confidenceLevel) + if err != nil { + return err } if len(e.inputInfo.Args()) == 0 { - return e.getLatestValueWithoutFilters(ctx, confs, into) + return e.getLatestValueWithoutFilters(ctx, confirmations, into) } - return e.getLatestValueWithFilters(ctx, confs, params, into) + return e.getLatestValueWithFilters(ctx, confirmations, params, into) } func (e *eventBinding) QueryKey(ctx context.Context, filter query.KeyFilter, limitAndSort query.LimitAndSort, sequenceDataType any) ([]commontypes.Sequence, error) { @@ -235,6 +232,7 @@ func (e *eventBinding) getLatestValueWithFilters( return wrapInternalErr(err) } + // TODO Use filtered logs here BCF-3316 // TODO: there should be a better way to ask log poller to filter these // First, you should be able to ask for as many topics to match // Second, you should be able to get the latest only @@ -255,7 +253,7 @@ func (e *eventBinding) getLatestValueWithFilters( } func (e *eventBinding) convertToOffChainType(params any) (any, error) { - offChain, err := e.codec.CreateType(wrapItemType(e.contractName, e.eventName, true), true) + offChain, err := e.codec.CreateType(WrapItemType(e.contractName, e.eventName, true), true) if err != nil { return nil, err } @@ -343,7 +341,7 @@ func (e *eventBinding) derefTopics(topics []any) error { } func (e *eventBinding) decodeLog(ctx context.Context, log *logpoller.Log, into any) error { - if err := e.codec.Decode(ctx, log.Data, into, wrapItemType(e.contractName, e.eventName, false)); err != nil { + if err := e.codec.Decode(ctx, log.Data, into, WrapItemType(e.contractName, e.eventName, false)); err != nil { return err } @@ -442,25 +440,18 @@ func (e *eventBinding) remapPrimitive(key string, expression query.Expression) ( if val, ok := e.eventDataWords[primitive.Name]; ok { return logpoller.NewEventByWordFilter(e.hash, val, primitive.ValueComparators), nil } - return logpoller.NewEventByTopicFilter(e.topics[key].Index, primitive.ValueComparators), nil case *primitives.Confidence: - return logpoller.NewConfirmationsFilter(e.confirmationsFrom(primitive.ConfidenceLevel)), nil + confirmations, err := confidenceToConfirmations(e.confirmationsMapping, primitive.ConfidenceLevel) + if err != nil { + return query.Expression{}, err + } + return logpoller.NewConfirmationsFilter(confirmations), nil default: return expression, nil } } -func (e *eventBinding) confirmationsFrom(confidence primitives.ConfidenceLevel) evmtypes.Confirmations { - value, ok := e.confirmationsMapping[confidence] - if ok { - return value - } - - // if the mapping doesn't exist, default to finalized for safety - return evmtypes.Finalized -} - func wrapInternalErr(err error) error { if err == nil { return nil diff --git a/core/services/relay/evm/evm.go b/core/services/relay/evm/evm.go index 61c484f82b2..3b3393441a2 100644 --- a/core/services/relay/evm/evm.go +++ b/core/services/relay/evm/evm.go @@ -7,7 +7,6 @@ import ( "fmt" "strings" "sync" - "time" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" @@ -216,7 +215,7 @@ func (r *Relayer) NewPluginProvider(rargs commontypes.RelayArgs, pargs commontyp return nil, err } - transmitter, err := newOnChainContractTransmitter(ctx, r.lggr, rargs, pargs.TransmitterID, r.ks.Eth(), configWatcher, configTransmitterOpts{}, OCR2AggregatorTransmissionContractABI, 0) + transmitter, err := newOnChainContractTransmitter(ctx, r.lggr, rargs, r.ks.Eth(), configWatcher, configTransmitterOpts{}, OCR2AggregatorTransmissionContractABI) if err != nil { return nil, err } @@ -357,7 +356,7 @@ func (r *Relayer) NewLLOProvider(rargs commontypes.RelayArgs, pargs commontypes. var transmitter llo.Transmitter if lloCfg.BenchmarkMode { r.lggr.Info("Benchmark mode enabled, using dummy transmitter. NOTE: THIS WILL NOT TRANSMIT ANYTHING") - transmitter = bm.NewTransmitter(r.lggr, privKey.PublicKey) + transmitter = bm.NewTransmitter(r.lggr, fmt.Sprintf("%x", privKey.PublicKey)) } else { var client wsrpc.Client client, err = r.mercuryPool.Checkout(context.Background(), privKey, lloCfg.ServerPubKey, lloCfg.ServerURL()) @@ -532,7 +531,25 @@ type configTransmitterOpts struct { } // 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, transmissionContractRetention time.Duration) (*contractTransmitter, error) { +func newOnChainContractTransmitter(ctx context.Context, lggr logger.Logger, rargs commontypes.RelayArgs, ethKeystore keystore.Eth, configWatcher *configWatcher, opts configTransmitterOpts, transmissionContractABI abi.ABI, ocrTransmitterOpts ...OCRTransmitterOption) (*contractTransmitter, error) { + transmitter, err := generateTransmitterFrom(ctx, rargs, ethKeystore, configWatcher, opts) + if err != nil { + return nil, err + } + + return NewOCRContractTransmitter( + ctx, + configWatcher.contractAddress, + configWatcher.chain.Client(), + transmissionContractABI, + transmitter, + configWatcher.chain.LogPoller(), + lggr, + ocrTransmitterOpts..., + ) +} + +func generateTransmitterFrom(ctx context.Context, rargs commontypes.RelayArgs, ethKeystore keystore.Eth, configWatcher *configWatcher, opts configTransmitterOpts) (Transmitter, error) { var relayConfig types.RelayConfig if err := json.Unmarshal(rargs.RelayConfig, &relayConfig); err != nil { return nil, err @@ -612,18 +629,16 @@ func newOnChainContractTransmitter(ctx context.Context, lggr logger.Logger, rarg if err != nil { return nil, pkgerrors.Wrap(err, "failed to create transmitter") } + return transmitter, nil +} - return NewOCRContractTransmitterWithRetention( - ctx, - configWatcher.contractAddress, - configWatcher.chain.Client(), - transmissionContractABI, - transmitter, - configWatcher.chain.LogPoller(), - lggr, - nil, - transmissionContractRetention, - ) +func (r *Relayer) NewChainWriter(_ context.Context, config []byte) (commontypes.ChainWriter, error) { + var cfg types.ChainWriterConfig + if err := json.Unmarshal(config, &cfg); err != nil { + return nil, fmt.Errorf("failed to unmarshall chain writer config err: %s", err) + } + + return NewChainWriterService(r.lggr, r.chain.Client(), r.chain.TxManager(), r.chain.GasEstimator(), cfg) } func (r *Relayer) NewContractReader(chainReaderConfig []byte) (commontypes.ContractReader, error) { @@ -633,7 +648,7 @@ func (r *Relayer) NewContractReader(chainReaderConfig []byte) (commontypes.Contr return nil, fmt.Errorf("failed to unmarshall chain reader config err: %s", err) } - return NewChainReaderService(ctx, r.lggr, r.chain.LogPoller(), r.chain.Client(), *cfg) + return NewChainReaderService(ctx, r.lggr, r.chain.LogPoller(), r.chain.HeadTracker(), r.chain.Client(), *cfg) } func (r *Relayer) NewMedianProvider(rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (commontypes.MedianProvider, error) { @@ -662,7 +677,7 @@ func (r *Relayer) NewMedianProvider(rargs commontypes.RelayArgs, pargs commontyp reportCodec := evmreportcodec.ReportCodec{} - contractTransmitter, err := newOnChainContractTransmitter(ctx, lggr, rargs, pargs.TransmitterID, r.ks.Eth(), configWatcher, configTransmitterOpts{}, OCR2AggregatorTransmissionContractABI, 0) + contractTransmitter, err := newOnChainContractTransmitter(ctx, lggr, rargs, r.ks.Eth(), configWatcher, configTransmitterOpts{}, OCR2AggregatorTransmissionContractABI) if err != nil { return nil, err } @@ -683,11 +698,11 @@ 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(ctx, lggr, r.chain.LogPoller(), r.chain.Client(), *relayConfig.ChainReader); err != nil { + if chainReaderService, err = NewChainReaderService(ctx, lggr, r.chain.LogPoller(), r.chain.HeadTracker(), r.chain.Client(), *relayConfig.ChainReader); err != nil { return nil, err } - boundContracts := []commontypes.BoundContract{{Name: "median", Pending: true, Address: contractID.String()}} + boundContracts := []commontypes.BoundContract{{Name: "median", Address: contractID.String()}} if err = chainReaderService.Bind(context.Background(), boundContracts); err != nil { return nil, err } @@ -715,6 +730,14 @@ func (r *Relayer) NewAutomationProvider(rargs commontypes.RelayArgs, pargs commo return ocr2keeperRelayer.NewOCR2KeeperProvider(rargs, pargs) } +func (r *Relayer) NewCCIPCommitProvider(_ commontypes.RelayArgs, _ commontypes.PluginArgs) (commontypes.CCIPCommitProvider, error) { + return nil, errors.New("ccip.commit is not supported for evm") +} + +func (r *Relayer) NewCCIPExecProvider(_ commontypes.RelayArgs, _ commontypes.PluginArgs) (commontypes.CCIPExecProvider, error) { + return nil, errors.New("ccip.exec is not supported for evm") +} + var _ commontypes.MedianProvider = (*medianProvider)(nil) type medianProvider struct { diff --git a/core/services/relay/evm/evmtesting/chain_reader_historical_client_wrapper.go b/core/services/relay/evm/evmtesting/chain_reader_historical_client_wrapper.go new file mode 100644 index 00000000000..b3d73be28f8 --- /dev/null +++ b/core/services/relay/evm/evmtesting/chain_reader_historical_client_wrapper.go @@ -0,0 +1,159 @@ +package evmtesting + +import ( + "context" + "fmt" + "math" + "math/big" + "strings" + + "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + + clcommontypes "github.com/smartcontractkit/chainlink-common/pkg/types" + . "github.com/smartcontractkit/chainlink-common/pkg/types/interfacetests" //nolint common practice to import test mods with . + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" + "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm" + "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" +) + +// ClientWithContractHistory makes it possible to modify client.Client CallContract so that it returns historical data. +type ClientWithContractHistory struct { + client.Client + valsWithCall + HT logpoller.HeadTracker + codec clcommontypes.RemoteCodec +} + +func (cwh *ClientWithContractHistory) Init(_ context.Context, config types.ChainReaderConfig) error { + cwh.valsWithCall = make(map[int64]valWithCall) + parsedTypes := evm.ParsedTypes{ + EncoderDefs: make(map[string]types.CodecEntry), + DecoderDefs: make(map[string]types.CodecEntry), + } + + // setup codec for method calls + for contractName, contractCfg := range config.Contracts { + contractAbi, err := abi.JSON(strings.NewReader(contractCfg.ContractABI)) + if err != nil { + return err + } + + for genericName, readDef := range contractCfg.Configs { + if readDef.ReadType == types.Event { + continue + } + + inputMod, err := readDef.InputModifications.ToModifier(evm.DecoderHooks...) + if err != nil { + return err + } + + outputMod, err := readDef.OutputModifications.ToModifier(evm.DecoderHooks...) + if err != nil { + return err + } + + method := contractAbi.Methods[readDef.ChainSpecificName] + input, output := types.NewCodecEntry(method.Inputs, method.ID, inputMod), types.NewCodecEntry(method.Outputs, nil, outputMod) + + if err = input.Init(); err != nil { + return err + } + if err = output.Init(); err != nil { + return err + } + + parsedTypes.EncoderDefs[evm.WrapItemType(contractName, genericName, true)] = input + parsedTypes.DecoderDefs[evm.WrapItemType(contractName, genericName, false)] = output + } + } + + codec, err := parsedTypes.ToCodec() + if err != nil { + return err + } + cwh.codec = codec + return nil +} + +func (cwh *ClientWithContractHistory) SetUintLatestValue(ctx context.Context, val uint64, forCall ExpectedGetLatestValueArgs) error { + latestBlock, _, err := cwh.HT.LatestAndFinalizedBlock(ctx) + if err != nil { + return err + } + + cwh.valsWithCall[latestBlock.Number] = valWithCall{ + ExpectedGetLatestValueArgs: forCall, + val: val, + } + + return nil +} + +// findValClosestToBlock returns the value that was added in block that is <= blockNumber, otherwise return empty valWithCall +func (cwh *ClientWithContractHistory) findValClosestToBlock(blockNumber *big.Int) (val valWithCall) { + var valIsInBlock int64 = math.MaxInt64 + for block, v := range cwh.valsWithCall { + if block <= blockNumber.Int64() && block <= valIsInBlock { + valIsInBlock, val = block, v + } + } + return val +} + +// CallContract does the standard CallContract if blockNumber is latest, otherwise returns mocked historical value since SimulatedBackend doesn't support historical calls. +func (cwh *ClientWithContractHistory) CallContract(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int) ([]byte, error) { + latestBlock, _, err := cwh.HT.LatestAndFinalizedBlock(ctx) + if err != nil { + return nil, err + } + + if blockNumber == nil || blockNumber.Int64() == latestBlock.BlockNumber() { + return cwh.Client.CallContract(ctx, msg, blockNumber) + } + + // hardcoded to work with the simplest test case of uint64 return value with no params, since we just want to test proper finality handling. + valAndCall := cwh.findValClosestToBlock(blockNumber) + if valAndCall.ContractName == "" || valAndCall.ReadName == "" { + return nil, fmt.Errorf("no recorded values found for historical contract call in block : %s, stored historical values are: \n\t%s", blockNumber, cwh.valsWithCall.String()) + } + + // encode the expected call to compare with the actual call + dataToCmp, err := cwh.codec.Encode(ctx, valAndCall.Params, evm.WrapItemType(valAndCall.ContractName, valAndCall.ReadName, true)) + if err != nil { + return nil, err + } + + if string(msg.Data) == string(dataToCmp) { + // format the value to match the standard evm rpc response + paddedHexString := fmt.Sprintf("%064s", hexutil.EncodeUint64(valAndCall.val)[2:]) + return common.Hex2Bytes(paddedHexString), nil + } + + return nil, fmt.Errorf("found historical contract value, but it doesn't match the contract call, stored historical values are: \n\t%s", cwh.valsWithCall.String()) +} + +// valsWithCall is used to mock historical data since SimulatedBackend doesn't support it +type valsWithCall map[int64]valWithCall + +func (v valsWithCall) String() string { + result := "valsWithCall{\n" + for key, val := range v { + result += fmt.Sprintf(" Blocknumber: %d, Value: %s\n", key, val.String()) + } + result += "}" + return result +} + +type valWithCall struct { + ExpectedGetLatestValueArgs + val uint64 +} + +func (v valWithCall) String() string { + return fmt.Sprintf("{ExpectedArgs: {%s}, Value: %d}", v.ExpectedGetLatestValueArgs.String(), v.val) +} diff --git a/core/services/relay/evm/evmtesting/chain_reader_interface_tester.go b/core/services/relay/evm/evmtesting/chain_reader_interface_tester.go index b9f141b2d0b..4474f054dbc 100644 --- a/core/services/relay/evm/evmtesting/chain_reader_interface_tester.go +++ b/core/services/relay/evm/evmtesting/chain_reader_interface_tester.go @@ -3,6 +3,7 @@ package evmtesting import ( "context" "encoding/json" + "fmt" "math/big" "time" @@ -15,22 +16,25 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/codec" clcommontypes "github.com/smartcontractkit/chainlink-common/pkg/types" . "github.com/smartcontractkit/chainlink-common/pkg/types/interfacetests" //nolint common practice to import test mods with . - + "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/headtracker" "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/gethwrappers/generated/chain_reader_tester" _ "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" // force binding for tx type "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" - evmtypes "github.com/ethereum/go-ethereum/core/types" + gethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/stretchr/testify/require" ) const ( triggerWithDynamicTopic = "TriggeredEventWithDynamicTopic" triggerWithAllTopics = "TriggeredWithFourTopics" + finalityDepth = 4 ) type EVMChainReaderInterfaceTesterHelper[T TestingT[T]] interface { @@ -46,15 +50,15 @@ type EVMChainReaderInterfaceTesterHelper[T TestingT[T]] interface { } type EVMChainReaderInterfaceTester[T TestingT[T]] struct { - Helper EVMChainReaderInterfaceTesterHelper[T] - client client.Client - address string - address2 string - chainConfig types.ChainReaderConfig - auth *bind.TransactOpts - evmTest *chain_reader_tester.ChainReaderTester - cr evm.ChainReaderService - dirtyContracts bool + Helper EVMChainReaderInterfaceTesterHelper[T] + client client.Client + address string + address2 string + contractTesters map[string]*chain_reader_tester.ChainReaderTester + chainConfig types.ChainReaderConfig + auth *bind.TransactOpts + cr evm.ChainReaderService + dirtyContracts bool } func (it *EVMChainReaderInterfaceTester[T]) Setup(t T) { @@ -66,7 +70,7 @@ func (it *EVMChainReaderInterfaceTester[T]) Setup(t T) { it.cr = nil if it.dirtyContracts { - it.evmTest = nil + it.contractTesters = nil } }) @@ -80,6 +84,13 @@ func (it *EVMChainReaderInterfaceTester[T]) Setup(t T) { testStruct := CreateTestStruct[T](0, it) + methodTakingLatestParamsReturningTestStructConfig := types.ChainReaderDefinition{ + ChainSpecificName: "getElementAtIndex", + OutputModifications: codec.ModifiersConfig{ + &codec.RenameModifierConfig{Fields: map[string]string{"NestedStruct.Inner.IntVal": "I"}}, + }, + } + it.chainConfig = types.ChainReaderConfig{ Contracts: map[string]types.ChainContractReader{ AnyContractName: { @@ -88,18 +99,13 @@ func (it *EVMChainReaderInterfaceTester[T]) Setup(t T) { GenericEventNames: []string{EventName, EventWithFilterName}, }, Configs: map[string]*types.ChainReaderDefinition{ - MethodTakingLatestParamsReturningTestStruct: { - ChainSpecificName: "getElementAtIndex", - OutputModifications: codec.ModifiersConfig{ - &codec.RenameModifierConfig{Fields: map[string]string{"NestedStruct.Inner.IntVal": "I"}}, - }, + MethodTakingLatestParamsReturningTestStruct: &methodTakingLatestParamsReturningTestStructConfig, + MethodReturningAlterableUint64: { + ChainSpecificName: "getAlterablePrimitiveValue", }, MethodReturningUint64: { ChainSpecificName: "getPrimitiveValue", }, - DifferentMethodReturningUint64: { - ChainSpecificName: "getDifferentPrimitiveValue", - }, MethodReturningUint64Slice: { ChainSpecificName: "getSliceValue", }, @@ -109,27 +115,23 @@ func (it *EVMChainReaderInterfaceTester[T]) Setup(t T) { OutputModifications: codec.ModifiersConfig{ &codec.RenameModifierConfig{Fields: map[string]string{"NestedStruct.Inner.IntVal": "I"}}, }, - ConfidenceConfirmations: map[string]int{"0.0": 0, "1.0": -1}, }, EventWithFilterName: { - ChainSpecificName: "Triggered", - ReadType: types.Event, - EventDefinitions: &types.EventDefinitions{InputFields: []string{"Field"}}, - ConfidenceConfirmations: map[string]int{"0.0": 0, "1.0": -1}, + ChainSpecificName: "Triggered", + ReadType: types.Event, + EventDefinitions: &types.EventDefinitions{InputFields: []string{"Field"}}, }, triggerWithDynamicTopic: { ChainSpecificName: triggerWithDynamicTopic, ReadType: types.Event, EventDefinitions: &types.EventDefinitions{ InputFields: []string{"fieldHash"}, - // no specific reason for filter being defined here insted on contract level, - // this is just for test case variety + // No specific reason for filter being defined here instead of on contract level, this is just for test case variety. PollingFilter: &types.PollingFilter{}, }, InputModifications: codec.ModifiersConfig{ &codec.RenameModifierConfig{Fields: map[string]string{"FieldHash": "Field"}}, }, - ConfidenceConfirmations: map[string]int{"0.0": 0, "1.0": -1}, }, triggerWithAllTopics: { ChainSpecificName: triggerWithAllTopics, @@ -138,7 +140,10 @@ func (it *EVMChainReaderInterfaceTester[T]) Setup(t T) { InputFields: []string{"Field1", "Field2", "Field3"}, PollingFilter: &types.PollingFilter{}, }, - ConfidenceConfirmations: map[string]int{"0.0": 0, "1.0": -1}, + // This doesn't have to be here, since the defalt mapping would work, but is left as an example. + // Keys which are string float values(confidence levels) are chain agnostic and should be reused across chains. + // These float values can map to different finality concepts across chains. + ConfidenceConfirmations: map[string]int{"0.0": int(evmtypes.Unconfirmed), "1.0": int(evmtypes.Finalized)}, }, MethodReturningSeenStruct: { ChainSpecificName: "returnSeen", @@ -161,6 +166,7 @@ func (it *EVMChainReaderInterfaceTester[T]) Setup(t T) { AnySecondContractName: { ContractABI: chain_reader_tester.ChainReaderTesterMetaData.ABI, Configs: map[string]*types.ChainReaderDefinition{ + MethodTakingLatestParamsReturningTestStruct: &methodTakingLatestParamsReturningTestStructConfig, MethodReturningUint64: { ChainSpecificName: "getDifferentPrimitiveValue", }, @@ -194,12 +200,13 @@ func (it *EVMChainReaderInterfaceTester[T]) GetChainReader(t T) clcommontypes.Co db := it.Helper.NewSqlxDB(t) lpOpts := logpoller.Opts{ PollPeriod: time.Millisecond, - FinalityDepth: 4, + FinalityDepth: finalityDepth, BackfillBatchSize: 1, RpcBatchSize: 1, KeepFinalizedBlocksDepth: 10000, } - lp := logpoller.NewLogPoller(logpoller.NewORM(it.Helper.ChainID(), db, lggr), it.client, lggr, lpOpts) + ht := headtracker.NewSimulatedHeadTracker(it.client, lpOpts.UseFinalityTag, lpOpts.FinalityDepth) + lp := logpoller.NewLogPoller(logpoller.NewORM(it.Helper.ChainID(), db, lggr), it.client, lggr, ht, lpOpts) require.NoError(t, lp.Start(ctx)) // encode and decode the config to ensure the test covers type issues @@ -209,33 +216,106 @@ func (it *EVMChainReaderInterfaceTester[T]) GetChainReader(t T) clcommontypes.Co conf, err := types.ChainReaderConfigFromBytes(confBytes) require.NoError(t, err) - cr, err := evm.NewChainReaderService(ctx, lggr, lp, it.client, conf) + // wrap the client so that we can mock historical contract state + cwh := &ClientWithContractHistory{Client: it.Helper.Client(t), HT: ht} + require.NoError(t, cwh.Init(ctx, conf)) + it.client = cwh + + cr, err := evm.NewChainReaderService(ctx, lggr, lp, ht, it.client, conf) require.NoError(t, err) require.NoError(t, cr.Start(ctx)) it.cr = cr return cr } -func (it *EVMChainReaderInterfaceTester[T]) SetLatestValue(t T, testStruct *TestStruct) { - it.sendTxWithTestStruct(t, testStruct, (*chain_reader_tester.ChainReaderTesterTransactor).AddTestStruct) +func (it *EVMChainReaderInterfaceTester[T]) SetTestStructLatestValue(t T, testStruct *TestStruct) { + it.sendTxWithTestStruct(t, it.address, testStruct, (*chain_reader_tester.ChainReaderTesterTransactor).AddTestStruct) +} + +func (it *EVMChainReaderInterfaceTester[T]) SetBatchLatestValues(t T, batchCallEntry BatchCallEntry) { + nameToAddress := make(map[string]string) + boundContracts := it.GetBindings(t) + for _, bc := range boundContracts { + nameToAddress[bc.Name] = bc.Address + } + + for contractName, contractBatch := range batchCallEntry { + require.Contains(t, nameToAddress, contractName) + for _, readEntry := range contractBatch { + val, isOk := readEntry.ReturnValue.(*TestStruct) + if !isOk { + require.Fail(t, "expected *TestStruct for contract: %s read: %s, but received %T", contractName, readEntry.Name, readEntry.ReturnValue) + } + it.sendTxWithTestStruct(t, nameToAddress[contractName], val, (*chain_reader_tester.ChainReaderTesterTransactor).AddTestStruct) + } + } +} + +// SetUintLatestValue is supposed to be used for testing confidence levels, but geth simulated backend doesn't support calling past state +func (it *EVMChainReaderInterfaceTester[T]) SetUintLatestValue(t T, val uint64, forCall ExpectedGetLatestValueArgs) { + cw, ok := it.client.(*ClientWithContractHistory) + if !ok { + require.True(t, ok, "SetUintLatestValue should always be used for tests involving finality") + } + + it.sendTxWithUintVal(t, it.address, val, (*chain_reader_tester.ChainReaderTesterTransactor).SetAlterablePrimitiveValue) + require.NoError(t, cw.SetUintLatestValue(it.Helper.Context(t), val, forCall)) } func (it *EVMChainReaderInterfaceTester[T]) TriggerEvent(t T, testStruct *TestStruct) { - it.sendTxWithTestStruct(t, testStruct, (*chain_reader_tester.ChainReaderTesterTransactor).TriggerEvent) + it.sendTxWithTestStruct(t, it.address, testStruct, (*chain_reader_tester.ChainReaderTesterTransactor).TriggerEvent) +} + +// GenerateBlocksTillConfidenceLevel is supposed to be used for testing confidence levels, but geth simulated backend doesn't support calling past state +func (it *EVMChainReaderInterfaceTester[T]) GenerateBlocksTillConfidenceLevel(t T, contractName, readName string, confidenceLevel primitives.ConfidenceLevel) { + contractCfg, ok := it.chainConfig.Contracts[contractName] + if !ok { + t.Errorf("contract %s not found", contractName) + return + } + readCfg, ok := contractCfg.Configs[readName] + require.True(t, ok, fmt.Sprintf("readName: %s not found for contract: %s", readName, contractName)) + toEvmConf, err := evm.ConfirmationsFromConfig(readCfg.ConfidenceConfirmations) + require.True(t, ok, fmt.Errorf("failed to parse confidence level mapping:%s not found for contract: %s readName: %s, err:%w", confidenceLevel, readName, contractName, err)) + confirmations, ok := toEvmConf[confidenceLevel] + require.True(t, ok, fmt.Sprintf("confidence level mapping:%s not found for contract: %s readName: %s", confidenceLevel, readName, contractName)) + + if confirmations == evmtypes.Finalized { + for i := 0; i < finalityDepth; i++ { + it.Helper.Commit() + } + } } func (it *EVMChainReaderInterfaceTester[T]) GetBindings(_ T) []clcommontypes.BoundContract { return []clcommontypes.BoundContract{ - {Name: AnyContractName, Address: it.address, Pending: true}, - {Name: AnySecondContractName, Address: it.address2, Pending: true}, + {Name: AnyContractName, Address: it.address}, + {Name: AnySecondContractName, Address: it.address2}, } } -type testStructFn = func(*chain_reader_tester.ChainReaderTesterTransactor, *bind.TransactOpts, int32, string, uint8, [32]uint8, common.Address, []common.Address, *big.Int, chain_reader_tester.MidLevelTestStruct) (*evmtypes.Transaction, error) +type uintFn = func(*chain_reader_tester.ChainReaderTesterTransactor, *bind.TransactOpts, uint64) (*gethtypes.Transaction, error) + +// sendTxWithUintVal is supposed to be used for testing confidence levels, but geth simulated backend doesn't support calling past state +func (it *EVMChainReaderInterfaceTester[T]) sendTxWithUintVal(t T, contractAddress string, val uint64, fn uintFn) { + tx, err := fn( + &it.contractTesters[contractAddress].ChainReaderTesterTransactor, + it.GetAuthWithGasSet(t), + val, + ) + + require.NoError(t, err) + it.Helper.Commit() + it.IncNonce() + it.AwaitTx(t, tx) + it.dirtyContracts = true +} + +type testStructFn = func(*chain_reader_tester.ChainReaderTesterTransactor, *bind.TransactOpts, int32, string, uint8, [32]uint8, common.Address, []common.Address, *big.Int, chain_reader_tester.MidLevelTestStruct) (*gethtypes.Transaction, error) -func (it *EVMChainReaderInterfaceTester[T]) sendTxWithTestStruct(t T, testStruct *TestStruct, fn testStructFn) { +func (it *EVMChainReaderInterfaceTester[T]) sendTxWithTestStruct(t T, contractAddress string, testStruct *TestStruct, fn testStructFn) { tx, err := fn( - &it.evmTest.ChainReaderTesterTransactor, + &it.contractTesters[contractAddress].ChainReaderTesterTransactor, it.GetAuthWithGasSet(t), *testStruct.Field, testStruct.DifferentField, @@ -270,25 +350,26 @@ func (it *EVMChainReaderInterfaceTester[T]) IncNonce() { } } -func (it *EVMChainReaderInterfaceTester[T]) AwaitTx(t T, tx *evmtypes.Transaction) { +func (it *EVMChainReaderInterfaceTester[T]) AwaitTx(t T, tx *gethtypes.Transaction) { ctx := it.Helper.Context(t) receipt, err := bind.WaitMined(ctx, it.client, tx) require.NoError(t, err) - require.Equal(t, evmtypes.ReceiptStatusSuccessful, receipt.Status) + require.Equal(t, gethtypes.ReceiptStatusSuccessful, receipt.Status) } func (it *EVMChainReaderInterfaceTester[T]) deployNewContracts(t T) { // First test deploy both contracts, otherwise only deploy contracts if cleanup decides that we need to. - if it.address == "" { - it.address = it.deployNewContract(t) - it.address2 = it.deployNewContract(t) - } else if it.evmTest == nil { - it.address = it.deployNewContract(t) - it.dirtyContracts = false + if it.address == "" || it.contractTesters == nil { + it.contractTesters = make(map[string]*chain_reader_tester.ChainReaderTester, 2) + address, ts1 := it.deployNewContract(t) + address2, ts2 := it.deployNewContract(t) + it.address, it.address2 = address, address2 + it.contractTesters[it.address] = ts1 + it.contractTesters[it.address2] = ts2 } } -func (it *EVMChainReaderInterfaceTester[T]) deployNewContract(t T) string { +func (it *EVMChainReaderInterfaceTester[T]) deployNewContract(t T) (string, *chain_reader_tester.ChainReaderTester) { // 105528 was in the error: gas too low: have 0, want 105528 // Not sure if there's a better way to get it. it.auth.GasLimit = 10552800 @@ -296,13 +377,10 @@ func (it *EVMChainReaderInterfaceTester[T]) deployNewContract(t T) string { address, tx, ts, err := chain_reader_tester.DeployChainReaderTester(it.GetAuthWithGasSet(t), it.Helper.Backend()) require.NoError(t, err) it.Helper.Commit() - if it.evmTest == nil { - it.evmTest = ts - } it.IncNonce() it.AwaitTx(t, tx) - return address.String() + return address.String(), ts } func (it *EVMChainReaderInterfaceTester[T]) MaxWaitTimeForEvents() time.Duration { diff --git a/core/services/relay/evm/evmtesting/run_tests.go b/core/services/relay/evm/evmtesting/run_tests.go index 3058784b30a..f958c055ca7 100644 --- a/core/services/relay/evm/evmtesting/run_tests.go +++ b/core/services/relay/evm/evmtesting/run_tests.go @@ -1,16 +1,21 @@ package evmtesting import ( + "math/big" "reflect" "time" "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" clcommontypes "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives" . "github.com/smartcontractkit/chainlink-common/pkg/types/interfacetests" //nolint common practice to import test mods with . + + "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm" ) func RunChainReaderEvmTests[T TestingT[T]](t T, it *EVMChainReaderInterfaceTester[T]) { @@ -21,7 +26,7 @@ func RunChainReaderEvmTests[T TestingT[T]](t T, it *EVMChainReaderInterfaceTeste anyString := "foo" it.dirtyContracts = true - tx, err := it.evmTest.ChainReaderTesterTransactor.TriggerEventWithDynamicTopic(it.GetAuthWithGasSet(t), anyString) + tx, err := it.contractTesters[it.address].ChainReaderTesterTransactor.TriggerEventWithDynamicTopic(it.GetAuthWithGasSet(t), anyString) require.NoError(t, err) it.Helper.Commit() it.IncNonce() @@ -38,7 +43,7 @@ func RunChainReaderEvmTests[T TestingT[T]](t T, it *EVMChainReaderInterfaceTeste rOutput := reflect.Indirect(reflect.ValueOf(output)) require.Eventually(t, func() bool { - return cr.GetLatestValue(ctx, AnyContractName, triggerWithDynamicTopic, input, output) == nil + return cr.GetLatestValue(ctx, AnyContractName, triggerWithDynamicTopic, primitives.Unconfirmed, input, output) == nil }, it.MaxWaitTimeForEvents(), 100*time.Millisecond) assert.Equal(t, &anyString, rOutput.FieldByName("Field").Interface()) @@ -63,15 +68,27 @@ func RunChainReaderEvmTests[T TestingT[T]](t T, it *EVMChainReaderInterfaceTeste time.Sleep(it.MaxWaitTimeForEvents()) - require.NoError(t, cr.GetLatestValue(ctx, AnyContractName, triggerWithAllTopics, params, &latest)) + require.NoError(t, cr.GetLatestValue(ctx, AnyContractName, triggerWithAllTopics, primitives.Unconfirmed, params, &latest)) assert.Equal(t, int32(1), latest.Field1) assert.Equal(t, int32(2), latest.Field2) assert.Equal(t, int32(3), latest.Field3) }) + + t.Run("Bind returns error on missing contract at address", func(t T) { + it.Setup(t) + + addr := common.BigToAddress(big.NewInt(42)) + reader := it.GetChainReader(t) + + ctx := it.Helper.Context(t) + err := reader.Bind(ctx, []clcommontypes.BoundContract{{Name: AnyContractName, Address: addr.Hex()}}) + + require.ErrorIs(t, err, evm.NoContractExistsError{Address: addr}) + }) } func triggerFourTopics[T TestingT[T]](t T, it *EVMChainReaderInterfaceTester[T], i1, i2, i3 int32) { - tx, err := it.evmTest.ChainReaderTesterTransactor.TriggerWithFourTopics(it.GetAuthWithGasSet(t), i1, i2, i3) + tx, err := it.contractTesters[it.address].ChainReaderTesterTransactor.TriggerWithFourTopics(it.GetAuthWithGasSet(t), i1, i2, i3) require.NoError(t, err) require.NoError(t, err) it.Helper.Commit() diff --git a/core/services/relay/evm/functions/config_poller_test.go b/core/services/relay/evm/functions/config_poller_test.go index 2d96b2fd15d..c44d64c5ba7 100644 --- a/core/services/relay/evm/functions/config_poller_test.go +++ b/core/services/relay/evm/functions/config_poller_test.go @@ -23,6 +23,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" evmclient "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/headtracker" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" evmutils "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/link_token_interface" @@ -88,7 +89,8 @@ func runTest(t *testing.T, pluginType functions.FunctionsPluginType, expectedDig RpcBatchSize: 2, KeepFinalizedBlocksDepth: 1000, } - lp := logpoller.NewLogPoller(lorm, ethClient, lggr, lpOpts) + ht := headtracker.NewSimulatedHeadTracker(ethClient, lpOpts.UseFinalityTag, lpOpts.FinalityDepth) + lp := logpoller.NewLogPoller(lorm, ethClient, lggr, ht, lpOpts) servicetest.Run(t, lp) configPoller, err := functions.NewFunctionsConfigPoller(pluginType, lp, lggr) require.NoError(t, err) diff --git a/core/services/relay/evm/functions/offchain_config_digester.go b/core/services/relay/evm/functions/offchain_config_digester.go index c53d07e77ca..fa8199ec0a4 100644 --- a/core/services/relay/evm/functions/offchain_config_digester.go +++ b/core/services/relay/evm/functions/offchain_config_digester.go @@ -17,7 +17,7 @@ import ( var ( _ types.OffchainConfigDigester = &functionsOffchainConfigDigester{} _ evmRelayTypes.RouteUpdateSubscriber = &functionsOffchainConfigDigester{} - FunctionsDigestPrefix = types.ConfigDigestPrefixEVM + FunctionsDigestPrefix = types.ConfigDigestPrefixEVMSimple // In order to support multiple OCR plugins with a single jobspec & OCR2Base contract, each plugin must have a unique config digest. // This is accomplished by overriding the single config digest from the contract with a unique prefix for each plugin via this custom offchain digester & config poller. ThresholdDigestPrefix = types.ConfigDigestPrefix(7) diff --git a/core/services/relay/evm/llo_provider.go b/core/services/relay/evm/llo_provider.go index 0ab0773a160..b685565e6e0 100644 --- a/core/services/relay/evm/llo_provider.go +++ b/core/services/relay/evm/llo_provider.go @@ -10,7 +10,6 @@ import ( commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" relaytypes "github.com/smartcontractkit/chainlink-common/pkg/types" llotypes "github.com/smartcontractkit/chainlink-common/pkg/types/llo" - datastreamsllo "github.com/smartcontractkit/chainlink-data-streams/llo" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/llo" @@ -75,10 +74,8 @@ func (p *lloProvider) OffchainConfigDigester() ocrtypes.OffchainConfigDigester { return p.cp.OffchainConfigDigester() } -func (p *lloProvider) OnchainConfigCodec() datastreamsllo.OnchainConfigCodec { - // TODO: This should probably be moved to core since its chain-specific - // https://smartcontract-it.atlassian.net/browse/MERC-3661 - return &datastreamsllo.JSONOnchainConfigCodec{} +func (p *lloProvider) OnchainConfigCodec() llo.OnchainConfigCodec { + return &llo.JSONOnchainConfigCodec{} } func (p *lloProvider) ContractTransmitter() llotypes.Transmitter { diff --git a/core/services/relay/evm/loop_impl.go b/core/services/relay/evm/loop_impl.go index 7f9d405847d..aec956cd0d2 100644 --- a/core/services/relay/evm/loop_impl.go +++ b/core/services/relay/evm/loop_impl.go @@ -2,12 +2,11 @@ package evm import ( "github.com/smartcontractkit/chainlink-common/pkg/loop" - relay "github.com/smartcontractkit/chainlink-common/pkg/loop/adapters/relay" + "github.com/smartcontractkit/chainlink-common/pkg/loop/adapters/relay" "github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm" ) -//go:generate mockery --quiet --name LoopRelayAdapter --output ./mocks/ --case=underscore type LoopRelayAdapter interface { loop.Relayer Chain() legacyevm.Chain diff --git a/core/services/relay/evm/mercury/helpers_test.go b/core/services/relay/evm/mercury/helpers_test.go index f2923696bfc..c7c59bf2e11 100644 --- a/core/services/relay/evm/mercury/helpers_test.go +++ b/core/services/relay/evm/mercury/helpers_test.go @@ -20,6 +20,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" evmclient "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/headtracker" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/llo-feeds/generated/verifier" @@ -174,7 +175,8 @@ func SetupTH(t *testing.T, feedID common.Hash) TestHarness { RpcBatchSize: 2, KeepFinalizedBlocksDepth: 1000, } - lp := logpoller.NewLogPoller(lorm, ethClient, lggr, lpOpts) + ht := headtracker.NewSimulatedHeadTracker(ethClient, lpOpts.UseFinalityTag, lpOpts.FinalityDepth) + lp := logpoller.NewLogPoller(lorm, ethClient, lggr, ht, lpOpts) servicetest.Run(t, lp) configPoller, err := NewConfigPoller(testutils.Context(t), lggr, lp, verifierAddress, feedID) diff --git a/core/services/relay/evm/mercury/mocks/async_deleter.go b/core/services/relay/evm/mercury/mocks/async_deleter.go index 6a43c1a0568..c4a64bbb56c 100644 --- a/core/services/relay/evm/mercury/mocks/async_deleter.go +++ b/core/services/relay/evm/mercury/mocks/async_deleter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -12,11 +12,47 @@ type AsyncDeleter struct { mock.Mock } +type AsyncDeleter_Expecter struct { + mock *mock.Mock +} + +func (_m *AsyncDeleter) EXPECT() *AsyncDeleter_Expecter { + return &AsyncDeleter_Expecter{mock: &_m.Mock} +} + // AsyncDelete provides a mock function with given fields: req func (_m *AsyncDeleter) AsyncDelete(req *pb.TransmitRequest) { _m.Called(req) } +// AsyncDeleter_AsyncDelete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AsyncDelete' +type AsyncDeleter_AsyncDelete_Call struct { + *mock.Call +} + +// AsyncDelete is a helper method to define mock.On call +// - req *pb.TransmitRequest +func (_e *AsyncDeleter_Expecter) AsyncDelete(req interface{}) *AsyncDeleter_AsyncDelete_Call { + return &AsyncDeleter_AsyncDelete_Call{Call: _e.mock.On("AsyncDelete", req)} +} + +func (_c *AsyncDeleter_AsyncDelete_Call) Run(run func(req *pb.TransmitRequest)) *AsyncDeleter_AsyncDelete_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*pb.TransmitRequest)) + }) + return _c +} + +func (_c *AsyncDeleter_AsyncDelete_Call) Return() *AsyncDeleter_AsyncDelete_Call { + _c.Call.Return() + return _c +} + +func (_c *AsyncDeleter_AsyncDelete_Call) RunAndReturn(run func(*pb.TransmitRequest)) *AsyncDeleter_AsyncDelete_Call { + _c.Call.Return(run) + return _c +} + // NewAsyncDeleter creates a new instance of AsyncDeleter. 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 NewAsyncDeleter(t interface { diff --git a/core/services/relay/evm/mercury/mocks/pipeline.go b/core/services/relay/evm/mercury/mocks/pipeline.go index f553ba98509..44be1377aeb 100644 --- a/core/services/relay/evm/mercury/mocks/pipeline.go +++ b/core/services/relay/evm/mercury/mocks/pipeline.go @@ -13,7 +13,7 @@ type MockRunner struct { Err error } -func (m *MockRunner) ExecuteRun(ctx context.Context, spec pipeline.Spec, vars pipeline.Vars, l logger.Logger) (run *pipeline.Run, trrs pipeline.TaskRunResults, err error) { +func (m *MockRunner) ExecuteRun(ctx context.Context, spec pipeline.Spec, vars pipeline.Vars) (run *pipeline.Run, trrs pipeline.TaskRunResults, err error) { return &pipeline.Run{ID: 42}, m.Trrs, m.Err } diff --git a/core/services/relay/evm/mercury/persistence_manager.go b/core/services/relay/evm/mercury/persistence_manager.go index 38576174423..d7f3d8eaa0d 100644 --- a/core/services/relay/evm/mercury/persistence_manager.go +++ b/core/services/relay/evm/mercury/persistence_manager.go @@ -11,7 +11,6 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/wsrpc/pb" - "github.com/smartcontractkit/chainlink/v2/core/utils" ) var ( @@ -90,11 +89,11 @@ func (pm *PersistenceManager) runFlushDeletesLoop() { ctx, cancel := pm.stopCh.Ctx(context.Background()) defer cancel() - ticker := time.NewTicker(utils.WithJitter(pm.flushDeletesFrequency)) + ticker := services.NewTicker(pm.flushDeletesFrequency) + defer ticker.Stop() for { select { case <-ctx.Done(): - ticker.Stop() return case <-ticker.C: queuedReqs := pm.resetDeleteQueue() @@ -114,11 +113,11 @@ func (pm *PersistenceManager) runPruneLoop() { ctx, cancel := pm.stopCh.NewCtx() defer cancel() - ticker := time.NewTicker(utils.WithJitter(pm.pruneFrequency)) + ticker := services.NewTicker(pm.pruneFrequency) + defer ticker.Stop() for { select { case <-ctx.Done(): - ticker.Stop() return case <-ticker.C: func(ctx context.Context) { diff --git a/core/services/relay/evm/mercury/queue.go b/core/services/relay/evm/mercury/queue.go index 1923b091531..8b39be72a68 100644 --- a/core/services/relay/evm/mercury/queue.go +++ b/core/services/relay/evm/mercury/queue.go @@ -17,10 +17,8 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/wsrpc/pb" - "github.com/smartcontractkit/chainlink/v2/core/utils" ) -//go:generate mockery --quiet --name asyncDeleter --output ./mocks/ --case=underscore --structname=AsyncDeleter type asyncDeleter interface { AsyncDelete(req *pb.TransmitRequest) } @@ -143,7 +141,7 @@ func (tq *transmitQueue) IsEmpty() bool { func (tq *transmitQueue) Start(context.Context) error { return tq.StartOnce("TransmitQueue", func() error { - t := time.NewTicker(utils.WithJitter(promInterval)) + t := services.NewTicker(promInterval) wg := new(sync.WaitGroup) chStop := make(chan struct{}) tq.stopMonitor = func() { diff --git a/core/services/relay/evm/mercury/v1/data_source.go b/core/services/relay/evm/mercury/v1/data_source.go index 7f41bd1e36c..5a9a11decaa 100644 --- a/core/services/relay/evm/mercury/v1/data_source.go +++ b/core/services/relay/evm/mercury/v1/data_source.go @@ -45,7 +45,7 @@ var ( const nBlocksObservation int = v1.MaxAllowedBlocks type Runner interface { - ExecuteRun(ctx context.Context, spec pipeline.Spec, vars pipeline.Vars, l logger.Logger) (run *pipeline.Run, trrs pipeline.TaskRunResults, err error) + ExecuteRun(ctx context.Context, spec pipeline.Spec, vars pipeline.Vars) (run *pipeline.Run, trrs pipeline.TaskRunResults, err error) } // Fetcher fetcher data from Mercury server @@ -283,7 +283,7 @@ func (ds *datasource) executeRun(ctx context.Context) (*pipeline.Run, pipeline.T }, }) - run, trrs, err := ds.pipelineRunner.ExecuteRun(ctx, ds.spec, vars, ds.lggr) + run, trrs, err := ds.pipelineRunner.ExecuteRun(ctx, ds.spec, vars) if err != nil { return nil, nil, pkgerrors.Wrapf(err, "error executing run for spec ID %v", ds.spec.ID) } diff --git a/core/services/relay/evm/mercury/v2/data_source.go b/core/services/relay/evm/mercury/v2/data_source.go index 7c2d6424fae..28487ec714e 100644 --- a/core/services/relay/evm/mercury/v2/data_source.go +++ b/core/services/relay/evm/mercury/v2/data_source.go @@ -26,7 +26,7 @@ import ( ) type Runner interface { - ExecuteRun(ctx context.Context, spec pipeline.Spec, vars pipeline.Vars, l logger.Logger) (run *pipeline.Run, trrs pipeline.TaskRunResults, err error) + ExecuteRun(ctx context.Context, spec pipeline.Spec, vars pipeline.Vars) (run *pipeline.Run, trrs pipeline.TaskRunResults, err error) } type LatestReportFetcher interface { @@ -228,7 +228,7 @@ func (ds *datasource) executeRun(ctx context.Context) (*pipeline.Run, pipeline.T }, }) - run, trrs, err := ds.pipelineRunner.ExecuteRun(ctx, ds.spec, vars, ds.lggr) + run, trrs, err := ds.pipelineRunner.ExecuteRun(ctx, ds.spec, vars) if err != nil { return nil, nil, pkgerrors.Wrapf(err, "error executing run for spec ID %v", ds.spec.ID) } diff --git a/core/services/relay/evm/mercury/v3/data_source.go b/core/services/relay/evm/mercury/v3/data_source.go index a751149f378..644f4e775ec 100644 --- a/core/services/relay/evm/mercury/v3/data_source.go +++ b/core/services/relay/evm/mercury/v3/data_source.go @@ -8,17 +8,16 @@ import ( "sync" pkgerrors "github.com/pkg/errors" - ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" "github.com/smartcontractkit/chainlink-common/pkg/types/mercury" v3types "github.com/smartcontractkit/chainlink-common/pkg/types/mercury/v3" v3 "github.com/smartcontractkit/chainlink-data-streams/mercury/v3" - "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/ocrcommon" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" + "github.com/smartcontractkit/chainlink/v2/core/services/pipeline/eautils" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/types" mercurytypes "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/types" mercuryutils "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/utils" @@ -26,8 +25,10 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/utils" ) +const adapterLWBAErrorName = "AdapterLWBAError" + type Runner interface { - ExecuteRun(ctx context.Context, spec pipeline.Spec, vars pipeline.Vars, l logger.Logger) (run *pipeline.Run, trrs pipeline.TaskRunResults, err error) + ExecuteRun(ctx context.Context, spec pipeline.Spec, vars pipeline.Vars) (run *pipeline.Run, trrs pipeline.TaskRunResults, err error) } type LatestReportFetcher interface { @@ -151,6 +152,19 @@ func (ds *datasource) Observe(ctx context.Context, repts ocrtypes.ReportTimestam cancel() if pipelineExecutionErr != nil { + var adapterError *eautils.AdapterError + if errors.As(pipelineExecutionErr, &adapterError) && adapterError.Name == adapterLWBAErrorName { + ocrcommon.MaybeEnqueueEnhancedTelem(ds.jb, ds.chEnhancedTelem, ocrcommon.EnhancedTelemetryMercuryData{ + V3Observation: &obs, + TaskRunResults: trrs, + RepTimestamp: repts, + FeedVersion: mercuryutils.REPORT_V3, + FetchMaxFinalizedTimestamp: fetchMaxFinalizedTimestamp, + IsLinkFeed: isLink, + IsNativeFeed: isNative, + DpInvariantViolationDetected: true, + }) + } return } @@ -267,7 +281,7 @@ func (ds *datasource) executeRun(ctx context.Context) (*pipeline.Run, pipeline.T }, }) - run, trrs, err := ds.pipelineRunner.ExecuteRun(ctx, ds.spec, vars, ds.lggr) + run, trrs, err := ds.pipelineRunner.ExecuteRun(ctx, ds.spec, vars) if err != nil { return nil, nil, pkgerrors.Wrapf(err, "error executing run for spec ID %v", ds.spec.ID) } diff --git a/core/services/relay/evm/mercury/v3/data_source_test.go b/core/services/relay/evm/mercury/v3/data_source_test.go index ffcdc28f81c..a0f624c78d8 100644 --- a/core/services/relay/evm/mercury/v3/data_source_test.go +++ b/core/services/relay/evm/mercury/v3/data_source_test.go @@ -6,16 +6,17 @@ import ( "testing" "github.com/pkg/errors" + ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" "github.com/stretchr/testify/assert" mercurytypes "github.com/smartcontractkit/chainlink-common/pkg/types/mercury" relaymercuryv3 "github.com/smartcontractkit/chainlink-data-streams/mercury/v3" - - ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" - "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/ocrcommon" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" + "github.com/smartcontractkit/chainlink/v2/core/services/pipeline/eautils" mercurymocks "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/mocks" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/utils" reportcodecv3 "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/v3/reportcodec" @@ -72,7 +73,13 @@ func (ms *mockSaver) Save(r *pipeline.Run) { func Test_Datasource(t *testing.T) { orm := &mockORM{} - ds := &datasource{orm: orm, lggr: logger.TestLogger(t)} + jb := job.Job{ + Type: job.Type(pipeline.OffchainReporting2JobType), + OCR2OracleSpec: &job.OCR2OracleSpec{ + CaptureEATelemetry: true, + }, + } + ds := &datasource{orm: orm, lggr: logger.TestLogger(t), jb: jb} ctx := testutils.Context(t) repts := ocrtypes.ReportTimestamp{} @@ -254,8 +261,59 @@ func Test_Datasource(t *testing.T) { Err: nil, } + chEnhancedTelem := make(chan ocrcommon.EnhancedTelemetryMercuryData, 1) + ds.chEnhancedTelem = chEnhancedTelem + _, err := ds.Observe(ctx, repts, false) assert.EqualError(t, err, "Observe failed while parsing run results: some error with ask") + + select { + case <-chEnhancedTelem: + assert.Fail(t, "did not expect to receive telemetry") + default: + } + }) + + t.Run("when run results fails with a bid ask violation", func(t *testing.T) { + t.Cleanup(func() { + runner := &mercurymocks.MockRunner{ + Trrs: goodTrrs, + Err: nil, + } + ds.pipelineRunner = runner + }) + + badTrrs := []pipeline.TaskRunResult{ + { + // benchmark price + Result: pipeline.Result{Value: "122.345"}, + Task: &mercurymocks.MockTask{}, + }, + { + // bid + Result: pipeline.Result{Value: "121.993"}, + Task: &mercurymocks.MockTask{}, + }, + { + // ask + Result: pipeline.Result{Error: &eautils.AdapterError{Name: adapterLWBAErrorName, Message: "bid ask violation"}}, + Task: &mercurymocks.MockTask{}, + }, + } + + ds.pipelineRunner = &mercurymocks.MockRunner{ + Trrs: badTrrs, + Err: nil, + } + + chEnhancedTelem := make(chan ocrcommon.EnhancedTelemetryMercuryData, 1) + ds.chEnhancedTelem = chEnhancedTelem + + _, err := ds.Observe(ctx, repts, false) + assert.EqualError(t, err, "Observe failed while parsing run results: AdapterLWBAError: bid ask violation") + + telem := <-chEnhancedTelem + assert.True(t, telem.DpInvariantViolationDetected) }) t.Run("when run execution succeeded", func(t *testing.T) { diff --git a/core/services/relay/evm/mercury/wsrpc/cache/cache.go b/core/services/relay/evm/mercury/wsrpc/cache/cache.go index adc439e802b..58e04c5d730 100644 --- a/core/services/relay/evm/mercury/wsrpc/cache/cache.go +++ b/core/services/relay/evm/mercury/wsrpc/cache/cache.go @@ -15,7 +15,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/logger" mercuryutils "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/utils" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/wsrpc/pb" - "github.com/smartcontractkit/chainlink/v2/core/utils" ) var ( @@ -346,13 +345,14 @@ func (m *memCache) runloop() { if m.cfg.MaxStaleAge == 0 { return } - t := time.NewTicker(utils.WithJitter(m.cfg.MaxStaleAge)) + t := services.NewTicker(m.cfg.MaxStaleAge) + defer t.Stop() for { select { case <-t.C: m.cleanup() - t.Reset(utils.WithJitter(m.cfg.MaxStaleAge)) + t.Reset() case <-m.chStop: return } diff --git a/core/services/relay/evm/mercury/wsrpc/pb/mercury.pb.go b/core/services/relay/evm/mercury/wsrpc/pb/mercury.pb.go index 0f4045bdf14..a1f0fef069e 100644 --- a/core/services/relay/evm/mercury/wsrpc/pb/mercury.pb.go +++ b/core/services/relay/evm/mercury/wsrpc/pb/mercury.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.33.0 +// protoc-gen-go v1.34.1 // protoc v4.25.1 // source: mercury.proto diff --git a/core/services/relay/evm/method_binding.go b/core/services/relay/evm/method_binding.go index 4f642bdab94..1958b8fd09e 100644 --- a/core/services/relay/evm/method_binding.go +++ b/core/services/relay/evm/method_binding.go @@ -3,12 +3,17 @@ package evm import ( "context" "fmt" + "math/big" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-common/pkg/types/query" + "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives" + "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" evmclient "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" ) @@ -22,12 +27,15 @@ func (e NoContractExistsError) Error() string { } type methodBinding struct { - address common.Address - contractName string - method string - client evmclient.Client - codec commontypes.Codec - bound bool + lggr logger.Logger + ht logpoller.HeadTracker + address common.Address + contractName string + method string + client evmclient.Client + codec commontypes.Codec + bound bool + confirmationsMapping map[primitives.ConfidenceLevel]evmtypes.Confirmations } var _ readBinding = &methodBinding{} @@ -63,12 +71,12 @@ func (m *methodBinding) Unregister(_ context.Context) error { return nil } -func (m *methodBinding) GetLatestValue(ctx context.Context, params, returnValue any) error { +func (m *methodBinding) GetLatestValue(ctx context.Context, confidenceLevel primitives.ConfidenceLevel, params, returnVal any) error { if !m.bound { return fmt.Errorf("%w: method not bound", commontypes.ErrInvalidType) } - data, err := m.codec.Encode(ctx, params, wrapItemType(m.contractName, m.method, true)) + data, err := m.codec.Encode(ctx, params, WrapItemType(m.contractName, m.method, true)) if err != nil { return err } @@ -79,14 +87,44 @@ func (m *methodBinding) GetLatestValue(ctx context.Context, params, returnValue Data: data, } - bytes, err := m.client.CallContract(ctx, callMsg, nil) + block, err := m.blockNumberFromConfidence(ctx, confidenceLevel) + if err != nil { + return err + } + + bytes, err := m.client.CallContract(ctx, callMsg, block) if err != nil { return fmt.Errorf("%w: %w", commontypes.ErrInternal, err) } - return m.codec.Decode(ctx, bytes, returnValue, wrapItemType(m.contractName, m.method, false)) + return m.codec.Decode(ctx, bytes, returnVal, WrapItemType(m.contractName, m.method, false)) } func (m *methodBinding) QueryKey(_ context.Context, _ query.KeyFilter, _ query.LimitAndSort, _ any) ([]commontypes.Sequence, error) { return nil, nil } + +func (m *methodBinding) blockNumberFromConfidence(ctx context.Context, confidenceLevel primitives.ConfidenceLevel) (*big.Int, error) { + confirmations, err := confidenceToConfirmations(m.confirmationsMapping, confidenceLevel) + if err != nil { + err = fmt.Errorf("%w for contract: %s, method: %s", err, m.contractName, m.method) + if confidenceLevel == primitives.Unconfirmed { + m.lggr.Errorf("%v, now falling back to default contract call behaviour that calls latest state", err) + return nil, nil + } + return nil, err + } + + latest, finalized, err := m.ht.LatestAndFinalizedBlock(ctx) + if err != nil { + return nil, err + } + + if confirmations == evmtypes.Finalized { + return big.NewInt(finalized.Number), nil + } else if confirmations == evmtypes.Unconfirmed { + return big.NewInt(latest.BlockNumber()), nil + } + + return nil, fmt.Errorf("unknown evm confirmations: %v for contract: %s, method: %s", confirmations, m.contractName, m.method) +} diff --git a/core/services/relay/evm/mocks/codec.go b/core/services/relay/evm/mocks/codec.go new file mode 100644 index 00000000000..4369760e0dc --- /dev/null +++ b/core/services/relay/evm/mocks/codec.go @@ -0,0 +1,261 @@ +// Code generated by mockery v2.43.2. DO NOT EDIT. + +package mocks + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" +) + +// Codec is an autogenerated mock type for the Codec type +type Codec struct { + mock.Mock +} + +type Codec_Expecter struct { + mock *mock.Mock +} + +func (_m *Codec) EXPECT() *Codec_Expecter { + return &Codec_Expecter{mock: &_m.Mock} +} + +// Decode provides a mock function with given fields: ctx, raw, into, itemType +func (_m *Codec) Decode(ctx context.Context, raw []byte, into interface{}, itemType string) error { + ret := _m.Called(ctx, raw, into, itemType) + + if len(ret) == 0 { + panic("no return value specified for Decode") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, []byte, interface{}, string) error); ok { + r0 = rf(ctx, raw, into, itemType) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// Codec_Decode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Decode' +type Codec_Decode_Call struct { + *mock.Call +} + +// Decode is a helper method to define mock.On call +// - ctx context.Context +// - raw []byte +// - into interface{} +// - itemType string +func (_e *Codec_Expecter) Decode(ctx interface{}, raw interface{}, into interface{}, itemType interface{}) *Codec_Decode_Call { + return &Codec_Decode_Call{Call: _e.mock.On("Decode", ctx, raw, into, itemType)} +} + +func (_c *Codec_Decode_Call) Run(run func(ctx context.Context, raw []byte, into interface{}, itemType string)) *Codec_Decode_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]byte), args[2].(interface{}), args[3].(string)) + }) + return _c +} + +func (_c *Codec_Decode_Call) Return(_a0 error) *Codec_Decode_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Codec_Decode_Call) RunAndReturn(run func(context.Context, []byte, interface{}, string) error) *Codec_Decode_Call { + _c.Call.Return(run) + return _c +} + +// Encode provides a mock function with given fields: ctx, item, itemType +func (_m *Codec) Encode(ctx context.Context, item interface{}, itemType string) ([]byte, error) { + ret := _m.Called(ctx, item, itemType) + + if len(ret) == 0 { + panic("no return value specified for Encode") + } + + var r0 []byte + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, interface{}, string) ([]byte, error)); ok { + return rf(ctx, item, itemType) + } + if rf, ok := ret.Get(0).(func(context.Context, interface{}, string) []byte); ok { + r0 = rf(ctx, item, itemType) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, interface{}, string) error); ok { + r1 = rf(ctx, item, itemType) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Codec_Encode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Encode' +type Codec_Encode_Call struct { + *mock.Call +} + +// Encode is a helper method to define mock.On call +// - ctx context.Context +// - item interface{} +// - itemType string +func (_e *Codec_Expecter) Encode(ctx interface{}, item interface{}, itemType interface{}) *Codec_Encode_Call { + return &Codec_Encode_Call{Call: _e.mock.On("Encode", ctx, item, itemType)} +} + +func (_c *Codec_Encode_Call) Run(run func(ctx context.Context, item interface{}, itemType string)) *Codec_Encode_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(interface{}), args[2].(string)) + }) + return _c +} + +func (_c *Codec_Encode_Call) Return(_a0 []byte, _a1 error) *Codec_Encode_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Codec_Encode_Call) RunAndReturn(run func(context.Context, interface{}, string) ([]byte, error)) *Codec_Encode_Call { + _c.Call.Return(run) + return _c +} + +// GetMaxDecodingSize provides a mock function with given fields: ctx, n, itemType +func (_m *Codec) GetMaxDecodingSize(ctx context.Context, n int, itemType string) (int, error) { + ret := _m.Called(ctx, n, itemType) + + if len(ret) == 0 { + panic("no return value specified for GetMaxDecodingSize") + } + + var r0 int + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int, string) (int, error)); ok { + return rf(ctx, n, itemType) + } + if rf, ok := ret.Get(0).(func(context.Context, int, string) int); ok { + r0 = rf(ctx, n, itemType) + } else { + r0 = ret.Get(0).(int) + } + + if rf, ok := ret.Get(1).(func(context.Context, int, string) error); ok { + r1 = rf(ctx, n, itemType) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Codec_GetMaxDecodingSize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMaxDecodingSize' +type Codec_GetMaxDecodingSize_Call struct { + *mock.Call +} + +// GetMaxDecodingSize is a helper method to define mock.On call +// - ctx context.Context +// - n int +// - itemType string +func (_e *Codec_Expecter) GetMaxDecodingSize(ctx interface{}, n interface{}, itemType interface{}) *Codec_GetMaxDecodingSize_Call { + return &Codec_GetMaxDecodingSize_Call{Call: _e.mock.On("GetMaxDecodingSize", ctx, n, itemType)} +} + +func (_c *Codec_GetMaxDecodingSize_Call) Run(run func(ctx context.Context, n int, itemType string)) *Codec_GetMaxDecodingSize_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int), args[2].(string)) + }) + return _c +} + +func (_c *Codec_GetMaxDecodingSize_Call) Return(_a0 int, _a1 error) *Codec_GetMaxDecodingSize_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Codec_GetMaxDecodingSize_Call) RunAndReturn(run func(context.Context, int, string) (int, error)) *Codec_GetMaxDecodingSize_Call { + _c.Call.Return(run) + return _c +} + +// GetMaxEncodingSize provides a mock function with given fields: ctx, n, itemType +func (_m *Codec) GetMaxEncodingSize(ctx context.Context, n int, itemType string) (int, error) { + ret := _m.Called(ctx, n, itemType) + + if len(ret) == 0 { + panic("no return value specified for GetMaxEncodingSize") + } + + var r0 int + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int, string) (int, error)); ok { + return rf(ctx, n, itemType) + } + if rf, ok := ret.Get(0).(func(context.Context, int, string) int); ok { + r0 = rf(ctx, n, itemType) + } else { + r0 = ret.Get(0).(int) + } + + if rf, ok := ret.Get(1).(func(context.Context, int, string) error); ok { + r1 = rf(ctx, n, itemType) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Codec_GetMaxEncodingSize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMaxEncodingSize' +type Codec_GetMaxEncodingSize_Call struct { + *mock.Call +} + +// GetMaxEncodingSize is a helper method to define mock.On call +// - ctx context.Context +// - n int +// - itemType string +func (_e *Codec_Expecter) GetMaxEncodingSize(ctx interface{}, n interface{}, itemType interface{}) *Codec_GetMaxEncodingSize_Call { + return &Codec_GetMaxEncodingSize_Call{Call: _e.mock.On("GetMaxEncodingSize", ctx, n, itemType)} +} + +func (_c *Codec_GetMaxEncodingSize_Call) Run(run func(ctx context.Context, n int, itemType string)) *Codec_GetMaxEncodingSize_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int), args[2].(string)) + }) + return _c +} + +func (_c *Codec_GetMaxEncodingSize_Call) Return(_a0 int, _a1 error) *Codec_GetMaxEncodingSize_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Codec_GetMaxEncodingSize_Call) RunAndReturn(run func(context.Context, int, string) (int, error)) *Codec_GetMaxEncodingSize_Call { + _c.Call.Return(run) + return _c +} + +// NewCodec creates a new instance of Codec. 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 NewCodec(t interface { + mock.TestingT + Cleanup(func()) +}) *Codec { + mock := &Codec{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/core/services/relay/evm/mocks/loop_relay_adapter.go b/core/services/relay/evm/mocks/loop_relay_adapter.go index 273589709c5..50b1dd5f397 100644 --- a/core/services/relay/evm/mocks/loop_relay_adapter.go +++ b/core/services/relay/evm/mocks/loop_relay_adapter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -18,6 +18,14 @@ type LoopRelayAdapter struct { mock.Mock } +type LoopRelayAdapter_Expecter struct { + mock *mock.Mock +} + +func (_m *LoopRelayAdapter) EXPECT() *LoopRelayAdapter_Expecter { + return &LoopRelayAdapter_Expecter{mock: &_m.Mock} +} + // Chain provides a mock function with given fields: func (_m *LoopRelayAdapter) Chain() legacyevm.Chain { ret := _m.Called() @@ -38,6 +46,33 @@ func (_m *LoopRelayAdapter) Chain() legacyevm.Chain { return r0 } +// LoopRelayAdapter_Chain_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Chain' +type LoopRelayAdapter_Chain_Call struct { + *mock.Call +} + +// Chain is a helper method to define mock.On call +func (_e *LoopRelayAdapter_Expecter) Chain() *LoopRelayAdapter_Chain_Call { + return &LoopRelayAdapter_Chain_Call{Call: _e.mock.On("Chain")} +} + +func (_c *LoopRelayAdapter_Chain_Call) Run(run func()) *LoopRelayAdapter_Chain_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *LoopRelayAdapter_Chain_Call) Return(_a0 legacyevm.Chain) *LoopRelayAdapter_Chain_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LoopRelayAdapter_Chain_Call) RunAndReturn(run func() legacyevm.Chain) *LoopRelayAdapter_Chain_Call { + _c.Call.Return(run) + return _c +} + // Close provides a mock function with given fields: func (_m *LoopRelayAdapter) Close() error { ret := _m.Called() @@ -56,6 +91,33 @@ func (_m *LoopRelayAdapter) Close() error { return r0 } +// LoopRelayAdapter_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type LoopRelayAdapter_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *LoopRelayAdapter_Expecter) Close() *LoopRelayAdapter_Close_Call { + return &LoopRelayAdapter_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *LoopRelayAdapter_Close_Call) Run(run func()) *LoopRelayAdapter_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *LoopRelayAdapter_Close_Call) Return(_a0 error) *LoopRelayAdapter_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LoopRelayAdapter_Close_Call) RunAndReturn(run func() error) *LoopRelayAdapter_Close_Call { + _c.Call.Return(run) + return _c +} + // GetChainStatus provides a mock function with given fields: ctx func (_m *LoopRelayAdapter) GetChainStatus(ctx context.Context) (types.ChainStatus, error) { ret := _m.Called(ctx) @@ -84,6 +146,34 @@ func (_m *LoopRelayAdapter) GetChainStatus(ctx context.Context) (types.ChainStat return r0, r1 } +// LoopRelayAdapter_GetChainStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetChainStatus' +type LoopRelayAdapter_GetChainStatus_Call struct { + *mock.Call +} + +// GetChainStatus is a helper method to define mock.On call +// - ctx context.Context +func (_e *LoopRelayAdapter_Expecter) GetChainStatus(ctx interface{}) *LoopRelayAdapter_GetChainStatus_Call { + return &LoopRelayAdapter_GetChainStatus_Call{Call: _e.mock.On("GetChainStatus", ctx)} +} + +func (_c *LoopRelayAdapter_GetChainStatus_Call) Run(run func(ctx context.Context)) *LoopRelayAdapter_GetChainStatus_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *LoopRelayAdapter_GetChainStatus_Call) Return(_a0 types.ChainStatus, _a1 error) *LoopRelayAdapter_GetChainStatus_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LoopRelayAdapter_GetChainStatus_Call) RunAndReturn(run func(context.Context) (types.ChainStatus, error)) *LoopRelayAdapter_GetChainStatus_Call { + _c.Call.Return(run) + return _c +} + // HealthReport provides a mock function with given fields: func (_m *LoopRelayAdapter) HealthReport() map[string]error { ret := _m.Called() @@ -104,6 +194,33 @@ func (_m *LoopRelayAdapter) HealthReport() map[string]error { return r0 } +// LoopRelayAdapter_HealthReport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HealthReport' +type LoopRelayAdapter_HealthReport_Call struct { + *mock.Call +} + +// HealthReport is a helper method to define mock.On call +func (_e *LoopRelayAdapter_Expecter) HealthReport() *LoopRelayAdapter_HealthReport_Call { + return &LoopRelayAdapter_HealthReport_Call{Call: _e.mock.On("HealthReport")} +} + +func (_c *LoopRelayAdapter_HealthReport_Call) Run(run func()) *LoopRelayAdapter_HealthReport_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *LoopRelayAdapter_HealthReport_Call) Return(_a0 map[string]error) *LoopRelayAdapter_HealthReport_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LoopRelayAdapter_HealthReport_Call) RunAndReturn(run func() map[string]error) *LoopRelayAdapter_HealthReport_Call { + _c.Call.Return(run) + return _c +} + // ListNodeStatuses provides a mock function with given fields: ctx, pageSize, pageToken func (_m *LoopRelayAdapter) ListNodeStatuses(ctx context.Context, pageSize int32, pageToken string) ([]types.NodeStatus, string, int, error) { ret := _m.Called(ctx, pageSize, pageToken) @@ -148,6 +265,36 @@ func (_m *LoopRelayAdapter) ListNodeStatuses(ctx context.Context, pageSize int32 return r0, r1, r2, r3 } +// LoopRelayAdapter_ListNodeStatuses_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListNodeStatuses' +type LoopRelayAdapter_ListNodeStatuses_Call struct { + *mock.Call +} + +// ListNodeStatuses is a helper method to define mock.On call +// - ctx context.Context +// - pageSize int32 +// - pageToken string +func (_e *LoopRelayAdapter_Expecter) ListNodeStatuses(ctx interface{}, pageSize interface{}, pageToken interface{}) *LoopRelayAdapter_ListNodeStatuses_Call { + return &LoopRelayAdapter_ListNodeStatuses_Call{Call: _e.mock.On("ListNodeStatuses", ctx, pageSize, pageToken)} +} + +func (_c *LoopRelayAdapter_ListNodeStatuses_Call) Run(run func(ctx context.Context, pageSize int32, pageToken string)) *LoopRelayAdapter_ListNodeStatuses_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int32), args[2].(string)) + }) + return _c +} + +func (_c *LoopRelayAdapter_ListNodeStatuses_Call) Return(stats []types.NodeStatus, nextPageToken string, total int, err error) *LoopRelayAdapter_ListNodeStatuses_Call { + _c.Call.Return(stats, nextPageToken, total, err) + return _c +} + +func (_c *LoopRelayAdapter_ListNodeStatuses_Call) RunAndReturn(run func(context.Context, int32, string) ([]types.NodeStatus, string, int, error)) *LoopRelayAdapter_ListNodeStatuses_Call { + _c.Call.Return(run) + return _c +} + // Name provides a mock function with given fields: func (_m *LoopRelayAdapter) Name() string { ret := _m.Called() @@ -166,6 +313,92 @@ func (_m *LoopRelayAdapter) Name() string { return r0 } +// LoopRelayAdapter_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type LoopRelayAdapter_Name_Call struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *LoopRelayAdapter_Expecter) Name() *LoopRelayAdapter_Name_Call { + return &LoopRelayAdapter_Name_Call{Call: _e.mock.On("Name")} +} + +func (_c *LoopRelayAdapter_Name_Call) Run(run func()) *LoopRelayAdapter_Name_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *LoopRelayAdapter_Name_Call) Return(_a0 string) *LoopRelayAdapter_Name_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LoopRelayAdapter_Name_Call) RunAndReturn(run func() string) *LoopRelayAdapter_Name_Call { + _c.Call.Return(run) + return _c +} + +// NewChainWriter provides a mock function with given fields: ctx, chainWriterConfig +func (_m *LoopRelayAdapter) NewChainWriter(ctx context.Context, chainWriterConfig []byte) (types.ChainWriter, error) { + ret := _m.Called(ctx, chainWriterConfig) + + if len(ret) == 0 { + panic("no return value specified for NewChainWriter") + } + + var r0 types.ChainWriter + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, []byte) (types.ChainWriter, error)); ok { + return rf(ctx, chainWriterConfig) + } + if rf, ok := ret.Get(0).(func(context.Context, []byte) types.ChainWriter); ok { + r0 = rf(ctx, chainWriterConfig) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(types.ChainWriter) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, []byte) error); ok { + r1 = rf(ctx, chainWriterConfig) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// LoopRelayAdapter_NewChainWriter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewChainWriter' +type LoopRelayAdapter_NewChainWriter_Call struct { + *mock.Call +} + +// NewChainWriter is a helper method to define mock.On call +// - ctx context.Context +// - chainWriterConfig []byte +func (_e *LoopRelayAdapter_Expecter) NewChainWriter(ctx interface{}, chainWriterConfig interface{}) *LoopRelayAdapter_NewChainWriter_Call { + return &LoopRelayAdapter_NewChainWriter_Call{Call: _e.mock.On("NewChainWriter", ctx, chainWriterConfig)} +} + +func (_c *LoopRelayAdapter_NewChainWriter_Call) Run(run func(ctx context.Context, chainWriterConfig []byte)) *LoopRelayAdapter_NewChainWriter_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]byte)) + }) + return _c +} + +func (_c *LoopRelayAdapter_NewChainWriter_Call) Return(_a0 types.ChainWriter, _a1 error) *LoopRelayAdapter_NewChainWriter_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LoopRelayAdapter_NewChainWriter_Call) RunAndReturn(run func(context.Context, []byte) (types.ChainWriter, error)) *LoopRelayAdapter_NewChainWriter_Call { + _c.Call.Return(run) + return _c +} + // NewConfigProvider provides a mock function with given fields: _a0, _a1 func (_m *LoopRelayAdapter) NewConfigProvider(_a0 context.Context, _a1 types.RelayArgs) (types.ConfigProvider, error) { ret := _m.Called(_a0, _a1) @@ -196,6 +429,35 @@ func (_m *LoopRelayAdapter) NewConfigProvider(_a0 context.Context, _a1 types.Rel return r0, r1 } +// LoopRelayAdapter_NewConfigProvider_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewConfigProvider' +type LoopRelayAdapter_NewConfigProvider_Call struct { + *mock.Call +} + +// NewConfigProvider is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 types.RelayArgs +func (_e *LoopRelayAdapter_Expecter) NewConfigProvider(_a0 interface{}, _a1 interface{}) *LoopRelayAdapter_NewConfigProvider_Call { + return &LoopRelayAdapter_NewConfigProvider_Call{Call: _e.mock.On("NewConfigProvider", _a0, _a1)} +} + +func (_c *LoopRelayAdapter_NewConfigProvider_Call) Run(run func(_a0 context.Context, _a1 types.RelayArgs)) *LoopRelayAdapter_NewConfigProvider_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.RelayArgs)) + }) + return _c +} + +func (_c *LoopRelayAdapter_NewConfigProvider_Call) Return(_a0 types.ConfigProvider, _a1 error) *LoopRelayAdapter_NewConfigProvider_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LoopRelayAdapter_NewConfigProvider_Call) RunAndReturn(run func(context.Context, types.RelayArgs) (types.ConfigProvider, error)) *LoopRelayAdapter_NewConfigProvider_Call { + _c.Call.Return(run) + return _c +} + // NewContractReader provides a mock function with given fields: ctx, contractReaderConfig func (_m *LoopRelayAdapter) NewContractReader(ctx context.Context, contractReaderConfig []byte) (types.ChainReader, error) { ret := _m.Called(ctx, contractReaderConfig) @@ -226,6 +488,35 @@ func (_m *LoopRelayAdapter) NewContractReader(ctx context.Context, contractReade return r0, r1 } +// LoopRelayAdapter_NewContractReader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewContractReader' +type LoopRelayAdapter_NewContractReader_Call struct { + *mock.Call +} + +// NewContractReader is a helper method to define mock.On call +// - ctx context.Context +// - contractReaderConfig []byte +func (_e *LoopRelayAdapter_Expecter) NewContractReader(ctx interface{}, contractReaderConfig interface{}) *LoopRelayAdapter_NewContractReader_Call { + return &LoopRelayAdapter_NewContractReader_Call{Call: _e.mock.On("NewContractReader", ctx, contractReaderConfig)} +} + +func (_c *LoopRelayAdapter_NewContractReader_Call) Run(run func(ctx context.Context, contractReaderConfig []byte)) *LoopRelayAdapter_NewContractReader_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]byte)) + }) + return _c +} + +func (_c *LoopRelayAdapter_NewContractReader_Call) Return(_a0 types.ChainReader, _a1 error) *LoopRelayAdapter_NewContractReader_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LoopRelayAdapter_NewContractReader_Call) RunAndReturn(run func(context.Context, []byte) (types.ChainReader, error)) *LoopRelayAdapter_NewContractReader_Call { + _c.Call.Return(run) + return _c +} + // NewLLOProvider provides a mock function with given fields: _a0, _a1, _a2 func (_m *LoopRelayAdapter) NewLLOProvider(_a0 context.Context, _a1 types.RelayArgs, _a2 types.PluginArgs) (types.LLOProvider, error) { ret := _m.Called(_a0, _a1, _a2) @@ -256,6 +547,36 @@ func (_m *LoopRelayAdapter) NewLLOProvider(_a0 context.Context, _a1 types.RelayA return r0, r1 } +// LoopRelayAdapter_NewLLOProvider_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewLLOProvider' +type LoopRelayAdapter_NewLLOProvider_Call struct { + *mock.Call +} + +// NewLLOProvider is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 types.RelayArgs +// - _a2 types.PluginArgs +func (_e *LoopRelayAdapter_Expecter) NewLLOProvider(_a0 interface{}, _a1 interface{}, _a2 interface{}) *LoopRelayAdapter_NewLLOProvider_Call { + return &LoopRelayAdapter_NewLLOProvider_Call{Call: _e.mock.On("NewLLOProvider", _a0, _a1, _a2)} +} + +func (_c *LoopRelayAdapter_NewLLOProvider_Call) Run(run func(_a0 context.Context, _a1 types.RelayArgs, _a2 types.PluginArgs)) *LoopRelayAdapter_NewLLOProvider_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.RelayArgs), args[2].(types.PluginArgs)) + }) + return _c +} + +func (_c *LoopRelayAdapter_NewLLOProvider_Call) Return(_a0 types.LLOProvider, _a1 error) *LoopRelayAdapter_NewLLOProvider_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LoopRelayAdapter_NewLLOProvider_Call) RunAndReturn(run func(context.Context, types.RelayArgs, types.PluginArgs) (types.LLOProvider, error)) *LoopRelayAdapter_NewLLOProvider_Call { + _c.Call.Return(run) + return _c +} + // NewPluginProvider provides a mock function with given fields: _a0, _a1, _a2 func (_m *LoopRelayAdapter) NewPluginProvider(_a0 context.Context, _a1 types.RelayArgs, _a2 types.PluginArgs) (types.PluginProvider, error) { ret := _m.Called(_a0, _a1, _a2) @@ -286,6 +607,36 @@ func (_m *LoopRelayAdapter) NewPluginProvider(_a0 context.Context, _a1 types.Rel return r0, r1 } +// LoopRelayAdapter_NewPluginProvider_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NewPluginProvider' +type LoopRelayAdapter_NewPluginProvider_Call struct { + *mock.Call +} + +// NewPluginProvider is a helper method to define mock.On call +// - _a0 context.Context +// - _a1 types.RelayArgs +// - _a2 types.PluginArgs +func (_e *LoopRelayAdapter_Expecter) NewPluginProvider(_a0 interface{}, _a1 interface{}, _a2 interface{}) *LoopRelayAdapter_NewPluginProvider_Call { + return &LoopRelayAdapter_NewPluginProvider_Call{Call: _e.mock.On("NewPluginProvider", _a0, _a1, _a2)} +} + +func (_c *LoopRelayAdapter_NewPluginProvider_Call) Run(run func(_a0 context.Context, _a1 types.RelayArgs, _a2 types.PluginArgs)) *LoopRelayAdapter_NewPluginProvider_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(types.RelayArgs), args[2].(types.PluginArgs)) + }) + return _c +} + +func (_c *LoopRelayAdapter_NewPluginProvider_Call) Return(_a0 types.PluginProvider, _a1 error) *LoopRelayAdapter_NewPluginProvider_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LoopRelayAdapter_NewPluginProvider_Call) RunAndReturn(run func(context.Context, types.RelayArgs, types.PluginArgs) (types.PluginProvider, error)) *LoopRelayAdapter_NewPluginProvider_Call { + _c.Call.Return(run) + return _c +} + // Ready provides a mock function with given fields: func (_m *LoopRelayAdapter) Ready() error { ret := _m.Called() @@ -304,6 +655,33 @@ func (_m *LoopRelayAdapter) Ready() error { return r0 } +// LoopRelayAdapter_Ready_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ready' +type LoopRelayAdapter_Ready_Call struct { + *mock.Call +} + +// Ready is a helper method to define mock.On call +func (_e *LoopRelayAdapter_Expecter) Ready() *LoopRelayAdapter_Ready_Call { + return &LoopRelayAdapter_Ready_Call{Call: _e.mock.On("Ready")} +} + +func (_c *LoopRelayAdapter_Ready_Call) Run(run func()) *LoopRelayAdapter_Ready_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *LoopRelayAdapter_Ready_Call) Return(_a0 error) *LoopRelayAdapter_Ready_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LoopRelayAdapter_Ready_Call) RunAndReturn(run func() error) *LoopRelayAdapter_Ready_Call { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *LoopRelayAdapter) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -322,6 +700,34 @@ func (_m *LoopRelayAdapter) Start(_a0 context.Context) error { return r0 } +// LoopRelayAdapter_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type LoopRelayAdapter_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *LoopRelayAdapter_Expecter) Start(_a0 interface{}) *LoopRelayAdapter_Start_Call { + return &LoopRelayAdapter_Start_Call{Call: _e.mock.On("Start", _a0)} +} + +func (_c *LoopRelayAdapter_Start_Call) Run(run func(_a0 context.Context)) *LoopRelayAdapter_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *LoopRelayAdapter_Start_Call) Return(_a0 error) *LoopRelayAdapter_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LoopRelayAdapter_Start_Call) RunAndReturn(run func(context.Context) error) *LoopRelayAdapter_Start_Call { + _c.Call.Return(run) + return _c +} + // Transact provides a mock function with given fields: ctx, from, to, amount, balanceCheck func (_m *LoopRelayAdapter) Transact(ctx context.Context, from string, to string, amount *big.Int, balanceCheck bool) error { ret := _m.Called(ctx, from, to, amount, balanceCheck) @@ -340,6 +746,38 @@ func (_m *LoopRelayAdapter) Transact(ctx context.Context, from string, to string return r0 } +// LoopRelayAdapter_Transact_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Transact' +type LoopRelayAdapter_Transact_Call struct { + *mock.Call +} + +// Transact is a helper method to define mock.On call +// - ctx context.Context +// - from string +// - to string +// - amount *big.Int +// - balanceCheck bool +func (_e *LoopRelayAdapter_Expecter) Transact(ctx interface{}, from interface{}, to interface{}, amount interface{}, balanceCheck interface{}) *LoopRelayAdapter_Transact_Call { + return &LoopRelayAdapter_Transact_Call{Call: _e.mock.On("Transact", ctx, from, to, amount, balanceCheck)} +} + +func (_c *LoopRelayAdapter_Transact_Call) Run(run func(ctx context.Context, from string, to string, amount *big.Int, balanceCheck bool)) *LoopRelayAdapter_Transact_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(*big.Int), args[4].(bool)) + }) + return _c +} + +func (_c *LoopRelayAdapter_Transact_Call) Return(_a0 error) *LoopRelayAdapter_Transact_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LoopRelayAdapter_Transact_Call) RunAndReturn(run func(context.Context, string, string, *big.Int, bool) error) *LoopRelayAdapter_Transact_Call { + _c.Call.Return(run) + return _c +} + // NewLoopRelayAdapter creates a new instance of LoopRelayAdapter. 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 NewLoopRelayAdapter(t interface { diff --git a/core/services/relay/evm/mocks/request_round_db.go b/core/services/relay/evm/mocks/request_round_db.go index d1aa15a3b5b..587edfa34a5 100644 --- a/core/services/relay/evm/mocks/request_round_db.go +++ b/core/services/relay/evm/mocks/request_round_db.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -18,6 +18,14 @@ type RequestRoundDB struct { mock.Mock } +type RequestRoundDB_Expecter struct { + mock *mock.Mock +} + +func (_m *RequestRoundDB) EXPECT() *RequestRoundDB_Expecter { + return &RequestRoundDB_Expecter{mock: &_m.Mock} +} + // LoadLatestRoundRequested provides a mock function with given fields: _a0 func (_m *RequestRoundDB) LoadLatestRoundRequested(_a0 context.Context) (ocr2aggregator.OCR2AggregatorRoundRequested, error) { ret := _m.Called(_a0) @@ -46,6 +54,34 @@ func (_m *RequestRoundDB) LoadLatestRoundRequested(_a0 context.Context) (ocr2agg return r0, r1 } +// RequestRoundDB_LoadLatestRoundRequested_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadLatestRoundRequested' +type RequestRoundDB_LoadLatestRoundRequested_Call struct { + *mock.Call +} + +// LoadLatestRoundRequested is a helper method to define mock.On call +// - _a0 context.Context +func (_e *RequestRoundDB_Expecter) LoadLatestRoundRequested(_a0 interface{}) *RequestRoundDB_LoadLatestRoundRequested_Call { + return &RequestRoundDB_LoadLatestRoundRequested_Call{Call: _e.mock.On("LoadLatestRoundRequested", _a0)} +} + +func (_c *RequestRoundDB_LoadLatestRoundRequested_Call) Run(run func(_a0 context.Context)) *RequestRoundDB_LoadLatestRoundRequested_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *RequestRoundDB_LoadLatestRoundRequested_Call) Return(rr ocr2aggregator.OCR2AggregatorRoundRequested, err error) *RequestRoundDB_LoadLatestRoundRequested_Call { + _c.Call.Return(rr, err) + return _c +} + +func (_c *RequestRoundDB_LoadLatestRoundRequested_Call) RunAndReturn(run func(context.Context) (ocr2aggregator.OCR2AggregatorRoundRequested, error)) *RequestRoundDB_LoadLatestRoundRequested_Call { + _c.Call.Return(run) + return _c +} + // SaveLatestRoundRequested provides a mock function with given fields: ctx, rr func (_m *RequestRoundDB) SaveLatestRoundRequested(ctx context.Context, rr ocr2aggregator.OCR2AggregatorRoundRequested) error { ret := _m.Called(ctx, rr) @@ -64,6 +100,35 @@ func (_m *RequestRoundDB) SaveLatestRoundRequested(ctx context.Context, rr ocr2a return r0 } +// RequestRoundDB_SaveLatestRoundRequested_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveLatestRoundRequested' +type RequestRoundDB_SaveLatestRoundRequested_Call struct { + *mock.Call +} + +// SaveLatestRoundRequested is a helper method to define mock.On call +// - ctx context.Context +// - rr ocr2aggregator.OCR2AggregatorRoundRequested +func (_e *RequestRoundDB_Expecter) SaveLatestRoundRequested(ctx interface{}, rr interface{}) *RequestRoundDB_SaveLatestRoundRequested_Call { + return &RequestRoundDB_SaveLatestRoundRequested_Call{Call: _e.mock.On("SaveLatestRoundRequested", ctx, rr)} +} + +func (_c *RequestRoundDB_SaveLatestRoundRequested_Call) Run(run func(ctx context.Context, rr ocr2aggregator.OCR2AggregatorRoundRequested)) *RequestRoundDB_SaveLatestRoundRequested_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(ocr2aggregator.OCR2AggregatorRoundRequested)) + }) + return _c +} + +func (_c *RequestRoundDB_SaveLatestRoundRequested_Call) Return(_a0 error) *RequestRoundDB_SaveLatestRoundRequested_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *RequestRoundDB_SaveLatestRoundRequested_Call) RunAndReturn(run func(context.Context, ocr2aggregator.OCR2AggregatorRoundRequested) error) *RequestRoundDB_SaveLatestRoundRequested_Call { + _c.Call.Return(run) + return _c +} + // WithDataSource provides a mock function with given fields: _a0 func (_m *RequestRoundDB) WithDataSource(_a0 sqlutil.DataSource) evm.RequestRoundDB { ret := _m.Called(_a0) @@ -84,6 +149,34 @@ func (_m *RequestRoundDB) WithDataSource(_a0 sqlutil.DataSource) evm.RequestRoun return r0 } +// RequestRoundDB_WithDataSource_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithDataSource' +type RequestRoundDB_WithDataSource_Call struct { + *mock.Call +} + +// WithDataSource is a helper method to define mock.On call +// - _a0 sqlutil.DataSource +func (_e *RequestRoundDB_Expecter) WithDataSource(_a0 interface{}) *RequestRoundDB_WithDataSource_Call { + return &RequestRoundDB_WithDataSource_Call{Call: _e.mock.On("WithDataSource", _a0)} +} + +func (_c *RequestRoundDB_WithDataSource_Call) Run(run func(_a0 sqlutil.DataSource)) *RequestRoundDB_WithDataSource_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(sqlutil.DataSource)) + }) + return _c +} + +func (_c *RequestRoundDB_WithDataSource_Call) Return(_a0 evm.RequestRoundDB) *RequestRoundDB_WithDataSource_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *RequestRoundDB_WithDataSource_Call) RunAndReturn(run func(sqlutil.DataSource) evm.RequestRoundDB) *RequestRoundDB_WithDataSource_Call { + _c.Call.Return(run) + return _c +} + // NewRequestRoundDB creates a new instance of RequestRoundDB. 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 NewRequestRoundDB(t interface { diff --git a/core/services/relay/evm/ocr2keeper.go b/core/services/relay/evm/ocr2keeper.go index 709ee97221e..b2d19c11702 100644 --- a/core/services/relay/evm/ocr2keeper.go +++ b/core/services/relay/evm/ocr2keeper.go @@ -90,7 +90,7 @@ func (r *ocr2keeperRelayer) NewOCR2KeeperProvider(rargs commontypes.RelayArgs, p } gasLimit := cfgWatcher.chain.Config().EVM().OCR2().Automation().GasLimit() - contractTransmitter, err := newOnChainContractTransmitter(ctx, r.lggr, rargs, pargs.TransmitterID, r.ethKeystore, cfgWatcher, configTransmitterOpts{pluginGasLimit: &gasLimit}, OCR2AggregatorTransmissionContractABI, 0) + contractTransmitter, err := newOnChainContractTransmitter(ctx, r.lggr, rargs, r.ethKeystore, cfgWatcher, configTransmitterOpts{pluginGasLimit: &gasLimit}, OCR2AggregatorTransmissionContractABI) if err != nil { return nil, err } diff --git a/core/services/relay/evm/ocr2vrf.go b/core/services/relay/evm/ocr2vrf.go deleted file mode 100644 index f8cf7527f2c..00000000000 --- a/core/services/relay/evm/ocr2vrf.go +++ /dev/null @@ -1,178 +0,0 @@ -package evm - -import ( - "context" - "encoding/json" - "fmt" - - "github.com/ethereum/go-ethereum/common" - "github.com/smartcontractkit/libocr/offchainreporting2plus/chains/evmutil" - ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" - - commontypes "github.com/smartcontractkit/chainlink-common/pkg/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/ocr2/plugins/dkg/config" - "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" -) - -// DKGProvider provides all components needed for a DKG plugin. -type DKGProvider interface { - commontypes.Plugin -} - -// OCR2VRFProvider provides all components needed for a OCR2VRF plugin. -type OCR2VRFProvider interface { - commontypes.Plugin -} - -// OCR2VRFRelayer contains the relayer and instantiating functions for OCR2VRF providers. -type OCR2VRFRelayer interface { - NewDKGProvider(rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (DKGProvider, error) - NewOCR2VRFProvider(rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (OCR2VRFProvider, error) -} - -var ( - _ OCR2VRFRelayer = (*ocr2vrfRelayer)(nil) - _ DKGProvider = (*dkgProvider)(nil) - _ OCR2VRFProvider = (*ocr2vrfProvider)(nil) -) - -// Relayer with added DKG and OCR2VRF provider functions. -type ocr2vrfRelayer struct { - chain legacyevm.Chain - lggr logger.Logger - ethKeystore keystore.Eth -} - -func NewOCR2VRFRelayer(chain legacyevm.Chain, lggr logger.Logger, ethKeystore keystore.Eth) OCR2VRFRelayer { - return &ocr2vrfRelayer{ - chain: chain, - lggr: lggr, - ethKeystore: ethKeystore, - } -} - -func (r *ocr2vrfRelayer) NewDKGProvider(rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (DKGProvider, error) { - // TODO https://smartcontract-it.atlassian.net/browse/BCF-2887 - ctx := context.Background() - - configWatcher, err := newOCR2VRFConfigProvider(ctx, r.lggr, r.chain, rargs) - if err != nil { - return nil, err - } - contractTransmitter, err := newOnChainContractTransmitter(ctx, r.lggr, rargs, pargs.TransmitterID, r.ethKeystore, configWatcher, configTransmitterOpts{}, OCR2AggregatorTransmissionContractABI, 0) - if err != nil { - return nil, err - } - - var pluginConfig config.PluginConfig - err = json.Unmarshal(pargs.PluginConfig, &pluginConfig) - if err != nil { - return nil, err - } - - return &dkgProvider{ - configWatcher: configWatcher, - contractTransmitter: contractTransmitter, - pluginConfig: pluginConfig, - }, nil -} - -func (r *ocr2vrfRelayer) NewOCR2VRFProvider(rargs commontypes.RelayArgs, pargs commontypes.PluginArgs) (OCR2VRFProvider, error) { - // TODO https://smartcontract-it.atlassian.net/browse/BCF-2887 - ctx := context.Background() - - configWatcher, err := newOCR2VRFConfigProvider(ctx, r.lggr, r.chain, rargs) - if err != nil { - return nil, err - } - contractTransmitter, err := newOnChainContractTransmitter(ctx, r.lggr, rargs, pargs.TransmitterID, r.ethKeystore, configWatcher, configTransmitterOpts{}, OCR2AggregatorTransmissionContractABI, 0) - if err != nil { - return nil, err - } - return &ocr2vrfProvider{ - configWatcher: configWatcher, - contractTransmitter: contractTransmitter, - }, nil -} - -type dkgProvider struct { - *configWatcher - contractTransmitter ContractTransmitter - pluginConfig config.PluginConfig -} - -func (c *dkgProvider) ContractTransmitter() ocrtypes.ContractTransmitter { - return c.contractTransmitter -} - -func (c *dkgProvider) ChainReader() commontypes.ContractReader { - return nil -} - -func (c *dkgProvider) Codec() commontypes.Codec { - return nil -} - -type ocr2vrfProvider struct { - *configWatcher - contractTransmitter ContractTransmitter -} - -func (c *ocr2vrfProvider) ContractTransmitter() ocrtypes.ContractTransmitter { - return c.contractTransmitter -} - -func (c *ocr2vrfProvider) ChainReader() commontypes.ContractReader { - return nil -} - -func (c *ocr2vrfProvider) Codec() commontypes.Codec { - return nil -} - -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 { - return nil, err - } - if !common.IsHexAddress(rargs.ContractID) { - return nil, fmt.Errorf("invalid contract address '%s'", rargs.ContractID) - } - - contractAddress := common.HexToAddress(rargs.ContractID) - configPoller, err := NewConfigPoller( - ctx, - lggr.With("contractID", rargs.ContractID), - CPConfig{ - chain.Client(), - chain.LogPoller(), - contractAddress, - // TODO: Does ocr2vrf need to support config contract? DF-19182 - nil, - OCR2AggregatorLogDecoder, - }, - ) - if err != nil { - return nil, err - } - - offchainConfigDigester := evmutil.EVMOffchainConfigDigester{ - ChainID: chain.Config().EVM().ChainID().Uint64(), - ContractAddress: contractAddress, - } - - return newConfigWatcher( - lggr, - contractAddress, - offchainConfigDigester, - configPoller, - chain, - relayConfig.FromBlock, - rargs.New, - ), nil -} diff --git a/core/services/relay/evm/parsed_types.go b/core/services/relay/evm/parsed_types.go index 168057e998d..902c182e1d8 100644 --- a/core/services/relay/evm/parsed_types.go +++ b/core/services/relay/evm/parsed_types.go @@ -10,17 +10,17 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" ) -type parsedTypes struct { - encoderDefs map[string]types.CodecEntry - decoderDefs map[string]types.CodecEntry +type ParsedTypes struct { + EncoderDefs map[string]types.CodecEntry + DecoderDefs map[string]types.CodecEntry } -func (parsed *parsedTypes) toCodec() (commontypes.RemoteCodec, error) { +func (parsed *ParsedTypes) ToCodec() (commontypes.RemoteCodec, error) { modByTypeName := map[string]codec.Modifier{} - if err := addEntries(parsed.encoderDefs, modByTypeName); err != nil { + if err := AddEntries(parsed.EncoderDefs, modByTypeName); err != nil { return nil, err } - if err := addEntries(parsed.decoderDefs, modByTypeName); err != nil { + if err := AddEntries(parsed.DecoderDefs, modByTypeName); err != nil { return nil, err } @@ -29,16 +29,16 @@ func (parsed *parsedTypes) toCodec() (commontypes.RemoteCodec, error) { return nil, err } underlying := &evmCodec{ - encoder: &encoder{Definitions: parsed.encoderDefs}, - decoder: &decoder{Definitions: parsed.decoderDefs}, - parsedTypes: parsed, + encoder: &encoder{Definitions: parsed.EncoderDefs}, + decoder: &decoder{Definitions: parsed.DecoderDefs}, + ParsedTypes: parsed, } - return codec.NewModifierCodec(underlying, mod, evmDecoderHooks...) + return codec.NewModifierCodec(underlying, mod, DecoderHooks...) } -// addEntries extracts the mods from codecEntry and adds them to modByTypeName use with codec.NewByItemTypeModifier +// AddEntries extracts the mods from codecEntry and adds them to modByTypeName use with codec.NewByItemTypeModifier // Since each input/output can have its own modifications, we need to keep track of them by type name -func addEntries(defs map[string]types.CodecEntry, modByTypeName map[string]codec.Modifier) error { +func AddEntries(defs map[string]types.CodecEntry, modByTypeName map[string]codec.Modifier) error { for k, def := range defs { modByTypeName[k] = def.Modifier() _, err := def.Modifier().RetypeToOffChain(reflect.PointerTo(def.CheckedType()), k) diff --git a/core/services/relay/evm/request_round_db.go b/core/services/relay/evm/request_round_db.go index 96c5a05d1c7..1aa3dfd7471 100644 --- a/core/services/relay/evm/request_round_db.go +++ b/core/services/relay/evm/request_round_db.go @@ -12,8 +12,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/logger" ) -//go:generate mockery --quiet --name RequestRoundDB --output ./mocks/ --case=underscore - // RequestRoundDB stores requested rounds for querying by the median plugin. type RequestRoundDB interface { SaveLatestRoundRequested(ctx context.Context, rr ocr2aggregator.OCR2AggregatorRoundRequested) error diff --git a/core/services/relay/evm/rpclibmocks/batch_caller.go b/core/services/relay/evm/rpclibmocks/batch_caller.go new file mode 100644 index 00000000000..0bb2c7f4fa7 --- /dev/null +++ b/core/services/relay/evm/rpclibmocks/batch_caller.go @@ -0,0 +1,97 @@ +// Code generated by mockery v2.43.2. DO NOT EDIT. + +package rpclibmocks + +import ( + context "context" + + evm "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm" + mock "github.com/stretchr/testify/mock" +) + +// BatchCaller is an autogenerated mock type for the BatchCaller type +type BatchCaller struct { + mock.Mock +} + +type BatchCaller_Expecter struct { + mock *mock.Mock +} + +func (_m *BatchCaller) EXPECT() *BatchCaller_Expecter { + return &BatchCaller_Expecter{mock: &_m.Mock} +} + +// BatchCall provides a mock function with given fields: ctx, blockNumber, batchRequests +func (_m *BatchCaller) BatchCall(ctx context.Context, blockNumber uint64, batchRequests evm.BatchCall) (evm.BatchResult, error) { + ret := _m.Called(ctx, blockNumber, batchRequests) + + if len(ret) == 0 { + panic("no return value specified for BatchCall") + } + + var r0 evm.BatchResult + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uint64, evm.BatchCall) (evm.BatchResult, error)); ok { + return rf(ctx, blockNumber, batchRequests) + } + if rf, ok := ret.Get(0).(func(context.Context, uint64, evm.BatchCall) evm.BatchResult); ok { + r0 = rf(ctx, blockNumber, batchRequests) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(evm.BatchResult) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uint64, evm.BatchCall) error); ok { + r1 = rf(ctx, blockNumber, batchRequests) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// BatchCaller_BatchCall_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BatchCall' +type BatchCaller_BatchCall_Call struct { + *mock.Call +} + +// BatchCall is a helper method to define mock.On call +// - ctx context.Context +// - blockNumber uint64 +// - batchRequests evm.BatchCall +func (_e *BatchCaller_Expecter) BatchCall(ctx interface{}, blockNumber interface{}, batchRequests interface{}) *BatchCaller_BatchCall_Call { + return &BatchCaller_BatchCall_Call{Call: _e.mock.On("BatchCall", ctx, blockNumber, batchRequests)} +} + +func (_c *BatchCaller_BatchCall_Call) Run(run func(ctx context.Context, blockNumber uint64, batchRequests evm.BatchCall)) *BatchCaller_BatchCall_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint64), args[2].(evm.BatchCall)) + }) + return _c +} + +func (_c *BatchCaller_BatchCall_Call) Return(_a0 evm.BatchResult, _a1 error) *BatchCaller_BatchCall_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BatchCaller_BatchCall_Call) RunAndReturn(run func(context.Context, uint64, evm.BatchCall) (evm.BatchResult, error)) *BatchCaller_BatchCall_Call { + _c.Call.Return(run) + return _c +} + +// NewBatchCaller creates a new instance of BatchCaller. 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 NewBatchCaller(t interface { + mock.TestingT + Cleanup(func()) +}) *BatchCaller { + mock := &BatchCaller{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} 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 46a0b08d0c3..de46154d138 100644 --- a/core/services/relay/evm/types/mocks/log_poller_wrapper.go +++ b/core/services/relay/evm/types/mocks/log_poller_wrapper.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -14,6 +14,14 @@ type LogPollerWrapper struct { mock.Mock } +type LogPollerWrapper_Expecter struct { + mock *mock.Mock +} + +func (_m *LogPollerWrapper) EXPECT() *LogPollerWrapper_Expecter { + return &LogPollerWrapper_Expecter{mock: &_m.Mock} +} + // Close provides a mock function with given fields: func (_m *LogPollerWrapper) Close() error { ret := _m.Called() @@ -32,6 +40,33 @@ func (_m *LogPollerWrapper) Close() error { return r0 } +// LogPollerWrapper_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type LogPollerWrapper_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *LogPollerWrapper_Expecter) Close() *LogPollerWrapper_Close_Call { + return &LogPollerWrapper_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *LogPollerWrapper_Close_Call) Run(run func()) *LogPollerWrapper_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *LogPollerWrapper_Close_Call) Return(_a0 error) *LogPollerWrapper_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LogPollerWrapper_Close_Call) RunAndReturn(run func() error) *LogPollerWrapper_Close_Call { + _c.Call.Return(run) + return _c +} + // HealthReport provides a mock function with given fields: func (_m *LogPollerWrapper) HealthReport() map[string]error { ret := _m.Called() @@ -52,6 +87,33 @@ func (_m *LogPollerWrapper) HealthReport() map[string]error { return r0 } +// LogPollerWrapper_HealthReport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HealthReport' +type LogPollerWrapper_HealthReport_Call struct { + *mock.Call +} + +// HealthReport is a helper method to define mock.On call +func (_e *LogPollerWrapper_Expecter) HealthReport() *LogPollerWrapper_HealthReport_Call { + return &LogPollerWrapper_HealthReport_Call{Call: _e.mock.On("HealthReport")} +} + +func (_c *LogPollerWrapper_HealthReport_Call) Run(run func()) *LogPollerWrapper_HealthReport_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *LogPollerWrapper_HealthReport_Call) Return(_a0 map[string]error) *LogPollerWrapper_HealthReport_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LogPollerWrapper_HealthReport_Call) RunAndReturn(run func() map[string]error) *LogPollerWrapper_HealthReport_Call { + _c.Call.Return(run) + return _c +} + // 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) @@ -91,6 +153,34 @@ func (_m *LogPollerWrapper) LatestEvents(ctx context.Context) ([]types.OracleReq return r0, r1, r2 } +// LogPollerWrapper_LatestEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LatestEvents' +type LogPollerWrapper_LatestEvents_Call struct { + *mock.Call +} + +// LatestEvents is a helper method to define mock.On call +// - ctx context.Context +func (_e *LogPollerWrapper_Expecter) LatestEvents(ctx interface{}) *LogPollerWrapper_LatestEvents_Call { + return &LogPollerWrapper_LatestEvents_Call{Call: _e.mock.On("LatestEvents", ctx)} +} + +func (_c *LogPollerWrapper_LatestEvents_Call) Run(run func(ctx context.Context)) *LogPollerWrapper_LatestEvents_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *LogPollerWrapper_LatestEvents_Call) Return(_a0 []types.OracleRequest, _a1 []types.OracleResponse, _a2 error) *LogPollerWrapper_LatestEvents_Call { + _c.Call.Return(_a0, _a1, _a2) + return _c +} + +func (_c *LogPollerWrapper_LatestEvents_Call) RunAndReturn(run func(context.Context) ([]types.OracleRequest, []types.OracleResponse, error)) *LogPollerWrapper_LatestEvents_Call { + _c.Call.Return(run) + return _c +} + // Name provides a mock function with given fields: func (_m *LogPollerWrapper) Name() string { ret := _m.Called() @@ -109,6 +199,33 @@ func (_m *LogPollerWrapper) Name() string { return r0 } +// LogPollerWrapper_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type LogPollerWrapper_Name_Call struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *LogPollerWrapper_Expecter) Name() *LogPollerWrapper_Name_Call { + return &LogPollerWrapper_Name_Call{Call: _e.mock.On("Name")} +} + +func (_c *LogPollerWrapper_Name_Call) Run(run func()) *LogPollerWrapper_Name_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *LogPollerWrapper_Name_Call) Return(_a0 string) *LogPollerWrapper_Name_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LogPollerWrapper_Name_Call) RunAndReturn(run func() string) *LogPollerWrapper_Name_Call { + _c.Call.Return(run) + return _c +} + // Ready provides a mock function with given fields: func (_m *LogPollerWrapper) Ready() error { ret := _m.Called() @@ -127,6 +244,33 @@ func (_m *LogPollerWrapper) Ready() error { return r0 } +// LogPollerWrapper_Ready_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ready' +type LogPollerWrapper_Ready_Call struct { + *mock.Call +} + +// Ready is a helper method to define mock.On call +func (_e *LogPollerWrapper_Expecter) Ready() *LogPollerWrapper_Ready_Call { + return &LogPollerWrapper_Ready_Call{Call: _e.mock.On("Ready")} +} + +func (_c *LogPollerWrapper_Ready_Call) Run(run func()) *LogPollerWrapper_Ready_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *LogPollerWrapper_Ready_Call) Return(_a0 error) *LogPollerWrapper_Ready_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LogPollerWrapper_Ready_Call) RunAndReturn(run func() error) *LogPollerWrapper_Ready_Call { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *LogPollerWrapper) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -145,11 +289,69 @@ func (_m *LogPollerWrapper) Start(_a0 context.Context) error { return r0 } +// LogPollerWrapper_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type LogPollerWrapper_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *LogPollerWrapper_Expecter) Start(_a0 interface{}) *LogPollerWrapper_Start_Call { + return &LogPollerWrapper_Start_Call{Call: _e.mock.On("Start", _a0)} +} + +func (_c *LogPollerWrapper_Start_Call) Run(run func(_a0 context.Context)) *LogPollerWrapper_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *LogPollerWrapper_Start_Call) Return(_a0 error) *LogPollerWrapper_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LogPollerWrapper_Start_Call) RunAndReturn(run func(context.Context) error) *LogPollerWrapper_Start_Call { + _c.Call.Return(run) + return _c +} + // 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) } +// LogPollerWrapper_SubscribeToUpdates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SubscribeToUpdates' +type LogPollerWrapper_SubscribeToUpdates_Call struct { + *mock.Call +} + +// SubscribeToUpdates is a helper method to define mock.On call +// - ctx context.Context +// - name string +// - subscriber types.RouteUpdateSubscriber +func (_e *LogPollerWrapper_Expecter) SubscribeToUpdates(ctx interface{}, name interface{}, subscriber interface{}) *LogPollerWrapper_SubscribeToUpdates_Call { + return &LogPollerWrapper_SubscribeToUpdates_Call{Call: _e.mock.On("SubscribeToUpdates", ctx, name, subscriber)} +} + +func (_c *LogPollerWrapper_SubscribeToUpdates_Call) Run(run func(ctx context.Context, name string, subscriber types.RouteUpdateSubscriber)) *LogPollerWrapper_SubscribeToUpdates_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(types.RouteUpdateSubscriber)) + }) + return _c +} + +func (_c *LogPollerWrapper_SubscribeToUpdates_Call) Return() *LogPollerWrapper_SubscribeToUpdates_Call { + _c.Call.Return() + return _c +} + +func (_c *LogPollerWrapper_SubscribeToUpdates_Call) RunAndReturn(run func(context.Context, string, types.RouteUpdateSubscriber)) *LogPollerWrapper_SubscribeToUpdates_Call { + _c.Call.Return(run) + return _c +} + // 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. // The first argument is typically a *testing.T value. func NewLogPollerWrapper(t interface { diff --git a/core/services/relay/evm/types/types.go b/core/services/relay/evm/types/types.go index e09f48f1337..175e1535dff 100644 --- a/core/services/relay/evm/types/types.go +++ b/core/services/relay/evm/types/types.go @@ -265,8 +265,6 @@ type RouteUpdateSubscriber interface { } // A LogPoller wrapper that understands router proxy contracts -// -//go:generate mockery --quiet --name LogPollerWrapper --output ./mocks/ --case=underscore type LogPollerWrapper interface { services.Service LatestEvents(ctx context.Context) ([]OracleRequest, []OracleResponse, error) diff --git a/core/services/relay/evm/write_target.go b/core/services/relay/evm/write_target.go index 46f4f83b05b..fb1c694a2e7 100644 --- a/core/services/relay/evm/write_target.go +++ b/core/services/relay/evm/write_target.go @@ -7,7 +7,6 @@ import ( chainselectors "github.com/smartcontractkit/chain-selectors" - commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/capabilities/targets" "github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/forwarder" @@ -46,13 +45,6 @@ func NewWriteTarget(ctx context.Context, relayer *Relayer, chain legacyevm.Chain if err != nil { return nil, err } - err = cr.Bind(ctx, []commontypes.BoundContract{{ - Address: config.ForwarderAddress().String(), - Name: "forwarder", - }}) - if err != nil { - return nil, err - } chainWriterConfig := relayevmtypes.ChainWriterConfig{ Contracts: map[string]*relayevmtypes.ContractConfig{ @@ -69,9 +61,14 @@ func NewWriteTarget(ctx context.Context, relayer *Relayer, chain legacyevm.Chain }, }, } - chainWriterConfig.MaxGasPrice = chain.Config().EVM().GasEstimator().PriceMax() - cw, err := NewChainWriterService(lggr.Named("ChainWriter"), chain.Client(), chain.TxManager(), chain.GasEstimator(), chainWriterConfig) + + encodedWriterConfig, err := json.Marshal(chainWriterConfig) + if err != nil { + return nil, fmt.Errorf("failed to marshal chainwriter config: %w", err) + } + + cw, err := relayer.NewChainWriter(ctx, encodedWriterConfig) if err != nil { return nil, err } diff --git a/core/services/relay/evm/write_target_test.go b/core/services/relay/evm/write_target_test.go index 694f7e1910c..f3dcae220eb 100644 --- a/core/services/relay/evm/write_target_test.go +++ b/core/services/relay/evm/write_target_test.go @@ -5,7 +5,10 @@ import ( "math/big" "testing" + "github.com/ethereum/go-ethereum/common" + "github.com/smartcontractkit/chainlink-common/pkg/values" + "github.com/smartcontractkit/chainlink/v2/common/headtracker/mocks" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm" @@ -49,6 +52,11 @@ func TestEvmWrite(t *testing.T) { chain.On("ID").Return(big.NewInt(11155111)) chain.On("TxManager").Return(txManager) chain.On("LogPoller").Return(nil) + + ht := mocks.NewHeadTracker[*types.Head, common.Hash](t) + ht.On("LatestAndFinalizedBlock", mock.Anything).Return(&types.Head{}, &types.Head{}, nil) + chain.On("HeadTracker").Return(ht) + chain.On("Client").Return(evmClient) cfg := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { diff --git a/core/services/relay/relay.go b/core/services/relay/relay.go index de3f80a5e78..a2681418cee 100644 --- a/core/services/relay/relay.go +++ b/core/services/relay/relay.go @@ -6,6 +6,8 @@ const ( NetworkSolana = "solana" NetworkStarkNet = "starknet" NetworkAptos = "aptos" + + NetworkDummy = "dummy" ) var SupportedNetworks = map[string]struct{}{ @@ -14,4 +16,6 @@ var SupportedNetworks = map[string]struct{}{ NetworkSolana: {}, NetworkStarkNet: {}, NetworkAptos: {}, + + NetworkDummy: {}, } diff --git a/core/services/s4/mocks/orm.go b/core/services/s4/mocks/orm.go index f616623eb89..a9452c27840 100644 --- a/core/services/s4/mocks/orm.go +++ b/core/services/s4/mocks/orm.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -19,6 +19,14 @@ type ORM struct { mock.Mock } +type ORM_Expecter struct { + mock *mock.Mock +} + +func (_m *ORM) EXPECT() *ORM_Expecter { + return &ORM_Expecter{mock: &_m.Mock} +} + // DeleteExpired provides a mock function with given fields: ctx, limit, utcNow func (_m *ORM) DeleteExpired(ctx context.Context, limit uint, utcNow time.Time) (int64, error) { ret := _m.Called(ctx, limit, utcNow) @@ -47,6 +55,36 @@ func (_m *ORM) DeleteExpired(ctx context.Context, limit uint, utcNow time.Time) return r0, r1 } +// ORM_DeleteExpired_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteExpired' +type ORM_DeleteExpired_Call struct { + *mock.Call +} + +// DeleteExpired is a helper method to define mock.On call +// - ctx context.Context +// - limit uint +// - utcNow time.Time +func (_e *ORM_Expecter) DeleteExpired(ctx interface{}, limit interface{}, utcNow interface{}) *ORM_DeleteExpired_Call { + return &ORM_DeleteExpired_Call{Call: _e.mock.On("DeleteExpired", ctx, limit, utcNow)} +} + +func (_c *ORM_DeleteExpired_Call) Run(run func(ctx context.Context, limit uint, utcNow time.Time)) *ORM_DeleteExpired_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint), args[2].(time.Time)) + }) + return _c +} + +func (_c *ORM_DeleteExpired_Call) Return(_a0 int64, _a1 error) *ORM_DeleteExpired_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ORM_DeleteExpired_Call) RunAndReturn(run func(context.Context, uint, time.Time) (int64, error)) *ORM_DeleteExpired_Call { + _c.Call.Return(run) + return _c +} + // Get provides a mock function with given fields: ctx, address, slotId func (_m *ORM) Get(ctx context.Context, address *big.Big, slotId uint) (*s4.Row, error) { ret := _m.Called(ctx, address, slotId) @@ -77,6 +115,36 @@ func (_m *ORM) Get(ctx context.Context, address *big.Big, slotId uint) (*s4.Row, return r0, r1 } +// ORM_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type ORM_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - ctx context.Context +// - address *big.Big +// - slotId uint +func (_e *ORM_Expecter) Get(ctx interface{}, address interface{}, slotId interface{}) *ORM_Get_Call { + return &ORM_Get_Call{Call: _e.mock.On("Get", ctx, address, slotId)} +} + +func (_c *ORM_Get_Call) Run(run func(ctx context.Context, address *big.Big, slotId uint)) *ORM_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*big.Big), args[2].(uint)) + }) + return _c +} + +func (_c *ORM_Get_Call) Return(_a0 *s4.Row, _a1 error) *ORM_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ORM_Get_Call) RunAndReturn(run func(context.Context, *big.Big, uint) (*s4.Row, error)) *ORM_Get_Call { + _c.Call.Return(run) + return _c +} + // GetSnapshot provides a mock function with given fields: ctx, addressRange func (_m *ORM) GetSnapshot(ctx context.Context, addressRange *s4.AddressRange) ([]*s4.SnapshotRow, error) { ret := _m.Called(ctx, addressRange) @@ -107,6 +175,35 @@ func (_m *ORM) GetSnapshot(ctx context.Context, addressRange *s4.AddressRange) ( return r0, r1 } +// ORM_GetSnapshot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSnapshot' +type ORM_GetSnapshot_Call struct { + *mock.Call +} + +// GetSnapshot is a helper method to define mock.On call +// - ctx context.Context +// - addressRange *s4.AddressRange +func (_e *ORM_Expecter) GetSnapshot(ctx interface{}, addressRange interface{}) *ORM_GetSnapshot_Call { + return &ORM_GetSnapshot_Call{Call: _e.mock.On("GetSnapshot", ctx, addressRange)} +} + +func (_c *ORM_GetSnapshot_Call) Run(run func(ctx context.Context, addressRange *s4.AddressRange)) *ORM_GetSnapshot_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*s4.AddressRange)) + }) + return _c +} + +func (_c *ORM_GetSnapshot_Call) Return(_a0 []*s4.SnapshotRow, _a1 error) *ORM_GetSnapshot_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ORM_GetSnapshot_Call) RunAndReturn(run func(context.Context, *s4.AddressRange) ([]*s4.SnapshotRow, error)) *ORM_GetSnapshot_Call { + _c.Call.Return(run) + return _c +} + // GetUnconfirmedRows provides a mock function with given fields: ctx, limit func (_m *ORM) GetUnconfirmedRows(ctx context.Context, limit uint) ([]*s4.Row, error) { ret := _m.Called(ctx, limit) @@ -137,6 +234,35 @@ func (_m *ORM) GetUnconfirmedRows(ctx context.Context, limit uint) ([]*s4.Row, e return r0, r1 } +// ORM_GetUnconfirmedRows_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUnconfirmedRows' +type ORM_GetUnconfirmedRows_Call struct { + *mock.Call +} + +// GetUnconfirmedRows is a helper method to define mock.On call +// - ctx context.Context +// - limit uint +func (_e *ORM_Expecter) GetUnconfirmedRows(ctx interface{}, limit interface{}) *ORM_GetUnconfirmedRows_Call { + return &ORM_GetUnconfirmedRows_Call{Call: _e.mock.On("GetUnconfirmedRows", ctx, limit)} +} + +func (_c *ORM_GetUnconfirmedRows_Call) Run(run func(ctx context.Context, limit uint)) *ORM_GetUnconfirmedRows_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uint)) + }) + return _c +} + +func (_c *ORM_GetUnconfirmedRows_Call) Return(_a0 []*s4.Row, _a1 error) *ORM_GetUnconfirmedRows_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ORM_GetUnconfirmedRows_Call) RunAndReturn(run func(context.Context, uint) ([]*s4.Row, error)) *ORM_GetUnconfirmedRows_Call { + _c.Call.Return(run) + return _c +} + // Update provides a mock function with given fields: ctx, row func (_m *ORM) Update(ctx context.Context, row *s4.Row) error { ret := _m.Called(ctx, row) @@ -155,6 +281,35 @@ func (_m *ORM) Update(ctx context.Context, row *s4.Row) error { return r0 } +// ORM_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' +type ORM_Update_Call struct { + *mock.Call +} + +// Update is a helper method to define mock.On call +// - ctx context.Context +// - row *s4.Row +func (_e *ORM_Expecter) Update(ctx interface{}, row interface{}) *ORM_Update_Call { + return &ORM_Update_Call{Call: _e.mock.On("Update", ctx, row)} +} + +func (_c *ORM_Update_Call) Run(run func(ctx context.Context, row *s4.Row)) *ORM_Update_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*s4.Row)) + }) + return _c +} + +func (_c *ORM_Update_Call) Return(_a0 error) *ORM_Update_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ORM_Update_Call) RunAndReturn(run func(context.Context, *s4.Row) error) *ORM_Update_Call { + _c.Call.Return(run) + return _c +} + // NewORM creates a new instance of ORM. 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 NewORM(t interface { diff --git a/core/services/s4/mocks/storage.go b/core/services/s4/mocks/storage.go index 5971b9f1ece..a89a0a6bdf3 100644 --- a/core/services/s4/mocks/storage.go +++ b/core/services/s4/mocks/storage.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -17,6 +17,14 @@ type Storage struct { mock.Mock } +type Storage_Expecter struct { + mock *mock.Mock +} + +func (_m *Storage) EXPECT() *Storage_Expecter { + return &Storage_Expecter{mock: &_m.Mock} +} + // Constraints provides a mock function with given fields: func (_m *Storage) Constraints() s4.Constraints { ret := _m.Called() @@ -35,6 +43,33 @@ func (_m *Storage) Constraints() s4.Constraints { return r0 } +// Storage_Constraints_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Constraints' +type Storage_Constraints_Call struct { + *mock.Call +} + +// Constraints is a helper method to define mock.On call +func (_e *Storage_Expecter) Constraints() *Storage_Constraints_Call { + return &Storage_Constraints_Call{Call: _e.mock.On("Constraints")} +} + +func (_c *Storage_Constraints_Call) Run(run func()) *Storage_Constraints_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Storage_Constraints_Call) Return(_a0 s4.Constraints) *Storage_Constraints_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Storage_Constraints_Call) RunAndReturn(run func() s4.Constraints) *Storage_Constraints_Call { + _c.Call.Return(run) + return _c +} + // Get provides a mock function with given fields: ctx, key func (_m *Storage) Get(ctx context.Context, key *s4.Key) (*s4.Record, *s4.Metadata, error) { ret := _m.Called(ctx, key) @@ -74,6 +109,35 @@ func (_m *Storage) Get(ctx context.Context, key *s4.Key) (*s4.Record, *s4.Metada return r0, r1, r2 } +// Storage_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type Storage_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - ctx context.Context +// - key *s4.Key +func (_e *Storage_Expecter) Get(ctx interface{}, key interface{}) *Storage_Get_Call { + return &Storage_Get_Call{Call: _e.mock.On("Get", ctx, key)} +} + +func (_c *Storage_Get_Call) Run(run func(ctx context.Context, key *s4.Key)) *Storage_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*s4.Key)) + }) + return _c +} + +func (_c *Storage_Get_Call) Return(_a0 *s4.Record, _a1 *s4.Metadata, _a2 error) *Storage_Get_Call { + _c.Call.Return(_a0, _a1, _a2) + return _c +} + +func (_c *Storage_Get_Call) RunAndReturn(run func(context.Context, *s4.Key) (*s4.Record, *s4.Metadata, error)) *Storage_Get_Call { + _c.Call.Return(run) + return _c +} + // List provides a mock function with given fields: ctx, address func (_m *Storage) List(ctx context.Context, address common.Address) ([]*s4.SnapshotRow, error) { ret := _m.Called(ctx, address) @@ -104,6 +168,35 @@ func (_m *Storage) List(ctx context.Context, address common.Address) ([]*s4.Snap return r0, r1 } +// Storage_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' +type Storage_List_Call struct { + *mock.Call +} + +// List is a helper method to define mock.On call +// - ctx context.Context +// - address common.Address +func (_e *Storage_Expecter) List(ctx interface{}, address interface{}) *Storage_List_Call { + return &Storage_List_Call{Call: _e.mock.On("List", ctx, address)} +} + +func (_c *Storage_List_Call) Run(run func(ctx context.Context, address common.Address)) *Storage_List_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(common.Address)) + }) + return _c +} + +func (_c *Storage_List_Call) Return(_a0 []*s4.SnapshotRow, _a1 error) *Storage_List_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Storage_List_Call) RunAndReturn(run func(context.Context, common.Address) ([]*s4.SnapshotRow, error)) *Storage_List_Call { + _c.Call.Return(run) + return _c +} + // Put provides a mock function with given fields: ctx, key, record, signature func (_m *Storage) Put(ctx context.Context, key *s4.Key, record *s4.Record, signature []byte) error { ret := _m.Called(ctx, key, record, signature) @@ -122,6 +215,37 @@ func (_m *Storage) Put(ctx context.Context, key *s4.Key, record *s4.Record, sign return r0 } +// Storage_Put_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Put' +type Storage_Put_Call struct { + *mock.Call +} + +// Put is a helper method to define mock.On call +// - ctx context.Context +// - key *s4.Key +// - record *s4.Record +// - signature []byte +func (_e *Storage_Expecter) Put(ctx interface{}, key interface{}, record interface{}, signature interface{}) *Storage_Put_Call { + return &Storage_Put_Call{Call: _e.mock.On("Put", ctx, key, record, signature)} +} + +func (_c *Storage_Put_Call) Run(run func(ctx context.Context, key *s4.Key, record *s4.Record, signature []byte)) *Storage_Put_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*s4.Key), args[2].(*s4.Record), args[3].([]byte)) + }) + return _c +} + +func (_c *Storage_Put_Call) Return(_a0 error) *Storage_Put_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Storage_Put_Call) RunAndReturn(run func(context.Context, *s4.Key, *s4.Record, []byte) error) *Storage_Put_Call { + _c.Call.Return(run) + return _c +} + // NewStorage creates a new instance of Storage. 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 NewStorage(t interface { diff --git a/core/services/s4/orm.go b/core/services/s4/orm.go index 952d8a33b24..abf3a76e5af 100644 --- a/core/services/s4/orm.go +++ b/core/services/s4/orm.go @@ -28,8 +28,6 @@ type SnapshotRow struct { PayloadSize uint64 } -//go:generate mockery --quiet --name ORM --output ./mocks/ --case=underscore - // ORM represents S4 persistence layer. // All functions are thread-safe. type ORM interface { diff --git a/core/services/s4/storage.go b/core/services/s4/storage.go index 1af14ec269f..02948575207 100644 --- a/core/services/s4/storage.go +++ b/core/services/s4/storage.go @@ -44,8 +44,6 @@ type Metadata struct { Signature []byte } -//go:generate mockery --quiet --name Storage --output ./mocks/ --case=underscore - // Storage represents S4 storage access interface. // All functions are thread-safe. type Storage interface { diff --git a/core/services/streams/stream.go b/core/services/streams/stream.go index cb168c11bce..8825cd3b342 100644 --- a/core/services/streams/stream.go +++ b/core/services/streams/stream.go @@ -12,7 +12,7 @@ import ( ) type Runner interface { - ExecuteRun(ctx context.Context, spec pipeline.Spec, vars pipeline.Vars, l logger.Logger) (run *pipeline.Run, trrs pipeline.TaskRunResults, err error) + ExecuteRun(ctx context.Context, spec pipeline.Spec, vars pipeline.Vars) (run *pipeline.Run, trrs pipeline.TaskRunResults, err error) InitializePipeline(spec pipeline.Spec) (*pipeline.Pipeline, error) } @@ -87,7 +87,7 @@ func (s *stream) executeRun(ctx context.Context) (*pipeline.Run, pipeline.TaskRu }, }) - run, trrs, err := s.runner.ExecuteRun(ctx, *s.spec, vars, s.lggr) + run, trrs, err := s.runner.ExecuteRun(ctx, *s.spec, vars) if err != nil { return nil, nil, fmt.Errorf("error executing run for spec ID %v: %w", s.spec.ID, err) } diff --git a/core/services/streams/stream_test.go b/core/services/streams/stream_test.go index 3e8f58cd58b..61e51878802 100644 --- a/core/services/streams/stream_test.go +++ b/core/services/streams/stream_test.go @@ -26,7 +26,7 @@ type mockRunner struct { err error } -func (m *mockRunner) ExecuteRun(ctx context.Context, spec pipeline.Spec, vars pipeline.Vars, l logger.Logger) (run *pipeline.Run, trrs pipeline.TaskRunResults, err error) { +func (m *mockRunner) ExecuteRun(ctx context.Context, spec pipeline.Spec, vars pipeline.Vars) (run *pipeline.Run, trrs pipeline.TaskRunResults, err error) { return m.run, m.trrs, m.err } func (m *mockRunner) InitializePipeline(spec pipeline.Spec) (p *pipeline.Pipeline, err error) { diff --git a/core/services/synchronization/common.go b/core/services/synchronization/common.go index 584f5b24380..5f469c055d4 100644 --- a/core/services/synchronization/common.go +++ b/core/services/synchronization/common.go @@ -20,7 +20,6 @@ const ( OCR2S4 TelemetryType = "ocr2-s4" OCR2Median TelemetryType = "ocr2-median" OCR3Mercury TelemetryType = "ocr3-mercury" - OCR2VRF TelemetryType = "ocr2-vrf" AutomationCustom TelemetryType = "automation-custom" OCR3Automation TelemetryType = "ocr3-automation" ) @@ -33,8 +32,6 @@ type TelemPayload struct { // TelemetryService encapsulates all the functionality needed to // send telemetry to the ingress server using wsrpc -// -//go:generate mockery --quiet --name TelemetryService --output ./mocks --case=underscore type TelemetryService interface { services.ServiceCtx Send(ctx context.Context, telemetry []byte, contractID string, telemType TelemetryType) diff --git a/core/services/synchronization/mocks/telem_client.go b/core/services/synchronization/mocks/telem_client.go index 3ed4247dde8..da9678943ca 100644 --- a/core/services/synchronization/mocks/telem_client.go +++ b/core/services/synchronization/mocks/telem_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -14,6 +14,14 @@ type TelemClient struct { mock.Mock } +type TelemClient_Expecter struct { + mock *mock.Mock +} + +func (_m *TelemClient) EXPECT() *TelemClient_Expecter { + return &TelemClient_Expecter{mock: &_m.Mock} +} + // Telem provides a mock function with given fields: ctx, in func (_m *TelemClient) Telem(ctx context.Context, in *telem.TelemRequest) (*telem.TelemResponse, error) { ret := _m.Called(ctx, in) @@ -44,6 +52,35 @@ func (_m *TelemClient) Telem(ctx context.Context, in *telem.TelemRequest) (*tele return r0, r1 } +// TelemClient_Telem_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Telem' +type TelemClient_Telem_Call struct { + *mock.Call +} + +// Telem is a helper method to define mock.On call +// - ctx context.Context +// - in *telem.TelemRequest +func (_e *TelemClient_Expecter) Telem(ctx interface{}, in interface{}) *TelemClient_Telem_Call { + return &TelemClient_Telem_Call{Call: _e.mock.On("Telem", ctx, in)} +} + +func (_c *TelemClient_Telem_Call) Run(run func(ctx context.Context, in *telem.TelemRequest)) *TelemClient_Telem_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*telem.TelemRequest)) + }) + return _c +} + +func (_c *TelemClient_Telem_Call) Return(_a0 *telem.TelemResponse, _a1 error) *TelemClient_Telem_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *TelemClient_Telem_Call) RunAndReturn(run func(context.Context, *telem.TelemRequest) (*telem.TelemResponse, error)) *TelemClient_Telem_Call { + _c.Call.Return(run) + return _c +} + // TelemBatch provides a mock function with given fields: ctx, in func (_m *TelemClient) TelemBatch(ctx context.Context, in *telem.TelemBatchRequest) (*telem.TelemResponse, error) { ret := _m.Called(ctx, in) @@ -74,6 +111,35 @@ func (_m *TelemClient) TelemBatch(ctx context.Context, in *telem.TelemBatchReque return r0, r1 } +// TelemClient_TelemBatch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TelemBatch' +type TelemClient_TelemBatch_Call struct { + *mock.Call +} + +// TelemBatch is a helper method to define mock.On call +// - ctx context.Context +// - in *telem.TelemBatchRequest +func (_e *TelemClient_Expecter) TelemBatch(ctx interface{}, in interface{}) *TelemClient_TelemBatch_Call { + return &TelemClient_TelemBatch_Call{Call: _e.mock.On("TelemBatch", ctx, in)} +} + +func (_c *TelemClient_TelemBatch_Call) Run(run func(ctx context.Context, in *telem.TelemBatchRequest)) *TelemClient_TelemBatch_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*telem.TelemBatchRequest)) + }) + return _c +} + +func (_c *TelemClient_TelemBatch_Call) Return(_a0 *telem.TelemResponse, _a1 error) *TelemClient_TelemBatch_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *TelemClient_TelemBatch_Call) RunAndReturn(run func(context.Context, *telem.TelemBatchRequest) (*telem.TelemResponse, error)) *TelemClient_TelemBatch_Call { + _c.Call.Return(run) + return _c +} + // NewTelemClient creates a new instance of TelemClient. 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 NewTelemClient(t interface { diff --git a/core/services/synchronization/mocks/telemetry_service.go b/core/services/synchronization/mocks/telemetry_service.go index b705d49aecd..c391c92cca1 100644 --- a/core/services/synchronization/mocks/telemetry_service.go +++ b/core/services/synchronization/mocks/telemetry_service.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -14,6 +14,14 @@ type TelemetryService struct { mock.Mock } +type TelemetryService_Expecter struct { + mock *mock.Mock +} + +func (_m *TelemetryService) EXPECT() *TelemetryService_Expecter { + return &TelemetryService_Expecter{mock: &_m.Mock} +} + // Close provides a mock function with given fields: func (_m *TelemetryService) Close() error { ret := _m.Called() @@ -32,6 +40,33 @@ func (_m *TelemetryService) Close() error { return r0 } +// TelemetryService_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type TelemetryService_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *TelemetryService_Expecter) Close() *TelemetryService_Close_Call { + return &TelemetryService_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *TelemetryService_Close_Call) Run(run func()) *TelemetryService_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *TelemetryService_Close_Call) Return(_a0 error) *TelemetryService_Close_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *TelemetryService_Close_Call) RunAndReturn(run func() error) *TelemetryService_Close_Call { + _c.Call.Return(run) + return _c +} + // HealthReport provides a mock function with given fields: func (_m *TelemetryService) HealthReport() map[string]error { ret := _m.Called() @@ -52,6 +87,33 @@ func (_m *TelemetryService) HealthReport() map[string]error { return r0 } +// TelemetryService_HealthReport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HealthReport' +type TelemetryService_HealthReport_Call struct { + *mock.Call +} + +// HealthReport is a helper method to define mock.On call +func (_e *TelemetryService_Expecter) HealthReport() *TelemetryService_HealthReport_Call { + return &TelemetryService_HealthReport_Call{Call: _e.mock.On("HealthReport")} +} + +func (_c *TelemetryService_HealthReport_Call) Run(run func()) *TelemetryService_HealthReport_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *TelemetryService_HealthReport_Call) Return(_a0 map[string]error) *TelemetryService_HealthReport_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *TelemetryService_HealthReport_Call) RunAndReturn(run func() map[string]error) *TelemetryService_HealthReport_Call { + _c.Call.Return(run) + return _c +} + // Name provides a mock function with given fields: func (_m *TelemetryService) Name() string { ret := _m.Called() @@ -70,6 +132,33 @@ func (_m *TelemetryService) Name() string { return r0 } +// TelemetryService_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type TelemetryService_Name_Call struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *TelemetryService_Expecter) Name() *TelemetryService_Name_Call { + return &TelemetryService_Name_Call{Call: _e.mock.On("Name")} +} + +func (_c *TelemetryService_Name_Call) Run(run func()) *TelemetryService_Name_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *TelemetryService_Name_Call) Return(_a0 string) *TelemetryService_Name_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *TelemetryService_Name_Call) RunAndReturn(run func() string) *TelemetryService_Name_Call { + _c.Call.Return(run) + return _c +} + // Ready provides a mock function with given fields: func (_m *TelemetryService) Ready() error { ret := _m.Called() @@ -88,11 +177,69 @@ func (_m *TelemetryService) Ready() error { return r0 } +// TelemetryService_Ready_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ready' +type TelemetryService_Ready_Call struct { + *mock.Call +} + +// Ready is a helper method to define mock.On call +func (_e *TelemetryService_Expecter) Ready() *TelemetryService_Ready_Call { + return &TelemetryService_Ready_Call{Call: _e.mock.On("Ready")} +} + +func (_c *TelemetryService_Ready_Call) Run(run func()) *TelemetryService_Ready_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *TelemetryService_Ready_Call) Return(_a0 error) *TelemetryService_Ready_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *TelemetryService_Ready_Call) RunAndReturn(run func() error) *TelemetryService_Ready_Call { + _c.Call.Return(run) + return _c +} + // Send provides a mock function with given fields: ctx, telemetry, contractID, telemType func (_m *TelemetryService) Send(ctx context.Context, telemetry []byte, contractID string, telemType synchronization.TelemetryType) { _m.Called(ctx, telemetry, contractID, telemType) } +// TelemetryService_Send_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Send' +type TelemetryService_Send_Call struct { + *mock.Call +} + +// Send is a helper method to define mock.On call +// - ctx context.Context +// - telemetry []byte +// - contractID string +// - telemType synchronization.TelemetryType +func (_e *TelemetryService_Expecter) Send(ctx interface{}, telemetry interface{}, contractID interface{}, telemType interface{}) *TelemetryService_Send_Call { + return &TelemetryService_Send_Call{Call: _e.mock.On("Send", ctx, telemetry, contractID, telemType)} +} + +func (_c *TelemetryService_Send_Call) Run(run func(ctx context.Context, telemetry []byte, contractID string, telemType synchronization.TelemetryType)) *TelemetryService_Send_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]byte), args[2].(string), args[3].(synchronization.TelemetryType)) + }) + return _c +} + +func (_c *TelemetryService_Send_Call) Return() *TelemetryService_Send_Call { + _c.Call.Return() + return _c +} + +func (_c *TelemetryService_Send_Call) RunAndReturn(run func(context.Context, []byte, string, synchronization.TelemetryType)) *TelemetryService_Send_Call { + _c.Call.Return(run) + return _c +} + // Start provides a mock function with given fields: _a0 func (_m *TelemetryService) Start(_a0 context.Context) error { ret := _m.Called(_a0) @@ -111,6 +258,34 @@ func (_m *TelemetryService) Start(_a0 context.Context) error { return r0 } +// TelemetryService_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type TelemetryService_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 context.Context +func (_e *TelemetryService_Expecter) Start(_a0 interface{}) *TelemetryService_Start_Call { + return &TelemetryService_Start_Call{Call: _e.mock.On("Start", _a0)} +} + +func (_c *TelemetryService_Start_Call) Run(run func(_a0 context.Context)) *TelemetryService_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *TelemetryService_Start_Call) Return(_a0 error) *TelemetryService_Start_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *TelemetryService_Start_Call) RunAndReturn(run func(context.Context) error) *TelemetryService_Start_Call { + _c.Call.Return(run) + return _c +} + // NewTelemetryService creates a new instance of TelemetryService. 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 NewTelemetryService(t interface { diff --git a/core/services/synchronization/telem/gen.go b/core/services/synchronization/telem/gen.go deleted file mode 100644 index 108beb58678..00000000000 --- a/core/services/synchronization/telem/gen.go +++ /dev/null @@ -1,3 +0,0 @@ -package telem - -//go:generate mockery --quiet --name TelemClient --output ../mocks/ --case=underscore diff --git a/core/services/synchronization/telem/telem.pb.go b/core/services/synchronization/telem/telem.pb.go index e382823eeb3..e1945bc26d3 100644 --- a/core/services/synchronization/telem/telem.pb.go +++ b/core/services/synchronization/telem/telem.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 +// protoc-gen-go v1.34.1 +// protoc v4.25.1 // source: core/services/synchronization/telem/telem.proto package telem diff --git a/core/services/synchronization/telem/telem_automation_custom.pb.go b/core/services/synchronization/telem/telem_automation_custom.pb.go index e88cb2f951a..a53339eda05 100644 --- a/core/services/synchronization/telem/telem_automation_custom.pb.go +++ b/core/services/synchronization/telem/telem_automation_custom.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.23.4 -// source: telem_automation_custom.proto +// protoc-gen-go v1.34.1 +// protoc v4.25.1 +// source: core/services/synchronization/telem/telem_automation_custom.proto package telem @@ -34,7 +34,7 @@ type BlockNumber struct { func (x *BlockNumber) Reset() { *x = BlockNumber{} if protoimpl.UnsafeEnabled { - mi := &file_telem_automation_custom_proto_msgTypes[0] + mi := &file_core_services_synchronization_telem_telem_automation_custom_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -47,7 +47,7 @@ func (x *BlockNumber) String() string { func (*BlockNumber) ProtoMessage() {} func (x *BlockNumber) ProtoReflect() protoreflect.Message { - mi := &file_telem_automation_custom_proto_msgTypes[0] + mi := &file_core_services_synchronization_telem_telem_automation_custom_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -60,7 +60,7 @@ func (x *BlockNumber) ProtoReflect() protoreflect.Message { // Deprecated: Use BlockNumber.ProtoReflect.Descriptor instead. func (*BlockNumber) Descriptor() ([]byte, []int) { - return file_telem_automation_custom_proto_rawDescGZIP(), []int{0} + return file_core_services_synchronization_telem_telem_automation_custom_proto_rawDescGZIP(), []int{0} } func (x *BlockNumber) GetTimestamp() uint64 { @@ -104,7 +104,7 @@ type NodeVersion struct { func (x *NodeVersion) Reset() { *x = NodeVersion{} if protoimpl.UnsafeEnabled { - mi := &file_telem_automation_custom_proto_msgTypes[1] + mi := &file_core_services_synchronization_telem_telem_automation_custom_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -117,7 +117,7 @@ func (x *NodeVersion) String() string { func (*NodeVersion) ProtoMessage() {} func (x *NodeVersion) ProtoReflect() protoreflect.Message { - mi := &file_telem_automation_custom_proto_msgTypes[1] + mi := &file_core_services_synchronization_telem_telem_automation_custom_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -130,7 +130,7 @@ func (x *NodeVersion) ProtoReflect() protoreflect.Message { // Deprecated: Use NodeVersion.ProtoReflect.Descriptor instead. func (*NodeVersion) Descriptor() ([]byte, []int) { - return file_telem_automation_custom_proto_rawDescGZIP(), []int{1} + return file_core_services_synchronization_telem_telem_automation_custom_proto_rawDescGZIP(), []int{1} } func (x *NodeVersion) GetTimestamp() uint64 { @@ -169,7 +169,7 @@ type AutomationTelemWrapper struct { func (x *AutomationTelemWrapper) Reset() { *x = AutomationTelemWrapper{} if protoimpl.UnsafeEnabled { - mi := &file_telem_automation_custom_proto_msgTypes[2] + mi := &file_core_services_synchronization_telem_telem_automation_custom_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -182,7 +182,7 @@ func (x *AutomationTelemWrapper) String() string { func (*AutomationTelemWrapper) ProtoMessage() {} func (x *AutomationTelemWrapper) ProtoReflect() protoreflect.Message { - mi := &file_telem_automation_custom_proto_msgTypes[2] + mi := &file_core_services_synchronization_telem_telem_automation_custom_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -195,7 +195,7 @@ func (x *AutomationTelemWrapper) ProtoReflect() protoreflect.Message { // Deprecated: Use AutomationTelemWrapper.ProtoReflect.Descriptor instead. func (*AutomationTelemWrapper) Descriptor() ([]byte, []int) { - return file_telem_automation_custom_proto_rawDescGZIP(), []int{2} + return file_core_services_synchronization_telem_telem_automation_custom_proto_rawDescGZIP(), []int{2} } func (m *AutomationTelemWrapper) GetMsg() isAutomationTelemWrapper_Msg { @@ -235,64 +235,66 @@ func (*AutomationTelemWrapper_BlockNumber) isAutomationTelemWrapper_Msg() {} func (*AutomationTelemWrapper_NodeVersion) isAutomationTelemWrapper_Msg() {} -var File_telem_automation_custom_proto protoreflect.FileDescriptor - -var file_telem_automation_custom_proto_rawDesc = []byte{ - 0x0a, 0x1d, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x05, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x22, 0x92, 0x01, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x22, 0x73, 0x0a, 0x0b, 0x4e, - 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, +var File_core_services_synchronization_telem_telem_automation_custom_proto protoreflect.FileDescriptor + +var file_core_services_synchronization_telem_telem_automation_custom_proto_rawDesc = []byte{ + 0x0a, 0x41, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, + 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, + 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x2f, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x5f, 0x61, 0x75, 0x74, 0x6f, + 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x22, 0x92, 0x01, 0x0a, 0x0b, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x6f, 0x64, 0x65, - 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x6e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, - 0x22, 0x91, 0x01, 0x0a, 0x16, 0x41, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x65, 0x6c, 0x65, 0x6d, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x0c, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x65, 0x6c, - 0x65, 0x6d, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, - 0x52, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x05, 0x0a, - 0x03, 0x6d, 0x73, 0x67, 0x42, 0x4e, 0x5a, 0x4c, 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, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x2f, 0x76, 0x32, - 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x73, - 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74, - 0x65, 0x6c, 0x65, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x22, + 0x73, 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, + 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x21, 0x0a, 0x0c, + 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, + 0x67, 0x65, 0x73, 0x74, 0x22, 0x91, 0x01, 0x0a, 0x16, 0x41, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, + 0x37, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x2e, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x0c, 0x6e, 0x6f, 0x64, 0x65, + 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x42, 0x05, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x42, 0x4e, 0x5a, 0x4c, 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, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, + 0x6b, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x73, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2f, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_telem_automation_custom_proto_rawDescOnce sync.Once - file_telem_automation_custom_proto_rawDescData = file_telem_automation_custom_proto_rawDesc + file_core_services_synchronization_telem_telem_automation_custom_proto_rawDescOnce sync.Once + file_core_services_synchronization_telem_telem_automation_custom_proto_rawDescData = file_core_services_synchronization_telem_telem_automation_custom_proto_rawDesc ) -func file_telem_automation_custom_proto_rawDescGZIP() []byte { - file_telem_automation_custom_proto_rawDescOnce.Do(func() { - file_telem_automation_custom_proto_rawDescData = protoimpl.X.CompressGZIP(file_telem_automation_custom_proto_rawDescData) +func file_core_services_synchronization_telem_telem_automation_custom_proto_rawDescGZIP() []byte { + file_core_services_synchronization_telem_telem_automation_custom_proto_rawDescOnce.Do(func() { + file_core_services_synchronization_telem_telem_automation_custom_proto_rawDescData = protoimpl.X.CompressGZIP(file_core_services_synchronization_telem_telem_automation_custom_proto_rawDescData) }) - return file_telem_automation_custom_proto_rawDescData + return file_core_services_synchronization_telem_telem_automation_custom_proto_rawDescData } -var file_telem_automation_custom_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_telem_automation_custom_proto_goTypes = []interface{}{ +var file_core_services_synchronization_telem_telem_automation_custom_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_core_services_synchronization_telem_telem_automation_custom_proto_goTypes = []interface{}{ (*BlockNumber)(nil), // 0: telem.BlockNumber (*NodeVersion)(nil), // 1: telem.NodeVersion (*AutomationTelemWrapper)(nil), // 2: telem.AutomationTelemWrapper } -var file_telem_automation_custom_proto_depIdxs = []int32{ +var file_core_services_synchronization_telem_telem_automation_custom_proto_depIdxs = []int32{ 0, // 0: telem.AutomationTelemWrapper.block_number:type_name -> telem.BlockNumber 1, // 1: telem.AutomationTelemWrapper.node_version:type_name -> telem.NodeVersion 2, // [2:2] is the sub-list for method output_type @@ -302,13 +304,13 @@ var file_telem_automation_custom_proto_depIdxs = []int32{ 0, // [0:2] is the sub-list for field type_name } -func init() { file_telem_automation_custom_proto_init() } -func file_telem_automation_custom_proto_init() { - if File_telem_automation_custom_proto != nil { +func init() { file_core_services_synchronization_telem_telem_automation_custom_proto_init() } +func file_core_services_synchronization_telem_telem_automation_custom_proto_init() { + if File_core_services_synchronization_telem_telem_automation_custom_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_telem_automation_custom_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_core_services_synchronization_telem_telem_automation_custom_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BlockNumber); i { case 0: return &v.state @@ -320,7 +322,7 @@ func file_telem_automation_custom_proto_init() { return nil } } - file_telem_automation_custom_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_core_services_synchronization_telem_telem_automation_custom_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*NodeVersion); i { case 0: return &v.state @@ -332,7 +334,7 @@ func file_telem_automation_custom_proto_init() { return nil } } - file_telem_automation_custom_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_core_services_synchronization_telem_telem_automation_custom_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AutomationTelemWrapper); i { case 0: return &v.state @@ -345,7 +347,7 @@ func file_telem_automation_custom_proto_init() { } } } - file_telem_automation_custom_proto_msgTypes[2].OneofWrappers = []interface{}{ + file_core_services_synchronization_telem_telem_automation_custom_proto_msgTypes[2].OneofWrappers = []interface{}{ (*AutomationTelemWrapper_BlockNumber)(nil), (*AutomationTelemWrapper_NodeVersion)(nil), } @@ -353,18 +355,18 @@ func file_telem_automation_custom_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_telem_automation_custom_proto_rawDesc, + RawDescriptor: file_core_services_synchronization_telem_telem_automation_custom_proto_rawDesc, NumEnums: 0, NumMessages: 3, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_telem_automation_custom_proto_goTypes, - DependencyIndexes: file_telem_automation_custom_proto_depIdxs, - MessageInfos: file_telem_automation_custom_proto_msgTypes, + GoTypes: file_core_services_synchronization_telem_telem_automation_custom_proto_goTypes, + DependencyIndexes: file_core_services_synchronization_telem_telem_automation_custom_proto_depIdxs, + MessageInfos: file_core_services_synchronization_telem_telem_automation_custom_proto_msgTypes, }.Build() - File_telem_automation_custom_proto = out.File - file_telem_automation_custom_proto_rawDesc = nil - file_telem_automation_custom_proto_goTypes = nil - file_telem_automation_custom_proto_depIdxs = nil + File_core_services_synchronization_telem_telem_automation_custom_proto = out.File + file_core_services_synchronization_telem_telem_automation_custom_proto_rawDesc = nil + file_core_services_synchronization_telem_telem_automation_custom_proto_goTypes = nil + file_core_services_synchronization_telem_telem_automation_custom_proto_depIdxs = nil } diff --git a/core/services/synchronization/telem/telem_enhanced_ea.pb.go b/core/services/synchronization/telem/telem_enhanced_ea.pb.go index 94237396a7a..a9a81dabfcc 100644 --- a/core/services/synchronization/telem/telem_enhanced_ea.pb.go +++ b/core/services/synchronization/telem/telem_enhanced_ea.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 +// protoc-gen-go v1.34.1 +// protoc v4.25.1 // source: core/services/synchronization/telem/telem_enhanced_ea.proto package telem diff --git a/core/services/synchronization/telem/telem_enhanced_ea_mercury.pb.go b/core/services/synchronization/telem/telem_enhanced_ea_mercury.pb.go index 9cda6ef99a1..e152cb4b152 100644 --- a/core/services/synchronization/telem/telem_enhanced_ea_mercury.pb.go +++ b/core/services/synchronization/telem/telem_enhanced_ea_mercury.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.24.3 +// protoc-gen-go v1.34.1 +// protoc v4.25.1 // source: core/services/synchronization/telem/telem_enhanced_ea_mercury.proto package telem @@ -25,11 +25,12 @@ type EnhancedEAMercury struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Version uint32 `protobuf:"varint,32,opt,name=version,proto3" json:"version,omitempty"` - DataSource string `protobuf:"bytes,1,opt,name=data_source,json=dataSource,proto3" json:"data_source,omitempty"` - DpBenchmarkPrice float64 `protobuf:"fixed64,2,opt,name=dp_benchmark_price,json=dpBenchmarkPrice,proto3" json:"dp_benchmark_price,omitempty"` - DpBid float64 `protobuf:"fixed64,3,opt,name=dp_bid,json=dpBid,proto3" json:"dp_bid,omitempty"` - DpAsk float64 `protobuf:"fixed64,4,opt,name=dp_ask,json=dpAsk,proto3" json:"dp_ask,omitempty"` + Version uint32 `protobuf:"varint,32,opt,name=version,proto3" json:"version,omitempty"` + DataSource string `protobuf:"bytes,1,opt,name=data_source,json=dataSource,proto3" json:"data_source,omitempty"` + DpBenchmarkPrice float64 `protobuf:"fixed64,2,opt,name=dp_benchmark_price,json=dpBenchmarkPrice,proto3" json:"dp_benchmark_price,omitempty"` + DpBid float64 `protobuf:"fixed64,3,opt,name=dp_bid,json=dpBid,proto3" json:"dp_bid,omitempty"` + DpAsk float64 `protobuf:"fixed64,4,opt,name=dp_ask,json=dpAsk,proto3" json:"dp_ask,omitempty"` + DpInvariantViolationDetected bool `protobuf:"varint,33,opt,name=dp_invariant_violation_detected,json=dpInvariantViolationDetected,proto3" json:"dp_invariant_violation_detected,omitempty"` // v1 fields (block range) CurrentBlockNumber int64 `protobuf:"varint,5,opt,name=current_block_number,json=currentBlockNumber,proto3" json:"current_block_number,omitempty"` CurrentBlockHash string `protobuf:"bytes,6,opt,name=current_block_hash,json=currentBlockHash,proto3" json:"current_block_hash,omitempty"` @@ -130,6 +131,13 @@ func (x *EnhancedEAMercury) GetDpAsk() float64 { return 0 } +func (x *EnhancedEAMercury) GetDpInvariantViolationDetected() bool { + if x != nil { + return x.DpInvariantViolationDetected + } + return false +} + func (x *EnhancedEAMercury) GetCurrentBlockNumber() int64 { if x != nil { return x.CurrentBlockNumber @@ -326,7 +334,7 @@ var file_core_services_synchronization_telem_telem_enhanced_ea_mercury_proto_raw 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x2f, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x5f, 0x65, 0x6e, 0x68, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x5f, 0x65, 0x61, 0x5f, 0x6d, 0x65, 0x72, 0x63, 0x75, 0x72, 0x79, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x22, 0xe2, 0x0b, 0x0a, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x22, 0xa9, 0x0c, 0x0a, 0x11, 0x45, 0x6e, 0x68, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x45, 0x41, 0x4d, 0x65, 0x72, 0x63, 0x75, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, @@ -337,96 +345,100 @@ var file_core_services_synchronization_telem_telem_enhanced_ea_mercury_proto_raw 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x64, 0x70, 0x5f, 0x62, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x64, 0x70, 0x42, 0x69, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x64, 0x70, 0x5f, 0x61, 0x73, 0x6b, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x01, 0x52, 0x05, 0x64, 0x70, 0x41, 0x73, 0x6b, 0x12, 0x30, 0x0a, 0x14, 0x63, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x12, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, - 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x36, 0x0a, 0x17, 0x63, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x12, 0x41, 0x0a, 0x1d, 0x66, 0x65, 0x74, 0x63, 0x68, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x66, - 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x18, 0x19, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x66, 0x65, 0x74, 0x63, 0x68, 0x4d, - 0x61, 0x78, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x12, 0x36, 0x0a, 0x17, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x69, 0x6e, 0x61, - 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, - 0x1a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x6d, 0x61, 0x78, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, - 0x7a, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x33, 0x0a, 0x15, - 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x14, 0x6f, 0x62, 0x73, - 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x12, 0x20, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x66, 0x65, 0x65, - 0x64, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x4c, 0x69, 0x6e, 0x6b, 0x46, - 0x65, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x70, 0x72, 0x69, 0x63, - 0x65, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x69, - 0x63, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, - 0x66, 0x65, 0x65, 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x4e, 0x61, - 0x74, 0x69, 0x76, 0x65, 0x46, 0x65, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x74, 0x69, - 0x76, 0x65, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, - 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x48, 0x0a, 0x21, 0x62, - 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1d, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x54, 0x61, - 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x44, 0x0a, 0x1f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, - 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1b, - 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x45, 0x6e, 0x64, - 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x40, 0x0a, 0x1c, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, - 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x1a, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x3e, 0x0a, - 0x1b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, - 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0b, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x19, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x65, - 0x69, 0x76, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x47, 0x0a, - 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x65, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, - 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1d, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x45, 0x73, 0x74, 0x61, 0x62, - 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x36, 0x0a, 0x17, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x66, 0x65, 0x65, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x65, - 0x65, 0x64, 0x12, 0x3e, 0x0a, 0x1b, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x70, 0x72, 0x69, 0x63, - 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x19, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x69, - 0x63, 0x65, 0x12, 0x4b, 0x0a, 0x22, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x5f, 0x70, 0x72, 0x69, 0x63, - 0x65, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1f, + 0x28, 0x01, 0x52, 0x05, 0x64, 0x70, 0x41, 0x73, 0x6b, 0x12, 0x45, 0x0a, 0x1f, 0x64, 0x70, 0x5f, + 0x69, 0x6e, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x5f, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x1c, 0x64, 0x70, 0x49, 0x6e, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x56, + 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, + 0x12, 0x30, 0x0a, 0x14, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, + 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x12, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, + 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x36, 0x0a, 0x17, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x15, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x41, 0x0a, 0x1d, 0x66, 0x65, 0x74, 0x63, + 0x68, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x19, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x1a, 0x66, 0x65, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x78, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, + 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x36, 0x0a, 0x17, 0x6d, + 0x61, 0x78, 0x5f, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x6d, 0x61, + 0x78, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x12, 0x33, 0x0a, 0x15, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x1b, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x14, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x20, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x6c, + 0x69, 0x6e, 0x6b, 0x5f, 0x66, 0x65, 0x65, 0x64, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, + 0x69, 0x73, 0x4c, 0x69, 0x6e, 0x6b, 0x46, 0x65, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x69, + 0x6e, 0x6b, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, + 0x6c, 0x69, 0x6e, 0x6b, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x69, 0x73, 0x5f, + 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0c, 0x69, 0x73, 0x4e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x46, 0x65, 0x65, 0x64, 0x12, + 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, + 0x1f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x50, 0x72, 0x69, + 0x63, 0x65, 0x12, 0x48, 0x0a, 0x21, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x74, 0x61, 0x73, + 0x6b, 0x5f, 0x72, 0x75, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1d, 0x62, + 0x72, 0x69, 0x64, 0x67, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x72, + 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x44, 0x0a, 0x1f, + 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x72, 0x75, 0x6e, 0x5f, + 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1b, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x54, 0x61, 0x73, + 0x6b, 0x52, 0x75, 0x6e, 0x45, 0x6e, 0x64, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x12, 0x40, 0x0a, 0x1c, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1a, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x12, 0x3e, 0x0a, 0x1b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x19, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x12, 0x47, 0x0a, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x65, 0x73, 0x74, + 0x61, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1d, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x53, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x45, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x36, 0x0a, + 0x17, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x65, 0x65, 0x64, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x65, 0x65, 0x64, 0x12, 0x3e, 0x0a, 0x1b, 0x6f, 0x62, 0x73, + 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, + 0x72, 0x6b, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x19, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x65, 0x6e, 0x63, 0x68, - 0x6d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x69, 0x63, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, - 0x27, 0x0a, 0x0f, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, - 0x69, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x69, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x62, 0x73, 0x65, - 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x73, 0x6b, 0x18, 0x11, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x0e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x73, - 0x6b, 0x12, 0x34, 0x0a, 0x16, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x62, 0x69, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x17, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x14, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x69, - 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x34, 0x0a, 0x16, 0x6f, 0x62, 0x73, 0x65, 0x72, - 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x18, 0x18, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x73, 0x6b, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a, - 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x12, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, - 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, - 0x68, 0x18, 0x14, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x21, - 0x0a, 0x0c, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x15, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x73, 0x73, 0x65, 0x74, 0x53, 0x79, 0x6d, 0x62, 0x6f, - 0x6c, 0x42, 0x4e, 0x5a, 0x4c, 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, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x73, 0x79, 0x6e, 0x63, - 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x65, 0x6c, 0x65, - 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x4b, 0x0a, 0x22, 0x6f, 0x62, 0x73, + 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, + 0x72, 0x6b, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, + 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1f, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x50, 0x72, 0x69, 0x63, 0x65, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x69, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x69, 0x64, 0x12, + 0x27, 0x0a, 0x0f, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, + 0x73, 0x6b, 0x18, 0x11, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x73, 0x6b, 0x12, 0x34, 0x0a, 0x16, 0x6f, 0x62, 0x73, 0x65, + 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x69, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x69, 0x64, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x34, + 0x0a, 0x16, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x73, + 0x6b, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x18, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, + 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x73, 0x6b, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x64, + 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, + 0x6e, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, + 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x14, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, + 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x73, + 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x73, 0x73, + 0x65, 0x74, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x42, 0x4e, 0x5a, 0x4c, 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, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, + 0x6b, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x73, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2f, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/core/services/synchronization/telem/telem_enhanced_ea_mercury.proto b/core/services/synchronization/telem/telem_enhanced_ea_mercury.proto index a527552bb6b..8488eb1d509 100644 --- a/core/services/synchronization/telem/telem_enhanced_ea_mercury.proto +++ b/core/services/synchronization/telem/telem_enhanced_ea_mercury.proto @@ -11,6 +11,7 @@ message EnhancedEAMercury { double dp_benchmark_price=2; double dp_bid=3; double dp_ask=4; + bool dp_invariant_violation_detected=33; // v1 fields (block range) int64 current_block_number=5; @@ -48,6 +49,4 @@ message EnhancedEAMercury { int64 round=19; int64 epoch=20; string asset_symbol=21; - - } diff --git a/core/services/synchronization/telem/telem_functions_request.pb.go b/core/services/synchronization/telem/telem_functions_request.pb.go index 82690cb90de..0a4a2649b4e 100644 --- a/core/services/synchronization/telem/telem_functions_request.pb.go +++ b/core/services/synchronization/telem/telem_functions_request.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0 -// protoc v3.21.12 -// source: telem_functions_request.proto +// protoc-gen-go v1.34.1 +// protoc v4.25.1 +// source: core/services/synchronization/telem/telem_functions_request.proto package telem @@ -33,7 +33,7 @@ type FunctionsRequest struct { func (x *FunctionsRequest) Reset() { *x = FunctionsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_telem_functions_request_proto_msgTypes[0] + mi := &file_core_services_synchronization_telem_telem_functions_request_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -46,7 +46,7 @@ func (x *FunctionsRequest) String() string { func (*FunctionsRequest) ProtoMessage() {} func (x *FunctionsRequest) ProtoReflect() protoreflect.Message { - mi := &file_telem_functions_request_proto_msgTypes[0] + mi := &file_core_services_synchronization_telem_telem_functions_request_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -59,7 +59,7 @@ func (x *FunctionsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use FunctionsRequest.ProtoReflect.Descriptor instead. func (*FunctionsRequest) Descriptor() ([]byte, []int) { - return file_telem_functions_request_proto_rawDescGZIP(), []int{0} + return file_core_services_synchronization_telem_telem_functions_request_proto_rawDescGZIP(), []int{0} } func (x *FunctionsRequest) GetRequestId() string { @@ -83,43 +83,46 @@ func (x *FunctionsRequest) GetDomains() []string { return nil } -var File_telem_functions_request_proto protoreflect.FileDescriptor - -var file_telem_functions_request_proto_rawDesc = []byte{ - 0x0a, 0x1d, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x05, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x22, 0x6e, 0x0a, 0x10, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x6f, 0x64, - 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, - 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x64, - 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x42, 0x4e, 0x5a, 0x4c, 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, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x2f, - 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, - 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2f, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var File_core_services_synchronization_telem_telem_functions_request_proto protoreflect.FileDescriptor + +var file_core_services_synchronization_telem_telem_functions_request_proto_rawDesc = []byte{ + 0x0a, 0x41, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, + 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, + 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x2f, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x5f, 0x66, 0x75, 0x6e, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x22, 0x6e, 0x0a, 0x10, 0x46, 0x75, + 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, + 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, + 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x6f, 0x64, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x18, 0x0a, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x42, 0x4e, 0x5a, 0x4c, 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, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x6c, + 0x69, 0x6e, 0x6b, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x73, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( - file_telem_functions_request_proto_rawDescOnce sync.Once - file_telem_functions_request_proto_rawDescData = file_telem_functions_request_proto_rawDesc + file_core_services_synchronization_telem_telem_functions_request_proto_rawDescOnce sync.Once + file_core_services_synchronization_telem_telem_functions_request_proto_rawDescData = file_core_services_synchronization_telem_telem_functions_request_proto_rawDesc ) -func file_telem_functions_request_proto_rawDescGZIP() []byte { - file_telem_functions_request_proto_rawDescOnce.Do(func() { - file_telem_functions_request_proto_rawDescData = protoimpl.X.CompressGZIP(file_telem_functions_request_proto_rawDescData) +func file_core_services_synchronization_telem_telem_functions_request_proto_rawDescGZIP() []byte { + file_core_services_synchronization_telem_telem_functions_request_proto_rawDescOnce.Do(func() { + file_core_services_synchronization_telem_telem_functions_request_proto_rawDescData = protoimpl.X.CompressGZIP(file_core_services_synchronization_telem_telem_functions_request_proto_rawDescData) }) - return file_telem_functions_request_proto_rawDescData + return file_core_services_synchronization_telem_telem_functions_request_proto_rawDescData } -var file_telem_functions_request_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_telem_functions_request_proto_goTypes = []interface{}{ +var file_core_services_synchronization_telem_telem_functions_request_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_core_services_synchronization_telem_telem_functions_request_proto_goTypes = []interface{}{ (*FunctionsRequest)(nil), // 0: telem.FunctionsRequest } -var file_telem_functions_request_proto_depIdxs = []int32{ +var file_core_services_synchronization_telem_telem_functions_request_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -127,13 +130,13 @@ var file_telem_functions_request_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_telem_functions_request_proto_init() } -func file_telem_functions_request_proto_init() { - if File_telem_functions_request_proto != nil { +func init() { file_core_services_synchronization_telem_telem_functions_request_proto_init() } +func file_core_services_synchronization_telem_telem_functions_request_proto_init() { + if File_core_services_synchronization_telem_telem_functions_request_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_telem_functions_request_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_core_services_synchronization_telem_telem_functions_request_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FunctionsRequest); i { case 0: return &v.state @@ -150,18 +153,18 @@ func file_telem_functions_request_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_telem_functions_request_proto_rawDesc, + RawDescriptor: file_core_services_synchronization_telem_telem_functions_request_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_telem_functions_request_proto_goTypes, - DependencyIndexes: file_telem_functions_request_proto_depIdxs, - MessageInfos: file_telem_functions_request_proto_msgTypes, + GoTypes: file_core_services_synchronization_telem_telem_functions_request_proto_goTypes, + DependencyIndexes: file_core_services_synchronization_telem_telem_functions_request_proto_depIdxs, + MessageInfos: file_core_services_synchronization_telem_telem_functions_request_proto_msgTypes, }.Build() - File_telem_functions_request_proto = out.File - file_telem_functions_request_proto_rawDesc = nil - file_telem_functions_request_proto_goTypes = nil - file_telem_functions_request_proto_depIdxs = nil + File_core_services_synchronization_telem_telem_functions_request_proto = out.File + file_core_services_synchronization_telem_telem_functions_request_proto_rawDesc = nil + file_core_services_synchronization_telem_telem_functions_request_proto_goTypes = nil + file_core_services_synchronization_telem_telem_functions_request_proto_depIdxs = nil } diff --git a/core/services/synchronization/telem/telem_wsrpc.pb.go b/core/services/synchronization/telem/telem_wsrpc.pb.go index b946bf88cda..e4028b4de49 100644 --- a/core/services/synchronization/telem/telem_wsrpc.pb.go +++ b/core/services/synchronization/telem/telem_wsrpc.pb.go @@ -1,13 +1,12 @@ // Code generated by protoc-gen-go-wsrpc. DO NOT EDIT. // versions: // - protoc-gen-go-wsrpc v0.0.1 -// - protoc v3.21.12 +// - protoc v4.25.1 package telem import ( context "context" - wsrpc "github.com/smartcontractkit/wsrpc" ) diff --git a/core/services/synchronization/telemetry_ingress_batch_client_test.go b/core/services/synchronization/telemetry_ingress_batch_client_test.go index c4f6417131d..964fc9b25b2 100644 --- a/core/services/synchronization/telemetry_ingress_batch_client_test.go +++ b/core/services/synchronization/telemetry_ingress_batch_client_test.go @@ -45,11 +45,6 @@ func TestTelemetryIngressBatchClient_HappyPath(t *testing.T) { ContractID: "0x1", TelemType: synchronization.OCR, } - telemPayload2 := synchronization.TelemPayload{ - Telemetry: []byte("Mock telem 2"), - ContractID: "0x2", - TelemType: synchronization.OCR2VRF, - } telemPayload3 := synchronization.TelemPayload{ Telemetry: []byte("Mock telem 3"), ContractID: "0x3", @@ -58,7 +53,6 @@ func TestTelemetryIngressBatchClient_HappyPath(t *testing.T) { // Assert telemetry payloads for each contract are correctly sent to wsrpc var contractCounter1 atomic.Uint32 - var contractCounter2 atomic.Uint32 var contractCounter3 atomic.Uint32 telemClient.On("TelemBatch", mock.Anything, mock.Anything).Return(nil, nil).Run(func(args mock.Arguments) { telemBatchReq := args.Get(1).(*telemPb.TelemBatchRequest) @@ -70,13 +64,6 @@ func TestTelemetryIngressBatchClient_HappyPath(t *testing.T) { assert.Equal(t, synchronization.OCR, telemPayload1.TelemType) } } - if telemBatchReq.ContractId == "0x2" { - for _, telem := range telemBatchReq.Telemetry { - contractCounter2.Add(1) - assert.Equal(t, telemPayload2.Telemetry, telem) - assert.Equal(t, synchronization.OCR2VRF, telemPayload2.TelemType) - } - } if telemBatchReq.ContractId == "0x3" { for _, telem := range telemBatchReq.Telemetry { contractCounter3.Add(1) @@ -89,15 +76,13 @@ func TestTelemetryIngressBatchClient_HappyPath(t *testing.T) { // Send telemetry testCtx := testutils.Context(t) telemIngressClient.Send(testCtx, telemPayload1.Telemetry, telemPayload1.ContractID, telemPayload1.TelemType) - telemIngressClient.Send(testCtx, telemPayload2.Telemetry, telemPayload2.ContractID, telemPayload2.TelemType) telemIngressClient.Send(testCtx, telemPayload3.Telemetry, telemPayload3.ContractID, telemPayload3.TelemType) time.Sleep(sendInterval * 2) telemIngressClient.Send(testCtx, telemPayload1.Telemetry, telemPayload1.ContractID, telemPayload1.TelemType) telemIngressClient.Send(testCtx, telemPayload1.Telemetry, telemPayload1.ContractID, telemPayload1.TelemType) - telemIngressClient.Send(testCtx, telemPayload2.Telemetry, telemPayload2.ContractID, telemPayload2.TelemType) // Wait for the telemetry to be handled g.Eventually(func() []uint32 { - return []uint32{contractCounter1.Load(), contractCounter2.Load(), contractCounter3.Load()} - }).Should(gomega.Equal([]uint32{3, 2, 1})) + return []uint32{contractCounter1.Load(), contractCounter3.Load()} + }).Should(gomega.Equal([]uint32{3, 1})) } diff --git a/core/services/vrf/mocks/aggregator_v3_interface.go b/core/services/vrf/mocks/aggregator_v3_interface.go index 65351354d7a..adb7600ffe1 100644 --- a/core/services/vrf/mocks/aggregator_v3_interface.go +++ b/core/services/vrf/mocks/aggregator_v3_interface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -14,13 +14,21 @@ import ( mock "github.com/stretchr/testify/mock" ) -// AggregatorV3Interface is an autogenerated mock type for the AggregatorV3InterfaceInterface type -type AggregatorV3Interface struct { +// AggregatorV3InterfaceInterface is an autogenerated mock type for the AggregatorV3InterfaceInterface type +type AggregatorV3InterfaceInterface struct { mock.Mock } +type AggregatorV3InterfaceInterface_Expecter struct { + mock *mock.Mock +} + +func (_m *AggregatorV3InterfaceInterface) EXPECT() *AggregatorV3InterfaceInterface_Expecter { + return &AggregatorV3InterfaceInterface_Expecter{mock: &_m.Mock} +} + // Address provides a mock function with given fields: -func (_m *AggregatorV3Interface) Address() common.Address { +func (_m *AggregatorV3InterfaceInterface) Address() common.Address { ret := _m.Called() if len(ret) == 0 { @@ -39,8 +47,35 @@ func (_m *AggregatorV3Interface) Address() common.Address { return r0 } +// AggregatorV3InterfaceInterface_Address_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Address' +type AggregatorV3InterfaceInterface_Address_Call struct { + *mock.Call +} + +// Address is a helper method to define mock.On call +func (_e *AggregatorV3InterfaceInterface_Expecter) Address() *AggregatorV3InterfaceInterface_Address_Call { + return &AggregatorV3InterfaceInterface_Address_Call{Call: _e.mock.On("Address")} +} + +func (_c *AggregatorV3InterfaceInterface_Address_Call) Run(run func()) *AggregatorV3InterfaceInterface_Address_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *AggregatorV3InterfaceInterface_Address_Call) Return(_a0 common.Address) *AggregatorV3InterfaceInterface_Address_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *AggregatorV3InterfaceInterface_Address_Call) RunAndReturn(run func() common.Address) *AggregatorV3InterfaceInterface_Address_Call { + _c.Call.Return(run) + return _c +} + // Decimals provides a mock function with given fields: opts -func (_m *AggregatorV3Interface) Decimals(opts *bind.CallOpts) (uint8, error) { +func (_m *AggregatorV3InterfaceInterface) Decimals(opts *bind.CallOpts) (uint8, error) { ret := _m.Called(opts) if len(ret) == 0 { @@ -67,8 +102,36 @@ func (_m *AggregatorV3Interface) Decimals(opts *bind.CallOpts) (uint8, error) { return r0, r1 } +// AggregatorV3InterfaceInterface_Decimals_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Decimals' +type AggregatorV3InterfaceInterface_Decimals_Call struct { + *mock.Call +} + +// Decimals is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *AggregatorV3InterfaceInterface_Expecter) Decimals(opts interface{}) *AggregatorV3InterfaceInterface_Decimals_Call { + return &AggregatorV3InterfaceInterface_Decimals_Call{Call: _e.mock.On("Decimals", opts)} +} + +func (_c *AggregatorV3InterfaceInterface_Decimals_Call) Run(run func(opts *bind.CallOpts)) *AggregatorV3InterfaceInterface_Decimals_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *AggregatorV3InterfaceInterface_Decimals_Call) Return(_a0 uint8, _a1 error) *AggregatorV3InterfaceInterface_Decimals_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *AggregatorV3InterfaceInterface_Decimals_Call) RunAndReturn(run func(*bind.CallOpts) (uint8, error)) *AggregatorV3InterfaceInterface_Decimals_Call { + _c.Call.Return(run) + return _c +} + // Description provides a mock function with given fields: opts -func (_m *AggregatorV3Interface) Description(opts *bind.CallOpts) (string, error) { +func (_m *AggregatorV3InterfaceInterface) Description(opts *bind.CallOpts) (string, error) { ret := _m.Called(opts) if len(ret) == 0 { @@ -95,8 +158,36 @@ func (_m *AggregatorV3Interface) Description(opts *bind.CallOpts) (string, error return r0, r1 } +// AggregatorV3InterfaceInterface_Description_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Description' +type AggregatorV3InterfaceInterface_Description_Call struct { + *mock.Call +} + +// Description is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *AggregatorV3InterfaceInterface_Expecter) Description(opts interface{}) *AggregatorV3InterfaceInterface_Description_Call { + return &AggregatorV3InterfaceInterface_Description_Call{Call: _e.mock.On("Description", opts)} +} + +func (_c *AggregatorV3InterfaceInterface_Description_Call) Run(run func(opts *bind.CallOpts)) *AggregatorV3InterfaceInterface_Description_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *AggregatorV3InterfaceInterface_Description_Call) Return(_a0 string, _a1 error) *AggregatorV3InterfaceInterface_Description_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *AggregatorV3InterfaceInterface_Description_Call) RunAndReturn(run func(*bind.CallOpts) (string, error)) *AggregatorV3InterfaceInterface_Description_Call { + _c.Call.Return(run) + return _c +} + // GetRoundData provides a mock function with given fields: opts, _roundId -func (_m *AggregatorV3Interface) GetRoundData(opts *bind.CallOpts, _roundId *big.Int) (aggregator_v3_interface.GetRoundData, error) { +func (_m *AggregatorV3InterfaceInterface) GetRoundData(opts *bind.CallOpts, _roundId *big.Int) (aggregator_v3_interface.GetRoundData, error) { ret := _m.Called(opts, _roundId) if len(ret) == 0 { @@ -123,8 +214,37 @@ func (_m *AggregatorV3Interface) GetRoundData(opts *bind.CallOpts, _roundId *big return r0, r1 } +// AggregatorV3InterfaceInterface_GetRoundData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRoundData' +type AggregatorV3InterfaceInterface_GetRoundData_Call struct { + *mock.Call +} + +// GetRoundData is a helper method to define mock.On call +// - opts *bind.CallOpts +// - _roundId *big.Int +func (_e *AggregatorV3InterfaceInterface_Expecter) GetRoundData(opts interface{}, _roundId interface{}) *AggregatorV3InterfaceInterface_GetRoundData_Call { + return &AggregatorV3InterfaceInterface_GetRoundData_Call{Call: _e.mock.On("GetRoundData", opts, _roundId)} +} + +func (_c *AggregatorV3InterfaceInterface_GetRoundData_Call) Run(run func(opts *bind.CallOpts, _roundId *big.Int)) *AggregatorV3InterfaceInterface_GetRoundData_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts), args[1].(*big.Int)) + }) + return _c +} + +func (_c *AggregatorV3InterfaceInterface_GetRoundData_Call) Return(_a0 aggregator_v3_interface.GetRoundData, _a1 error) *AggregatorV3InterfaceInterface_GetRoundData_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *AggregatorV3InterfaceInterface_GetRoundData_Call) RunAndReturn(run func(*bind.CallOpts, *big.Int) (aggregator_v3_interface.GetRoundData, error)) *AggregatorV3InterfaceInterface_GetRoundData_Call { + _c.Call.Return(run) + return _c +} + // LatestRoundData provides a mock function with given fields: opts -func (_m *AggregatorV3Interface) LatestRoundData(opts *bind.CallOpts) (aggregator_v3_interface.LatestRoundData, error) { +func (_m *AggregatorV3InterfaceInterface) LatestRoundData(opts *bind.CallOpts) (aggregator_v3_interface.LatestRoundData, error) { ret := _m.Called(opts) if len(ret) == 0 { @@ -151,8 +271,36 @@ func (_m *AggregatorV3Interface) LatestRoundData(opts *bind.CallOpts) (aggregato return r0, r1 } +// AggregatorV3InterfaceInterface_LatestRoundData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LatestRoundData' +type AggregatorV3InterfaceInterface_LatestRoundData_Call struct { + *mock.Call +} + +// LatestRoundData is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *AggregatorV3InterfaceInterface_Expecter) LatestRoundData(opts interface{}) *AggregatorV3InterfaceInterface_LatestRoundData_Call { + return &AggregatorV3InterfaceInterface_LatestRoundData_Call{Call: _e.mock.On("LatestRoundData", opts)} +} + +func (_c *AggregatorV3InterfaceInterface_LatestRoundData_Call) Run(run func(opts *bind.CallOpts)) *AggregatorV3InterfaceInterface_LatestRoundData_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *AggregatorV3InterfaceInterface_LatestRoundData_Call) Return(_a0 aggregator_v3_interface.LatestRoundData, _a1 error) *AggregatorV3InterfaceInterface_LatestRoundData_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *AggregatorV3InterfaceInterface_LatestRoundData_Call) RunAndReturn(run func(*bind.CallOpts) (aggregator_v3_interface.LatestRoundData, error)) *AggregatorV3InterfaceInterface_LatestRoundData_Call { + _c.Call.Return(run) + return _c +} + // Version provides a mock function with given fields: opts -func (_m *AggregatorV3Interface) Version(opts *bind.CallOpts) (*big.Int, error) { +func (_m *AggregatorV3InterfaceInterface) Version(opts *bind.CallOpts) (*big.Int, error) { ret := _m.Called(opts) if len(ret) == 0 { @@ -181,13 +329,41 @@ func (_m *AggregatorV3Interface) Version(opts *bind.CallOpts) (*big.Int, error) return r0, r1 } -// NewAggregatorV3Interface creates a new instance of AggregatorV3Interface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// AggregatorV3InterfaceInterface_Version_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Version' +type AggregatorV3InterfaceInterface_Version_Call struct { + *mock.Call +} + +// Version is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *AggregatorV3InterfaceInterface_Expecter) Version(opts interface{}) *AggregatorV3InterfaceInterface_Version_Call { + return &AggregatorV3InterfaceInterface_Version_Call{Call: _e.mock.On("Version", opts)} +} + +func (_c *AggregatorV3InterfaceInterface_Version_Call) Run(run func(opts *bind.CallOpts)) *AggregatorV3InterfaceInterface_Version_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *AggregatorV3InterfaceInterface_Version_Call) Return(_a0 *big.Int, _a1 error) *AggregatorV3InterfaceInterface_Version_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *AggregatorV3InterfaceInterface_Version_Call) RunAndReturn(run func(*bind.CallOpts) (*big.Int, error)) *AggregatorV3InterfaceInterface_Version_Call { + _c.Call.Return(run) + return _c +} + +// NewAggregatorV3InterfaceInterface creates a new instance of AggregatorV3InterfaceInterface. 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 NewAggregatorV3Interface(t interface { +func NewAggregatorV3InterfaceInterface(t interface { mock.TestingT Cleanup(func()) -}) *AggregatorV3Interface { - mock := &AggregatorV3Interface{} +}) *AggregatorV3InterfaceInterface { + mock := &AggregatorV3InterfaceInterface{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) diff --git a/core/services/vrf/mocks/config.go b/core/services/vrf/mocks/config.go index 3685e17b0ff..1cc315f5afb 100644 --- a/core/services/vrf/mocks/config.go +++ b/core/services/vrf/mocks/config.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -9,6 +9,14 @@ type Config struct { mock.Mock } +type Config_Expecter struct { + mock *mock.Mock +} + +func (_m *Config) EXPECT() *Config_Expecter { + return &Config_Expecter{mock: &_m.Mock} +} + // FinalityDepth provides a mock function with given fields: func (_m *Config) FinalityDepth() uint32 { ret := _m.Called() @@ -27,6 +35,33 @@ func (_m *Config) FinalityDepth() uint32 { return r0 } +// Config_FinalityDepth_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FinalityDepth' +type Config_FinalityDepth_Call struct { + *mock.Call +} + +// FinalityDepth is a helper method to define mock.On call +func (_e *Config_Expecter) FinalityDepth() *Config_FinalityDepth_Call { + return &Config_FinalityDepth_Call{Call: _e.mock.On("FinalityDepth")} +} + +func (_c *Config_FinalityDepth_Call) Run(run func()) *Config_FinalityDepth_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Config_FinalityDepth_Call) Return(_a0 uint32) *Config_FinalityDepth_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Config_FinalityDepth_Call) RunAndReturn(run func() uint32) *Config_FinalityDepth_Call { + _c.Call.Return(run) + return _c +} + // MinIncomingConfirmations provides a mock function with given fields: func (_m *Config) MinIncomingConfirmations() uint32 { ret := _m.Called() @@ -45,6 +80,33 @@ func (_m *Config) MinIncomingConfirmations() uint32 { return r0 } +// Config_MinIncomingConfirmations_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MinIncomingConfirmations' +type Config_MinIncomingConfirmations_Call struct { + *mock.Call +} + +// MinIncomingConfirmations is a helper method to define mock.On call +func (_e *Config_Expecter) MinIncomingConfirmations() *Config_MinIncomingConfirmations_Call { + return &Config_MinIncomingConfirmations_Call{Call: _e.mock.On("MinIncomingConfirmations")} +} + +func (_c *Config_MinIncomingConfirmations_Call) Run(run func()) *Config_MinIncomingConfirmations_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Config_MinIncomingConfirmations_Call) Return(_a0 uint32) *Config_MinIncomingConfirmations_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Config_MinIncomingConfirmations_Call) RunAndReturn(run func() uint32) *Config_MinIncomingConfirmations_Call { + _c.Call.Return(run) + return _c +} + // 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/vrf/mocks/fee_config.go b/core/services/vrf/mocks/fee_config.go index 0d62898862b..8633969e0a6 100644 --- a/core/services/vrf/mocks/fee_config.go +++ b/core/services/vrf/mocks/fee_config.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -16,6 +16,14 @@ type FeeConfig struct { mock.Mock } +type FeeConfig_Expecter struct { + mock *mock.Mock +} + +func (_m *FeeConfig) EXPECT() *FeeConfig_Expecter { + return &FeeConfig_Expecter{mock: &_m.Mock} +} + // LimitDefault provides a mock function with given fields: func (_m *FeeConfig) LimitDefault() uint64 { ret := _m.Called() @@ -34,6 +42,33 @@ func (_m *FeeConfig) LimitDefault() uint64 { return r0 } +// FeeConfig_LimitDefault_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LimitDefault' +type FeeConfig_LimitDefault_Call struct { + *mock.Call +} + +// LimitDefault is a helper method to define mock.On call +func (_e *FeeConfig_Expecter) LimitDefault() *FeeConfig_LimitDefault_Call { + return &FeeConfig_LimitDefault_Call{Call: _e.mock.On("LimitDefault")} +} + +func (_c *FeeConfig_LimitDefault_Call) Run(run func()) *FeeConfig_LimitDefault_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *FeeConfig_LimitDefault_Call) Return(_a0 uint64) *FeeConfig_LimitDefault_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *FeeConfig_LimitDefault_Call) RunAndReturn(run func() uint64) *FeeConfig_LimitDefault_Call { + _c.Call.Return(run) + return _c +} + // LimitJobType provides a mock function with given fields: func (_m *FeeConfig) LimitJobType() config.LimitJobType { ret := _m.Called() @@ -54,6 +89,33 @@ func (_m *FeeConfig) LimitJobType() config.LimitJobType { return r0 } +// FeeConfig_LimitJobType_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LimitJobType' +type FeeConfig_LimitJobType_Call struct { + *mock.Call +} + +// LimitJobType is a helper method to define mock.On call +func (_e *FeeConfig_Expecter) LimitJobType() *FeeConfig_LimitJobType_Call { + return &FeeConfig_LimitJobType_Call{Call: _e.mock.On("LimitJobType")} +} + +func (_c *FeeConfig_LimitJobType_Call) Run(run func()) *FeeConfig_LimitJobType_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *FeeConfig_LimitJobType_Call) Return(_a0 config.LimitJobType) *FeeConfig_LimitJobType_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *FeeConfig_LimitJobType_Call) RunAndReturn(run func() config.LimitJobType) *FeeConfig_LimitJobType_Call { + _c.Call.Return(run) + return _c +} + // PriceMaxKey provides a mock function with given fields: addr func (_m *FeeConfig) PriceMaxKey(addr common.Address) *assets.Wei { ret := _m.Called(addr) @@ -74,6 +136,34 @@ func (_m *FeeConfig) PriceMaxKey(addr common.Address) *assets.Wei { return r0 } +// FeeConfig_PriceMaxKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PriceMaxKey' +type FeeConfig_PriceMaxKey_Call struct { + *mock.Call +} + +// PriceMaxKey is a helper method to define mock.On call +// - addr common.Address +func (_e *FeeConfig_Expecter) PriceMaxKey(addr interface{}) *FeeConfig_PriceMaxKey_Call { + return &FeeConfig_PriceMaxKey_Call{Call: _e.mock.On("PriceMaxKey", addr)} +} + +func (_c *FeeConfig_PriceMaxKey_Call) Run(run func(addr common.Address)) *FeeConfig_PriceMaxKey_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(common.Address)) + }) + return _c +} + +func (_c *FeeConfig_PriceMaxKey_Call) Return(_a0 *assets.Wei) *FeeConfig_PriceMaxKey_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *FeeConfig_PriceMaxKey_Call) RunAndReturn(run func(common.Address) *assets.Wei) *FeeConfig_PriceMaxKey_Call { + _c.Call.Return(run) + return _c +} + // NewFeeConfig creates a new instance of FeeConfig. 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 NewFeeConfig(t interface { diff --git a/core/services/vrf/mocks/vrf_coordinator_v2.go b/core/services/vrf/mocks/vrf_coordinator_v2.go index e8c1467e44f..5901efb4a69 100644 --- a/core/services/vrf/mocks/vrf_coordinator_v2.go +++ b/core/services/vrf/mocks/vrf_coordinator_v2.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -24,6 +24,14 @@ type VRFCoordinatorV2Interface struct { mock.Mock } +type VRFCoordinatorV2Interface_Expecter struct { + mock *mock.Mock +} + +func (_m *VRFCoordinatorV2Interface) EXPECT() *VRFCoordinatorV2Interface_Expecter { + return &VRFCoordinatorV2Interface_Expecter{mock: &_m.Mock} +} + // AcceptOwnership provides a mock function with given fields: opts func (_m *VRFCoordinatorV2Interface) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { ret := _m.Called(opts) @@ -54,6 +62,34 @@ func (_m *VRFCoordinatorV2Interface) AcceptOwnership(opts *bind.TransactOpts) (* return r0, r1 } +// VRFCoordinatorV2Interface_AcceptOwnership_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AcceptOwnership' +type VRFCoordinatorV2Interface_AcceptOwnership_Call struct { + *mock.Call +} + +// AcceptOwnership is a helper method to define mock.On call +// - opts *bind.TransactOpts +func (_e *VRFCoordinatorV2Interface_Expecter) AcceptOwnership(opts interface{}) *VRFCoordinatorV2Interface_AcceptOwnership_Call { + return &VRFCoordinatorV2Interface_AcceptOwnership_Call{Call: _e.mock.On("AcceptOwnership", opts)} +} + +func (_c *VRFCoordinatorV2Interface_AcceptOwnership_Call) Run(run func(opts *bind.TransactOpts)) *VRFCoordinatorV2Interface_AcceptOwnership_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_AcceptOwnership_Call) Return(_a0 *types.Transaction, _a1 error) *VRFCoordinatorV2Interface_AcceptOwnership_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_AcceptOwnership_Call) RunAndReturn(run func(*bind.TransactOpts) (*types.Transaction, error)) *VRFCoordinatorV2Interface_AcceptOwnership_Call { + _c.Call.Return(run) + return _c +} + // AcceptSubscriptionOwnerTransfer provides a mock function with given fields: opts, subId func (_m *VRFCoordinatorV2Interface) AcceptSubscriptionOwnerTransfer(opts *bind.TransactOpts, subId uint64) (*types.Transaction, error) { ret := _m.Called(opts, subId) @@ -84,6 +120,35 @@ func (_m *VRFCoordinatorV2Interface) AcceptSubscriptionOwnerTransfer(opts *bind. return r0, r1 } +// VRFCoordinatorV2Interface_AcceptSubscriptionOwnerTransfer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AcceptSubscriptionOwnerTransfer' +type VRFCoordinatorV2Interface_AcceptSubscriptionOwnerTransfer_Call struct { + *mock.Call +} + +// AcceptSubscriptionOwnerTransfer is a helper method to define mock.On call +// - opts *bind.TransactOpts +// - subId uint64 +func (_e *VRFCoordinatorV2Interface_Expecter) AcceptSubscriptionOwnerTransfer(opts interface{}, subId interface{}) *VRFCoordinatorV2Interface_AcceptSubscriptionOwnerTransfer_Call { + return &VRFCoordinatorV2Interface_AcceptSubscriptionOwnerTransfer_Call{Call: _e.mock.On("AcceptSubscriptionOwnerTransfer", opts, subId)} +} + +func (_c *VRFCoordinatorV2Interface_AcceptSubscriptionOwnerTransfer_Call) Run(run func(opts *bind.TransactOpts, subId uint64)) *VRFCoordinatorV2Interface_AcceptSubscriptionOwnerTransfer_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts), args[1].(uint64)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_AcceptSubscriptionOwnerTransfer_Call) Return(_a0 *types.Transaction, _a1 error) *VRFCoordinatorV2Interface_AcceptSubscriptionOwnerTransfer_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_AcceptSubscriptionOwnerTransfer_Call) RunAndReturn(run func(*bind.TransactOpts, uint64) (*types.Transaction, error)) *VRFCoordinatorV2Interface_AcceptSubscriptionOwnerTransfer_Call { + _c.Call.Return(run) + return _c +} + // AddConsumer provides a mock function with given fields: opts, subId, consumer func (_m *VRFCoordinatorV2Interface) AddConsumer(opts *bind.TransactOpts, subId uint64, consumer common.Address) (*types.Transaction, error) { ret := _m.Called(opts, subId, consumer) @@ -114,6 +179,36 @@ func (_m *VRFCoordinatorV2Interface) AddConsumer(opts *bind.TransactOpts, subId return r0, r1 } +// VRFCoordinatorV2Interface_AddConsumer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddConsumer' +type VRFCoordinatorV2Interface_AddConsumer_Call struct { + *mock.Call +} + +// AddConsumer is a helper method to define mock.On call +// - opts *bind.TransactOpts +// - subId uint64 +// - consumer common.Address +func (_e *VRFCoordinatorV2Interface_Expecter) AddConsumer(opts interface{}, subId interface{}, consumer interface{}) *VRFCoordinatorV2Interface_AddConsumer_Call { + return &VRFCoordinatorV2Interface_AddConsumer_Call{Call: _e.mock.On("AddConsumer", opts, subId, consumer)} +} + +func (_c *VRFCoordinatorV2Interface_AddConsumer_Call) Run(run func(opts *bind.TransactOpts, subId uint64, consumer common.Address)) *VRFCoordinatorV2Interface_AddConsumer_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts), args[1].(uint64), args[2].(common.Address)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_AddConsumer_Call) Return(_a0 *types.Transaction, _a1 error) *VRFCoordinatorV2Interface_AddConsumer_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_AddConsumer_Call) RunAndReturn(run func(*bind.TransactOpts, uint64, common.Address) (*types.Transaction, error)) *VRFCoordinatorV2Interface_AddConsumer_Call { + _c.Call.Return(run) + return _c +} + // Address provides a mock function with given fields: func (_m *VRFCoordinatorV2Interface) Address() common.Address { ret := _m.Called() @@ -134,6 +229,33 @@ func (_m *VRFCoordinatorV2Interface) Address() common.Address { return r0 } +// VRFCoordinatorV2Interface_Address_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Address' +type VRFCoordinatorV2Interface_Address_Call struct { + *mock.Call +} + +// Address is a helper method to define mock.On call +func (_e *VRFCoordinatorV2Interface_Expecter) Address() *VRFCoordinatorV2Interface_Address_Call { + return &VRFCoordinatorV2Interface_Address_Call{Call: _e.mock.On("Address")} +} + +func (_c *VRFCoordinatorV2Interface_Address_Call) Run(run func()) *VRFCoordinatorV2Interface_Address_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_Address_Call) Return(_a0 common.Address) *VRFCoordinatorV2Interface_Address_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *VRFCoordinatorV2Interface_Address_Call) RunAndReturn(run func() common.Address) *VRFCoordinatorV2Interface_Address_Call { + _c.Call.Return(run) + return _c +} + // BLOCKHASHSTORE provides a mock function with given fields: opts func (_m *VRFCoordinatorV2Interface) BLOCKHASHSTORE(opts *bind.CallOpts) (common.Address, error) { ret := _m.Called(opts) @@ -164,6 +286,34 @@ func (_m *VRFCoordinatorV2Interface) BLOCKHASHSTORE(opts *bind.CallOpts) (common return r0, r1 } +// VRFCoordinatorV2Interface_BLOCKHASHSTORE_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BLOCKHASHSTORE' +type VRFCoordinatorV2Interface_BLOCKHASHSTORE_Call struct { + *mock.Call +} + +// BLOCKHASHSTORE is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *VRFCoordinatorV2Interface_Expecter) BLOCKHASHSTORE(opts interface{}) *VRFCoordinatorV2Interface_BLOCKHASHSTORE_Call { + return &VRFCoordinatorV2Interface_BLOCKHASHSTORE_Call{Call: _e.mock.On("BLOCKHASHSTORE", opts)} +} + +func (_c *VRFCoordinatorV2Interface_BLOCKHASHSTORE_Call) Run(run func(opts *bind.CallOpts)) *VRFCoordinatorV2Interface_BLOCKHASHSTORE_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_BLOCKHASHSTORE_Call) Return(_a0 common.Address, _a1 error) *VRFCoordinatorV2Interface_BLOCKHASHSTORE_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_BLOCKHASHSTORE_Call) RunAndReturn(run func(*bind.CallOpts) (common.Address, error)) *VRFCoordinatorV2Interface_BLOCKHASHSTORE_Call { + _c.Call.Return(run) + return _c +} + // CancelSubscription provides a mock function with given fields: opts, subId, to func (_m *VRFCoordinatorV2Interface) CancelSubscription(opts *bind.TransactOpts, subId uint64, to common.Address) (*types.Transaction, error) { ret := _m.Called(opts, subId, to) @@ -194,6 +344,36 @@ func (_m *VRFCoordinatorV2Interface) CancelSubscription(opts *bind.TransactOpts, return r0, r1 } +// VRFCoordinatorV2Interface_CancelSubscription_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CancelSubscription' +type VRFCoordinatorV2Interface_CancelSubscription_Call struct { + *mock.Call +} + +// CancelSubscription is a helper method to define mock.On call +// - opts *bind.TransactOpts +// - subId uint64 +// - to common.Address +func (_e *VRFCoordinatorV2Interface_Expecter) CancelSubscription(opts interface{}, subId interface{}, to interface{}) *VRFCoordinatorV2Interface_CancelSubscription_Call { + return &VRFCoordinatorV2Interface_CancelSubscription_Call{Call: _e.mock.On("CancelSubscription", opts, subId, to)} +} + +func (_c *VRFCoordinatorV2Interface_CancelSubscription_Call) Run(run func(opts *bind.TransactOpts, subId uint64, to common.Address)) *VRFCoordinatorV2Interface_CancelSubscription_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts), args[1].(uint64), args[2].(common.Address)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_CancelSubscription_Call) Return(_a0 *types.Transaction, _a1 error) *VRFCoordinatorV2Interface_CancelSubscription_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_CancelSubscription_Call) RunAndReturn(run func(*bind.TransactOpts, uint64, common.Address) (*types.Transaction, error)) *VRFCoordinatorV2Interface_CancelSubscription_Call { + _c.Call.Return(run) + return _c +} + // CreateSubscription provides a mock function with given fields: opts func (_m *VRFCoordinatorV2Interface) CreateSubscription(opts *bind.TransactOpts) (*types.Transaction, error) { ret := _m.Called(opts) @@ -224,6 +404,34 @@ func (_m *VRFCoordinatorV2Interface) CreateSubscription(opts *bind.TransactOpts) return r0, r1 } +// VRFCoordinatorV2Interface_CreateSubscription_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateSubscription' +type VRFCoordinatorV2Interface_CreateSubscription_Call struct { + *mock.Call +} + +// CreateSubscription is a helper method to define mock.On call +// - opts *bind.TransactOpts +func (_e *VRFCoordinatorV2Interface_Expecter) CreateSubscription(opts interface{}) *VRFCoordinatorV2Interface_CreateSubscription_Call { + return &VRFCoordinatorV2Interface_CreateSubscription_Call{Call: _e.mock.On("CreateSubscription", opts)} +} + +func (_c *VRFCoordinatorV2Interface_CreateSubscription_Call) Run(run func(opts *bind.TransactOpts)) *VRFCoordinatorV2Interface_CreateSubscription_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_CreateSubscription_Call) Return(_a0 *types.Transaction, _a1 error) *VRFCoordinatorV2Interface_CreateSubscription_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_CreateSubscription_Call) RunAndReturn(run func(*bind.TransactOpts) (*types.Transaction, error)) *VRFCoordinatorV2Interface_CreateSubscription_Call { + _c.Call.Return(run) + return _c +} + // DeregisterProvingKey provides a mock function with given fields: opts, publicProvingKey func (_m *VRFCoordinatorV2Interface) DeregisterProvingKey(opts *bind.TransactOpts, publicProvingKey [2]*big.Int) (*types.Transaction, error) { ret := _m.Called(opts, publicProvingKey) @@ -254,6 +462,35 @@ func (_m *VRFCoordinatorV2Interface) DeregisterProvingKey(opts *bind.TransactOpt return r0, r1 } +// VRFCoordinatorV2Interface_DeregisterProvingKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeregisterProvingKey' +type VRFCoordinatorV2Interface_DeregisterProvingKey_Call struct { + *mock.Call +} + +// DeregisterProvingKey is a helper method to define mock.On call +// - opts *bind.TransactOpts +// - publicProvingKey [2]*big.Int +func (_e *VRFCoordinatorV2Interface_Expecter) DeregisterProvingKey(opts interface{}, publicProvingKey interface{}) *VRFCoordinatorV2Interface_DeregisterProvingKey_Call { + return &VRFCoordinatorV2Interface_DeregisterProvingKey_Call{Call: _e.mock.On("DeregisterProvingKey", opts, publicProvingKey)} +} + +func (_c *VRFCoordinatorV2Interface_DeregisterProvingKey_Call) Run(run func(opts *bind.TransactOpts, publicProvingKey [2]*big.Int)) *VRFCoordinatorV2Interface_DeregisterProvingKey_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts), args[1].([2]*big.Int)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_DeregisterProvingKey_Call) Return(_a0 *types.Transaction, _a1 error) *VRFCoordinatorV2Interface_DeregisterProvingKey_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_DeregisterProvingKey_Call) RunAndReturn(run func(*bind.TransactOpts, [2]*big.Int) (*types.Transaction, error)) *VRFCoordinatorV2Interface_DeregisterProvingKey_Call { + _c.Call.Return(run) + return _c +} + // FilterConfigSet provides a mock function with given fields: opts func (_m *VRFCoordinatorV2Interface) FilterConfigSet(opts *bind.FilterOpts) (*vrf_coordinator_v2.VRFCoordinatorV2ConfigSetIterator, error) { ret := _m.Called(opts) @@ -284,6 +521,34 @@ func (_m *VRFCoordinatorV2Interface) FilterConfigSet(opts *bind.FilterOpts) (*vr return r0, r1 } +// VRFCoordinatorV2Interface_FilterConfigSet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterConfigSet' +type VRFCoordinatorV2Interface_FilterConfigSet_Call struct { + *mock.Call +} + +// FilterConfigSet is a helper method to define mock.On call +// - opts *bind.FilterOpts +func (_e *VRFCoordinatorV2Interface_Expecter) FilterConfigSet(opts interface{}) *VRFCoordinatorV2Interface_FilterConfigSet_Call { + return &VRFCoordinatorV2Interface_FilterConfigSet_Call{Call: _e.mock.On("FilterConfigSet", opts)} +} + +func (_c *VRFCoordinatorV2Interface_FilterConfigSet_Call) Run(run func(opts *bind.FilterOpts)) *VRFCoordinatorV2Interface_FilterConfigSet_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_FilterConfigSet_Call) Return(_a0 *vrf_coordinator_v2.VRFCoordinatorV2ConfigSetIterator, _a1 error) *VRFCoordinatorV2Interface_FilterConfigSet_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_FilterConfigSet_Call) RunAndReturn(run func(*bind.FilterOpts) (*vrf_coordinator_v2.VRFCoordinatorV2ConfigSetIterator, error)) *VRFCoordinatorV2Interface_FilterConfigSet_Call { + _c.Call.Return(run) + return _c +} + // FilterFundsRecovered provides a mock function with given fields: opts func (_m *VRFCoordinatorV2Interface) FilterFundsRecovered(opts *bind.FilterOpts) (*vrf_coordinator_v2.VRFCoordinatorV2FundsRecoveredIterator, error) { ret := _m.Called(opts) @@ -314,6 +579,34 @@ func (_m *VRFCoordinatorV2Interface) FilterFundsRecovered(opts *bind.FilterOpts) return r0, r1 } +// VRFCoordinatorV2Interface_FilterFundsRecovered_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterFundsRecovered' +type VRFCoordinatorV2Interface_FilterFundsRecovered_Call struct { + *mock.Call +} + +// FilterFundsRecovered is a helper method to define mock.On call +// - opts *bind.FilterOpts +func (_e *VRFCoordinatorV2Interface_Expecter) FilterFundsRecovered(opts interface{}) *VRFCoordinatorV2Interface_FilterFundsRecovered_Call { + return &VRFCoordinatorV2Interface_FilterFundsRecovered_Call{Call: _e.mock.On("FilterFundsRecovered", opts)} +} + +func (_c *VRFCoordinatorV2Interface_FilterFundsRecovered_Call) Run(run func(opts *bind.FilterOpts)) *VRFCoordinatorV2Interface_FilterFundsRecovered_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_FilterFundsRecovered_Call) Return(_a0 *vrf_coordinator_v2.VRFCoordinatorV2FundsRecoveredIterator, _a1 error) *VRFCoordinatorV2Interface_FilterFundsRecovered_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_FilterFundsRecovered_Call) RunAndReturn(run func(*bind.FilterOpts) (*vrf_coordinator_v2.VRFCoordinatorV2FundsRecoveredIterator, error)) *VRFCoordinatorV2Interface_FilterFundsRecovered_Call { + _c.Call.Return(run) + return _c +} + // FilterOwnershipTransferRequested provides a mock function with given fields: opts, from, to func (_m *VRFCoordinatorV2Interface) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*vrf_coordinator_v2.VRFCoordinatorV2OwnershipTransferRequestedIterator, error) { ret := _m.Called(opts, from, to) @@ -344,6 +637,36 @@ func (_m *VRFCoordinatorV2Interface) FilterOwnershipTransferRequested(opts *bind return r0, r1 } +// VRFCoordinatorV2Interface_FilterOwnershipTransferRequested_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterOwnershipTransferRequested' +type VRFCoordinatorV2Interface_FilterOwnershipTransferRequested_Call struct { + *mock.Call +} + +// FilterOwnershipTransferRequested is a helper method to define mock.On call +// - opts *bind.FilterOpts +// - from []common.Address +// - to []common.Address +func (_e *VRFCoordinatorV2Interface_Expecter) FilterOwnershipTransferRequested(opts interface{}, from interface{}, to interface{}) *VRFCoordinatorV2Interface_FilterOwnershipTransferRequested_Call { + return &VRFCoordinatorV2Interface_FilterOwnershipTransferRequested_Call{Call: _e.mock.On("FilterOwnershipTransferRequested", opts, from, to)} +} + +func (_c *VRFCoordinatorV2Interface_FilterOwnershipTransferRequested_Call) Run(run func(opts *bind.FilterOpts, from []common.Address, to []common.Address)) *VRFCoordinatorV2Interface_FilterOwnershipTransferRequested_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts), args[1].([]common.Address), args[2].([]common.Address)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_FilterOwnershipTransferRequested_Call) Return(_a0 *vrf_coordinator_v2.VRFCoordinatorV2OwnershipTransferRequestedIterator, _a1 error) *VRFCoordinatorV2Interface_FilterOwnershipTransferRequested_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_FilterOwnershipTransferRequested_Call) RunAndReturn(run func(*bind.FilterOpts, []common.Address, []common.Address) (*vrf_coordinator_v2.VRFCoordinatorV2OwnershipTransferRequestedIterator, error)) *VRFCoordinatorV2Interface_FilterOwnershipTransferRequested_Call { + _c.Call.Return(run) + return _c +} + // FilterOwnershipTransferred provides a mock function with given fields: opts, from, to func (_m *VRFCoordinatorV2Interface) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*vrf_coordinator_v2.VRFCoordinatorV2OwnershipTransferredIterator, error) { ret := _m.Called(opts, from, to) @@ -374,6 +697,36 @@ func (_m *VRFCoordinatorV2Interface) FilterOwnershipTransferred(opts *bind.Filte return r0, r1 } +// VRFCoordinatorV2Interface_FilterOwnershipTransferred_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterOwnershipTransferred' +type VRFCoordinatorV2Interface_FilterOwnershipTransferred_Call struct { + *mock.Call +} + +// FilterOwnershipTransferred is a helper method to define mock.On call +// - opts *bind.FilterOpts +// - from []common.Address +// - to []common.Address +func (_e *VRFCoordinatorV2Interface_Expecter) FilterOwnershipTransferred(opts interface{}, from interface{}, to interface{}) *VRFCoordinatorV2Interface_FilterOwnershipTransferred_Call { + return &VRFCoordinatorV2Interface_FilterOwnershipTransferred_Call{Call: _e.mock.On("FilterOwnershipTransferred", opts, from, to)} +} + +func (_c *VRFCoordinatorV2Interface_FilterOwnershipTransferred_Call) Run(run func(opts *bind.FilterOpts, from []common.Address, to []common.Address)) *VRFCoordinatorV2Interface_FilterOwnershipTransferred_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts), args[1].([]common.Address), args[2].([]common.Address)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_FilterOwnershipTransferred_Call) Return(_a0 *vrf_coordinator_v2.VRFCoordinatorV2OwnershipTransferredIterator, _a1 error) *VRFCoordinatorV2Interface_FilterOwnershipTransferred_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_FilterOwnershipTransferred_Call) RunAndReturn(run func(*bind.FilterOpts, []common.Address, []common.Address) (*vrf_coordinator_v2.VRFCoordinatorV2OwnershipTransferredIterator, error)) *VRFCoordinatorV2Interface_FilterOwnershipTransferred_Call { + _c.Call.Return(run) + return _c +} + // FilterProvingKeyDeregistered provides a mock function with given fields: opts, oracle func (_m *VRFCoordinatorV2Interface) FilterProvingKeyDeregistered(opts *bind.FilterOpts, oracle []common.Address) (*vrf_coordinator_v2.VRFCoordinatorV2ProvingKeyDeregisteredIterator, error) { ret := _m.Called(opts, oracle) @@ -404,6 +757,35 @@ func (_m *VRFCoordinatorV2Interface) FilterProvingKeyDeregistered(opts *bind.Fil return r0, r1 } +// VRFCoordinatorV2Interface_FilterProvingKeyDeregistered_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterProvingKeyDeregistered' +type VRFCoordinatorV2Interface_FilterProvingKeyDeregistered_Call struct { + *mock.Call +} + +// FilterProvingKeyDeregistered is a helper method to define mock.On call +// - opts *bind.FilterOpts +// - oracle []common.Address +func (_e *VRFCoordinatorV2Interface_Expecter) FilterProvingKeyDeregistered(opts interface{}, oracle interface{}) *VRFCoordinatorV2Interface_FilterProvingKeyDeregistered_Call { + return &VRFCoordinatorV2Interface_FilterProvingKeyDeregistered_Call{Call: _e.mock.On("FilterProvingKeyDeregistered", opts, oracle)} +} + +func (_c *VRFCoordinatorV2Interface_FilterProvingKeyDeregistered_Call) Run(run func(opts *bind.FilterOpts, oracle []common.Address)) *VRFCoordinatorV2Interface_FilterProvingKeyDeregistered_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts), args[1].([]common.Address)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_FilterProvingKeyDeregistered_Call) Return(_a0 *vrf_coordinator_v2.VRFCoordinatorV2ProvingKeyDeregisteredIterator, _a1 error) *VRFCoordinatorV2Interface_FilterProvingKeyDeregistered_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_FilterProvingKeyDeregistered_Call) RunAndReturn(run func(*bind.FilterOpts, []common.Address) (*vrf_coordinator_v2.VRFCoordinatorV2ProvingKeyDeregisteredIterator, error)) *VRFCoordinatorV2Interface_FilterProvingKeyDeregistered_Call { + _c.Call.Return(run) + return _c +} + // FilterProvingKeyRegistered provides a mock function with given fields: opts, oracle func (_m *VRFCoordinatorV2Interface) FilterProvingKeyRegistered(opts *bind.FilterOpts, oracle []common.Address) (*vrf_coordinator_v2.VRFCoordinatorV2ProvingKeyRegisteredIterator, error) { ret := _m.Called(opts, oracle) @@ -434,6 +816,35 @@ func (_m *VRFCoordinatorV2Interface) FilterProvingKeyRegistered(opts *bind.Filte return r0, r1 } +// VRFCoordinatorV2Interface_FilterProvingKeyRegistered_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterProvingKeyRegistered' +type VRFCoordinatorV2Interface_FilterProvingKeyRegistered_Call struct { + *mock.Call +} + +// FilterProvingKeyRegistered is a helper method to define mock.On call +// - opts *bind.FilterOpts +// - oracle []common.Address +func (_e *VRFCoordinatorV2Interface_Expecter) FilterProvingKeyRegistered(opts interface{}, oracle interface{}) *VRFCoordinatorV2Interface_FilterProvingKeyRegistered_Call { + return &VRFCoordinatorV2Interface_FilterProvingKeyRegistered_Call{Call: _e.mock.On("FilterProvingKeyRegistered", opts, oracle)} +} + +func (_c *VRFCoordinatorV2Interface_FilterProvingKeyRegistered_Call) Run(run func(opts *bind.FilterOpts, oracle []common.Address)) *VRFCoordinatorV2Interface_FilterProvingKeyRegistered_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts), args[1].([]common.Address)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_FilterProvingKeyRegistered_Call) Return(_a0 *vrf_coordinator_v2.VRFCoordinatorV2ProvingKeyRegisteredIterator, _a1 error) *VRFCoordinatorV2Interface_FilterProvingKeyRegistered_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_FilterProvingKeyRegistered_Call) RunAndReturn(run func(*bind.FilterOpts, []common.Address) (*vrf_coordinator_v2.VRFCoordinatorV2ProvingKeyRegisteredIterator, error)) *VRFCoordinatorV2Interface_FilterProvingKeyRegistered_Call { + _c.Call.Return(run) + return _c +} + // FilterRandomWordsFulfilled provides a mock function with given fields: opts, requestId func (_m *VRFCoordinatorV2Interface) FilterRandomWordsFulfilled(opts *bind.FilterOpts, requestId []*big.Int) (*vrf_coordinator_v2.VRFCoordinatorV2RandomWordsFulfilledIterator, error) { ret := _m.Called(opts, requestId) @@ -464,6 +875,35 @@ func (_m *VRFCoordinatorV2Interface) FilterRandomWordsFulfilled(opts *bind.Filte return r0, r1 } +// VRFCoordinatorV2Interface_FilterRandomWordsFulfilled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterRandomWordsFulfilled' +type VRFCoordinatorV2Interface_FilterRandomWordsFulfilled_Call struct { + *mock.Call +} + +// FilterRandomWordsFulfilled is a helper method to define mock.On call +// - opts *bind.FilterOpts +// - requestId []*big.Int +func (_e *VRFCoordinatorV2Interface_Expecter) FilterRandomWordsFulfilled(opts interface{}, requestId interface{}) *VRFCoordinatorV2Interface_FilterRandomWordsFulfilled_Call { + return &VRFCoordinatorV2Interface_FilterRandomWordsFulfilled_Call{Call: _e.mock.On("FilterRandomWordsFulfilled", opts, requestId)} +} + +func (_c *VRFCoordinatorV2Interface_FilterRandomWordsFulfilled_Call) Run(run func(opts *bind.FilterOpts, requestId []*big.Int)) *VRFCoordinatorV2Interface_FilterRandomWordsFulfilled_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts), args[1].([]*big.Int)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_FilterRandomWordsFulfilled_Call) Return(_a0 *vrf_coordinator_v2.VRFCoordinatorV2RandomWordsFulfilledIterator, _a1 error) *VRFCoordinatorV2Interface_FilterRandomWordsFulfilled_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_FilterRandomWordsFulfilled_Call) RunAndReturn(run func(*bind.FilterOpts, []*big.Int) (*vrf_coordinator_v2.VRFCoordinatorV2RandomWordsFulfilledIterator, error)) *VRFCoordinatorV2Interface_FilterRandomWordsFulfilled_Call { + _c.Call.Return(run) + return _c +} + // FilterRandomWordsRequested provides a mock function with given fields: opts, keyHash, subId, sender func (_m *VRFCoordinatorV2Interface) FilterRandomWordsRequested(opts *bind.FilterOpts, keyHash [][32]byte, subId []uint64, sender []common.Address) (*vrf_coordinator_v2.VRFCoordinatorV2RandomWordsRequestedIterator, error) { ret := _m.Called(opts, keyHash, subId, sender) @@ -494,6 +934,37 @@ func (_m *VRFCoordinatorV2Interface) FilterRandomWordsRequested(opts *bind.Filte return r0, r1 } +// VRFCoordinatorV2Interface_FilterRandomWordsRequested_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterRandomWordsRequested' +type VRFCoordinatorV2Interface_FilterRandomWordsRequested_Call struct { + *mock.Call +} + +// FilterRandomWordsRequested is a helper method to define mock.On call +// - opts *bind.FilterOpts +// - keyHash [][32]byte +// - subId []uint64 +// - sender []common.Address +func (_e *VRFCoordinatorV2Interface_Expecter) FilterRandomWordsRequested(opts interface{}, keyHash interface{}, subId interface{}, sender interface{}) *VRFCoordinatorV2Interface_FilterRandomWordsRequested_Call { + return &VRFCoordinatorV2Interface_FilterRandomWordsRequested_Call{Call: _e.mock.On("FilterRandomWordsRequested", opts, keyHash, subId, sender)} +} + +func (_c *VRFCoordinatorV2Interface_FilterRandomWordsRequested_Call) Run(run func(opts *bind.FilterOpts, keyHash [][32]byte, subId []uint64, sender []common.Address)) *VRFCoordinatorV2Interface_FilterRandomWordsRequested_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts), args[1].([][32]byte), args[2].([]uint64), args[3].([]common.Address)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_FilterRandomWordsRequested_Call) Return(_a0 *vrf_coordinator_v2.VRFCoordinatorV2RandomWordsRequestedIterator, _a1 error) *VRFCoordinatorV2Interface_FilterRandomWordsRequested_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_FilterRandomWordsRequested_Call) RunAndReturn(run func(*bind.FilterOpts, [][32]byte, []uint64, []common.Address) (*vrf_coordinator_v2.VRFCoordinatorV2RandomWordsRequestedIterator, error)) *VRFCoordinatorV2Interface_FilterRandomWordsRequested_Call { + _c.Call.Return(run) + return _c +} + // FilterSubscriptionCanceled provides a mock function with given fields: opts, subId func (_m *VRFCoordinatorV2Interface) FilterSubscriptionCanceled(opts *bind.FilterOpts, subId []uint64) (*vrf_coordinator_v2.VRFCoordinatorV2SubscriptionCanceledIterator, error) { ret := _m.Called(opts, subId) @@ -524,6 +995,35 @@ func (_m *VRFCoordinatorV2Interface) FilterSubscriptionCanceled(opts *bind.Filte return r0, r1 } +// VRFCoordinatorV2Interface_FilterSubscriptionCanceled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterSubscriptionCanceled' +type VRFCoordinatorV2Interface_FilterSubscriptionCanceled_Call struct { + *mock.Call +} + +// FilterSubscriptionCanceled is a helper method to define mock.On call +// - opts *bind.FilterOpts +// - subId []uint64 +func (_e *VRFCoordinatorV2Interface_Expecter) FilterSubscriptionCanceled(opts interface{}, subId interface{}) *VRFCoordinatorV2Interface_FilterSubscriptionCanceled_Call { + return &VRFCoordinatorV2Interface_FilterSubscriptionCanceled_Call{Call: _e.mock.On("FilterSubscriptionCanceled", opts, subId)} +} + +func (_c *VRFCoordinatorV2Interface_FilterSubscriptionCanceled_Call) Run(run func(opts *bind.FilterOpts, subId []uint64)) *VRFCoordinatorV2Interface_FilterSubscriptionCanceled_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts), args[1].([]uint64)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_FilterSubscriptionCanceled_Call) Return(_a0 *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionCanceledIterator, _a1 error) *VRFCoordinatorV2Interface_FilterSubscriptionCanceled_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_FilterSubscriptionCanceled_Call) RunAndReturn(run func(*bind.FilterOpts, []uint64) (*vrf_coordinator_v2.VRFCoordinatorV2SubscriptionCanceledIterator, error)) *VRFCoordinatorV2Interface_FilterSubscriptionCanceled_Call { + _c.Call.Return(run) + return _c +} + // FilterSubscriptionConsumerAdded provides a mock function with given fields: opts, subId func (_m *VRFCoordinatorV2Interface) FilterSubscriptionConsumerAdded(opts *bind.FilterOpts, subId []uint64) (*vrf_coordinator_v2.VRFCoordinatorV2SubscriptionConsumerAddedIterator, error) { ret := _m.Called(opts, subId) @@ -554,6 +1054,35 @@ func (_m *VRFCoordinatorV2Interface) FilterSubscriptionConsumerAdded(opts *bind. return r0, r1 } +// VRFCoordinatorV2Interface_FilterSubscriptionConsumerAdded_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterSubscriptionConsumerAdded' +type VRFCoordinatorV2Interface_FilterSubscriptionConsumerAdded_Call struct { + *mock.Call +} + +// FilterSubscriptionConsumerAdded is a helper method to define mock.On call +// - opts *bind.FilterOpts +// - subId []uint64 +func (_e *VRFCoordinatorV2Interface_Expecter) FilterSubscriptionConsumerAdded(opts interface{}, subId interface{}) *VRFCoordinatorV2Interface_FilterSubscriptionConsumerAdded_Call { + return &VRFCoordinatorV2Interface_FilterSubscriptionConsumerAdded_Call{Call: _e.mock.On("FilterSubscriptionConsumerAdded", opts, subId)} +} + +func (_c *VRFCoordinatorV2Interface_FilterSubscriptionConsumerAdded_Call) Run(run func(opts *bind.FilterOpts, subId []uint64)) *VRFCoordinatorV2Interface_FilterSubscriptionConsumerAdded_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts), args[1].([]uint64)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_FilterSubscriptionConsumerAdded_Call) Return(_a0 *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionConsumerAddedIterator, _a1 error) *VRFCoordinatorV2Interface_FilterSubscriptionConsumerAdded_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_FilterSubscriptionConsumerAdded_Call) RunAndReturn(run func(*bind.FilterOpts, []uint64) (*vrf_coordinator_v2.VRFCoordinatorV2SubscriptionConsumerAddedIterator, error)) *VRFCoordinatorV2Interface_FilterSubscriptionConsumerAdded_Call { + _c.Call.Return(run) + return _c +} + // FilterSubscriptionConsumerRemoved provides a mock function with given fields: opts, subId func (_m *VRFCoordinatorV2Interface) FilterSubscriptionConsumerRemoved(opts *bind.FilterOpts, subId []uint64) (*vrf_coordinator_v2.VRFCoordinatorV2SubscriptionConsumerRemovedIterator, error) { ret := _m.Called(opts, subId) @@ -584,6 +1113,35 @@ func (_m *VRFCoordinatorV2Interface) FilterSubscriptionConsumerRemoved(opts *bin return r0, r1 } +// VRFCoordinatorV2Interface_FilterSubscriptionConsumerRemoved_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterSubscriptionConsumerRemoved' +type VRFCoordinatorV2Interface_FilterSubscriptionConsumerRemoved_Call struct { + *mock.Call +} + +// FilterSubscriptionConsumerRemoved is a helper method to define mock.On call +// - opts *bind.FilterOpts +// - subId []uint64 +func (_e *VRFCoordinatorV2Interface_Expecter) FilterSubscriptionConsumerRemoved(opts interface{}, subId interface{}) *VRFCoordinatorV2Interface_FilterSubscriptionConsumerRemoved_Call { + return &VRFCoordinatorV2Interface_FilterSubscriptionConsumerRemoved_Call{Call: _e.mock.On("FilterSubscriptionConsumerRemoved", opts, subId)} +} + +func (_c *VRFCoordinatorV2Interface_FilterSubscriptionConsumerRemoved_Call) Run(run func(opts *bind.FilterOpts, subId []uint64)) *VRFCoordinatorV2Interface_FilterSubscriptionConsumerRemoved_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts), args[1].([]uint64)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_FilterSubscriptionConsumerRemoved_Call) Return(_a0 *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionConsumerRemovedIterator, _a1 error) *VRFCoordinatorV2Interface_FilterSubscriptionConsumerRemoved_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_FilterSubscriptionConsumerRemoved_Call) RunAndReturn(run func(*bind.FilterOpts, []uint64) (*vrf_coordinator_v2.VRFCoordinatorV2SubscriptionConsumerRemovedIterator, error)) *VRFCoordinatorV2Interface_FilterSubscriptionConsumerRemoved_Call { + _c.Call.Return(run) + return _c +} + // FilterSubscriptionCreated provides a mock function with given fields: opts, subId func (_m *VRFCoordinatorV2Interface) FilterSubscriptionCreated(opts *bind.FilterOpts, subId []uint64) (*vrf_coordinator_v2.VRFCoordinatorV2SubscriptionCreatedIterator, error) { ret := _m.Called(opts, subId) @@ -614,6 +1172,35 @@ func (_m *VRFCoordinatorV2Interface) FilterSubscriptionCreated(opts *bind.Filter return r0, r1 } +// VRFCoordinatorV2Interface_FilterSubscriptionCreated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterSubscriptionCreated' +type VRFCoordinatorV2Interface_FilterSubscriptionCreated_Call struct { + *mock.Call +} + +// FilterSubscriptionCreated is a helper method to define mock.On call +// - opts *bind.FilterOpts +// - subId []uint64 +func (_e *VRFCoordinatorV2Interface_Expecter) FilterSubscriptionCreated(opts interface{}, subId interface{}) *VRFCoordinatorV2Interface_FilterSubscriptionCreated_Call { + return &VRFCoordinatorV2Interface_FilterSubscriptionCreated_Call{Call: _e.mock.On("FilterSubscriptionCreated", opts, subId)} +} + +func (_c *VRFCoordinatorV2Interface_FilterSubscriptionCreated_Call) Run(run func(opts *bind.FilterOpts, subId []uint64)) *VRFCoordinatorV2Interface_FilterSubscriptionCreated_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts), args[1].([]uint64)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_FilterSubscriptionCreated_Call) Return(_a0 *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionCreatedIterator, _a1 error) *VRFCoordinatorV2Interface_FilterSubscriptionCreated_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_FilterSubscriptionCreated_Call) RunAndReturn(run func(*bind.FilterOpts, []uint64) (*vrf_coordinator_v2.VRFCoordinatorV2SubscriptionCreatedIterator, error)) *VRFCoordinatorV2Interface_FilterSubscriptionCreated_Call { + _c.Call.Return(run) + return _c +} + // FilterSubscriptionFunded provides a mock function with given fields: opts, subId func (_m *VRFCoordinatorV2Interface) FilterSubscriptionFunded(opts *bind.FilterOpts, subId []uint64) (*vrf_coordinator_v2.VRFCoordinatorV2SubscriptionFundedIterator, error) { ret := _m.Called(opts, subId) @@ -644,6 +1231,35 @@ func (_m *VRFCoordinatorV2Interface) FilterSubscriptionFunded(opts *bind.FilterO return r0, r1 } +// VRFCoordinatorV2Interface_FilterSubscriptionFunded_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterSubscriptionFunded' +type VRFCoordinatorV2Interface_FilterSubscriptionFunded_Call struct { + *mock.Call +} + +// FilterSubscriptionFunded is a helper method to define mock.On call +// - opts *bind.FilterOpts +// - subId []uint64 +func (_e *VRFCoordinatorV2Interface_Expecter) FilterSubscriptionFunded(opts interface{}, subId interface{}) *VRFCoordinatorV2Interface_FilterSubscriptionFunded_Call { + return &VRFCoordinatorV2Interface_FilterSubscriptionFunded_Call{Call: _e.mock.On("FilterSubscriptionFunded", opts, subId)} +} + +func (_c *VRFCoordinatorV2Interface_FilterSubscriptionFunded_Call) Run(run func(opts *bind.FilterOpts, subId []uint64)) *VRFCoordinatorV2Interface_FilterSubscriptionFunded_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts), args[1].([]uint64)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_FilterSubscriptionFunded_Call) Return(_a0 *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionFundedIterator, _a1 error) *VRFCoordinatorV2Interface_FilterSubscriptionFunded_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_FilterSubscriptionFunded_Call) RunAndReturn(run func(*bind.FilterOpts, []uint64) (*vrf_coordinator_v2.VRFCoordinatorV2SubscriptionFundedIterator, error)) *VRFCoordinatorV2Interface_FilterSubscriptionFunded_Call { + _c.Call.Return(run) + return _c +} + // FilterSubscriptionOwnerTransferRequested provides a mock function with given fields: opts, subId func (_m *VRFCoordinatorV2Interface) FilterSubscriptionOwnerTransferRequested(opts *bind.FilterOpts, subId []uint64) (*vrf_coordinator_v2.VRFCoordinatorV2SubscriptionOwnerTransferRequestedIterator, error) { ret := _m.Called(opts, subId) @@ -674,6 +1290,35 @@ func (_m *VRFCoordinatorV2Interface) FilterSubscriptionOwnerTransferRequested(op return r0, r1 } +// VRFCoordinatorV2Interface_FilterSubscriptionOwnerTransferRequested_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterSubscriptionOwnerTransferRequested' +type VRFCoordinatorV2Interface_FilterSubscriptionOwnerTransferRequested_Call struct { + *mock.Call +} + +// FilterSubscriptionOwnerTransferRequested is a helper method to define mock.On call +// - opts *bind.FilterOpts +// - subId []uint64 +func (_e *VRFCoordinatorV2Interface_Expecter) FilterSubscriptionOwnerTransferRequested(opts interface{}, subId interface{}) *VRFCoordinatorV2Interface_FilterSubscriptionOwnerTransferRequested_Call { + return &VRFCoordinatorV2Interface_FilterSubscriptionOwnerTransferRequested_Call{Call: _e.mock.On("FilterSubscriptionOwnerTransferRequested", opts, subId)} +} + +func (_c *VRFCoordinatorV2Interface_FilterSubscriptionOwnerTransferRequested_Call) Run(run func(opts *bind.FilterOpts, subId []uint64)) *VRFCoordinatorV2Interface_FilterSubscriptionOwnerTransferRequested_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts), args[1].([]uint64)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_FilterSubscriptionOwnerTransferRequested_Call) Return(_a0 *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionOwnerTransferRequestedIterator, _a1 error) *VRFCoordinatorV2Interface_FilterSubscriptionOwnerTransferRequested_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_FilterSubscriptionOwnerTransferRequested_Call) RunAndReturn(run func(*bind.FilterOpts, []uint64) (*vrf_coordinator_v2.VRFCoordinatorV2SubscriptionOwnerTransferRequestedIterator, error)) *VRFCoordinatorV2Interface_FilterSubscriptionOwnerTransferRequested_Call { + _c.Call.Return(run) + return _c +} + // FilterSubscriptionOwnerTransferred provides a mock function with given fields: opts, subId func (_m *VRFCoordinatorV2Interface) FilterSubscriptionOwnerTransferred(opts *bind.FilterOpts, subId []uint64) (*vrf_coordinator_v2.VRFCoordinatorV2SubscriptionOwnerTransferredIterator, error) { ret := _m.Called(opts, subId) @@ -704,6 +1349,35 @@ func (_m *VRFCoordinatorV2Interface) FilterSubscriptionOwnerTransferred(opts *bi return r0, r1 } +// VRFCoordinatorV2Interface_FilterSubscriptionOwnerTransferred_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FilterSubscriptionOwnerTransferred' +type VRFCoordinatorV2Interface_FilterSubscriptionOwnerTransferred_Call struct { + *mock.Call +} + +// FilterSubscriptionOwnerTransferred is a helper method to define mock.On call +// - opts *bind.FilterOpts +// - subId []uint64 +func (_e *VRFCoordinatorV2Interface_Expecter) FilterSubscriptionOwnerTransferred(opts interface{}, subId interface{}) *VRFCoordinatorV2Interface_FilterSubscriptionOwnerTransferred_Call { + return &VRFCoordinatorV2Interface_FilterSubscriptionOwnerTransferred_Call{Call: _e.mock.On("FilterSubscriptionOwnerTransferred", opts, subId)} +} + +func (_c *VRFCoordinatorV2Interface_FilterSubscriptionOwnerTransferred_Call) Run(run func(opts *bind.FilterOpts, subId []uint64)) *VRFCoordinatorV2Interface_FilterSubscriptionOwnerTransferred_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.FilterOpts), args[1].([]uint64)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_FilterSubscriptionOwnerTransferred_Call) Return(_a0 *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionOwnerTransferredIterator, _a1 error) *VRFCoordinatorV2Interface_FilterSubscriptionOwnerTransferred_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_FilterSubscriptionOwnerTransferred_Call) RunAndReturn(run func(*bind.FilterOpts, []uint64) (*vrf_coordinator_v2.VRFCoordinatorV2SubscriptionOwnerTransferredIterator, error)) *VRFCoordinatorV2Interface_FilterSubscriptionOwnerTransferred_Call { + _c.Call.Return(run) + return _c +} + // FulfillRandomWords provides a mock function with given fields: opts, proof, rc func (_m *VRFCoordinatorV2Interface) FulfillRandomWords(opts *bind.TransactOpts, proof vrf_coordinator_v2.VRFProof, rc vrf_coordinator_v2.VRFCoordinatorV2RequestCommitment) (*types.Transaction, error) { ret := _m.Called(opts, proof, rc) @@ -734,6 +1408,36 @@ func (_m *VRFCoordinatorV2Interface) FulfillRandomWords(opts *bind.TransactOpts, return r0, r1 } +// VRFCoordinatorV2Interface_FulfillRandomWords_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FulfillRandomWords' +type VRFCoordinatorV2Interface_FulfillRandomWords_Call struct { + *mock.Call +} + +// FulfillRandomWords is a helper method to define mock.On call +// - opts *bind.TransactOpts +// - proof vrf_coordinator_v2.VRFProof +// - rc vrf_coordinator_v2.VRFCoordinatorV2RequestCommitment +func (_e *VRFCoordinatorV2Interface_Expecter) FulfillRandomWords(opts interface{}, proof interface{}, rc interface{}) *VRFCoordinatorV2Interface_FulfillRandomWords_Call { + return &VRFCoordinatorV2Interface_FulfillRandomWords_Call{Call: _e.mock.On("FulfillRandomWords", opts, proof, rc)} +} + +func (_c *VRFCoordinatorV2Interface_FulfillRandomWords_Call) Run(run func(opts *bind.TransactOpts, proof vrf_coordinator_v2.VRFProof, rc vrf_coordinator_v2.VRFCoordinatorV2RequestCommitment)) *VRFCoordinatorV2Interface_FulfillRandomWords_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts), args[1].(vrf_coordinator_v2.VRFProof), args[2].(vrf_coordinator_v2.VRFCoordinatorV2RequestCommitment)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_FulfillRandomWords_Call) Return(_a0 *types.Transaction, _a1 error) *VRFCoordinatorV2Interface_FulfillRandomWords_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_FulfillRandomWords_Call) RunAndReturn(run func(*bind.TransactOpts, vrf_coordinator_v2.VRFProof, vrf_coordinator_v2.VRFCoordinatorV2RequestCommitment) (*types.Transaction, error)) *VRFCoordinatorV2Interface_FulfillRandomWords_Call { + _c.Call.Return(run) + return _c +} + // GetCommitment provides a mock function with given fields: opts, requestId func (_m *VRFCoordinatorV2Interface) GetCommitment(opts *bind.CallOpts, requestId *big.Int) ([32]byte, error) { ret := _m.Called(opts, requestId) @@ -764,6 +1468,35 @@ func (_m *VRFCoordinatorV2Interface) GetCommitment(opts *bind.CallOpts, requestI return r0, r1 } +// VRFCoordinatorV2Interface_GetCommitment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCommitment' +type VRFCoordinatorV2Interface_GetCommitment_Call struct { + *mock.Call +} + +// GetCommitment is a helper method to define mock.On call +// - opts *bind.CallOpts +// - requestId *big.Int +func (_e *VRFCoordinatorV2Interface_Expecter) GetCommitment(opts interface{}, requestId interface{}) *VRFCoordinatorV2Interface_GetCommitment_Call { + return &VRFCoordinatorV2Interface_GetCommitment_Call{Call: _e.mock.On("GetCommitment", opts, requestId)} +} + +func (_c *VRFCoordinatorV2Interface_GetCommitment_Call) Run(run func(opts *bind.CallOpts, requestId *big.Int)) *VRFCoordinatorV2Interface_GetCommitment_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts), args[1].(*big.Int)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_GetCommitment_Call) Return(_a0 [32]byte, _a1 error) *VRFCoordinatorV2Interface_GetCommitment_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_GetCommitment_Call) RunAndReturn(run func(*bind.CallOpts, *big.Int) ([32]byte, error)) *VRFCoordinatorV2Interface_GetCommitment_Call { + _c.Call.Return(run) + return _c +} + // GetConfig provides a mock function with given fields: opts func (_m *VRFCoordinatorV2Interface) GetConfig(opts *bind.CallOpts) (vrf_coordinator_v2.GetConfig, error) { ret := _m.Called(opts) @@ -792,8 +1525,36 @@ func (_m *VRFCoordinatorV2Interface) GetConfig(opts *bind.CallOpts) (vrf_coordin return r0, r1 } -// GetCurrentSubId provides a mock function with given fields: opts -func (_m *VRFCoordinatorV2Interface) GetCurrentSubId(opts *bind.CallOpts) (uint64, error) { +// VRFCoordinatorV2Interface_GetConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetConfig' +type VRFCoordinatorV2Interface_GetConfig_Call struct { + *mock.Call +} + +// GetConfig is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *VRFCoordinatorV2Interface_Expecter) GetConfig(opts interface{}) *VRFCoordinatorV2Interface_GetConfig_Call { + return &VRFCoordinatorV2Interface_GetConfig_Call{Call: _e.mock.On("GetConfig", opts)} +} + +func (_c *VRFCoordinatorV2Interface_GetConfig_Call) Run(run func(opts *bind.CallOpts)) *VRFCoordinatorV2Interface_GetConfig_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_GetConfig_Call) Return(_a0 vrf_coordinator_v2.GetConfig, _a1 error) *VRFCoordinatorV2Interface_GetConfig_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_GetConfig_Call) RunAndReturn(run func(*bind.CallOpts) (vrf_coordinator_v2.GetConfig, error)) *VRFCoordinatorV2Interface_GetConfig_Call { + _c.Call.Return(run) + return _c +} + +// GetCurrentSubId provides a mock function with given fields: opts +func (_m *VRFCoordinatorV2Interface) GetCurrentSubId(opts *bind.CallOpts) (uint64, error) { ret := _m.Called(opts) if len(ret) == 0 { @@ -820,6 +1581,34 @@ func (_m *VRFCoordinatorV2Interface) GetCurrentSubId(opts *bind.CallOpts) (uint6 return r0, r1 } +// VRFCoordinatorV2Interface_GetCurrentSubId_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCurrentSubId' +type VRFCoordinatorV2Interface_GetCurrentSubId_Call struct { + *mock.Call +} + +// GetCurrentSubId is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *VRFCoordinatorV2Interface_Expecter) GetCurrentSubId(opts interface{}) *VRFCoordinatorV2Interface_GetCurrentSubId_Call { + return &VRFCoordinatorV2Interface_GetCurrentSubId_Call{Call: _e.mock.On("GetCurrentSubId", opts)} +} + +func (_c *VRFCoordinatorV2Interface_GetCurrentSubId_Call) Run(run func(opts *bind.CallOpts)) *VRFCoordinatorV2Interface_GetCurrentSubId_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_GetCurrentSubId_Call) Return(_a0 uint64, _a1 error) *VRFCoordinatorV2Interface_GetCurrentSubId_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_GetCurrentSubId_Call) RunAndReturn(run func(*bind.CallOpts) (uint64, error)) *VRFCoordinatorV2Interface_GetCurrentSubId_Call { + _c.Call.Return(run) + return _c +} + // GetFallbackWeiPerUnitLink provides a mock function with given fields: opts func (_m *VRFCoordinatorV2Interface) GetFallbackWeiPerUnitLink(opts *bind.CallOpts) (*big.Int, error) { ret := _m.Called(opts) @@ -850,6 +1639,34 @@ func (_m *VRFCoordinatorV2Interface) GetFallbackWeiPerUnitLink(opts *bind.CallOp return r0, r1 } +// VRFCoordinatorV2Interface_GetFallbackWeiPerUnitLink_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFallbackWeiPerUnitLink' +type VRFCoordinatorV2Interface_GetFallbackWeiPerUnitLink_Call struct { + *mock.Call +} + +// GetFallbackWeiPerUnitLink is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *VRFCoordinatorV2Interface_Expecter) GetFallbackWeiPerUnitLink(opts interface{}) *VRFCoordinatorV2Interface_GetFallbackWeiPerUnitLink_Call { + return &VRFCoordinatorV2Interface_GetFallbackWeiPerUnitLink_Call{Call: _e.mock.On("GetFallbackWeiPerUnitLink", opts)} +} + +func (_c *VRFCoordinatorV2Interface_GetFallbackWeiPerUnitLink_Call) Run(run func(opts *bind.CallOpts)) *VRFCoordinatorV2Interface_GetFallbackWeiPerUnitLink_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_GetFallbackWeiPerUnitLink_Call) Return(_a0 *big.Int, _a1 error) *VRFCoordinatorV2Interface_GetFallbackWeiPerUnitLink_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_GetFallbackWeiPerUnitLink_Call) RunAndReturn(run func(*bind.CallOpts) (*big.Int, error)) *VRFCoordinatorV2Interface_GetFallbackWeiPerUnitLink_Call { + _c.Call.Return(run) + return _c +} + // GetFeeConfig provides a mock function with given fields: opts func (_m *VRFCoordinatorV2Interface) GetFeeConfig(opts *bind.CallOpts) (vrf_coordinator_v2.GetFeeConfig, error) { ret := _m.Called(opts) @@ -878,6 +1695,34 @@ func (_m *VRFCoordinatorV2Interface) GetFeeConfig(opts *bind.CallOpts) (vrf_coor return r0, r1 } +// VRFCoordinatorV2Interface_GetFeeConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFeeConfig' +type VRFCoordinatorV2Interface_GetFeeConfig_Call struct { + *mock.Call +} + +// GetFeeConfig is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *VRFCoordinatorV2Interface_Expecter) GetFeeConfig(opts interface{}) *VRFCoordinatorV2Interface_GetFeeConfig_Call { + return &VRFCoordinatorV2Interface_GetFeeConfig_Call{Call: _e.mock.On("GetFeeConfig", opts)} +} + +func (_c *VRFCoordinatorV2Interface_GetFeeConfig_Call) Run(run func(opts *bind.CallOpts)) *VRFCoordinatorV2Interface_GetFeeConfig_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_GetFeeConfig_Call) Return(_a0 vrf_coordinator_v2.GetFeeConfig, _a1 error) *VRFCoordinatorV2Interface_GetFeeConfig_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_GetFeeConfig_Call) RunAndReturn(run func(*bind.CallOpts) (vrf_coordinator_v2.GetFeeConfig, error)) *VRFCoordinatorV2Interface_GetFeeConfig_Call { + _c.Call.Return(run) + return _c +} + // GetFeeTier provides a mock function with given fields: opts, reqCount func (_m *VRFCoordinatorV2Interface) GetFeeTier(opts *bind.CallOpts, reqCount uint64) (uint32, error) { ret := _m.Called(opts, reqCount) @@ -906,6 +1751,35 @@ func (_m *VRFCoordinatorV2Interface) GetFeeTier(opts *bind.CallOpts, reqCount ui return r0, r1 } +// VRFCoordinatorV2Interface_GetFeeTier_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetFeeTier' +type VRFCoordinatorV2Interface_GetFeeTier_Call struct { + *mock.Call +} + +// GetFeeTier is a helper method to define mock.On call +// - opts *bind.CallOpts +// - reqCount uint64 +func (_e *VRFCoordinatorV2Interface_Expecter) GetFeeTier(opts interface{}, reqCount interface{}) *VRFCoordinatorV2Interface_GetFeeTier_Call { + return &VRFCoordinatorV2Interface_GetFeeTier_Call{Call: _e.mock.On("GetFeeTier", opts, reqCount)} +} + +func (_c *VRFCoordinatorV2Interface_GetFeeTier_Call) Run(run func(opts *bind.CallOpts, reqCount uint64)) *VRFCoordinatorV2Interface_GetFeeTier_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts), args[1].(uint64)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_GetFeeTier_Call) Return(_a0 uint32, _a1 error) *VRFCoordinatorV2Interface_GetFeeTier_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_GetFeeTier_Call) RunAndReturn(run func(*bind.CallOpts, uint64) (uint32, error)) *VRFCoordinatorV2Interface_GetFeeTier_Call { + _c.Call.Return(run) + return _c +} + // GetRequestConfig provides a mock function with given fields: opts func (_m *VRFCoordinatorV2Interface) GetRequestConfig(opts *bind.CallOpts) (uint16, uint32, [][32]byte, error) { ret := _m.Called(opts) @@ -950,6 +1824,34 @@ func (_m *VRFCoordinatorV2Interface) GetRequestConfig(opts *bind.CallOpts) (uint return r0, r1, r2, r3 } +// VRFCoordinatorV2Interface_GetRequestConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRequestConfig' +type VRFCoordinatorV2Interface_GetRequestConfig_Call struct { + *mock.Call +} + +// GetRequestConfig is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *VRFCoordinatorV2Interface_Expecter) GetRequestConfig(opts interface{}) *VRFCoordinatorV2Interface_GetRequestConfig_Call { + return &VRFCoordinatorV2Interface_GetRequestConfig_Call{Call: _e.mock.On("GetRequestConfig", opts)} +} + +func (_c *VRFCoordinatorV2Interface_GetRequestConfig_Call) Run(run func(opts *bind.CallOpts)) *VRFCoordinatorV2Interface_GetRequestConfig_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_GetRequestConfig_Call) Return(_a0 uint16, _a1 uint32, _a2 [][32]byte, _a3 error) *VRFCoordinatorV2Interface_GetRequestConfig_Call { + _c.Call.Return(_a0, _a1, _a2, _a3) + return _c +} + +func (_c *VRFCoordinatorV2Interface_GetRequestConfig_Call) RunAndReturn(run func(*bind.CallOpts) (uint16, uint32, [][32]byte, error)) *VRFCoordinatorV2Interface_GetRequestConfig_Call { + _c.Call.Return(run) + return _c +} + // GetSubscription provides a mock function with given fields: opts, subId func (_m *VRFCoordinatorV2Interface) GetSubscription(opts *bind.CallOpts, subId uint64) (vrf_coordinator_v2.GetSubscription, error) { ret := _m.Called(opts, subId) @@ -978,6 +1880,35 @@ func (_m *VRFCoordinatorV2Interface) GetSubscription(opts *bind.CallOpts, subId return r0, r1 } +// VRFCoordinatorV2Interface_GetSubscription_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSubscription' +type VRFCoordinatorV2Interface_GetSubscription_Call struct { + *mock.Call +} + +// GetSubscription is a helper method to define mock.On call +// - opts *bind.CallOpts +// - subId uint64 +func (_e *VRFCoordinatorV2Interface_Expecter) GetSubscription(opts interface{}, subId interface{}) *VRFCoordinatorV2Interface_GetSubscription_Call { + return &VRFCoordinatorV2Interface_GetSubscription_Call{Call: _e.mock.On("GetSubscription", opts, subId)} +} + +func (_c *VRFCoordinatorV2Interface_GetSubscription_Call) Run(run func(opts *bind.CallOpts, subId uint64)) *VRFCoordinatorV2Interface_GetSubscription_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts), args[1].(uint64)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_GetSubscription_Call) Return(_a0 vrf_coordinator_v2.GetSubscription, _a1 error) *VRFCoordinatorV2Interface_GetSubscription_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_GetSubscription_Call) RunAndReturn(run func(*bind.CallOpts, uint64) (vrf_coordinator_v2.GetSubscription, error)) *VRFCoordinatorV2Interface_GetSubscription_Call { + _c.Call.Return(run) + return _c +} + // GetTotalBalance provides a mock function with given fields: opts func (_m *VRFCoordinatorV2Interface) GetTotalBalance(opts *bind.CallOpts) (*big.Int, error) { ret := _m.Called(opts) @@ -1008,6 +1939,34 @@ func (_m *VRFCoordinatorV2Interface) GetTotalBalance(opts *bind.CallOpts) (*big. return r0, r1 } +// VRFCoordinatorV2Interface_GetTotalBalance_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTotalBalance' +type VRFCoordinatorV2Interface_GetTotalBalance_Call struct { + *mock.Call +} + +// GetTotalBalance is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *VRFCoordinatorV2Interface_Expecter) GetTotalBalance(opts interface{}) *VRFCoordinatorV2Interface_GetTotalBalance_Call { + return &VRFCoordinatorV2Interface_GetTotalBalance_Call{Call: _e.mock.On("GetTotalBalance", opts)} +} + +func (_c *VRFCoordinatorV2Interface_GetTotalBalance_Call) Run(run func(opts *bind.CallOpts)) *VRFCoordinatorV2Interface_GetTotalBalance_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_GetTotalBalance_Call) Return(_a0 *big.Int, _a1 error) *VRFCoordinatorV2Interface_GetTotalBalance_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_GetTotalBalance_Call) RunAndReturn(run func(*bind.CallOpts) (*big.Int, error)) *VRFCoordinatorV2Interface_GetTotalBalance_Call { + _c.Call.Return(run) + return _c +} + // HashOfKey provides a mock function with given fields: opts, publicKey func (_m *VRFCoordinatorV2Interface) HashOfKey(opts *bind.CallOpts, publicKey [2]*big.Int) ([32]byte, error) { ret := _m.Called(opts, publicKey) @@ -1038,6 +1997,35 @@ func (_m *VRFCoordinatorV2Interface) HashOfKey(opts *bind.CallOpts, publicKey [2 return r0, r1 } +// VRFCoordinatorV2Interface_HashOfKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'HashOfKey' +type VRFCoordinatorV2Interface_HashOfKey_Call struct { + *mock.Call +} + +// HashOfKey is a helper method to define mock.On call +// - opts *bind.CallOpts +// - publicKey [2]*big.Int +func (_e *VRFCoordinatorV2Interface_Expecter) HashOfKey(opts interface{}, publicKey interface{}) *VRFCoordinatorV2Interface_HashOfKey_Call { + return &VRFCoordinatorV2Interface_HashOfKey_Call{Call: _e.mock.On("HashOfKey", opts, publicKey)} +} + +func (_c *VRFCoordinatorV2Interface_HashOfKey_Call) Run(run func(opts *bind.CallOpts, publicKey [2]*big.Int)) *VRFCoordinatorV2Interface_HashOfKey_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts), args[1].([2]*big.Int)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_HashOfKey_Call) Return(_a0 [32]byte, _a1 error) *VRFCoordinatorV2Interface_HashOfKey_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_HashOfKey_Call) RunAndReturn(run func(*bind.CallOpts, [2]*big.Int) ([32]byte, error)) *VRFCoordinatorV2Interface_HashOfKey_Call { + _c.Call.Return(run) + return _c +} + // LINK provides a mock function with given fields: opts func (_m *VRFCoordinatorV2Interface) LINK(opts *bind.CallOpts) (common.Address, error) { ret := _m.Called(opts) @@ -1068,6 +2056,34 @@ func (_m *VRFCoordinatorV2Interface) LINK(opts *bind.CallOpts) (common.Address, return r0, r1 } +// VRFCoordinatorV2Interface_LINK_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LINK' +type VRFCoordinatorV2Interface_LINK_Call struct { + *mock.Call +} + +// LINK is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *VRFCoordinatorV2Interface_Expecter) LINK(opts interface{}) *VRFCoordinatorV2Interface_LINK_Call { + return &VRFCoordinatorV2Interface_LINK_Call{Call: _e.mock.On("LINK", opts)} +} + +func (_c *VRFCoordinatorV2Interface_LINK_Call) Run(run func(opts *bind.CallOpts)) *VRFCoordinatorV2Interface_LINK_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_LINK_Call) Return(_a0 common.Address, _a1 error) *VRFCoordinatorV2Interface_LINK_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_LINK_Call) RunAndReturn(run func(*bind.CallOpts) (common.Address, error)) *VRFCoordinatorV2Interface_LINK_Call { + _c.Call.Return(run) + return _c +} + // LINKETHFEED provides a mock function with given fields: opts func (_m *VRFCoordinatorV2Interface) LINKETHFEED(opts *bind.CallOpts) (common.Address, error) { ret := _m.Called(opts) @@ -1098,6 +2114,34 @@ func (_m *VRFCoordinatorV2Interface) LINKETHFEED(opts *bind.CallOpts) (common.Ad return r0, r1 } +// VRFCoordinatorV2Interface_LINKETHFEED_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LINKETHFEED' +type VRFCoordinatorV2Interface_LINKETHFEED_Call struct { + *mock.Call +} + +// LINKETHFEED is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *VRFCoordinatorV2Interface_Expecter) LINKETHFEED(opts interface{}) *VRFCoordinatorV2Interface_LINKETHFEED_Call { + return &VRFCoordinatorV2Interface_LINKETHFEED_Call{Call: _e.mock.On("LINKETHFEED", opts)} +} + +func (_c *VRFCoordinatorV2Interface_LINKETHFEED_Call) Run(run func(opts *bind.CallOpts)) *VRFCoordinatorV2Interface_LINKETHFEED_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_LINKETHFEED_Call) Return(_a0 common.Address, _a1 error) *VRFCoordinatorV2Interface_LINKETHFEED_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_LINKETHFEED_Call) RunAndReturn(run func(*bind.CallOpts) (common.Address, error)) *VRFCoordinatorV2Interface_LINKETHFEED_Call { + _c.Call.Return(run) + return _c +} + // MAXCONSUMERS provides a mock function with given fields: opts func (_m *VRFCoordinatorV2Interface) MAXCONSUMERS(opts *bind.CallOpts) (uint16, error) { ret := _m.Called(opts) @@ -1126,6 +2170,34 @@ func (_m *VRFCoordinatorV2Interface) MAXCONSUMERS(opts *bind.CallOpts) (uint16, return r0, r1 } +// VRFCoordinatorV2Interface_MAXCONSUMERS_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MAXCONSUMERS' +type VRFCoordinatorV2Interface_MAXCONSUMERS_Call struct { + *mock.Call +} + +// MAXCONSUMERS is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *VRFCoordinatorV2Interface_Expecter) MAXCONSUMERS(opts interface{}) *VRFCoordinatorV2Interface_MAXCONSUMERS_Call { + return &VRFCoordinatorV2Interface_MAXCONSUMERS_Call{Call: _e.mock.On("MAXCONSUMERS", opts)} +} + +func (_c *VRFCoordinatorV2Interface_MAXCONSUMERS_Call) Run(run func(opts *bind.CallOpts)) *VRFCoordinatorV2Interface_MAXCONSUMERS_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_MAXCONSUMERS_Call) Return(_a0 uint16, _a1 error) *VRFCoordinatorV2Interface_MAXCONSUMERS_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_MAXCONSUMERS_Call) RunAndReturn(run func(*bind.CallOpts) (uint16, error)) *VRFCoordinatorV2Interface_MAXCONSUMERS_Call { + _c.Call.Return(run) + return _c +} + // MAXNUMWORDS provides a mock function with given fields: opts func (_m *VRFCoordinatorV2Interface) MAXNUMWORDS(opts *bind.CallOpts) (uint32, error) { ret := _m.Called(opts) @@ -1154,6 +2226,34 @@ func (_m *VRFCoordinatorV2Interface) MAXNUMWORDS(opts *bind.CallOpts) (uint32, e return r0, r1 } +// VRFCoordinatorV2Interface_MAXNUMWORDS_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MAXNUMWORDS' +type VRFCoordinatorV2Interface_MAXNUMWORDS_Call struct { + *mock.Call +} + +// MAXNUMWORDS is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *VRFCoordinatorV2Interface_Expecter) MAXNUMWORDS(opts interface{}) *VRFCoordinatorV2Interface_MAXNUMWORDS_Call { + return &VRFCoordinatorV2Interface_MAXNUMWORDS_Call{Call: _e.mock.On("MAXNUMWORDS", opts)} +} + +func (_c *VRFCoordinatorV2Interface_MAXNUMWORDS_Call) Run(run func(opts *bind.CallOpts)) *VRFCoordinatorV2Interface_MAXNUMWORDS_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_MAXNUMWORDS_Call) Return(_a0 uint32, _a1 error) *VRFCoordinatorV2Interface_MAXNUMWORDS_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_MAXNUMWORDS_Call) RunAndReturn(run func(*bind.CallOpts) (uint32, error)) *VRFCoordinatorV2Interface_MAXNUMWORDS_Call { + _c.Call.Return(run) + return _c +} + // MAXREQUESTCONFIRMATIONS provides a mock function with given fields: opts func (_m *VRFCoordinatorV2Interface) MAXREQUESTCONFIRMATIONS(opts *bind.CallOpts) (uint16, error) { ret := _m.Called(opts) @@ -1182,6 +2282,34 @@ func (_m *VRFCoordinatorV2Interface) MAXREQUESTCONFIRMATIONS(opts *bind.CallOpts return r0, r1 } +// VRFCoordinatorV2Interface_MAXREQUESTCONFIRMATIONS_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MAXREQUESTCONFIRMATIONS' +type VRFCoordinatorV2Interface_MAXREQUESTCONFIRMATIONS_Call struct { + *mock.Call +} + +// MAXREQUESTCONFIRMATIONS is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *VRFCoordinatorV2Interface_Expecter) MAXREQUESTCONFIRMATIONS(opts interface{}) *VRFCoordinatorV2Interface_MAXREQUESTCONFIRMATIONS_Call { + return &VRFCoordinatorV2Interface_MAXREQUESTCONFIRMATIONS_Call{Call: _e.mock.On("MAXREQUESTCONFIRMATIONS", opts)} +} + +func (_c *VRFCoordinatorV2Interface_MAXREQUESTCONFIRMATIONS_Call) Run(run func(opts *bind.CallOpts)) *VRFCoordinatorV2Interface_MAXREQUESTCONFIRMATIONS_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_MAXREQUESTCONFIRMATIONS_Call) Return(_a0 uint16, _a1 error) *VRFCoordinatorV2Interface_MAXREQUESTCONFIRMATIONS_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_MAXREQUESTCONFIRMATIONS_Call) RunAndReturn(run func(*bind.CallOpts) (uint16, error)) *VRFCoordinatorV2Interface_MAXREQUESTCONFIRMATIONS_Call { + _c.Call.Return(run) + return _c +} + // OnTokenTransfer provides a mock function with given fields: opts, arg0, amount, data func (_m *VRFCoordinatorV2Interface) OnTokenTransfer(opts *bind.TransactOpts, arg0 common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { ret := _m.Called(opts, arg0, amount, data) @@ -1212,6 +2340,37 @@ func (_m *VRFCoordinatorV2Interface) OnTokenTransfer(opts *bind.TransactOpts, ar return r0, r1 } +// VRFCoordinatorV2Interface_OnTokenTransfer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OnTokenTransfer' +type VRFCoordinatorV2Interface_OnTokenTransfer_Call struct { + *mock.Call +} + +// OnTokenTransfer is a helper method to define mock.On call +// - opts *bind.TransactOpts +// - arg0 common.Address +// - amount *big.Int +// - data []byte +func (_e *VRFCoordinatorV2Interface_Expecter) OnTokenTransfer(opts interface{}, arg0 interface{}, amount interface{}, data interface{}) *VRFCoordinatorV2Interface_OnTokenTransfer_Call { + return &VRFCoordinatorV2Interface_OnTokenTransfer_Call{Call: _e.mock.On("OnTokenTransfer", opts, arg0, amount, data)} +} + +func (_c *VRFCoordinatorV2Interface_OnTokenTransfer_Call) Run(run func(opts *bind.TransactOpts, arg0 common.Address, amount *big.Int, data []byte)) *VRFCoordinatorV2Interface_OnTokenTransfer_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts), args[1].(common.Address), args[2].(*big.Int), args[3].([]byte)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_OnTokenTransfer_Call) Return(_a0 *types.Transaction, _a1 error) *VRFCoordinatorV2Interface_OnTokenTransfer_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_OnTokenTransfer_Call) RunAndReturn(run func(*bind.TransactOpts, common.Address, *big.Int, []byte) (*types.Transaction, error)) *VRFCoordinatorV2Interface_OnTokenTransfer_Call { + _c.Call.Return(run) + return _c +} + // OracleWithdraw provides a mock function with given fields: opts, recipient, amount func (_m *VRFCoordinatorV2Interface) OracleWithdraw(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { ret := _m.Called(opts, recipient, amount) @@ -1242,6 +2401,36 @@ func (_m *VRFCoordinatorV2Interface) OracleWithdraw(opts *bind.TransactOpts, rec return r0, r1 } +// VRFCoordinatorV2Interface_OracleWithdraw_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OracleWithdraw' +type VRFCoordinatorV2Interface_OracleWithdraw_Call struct { + *mock.Call +} + +// OracleWithdraw is a helper method to define mock.On call +// - opts *bind.TransactOpts +// - recipient common.Address +// - amount *big.Int +func (_e *VRFCoordinatorV2Interface_Expecter) OracleWithdraw(opts interface{}, recipient interface{}, amount interface{}) *VRFCoordinatorV2Interface_OracleWithdraw_Call { + return &VRFCoordinatorV2Interface_OracleWithdraw_Call{Call: _e.mock.On("OracleWithdraw", opts, recipient, amount)} +} + +func (_c *VRFCoordinatorV2Interface_OracleWithdraw_Call) Run(run func(opts *bind.TransactOpts, recipient common.Address, amount *big.Int)) *VRFCoordinatorV2Interface_OracleWithdraw_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts), args[1].(common.Address), args[2].(*big.Int)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_OracleWithdraw_Call) Return(_a0 *types.Transaction, _a1 error) *VRFCoordinatorV2Interface_OracleWithdraw_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_OracleWithdraw_Call) RunAndReturn(run func(*bind.TransactOpts, common.Address, *big.Int) (*types.Transaction, error)) *VRFCoordinatorV2Interface_OracleWithdraw_Call { + _c.Call.Return(run) + return _c +} + // Owner provides a mock function with given fields: opts func (_m *VRFCoordinatorV2Interface) Owner(opts *bind.CallOpts) (common.Address, error) { ret := _m.Called(opts) @@ -1272,6 +2461,34 @@ func (_m *VRFCoordinatorV2Interface) Owner(opts *bind.CallOpts) (common.Address, return r0, r1 } +// VRFCoordinatorV2Interface_Owner_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Owner' +type VRFCoordinatorV2Interface_Owner_Call struct { + *mock.Call +} + +// Owner is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *VRFCoordinatorV2Interface_Expecter) Owner(opts interface{}) *VRFCoordinatorV2Interface_Owner_Call { + return &VRFCoordinatorV2Interface_Owner_Call{Call: _e.mock.On("Owner", opts)} +} + +func (_c *VRFCoordinatorV2Interface_Owner_Call) Run(run func(opts *bind.CallOpts)) *VRFCoordinatorV2Interface_Owner_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_Owner_Call) Return(_a0 common.Address, _a1 error) *VRFCoordinatorV2Interface_Owner_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_Owner_Call) RunAndReturn(run func(*bind.CallOpts) (common.Address, error)) *VRFCoordinatorV2Interface_Owner_Call { + _c.Call.Return(run) + return _c +} + // OwnerCancelSubscription provides a mock function with given fields: opts, subId func (_m *VRFCoordinatorV2Interface) OwnerCancelSubscription(opts *bind.TransactOpts, subId uint64) (*types.Transaction, error) { ret := _m.Called(opts, subId) @@ -1302,6 +2519,35 @@ func (_m *VRFCoordinatorV2Interface) OwnerCancelSubscription(opts *bind.Transact return r0, r1 } +// VRFCoordinatorV2Interface_OwnerCancelSubscription_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OwnerCancelSubscription' +type VRFCoordinatorV2Interface_OwnerCancelSubscription_Call struct { + *mock.Call +} + +// OwnerCancelSubscription is a helper method to define mock.On call +// - opts *bind.TransactOpts +// - subId uint64 +func (_e *VRFCoordinatorV2Interface_Expecter) OwnerCancelSubscription(opts interface{}, subId interface{}) *VRFCoordinatorV2Interface_OwnerCancelSubscription_Call { + return &VRFCoordinatorV2Interface_OwnerCancelSubscription_Call{Call: _e.mock.On("OwnerCancelSubscription", opts, subId)} +} + +func (_c *VRFCoordinatorV2Interface_OwnerCancelSubscription_Call) Run(run func(opts *bind.TransactOpts, subId uint64)) *VRFCoordinatorV2Interface_OwnerCancelSubscription_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts), args[1].(uint64)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_OwnerCancelSubscription_Call) Return(_a0 *types.Transaction, _a1 error) *VRFCoordinatorV2Interface_OwnerCancelSubscription_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_OwnerCancelSubscription_Call) RunAndReturn(run func(*bind.TransactOpts, uint64) (*types.Transaction, error)) *VRFCoordinatorV2Interface_OwnerCancelSubscription_Call { + _c.Call.Return(run) + return _c +} + // ParseConfigSet provides a mock function with given fields: log func (_m *VRFCoordinatorV2Interface) ParseConfigSet(log types.Log) (*vrf_coordinator_v2.VRFCoordinatorV2ConfigSet, error) { ret := _m.Called(log) @@ -1332,6 +2578,34 @@ func (_m *VRFCoordinatorV2Interface) ParseConfigSet(log types.Log) (*vrf_coordin return r0, r1 } +// VRFCoordinatorV2Interface_ParseConfigSet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseConfigSet' +type VRFCoordinatorV2Interface_ParseConfigSet_Call struct { + *mock.Call +} + +// ParseConfigSet is a helper method to define mock.On call +// - log types.Log +func (_e *VRFCoordinatorV2Interface_Expecter) ParseConfigSet(log interface{}) *VRFCoordinatorV2Interface_ParseConfigSet_Call { + return &VRFCoordinatorV2Interface_ParseConfigSet_Call{Call: _e.mock.On("ParseConfigSet", log)} +} + +func (_c *VRFCoordinatorV2Interface_ParseConfigSet_Call) Run(run func(log types.Log)) *VRFCoordinatorV2Interface_ParseConfigSet_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_ParseConfigSet_Call) Return(_a0 *vrf_coordinator_v2.VRFCoordinatorV2ConfigSet, _a1 error) *VRFCoordinatorV2Interface_ParseConfigSet_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_ParseConfigSet_Call) RunAndReturn(run func(types.Log) (*vrf_coordinator_v2.VRFCoordinatorV2ConfigSet, error)) *VRFCoordinatorV2Interface_ParseConfigSet_Call { + _c.Call.Return(run) + return _c +} + // ParseFundsRecovered provides a mock function with given fields: log func (_m *VRFCoordinatorV2Interface) ParseFundsRecovered(log types.Log) (*vrf_coordinator_v2.VRFCoordinatorV2FundsRecovered, error) { ret := _m.Called(log) @@ -1362,6 +2636,34 @@ func (_m *VRFCoordinatorV2Interface) ParseFundsRecovered(log types.Log) (*vrf_co return r0, r1 } +// VRFCoordinatorV2Interface_ParseFundsRecovered_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseFundsRecovered' +type VRFCoordinatorV2Interface_ParseFundsRecovered_Call struct { + *mock.Call +} + +// ParseFundsRecovered is a helper method to define mock.On call +// - log types.Log +func (_e *VRFCoordinatorV2Interface_Expecter) ParseFundsRecovered(log interface{}) *VRFCoordinatorV2Interface_ParseFundsRecovered_Call { + return &VRFCoordinatorV2Interface_ParseFundsRecovered_Call{Call: _e.mock.On("ParseFundsRecovered", log)} +} + +func (_c *VRFCoordinatorV2Interface_ParseFundsRecovered_Call) Run(run func(log types.Log)) *VRFCoordinatorV2Interface_ParseFundsRecovered_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_ParseFundsRecovered_Call) Return(_a0 *vrf_coordinator_v2.VRFCoordinatorV2FundsRecovered, _a1 error) *VRFCoordinatorV2Interface_ParseFundsRecovered_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_ParseFundsRecovered_Call) RunAndReturn(run func(types.Log) (*vrf_coordinator_v2.VRFCoordinatorV2FundsRecovered, error)) *VRFCoordinatorV2Interface_ParseFundsRecovered_Call { + _c.Call.Return(run) + return _c +} + // ParseLog provides a mock function with given fields: log func (_m *VRFCoordinatorV2Interface) ParseLog(log types.Log) (generated.AbigenLog, error) { ret := _m.Called(log) @@ -1392,6 +2694,34 @@ func (_m *VRFCoordinatorV2Interface) ParseLog(log types.Log) (generated.AbigenLo return r0, r1 } +// VRFCoordinatorV2Interface_ParseLog_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseLog' +type VRFCoordinatorV2Interface_ParseLog_Call struct { + *mock.Call +} + +// ParseLog is a helper method to define mock.On call +// - log types.Log +func (_e *VRFCoordinatorV2Interface_Expecter) ParseLog(log interface{}) *VRFCoordinatorV2Interface_ParseLog_Call { + return &VRFCoordinatorV2Interface_ParseLog_Call{Call: _e.mock.On("ParseLog", log)} +} + +func (_c *VRFCoordinatorV2Interface_ParseLog_Call) Run(run func(log types.Log)) *VRFCoordinatorV2Interface_ParseLog_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_ParseLog_Call) Return(_a0 generated.AbigenLog, _a1 error) *VRFCoordinatorV2Interface_ParseLog_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_ParseLog_Call) RunAndReturn(run func(types.Log) (generated.AbigenLog, error)) *VRFCoordinatorV2Interface_ParseLog_Call { + _c.Call.Return(run) + return _c +} + // ParseOwnershipTransferRequested provides a mock function with given fields: log func (_m *VRFCoordinatorV2Interface) ParseOwnershipTransferRequested(log types.Log) (*vrf_coordinator_v2.VRFCoordinatorV2OwnershipTransferRequested, error) { ret := _m.Called(log) @@ -1422,6 +2752,34 @@ func (_m *VRFCoordinatorV2Interface) ParseOwnershipTransferRequested(log types.L return r0, r1 } +// VRFCoordinatorV2Interface_ParseOwnershipTransferRequested_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseOwnershipTransferRequested' +type VRFCoordinatorV2Interface_ParseOwnershipTransferRequested_Call struct { + *mock.Call +} + +// ParseOwnershipTransferRequested is a helper method to define mock.On call +// - log types.Log +func (_e *VRFCoordinatorV2Interface_Expecter) ParseOwnershipTransferRequested(log interface{}) *VRFCoordinatorV2Interface_ParseOwnershipTransferRequested_Call { + return &VRFCoordinatorV2Interface_ParseOwnershipTransferRequested_Call{Call: _e.mock.On("ParseOwnershipTransferRequested", log)} +} + +func (_c *VRFCoordinatorV2Interface_ParseOwnershipTransferRequested_Call) Run(run func(log types.Log)) *VRFCoordinatorV2Interface_ParseOwnershipTransferRequested_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_ParseOwnershipTransferRequested_Call) Return(_a0 *vrf_coordinator_v2.VRFCoordinatorV2OwnershipTransferRequested, _a1 error) *VRFCoordinatorV2Interface_ParseOwnershipTransferRequested_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_ParseOwnershipTransferRequested_Call) RunAndReturn(run func(types.Log) (*vrf_coordinator_v2.VRFCoordinatorV2OwnershipTransferRequested, error)) *VRFCoordinatorV2Interface_ParseOwnershipTransferRequested_Call { + _c.Call.Return(run) + return _c +} + // ParseOwnershipTransferred provides a mock function with given fields: log func (_m *VRFCoordinatorV2Interface) ParseOwnershipTransferred(log types.Log) (*vrf_coordinator_v2.VRFCoordinatorV2OwnershipTransferred, error) { ret := _m.Called(log) @@ -1452,6 +2810,34 @@ func (_m *VRFCoordinatorV2Interface) ParseOwnershipTransferred(log types.Log) (* return r0, r1 } +// VRFCoordinatorV2Interface_ParseOwnershipTransferred_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseOwnershipTransferred' +type VRFCoordinatorV2Interface_ParseOwnershipTransferred_Call struct { + *mock.Call +} + +// ParseOwnershipTransferred is a helper method to define mock.On call +// - log types.Log +func (_e *VRFCoordinatorV2Interface_Expecter) ParseOwnershipTransferred(log interface{}) *VRFCoordinatorV2Interface_ParseOwnershipTransferred_Call { + return &VRFCoordinatorV2Interface_ParseOwnershipTransferred_Call{Call: _e.mock.On("ParseOwnershipTransferred", log)} +} + +func (_c *VRFCoordinatorV2Interface_ParseOwnershipTransferred_Call) Run(run func(log types.Log)) *VRFCoordinatorV2Interface_ParseOwnershipTransferred_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_ParseOwnershipTransferred_Call) Return(_a0 *vrf_coordinator_v2.VRFCoordinatorV2OwnershipTransferred, _a1 error) *VRFCoordinatorV2Interface_ParseOwnershipTransferred_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_ParseOwnershipTransferred_Call) RunAndReturn(run func(types.Log) (*vrf_coordinator_v2.VRFCoordinatorV2OwnershipTransferred, error)) *VRFCoordinatorV2Interface_ParseOwnershipTransferred_Call { + _c.Call.Return(run) + return _c +} + // ParseProvingKeyDeregistered provides a mock function with given fields: log func (_m *VRFCoordinatorV2Interface) ParseProvingKeyDeregistered(log types.Log) (*vrf_coordinator_v2.VRFCoordinatorV2ProvingKeyDeregistered, error) { ret := _m.Called(log) @@ -1482,6 +2868,34 @@ func (_m *VRFCoordinatorV2Interface) ParseProvingKeyDeregistered(log types.Log) return r0, r1 } +// VRFCoordinatorV2Interface_ParseProvingKeyDeregistered_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseProvingKeyDeregistered' +type VRFCoordinatorV2Interface_ParseProvingKeyDeregistered_Call struct { + *mock.Call +} + +// ParseProvingKeyDeregistered is a helper method to define mock.On call +// - log types.Log +func (_e *VRFCoordinatorV2Interface_Expecter) ParseProvingKeyDeregistered(log interface{}) *VRFCoordinatorV2Interface_ParseProvingKeyDeregistered_Call { + return &VRFCoordinatorV2Interface_ParseProvingKeyDeregistered_Call{Call: _e.mock.On("ParseProvingKeyDeregistered", log)} +} + +func (_c *VRFCoordinatorV2Interface_ParseProvingKeyDeregistered_Call) Run(run func(log types.Log)) *VRFCoordinatorV2Interface_ParseProvingKeyDeregistered_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_ParseProvingKeyDeregistered_Call) Return(_a0 *vrf_coordinator_v2.VRFCoordinatorV2ProvingKeyDeregistered, _a1 error) *VRFCoordinatorV2Interface_ParseProvingKeyDeregistered_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_ParseProvingKeyDeregistered_Call) RunAndReturn(run func(types.Log) (*vrf_coordinator_v2.VRFCoordinatorV2ProvingKeyDeregistered, error)) *VRFCoordinatorV2Interface_ParseProvingKeyDeregistered_Call { + _c.Call.Return(run) + return _c +} + // ParseProvingKeyRegistered provides a mock function with given fields: log func (_m *VRFCoordinatorV2Interface) ParseProvingKeyRegistered(log types.Log) (*vrf_coordinator_v2.VRFCoordinatorV2ProvingKeyRegistered, error) { ret := _m.Called(log) @@ -1512,6 +2926,34 @@ func (_m *VRFCoordinatorV2Interface) ParseProvingKeyRegistered(log types.Log) (* return r0, r1 } +// VRFCoordinatorV2Interface_ParseProvingKeyRegistered_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseProvingKeyRegistered' +type VRFCoordinatorV2Interface_ParseProvingKeyRegistered_Call struct { + *mock.Call +} + +// ParseProvingKeyRegistered is a helper method to define mock.On call +// - log types.Log +func (_e *VRFCoordinatorV2Interface_Expecter) ParseProvingKeyRegistered(log interface{}) *VRFCoordinatorV2Interface_ParseProvingKeyRegistered_Call { + return &VRFCoordinatorV2Interface_ParseProvingKeyRegistered_Call{Call: _e.mock.On("ParseProvingKeyRegistered", log)} +} + +func (_c *VRFCoordinatorV2Interface_ParseProvingKeyRegistered_Call) Run(run func(log types.Log)) *VRFCoordinatorV2Interface_ParseProvingKeyRegistered_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_ParseProvingKeyRegistered_Call) Return(_a0 *vrf_coordinator_v2.VRFCoordinatorV2ProvingKeyRegistered, _a1 error) *VRFCoordinatorV2Interface_ParseProvingKeyRegistered_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_ParseProvingKeyRegistered_Call) RunAndReturn(run func(types.Log) (*vrf_coordinator_v2.VRFCoordinatorV2ProvingKeyRegistered, error)) *VRFCoordinatorV2Interface_ParseProvingKeyRegistered_Call { + _c.Call.Return(run) + return _c +} + // ParseRandomWordsFulfilled provides a mock function with given fields: log func (_m *VRFCoordinatorV2Interface) ParseRandomWordsFulfilled(log types.Log) (*vrf_coordinator_v2.VRFCoordinatorV2RandomWordsFulfilled, error) { ret := _m.Called(log) @@ -1542,9 +2984,37 @@ func (_m *VRFCoordinatorV2Interface) ParseRandomWordsFulfilled(log types.Log) (* return r0, r1 } -// ParseRandomWordsRequested provides a mock function with given fields: log -func (_m *VRFCoordinatorV2Interface) ParseRandomWordsRequested(log types.Log) (*vrf_coordinator_v2.VRFCoordinatorV2RandomWordsRequested, error) { - ret := _m.Called(log) +// VRFCoordinatorV2Interface_ParseRandomWordsFulfilled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseRandomWordsFulfilled' +type VRFCoordinatorV2Interface_ParseRandomWordsFulfilled_Call struct { + *mock.Call +} + +// ParseRandomWordsFulfilled is a helper method to define mock.On call +// - log types.Log +func (_e *VRFCoordinatorV2Interface_Expecter) ParseRandomWordsFulfilled(log interface{}) *VRFCoordinatorV2Interface_ParseRandomWordsFulfilled_Call { + return &VRFCoordinatorV2Interface_ParseRandomWordsFulfilled_Call{Call: _e.mock.On("ParseRandomWordsFulfilled", log)} +} + +func (_c *VRFCoordinatorV2Interface_ParseRandomWordsFulfilled_Call) Run(run func(log types.Log)) *VRFCoordinatorV2Interface_ParseRandomWordsFulfilled_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_ParseRandomWordsFulfilled_Call) Return(_a0 *vrf_coordinator_v2.VRFCoordinatorV2RandomWordsFulfilled, _a1 error) *VRFCoordinatorV2Interface_ParseRandomWordsFulfilled_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_ParseRandomWordsFulfilled_Call) RunAndReturn(run func(types.Log) (*vrf_coordinator_v2.VRFCoordinatorV2RandomWordsFulfilled, error)) *VRFCoordinatorV2Interface_ParseRandomWordsFulfilled_Call { + _c.Call.Return(run) + return _c +} + +// ParseRandomWordsRequested provides a mock function with given fields: log +func (_m *VRFCoordinatorV2Interface) ParseRandomWordsRequested(log types.Log) (*vrf_coordinator_v2.VRFCoordinatorV2RandomWordsRequested, error) { + ret := _m.Called(log) if len(ret) == 0 { panic("no return value specified for ParseRandomWordsRequested") @@ -1572,6 +3042,34 @@ func (_m *VRFCoordinatorV2Interface) ParseRandomWordsRequested(log types.Log) (* return r0, r1 } +// VRFCoordinatorV2Interface_ParseRandomWordsRequested_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseRandomWordsRequested' +type VRFCoordinatorV2Interface_ParseRandomWordsRequested_Call struct { + *mock.Call +} + +// ParseRandomWordsRequested is a helper method to define mock.On call +// - log types.Log +func (_e *VRFCoordinatorV2Interface_Expecter) ParseRandomWordsRequested(log interface{}) *VRFCoordinatorV2Interface_ParseRandomWordsRequested_Call { + return &VRFCoordinatorV2Interface_ParseRandomWordsRequested_Call{Call: _e.mock.On("ParseRandomWordsRequested", log)} +} + +func (_c *VRFCoordinatorV2Interface_ParseRandomWordsRequested_Call) Run(run func(log types.Log)) *VRFCoordinatorV2Interface_ParseRandomWordsRequested_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_ParseRandomWordsRequested_Call) Return(_a0 *vrf_coordinator_v2.VRFCoordinatorV2RandomWordsRequested, _a1 error) *VRFCoordinatorV2Interface_ParseRandomWordsRequested_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_ParseRandomWordsRequested_Call) RunAndReturn(run func(types.Log) (*vrf_coordinator_v2.VRFCoordinatorV2RandomWordsRequested, error)) *VRFCoordinatorV2Interface_ParseRandomWordsRequested_Call { + _c.Call.Return(run) + return _c +} + // ParseSubscriptionCanceled provides a mock function with given fields: log func (_m *VRFCoordinatorV2Interface) ParseSubscriptionCanceled(log types.Log) (*vrf_coordinator_v2.VRFCoordinatorV2SubscriptionCanceled, error) { ret := _m.Called(log) @@ -1602,6 +3100,34 @@ func (_m *VRFCoordinatorV2Interface) ParseSubscriptionCanceled(log types.Log) (* return r0, r1 } +// VRFCoordinatorV2Interface_ParseSubscriptionCanceled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseSubscriptionCanceled' +type VRFCoordinatorV2Interface_ParseSubscriptionCanceled_Call struct { + *mock.Call +} + +// ParseSubscriptionCanceled is a helper method to define mock.On call +// - log types.Log +func (_e *VRFCoordinatorV2Interface_Expecter) ParseSubscriptionCanceled(log interface{}) *VRFCoordinatorV2Interface_ParseSubscriptionCanceled_Call { + return &VRFCoordinatorV2Interface_ParseSubscriptionCanceled_Call{Call: _e.mock.On("ParseSubscriptionCanceled", log)} +} + +func (_c *VRFCoordinatorV2Interface_ParseSubscriptionCanceled_Call) Run(run func(log types.Log)) *VRFCoordinatorV2Interface_ParseSubscriptionCanceled_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_ParseSubscriptionCanceled_Call) Return(_a0 *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionCanceled, _a1 error) *VRFCoordinatorV2Interface_ParseSubscriptionCanceled_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_ParseSubscriptionCanceled_Call) RunAndReturn(run func(types.Log) (*vrf_coordinator_v2.VRFCoordinatorV2SubscriptionCanceled, error)) *VRFCoordinatorV2Interface_ParseSubscriptionCanceled_Call { + _c.Call.Return(run) + return _c +} + // ParseSubscriptionConsumerAdded provides a mock function with given fields: log func (_m *VRFCoordinatorV2Interface) ParseSubscriptionConsumerAdded(log types.Log) (*vrf_coordinator_v2.VRFCoordinatorV2SubscriptionConsumerAdded, error) { ret := _m.Called(log) @@ -1632,6 +3158,34 @@ func (_m *VRFCoordinatorV2Interface) ParseSubscriptionConsumerAdded(log types.Lo return r0, r1 } +// VRFCoordinatorV2Interface_ParseSubscriptionConsumerAdded_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseSubscriptionConsumerAdded' +type VRFCoordinatorV2Interface_ParseSubscriptionConsumerAdded_Call struct { + *mock.Call +} + +// ParseSubscriptionConsumerAdded is a helper method to define mock.On call +// - log types.Log +func (_e *VRFCoordinatorV2Interface_Expecter) ParseSubscriptionConsumerAdded(log interface{}) *VRFCoordinatorV2Interface_ParseSubscriptionConsumerAdded_Call { + return &VRFCoordinatorV2Interface_ParseSubscriptionConsumerAdded_Call{Call: _e.mock.On("ParseSubscriptionConsumerAdded", log)} +} + +func (_c *VRFCoordinatorV2Interface_ParseSubscriptionConsumerAdded_Call) Run(run func(log types.Log)) *VRFCoordinatorV2Interface_ParseSubscriptionConsumerAdded_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_ParseSubscriptionConsumerAdded_Call) Return(_a0 *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionConsumerAdded, _a1 error) *VRFCoordinatorV2Interface_ParseSubscriptionConsumerAdded_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_ParseSubscriptionConsumerAdded_Call) RunAndReturn(run func(types.Log) (*vrf_coordinator_v2.VRFCoordinatorV2SubscriptionConsumerAdded, error)) *VRFCoordinatorV2Interface_ParseSubscriptionConsumerAdded_Call { + _c.Call.Return(run) + return _c +} + // ParseSubscriptionConsumerRemoved provides a mock function with given fields: log func (_m *VRFCoordinatorV2Interface) ParseSubscriptionConsumerRemoved(log types.Log) (*vrf_coordinator_v2.VRFCoordinatorV2SubscriptionConsumerRemoved, error) { ret := _m.Called(log) @@ -1662,6 +3216,34 @@ func (_m *VRFCoordinatorV2Interface) ParseSubscriptionConsumerRemoved(log types. return r0, r1 } +// VRFCoordinatorV2Interface_ParseSubscriptionConsumerRemoved_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseSubscriptionConsumerRemoved' +type VRFCoordinatorV2Interface_ParseSubscriptionConsumerRemoved_Call struct { + *mock.Call +} + +// ParseSubscriptionConsumerRemoved is a helper method to define mock.On call +// - log types.Log +func (_e *VRFCoordinatorV2Interface_Expecter) ParseSubscriptionConsumerRemoved(log interface{}) *VRFCoordinatorV2Interface_ParseSubscriptionConsumerRemoved_Call { + return &VRFCoordinatorV2Interface_ParseSubscriptionConsumerRemoved_Call{Call: _e.mock.On("ParseSubscriptionConsumerRemoved", log)} +} + +func (_c *VRFCoordinatorV2Interface_ParseSubscriptionConsumerRemoved_Call) Run(run func(log types.Log)) *VRFCoordinatorV2Interface_ParseSubscriptionConsumerRemoved_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_ParseSubscriptionConsumerRemoved_Call) Return(_a0 *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionConsumerRemoved, _a1 error) *VRFCoordinatorV2Interface_ParseSubscriptionConsumerRemoved_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_ParseSubscriptionConsumerRemoved_Call) RunAndReturn(run func(types.Log) (*vrf_coordinator_v2.VRFCoordinatorV2SubscriptionConsumerRemoved, error)) *VRFCoordinatorV2Interface_ParseSubscriptionConsumerRemoved_Call { + _c.Call.Return(run) + return _c +} + // ParseSubscriptionCreated provides a mock function with given fields: log func (_m *VRFCoordinatorV2Interface) ParseSubscriptionCreated(log types.Log) (*vrf_coordinator_v2.VRFCoordinatorV2SubscriptionCreated, error) { ret := _m.Called(log) @@ -1692,6 +3274,34 @@ func (_m *VRFCoordinatorV2Interface) ParseSubscriptionCreated(log types.Log) (*v return r0, r1 } +// VRFCoordinatorV2Interface_ParseSubscriptionCreated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseSubscriptionCreated' +type VRFCoordinatorV2Interface_ParseSubscriptionCreated_Call struct { + *mock.Call +} + +// ParseSubscriptionCreated is a helper method to define mock.On call +// - log types.Log +func (_e *VRFCoordinatorV2Interface_Expecter) ParseSubscriptionCreated(log interface{}) *VRFCoordinatorV2Interface_ParseSubscriptionCreated_Call { + return &VRFCoordinatorV2Interface_ParseSubscriptionCreated_Call{Call: _e.mock.On("ParseSubscriptionCreated", log)} +} + +func (_c *VRFCoordinatorV2Interface_ParseSubscriptionCreated_Call) Run(run func(log types.Log)) *VRFCoordinatorV2Interface_ParseSubscriptionCreated_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_ParseSubscriptionCreated_Call) Return(_a0 *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionCreated, _a1 error) *VRFCoordinatorV2Interface_ParseSubscriptionCreated_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_ParseSubscriptionCreated_Call) RunAndReturn(run func(types.Log) (*vrf_coordinator_v2.VRFCoordinatorV2SubscriptionCreated, error)) *VRFCoordinatorV2Interface_ParseSubscriptionCreated_Call { + _c.Call.Return(run) + return _c +} + // ParseSubscriptionFunded provides a mock function with given fields: log func (_m *VRFCoordinatorV2Interface) ParseSubscriptionFunded(log types.Log) (*vrf_coordinator_v2.VRFCoordinatorV2SubscriptionFunded, error) { ret := _m.Called(log) @@ -1722,6 +3332,34 @@ func (_m *VRFCoordinatorV2Interface) ParseSubscriptionFunded(log types.Log) (*vr return r0, r1 } +// VRFCoordinatorV2Interface_ParseSubscriptionFunded_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseSubscriptionFunded' +type VRFCoordinatorV2Interface_ParseSubscriptionFunded_Call struct { + *mock.Call +} + +// ParseSubscriptionFunded is a helper method to define mock.On call +// - log types.Log +func (_e *VRFCoordinatorV2Interface_Expecter) ParseSubscriptionFunded(log interface{}) *VRFCoordinatorV2Interface_ParseSubscriptionFunded_Call { + return &VRFCoordinatorV2Interface_ParseSubscriptionFunded_Call{Call: _e.mock.On("ParseSubscriptionFunded", log)} +} + +func (_c *VRFCoordinatorV2Interface_ParseSubscriptionFunded_Call) Run(run func(log types.Log)) *VRFCoordinatorV2Interface_ParseSubscriptionFunded_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_ParseSubscriptionFunded_Call) Return(_a0 *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionFunded, _a1 error) *VRFCoordinatorV2Interface_ParseSubscriptionFunded_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_ParseSubscriptionFunded_Call) RunAndReturn(run func(types.Log) (*vrf_coordinator_v2.VRFCoordinatorV2SubscriptionFunded, error)) *VRFCoordinatorV2Interface_ParseSubscriptionFunded_Call { + _c.Call.Return(run) + return _c +} + // ParseSubscriptionOwnerTransferRequested provides a mock function with given fields: log func (_m *VRFCoordinatorV2Interface) ParseSubscriptionOwnerTransferRequested(log types.Log) (*vrf_coordinator_v2.VRFCoordinatorV2SubscriptionOwnerTransferRequested, error) { ret := _m.Called(log) @@ -1752,6 +3390,34 @@ func (_m *VRFCoordinatorV2Interface) ParseSubscriptionOwnerTransferRequested(log return r0, r1 } +// VRFCoordinatorV2Interface_ParseSubscriptionOwnerTransferRequested_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseSubscriptionOwnerTransferRequested' +type VRFCoordinatorV2Interface_ParseSubscriptionOwnerTransferRequested_Call struct { + *mock.Call +} + +// ParseSubscriptionOwnerTransferRequested is a helper method to define mock.On call +// - log types.Log +func (_e *VRFCoordinatorV2Interface_Expecter) ParseSubscriptionOwnerTransferRequested(log interface{}) *VRFCoordinatorV2Interface_ParseSubscriptionOwnerTransferRequested_Call { + return &VRFCoordinatorV2Interface_ParseSubscriptionOwnerTransferRequested_Call{Call: _e.mock.On("ParseSubscriptionOwnerTransferRequested", log)} +} + +func (_c *VRFCoordinatorV2Interface_ParseSubscriptionOwnerTransferRequested_Call) Run(run func(log types.Log)) *VRFCoordinatorV2Interface_ParseSubscriptionOwnerTransferRequested_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_ParseSubscriptionOwnerTransferRequested_Call) Return(_a0 *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionOwnerTransferRequested, _a1 error) *VRFCoordinatorV2Interface_ParseSubscriptionOwnerTransferRequested_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_ParseSubscriptionOwnerTransferRequested_Call) RunAndReturn(run func(types.Log) (*vrf_coordinator_v2.VRFCoordinatorV2SubscriptionOwnerTransferRequested, error)) *VRFCoordinatorV2Interface_ParseSubscriptionOwnerTransferRequested_Call { + _c.Call.Return(run) + return _c +} + // ParseSubscriptionOwnerTransferred provides a mock function with given fields: log func (_m *VRFCoordinatorV2Interface) ParseSubscriptionOwnerTransferred(log types.Log) (*vrf_coordinator_v2.VRFCoordinatorV2SubscriptionOwnerTransferred, error) { ret := _m.Called(log) @@ -1782,6 +3448,34 @@ func (_m *VRFCoordinatorV2Interface) ParseSubscriptionOwnerTransferred(log types return r0, r1 } +// VRFCoordinatorV2Interface_ParseSubscriptionOwnerTransferred_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParseSubscriptionOwnerTransferred' +type VRFCoordinatorV2Interface_ParseSubscriptionOwnerTransferred_Call struct { + *mock.Call +} + +// ParseSubscriptionOwnerTransferred is a helper method to define mock.On call +// - log types.Log +func (_e *VRFCoordinatorV2Interface_Expecter) ParseSubscriptionOwnerTransferred(log interface{}) *VRFCoordinatorV2Interface_ParseSubscriptionOwnerTransferred_Call { + return &VRFCoordinatorV2Interface_ParseSubscriptionOwnerTransferred_Call{Call: _e.mock.On("ParseSubscriptionOwnerTransferred", log)} +} + +func (_c *VRFCoordinatorV2Interface_ParseSubscriptionOwnerTransferred_Call) Run(run func(log types.Log)) *VRFCoordinatorV2Interface_ParseSubscriptionOwnerTransferred_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(types.Log)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_ParseSubscriptionOwnerTransferred_Call) Return(_a0 *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionOwnerTransferred, _a1 error) *VRFCoordinatorV2Interface_ParseSubscriptionOwnerTransferred_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_ParseSubscriptionOwnerTransferred_Call) RunAndReturn(run func(types.Log) (*vrf_coordinator_v2.VRFCoordinatorV2SubscriptionOwnerTransferred, error)) *VRFCoordinatorV2Interface_ParseSubscriptionOwnerTransferred_Call { + _c.Call.Return(run) + return _c +} + // PendingRequestExists provides a mock function with given fields: opts, subId func (_m *VRFCoordinatorV2Interface) PendingRequestExists(opts *bind.CallOpts, subId uint64) (bool, error) { ret := _m.Called(opts, subId) @@ -1810,6 +3504,35 @@ func (_m *VRFCoordinatorV2Interface) PendingRequestExists(opts *bind.CallOpts, s return r0, r1 } +// VRFCoordinatorV2Interface_PendingRequestExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PendingRequestExists' +type VRFCoordinatorV2Interface_PendingRequestExists_Call struct { + *mock.Call +} + +// PendingRequestExists is a helper method to define mock.On call +// - opts *bind.CallOpts +// - subId uint64 +func (_e *VRFCoordinatorV2Interface_Expecter) PendingRequestExists(opts interface{}, subId interface{}) *VRFCoordinatorV2Interface_PendingRequestExists_Call { + return &VRFCoordinatorV2Interface_PendingRequestExists_Call{Call: _e.mock.On("PendingRequestExists", opts, subId)} +} + +func (_c *VRFCoordinatorV2Interface_PendingRequestExists_Call) Run(run func(opts *bind.CallOpts, subId uint64)) *VRFCoordinatorV2Interface_PendingRequestExists_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts), args[1].(uint64)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_PendingRequestExists_Call) Return(_a0 bool, _a1 error) *VRFCoordinatorV2Interface_PendingRequestExists_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_PendingRequestExists_Call) RunAndReturn(run func(*bind.CallOpts, uint64) (bool, error)) *VRFCoordinatorV2Interface_PendingRequestExists_Call { + _c.Call.Return(run) + return _c +} + // RecoverFunds provides a mock function with given fields: opts, to func (_m *VRFCoordinatorV2Interface) RecoverFunds(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { ret := _m.Called(opts, to) @@ -1840,6 +3563,35 @@ func (_m *VRFCoordinatorV2Interface) RecoverFunds(opts *bind.TransactOpts, to co return r0, r1 } +// VRFCoordinatorV2Interface_RecoverFunds_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RecoverFunds' +type VRFCoordinatorV2Interface_RecoverFunds_Call struct { + *mock.Call +} + +// RecoverFunds is a helper method to define mock.On call +// - opts *bind.TransactOpts +// - to common.Address +func (_e *VRFCoordinatorV2Interface_Expecter) RecoverFunds(opts interface{}, to interface{}) *VRFCoordinatorV2Interface_RecoverFunds_Call { + return &VRFCoordinatorV2Interface_RecoverFunds_Call{Call: _e.mock.On("RecoverFunds", opts, to)} +} + +func (_c *VRFCoordinatorV2Interface_RecoverFunds_Call) Run(run func(opts *bind.TransactOpts, to common.Address)) *VRFCoordinatorV2Interface_RecoverFunds_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts), args[1].(common.Address)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_RecoverFunds_Call) Return(_a0 *types.Transaction, _a1 error) *VRFCoordinatorV2Interface_RecoverFunds_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_RecoverFunds_Call) RunAndReturn(run func(*bind.TransactOpts, common.Address) (*types.Transaction, error)) *VRFCoordinatorV2Interface_RecoverFunds_Call { + _c.Call.Return(run) + return _c +} + // RegisterProvingKey provides a mock function with given fields: opts, oracle, publicProvingKey func (_m *VRFCoordinatorV2Interface) RegisterProvingKey(opts *bind.TransactOpts, oracle common.Address, publicProvingKey [2]*big.Int) (*types.Transaction, error) { ret := _m.Called(opts, oracle, publicProvingKey) @@ -1870,6 +3622,36 @@ func (_m *VRFCoordinatorV2Interface) RegisterProvingKey(opts *bind.TransactOpts, return r0, r1 } +// VRFCoordinatorV2Interface_RegisterProvingKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RegisterProvingKey' +type VRFCoordinatorV2Interface_RegisterProvingKey_Call struct { + *mock.Call +} + +// RegisterProvingKey is a helper method to define mock.On call +// - opts *bind.TransactOpts +// - oracle common.Address +// - publicProvingKey [2]*big.Int +func (_e *VRFCoordinatorV2Interface_Expecter) RegisterProvingKey(opts interface{}, oracle interface{}, publicProvingKey interface{}) *VRFCoordinatorV2Interface_RegisterProvingKey_Call { + return &VRFCoordinatorV2Interface_RegisterProvingKey_Call{Call: _e.mock.On("RegisterProvingKey", opts, oracle, publicProvingKey)} +} + +func (_c *VRFCoordinatorV2Interface_RegisterProvingKey_Call) Run(run func(opts *bind.TransactOpts, oracle common.Address, publicProvingKey [2]*big.Int)) *VRFCoordinatorV2Interface_RegisterProvingKey_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts), args[1].(common.Address), args[2].([2]*big.Int)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_RegisterProvingKey_Call) Return(_a0 *types.Transaction, _a1 error) *VRFCoordinatorV2Interface_RegisterProvingKey_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_RegisterProvingKey_Call) RunAndReturn(run func(*bind.TransactOpts, common.Address, [2]*big.Int) (*types.Transaction, error)) *VRFCoordinatorV2Interface_RegisterProvingKey_Call { + _c.Call.Return(run) + return _c +} + // RemoveConsumer provides a mock function with given fields: opts, subId, consumer func (_m *VRFCoordinatorV2Interface) RemoveConsumer(opts *bind.TransactOpts, subId uint64, consumer common.Address) (*types.Transaction, error) { ret := _m.Called(opts, subId, consumer) @@ -1900,6 +3682,36 @@ func (_m *VRFCoordinatorV2Interface) RemoveConsumer(opts *bind.TransactOpts, sub return r0, r1 } +// VRFCoordinatorV2Interface_RemoveConsumer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveConsumer' +type VRFCoordinatorV2Interface_RemoveConsumer_Call struct { + *mock.Call +} + +// RemoveConsumer is a helper method to define mock.On call +// - opts *bind.TransactOpts +// - subId uint64 +// - consumer common.Address +func (_e *VRFCoordinatorV2Interface_Expecter) RemoveConsumer(opts interface{}, subId interface{}, consumer interface{}) *VRFCoordinatorV2Interface_RemoveConsumer_Call { + return &VRFCoordinatorV2Interface_RemoveConsumer_Call{Call: _e.mock.On("RemoveConsumer", opts, subId, consumer)} +} + +func (_c *VRFCoordinatorV2Interface_RemoveConsumer_Call) Run(run func(opts *bind.TransactOpts, subId uint64, consumer common.Address)) *VRFCoordinatorV2Interface_RemoveConsumer_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts), args[1].(uint64), args[2].(common.Address)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_RemoveConsumer_Call) Return(_a0 *types.Transaction, _a1 error) *VRFCoordinatorV2Interface_RemoveConsumer_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_RemoveConsumer_Call) RunAndReturn(run func(*bind.TransactOpts, uint64, common.Address) (*types.Transaction, error)) *VRFCoordinatorV2Interface_RemoveConsumer_Call { + _c.Call.Return(run) + return _c +} + // RequestRandomWords provides a mock function with given fields: opts, keyHash, subId, requestConfirmations, callbackGasLimit, numWords func (_m *VRFCoordinatorV2Interface) RequestRandomWords(opts *bind.TransactOpts, keyHash [32]byte, subId uint64, requestConfirmations uint16, callbackGasLimit uint32, numWords uint32) (*types.Transaction, error) { ret := _m.Called(opts, keyHash, subId, requestConfirmations, callbackGasLimit, numWords) @@ -1930,6 +3742,39 @@ func (_m *VRFCoordinatorV2Interface) RequestRandomWords(opts *bind.TransactOpts, return r0, r1 } +// VRFCoordinatorV2Interface_RequestRandomWords_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RequestRandomWords' +type VRFCoordinatorV2Interface_RequestRandomWords_Call struct { + *mock.Call +} + +// RequestRandomWords is a helper method to define mock.On call +// - opts *bind.TransactOpts +// - keyHash [32]byte +// - subId uint64 +// - requestConfirmations uint16 +// - callbackGasLimit uint32 +// - numWords uint32 +func (_e *VRFCoordinatorV2Interface_Expecter) RequestRandomWords(opts interface{}, keyHash interface{}, subId interface{}, requestConfirmations interface{}, callbackGasLimit interface{}, numWords interface{}) *VRFCoordinatorV2Interface_RequestRandomWords_Call { + return &VRFCoordinatorV2Interface_RequestRandomWords_Call{Call: _e.mock.On("RequestRandomWords", opts, keyHash, subId, requestConfirmations, callbackGasLimit, numWords)} +} + +func (_c *VRFCoordinatorV2Interface_RequestRandomWords_Call) Run(run func(opts *bind.TransactOpts, keyHash [32]byte, subId uint64, requestConfirmations uint16, callbackGasLimit uint32, numWords uint32)) *VRFCoordinatorV2Interface_RequestRandomWords_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts), args[1].([32]byte), args[2].(uint64), args[3].(uint16), args[4].(uint32), args[5].(uint32)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_RequestRandomWords_Call) Return(_a0 *types.Transaction, _a1 error) *VRFCoordinatorV2Interface_RequestRandomWords_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_RequestRandomWords_Call) RunAndReturn(run func(*bind.TransactOpts, [32]byte, uint64, uint16, uint32, uint32) (*types.Transaction, error)) *VRFCoordinatorV2Interface_RequestRandomWords_Call { + _c.Call.Return(run) + return _c +} + // RequestSubscriptionOwnerTransfer provides a mock function with given fields: opts, subId, newOwner func (_m *VRFCoordinatorV2Interface) RequestSubscriptionOwnerTransfer(opts *bind.TransactOpts, subId uint64, newOwner common.Address) (*types.Transaction, error) { ret := _m.Called(opts, subId, newOwner) @@ -1960,6 +3805,36 @@ func (_m *VRFCoordinatorV2Interface) RequestSubscriptionOwnerTransfer(opts *bind return r0, r1 } +// VRFCoordinatorV2Interface_RequestSubscriptionOwnerTransfer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RequestSubscriptionOwnerTransfer' +type VRFCoordinatorV2Interface_RequestSubscriptionOwnerTransfer_Call struct { + *mock.Call +} + +// RequestSubscriptionOwnerTransfer is a helper method to define mock.On call +// - opts *bind.TransactOpts +// - subId uint64 +// - newOwner common.Address +func (_e *VRFCoordinatorV2Interface_Expecter) RequestSubscriptionOwnerTransfer(opts interface{}, subId interface{}, newOwner interface{}) *VRFCoordinatorV2Interface_RequestSubscriptionOwnerTransfer_Call { + return &VRFCoordinatorV2Interface_RequestSubscriptionOwnerTransfer_Call{Call: _e.mock.On("RequestSubscriptionOwnerTransfer", opts, subId, newOwner)} +} + +func (_c *VRFCoordinatorV2Interface_RequestSubscriptionOwnerTransfer_Call) Run(run func(opts *bind.TransactOpts, subId uint64, newOwner common.Address)) *VRFCoordinatorV2Interface_RequestSubscriptionOwnerTransfer_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts), args[1].(uint64), args[2].(common.Address)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_RequestSubscriptionOwnerTransfer_Call) Return(_a0 *types.Transaction, _a1 error) *VRFCoordinatorV2Interface_RequestSubscriptionOwnerTransfer_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_RequestSubscriptionOwnerTransfer_Call) RunAndReturn(run func(*bind.TransactOpts, uint64, common.Address) (*types.Transaction, error)) *VRFCoordinatorV2Interface_RequestSubscriptionOwnerTransfer_Call { + _c.Call.Return(run) + return _c +} + // SetConfig provides a mock function with given fields: opts, minimumRequestConfirmations, maxGasLimit, stalenessSeconds, gasAfterPaymentCalculation, fallbackWeiPerUnitLink, feeConfig func (_m *VRFCoordinatorV2Interface) SetConfig(opts *bind.TransactOpts, minimumRequestConfirmations uint16, maxGasLimit uint32, stalenessSeconds uint32, gasAfterPaymentCalculation uint32, fallbackWeiPerUnitLink *big.Int, feeConfig vrf_coordinator_v2.VRFCoordinatorV2FeeConfig) (*types.Transaction, error) { ret := _m.Called(opts, minimumRequestConfirmations, maxGasLimit, stalenessSeconds, gasAfterPaymentCalculation, fallbackWeiPerUnitLink, feeConfig) @@ -1990,6 +3865,40 @@ func (_m *VRFCoordinatorV2Interface) SetConfig(opts *bind.TransactOpts, minimumR return r0, r1 } +// VRFCoordinatorV2Interface_SetConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetConfig' +type VRFCoordinatorV2Interface_SetConfig_Call struct { + *mock.Call +} + +// SetConfig is a helper method to define mock.On call +// - opts *bind.TransactOpts +// - minimumRequestConfirmations uint16 +// - maxGasLimit uint32 +// - stalenessSeconds uint32 +// - gasAfterPaymentCalculation uint32 +// - fallbackWeiPerUnitLink *big.Int +// - feeConfig vrf_coordinator_v2.VRFCoordinatorV2FeeConfig +func (_e *VRFCoordinatorV2Interface_Expecter) SetConfig(opts interface{}, minimumRequestConfirmations interface{}, maxGasLimit interface{}, stalenessSeconds interface{}, gasAfterPaymentCalculation interface{}, fallbackWeiPerUnitLink interface{}, feeConfig interface{}) *VRFCoordinatorV2Interface_SetConfig_Call { + return &VRFCoordinatorV2Interface_SetConfig_Call{Call: _e.mock.On("SetConfig", opts, minimumRequestConfirmations, maxGasLimit, stalenessSeconds, gasAfterPaymentCalculation, fallbackWeiPerUnitLink, feeConfig)} +} + +func (_c *VRFCoordinatorV2Interface_SetConfig_Call) Run(run func(opts *bind.TransactOpts, minimumRequestConfirmations uint16, maxGasLimit uint32, stalenessSeconds uint32, gasAfterPaymentCalculation uint32, fallbackWeiPerUnitLink *big.Int, feeConfig vrf_coordinator_v2.VRFCoordinatorV2FeeConfig)) *VRFCoordinatorV2Interface_SetConfig_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts), args[1].(uint16), args[2].(uint32), args[3].(uint32), args[4].(uint32), args[5].(*big.Int), args[6].(vrf_coordinator_v2.VRFCoordinatorV2FeeConfig)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_SetConfig_Call) Return(_a0 *types.Transaction, _a1 error) *VRFCoordinatorV2Interface_SetConfig_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_SetConfig_Call) RunAndReturn(run func(*bind.TransactOpts, uint16, uint32, uint32, uint32, *big.Int, vrf_coordinator_v2.VRFCoordinatorV2FeeConfig) (*types.Transaction, error)) *VRFCoordinatorV2Interface_SetConfig_Call { + _c.Call.Return(run) + return _c +} + // TransferOwnership provides a mock function with given fields: opts, to func (_m *VRFCoordinatorV2Interface) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { ret := _m.Called(opts, to) @@ -2020,6 +3929,35 @@ func (_m *VRFCoordinatorV2Interface) TransferOwnership(opts *bind.TransactOpts, return r0, r1 } +// VRFCoordinatorV2Interface_TransferOwnership_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransferOwnership' +type VRFCoordinatorV2Interface_TransferOwnership_Call struct { + *mock.Call +} + +// TransferOwnership is a helper method to define mock.On call +// - opts *bind.TransactOpts +// - to common.Address +func (_e *VRFCoordinatorV2Interface_Expecter) TransferOwnership(opts interface{}, to interface{}) *VRFCoordinatorV2Interface_TransferOwnership_Call { + return &VRFCoordinatorV2Interface_TransferOwnership_Call{Call: _e.mock.On("TransferOwnership", opts, to)} +} + +func (_c *VRFCoordinatorV2Interface_TransferOwnership_Call) Run(run func(opts *bind.TransactOpts, to common.Address)) *VRFCoordinatorV2Interface_TransferOwnership_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.TransactOpts), args[1].(common.Address)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_TransferOwnership_Call) Return(_a0 *types.Transaction, _a1 error) *VRFCoordinatorV2Interface_TransferOwnership_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_TransferOwnership_Call) RunAndReturn(run func(*bind.TransactOpts, common.Address) (*types.Transaction, error)) *VRFCoordinatorV2Interface_TransferOwnership_Call { + _c.Call.Return(run) + return _c +} + // TypeAndVersion provides a mock function with given fields: opts func (_m *VRFCoordinatorV2Interface) TypeAndVersion(opts *bind.CallOpts) (string, error) { ret := _m.Called(opts) @@ -2048,6 +3986,34 @@ func (_m *VRFCoordinatorV2Interface) TypeAndVersion(opts *bind.CallOpts) (string return r0, r1 } +// VRFCoordinatorV2Interface_TypeAndVersion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TypeAndVersion' +type VRFCoordinatorV2Interface_TypeAndVersion_Call struct { + *mock.Call +} + +// TypeAndVersion is a helper method to define mock.On call +// - opts *bind.CallOpts +func (_e *VRFCoordinatorV2Interface_Expecter) TypeAndVersion(opts interface{}) *VRFCoordinatorV2Interface_TypeAndVersion_Call { + return &VRFCoordinatorV2Interface_TypeAndVersion_Call{Call: _e.mock.On("TypeAndVersion", opts)} +} + +func (_c *VRFCoordinatorV2Interface_TypeAndVersion_Call) Run(run func(opts *bind.CallOpts)) *VRFCoordinatorV2Interface_TypeAndVersion_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.CallOpts)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_TypeAndVersion_Call) Return(_a0 string, _a1 error) *VRFCoordinatorV2Interface_TypeAndVersion_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_TypeAndVersion_Call) RunAndReturn(run func(*bind.CallOpts) (string, error)) *VRFCoordinatorV2Interface_TypeAndVersion_Call { + _c.Call.Return(run) + return _c +} + // WatchConfigSet provides a mock function with given fields: opts, sink func (_m *VRFCoordinatorV2Interface) WatchConfigSet(opts *bind.WatchOpts, sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2ConfigSet) (event.Subscription, error) { ret := _m.Called(opts, sink) @@ -2078,6 +4044,35 @@ func (_m *VRFCoordinatorV2Interface) WatchConfigSet(opts *bind.WatchOpts, sink c return r0, r1 } +// VRFCoordinatorV2Interface_WatchConfigSet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchConfigSet' +type VRFCoordinatorV2Interface_WatchConfigSet_Call struct { + *mock.Call +} + +// WatchConfigSet is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2ConfigSet +func (_e *VRFCoordinatorV2Interface_Expecter) WatchConfigSet(opts interface{}, sink interface{}) *VRFCoordinatorV2Interface_WatchConfigSet_Call { + return &VRFCoordinatorV2Interface_WatchConfigSet_Call{Call: _e.mock.On("WatchConfigSet", opts, sink)} +} + +func (_c *VRFCoordinatorV2Interface_WatchConfigSet_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2ConfigSet)) *VRFCoordinatorV2Interface_WatchConfigSet_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *vrf_coordinator_v2.VRFCoordinatorV2ConfigSet)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_WatchConfigSet_Call) Return(_a0 event.Subscription, _a1 error) *VRFCoordinatorV2Interface_WatchConfigSet_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_WatchConfigSet_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *vrf_coordinator_v2.VRFCoordinatorV2ConfigSet) (event.Subscription, error)) *VRFCoordinatorV2Interface_WatchConfigSet_Call { + _c.Call.Return(run) + return _c +} + // WatchFundsRecovered provides a mock function with given fields: opts, sink func (_m *VRFCoordinatorV2Interface) WatchFundsRecovered(opts *bind.WatchOpts, sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2FundsRecovered) (event.Subscription, error) { ret := _m.Called(opts, sink) @@ -2108,6 +4103,35 @@ func (_m *VRFCoordinatorV2Interface) WatchFundsRecovered(opts *bind.WatchOpts, s return r0, r1 } +// VRFCoordinatorV2Interface_WatchFundsRecovered_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchFundsRecovered' +type VRFCoordinatorV2Interface_WatchFundsRecovered_Call struct { + *mock.Call +} + +// WatchFundsRecovered is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2FundsRecovered +func (_e *VRFCoordinatorV2Interface_Expecter) WatchFundsRecovered(opts interface{}, sink interface{}) *VRFCoordinatorV2Interface_WatchFundsRecovered_Call { + return &VRFCoordinatorV2Interface_WatchFundsRecovered_Call{Call: _e.mock.On("WatchFundsRecovered", opts, sink)} +} + +func (_c *VRFCoordinatorV2Interface_WatchFundsRecovered_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2FundsRecovered)) *VRFCoordinatorV2Interface_WatchFundsRecovered_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *vrf_coordinator_v2.VRFCoordinatorV2FundsRecovered)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_WatchFundsRecovered_Call) Return(_a0 event.Subscription, _a1 error) *VRFCoordinatorV2Interface_WatchFundsRecovered_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_WatchFundsRecovered_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *vrf_coordinator_v2.VRFCoordinatorV2FundsRecovered) (event.Subscription, error)) *VRFCoordinatorV2Interface_WatchFundsRecovered_Call { + _c.Call.Return(run) + return _c +} + // WatchOwnershipTransferRequested provides a mock function with given fields: opts, sink, from, to func (_m *VRFCoordinatorV2Interface) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2OwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { ret := _m.Called(opts, sink, from, to) @@ -2138,6 +4162,37 @@ func (_m *VRFCoordinatorV2Interface) WatchOwnershipTransferRequested(opts *bind. return r0, r1 } +// VRFCoordinatorV2Interface_WatchOwnershipTransferRequested_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchOwnershipTransferRequested' +type VRFCoordinatorV2Interface_WatchOwnershipTransferRequested_Call struct { + *mock.Call +} + +// WatchOwnershipTransferRequested is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2OwnershipTransferRequested +// - from []common.Address +// - to []common.Address +func (_e *VRFCoordinatorV2Interface_Expecter) WatchOwnershipTransferRequested(opts interface{}, sink interface{}, from interface{}, to interface{}) *VRFCoordinatorV2Interface_WatchOwnershipTransferRequested_Call { + return &VRFCoordinatorV2Interface_WatchOwnershipTransferRequested_Call{Call: _e.mock.On("WatchOwnershipTransferRequested", opts, sink, from, to)} +} + +func (_c *VRFCoordinatorV2Interface_WatchOwnershipTransferRequested_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2OwnershipTransferRequested, from []common.Address, to []common.Address)) *VRFCoordinatorV2Interface_WatchOwnershipTransferRequested_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *vrf_coordinator_v2.VRFCoordinatorV2OwnershipTransferRequested), args[2].([]common.Address), args[3].([]common.Address)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_WatchOwnershipTransferRequested_Call) Return(_a0 event.Subscription, _a1 error) *VRFCoordinatorV2Interface_WatchOwnershipTransferRequested_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_WatchOwnershipTransferRequested_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *vrf_coordinator_v2.VRFCoordinatorV2OwnershipTransferRequested, []common.Address, []common.Address) (event.Subscription, error)) *VRFCoordinatorV2Interface_WatchOwnershipTransferRequested_Call { + _c.Call.Return(run) + return _c +} + // WatchOwnershipTransferred provides a mock function with given fields: opts, sink, from, to func (_m *VRFCoordinatorV2Interface) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2OwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { ret := _m.Called(opts, sink, from, to) @@ -2168,6 +4223,37 @@ func (_m *VRFCoordinatorV2Interface) WatchOwnershipTransferred(opts *bind.WatchO return r0, r1 } +// VRFCoordinatorV2Interface_WatchOwnershipTransferred_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchOwnershipTransferred' +type VRFCoordinatorV2Interface_WatchOwnershipTransferred_Call struct { + *mock.Call +} + +// WatchOwnershipTransferred is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2OwnershipTransferred +// - from []common.Address +// - to []common.Address +func (_e *VRFCoordinatorV2Interface_Expecter) WatchOwnershipTransferred(opts interface{}, sink interface{}, from interface{}, to interface{}) *VRFCoordinatorV2Interface_WatchOwnershipTransferred_Call { + return &VRFCoordinatorV2Interface_WatchOwnershipTransferred_Call{Call: _e.mock.On("WatchOwnershipTransferred", opts, sink, from, to)} +} + +func (_c *VRFCoordinatorV2Interface_WatchOwnershipTransferred_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2OwnershipTransferred, from []common.Address, to []common.Address)) *VRFCoordinatorV2Interface_WatchOwnershipTransferred_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *vrf_coordinator_v2.VRFCoordinatorV2OwnershipTransferred), args[2].([]common.Address), args[3].([]common.Address)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_WatchOwnershipTransferred_Call) Return(_a0 event.Subscription, _a1 error) *VRFCoordinatorV2Interface_WatchOwnershipTransferred_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_WatchOwnershipTransferred_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *vrf_coordinator_v2.VRFCoordinatorV2OwnershipTransferred, []common.Address, []common.Address) (event.Subscription, error)) *VRFCoordinatorV2Interface_WatchOwnershipTransferred_Call { + _c.Call.Return(run) + return _c +} + // WatchProvingKeyDeregistered provides a mock function with given fields: opts, sink, oracle func (_m *VRFCoordinatorV2Interface) WatchProvingKeyDeregistered(opts *bind.WatchOpts, sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2ProvingKeyDeregistered, oracle []common.Address) (event.Subscription, error) { ret := _m.Called(opts, sink, oracle) @@ -2198,6 +4284,36 @@ func (_m *VRFCoordinatorV2Interface) WatchProvingKeyDeregistered(opts *bind.Watc return r0, r1 } +// VRFCoordinatorV2Interface_WatchProvingKeyDeregistered_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchProvingKeyDeregistered' +type VRFCoordinatorV2Interface_WatchProvingKeyDeregistered_Call struct { + *mock.Call +} + +// WatchProvingKeyDeregistered is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2ProvingKeyDeregistered +// - oracle []common.Address +func (_e *VRFCoordinatorV2Interface_Expecter) WatchProvingKeyDeregistered(opts interface{}, sink interface{}, oracle interface{}) *VRFCoordinatorV2Interface_WatchProvingKeyDeregistered_Call { + return &VRFCoordinatorV2Interface_WatchProvingKeyDeregistered_Call{Call: _e.mock.On("WatchProvingKeyDeregistered", opts, sink, oracle)} +} + +func (_c *VRFCoordinatorV2Interface_WatchProvingKeyDeregistered_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2ProvingKeyDeregistered, oracle []common.Address)) *VRFCoordinatorV2Interface_WatchProvingKeyDeregistered_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *vrf_coordinator_v2.VRFCoordinatorV2ProvingKeyDeregistered), args[2].([]common.Address)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_WatchProvingKeyDeregistered_Call) Return(_a0 event.Subscription, _a1 error) *VRFCoordinatorV2Interface_WatchProvingKeyDeregistered_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_WatchProvingKeyDeregistered_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *vrf_coordinator_v2.VRFCoordinatorV2ProvingKeyDeregistered, []common.Address) (event.Subscription, error)) *VRFCoordinatorV2Interface_WatchProvingKeyDeregistered_Call { + _c.Call.Return(run) + return _c +} + // WatchProvingKeyRegistered provides a mock function with given fields: opts, sink, oracle func (_m *VRFCoordinatorV2Interface) WatchProvingKeyRegistered(opts *bind.WatchOpts, sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2ProvingKeyRegistered, oracle []common.Address) (event.Subscription, error) { ret := _m.Called(opts, sink, oracle) @@ -2228,6 +4344,36 @@ func (_m *VRFCoordinatorV2Interface) WatchProvingKeyRegistered(opts *bind.WatchO return r0, r1 } +// VRFCoordinatorV2Interface_WatchProvingKeyRegistered_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchProvingKeyRegistered' +type VRFCoordinatorV2Interface_WatchProvingKeyRegistered_Call struct { + *mock.Call +} + +// WatchProvingKeyRegistered is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2ProvingKeyRegistered +// - oracle []common.Address +func (_e *VRFCoordinatorV2Interface_Expecter) WatchProvingKeyRegistered(opts interface{}, sink interface{}, oracle interface{}) *VRFCoordinatorV2Interface_WatchProvingKeyRegistered_Call { + return &VRFCoordinatorV2Interface_WatchProvingKeyRegistered_Call{Call: _e.mock.On("WatchProvingKeyRegistered", opts, sink, oracle)} +} + +func (_c *VRFCoordinatorV2Interface_WatchProvingKeyRegistered_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2ProvingKeyRegistered, oracle []common.Address)) *VRFCoordinatorV2Interface_WatchProvingKeyRegistered_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *vrf_coordinator_v2.VRFCoordinatorV2ProvingKeyRegistered), args[2].([]common.Address)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_WatchProvingKeyRegistered_Call) Return(_a0 event.Subscription, _a1 error) *VRFCoordinatorV2Interface_WatchProvingKeyRegistered_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_WatchProvingKeyRegistered_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *vrf_coordinator_v2.VRFCoordinatorV2ProvingKeyRegistered, []common.Address) (event.Subscription, error)) *VRFCoordinatorV2Interface_WatchProvingKeyRegistered_Call { + _c.Call.Return(run) + return _c +} + // WatchRandomWordsFulfilled provides a mock function with given fields: opts, sink, requestId func (_m *VRFCoordinatorV2Interface) WatchRandomWordsFulfilled(opts *bind.WatchOpts, sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2RandomWordsFulfilled, requestId []*big.Int) (event.Subscription, error) { ret := _m.Called(opts, sink, requestId) @@ -2258,6 +4404,36 @@ func (_m *VRFCoordinatorV2Interface) WatchRandomWordsFulfilled(opts *bind.WatchO return r0, r1 } +// VRFCoordinatorV2Interface_WatchRandomWordsFulfilled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchRandomWordsFulfilled' +type VRFCoordinatorV2Interface_WatchRandomWordsFulfilled_Call struct { + *mock.Call +} + +// WatchRandomWordsFulfilled is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2RandomWordsFulfilled +// - requestId []*big.Int +func (_e *VRFCoordinatorV2Interface_Expecter) WatchRandomWordsFulfilled(opts interface{}, sink interface{}, requestId interface{}) *VRFCoordinatorV2Interface_WatchRandomWordsFulfilled_Call { + return &VRFCoordinatorV2Interface_WatchRandomWordsFulfilled_Call{Call: _e.mock.On("WatchRandomWordsFulfilled", opts, sink, requestId)} +} + +func (_c *VRFCoordinatorV2Interface_WatchRandomWordsFulfilled_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2RandomWordsFulfilled, requestId []*big.Int)) *VRFCoordinatorV2Interface_WatchRandomWordsFulfilled_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *vrf_coordinator_v2.VRFCoordinatorV2RandomWordsFulfilled), args[2].([]*big.Int)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_WatchRandomWordsFulfilled_Call) Return(_a0 event.Subscription, _a1 error) *VRFCoordinatorV2Interface_WatchRandomWordsFulfilled_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_WatchRandomWordsFulfilled_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *vrf_coordinator_v2.VRFCoordinatorV2RandomWordsFulfilled, []*big.Int) (event.Subscription, error)) *VRFCoordinatorV2Interface_WatchRandomWordsFulfilled_Call { + _c.Call.Return(run) + return _c +} + // WatchRandomWordsRequested provides a mock function with given fields: opts, sink, keyHash, subId, sender func (_m *VRFCoordinatorV2Interface) WatchRandomWordsRequested(opts *bind.WatchOpts, sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2RandomWordsRequested, keyHash [][32]byte, subId []uint64, sender []common.Address) (event.Subscription, error) { ret := _m.Called(opts, sink, keyHash, subId, sender) @@ -2288,6 +4464,38 @@ func (_m *VRFCoordinatorV2Interface) WatchRandomWordsRequested(opts *bind.WatchO return r0, r1 } +// VRFCoordinatorV2Interface_WatchRandomWordsRequested_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchRandomWordsRequested' +type VRFCoordinatorV2Interface_WatchRandomWordsRequested_Call struct { + *mock.Call +} + +// WatchRandomWordsRequested is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2RandomWordsRequested +// - keyHash [][32]byte +// - subId []uint64 +// - sender []common.Address +func (_e *VRFCoordinatorV2Interface_Expecter) WatchRandomWordsRequested(opts interface{}, sink interface{}, keyHash interface{}, subId interface{}, sender interface{}) *VRFCoordinatorV2Interface_WatchRandomWordsRequested_Call { + return &VRFCoordinatorV2Interface_WatchRandomWordsRequested_Call{Call: _e.mock.On("WatchRandomWordsRequested", opts, sink, keyHash, subId, sender)} +} + +func (_c *VRFCoordinatorV2Interface_WatchRandomWordsRequested_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2RandomWordsRequested, keyHash [][32]byte, subId []uint64, sender []common.Address)) *VRFCoordinatorV2Interface_WatchRandomWordsRequested_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *vrf_coordinator_v2.VRFCoordinatorV2RandomWordsRequested), args[2].([][32]byte), args[3].([]uint64), args[4].([]common.Address)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_WatchRandomWordsRequested_Call) Return(_a0 event.Subscription, _a1 error) *VRFCoordinatorV2Interface_WatchRandomWordsRequested_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_WatchRandomWordsRequested_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *vrf_coordinator_v2.VRFCoordinatorV2RandomWordsRequested, [][32]byte, []uint64, []common.Address) (event.Subscription, error)) *VRFCoordinatorV2Interface_WatchRandomWordsRequested_Call { + _c.Call.Return(run) + return _c +} + // WatchSubscriptionCanceled provides a mock function with given fields: opts, sink, subId func (_m *VRFCoordinatorV2Interface) WatchSubscriptionCanceled(opts *bind.WatchOpts, sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionCanceled, subId []uint64) (event.Subscription, error) { ret := _m.Called(opts, sink, subId) @@ -2318,6 +4526,36 @@ func (_m *VRFCoordinatorV2Interface) WatchSubscriptionCanceled(opts *bind.WatchO return r0, r1 } +// VRFCoordinatorV2Interface_WatchSubscriptionCanceled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchSubscriptionCanceled' +type VRFCoordinatorV2Interface_WatchSubscriptionCanceled_Call struct { + *mock.Call +} + +// WatchSubscriptionCanceled is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionCanceled +// - subId []uint64 +func (_e *VRFCoordinatorV2Interface_Expecter) WatchSubscriptionCanceled(opts interface{}, sink interface{}, subId interface{}) *VRFCoordinatorV2Interface_WatchSubscriptionCanceled_Call { + return &VRFCoordinatorV2Interface_WatchSubscriptionCanceled_Call{Call: _e.mock.On("WatchSubscriptionCanceled", opts, sink, subId)} +} + +func (_c *VRFCoordinatorV2Interface_WatchSubscriptionCanceled_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionCanceled, subId []uint64)) *VRFCoordinatorV2Interface_WatchSubscriptionCanceled_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionCanceled), args[2].([]uint64)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_WatchSubscriptionCanceled_Call) Return(_a0 event.Subscription, _a1 error) *VRFCoordinatorV2Interface_WatchSubscriptionCanceled_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_WatchSubscriptionCanceled_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionCanceled, []uint64) (event.Subscription, error)) *VRFCoordinatorV2Interface_WatchSubscriptionCanceled_Call { + _c.Call.Return(run) + return _c +} + // WatchSubscriptionConsumerAdded provides a mock function with given fields: opts, sink, subId func (_m *VRFCoordinatorV2Interface) WatchSubscriptionConsumerAdded(opts *bind.WatchOpts, sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionConsumerAdded, subId []uint64) (event.Subscription, error) { ret := _m.Called(opts, sink, subId) @@ -2348,6 +4586,36 @@ func (_m *VRFCoordinatorV2Interface) WatchSubscriptionConsumerAdded(opts *bind.W return r0, r1 } +// VRFCoordinatorV2Interface_WatchSubscriptionConsumerAdded_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchSubscriptionConsumerAdded' +type VRFCoordinatorV2Interface_WatchSubscriptionConsumerAdded_Call struct { + *mock.Call +} + +// WatchSubscriptionConsumerAdded is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionConsumerAdded +// - subId []uint64 +func (_e *VRFCoordinatorV2Interface_Expecter) WatchSubscriptionConsumerAdded(opts interface{}, sink interface{}, subId interface{}) *VRFCoordinatorV2Interface_WatchSubscriptionConsumerAdded_Call { + return &VRFCoordinatorV2Interface_WatchSubscriptionConsumerAdded_Call{Call: _e.mock.On("WatchSubscriptionConsumerAdded", opts, sink, subId)} +} + +func (_c *VRFCoordinatorV2Interface_WatchSubscriptionConsumerAdded_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionConsumerAdded, subId []uint64)) *VRFCoordinatorV2Interface_WatchSubscriptionConsumerAdded_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionConsumerAdded), args[2].([]uint64)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_WatchSubscriptionConsumerAdded_Call) Return(_a0 event.Subscription, _a1 error) *VRFCoordinatorV2Interface_WatchSubscriptionConsumerAdded_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_WatchSubscriptionConsumerAdded_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionConsumerAdded, []uint64) (event.Subscription, error)) *VRFCoordinatorV2Interface_WatchSubscriptionConsumerAdded_Call { + _c.Call.Return(run) + return _c +} + // WatchSubscriptionConsumerRemoved provides a mock function with given fields: opts, sink, subId func (_m *VRFCoordinatorV2Interface) WatchSubscriptionConsumerRemoved(opts *bind.WatchOpts, sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionConsumerRemoved, subId []uint64) (event.Subscription, error) { ret := _m.Called(opts, sink, subId) @@ -2378,6 +4646,36 @@ func (_m *VRFCoordinatorV2Interface) WatchSubscriptionConsumerRemoved(opts *bind return r0, r1 } +// VRFCoordinatorV2Interface_WatchSubscriptionConsumerRemoved_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchSubscriptionConsumerRemoved' +type VRFCoordinatorV2Interface_WatchSubscriptionConsumerRemoved_Call struct { + *mock.Call +} + +// WatchSubscriptionConsumerRemoved is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionConsumerRemoved +// - subId []uint64 +func (_e *VRFCoordinatorV2Interface_Expecter) WatchSubscriptionConsumerRemoved(opts interface{}, sink interface{}, subId interface{}) *VRFCoordinatorV2Interface_WatchSubscriptionConsumerRemoved_Call { + return &VRFCoordinatorV2Interface_WatchSubscriptionConsumerRemoved_Call{Call: _e.mock.On("WatchSubscriptionConsumerRemoved", opts, sink, subId)} +} + +func (_c *VRFCoordinatorV2Interface_WatchSubscriptionConsumerRemoved_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionConsumerRemoved, subId []uint64)) *VRFCoordinatorV2Interface_WatchSubscriptionConsumerRemoved_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionConsumerRemoved), args[2].([]uint64)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_WatchSubscriptionConsumerRemoved_Call) Return(_a0 event.Subscription, _a1 error) *VRFCoordinatorV2Interface_WatchSubscriptionConsumerRemoved_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_WatchSubscriptionConsumerRemoved_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionConsumerRemoved, []uint64) (event.Subscription, error)) *VRFCoordinatorV2Interface_WatchSubscriptionConsumerRemoved_Call { + _c.Call.Return(run) + return _c +} + // WatchSubscriptionCreated provides a mock function with given fields: opts, sink, subId func (_m *VRFCoordinatorV2Interface) WatchSubscriptionCreated(opts *bind.WatchOpts, sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionCreated, subId []uint64) (event.Subscription, error) { ret := _m.Called(opts, sink, subId) @@ -2408,6 +4706,36 @@ func (_m *VRFCoordinatorV2Interface) WatchSubscriptionCreated(opts *bind.WatchOp return r0, r1 } +// VRFCoordinatorV2Interface_WatchSubscriptionCreated_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchSubscriptionCreated' +type VRFCoordinatorV2Interface_WatchSubscriptionCreated_Call struct { + *mock.Call +} + +// WatchSubscriptionCreated is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionCreated +// - subId []uint64 +func (_e *VRFCoordinatorV2Interface_Expecter) WatchSubscriptionCreated(opts interface{}, sink interface{}, subId interface{}) *VRFCoordinatorV2Interface_WatchSubscriptionCreated_Call { + return &VRFCoordinatorV2Interface_WatchSubscriptionCreated_Call{Call: _e.mock.On("WatchSubscriptionCreated", opts, sink, subId)} +} + +func (_c *VRFCoordinatorV2Interface_WatchSubscriptionCreated_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionCreated, subId []uint64)) *VRFCoordinatorV2Interface_WatchSubscriptionCreated_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionCreated), args[2].([]uint64)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_WatchSubscriptionCreated_Call) Return(_a0 event.Subscription, _a1 error) *VRFCoordinatorV2Interface_WatchSubscriptionCreated_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_WatchSubscriptionCreated_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionCreated, []uint64) (event.Subscription, error)) *VRFCoordinatorV2Interface_WatchSubscriptionCreated_Call { + _c.Call.Return(run) + return _c +} + // WatchSubscriptionFunded provides a mock function with given fields: opts, sink, subId func (_m *VRFCoordinatorV2Interface) WatchSubscriptionFunded(opts *bind.WatchOpts, sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionFunded, subId []uint64) (event.Subscription, error) { ret := _m.Called(opts, sink, subId) @@ -2438,6 +4766,36 @@ func (_m *VRFCoordinatorV2Interface) WatchSubscriptionFunded(opts *bind.WatchOpt return r0, r1 } +// VRFCoordinatorV2Interface_WatchSubscriptionFunded_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchSubscriptionFunded' +type VRFCoordinatorV2Interface_WatchSubscriptionFunded_Call struct { + *mock.Call +} + +// WatchSubscriptionFunded is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionFunded +// - subId []uint64 +func (_e *VRFCoordinatorV2Interface_Expecter) WatchSubscriptionFunded(opts interface{}, sink interface{}, subId interface{}) *VRFCoordinatorV2Interface_WatchSubscriptionFunded_Call { + return &VRFCoordinatorV2Interface_WatchSubscriptionFunded_Call{Call: _e.mock.On("WatchSubscriptionFunded", opts, sink, subId)} +} + +func (_c *VRFCoordinatorV2Interface_WatchSubscriptionFunded_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionFunded, subId []uint64)) *VRFCoordinatorV2Interface_WatchSubscriptionFunded_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionFunded), args[2].([]uint64)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_WatchSubscriptionFunded_Call) Return(_a0 event.Subscription, _a1 error) *VRFCoordinatorV2Interface_WatchSubscriptionFunded_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_WatchSubscriptionFunded_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionFunded, []uint64) (event.Subscription, error)) *VRFCoordinatorV2Interface_WatchSubscriptionFunded_Call { + _c.Call.Return(run) + return _c +} + // WatchSubscriptionOwnerTransferRequested provides a mock function with given fields: opts, sink, subId func (_m *VRFCoordinatorV2Interface) WatchSubscriptionOwnerTransferRequested(opts *bind.WatchOpts, sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionOwnerTransferRequested, subId []uint64) (event.Subscription, error) { ret := _m.Called(opts, sink, subId) @@ -2468,6 +4826,36 @@ func (_m *VRFCoordinatorV2Interface) WatchSubscriptionOwnerTransferRequested(opt return r0, r1 } +// VRFCoordinatorV2Interface_WatchSubscriptionOwnerTransferRequested_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchSubscriptionOwnerTransferRequested' +type VRFCoordinatorV2Interface_WatchSubscriptionOwnerTransferRequested_Call struct { + *mock.Call +} + +// WatchSubscriptionOwnerTransferRequested is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionOwnerTransferRequested +// - subId []uint64 +func (_e *VRFCoordinatorV2Interface_Expecter) WatchSubscriptionOwnerTransferRequested(opts interface{}, sink interface{}, subId interface{}) *VRFCoordinatorV2Interface_WatchSubscriptionOwnerTransferRequested_Call { + return &VRFCoordinatorV2Interface_WatchSubscriptionOwnerTransferRequested_Call{Call: _e.mock.On("WatchSubscriptionOwnerTransferRequested", opts, sink, subId)} +} + +func (_c *VRFCoordinatorV2Interface_WatchSubscriptionOwnerTransferRequested_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionOwnerTransferRequested, subId []uint64)) *VRFCoordinatorV2Interface_WatchSubscriptionOwnerTransferRequested_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionOwnerTransferRequested), args[2].([]uint64)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_WatchSubscriptionOwnerTransferRequested_Call) Return(_a0 event.Subscription, _a1 error) *VRFCoordinatorV2Interface_WatchSubscriptionOwnerTransferRequested_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_WatchSubscriptionOwnerTransferRequested_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionOwnerTransferRequested, []uint64) (event.Subscription, error)) *VRFCoordinatorV2Interface_WatchSubscriptionOwnerTransferRequested_Call { + _c.Call.Return(run) + return _c +} + // WatchSubscriptionOwnerTransferred provides a mock function with given fields: opts, sink, subId func (_m *VRFCoordinatorV2Interface) WatchSubscriptionOwnerTransferred(opts *bind.WatchOpts, sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionOwnerTransferred, subId []uint64) (event.Subscription, error) { ret := _m.Called(opts, sink, subId) @@ -2498,6 +4886,36 @@ func (_m *VRFCoordinatorV2Interface) WatchSubscriptionOwnerTransferred(opts *bin return r0, r1 } +// VRFCoordinatorV2Interface_WatchSubscriptionOwnerTransferred_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WatchSubscriptionOwnerTransferred' +type VRFCoordinatorV2Interface_WatchSubscriptionOwnerTransferred_Call struct { + *mock.Call +} + +// WatchSubscriptionOwnerTransferred is a helper method to define mock.On call +// - opts *bind.WatchOpts +// - sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionOwnerTransferred +// - subId []uint64 +func (_e *VRFCoordinatorV2Interface_Expecter) WatchSubscriptionOwnerTransferred(opts interface{}, sink interface{}, subId interface{}) *VRFCoordinatorV2Interface_WatchSubscriptionOwnerTransferred_Call { + return &VRFCoordinatorV2Interface_WatchSubscriptionOwnerTransferred_Call{Call: _e.mock.On("WatchSubscriptionOwnerTransferred", opts, sink, subId)} +} + +func (_c *VRFCoordinatorV2Interface_WatchSubscriptionOwnerTransferred_Call) Run(run func(opts *bind.WatchOpts, sink chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionOwnerTransferred, subId []uint64)) *VRFCoordinatorV2Interface_WatchSubscriptionOwnerTransferred_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*bind.WatchOpts), args[1].(chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionOwnerTransferred), args[2].([]uint64)) + }) + return _c +} + +func (_c *VRFCoordinatorV2Interface_WatchSubscriptionOwnerTransferred_Call) Return(_a0 event.Subscription, _a1 error) *VRFCoordinatorV2Interface_WatchSubscriptionOwnerTransferred_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *VRFCoordinatorV2Interface_WatchSubscriptionOwnerTransferred_Call) RunAndReturn(run func(*bind.WatchOpts, chan<- *vrf_coordinator_v2.VRFCoordinatorV2SubscriptionOwnerTransferred, []uint64) (event.Subscription, error)) *VRFCoordinatorV2Interface_WatchSubscriptionOwnerTransferred_Call { + _c.Call.Return(run) + return _c +} + // NewVRFCoordinatorV2Interface creates a new instance of VRFCoordinatorV2Interface. 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 NewVRFCoordinatorV2Interface(t interface { diff --git a/core/services/vrf/v1/listener_v1.go b/core/services/vrf/v1/listener_v1.go index c8029403084..74b522d4089 100644 --- a/core/services/vrf/v1/listener_v1.go +++ b/core/services/vrf/v1/listener_v1.go @@ -484,7 +484,7 @@ func (lsn *Listener) ProcessRequest(ctx context.Context, req request) bool { run := pipeline.NewRun(*lsn.Job.PipelineSpec, vars) // The VRF pipeline has no async tasks, so we don't need to check for `incomplete` - if _, err = lsn.PipelineRunner.Run(ctx, run, lggr, true, func(tx sqlutil.DataSource) error { + if _, err = lsn.PipelineRunner.Run(ctx, run, true, func(tx sqlutil.DataSource) error { // Always mark consumed regardless of whether the proof failed or not. if err = lsn.Chain.LogBroadcaster().MarkConsumed(ctx, tx, req.lb); err != nil { lggr.Errorw("Failed mark consumed", "err", err) diff --git a/core/services/vrf/v2/integration_v2_test.go b/core/services/vrf/v2/integration_v2_test.go index e8d4fd255f7..e9ae908565a 100644 --- a/core/services/vrf/v2/integration_v2_test.go +++ b/core/services/vrf/v2/integration_v2_test.go @@ -1779,7 +1779,12 @@ func TestIntegrationVRFV2(t *testing.T) { // wei/link * link / wei/gas = wei / (wei/gas) = gas gasDiff := linkCharged.Sub(expected).Mul(vrftesthelpers.WeiPerUnitLink).Div(gasPriceD).Abs().IntPart() t.Log("gasDiff", gasDiff) - assert.Less(t, gasDiff, int64(200)) + // NOTE: Changed diff from 200 to 2000 after VRF.sol interface changed from memory -> calldata. + // Because of it, interface for VRFCoordinatorV2 had to be re-adjusted as well, but this change was not + // fully propagated throughout the contract. The reason for this is because this contract version is + // under the deprecation notice and V2 will not be deployed to any new chains in the future. + // Gas diff spike here is due to not properly re-adjusting the entire VRFCoordinatorV2 contract to this change. + assert.Less(t, gasDiff, int64(2000)) // If the oracle tries to withdraw more than it was paid it should fail. _, err = uni.rootContract.OracleWithdraw(uni.nallory, uni.nallory.From, linkWeiCharged.Add(decimal.NewFromInt(1)).BigInt()) 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 5b827a5291d..08652455047 100644 --- a/core/services/vrf/v2/listener_v2_log_listener_test.go +++ b/core/services/vrf/v2/listener_v2_log_listener_test.go @@ -21,6 +21,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/headtracker" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller" evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" ubig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" @@ -102,7 +103,8 @@ func setupVRFLogPollerListenerTH(t *testing.T, RpcBatchSize: rpcBatchSize, KeepFinalizedBlocksDepth: keepFinalizedBlocksDepth, } - lp := logpoller.NewLogPoller(o, esc, lggr, lpOpts) + ht := headtracker.NewSimulatedHeadTracker(esc, lpOpts.UseFinalityTag, lpOpts.FinalityDepth) + lp := logpoller.NewLogPoller(o, esc, lggr, ht, lpOpts) emitterAddress1, _, emitter1, err := log_emitter.DeployLogEmitter(owner, ec) require.NoError(t, err) diff --git a/core/services/vrf/v2/listener_v2_log_processor.go b/core/services/vrf/v2/listener_v2_log_processor.go index 145e72ed2bc..3e9acf77601 100644 --- a/core/services/vrf/v2/listener_v2_log_processor.go +++ b/core/services/vrf/v2/listener_v2_log_processor.go @@ -1049,7 +1049,8 @@ func (lsn *listenerV2) runPipelines( wg.Add(1) go func(i int, req pendingRequest) { defer wg.Done() - results[i] = lsn.simulateFulfillment(ctx, maxGasPriceWei, req, l) + ll := l.With("reqID", req.req.RequestID().String()) + results[i] = lsn.simulateFulfillment(ctx, maxGasPriceWei, req, ll) }(i, req) } wg.Wait() @@ -1103,7 +1104,6 @@ func (lsn *listenerV2) simulateFulfillment( if err != nil { // not critical, just log and continue lg.Warnw("unable to estimate funds needed for request, continuing anyway", - "reqID", req.req.RequestID(), "err", err) res.fundsNeeded = big.NewInt(0) } @@ -1126,7 +1126,7 @@ func (lsn *listenerV2) simulateFulfillment( }, }) var trrs pipeline.TaskRunResults - res.run, trrs, err = lsn.pipelineRunner.ExecuteRun(ctx, *lsn.job.PipelineSpec, vars, lg) + res.run, trrs, err = lsn.pipelineRunner.ExecuteRun(ctx, *lsn.job.PipelineSpec, vars) if err != nil { res.err = fmt.Errorf("executing run: %w", err) return res @@ -1168,7 +1168,7 @@ func (lsn *listenerV2) simulateFulfillment( return res } - finalResult := trrs.FinalResult(lg) + finalResult := trrs.FinalResult() if len(finalResult.Values) != 1 { res.err = errors.Errorf("unexpected number of outputs, expected 1, was %d", len(finalResult.Values)) return res diff --git a/core/services/vrf/vrfcommon/types.go b/core/services/vrf/vrfcommon/types.go index a27fcd5beb8..7dbe9b15f61 100644 --- a/core/services/vrf/vrfcommon/types.go +++ b/core/services/vrf/vrfcommon/types.go @@ -14,13 +14,11 @@ type GethKeyStore interface { GetRoundRobinAddress(ctx context.Context, chainID *big.Int, addresses ...common.Address) (common.Address, error) } -//go:generate mockery --quiet --name Config --output ../mocks/ --case=underscore type Config interface { FinalityDepth() uint32 MinIncomingConfirmations() uint32 } -//go:generate mockery --quiet --name FeeConfig --output ../mocks/ --case=underscore type FeeConfig interface { LimitDefault() uint64 LimitJobType() config.LimitJobType diff --git a/core/services/webhook/delegate.go b/core/services/webhook/delegate.go index 690ae38d088..2c6d597f2aa 100644 --- a/core/services/webhook/delegate.go +++ b/core/services/webhook/delegate.go @@ -179,7 +179,7 @@ func (r *webhookJobRunner) RunJob(ctx context.Context, jobUUID uuid.UUID, reques run := pipeline.NewRun(*spec.PipelineSpec, vars) - _, err := r.runner.Run(ctx, run, jobLggr, true, nil) + _, err := r.runner.Run(ctx, run, true, nil) if err != nil { jobLggr.Errorw("Error running pipeline for webhook job", "err", err) return 0, err diff --git a/core/services/webhook/external_initiator_manager.go b/core/services/webhook/external_initiator_manager.go index 2f9a176906d..10614d71938 100644 --- a/core/services/webhook/external_initiator_manager.go +++ b/core/services/webhook/external_initiator_manager.go @@ -18,8 +18,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/store/models" ) -//go:generate mockery --quiet --name ExternalInitiatorManager --output ./mocks/ --case=underscore - // ExternalInitiatorManager manages HTTP requests to remote external initiators type ExternalInitiatorManager interface { Notify(ctx context.Context, webhookSpecID int32) error @@ -27,7 +25,6 @@ type ExternalInitiatorManager interface { FindExternalInitiatorByName(ctx context.Context, name string) (bridges.ExternalInitiator, error) } -//go:generate mockery --quiet --name HTTPClient --output ./mocks/ --case=underscore type HTTPClient interface { Do(req *http.Request) (*http.Response, error) } diff --git a/core/services/webhook/mocks/external_initiator_manager.go b/core/services/webhook/mocks/external_initiator_manager.go index 7a3ee29f62f..215a3d4a5be 100644 --- a/core/services/webhook/mocks/external_initiator_manager.go +++ b/core/services/webhook/mocks/external_initiator_manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -15,6 +15,14 @@ type ExternalInitiatorManager struct { mock.Mock } +type ExternalInitiatorManager_Expecter struct { + mock *mock.Mock +} + +func (_m *ExternalInitiatorManager) EXPECT() *ExternalInitiatorManager_Expecter { + return &ExternalInitiatorManager_Expecter{mock: &_m.Mock} +} + // DeleteJob provides a mock function with given fields: ctx, webhookSpecID func (_m *ExternalInitiatorManager) DeleteJob(ctx context.Context, webhookSpecID int32) error { ret := _m.Called(ctx, webhookSpecID) @@ -33,6 +41,35 @@ func (_m *ExternalInitiatorManager) DeleteJob(ctx context.Context, webhookSpecID return r0 } +// ExternalInitiatorManager_DeleteJob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteJob' +type ExternalInitiatorManager_DeleteJob_Call struct { + *mock.Call +} + +// DeleteJob is a helper method to define mock.On call +// - ctx context.Context +// - webhookSpecID int32 +func (_e *ExternalInitiatorManager_Expecter) DeleteJob(ctx interface{}, webhookSpecID interface{}) *ExternalInitiatorManager_DeleteJob_Call { + return &ExternalInitiatorManager_DeleteJob_Call{Call: _e.mock.On("DeleteJob", ctx, webhookSpecID)} +} + +func (_c *ExternalInitiatorManager_DeleteJob_Call) Run(run func(ctx context.Context, webhookSpecID int32)) *ExternalInitiatorManager_DeleteJob_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int32)) + }) + return _c +} + +func (_c *ExternalInitiatorManager_DeleteJob_Call) Return(_a0 error) *ExternalInitiatorManager_DeleteJob_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExternalInitiatorManager_DeleteJob_Call) RunAndReturn(run func(context.Context, int32) error) *ExternalInitiatorManager_DeleteJob_Call { + _c.Call.Return(run) + return _c +} + // FindExternalInitiatorByName provides a mock function with given fields: ctx, name func (_m *ExternalInitiatorManager) FindExternalInitiatorByName(ctx context.Context, name string) (bridges.ExternalInitiator, error) { ret := _m.Called(ctx, name) @@ -61,6 +98,35 @@ func (_m *ExternalInitiatorManager) FindExternalInitiatorByName(ctx context.Cont return r0, r1 } +// ExternalInitiatorManager_FindExternalInitiatorByName_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindExternalInitiatorByName' +type ExternalInitiatorManager_FindExternalInitiatorByName_Call struct { + *mock.Call +} + +// FindExternalInitiatorByName is a helper method to define mock.On call +// - ctx context.Context +// - name string +func (_e *ExternalInitiatorManager_Expecter) FindExternalInitiatorByName(ctx interface{}, name interface{}) *ExternalInitiatorManager_FindExternalInitiatorByName_Call { + return &ExternalInitiatorManager_FindExternalInitiatorByName_Call{Call: _e.mock.On("FindExternalInitiatorByName", ctx, name)} +} + +func (_c *ExternalInitiatorManager_FindExternalInitiatorByName_Call) Run(run func(ctx context.Context, name string)) *ExternalInitiatorManager_FindExternalInitiatorByName_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *ExternalInitiatorManager_FindExternalInitiatorByName_Call) Return(_a0 bridges.ExternalInitiator, _a1 error) *ExternalInitiatorManager_FindExternalInitiatorByName_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *ExternalInitiatorManager_FindExternalInitiatorByName_Call) RunAndReturn(run func(context.Context, string) (bridges.ExternalInitiator, error)) *ExternalInitiatorManager_FindExternalInitiatorByName_Call { + _c.Call.Return(run) + return _c +} + // Notify provides a mock function with given fields: ctx, webhookSpecID func (_m *ExternalInitiatorManager) Notify(ctx context.Context, webhookSpecID int32) error { ret := _m.Called(ctx, webhookSpecID) @@ -79,6 +145,35 @@ func (_m *ExternalInitiatorManager) Notify(ctx context.Context, webhookSpecID in return r0 } +// ExternalInitiatorManager_Notify_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Notify' +type ExternalInitiatorManager_Notify_Call struct { + *mock.Call +} + +// Notify is a helper method to define mock.On call +// - ctx context.Context +// - webhookSpecID int32 +func (_e *ExternalInitiatorManager_Expecter) Notify(ctx interface{}, webhookSpecID interface{}) *ExternalInitiatorManager_Notify_Call { + return &ExternalInitiatorManager_Notify_Call{Call: _e.mock.On("Notify", ctx, webhookSpecID)} +} + +func (_c *ExternalInitiatorManager_Notify_Call) Run(run func(ctx context.Context, webhookSpecID int32)) *ExternalInitiatorManager_Notify_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int32)) + }) + return _c +} + +func (_c *ExternalInitiatorManager_Notify_Call) Return(_a0 error) *ExternalInitiatorManager_Notify_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ExternalInitiatorManager_Notify_Call) RunAndReturn(run func(context.Context, int32) error) *ExternalInitiatorManager_Notify_Call { + _c.Call.Return(run) + return _c +} + // NewExternalInitiatorManager creates a new instance of ExternalInitiatorManager. 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 NewExternalInitiatorManager(t interface { diff --git a/core/services/webhook/mocks/http_client.go b/core/services/webhook/mocks/http_client.go index 27167f235c3..4a6750871d8 100644 --- a/core/services/webhook/mocks/http_client.go +++ b/core/services/webhook/mocks/http_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -13,6 +13,14 @@ type HTTPClient struct { mock.Mock } +type HTTPClient_Expecter struct { + mock *mock.Mock +} + +func (_m *HTTPClient) EXPECT() *HTTPClient_Expecter { + return &HTTPClient_Expecter{mock: &_m.Mock} +} + // Do provides a mock function with given fields: req func (_m *HTTPClient) Do(req *http.Request) (*http.Response, error) { ret := _m.Called(req) @@ -43,6 +51,34 @@ func (_m *HTTPClient) Do(req *http.Request) (*http.Response, error) { return r0, r1 } +// HTTPClient_Do_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Do' +type HTTPClient_Do_Call struct { + *mock.Call +} + +// Do is a helper method to define mock.On call +// - req *http.Request +func (_e *HTTPClient_Expecter) Do(req interface{}) *HTTPClient_Do_Call { + return &HTTPClient_Do_Call{Call: _e.mock.On("Do", req)} +} + +func (_c *HTTPClient_Do_Call) Run(run func(req *http.Request)) *HTTPClient_Do_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*http.Request)) + }) + return _c +} + +func (_c *HTTPClient_Do_Call) Return(_a0 *http.Response, _a1 error) *HTTPClient_Do_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *HTTPClient_Do_Call) RunAndReturn(run func(*http.Request) (*http.Response, error)) *HTTPClient_Do_Call { + _c.Call.Return(run) + return _c +} + // NewHTTPClient creates a new instance of HTTPClient. 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 NewHTTPClient(t interface { diff --git a/core/services/workflows/engine.go b/core/services/workflows/engine.go index 28f37cd7c43..f83d40b176f 100644 --- a/core/services/workflows/engine.go +++ b/core/services/workflows/engine.go @@ -16,6 +16,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/types/core" "github.com/smartcontractkit/chainlink-common/pkg/values" "github.com/smartcontractkit/chainlink-common/pkg/workflows" + "github.com/smartcontractkit/chainlink/v2/core/capabilities/transmission" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/workflows/store" @@ -37,7 +38,6 @@ type Engine struct { executionStates store.Store pendingStepRequests chan stepRequest triggerEvents chan capabilities.CapabilityResponse - newWorkerCh chan struct{} stepUpdateCh chan store.WorkflowExecutionStep wg sync.WaitGroup stopCh services.StopChan @@ -55,6 +55,8 @@ type Engine struct { // when initializing the engine. retryMs int + maxWorkerLimit int + clock clockwork.Clock } @@ -63,6 +65,11 @@ func (e *Engine) Start(ctx context.Context) error { // create a new context, since the one passed in via Start is short-lived. ctx, _ := e.stopCh.NewCtx() + e.wg.Add(e.maxWorkerLimit) + for i := 0; i < e.maxWorkerLimit; i++ { + go e.worker(ctx) + } + e.wg.Add(2) go e.init(ctx) go e.loop(ctx) @@ -83,7 +90,7 @@ func (e *Engine) resolveWorkflowCapabilities(ctx context.Context) error { for _, t := range e.workflow.triggers { tg, err := e.registry.GetTrigger(ctx, t.ID) if err != nil { - e.logger.Errorf("failed to get trigger capability: %s", err) + e.logger.With(cIDKey, t.ID).Errorf("failed to get trigger capability: %s", err) // we don't immediately return here, since we want to retry all triggers // to notify the user of all errors at once. triggersInitialized = false @@ -92,7 +99,9 @@ func (e *Engine) resolveWorkflowCapabilities(ctx context.Context) error { } } if !triggersInitialized { - return fmt.Errorf("failed to resolve triggers") + return &workflowError{reason: "failed to resolve triggers", labels: map[string]string{ + wIDKey: e.workflow.id, + }} } // Step 2. Walk the graph and register each step's capability to this workflow @@ -111,7 +120,12 @@ func (e *Engine) resolveWorkflowCapabilities(ctx context.Context) error { err := e.initializeCapability(ctx, s) if err != nil { - return fmt.Errorf("failed to initialize capability for step %s: %w", s.Ref, err) + return &workflowError{err: err, reason: "failed to initialize capability for step", + labels: map[string]string{ + wIDKey: e.workflow.id, + sIDKey: s.ID, + sRKey: s.Ref, + }} } return nil @@ -121,6 +135,20 @@ func (e *Engine) resolveWorkflowCapabilities(ctx context.Context) error { } func (e *Engine) initializeCapability(ctx context.Context, step *step) error { + // We use varadic err here so that err can be optional, but we assume that + // its length is either 0 or 1 + newCPErr := func(reason string, errs ...error) *workflowError { + var err error + if len(errs) > 0 { + err = errs[0] + } + + return &workflowError{reason: reason, err: err, labels: map[string]string{ + wIDKey: e.workflow.id, + sIDKey: step.ID, + }} + } + // If the capability already exists, that means we've already registered it if step.capability != nil { return nil @@ -128,20 +156,22 @@ func (e *Engine) initializeCapability(ctx context.Context, step *step) error { cp, err := e.registry.Get(ctx, step.ID) if err != nil { - return fmt.Errorf("failed to get capability with ref %s: %s", step.ID, err) + return newCPErr("failed to get capability", err) } info, err := cp.Info(ctx) if err != nil { - return fmt.Errorf("failed to get info of capability with id %s: %w", step.ID, err) + return newCPErr("failed to get capability info", err) } // Special treatment for local targets - wrap into a transmission capability // If the DON is nil, this is a local target. if info.CapabilityType == capabilities.CapabilityTypeTarget && info.DON == nil { - e.logger.Debugf("wrapping capability %s in local transmission protocol", info.ID) + l := e.logger.With("capabilityID", step.ID) + l.Debug("wrapping capability in local transmission protocol") cp = transmission.NewLocalTargetCapability( e.logger, + step.ID, e.localNode, cp.(capabilities.TargetCapability), ) @@ -151,13 +181,13 @@ func (e *Engine) initializeCapability(ctx context.Context, step *step) error { // they all satisfy the `CallbackCapability` interface cc, ok := cp.(capabilities.CallbackCapability) if !ok { - return fmt.Errorf("could not coerce capability %s to CallbackCapability", step.ID) + return newCPErr("capability does not satisfy CallbackCapability") } if step.config == nil { configMap, newMapErr := values.NewMap(step.Config) if newMapErr != nil { - return fmt.Errorf("failed to convert config to values.Map: %s", newMapErr) + return newCPErr("failed to convert config to values.Map", newMapErr) } step.config = configMap } @@ -171,7 +201,7 @@ func (e *Engine) initializeCapability(ctx context.Context, step *step) error { err = cc.RegisterToWorkflow(ctx, registrationRequest) if err != nil { - return fmt.Errorf("failed to register to workflow (%+v): %w", registrationRequest, err) + return newCPErr(fmt.Sprintf("failed to register capability to workflow (%+v)", registrationRequest), err) } step.capability = cc @@ -200,7 +230,10 @@ func (e *Engine) init(ctx context.Context) { err = e.resolveWorkflowCapabilities(ctx) if err != nil { - return fmt.Errorf("failed to resolve workflow: %s", err) + return &workflowError{err: err, reason: "failed to resolve workflow capabilities", + labels: map[string]string{ + wIDKey: e.workflow.id, + }} } return nil }) @@ -214,14 +247,14 @@ func (e *Engine) init(ctx context.Context) { e.logger.Debug("capabilities resolved, resuming in-progress workflows") err := e.resumeInProgressExecutions(ctx) if err != nil { - e.logger.Errorf("failed to resume workflows: %v", err) + e.logger.Errorf("failed to resume in-progress workflows: %v", err) } e.logger.Debug("registering triggers") for idx, t := range e.workflow.triggers { err := e.registerTrigger(ctx, t, idx) if err != nil { - e.logger.Errorf("failed to register trigger: %s", err) + e.logger.With(cIDKey, t.ID).Errorf("failed to register trigger: %s", err) } } @@ -241,7 +274,7 @@ func (e *Engine) resumeInProgressExecutions(ctx context.Context) error { // TODO: paginate properly if len(wipExecutions) >= defaultLimit { - e.logger.Warnf("possible execution overflow during resumption") + e.logger.Warnf("possible execution overflow during resumption, work in progress executions: %d >= %d", len(wipExecutions), defaultLimit) } // Cache the dependents associated with a step. @@ -284,9 +317,10 @@ func generateTriggerId(workflowID string, triggerIdx int) string { // registerTrigger is used during the initialization phase to bind a trigger to this workflow func (e *Engine) registerTrigger(ctx context.Context, t *triggerCapability, triggerIdx int) error { + triggerID := generateTriggerId(e.workflow.id, triggerIdx) triggerInputs, err := values.NewMap( map[string]any{ - "triggerId": generateTriggerId(e.workflow.id, triggerIdx), + "triggerId": triggerID, }, ) if err != nil { @@ -302,22 +336,52 @@ func (e *Engine) registerTrigger(ctx context.Context, t *triggerCapability, trig triggerRegRequest := capabilities.CapabilityRequest{ Metadata: capabilities.RequestMetadata{ - WorkflowID: e.workflow.id, - WorkflowDonID: e.localNode.WorkflowDON.ID, - WorkflowName: e.workflow.name, - WorkflowOwner: e.workflow.owner, + WorkflowID: e.workflow.id, + WorkflowDonID: e.localNode.WorkflowDON.ID, + WorkflowDonConfigVersion: e.localNode.WorkflowDON.ConfigVersion, + WorkflowName: e.workflow.name, + WorkflowOwner: e.workflow.owner, }, Config: tc, Inputs: triggerInputs, } eventsCh, err := t.trigger.RegisterTrigger(ctx, triggerRegRequest) if err != nil { - return fmt.Errorf("failed to instantiate trigger %s, %s", t.ID, err) - } - + // It's confusing that t.ID is different from triggerID, but + // t.ID is the capability ID, and triggerID is the trigger ID. + // + // The capability ID is globally scoped, whereas the trigger ID + // is scoped to this workflow. + // + // For example, t.ID might be "streams-trigger:network=mainnet@1.0.0" + // and triggerID might be "wf_123_trigger_0" + return &workflowError{err: err, reason: fmt.Sprintf("failed to register trigger: %+v", triggerRegRequest), + labels: map[string]string{ + wIDKey: e.workflow.id, + cIDKey: t.ID, + tIDKey: triggerID, + }} + } + + e.wg.Add(1) go func() { - for event := range eventsCh { - e.triggerEvents <- event + defer e.wg.Done() + + for { + select { + case <-e.stopCh: + return + case event, isOpen := <-eventsCh: + if !isOpen { + return + } + + select { + case <-e.stopCh: + return + case e.triggerEvents <- event: + } + } } }() @@ -344,11 +408,11 @@ func (e *Engine) loop(ctx context.Context) { for { select { case <-ctx.Done(): - e.logger.Debugw("shutting down loop") + e.logger.Debug("shutting down loop") return case resp, isOpen := <-e.triggerEvents: if !isOpen { - e.logger.Errorf("trigger events channel is no longer open, skipping") + e.logger.Error("trigger events channel is no longer open, skipping") continue } @@ -366,33 +430,20 @@ func (e *Engine) loop(ctx context.Context) { executionID, err := generateExecutionID(e.workflow.id, te.ID) if err != nil { - e.logger.Errorf("could not generate execution ID; error %v", resp.Err) + e.logger.With(tIDKey, te.ID).Errorf("could not generate execution ID: %v", err) continue } err = e.startExecution(ctx, executionID, resp.Value) if err != nil { - e.logger.Errorf("failed to start execution: %v", err) + e.logger.With(eIDKey, executionID).Errorf("failed to start execution: %v", err) } - case pendingStepRequest := <-e.pendingStepRequests: - // Wait for a new worker to be available before dispatching a new one. - // We'll do this up to newWorkerTimeout. If this expires, we'll put the - // message back on the queue and keep going. - t := e.clock.NewTimer(e.newWorkerTimeout) - select { - case <-e.newWorkerCh: - e.wg.Add(1) - go e.workerForStepRequest(ctx, pendingStepRequest) - case <-t.Chan(): - e.logger.Errorf("timed out when spinning off worker for pending step request %+v", pendingStepRequest) - e.pendingStepRequests <- pendingStepRequest - } - t.Stop() case stepUpdate := <-e.stepUpdateCh: // Executed synchronously to ensure we correctly schedule subsequent tasks. err := e.handleStepUpdate(ctx, stepUpdate) if err != nil { - e.logger.Errorf("failed to update step state: %+v, %s", stepUpdate, err) + e.logger.With(eIDKey, stepUpdate.ExecutionID, sRKey, stepUpdate.Ref). + Errorf("failed to update step state: %+v, %s", stepUpdate, err) } } } @@ -415,7 +466,7 @@ func generateExecutionID(workflowID, eventID string) (string, error) { // startExecution kicks off a new workflow execution when a trigger event is received. func (e *Engine) startExecution(ctx context.Context, executionID string, event values.Value) error { - e.logger.Debugw("executing on a trigger event", "event", event, "executionID", executionID) + e.logger.With("event", event, eIDKey, executionID).Debug("executing on a trigger event") ec := &store.WorkflowExecution{ Steps: map[string]*store.WorkflowExecutionStep{ workflows.KeywordTrigger: { @@ -457,6 +508,7 @@ func (e *Engine) handleStepUpdate(ctx context.Context, stepUpdate store.Workflow if err != nil { return err } + l := e.logger.With(eIDKey, state.ExecutionID, sRKey, stepUpdate.Ref) switch stepUpdate.Status { case store.StatusCompleted: @@ -499,7 +551,7 @@ func (e *Engine) handleStepUpdate(ctx context.Context, stepUpdate store.Workflow // We haven't completed the workflow, but should we continue? // If we've been executing for too long, let's time the workflow out and stop here. if state.CreatedAt != nil && e.clock.Since(*state.CreatedAt) > e.maxExecutionDuration { - e.logger.Infow("execution timed out", "executionID", state.ExecutionID) + l.Info("execution timed out") return e.finishExecution(ctx, state.ExecutionID, store.StatusTimeout) } @@ -509,7 +561,7 @@ func (e *Engine) handleStepUpdate(ctx context.Context, stepUpdate store.Workflow e.queueIfReady(state, sd) } case store.StatusCompletedEarlyExit: - e.logger.Infow("execution terminated early", "executionID", state.ExecutionID) + l.Info("execution terminated early") // NOTE: even though this marks the workflow as completed, any branches of the DAG // that don't depend on the step that signaled for an early exit will still complete. // This is to ensure that any side effects are executed consistently, since otherwise @@ -519,7 +571,7 @@ func (e *Engine) handleStepUpdate(ctx context.Context, stepUpdate store.Workflow return err } case store.StatusErrored: - e.logger.Infow("execution errored", "executionID", state.ExecutionID) + l.Info("execution errored") err := e.finishExecution(ctx, state.ExecutionID, store.StatusErrored) if err != nil { return err @@ -551,7 +603,8 @@ func (e *Engine) queueIfReady(state store.WorkflowExecution, step *step) { // If all dependencies are completed, enqueue the step. if !waitingOnDependencies { - e.logger.Debugw("step request enqueued", "ref", step.Ref, "state", copyState(state)) + e.logger.With(sRKey, step.Ref, eIDKey, state.ExecutionID, "state", copyState(state)). + Debug("step request enqueued") e.pendingStepRequests <- stepRequest{ state: copyState(state), stepRef: step.Ref, @@ -560,7 +613,7 @@ func (e *Engine) queueIfReady(state store.WorkflowExecution, step *step) { } func (e *Engine) finishExecution(ctx context.Context, executionID string, status string) error { - e.logger.Infow("finishing execution", "executionID", executionID, "status", status) + e.logger.With(eIDKey, executionID, "status", status).Info("finishing execution") err := e.executionStates.UpdateStatus(ctx, executionID, status) if err != nil { return err @@ -570,32 +623,42 @@ func (e *Engine) finishExecution(ctx context.Context, executionID string, status return nil } -func (e *Engine) workerForStepRequest(ctx context.Context, msg stepRequest) { - defer func() { e.newWorkerCh <- struct{}{} }() +func (e *Engine) worker(ctx context.Context) { defer e.wg.Done() + for { + select { + case pendingStepRequest := <-e.pendingStepRequests: + e.workerForStepRequest(ctx, pendingStepRequest) + case <-ctx.Done(): + return + } + } +} + +func (e *Engine) workerForStepRequest(ctx context.Context, msg stepRequest) { // Instantiate a child logger; in addition to the WorkflowID field the workflow // logger will already have, this adds the `stepRef` and `executionID` - l := e.logger.With("stepRef", msg.stepRef, "executionID", msg.state.ExecutionID) + l := e.logger.With(sRKey, msg.stepRef, eIDKey, msg.state.ExecutionID) - l.Debugw("executing on a step event") + l.Debug("executing on a step event") stepState := &store.WorkflowExecutionStep{ Outputs: store.StepOutput{}, ExecutionID: msg.state.ExecutionID, Ref: msg.stepRef, } - inputs, outputs, err := e.executeStep(ctx, l, msg) + inputs, outputs, err := e.executeStep(ctx, msg) var stepStatus string switch { case errors.Is(capabilities.ErrStopExecution, err): - l.Infow("step executed successfully with a termination") + l.Info("step executed successfully with a termination") stepStatus = store.StatusCompletedEarlyExit case err != nil: l.Errorf("error executing step request: %s", err) stepStatus = store.StatusErrored default: - l.Infow("step executed successfully", "outputs", outputs) + l.With("outputs", outputs).Info("step executed successfully") stepStatus = store.StatusCompleted } @@ -618,40 +681,48 @@ func (e *Engine) workerForStepRequest(ctx context.Context, msg stepRequest) { } // executeStep executes the referenced capability within a step and returns the result. -func (e *Engine) executeStep(ctx context.Context, l logger.Logger, msg stepRequest) (*values.Map, values.Value, error) { +func (e *Engine) executeStep(ctx context.Context, msg stepRequest) (*values.Map, values.Value, error) { step, err := e.workflow.Vertex(msg.stepRef) if err != nil { return nil, nil, err } - i, err := findAndInterpolateAllKeys(step.Inputs, msg.state) + var inputs any + if step.Inputs.OutputRef != "" { + inputs = step.Inputs.OutputRef + } else { + inputs = step.Inputs.Mapping + } + + i, err := findAndInterpolateAllKeys(inputs, msg.state) if err != nil { return nil, nil, err } - inputs, err := values.NewMap(i.(map[string]any)) + inputsMap, err := values.NewMap(i.(map[string]any)) if err != nil { return nil, nil, err } tr := capabilities.CapabilityRequest{ - Inputs: inputs, + Inputs: inputsMap, Config: step.config, Metadata: capabilities.RequestMetadata{ - WorkflowID: msg.state.WorkflowID, - WorkflowExecutionID: msg.state.ExecutionID, - WorkflowOwner: e.workflow.owner, - WorkflowName: e.workflow.name, - WorkflowDonID: e.localNode.WorkflowDON.ID, + WorkflowID: msg.state.WorkflowID, + WorkflowExecutionID: msg.state.ExecutionID, + WorkflowOwner: e.workflow.owner, + WorkflowName: e.workflow.name, + WorkflowDonID: e.localNode.WorkflowDON.ID, + WorkflowDonConfigVersion: e.localNode.WorkflowDON.ConfigVersion, }, } output, err := executeSyncAndUnwrapSingleValue(ctx, step.capability, tr) if err != nil { - return inputs, nil, err + return inputsMap, nil, err } - return inputs, output, err + return inputsMap, output, err } func (e *Engine) deregisterTrigger(ctx context.Context, t *triggerCapability, triggerIdx int) error { @@ -665,10 +736,11 @@ func (e *Engine) deregisterTrigger(ctx context.Context, t *triggerCapability, tr } deregRequest := capabilities.CapabilityRequest{ Metadata: capabilities.RequestMetadata{ - WorkflowID: e.workflow.id, - WorkflowDonID: e.localNode.WorkflowDON.ID, - WorkflowName: e.workflow.name, - WorkflowOwner: e.workflow.owner, + WorkflowID: e.workflow.id, + WorkflowDonID: e.localNode.WorkflowDON.ID, + WorkflowDonConfigVersion: e.localNode.WorkflowDON.ConfigVersion, + WorkflowName: e.workflow.name, + WorkflowOwner: e.workflow.owner, }, Inputs: triggerInputs, Config: t.config, @@ -723,7 +795,13 @@ func (e *Engine) Close() error { innerErr := s.capability.UnregisterFromWorkflow(ctx, reg) if innerErr != nil { - return fmt.Errorf("failed to unregister from workflow: %+v", reg) + return &workflowError{err: innerErr, + reason: fmt.Sprintf("failed to unregister capability from workflow: %+v", reg), + labels: map[string]string{ + wIDKey: e.workflow.id, + sIDKey: s.ID, + sRKey: s.Ref, + }} } return nil @@ -767,7 +845,11 @@ const ( func NewEngine(cfg Config) (engine *Engine, err error) { if cfg.Store == nil { - return nil, errors.New("must provide store") + return nil, &workflowError{reason: "store is nil", + labels: map[string]string{ + wIDKey: cfg.WorkflowID, + }, + } } if cfg.MaxWorkerLimit == 0 { @@ -825,12 +907,6 @@ func NewEngine(cfg Config) (engine *Engine, err error) { workflow.owner = cfg.WorkflowOwner workflow.name = hex.EncodeToString([]byte(cfg.WorkflowName)) - // Instantiate semaphore to put a limit on the number of workers - newWorkerCh := make(chan struct{}, cfg.MaxWorkerLimit) - for i := 0; i < cfg.MaxWorkerLimit; i++ { - newWorkerCh <- struct{}{} - } - engine = &Engine{ logger: cfg.Lggr.Named("WorkflowEngine").With("workflowID", cfg.WorkflowID), registry: cfg.Registry, @@ -838,19 +914,19 @@ func NewEngine(cfg Config) (engine *Engine, err error) { getLocalNode: cfg.GetLocalNode, executionStates: cfg.Store, pendingStepRequests: make(chan stepRequest, cfg.QueueSize), - newWorkerCh: newWorkerCh, stepUpdateCh: make(chan store.WorkflowExecutionStep), triggerEvents: make(chan capabilities.CapabilityResponse), stopCh: make(chan struct{}), newWorkerTimeout: cfg.NewWorkerTimeout, maxExecutionDuration: cfg.MaxExecutionDuration, - - onExecutionFinished: cfg.onExecutionFinished, - afterInit: cfg.afterInit, - maxRetries: cfg.maxRetries, - retryMs: cfg.retryMs, - clock: cfg.clock, + onExecutionFinished: cfg.onExecutionFinished, + afterInit: cfg.afterInit, + maxRetries: cfg.maxRetries, + retryMs: cfg.retryMs, + maxWorkerLimit: cfg.MaxWorkerLimit, + clock: cfg.clock, } + return engine, nil } @@ -871,3 +947,48 @@ func executeSyncAndUnwrapSingleValue(ctx context.Context, cap capabilities.Callb return l.Underlying[0], nil } + +// Logging keys +const ( + cIDKey = "capabilityID" + tIDKey = "triggerID" + wIDKey = "workflowID" + eIDKey = "executionID" + sIDKey = "stepID" + sRKey = "stepRef" +) + +type workflowError struct { + labels map[string]string + // err is the underlying error that caused this error + err error + // reason is a human-readable string that describes the error + reason string +} + +func (e *workflowError) Error() string { + // declare in reverse order so that the error message is ordered correctly + orderedLabels := []string{sRKey, sIDKey, tIDKey, cIDKey, eIDKey, wIDKey} + + errStr := "" + if e.err != nil { + if e.reason != "" { + errStr = fmt.Sprintf("%s: %v", e.reason, e.err) + } else { + errStr = e.err.Error() + } + } else { + errStr = e.reason + } + + // prefix the error with the labels + for _, label := range orderedLabels { + // This will silently ignore any labels that are not present in the map + // are we ok with this? + if value, ok := e.labels[label]; ok { + errStr = fmt.Sprintf("%s %s: %s", label, value, errStr) + } + } + + return errStr +} diff --git a/core/services/workflows/engine_test.go b/core/services/workflows/engine_test.go index 09af6d63580..2c4129dbaf7 100644 --- a/core/services/workflows/engine_test.go +++ b/core/services/workflows/engine_test.go @@ -20,10 +20,12 @@ import ( "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/job" p2ptypes "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types" "github.com/smartcontractkit/chainlink/v2/core/services/workflows/store" ) +const testWorkflowId = "" const hardcodedWorkflow = ` triggers: - id: "mercury-trigger@1.0.0" @@ -78,6 +80,25 @@ type testHooks struct { executionFinished chan string } +func newTestDBStore(t *testing.T, clock clockwork.Clock) store.Store { + // Taken from https://github.com/smartcontractkit/chainlink/blob/d736d9e0838983a021677bc608556b3994f46690/core/services/job/orm.go#L412 + // We need to insert this row so that we dont get foreign key constraint errors + // based on the workflow_id + db := pgtest.NewSqlxDB(t) + sql := `INSERT INTO workflow_specs (workflow, workflow_id, workflow_owner, workflow_name, created_at, updated_at) + VALUES (:workflow, :workflow_id, :workflow_owner, :workflow_name, NOW(), NOW()) + RETURNING id;` + var wfSpec job.WorkflowSpec + wfSpec.Workflow = simpleWorkflow + wfSpec.WorkflowID = testWorkflowId + wfSpec.WorkflowOwner = "testowner" + wfSpec.WorkflowName = "testworkflow" + _, err := db.NamedExec(sql, wfSpec) + require.NoError(t, err) + + return store.NewDBStore(db, logger.TestLogger(t), clock) +} + // newTestEngine creates a new engine with some test defaults. func newTestEngine(t *testing.T, reg *coreCap.Registry, spec string, opts ...func(c *Config)) (*Engine, *testHooks) { peerID := p2ptypes.PeerID{} @@ -86,13 +107,14 @@ func newTestEngine(t *testing.T, reg *coreCap.Registry, spec string, opts ...fun executionFinished := make(chan string, 100) clock := clockwork.NewFakeClock() cfg := Config{ - Lggr: logger.TestLogger(t), - Registry: reg, - Spec: spec, + WorkflowID: testWorkflowId, + Lggr: logger.TestLogger(t), + Registry: reg, + Spec: spec, GetLocalNode: func(ctx context.Context) (capabilities.Node, error) { return capabilities.Node{ WorkflowDON: capabilities.DON{ - ID: "00010203", + ID: 1, }, PeerID: &peerID, }, nil @@ -110,11 +132,14 @@ func newTestEngine(t *testing.T, reg *coreCap.Registry, spec string, opts ...fun executionFinished <- weid }, clock: clock, - Store: store.NewDBStore(pgtest.NewSqlxDB(t), clock), } for _, o := range opts { o(&cfg) } + // We use the cfg clock incase they override it + if cfg.Store == nil { + cfg.Store = newTestDBStore(t, cfg.clock) + } eng, err := NewEngine(cfg) require.NoError(t, err) return eng, &testHooks{initSuccessful: initSuccessful, initFailed: initFailed, executionFinished: executionFinished} @@ -193,7 +218,6 @@ func (m *mockTriggerCapability) UnregisterTrigger(ctx context.Context, req capab } func TestEngineWithHardcodedWorkflow(t *testing.T) { - dbstore := store.NewDBStore(pgtest.NewSqlxDB(t), clockwork.NewFakeClock()) ctx := testutils.Context(t) reg := coreCap.NewRegistry(logger.TestLogger(t)) @@ -223,7 +247,6 @@ func TestEngineWithHardcodedWorkflow(t *testing.T) { t, reg, hardcodedWorkflow, - func(c *Config) { c.Store = dbstore }, ) servicetest.Run(t, eng) @@ -483,8 +506,9 @@ targets: ` ) -func mockAction() (*mockCapability, values.Value) { - outputs := values.NewString("output") +func mockAction(t *testing.T) (*mockCapability, values.Value) { + outputs, err := values.NewMap(map[string]any{"output": "foo"}) + require.NoError(t, err) return newMockCapability( capabilities.MustNewCapabilityInfo( "read_chain_action@1.0.0", @@ -510,7 +534,7 @@ func TestEngine_MultiStepDependencies(t *testing.T) { require.NoError(t, reg.Add(ctx, mockConsensus())) require.NoError(t, reg.Add(ctx, mockTarget())) - action, out := mockAction() + action, out := mockAction(t) require.NoError(t, reg.Add(ctx, action)) eng, hooks := newTestEngine(t, reg, multiStepWorkflow) @@ -557,10 +581,9 @@ func TestEngine_ResumesPendingExecutions(t *testing.T) { require.NoError(t, reg.Add(ctx, mockConsensus())) require.NoError(t, reg.Add(ctx, mockTarget())) - action, _ := mockAction() + action, _ := mockAction(t) require.NoError(t, reg.Add(ctx, action)) - - dbstore := store.NewDBStore(pgtest.NewSqlxDB(t), clockwork.NewFakeClock()) + dbstore := newTestDBStore(t, clockwork.NewFakeClock()) ec := &store.WorkflowExecution{ Steps: map[string]*store.WorkflowExecutionStep{ workflows.KeywordTrigger: { @@ -572,7 +595,7 @@ func TestEngine_ResumesPendingExecutions(t *testing.T) { Ref: workflows.KeywordTrigger, }, }, - WorkflowID: "", + WorkflowID: testWorkflowId, ExecutionID: "", Status: store.StatusStarted, } @@ -610,11 +633,11 @@ func TestEngine_TimesOutOldExecutions(t *testing.T) { require.NoError(t, reg.Add(ctx, mockConsensus())) require.NoError(t, reg.Add(ctx, mockTarget())) - action, _ := mockAction() + action, _ := mockAction(t) require.NoError(t, reg.Add(ctx, action)) clock := clockwork.NewFakeClock() - dbstore := store.NewDBStore(pgtest.NewSqlxDB(t), clock) + dbstore := newTestDBStore(t, clock) ec := &store.WorkflowExecution{ Steps: map[string]*store.WorkflowExecutionStep{ workflows.KeywordTrigger: { @@ -626,7 +649,7 @@ func TestEngine_TimesOutOldExecutions(t *testing.T) { Ref: workflows.KeywordTrigger, }, }, - WorkflowID: "", + WorkflowID: testWorkflowId, ExecutionID: "", Status: store.StatusStarted, } @@ -708,7 +731,7 @@ func TestEngine_WrapsTargets(t *testing.T) { require.NoError(t, reg.Add(ctx, mockTarget())) clock := clockwork.NewFakeClock() - dbstore := store.NewDBStore(pgtest.NewSqlxDB(t), clock) + dbstore := newTestDBStore(t, clock) eng, hooks := newTestEngine( t, @@ -754,13 +777,13 @@ func TestEngine_GetsNodeInfoDuringInitialization(t *testing.T) { require.NoError(t, reg.Add(ctx, mockTarget())) clock := clockwork.NewFakeClock() - dbstore := store.NewDBStore(pgtest.NewSqlxDB(t), clock) + dbstore := newTestDBStore(t, clock) var peerID p2ptypes.PeerID node := capabilities.Node{ PeerID: &peerID, WorkflowDON: capabilities.DON{ - ID: "1", + ID: 1, }, } retryCount := 0 @@ -791,3 +814,158 @@ func TestEngine_GetsNodeInfoDuringInitialization(t *testing.T) { assert.Equal(t, node, eng.localNode) } + +const passthroughInterpolationWorkflow = ` +triggers: + - id: "mercury-trigger@1.0.0" + config: + feedIds: + - "0x1111111111111111111100000000000000000000000000000000000000000000" + - "0x2222222222222222222200000000000000000000000000000000000000000000" + - "0x3333333333333333333300000000000000000000000000000000000000000000" + +consensus: + - id: "offchain_reporting@1.0.0" + ref: "evm_median" + inputs: + observations: + - "$(trigger.outputs)" + config: + aggregation_method: "data_feeds_2_0" + aggregation_config: + "0x1111111111111111111100000000000000000000000000000000000000000000": + deviation: "0.001" + heartbeat: 3600 + "0x2222222222222222222200000000000000000000000000000000000000000000": + deviation: "0.001" + heartbeat: 3600 + "0x3333333333333333333300000000000000000000000000000000000000000000": + deviation: "0.001" + heartbeat: 3600 + encoder: "EVM" + encoder_config: + abi: "mercury_reports bytes[]" + +targets: + - id: "write_ethereum-testnet-sepolia@1.0.0" + inputs: "$(evm_median.outputs)" + config: + address: "0x54e220867af6683aE6DcBF535B4f952cB5116510" + params: ["$(report)"] + abi: "receive(report bytes)" +` + +func TestEngine_PassthroughInterpolation(t *testing.T) { + ctx := testutils.Context(t) + reg := coreCap.NewRegistry(logger.TestLogger(t)) + + trigger, _ := mockTrigger(t) + + require.NoError(t, reg.Add(ctx, trigger)) + require.NoError(t, reg.Add(ctx, mockConsensus())) + writeID := "write_ethereum-testnet-sepolia@1.0.0" + target := newMockCapability( + capabilities.MustNewCapabilityInfo( + writeID, + capabilities.CapabilityTypeTarget, + "a write capability targeting ethereum sepolia testnet", + ), + func(req capabilities.CapabilityRequest) (capabilities.CapabilityResponse, error) { + return capabilities.CapabilityResponse{ + Value: req.Inputs, + }, nil + }, + ) + require.NoError(t, reg.Add(ctx, target)) + + eng, testHooks := newTestEngine( + t, + reg, + passthroughInterpolationWorkflow, + ) + + servicetest.Run(t, eng) + + eid := getExecutionId(t, eng, testHooks) + + state, err := eng.executionStates.Get(ctx, eid) + require.NoError(t, err) + + assert.Equal(t, state.Status, store.StatusCompleted) + + // There is passthrough interpolation between the consensus and target steps, + // so the input of one should be the output of the other, exactly. + gotInputs, err := values.Unwrap(state.Steps[writeID].Inputs) + require.NoError(t, err) + + gotOutputs, err := values.Unwrap(state.Steps["evm_median"].Outputs.Value) + require.NoError(t, err) + assert.Equal(t, gotInputs, gotOutputs) +} + +func TestEngine_Error(t *testing.T) { + err := errors.New("some error") + tests := []struct { + name string + labels map[string]string + err error + reason string + want string + }{ + { + name: "Error with error and reason", + labels: map[string]string{wIDKey: "my-workflow-id"}, + err: err, + reason: "some reason", + want: "workflowID my-workflow-id: some reason: some error", + }, + { + name: "Error with error and no reason", + labels: map[string]string{eIDKey: "dd3708ac7d8dd6fa4fae0fb87b73f318a4da2526c123e159b72435e3b2fe8751"}, + err: err, + want: "executionID dd3708ac7d8dd6fa4fae0fb87b73f318a4da2526c123e159b72435e3b2fe8751: some error", + }, + { + name: "Error with no error and reason", + labels: map[string]string{cIDKey: "streams-trigger:network_eth@1.0.0"}, + reason: "some reason", + want: "capabilityID streams-trigger:network_eth@1.0.0: some reason", + }, + { + name: "Error with no error and no reason", + labels: map[string]string{tIDKey: "wf_123_trigger_456"}, + want: "triggerID wf_123_trigger_456: ", + }, + { + name: "Error with no labels", + labels: map[string]string{}, + err: err, + reason: "some reason", + want: "some reason: some error", + }, + { + name: "Multiple labels", + labels: map[string]string{ + wIDKey: "my-workflow-id", + eIDKey: "dd3708ac7d8dd6fa4fae0fb87b73f318a4da2526c123e159b72435e3b2fe8751", + cIDKey: "streams-trigger:network_eth@1.0.0", + }, + err: err, + reason: "some reason", + want: "workflowID my-workflow-id: executionID dd3708ac7d8dd6fa4fae0fb87b73f318a4da2526c123e159b72435e3b2fe8751: capabilityID streams-trigger:network_eth@1.0.0: some reason: some error", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + e := &workflowError{ + labels: tt.labels, + err: tt.err, + reason: tt.reason, + } + if got := e.Error(); got != tt.want { + t.Errorf("err string mismatch\ngot = %v\nwant = %v", got, tt.want) + } + }) + } +} diff --git a/core/services/workflows/models_test.go b/core/services/workflows/models_test.go index 4b4747c486f..a28aeb9df01 100644 --- a/core/services/workflows/models_test.go +++ b/core/services/workflows/models_test.go @@ -214,7 +214,7 @@ targets: }, }, { - name: "non-trigger step with no dependent refs", + name: "invalid refs", yaml: ` triggers: - id: "a-trigger@1.0.0" @@ -241,7 +241,7 @@ targets: inputs: consensus_output: $(a-consensus.outputs) `, - errMsg: "all non-trigger steps must have a dependent ref", + errMsg: "invalid refs", }, { name: "duplicate edge declarations", diff --git a/core/services/workflows/store/store_db.go b/core/services/workflows/store/store_db.go index e9204efd7b1..e1d08629053 100644 --- a/core/services/workflows/store/store_db.go +++ b/core/services/workflows/store/store_db.go @@ -14,11 +14,13 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink-common/pkg/values" valuespb "github.com/smartcontractkit/chainlink-common/pkg/values/pb" + "github.com/smartcontractkit/chainlink/v2/core/logger" ) // `DBStore` is a postgres-backed // data store that persists workflow progress. type DBStore struct { + lggr logger.Logger db sqlutil.DataSource clock clockwork.Clock } @@ -197,16 +199,20 @@ func stateToStep(state *WorkflowExecutionStep) (workflowStepRow, error) { // `Add` creates the relevant workflow_execution and workflow_step entries // to persist the passed in ExecutionState. func (d *DBStore) Add(ctx context.Context, state *WorkflowExecution) error { + l := d.lggr.With("executionID", state.ExecutionID, "workflowID", state.WorkflowID, "status", state.Status) return d.transact(ctx, func(db *DBStore) error { var wid *string if state.WorkflowID != "" { wid = &state.WorkflowID } + wex := &workflowExecutionRow{ ID: state.ExecutionID, WorkflowID: wid, Status: state.Status, } + l.Debug("Adding workflow execution") + err := db.insertWorkflowExecution(ctx, wex) if err != nil { return fmt.Errorf("could not insert workflow execution %s: %w", state.ExecutionID, err) @@ -218,6 +224,7 @@ func (d *DBStore) Add(ctx context.Context, state *WorkflowExecution) error { if err != nil { return err } + l.With("stepRef", step.Ref).Debug("Adding workflow step") ws = append(ws, step) } if len(ws) > 0 { @@ -368,6 +375,6 @@ func (d *DBStore) GetUnfinished(ctx context.Context, offset, limit int) ([]Workf return states, nil } -func NewDBStore(ds sqlutil.DataSource, clock clockwork.Clock) *DBStore { - return &DBStore{db: ds, clock: clock} +func NewDBStore(ds sqlutil.DataSource, lggr logger.Logger, clock clockwork.Clock) *DBStore { + return &DBStore{db: ds, lggr: lggr.Named("WorkflowDBStore"), clock: clock} } diff --git a/core/services/workflows/store/store_db_test.go b/core/services/workflows/store/store_db_test.go index 7ae139b9435..9a98db3056f 100644 --- a/core/services/workflows/store/store_db_test.go +++ b/core/services/workflows/store/store_db_test.go @@ -13,6 +13,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink-common/pkg/values" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" + "github.com/smartcontractkit/chainlink/v2/core/logger" ) func randomID() string { @@ -24,9 +25,13 @@ func randomID() string { return hex.EncodeToString(b) } -func Test_StoreDB(t *testing.T) { +func newTestDBStore(t *testing.T) *DBStore { db := pgtest.NewSqlxDB(t) - store := &DBStore{db: db, clock: clockwork.NewFakeClock()} + return &DBStore{db: db, lggr: logger.TestLogger(t), clock: clockwork.NewFakeClock()} +} + +func Test_StoreDB(t *testing.T) { + store := newTestDBStore(t) id := randomID() es := WorkflowExecution{ @@ -58,8 +63,7 @@ func Test_StoreDB(t *testing.T) { } func Test_StoreDB_DuplicateEntry(t *testing.T) { - db := pgtest.NewSqlxDB(t) - store := &DBStore{db: db, clock: clockwork.NewFakeClock()} + store := newTestDBStore(t) id := randomID() es := WorkflowExecution{ @@ -87,8 +91,7 @@ func Test_StoreDB_DuplicateEntry(t *testing.T) { } func Test_StoreDB_UpdateStatus(t *testing.T) { - db := pgtest.NewSqlxDB(t) - store := &DBStore{db: db, clock: clockwork.NewFakeClock()} + store := newTestDBStore(t) id := randomID() es := WorkflowExecution{ @@ -122,8 +125,7 @@ func Test_StoreDB_UpdateStatus(t *testing.T) { } func Test_StoreDB_UpdateStep(t *testing.T) { - db := pgtest.NewSqlxDB(t) - store := &DBStore{db: db, clock: clockwork.NewFakeClock()} + store := newTestDBStore(t) id := randomID() stepOne := &WorkflowExecutionStep{ @@ -170,8 +172,7 @@ func Test_StoreDB_UpdateStep(t *testing.T) { } func Test_StoreDB_WorkflowStatus(t *testing.T) { - db := pgtest.NewSqlxDB(t) - store := &DBStore{db: db, clock: clockwork.NewFakeClock()} + store := newTestDBStore(t) for s := range ValidStatuses { id := randomID() @@ -200,8 +201,7 @@ func Test_StoreDB_WorkflowStatus(t *testing.T) { } func Test_StoreDB_WorkflowStepStatus(t *testing.T) { - db := pgtest.NewSqlxDB(t) - store := &DBStore{db: db, clock: clockwork.NewFakeClock()} + store := newTestDBStore(t) id := randomID() stepOne := &WorkflowExecutionStep{ @@ -234,8 +234,7 @@ func Test_StoreDB_WorkflowStepStatus(t *testing.T) { } func Test_StoreDB_GetUnfinishedSteps(t *testing.T) { - db := pgtest.NewSqlxDB(t) - store := &DBStore{db: db, clock: clockwork.NewFakeClock()} + store := newTestDBStore(t) id := randomID() stepOne := &WorkflowExecutionStep{ diff --git a/core/sessions/authentication.go b/core/sessions/authentication.go index b923d5c16c7..acd6e4beccc 100644 --- a/core/sessions/authentication.go +++ b/core/sessions/authentication.go @@ -26,8 +26,6 @@ var ErrNotSupported = fmt.Errorf("functionality not supported with current authe // ErrEmptySessionID captures the empty case error message var ErrEmptySessionID = errors.New("session ID cannot be empty") -//go:generate mockery --quiet --name BasicAdminUsersORM --output ./mocks/ --case=underscore - // BasicAdminUsersORM is the interface that defines the functionality required for supporting basic admin functionality // adjacent to the identity provider authentication provider implementation. It is currently implemented by the local // users/sessions ORM containing local admin CLI actions. This is separate from the AuthenticationProvider, @@ -39,8 +37,6 @@ type BasicAdminUsersORM interface { FindUser(ctx context.Context, email string) (User, error) } -//go:generate mockery --quiet --name AuthenticationProvider --output ./mocks/ --case=underscore - // AuthenticationProvider is an interface that abstracts the required application calls to a user management backend // Currently localauth (users table DB) or LDAP server (readonly) type AuthenticationProvider interface { diff --git a/core/sessions/ldapauth/client.go b/core/sessions/ldapauth/client.go index bb259f8c9a2..872bd8f7636 100644 --- a/core/sessions/ldapauth/client.go +++ b/core/sessions/ldapauth/client.go @@ -12,15 +12,11 @@ type ldapClient struct { config config.LDAP } -//go:generate mockery --quiet --name LDAPClient --output ./mocks/ --case=underscore - // Wrapper for creating a handle to a *ldap.Conn/LDAPConn interface type LDAPClient interface { CreateEphemeralConnection() (LDAPConn, error) } -//go:generate mockery --quiet --name LDAPConn --output ./mocks/ --case=underscore - // Wrapper for ldap connection and mock testing, implemented by *ldap.Conn type LDAPConn interface { Search(searchRequest *ldap.SearchRequest) (*ldap.SearchResult, error) diff --git a/core/sessions/ldapauth/mocks/ldap_client.go b/core/sessions/ldapauth/mocks/ldap_client.go index d8fe4dbadfc..6f18d3a3e64 100644 --- a/core/sessions/ldapauth/mocks/ldap_client.go +++ b/core/sessions/ldapauth/mocks/ldap_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -12,6 +12,14 @@ type LDAPClient struct { mock.Mock } +type LDAPClient_Expecter struct { + mock *mock.Mock +} + +func (_m *LDAPClient) EXPECT() *LDAPClient_Expecter { + return &LDAPClient_Expecter{mock: &_m.Mock} +} + // CreateEphemeralConnection provides a mock function with given fields: func (_m *LDAPClient) CreateEphemeralConnection() (ldapauth.LDAPConn, error) { ret := _m.Called() @@ -42,6 +50,33 @@ func (_m *LDAPClient) CreateEphemeralConnection() (ldapauth.LDAPConn, error) { return r0, r1 } +// LDAPClient_CreateEphemeralConnection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateEphemeralConnection' +type LDAPClient_CreateEphemeralConnection_Call struct { + *mock.Call +} + +// CreateEphemeralConnection is a helper method to define mock.On call +func (_e *LDAPClient_Expecter) CreateEphemeralConnection() *LDAPClient_CreateEphemeralConnection_Call { + return &LDAPClient_CreateEphemeralConnection_Call{Call: _e.mock.On("CreateEphemeralConnection")} +} + +func (_c *LDAPClient_CreateEphemeralConnection_Call) Run(run func()) *LDAPClient_CreateEphemeralConnection_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *LDAPClient_CreateEphemeralConnection_Call) Return(_a0 ldapauth.LDAPConn, _a1 error) *LDAPClient_CreateEphemeralConnection_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LDAPClient_CreateEphemeralConnection_Call) RunAndReturn(run func() (ldapauth.LDAPConn, error)) *LDAPClient_CreateEphemeralConnection_Call { + _c.Call.Return(run) + return _c +} + // NewLDAPClient creates a new instance of LDAPClient. 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 NewLDAPClient(t interface { diff --git a/core/sessions/ldapauth/mocks/ldap_conn.go b/core/sessions/ldapauth/mocks/ldap_conn.go index 3116320cd99..5a6a5d499da 100644 --- a/core/sessions/ldapauth/mocks/ldap_conn.go +++ b/core/sessions/ldapauth/mocks/ldap_conn.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -13,6 +13,14 @@ type LDAPConn struct { mock.Mock } +type LDAPConn_Expecter struct { + mock *mock.Mock +} + +func (_m *LDAPConn) EXPECT() *LDAPConn_Expecter { + return &LDAPConn_Expecter{mock: &_m.Mock} +} + // Bind provides a mock function with given fields: username, password func (_m *LDAPConn) Bind(username string, password string) error { ret := _m.Called(username, password) @@ -31,6 +39,35 @@ func (_m *LDAPConn) Bind(username string, password string) error { return r0 } +// LDAPConn_Bind_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Bind' +type LDAPConn_Bind_Call struct { + *mock.Call +} + +// Bind is a helper method to define mock.On call +// - username string +// - password string +func (_e *LDAPConn_Expecter) Bind(username interface{}, password interface{}) *LDAPConn_Bind_Call { + return &LDAPConn_Bind_Call{Call: _e.mock.On("Bind", username, password)} +} + +func (_c *LDAPConn_Bind_Call) Run(run func(username string, password string)) *LDAPConn_Bind_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(string), args[1].(string)) + }) + return _c +} + +func (_c *LDAPConn_Bind_Call) Return(_a0 error) *LDAPConn_Bind_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *LDAPConn_Bind_Call) RunAndReturn(run func(string, string) error) *LDAPConn_Bind_Call { + _c.Call.Return(run) + return _c +} + // Close provides a mock function with given fields: func (_m *LDAPConn) Close() error { ret := _m.Called() @@ -49,6 +86,33 @@ func (_m *LDAPConn) Close() error { return r0 } +// LDAPConn_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close' +type LDAPConn_Close_Call struct { + *mock.Call +} + +// Close is a helper method to define mock.On call +func (_e *LDAPConn_Expecter) Close() *LDAPConn_Close_Call { + return &LDAPConn_Close_Call{Call: _e.mock.On("Close")} +} + +func (_c *LDAPConn_Close_Call) Run(run func()) *LDAPConn_Close_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *LDAPConn_Close_Call) Return(err error) *LDAPConn_Close_Call { + _c.Call.Return(err) + return _c +} + +func (_c *LDAPConn_Close_Call) RunAndReturn(run func() error) *LDAPConn_Close_Call { + _c.Call.Return(run) + return _c +} + // Search provides a mock function with given fields: searchRequest func (_m *LDAPConn) Search(searchRequest *ldap.SearchRequest) (*ldap.SearchResult, error) { ret := _m.Called(searchRequest) @@ -79,6 +143,34 @@ func (_m *LDAPConn) Search(searchRequest *ldap.SearchRequest) (*ldap.SearchResul return r0, r1 } +// LDAPConn_Search_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Search' +type LDAPConn_Search_Call struct { + *mock.Call +} + +// Search is a helper method to define mock.On call +// - searchRequest *ldap.SearchRequest +func (_e *LDAPConn_Expecter) Search(searchRequest interface{}) *LDAPConn_Search_Call { + return &LDAPConn_Search_Call{Call: _e.mock.On("Search", searchRequest)} +} + +func (_c *LDAPConn_Search_Call) Run(run func(searchRequest *ldap.SearchRequest)) *LDAPConn_Search_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*ldap.SearchRequest)) + }) + return _c +} + +func (_c *LDAPConn_Search_Call) Return(_a0 *ldap.SearchResult, _a1 error) *LDAPConn_Search_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *LDAPConn_Search_Call) RunAndReturn(run func(*ldap.SearchRequest) (*ldap.SearchResult, error)) *LDAPConn_Search_Call { + _c.Call.Return(run) + return _c +} + // NewLDAPConn creates a new instance of LDAPConn. 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 NewLDAPConn(t interface { diff --git a/core/sessions/mocks/authentication_provider.go b/core/sessions/mocks/authentication_provider.go index 3031a7c9809..58955487893 100644 --- a/core/sessions/mocks/authentication_provider.go +++ b/core/sessions/mocks/authentication_provider.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -18,6 +18,14 @@ type AuthenticationProvider struct { mock.Mock } +type AuthenticationProvider_Expecter struct { + mock *mock.Mock +} + +func (_m *AuthenticationProvider) EXPECT() *AuthenticationProvider_Expecter { + return &AuthenticationProvider_Expecter{mock: &_m.Mock} +} + // AuthorizedUserWithSession provides a mock function with given fields: ctx, sessionID func (_m *AuthenticationProvider) AuthorizedUserWithSession(ctx context.Context, sessionID string) (sessions.User, error) { ret := _m.Called(ctx, sessionID) @@ -46,6 +54,35 @@ func (_m *AuthenticationProvider) AuthorizedUserWithSession(ctx context.Context, return r0, r1 } +// AuthenticationProvider_AuthorizedUserWithSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AuthorizedUserWithSession' +type AuthenticationProvider_AuthorizedUserWithSession_Call struct { + *mock.Call +} + +// AuthorizedUserWithSession is a helper method to define mock.On call +// - ctx context.Context +// - sessionID string +func (_e *AuthenticationProvider_Expecter) AuthorizedUserWithSession(ctx interface{}, sessionID interface{}) *AuthenticationProvider_AuthorizedUserWithSession_Call { + return &AuthenticationProvider_AuthorizedUserWithSession_Call{Call: _e.mock.On("AuthorizedUserWithSession", ctx, sessionID)} +} + +func (_c *AuthenticationProvider_AuthorizedUserWithSession_Call) Run(run func(ctx context.Context, sessionID string)) *AuthenticationProvider_AuthorizedUserWithSession_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *AuthenticationProvider_AuthorizedUserWithSession_Call) Return(_a0 sessions.User, _a1 error) *AuthenticationProvider_AuthorizedUserWithSession_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *AuthenticationProvider_AuthorizedUserWithSession_Call) RunAndReturn(run func(context.Context, string) (sessions.User, error)) *AuthenticationProvider_AuthorizedUserWithSession_Call { + _c.Call.Return(run) + return _c +} + // ClearNonCurrentSessions provides a mock function with given fields: ctx, sessionID func (_m *AuthenticationProvider) ClearNonCurrentSessions(ctx context.Context, sessionID string) error { ret := _m.Called(ctx, sessionID) @@ -64,6 +101,35 @@ func (_m *AuthenticationProvider) ClearNonCurrentSessions(ctx context.Context, s return r0 } +// AuthenticationProvider_ClearNonCurrentSessions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClearNonCurrentSessions' +type AuthenticationProvider_ClearNonCurrentSessions_Call struct { + *mock.Call +} + +// ClearNonCurrentSessions is a helper method to define mock.On call +// - ctx context.Context +// - sessionID string +func (_e *AuthenticationProvider_Expecter) ClearNonCurrentSessions(ctx interface{}, sessionID interface{}) *AuthenticationProvider_ClearNonCurrentSessions_Call { + return &AuthenticationProvider_ClearNonCurrentSessions_Call{Call: _e.mock.On("ClearNonCurrentSessions", ctx, sessionID)} +} + +func (_c *AuthenticationProvider_ClearNonCurrentSessions_Call) Run(run func(ctx context.Context, sessionID string)) *AuthenticationProvider_ClearNonCurrentSessions_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *AuthenticationProvider_ClearNonCurrentSessions_Call) Return(_a0 error) *AuthenticationProvider_ClearNonCurrentSessions_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *AuthenticationProvider_ClearNonCurrentSessions_Call) RunAndReturn(run func(context.Context, string) error) *AuthenticationProvider_ClearNonCurrentSessions_Call { + _c.Call.Return(run) + return _c +} + // CreateAndSetAuthToken provides a mock function with given fields: ctx, user func (_m *AuthenticationProvider) CreateAndSetAuthToken(ctx context.Context, user *sessions.User) (*auth.Token, error) { ret := _m.Called(ctx, user) @@ -94,6 +160,35 @@ func (_m *AuthenticationProvider) CreateAndSetAuthToken(ctx context.Context, use return r0, r1 } +// AuthenticationProvider_CreateAndSetAuthToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateAndSetAuthToken' +type AuthenticationProvider_CreateAndSetAuthToken_Call struct { + *mock.Call +} + +// CreateAndSetAuthToken is a helper method to define mock.On call +// - ctx context.Context +// - user *sessions.User +func (_e *AuthenticationProvider_Expecter) CreateAndSetAuthToken(ctx interface{}, user interface{}) *AuthenticationProvider_CreateAndSetAuthToken_Call { + return &AuthenticationProvider_CreateAndSetAuthToken_Call{Call: _e.mock.On("CreateAndSetAuthToken", ctx, user)} +} + +func (_c *AuthenticationProvider_CreateAndSetAuthToken_Call) Run(run func(ctx context.Context, user *sessions.User)) *AuthenticationProvider_CreateAndSetAuthToken_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*sessions.User)) + }) + return _c +} + +func (_c *AuthenticationProvider_CreateAndSetAuthToken_Call) Return(_a0 *auth.Token, _a1 error) *AuthenticationProvider_CreateAndSetAuthToken_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *AuthenticationProvider_CreateAndSetAuthToken_Call) RunAndReturn(run func(context.Context, *sessions.User) (*auth.Token, error)) *AuthenticationProvider_CreateAndSetAuthToken_Call { + _c.Call.Return(run) + return _c +} + // CreateSession provides a mock function with given fields: ctx, sr func (_m *AuthenticationProvider) CreateSession(ctx context.Context, sr sessions.SessionRequest) (string, error) { ret := _m.Called(ctx, sr) @@ -122,6 +217,35 @@ func (_m *AuthenticationProvider) CreateSession(ctx context.Context, sr sessions return r0, r1 } +// AuthenticationProvider_CreateSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateSession' +type AuthenticationProvider_CreateSession_Call struct { + *mock.Call +} + +// CreateSession is a helper method to define mock.On call +// - ctx context.Context +// - sr sessions.SessionRequest +func (_e *AuthenticationProvider_Expecter) CreateSession(ctx interface{}, sr interface{}) *AuthenticationProvider_CreateSession_Call { + return &AuthenticationProvider_CreateSession_Call{Call: _e.mock.On("CreateSession", ctx, sr)} +} + +func (_c *AuthenticationProvider_CreateSession_Call) Run(run func(ctx context.Context, sr sessions.SessionRequest)) *AuthenticationProvider_CreateSession_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(sessions.SessionRequest)) + }) + return _c +} + +func (_c *AuthenticationProvider_CreateSession_Call) Return(_a0 string, _a1 error) *AuthenticationProvider_CreateSession_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *AuthenticationProvider_CreateSession_Call) RunAndReturn(run func(context.Context, sessions.SessionRequest) (string, error)) *AuthenticationProvider_CreateSession_Call { + _c.Call.Return(run) + return _c +} + // CreateUser provides a mock function with given fields: ctx, user func (_m *AuthenticationProvider) CreateUser(ctx context.Context, user *sessions.User) error { ret := _m.Called(ctx, user) @@ -140,6 +264,35 @@ func (_m *AuthenticationProvider) CreateUser(ctx context.Context, user *sessions return r0 } +// AuthenticationProvider_CreateUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateUser' +type AuthenticationProvider_CreateUser_Call struct { + *mock.Call +} + +// CreateUser is a helper method to define mock.On call +// - ctx context.Context +// - user *sessions.User +func (_e *AuthenticationProvider_Expecter) CreateUser(ctx interface{}, user interface{}) *AuthenticationProvider_CreateUser_Call { + return &AuthenticationProvider_CreateUser_Call{Call: _e.mock.On("CreateUser", ctx, user)} +} + +func (_c *AuthenticationProvider_CreateUser_Call) Run(run func(ctx context.Context, user *sessions.User)) *AuthenticationProvider_CreateUser_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*sessions.User)) + }) + return _c +} + +func (_c *AuthenticationProvider_CreateUser_Call) Return(_a0 error) *AuthenticationProvider_CreateUser_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *AuthenticationProvider_CreateUser_Call) RunAndReturn(run func(context.Context, *sessions.User) error) *AuthenticationProvider_CreateUser_Call { + _c.Call.Return(run) + return _c +} + // DeleteAuthToken provides a mock function with given fields: ctx, user func (_m *AuthenticationProvider) DeleteAuthToken(ctx context.Context, user *sessions.User) error { ret := _m.Called(ctx, user) @@ -158,6 +311,35 @@ func (_m *AuthenticationProvider) DeleteAuthToken(ctx context.Context, user *ses return r0 } +// AuthenticationProvider_DeleteAuthToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteAuthToken' +type AuthenticationProvider_DeleteAuthToken_Call struct { + *mock.Call +} + +// DeleteAuthToken is a helper method to define mock.On call +// - ctx context.Context +// - user *sessions.User +func (_e *AuthenticationProvider_Expecter) DeleteAuthToken(ctx interface{}, user interface{}) *AuthenticationProvider_DeleteAuthToken_Call { + return &AuthenticationProvider_DeleteAuthToken_Call{Call: _e.mock.On("DeleteAuthToken", ctx, user)} +} + +func (_c *AuthenticationProvider_DeleteAuthToken_Call) Run(run func(ctx context.Context, user *sessions.User)) *AuthenticationProvider_DeleteAuthToken_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*sessions.User)) + }) + return _c +} + +func (_c *AuthenticationProvider_DeleteAuthToken_Call) Return(_a0 error) *AuthenticationProvider_DeleteAuthToken_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *AuthenticationProvider_DeleteAuthToken_Call) RunAndReturn(run func(context.Context, *sessions.User) error) *AuthenticationProvider_DeleteAuthToken_Call { + _c.Call.Return(run) + return _c +} + // DeleteUser provides a mock function with given fields: ctx, email func (_m *AuthenticationProvider) DeleteUser(ctx context.Context, email string) error { ret := _m.Called(ctx, email) @@ -176,6 +358,35 @@ func (_m *AuthenticationProvider) DeleteUser(ctx context.Context, email string) return r0 } +// AuthenticationProvider_DeleteUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteUser' +type AuthenticationProvider_DeleteUser_Call struct { + *mock.Call +} + +// DeleteUser is a helper method to define mock.On call +// - ctx context.Context +// - email string +func (_e *AuthenticationProvider_Expecter) DeleteUser(ctx interface{}, email interface{}) *AuthenticationProvider_DeleteUser_Call { + return &AuthenticationProvider_DeleteUser_Call{Call: _e.mock.On("DeleteUser", ctx, email)} +} + +func (_c *AuthenticationProvider_DeleteUser_Call) Run(run func(ctx context.Context, email string)) *AuthenticationProvider_DeleteUser_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *AuthenticationProvider_DeleteUser_Call) Return(_a0 error) *AuthenticationProvider_DeleteUser_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *AuthenticationProvider_DeleteUser_Call) RunAndReturn(run func(context.Context, string) error) *AuthenticationProvider_DeleteUser_Call { + _c.Call.Return(run) + return _c +} + // DeleteUserSession provides a mock function with given fields: ctx, sessionID func (_m *AuthenticationProvider) DeleteUserSession(ctx context.Context, sessionID string) error { ret := _m.Called(ctx, sessionID) @@ -194,6 +405,35 @@ func (_m *AuthenticationProvider) DeleteUserSession(ctx context.Context, session return r0 } +// AuthenticationProvider_DeleteUserSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteUserSession' +type AuthenticationProvider_DeleteUserSession_Call struct { + *mock.Call +} + +// DeleteUserSession is a helper method to define mock.On call +// - ctx context.Context +// - sessionID string +func (_e *AuthenticationProvider_Expecter) DeleteUserSession(ctx interface{}, sessionID interface{}) *AuthenticationProvider_DeleteUserSession_Call { + return &AuthenticationProvider_DeleteUserSession_Call{Call: _e.mock.On("DeleteUserSession", ctx, sessionID)} +} + +func (_c *AuthenticationProvider_DeleteUserSession_Call) Run(run func(ctx context.Context, sessionID string)) *AuthenticationProvider_DeleteUserSession_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *AuthenticationProvider_DeleteUserSession_Call) Return(_a0 error) *AuthenticationProvider_DeleteUserSession_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *AuthenticationProvider_DeleteUserSession_Call) RunAndReturn(run func(context.Context, string) error) *AuthenticationProvider_DeleteUserSession_Call { + _c.Call.Return(run) + return _c +} + // FindExternalInitiator provides a mock function with given fields: ctx, eia func (_m *AuthenticationProvider) FindExternalInitiator(ctx context.Context, eia *auth.Token) (*bridges.ExternalInitiator, error) { ret := _m.Called(ctx, eia) @@ -224,6 +464,35 @@ func (_m *AuthenticationProvider) FindExternalInitiator(ctx context.Context, eia return r0, r1 } +// AuthenticationProvider_FindExternalInitiator_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindExternalInitiator' +type AuthenticationProvider_FindExternalInitiator_Call struct { + *mock.Call +} + +// FindExternalInitiator is a helper method to define mock.On call +// - ctx context.Context +// - eia *auth.Token +func (_e *AuthenticationProvider_Expecter) FindExternalInitiator(ctx interface{}, eia interface{}) *AuthenticationProvider_FindExternalInitiator_Call { + return &AuthenticationProvider_FindExternalInitiator_Call{Call: _e.mock.On("FindExternalInitiator", ctx, eia)} +} + +func (_c *AuthenticationProvider_FindExternalInitiator_Call) Run(run func(ctx context.Context, eia *auth.Token)) *AuthenticationProvider_FindExternalInitiator_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*auth.Token)) + }) + return _c +} + +func (_c *AuthenticationProvider_FindExternalInitiator_Call) Return(initiator *bridges.ExternalInitiator, err error) *AuthenticationProvider_FindExternalInitiator_Call { + _c.Call.Return(initiator, err) + return _c +} + +func (_c *AuthenticationProvider_FindExternalInitiator_Call) RunAndReturn(run func(context.Context, *auth.Token) (*bridges.ExternalInitiator, error)) *AuthenticationProvider_FindExternalInitiator_Call { + _c.Call.Return(run) + return _c +} + // FindUser provides a mock function with given fields: ctx, email func (_m *AuthenticationProvider) FindUser(ctx context.Context, email string) (sessions.User, error) { ret := _m.Called(ctx, email) @@ -252,6 +521,35 @@ func (_m *AuthenticationProvider) FindUser(ctx context.Context, email string) (s return r0, r1 } +// AuthenticationProvider_FindUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindUser' +type AuthenticationProvider_FindUser_Call struct { + *mock.Call +} + +// FindUser is a helper method to define mock.On call +// - ctx context.Context +// - email string +func (_e *AuthenticationProvider_Expecter) FindUser(ctx interface{}, email interface{}) *AuthenticationProvider_FindUser_Call { + return &AuthenticationProvider_FindUser_Call{Call: _e.mock.On("FindUser", ctx, email)} +} + +func (_c *AuthenticationProvider_FindUser_Call) Run(run func(ctx context.Context, email string)) *AuthenticationProvider_FindUser_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *AuthenticationProvider_FindUser_Call) Return(_a0 sessions.User, _a1 error) *AuthenticationProvider_FindUser_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *AuthenticationProvider_FindUser_Call) RunAndReturn(run func(context.Context, string) (sessions.User, error)) *AuthenticationProvider_FindUser_Call { + _c.Call.Return(run) + return _c +} + // FindUserByAPIToken provides a mock function with given fields: ctx, apiToken func (_m *AuthenticationProvider) FindUserByAPIToken(ctx context.Context, apiToken string) (sessions.User, error) { ret := _m.Called(ctx, apiToken) @@ -280,6 +578,35 @@ func (_m *AuthenticationProvider) FindUserByAPIToken(ctx context.Context, apiTok return r0, r1 } +// AuthenticationProvider_FindUserByAPIToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindUserByAPIToken' +type AuthenticationProvider_FindUserByAPIToken_Call struct { + *mock.Call +} + +// FindUserByAPIToken is a helper method to define mock.On call +// - ctx context.Context +// - apiToken string +func (_e *AuthenticationProvider_Expecter) FindUserByAPIToken(ctx interface{}, apiToken interface{}) *AuthenticationProvider_FindUserByAPIToken_Call { + return &AuthenticationProvider_FindUserByAPIToken_Call{Call: _e.mock.On("FindUserByAPIToken", ctx, apiToken)} +} + +func (_c *AuthenticationProvider_FindUserByAPIToken_Call) Run(run func(ctx context.Context, apiToken string)) *AuthenticationProvider_FindUserByAPIToken_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *AuthenticationProvider_FindUserByAPIToken_Call) Return(_a0 sessions.User, _a1 error) *AuthenticationProvider_FindUserByAPIToken_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *AuthenticationProvider_FindUserByAPIToken_Call) RunAndReturn(run func(context.Context, string) (sessions.User, error)) *AuthenticationProvider_FindUserByAPIToken_Call { + _c.Call.Return(run) + return _c +} + // GetUserWebAuthn provides a mock function with given fields: ctx, email func (_m *AuthenticationProvider) GetUserWebAuthn(ctx context.Context, email string) ([]sessions.WebAuthn, error) { ret := _m.Called(ctx, email) @@ -310,6 +637,35 @@ func (_m *AuthenticationProvider) GetUserWebAuthn(ctx context.Context, email str return r0, r1 } +// AuthenticationProvider_GetUserWebAuthn_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetUserWebAuthn' +type AuthenticationProvider_GetUserWebAuthn_Call struct { + *mock.Call +} + +// GetUserWebAuthn is a helper method to define mock.On call +// - ctx context.Context +// - email string +func (_e *AuthenticationProvider_Expecter) GetUserWebAuthn(ctx interface{}, email interface{}) *AuthenticationProvider_GetUserWebAuthn_Call { + return &AuthenticationProvider_GetUserWebAuthn_Call{Call: _e.mock.On("GetUserWebAuthn", ctx, email)} +} + +func (_c *AuthenticationProvider_GetUserWebAuthn_Call) Run(run func(ctx context.Context, email string)) *AuthenticationProvider_GetUserWebAuthn_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *AuthenticationProvider_GetUserWebAuthn_Call) Return(_a0 []sessions.WebAuthn, _a1 error) *AuthenticationProvider_GetUserWebAuthn_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *AuthenticationProvider_GetUserWebAuthn_Call) RunAndReturn(run func(context.Context, string) ([]sessions.WebAuthn, error)) *AuthenticationProvider_GetUserWebAuthn_Call { + _c.Call.Return(run) + return _c +} + // ListUsers provides a mock function with given fields: ctx func (_m *AuthenticationProvider) ListUsers(ctx context.Context) ([]sessions.User, error) { ret := _m.Called(ctx) @@ -340,6 +696,34 @@ func (_m *AuthenticationProvider) ListUsers(ctx context.Context) ([]sessions.Use return r0, r1 } +// AuthenticationProvider_ListUsers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListUsers' +type AuthenticationProvider_ListUsers_Call struct { + *mock.Call +} + +// ListUsers is a helper method to define mock.On call +// - ctx context.Context +func (_e *AuthenticationProvider_Expecter) ListUsers(ctx interface{}) *AuthenticationProvider_ListUsers_Call { + return &AuthenticationProvider_ListUsers_Call{Call: _e.mock.On("ListUsers", ctx)} +} + +func (_c *AuthenticationProvider_ListUsers_Call) Run(run func(ctx context.Context)) *AuthenticationProvider_ListUsers_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *AuthenticationProvider_ListUsers_Call) Return(_a0 []sessions.User, _a1 error) *AuthenticationProvider_ListUsers_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *AuthenticationProvider_ListUsers_Call) RunAndReturn(run func(context.Context) ([]sessions.User, error)) *AuthenticationProvider_ListUsers_Call { + _c.Call.Return(run) + return _c +} + // SaveWebAuthn provides a mock function with given fields: ctx, token func (_m *AuthenticationProvider) SaveWebAuthn(ctx context.Context, token *sessions.WebAuthn) error { ret := _m.Called(ctx, token) @@ -358,6 +742,35 @@ func (_m *AuthenticationProvider) SaveWebAuthn(ctx context.Context, token *sessi return r0 } +// AuthenticationProvider_SaveWebAuthn_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveWebAuthn' +type AuthenticationProvider_SaveWebAuthn_Call struct { + *mock.Call +} + +// SaveWebAuthn is a helper method to define mock.On call +// - ctx context.Context +// - token *sessions.WebAuthn +func (_e *AuthenticationProvider_Expecter) SaveWebAuthn(ctx interface{}, token interface{}) *AuthenticationProvider_SaveWebAuthn_Call { + return &AuthenticationProvider_SaveWebAuthn_Call{Call: _e.mock.On("SaveWebAuthn", ctx, token)} +} + +func (_c *AuthenticationProvider_SaveWebAuthn_Call) Run(run func(ctx context.Context, token *sessions.WebAuthn)) *AuthenticationProvider_SaveWebAuthn_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*sessions.WebAuthn)) + }) + return _c +} + +func (_c *AuthenticationProvider_SaveWebAuthn_Call) Return(_a0 error) *AuthenticationProvider_SaveWebAuthn_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *AuthenticationProvider_SaveWebAuthn_Call) RunAndReturn(run func(context.Context, *sessions.WebAuthn) error) *AuthenticationProvider_SaveWebAuthn_Call { + _c.Call.Return(run) + return _c +} + // Sessions provides a mock function with given fields: ctx, offset, limit func (_m *AuthenticationProvider) Sessions(ctx context.Context, offset int, limit int) ([]sessions.Session, error) { ret := _m.Called(ctx, offset, limit) @@ -388,6 +801,36 @@ func (_m *AuthenticationProvider) Sessions(ctx context.Context, offset int, limi return r0, r1 } +// AuthenticationProvider_Sessions_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Sessions' +type AuthenticationProvider_Sessions_Call struct { + *mock.Call +} + +// Sessions is a helper method to define mock.On call +// - ctx context.Context +// - offset int +// - limit int +func (_e *AuthenticationProvider_Expecter) Sessions(ctx interface{}, offset interface{}, limit interface{}) *AuthenticationProvider_Sessions_Call { + return &AuthenticationProvider_Sessions_Call{Call: _e.mock.On("Sessions", ctx, offset, limit)} +} + +func (_c *AuthenticationProvider_Sessions_Call) Run(run func(ctx context.Context, offset int, limit int)) *AuthenticationProvider_Sessions_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(int), args[2].(int)) + }) + return _c +} + +func (_c *AuthenticationProvider_Sessions_Call) Return(_a0 []sessions.Session, _a1 error) *AuthenticationProvider_Sessions_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *AuthenticationProvider_Sessions_Call) RunAndReturn(run func(context.Context, int, int) ([]sessions.Session, error)) *AuthenticationProvider_Sessions_Call { + _c.Call.Return(run) + return _c +} + // SetAuthToken provides a mock function with given fields: ctx, user, token func (_m *AuthenticationProvider) SetAuthToken(ctx context.Context, user *sessions.User, token *auth.Token) error { ret := _m.Called(ctx, user, token) @@ -406,6 +849,36 @@ func (_m *AuthenticationProvider) SetAuthToken(ctx context.Context, user *sessio return r0 } +// AuthenticationProvider_SetAuthToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetAuthToken' +type AuthenticationProvider_SetAuthToken_Call struct { + *mock.Call +} + +// SetAuthToken is a helper method to define mock.On call +// - ctx context.Context +// - user *sessions.User +// - token *auth.Token +func (_e *AuthenticationProvider_Expecter) SetAuthToken(ctx interface{}, user interface{}, token interface{}) *AuthenticationProvider_SetAuthToken_Call { + return &AuthenticationProvider_SetAuthToken_Call{Call: _e.mock.On("SetAuthToken", ctx, user, token)} +} + +func (_c *AuthenticationProvider_SetAuthToken_Call) Run(run func(ctx context.Context, user *sessions.User, token *auth.Token)) *AuthenticationProvider_SetAuthToken_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*sessions.User), args[2].(*auth.Token)) + }) + return _c +} + +func (_c *AuthenticationProvider_SetAuthToken_Call) Return(_a0 error) *AuthenticationProvider_SetAuthToken_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *AuthenticationProvider_SetAuthToken_Call) RunAndReturn(run func(context.Context, *sessions.User, *auth.Token) error) *AuthenticationProvider_SetAuthToken_Call { + _c.Call.Return(run) + return _c +} + // SetPassword provides a mock function with given fields: ctx, user, newPassword func (_m *AuthenticationProvider) SetPassword(ctx context.Context, user *sessions.User, newPassword string) error { ret := _m.Called(ctx, user, newPassword) @@ -424,6 +897,36 @@ func (_m *AuthenticationProvider) SetPassword(ctx context.Context, user *session return r0 } +// AuthenticationProvider_SetPassword_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPassword' +type AuthenticationProvider_SetPassword_Call struct { + *mock.Call +} + +// SetPassword is a helper method to define mock.On call +// - ctx context.Context +// - user *sessions.User +// - newPassword string +func (_e *AuthenticationProvider_Expecter) SetPassword(ctx interface{}, user interface{}, newPassword interface{}) *AuthenticationProvider_SetPassword_Call { + return &AuthenticationProvider_SetPassword_Call{Call: _e.mock.On("SetPassword", ctx, user, newPassword)} +} + +func (_c *AuthenticationProvider_SetPassword_Call) Run(run func(ctx context.Context, user *sessions.User, newPassword string)) *AuthenticationProvider_SetPassword_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*sessions.User), args[2].(string)) + }) + return _c +} + +func (_c *AuthenticationProvider_SetPassword_Call) Return(_a0 error) *AuthenticationProvider_SetPassword_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *AuthenticationProvider_SetPassword_Call) RunAndReturn(run func(context.Context, *sessions.User, string) error) *AuthenticationProvider_SetPassword_Call { + _c.Call.Return(run) + return _c +} + // TestPassword provides a mock function with given fields: ctx, email, password func (_m *AuthenticationProvider) TestPassword(ctx context.Context, email string, password string) error { ret := _m.Called(ctx, email, password) @@ -442,6 +945,36 @@ func (_m *AuthenticationProvider) TestPassword(ctx context.Context, email string return r0 } +// AuthenticationProvider_TestPassword_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TestPassword' +type AuthenticationProvider_TestPassword_Call struct { + *mock.Call +} + +// TestPassword is a helper method to define mock.On call +// - ctx context.Context +// - email string +// - password string +func (_e *AuthenticationProvider_Expecter) TestPassword(ctx interface{}, email interface{}, password interface{}) *AuthenticationProvider_TestPassword_Call { + return &AuthenticationProvider_TestPassword_Call{Call: _e.mock.On("TestPassword", ctx, email, password)} +} + +func (_c *AuthenticationProvider_TestPassword_Call) Run(run func(ctx context.Context, email string, password string)) *AuthenticationProvider_TestPassword_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string)) + }) + return _c +} + +func (_c *AuthenticationProvider_TestPassword_Call) Return(_a0 error) *AuthenticationProvider_TestPassword_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *AuthenticationProvider_TestPassword_Call) RunAndReturn(run func(context.Context, string, string) error) *AuthenticationProvider_TestPassword_Call { + _c.Call.Return(run) + return _c +} + // UpdateRole provides a mock function with given fields: ctx, email, newRole func (_m *AuthenticationProvider) UpdateRole(ctx context.Context, email string, newRole string) (sessions.User, error) { ret := _m.Called(ctx, email, newRole) @@ -470,6 +1003,36 @@ func (_m *AuthenticationProvider) UpdateRole(ctx context.Context, email string, return r0, r1 } +// AuthenticationProvider_UpdateRole_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateRole' +type AuthenticationProvider_UpdateRole_Call struct { + *mock.Call +} + +// UpdateRole is a helper method to define mock.On call +// - ctx context.Context +// - email string +// - newRole string +func (_e *AuthenticationProvider_Expecter) UpdateRole(ctx interface{}, email interface{}, newRole interface{}) *AuthenticationProvider_UpdateRole_Call { + return &AuthenticationProvider_UpdateRole_Call{Call: _e.mock.On("UpdateRole", ctx, email, newRole)} +} + +func (_c *AuthenticationProvider_UpdateRole_Call) Run(run func(ctx context.Context, email string, newRole string)) *AuthenticationProvider_UpdateRole_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string)) + }) + return _c +} + +func (_c *AuthenticationProvider_UpdateRole_Call) Return(_a0 sessions.User, _a1 error) *AuthenticationProvider_UpdateRole_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *AuthenticationProvider_UpdateRole_Call) RunAndReturn(run func(context.Context, string, string) (sessions.User, error)) *AuthenticationProvider_UpdateRole_Call { + _c.Call.Return(run) + return _c +} + // NewAuthenticationProvider creates a new instance of AuthenticationProvider. 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 NewAuthenticationProvider(t interface { diff --git a/core/sessions/mocks/basic_admin_users_orm.go b/core/sessions/mocks/basic_admin_users_orm.go index b8376267c24..8ff07baf0b3 100644 --- a/core/sessions/mocks/basic_admin_users_orm.go +++ b/core/sessions/mocks/basic_admin_users_orm.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -14,6 +14,14 @@ type BasicAdminUsersORM struct { mock.Mock } +type BasicAdminUsersORM_Expecter struct { + mock *mock.Mock +} + +func (_m *BasicAdminUsersORM) EXPECT() *BasicAdminUsersORM_Expecter { + return &BasicAdminUsersORM_Expecter{mock: &_m.Mock} +} + // CreateUser provides a mock function with given fields: ctx, user func (_m *BasicAdminUsersORM) CreateUser(ctx context.Context, user *sessions.User) error { ret := _m.Called(ctx, user) @@ -32,6 +40,35 @@ func (_m *BasicAdminUsersORM) CreateUser(ctx context.Context, user *sessions.Use return r0 } +// BasicAdminUsersORM_CreateUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateUser' +type BasicAdminUsersORM_CreateUser_Call struct { + *mock.Call +} + +// CreateUser is a helper method to define mock.On call +// - ctx context.Context +// - user *sessions.User +func (_e *BasicAdminUsersORM_Expecter) CreateUser(ctx interface{}, user interface{}) *BasicAdminUsersORM_CreateUser_Call { + return &BasicAdminUsersORM_CreateUser_Call{Call: _e.mock.On("CreateUser", ctx, user)} +} + +func (_c *BasicAdminUsersORM_CreateUser_Call) Run(run func(ctx context.Context, user *sessions.User)) *BasicAdminUsersORM_CreateUser_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*sessions.User)) + }) + return _c +} + +func (_c *BasicAdminUsersORM_CreateUser_Call) Return(_a0 error) *BasicAdminUsersORM_CreateUser_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *BasicAdminUsersORM_CreateUser_Call) RunAndReturn(run func(context.Context, *sessions.User) error) *BasicAdminUsersORM_CreateUser_Call { + _c.Call.Return(run) + return _c +} + // FindUser provides a mock function with given fields: ctx, email func (_m *BasicAdminUsersORM) FindUser(ctx context.Context, email string) (sessions.User, error) { ret := _m.Called(ctx, email) @@ -60,6 +97,35 @@ func (_m *BasicAdminUsersORM) FindUser(ctx context.Context, email string) (sessi return r0, r1 } +// BasicAdminUsersORM_FindUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindUser' +type BasicAdminUsersORM_FindUser_Call struct { + *mock.Call +} + +// FindUser is a helper method to define mock.On call +// - ctx context.Context +// - email string +func (_e *BasicAdminUsersORM_Expecter) FindUser(ctx interface{}, email interface{}) *BasicAdminUsersORM_FindUser_Call { + return &BasicAdminUsersORM_FindUser_Call{Call: _e.mock.On("FindUser", ctx, email)} +} + +func (_c *BasicAdminUsersORM_FindUser_Call) Run(run func(ctx context.Context, email string)) *BasicAdminUsersORM_FindUser_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *BasicAdminUsersORM_FindUser_Call) Return(_a0 sessions.User, _a1 error) *BasicAdminUsersORM_FindUser_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BasicAdminUsersORM_FindUser_Call) RunAndReturn(run func(context.Context, string) (sessions.User, error)) *BasicAdminUsersORM_FindUser_Call { + _c.Call.Return(run) + return _c +} + // ListUsers provides a mock function with given fields: ctx func (_m *BasicAdminUsersORM) ListUsers(ctx context.Context) ([]sessions.User, error) { ret := _m.Called(ctx) @@ -90,6 +156,34 @@ func (_m *BasicAdminUsersORM) ListUsers(ctx context.Context) ([]sessions.User, e return r0, r1 } +// BasicAdminUsersORM_ListUsers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListUsers' +type BasicAdminUsersORM_ListUsers_Call struct { + *mock.Call +} + +// ListUsers is a helper method to define mock.On call +// - ctx context.Context +func (_e *BasicAdminUsersORM_Expecter) ListUsers(ctx interface{}) *BasicAdminUsersORM_ListUsers_Call { + return &BasicAdminUsersORM_ListUsers_Call{Call: _e.mock.On("ListUsers", ctx)} +} + +func (_c *BasicAdminUsersORM_ListUsers_Call) Run(run func(ctx context.Context)) *BasicAdminUsersORM_ListUsers_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context)) + }) + return _c +} + +func (_c *BasicAdminUsersORM_ListUsers_Call) Return(_a0 []sessions.User, _a1 error) *BasicAdminUsersORM_ListUsers_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *BasicAdminUsersORM_ListUsers_Call) RunAndReturn(run func(context.Context) ([]sessions.User, error)) *BasicAdminUsersORM_ListUsers_Call { + _c.Call.Return(run) + return _c +} + // NewBasicAdminUsersORM creates a new instance of BasicAdminUsersORM. 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 NewBasicAdminUsersORM(t interface { diff --git a/core/store/migrate/migrate.go b/core/store/migrate/migrate.go index c8f70e87383..7c3d3deaaf0 100644 --- a/core/store/migrate/migrate.go +++ b/core/store/migrate/migrate.go @@ -5,12 +5,14 @@ import ( "database/sql" "embed" "fmt" + "io/fs" "os" "strconv" "strings" pkgerrors "github.com/pkg/errors" "github.com/pressly/goose/v3" + "github.com/pressly/goose/v3/database" "gopkg.in/guregu/null.v4" "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" @@ -25,20 +27,55 @@ var embedMigrations embed.FS const MIGRATIONS_DIR string = "migrations" -func init() { - goose.SetBaseFS(embedMigrations) - goose.SetSequential(true) - goose.SetTableName("goose_migrations") +func NewProvider(ctx context.Context, db *sql.DB) (*goose.Provider, error) { + store, err := database.NewStore(goose.DialectPostgres, "goose_migrations") + if err != nil { + return nil, err + } + + goMigrations := []*goose.Migration{ + migrations.Migration36, + migrations.Migration54, + migrations.Migration56, + migrations.Migration195, + } + logMigrations := os.Getenv("CL_LOG_SQL_MIGRATIONS") verbose, _ := strconv.ParseBool(logMigrations) - goose.SetVerbose(verbose) + + fys, err := fs.Sub(embedMigrations, MIGRATIONS_DIR) + if err != nil { + return nil, fmt.Errorf("failed to get sub filesystem for embedded migration dir: %w", err) + } + // hack to work around global go migrations + // https: //github.com/pressly/goose/issues/782 + goose.ResetGlobalMigrations() + p, err := goose.NewProvider("", db, fys, + goose.WithStore(store), + goose.WithGoMigrations(goMigrations...), + goose.WithVerbose(verbose)) + if err != nil { + return nil, fmt.Errorf("failed to create goose provider: %w", err) + } + + err = ensureMigrated(ctx, db, p, store.Tablename()) + if err != nil { + return nil, err + } + + return p, nil } // Ensure we migrated from v1 migrations to goose_migrations -func ensureMigrated(ctx context.Context, db *sql.DB) error { +// TODO remove this for v3 +func ensureMigrated(ctx context.Context, db *sql.DB, p *goose.Provider, providerTableName string) error { + todo, err := p.HasPending(ctx) + if !todo && err == nil { + return nil + } sqlxDB := pg.WrapDbWithSqlx(db) var names []string - err := sqlxDB.SelectContext(ctx, &names, `SELECT id FROM migrations`) + err = sqlxDB.SelectContext(ctx, &names, `SELECT id FROM migrations`) if err != nil { // already migrated return nil @@ -63,13 +100,14 @@ func ensureMigrated(ctx context.Context, db *sql.DB) error { } // ensure a goose migrations table exists with it's initial v0 - if _, err = goose.GetDBVersionContext(ctx, db); err != nil { + if _, err = p.GetDBVersion(ctx); err != nil { return err } // insert records for existing migrations //nolint - sql := fmt.Sprintf(`INSERT INTO %s (version_id, is_applied) VALUES ($1, true);`, goose.TableName()) + + sql := fmt.Sprintf(`INSERT INTO %s (version_id, is_applied) VALUES ($1, true);`, providerTableName) return sqlutil.TransactDataSource(ctx, sqlxDB, nil, func(tx sqlutil.DataSource) error { for _, name := range names { var id int64 @@ -100,36 +138,48 @@ func ensureMigrated(ctx context.Context, db *sql.DB) error { } func Migrate(ctx context.Context, db *sql.DB) error { - if err := ensureMigrated(ctx, db); err != nil { + provider, err := NewProvider(ctx, db) + if err != nil { return err } - // WithAllowMissing is necessary when upgrading from 0.10.14 since it - // includes out-of-order migrations - return goose.Up(db, MIGRATIONS_DIR, goose.WithAllowMissing()) + _, err = provider.Up(ctx) + return err } func Rollback(ctx context.Context, db *sql.DB, version null.Int) error { - if err := ensureMigrated(ctx, db); err != nil { + provider, err := NewProvider(ctx, db) + if err != nil { return err } if version.Valid { - return goose.DownTo(db, MIGRATIONS_DIR, version.Int64) + _, err = provider.DownTo(ctx, version.Int64) + } else { + _, err = provider.Down(ctx) } - return goose.Down(db, MIGRATIONS_DIR) + return err } func Current(ctx context.Context, db *sql.DB) (int64, error) { - if err := ensureMigrated(ctx, db); err != nil { + provider, err := NewProvider(ctx, db) + if err != nil { return -1, err } - return goose.EnsureDBVersion(db) + return provider.GetDBVersion(ctx) } func Status(ctx context.Context, db *sql.DB) error { - if err := ensureMigrated(ctx, db); err != nil { + provider, err := NewProvider(ctx, db) + if err != nil { + return err + } + migrations, err := provider.Status(ctx) + if err != nil { return err } - return goose.Status(db, MIGRATIONS_DIR) + for _, m := range migrations { + fmt.Printf("version:%d, path:%s, type:%s, state:%s, appliedAt: %s \n", m.Source.Version, m.Source.Path, m.Source.Type, m.State, m.AppliedAt.String()) + } + return nil } func Create(db *sql.DB, name, migrationType string) error { diff --git a/core/store/migrate/migrate_test.go b/core/store/migrate/migrate_test.go index 8a7d1628a4c..9a8bf96573e 100644 --- a/core/store/migrate/migrate_test.go +++ b/core/store/migrate/migrate_test.go @@ -9,6 +9,7 @@ import ( "github.com/google/uuid" "github.com/lib/pq" "github.com/pressly/goose/v3" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "gopkg.in/guregu/null.v4" @@ -29,8 +30,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/store/models" ) -var migrationDir = "migrations" - type OffchainReporting2OracleSpec100 struct { ID int32 `toml:"-"` ContractID string `toml:"contractID"` @@ -72,8 +71,11 @@ func getOCR2Spec100() OffchainReporting2OracleSpec100 { func TestMigrate_0100_BootstrapConfigs(t *testing.T) { cfg, db := heavyweight.FullTestDBEmptyV2(t, nil) lggr := logger.TestLogger(t) - err := goose.UpTo(db.DB, migrationDir, 99) + p, err := migrate.NewProvider(testutils.Context(t), db.DB) + require.NoError(t, err) + results, err := p.UpTo(testutils.Context(t), 99) require.NoError(t, err) + assert.Len(t, results, 99) pipelineORM := pipeline.NewORM(db, lggr, cfg.JobPipeline().MaxSuccessfulRuns()) ctx := testutils.Context(t) @@ -227,7 +229,7 @@ func TestMigrate_0100_BootstrapConfigs(t *testing.T) { require.NoError(t, err) // Migrate up - err = goose.UpByOne(db.DB, migrationDir) + _, err = p.UpByOne(ctx) require.NoError(t, err) var bootstrapSpecs []job.BootstrapSpec @@ -282,7 +284,7 @@ func TestMigrate_0100_BootstrapConfigs(t *testing.T) { require.Equal(t, 1, count) // Migrate down - err = goose.Down(db.DB, migrationDir) + _, err = p.Down(ctx) require.NoError(t, err) var oldJobs []Job @@ -340,8 +342,12 @@ ON jobs.offchainreporting2_oracle_spec_id = ocr2.id` func TestMigrate_101_GenericOCR2(t *testing.T) { _, db := heavyweight.FullTestDBEmptyV2(t, nil) - err := goose.UpTo(db.DB, migrationDir, 100) + ctx := testutils.Context(t) + p, err := migrate.NewProvider(ctx, db.DB) require.NoError(t, err) + results, err := p.UpTo(ctx, 100) + require.NoError(t, err) + assert.Len(t, results, 100) sql := `INSERT INTO offchainreporting2_oracle_specs (id, contract_id, relay, relay_config, p2p_bootstrap_peers, ocr_key_bundle_id, transmitter_id, blockchain_timeout, contract_config_tracker_poll_interval, contract_config_confirmations, juels_per_fee_coin_pipeline, @@ -356,7 +362,7 @@ func TestMigrate_101_GenericOCR2(t *testing.T) { _, err = db.NamedExec(sql, spec) require.NoError(t, err) - err = goose.UpByOne(db.DB, migrationDir) + _, err = p.UpByOne(ctx) require.NoError(t, err) type PluginValues struct { @@ -373,7 +379,7 @@ func TestMigrate_101_GenericOCR2(t *testing.T) { require.Equal(t, types.Median, pluginValues.PluginType) require.Equal(t, job.JSONConfig{"juelsPerFeeCoinSource": spec.JuelsPerFeeCoinPipeline}, pluginValues.PluginConfig) - err = goose.Down(db.DB, migrationDir) + _, err = p.Down(ctx) require.NoError(t, err) sql = `SELECT plugin_type, plugin_config FROM offchainreporting2_oracle_specs` @@ -390,8 +396,12 @@ func TestMigrate_101_GenericOCR2(t *testing.T) { func TestMigrate(t *testing.T) { ctx := testutils.Context(t) _, db := heavyweight.FullTestDBEmptyV2(t, nil) - err := goose.UpTo(db.DB, migrationDir, 100) + + p, err := migrate.NewProvider(ctx, db.DB) require.NoError(t, err) + results, err := p.UpTo(ctx, 100) + require.NoError(t, err) + assert.Len(t, results, 100) err = migrate.Status(ctx, db.DB) require.NoError(t, err) @@ -443,8 +453,11 @@ func TestDatabaseBackFillWithMigration202(t *testing.T) { _, db := heavyweight.FullTestDBEmptyV2(t, nil) ctx := testutils.Context(t) - err := goose.UpTo(db.DB, migrationDir, 201) + p, err := migrate.NewProvider(ctx, db.DB) + require.NoError(t, err) + results, err := p.UpTo(ctx, 201) require.NoError(t, err) + assert.Len(t, results, 201) simulatedOrm := logpoller.NewORM(testutils.SimulatedChainID, db, logger.TestLogger(t)) require.NoError(t, simulatedOrm.InsertBlock(ctx, testutils.Random32Byte(), 10, time.Now(), 0), err) @@ -458,7 +471,7 @@ func TestDatabaseBackFillWithMigration202(t *testing.T) { 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) + _, err = p.UpTo(ctx, 202) require.NoError(t, err) tests := []struct { @@ -530,8 +543,10 @@ func TestNoTriggers(t *testing.T) { assert_num_triggers(0) // version prior to removal of all triggers - v := 217 - err := goose.UpTo(db.DB, migrationDir, int64(v)) + v := int64(217) + p, err := migrate.NewProvider(testutils.Context(t), db.DB) + require.NoError(t, err) + _, err = p.UpTo(testutils.Context(t), v) require.NoError(t, err) assert_num_triggers(1) } @@ -547,8 +562,11 @@ func BenchmarkBackfillingRecordsWithMigration202(b *testing.B) { goose.SetLogger(goose.NopLogger()) _, db := heavyweight.FullTestDBEmptyV2(b, nil) - err := goose.UpTo(db.DB, migrationDir, previousMigration) + p, err := migrate.NewProvider(ctx, db.DB) + require.NoError(b, err) + results, err := p.UpTo(ctx, previousMigration) require.NoError(b, err) + assert.Len(b, results, int(previousMigration)) for j := 0; j < chainCount; j++ { // Insert 100_000 block to database, can't do all at once, so batching by 10k @@ -586,12 +604,12 @@ func BenchmarkBackfillingRecordsWithMigration202(b *testing.B) { // Repeat 1-3 for i := 0; i < b.N; i++ { b.StartTimer() - err = goose.UpTo(db.DB, migrationDir, backfillMigration) + _, err = p.UpTo(ctx, backfillMigration) require.NoError(b, err) b.StopTimer() // Cleanup - err = goose.DownTo(db.DB, migrationDir, previousMigration) + _, err = p.DownTo(ctx, previousMigration) require.NoError(b, err) _, err = db.ExecContext(ctx, ` diff --git a/core/store/migrate/migrations/0035_create_feeds_managers.sql b/core/store/migrate/migrations/0035_create_feeds_managers.sql index d82ccdfea85..bf89c638c14 100644 --- a/core/store/migrate/migrations/0035_create_feeds_managers.sql +++ b/core/store/migrate/migrations/0035_create_feeds_managers.sql @@ -10,4 +10,4 @@ CREATE TABLE feeds_managers ( updated_at timestamp with time zone NOT NULL ); -- +goose Down - DROP TABLE feeds_managers + DROP TABLE feeds_managers; diff --git a/core/store/migrate/migrations/0036_external_job_id.go b/core/store/migrate/migrations/0036_external_job_id.go index fc9ec08ec60..e8012da5e78 100644 --- a/core/store/migrate/migrations/0036_external_job_id.go +++ b/core/store/migrate/migrations/0036_external_job_id.go @@ -10,10 +10,6 @@ import ( "github.com/pressly/goose/v3" ) -func init() { - goose.AddMigrationContext(Up36, Down36) -} - const ( up36_1 = ` ALTER TABLE direct_request_specs DROP COLUMN on_chain_job_spec_id; @@ -79,3 +75,5 @@ func Down36(ctx context.Context, tx *sql.Tx) error { } return nil } + +var Migration36 = goose.NewGoMigration(36, &goose.GoFunc{RunTx: Up36}, &goose.GoFunc{RunTx: Down36}) diff --git a/core/store/migrate/migrations/0054_remove_legacy_pipeline.go b/core/store/migrate/migrations/0054_remove_legacy_pipeline.go index b5ddcccd89b..6d3cb20b73d 100644 --- a/core/store/migrate/migrations/0054_remove_legacy_pipeline.go +++ b/core/store/migrate/migrations/0054_remove_legacy_pipeline.go @@ -28,10 +28,6 @@ ALTER TABLE log_broadcasts RENAME COLUMN job_id_v2 TO job_id; ALTER TABLE job_spec_errors_v2 RENAME TO job_spec_errors; ` -func init() { - goose.AddMigrationContext(Up54, Down54) -} - type queryer interface { QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row } @@ -63,3 +59,5 @@ func CheckNoLegacyJobs(ctx context.Context, ds queryer) error { } return nil } + +var Migration54 = goose.NewGoMigration(54, &goose.GoFunc{RunTx: Up54}, &goose.GoFunc{RunTx: Down54}) diff --git a/core/store/migrate/migrations/0056_multichain.go b/core/store/migrate/migrations/0056_multichain.go index 128e7be5407..c56ff0397f1 100644 --- a/core/store/migrate/migrations/0056_multichain.go +++ b/core/store/migrate/migrations/0056_multichain.go @@ -12,10 +12,6 @@ import ( "github.com/pressly/goose/v3" ) -func init() { - goose.AddMigrationContext(Up56, Down56) -} - const up56 = ` CREATE TABLE evm_chains ( id numeric(78,0) PRIMARY KEY, @@ -83,3 +79,5 @@ func Down56(ctx context.Context, tx *sql.Tx) error { } return nil } + +var Migration56 = goose.NewGoMigration(56, &goose.GoFunc{RunTx: Up56}, &goose.GoFunc{RunTx: Down56}) diff --git a/core/store/migrate/migrations/0195_add_not_null_to_evm_chain_id_in_job_specs.go b/core/store/migrate/migrations/0195_add_not_null_to_evm_chain_id_in_job_specs.go index b1387cc51f0..a2ecb50a1c9 100644 --- a/core/store/migrate/migrations/0195_add_not_null_to_evm_chain_id_in_job_specs.go +++ b/core/store/migrate/migrations/0195_add_not_null_to_evm_chain_id_in_job_specs.go @@ -11,10 +11,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/config/env" ) -func init() { - goose.AddMigrationContext(Up195, Down195) -} - const ( addNullConstraintsToSpecs = ` ALTER TABLE direct_request_specs ALTER COLUMN evm_chain_id SET NOT NULL; @@ -69,3 +65,5 @@ func Down195(ctx context.Context, tx *sql.Tx) error { } return nil } + +var Migration195 = goose.NewGoMigration(195, &goose.GoFunc{RunTx: Up195}, &goose.GoFunc{RunTx: Down195}) diff --git a/core/store/migrate/migrations/0245_mv_emv_txm_types.sql b/core/store/migrate/migrations/0245_mv_emv_txm_types.sql new file mode 100644 index 00000000000..c21e976da43 --- /dev/null +++ b/core/store/migrate/migrations/0245_mv_emv_txm_types.sql @@ -0,0 +1,13 @@ +-- +goose Up +ALTER TYPE eth_txes_state RENAME TO txes_state; +ALTER TYPE txes_state SET SCHEMA "evm"; + +ALTER TYPE eth_tx_attempts_state RENAME TO tx_attempts_state; +ALTER TYPE tx_attempts_state SET SCHEMA "evm"; +-- +goose Down +ALTER TYPE evm.txes_state SET SCHEMA "public"; +ALTER TYPE txes_state RENAME TO eth_txes_state; + +ALTER TYPE evm.tx_attempts_state SET SCHEMA "public"; +ALTER TYPE tx_attempts_state RENAME TO eth_tx_attempts_state; + diff --git a/core/store/migrate/migrations/0246_cron_spec_evm_chain_id.sql b/core/store/migrate/migrations/0246_cron_spec_evm_chain_id.sql new file mode 100644 index 00000000000..d2c0b1582e0 --- /dev/null +++ b/core/store/migrate/migrations/0246_cron_spec_evm_chain_id.sql @@ -0,0 +1,5 @@ +-- +goose Up +ALTER TABLE cron_specs ADD COLUMN evm_chain_id numeric(78,0); + +-- +goose Down +ALTER TABLE cron_specs DROP COLUMN evm_chain_id; diff --git a/core/store/migrate/migrations/0247_bal_spec_placeholder.sql b/core/store/migrate/migrations/0247_bal_spec_placeholder.sql new file mode 100644 index 00000000000..3eedf2cf363 --- /dev/null +++ b/core/store/migrate/migrations/0247_bal_spec_placeholder.sql @@ -0,0 +1,61 @@ +-- +goose Up +CREATE TABLE bal_specs ( + id BIGSERIAL PRIMARY KEY +); +ALTER TABLE + jobs +ADD + COLUMN bal_spec_id INT REFERENCES bal_specs (id), +DROP + CONSTRAINT chk_specs, +ADD + CONSTRAINT chk_specs CHECK ( + num_nonnulls( + ocr_oracle_spec_id, ocr2_oracle_spec_id, + direct_request_spec_id, flux_monitor_spec_id, + keeper_spec_id, cron_spec_id, webhook_spec_id, + vrf_spec_id, blockhash_store_spec_id, + block_header_feeder_spec_id, bootstrap_spec_id, + gateway_spec_id, + legacy_gas_station_server_spec_id, + legacy_gas_station_sidecar_spec_id, + eal_spec_id, + workflow_spec_id, + standard_capabilities_spec_id, + ccip_spec_id, + ccip_bootstrap_spec_id, + bal_spec_id, + CASE "type" WHEN 'stream' THEN 1 ELSE NULL END -- 'stream' type lacks a spec but should not cause validation to fail + ) = 1 + ); + +-- +goose Down +ALTER TABLE + jobs +DROP + CONSTRAINT chk_specs, +ADD + CONSTRAINT chk_specs CHECK ( + num_nonnulls( + ocr_oracle_spec_id, ocr2_oracle_spec_id, + direct_request_spec_id, flux_monitor_spec_id, + keeper_spec_id, cron_spec_id, webhook_spec_id, + vrf_spec_id, blockhash_store_spec_id, + block_header_feeder_spec_id, bootstrap_spec_id, + gateway_spec_id, + legacy_gas_station_server_spec_id, + legacy_gas_station_sidecar_spec_id, + eal_spec_id, + workflow_spec_id, + standard_capabilities_spec_id, + ccip_spec_id, + ccip_bootstrap_spec_id, + CASE "type" WHEN 'stream' THEN 1 ELSE NULL END -- 'stream' type lacks a spec but should not cause validation to fail + ) = 1 + ); +ALTER TABLE + jobs +DROP + COLUMN bal_spec_id; +DROP + TABLE IF EXISTS bal_specs; \ No newline at end of file diff --git a/core/testdata/testspecs/v2_specs.go b/core/testdata/testspecs/v2_specs.go index 949515b3357..3a1798ab5ad 100644 --- a/core/testdata/testspecs/v2_specs.go +++ b/core/testdata/testspecs/v2_specs.go @@ -24,7 +24,7 @@ var ( type = "cron" schemaVersion = 1 schedule = "CRON_TZ=UTC * 0 0 1 1 *" -externalJobID = "%s" +externalJobID = "%s" observationSource = """ ds [type=http method=GET url="https://chain.link/ETH-USD"]; ds_parse [type=jsonparse path="data,price"]; @@ -36,7 +36,20 @@ ds -> ds_parse -> ds_multiply; type = "cron" schemaVersion = 1 schedule = "CRON_TZ=UTC * 0 0 1 1 *" -externalJobID = "%s" +externalJobID = "%s" +observationSource = """ +ds [type=http method=GET url="https://chain.link/ETH-USD"]; +ds_parse [type=jsonparse path="data.price" separator="."]; +ds_multiply [type=multiply times=100]; +ds -> ds_parse -> ds_multiply; +""" +` + CronSpecEVMChainIDTemplate = ` +type = "cron" +schemaVersion = 1 +schedule = "CRON_TZ=UTC * 0 0 1 1 *" +externalJobID = "%s" +evmChainID = "42" observationSource = """ ds [type=http method=GET url="https://chain.link/ETH-USD"]; ds_parse [type=jsonparse path="data.price" separator="."]; @@ -62,7 +75,7 @@ type = "directrequest" schemaVersion = 1 name = "%s" contractAddress = "0x613a38AC1659769640aaE063C651F48E0250454C" -externalJobID = "%s" +externalJobID = "%s" evmChainID = "0" observationSource = """ ds1 [type=http method=GET url="http://example.com" allowunrestrictednetworkaccess="true"]; diff --git a/core/utils/thread_control_test.go b/core/utils/thread_control_test.go index 51d5c00a578..49bec742428 100644 --- a/core/utils/thread_control_test.go +++ b/core/utils/thread_control_test.go @@ -7,6 +7,7 @@ import ( "testing" "time" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -50,7 +51,7 @@ func TestThreadControl_GoCtx(t *testing.T) { start := time.Now() wg.Wait() end := time.Since(start) - require.True(t, end > timeout-1) - require.True(t, end < 2*timeout) + assert.Greater(t, end, timeout-1) + assert.Less(t, end, 2*timeout) require.Equal(t, int32(1), finished.Load()) } diff --git a/core/web/aptos_keys_controller.go b/core/web/aptos_keys_controller.go new file mode 100644 index 00000000000..5be4b815773 --- /dev/null +++ b/core/web/aptos_keys_controller.go @@ -0,0 +1,12 @@ +package web + +import ( + "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" + "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/aptoskey" + "github.com/smartcontractkit/chainlink/v2/core/web/presenters" +) + +func NewAptosKeysController(app chainlink.Application) KeysController { + return NewKeysController[aptoskey.Key, presenters.AptosKeyResource](app.GetKeyStore().Aptos(), app.GetLogger(), app.GetAuditLogger(), + "aptosKey", presenters.NewAptosKeyResource, presenters.NewAptosKeyResources) +} diff --git a/core/web/aptos_keys_controller_test.go b/core/web/aptos_keys_controller_test.go new file mode 100644 index 00000000000..c5de75a5105 --- /dev/null +++ b/core/web/aptos_keys_controller_test.go @@ -0,0 +1,109 @@ +package web_test + +import ( + "fmt" + "net/http" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/utils" + "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" + "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" + "github.com/smartcontractkit/chainlink/v2/core/services/keystore" + "github.com/smartcontractkit/chainlink/v2/core/web" + "github.com/smartcontractkit/chainlink/v2/core/web/presenters" +) + +func TestAptosKeysController_Index_HappyPath(t *testing.T) { + t.Parallel() + + client, keyStore := setupAptosKeysControllerTests(t) + keys, _ := keyStore.Aptos().GetAll() + + response, cleanup := client.Get("/v2/keys/aptos") + t.Cleanup(cleanup) + cltest.AssertServerResponse(t, response, http.StatusOK) + + resources := []presenters.AptosKeyResource{} + err := web.ParseJSONAPIResponse(cltest.ParseResponseBody(t, response), &resources) + assert.NoError(t, err) + + require.Len(t, resources, len(keys)) + + assert.Equal(t, keys[0].ID(), resources[0].ID) + assert.Equal(t, keys[0].PublicKeyStr(), resources[0].PubKey) +} + +func TestAptosKeysController_Create_HappyPath(t *testing.T) { + t.Parallel() + + app := cltest.NewApplicationEVMDisabled(t) + require.NoError(t, app.Start(testutils.Context(t))) + client := app.NewHTTPClient(nil) + keyStore := app.GetKeyStore() + + response, cleanup := client.Post("/v2/keys/aptos", nil) + t.Cleanup(cleanup) + cltest.AssertServerResponse(t, response, http.StatusOK) + + keys, _ := keyStore.Aptos().GetAll() + require.Len(t, keys, 1) + + resource := presenters.AptosKeyResource{} + err := web.ParseJSONAPIResponse(cltest.ParseResponseBody(t, response), &resource) + assert.NoError(t, err) + + assert.Equal(t, keys[0].ID(), resource.ID) + assert.Equal(t, keys[0].PublicKeyStr(), resource.PubKey) + + _, err = keyStore.Aptos().Get(resource.ID) + require.NoError(t, err) +} + +func TestAptosKeysController_Delete_NonExistentAptosKeyID(t *testing.T) { + t.Parallel() + + client, _ := setupAptosKeysControllerTests(t) + + nonExistentAptosKeyID := "foobar" + response, cleanup := client.Delete("/v2/keys/aptos/" + nonExistentAptosKeyID) + t.Cleanup(cleanup) + assert.Equal(t, http.StatusNotFound, response.StatusCode) +} + +func TestAptosKeysController_Delete_HappyPath(t *testing.T) { + t.Parallel() + ctx := testutils.Context(t) + + client, keyStore := setupAptosKeysControllerTests(t) + + keys, _ := keyStore.Aptos().GetAll() + initialLength := len(keys) + key, _ := keyStore.Aptos().Create(ctx) + + response, cleanup := client.Delete(fmt.Sprintf("/v2/keys/aptos/%s", key.ID())) + t.Cleanup(cleanup) + assert.Equal(t, http.StatusOK, response.StatusCode) + assert.Error(t, utils.JustError(keyStore.Aptos().Get(key.ID()))) + + keys, _ = keyStore.Aptos().GetAll() + assert.Equal(t, initialLength, len(keys)) +} + +func setupAptosKeysControllerTests(t *testing.T) (cltest.HTTPClientCleaner, keystore.Master) { + t.Helper() + ctx := testutils.Context(t) + + app := cltest.NewApplication(t) + require.NoError(t, app.Start(ctx)) + require.NoError(t, app.KeyStore.OCR().Add(ctx, cltest.DefaultOCRKey)) + aptosKeyStore := app.GetKeyStore().Aptos() + require.NotNil(t, aptosKeyStore) + require.NoError(t, aptosKeyStore.Add(ctx, cltest.DefaultAptosKey)) + + client := app.NewHTTPClient(nil) + + return client, app.GetKeyStore() +} diff --git a/core/web/assets/index.html b/core/web/assets/index.html index eb81b6d9942..e50dfc07090 100644 --- a/core/web/assets/index.html +++ b/core/web/assets/index.html @@ -1 +1 @@ -Operator UIChainlink
\ No newline at end of file +Operator UIChainlink
\ No newline at end of file diff --git a/core/web/assets/index.html.gz b/core/web/assets/index.html.gz index 009ac43692a..f32bc10dbc3 100644 Binary files a/core/web/assets/index.html.gz and b/core/web/assets/index.html.gz differ diff --git a/core/web/assets/main.026013f04da39527a75d.js b/core/web/assets/main.6f07a88cfc748f57e21d.js similarity index 90% rename from core/web/assets/main.026013f04da39527a75d.js rename to core/web/assets/main.6f07a88cfc748f57e21d.js index e3e27950a6f..bf6a280a999 100644 --- a/core/web/assets/main.026013f04da39527a75d.js +++ b/core/web/assets/main.6f07a88cfc748f57e21d.js @@ -171,4 +171,4 @@ object-assign */ Object.defineProperty(t,"__esModule",{value:!0}),"undefined"==typeof window||"function"!=typeof MessageChannel){var n,r,i,a,o,s=null,u=null,c=function(){if(null!==s)try{var e=t.unstable_now();s(!0,e),s=null}catch(n){throw setTimeout(c,0),n}},l=Date.now();t.unstable_now=function(){return Date.now()-l},n=function(e){null!==s?setTimeout(n,0,e):(s=e,setTimeout(c,0))},r=function(e,t){u=setTimeout(e,t)},i=function(){clearTimeout(u)},a=function(){return!1},o=t.unstable_forceFrameRate=function(){}}else{var f=window.performance,d=window.Date,h=window.setTimeout,p=window.clearTimeout;if("undefined"!=typeof console){var b=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof b&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof f&&"function"==typeof f.now)t.unstable_now=function(){return f.now()};else{var m=d.now();t.unstable_now=function(){return d.now()-m}}var g=!1,v=null,y=-1,w=5,_=0;a=function(){return t.unstable_now()>=_},o=function(){},t.unstable_forceFrameRate=function(e){0>e||125M(o,n))void 0!==u&&0>M(u,o)?(e[r]=u,e[s]=n,r=s):(e[r]=o,e[a]=n,r=a);else if(void 0!==u&&0>M(u,n))e[r]=u,e[s]=n,r=s;else break a}}return t}return null}function M(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var O=[],A=[],L=1,C=null,I=3,D=!1,N=!1,P=!1;function R(e){for(var t=x(A);null!==t;){if(null===t.callback)T(A);else if(t.startTime<=e)T(A),t.sortIndex=t.expirationTime,k(O,t);else break;t=x(A)}}function j(e){if(P=!1,R(e),!N){if(null!==x(O))N=!0,n(F);else{var t=x(A);null!==t&&r(j,t.startTime-e)}}}function F(e,n){N=!1,P&&(P=!1,i()),D=!0;var o=I;try{for(R(n),C=x(O);null!==C&&(!(C.expirationTime>n)||e&&!a());){var s=C.callback;if(null!==s){C.callback=null,I=C.priorityLevel;var u=s(C.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?C.callback=u:C===x(O)&&T(O),R(n)}else T(O);C=x(O)}if(null!==C)var c=!0;else{var l=x(A);null!==l&&r(j,l.startTime-n),c=!1}return c}finally{C=null,I=o,D=!1}}function Y(e){switch(e){case 1:return -1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var B=o;t.unstable_ImmediatePriority=1,t.unstable_UserBlockingPriority=2,t.unstable_NormalPriority=3,t.unstable_IdlePriority=5,t.unstable_LowPriority=4,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=I;I=e;try{return t()}finally{I=n}},t.unstable_next=function(e){switch(I){case 1:case 2:case 3:var t=3;break;default:t=I}var n=I;I=t;try{return e()}finally{I=n}},t.unstable_scheduleCallback=function(e,a,o){var s=t.unstable_now();if("object"==typeof o&&null!==o){var u=o.delay;u="number"==typeof u&&0s?(e.sortIndex=u,k(A,e),null===x(O)&&e===x(A)&&(P?i():P=!0,r(j,u-s))):(e.sortIndex=o,k(O,e),N||D||(N=!0,n(F))),e},t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_wrapCallback=function(e){var t=I;return function(){var n=I;I=t;try{return e.apply(this,arguments)}finally{I=n}}},t.unstable_getCurrentPriorityLevel=function(){return I},t.unstable_shouldYield=function(){var e=t.unstable_now();R(e);var n=x(O);return n!==C&&null!==C&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function c(e,t,n){var r=t.length-1;if(r=0?(i>0&&(e.lastNeed=i-1),i):--r=0?(i>0&&(e.lastNeed=i-2),i):--r=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}function l(e,t,n){if((192&t[0])!=128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((192&t[1])!=128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(192&t[2])!=128)return e.lastNeed=2,"�"}}function f(e){var t=this.lastTotal-this.lastNeed,n=l(this,e,t);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length)}function d(e,t){var n=c(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function p(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function b(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function m(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function g(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function v(e){return e.toString(this.encoding)}function y(e){return e&&e.length?this.write(e):""}t.s=s,s.prototype.write=function(e){var t,n;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n */ var r=n(48764),i=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(a(r,t),t.Buffer=o),o.prototype=Object.create(i.prototype),a(i,o),o.from=function(e,t,n){if("number"==typeof e)throw TypeError("Argument must not be a number");return i(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},o.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return r.SlowBuffer(e)}},93379(e,t,n){"use strict";var r,i,a=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},o=(i={},function(e){if(void 0===i[e]){var t=document.querySelector(e);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(n){t=null}i[e]=t}return i[e]}),s=[];function u(e){for(var t=-1,n=0;nOW});var r,i,a,o,s,u,c,l=n(67294),f=n.t(l,2),d=n(39814),h=n(5977),p=n(57209),b=n(32316),m=n(95880),g=n(17051),v=n(71381),y=n(81701),w=n(3022),_=n(60323),E=n(87591),S=n(25649),k=n(28902),x=n(71426),T=n(48884),M=n(94184),O=n.n(M),A=n(37703),L=n(73935),C=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n0},e.prototype.connect_=function(){I&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Y?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){I&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;F.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),U=function(e,t){for(var n=0,r=Object.keys(t);n0},e}(),er="undefined"!=typeof WeakMap?new WeakMap:new C,ei=function(){function e(t){if(!(this instanceof e))throw TypeError("Cannot call a class as a function.");if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");var n=B.getInstance(),r=new en(t,n,this);er.set(this,r)}return e}();["observe","unobserve","disconnect"].forEach(function(e){ei.prototype[e]=function(){var t;return(t=er.get(this))[e].apply(t,arguments)}});var ea=void 0!==D.ResizeObserver?D.ResizeObserver:ei;let eo=ea;var es=function(e){var t=[],n=null,r=function(){for(var r=arguments.length,i=Array(r),a=0;a=t||n<0||f&&r>=a}function g(){var e=eb();if(m(e))return v(e);s=setTimeout(g,b(e))}function v(e){return(s=void 0,d&&r)?h(e):(r=i=void 0,o)}function y(){void 0!==s&&clearTimeout(s),c=0,r=u=i=s=void 0}function w(){return void 0===s?o:v(eb())}function _(){var e=eb(),n=m(e);if(r=arguments,i=this,u=e,n){if(void 0===s)return p(u);if(f)return clearTimeout(s),s=setTimeout(g,t),h(u)}return void 0===s&&(s=setTimeout(g,t)),o}return t=ez(t)||0,ed(n)&&(l=!!n.leading,a=(f="maxWait"in n)?eW(ez(n.maxWait)||0,t):a,d="trailing"in n?!!n.trailing:d),_.cancel=y,_.flush=w,_}let eq=eV;var eZ="Expected a function";function eX(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw TypeError(eZ);return ed(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),eq(e,t,{leading:r,maxWait:t,trailing:i})}let eJ=eX;var eQ={debounce:eq,throttle:eJ},e1=function(e){return eQ[e]},e0=function(e){return"function"==typeof e},e2=function(){return"undefined"==typeof window},e3=function(e){return e instanceof Element||e instanceof HTMLDocument};function e4(e){return(e4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function e6(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function e5(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&l.createElement(tG.Z,{variant:"indeterminate",classes:r}))};tK.propTypes={fetchCount:el().number.isRequired};let tV=(0,b.withStyles)(tW)(tK);var tq=n(5536);let tZ=n.p+"ba8bbf16ebf8e1d05bef.svg";function tX(){return(tX=Object.assign||function(e){for(var t=1;t120){for(var d=Math.floor(u/80),h=u%80,p=[],b=0;b0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=s&&s.stack)?(Object.defineProperty(nf(b),"stack",{value:s.stack,writable:!0,configurable:!0}),nl(b)):(Error.captureStackTrace?Error.captureStackTrace(nf(b),n):Object.defineProperty(nf(b),"stack",{value:Error().stack,writable:!0,configurable:!0}),b)}return ns(n,[{key:"toString",value:function(){return nw(this)}},{key:t4.YF,get:function(){return"Object"}}]),n}(nd(Error));function ny(e){return void 0===e||0===e.length?void 0:e}function nw(e){var t=e.message;if(e.nodes)for(var n=0,r=e.nodes;n",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"}),nx=n(10143),nT=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"}),nM=n(87392),nO=function(){function e(e){var t=new nS.WU(nk.SOF,0,0,0,0,null);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}var t=e.prototype;return t.advance=function(){return this.lastToken=this.token,this.token=this.lookahead()},t.lookahead=function(){var e,t=this.token;if(t.kind!==nk.EOF)do t=null!==(e=t.next)&&void 0!==e?e:t.next=nC(this,t);while(t.kind===nk.COMMENT)return t},e}();function nA(e){return e===nk.BANG||e===nk.DOLLAR||e===nk.AMP||e===nk.PAREN_L||e===nk.PAREN_R||e===nk.SPREAD||e===nk.COLON||e===nk.EQUALS||e===nk.AT||e===nk.BRACKET_L||e===nk.BRACKET_R||e===nk.BRACE_L||e===nk.PIPE||e===nk.BRACE_R}function nL(e){return isNaN(e)?nk.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function nC(e,t){for(var n=e.source,r=n.body,i=r.length,a=t.end;a31||9===a))return new nS.WU(nk.COMMENT,t,s,n,r,i,o.slice(t+1,s))}function nN(e,t,n,r,i,a){var o=e.body,s=n,u=t,c=!1;if(45===s&&(s=o.charCodeAt(++u)),48===s){if((s=o.charCodeAt(++u))>=48&&s<=57)throw n_(e,u,"Invalid number, unexpected digit after 0: ".concat(nL(s),"."))}else u=nP(e,u,s),s=o.charCodeAt(u);if(46===s&&(c=!0,s=o.charCodeAt(++u),u=nP(e,u,s),s=o.charCodeAt(u)),(69===s||101===s)&&(c=!0,(43===(s=o.charCodeAt(++u))||45===s)&&(s=o.charCodeAt(++u)),u=nP(e,u,s),s=o.charCodeAt(u)),46===s||nU(s))throw n_(e,u,"Invalid number, expected digit but got: ".concat(nL(s),"."));return new nS.WU(c?nk.FLOAT:nk.INT,t,u,r,i,a,o.slice(t,u))}function nP(e,t,n){var r=e.body,i=t,a=n;if(a>=48&&a<=57){do a=r.charCodeAt(++i);while(a>=48&&a<=57)return i}throw n_(e,i,"Invalid number, expected digit but got: ".concat(nL(a),"."))}function nR(e,t,n,r,i){for(var a=e.body,o=t+1,s=o,u=0,c="";o=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function nB(e,t,n,r,i){for(var a=e.body,o=a.length,s=t+1,u=0;s!==o&&!isNaN(u=a.charCodeAt(s))&&(95===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122);)++s;return new nS.WU(nk.NAME,t,s,n,r,i,a.slice(t,s))}function nU(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}function nH(e,t){return new n$(e,t).parseDocument()}var n$=function(){function e(e,t){var n=(0,nx.T)(e)?e:new nx.H(e);this._lexer=new nO(n),this._options=t}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(nk.NAME);return{kind:nE.h.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:nE.h.DOCUMENT,definitions:this.many(nk.SOF,this.parseDefinition,nk.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(nk.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else if(this.peek(nk.BRACE_L))return this.parseOperationDefinition();else if(this.peekDescription())return this.parseTypeSystemDefinition();throw this.unexpected()},t.parseOperationDefinition=function(){var e,t=this._lexer.token;if(this.peek(nk.BRACE_L))return{kind:nE.h.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(t)};var n=this.parseOperationType();return this.peek(nk.NAME)&&(e=this.parseName()),{kind:nE.h.OPERATION_DEFINITION,operation:n,name:e,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseOperationType=function(){var e=this.expectToken(nk.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},t.parseVariableDefinitions=function(){return this.optionalMany(nk.PAREN_L,this.parseVariableDefinition,nk.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:nE.h.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(nk.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(nk.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},t.parseVariable=function(){var e=this._lexer.token;return this.expectToken(nk.DOLLAR),{kind:nE.h.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:nE.h.SELECTION_SET,selections:this.many(nk.BRACE_L,this.parseSelection,nk.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(nk.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,n=this._lexer.token,r=this.parseName();return this.expectOptionalToken(nk.COLON)?(e=r,t=this.parseName()):t=r,{kind:nE.h.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(nk.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(n)}},t.parseArguments=function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(nk.PAREN_L,t,nk.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(nk.COLON),{kind:nE.h.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:nE.h.ARGUMENT,name:this.parseName(),value:(this.expectToken(nk.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(nk.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(nk.NAME)?{kind:nE.h.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:nE.h.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseFragmentDefinition=function(){var e,t=this._lexer.token;return(this.expectKeyword("fragment"),(null===(e=this._options)||void 0===e?void 0:e.experimentalFragmentVariables)===!0)?{kind:nE.h.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:nE.h.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(e){var t=this._lexer.token;switch(t.kind){case nk.BRACKET_L:return this.parseList(e);case nk.BRACE_L:return this.parseObject(e);case nk.INT:return this._lexer.advance(),{kind:nE.h.INT,value:t.value,loc:this.loc(t)};case nk.FLOAT:return this._lexer.advance(),{kind:nE.h.FLOAT,value:t.value,loc:this.loc(t)};case nk.STRING:case nk.BLOCK_STRING:return this.parseStringLiteral();case nk.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:nE.h.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:nE.h.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:nE.h.NULL,loc:this.loc(t)};default:return{kind:nE.h.ENUM,value:t.value,loc:this.loc(t)}}case nk.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:nE.h.STRING,value:e.value,block:e.kind===nk.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,n=this._lexer.token,r=function(){return t.parseValueLiteral(e)};return{kind:nE.h.LIST,values:this.any(nk.BRACKET_L,r,nk.BRACKET_R),loc:this.loc(n)}},t.parseObject=function(e){var t=this,n=this._lexer.token,r=function(){return t.parseObjectField(e)};return{kind:nE.h.OBJECT,fields:this.any(nk.BRACE_L,r,nk.BRACE_R),loc:this.loc(n)}},t.parseObjectField=function(e){var t=this._lexer.token,n=this.parseName();return this.expectToken(nk.COLON),{kind:nE.h.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(nk.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(nk.AT),{kind:nE.h.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return(this.expectOptionalToken(nk.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(nk.BRACKET_R),e={kind:nE.h.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(nk.BANG))?{kind:nE.h.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:nE.h.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},t.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===nk.NAME)switch(e.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(e)},t.peekDescription=function(){return this.peek(nk.STRING)||this.peek(nk.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var n=this.parseDirectives(!0),r=this.many(nk.BRACE_L,this.parseOperationTypeDefinition,nk.BRACE_R);return{kind:nE.h.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(nk.COLON);var n=this.parseNamedType();return{kind:nE.h.OPERATION_TYPE_DEFINITION,operation:t,type:n,loc:this.loc(e)}},t.parseScalarTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var n=this.parseName(),r=this.parseDirectives(!0);return{kind:nE.h.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),a=this.parseFieldsDefinition();return{kind:nE.h.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:a,loc:this.loc(e)}},t.parseImplementsInterfaces=function(){var e;if(!this.expectOptionalKeyword("implements"))return[];if((null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLImplementsInterfaces)===!0){var t=[];this.expectOptionalToken(nk.AMP);do t.push(this.parseNamedType());while(this.expectOptionalToken(nk.AMP)||this.peek(nk.NAME))return t}return this.delimitedMany(nk.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var e;return(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)===!0&&this.peek(nk.BRACE_L)&&this._lexer.lookahead().kind===nk.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(nk.BRACE_L,this.parseFieldDefinition,nk.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(nk.COLON);var i=this.parseTypeReference(),a=this.parseDirectives(!0);return{kind:nE.h.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:a,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(nk.PAREN_L,this.parseInputValueDef,nk.PAREN_R)},t.parseInputValueDef=function(){var e,t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(nk.COLON);var i=this.parseTypeReference();this.expectOptionalToken(nk.EQUALS)&&(e=this.parseValueLiteral(!0));var a=this.parseDirectives(!0);return{kind:nE.h.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:e,directives:a,loc:this.loc(t)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),a=this.parseFieldsDefinition();return{kind:nE.h.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:a,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseUnionMemberTypes();return{kind:nE.h.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(nk.EQUALS)?this.delimitedMany(nk.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseEnumValuesDefinition();return{kind:nE.h.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(nk.BRACE_L,this.parseEnumValueDefinition,nk.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseDirectives(!0);return{kind:nE.h.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseInputFieldsDefinition();return{kind:nE.h.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(nk.BRACE_L,this.parseInputValueDef,nk.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===nk.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)},t.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),n=this.optionalMany(nk.BRACE_L,this.parseOperationTypeDefinition,nk.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return{kind:nE.h.SCHEMA_EXTENSION,directives:t,operationTypes:n,loc:this.loc(e)}},t.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),n=this.parseDirectives(!0);if(0===n.length)throw this.unexpected();return{kind:nE.h.SCALAR_TYPE_EXTENSION,name:t,directives:n,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:nE.h.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:nE.h.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:nE.h.UNION_TYPE_EXTENSION,name:t,directives:n,types:r,loc:this.loc(e)}},t.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:nE.h.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r,loc:this.loc(e)}},t.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:nE.h.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r,loc:this.loc(e)}},t.parseDirectiveDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(nk.AT);var n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var a=this.parseDirectiveLocations();return{kind:nE.h.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:a,loc:this.loc(e)}},t.parseDirectiveLocations=function(){return this.delimitedMany(nk.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==nT[t.value])return t;throw this.unexpected(e)},t.loc=function(e){var t;if((null===(t=this._options)||void 0===t?void 0:t.noLocation)!==!0)return new nS.Ye(e,this._lexer.lastToken,this._lexer.source)},t.peek=function(e){return this._lexer.token.kind===e},t.expectToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw n_(this._lexer.source,t.start,"Expected ".concat(nG(e),", found ").concat(nz(t),"."))},t.expectOptionalToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t},t.expectKeyword=function(e){var t=this._lexer.token;if(t.kind===nk.NAME&&t.value===e)this._lexer.advance();else throw n_(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(nz(t),"."))},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===nk.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=null!=e?e:this._lexer.token;return n_(this._lexer.source,t.start,"Unexpected ".concat(nz(t),"."))},t.any=function(e,t,n){this.expectToken(e);for(var r=[];!this.expectOptionalToken(n);)r.push(t.call(this));return r},t.optionalMany=function(e,t,n){if(this.expectOptionalToken(e)){var r=[];do r.push(t.call(this));while(!this.expectOptionalToken(n))return r}return[]},t.many=function(e,t,n){this.expectToken(e);var r=[];do r.push(t.call(this));while(!this.expectOptionalToken(n))return r},t.delimitedMany=function(e,t){this.expectOptionalToken(e);var n=[];do n.push(t.call(this));while(this.expectOptionalToken(e))return n},e}();function nz(e){var t=e.value;return nG(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function nG(e){return nA(e)?'"'.concat(e,'"'):e}var nW=new Map,nK=new Map,nV=!0,nq=!1;function nZ(e){return e.replace(/[\s,]+/g," ").trim()}function nX(e){return nZ(e.source.body.substring(e.start,e.end))}function nJ(e){var t=new Set,n=[];return e.definitions.forEach(function(e){if("FragmentDefinition"===e.kind){var r=e.name.value,i=nX(e.loc),a=nK.get(r);a&&!a.has(i)?nV&&console.warn("Warning: fragment with name "+r+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):a||nK.set(r,a=new Set),a.add(i),t.has(i)||(t.add(i),n.push(e))}else n.push(e)}),(0,t0.pi)((0,t0.pi)({},e),{definitions:n})}function nQ(e){var t=new Set(e.definitions);t.forEach(function(e){e.loc&&delete e.loc,Object.keys(e).forEach(function(n){var r=e[n];r&&"object"==typeof r&&t.add(r)})});var n=e.loc;return n&&(delete n.startToken,delete n.endToken),e}function n1(e){var t=nZ(e);if(!nW.has(t)){var n=nH(e,{experimentalFragmentVariables:nq,allowLegacyFragmentVariables:nq});if(!n||"Document"!==n.kind)throw Error("Not a valid GraphQL document.");nW.set(t,nQ(nJ(n)))}return nW.get(t)}function n0(e){for(var t=[],n=1;n, or pass an ApolloClient instance in via options.'):(0,n9.kG)(!!n,32),n}var rp=n(10542),rb=n(53712),rm=n(21436),rg=Object.prototype.hasOwnProperty;function rv(e,t){return void 0===t&&(t=Object.create(null)),ry(rh(t.client),e).useQuery(t)}function ry(e,t){var n=(0,l.useRef)();n.current&&e===n.current.client&&t===n.current.query||(n.current=new rw(e,t,n.current));var r=n.current,i=(0,l.useState)(0),a=(i[0],i[1]);return r.forceUpdate=function(){a(function(e){return e+1})},r}var rw=function(){function e(e,t,n){this.client=e,this.query=t,this.ssrDisabledResult=(0,rp.J)({loading:!0,data:void 0,error:void 0,networkStatus:ru.I.loading}),this.skipStandbyResult=(0,rp.J)({loading:!1,data:void 0,error:void 0,networkStatus:ru.I.ready}),this.toQueryResultCache=new(n7.mr?WeakMap:Map),rd(t,r.Query);var i=n&&n.result,a=i&&i.data;a&&(this.previousData=a)}return e.prototype.forceUpdate=function(){__DEV__&&n9.kG.warn("Calling default no-op implementation of InternalState#forceUpdate")},e.prototype.executeQuery=function(e){var t,n=this;e.query&&Object.assign(this,{query:e.query}),this.watchQueryOptions=this.createWatchQueryOptions(this.queryHookOptions=e);var r=this.observable.reobserveAsConcast(this.getObsQueryOptions());return this.previousData=(null===(t=this.result)||void 0===t?void 0:t.data)||this.previousData,this.result=void 0,this.forceUpdate(),new Promise(function(e){var t;r.subscribe({next:function(e){t=e},error:function(){e(n.toQueryResult(n.observable.getCurrentResult()))},complete:function(){e(n.toQueryResult(t))}})})},e.prototype.useQuery=function(e){var t=this;this.renderPromises=(0,l.useContext)((0,ro.K)()).renderPromises,this.useOptions(e);var n=this.useObservableQuery(),r=rt((0,l.useCallback)(function(){if(t.renderPromises)return function(){};var e=function(){var e=t.result,r=n.getCurrentResult();!(e&&e.loading===r.loading&&e.networkStatus===r.networkStatus&&(0,ri.D)(e.data,r.data))&&t.setResult(r)},r=function(a){var o=n.last;i.unsubscribe();try{n.resetLastResults(),i=n.subscribe(e,r)}finally{n.last=o}if(!rg.call(a,"graphQLErrors"))throw a;var s=t.result;(!s||s&&s.loading||!(0,ri.D)(a,s.error))&&t.setResult({data:s&&s.data,error:a,loading:!1,networkStatus:ru.I.error})},i=n.subscribe(e,r);return function(){return setTimeout(function(){return i.unsubscribe()})}},[n,this.renderPromises,this.client.disableNetworkFetches,]),function(){return t.getCurrentResult()},function(){return t.getCurrentResult()});return this.unsafeHandlePartialRefetch(r),this.toQueryResult(r)},e.prototype.useOptions=function(t){var n,r=this.createWatchQueryOptions(this.queryHookOptions=t),i=this.watchQueryOptions;!(0,ri.D)(r,i)&&(this.watchQueryOptions=r,i&&this.observable&&(this.observable.reobserve(this.getObsQueryOptions()),this.previousData=(null===(n=this.result)||void 0===n?void 0:n.data)||this.previousData,this.result=void 0)),this.onCompleted=t.onCompleted||e.prototype.onCompleted,this.onError=t.onError||e.prototype.onError,(this.renderPromises||this.client.disableNetworkFetches)&&!1===this.queryHookOptions.ssr&&!this.queryHookOptions.skip?this.result=this.ssrDisabledResult:this.queryHookOptions.skip||"standby"===this.watchQueryOptions.fetchPolicy?this.result=this.skipStandbyResult:(this.result===this.ssrDisabledResult||this.result===this.skipStandbyResult)&&(this.result=void 0)},e.prototype.getObsQueryOptions=function(){var e=[],t=this.client.defaultOptions.watchQuery;return t&&e.push(t),this.queryHookOptions.defaultOptions&&e.push(this.queryHookOptions.defaultOptions),e.push((0,rb.o)(this.observable&&this.observable.options,this.watchQueryOptions)),e.reduce(ra.J)},e.prototype.createWatchQueryOptions=function(e){void 0===e&&(e={});var t,n=e.skip,r=Object.assign((e.ssr,e.onCompleted,e.onError,e.defaultOptions,(0,t0._T)(e,["skip","ssr","onCompleted","onError","defaultOptions"])),{query:this.query});if(this.renderPromises&&("network-only"===r.fetchPolicy||"cache-and-network"===r.fetchPolicy)&&(r.fetchPolicy="cache-first"),r.variables||(r.variables={}),n){var i=r.fetchPolicy,a=void 0===i?this.getDefaultFetchPolicy():i,o=r.initialFetchPolicy;Object.assign(r,{initialFetchPolicy:void 0===o?a:o,fetchPolicy:"standby"})}else r.fetchPolicy||(r.fetchPolicy=(null===(t=this.observable)||void 0===t?void 0:t.options.initialFetchPolicy)||this.getDefaultFetchPolicy());return r},e.prototype.getDefaultFetchPolicy=function(){var e,t;return(null===(e=this.queryHookOptions.defaultOptions)||void 0===e?void 0:e.fetchPolicy)||(null===(t=this.client.defaultOptions.watchQuery)||void 0===t?void 0:t.fetchPolicy)||"cache-first"},e.prototype.onCompleted=function(e){},e.prototype.onError=function(e){},e.prototype.useObservableQuery=function(){var e=this.observable=this.renderPromises&&this.renderPromises.getSSRObservable(this.watchQueryOptions)||this.observable||this.client.watchQuery(this.getObsQueryOptions());this.obsQueryFields=(0,l.useMemo)(function(){return{refetch:e.refetch.bind(e),reobserve:e.reobserve.bind(e),fetchMore:e.fetchMore.bind(e),updateQuery:e.updateQuery.bind(e),startPolling:e.startPolling.bind(e),stopPolling:e.stopPolling.bind(e),subscribeToMore:e.subscribeToMore.bind(e)}},[e]);var t=!(!1===this.queryHookOptions.ssr||this.queryHookOptions.skip);return this.renderPromises&&t&&(this.renderPromises.registerSSRObservable(e),e.getCurrentResult().loading&&this.renderPromises.addObservableQueryPromise(e)),e},e.prototype.setResult=function(e){var t=this.result;t&&t.data&&(this.previousData=t.data),this.result=e,this.forceUpdate(),this.handleErrorOrCompleted(e)},e.prototype.handleErrorOrCompleted=function(e){var t=this;if(!e.loading){var n=this.toApolloError(e);Promise.resolve().then(function(){n?t.onError(n):e.data&&t.onCompleted(e.data)}).catch(function(e){__DEV__&&n9.kG.warn(e)})}},e.prototype.toApolloError=function(e){return(0,rm.O)(e.errors)?new rs.cA({graphQLErrors:e.errors}):e.error},e.prototype.getCurrentResult=function(){return this.result||this.handleErrorOrCompleted(this.result=this.observable.getCurrentResult()),this.result},e.prototype.toQueryResult=function(e){var t=this.toQueryResultCache.get(e);if(t)return t;var n=e.data,r=(e.partial,(0,t0._T)(e,["data","partial"]));return this.toQueryResultCache.set(e,t=(0,t0.pi)((0,t0.pi)((0,t0.pi)({data:n},r),this.obsQueryFields),{client:this.client,observable:this.observable,variables:this.observable.variables,called:!this.queryHookOptions.skip,previousData:this.previousData})),!t.error&&(0,rm.O)(e.errors)&&(t.error=new rs.cA({graphQLErrors:e.errors})),t},e.prototype.unsafeHandlePartialRefetch=function(e){e.partial&&this.queryHookOptions.partialRefetch&&!e.loading&&(!e.data||0===Object.keys(e.data).length)&&"cache-only"!==this.observable.options.fetchPolicy&&(Object.assign(e,{loading:!0,networkStatus:ru.I.refetch}),this.observable.refetch())},e}();function r_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&void 0!==arguments[0]?arguments[0]:{};return rv(iH,e)},iz=function(){var e=ij(),t=parseInt(e.get("page")||"1",10),n=parseInt(e.get("per")||"50",10),r=i$({variables:{offset:(t-1)*n,limit:n},fetchPolicy:"network-only"}),i=r.data,a=r.loading,o=r.error;return a?l.createElement(iR,null):o?l.createElement(iD,{error:o}):i?l.createElement(iI,{chains:i.chains.results,page:t,pageSize:n,total:i.chains.metadata.total}):null},iG=n(67932),iW=n(8126),iK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function iV(e){if(iq())return Intl.DateTimeFormat.supportedLocalesOf(e)[0]}function iq(){return("undefined"==typeof Intl?"undefined":iK(Intl))==="object"&&"function"==typeof Intl.DateTimeFormat}var iZ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},iX=function(){function e(e,t){for(var n=0;n=i.length)break;s=i[o++]}else{if((o=i.next()).done)break;s=o.value}var s,u=s;if((void 0===e?"undefined":iZ(e))!=="object")return;e=e[u]}return e}},{key:"put",value:function(){for(var e=arguments.length,t=Array(e),n=0;n=o.length)break;c=o[u++]}else{if((u=o.next()).done)break;c=u.value}var c,l=c;"object"!==iZ(a[l])&&(a[l]={}),a=a[l]}return a[i]=r}}]),e}();let i1=iQ;var i0=new i1;function i2(e,t){if(!iq())return function(e){return e.toString()};var n=i4(e),r=JSON.stringify(t),i=i0.get(String(n),r)||i0.put(String(n),r,new Intl.DateTimeFormat(n,t));return function(e){return i.format(e)}}var i3={};function i4(e){var t=e.toString();return i3[t]?i3[t]:i3[t]=iV(e)}var i6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function i5(e){return i8(e)?e:new Date(e)}function i8(e){return e instanceof Date||i9(e)}function i9(e){return(void 0===e?"undefined":i6(e))==="object"&&"function"==typeof e.getTime}var i7=n(54087),ae=n.n(i7);function at(e,t){if(0===e.length)return 0;for(var n=0,r=e.length-1,i=void 0;n<=r;){var a=t(e[i=Math.floor((r+n)/2)]);if(0===a)return i;if(a<0){if((n=i+1)>r)return n}else if((r=i-1)=t.nextUpdateTime)aa(t,this.instances);else break}},scheduleNextTick:function(){var e=this;this.scheduledTick=ae()(function(){e.tick(),e.scheduleNextTick()})},start:function(){this.scheduleNextTick()},stop:function(){ae().cancel(this.scheduledTick)}};function ai(e){var t=an(e.getNextValue(),2),n=t[0],r=t[1];e.setValue(n),e.nextUpdateTime=r}function aa(e,t){ai(e),as(t,e),ao(t,e)}function ao(e,t){var n=au(e,t);e.splice(n,0,t)}function as(e,t){var n=e.indexOf(t);e.splice(n,1)}function au(e,t){var n=t.nextUpdateTime;return at(e,function(e){return e.nextUpdateTime===n?0:e.nextUpdateTime>n?1:-1})}var ac=(0,ec.oneOfType)([(0,ec.shape)({minTime:ec.number,formatAs:ec.string.isRequired}),(0,ec.shape)({test:ec.func,formatAs:ec.string.isRequired}),(0,ec.shape)({minTime:ec.number,format:ec.func.isRequired}),(0,ec.shape)({test:ec.func,format:ec.func.isRequired})]),al=(0,ec.oneOfType)([ec.string,(0,ec.shape)({steps:(0,ec.arrayOf)(ac).isRequired,labels:(0,ec.oneOfType)([ec.string,(0,ec.arrayOf)(ec.string)]).isRequired,round:ec.string})]),af=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function ap(e){var t=e.date,n=e.future,r=e.timeStyle,i=e.round,a=e.minTimeLeft,o=e.tooltip,s=e.component,u=e.container,c=e.wrapperComponent,f=e.wrapperProps,d=e.locale,h=e.locales,p=e.formatVerboseDate,b=e.verboseDateFormat,m=e.updateInterval,g=e.tick,v=ah(e,["date","future","timeStyle","round","minTimeLeft","tooltip","component","container","wrapperComponent","wrapperProps","locale","locales","formatVerboseDate","verboseDateFormat","updateInterval","tick"]),y=(0,l.useMemo)(function(){return d&&(h=[d]),h.concat(iW.Z.getDefaultLocale())},[d,h]),w=(0,l.useMemo)(function(){return new iW.Z(y)},[y]);t=(0,l.useMemo)(function(){return i5(t)},[t]);var _=(0,l.useCallback)(function(){var e=Date.now(),o=void 0;if(n&&e>=t.getTime()&&(e=t.getTime(),o=!0),void 0!==a){var s=t.getTime()-1e3*a;e>s&&(e=s,o=!0)}var u=w.format(t,r,{getTimeToNextUpdate:!0,now:e,future:n,round:i}),c=ad(u,2),l=c[0],f=c[1];return f=o?ag:m||f||6e4,[l,e+f]},[t,n,r,m,i,a,w]),E=(0,l.useRef)();E.current=_;var S=(0,l.useMemo)(_,[]),k=ad(S,2),x=k[0],T=k[1],M=(0,l.useState)(x),O=ad(M,2),A=O[0],L=O[1],C=ad((0,l.useState)(),2),I=C[0],D=C[1],N=(0,l.useRef)();(0,l.useEffect)(function(){if(g)return N.current=ar.add({getNextValue:function(){return E.current()},setValue:L,nextUpdateTime:T}),function(){return N.current.stop()}},[g]),(0,l.useEffect)(function(){if(N.current)N.current.forceUpdate();else{var e=_(),t=ad(e,1)[0];L(t)}},[_]),(0,l.useEffect)(function(){D(!0)},[]);var P=(0,l.useMemo)(function(){if("undefined"!=typeof window)return i2(y,b)},[y,b]),R=(0,l.useMemo)(function(){if("undefined"!=typeof window)return p?p(t):P(t)},[t,p,P]),j=l.createElement(s,af({date:t,verboseDate:I?R:void 0,tooltip:o},v),A),F=c||u;return F?l.createElement(F,af({},f,{verboseDate:I?R:void 0}),j):j}ap.propTypes={date:el().oneOfType([el().instanceOf(Date),el().number]).isRequired,locale:el().string,locales:el().arrayOf(el().string),future:el().bool,timeStyle:al,round:el().string,minTimeLeft:el().number,component:el().elementType.isRequired,tooltip:el().bool.isRequired,formatVerboseDate:el().func,verboseDateFormat:el().object,updateInterval:el().oneOfType([el().number,el().arrayOf(el().shape({threshold:el().number,interval:el().number.isRequired}))]),tick:el().bool,wrapperComponent:el().func,wrapperProps:el().object},ap.defaultProps={locales:[],component:av,tooltip:!0,verboseDateFormat:{weekday:"long",day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},tick:!0},ap=l.memo(ap);let ab=ap;var am,ag=31536e9;function av(e){var t=e.date,n=e.verboseDate,r=e.tooltip,i=e.children,a=ah(e,["date","verboseDate","tooltip","children"]),o=(0,l.useMemo)(function(){return t.toISOString()},[t]);return l.createElement("time",af({},a,{dateTime:o,title:r?n:void 0}),i)}av.propTypes={date:el().instanceOf(Date).isRequired,verboseDate:el().string,tooltip:el().bool.isRequired,children:el().string.isRequired};var ay=n(30381),aw=n.n(ay),a_=n(31657);function aE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aS(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0?new rs.cA({graphQLErrors:i}):void 0;if(u===s.current.mutationId&&!c.ignoreResults){var f={called:!0,loading:!1,data:r,error:l,client:a};s.current.isMounted&&!(0,ri.D)(s.current.result,f)&&o(s.current.result=f)}var d=e.onCompleted||(null===(n=s.current.options)||void 0===n?void 0:n.onCompleted);return null==d||d(t.data,c),t}).catch(function(t){if(u===s.current.mutationId&&s.current.isMounted){var n,r={loading:!1,error:t,data:void 0,called:!0,client:a};(0,ri.D)(s.current.result,r)||o(s.current.result=r)}var i=e.onError||(null===(n=s.current.options)||void 0===n?void 0:n.onError);if(i)return i(t,c),{data:void 0,errors:t};throw t})},[]),c=(0,l.useCallback)(function(){s.current.isMounted&&o({called:!1,loading:!1,client:n})},[]);return(0,l.useEffect)(function(){return s.current.isMounted=!0,function(){s.current.isMounted=!1}},[]),[u,(0,t0.pi)({reset:c},a)]}var os=n(59067),ou=n(28428),oc=n(11186),ol=n(78513);function of(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var od=function(e){return(0,b.createStyles)({paper:{display:"flex",margin:"".concat(2.5*e.spacing.unit,"px 0"),padding:"".concat(3*e.spacing.unit,"px ").concat(3.5*e.spacing.unit,"px")},content:{flex:1,width:"100%"},actions:of({marginTop:-(1.5*e.spacing.unit),marginLeft:-(4*e.spacing.unit)},e.breakpoints.up("sm"),{marginLeft:0,marginRight:-(1.5*e.spacing.unit)}),itemBlock:{border:"1px solid rgba(224, 224, 224, 1)",borderRadius:e.shape.borderRadius,padding:2*e.spacing.unit,marginTop:e.spacing.unit},itemBlockText:{overflowWrap:"anywhere"}})},oh=(0,b.withStyles)(od)(function(e){var t=e.actions,n=e.children,r=e.classes;return l.createElement(ii.default,{className:r.paper},l.createElement("div",{className:r.content},n),t&&l.createElement("div",{className:r.actions},t))}),op=function(e){var t=e.title;return l.createElement(x.default,{variant:"subtitle2",gutterBottom:!0},t)},ob=function(e){var t=e.children,n=e.value;return l.createElement(x.default,{variant:"body1",noWrap:!0},t||n)},om=(0,b.withStyles)(od)(function(e){var t=e.children,n=e.classes,r=e.value;return l.createElement("div",{className:n.itemBlock},l.createElement(x.default,{variant:"body1",className:n.itemBlockText},t||r))});function og(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]-1}let sq=sV;function sZ(e,t){var n=this.__data__,r=sH(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}let sX=sZ;function sJ(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=cC}let cD=cI;var cN="[object Arguments]",cP="[object Array]",cR="[object Boolean]",cj="[object Date]",cF="[object Error]",cY="[object Function]",cB="[object Map]",cU="[object Number]",cH="[object Object]",c$="[object RegExp]",cz="[object Set]",cG="[object String]",cW="[object WeakMap]",cK="[object ArrayBuffer]",cV="[object DataView]",cq="[object Float64Array]",cZ="[object Int8Array]",cX="[object Int16Array]",cJ="[object Int32Array]",cQ="[object Uint8Array]",c1="[object Uint8ClampedArray]",c0="[object Uint16Array]",c2="[object Uint32Array]",c3={};function c4(e){return eD(e)&&cD(e.length)&&!!c3[eC(e)]}c3["[object Float32Array]"]=c3[cq]=c3[cZ]=c3[cX]=c3[cJ]=c3[cQ]=c3[c1]=c3[c0]=c3[c2]=!0,c3[cN]=c3[cP]=c3[cK]=c3[cR]=c3[cV]=c3[cj]=c3[cF]=c3[cY]=c3[cB]=c3[cU]=c3[cH]=c3[c$]=c3[cz]=c3[cG]=c3[cW]=!1;let c6=c4;function c5(e){return function(t){return e(t)}}let c8=c5;var c9=n(79730),c7=c9.Z&&c9.Z.isTypedArray,le=c7?c8(c7):c6;let lt=le;var ln=Object.prototype.hasOwnProperty;function lr(e,t){var n=cx(e),r=!n&&cS(e),i=!n&&!r&&(0,cT.Z)(e),a=!n&&!r&&!i&<(e),o=n||r||i||a,s=o?cb(e.length,String):[],u=s.length;for(var c in e)(t||ln.call(e,c))&&!(o&&("length"==c||i&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||cL(c,u)))&&s.push(c);return s}let li=lr;var la=Object.prototype;function lo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||la)}let ls=lo;var lu=sT(Object.keys,Object);let lc=lu;var ll=Object.prototype.hasOwnProperty;function lf(e){if(!ls(e))return lc(e);var t=[];for(var n in Object(e))ll.call(e,n)&&"constructor"!=n&&t.push(n);return t}let ld=lf;function lh(e){return null!=e&&cD(e.length)&&!ur(e)}let lp=lh;function lb(e){return lp(e)?li(e):ld(e)}let lm=lb;function lg(e,t){return e&&ch(t,lm(t),e)}let lv=lg;function ly(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}let lw=ly;var l_=Object.prototype.hasOwnProperty;function lE(e){if(!ed(e))return lw(e);var t=ls(e),n=[];for(var r in e)"constructor"==r&&(t||!l_.call(e,r))||n.push(r);return n}let lS=lE;function lk(e){return lp(e)?li(e,!0):lS(e)}let lx=lk;function lT(e,t){return e&&ch(t,lx(t),e)}let lM=lT;var lO=n(42896);function lA(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n=0||(i[n]=e[n]);return i}function hu(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var hc=function(e){return Array.isArray(e)&&0===e.length},hl=function(e){return"function"==typeof e},hf=function(e){return null!==e&&"object"==typeof e},hd=function(e){return String(Math.floor(Number(e)))===e},hh=function(e){return"[object String]"===Object.prototype.toString.call(e)},hp=function(e){return 0===l.Children.count(e)},hb=function(e){return hf(e)&&hl(e.then)};function hm(e,t,n,r){void 0===r&&(r=0);for(var i=d8(t);e&&r=0?[]:{}}}return(0===a?e:i)[o[a]]===n?e:(void 0===n?delete i[o[a]]:i[o[a]]=n,0===a&&void 0===n&&delete r[o[a]],r)}function hv(e,t,n,r){void 0===n&&(n=new WeakMap),void 0===r&&(r={});for(var i=0,a=Object.keys(e);i0?t.map(function(t){return x(t,hm(e,t))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")]).then(function(e){return e.reduce(function(e,n,r){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===n||n&&(e=hg(e,t[r],n)),e},{})})},[x]),M=(0,l.useCallback)(function(e){return Promise.all([T(e),h.validationSchema?k(e):{},h.validate?S(e):{}]).then(function(e){var t=e[0],n=e[1],r=e[2];return sk.all([t,n,r],{arrayMerge:hL})})},[h.validate,h.validationSchema,T,S,k]),O=hN(function(e){return void 0===e&&(e=_.values),E({type:"SET_ISVALIDATING",payload:!0}),M(e).then(function(e){return v.current&&(E({type:"SET_ISVALIDATING",payload:!1}),sd()(_.errors,e)||E({type:"SET_ERRORS",payload:e})),e})});(0,l.useEffect)(function(){o&&!0===v.current&&sd()(p.current,h.initialValues)&&O(p.current)},[o,O]);var A=(0,l.useCallback)(function(e){var t=e&&e.values?e.values:p.current,n=e&&e.errors?e.errors:b.current?b.current:h.initialErrors||{},r=e&&e.touched?e.touched:m.current?m.current:h.initialTouched||{},i=e&&e.status?e.status:g.current?g.current:h.initialStatus;p.current=t,b.current=n,m.current=r,g.current=i;var a=function(){E({type:"RESET_FORM",payload:{isSubmitting:!!e&&!!e.isSubmitting,errors:n,touched:r,status:i,values:t,isValidating:!!e&&!!e.isValidating,submitCount:e&&e.submitCount&&"number"==typeof e.submitCount?e.submitCount:0}})};if(h.onReset){var o=h.onReset(_.values,V);hb(o)?o.then(a):a()}else a()},[h.initialErrors,h.initialStatus,h.initialTouched]);(0,l.useEffect)(function(){!0===v.current&&!sd()(p.current,h.initialValues)&&(c&&(p.current=h.initialValues,A()),o&&O(p.current))},[c,h.initialValues,A,o,O]),(0,l.useEffect)(function(){c&&!0===v.current&&!sd()(b.current,h.initialErrors)&&(b.current=h.initialErrors||hS,E({type:"SET_ERRORS",payload:h.initialErrors||hS}))},[c,h.initialErrors]),(0,l.useEffect)(function(){c&&!0===v.current&&!sd()(m.current,h.initialTouched)&&(m.current=h.initialTouched||hk,E({type:"SET_TOUCHED",payload:h.initialTouched||hk}))},[c,h.initialTouched]),(0,l.useEffect)(function(){c&&!0===v.current&&!sd()(g.current,h.initialStatus)&&(g.current=h.initialStatus,E({type:"SET_STATUS",payload:h.initialStatus}))},[c,h.initialStatus,h.initialTouched]);var L=hN(function(e){if(y.current[e]&&hl(y.current[e].validate)){var t=hm(_.values,e),n=y.current[e].validate(t);return hb(n)?(E({type:"SET_ISVALIDATING",payload:!0}),n.then(function(e){return e}).then(function(t){E({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),E({type:"SET_ISVALIDATING",payload:!1})})):(E({type:"SET_FIELD_ERROR",payload:{field:e,value:n}}),Promise.resolve(n))}return h.validationSchema?(E({type:"SET_ISVALIDATING",payload:!0}),k(_.values,e).then(function(e){return e}).then(function(t){E({type:"SET_FIELD_ERROR",payload:{field:e,value:t[e]}}),E({type:"SET_ISVALIDATING",payload:!1})})):Promise.resolve()}),C=(0,l.useCallback)(function(e,t){var n=t.validate;y.current[e]={validate:n}},[]),I=(0,l.useCallback)(function(e){delete y.current[e]},[]),D=hN(function(e,t){return E({type:"SET_TOUCHED",payload:e}),(void 0===t?i:t)?O(_.values):Promise.resolve()}),N=(0,l.useCallback)(function(e){E({type:"SET_ERRORS",payload:e})},[]),P=hN(function(e,t){var r=hl(e)?e(_.values):e;return E({type:"SET_VALUES",payload:r}),(void 0===t?n:t)?O(r):Promise.resolve()}),R=(0,l.useCallback)(function(e,t){E({type:"SET_FIELD_ERROR",payload:{field:e,value:t}})},[]),j=hN(function(e,t,r){return E({type:"SET_FIELD_VALUE",payload:{field:e,value:t}}),(void 0===r?n:r)?O(hg(_.values,e,t)):Promise.resolve()}),F=(0,l.useCallback)(function(e,t){var n,r=t,i=e;if(!hh(e)){e.persist&&e.persist();var a=e.target?e.target:e.currentTarget,o=a.type,s=a.name,u=a.id,c=a.value,l=a.checked,f=(a.outerHTML,a.options),d=a.multiple;r=t||s||u,i=/number|range/.test(o)?(n=parseFloat(c),isNaN(n)?"":n):/checkbox/.test(o)?hI(hm(_.values,r),l,c):d?hC(f):c}r&&j(r,i)},[j,_.values]),Y=hN(function(e){if(hh(e))return function(t){return F(t,e)};F(e)}),B=hN(function(e,t,n){return void 0===t&&(t=!0),E({type:"SET_FIELD_TOUCHED",payload:{field:e,value:t}}),(void 0===n?i:n)?O(_.values):Promise.resolve()}),U=(0,l.useCallback)(function(e,t){e.persist&&e.persist();var n,r=e.target,i=r.name,a=r.id;r.outerHTML,B(t||i||a,!0)},[B]),H=hN(function(e){if(hh(e))return function(t){return U(t,e)};U(e)}),$=(0,l.useCallback)(function(e){hl(e)?E({type:"SET_FORMIK_STATE",payload:e}):E({type:"SET_FORMIK_STATE",payload:function(){return e}})},[]),z=(0,l.useCallback)(function(e){E({type:"SET_STATUS",payload:e})},[]),G=(0,l.useCallback)(function(e){E({type:"SET_ISSUBMITTING",payload:e})},[]),W=hN(function(){return E({type:"SUBMIT_ATTEMPT"}),O().then(function(e){var t,n=e instanceof Error;if(!n&&0===Object.keys(e).length){try{if(void 0===(t=q()))return}catch(r){throw r}return Promise.resolve(t).then(function(e){return v.current&&E({type:"SUBMIT_SUCCESS"}),e}).catch(function(e){if(v.current)throw E({type:"SUBMIT_FAILURE"}),e})}if(v.current&&(E({type:"SUBMIT_FAILURE"}),n))throw e})}),K=hN(function(e){e&&e.preventDefault&&hl(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&hl(e.stopPropagation)&&e.stopPropagation(),W().catch(function(e){console.warn("Warning: An unhandled error was caught from submitForm()",e)})}),V={resetForm:A,validateForm:O,validateField:L,setErrors:N,setFieldError:R,setFieldTouched:B,setFieldValue:j,setStatus:z,setSubmitting:G,setTouched:D,setValues:P,setFormikState:$,submitForm:W},q=hN(function(){return f(_.values,V)}),Z=hN(function(e){e&&e.preventDefault&&hl(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&hl(e.stopPropagation)&&e.stopPropagation(),A()}),X=(0,l.useCallback)(function(e){return{value:hm(_.values,e),error:hm(_.errors,e),touched:!!hm(_.touched,e),initialValue:hm(p.current,e),initialTouched:!!hm(m.current,e),initialError:hm(b.current,e)}},[_.errors,_.touched,_.values]),J=(0,l.useCallback)(function(e){return{setValue:function(t,n){return j(e,t,n)},setTouched:function(t,n){return B(e,t,n)},setError:function(t){return R(e,t)}}},[j,B,R]),Q=(0,l.useCallback)(function(e){var t=hf(e),n=t?e.name:e,r=hm(_.values,n),i={name:n,value:r,onChange:Y,onBlur:H};if(t){var a=e.type,o=e.value,s=e.as,u=e.multiple;"checkbox"===a?void 0===o?i.checked=!!r:(i.checked=!!(Array.isArray(r)&&~r.indexOf(o)),i.value=o):"radio"===a?(i.checked=r===o,i.value=o):"select"===s&&u&&(i.value=i.value||[],i.multiple=!0)}return i},[H,Y,_.values]),ee=(0,l.useMemo)(function(){return!sd()(p.current,_.values)},[p.current,_.values]),et=(0,l.useMemo)(function(){return void 0!==s?ee?_.errors&&0===Object.keys(_.errors).length:!1!==s&&hl(s)?s(h):s:_.errors&&0===Object.keys(_.errors).length},[s,ee,_.errors,h]);return ha({},_,{initialValues:p.current,initialErrors:b.current,initialTouched:m.current,initialStatus:g.current,handleBlur:H,handleChange:Y,handleReset:Z,handleSubmit:K,resetForm:A,setErrors:N,setFormikState:$,setFieldTouched:B,setFieldValue:j,setFieldError:R,setStatus:z,setSubmitting:G,setTouched:D,setValues:P,submitForm:W,validateForm:O,validateField:L,isValid:et,dirty:ee,unregisterField:I,registerField:C,getFieldProps:Q,getFieldMeta:X,getFieldHelpers:J,validateOnBlur:i,validateOnChange:n,validateOnMount:o})}function hT(e){var t=hx(e),n=e.component,r=e.children,i=e.render,a=e.innerRef;return(0,l.useImperativeHandle)(a,function(){return t}),(0,l.createElement)(hw,{value:t},n?(0,l.createElement)(n,t):i?i(t):r?hl(r)?r(t):hp(r)?null:l.Children.only(r):null)}function hM(e){var t={};if(e.inner){if(0===e.inner.length)return hg(t,e.path,e.message);for(var n=e.inner,r=Array.isArray(n),i=0,n=r?n:n[Symbol.iterator]();;){if(r){if(i>=n.length)break;a=n[i++]}else{if((i=n.next()).done)break;a=i.value}var a,o=a;hm(t,o.path)||(t=hg(t,o.path,o.message))}}return t}function hO(e,t,n,r){void 0===n&&(n=!1),void 0===r&&(r={});var i=hA(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:r})}function hA(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);!0===Array.isArray(e[r])?t[r]=e[r].map(function(e){return!0===Array.isArray(e)||sR(e)?hA(e):""!==e?e:void 0}):sR(e[r])?t[r]=hA(e[r]):t[r]=""!==e[r]?e[r]:void 0}return t}function hL(e,t,n){var r=e.slice();return t.forEach(function(t,i){if(void 0===r[i]){var a=!1!==n.clone&&n.isMergeableObject(t);r[i]=a?sk(Array.isArray(t)?[]:{},t,n):t}else n.isMergeableObject(t)?r[i]=sk(e[i],t,n):-1===e.indexOf(t)&&r.push(t)}),r}function hC(e){return Array.from(e).filter(function(e){return e.selected}).map(function(e){return e.value})}function hI(e,t,n){if("boolean"==typeof e)return Boolean(t);var r=[],i=!1,a=-1;if(Array.isArray(e))r=e,i=(a=e.indexOf(n))>=0;else if(!n||"true"==n||"false"==n)return Boolean(t);return t&&n&&!i?r.concat(n):i?r.slice(0,a).concat(r.slice(a+1)):r}var hD="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?l.useLayoutEffect:l.useEffect;function hN(e){var t=(0,l.useRef)(e);return hD(function(){t.current=e}),(0,l.useCallback)(function(){for(var e=arguments.length,n=Array(e),r=0;re?t:e},0);return Array.from(ha({},e,{length:t+1}))};(function(e){function t(t){var n;return(n=e.call(this,t)||this).updateArrayField=function(e,t,r){var i=n.props,a=i.name;(0,i.formik.setFormikState)(function(n){var i="function"==typeof r?r:e,o="function"==typeof t?t:e,s=hg(n.values,a,e(hm(n.values,a))),u=r?i(hm(n.errors,a)):void 0,c=t?o(hm(n.touched,a)):void 0;return hc(u)&&(u=void 0),hc(c)&&(c=void 0),ha({},n,{values:s,errors:r?hg(n.errors,a,u):n.errors,touched:t?hg(n.touched,a,c):n.touched})})},n.push=function(e){return n.updateArrayField(function(t){return[].concat(hU(t),[hi(e)])},!1,!1)},n.handlePush=function(e){return function(){return n.push(e)}},n.swap=function(e,t){return n.updateArrayField(function(n){return hF(n,e,t)},!0,!0)},n.handleSwap=function(e,t){return function(){return n.swap(e,t)}},n.move=function(e,t){return n.updateArrayField(function(n){return hj(n,e,t)},!0,!0)},n.handleMove=function(e,t){return function(){return n.move(e,t)}},n.insert=function(e,t){return n.updateArrayField(function(n){return hY(n,e,t)},function(t){return hY(t,e,null)},function(t){return hY(t,e,null)})},n.handleInsert=function(e,t){return function(){return n.insert(e,t)}},n.replace=function(e,t){return n.updateArrayField(function(n){return hB(n,e,t)},!1,!1)},n.handleReplace=function(e,t){return function(){return n.replace(e,t)}},n.unshift=function(e){var t=-1;return n.updateArrayField(function(n){var r=n?[e].concat(n):[e];return t<0&&(t=r.length),r},function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n},function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n}),t},n.handleUnshift=function(e){return function(){return n.unshift(e)}},n.handleRemove=function(e){return function(){return n.remove(e)}},n.handlePop=function(){return function(){return n.pop()}},n.remove=n.remove.bind(hu(n)),n.pop=n.pop.bind(hu(n)),n}ho(t,e);var n=t.prototype;return n.componentDidUpdate=function(e){this.props.validateOnChange&&this.props.formik.validateOnChange&&!sd()(hm(e.formik.values,e.name),hm(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},n.remove=function(e){var t;return this.updateArrayField(function(n){var r=n?hU(n):[];return t||(t=r[e]),hl(r.splice)&&r.splice(e,1),r},!0,!0),t},n.pop=function(){var e;return this.updateArrayField(function(t){var n=t;return e||(e=n&&n.pop&&n.pop()),n},!0,!0),e},n.render=function(){var e={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},t=this.props,n=t.component,r=t.render,i=t.children,a=t.name,o=hs(t.formik,["validate","validationSchema"]),s=ha({},e,{form:o,name:a});return n?(0,l.createElement)(n,s):r?r(s):i?"function"==typeof i?i(s):hp(i)?null:l.Children.only(i):null},t})(l.Component).defaultProps={validateOnChange:!0},l.Component,l.Component;var hH=n(24802),h$=n(71209),hz=n(91750),hG=n(11970),hW=n(4689),hK=n(67598),hV=function(){return(hV=Object.assign||function(e){for(var t,n=1,r=arguments.length;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&(n[r[i]]=e[r[i]]);return n}function hZ(e){var t=e.disabled,n=e.field,r=n.onBlur,i=hq(n,["onBlur"]),a=e.form,o=a.isSubmitting,s=a.touched,u=a.errors,c=e.onBlur,l=e.helperText,f=hq(e,["disabled","field","form","onBlur","helperText"]),d=hm(u,i.name),h=hm(s,i.name)&&!!d;return hV(hV({variant:f.variant,error:h,helperText:h?d:l,disabled:null!=t?t:o,onBlur:null!=c?c:function(e){r(null!=e?e:i.name)}},i),f)}function hX(e){var t=e.children,n=hq(e,["children"]);return(0,l.createElement)(iw.Z,hV({},hZ(n)),t)}function hJ(e){var t=e.disabled,n=e.field,r=n.onBlur,i=hq(n,["onBlur"]),a=e.form.isSubmitting,o=(e.type,e.onBlur),s=hq(e,["disabled","field","form","type","onBlur"]);return hV(hV({disabled:null!=t?t:a,onBlur:null!=o?o:function(e){r(null!=e?e:i.name)}},i),s)}function hQ(e){return(0,l.createElement)(hH.Z,hV({},hJ(e)))}function h1(e){var t,n=e.disabled,r=e.field,i=r.onBlur,a=hq(r,["onBlur"]),o=e.form.isSubmitting,s=(e.type,e.onBlur),u=hq(e,["disabled","field","form","type","onBlur"]);return hV(hV({disabled:null!=n?n:o,indeterminate:!Array.isArray(a.value)&&null==a.value,onBlur:null!=s?s:function(e){i(null!=e?e:a.name)}},a),u)}function h0(e){return(0,l.createElement)(h$.Z,hV({},h1(e)))}function h2(e){var t=e.Label,n=hq(e,["Label"]);return(0,l.createElement)(hz.Z,hV({control:(0,l.createElement)(h$.Z,hV({},h1(n)))},t))}function h3(e){var t=e.disabled,n=e.field,r=n.onBlur,i=hq(n,["onBlur"]),a=e.form.isSubmitting,o=e.onBlur,s=hq(e,["disabled","field","form","onBlur"]);return hV(hV({disabled:null!=t?t:a,onBlur:null!=o?o:function(e){r(null!=e?e:i.name)}},i),s)}function h4(e){return(0,l.createElement)(hG.default,hV({},h3(e)))}function h6(e){var t=e.field,n=t.onBlur,r=hq(t,["onBlur"]),i=(e.form,e.onBlur),a=hq(e,["field","form","onBlur"]);return hV(hV({onBlur:null!=i?i:function(e){n(null!=e?e:r.name)}},r),a)}function h5(e){return(0,l.createElement)(hW.Z,hV({},h6(e)))}function h8(e){var t=e.disabled,n=e.field,r=n.onBlur,i=hq(n,["onBlur"]),a=e.form.isSubmitting,o=e.onBlur,s=hq(e,["disabled","field","form","onBlur"]);return hV(hV({disabled:null!=t?t:a,onBlur:null!=o?o:function(e){r(null!=e?e:i.name)}},i),s)}function h9(e){return(0,l.createElement)(hK.default,hV({},h8(e)))}hX.displayName="FormikMaterialUITextField",hQ.displayName="FormikMaterialUISwitch",h0.displayName="FormikMaterialUICheckbox",h2.displayName="FormikMaterialUICheckboxWithLabel",h4.displayName="FormikMaterialUISelect",h5.displayName="FormikMaterialUIRadioGroup",h9.displayName="FormikMaterialUIInputBase";try{a=Map}catch(h7){}try{o=Set}catch(pe){}function pt(e,t,n){if(!e||"object"!=typeof e||"function"==typeof e)return e;if(e.nodeType&&"cloneNode"in e)return e.cloneNode(!0);if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return RegExp(e);if(Array.isArray(e))return e.map(pn);if(a&&e instanceof a)return new Map(Array.from(e.entries()));if(o&&e instanceof o)return new Set(Array.from(e.values()));if(e instanceof Object){t.push(e);var r=Object.create(e);for(var i in n.push(r),e){var s=t.findIndex(function(t){return t===e[i]});r[i]=s>-1?n[s]:pt(e[i],t,n)}return r}return e}function pn(e){return pt(e,[],[])}let pr=Object.prototype.toString,pi=Error.prototype.toString,pa=RegExp.prototype.toString,po="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",ps=/^Symbol\((.*)\)(.*)$/;function pu(e){if(e!=+e)return"NaN";let t=0===e&&1/e<0;return t?"-0":""+e}function pc(e,t=!1){if(null==e||!0===e||!1===e)return""+e;let n=typeof e;if("number"===n)return pu(e);if("string"===n)return t?`"${e}"`:e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return po.call(e).replace(ps,"Symbol($1)");let r=pr.call(e).slice(8,-1);return"Date"===r?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===r||e instanceof Error?"["+pi.call(e)+"]":"RegExp"===r?pa.call(e):null}function pl(e,t){let n=pc(e,t);return null!==n?n:JSON.stringify(e,function(e,n){let r=pc(this[e],t);return null!==r?r:n},2)}let pf={default:"${path} is invalid",required:"${path} is a required field",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType({path:e,type:t,value:n,originalValue:r}){let i=null!=r&&r!==n,a=`${e} must be a \`${t}\` type, but the final value was: \`${pl(n,!0)}\``+(i?` (cast from the value \`${pl(r,!0)}\`).`:".");return null===n&&(a+='\n If "null" is intended as an empty value be sure to mark the schema as `.nullable()`'),a},defined:"${path} must be defined"},pd={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},ph={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},pp={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},pb={isValue:"${path} field must be ${value}"},pm={noUnknown:"${path} field has unspecified keys: ${unknown}"},pg={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must be have ${length} items"};Object.assign(Object.create(null),{mixed:pf,string:pd,number:ph,date:pp,object:pm,array:pg,boolean:pb});var pv=n(18721),py=n.n(pv);let pw=e=>e&&e.__isYupSchema__;class p_{constructor(e,t){if(this.refs=e,this.refs=e,"function"==typeof t){this.fn=t;return}if(!py()(t,"is"))throw TypeError("`is:` is required for `when()` conditions");if(!t.then&&!t.otherwise)throw TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:r,otherwise:i}=t,a="function"==typeof n?n:(...e)=>e.every(e=>e===n);this.fn=function(...e){let t=e.pop(),n=e.pop(),o=a(...e)?r:i;if(o)return"function"==typeof o?o(n):n.concat(o.resolve(t))}}resolve(e,t){let n=this.refs.map(e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context)),r=this.fn.apply(e,n.concat(e,t));if(void 0===r||r===e)return e;if(!pw(r))throw TypeError("conditions must return a schema object");return r.resolve(t)}}let pE=p_;function pS(e){return null==e?[]:[].concat(e)}function pk(){return(pk=Object.assign||function(e){for(var t=1;tpl(t[n])):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,n,r){super(),this.name="ValidationError",this.value=t,this.path=n,this.type=r,this.errors=[],this.inner=[],pS(e).forEach(e=>{pT.isError(e)?(this.errors.push(...e.errors),this.inner=this.inner.concat(e.inner.length?e.inner:e)):this.errors.push(e)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,pT)}}let pM=e=>{let t=!1;return(...n)=>{t||(t=!0,e(...n))}};function pO(e,t){let{endEarly:n,tests:r,args:i,value:a,errors:o,sort:s,path:u}=e,c=pM(t),l=r.length,f=[];if(o=o||[],!l)return o.length?c(new pT(o,a,u)):c(null,a);for(let d=0;d=0||(i[n]=e[n]);return i}function pR(e){function t(t,n){let{value:r,path:i="",label:a,options:o,originalValue:s,sync:u}=t,c=pP(t,["value","path","label","options","originalValue","sync"]),{name:l,test:f,params:d,message:h}=e,{parent:p,context:b}=o;function m(e){return pD.isRef(e)?e.getValue(r,p,b):e}function g(e={}){let t=pL()(pN({value:r,originalValue:s,label:a,path:e.path||i},d,e.params),m),n=new pT(pT.formatError(e.message||h,t),r,t.path,e.type||l);return n.params=t,n}let v=pN({path:i,parent:p,type:l,createError:g,resolve:m,options:o,originalValue:s},c);if(!u){try{Promise.resolve(f.call(v,r,v)).then(e=>{pT.isError(e)?n(e):e?n(null,e):n(g())})}catch(y){n(y)}return}let w;try{var _;if(w=f.call(v,r,v),"function"==typeof(null==(_=w)?void 0:_.then))throw Error(`Validation test of type: "${v.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`)}catch(E){n(E);return}pT.isError(w)?n(w):w?n(null,w):n(g())}return t.OPTIONS=e,t}pD.prototype.__isYupRef=!0;let pj=e=>e.substr(0,e.length-1).substr(1);function pF(e,t,n,r=n){let i,a,o;return t?((0,pC.forEach)(t,(s,u,c)=>{let l=u?pj(s):s;if((e=e.resolve({context:r,parent:i,value:n})).innerType){let f=c?parseInt(l,10):0;if(n&&f>=n.length)throw Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${t}. because there is no value at that index. `);i=n,n=n&&n[f],e=e.innerType}if(!c){if(!e.fields||!e.fields[l])throw Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e._type}")`);i=n,n=n&&n[l],e=e.fields[l]}a=l,o=u?"["+s+"]":"."+s}),{schema:e,parent:i,parentPath:a}):{parent:i,parentPath:t,schema:e}}class pY{constructor(){this.list=new Set,this.refs=new Map}get size(){return this.list.size+this.refs.size}describe(){let e=[];for(let t of this.list)e.push(t);for(let[,n]of this.refs)e.push(n.describe());return e}toArray(){return Array.from(this.list).concat(Array.from(this.refs.values()))}add(e){pD.isRef(e)?this.refs.set(e.key,e):this.list.add(e)}delete(e){pD.isRef(e)?this.refs.delete(e.key):this.list.delete(e)}has(e,t){if(this.list.has(e))return!0;let n,r=this.refs.values();for(;!(n=r.next()).done;)if(t(n.value)===e)return!0;return!1}clone(){let e=new pY;return e.list=new Set(this.list),e.refs=new Map(this.refs),e}merge(e,t){let n=this.clone();return e.list.forEach(e=>n.add(e)),e.refs.forEach(e=>n.add(e)),t.list.forEach(e=>n.delete(e)),t.refs.forEach(e=>n.delete(e)),n}}function pB(){return(pB=Object.assign||function(e){for(var t=1;t{this.typeError(pf.notType)}),this.type=(null==e?void 0:e.type)||"mixed",this.spec=pB({strip:!1,strict:!1,abortEarly:!0,recursive:!0,nullable:!1,presence:"optional"},null==e?void 0:e.spec)}get _type(){return this.type}_typeCheck(e){return!0}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;let t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeError=this._typeError,t._whitelistError=this._whitelistError,t._blacklistError=this._blacklistError,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.exclusiveTests=pB({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=pn(pB({},this.spec,e)),t}label(e){var t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=t,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,n=e.clone(),r=pB({},t.spec,n.spec);return n.spec=r,n._typeError||(n._typeError=t._typeError),n._whitelistError||(n._whitelistError=t._whitelistError),n._blacklistError||(n._blacklistError=t._blacklistError),n._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),n.tests=t.tests,n.exclusiveTests=t.exclusiveTests,n.withMutation(t=>{e.tests.forEach(e=>{t.test(e.OPTIONS)})}),n}isType(e){return!!this.spec.nullable&&null===e||this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let n=t.conditions;(t=t.clone()).conditions=[],t=(t=n.reduce((t,n)=>n.resolve(t,e),t)).resolve(e)}return t}cast(e,t={}){let n=this.resolve(pB({value:e},t)),r=n._cast(e,t);if(void 0!==e&&!1!==t.assert&&!0!==n.isType(r)){let i=pl(e),a=pl(r);throw TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${n._type}". attempted value: ${i} -`+(a!==i?`result of cast: ${a}`:""))}return r}_cast(e,t){let n=void 0===e?e:this.transforms.reduce((t,n)=>n.call(this,t,e,this),e);return void 0===n&&(n=this.getDefault()),n}_validate(e,t={},n){let{sync:r,path:i,from:a=[],originalValue:o=e,strict:s=this.spec.strict,abortEarly:u=this.spec.abortEarly}=t,c=e;s||(c=this._cast(c,pB({assert:!1},t)));let l={value:c,path:i,options:t,originalValue:o,schema:this,label:this.spec.label,sync:r,from:a},f=[];this._typeError&&f.push(this._typeError),this._whitelistError&&f.push(this._whitelistError),this._blacklistError&&f.push(this._blacklistError),pO({args:l,value:c,path:i,sync:r,tests:f,endEarly:u},e=>{if(e)return void n(e,c);pO({tests:this.tests,args:l,path:i,sync:r,value:c,endEarly:u},n)})}validate(e,t,n){let r=this.resolve(pB({},t,{value:e}));return"function"==typeof n?r._validate(e,t,n):new Promise((n,i)=>r._validate(e,t,(e,t)=>{e?i(e):n(t)}))}validateSync(e,t){let n;return this.resolve(pB({},t,{value:e}))._validate(e,pB({},t,{sync:!0}),(e,t)=>{if(e)throw e;n=t}),n}isValid(e,t){return this.validate(e,t).then(()=>!0,e=>{if(pT.isError(e))return!1;throw e})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(n){if(pT.isError(n))return!1;throw n}}_getDefault(){let e=this.spec.default;return null==e?e:"function"==typeof e?e.call(this):pn(e)}getDefault(e){return this.resolve(e||{})._getDefault()}default(e){return 0===arguments.length?this._getDefault():this.clone({default:e})}strict(e=!0){var t=this.clone();return t.spec.strict=e,t}_isPresent(e){return null!=e}defined(e=pf.defined){return this.test({message:e,name:"defined",exclusive:!0,test:e=>void 0!==e})}required(e=pf.required){return this.clone({presence:"required"}).withMutation(t=>t.test({message:e,name:"required",exclusive:!0,test(e){return this.schema._isPresent(e)}}))}notRequired(){var e=this.clone({presence:"optional"});return e.tests=e.tests.filter(e=>"required"!==e.OPTIONS.name),e}nullable(e=!0){return this.clone({nullable:!1!==e})}transform(e){var t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(void 0===(t=1===e.length?"function"==typeof e[0]?{test:e[0]}:e[0]:2===e.length?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]}).message&&(t.message=pf.default),"function"!=typeof t.test)throw TypeError("`test` is a required parameters");let n=this.clone(),r=pR(t),i=t.exclusive||t.name&&!0===n.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(n.exclusiveTests[t.name]=!!t.exclusive),n.tests=n.tests.filter(e=>e.OPTIONS.name!==t.name||!i&&e.OPTIONS.test!==r.OPTIONS.test),n.tests.push(r),n}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let n=this.clone(),r=pS(e).map(e=>new pD(e));return r.forEach(e=>{e.isSibling&&n.deps.push(e.key)}),n.conditions.push(new pE(r,t)),n}typeError(e){var t=this.clone();return t._typeError=pR({message:e,name:"typeError",test(e){return!!(void 0===e||this.schema.isType(e))||this.createError({params:{type:this.schema._type}})}}),t}oneOf(e,t=pf.oneOf){var n=this.clone();return e.forEach(e=>{n._whitelist.add(e),n._blacklist.delete(e)}),n._whitelistError=pR({message:t,name:"oneOf",test(e){if(void 0===e)return!0;let t=this.schema._whitelist;return!!t.has(e,this.resolve)||this.createError({params:{values:t.toArray().join(", ")}})}}),n}notOneOf(e,t=pf.notOneOf){var n=this.clone();return e.forEach(e=>{n._blacklist.add(e),n._whitelist.delete(e)}),n._blacklistError=pR({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist;return!t.has(e,this.resolve)||this.createError({params:{values:t.toArray().join(", ")}})}}),n}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(){let e=this.clone(),{label:t,meta:n}=e.spec,r={meta:n,label:t,type:e.type,oneOf:e._whitelist.describe(),notOneOf:e._blacklist.describe(),tests:e.tests.map(e=>({name:e.OPTIONS.name,params:e.OPTIONS.params})).filter((e,t,n)=>n.findIndex(t=>t.name===e.name)===t)};return r}}for(let pH of(pU.prototype.__isYupSchema__=!0,["validate","validateSync"]))pU.prototype[`${pH}At`]=function(e,t,n={}){let{parent:r,parentPath:i,schema:a}=pF(this,e,t,n.context);return a[pH](r&&r[i],pB({},n,{parent:r,path:e}))};for(let p$ of["equals","is"])pU.prototype[p$]=pU.prototype.oneOf;for(let pz of["not","nope"])pU.prototype[pz]=pU.prototype.notOneOf;pU.prototype.optional=pU.prototype.notRequired;let pG=pU;function pW(){return new pG}pW.prototype=pG.prototype;let pK=e=>null==e;function pV(){return new pq}class pq extends pU{constructor(){super({type:"boolean"}),this.withMutation(()=>{this.transform(function(e){if(!this.isType(e)){if(/^(true|1)$/i.test(String(e)))return!0;if(/^(false|0)$/i.test(String(e)))return!1}return e})})}_typeCheck(e){return e instanceof Boolean&&(e=e.valueOf()),"boolean"==typeof e}isTrue(e=pb.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test:e=>pK(e)||!0===e})}isFalse(e=pb.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test:e=>pK(e)||!1===e})}}pV.prototype=pq.prototype;let pZ=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,pX=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,pJ=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,pQ=e=>pK(e)||e===e.trim(),p1=({}).toString();function p0(){return new p2}class p2 extends pU{constructor(){super({type:"string"}),this.withMutation(()=>{this.transform(function(e){if(this.isType(e)||Array.isArray(e))return e;let t=null!=e&&e.toString?e.toString():e;return t===p1?e:t})})}_typeCheck(e){return e instanceof String&&(e=e.valueOf()),"string"==typeof e}_isPresent(e){return super._isPresent(e)&&!!e.length}length(e,t=pd.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},test(t){return pK(t)||t.length===this.resolve(e)}})}min(e,t=pd.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return pK(t)||t.length>=this.resolve(e)}})}max(e,t=pd.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},test(t){return pK(t)||t.length<=this.resolve(e)}})}matches(e,t){let n=!1,r,i;return t&&("object"==typeof t?{excludeEmptyString:n=!1,message:r,name:i}=t:r=t),this.test({name:i||"matches",message:r||pd.matches,params:{regex:e},test:t=>pK(t)||""===t&&n||-1!==t.search(e)})}email(e=pd.email){return this.matches(pZ,{name:"email",message:e,excludeEmptyString:!0})}url(e=pd.url){return this.matches(pX,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=pd.uuid){return this.matches(pJ,{name:"uuid",message:e,excludeEmptyString:!1})}ensure(){return this.default("").transform(e=>null===e?"":e)}trim(e=pd.trim){return this.transform(e=>null!=e?e.trim():e).test({message:e,name:"trim",test:pQ})}lowercase(e=pd.lowercase){return this.transform(e=>pK(e)?e:e.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,test:e=>pK(e)||e===e.toLowerCase()})}uppercase(e=pd.uppercase){return this.transform(e=>pK(e)?e:e.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,test:e=>pK(e)||e===e.toUpperCase()})}}p0.prototype=p2.prototype;let p3=e=>e!=+e;function p4(){return new p6}class p6 extends pU{constructor(){super({type:"number"}),this.withMutation(()=>{this.transform(function(e){let t=e;if("string"==typeof t){if(""===(t=t.replace(/\s/g,"")))return NaN;t=+t}return this.isType(t)?t:parseFloat(t)})})}_typeCheck(e){return e instanceof Number&&(e=e.valueOf()),"number"==typeof e&&!p3(e)}min(e,t=ph.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return pK(t)||t>=this.resolve(e)}})}max(e,t=ph.max){return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(t){return pK(t)||t<=this.resolve(e)}})}lessThan(e,t=ph.lessThan){return this.test({message:t,name:"max",exclusive:!0,params:{less:e},test(t){return pK(t)||tthis.resolve(e)}})}positive(e=ph.positive){return this.moreThan(0,e)}negative(e=ph.negative){return this.lessThan(0,e)}integer(e=ph.integer){return this.test({name:"integer",message:e,test:e=>pK(e)||Number.isInteger(e)})}truncate(){return this.transform(e=>pK(e)?e:0|e)}round(e){var t,n=["ceil","floor","round","trunc"];if("trunc"===(e=(null==(t=e)?void 0:t.toLowerCase())||"round"))return this.truncate();if(-1===n.indexOf(e.toLowerCase()))throw TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(t=>pK(t)?t:Math[e](t))}}p4.prototype=p6.prototype;var p5=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;function p8(e){var t,n,r=[1,4,5,6,7,10,11],i=0;if(n=p5.exec(e)){for(var a,o=0;a=r[o];++o)n[a]=+n[a]||0;n[2]=(+n[2]||1)-1,n[3]=+n[3]||1,n[7]=n[7]?String(n[7]).substr(0,3):0,(void 0===n[8]||""===n[8])&&(void 0===n[9]||""===n[9])?t=+new Date(n[1],n[2],n[3],n[4],n[5],n[6],n[7]):("Z"!==n[8]&&void 0!==n[9]&&(i=60*n[10]+n[11],"+"===n[9]&&(i=0-i)),t=Date.UTC(n[1],n[2],n[3],n[4],n[5]+i,n[6],n[7]))}else t=Date.parse?Date.parse(e):NaN;return t}let p9=new Date(""),p7=e=>"[object Date]"===Object.prototype.toString.call(e);function be(){return new bt}class bt extends pU{constructor(){super({type:"date"}),this.withMutation(()=>{this.transform(function(e){return this.isType(e)?e:(e=p8(e),isNaN(e)?p9:new Date(e))})})}_typeCheck(e){return p7(e)&&!isNaN(e.getTime())}prepareParam(e,t){let n;if(pD.isRef(e))n=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);n=r}return n}min(e,t=pp.min){let n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(e){return pK(e)||e>=this.resolve(n)}})}max(e,t=pp.max){var n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(e){return pK(e)||e<=this.resolve(n)}})}}bt.INVALID_DATE=p9,be.prototype=bt.prototype,be.INVALID_DATE=p9;var bn=n(11865),br=n.n(bn),bi=n(68929),ba=n.n(bi),bo=n(67523),bs=n.n(bo),bu=n(94633),bc=n.n(bu);function bl(e,t=[]){let n=[],r=[];function i(e,i){var a=(0,pC.split)(e)[0];~r.indexOf(a)||r.push(a),~t.indexOf(`${i}-${a}`)||n.push([i,a])}for(let a in e)if(py()(e,a)){let o=e[a];~r.indexOf(a)||r.push(a),pD.isRef(o)&&o.isSibling?i(o.path,a):pw(o)&&"deps"in o&&o.deps.forEach(e=>i(e,a))}return bc().array(r,n).reverse()}function bf(e,t){let n=1/0;return e.some((e,r)=>{var i;if((null==(i=t.path)?void 0:i.indexOf(e))!==-1)return n=r,!0}),n}function bd(e){return(t,n)=>bf(e,t)-bf(e,n)}function bh(){return(bh=Object.assign||function(e){for(var t=1;t"[object Object]"===Object.prototype.toString.call(e);function bb(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(e=>-1===n.indexOf(e))}let bm=bd([]);class bg extends pU{constructor(e){super({type:"object"}),this.fields=Object.create(null),this._sortErrors=bm,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{this.transform(function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e=null}return this.isType(e)?e:null}),e&&this.shape(e)})}_typeCheck(e){return bp(e)||"function"==typeof e}_cast(e,t={}){var n;let r=super._cast(e,t);if(void 0===r)return this.getDefault();if(!this._typeCheck(r))return r;let i=this.fields,a=null!=(n=t.stripUnknown)?n:this.spec.noUnknown,o=this._nodes.concat(Object.keys(r).filter(e=>-1===this._nodes.indexOf(e))),s={},u=bh({},t,{parent:s,__validating:t.__validating||!1}),c=!1;for(let l of o){let f=i[l],d=py()(r,l);if(f){let h,p=r[l];u.path=(t.path?`${t.path}.`:"")+l;let b="spec"in(f=f.resolve({value:p,context:t.context,parent:s}))?f.spec:void 0,m=null==b?void 0:b.strict;if(null==b?void 0:b.strip){c=c||l in r;continue}void 0!==(h=t.__validating&&m?r[l]:f.cast(r[l],u))&&(s[l]=h)}else d&&!a&&(s[l]=r[l]);s[l]!==r[l]&&(c=!0)}return c?s:r}_validate(e,t={},n){let r=[],{sync:i,from:a=[],originalValue:o=e,abortEarly:s=this.spec.abortEarly,recursive:u=this.spec.recursive}=t;a=[{schema:this,value:o},...a],t.__validating=!0,t.originalValue=o,t.from=a,super._validate(e,t,(e,c)=>{if(e){if(!pT.isError(e)||s)return void n(e,c);r.push(e)}if(!u||!bp(c)){n(r[0]||null,c);return}o=o||c;let l=this._nodes.map(e=>(n,r)=>{let i=-1===e.indexOf(".")?(t.path?`${t.path}.`:"")+e:`${t.path||""}["${e}"]`,s=this.fields[e];if(s&&"validate"in s){s.validate(c[e],bh({},t,{path:i,from:a,strict:!0,parent:c,originalValue:o[e]}),r);return}r(null)});pO({sync:i,tests:l,value:c,errors:r,endEarly:s,sort:this._sortErrors,path:t.path},n)})}clone(e){let t=super.clone(e);return t.fields=bh({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),n=t.fields;for(let[r,i]of Object.entries(this.fields)){let a=n[r];void 0===a?n[r]=i:a instanceof pU&&i instanceof pU&&(n[r]=i.concat(a))}return t.withMutation(()=>t.shape(n))}getDefaultFromShape(){let e={};return this._nodes.forEach(t=>{let n=this.fields[t];e[t]="default"in n?n.getDefault():void 0}),e}_getDefault(){return"default"in this.spec?super._getDefault():this._nodes.length?this.getDefaultFromShape():void 0}shape(e,t=[]){let n=this.clone(),r=Object.assign(n.fields,e);if(n.fields=r,n._sortErrors=bd(Object.keys(r)),t.length){Array.isArray(t[0])||(t=[t]);let i=t.map(([e,t])=>`${e}-${t}`);n._excludedEdges=n._excludedEdges.concat(i)}return n._nodes=bl(r,n._excludedEdges),n}pick(e){let t={};for(let n of e)this.fields[n]&&(t[n]=this.fields[n]);return this.clone().withMutation(e=>(e.fields={},e.shape(t)))}omit(e){let t=this.clone(),n=t.fields;for(let r of(t.fields={},e))delete n[r];return t.withMutation(()=>t.shape(n))}from(e,t,n){let r=(0,pC.getter)(e,!0);return this.transform(i=>{if(null==i)return i;let a=i;return py()(i,e)&&(a=bh({},i),n||delete a[e],a[t]=r(i)),a})}noUnknown(e=!0,t=pm.noUnknown){"string"==typeof e&&(t=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;let n=bb(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,t=pm.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>t&&bs()(t,(t,n)=>e(n)))}camelCase(){return this.transformKeys(ba())}snakeCase(){return this.transformKeys(br())}constantCase(){return this.transformKeys(e=>br()(e).toUpperCase())}describe(){let e=super.describe();return e.fields=pL()(this.fields,e=>e.describe()),e}}function bv(e){return new bg(e)}function by(){return(by=Object.assign||function(e){for(var t=1;t{this.transform(function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e=null}return this.isType(e)?e:null})})}_typeCheck(e){return Array.isArray(e)}get _subType(){return this.innerType}_cast(e,t){let n=super._cast(e,t);if(!this._typeCheck(n)||!this.innerType)return n;let r=!1,i=n.map((e,n)=>{let i=this.innerType.cast(e,by({},t,{path:`${t.path||""}[${n}]`}));return i!==e&&(r=!0),i});return r?i:n}_validate(e,t={},n){var r,i;let a=[],o=t.sync,s=t.path,u=this.innerType,c=null!=(r=t.abortEarly)?r:this.spec.abortEarly,l=null!=(i=t.recursive)?i:this.spec.recursive,f=null!=t.originalValue?t.originalValue:e;super._validate(e,t,(e,r)=>{if(e){if(!pT.isError(e)||c)return void n(e,r);a.push(e)}if(!l||!u||!this._typeCheck(r)){n(a[0]||null,r);return}f=f||r;let i=Array(r.length);for(let d=0;du.validate(h,b,t)}pO({sync:o,path:s,value:r,errors:a,endEarly:c,tests:i},n)})}clone(e){let t=super.clone(e);return t.innerType=this.innerType,t}concat(e){let t=super.concat(e);return t.innerType=this.innerType,e.innerType&&(t.innerType=t.innerType?t.innerType.concat(e.innerType):e.innerType),t}of(e){let t=this.clone();if(!pw(e))throw TypeError("`array.of()` sub-schema must be a valid yup schema not: "+pl(e));return t.innerType=e,t}length(e,t=pg.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},test(t){return pK(t)||t.length===this.resolve(e)}})}min(e,t){return t=t||pg.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return pK(t)||t.length>=this.resolve(e)}})}max(e,t){return t=t||pg.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(t){return pK(t)||t.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,t)=>this._typeCheck(e)?e:null==t?[]:[].concat(t))}compact(e){let t=e?(t,n,r)=>!e(t,n,r):e=>!!e;return this.transform(e=>null!=e?e.filter(t):e)}describe(){let e=super.describe();return this.innerType&&(e.innerType=this.innerType.describe()),e}nullable(e=!0){return super.nullable(e)}defined(){return super.defined()}required(e){return super.required(e)}}bw.prototype=b_.prototype;var bE=bv().shape({name:p0().required("Required"),url:p0().required("Required")}),bS=function(e){var t=e.initialValues,n=e.onSubmit,r=e.submitButtonText,i=e.nameDisabled,a=void 0!==i&&i;return l.createElement(hT,{initialValues:t,validationSchema:bE,onSubmit:n},function(e){var t=e.isSubmitting;return l.createElement(l.Fragment,null,l.createElement(hR,{"data-testid":"bridge-form",noValidate:!0},l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:12,md:7},l.createElement(hP,{component:hX,id:"name",name:"name",label:"Name",disabled:a,required:!0,fullWidth:!0,FormHelperTextProps:{"data-testid":"name-helper-text"}})),l.createElement(d.Z,{item:!0,xs:12,md:7},l.createElement(hP,{component:hX,id:"url",name:"url",label:"Bridge URL",placeholder:"https://",required:!0,fullWidth:!0,FormHelperTextProps:{"data-testid":"url-helper-text"}})),l.createElement(d.Z,{item:!0,xs:12,md:7},l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:7},l.createElement(hP,{component:hX,id:"minimumContractPayment",name:"minimumContractPayment",label:"Minimum Contract Payment",placeholder:"0",fullWidth:!0,inputProps:{min:0},FormHelperTextProps:{"data-testid":"minimumContractPayment-helper-text"}})),l.createElement(d.Z,{item:!0,xs:7},l.createElement(hP,{component:hX,id:"confirmations",name:"confirmations",label:"Confirmations",placeholder:"0",type:"number",fullWidth:!0,inputProps:{min:0},FormHelperTextProps:{"data-testid":"confirmations-helper-text"}})))),l.createElement(d.Z,{item:!0,xs:12,md:7},l.createElement(ok.default,{variant:"contained",color:"primary",type:"submit",disabled:t,size:"large"},r)))))})},bk=function(e){var t=e.bridge,n=e.onSubmit,r={name:t.name,url:t.url,minimumContractPayment:t.minimumContractPayment,confirmations:t.confirmations};return l.createElement(ig,null,l.createElement(d.Z,{container:!0,spacing:40},l.createElement(d.Z,{item:!0,xs:12,md:11,lg:9},l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Edit Bridge",action:l.createElement(aA.Z,{component:tz,href:"/bridges/".concat(t.id)},"Cancel")}),l.createElement(aW.Z,null,l.createElement(bS,{nameDisabled:!0,initialValues:r,onSubmit:n,submitButtonText:"Save Bridge"}))))))};function bx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&void 0!==arguments[0]&&arguments[0],t=e?function(){return l.createElement(x.default,{variant:"body1"},"Loading...")}:function(){return null};return{isLoading:e,LoadingPlaceholder:t}},mc=n(76023);function ml(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function mB(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=4?[e[0],e[1],e[2],e[3],"".concat(e[0],".").concat(e[1]),"".concat(e[0],".").concat(e[2]),"".concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[0]),"".concat(e[1],".").concat(e[2]),"".concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[1]),"".concat(e[2],".").concat(e[3]),"".concat(e[3],".").concat(e[0]),"".concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[0]),"".concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[1],".").concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[2],".").concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[3],".").concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[2],".").concat(e[1],".").concat(e[0])]:void 0}var mZ={};function mX(e){if(0===e.length||1===e.length)return e;var t=e.join(".");return mZ[t]||(mZ[t]=mq(e)),mZ[t]}function mJ(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return mX(e.filter(function(e){return"token"!==e})).reduce(function(e,t){return mK({},e,n[t])},t)}function mQ(e){return e.join(" ")}function m1(e,t){var n=0;return function(r){return n+=1,r.map(function(r,i){return m0({node:r,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(i)})})}}function m0(e){var t=e.node,n=e.stylesheet,r=e.style,i=void 0===r?{}:r,a=e.useInlineStyles,o=e.key,s=t.properties,u=t.type,c=t.tagName,f=t.value;if("text"===u)return f;if(c){var d,h=m1(n,a);if(a){var p=Object.keys(n).reduce(function(e,t){return t.split(".").forEach(function(t){e.includes(t)||e.push(t)}),e},[]),b=s.className&&s.className.includes("token")?["token"]:[],m=s.className&&b.concat(s.className.filter(function(e){return!p.includes(e)}));d=mK({},s,{className:mQ(m)||void 0,style:mJ(s.className,Object.assign({},s.style,i),n)})}else d=mK({},s,{className:mQ(s.className)});var g=h(t.children);return l.createElement(c,(0,mV.Z)({key:o},d),g)}}let m2=function(e,t){return -1!==e.listLanguages().indexOf(t)};var m3=/\n/g;function m4(e){return e.match(m3)}function m6(e){var t=e.lines,n=e.startingLineNumber,r=e.style;return t.map(function(e,t){var i=t+n;return l.createElement("span",{key:"line-".concat(t),className:"react-syntax-highlighter-line-number",style:"function"==typeof r?r(i):r},"".concat(i,"\n"))})}function m5(e){var t=e.codeString,n=e.codeStyle,r=e.containerStyle,i=void 0===r?{float:"left",paddingRight:"10px"}:r,a=e.numberStyle,o=void 0===a?{}:a,s=e.startingLineNumber;return l.createElement("code",{style:Object.assign({},n,i)},m6({lines:t.replace(/\n$/,"").split("\n"),style:o,startingLineNumber:s}))}function m8(e){return"".concat(e.toString().length,".25em")}function m9(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function m7(e,t,n){var r,i={display:"inline-block",minWidth:m8(n),paddingRight:"1em",textAlign:"right",userSelect:"none"};return mK({},i,"function"==typeof e?e(t):e)}function ge(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,i=e.largestLineNumber,a=e.showInlineLineNumbers,o=e.lineProps,s=void 0===o?{}:o,u=e.className,c=void 0===u?[]:u,l=e.showLineNumbers,f=e.wrapLongLines,d="function"==typeof s?s(n):s;if(d.className=c,n&&a){var h=m7(r,n,i);t.unshift(m9(n,h))}return f&l&&(d.style=mK({},d.style,{display:"flex"})),{type:"element",tagName:"span",properties:d,children:t}}function gt(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=0;r2&&void 0!==arguments[2]?arguments[2]:[];return ge({children:e,lineNumber:t,lineNumberStyle:s,largestLineNumber:o,showInlineLineNumbers:i,lineProps:n,className:a,showLineNumbers:r,wrapLongLines:u})}function b(e,t){if(r&&t&&i){var n=m7(s,t,o);e.unshift(m9(t,n))}return e}function m(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return t||r.length>0?p(e,n,r):b(e,n)}for(var g=function(){var e=l[h],t=e.children[0].value;if(m4(t)){var n=t.split("\n");n.forEach(function(t,i){var o=r&&f.length+a,s={type:"text",value:"".concat(t,"\n")};if(0===i){var u=l.slice(d+1,h).concat(ge({children:[s],className:e.properties.className})),c=m(u,o);f.push(c)}else if(i===n.length-1){if(l[h+1]&&l[h+1].children&&l[h+1].children[0]){var p={type:"text",value:"".concat(t)},b=ge({children:[p],className:e.properties.className});l.splice(h+1,0,b)}else{var g=[s],v=m(g,o,e.properties.className);f.push(v)}}else{var y=[s],w=m(y,o,e.properties.className);f.push(w)}}),d=h}h++};h code[class*="language-"]':{background:"#f5f2f0",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"slategray"},prolog:{color:"slategray"},doctype:{color:"slategray"},cdata:{color:"slategray"},punctuation:{color:"#999"},namespace:{Opacity:".7"},property:{color:"#905"},tag:{color:"#905"},boolean:{color:"#905"},number:{color:"#905"},constant:{color:"#905"},symbol:{color:"#905"},deleted:{color:"#905"},selector:{color:"#690"},"attr-name":{color:"#690"},string:{color:"#690"},char:{color:"#690"},builtin:{color:"#690"},inserted:{color:"#690"},operator:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},entity:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)",cursor:"help"},url:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".language-css .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".style .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},atrule:{color:"#07a"},"attr-value":{color:"#07a"},keyword:{color:"#07a"},function:{color:"#DD4A68"},"class-name":{color:"#DD4A68"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"bold"},variable:{color:"#e90"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}};var gu=n(98695),gc=n.n(gu);let gl=["abap","abnf","actionscript","ada","agda","al","antlr4","apacheconf","apl","applescript","aql","arduino","arff","asciidoc","asm6502","aspnet","autohotkey","autoit","bash","basic","batch","bbcode","birb","bison","bnf","brainfuck","brightscript","bro","bsl","c","cil","clike","clojure","cmake","coffeescript","concurnas","cpp","crystal","csharp","csp","css-extras","css","cypher","d","dart","dax","dhall","diff","django","dns-zone-file","docker","ebnf","editorconfig","eiffel","ejs","elixir","elm","erb","erlang","etlua","excel-formula","factor","firestore-security-rules","flow","fortran","fsharp","ftl","gcode","gdscript","gedcom","gherkin","git","glsl","gml","go","graphql","groovy","haml","handlebars","haskell","haxe","hcl","hlsl","hpkp","hsts","http","ichigojam","icon","iecst","ignore","inform7","ini","io","j","java","javadoc","javadoclike","javascript","javastacktrace","jolie","jq","js-extras","js-templates","jsdoc","json","json5","jsonp","jsstacktrace","jsx","julia","keyman","kotlin","latex","latte","less","lilypond","liquid","lisp","livescript","llvm","lolcode","lua","makefile","markdown","markup-templating","markup","matlab","mel","mizar","mongodb","monkey","moonscript","n1ql","n4js","nand2tetris-hdl","naniscript","nasm","neon","nginx","nim","nix","nsis","objectivec","ocaml","opencl","oz","parigp","parser","pascal","pascaligo","pcaxis","peoplecode","perl","php-extras","php","phpdoc","plsql","powerquery","powershell","processing","prolog","properties","protobuf","pug","puppet","pure","purebasic","purescript","python","q","qml","qore","r","racket","reason","regex","renpy","rest","rip","roboconf","robotframework","ruby","rust","sas","sass","scala","scheme","scss","shell-session","smali","smalltalk","smarty","sml","solidity","solution-file","soy","sparql","splunk-spl","sqf","sql","stan","stylus","swift","t4-cs","t4-templating","t4-vb","tap","tcl","textile","toml","tsx","tt2","turtle","twig","typescript","typoscript","unrealscript","vala","vbnet","velocity","verilog","vhdl","vim","visual-basic","warpscript","wasm","wiki","xeora","xml-doc","xojo","xquery","yaml","yang","zig"];var gf=go(gc(),gs);gf.supportedLanguages=gl;let gd=gf;var gh=n(64566);function gp(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function gb(){var e=gp(["\n query FetchConfigV2 {\n configv2 {\n user\n effective\n }\n }\n"]);return gb=function(){return e},e}var gm=n0(gb()),gg=function(e){var t=e.children;return l.createElement(ir.Z,null,l.createElement(r7.default,{component:"th",scope:"row",colSpan:3},t))},gv=function(){return l.createElement(gg,null,"...")},gy=function(e){var t=e.children;return l.createElement(gg,null,t)},gw=function(e){var t=e.loading,n=e.toml,r=e.error,i=void 0===r?"":r,a=e.title,o=e.expanded;if(i)return l.createElement(gy,null,i);if(t)return l.createElement(gv,null);a||(a="TOML");var s={display:"block"};return l.createElement(x.default,null,l.createElement(mP.Z,{defaultExpanded:o},l.createElement(mR.Z,{expandIcon:l.createElement(gh.Z,null)},a),l.createElement(mj.Z,{style:s},l.createElement(gd,{language:"toml",style:gs},n))))},g_=function(){var e=rv(gm,{fetchPolicy:"cache-and-network"}),t=e.data,n=e.loading,r=e.error;return(null==t?void 0:t.configv2.effective)=="N/A"?l.createElement(l.Fragment,null,l.createElement(d.Z,{item:!0,xs:12},l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"TOML Configuration"}),l.createElement(gw,{title:"V2 config dump:",error:null==r?void 0:r.message,loading:n,toml:null==t?void 0:t.configv2.user,showHead:!0})))):l.createElement(l.Fragment,null,l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12},l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"TOML Configuration"}),l.createElement(gw,{title:"User specified:",error:null==r?void 0:r.message,loading:n,toml:null==t?void 0:t.configv2.user,showHead:!0,expanded:!0}),l.createElement(gw,{title:"Effective (with defaults):",error:null==r?void 0:r.message,loading:n,toml:null==t?void 0:t.configv2.effective,showHead:!0})))))},gE=n(34823),gS=function(e){return(0,b.createStyles)({cell:{paddingTop:1.5*e.spacing.unit,paddingBottom:1.5*e.spacing.unit}})},gk=(0,b.withStyles)(gS)(function(e){var t=e.classes,n=(0,A.I0)();(0,l.useEffect)(function(){n((0,ty.DQ)())});var r=(0,A.v9)(gE.N,A.wU);return l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Node"}),l.createElement(r8.Z,null,l.createElement(r9.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,{className:t.cell},l.createElement(x.default,null,"Version"),l.createElement(x.default,{variant:"subtitle1",color:"textSecondary"},r.version))),l.createElement(ir.Z,null,l.createElement(r7.default,{className:t.cell},l.createElement(x.default,null,"SHA"),l.createElement(x.default,{variant:"subtitle1",color:"textSecondary"},r.commitSHA))))))}),gx=function(){return l.createElement(ig,null,l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,sm:12,md:8},l.createElement(d.Z,{container:!0},l.createElement(g_,null))),l.createElement(d.Z,{item:!0,sm:12,md:4},l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12},l.createElement(gk,null)),l.createElement(d.Z,{item:!0,xs:12},l.createElement(mN,null)),l.createElement(d.Z,{item:!0,xs:12},l.createElement(mE,null))))))},gT=function(){return l.createElement(gx,null)},gM=function(){return l.createElement(gT,null)},gO=n(44431),gA=1e18,gL=function(e){return new gO.BigNumber(e).dividedBy(gA).toFixed(8)},gC=function(e){var t=e.keys,n=e.chainID,r=e.hideHeaderTitle;return l.createElement(l.Fragment,null,l.createElement(sl.Z,{title:!r&&"Account Balances",subheader:"Chain ID "+n}),l.createElement(aW.Z,null,l.createElement(w.default,{dense:!1,disablePadding:!0},t&&t.map(function(e,r){return l.createElement(l.Fragment,null,l.createElement(_.default,{disableGutters:!0,key:["acc-balance",n.toString(),r.toString()].join("-")},l.createElement(E.Z,{primary:l.createElement(l.Fragment,null,l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:12},l.createElement(op,{title:"Address"}),l.createElement(ob,{value:e.address})),l.createElement(d.Z,{item:!0,xs:6},l.createElement(op,{title:"Native Token Balance"}),l.createElement(ob,{value:e.ethBalance||"--"})),l.createElement(d.Z,{item:!0,xs:6},l.createElement(op,{title:"LINK Balance"}),l.createElement(ob,{value:e.linkBalance?gL(e.linkBalance):"--"}))))})),r+1s&&l.createElement(gB.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,{className:r.footer},l.createElement(aA.Z,{href:"/runs",component:tz},"View More"))))))});function vt(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function vn(){var e=vt(["\n ","\n query FetchRecentJobRuns($offset: Int, $limit: Int) {\n jobRuns(offset: $offset, limit: $limit) {\n results {\n ...RecentJobRunsPayload_ResultsFields\n }\n metadata {\n total\n }\n }\n }\n"]);return vn=function(){return e},e}var vr=5,vi=n0(vn(),g9),va=function(){var e=rv(vi,{variables:{offset:0,limit:vr},fetchPolicy:"cache-and-network"}),t=e.data,n=e.loading,r=e.error;return l.createElement(ve,{data:t,errorMsg:null==r?void 0:r.message,loading:n,maxRunsSize:vr})},vo=function(e){return(0,b.createStyles)({style:{textAlign:"center",padding:2.5*e.spacing.unit,position:"fixed",left:"0",bottom:"0",width:"100%",borderRadius:0},bareAnchor:{color:e.palette.common.black,textDecoration:"none"}})},vs=(0,b.withStyles)(vo)(function(e){var t=e.classes,n=(0,A.v9)(gE.N,A.wU),r=(0,A.I0)();return(0,l.useEffect)(function(){r((0,ty.DQ)())}),l.createElement(ii.default,{className:t.style},l.createElement(x.default,null,"Chainlink Node ",n.version," at commit"," ",l.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://github.com/smartcontractkit/chainlink/commit/".concat(n.commitSHA),className:t.bareAnchor},n.commitSHA)))}),vu=function(e){return(0,b.createStyles)({cell:{borderColor:e.palette.divider,borderTop:"1px solid",borderBottom:"none",paddingTop:2*e.spacing.unit,paddingBottom:2*e.spacing.unit,paddingLeft:2*e.spacing.unit},block:{display:"block"},overflowEllipsis:{textOverflow:"ellipsis",overflow:"hidden"}})},vc=(0,b.withStyles)(vu)(function(e){var t=e.classes,n=e.job;return l.createElement(ir.Z,null,l.createElement(r7.default,{scope:"row",className:t.cell},l.createElement(d.Z,{container:!0,spacing:0},l.createElement(d.Z,{item:!0,xs:12},l.createElement(ih,{href:"/jobs/".concat(n.id),classes:{linkContent:t.block}},l.createElement(x.default,{className:t.overflowEllipsis,variant:"body1",component:"span",color:"primary"},n.name||n.id))),l.createElement(d.Z,{item:!0,xs:12},l.createElement(x.default,{variant:"body1",color:"textSecondary"},"Created ",l.createElement(aO,{tooltip:!0},n.createdAt))))))});function vl(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function vf(){var e=vl(["\n fragment RecentJobsPayload_ResultsFields on Job {\n id\n name\n createdAt\n }\n"]);return vf=function(){return e},e}var vd=n0(vf()),vh=function(){return(0,b.createStyles)({cardHeader:{borderBottom:0},table:{tableLayout:"fixed"}})},vp=(0,b.withStyles)(vh)(function(e){var t,n,r=e.classes,i=e.data,a=e.errorMsg,o=e.loading;return l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Recent Jobs",className:r.cardHeader}),l.createElement(r8.Z,{className:r.table},l.createElement(r9.Z,null,l.createElement(g$,{visible:o}),l.createElement(gz,{visible:(null===(t=null==i?void 0:i.jobs.results)||void 0===t?void 0:t.length)===0},"No recently created jobs"),l.createElement(gU,{msg:a}),null===(n=null==i?void 0:i.jobs.results)||void 0===n?void 0:n.map(function(e,t){return l.createElement(vc,{job:e,key:t})}))))});function vb(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function vm(){var e=vb(["\n ","\n query FetchRecentJobs($offset: Int, $limit: Int) {\n jobs(offset: $offset, limit: $limit) {\n results {\n ...RecentJobsPayload_ResultsFields\n }\n }\n }\n"]);return vm=function(){return e},e}var vg=5,vv=n0(vm(),vd),vy=function(){var e=rv(vv,{variables:{offset:0,limit:vg},fetchPolicy:"cache-and-network"}),t=e.data,n=e.loading,r=e.error;return l.createElement(vp,{data:t,errorMsg:null==r?void 0:r.message,loading:n})},vw=function(){return l.createElement(ig,null,l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:8},l.createElement(va,null)),l.createElement(d.Z,{item:!0,xs:4},l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12},l.createElement(gY,null)),l.createElement(d.Z,{item:!0,xs:12},l.createElement(vy,null))))),l.createElement(vs,null))},v_=function(){return l.createElement(vw,null)},vE=function(){return l.createElement(v_,null)},vS=n(87239),vk=function(e){switch(e){case"DirectRequestSpec":return"Direct Request";case"FluxMonitorSpec":return"Flux Monitor";default:return e.replace(/Spec$/,"")}},vx=n(5022),vT=n(78718),vM=n.n(vT);function vO(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n1?t-1:0),r=1;r1?t-1:0),r=1;re.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&n.map(function(e){return l.createElement(ir.Z,{key:e.id,style:{cursor:"pointer"},onClick:function(){return r.push("/runs/".concat(e.id))}},l.createElement(r7.default,{className:t.idCell,scope:"row"},l.createElement("div",{className:t.runDetails},l.createElement(x.default,{variant:"h5",color:"primary",component:"span"},e.id))),l.createElement(r7.default,{className:t.stampCell},l.createElement(x.default,{variant:"body1",color:"textSecondary",className:t.stamp},"Created ",l.createElement(aO,{tooltip:!0},e.createdAt))),l.createElement(r7.default,{className:t.statusCell,scope:"row"},l.createElement(x.default,{variant:"body1",className:O()(t.status,yh(t,e.status))},e.status.toLowerCase())))})))}),yb=n(16839),ym=n.n(yb);function yg(e){var t=e.replace(/\w+\s*=\s*<([^>]|[\r\n])*>/g,""),n=ym().read(t),r=n.edges();return n.nodes().map(function(e){var t={id:e,parentIds:r.filter(function(t){return t.w===e}).map(function(e){return e.v})};return Object.keys(n.node(e)).length>0&&(t.attributes=n.node(e)),t})}var yv=n(94164),yy=function(e){var t=e.data,n=[];return(null==t?void 0:t.attributes)&&Object.keys(t.attributes).forEach(function(e){var r;n.push(l.createElement("div",{key:e},l.createElement(x.default,{variant:"body1",color:"textSecondary",component:"div"},l.createElement("b",null,e,":")," ",null===(r=t.attributes)||void 0===r?void 0:r[e])))}),l.createElement("div",null,t&&l.createElement(x.default,{variant:"body1",color:"textPrimary"},l.createElement("b",null,t.id)),n)},yw=n(73343),y_=n(3379),yE=n.n(y_);function yS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);nwindow.innerWidth?u-r.getBoundingClientRect().width-a:u+a,n=c+r.getBoundingClientRect().height+i>window.innerHeight?c-r.getBoundingClientRect().height-a:c+a,r.style.opacity=String(1),r.style.top="".concat(n,"px"),r.style.left="".concat(t,"px"),r.style.zIndex=String(1)}},h=function(e){var t=document.getElementById("tooltip-d3-chart-".concat(e));t&&(t.style.opacity=String(0),t.style.zIndex=String(-1))};return l.createElement("div",{style:{fontFamily:"sans-serif",fontWeight:"normal"}},l.createElement(yv.kJ,{id:"task-list-graph-d3",data:i,config:s,onMouseOverNode:d,onMouseOutNode:h},"D3 chart"),n.map(function(e){return l.createElement("div",{key:"d3-tooltip-key-".concat(e.id),id:"tooltip-d3-chart-".concat(e.id),style:{position:"absolute",opacity:"0",border:"1px solid rgba(0, 0, 0, 0.1)",padding:yw.r.spacing.unit,background:"white",borderRadius:5,zIndex:-1,inlineSize:"min-content"}},l.createElement(yy,{data:e}))}))};function yL(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);nyY&&l.createElement("div",{className:t.runDetails},l.createElement(aA.Z,{href:"/jobs/".concat(n.id,"/runs"),component:tz},"View more")))),l.createElement(d.Z,{item:!0,xs:12,sm:6},l.createElement(yF,{observationSource:n.observationSource})))});function yH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&void 0!==arguments[0]?arguments[0]:"";try{return vx.parse(e),!0}catch(t){return!1}})}),wW=function(e){var t=e.initialValues,n=e.onSubmit,r=e.onTOMLChange;return l.createElement(hT,{initialValues:t,validationSchema:wG,onSubmit:n},function(e){var t=e.isSubmitting,n=e.values;return r&&r(n.toml),l.createElement(hR,{"data-testid":"job-form",noValidate:!0},l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:12},l.createElement(hP,{component:hX,id:"toml",name:"toml",label:"Job Spec (TOML)",required:!0,fullWidth:!0,multiline:!0,rows:10,rowsMax:25,variant:"outlined",autoComplete:"off",FormHelperTextProps:{"data-testid":"toml-helper-text"}})),l.createElement(d.Z,{item:!0,xs:12,md:7},l.createElement(ok.default,{variant:"contained",color:"primary",type:"submit",disabled:t,size:"large"},"Create Job"))))})},wK=n(50109),wV="persistSpec";function wq(e){var t=e.query,n=new URLSearchParams(t).get("definition");return n?(wK.t8(wV,n),{toml:n}):{toml:wK.U2(wV)||""}}var wZ=function(e){var t=e.onSubmit,n=e.onTOMLChange,r=wq({query:(0,h.TH)().search}),i=function(e){var t=e.replace(/[\u200B-\u200D\uFEFF]/g,"");wK.t8("".concat(wV),t),n&&n(t)};return l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"New Job"}),l.createElement(aW.Z,null,l.createElement(wW,{initialValues:r,onSubmit:t,onTOMLChange:i})))};function wX(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]e.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&void 0!==arguments[1]?arguments[1]:{},n=t.start,r=void 0===n?6:n,i=t.end,a=void 0===i?4:i;return e.substring(0,r)+"..."+e.substring(e.length-a)}function _M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&void 0!==arguments[0]?arguments[0]:{};return rv(_W,e)},_V=function(){var e=_K({fetchPolicy:"cache-and-network"}),t=e.data,n=e.loading,r=e.error,i=e.refetch;return l.createElement(_U,{loading:n,data:t,errorMsg:null==r?void 0:r.message,refetch:i})},_q=function(e){var t=e.csaKey;return l.createElement(ir.Z,{hover:!0},l.createElement(r7.default,null,l.createElement(x.default,{variant:"body1"},t.publicKey," ",l.createElement(_x,{data:t.publicKey}))))};function _Z(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function _X(){var e=_Z(["\n fragment CSAKeysPayload_ResultsFields on CSAKey {\n id\n publicKey\n }\n"]);return _X=function(){return e},e}var _J=n0(_X()),_Q=function(e){var t,n,r,i=e.data,a=e.errorMsg,o=e.loading,s=e.onCreate;return l.createElement(r5.Z,null,l.createElement(sl.Z,{action:(null===(t=null==i?void 0:i.csaKeys.results)||void 0===t?void 0:t.length)===0&&l.createElement(ok.default,{variant:"outlined",color:"primary",onClick:s},"New CSA Key"),title:"CSA Key",subheader:"Manage your CSA Key"}),l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,"Public Key"))),l.createElement(r9.Z,null,l.createElement(g$,{visible:o}),l.createElement(gz,{visible:(null===(n=null==i?void 0:i.csaKeys.results)||void 0===n?void 0:n.length)===0}),l.createElement(gU,{msg:a}),null===(r=null==i?void 0:i.csaKeys.results)||void 0===r?void 0:r.map(function(e,t){return l.createElement(_q,{csaKey:e,key:t})}))))};function _1(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&void 0!==arguments[0]?arguments[0]:{};return rv(EM,e)};function EA(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&void 0!==arguments[0]?arguments[0]:{};return rv(EJ,e)},E3=function(){return oo(EQ)},E4=function(){return oo(E1)},E6=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return rv(E0,e)};function E5(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&void 0!==arguments[0]?arguments[0]:{};return rv(SK,e)};function Sq(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]e.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function kV(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}var kq=function(e){var t=e.run,n=l.useMemo(function(){var e=t.inputs,n=t.outputs,r=t.taskRuns,i=kK(t,["inputs","outputs","taskRuns"]),a={};try{a=JSON.parse(e)}catch(o){a={}}return kW(kz({},i),{inputs:a,outputs:n,taskRuns:r})},[t]);return l.createElement(r5.Z,null,l.createElement(aW.Z,null,l.createElement(kH,{object:n})))};function kZ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kX(e){for(var t=1;t0&&l.createElement(kr,{errors:t.allErrors})),l.createElement(d.Z,{item:!0,xs:12},l.createElement(h.rs,null,l.createElement(h.AW,{path:"".concat(n,"/json")},l.createElement(kq,{run:t})),l.createElement(h.AW,{path:n},t.taskRuns.length>0&&l.createElement(kN,{taskRuns:t.taskRuns,observationSource:t.job.observationSource}))))))))};function k5(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function k8(){var e=k5(["\n ","\n query FetchJobRun($id: ID!) {\n jobRun(id: $id) {\n __typename\n ... on JobRun {\n ...JobRunPayload_Fields\n }\n ... on NotFoundError {\n message\n }\n }\n }\n"]);return k8=function(){return e},e}var k9=n0(k8(),k4),k7=function(){var e=rv(k9,{variables:{id:(0,h.UO)().id}}),t=e.data,n=e.loading,r=e.error;if(n)return l.createElement(iR,null);if(r)return l.createElement(iD,{error:r});var i=null==t?void 0:t.jobRun;switch(null==i?void 0:i.__typename){case"JobRun":return l.createElement(k6,{run:i});case"NotFoundError":return l.createElement(oa,null);default:return null}};function xe(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function xt(){var e=xe(["\n fragment JobRunsPayload_ResultsFields on JobRun {\n id\n allErrors\n createdAt\n finishedAt\n status\n job {\n id\n }\n }\n"]);return xt=function(){return e},e}var xn=n0(xt()),xr=function(e){var t=e.loading,n=e.data,r=e.page,i=e.pageSize,a=(0,h.k6)(),o=l.useMemo(function(){return null==n?void 0:n.jobRuns.results.map(function(e){var t,n=e.allErrors,r=e.id,i=e.createdAt;return{id:r,createdAt:i,errors:n,finishedAt:e.finishedAt,status:e.status}})},[n]);return l.createElement(ig,null,l.createElement(d.Z,{container:!0,spacing:32},l.createElement(d.Z,{item:!0,xs:12},l.createElement(iy,null,"Job Runs")),t&&l.createElement(iR,null),n&&o&&l.createElement(d.Z,{item:!0,xs:12},l.createElement(r5.Z,null,l.createElement(yp,{runs:o}),l.createElement(it.Z,{component:"div",count:n.jobRuns.metadata.total,rowsPerPage:i,rowsPerPageOptions:[i],page:r-1,onChangePage:function(e,t){a.push("/runs?page=".concat(t+1,"&per=").concat(i))},onChangeRowsPerPage:function(){},backIconButtonProps:{"aria-label":"prev-page"},nextIconButtonProps:{"aria-label":"next-page"}})))))};function xi(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function xa(){var e=xi(["\n ","\n query FetchJobRuns($offset: Int, $limit: Int) {\n jobRuns(offset: $offset, limit: $limit) {\n results {\n ...JobRunsPayload_ResultsFields\n }\n metadata {\n total\n }\n }\n }\n"]);return xa=function(){return e},e}var xo=n0(xa(),xn),xs=function(){var e=ij(),t=parseInt(e.get("page")||"1",10),n=parseInt(e.get("per")||"25",10),r=rv(xo,{variables:{offset:(t-1)*n,limit:n},fetchPolicy:"cache-and-network"}),i=r.data,a=r.loading,o=r.error;return o?l.createElement(iD,{error:o}):l.createElement(xr,{loading:a,data:i,page:t,pageSize:n})},xu=function(){var e=(0,h.$B)().path;return l.createElement(h.rs,null,l.createElement(h.AW,{exact:!0,path:e},l.createElement(xs,null)),l.createElement(h.AW,{path:"".concat(e,"/:id")},l.createElement(k7,null)))},xc=bv().shape({name:p0().required("Required"),uri:p0().required("Required"),publicKey:p0().required("Required")}),xl=function(e){var t=e.initialValues,n=e.onSubmit;return l.createElement(hT,{initialValues:t,validationSchema:xc,onSubmit:n},function(e){var t=e.isSubmitting,n=e.submitForm;return l.createElement(hR,{"data-testid":"feeds-manager-form"},l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"name",name:"name",label:"Name",required:!0,fullWidth:!0,FormHelperTextProps:{"data-testid":"name-helper-text"}})),l.createElement(d.Z,{item:!0,xs:!1,md:6}),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"uri",name:"uri",label:"URI",required:!0,fullWidth:!0,helperText:"Provided by the Feeds Manager operator",FormHelperTextProps:{"data-testid":"uri-helper-text"}})),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"publicKey",name:"publicKey",label:"Public Key",required:!0,fullWidth:!0,helperText:"Provided by the Feeds Manager operator",FormHelperTextProps:{"data-testid":"publicKey-helper-text"}})),l.createElement(d.Z,{item:!0,xs:12},l.createElement(ok.default,{variant:"contained",color:"primary",disabled:t,onClick:n},"Submit"))))})},xf=function(e){var t=e.data,n=e.onSubmit,r={name:t.name,uri:t.uri,publicKey:t.publicKey};return l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12,md:11,lg:9},l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Edit Feeds Manager"}),l.createElement(aW.Z,null,l.createElement(xl,{initialValues:r,onSubmit:n})))))};function xd(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function xh(){var e=xd(["\n query FetchFeedsManagers {\n feedsManagers {\n results {\n __typename\n id\n name\n uri\n publicKey\n isConnectionActive\n createdAt\n }\n }\n }\n"]);return xh=function(){return e},e}var xp=n0(xh()),xb=function(){return rv(xp)};function xm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]e.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function xF(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}function xY(e,t){return xD(e)||xP(e,t)||xB(e,t)||xR()}function xB(e,t){if(e){if("string"==typeof e)return xI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xI(e,t)}}var xU=function(e){return"SN_MAIN"===e||"SN_SEPOLIA"===e},xH=bv().shape({chainID:p0().required("Required"),chainType:p0().required("Required"),accountAddr:p0().required("Required"),accountAddrPubKey:p0().nullable(),adminAddr:p0().required("Required"),ocr1Multiaddr:p0().when(["ocr1Enabled","ocr1IsBootstrap"],{is:function(e,t){return e&&t},then:p0().required("Required").nullable()}).nullable(),ocr1P2PPeerID:p0().when(["ocr1Enabled","ocr1IsBootstrap"],{is:function(e,t){return e&&!t},then:p0().required("Required").nullable()}).nullable(),ocr1KeyBundleID:p0().when(["ocr1Enabled","ocr1IsBootstrap"],{is:function(e,t){return e&&!t},then:p0().required("Required").nullable()}).nullable(),ocr2Multiaddr:p0().when(["ocr2Enabled","ocr2IsBootstrap"],{is:function(e,t){return e&&t},then:p0().required("Required").nullable()}).nullable(),ocr2P2PPeerID:p0().when(["ocr2Enabled","ocr2IsBootstrap"],{is:function(e,t){return e&&!t},then:p0().required("Required").nullable()}).nullable(),ocr2KeyBundleID:p0().when(["ocr2Enabled","ocr2IsBootstrap"],{is:function(e,t){return e&&!t},then:p0().required("Required").nullable()}).nullable(),ocr2CommitPluginEnabled:pV().required("Required"),ocr2ExecutePluginEnabled:pV().required("Required"),ocr2MedianPluginEnabled:pV().required("Required"),ocr2MercuryPluginEnabled:pV().required("Required"),ocr2ForwarderAddress:p0().nullable()}),x$=function(e){return(0,b.createStyles)({supportedJobOptionsPaper:{padding:2*e.spacing.unit}})},xz=function(e){var t=e.chainAccounts,n=xj(e,["chainAccounts"]),r=h_(),i=r.values,a=i.chainID,o=i.accountAddr,s=r.setFieldValue,u=xY(l.useState(!1),2),c=u[0],f=u[1],d=l.useRef();l.useEffect(function(){d.current=a},[a]),l.useEffect(function(){a!==d.current&&(s(n.name,""),f(!1))},[a,s,n.name]);var h=function(e){var t=e.target.value;"custom"===t?(f(!0),s(n.name,"")):(f(!1),s(n.name,t))};return l.createElement(l.Fragment,null,!xU(a)&&l.createElement(hP,xN({},n,{select:!0,value:c?"custom":o,onChange:h}),t.map(function(e){return l.createElement(tE.default,{key:e.address,value:e.address},e.address)})),xU(a)&&l.createElement(hP,{component:hX,id:"accountAddr",name:"accountAddr",label:"Enter your account address",inputProps:{"data-testid":"customAccountAddr-input"},helperText:"The account address used for this chain",required:!0,fullWidth:!0}),xU(a)&&l.createElement("div",null,l.createElement(hP,{component:hX,id:"accountAddrPubKey",name:"accountAddrPubKey",label:"Account Address Public Key",required:!0,fullWidth:!0,helperText:"The public key for your account address",FormHelperTextProps:{"data-testid":"accountAddrPubKey-helper-text"}})))},xG=(0,b.withStyles)(x$)(function(e){var t=e.classes,n=e.editing,r=void 0!==n&&n,i=e.innerRef,a=e.initialValues,o=e.onSubmit,s=e.chainIDs,u=void 0===s?[]:s,c=e.accounts,f=void 0===c?[]:c,h=e.p2pKeys,p=void 0===h?[]:h,b=e.ocrKeys,m=void 0===b?[]:b,g=e.ocr2Keys,v=void 0===g?[]:g,y=e.showSubmit,w=void 0!==y&&y;return l.createElement(hT,{innerRef:i,initialValues:a,validationSchema:xH,onSubmit:o},function(e){var n=e.values,i=f.filter(function(e){return e.chain.id==n.chainID&&!e.isDisabled});return l.createElement(hR,{"data-testid":"feeds-manager-form",id:"chain-configuration-form",noValidate:!0},l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"chainType",name:"chainType",label:"Chain Type",select:!0,required:!0,fullWidth:!0,disabled:!0},l.createElement(tE.default,{key:"EVM",value:"EVM"},"EVM"))),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"chainID",name:"chainID",label:"Chain ID",required:!0,fullWidth:!0,select:!0,disabled:r,inputProps:{"data-testid":"chainID-input"},FormHelperTextProps:{"data-testid":"chainID-helper-text"}},u.map(function(e){return l.createElement(tE.default,{key:e,value:e},e)}))),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(xz,{component:hX,id:"accountAddr",name:"accountAddr",label:"Account Address",inputProps:{"data-testid":"accountAddr-input"},required:!0,fullWidth:!0,select:!0,helperText:"The account address used for this chain",chainAccounts:i,FormHelperTextProps:{"data-testid":"accountAddr-helper-text"}})),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"adminAddr",name:"adminAddr",label:"Admin Address",required:!0,fullWidth:!0,helperText:"The address used for LINK payments",FormHelperTextProps:{"data-testid":"adminAddr-helper-text"}})),l.createElement(d.Z,{item:!0,xs:12},l.createElement(x.default,null,"Supported Job Types")),l.createElement(d.Z,{item:!0,xs:12},l.createElement(hP,{component:h2,name:"fluxMonitorEnabled",type:"checkbox",Label:{label:"Flux Monitor"}})),l.createElement(d.Z,{item:!0,xs:12},l.createElement(hP,{component:h2,name:"ocr1Enabled",type:"checkbox",Label:{label:"OCR"}}),n.ocr1Enabled&&l.createElement(ii.default,{className:t.supportedJobOptionsPaper},l.createElement(d.Z,{container:!0,spacing:8},l.createElement(l.Fragment,null,l.createElement(d.Z,{item:!0,xs:12},l.createElement(hP,{component:h2,name:"ocr1IsBootstrap",type:"checkbox",Label:{label:"Is this node running as a bootstrap peer?"}})),n.ocr1IsBootstrap?l.createElement(d.Z,{item:!0,xs:12},l.createElement(hP,{component:hX,id:"ocr1Multiaddr",name:"ocr1Multiaddr",label:"Multiaddr",required:!0,fullWidth:!0,helperText:"The OCR Multiaddr which oracles use to query for network information",FormHelperTextProps:{"data-testid":"ocr1Multiaddr-helper-text"}})):l.createElement(l.Fragment,null,l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"ocr1P2PPeerID",name:"ocr1P2PPeerID",label:"Peer ID",select:!0,required:!0,fullWidth:!0,helperText:"The Peer ID used for this chain",FormHelperTextProps:{"data-testid":"ocr1P2PPeerID-helper-text"}},p.map(function(e){return l.createElement(tE.default,{key:e.peerID,value:e.peerID},e.peerID)}))),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"ocr1KeyBundleID",name:"ocr1KeyBundleID",label:"Key Bundle ID",select:!0,required:!0,fullWidth:!0,helperText:"The OCR Key Bundle ID used for this chain",FormHelperTextProps:{"data-testid":"ocr1KeyBundleID-helper-text"}},m.map(function(e){return l.createElement(tE.default,{key:e.id,value:e.id},e.id)})))))))),l.createElement(d.Z,{item:!0,xs:12},l.createElement(hP,{component:h2,name:"ocr2Enabled",type:"checkbox",Label:{label:"OCR2"}}),n.ocr2Enabled&&l.createElement(ii.default,{className:t.supportedJobOptionsPaper},l.createElement(d.Z,{container:!0,spacing:8},l.createElement(l.Fragment,null,l.createElement(d.Z,{item:!0,xs:12},l.createElement(hP,{component:h2,name:"ocr2IsBootstrap",type:"checkbox",Label:{label:"Is this node running as a bootstrap peer?"}})),n.ocr2IsBootstrap?l.createElement(d.Z,{item:!0,xs:12},l.createElement(hP,{component:hX,id:"ocr2Multiaddr",name:"ocr2Multiaddr",label:"Multiaddr",required:!0,fullWidth:!0,helperText:"The OCR2 Multiaddr which oracles use to query for network information",FormHelperTextProps:{"data-testid":"ocr2Multiaddr-helper-text"}})):l.createElement(l.Fragment,null,l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"ocr2P2PPeerID",name:"ocr2P2PPeerID",label:"Peer ID",select:!0,required:!0,fullWidth:!0,helperText:"The Peer ID used for this chain",FormHelperTextProps:{"data-testid":"ocr2P2PPeerID-helper-text"}},p.map(function(e){return l.createElement(tE.default,{key:e.peerID,value:e.peerID},e.peerID)}))),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"ocr2KeyBundleID",name:"ocr2KeyBundleID",label:"Key Bundle ID",select:!0,required:!0,fullWidth:!0,helperText:"The OCR2 Key Bundle ID used for this chain",FormHelperTextProps:{"data-testid":"ocr2KeyBundleID-helper-text"}},v.filter(function(e){return n.chainType===e.chainType}).map(function(e){return l.createElement(tE.default,{key:e.id,value:e.id},e.id)}))),l.createElement(d.Z,{item:!0,xs:12},l.createElement(x.default,null,"Supported Plugins")),l.createElement(d.Z,{item:!0,xs:6},l.createElement(hP,{component:h2,name:"ocr2CommitPluginEnabled",type:"checkbox",Label:{label:"Commit"}})),l.createElement(d.Z,{item:!0,xs:6},l.createElement(hP,{component:h2,name:"ocr2ExecutePluginEnabled",type:"checkbox",Label:{label:"Execute"}})),l.createElement(d.Z,{item:!0,xs:6},l.createElement(hP,{component:h2,name:"ocr2RebalancerPluginEnabled",type:"checkbox",Label:{label:"Rebalancer"}})),l.createElement(d.Z,{item:!0,xs:6},l.createElement(hP,{component:h2,name:"ocr2MedianPluginEnabled",type:"checkbox",Label:{label:"Median"}})),l.createElement(d.Z,{item:!0,xs:6},l.createElement(hP,{component:h2,name:"ocr2MercuryPluginEnabled",type:"checkbox",Label:{label:"Mercury"}})),l.createElement(d.Z,{item:!0,xs:12,md:12},l.createElement(hP,{component:hX,id:"ocr2ForwarderAddress",name:"ocr2ForwarderAddress",label:"Forwarder Address (optional)",fullWidth:!0,helperText:"The forwarder address from the Operator Forwarder Contract",FormHelperTextProps:{"data-testid":"ocr2ForwarderAddress-helper-text"}}))))))),w&&l.createElement(d.Z,{item:!0,xs:12,md:7},l.createElement(ok.default,{variant:"contained",color:"primary",type:"submit",size:"large"},"Submit"))))})}),xW=function(e){var t=e.onClose,n=e.open,r=e.onSubmit,i=l.useRef(),a=i$({fetchPolicy:"network-only"}).data,o=_K({fetchPolicy:"cache-and-network"}).data,s=SV({fetchPolicy:"cache-and-network"}).data,u=EO({fetchPolicy:"cache-and-network"}).data,c=E2({fetchPolicy:"cache-and-network"}).data,f={chainID:"",chainType:"EVM",accountAddr:"",adminAddr:"",accountAddrPubKey:"",fluxMonitorEnabled:!1,ocr1Enabled:!1,ocr1IsBootstrap:!1,ocr1Multiaddr:"",ocr1P2PPeerID:"",ocr1KeyBundleID:"",ocr2Enabled:!1,ocr2IsBootstrap:!1,ocr2Multiaddr:"",ocr2P2PPeerID:"",ocr2KeyBundleID:"",ocr2CommitPluginEnabled:!1,ocr2ExecutePluginEnabled:!1,ocr2MedianPluginEnabled:!1,ocr2MercuryPluginEnabled:!1,ocr2RebalancerPluginEnabled:!1,ocr2ForwarderAddress:""},d=a?a.chains.results.map(function(e){return e.id}):[],h=o?o.ethKeys.results:[],p=s?s.p2pKeys.results:[],b=u?u.ocrKeyBundles.results:[],m=c?c.ocr2KeyBundles.results:[];return l.createElement(aD.Z,{onClose:t,open:n,disableBackdropClick:!0},l.createElement(oO.Z,{disableTypography:!0},l.createElement(x.default,{variant:"body2"},"New Supported Chain")),l.createElement(oT.Z,null,l.createElement(xG,{innerRef:i,initialValues:f,onSubmit:r,chainIDs:d,accounts:h,p2pKeys:p,ocrKeys:b,ocr2Keys:m})),l.createElement(ox.Z,null,l.createElement(ok.default,{onClick:t},"Cancel"),l.createElement(ok.default,{color:"primary",type:"submit",form:"chain-configuration-form",variant:"contained"},"Submit")))},xK=function(e){var t=e.cfg,n=e.onClose,r=e.open,i=e.onSubmit,a=l.useRef(),o=i$({fetchPolicy:"network-only"}).data,s=_K({fetchPolicy:"cache-and-network"}).data,u=SV({fetchPolicy:"cache-and-network"}).data,c=EO({fetchPolicy:"cache-and-network"}).data,f=E2({fetchPolicy:"cache-and-network"}).data;if(!t)return null;var d={chainID:t.chainID,chainType:"EVM",accountAddr:t.accountAddr,adminAddr:t.adminAddr,accountAddrPubKey:t.accountAddrPubKey,fluxMonitorEnabled:t.fluxMonitorJobConfig.enabled,ocr1Enabled:t.ocr1JobConfig.enabled,ocr1IsBootstrap:t.ocr1JobConfig.isBootstrap,ocr1Multiaddr:t.ocr1JobConfig.multiaddr,ocr1P2PPeerID:t.ocr1JobConfig.p2pPeerID,ocr1KeyBundleID:t.ocr1JobConfig.keyBundleID,ocr2Enabled:t.ocr2JobConfig.enabled,ocr2IsBootstrap:t.ocr2JobConfig.isBootstrap,ocr2Multiaddr:t.ocr2JobConfig.multiaddr,ocr2P2PPeerID:t.ocr2JobConfig.p2pPeerID,ocr2KeyBundleID:t.ocr2JobConfig.keyBundleID,ocr2CommitPluginEnabled:t.ocr2JobConfig.plugins.commit,ocr2ExecutePluginEnabled:t.ocr2JobConfig.plugins.execute,ocr2MedianPluginEnabled:t.ocr2JobConfig.plugins.median,ocr2MercuryPluginEnabled:t.ocr2JobConfig.plugins.mercury,ocr2RebalancerPluginEnabled:t.ocr2JobConfig.plugins.rebalancer,ocr2ForwarderAddress:t.ocr2JobConfig.forwarderAddress},h=o?o.chains.results.map(function(e){return e.id}):[],p=s?s.ethKeys.results:[],b=u?u.p2pKeys.results:[],m=c?c.ocrKeyBundles.results:[],g=f?f.ocr2KeyBundles.results:[];return l.createElement(aD.Z,{onClose:n,open:r,disableBackdropClick:!0},l.createElement(oO.Z,{disableTypography:!0},l.createElement(x.default,{variant:"body2"},"Edit Supported Chain")),l.createElement(oT.Z,null,l.createElement(xG,{innerRef:a,initialValues:d,onSubmit:i,chainIDs:h,accounts:p,p2pKeys:b,ocrKeys:m,ocr2Keys:g,editing:!0})),l.createElement(ox.Z,null,l.createElement(ok.default,{onClick:n},"Cancel"),l.createElement(ok.default,{color:"primary",type:"submit",form:"chain-configuration-form",variant:"contained"},"Submit")))};function xV(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function xq(){var e=xV(["\n fragment FeedsManager_ChainConfigFields on FeedsManagerChainConfig {\n id\n chainID\n chainType\n accountAddr\n adminAddr\n accountAddrPubKey\n fluxMonitorJobConfig {\n enabled\n }\n ocr1JobConfig {\n enabled\n isBootstrap\n multiaddr\n p2pPeerID\n keyBundleID\n }\n ocr2JobConfig {\n enabled\n isBootstrap\n multiaddr\n forwarderAddress\n p2pPeerID\n keyBundleID\n plugins {\n commit\n execute\n median\n mercury\n rebalancer\n }\n }\n }\n"]);return xq=function(){return e},e}function xZ(){var e=xV(["\n ","\n fragment FeedsManagerFields on FeedsManager {\n id\n name\n uri\n publicKey\n isConnectionActive\n chainConfigs {\n ...FeedsManager_ChainConfigFields\n }\n }\n"]);return xZ=function(){return e},e}function xX(){var e=xV(["\n fragment FeedsManager_JobProposalsFields on JobProposal {\n id\n name\n externalJobID\n remoteUUID\n status\n pendingUpdate\n latestSpec {\n createdAt\n version\n }\n }\n"]);return xX=function(){return e},e}function xJ(){var e=xV(["\n ","\n ","\n fragment FeedsManagerPayload_ResultsFields on FeedsManager {\n ...FeedsManagerFields\n jobProposals {\n ...FeedsManager_JobProposalsFields\n }\n }\n"]);return xJ=function(){return e},e}function xQ(){var e=xV(["\n ","\n query FetchFeedManagersWithProposals {\n feedsManagers {\n results {\n ...FeedsManagerPayload_ResultsFields\n }\n }\n }\n"]);return xQ=function(){return e},e}var x1=n0(xq()),x0=n0(xZ(),x1),x2=n0(xX()),x3=n0(xJ(),x0,x2),x4=n0(xQ(),x3),x6=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return rv(x4,e)};function x5(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n0?n.feedsManagers.results[0]:void 0;return n&&a?l.createElement(TZ,{manager:a}):l.createElement(h.l_,{to:{pathname:"/feeds_manager/new",state:{from:e}}})},TJ={name:"Chainlink Feeds Manager",uri:"",publicKey:""},TQ=function(e){var t=e.onSubmit;return l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12,md:11,lg:9},l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Register Feeds Manager"}),l.createElement(aW.Z,null,l.createElement(xl,{initialValues:TJ,onSubmit:t})))))};function T1(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]e.length)&&(t=e.length);for(var n=0,r=Array(t);nt.version?e:t})},[o]),g=l.useMemo(function(){return ME(o).sort(function(e,t){return t.version-e.version})},[o]),v=function(e,t,n){switch(e){case"PENDING":return l.createElement(l.Fragment,null,l.createElement(ok.default,{variant:"text",color:"secondary",onClick:function(){return b("reject",t)}},"Reject"),m.id===t&&"DELETED"!==n.status&&"REVOKED"!==n.status&&l.createElement(ok.default,{variant:"contained",color:"primary",onClick:function(){return b("approve",t)}},"Approve"),m.id===t&&"DELETED"===n.status&&n.pendingUpdate&&l.createElement(l.Fragment,null,l.createElement(ok.default,{variant:"contained",color:"primary",onClick:function(){return b("cancel",t)}},"Cancel"),l.createElement(x.default,{color:"error"},"This proposal was deleted. Cancel the spec to delete any running jobs")));case"APPROVED":return l.createElement(l.Fragment,null,l.createElement(ok.default,{variant:"contained",onClick:function(){return b("cancel",t)}},"Cancel"),"DELETED"===n.status&&n.pendingUpdate&&l.createElement(x.default,{color:"error"},"This proposal was deleted. Cancel the spec to delete any running jobs"));case"CANCELLED":if(m.id===t&&"DELETED"!==n.status&&"REVOKED"!==n.status)return l.createElement(ok.default,{variant:"contained",color:"primary",onClick:function(){return b("approve",t)}},"Approve");return null;default:return null}};return l.createElement("div",null,g.map(function(e,n){return l.createElement(mP.Z,{defaultExpanded:0===n,key:n},l.createElement(mR.Z,{expandIcon:l.createElement(gh.Z,null)},l.createElement(x.default,{className:t.versionText},"Version ",e.version),l.createElement(Es.Z,{label:e.status,color:"APPROVED"===e.status?"primary":"default",variant:"REJECTED"===e.status||"CANCELLED"===e.status?"outlined":"default"}),l.createElement("div",{className:t.proposedAtContainer},l.createElement(x.default,null,"Proposed ",l.createElement(aO,{tooltip:!0},e.createdAt)))),l.createElement(mj.Z,{className:t.expansionPanelDetails},l.createElement("div",{className:t.actions},l.createElement("div",{className:t.editContainer},0===n&&("PENDING"===e.status||"CANCELLED"===e.status)&&"DELETED"!==s.status&&"REVOKED"!==s.status&&l.createElement(ok.default,{variant:"contained",onClick:function(){return p(!0)}},"Edit")),l.createElement("div",{className:t.actionsContainer},v(e.status,e.id,s))),l.createElement(gd,{language:"toml",style:gs,"data-testid":"codeblock"},e.definition)))}),l.createElement(oC,{open:null!=c,title:c?MM[c.action].title:"",body:c?MM[c.action].body:"",onConfirm:function(){if(c){switch(c.action){case"approve":n(c.id);break;case"cancel":r(c.id);break;case"reject":i(c.id)}f(null)}},cancelButtonText:"Cancel",onCancel:function(){return f(null)}}),l.createElement(Md,{open:h,onClose:function(){return p(!1)},initialValues:{definition:m.definition,id:m.id},onSubmit:a}))});function MA(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ML(){var e=MA(["\n ","\n fragment JobProposalPayloadFields on JobProposal {\n id\n externalJobID\n remoteUUID\n jobID\n specs {\n ...JobProposal_SpecsFields\n }\n status\n pendingUpdate\n }\n"]);return ML=function(){return e},e}var MC=n0(ML(),Mx),MI=function(e){var t=e.onApprove,n=e.onCancel,r=e.onReject,i=e.onUpdateSpec,a=e.proposal;return l.createElement(ig,null,l.createElement(d.Z,{container:!0,spacing:32},l.createElement(d.Z,{item:!0,xs:9},l.createElement(iy,null,"Job Proposal #",a.id))),l.createElement(Mo,{proposal:a}),l.createElement(d.Z,{container:!0,spacing:32},l.createElement(d.Z,{item:!0,xs:9},l.createElement(Tq,null,"Specs"))),l.createElement(d.Z,{container:!0,spacing:32},l.createElement(d.Z,{item:!0,xs:12},l.createElement(MO,{proposal:a,specs:a.specs,onReject:r,onApprove:t,onCancel:n,onUpdateSpec:i}))))};function MD(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);nU,tA:()=>$,KL:()=>H,Iw:()=>V,DQ:()=>W,cB:()=>T,LO:()=>M,t5:()=>k,qt:()=>x,Jc:()=>C,L7:()=>Y,EO:()=>B});var r,i,a=n(66289),o=n(41800),s=n.n(o),u=n(67932);(i=r||(r={})).IN_PROGRESS="in_progress",i.PENDING_INCOMING_CONFIRMATIONS="pending_incoming_confirmations",i.PENDING_CONNECTION="pending_connection",i.PENDING_BRIDGE="pending_bridge",i.PENDING_SLEEP="pending_sleep",i.ERRORED="errored",i.COMPLETED="completed";var c=n(87013),l=n(19084),f=n(34823);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]j,v2:()=>F});var r=n(66289);function i(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var a="/sessions",o="/sessions",s=function e(t){var n=this;i(this,e),this.api=t,this.createSession=function(e){return n.create(e)},this.destroySession=function(){return n.destroy()},this.create=this.api.createResource(a),this.destroy=this.api.deleteResource(o)};function u(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var c="/v2/bulk_delete_runs",l=function e(t){var n=this;u(this,e),this.api=t,this.bulkDeleteJobRuns=function(e){return n.destroy(e)},this.destroy=this.api.deleteResource(c)};function f(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var d="/v2/chains/evm",h="".concat(d,"/:id"),p=function e(t){var n=this;f(this,e),this.api=t,this.getChains=function(){return n.index()},this.createChain=function(e){return n.create(e)},this.destroyChain=function(e){return n.destroy(void 0,{id:e})},this.updateChain=function(e,t){return n.update(t,{id:e})},this.index=this.api.fetchResource(d),this.create=this.api.createResource(d),this.destroy=this.api.deleteResource(h),this.update=this.api.updateResource(h)};function b(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var m="/v2/keys/evm/chain",g=function e(t){var n=this;b(this,e),this.api=t,this.chain=function(e){var t=new URLSearchParams;t.append("address",e.address),t.append("evmChainID",e.evmChainID),null!==e.nextNonce&&t.append("nextNonce",e.nextNonce),null!==e.abandon&&t.append("abandon",String(e.abandon)),null!==e.enabled&&t.append("enabled",String(e.enabled));var r=m+"?"+t.toString();return n.api.createResource(r)()}};function v(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var y="/v2/jobs",w="".concat(y,"/:specId/runs"),_=function e(t){var n=this;v(this,e),this.api=t,this.createJobRunV2=function(e,t){return n.post(t,{specId:e})},this.post=this.api.createResource(w,!0)};function E(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var S="/v2/log",k=function e(t){var n=this;E(this,e),this.api=t,this.getLogConfig=function(){return n.show()},this.updateLogConfig=function(e){return n.update(e)},this.show=this.api.fetchResource(S),this.update=this.api.updateResource(S)};function x(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var T="/v2/nodes",M=function e(t){var n=this;x(this,e),this.api=t,this.getNodes=function(){return n.index()},this.createNode=function(e){return n.create(e)},this.index=this.api.fetchResource(T),this.create=this.api.createResource(T)};function O(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var A="/v2/enroll_webauthn",L=function e(t){var n=this;O(this,e),this.api=t,this.beginKeyRegistration=function(e){return n.create(e)},this.finishKeyRegistration=function(e){return n.put(e)},this.create=this.api.fetchResource(A),this.put=this.api.createResource(A)};function C(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var I="/v2/build_info",D=function e(t){var n=this;C(this,e),this.api=t,this.show=function(){return n.api.GET(I)()}};function N(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var P=function e(t){N(this,e),this.api=t,this.buildInfo=new D(this.api),this.bulkDeleteRuns=new l(this.api),this.chains=new p(this.api),this.logConfig=new k(this.api),this.nodes=new M(this.api),this.jobs=new _(this.api),this.webauthn=new L(this.api),this.evmKeys=new g(this.api)},R=new r.V0({base:void 0}),j=new s(R),F=new P(R)},1398(e,t,n){"use strict";n.d(t,{Z:()=>d});var r=n(67294),i=n(32316),a=n(83638),o=n(94184),s=n.n(o);function u(){return(u=Object.assign||function(e){for(var t=1;tc});var r=n(67294),i=n(32316);function a(){return(a=Object.assign||function(e){for(var t=1;tx,jK:()=>v});var r=n(67294),i=n(37703),a=n(45697),o=n.n(a),s=n(82204),u=n(71426),c=n(94184),l=n.n(c),f=n(32316),d=function(e){var t=e.palette.success||{},n=e.palette.warning||{};return{base:{paddingLeft:5*e.spacing.unit,paddingRight:5*e.spacing.unit},success:{backgroundColor:t.main,color:t.contrastText},error:{backgroundColor:e.palette.error.dark,color:e.palette.error.contrastText},warning:{backgroundColor:n.contrastText,color:n.main}}},h=function(e){var t,n=e.success,r=e.error,i=e.warning,a=e.classes,o=e.className;return n?t=a.success:r?t=a.error:i&&(t=a.warning),l()(a.base,o,t)},p=function(e){return r.createElement(s.Z,{className:h(e),square:!0},r.createElement(u.default,{variant:"body2",color:"inherit",component:"div"},e.children))};p.defaultProps={success:!1,error:!1,warning:!1},p.propTypes={success:o().bool,error:o().bool,warning:o().bool};let b=(0,f.withStyles)(d)(p);var m=function(){return r.createElement(r.Fragment,null,"Unhandled error. Please help us by opening a"," ",r.createElement("a",{href:"https://github.com/smartcontractkit/chainlink/issues/new"},"bug report"))};let g=m;function v(e){return"string"==typeof e?e:e.component?e.component(e.props):r.createElement(g,null)}function y(e,t){var n;return n="string"==typeof e?e:e.component?e.component(e.props):r.createElement(g,null),r.createElement("p",{key:t},n)}var w=function(e){var t=e.notifications;return r.createElement(b,{error:!0},t.map(y))},_=function(e){var t=e.notifications;return r.createElement(b,{success:!0},t.map(y))},E=function(e){var t=e.errors,n=e.successes;return r.createElement("div",null,(null==t?void 0:t.length)>0&&r.createElement(w,{notifications:t}),n.length>0&&r.createElement(_,{notifications:n}))},S=function(e){return{errors:e.notifications.errors,successes:e.notifications.successes}},k=(0,i.$j)(S)(E);let x=k},9409(e,t,n){"use strict";n.d(t,{ZP:()=>j});var r=n(67294),i=n(37703),a=n(5977),o=n(32316),s=n(1398),u=n(82204),c=n(30060),l=n(71426),f=n(60520),d=n(39814),h=n(57209),p=n(26842),b=n(3950),m=n(5536),g=n(45697),v=n.n(g);let y=n.p+"9f6d832ef97e8493764e.svg";function w(){return(w=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&_.map(function(e,t){return r.createElement(d.Z,{item:!0,xs:12,key:t},r.createElement(u.Z,{raised:!1,className:v.error},r.createElement(c.Z,null,r.createElement(l.default,{variant:"body1",className:v.errorText},(0,b.jK)(e)))))}),r.createElement(d.Z,{item:!0,xs:12},r.createElement(f.Z,{id:"email",label:"Email",margin:"normal",value:n,onChange:m("email"),error:_.length>0,variant:"outlined",fullWidth:!0})),r.createElement(d.Z,{item:!0,xs:12},r.createElement(f.Z,{id:"password",label:"Password",type:"password",autoComplete:"password",margin:"normal",value:h,onChange:m("password"),error:_.length>0,variant:"outlined",fullWidth:!0})),r.createElement(d.Z,{item:!0,xs:12},r.createElement(d.Z,{container:!0,spacing:0,justify:"center"},r.createElement(d.Z,{item:!0},r.createElement(s.Z,{type:"submit",variant:"primary"},"Access Account")))),y&&r.createElement(l.default,{variant:"body1",color:"textSecondary"},"Signing in...")))))))},P=function(e){return{fetching:e.authentication.fetching,authenticated:e.authentication.allowed,errors:e.notifications.errors}},R=(0,i.$j)(P,x({submitSignIn:p.L7}))(N);let j=(0,h.wU)(e)((0,o.withStyles)(D)(R))},16353(e,t,n){"use strict";n.d(t,{ZP:()=>H,rH:()=>U});var r,i=n(37703),a=n(97779),o=n(9541),s=n(19084);function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:h,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case s.Mk.RECEIVE_SIGNOUT_SUCCESS:case s.Mk.RECEIVE_SIGNIN_SUCCESS:var n={allowed:t.authenticated};return o.Ks(n),f(c({},e,n),{errors:[]});case s.Mk.RECEIVE_SIGNIN_FAIL:var r={allowed:!1};return o.Ks(r),f(c({},e,r),{errors:[]});case s.Mk.RECEIVE_SIGNIN_ERROR:case s.Mk.RECEIVE_SIGNOUT_ERROR:var i={allowed:!1};return o.Ks(i),f(c({},e,i),{errors:t.errors||[]});default:return e}};let b=p;function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:_,t=arguments.length>1?arguments[1]:void 0;return t.type?t.type.startsWith(r.REQUEST)?y(g({},e),{count:e.count+1}):t.type.startsWith(r.RECEIVE)?y(g({},e),{count:Math.max(e.count-1,0)}):t.type.startsWith(r.RESPONSE)?y(g({},e),{count:Math.max(e.count-1,0)}):t.type===s.di.REDIRECT?y(g({},e),{count:0}):e:e};let S=E;function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:O,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case s.di.MATCH_ROUTE:return M(x({},O),{currentUrl:t.pathname});case s.Ih.NOTIFY_SUCCESS:var n={component:t.component,props:t.props};return M(x({},e),{successes:[n],errors:[]});case s.Ih.NOTIFY_SUCCESS_MSG:return M(x({},e),{successes:[t.msg],errors:[]});case s.Ih.NOTIFY_ERROR:var r=t.error.errors,i=null==r?void 0:r.map(function(e){return L(t,e)});return M(x({},e),{successes:[],errors:i});case s.Ih.NOTIFY_ERROR_MSG:return M(x({},e),{successes:[],errors:[t.msg]});case s.Mk.RECEIVE_SIGNIN_FAIL:return M(x({},e),{successes:[],errors:["Your email or password is incorrect. Please try again"]});default:return e}};function L(e,t){return{component:e.component,props:{msg:t.detail}}}let C=A;function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:R,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case s.di.REDIRECT:return P(D({},e),{to:t.to});case s.di.MATCH_ROUTE:return P(D({},e),{to:void 0});default:return e}};let F=j;var Y=n(87013),B=(0,a.UY)({authentication:b,fetching:S,notifications:C,redirect:F,buildInfo:Y.Z});B(void 0,{type:"INITIAL_STATE"});var U=i.v9;let H=B},19084(e,t,n){"use strict";var r,i,a,o,s,u,c,l,f,d;n.d(t,{Ih:()=>i,Mk:()=>a,Y0:()=>s,di:()=>r,jp:()=>o}),n(67294),(u=r||(r={})).REDIRECT="REDIRECT",u.MATCH_ROUTE="MATCH_ROUTE",(c=i||(i={})).NOTIFY_SUCCESS="NOTIFY_SUCCESS",c.NOTIFY_SUCCESS_MSG="NOTIFY_SUCCESS_MSG",c.NOTIFY_ERROR="NOTIFY_ERROR",c.NOTIFY_ERROR_MSG="NOTIFY_ERROR_MSG",(l=a||(a={})).REQUEST_SIGNIN="REQUEST_SIGNIN",l.RECEIVE_SIGNIN_SUCCESS="RECEIVE_SIGNIN_SUCCESS",l.RECEIVE_SIGNIN_FAIL="RECEIVE_SIGNIN_FAIL",l.RECEIVE_SIGNIN_ERROR="RECEIVE_SIGNIN_ERROR",l.RECEIVE_SIGNOUT_SUCCESS="RECEIVE_SIGNOUT_SUCCESS",l.RECEIVE_SIGNOUT_ERROR="RECEIVE_SIGNOUT_ERROR",(f=o||(o={})).RECEIVE_CREATE_ERROR="RECEIVE_CREATE_ERROR",f.RECEIVE_CREATE_SUCCESS="RECEIVE_CREATE_SUCCESS",f.RECEIVE_DELETE_ERROR="RECEIVE_DELETE_ERROR",f.RECEIVE_DELETE_SUCCESS="RECEIVE_DELETE_SUCCESS",f.RECEIVE_UPDATE_ERROR="RECEIVE_UPDATE_ERROR",f.RECEIVE_UPDATE_SUCCESS="RECEIVE_UPDATE_SUCCESS",f.REQUEST_CREATE="REQUEST_CREATE",f.REQUEST_DELETE="REQUEST_DELETE",f.REQUEST_UPDATE="REQUEST_UPDATE",f.UPSERT_CONFIGURATION="UPSERT_CONFIGURATION",f.UPSERT_JOB_RUN="UPSERT_JOB_RUN",f.UPSERT_JOB_RUNS="UPSERT_JOB_RUNS",f.UPSERT_TRANSACTION="UPSERT_TRANSACTION",f.UPSERT_TRANSACTIONS="UPSERT_TRANSACTIONS",f.UPSERT_BUILD_INFO="UPSERT_BUILD_INFO",(d=s||(s={})).FETCH_BUILD_INFO_REQUESTED="FETCH_BUILD_INFO_REQUESTED",d.FETCH_BUILD_INFO_SUCCEEDED="FETCH_BUILD_INFO_SUCCEEDED",d.FETCH_BUILD_INFO_FAILED="FETCH_BUILD_INFO_FAILED"},87013(e,t,n){"use strict";n.d(t,{Y:()=>o,Z:()=>u});var r=n(19084);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:o,t=arguments.length>1?arguments[1]:void 0;return t.type===r.Y0.FETCH_BUILD_INFO_SUCCEEDED?a({},t.buildInfo):e};let u=s},34823(e,t,n){"use strict";n.d(t,{N:()=>r});var r=function(e){return e.buildInfo}},73343(e,t,n){"use strict";n.d(t,{r:()=>u});var r=n(19350),i=n(32316),a=n(59114),o=n(5324),s={props:{MuiGrid:{spacing:3*o.default.unit},MuiCardHeader:{titleTypographyProps:{color:"secondary"}}},palette:{action:{hoverOpacity:.3},primary:{light:"#E5F1FF",main:"#3c40c6",contrastText:"#fff"},secondary:{main:"#3d5170"},success:{light:"#e8faf1",main:r.ek.A700,dark:r.ek[700],contrastText:r.y0.white},warning:{light:"#FFFBF1",main:"#fff6b6",contrastText:"#fad27a"},error:{light:"#ffdada",main:"#f44336",dark:"#d32f2f",contrastText:"#fff"},background:{default:"#f5f6f8",appBar:"#3c40c6"},text:{primary:(0,a.darken)(r.BA.A700,.7),secondary:"#818ea3"},listPendingStatus:{background:"#fef7e5",color:"#fecb4c"},listCompletedStatus:{background:"#e9faf2",color:"#4ed495"}},shape:{borderRadius:o.default.unit},overrides:{MuiButton:{root:{borderRadius:o.default.unit/2,textTransform:"none"},sizeLarge:{padding:void 0,fontSize:void 0,paddingTop:o.default.unit,paddingBottom:o.default.unit,paddingLeft:5*o.default.unit,paddingRight:5*o.default.unit}},MuiTableCell:{body:{fontSize:"1rem"},head:{fontSize:"1rem",fontWeight:400}},MuiCardHeader:{root:{borderBottom:"1px solid rgba(0, 0, 0, 0.12)"},action:{marginTop:-2,marginRight:0,"& >*":{marginLeft:2*o.default.unit}},subheader:{marginTop:.5*o.default.unit}}},typography:{useNextVariants:!0,fontFamily:"-apple-system,BlinkMacSystemFont,Roboto,Helvetica,Arial,sans-serif",button:{textTransform:"none",fontSize:"1.2em"},body1:{fontSize:"1.0rem",fontWeight:400,lineHeight:"1.46429em",color:"rgba(0, 0, 0, 0.87)",letterSpacing:-.4},body2:{fontSize:"1.0rem",fontWeight:500,lineHeight:"1.71429em",color:"rgba(0, 0, 0, 0.87)",letterSpacing:-.4},body1Next:{color:"rgb(29, 29, 29)",fontWeight:400,fontSize:"1rem",lineHeight:1.5,letterSpacing:-.4},body2Next:{color:"rgb(29, 29, 29)",fontWeight:400,fontSize:"0.875rem",lineHeight:1.5,letterSpacing:-.4},display1:{color:"#818ea3",fontSize:"2.125rem",fontWeight:400,lineHeight:"1.20588em",letterSpacing:-.4},display2:{color:"#818ea3",fontSize:"2.8125rem",fontWeight:400,lineHeight:"1.13333em",marginLeft:"-.02em",letterSpacing:-.4},display3:{color:"#818ea3",fontSize:"3.5rem",fontWeight:400,lineHeight:"1.30357em",marginLeft:"-.02em",letterSpacing:-.4},display4:{fontSize:14,fontWeightLight:300,fontWeightMedium:500,fontWeightRegular:400,letterSpacing:-.4},h1:{color:"rgb(29, 29, 29)",fontSize:"6rem",fontWeight:300,lineHeight:1},h2:{color:"rgb(29, 29, 29)",fontSize:"3.75rem",fontWeight:300,lineHeight:1},h3:{color:"rgb(29, 29, 29)",fontSize:"3rem",fontWeight:400,lineHeight:1.04},h4:{color:"rgb(29, 29, 29)",fontSize:"2.125rem",fontWeight:400,lineHeight:1.17},h5:{color:"rgb(29, 29, 29)",fontSize:"1.5rem",fontWeight:400,lineHeight:1.33,letterSpacing:-.4},h6:{fontSize:"0.8rem",fontWeight:450,lineHeight:"1.71429em",color:"rgba(0, 0, 0, 0.87)",letterSpacing:-.4},subheading:{color:"rgb(29, 29, 29)",fontSize:"1rem",fontWeight:400,lineHeight:"1.5em",letterSpacing:-.4},subtitle1:{color:"rgb(29, 29, 29)",fontSize:"1rem",fontWeight:400,lineHeight:1.75,letterSpacing:-.4},subtitle2:{color:"rgb(29, 29, 29)",fontSize:"0.875rem",fontWeight:500,lineHeight:1.57,letterSpacing:-.4}},shadows:["none","0px 1px 3px 0px rgba(0, 0, 0, 0.1),0px 1px 1px 0px rgba(0, 0, 0, 0.04),0px 2px 1px -1px rgba(0, 0, 0, 0.02)","0px 1px 5px 0px rgba(0, 0, 0, 0.1),0px 2px 2px 0px rgba(0, 0, 0, 0.04),0px 3px 1px -2px rgba(0, 0, 0, 0.02)","0px 1px 8px 0px rgba(0, 0, 0, 0.1),0px 3px 4px 0px rgba(0, 0, 0, 0.04),0px 3px 3px -2px rgba(0, 0, 0, 0.02)","0px 2px 4px -1px rgba(0, 0, 0, 0.1),0px 4px 5px 0px rgba(0, 0, 0, 0.04),0px 1px 10px 0px rgba(0, 0, 0, 0.02)","0px 3px 5px -1px rgba(0, 0, 0, 0.1),0px 5px 8px 0px rgba(0, 0, 0, 0.04),0px 1px 14px 0px rgba(0, 0, 0, 0.02)","0px 3px 5px -1px rgba(0, 0, 0, 0.1),0px 6px 10px 0px rgba(0, 0, 0, 0.04),0px 1px 18px 0px rgba(0, 0, 0, 0.02)","0px 4px 5px -2px rgba(0, 0, 0, 0.1),0px 7px 10px 1px rgba(0, 0, 0, 0.04),0px 2px 16px 1px rgba(0, 0, 0, 0.02)","0px 5px 5px -3px rgba(0, 0, 0, 0.1),0px 8px 10px 1px rgba(0, 0, 0, 0.04),0px 3px 14px 2px rgba(0, 0, 0, 0.02)","0px 5px 6px -3px rgba(0, 0, 0, 0.1),0px 9px 12px 1px rgba(0, 0, 0, 0.04),0px 3px 16px 2px rgba(0, 0, 0, 0.02)","0px 6px 6px -3px rgba(0, 0, 0, 0.1),0px 10px 14px 1px rgba(0, 0, 0, 0.04),0px 4px 18px 3px rgba(0, 0, 0, 0.02)","0px 6px 7px -4px rgba(0, 0, 0, 0.1),0px 11px 15px 1px rgba(0, 0, 0, 0.04),0px 4px 20px 3px rgba(0, 0, 0, 0.02)","0px 7px 8px -4px rgba(0, 0, 0, 0.1),0px 12px 17px 2px rgba(0, 0, 0, 0.04),0px 5px 22px 4px rgba(0, 0, 0, 0.02)","0px 7px 8px -4px rgba(0, 0, 0, 0.1),0px 13px 19px 2px rgba(0, 0, 0, 0.04),0px 5px 24px 4px rgba(0, 0, 0, 0.02)","0px 7px 9px -4px rgba(0, 0, 0, 0.1),0px 14px 21px 2px rgba(0, 0, 0, 0.04),0px 5px 26px 4px rgba(0, 0, 0, 0.02)","0px 8px 9px -5px rgba(0, 0, 0, 0.1),0px 15px 22px 2px rgba(0, 0, 0, 0.04),0px 6px 28px 5px rgba(0, 0, 0, 0.02)","0px 8px 10px -5px rgba(0, 0, 0, 0.1),0px 16px 24px 2px rgba(0, 0, 0, 0.04),0px 6px 30px 5px rgba(0, 0, 0, 0.02)","0px 8px 11px -5px rgba(0, 0, 0, 0.1),0px 17px 26px 2px rgba(0, 0, 0, 0.04),0px 6px 32px 5px rgba(0, 0, 0, 0.02)","0px 9px 11px -5px rgba(0, 0, 0, 0.1),0px 18px 28px 2px rgba(0, 0, 0, 0.04),0px 7px 34px 6px rgba(0, 0, 0, 0.02)","0px 9px 12px -6px rgba(0, 0, 0, 0.1),0px 19px 29px 2px rgba(0, 0, 0, 0.04),0px 7px 36px 6px rgba(0, 0, 0, 0.02)","0px 10px 13px -6px rgba(0, 0, 0, 0.1),0px 20px 31px 3px rgba(0, 0, 0, 0.04),0px 8px 38px 7px rgba(0, 0, 0, 0.02)","0px 10px 13px -6px rgba(0, 0, 0, 0.1),0px 21px 33px 3px rgba(0, 0, 0, 0.04),0px 8px 40px 7px rgba(0, 0, 0, 0.02)","0px 10px 14px -6px rgba(0, 0, 0, 0.1),0px 22px 35px 3px rgba(0, 0, 0, 0.04),0px 8px 42px 7px rgba(0, 0, 0, 0.02)","0px 11px 14px -7px rgba(0, 0, 0, 0.1),0px 23px 36px 3px rgba(0, 0, 0, 0.04),0px 9px 44px 8px rgba(0, 0, 0, 0.02)","0px 11px 15px -7px rgba(0, 0, 0, 0.1),0px 24px 38px 3px rgba(0, 0, 0, 0.04),0px 9px 46px 8px rgba(0, 0, 0, 0.02)",]},u=(0,i.createMuiTheme)(s)},66289(e,t,n){"use strict";function r(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function i(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function a(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function o(e,t,n){return(o=a()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&f(i,n.prototype),i}).apply(null,arguments)}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}function c(e){return -1!==Function.toString.call(e).indexOf("[native code]")}function l(e,t){return t&&("object"===p(t)||"function"==typeof t)?t:r(e)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,{V0:()=>B,_7:()=>v});var d,h,p=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function b(e){var t="function"==typeof Map?new Map:void 0;return(b=function(e){if(null===e||!c(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return o(e,arguments,s(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),f(n,e)})(e)}function m(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function g(e){var t=m();return function(){var n,r=s(e);if(t){var i=s(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return l(this,n)}}var v=function(e){u(n,e);var t=g(n);function n(e){var r;return i(this,n),(r=t.call(this,"AuthenticationError(".concat(e.statusText,")"))).errors=[{status:e.status,detail:e},],r}return n}(b(Error)),y=function(e){u(n,e);var t=g(n);function n(e){var r,a=e.errors;return i(this,n),(r=t.call(this,"BadRequestError")).errors=a,r}return n}(b(Error)),w=function(e){u(n,e);var t=g(n);function n(e){var r;return i(this,n),(r=t.call(this,"UnprocessableEntityError")).errors=e,r}return n}(b(Error)),_=function(e){u(n,e);var t=g(n);function n(e){var r;return i(this,n),(r=t.call(this,"ServerError")).errors=e,r}return n}(b(Error)),E=function(e){u(n,e);var t=g(n);function n(e){var r,a=e.errors;return i(this,n),(r=t.call(this,"ConflictError")).errors=a,r}return n}(b(Error)),S=function(e){u(n,e);var t=g(n);function n(e){var r;return i(this,n),(r=t.call(this,"UnknownResponseError(".concat(e.statusText,")"))).errors=[{status:e.status,detail:e.statusText},],r}return n}(b(Error));function k(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2e4;return Promise.race([fetch(e,t),new Promise(function(e,t){return setTimeout(function(){return t(Error("timeout"))},n)}),])}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=200&&e.status<300))return[3,2];return[2,e.json()];case 2:if(400!==e.status)return[3,3];return[2,e.json().then(function(e){throw new y(e)})];case 3:if(401!==e.status)return[3,4];throw new v(e);case 4:if(422!==e.status)return[3,6];return[4,$(e)];case 5:throw n=i.sent(),new w(n);case 6:if(409!==e.status)return[3,7];return[2,e.json().then(function(e){throw new E(e)})];case 7:if(!(e.status>=500))return[3,9];return[4,$(e)];case 8:throw r=i.sent(),new _(r);case 9:throw new S(e);case 10:return[2]}})})).apply(this,arguments)}function $(e){return z.apply(this,arguments)}function z(){return(z=j(function(e){return Y(this,function(t){return[2,e.json().then(function(t){return t.errors?t.errors.map(function(t){return{status:e.status,detail:t.detail}}):G(e)}).catch(function(){return G(e)})]})})).apply(this,arguments)}function G(e){return[{status:e.status,detail:e.statusText},]}},50109(e,t,n){"use strict";n.d(t,{LK:()=>o,U2:()=>i,eT:()=>s,t8:()=>a});var r=n(12795);function i(e){return r.ZP.getItem("chainlink.".concat(e))}function a(e,t){r.ZP.setItem("chainlink.".concat(e),t)}function o(e){var t=i(e),n={};if(t)try{return JSON.parse(t)}catch(r){}return n}function s(e,t){a(e,JSON.stringify(t))}},9541(e,t,n){"use strict";n.d(t,{Ks:()=>u,Tp:()=>a,iR:()=>o,pm:()=>s});var r=n(50109),i="persistURL";function a(){return r.U2(i)||""}function o(e){r.t8(i,e)}function s(){return r.LK("authentication")}function u(e){r.eT("authentication",e)}},67121(e,t,n){"use strict";function r(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}n.r(t),n.d(t,{default:()=>o}),e=n.hmd(e),i="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:e;var i,a=r(i);let o=a},2177(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=!0,i="Invariant failed";function a(e,t){if(!e){if(r)throw Error(i);throw Error(i+": "+(t||""))}}let o=a},11742(e){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;ru,ZT:()=>i,_T:()=>o,ev:()=>c,mG:()=>s,pi:()=>a});var r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function s(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){e.done?n(e.value):i(e.value).then(o,s)}u((r=r.apply(e,t||[])).next())})}function u(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]r})},94927(e,t,n){function r(e,t){if(i("noDeprecation"))return e;var n=!1;function r(){if(!n){if(i("throwDeprecation"))throw Error(t);i("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}return r}function i(e){try{if(!n.g.localStorage)return!1}catch(t){return!1}var r=n.g.localStorage[e];return null!=r&&"true"===String(r).toLowerCase()}e.exports=r},42473(e){"use strict";var t=function(){};e.exports=t},84763(e){e.exports=Worker},47529(e){e.exports=n;var t=Object.prototype.hasOwnProperty;function n(){for(var e={},n=0;ne.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},7071(e){function t(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},94993(e,t,n){var r=n(18698).default,i=n(66115);function a(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return i(e)}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports},6015(e){function t(n,r){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},861(e,t,n){var r=n(63405),i=n(79498),a=n(86116),o=n(42281);function s(e){return r(e)||i(e)||a(e)||o()}e.exports=s,e.exports.__esModule=!0,e.exports.default=e.exports},18698(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},86116(e,t,n){var r=n(73897);function i(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},1644(e,t,n){"use strict";var r,i;function a(e){return!!e&&e<7}n.d(t,{I:()=>r,O:()=>a}),(i=r||(r={}))[i.loading=1]="loading",i[i.setVariables=2]="setVariables",i[i.fetchMore=3]="fetchMore",i[i.refetch=4]="refetch",i[i.poll=6]="poll",i[i.ready=7]="ready",i[i.error=8]="error"},30990(e,t,n){"use strict";n.d(t,{MS:()=>s,YG:()=>a,cA:()=>c,ls:()=>o});var r=n(70655);n(83952);var i=n(13154),a=Symbol();function o(e){return!!e.extensions&&Array.isArray(e.extensions[a])}function s(e){return e.hasOwnProperty("graphQLErrors")}var u=function(e){var t=(0,r.ev)((0,r.ev)((0,r.ev)([],e.graphQLErrors,!0),e.clientErrors,!0),e.protocolErrors,!0);return e.networkError&&t.push(e.networkError),t.map(function(e){return(0,i.s)(e)&&e.message||"Error message not found."}).join("\n")},c=function(e){function t(n){var r=n.graphQLErrors,i=n.protocolErrors,a=n.clientErrors,o=n.networkError,s=n.errorMessage,c=n.extraInfo,l=e.call(this,s)||this;return l.name="ApolloError",l.graphQLErrors=r||[],l.protocolErrors=i||[],l.clientErrors=a||[],l.networkError=o||null,l.message=s||u(l),l.extraInfo=c,l.__proto__=t.prototype,l}return(0,r.ZT)(t,e),t}(Error)},85317(e,t,n){"use strict";n.d(t,{K:()=>a});var r=n(67294),i=n(30320).aS?Symbol.for("__APOLLO_CONTEXT__"):"__APOLLO_CONTEXT__";function a(){var e=r.createContext[i];return e||(Object.defineProperty(r.createContext,i,{value:e=r.createContext({}),enumerable:!1,writable:!1,configurable:!0}),e.displayName="ApolloContext"),e}},21436(e,t,n){"use strict";n.d(t,{O:()=>i,k:()=>r});var r=Array.isArray;function i(e){return Array.isArray(e)&&e.length>0}},30320(e,t,n){"use strict";n.d(t,{DN:()=>s,JC:()=>l,aS:()=>o,mr:()=>i,sy:()=>a});var r=n(83952),i="function"==typeof WeakMap&&"ReactNative"!==(0,r.wY)(function(){return navigator.product}),a="function"==typeof WeakSet,o="function"==typeof Symbol&&"function"==typeof Symbol.for,s=o&&Symbol.asyncIterator,u="function"==typeof(0,r.wY)(function(){return window.document.createElement}),c=(0,r.wY)(function(){return navigator.userAgent.indexOf("jsdom")>=0})||!1,l=u&&!c},53712(e,t,n){"use strict";function r(){for(var e=[],t=0;tr})},10542(e,t,n){"use strict";n.d(t,{J:()=>o}),n(83952);var r=n(13154);function i(e){var t=new Set([e]);return t.forEach(function(e){(0,r.s)(e)&&a(e)===e&&Object.getOwnPropertyNames(e).forEach(function(n){(0,r.s)(e[n])&&t.add(e[n])})}),e}function a(e){if(__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(t){if(t instanceof TypeError)return null;throw t}return e}function o(e){return __DEV__&&i(e),e}},14012(e,t,n){"use strict";n.d(t,{J:()=>a});var r=n(70655),i=n(53712);function a(e,t){return(0,i.o)(e,t,t.variables&&{variables:(0,r.pi)((0,r.pi)({},e&&e.variables),t.variables)})}},13154(e,t,n){"use strict";function r(e){return null!==e&&"object"==typeof e}n.d(t,{s:()=>r})},83952(e,t,n){"use strict";n.d(t,{ej:()=>u,kG:()=>c,wY:()=>h});var r,i=n(70655),a="Invariant Violation",o=Object.setPrototypeOf,s=void 0===o?function(e,t){return e.__proto__=t,e}:o,u=function(e){function t(n){void 0===n&&(n=a);var r=e.call(this,"number"==typeof n?a+": "+n+" (see https://github.com/apollographql/invariant-packages)":n)||this;return r.framesToPop=1,r.name=a,s(r,t.prototype),r}return(0,i.ZT)(t,e),t}(Error);function c(e,t){if(!e)throw new u(t)}var l=["debug","log","warn","error","silent"],f=l.indexOf("log");function d(e){return function(){if(l.indexOf(e)>=f)return(console[e]||console.log).apply(console,arguments)}}function h(e){try{return e()}catch(t){}}(r=c||(c={})).debug=d("debug"),r.log=d("log"),r.warn=d("warn"),r.error=d("error");let p=h(function(){return globalThis})||h(function(){return window})||h(function(){return self})||h(function(){return global})||h(function(){return h.constructor("return this")()});var b="__",m=[b,b].join("DEV");function g(){try{return Boolean(__DEV__)}catch(e){return Object.defineProperty(p,m,{value:"production"!==h(function(){return"production"}),enumerable:!1,configurable:!0,writable:!0}),p[m]}}let v=g();function y(e){try{return e()}catch(t){}}var w=y(function(){return globalThis})||y(function(){return window})||y(function(){return self})||y(function(){return global})||y(function(){return y.constructor("return this")()}),_=!1;function E(){!w||y(function(){return"production"})||y(function(){return process})||(Object.defineProperty(w,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),_=!0)}function S(){_&&(delete w.process,_=!1)}E();var k=n(10143);function x(){return k.H,S()}function T(){__DEV__?c("boolean"==typeof v,v):c("boolean"==typeof v,39)}x(),T()},4942(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{Z:()=>r})},87462(e,t,n){"use strict";function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;tr})},51721(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,{Z:()=>i})},63366(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}n.d(t,{Z:()=>r})},25821(e,t,n){"use strict";n.d(t,{Z:()=>s});var r=n(45695);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a=10,o=2;function s(e){return u(e,[])}function u(e,t){switch(i(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":if(null===e)return"null";return c(e,t);default:return String(e)}}function c(e,t){if(-1!==t.indexOf(e))return"[Circular]";var n=[].concat(t,[e]),r=d(e);if(void 0!==r){var i=r.call(e);if(i!==e)return"string"==typeof i?i:u(i,n)}else if(Array.isArray(e))return f(e,n);return l(e,n)}function l(e,t){var n=Object.keys(e);return 0===n.length?"{}":t.length>o?"["+h(e)+"]":"{ "+n.map(function(n){var r=u(e[n],t);return n+": "+r}).join(", ")+" }"}function f(e,t){if(0===e.length)return"[]";if(t.length>o)return"[Array]";for(var n=Math.min(a,e.length),r=e.length-n,i=[],s=0;s1&&i.push("... ".concat(r," more items")),"["+i.join(", ")+"]"}function d(e){var t=e[String(r.Z)];return"function"==typeof t?t:"function"==typeof e.inspect?e.inspect:void 0}function h(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return t}},45695(e,t,n){"use strict";n.d(t,{Z:()=>i});var r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;let i=r},25217(e,t,n){"use strict";function r(e,t){if(!Boolean(e))throw Error(null!=t?t:"Unexpected invariant triggered.")}n.d(t,{Ye:()=>o,WU:()=>s,UG:()=>u});var i=n(45695);function a(e){var t=e.prototype.toJSON;"function"==typeof t||r(0),e.prototype.inspect=t,i.Z&&(e.prototype[i.Z]=t)}var o=function(){function e(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();a(o);var s=function(){function e(e,t,n,r,i,a,o){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=o,this.prev=a,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();function u(e){return null!=e&&"string"==typeof e.kind}a(s)},87392(e,t,n){"use strict";function r(e){var t=e.split(/\r\n|[\n\r]/g),n=a(e);if(0!==n)for(var r=1;ro&&i(t[s-1]);)--s;return t.slice(o,s).join("\n")}function i(e){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===e.indexOf("\n"),i=" "===e[0]||" "===e[0],a='"'===e[e.length-1],o="\\"===e[e.length-1],s=!r||a||o||n,u="";return s&&!(r&&i)&&(u+="\n"+t),u+=t?e.replace(/\n/g,"\n"+t):e,s&&(u+="\n"),'"""'+u.replace(/"""/g,'\\"""')+'"""'}n.d(t,{LZ:()=>o,W7:()=>r})},97359(e,t,n){"use strict";n.d(t,{h:()=>r});var r=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"})},10143(e,t,n){"use strict";n.d(t,{H:()=>c,T:()=>l});var r=n(99763),i=n(25821);function a(e,t){if(!Boolean(e))throw Error(t)}let o=function(e,t){return e instanceof t};function s(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof e||a(0,"Body must be a string. Received: ".concat((0,i.Z)(e),".")),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||a(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||a(0,"column in locationOffset is 1-indexed and must be positive.")}return u(e,[{key:r.YF,get:function(){return"Source"}}]),e}();function l(e){return o(e,c)}},99763(e,t,n){"use strict";n.d(t,{YF:()=>r});var r="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag"},37452(e){"use strict";e.exports=JSON.parse('{"AElig":"\xc6","AMP":"&","Aacute":"\xc1","Acirc":"\xc2","Agrave":"\xc0","Aring":"\xc5","Atilde":"\xc3","Auml":"\xc4","COPY":"\xa9","Ccedil":"\xc7","ETH":"\xd0","Eacute":"\xc9","Ecirc":"\xca","Egrave":"\xc8","Euml":"\xcb","GT":">","Iacute":"\xcd","Icirc":"\xce","Igrave":"\xcc","Iuml":"\xcf","LT":"<","Ntilde":"\xd1","Oacute":"\xd3","Ocirc":"\xd4","Ograve":"\xd2","Oslash":"\xd8","Otilde":"\xd5","Ouml":"\xd6","QUOT":"\\"","REG":"\xae","THORN":"\xde","Uacute":"\xda","Ucirc":"\xdb","Ugrave":"\xd9","Uuml":"\xdc","Yacute":"\xdd","aacute":"\xe1","acirc":"\xe2","acute":"\xb4","aelig":"\xe6","agrave":"\xe0","amp":"&","aring":"\xe5","atilde":"\xe3","auml":"\xe4","brvbar":"\xa6","ccedil":"\xe7","cedil":"\xb8","cent":"\xa2","copy":"\xa9","curren":"\xa4","deg":"\xb0","divide":"\xf7","eacute":"\xe9","ecirc":"\xea","egrave":"\xe8","eth":"\xf0","euml":"\xeb","frac12":"\xbd","frac14":"\xbc","frac34":"\xbe","gt":">","iacute":"\xed","icirc":"\xee","iexcl":"\xa1","igrave":"\xec","iquest":"\xbf","iuml":"\xef","laquo":"\xab","lt":"<","macr":"\xaf","micro":"\xb5","middot":"\xb7","nbsp":"\xa0","not":"\xac","ntilde":"\xf1","oacute":"\xf3","ocirc":"\xf4","ograve":"\xf2","ordf":"\xaa","ordm":"\xba","oslash":"\xf8","otilde":"\xf5","ouml":"\xf6","para":"\xb6","plusmn":"\xb1","pound":"\xa3","quot":"\\"","raquo":"\xbb","reg":"\xae","sect":"\xa7","shy":"\xad","sup1":"\xb9","sup2":"\xb2","sup3":"\xb3","szlig":"\xdf","thorn":"\xfe","times":"\xd7","uacute":"\xfa","ucirc":"\xfb","ugrave":"\xf9","uml":"\xa8","uuml":"\xfc","yacute":"\xfd","yen":"\xa5","yuml":"\xff"}')},93580(e){"use strict";e.exports=JSON.parse('{"0":"�","128":"€","130":"‚","131":"ƒ","132":"„","133":"…","134":"†","135":"‡","136":"ˆ","137":"‰","138":"Š","139":"‹","140":"Œ","142":"Ž","145":"‘","146":"’","147":"“","148":"”","149":"•","150":"–","151":"—","152":"˜","153":"™","154":"š","155":"›","156":"œ","158":"ž","159":"Ÿ"}')},67946(e){"use strict";e.exports=JSON.parse('{"locale":"en","long":{"year":{"previous":"last year","current":"this year","next":"next year","past":{"one":"{0} year ago","other":"{0} years ago"},"future":{"one":"in {0} year","other":"in {0} years"}},"quarter":{"previous":"last quarter","current":"this quarter","next":"next quarter","past":{"one":"{0} quarter ago","other":"{0} quarters ago"},"future":{"one":"in {0} quarter","other":"in {0} quarters"}},"month":{"previous":"last month","current":"this month","next":"next month","past":{"one":"{0} month ago","other":"{0} months ago"},"future":{"one":"in {0} month","other":"in {0} months"}},"week":{"previous":"last week","current":"this week","next":"next week","past":{"one":"{0} week ago","other":"{0} weeks ago"},"future":{"one":"in {0} week","other":"in {0} weeks"}},"day":{"previous":"yesterday","current":"today","next":"tomorrow","past":{"one":"{0} day ago","other":"{0} days ago"},"future":{"one":"in {0} day","other":"in {0} days"}},"hour":{"current":"this hour","past":{"one":"{0} hour ago","other":"{0} hours ago"},"future":{"one":"in {0} hour","other":"in {0} hours"}},"minute":{"current":"this minute","past":{"one":"{0} minute ago","other":"{0} minutes ago"},"future":{"one":"in {0} minute","other":"in {0} minutes"}},"second":{"current":"now","past":{"one":"{0} second ago","other":"{0} seconds ago"},"future":{"one":"in {0} second","other":"in {0} seconds"}}},"short":{"year":{"previous":"last yr.","current":"this yr.","next":"next yr.","past":"{0} yr. ago","future":"in {0} yr."},"quarter":{"previous":"last qtr.","current":"this qtr.","next":"next qtr.","past":{"one":"{0} qtr. ago","other":"{0} qtrs. ago"},"future":{"one":"in {0} qtr.","other":"in {0} qtrs."}},"month":{"previous":"last mo.","current":"this mo.","next":"next mo.","past":"{0} mo. ago","future":"in {0} mo."},"week":{"previous":"last wk.","current":"this wk.","next":"next wk.","past":"{0} wk. ago","future":"in {0} wk."},"day":{"previous":"yesterday","current":"today","next":"tomorrow","past":{"one":"{0} day ago","other":"{0} days ago"},"future":{"one":"in {0} day","other":"in {0} days"}},"hour":{"current":"this hour","past":"{0} hr. ago","future":"in {0} hr."},"minute":{"current":"this minute","past":"{0} min. ago","future":"in {0} min."},"second":{"current":"now","past":"{0} sec. ago","future":"in {0} sec."}},"narrow":{"year":{"previous":"last yr.","current":"this yr.","next":"next yr.","past":"{0} yr. ago","future":"in {0} yr."},"quarter":{"previous":"last qtr.","current":"this qtr.","next":"next qtr.","past":{"one":"{0} qtr. ago","other":"{0} qtrs. ago"},"future":{"one":"in {0} qtr.","other":"in {0} qtrs."}},"month":{"previous":"last mo.","current":"this mo.","next":"next mo.","past":"{0} mo. ago","future":"in {0} mo."},"week":{"previous":"last wk.","current":"this wk.","next":"next wk.","past":"{0} wk. ago","future":"in {0} wk."},"day":{"previous":"yesterday","current":"today","next":"tomorrow","past":{"one":"{0} day ago","other":"{0} days ago"},"future":{"one":"in {0} day","other":"in {0} days"}},"hour":{"current":"this hour","past":"{0} hr. ago","future":"in {0} hr."},"minute":{"current":"this minute","past":"{0} min. ago","future":"in {0} min."},"second":{"current":"now","past":"{0} sec. ago","future":"in {0} sec."}},"now":{"now":{"current":"now","future":"in a moment","past":"just now"}},"mini":{"year":"{0}yr","month":"{0}mo","week":"{0}wk","day":"{0}d","hour":"{0}h","minute":"{0}m","second":"{0}s","now":"now"},"short-time":{"year":"{0} yr.","month":"{0} mo.","week":"{0} wk.","day":{"one":"{0} day","other":"{0} days"},"hour":"{0} hr.","minute":"{0} min.","second":"{0} sec."},"long-time":{"year":{"one":"{0} year","other":"{0} years"},"month":{"one":"{0} month","other":"{0} months"},"week":{"one":"{0} week","other":"{0} weeks"},"day":{"one":"{0} day","other":"{0} days"},"hour":{"one":"{0} hour","other":"{0} hours"},"minute":{"one":"{0} minute","other":"{0} minutes"},"second":{"one":"{0} second","other":"{0} seconds"}}}')}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(n.exports,n,n.exports,__webpack_require__),n.loaded=!0,n.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;__webpack_require__.t=function(n,r){if(1&r&&(n=this(n)),8&r||"object"==typeof n&&n&&(4&r&&n.__esModule||16&r&&"function"==typeof n.then))return n;var i=Object.create(null);__webpack_require__.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var o=2&r&&n;"object"==typeof o&&!~e.indexOf(o);o=t(o))Object.getOwnPropertyNames(o).forEach(e=>a[e]=()=>n[e]);return a.default=()=>n,__webpack_require__.d(i,a),i}})(),__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set(){throw Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),__webpack_require__.p="/assets/",__webpack_require__.nc=void 0;var __webpack_exports__={};(()=>{"use strict";var e,t,n,r,i=__webpack_require__(32316),a=__webpack_require__(8126),o=__webpack_require__(5690),s=__webpack_require__(30381),u=__webpack_require__.n(s),c=__webpack_require__(67294),l=__webpack_require__(73935),f=__webpack_require__.n(l),d=__webpack_require__(57209),h=__webpack_require__(37703),p=__webpack_require__(97779),b=__webpack_require__(28500);function m(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(i){return"function"==typeof i?i(n,r,e):t(i)}}}}var g=m();g.withExtraArgument=m;let v=g;var y=__webpack_require__(76489);function w(e){return function(t){return function(n){return function(r){n(r);var i=e||document&&document.cookie||"",a=t.getState();if("MATCH_ROUTE"===r.type&&"/signin"!==a.notifications.currentUrl){var o=(0,y.Q)(i);if(o.explorer)try{var s=JSON.parse(o.explorer);if("error"===s.status){var u=_(s.url);n({type:"NOTIFY_ERROR_MSG",msg:u})}}catch(c){n({type:"NOTIFY_ERROR_MSG",msg:"Invalid explorer status"})}}}}}}function _(e){var t="Can't connect to explorer: ".concat(e);return e.match(/^wss?:.+/)?t:"".concat(t,". You must use a websocket.")}var E=__webpack_require__(16353);function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ei(e,t){if(e){if("string"==typeof e)return ea(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ea(e,t)}}function ea(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n1,i=!1,a=arguments[1],o=a;return new n(function(n){return t.subscribe({next:function(t){var a=!i;if(i=!0,!a||r)try{o=e(o,t)}catch(s){return n.error(s)}else o=t},error:function(e){n.error(e)},complete:function(){if(!i&&!r)return n.error(TypeError("Cannot reduce an empty sequence"));n.next(o),n.complete()}})})},t.concat=function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r=0&&i.splice(e,1),o()}});i.push(s)},error:function(e){r.error(e)},complete:function(){o()}});function o(){a.closed&&0===i.length&&r.complete()}return function(){i.forEach(function(e){return e.unsubscribe()}),a.unsubscribe()}})},t[ed]=function(){return this},e.from=function(t){var n="function"==typeof this?this:e;if(null==t)throw TypeError(t+" is not an object");var r=ep(t,ed);if(r){var i=r.call(t);if(Object(i)!==i)throw TypeError(i+" is not an object");return em(i)&&i.constructor===n?i:new n(function(e){return i.subscribe(e)})}if(ec("iterator")&&(r=ep(t,ef)))return new n(function(e){ev(function(){if(!e.closed){for(var n,i=er(r.call(t));!(n=i()).done;){var a=n.value;if(e.next(a),e.closed)return}e.complete()}})});if(Array.isArray(t))return new n(function(e){ev(function(){if(!e.closed){for(var n=0;n0))return n.connection.key;var r=n.connection.filter?n.connection.filter:[];r.sort();var i={};return r.forEach(function(e){i[e]=t[e]}),"".concat(n.connection.key,"(").concat(eV(i),")")}var a=e;if(t){var o=eV(t);a+="(".concat(o,")")}return n&&Object.keys(n).forEach(function(e){-1===eW.indexOf(e)&&(n[e]&&Object.keys(n[e]).length?a+="@".concat(e,"(").concat(eV(n[e]),")"):a+="@".concat(e))}),a},{setStringify:function(e){var t=eV;return eV=e,t}}),eV=function(e){return JSON.stringify(e,eq)};function eq(e,t){return(0,eO.s)(t)&&!Array.isArray(t)&&(t=Object.keys(t).sort().reduce(function(e,n){return e[n]=t[n],e},{})),t}function eZ(e,t){if(e.arguments&&e.arguments.length){var n={};return e.arguments.forEach(function(e){var r;return ez(n,e.name,e.value,t)}),n}return null}function eX(e){return e.alias?e.alias.value:e.name.value}function eJ(e,t,n){for(var r,i=0,a=t.selections;it.indexOf(i))throw __DEV__?new Q.ej("illegal argument: ".concat(i)):new Q.ej(27)}return e}function tt(e,t){return t?t(e):eT.of()}function tn(e){return"function"==typeof e?new ta(e):e}function tr(e){return e.request.length<=1}var ti=function(e){function t(t,n){var r=e.call(this,t)||this;return r.link=n,r}return(0,en.ZT)(t,e),t}(Error),ta=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e(function(){return eT.of()})},e.from=function(t){return 0===t.length?e.empty():t.map(tn).reduce(function(e,t){return e.concat(t)})},e.split=function(t,n,r){var i=tn(n),a=tn(r||new e(tt));return new e(tr(i)&&tr(a)?function(e){return t(e)?i.request(e)||eT.of():a.request(e)||eT.of()}:function(e,n){return t(e)?i.request(e,n)||eT.of():a.request(e,n)||eT.of()})},e.execute=function(e,t){return e.request(eM(t.context,e7(te(t))))||eT.of()},e.concat=function(t,n){var r=tn(t);if(tr(r))return __DEV__&&Q.kG.warn(new ti("You are calling concat on a terminating link, which will have no effect",r)),r;var i=tn(n);return new e(tr(i)?function(e){return r.request(e,function(e){return i.request(e)||eT.of()})||eT.of()}:function(e,t){return r.request(e,function(e){return i.request(e,t)||eT.of()})||eT.of()})},e.prototype.split=function(t,n,r){return this.concat(e.split(t,n,r||new e(tt)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw __DEV__?new Q.ej("request is not implemented"):new Q.ej(22)},e.prototype.onError=function(e,t){if(t&&t.error)return t.error(e),!1;throw e},e.prototype.setOnError=function(e){return this.onError=e,this},e}(),to=__webpack_require__(25821),ts=__webpack_require__(25217),tu={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},tc=Object.freeze({});function tl(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:tu,r=void 0,i=Array.isArray(e),a=[e],o=-1,s=[],u=void 0,c=void 0,l=void 0,f=[],d=[],h=e;do{var p,b=++o===a.length,m=b&&0!==s.length;if(b){if(c=0===d.length?void 0:f[f.length-1],u=l,l=d.pop(),m){if(i)u=u.slice();else{for(var g={},v=0,y=Object.keys(u);v1)for(var r=new tB,i=1;i=0;--a){var o=i[a],s=isNaN(+o)?{}:[];s[o]=t,t=s}n=r.merge(n,t)}),n}var tW=Object.prototype.hasOwnProperty;function tK(e,t){var n,r,i,a,o;return(0,en.mG)(this,void 0,void 0,function(){var s,u,c,l,f,d,h,p,b,m,g,v,y,w,_,E,S,k,x,T,M,O,A;return(0,en.Jh)(this,function(L){switch(L.label){case 0:if(void 0===TextDecoder)throw Error("TextDecoder must be defined in the environment: please import a polyfill.");s=new TextDecoder("utf-8"),u=null===(n=e.headers)||void 0===n?void 0:n.get("content-type"),c="boundary=",l=(null==u?void 0:u.includes(c))?null==u?void 0:u.substring((null==u?void 0:u.indexOf(c))+c.length).replace(/['"]/g,"").replace(/\;(.*)/gm,"").trim():"-",f="\r\n--".concat(l),d="",h=tI(e),p=!0,L.label=1;case 1:if(!p)return[3,3];return[4,h.next()];case 2:for(m=(b=L.sent()).value,g=b.done,v="string"==typeof m?m:s.decode(m),y=d.length-f.length+1,p=!g,d+=v,w=d.indexOf(f,y);w>-1;){if(_=void 0,_=(O=[d.slice(0,w),d.slice(w+f.length),])[0],d=O[1],E=_.indexOf("\r\n\r\n"),(k=(S=tV(_.slice(0,E)))["content-type"])&&-1===k.toLowerCase().indexOf("application/json"))throw Error("Unsupported patch content type: application/json is required.");if(x=_.slice(E))try{T=tq(e,x),Object.keys(T).length>1||"data"in T||"incremental"in T||"errors"in T||"payload"in T?tz(T)?(M={},"payload"in T&&(M=(0,en.pi)({},T.payload)),"errors"in T&&(M=(0,en.pi)((0,en.pi)({},M),{extensions:(0,en.pi)((0,en.pi)({},"extensions"in M?M.extensions:null),((A={})[tN.YG]=T.errors,A))})),null===(r=t.next)||void 0===r||r.call(t,M)):null===(i=t.next)||void 0===i||i.call(t,T):1===Object.keys(T).length&&"hasNext"in T&&!T.hasNext&&(null===(a=t.complete)||void 0===a||a.call(t))}catch(C){tZ(C,t)}w=d.indexOf(f)}return[3,1];case 3:return null===(o=t.complete)||void 0===o||o.call(t),[2]}})})}function tV(e){var t={};return e.split("\n").forEach(function(e){var n=e.indexOf(":");if(n>-1){var r=e.slice(0,n).trim().toLowerCase(),i=e.slice(n+1).trim();t[r]=i}}),t}function tq(e,t){e.status>=300&&tD(e,function(){try{return JSON.parse(t)}catch(e){return t}}(),"Response not successful: Received status code ".concat(e.status));try{return JSON.parse(t)}catch(n){var r=n;throw r.name="ServerParseError",r.response=e,r.statusCode=e.status,r.bodyText=t,r}}function tZ(e,t){var n,r;"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&(null===(n=t.next)||void 0===n||n.call(t,e.result)),null===(r=t.error)||void 0===r||r.call(t,e))}function tX(e,t,n){tJ(t)(e).then(function(e){var t,r;null===(t=n.next)||void 0===t||t.call(n,e),null===(r=n.complete)||void 0===r||r.call(n)}).catch(function(e){return tZ(e,n)})}function tJ(e){return function(t){return t.text().then(function(e){return tq(t,e)}).then(function(n){return t.status>=300&&tD(t,n,"Response not successful: Received status code ".concat(t.status)),Array.isArray(n)||tW.call(n,"data")||tW.call(n,"errors")||tD(t,n,"Server response was missing for query '".concat(Array.isArray(e)?e.map(function(e){return e.operationName}):e.operationName,"'.")),n})}}var tQ=function(e){if(!e&&"undefined"==typeof fetch)throw __DEV__?new Q.ej("\n\"fetch\" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:\n\nimport fetch from 'cross-fetch';\nimport { ApolloClient, HttpLink } from '@apollo/client';\nconst client = new ApolloClient({\n link: new HttpLink({ uri: '/graphql', fetch })\n});\n "):new Q.ej(23)},t1=__webpack_require__(87392);function t0(e){return tl(e,{leave:t3})}var t2=80,t3={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return t6(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,n=e.name,r=t8("(",t6(e.variableDefinitions,", "),")"),i=t6(e.directives," "),a=e.selectionSet;return n||i||r||"query"!==t?t6([t,t6([n,r]),i,a]," "):a},VariableDefinition:function(e){var t=e.variable,n=e.type,r=e.defaultValue,i=e.directives;return t+": "+n+t8(" = ",r)+t8(" ",t6(i," "))},SelectionSet:function(e){return t5(e.selections)},Field:function(e){var t=e.alias,n=e.name,r=e.arguments,i=e.directives,a=e.selectionSet,o=t8("",t,": ")+n,s=o+t8("(",t6(r,", "),")");return s.length>t2&&(s=o+t8("(\n",t9(t6(r,"\n")),"\n)")),t6([s,t6(i," "),a]," ")},Argument:function(e){var t;return e.name+": "+e.value},FragmentSpread:function(e){var t;return"..."+e.name+t8(" ",t6(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,n=e.directives,r=e.selectionSet;return t6(["...",t8("on ",t),t6(n," "),r]," ")},FragmentDefinition:function(e){var t=e.name,n=e.typeCondition,r=e.variableDefinitions,i=e.directives,a=e.selectionSet;return"fragment ".concat(t).concat(t8("(",t6(r,", "),")")," ")+"on ".concat(n," ").concat(t8("",t6(i," ")," "))+a},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?(0,t1.LZ)(n,"description"===t?"":" "):JSON.stringify(n)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+t6(e.values,", ")+"]"},ObjectValue:function(e){return"{"+t6(e.fields,", ")+"}"},ObjectField:function(e){var t;return e.name+": "+e.value},Directive:function(e){var t;return"@"+e.name+t8("(",t6(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:t4(function(e){var t=e.directives,n=e.operationTypes;return t6(["schema",t6(t," "),t5(n)]," ")}),OperationTypeDefinition:function(e){var t;return e.operation+": "+e.type},ScalarTypeDefinition:t4(function(e){var t;return t6(["scalar",e.name,t6(e.directives," ")]," ")}),ObjectTypeDefinition:t4(function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return t6(["type",t,t8("implements ",t6(n," & ")),t6(r," "),t5(i)]," ")}),FieldDefinition:t4(function(e){var t=e.name,n=e.arguments,r=e.type,i=e.directives;return t+(ne(n)?t8("(\n",t9(t6(n,"\n")),"\n)"):t8("(",t6(n,", "),")"))+": "+r+t8(" ",t6(i," "))}),InputValueDefinition:t4(function(e){var t=e.name,n=e.type,r=e.defaultValue,i=e.directives;return t6([t+": "+n,t8("= ",r),t6(i," ")]," ")}),InterfaceTypeDefinition:t4(function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return t6(["interface",t,t8("implements ",t6(n," & ")),t6(r," "),t5(i)]," ")}),UnionTypeDefinition:t4(function(e){var t=e.name,n=e.directives,r=e.types;return t6(["union",t,t6(n," "),r&&0!==r.length?"= "+t6(r," | "):""]," ")}),EnumTypeDefinition:t4(function(e){var t=e.name,n=e.directives,r=e.values;return t6(["enum",t,t6(n," "),t5(r)]," ")}),EnumValueDefinition:t4(function(e){var t;return t6([e.name,t6(e.directives," ")]," ")}),InputObjectTypeDefinition:t4(function(e){var t=e.name,n=e.directives,r=e.fields;return t6(["input",t,t6(n," "),t5(r)]," ")}),DirectiveDefinition:t4(function(e){var t=e.name,n=e.arguments,r=e.repeatable,i=e.locations;return"directive @"+t+(ne(n)?t8("(\n",t9(t6(n,"\n")),"\n)"):t8("(",t6(n,", "),")"))+(r?" repeatable":"")+" on "+t6(i," | ")}),SchemaExtension:function(e){var t=e.directives,n=e.operationTypes;return t6(["extend schema",t6(t," "),t5(n)]," ")},ScalarTypeExtension:function(e){var t;return t6(["extend scalar",e.name,t6(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return t6(["extend type",t,t8("implements ",t6(n," & ")),t6(r," "),t5(i)]," ")},InterfaceTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return t6(["extend interface",t,t8("implements ",t6(n," & ")),t6(r," "),t5(i)]," ")},UnionTypeExtension:function(e){var t=e.name,n=e.directives,r=e.types;return t6(["extend union",t,t6(n," "),r&&0!==r.length?"= "+t6(r," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,n=e.directives,r=e.values;return t6(["extend enum",t,t6(n," "),t5(r)]," ")},InputObjectTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return t6(["extend input",t,t6(n," "),t5(r)]," ")}};function t4(e){return function(t){return t6([t.description,e(t)],"\n")}}function t6(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter(function(e){return e}).join(n))&&void 0!==t?t:""}function t5(e){return t8("{\n",t9(t6(e,"\n")),"\n}")}function t8(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return null!=t&&""!==t?e+t+n:""}function t9(e){return t8(" ",e.replace(/\n/g,"\n "))}function t7(e){return -1!==e.indexOf("\n")}function ne(e){return null!=e&&e.some(t7)}var nt,nn,nr,ni={http:{includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},na=function(e,t){return t(e)};function no(e,t){for(var n=[],r=2;rObject.create(null),{forEach:nv,slice:ny}=Array.prototype,{hasOwnProperty:nw}=Object.prototype;class n_{constructor(e=!0,t=ng){this.weakness=e,this.makeData=t}lookup(...e){return this.lookupArray(e)}lookupArray(e){let t=this;return nv.call(e,e=>t=t.getChildTrie(e)),nw.call(t,"data")?t.data:t.data=this.makeData(ny.call(e))}peek(...e){return this.peekArray(e)}peekArray(e){let t=this;for(let n=0,r=e.length;t&&n=0;--o)t.definitions[o].kind===nL.h.OPERATION_DEFINITION&&++a;var s=nN(e),u=e.some(function(e){return e.remove}),c=function(e){return u&&e&&e.some(s)},l=new Map,f=!1,d={enter:function(e){if(c(e.directives))return f=!0,null}},h=tl(t,{Field:d,InlineFragment:d,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(e,t,n,r,a){var o=i(a);o&&o.variables.add(e.name.value)}},FragmentSpread:{enter:function(e,t,n,r,a){if(c(e.directives))return f=!0,null;var o=i(a);o&&o.fragmentSpreads.add(e.name.value)}},FragmentDefinition:{enter:function(e,t,n,r){l.set(JSON.stringify(r),e)},leave:function(e,t,n,i){return e===l.get(JSON.stringify(i))?e:a>0&&e.selectionSet.selections.every(function(e){return e.kind===nL.h.FIELD&&"__typename"===e.name.value})?(r(e.name.value).removed=!0,f=!0,null):void 0}},Directive:{leave:function(e){if(s(e))return f=!0,null}}});if(!f)return t;var p=function(e){return e.transitiveVars||(e.transitiveVars=new Set(e.variables),e.removed||e.fragmentSpreads.forEach(function(t){p(r(t)).transitiveVars.forEach(function(t){e.transitiveVars.add(t)})})),e},b=new Set;h.definitions.forEach(function(e){e.kind===nL.h.OPERATION_DEFINITION?p(n(e.name&&e.name.value)).fragmentSpreads.forEach(function(e){b.add(e)}):e.kind!==nL.h.FRAGMENT_DEFINITION||0!==a||r(e.name.value).removed||b.add(e.name.value)}),b.forEach(function(e){p(r(e)).fragmentSpreads.forEach(function(e){b.add(e)})});var m=function(e){return!!(!b.has(e)||r(e).removed)},g={enter:function(e){if(m(e.name.value))return null}};return nD(tl(h,{FragmentSpread:g,FragmentDefinition:g,OperationDefinition:{leave:function(e){if(e.variableDefinitions){var t=p(n(e.name&&e.name.value)).transitiveVars;if(t.size0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach(function(e){return e.unsubscribe()}),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t}(eT);function n4(e){var t=e.options,n=t.fetchPolicy,r=t.nextFetchPolicy;return"cache-and-network"===n||"network-only"===n?e.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(){return(this.nextFetchPolicy=r,"function"==typeof r)?r.apply(this,arguments):n}}):e.reobserve()}function n6(e){__DEV__&&Q.kG.error("Unhandled error",e.message,e.stack)}function n5(e){__DEV__&&e&&__DEV__&&Q.kG.debug("Missing cache result fields: ".concat(JSON.stringify(e)),e)}function n8(e){return"network-only"===e||"no-cache"===e||"standby"===e}nK(n3);function n9(e){return e.kind===nL.h.FIELD||e.kind===nL.h.FRAGMENT_SPREAD||e.kind===nL.h.INLINE_FRAGMENT}function n7(e){return e.kind===Kind.SCALAR_TYPE_DEFINITION||e.kind===Kind.OBJECT_TYPE_DEFINITION||e.kind===Kind.INTERFACE_TYPE_DEFINITION||e.kind===Kind.UNION_TYPE_DEFINITION||e.kind===Kind.ENUM_TYPE_DEFINITION||e.kind===Kind.INPUT_OBJECT_TYPE_DEFINITION}function re(e){return e.kind===Kind.SCALAR_TYPE_EXTENSION||e.kind===Kind.OBJECT_TYPE_EXTENSION||e.kind===Kind.INTERFACE_TYPE_EXTENSION||e.kind===Kind.UNION_TYPE_EXTENSION||e.kind===Kind.ENUM_TYPE_EXTENSION||e.kind===Kind.INPUT_OBJECT_TYPE_EXTENSION}var rt=function(){return Object.create(null)},rn=Array.prototype,rr=rn.forEach,ri=rn.slice,ra=function(){function e(e,t){void 0===e&&(e=!0),void 0===t&&(t=rt),this.weakness=e,this.makeData=t}return e.prototype.lookup=function(){for(var e=[],t=0;tclass{constructor(){this.id=["slot",rc++,Date.now(),Math.random().toString(36).slice(2),].join(":")}hasValue(){for(let e=rs;e;e=e.parent)if(this.id in e.slots){let t=e.slots[this.id];if(t===ru)break;return e!==rs&&(rs.slots[this.id]=t),!0}return rs&&(rs.slots[this.id]=ru),!1}getValue(){if(this.hasValue())return rs.slots[this.id]}withValue(e,t,n,r){let i={__proto__:null,[this.id]:e},a=rs;rs={parent:a,slots:i};try{return t.apply(r,n)}finally{rs=a}}static bind(e){let t=rs;return function(){let n=rs;try{return rs=t,e.apply(this,arguments)}finally{rs=n}}}static noContext(e,t,n){if(!rs)return e.apply(n,t);{let r=rs;try{return rs=null,e.apply(n,t)}finally{rs=r}}}};function rf(e){try{return e()}catch(t){}}let rd="@wry/context:Slot",rh=rf(()=>globalThis)||rf(()=>global)||Object.create(null),rp=rh,rb=rp[rd]||Array[rd]||function(e){try{Object.defineProperty(rp,rd,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(rl()),{bind:rm,noContext:rg}=rb;function rv(){}var ry=function(){function e(e,t){void 0===e&&(e=1/0),void 0===t&&(t=rv),this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}return e.prototype.has=function(e){return this.map.has(e)},e.prototype.get=function(e){var t=this.getNode(e);return t&&t.value},e.prototype.getNode=function(e){var t=this.map.get(e);if(t&&t!==this.newest){var n=t.older,r=t.newer;r&&(r.older=n),n&&(n.newer=r),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=r)}return t},e.prototype.set=function(e,t){var n=this.getNode(e);return n?n.value=t:(n={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.map.set(e,n),n.value)},e.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},e.prototype.delete=function(e){var t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)},e}(),rw=new rb,r_=Object.prototype.hasOwnProperty,rE=void 0===(n=Array.from)?function(e){var t=[];return e.forEach(function(e){return t.push(e)}),t}:n;function rS(e){var t=e.unsubscribe;"function"==typeof t&&(e.unsubscribe=void 0,t())}var rk=[],rx=100;function rT(e,t){if(!e)throw Error(t||"assertion failure")}function rM(e,t){var n=e.length;return n>0&&n===t.length&&e[n-1]===t[n-1]}function rO(e){switch(e.length){case 0:throw Error("unknown value");case 1:return e[0];case 2:throw e[1]}}function rA(e){return e.slice(0)}var rL=function(){function e(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++e.count}return e.prototype.peek=function(){if(1===this.value.length&&!rN(this))return rC(this),this.value[0]},e.prototype.recompute=function(e){return rT(!this.recomputing,"already recomputing"),rC(this),rN(this)?rI(this,e):rO(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,rR(this),rS(this))},e.prototype.dispose=function(){var e=this;this.setDirty(),rH(this),rF(this,function(t,n){t.setDirty(),r$(t,e)})},e.prototype.forget=function(){this.dispose()},e.prototype.dependOn=function(e){e.add(this),this.deps||(this.deps=rk.pop()||new Set),this.deps.add(e)},e.prototype.forgetDeps=function(){var e=this;this.deps&&(rE(this.deps).forEach(function(t){return t.delete(e)}),this.deps.clear(),rk.push(this.deps),this.deps=null)},e.count=0,e}();function rC(e){var t=rw.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),rN(e)?rY(t,e):rB(t,e),t}function rI(e,t){return rH(e),rw.withValue(e,rD,[e,t]),rz(e,t)&&rP(e),rO(e.value)}function rD(e,t){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,t)}catch(n){e.value[1]=n}e.recomputing=!1}function rN(e){return e.dirty||!!(e.dirtyChildren&&e.dirtyChildren.size)}function rP(e){e.dirty=!1,!rN(e)&&rj(e)}function rR(e){rF(e,rY)}function rj(e){rF(e,rB)}function rF(e,t){var n=e.parents.size;if(n)for(var r=rE(e.parents),i=0;i0&&e.childValues.forEach(function(t,n){r$(e,n)}),e.forgetDeps(),rT(null===e.dirtyChildren)}function r$(e,t){t.parents.delete(e),e.childValues.delete(t),rU(e,t)}function rz(e,t){if("function"==typeof e.subscribe)try{rS(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(n){return e.setDirty(),!1}return!0}var rG={setDirty:!0,dispose:!0,forget:!0};function rW(e){var t=new Map,n=e&&e.subscribe;function r(e){var r=rw.getValue();if(r){var i=t.get(e);i||t.set(e,i=new Set),r.dependOn(i),"function"==typeof n&&(rS(i),i.unsubscribe=n(e))}}return r.dirty=function(e,n){var r=t.get(e);if(r){var i=n&&r_.call(rG,n)?n:"setDirty";rE(r).forEach(function(e){return e[i]()}),t.delete(e),rS(r)}},r}function rK(){var e=new ra("function"==typeof WeakMap);return function(){return e.lookupArray(arguments)}}var rV=rK(),rq=new Set;function rZ(e,t){void 0===t&&(t=Object.create(null));var n=new ry(t.max||65536,function(e){return e.dispose()}),r=t.keyArgs,i=t.makeCacheKey||rK(),a=function(){var a=i.apply(null,r?r.apply(null,arguments):arguments);if(void 0===a)return e.apply(null,arguments);var o=n.get(a);o||(n.set(a,o=new rL(e)),o.subscribe=t.subscribe,o.forget=function(){return n.delete(a)});var s=o.recompute(Array.prototype.slice.call(arguments));return n.set(a,o),rq.add(n),rw.hasValue()||(rq.forEach(function(e){return e.clean()}),rq.clear()),s};function o(e){var t=n.get(e);t&&t.setDirty()}function s(e){var t=n.get(e);if(t)return t.peek()}function u(e){return n.delete(e)}return Object.defineProperty(a,"size",{get:function(){return n.map.size},configurable:!1,enumerable:!1}),a.dirtyKey=o,a.dirty=function(){o(i.apply(null,arguments))},a.peekKey=s,a.peek=function(){return s(i.apply(null,arguments))},a.forgetKey=u,a.forget=function(){return u(i.apply(null,arguments))},a.makeCacheKey=i,a.getKey=r?function(){return i.apply(null,r.apply(null,arguments))}:i,Object.freeze(a)}var rX=new rb,rJ=new WeakMap;function rQ(e){var t=rJ.get(e);return t||rJ.set(e,t={vars:new Set,dep:rW()}),t}function r1(e){rQ(e).vars.forEach(function(t){return t.forgetCache(e)})}function r0(e){rQ(e).vars.forEach(function(t){return t.attachCache(e)})}function r2(e){var t=new Set,n=new Set,r=function(a){if(arguments.length>0){if(e!==a){e=a,t.forEach(function(e){rQ(e).dep.dirty(r),r3(e)});var o=Array.from(n);n.clear(),o.forEach(function(t){return t(e)})}}else{var s=rX.getValue();s&&(i(s),rQ(s).dep(r))}return e};r.onNextChange=function(e){return n.add(e),function(){n.delete(e)}};var i=r.attachCache=function(e){return t.add(e),rQ(e).vars.add(r),r};return r.forgetCache=function(e){return t.delete(e)},r}function r3(e){e.broadcastWatches&&e.broadcastWatches()}var r4=function(){function e(e){var t=e.cache,n=e.client,r=e.resolvers,i=e.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=t,n&&(this.client=n),r&&this.addResolvers(r),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach(function(e){t.resolvers=tj(t.resolvers,e)}):this.resolvers=tj(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,n=e.remoteResult,r=e.context,i=e.variables,a=e.onlyRunForcedResolvers,o=void 0!==a&&a;return(0,en.mG)(this,void 0,void 0,function(){return(0,en.Jh)(this,function(e){return t?[2,this.resolveDocument(t,n.data,r,i,this.fragmentMatcher,o).then(function(e){return(0,en.pi)((0,en.pi)({},n),{data:e.result})})]:[2,n]})})},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return tb(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return n$(e)},e.prototype.prepareContext=function(e){var t=this.cache;return(0,en.pi)((0,en.pi)({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),(0,en.mG)(this,void 0,void 0,function(){return(0,en.Jh)(this,function(r){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(n),t).then(function(e){return(0,en.pi)((0,en.pi)({},t),e.exportedVariables)})]:[2,(0,en.pi)({},t)]})})},e.prototype.shouldForceResolvers=function(e){var t=!1;return tl(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some(function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value})))return tc}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:nH(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,n,r,i,a){return void 0===n&&(n={}),void 0===r&&(r={}),void 0===i&&(i=function(){return!0}),void 0===a&&(a=!1),(0,en.mG)(this,void 0,void 0,function(){var o,s,u,c,l,f,d,h,p,b,m;return(0,en.Jh)(this,function(g){return o=e8(e),s=e4(e),u=eL(s),c=this.collectSelectionsToResolve(o,u),f=(l=o.operation)?l.charAt(0).toUpperCase()+l.slice(1):"Query",d=this,h=d.cache,p=d.client,b={fragmentMap:u,context:(0,en.pi)((0,en.pi)({},n),{cache:h,client:p}),variables:r,fragmentMatcher:i,defaultOperationType:f,exportedVariables:{},selectionsToResolve:c,onlyRunForcedResolvers:a},m=!1,[2,this.resolveSelectionSet(o.selectionSet,m,t,b).then(function(e){return{result:e,exportedVariables:b.exportedVariables}})]})})},e.prototype.resolveSelectionSet=function(e,t,n,r){return(0,en.mG)(this,void 0,void 0,function(){var i,a,o,s,u,c=this;return(0,en.Jh)(this,function(l){return i=r.fragmentMap,a=r.context,o=r.variables,s=[n],u=function(e){return(0,en.mG)(c,void 0,void 0,function(){var u,c;return(0,en.Jh)(this,function(l){return(t||r.selectionsToResolve.has(e))&&td(e,o)?eQ(e)?[2,this.resolveField(e,t,n,r).then(function(t){var n;void 0!==t&&s.push(((n={})[eX(e)]=t,n))})]:(e1(e)?u=e:(u=i[e.name.value],__DEV__?(0,Q.kG)(u,"No fragment named ".concat(e.name.value)):(0,Q.kG)(u,11)),u&&u.typeCondition&&(c=u.typeCondition.name.value,r.fragmentMatcher(n,c,a)))?[2,this.resolveSelectionSet(u.selectionSet,t,n,r).then(function(e){s.push(e)})]:[2]:[2]})})},[2,Promise.all(e.selections.map(u)).then(function(){return tF(s)})]})})},e.prototype.resolveField=function(e,t,n,r){return(0,en.mG)(this,void 0,void 0,function(){var i,a,o,s,u,c,l,f,d,h=this;return(0,en.Jh)(this,function(p){return n?(i=r.variables,a=e.name.value,o=eX(e),s=a!==o,c=Promise.resolve(u=n[o]||n[a]),(!r.onlyRunForcedResolvers||this.shouldForceResolvers(e))&&(l=n.__typename||r.defaultOperationType,(f=this.resolvers&&this.resolvers[l])&&(d=f[s?a:o])&&(c=Promise.resolve(rX.withValue(this.cache,d,[n,eZ(e,i),r.context,{field:e,fragmentMap:r.fragmentMap},])))),[2,c.then(function(n){if(void 0===n&&(n=u),e.directives&&e.directives.forEach(function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach(function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(r.exportedVariables[e.value.value]=n)})}),!e.selectionSet||null==n)return n;var i,a,o=null!==(a=null===(i=e.directives)||void 0===i?void 0:i.some(function(e){return"client"===e.name.value}))&&void 0!==a&&a;return Array.isArray(n)?h.resolveSubSelectedArray(e,t||o,n,r):e.selectionSet?h.resolveSelectionSet(e.selectionSet,t||o,n,r):void 0})]):[2,null]})})},e.prototype.resolveSubSelectedArray=function(e,t,n,r){var i=this;return Promise.all(n.map(function(n){return null===n?null:Array.isArray(n)?i.resolveSubSelectedArray(e,t,n,r):e.selectionSet?i.resolveSelectionSet(e.selectionSet,t,n,r):void 0}))},e.prototype.collectSelectionsToResolve=function(e,t){var n=function(e){return!Array.isArray(e)},r=this.selectionsToResolveCache;function i(e){if(!r.has(e)){var a=new Set;r.set(e,a),tl(e,{Directive:function(e,t,r,i,o){"client"===e.name.value&&o.forEach(function(e){n(e)&&n9(e)&&a.add(e)})},FragmentSpread:function(e,r,o,s,u){var c=t[e.name.value];__DEV__?(0,Q.kG)(c,"No fragment named ".concat(e.name.value)):(0,Q.kG)(c,12);var l=i(c);l.size>0&&(u.forEach(function(e){n(e)&&n9(e)&&a.add(e)}),a.add(e),l.forEach(function(e){a.add(e)}))}})}return r.get(e)}return i(e)},e}(),r6=new(t_.mr?WeakMap:Map);function r5(e,t){var n=e[t];"function"==typeof n&&(e[t]=function(){return r6.set(e,(r6.get(e)+1)%1e15),n.apply(this,arguments)})}function r8(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var r9=function(){function e(e,t){void 0===t&&(t=e.generateQueryId()),this.queryId=t,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.subscriptions=new Set,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var n=this.cache=e.cache;r6.has(n)||(r6.set(n,0),r5(n,"evict"),r5(n,"modify"),r5(n,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||nZ.I.loading;return this.variables&&this.networkStatus!==nZ.I.loading&&!(0,nm.D)(this.variables,e.variables)&&(t=nZ.I.setVariables),(0,nm.D)(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.reset=function(){r8(this),this.dirty=!1},e.prototype.getDiff=function(e){void 0===e&&(e=this.variables);var t=this.getDiffOptions(e);if(this.lastDiff&&(0,nm.D)(t,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables=e);var n=this.observableQuery;if(n&&"no-cache"===n.options.fetchPolicy)return{complete:!1};var r=this.cache.diff(t);return this.updateLastDiff(r,t),r},e.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(e){var t;return void 0===e&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:null===(t=this.observableQuery)||void 0===t?void 0:t.options.canonizeResults}},e.prototype.setDiff=function(e){var t=this,n=this.lastDiff&&this.lastDiff.diff;this.updateLastDiff(e),this.dirty||(0,nm.D)(n&&n.result,e&&e.result)||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(function(){return t.notify()},0)))},e.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){t.getDiff().fromOptimisticTransaction?e.observe():n4(e)})):delete this.oqListener)},e.prototype.notify=function(){var e=this;r8(this),this.shouldNotify()&&this.listeners.forEach(function(t){return t(e)}),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if((0,nZ.O)(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if("cache-only"!==e&&"cache-and-network"!==e)return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel,this.subscriptions.forEach(function(e){return e.unsubscribe()});var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var n=this.observableQuery;if(!n||"no-cache"!==n.options.fetchPolicy){var r=(0,en.pi)((0,en.pi)({},this.getDiffOptions(e)),{watcher:this,callback:function(e){return t.setDiff(e)}});this.lastWatch&&(0,nm.D)(r,this.lastWatch)||(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=r))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(e,t){var n=this.lastWrite;return!(n&&n.dmCount===r6.get(this.cache)&&(0,nm.D)(t,n.variables)&&(0,nm.D)(e.data,n.result.data))},e.prototype.markResult=function(e,t,n,r){var i=this,a=new tB,o=(0,tP.O)(e.errors)?e.errors.slice(0):[];if(this.reset(),"incremental"in e&&(0,tP.O)(e.incremental)){var s=tG(this.getDiff().result,e);e.data=s}else if("hasNext"in e&&e.hasNext){var u=this.getDiff();e.data=a.merge(u.result,e.data)}this.graphQLErrors=o,"no-cache"===n.fetchPolicy?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(n.variables)):0!==r&&(r7(e,n.errorPolicy)?this.cache.performTransaction(function(a){if(i.shouldWrite(e,n.variables))a.writeQuery({query:t,data:e.data,variables:n.variables,overwrite:1===r}),i.lastWrite={result:e,variables:n.variables,dmCount:r6.get(i.cache)};else if(i.lastDiff&&i.lastDiff.diff.complete){e.data=i.lastDiff.diff.result;return}var o=i.getDiffOptions(n.variables),s=a.diff(o);i.stopped||i.updateWatch(n.variables),i.updateLastDiff(s,o),s.complete&&(e.data=s.result)}):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=nZ.I.ready},e.prototype.markError=function(e){return this.networkStatus=nZ.I.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function r7(e,t){void 0===t&&(t="none");var n="ignore"===t||"all"===t,r=!nO(e);return!r&&n&&e.data&&(r=!0),r}var ie=Object.prototype.hasOwnProperty,it=function(){function e(e){var t=e.cache,n=e.link,r=e.defaultOptions,i=e.queryDeduplication,a=void 0!==i&&i,o=e.onBroadcast,s=e.ssrMode,u=void 0!==s&&s,c=e.clientAwareness,l=void 0===c?{}:c,f=e.localState,d=e.assumeImmutableResults;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new(t_.mr?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map,this.cache=t,this.link=n,this.defaultOptions=r||Object.create(null),this.queryDeduplication=a,this.clientAwareness=l,this.localState=f||new r4({cache:t}),this.ssrMode=u,this.assumeImmutableResults=!!d,(this.onBroadcast=o)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var e=this;this.queries.forEach(function(t,n){e.stopQueryNoBroadcast(n)}),this.cancelPendingFetches(__DEV__?new Q.ej("QueryManager stopped while query was in flight"):new Q.ej(14))},e.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach(function(t){return t(e)}),this.fetchCancelFns.clear()},e.prototype.mutate=function(e){var t,n,r=e.mutation,i=e.variables,a=e.optimisticResponse,o=e.updateQueries,s=e.refetchQueries,u=void 0===s?[]:s,c=e.awaitRefetchQueries,l=void 0!==c&&c,f=e.update,d=e.onQueryUpdated,h=e.fetchPolicy,p=void 0===h?(null===(t=this.defaultOptions.mutate)||void 0===t?void 0:t.fetchPolicy)||"network-only":h,b=e.errorPolicy,m=void 0===b?(null===(n=this.defaultOptions.mutate)||void 0===n?void 0:n.errorPolicy)||"none":b,g=e.keepRootFields,v=e.context;return(0,en.mG)(this,void 0,void 0,function(){var e,t,n,s,c,h;return(0,en.Jh)(this,function(b){switch(b.label){case 0:if(__DEV__?(0,Q.kG)(r,"mutation option is required. You must specify your GraphQL document in the mutation option."):(0,Q.kG)(r,15),__DEV__?(0,Q.kG)("network-only"===p||"no-cache"===p,"Mutations support only 'network-only' or 'no-cache' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write."):(0,Q.kG)("network-only"===p||"no-cache"===p,16),e=this.generateMutationId(),n=(t=this.transform(r)).document,s=t.hasClientExports,r=this.cache.transformForLink(n),i=this.getVariables(r,i),!s)return[3,2];return[4,this.localState.addExportedVariables(r,i,v)];case 1:i=b.sent(),b.label=2;case 2:return c=this.mutationStore&&(this.mutationStore[e]={mutation:r,variables:i,loading:!0,error:null}),a&&this.markMutationOptimistic(a,{mutationId:e,document:r,variables:i,fetchPolicy:p,errorPolicy:m,context:v,updateQueries:o,update:f,keepRootFields:g}),this.broadcastQueries(),h=this,[2,new Promise(function(t,n){return nM(h.getObservableFromLink(r,(0,en.pi)((0,en.pi)({},v),{optimisticResponse:a}),i,!1),function(t){if(nO(t)&&"none"===m)throw new tN.cA({graphQLErrors:nA(t)});c&&(c.loading=!1,c.error=null);var n=(0,en.pi)({},t);return"function"==typeof u&&(u=u(n)),"ignore"===m&&nO(n)&&delete n.errors,h.markMutationResult({mutationId:e,result:n,document:r,variables:i,fetchPolicy:p,errorPolicy:m,context:v,update:f,updateQueries:o,awaitRefetchQueries:l,refetchQueries:u,removeOptimistic:a?e:void 0,onQueryUpdated:d,keepRootFields:g})}).subscribe({next:function(e){h.broadcastQueries(),"hasNext"in e&&!1!==e.hasNext||t(e)},error:function(t){c&&(c.loading=!1,c.error=t),a&&h.cache.removeOptimistic(e),h.broadcastQueries(),n(t instanceof tN.cA?t:new tN.cA({networkError:t}))}})})]}})})},e.prototype.markMutationResult=function(e,t){var n=this;void 0===t&&(t=this.cache);var r=e.result,i=[],a="no-cache"===e.fetchPolicy;if(!a&&r7(r,e.errorPolicy)){if(tU(r)||i.push({result:r.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}),tU(r)&&(0,tP.O)(r.incremental)){var o=t.diff({id:"ROOT_MUTATION",query:this.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0}),s=void 0;o.result&&(s=tG(o.result,r)),void 0!==s&&(r.data=s,i.push({result:s,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}))}var u=e.updateQueries;u&&this.queries.forEach(function(e,a){var o=e.observableQuery,s=o&&o.queryName;if(s&&ie.call(u,s)){var c,l=u[s],f=n.queries.get(a),d=f.document,h=f.variables,p=t.diff({query:d,variables:h,returnPartialData:!0,optimistic:!1}),b=p.result;if(p.complete&&b){var m=l(b,{mutationResult:r,queryName:d&&e3(d)||void 0,queryVariables:h});m&&i.push({result:m,dataId:"ROOT_QUERY",query:d,variables:h})}}})}if(i.length>0||e.refetchQueries||e.update||e.onQueryUpdated||e.removeOptimistic){var c=[];if(this.refetchQueries({updateCache:function(t){a||i.forEach(function(e){return t.write(e)});var o=e.update,s=!t$(r)||tU(r)&&!r.hasNext;if(o){if(!a){var u=t.diff({id:"ROOT_MUTATION",query:n.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});u.complete&&("incremental"in(r=(0,en.pi)((0,en.pi)({},r),{data:u.result}))&&delete r.incremental,"hasNext"in r&&delete r.hasNext)}s&&o(t,r,{context:e.context,variables:e.variables})}a||e.keepRootFields||!s||t.modify({id:"ROOT_MUTATION",fields:function(e,t){var n=t.fieldName,r=t.DELETE;return"__typename"===n?e:r}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach(function(e){return c.push(e)}),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(c).then(function(){return r})}return Promise.resolve(r)},e.prototype.markMutationOptimistic=function(e,t){var n=this,r="function"==typeof e?e(t.variables):e;return this.cache.recordOptimisticTransaction(function(e){try{n.markMutationResult((0,en.pi)((0,en.pi)({},t),{result:{data:r}}),e)}catch(i){__DEV__&&Q.kG.error(i)}},t.mutationId)},e.prototype.fetchQuery=function(e,t,n){return this.fetchQueryObservable(e,t,n).promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach(function(t,n){e[n]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}}),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){var t=this.transformCache;if(!t.has(e)){var n=this.cache.transformDocument(e),r=nY(n),i=this.localState.clientQuery(n),a=r&&this.localState.serverQuery(r),o={document:n,hasClientExports:tm(n),hasForcedResolvers:this.localState.shouldForceResolvers(n),clientQuery:i,serverQuery:a,defaultVars:e9(e2(n)),asQuery:(0,en.pi)((0,en.pi)({},n),{definitions:n.definitions.map(function(e){return"OperationDefinition"===e.kind&&"query"!==e.operation?(0,en.pi)((0,en.pi)({},e),{operation:"query"}):e})})},s=function(e){e&&!t.has(e)&&t.set(e,o)};s(e),s(n),s(i),s(a)}return t.get(e)},e.prototype.getVariables=function(e,t){return(0,en.pi)((0,en.pi)({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e){void 0===(e=(0,en.pi)((0,en.pi)({},e),{variables:this.getVariables(e.query,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var t=new r9(this),n=new n3({queryManager:this,queryInfo:t,options:e});return this.queries.set(n.queryId,t),t.init({document:n.query,observableQuery:n,variables:n.variables}),n},e.prototype.query=function(e,t){var n=this;return void 0===t&&(t=this.generateQueryId()),__DEV__?(0,Q.kG)(e.query,"query option is required. You must specify your GraphQL document in the query option."):(0,Q.kG)(e.query,17),__DEV__?(0,Q.kG)("Document"===e.query.kind,'You must wrap the query string in a "gql" tag.'):(0,Q.kG)("Document"===e.query.kind,18),__DEV__?(0,Q.kG)(!e.returnPartialData,"returnPartialData option only supported on watchQuery."):(0,Q.kG)(!e.returnPartialData,19),__DEV__?(0,Q.kG)(!e.pollInterval,"pollInterval option only supported on watchQuery."):(0,Q.kG)(!e.pollInterval,20),this.fetchQuery(t,e).finally(function(){return n.stopQuery(t)})},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(e){return void 0===e&&(e={discardWatches:!0}),this.cancelPendingFetches(__DEV__?new Q.ej("Store reset while query was in flight (not completed in link chain)"):new Q.ej(21)),this.queries.forEach(function(e){e.observableQuery?e.networkStatus=nZ.I.loading:e.stop()}),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},e.prototype.getObservableQueries=function(e){var t=this;void 0===e&&(e="active");var n=new Map,r=new Map,i=new Set;return Array.isArray(e)&&e.forEach(function(e){"string"==typeof e?r.set(e,!1):eN(e)?r.set(t.transform(e).document,!1):(0,eO.s)(e)&&e.query&&i.add(e)}),this.queries.forEach(function(t,i){var a=t.observableQuery,o=t.document;if(a){if("all"===e){n.set(i,a);return}var s=a.queryName;if("standby"===a.options.fetchPolicy||"active"===e&&!a.hasObservers())return;("active"===e||s&&r.has(s)||o&&r.has(o))&&(n.set(i,a),s&&r.set(s,!0),o&&r.set(o,!0))}}),i.size&&i.forEach(function(e){var r=nG("legacyOneTimeQuery"),i=t.getQuery(r).init({document:e.query,variables:e.variables}),a=new n3({queryManager:t,queryInfo:i,options:(0,en.pi)((0,en.pi)({},e),{fetchPolicy:"network-only"})});(0,Q.kG)(a.queryId===r),i.setObservableQuery(a),n.set(r,a)}),__DEV__&&r.size&&r.forEach(function(e,t){!e&&__DEV__&&Q.kG.warn("Unknown query ".concat("string"==typeof t?"named ":"").concat(JSON.stringify(t,null,2)," requested in refetchQueries options.include array"))}),n},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var n=[];return this.getObservableQueries(e?"all":"active").forEach(function(r,i){var a=r.options.fetchPolicy;r.resetLastResults(),(e||"standby"!==a&&"cache-only"!==a)&&n.push(r.refetch()),t.getQuery(i).setDiff(null)}),this.broadcastQueries(),Promise.all(n)},e.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},e.prototype.startGraphQLSubscription=function(e){var t=this,n=e.query,r=e.fetchPolicy,i=e.errorPolicy,a=e.variables,o=e.context,s=void 0===o?{}:o;n=this.transform(n).document,a=this.getVariables(n,a);var u=function(e){return t.getObservableFromLink(n,s,e).map(function(a){"no-cache"!==r&&(r7(a,i)&&t.cache.write({query:n,result:a.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries());var o=nO(a),s=(0,tN.ls)(a);if(o||s){var u={};throw o&&(u.graphQLErrors=a.errors),s&&(u.protocolErrors=a.extensions[tN.YG]),new tN.cA(u)}return a})};if(this.transform(n).hasClientExports){var c=this.localState.addExportedVariables(n,a,s).then(u);return new eT(function(e){var t=null;return c.then(function(n){return t=n.subscribe(e)},e.error),function(){return t&&t.unsubscribe()}})}return u(a)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.queries.has(e)&&(this.getQuery(e).stop(),this.queries.delete(e))},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach(function(e){return e.notify()})},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,n,r){var i,a,o=this;void 0===r&&(r=null!==(i=null==t?void 0:t.queryDeduplication)&&void 0!==i?i:this.queryDeduplication);var s=this.transform(e).serverQuery;if(s){var u=this,c=u.inFlightLinkObservables,l=u.link,f={query:s,variables:n,operationName:e3(s)||void 0,context:this.prepareContext((0,en.pi)((0,en.pi)({},t),{forceFetch:!r}))};if(t=f.context,r){var d=c.get(s)||new Map;c.set(s,d);var h=nx(n);if(!(a=d.get(h))){var p=new nq([np(l,f)]);d.set(h,a=p),p.beforeNext(function(){d.delete(h)&&d.size<1&&c.delete(s)})}}else a=new nq([np(l,f)])}else a=new nq([eT.of({data:{}})]),t=this.prepareContext(t);var b=this.transform(e).clientQuery;return b&&(a=nM(a,function(e){return o.localState.runResolvers({document:b,remoteResult:e,context:t,variables:n})})),a},e.prototype.getResultsFromLink=function(e,t,n){var r=e.lastRequestId=this.generateRequestId(),i=this.cache.transformForLink(this.transform(e.document).document);return nM(this.getObservableFromLink(i,n.context,n.variables),function(a){var o=nA(a),s=o.length>0;if(r>=e.lastRequestId){if(s&&"none"===n.errorPolicy)throw e.markError(new tN.cA({graphQLErrors:o}));e.markResult(a,i,n,t),e.markReady()}var u={data:a.data,loading:!1,networkStatus:nZ.I.ready};return s&&"ignore"!==n.errorPolicy&&(u.errors=o,u.networkStatus=nZ.I.error),u},function(t){var n=(0,tN.MS)(t)?t:new tN.cA({networkError:t});throw r>=e.lastRequestId&&e.markError(n),n})},e.prototype.fetchQueryObservable=function(e,t,n){return this.fetchConcastWithInfo(e,t,n).concast},e.prototype.fetchConcastWithInfo=function(e,t,n){var r,i,a=this;void 0===n&&(n=nZ.I.loading);var o=this.transform(t.query).document,s=this.getVariables(o,t.variables),u=this.getQuery(e),c=this.defaultOptions.watchQuery,l=t.fetchPolicy,f=void 0===l?c&&c.fetchPolicy||"cache-first":l,d=t.errorPolicy,h=void 0===d?c&&c.errorPolicy||"none":d,p=t.returnPartialData,b=void 0!==p&&p,m=t.notifyOnNetworkStatusChange,g=void 0!==m&&m,v=t.context,y=void 0===v?{}:v,w=Object.assign({},t,{query:o,variables:s,fetchPolicy:f,errorPolicy:h,returnPartialData:b,notifyOnNetworkStatusChange:g,context:y}),_=function(e){w.variables=e;var r=a.fetchQueryByPolicy(u,w,n);return"standby"!==w.fetchPolicy&&r.sources.length>0&&u.observableQuery&&u.observableQuery.applyNextFetchPolicy("after-fetch",t),r},E=function(){return a.fetchCancelFns.delete(e)};if(this.fetchCancelFns.set(e,function(e){E(),setTimeout(function(){return r.cancel(e)})}),this.transform(w.query).hasClientExports)r=new nq(this.localState.addExportedVariables(w.query,w.variables,w.context).then(_).then(function(e){return e.sources})),i=!0;else{var S=_(w.variables);i=S.fromLink,r=new nq(S.sources)}return r.promise.then(E,E),{concast:r,fromLink:i}},e.prototype.refetchQueries=function(e){var t=this,n=e.updateCache,r=e.include,i=e.optimistic,a=void 0!==i&&i,o=e.removeOptimistic,s=void 0===o?a?nG("refetchQueries"):void 0:o,u=e.onQueryUpdated,c=new Map;r&&this.getObservableQueries(r).forEach(function(e,n){c.set(n,{oq:e,lastDiff:t.getQuery(n).getDiff()})});var l=new Map;return n&&this.cache.batch({update:n,optimistic:a&&s||!1,removeOptimistic:s,onWatchUpdated:function(e,t,n){var r=e.watcher instanceof r9&&e.watcher.observableQuery;if(r){if(u){c.delete(r.queryId);var i=u(r,t,n);return!0===i&&(i=r.refetch()),!1!==i&&l.set(r,i),i}null!==u&&c.set(r.queryId,{oq:r,lastDiff:n,diff:t})}}}),c.size&&c.forEach(function(e,n){var r,i=e.oq,a=e.lastDiff,o=e.diff;if(u){if(!o){var s=i.queryInfo;s.reset(),o=s.getDiff()}r=u(i,o,a)}u&&!0!==r||(r=i.refetch()),!1!==r&&l.set(i,r),n.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(n)}),s&&this.cache.removeOptimistic(s),l},e.prototype.fetchQueryByPolicy=function(e,t,n){var r=this,i=t.query,a=t.variables,o=t.fetchPolicy,s=t.refetchWritePolicy,u=t.errorPolicy,c=t.returnPartialData,l=t.context,f=t.notifyOnNetworkStatusChange,d=e.networkStatus;e.init({document:this.transform(i).document,variables:a,networkStatus:n});var h=function(){return e.getDiff(a)},p=function(t,n){void 0===n&&(n=e.networkStatus||nZ.I.loading);var o=t.result;!__DEV__||c||(0,nm.D)(o,{})||n5(t.missing);var s=function(e){return eT.of((0,en.pi)({data:e,loading:(0,nZ.O)(n),networkStatus:n},t.complete?null:{partial:!0}))};return o&&r.transform(i).hasForcedResolvers?r.localState.runResolvers({document:i,remoteResult:{data:o},context:l,variables:a,onlyRunForcedResolvers:!0}).then(function(e){return s(e.data||void 0)}):"none"===u&&n===nZ.I.refetch&&Array.isArray(t.missing)?s(void 0):s(o)},b="no-cache"===o?0:n===nZ.I.refetch&&"merge"!==s?1:2,m=function(){return r.getResultsFromLink(e,b,{variables:a,context:l,fetchPolicy:o,errorPolicy:u})},g=f&&"number"==typeof d&&d!==n&&(0,nZ.O)(n);switch(o){default:case"cache-first":var v=h();if(v.complete)return{fromLink:!1,sources:[p(v,e.markReady())]};if(c||g)return{fromLink:!0,sources:[p(v),m()]};return{fromLink:!0,sources:[m()]};case"cache-and-network":var v=h();if(v.complete||c||g)return{fromLink:!0,sources:[p(v),m()]};return{fromLink:!0,sources:[m()]};case"cache-only":return{fromLink:!1,sources:[p(h(),e.markReady())]};case"network-only":if(g)return{fromLink:!0,sources:[p(h()),m()]};return{fromLink:!0,sources:[m()]};case"no-cache":if(g)return{fromLink:!0,sources:[p(e.getDiff()),m(),]};return{fromLink:!0,sources:[m()]};case"standby":return{fromLink:!1,sources:[]}}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new r9(this,e)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return(0,en.pi)((0,en.pi)({},t),{clientAwareness:this.clientAwareness})},e}(),ir=__webpack_require__(14012),ii=!1,ia=function(){function e(e){var t=this;this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var n=e.uri,r=e.credentials,i=e.headers,a=e.cache,o=e.ssrMode,s=void 0!==o&&o,u=e.ssrForceFetchDelay,c=void 0===u?0:u,l=e.connectToDevTools,f=void 0===l?"object"==typeof window&&!window.__APOLLO_CLIENT__&&__DEV__:l,d=e.queryDeduplication,h=void 0===d||d,p=e.defaultOptions,b=e.assumeImmutableResults,m=void 0!==b&&b,g=e.resolvers,v=e.typeDefs,y=e.fragmentMatcher,w=e.name,_=e.version,E=e.link;if(E||(E=n?new nh({uri:n,credentials:r,headers:i}):ta.empty()),!a)throw __DEV__?new Q.ej("To initialize Apollo Client, you must specify a 'cache' property in the options object. \nFor more information, please visit: https://go.apollo.dev/c/docs"):new Q.ej(9);if(this.link=E,this.cache=a,this.disableNetworkFetches=s||c>0,this.queryDeduplication=h,this.defaultOptions=p||Object.create(null),this.typeDefs=v,c&&setTimeout(function(){return t.disableNetworkFetches=!1},c),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),f&&"object"==typeof window&&(window.__APOLLO_CLIENT__=this),!ii&&f&&__DEV__&&(ii=!0,"undefined"!=typeof window&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__)){var S=window.navigator,k=S&&S.userAgent,x=void 0;"string"==typeof k&&(k.indexOf("Chrome/")>-1?x="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":k.indexOf("Firefox/")>-1&&(x="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),x&&__DEV__&&Q.kG.log("Download the Apollo DevTools for a better development experience: "+x)}this.version=nb,this.localState=new r4({cache:a,client:this,resolvers:g,fragmentMatcher:y}),this.queryManager=new it({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,queryDeduplication:h,ssrMode:s,clientAwareness:{name:w,version:_},localState:this.localState,assumeImmutableResults:m,onBroadcast:f?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=(0,ir.J)(this.defaultOptions.watchQuery,e)),this.disableNetworkFetches&&("network-only"===e.fetchPolicy||"cache-and-network"===e.fetchPolicy)&&(e=(0,en.pi)((0,en.pi)({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=(0,ir.J)(this.defaultOptions.query,e)),__DEV__?(0,Q.kG)("cache-and-network"!==e.fetchPolicy,"The cache-and-network fetchPolicy does not work with client.query, because client.query can only return a single result. Please use client.watchQuery to receive multiple results from the cache and the network, or consider using a different fetchPolicy, such as cache-first or network-only."):(0,Q.kG)("cache-and-network"!==e.fetchPolicy,10),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=(0,en.pi)((0,en.pi)({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=(0,ir.J)(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){var t=this.cache.writeQuery(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t},e.prototype.writeFragment=function(e){var t=this.cache.writeFragment(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return np(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!1})}).then(function(){return Promise.all(e.resetStoreCallbacks.map(function(e){return e()}))}).then(function(){return e.reFetchObservableQueries()})},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!0})}).then(function(){return Promise.all(e.clearStoreCallbacks.map(function(e){return e()}))})},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter(function(t){return t!==e})}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter(function(t){return t!==e})}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),n=[],r=[];t.forEach(function(e,t){n.push(t),r.push(e)});var i=Promise.all(r);return i.queries=n,i.results=r,i.catch(function(e){__DEV__&&Q.kG.debug("In client.refetchQueries, Promise.all promise rejected with error ".concat(e))}),i},e.prototype.getObservableQueries=function(e){return void 0===e&&(e="active"),this.queryManager.getObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e.prototype.setLink=function(e){this.link=this.queryManager.link=e},e}(),io=function(){function e(){this.getFragmentDoc=rZ(eA)}return e.prototype.batch=function(e){var t,n=this,r="string"==typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;return this.performTransaction(function(){return t=e.update(n)},r),t},e.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},e.prototype.transformDocument=function(e){return e},e.prototype.transformForLink=function(e){return e},e.prototype.identify=function(e){},e.prototype.gc=function(){return[]},e.prototype.modify=function(e){return!1},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,en.pi)((0,en.pi)({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,en.pi)((0,en.pi)({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))},e.prototype.writeQuery=function(e){var t=e.id,n=e.data,r=(0,en._T)(e,["id","data"]);return this.write(Object.assign(r,{dataId:t||"ROOT_QUERY",result:n}))},e.prototype.writeFragment=function(e){var t=e.id,n=e.data,r=e.fragment,i=e.fragmentName,a=(0,en._T)(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(a,{query:this.getFragmentDoc(r,i),dataId:t,result:n}))},e.prototype.updateQuery=function(e,t){return this.batch({update:function(n){var r=n.readQuery(e),i=t(r);return null==i?r:(n.writeQuery((0,en.pi)((0,en.pi)({},e),{data:i})),i)}})},e.prototype.updateFragment=function(e,t){return this.batch({update:function(n){var r=n.readFragment(e),i=t(r);return null==i?r:(n.writeFragment((0,en.pi)((0,en.pi)({},e),{data:i})),i)}})},e}(),is=function(e){function t(n,r,i,a){var o,s=e.call(this,n)||this;if(s.message=n,s.path=r,s.query=i,s.variables=a,Array.isArray(s.path)){s.missing=s.message;for(var u=s.path.length-1;u>=0;--u)s.missing=((o={})[s.path[u]]=s.missing,o)}else s.missing=s.path;return s.__proto__=t.prototype,s}return(0,en.ZT)(t,e),t}(Error),iu=__webpack_require__(10542),ic=Object.prototype.hasOwnProperty;function il(e){return null==e}function id(e,t){var n=e.__typename,r=e.id,i=e._id;if("string"==typeof n&&(t&&(t.keyObject=il(r)?il(i)?void 0:{_id:i}:{id:r}),il(r)&&!il(i)&&(r=i),!il(r)))return"".concat(n,":").concat("number"==typeof r||"string"==typeof r?r:JSON.stringify(r))}var ih={dataIdFromObject:id,addTypename:!0,resultCaching:!0,canonizeResults:!1};function ip(e){return(0,n1.o)(ih,e)}function ib(e){var t=e.canonizeResults;return void 0===t?ih.canonizeResults:t}function im(e,t){return eD(t)?e.get(t.__ref,"__typename"):t&&t.__typename}var ig=/^[_a-z][_0-9a-z]*/i;function iv(e){var t=e.match(ig);return t?t[0]:e}function iy(e,t,n){return!!(0,eO.s)(t)&&((0,tP.k)(t)?t.every(function(t){return iy(e,t,n)}):e.selections.every(function(e){if(eQ(e)&&td(e,n)){var r=eX(e);return ic.call(t,r)&&(!e.selectionSet||iy(e.selectionSet,t[r],n))}return!0}))}function iw(e){return(0,eO.s)(e)&&!eD(e)&&!(0,tP.k)(e)}function i_(){return new tB}function iE(e,t){var n=eL(e4(e));return{fragmentMap:n,lookupFragment:function(e){var r=n[e];return!r&&t&&(r=t.lookup(e)),r||null}}}var iS=Object.create(null),ik=function(){return iS},ix=Object.create(null),iT=function(){function e(e,t){var n=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(e,t){return(0,iu.J)(eD(e)?n.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return eD(e)?n.has(e.__ref):"object"==typeof e},this.toReference=function(e,t){if("string"==typeof e)return eI(e);if(eD(e))return e;var r=n.policies.identify(e)[0];if(r){var i=eI(r);return t&&n.merge(r,e),i}}}return e.prototype.toObject=function(){return(0,en.pi)({},this.data)},e.prototype.has=function(e){return void 0!==this.lookup(e,!0)},e.prototype.get=function(e,t){if(this.group.depend(e,t),ic.call(this.data,e)){var n=this.data[e];if(n&&ic.call(n,t))return n[t]}return"__typename"===t&&ic.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof iL?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return(t&&this.group.depend(e,"__exists"),ic.call(this.data,e))?this.data[e]:this instanceof iL?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var n,r=this;eD(e)&&(e=e.__ref),eD(t)&&(t=t.__ref);var i="string"==typeof e?this.lookup(n=e):e,a="string"==typeof t?this.lookup(n=t):t;if(a){__DEV__?(0,Q.kG)("string"==typeof n,"store.merge expects a string ID"):(0,Q.kG)("string"==typeof n,1);var o=new tB(iI).merge(i,a);if(this.data[n]=o,o!==i&&(delete this.refs[n],this.group.caching)){var s=Object.create(null);i||(s.__exists=1),Object.keys(a).forEach(function(e){if(!i||i[e]!==o[e]){s[e]=1;var t=iv(e);t===e||r.policies.hasKeyArgs(o.__typename,t)||(s[t]=1),void 0!==o[e]||r instanceof iL||delete o[e]}}),s.__typename&&!(i&&i.__typename)&&this.policies.rootTypenamesById[n]===o.__typename&&delete s.__typename,Object.keys(s).forEach(function(e){return r.group.dirty(n,e)})}}},e.prototype.modify=function(e,t){var n=this,r=this.lookup(e);if(r){var i=Object.create(null),a=!1,o=!0,s={DELETE:iS,INVALIDATE:ix,isReference:eD,toReference:this.toReference,canRead:this.canRead,readField:function(t,r){return n.policies.readField("string"==typeof t?{fieldName:t,from:r||eI(e)}:t,{store:n})}};if(Object.keys(r).forEach(function(u){var c=iv(u),l=r[u];if(void 0!==l){var f="function"==typeof t?t:t[u]||t[c];if(f){var d=f===ik?iS:f((0,iu.J)(l),(0,en.pi)((0,en.pi)({},s),{fieldName:c,storeFieldName:u,storage:n.getStorage(e,u)}));d===ix?n.group.dirty(e,u):(d===iS&&(d=void 0),d!==l&&(i[u]=d,a=!0,l=d))}void 0!==l&&(o=!1)}}),a)return this.merge(e,i),o&&(this instanceof iL?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},e.prototype.delete=function(e,t,n){var r,i=this.lookup(e);if(i){var a=this.getFieldValue(i,"__typename"),o=t&&n?this.policies.getStoreFieldName({typename:a,fieldName:t,args:n}):t;return this.modify(e,o?((r={})[o]=ik,r):ik)}return!1},e.prototype.evict=function(e,t){var n=!1;return e.id&&(ic.call(this.data,e.id)&&(n=this.delete(e.id,e.fieldName,e.args)),this instanceof iL&&this!==t&&(n=this.parent.evict(e,t)||n),(e.fieldName||n)&&this.group.dirty(e.id,e.fieldName||"__exists")),n},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var e=this,t=this.toObject(),n=[];return this.getRootIdSet().forEach(function(t){ic.call(e.policies.rootTypenamesById,t)||n.push(t)}),n.length&&(t.__META={extraRootIds:n.sort()}),t},e.prototype.replace=function(e){var t=this;if(Object.keys(this.data).forEach(function(n){e&&ic.call(e,n)||t.delete(n)}),e){var n=e.__META,r=(0,en._T)(e,["__META"]);Object.keys(r).forEach(function(e){t.merge(e,r[e])}),n&&n.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},e.prototype.release=function(e){if(this.rootIds[e]>0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof iL?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),n=this.toObject();t.forEach(function(r){ic.call(n,r)&&(Object.keys(e.findChildRefIds(r)).forEach(t.add,t),delete n[r])});var r=Object.keys(n);if(r.length){for(var i=this;i instanceof iL;)i=i.parent;r.forEach(function(e){return i.delete(e)})}return r},e.prototype.findChildRefIds=function(e){if(!ic.call(this.refs,e)){var t=this.refs[e]=Object.create(null),n=this.data[e];if(!n)return t;var r=new Set([n]);r.forEach(function(e){eD(e)&&(t[e.__ref]=!0),(0,eO.s)(e)&&Object.keys(e).forEach(function(t){var n=e[t];(0,eO.s)(n)&&r.add(n)})})}return this.refs[e]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),iM=function(){function e(e,t){void 0===t&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?rW():null,this.keyMaker=new n_(t_.mr)},e.prototype.depend=function(e,t){if(this.d){this.d(iO(e,t));var n=iv(t);n!==t&&this.d(iO(e,n)),this.parent&&this.parent.depend(e,t)}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty(iO(e,t),"__exists"===t?"forget":"setDirty")},e}();function iO(e,t){return t+"#"+e}function iA(e,t){iD(e)&&e.group.depend(t,"__exists")}!function(e){var t=function(e){function t(t){var n=t.policies,r=t.resultCaching,i=void 0===r||r,a=t.seed,o=e.call(this,n,new iM(i))||this;return o.stump=new iC(o),o.storageTrie=new n_(t_.mr),a&&o.replace(a),o}return(0,en.ZT)(t,e),t.prototype.addLayer=function(e,t){return this.stump.addLayer(e,t)},t.prototype.removeLayer=function(){return this},t.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},t}(e);e.Root=t}(iT||(iT={}));var iL=function(e){function t(t,n,r,i){var a=e.call(this,n.policies,i)||this;return a.id=t,a.parent=n,a.replay=r,a.group=i,r(a),a}return(0,en.ZT)(t,e),t.prototype.addLayer=function(e,n){return new t(e,this,n,this.group)},t.prototype.removeLayer=function(e){var t=this,n=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach(function(e){var r=t.data[e],i=n.lookup(e);i?r?r!==i&&Object.keys(r).forEach(function(n){(0,nm.D)(r[n],i[n])||t.group.dirty(e,n)}):(t.group.dirty(e,"__exists"),Object.keys(i).forEach(function(n){t.group.dirty(e,n)})):t.delete(e)}),n):n===this.parent?this:n.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return(0,en.pi)((0,en.pi)({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var n=this.parent.findChildRefIds(t);return ic.call(this.data,t)?(0,en.pi)((0,en.pi)({},n),e.prototype.findChildRefIds.call(this,t)):n},t.prototype.getStorage=function(){for(var e=this.parent;e.parent;)e=e.parent;return e.getStorage.apply(e,arguments)},t}(iT),iC=function(e){function t(t){return e.call(this,"EntityStore.Stump",t,function(){},new iM(t.group.caching,t.group))||this}return(0,en.ZT)(t,e),t.prototype.removeLayer=function(){return this},t.prototype.merge=function(){return this.parent.merge.apply(this.parent,arguments)},t}(iL);function iI(e,t,n){var r=e[n],i=t[n];return(0,nm.D)(r,i)?r:i}function iD(e){return!!(e instanceof iT&&e.group.caching)}function iN(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults,]}var iP=function(){function e(e){var t=this;this.knownResults=new(t_.mr?WeakMap:Map),this.config=(0,n1.o)(e,{addTypename:!1!==e.addTypename,canonizeResults:ib(e)}),this.canon=e.canon||new nk,this.executeSelectionSet=rZ(function(e){var n,r=e.context.canonizeResults,i=iN(e);i[3]=!r;var a=(n=t.executeSelectionSet).peek.apply(n,i);return a?r?(0,en.pi)((0,en.pi)({},a),{result:t.canon.admit(a.result)}):a:(iA(e.context.store,e.enclosingRef.__ref),t.execSelectionSetImpl(e))},{max:this.config.resultCacheMaxSize,keyArgs:iN,makeCacheKey:function(e,t,n,r){if(iD(n.store))return n.store.makeCacheKey(e,eD(t)?t.__ref:t,n.varString,r)}}),this.executeSubSelectedArray=rZ(function(e){return iA(e.context.store,e.enclosingRef.__ref),t.execSubSelectedArrayImpl(e)},{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var t=e.field,n=e.array,r=e.context;if(iD(r.store))return r.store.makeCacheKey(t,n,r.varString)}})}return e.prototype.resetCanon=function(){this.canon=new nk},e.prototype.diffQueryAgainstStore=function(e){var t,n=e.store,r=e.query,i=e.rootId,a=void 0===i?"ROOT_QUERY":i,o=e.variables,s=e.returnPartialData,u=void 0===s||s,c=e.canonizeResults,l=void 0===c?this.config.canonizeResults:c,f=this.config.cache.policies;o=(0,en.pi)((0,en.pi)({},e9(e6(r))),o);var d=eI(a),h=this.executeSelectionSet({selectionSet:e8(r).selectionSet,objectOrReference:d,enclosingRef:d,context:(0,en.pi)({store:n,query:r,policies:f,variables:o,varString:nx(o),canonizeResults:l},iE(r,this.config.fragments))});if(h.missing&&(t=[new is(iR(h.missing),h.missing,r,o)],!u))throw t[0];return{result:h.result,complete:!t,missing:t}},e.prototype.isFresh=function(e,t,n,r){if(iD(r.store)&&this.knownResults.get(e)===n){var i=this.executeSelectionSet.peek(n,t,r,this.canon.isKnown(e));if(i&&e===i.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t,n=this,r=e.selectionSet,i=e.objectOrReference,a=e.enclosingRef,o=e.context;if(eD(i)&&!o.policies.rootTypenamesById[i.__ref]&&!o.store.has(i.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(i.__ref," object")};var s=o.variables,u=o.policies,c=o.store.getFieldValue(i,"__typename"),l=[],f=new tB;function d(e,n){var r;return e.missing&&(t=f.merge(t,((r={})[n]=e.missing,r))),e.result}this.config.addTypename&&"string"==typeof c&&!u.rootIdsByTypename[c]&&l.push({__typename:c});var h=new Set(r.selections);h.forEach(function(e){var r,p;if(td(e,s)){if(eQ(e)){var b=u.readField({fieldName:e.name.value,field:e,variables:o.variables,from:i},o),m=eX(e);void 0===b?nj.added(e)||(t=f.merge(t,((r={})[m]="Can't find field '".concat(e.name.value,"' on ").concat(eD(i)?i.__ref+" object":"object "+JSON.stringify(i,null,2)),r))):(0,tP.k)(b)?b=d(n.executeSubSelectedArray({field:e,array:b,enclosingRef:a,context:o}),m):e.selectionSet?null!=b&&(b=d(n.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:b,enclosingRef:eD(b)?b:a,context:o}),m)):o.canonizeResults&&(b=n.canon.pass(b)),void 0!==b&&l.push(((p={})[m]=b,p))}else{var g=eC(e,o.lookupFragment);if(!g&&e.kind===nL.h.FRAGMENT_SPREAD)throw __DEV__?new Q.ej("No fragment named ".concat(e.name.value)):new Q.ej(5);g&&u.fragmentMatches(g,c)&&g.selectionSet.selections.forEach(h.add,h)}}});var p={result:tF(l),missing:t},b=o.canonizeResults?this.canon.admit(p):(0,iu.J)(p);return b.result&&this.knownResults.set(b.result,r),b},e.prototype.execSubSelectedArrayImpl=function(e){var t,n=this,r=e.field,i=e.array,a=e.enclosingRef,o=e.context,s=new tB;function u(e,n){var r;return e.missing&&(t=s.merge(t,((r={})[n]=e.missing,r))),e.result}return r.selectionSet&&(i=i.filter(o.store.canRead)),i=i.map(function(e,t){return null===e?null:(0,tP.k)(e)?u(n.executeSubSelectedArray({field:r,array:e,enclosingRef:a,context:o}),t):r.selectionSet?u(n.executeSelectionSet({selectionSet:r.selectionSet,objectOrReference:e,enclosingRef:eD(e)?e:a,context:o}),t):(__DEV__&&ij(o.store,r,e),e)}),{result:o.canonizeResults?this.canon.admit(i):i,missing:t}},e}();function iR(e){try{JSON.stringify(e,function(e,t){if("string"==typeof t)throw t;return t})}catch(t){return t}}function ij(e,t,n){if(!t.selectionSet){var r=new Set([n]);r.forEach(function(n){(0,eO.s)(n)&&(__DEV__?(0,Q.kG)(!eD(n),"Missing selection set for object of type ".concat(im(e,n)," returned for query field ").concat(t.name.value)):(0,Q.kG)(!eD(n),6),Object.values(n).forEach(r.add,r))})}}function iF(e){var t=nG("stringifyForDisplay");return JSON.stringify(e,function(e,n){return void 0===n?t:n}).split(JSON.stringify(t)).join("")}var iY=Object.create(null);function iB(e){var t=JSON.stringify(e);return iY[t]||(iY[t]=Object.create(null))}function iU(e){var t=iB(e);return t.keyFieldsFn||(t.keyFieldsFn=function(t,n){var r=function(e,t){return n.readField(t,e)},i=n.keyObject=i$(e,function(e){var i=iW(n.storeObject,e,r);return void 0===i&&t!==n.storeObject&&ic.call(t,e[0])&&(i=iW(t,e,iG)),__DEV__?(0,Q.kG)(void 0!==i,"Missing field '".concat(e.join("."),"' while extracting keyFields from ").concat(JSON.stringify(t))):(0,Q.kG)(void 0!==i,2),i});return"".concat(n.typename,":").concat(JSON.stringify(i))})}function iH(e){var t=iB(e);return t.keyArgsFn||(t.keyArgsFn=function(t,n){var r=n.field,i=n.variables,a=n.fieldName,o=JSON.stringify(i$(e,function(e){var n=e[0],a=n.charAt(0);if("@"===a){if(r&&(0,tP.O)(r.directives)){var o=n.slice(1),s=r.directives.find(function(e){return e.name.value===o}),u=s&&eZ(s,i);return u&&iW(u,e.slice(1))}return}if("$"===a){var c=n.slice(1);if(i&&ic.call(i,c)){var l=e.slice(0);return l[0]=c,iW(i,l)}return}if(t)return iW(t,e)}));return(t||"{}"!==o)&&(a+=":"+o),a})}function i$(e,t){var n=new tB;return iz(e).reduce(function(e,r){var i,a=t(r);if(void 0!==a){for(var o=r.length-1;o>=0;--o)a=((i={})[r[o]]=a,i);e=n.merge(e,a)}return e},Object.create(null))}function iz(e){var t=iB(e);if(!t.paths){var n=t.paths=[],r=[];e.forEach(function(t,i){(0,tP.k)(t)?(iz(t).forEach(function(e){return n.push(r.concat(e))}),r.length=0):(r.push(t),(0,tP.k)(e[i+1])||(n.push(r.slice(0)),r.length=0))})}return t.paths}function iG(e,t){return e[t]}function iW(e,t,n){return n=n||iG,iK(t.reduce(function e(t,r){return(0,tP.k)(t)?t.map(function(t){return e(t,r)}):t&&n(t,r)},e))}function iK(e){return(0,eO.s)(e)?(0,tP.k)(e)?e.map(iK):i$(Object.keys(e).sort(),function(t){return iW(e,t)}):e}function iV(e){return void 0!==e.args?e.args:e.field?eZ(e.field,e.variables):null}eK.setStringify(nx);var iq=function(){},iZ=function(e,t){return t.fieldName},iX=function(e,t,n){return(0,n.mergeObjects)(e,t)},iJ=function(e,t){return t},iQ=function(){function e(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=(0,en.pi)({dataIdFromObject:id},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return e.prototype.identify=function(e,t){var n,r,i=this,a=t&&(t.typename||(null===(n=t.storeObject)||void 0===n?void 0:n.__typename))||e.__typename;if(a===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var o=t&&t.storeObject||e,s=(0,en.pi)((0,en.pi)({},t),{typename:a,storeObject:o,readField:t&&t.readField||function(){var e=i0(arguments,o);return i.readField(e,{store:i.cache.data,variables:e.variables})}}),u=a&&this.getTypePolicy(a),c=u&&u.keyFn||this.config.dataIdFromObject;c;){var l=c((0,en.pi)((0,en.pi)({},e),o),s);if((0,tP.k)(l))c=iU(l);else{r=l;break}}return r=r?String(r):void 0,s.keyObject?[r,s.keyObject]:[r]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach(function(n){var r=e[n],i=r.queryType,a=r.mutationType,o=r.subscriptionType,s=(0,en._T)(r,["queryType","mutationType","subscriptionType"]);i&&t.setRootTypename("Query",n),a&&t.setRootTypename("Mutation",n),o&&t.setRootTypename("Subscription",n),ic.call(t.toBeAdded,n)?t.toBeAdded[n].push(s):t.toBeAdded[n]=[s]})},e.prototype.updateTypePolicy=function(e,t){var n=this,r=this.getTypePolicy(e),i=t.keyFields,a=t.fields;function o(e,t){e.merge="function"==typeof t?t:!0===t?iX:!1===t?iJ:e.merge}o(r,t.merge),r.keyFn=!1===i?iq:(0,tP.k)(i)?iU(i):"function"==typeof i?i:r.keyFn,a&&Object.keys(a).forEach(function(t){var r=n.getFieldPolicy(e,t,!0),i=a[t];if("function"==typeof i)r.read=i;else{var s=i.keyArgs,u=i.read,c=i.merge;r.keyFn=!1===s?iZ:(0,tP.k)(s)?iH(s):"function"==typeof s?s:r.keyFn,"function"==typeof u&&(r.read=u),o(r,c)}r.read&&r.merge&&(r.keyFn=r.keyFn||iZ)})},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var n="ROOT_"+e.toUpperCase(),r=this.rootTypenamesById[n];t!==r&&(__DEV__?(0,Q.kG)(!r||r===e,"Cannot change root ".concat(e," __typename more than once")):(0,Q.kG)(!r||r===e,3),r&&delete this.rootIdsByTypename[r],this.rootIdsByTypename[t]=n,this.rootTypenamesById[n]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach(function(n){t.getSupertypeSet(n,!0),e[n].forEach(function(e){t.getSupertypeSet(e,!0).add(n);var r=e.match(ig);r&&r[0]===e||t.fuzzySubtypes.set(e,RegExp(e))})})},e.prototype.getTypePolicy=function(e){var t=this;if(!ic.call(this.typePolicies,e)){var n=this.typePolicies[e]=Object.create(null);n.fields=Object.create(null);var r=this.supertypeMap.get(e);r&&r.size&&r.forEach(function(e){var r=t.getTypePolicy(e),i=r.fields;Object.assign(n,(0,en._T)(r,["fields"])),Object.assign(n.fields,i)})}var i=this.toBeAdded[e];return i&&i.length&&i.splice(0).forEach(function(n){t.updateTypePolicy(e,n)}),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t,n){if(e){var r=this.getTypePolicy(e).fields;return r[t]||n&&(r[t]=Object.create(null))}},e.prototype.getSupertypeSet=function(e,t){var n=this.supertypeMap.get(e);return!n&&t&&this.supertypeMap.set(e,n=new Set),n},e.prototype.fragmentMatches=function(e,t,n,r){var i=this;if(!e.typeCondition)return!0;if(!t)return!1;var a=e.typeCondition.name.value;if(t===a)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(a))for(var o=this.getSupertypeSet(t,!0),s=[o],u=function(e){var t=i.getSupertypeSet(e,!1);t&&t.size&&0>s.indexOf(t)&&s.push(t)},c=!!(n&&this.fuzzySubtypes.size),l=!1,f=0;f1?a:t}:(r=(0,en.pi)({},i),ic.call(r,"from")||(r.from=t)),__DEV__&&void 0===r.from&&__DEV__&&Q.kG.warn("Undefined 'from' passed to readField with arguments ".concat(iF(Array.from(e)))),void 0===r.variables&&(r.variables=n),r}function i2(e){return function(t,n){if((0,tP.k)(t)||(0,tP.k)(n))throw __DEV__?new Q.ej("Cannot automatically merge arrays"):new Q.ej(4);if((0,eO.s)(t)&&(0,eO.s)(n)){var r=e.getFieldValue(t,"__typename"),i=e.getFieldValue(n,"__typename");if(r&&i&&r!==i)return n;if(eD(t)&&iw(n))return e.merge(t.__ref,n),t;if(iw(t)&&eD(n))return e.merge(t,n.__ref),n;if(iw(t)&&iw(n))return(0,en.pi)((0,en.pi)({},t),n)}return n}}function i3(e,t,n){var r="".concat(t).concat(n),i=e.flavors.get(r);return i||e.flavors.set(r,i=e.clientOnly===t&&e.deferred===n?e:(0,en.pi)((0,en.pi)({},e),{clientOnly:t,deferred:n})),i}var i4=function(){function e(e,t,n){this.cache=e,this.reader=t,this.fragments=n}return e.prototype.writeToStore=function(e,t){var n=this,r=t.query,i=t.result,a=t.dataId,o=t.variables,s=t.overwrite,u=e2(r),c=i_();o=(0,en.pi)((0,en.pi)({},e9(u)),o);var l=(0,en.pi)((0,en.pi)({store:e,written:Object.create(null),merge:function(e,t){return c.merge(e,t)},variables:o,varString:nx(o)},iE(r,this.fragments)),{overwrite:!!s,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),f=this.processSelectionSet({result:i||Object.create(null),dataId:a,selectionSet:u.selectionSet,mergeTree:{map:new Map},context:l});if(!eD(f))throw __DEV__?new Q.ej("Could not identify object ".concat(JSON.stringify(i))):new Q.ej(7);return l.incomingById.forEach(function(t,r){var i=t.storeObject,a=t.mergeTree,o=t.fieldNodeSet,s=eI(r);if(a&&a.map.size){var u=n.applyMerges(a,s,i,l);if(eD(u))return;i=u}if(__DEV__&&!l.overwrite){var c=Object.create(null);o.forEach(function(e){e.selectionSet&&(c[e.name.value]=!0)});var f=function(e){return!0===c[iv(e)]},d=function(e){var t=a&&a.map.get(e);return Boolean(t&&t.info&&t.info.merge)};Object.keys(i).forEach(function(e){f(e)&&!d(e)&&at(s,i,e,l.store)})}e.merge(r,i)}),e.retain(f.__ref),f},e.prototype.processSelectionSet=function(e){var t=this,n=e.dataId,r=e.result,i=e.selectionSet,a=e.context,o=e.mergeTree,s=this.cache.policies,u=Object.create(null),c=n&&s.rootTypenamesById[n]||eJ(r,i,a.fragmentMap)||n&&a.store.get(n,"__typename");"string"==typeof c&&(u.__typename=c);var l=function(){var e=i0(arguments,u,a.variables);if(eD(e.from)){var t=a.incomingById.get(e.from.__ref);if(t){var n=s.readField((0,en.pi)((0,en.pi)({},e),{from:t.storeObject}),a);if(void 0!==n)return n}}return s.readField(e,a)},f=new Set;this.flattenFields(i,r,a,c).forEach(function(e,n){var i,a=r[eX(n)];if(f.add(n),void 0!==a){var d=s.getStoreFieldName({typename:c,fieldName:n.name.value,field:n,variables:e.variables}),h=i5(o,d),p=t.processFieldValue(a,n,n.selectionSet?i3(e,!1,!1):e,h),b=void 0;n.selectionSet&&(eD(p)||iw(p))&&(b=l("__typename",p));var m=s.getMergeFunction(c,n.name.value,b);m?h.info={field:n,typename:c,merge:m}:i7(o,d),u=e.merge(u,((i={})[d]=p,i))}else __DEV__&&!e.clientOnly&&!e.deferred&&!nj.added(n)&&!s.getReadFunction(c,n.name.value)&&__DEV__&&Q.kG.error("Missing field '".concat(eX(n),"' while writing result ").concat(JSON.stringify(r,null,2)).substring(0,1e3))});try{var d=s.identify(r,{typename:c,selectionSet:i,fragmentMap:a.fragmentMap,storeObject:u,readField:l}),h=d[0],p=d[1];n=n||h,p&&(u=a.merge(u,p))}catch(b){if(!n)throw b}if("string"==typeof n){var m=eI(n),g=a.written[n]||(a.written[n]=[]);if(g.indexOf(i)>=0||(g.push(i),this.reader&&this.reader.isFresh(r,m,i,a)))return m;var v=a.incomingById.get(n);return v?(v.storeObject=a.merge(v.storeObject,u),v.mergeTree=i8(v.mergeTree,o),f.forEach(function(e){return v.fieldNodeSet.add(e)})):a.incomingById.set(n,{storeObject:u,mergeTree:i9(o)?void 0:o,fieldNodeSet:f}),m}return u},e.prototype.processFieldValue=function(e,t,n,r){var i=this;return t.selectionSet&&null!==e?(0,tP.k)(e)?e.map(function(e,a){var o=i.processFieldValue(e,t,n,i5(r,a));return i7(r,a),o}):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:n,mergeTree:r}):__DEV__?nJ(e):e},e.prototype.flattenFields=function(e,t,n,r){void 0===r&&(r=eJ(t,e,n.fragmentMap));var i=new Map,a=this.cache.policies,o=new n_(!1);return function e(s,u){var c=o.lookup(s,u.clientOnly,u.deferred);c.visited||(c.visited=!0,s.selections.forEach(function(o){if(td(o,n.variables)){var s=u.clientOnly,c=u.deferred;if(!(s&&c)&&(0,tP.O)(o.directives)&&o.directives.forEach(function(e){var t=e.name.value;if("client"===t&&(s=!0),"defer"===t){var r=eZ(e,n.variables);r&&!1===r.if||(c=!0)}}),eQ(o)){var l=i.get(o);l&&(s=s&&l.clientOnly,c=c&&l.deferred),i.set(o,i3(n,s,c))}else{var f=eC(o,n.lookupFragment);if(!f&&o.kind===nL.h.FRAGMENT_SPREAD)throw __DEV__?new Q.ej("No fragment named ".concat(o.name.value)):new Q.ej(8);f&&a.fragmentMatches(f,r,t,n.variables)&&e(f.selectionSet,i3(n,s,c))}}}))}(e,n),i},e.prototype.applyMerges=function(e,t,n,r,i){var a=this;if(e.map.size&&!eD(n)){var o,s,u=!(0,tP.k)(n)&&(eD(t)||iw(t))?t:void 0,c=n;u&&!i&&(i=[eD(u)?u.__ref:u]);var l=function(e,t){return(0,tP.k)(e)?"number"==typeof t?e[t]:void 0:r.store.getFieldValue(e,String(t))};e.map.forEach(function(e,t){var n=l(u,t),o=l(c,t);if(void 0!==o){i&&i.push(t);var f=a.applyMerges(e,n,o,r,i);f!==o&&(s=s||new Map).set(t,f),i&&(0,Q.kG)(i.pop()===t)}}),s&&(n=(0,tP.k)(c)?c.slice(0):(0,en.pi)({},c),s.forEach(function(e,t){n[t]=e}))}return e.info?this.cache.policies.runMergeFunction(t,n,e.info,r,i&&(o=r.store).getStorage.apply(o,i)):n},e}(),i6=[];function i5(e,t){var n=e.map;return n.has(t)||n.set(t,i6.pop()||{map:new Map}),n.get(t)}function i8(e,t){if(e===t||!t||i9(t))return e;if(!e||i9(e))return t;var n=e.info&&t.info?(0,en.pi)((0,en.pi)({},e.info),t.info):e.info||t.info,r=e.map.size&&t.map.size,i=r?new Map:e.map.size?e.map:t.map,a={info:n,map:i};if(r){var o=new Set(t.map.keys());e.map.forEach(function(e,n){a.map.set(n,i8(e,t.map.get(n))),o.delete(n)}),o.forEach(function(n){a.map.set(n,i8(t.map.get(n),e.map.get(n)))})}return a}function i9(e){return!e||!(e.info||e.map.size)}function i7(e,t){var n=e.map,r=n.get(t);r&&i9(r)&&(i6.push(r),n.delete(t))}var ae=new Set;function at(e,t,n,r){var i=function(e){var t=r.getFieldValue(e,n);return"object"==typeof t&&t},a=i(e);if(a){var o=i(t);if(!(!o||eD(a)||(0,nm.D)(a,o)||Object.keys(a).every(function(e){return void 0!==r.getFieldValue(o,e)}))){var s=r.getFieldValue(e,"__typename")||r.getFieldValue(t,"__typename"),u=iv(n),c="".concat(s,".").concat(u);if(!ae.has(c)){ae.add(c);var l=[];(0,tP.k)(a)||(0,tP.k)(o)||[a,o].forEach(function(e){var t=r.getFieldValue(e,"__typename");"string"!=typeof t||l.includes(t)||l.push(t)}),__DEV__&&Q.kG.warn("Cache data may be lost when replacing the ".concat(u," field of a ").concat(s," object.\n\nThis could cause additional (usually avoidable) network requests to fetch data that were otherwise cached.\n\nTo address this problem (which is not a bug in Apollo Client), ").concat(l.length?"either ensure all objects of type "+l.join(" and ")+" have an ID or a custom merge function, or ":"","define a custom merge function for the ").concat(c," field, so InMemoryCache can safely merge these objects:\n\n existing: ").concat(JSON.stringify(a).slice(0,1e3),"\n incoming: ").concat(JSON.stringify(o).slice(0,1e3),"\n\nFor more information about these options, please refer to the documentation:\n\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\n"))}}}}var an=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;return n.watches=new Set,n.typenameDocumentCache=new Map,n.makeVar=r2,n.txCount=0,n.config=ip(t),n.addTypename=!!n.config.addTypename,n.policies=new iQ({cache:n,dataIdFromObject:n.config.dataIdFromObject,possibleTypes:n.config.possibleTypes,typePolicies:n.config.typePolicies}),n.init(),n}return(0,en.ZT)(t,e),t.prototype.init=function(){var e=this.data=new iT.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()},t.prototype.resetResultCache=function(e){var t=this,n=this.storeReader,r=this.config.fragments;this.storeWriter=new i4(this,this.storeReader=new iP({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:ib(this.config),canon:e?void 0:n&&n.canon,fragments:r}),r),this.maybeBroadcastWatch=rZ(function(e,n){return t.broadcastWatch(e,n)},{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var n=e.optimistic?t.optimisticData:t.data;if(iD(n)){var r=e.optimistic,i=e.id,a=e.variables;return n.makeCacheKey(e.query,e.callback,nx({optimistic:r,id:i,variables:a}))}}}),new Set([this.data.group,this.optimisticData.group,]).forEach(function(e){return e.resetCaching()})},t.prototype.restore=function(e){return this.init(),e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).extract()},t.prototype.read=function(e){var t=e.returnPartialData,n=void 0!==t&&t;try{return this.storeReader.diffQueryAgainstStore((0,en.pi)((0,en.pi)({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:n})).result||null}catch(r){if(r instanceof is)return null;throw r}},t.prototype.write=function(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.modify=function(e){if(ic.call(e,"id")&&!e.id)return!1;var t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore((0,en.pi)((0,en.pi)({},e),{store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(e){var t=this;return this.watches.size||r0(this),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),function(){t.watches.delete(e)&&!t.watches.size&&r1(t),t.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(e){nx.reset();var t=this.optimisticData.gc();return e&&!this.txCount&&(e.resetResultCache?this.resetResultCache(e.resetResultIdentities):e.resetResultIdentities&&this.storeReader.resetCanon()),t},t.prototype.retain=function(e,t){return(t?this.optimisticData:this.data).retain(e)},t.prototype.release=function(e,t){return(t?this.optimisticData:this.data).release(e)},t.prototype.identify=function(e){if(eD(e))return e.__ref;try{return this.policies.identify(e)[0]}catch(t){__DEV__&&Q.kG.warn(t)}},t.prototype.evict=function(e){if(!e.id){if(ic.call(e,"id"))return!1;e=(0,en.pi)((0,en.pi)({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.reset=function(e){var t=this;return this.init(),nx.reset(),e&&e.discardWatches?(this.watches.forEach(function(e){return t.maybeBroadcastWatch.forget(e)}),this.watches.clear(),r1(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){var t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())},t.prototype.batch=function(e){var t,n=this,r=e.update,i=e.optimistic,a=void 0===i||i,o=e.removeOptimistic,s=e.onWatchUpdated,u=function(e){var i=n,a=i.data,o=i.optimisticData;++n.txCount,e&&(n.data=n.optimisticData=e);try{return t=r(n)}finally{--n.txCount,n.data=a,n.optimisticData=o}},c=new Set;return s&&!this.txCount&&this.broadcastWatches((0,en.pi)((0,en.pi)({},e),{onWatchUpdated:function(e){return c.add(e),!1}})),"string"==typeof a?this.optimisticData=this.optimisticData.addLayer(a,u):!1===a?u(this.data):u(),"string"==typeof o&&(this.optimisticData=this.optimisticData.removeLayer(o)),s&&c.size?(this.broadcastWatches((0,en.pi)((0,en.pi)({},e),{onWatchUpdated:function(e,t){var n=s.call(this,e,t);return!1!==n&&c.delete(e),n}})),c.size&&c.forEach(function(e){return n.maybeBroadcastWatch.dirty(e)})):this.broadcastWatches(e),t},t.prototype.performTransaction=function(e,t){return this.batch({update:e,optimistic:t||null!==t})},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.typenameDocumentCache.get(e);return t||(t=nj(e),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}return e},t.prototype.transformForLink=function(e){var t=this.config.fragments;return t?t.transform(e):e},t.prototype.broadcastWatches=function(e){var t=this;this.txCount||this.watches.forEach(function(n){return t.maybeBroadcastWatch(n,e)})},t.prototype.broadcastWatch=function(e,t){var n=e.lastDiff,r=this.diff(e);(!t||(e.optimistic&&"string"==typeof t.optimistic&&(r.fromOptimisticTransaction=!0),!t.onWatchUpdated||!1!==t.onWatchUpdated.call(this,e,r,n)))&&(n&&(0,nm.D)(n.result,r.result)||e.callback(e.lastDiff=r,n))},t}(io),ar={possibleTypes:{ApproveJobProposalSpecPayload:["ApproveJobProposalSpecSuccess","JobAlreadyExistsError","NotFoundError"],BridgePayload:["Bridge","NotFoundError"],CancelJobProposalSpecPayload:["CancelJobProposalSpecSuccess","NotFoundError"],ChainPayload:["Chain","NotFoundError"],CreateAPITokenPayload:["CreateAPITokenSuccess","InputErrors"],CreateBridgePayload:["CreateBridgeSuccess"],CreateCSAKeyPayload:["CSAKeyExistsError","CreateCSAKeySuccess"],CreateFeedsManagerChainConfigPayload:["CreateFeedsManagerChainConfigSuccess","InputErrors","NotFoundError"],CreateFeedsManagerPayload:["CreateFeedsManagerSuccess","InputErrors","NotFoundError","SingleFeedsManagerError"],CreateJobPayload:["CreateJobSuccess","InputErrors"],CreateOCR2KeyBundlePayload:["CreateOCR2KeyBundleSuccess"],CreateOCRKeyBundlePayload:["CreateOCRKeyBundleSuccess"],CreateP2PKeyPayload:["CreateP2PKeySuccess"],DeleteAPITokenPayload:["DeleteAPITokenSuccess","InputErrors"],DeleteBridgePayload:["DeleteBridgeConflictError","DeleteBridgeInvalidNameError","DeleteBridgeSuccess","NotFoundError"],DeleteCSAKeyPayload:["DeleteCSAKeySuccess","NotFoundError"],DeleteFeedsManagerChainConfigPayload:["DeleteFeedsManagerChainConfigSuccess","NotFoundError"],DeleteJobPayload:["DeleteJobSuccess","NotFoundError"],DeleteOCR2KeyBundlePayload:["DeleteOCR2KeyBundleSuccess","NotFoundError"],DeleteOCRKeyBundlePayload:["DeleteOCRKeyBundleSuccess","NotFoundError"],DeleteP2PKeyPayload:["DeleteP2PKeySuccess","NotFoundError"],DeleteVRFKeyPayload:["DeleteVRFKeySuccess","NotFoundError"],DismissJobErrorPayload:["DismissJobErrorSuccess","NotFoundError"],Error:["CSAKeyExistsError","DeleteBridgeConflictError","DeleteBridgeInvalidNameError","InputError","JobAlreadyExistsError","NotFoundError","RunJobCannotRunError","SingleFeedsManagerError"],EthTransactionPayload:["EthTransaction","NotFoundError"],FeaturesPayload:["Features"],FeedsManagerPayload:["FeedsManager","NotFoundError"],GetSQLLoggingPayload:["SQLLogging"],GlobalLogLevelPayload:["GlobalLogLevel"],JobPayload:["Job","NotFoundError"],JobProposalPayload:["JobProposal","NotFoundError"],JobRunPayload:["JobRun","NotFoundError"],JobSpec:["BlockHeaderFeederSpec","BlockhashStoreSpec","BootstrapSpec","CronSpec","DirectRequestSpec","FluxMonitorSpec","GatewaySpec","KeeperSpec","OCR2Spec","OCRSpec","StandardCapabilitiesSpec","VRFSpec","WebhookSpec","WorkflowSpec"],NodePayload:["Node","NotFoundError"],PaginatedPayload:["BridgesPayload","ChainsPayload","EthTransactionAttemptsPayload","EthTransactionsPayload","JobRunsPayload","JobsPayload","NodesPayload"],RejectJobProposalSpecPayload:["NotFoundError","RejectJobProposalSpecSuccess"],RunJobPayload:["NotFoundError","RunJobCannotRunError","RunJobSuccess"],SetGlobalLogLevelPayload:["InputErrors","SetGlobalLogLevelSuccess"],SetSQLLoggingPayload:["SetSQLLoggingSuccess"],SetServicesLogLevelsPayload:["InputErrors","SetServicesLogLevelsSuccess"],UpdateBridgePayload:["NotFoundError","UpdateBridgeSuccess"],UpdateFeedsManagerChainConfigPayload:["InputErrors","NotFoundError","UpdateFeedsManagerChainConfigSuccess"],UpdateFeedsManagerPayload:["InputErrors","NotFoundError","UpdateFeedsManagerSuccess"],UpdateJobProposalSpecDefinitionPayload:["NotFoundError","UpdateJobProposalSpecDefinitionSuccess"],UpdatePasswordPayload:["InputErrors","UpdatePasswordSuccess"],VRFKeyPayload:["NotFoundError","VRFKeySuccess"]}};let ai=ar;var aa=(r=void 0,location.origin),ao=new nh({uri:"".concat(aa,"/query"),credentials:"include"}),as=new ia({cache:new an({possibleTypes:ai.possibleTypes}),link:ao});if(a.Z.locale(o),u().defaultFormat="YYYY-MM-DD h:mm:ss A","undefined"!=typeof document){var au,ac,al=f().hydrate;ac=X,al(c.createElement(et,{client:as},c.createElement(d.zj,null,c.createElement(i.MuiThemeProvider,{theme:J.r},c.createElement(ac,null)))),document.getElementById("root"))}})()})(); \ No newline at end of file +`+(a!==i?`result of cast: ${a}`:""))}return r}_cast(e,t){let n=void 0===e?e:this.transforms.reduce((t,n)=>n.call(this,t,e,this),e);return void 0===n&&(n=this.getDefault()),n}_validate(e,t={},n){let{sync:r,path:i,from:a=[],originalValue:o=e,strict:s=this.spec.strict,abortEarly:u=this.spec.abortEarly}=t,c=e;s||(c=this._cast(c,pB({assert:!1},t)));let l={value:c,path:i,options:t,originalValue:o,schema:this,label:this.spec.label,sync:r,from:a},f=[];this._typeError&&f.push(this._typeError),this._whitelistError&&f.push(this._whitelistError),this._blacklistError&&f.push(this._blacklistError),pO({args:l,value:c,path:i,sync:r,tests:f,endEarly:u},e=>{if(e)return void n(e,c);pO({tests:this.tests,args:l,path:i,sync:r,value:c,endEarly:u},n)})}validate(e,t,n){let r=this.resolve(pB({},t,{value:e}));return"function"==typeof n?r._validate(e,t,n):new Promise((n,i)=>r._validate(e,t,(e,t)=>{e?i(e):n(t)}))}validateSync(e,t){let n;return this.resolve(pB({},t,{value:e}))._validate(e,pB({},t,{sync:!0}),(e,t)=>{if(e)throw e;n=t}),n}isValid(e,t){return this.validate(e,t).then(()=>!0,e=>{if(pT.isError(e))return!1;throw e})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(n){if(pT.isError(n))return!1;throw n}}_getDefault(){let e=this.spec.default;return null==e?e:"function"==typeof e?e.call(this):pn(e)}getDefault(e){return this.resolve(e||{})._getDefault()}default(e){return 0===arguments.length?this._getDefault():this.clone({default:e})}strict(e=!0){var t=this.clone();return t.spec.strict=e,t}_isPresent(e){return null!=e}defined(e=pf.defined){return this.test({message:e,name:"defined",exclusive:!0,test:e=>void 0!==e})}required(e=pf.required){return this.clone({presence:"required"}).withMutation(t=>t.test({message:e,name:"required",exclusive:!0,test(e){return this.schema._isPresent(e)}}))}notRequired(){var e=this.clone({presence:"optional"});return e.tests=e.tests.filter(e=>"required"!==e.OPTIONS.name),e}nullable(e=!0){return this.clone({nullable:!1!==e})}transform(e){var t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(void 0===(t=1===e.length?"function"==typeof e[0]?{test:e[0]}:e[0]:2===e.length?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]}).message&&(t.message=pf.default),"function"!=typeof t.test)throw TypeError("`test` is a required parameters");let n=this.clone(),r=pR(t),i=t.exclusive||t.name&&!0===n.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(n.exclusiveTests[t.name]=!!t.exclusive),n.tests=n.tests.filter(e=>e.OPTIONS.name!==t.name||!i&&e.OPTIONS.test!==r.OPTIONS.test),n.tests.push(r),n}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let n=this.clone(),r=pS(e).map(e=>new pD(e));return r.forEach(e=>{e.isSibling&&n.deps.push(e.key)}),n.conditions.push(new pE(r,t)),n}typeError(e){var t=this.clone();return t._typeError=pR({message:e,name:"typeError",test(e){return!!(void 0===e||this.schema.isType(e))||this.createError({params:{type:this.schema._type}})}}),t}oneOf(e,t=pf.oneOf){var n=this.clone();return e.forEach(e=>{n._whitelist.add(e),n._blacklist.delete(e)}),n._whitelistError=pR({message:t,name:"oneOf",test(e){if(void 0===e)return!0;let t=this.schema._whitelist;return!!t.has(e,this.resolve)||this.createError({params:{values:t.toArray().join(", ")}})}}),n}notOneOf(e,t=pf.notOneOf){var n=this.clone();return e.forEach(e=>{n._blacklist.add(e),n._whitelist.delete(e)}),n._blacklistError=pR({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist;return!t.has(e,this.resolve)||this.createError({params:{values:t.toArray().join(", ")}})}}),n}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(){let e=this.clone(),{label:t,meta:n}=e.spec,r={meta:n,label:t,type:e.type,oneOf:e._whitelist.describe(),notOneOf:e._blacklist.describe(),tests:e.tests.map(e=>({name:e.OPTIONS.name,params:e.OPTIONS.params})).filter((e,t,n)=>n.findIndex(t=>t.name===e.name)===t)};return r}}for(let pH of(pU.prototype.__isYupSchema__=!0,["validate","validateSync"]))pU.prototype[`${pH}At`]=function(e,t,n={}){let{parent:r,parentPath:i,schema:a}=pF(this,e,t,n.context);return a[pH](r&&r[i],pB({},n,{parent:r,path:e}))};for(let p$ of["equals","is"])pU.prototype[p$]=pU.prototype.oneOf;for(let pz of["not","nope"])pU.prototype[pz]=pU.prototype.notOneOf;pU.prototype.optional=pU.prototype.notRequired;let pG=pU;function pW(){return new pG}pW.prototype=pG.prototype;let pK=e=>null==e;function pV(){return new pq}class pq extends pU{constructor(){super({type:"boolean"}),this.withMutation(()=>{this.transform(function(e){if(!this.isType(e)){if(/^(true|1)$/i.test(String(e)))return!0;if(/^(false|0)$/i.test(String(e)))return!1}return e})})}_typeCheck(e){return e instanceof Boolean&&(e=e.valueOf()),"boolean"==typeof e}isTrue(e=pb.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test:e=>pK(e)||!0===e})}isFalse(e=pb.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test:e=>pK(e)||!1===e})}}pV.prototype=pq.prototype;let pZ=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,pX=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,pJ=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,pQ=e=>pK(e)||e===e.trim(),p1=({}).toString();function p0(){return new p2}class p2 extends pU{constructor(){super({type:"string"}),this.withMutation(()=>{this.transform(function(e){if(this.isType(e)||Array.isArray(e))return e;let t=null!=e&&e.toString?e.toString():e;return t===p1?e:t})})}_typeCheck(e){return e instanceof String&&(e=e.valueOf()),"string"==typeof e}_isPresent(e){return super._isPresent(e)&&!!e.length}length(e,t=pd.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},test(t){return pK(t)||t.length===this.resolve(e)}})}min(e,t=pd.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return pK(t)||t.length>=this.resolve(e)}})}max(e,t=pd.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},test(t){return pK(t)||t.length<=this.resolve(e)}})}matches(e,t){let n=!1,r,i;return t&&("object"==typeof t?{excludeEmptyString:n=!1,message:r,name:i}=t:r=t),this.test({name:i||"matches",message:r||pd.matches,params:{regex:e},test:t=>pK(t)||""===t&&n||-1!==t.search(e)})}email(e=pd.email){return this.matches(pZ,{name:"email",message:e,excludeEmptyString:!0})}url(e=pd.url){return this.matches(pX,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=pd.uuid){return this.matches(pJ,{name:"uuid",message:e,excludeEmptyString:!1})}ensure(){return this.default("").transform(e=>null===e?"":e)}trim(e=pd.trim){return this.transform(e=>null!=e?e.trim():e).test({message:e,name:"trim",test:pQ})}lowercase(e=pd.lowercase){return this.transform(e=>pK(e)?e:e.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,test:e=>pK(e)||e===e.toLowerCase()})}uppercase(e=pd.uppercase){return this.transform(e=>pK(e)?e:e.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,test:e=>pK(e)||e===e.toUpperCase()})}}p0.prototype=p2.prototype;let p3=e=>e!=+e;function p4(){return new p6}class p6 extends pU{constructor(){super({type:"number"}),this.withMutation(()=>{this.transform(function(e){let t=e;if("string"==typeof t){if(""===(t=t.replace(/\s/g,"")))return NaN;t=+t}return this.isType(t)?t:parseFloat(t)})})}_typeCheck(e){return e instanceof Number&&(e=e.valueOf()),"number"==typeof e&&!p3(e)}min(e,t=ph.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return pK(t)||t>=this.resolve(e)}})}max(e,t=ph.max){return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(t){return pK(t)||t<=this.resolve(e)}})}lessThan(e,t=ph.lessThan){return this.test({message:t,name:"max",exclusive:!0,params:{less:e},test(t){return pK(t)||tthis.resolve(e)}})}positive(e=ph.positive){return this.moreThan(0,e)}negative(e=ph.negative){return this.lessThan(0,e)}integer(e=ph.integer){return this.test({name:"integer",message:e,test:e=>pK(e)||Number.isInteger(e)})}truncate(){return this.transform(e=>pK(e)?e:0|e)}round(e){var t,n=["ceil","floor","round","trunc"];if("trunc"===(e=(null==(t=e)?void 0:t.toLowerCase())||"round"))return this.truncate();if(-1===n.indexOf(e.toLowerCase()))throw TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(t=>pK(t)?t:Math[e](t))}}p4.prototype=p6.prototype;var p5=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;function p8(e){var t,n,r=[1,4,5,6,7,10,11],i=0;if(n=p5.exec(e)){for(var a,o=0;a=r[o];++o)n[a]=+n[a]||0;n[2]=(+n[2]||1)-1,n[3]=+n[3]||1,n[7]=n[7]?String(n[7]).substr(0,3):0,(void 0===n[8]||""===n[8])&&(void 0===n[9]||""===n[9])?t=+new Date(n[1],n[2],n[3],n[4],n[5],n[6],n[7]):("Z"!==n[8]&&void 0!==n[9]&&(i=60*n[10]+n[11],"+"===n[9]&&(i=0-i)),t=Date.UTC(n[1],n[2],n[3],n[4],n[5]+i,n[6],n[7]))}else t=Date.parse?Date.parse(e):NaN;return t}let p9=new Date(""),p7=e=>"[object Date]"===Object.prototype.toString.call(e);function be(){return new bt}class bt extends pU{constructor(){super({type:"date"}),this.withMutation(()=>{this.transform(function(e){return this.isType(e)?e:(e=p8(e),isNaN(e)?p9:new Date(e))})})}_typeCheck(e){return p7(e)&&!isNaN(e.getTime())}prepareParam(e,t){let n;if(pD.isRef(e))n=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);n=r}return n}min(e,t=pp.min){let n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(e){return pK(e)||e>=this.resolve(n)}})}max(e,t=pp.max){var n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(e){return pK(e)||e<=this.resolve(n)}})}}bt.INVALID_DATE=p9,be.prototype=bt.prototype,be.INVALID_DATE=p9;var bn=n(11865),br=n.n(bn),bi=n(68929),ba=n.n(bi),bo=n(67523),bs=n.n(bo),bu=n(94633),bc=n.n(bu);function bl(e,t=[]){let n=[],r=[];function i(e,i){var a=(0,pC.split)(e)[0];~r.indexOf(a)||r.push(a),~t.indexOf(`${i}-${a}`)||n.push([i,a])}for(let a in e)if(py()(e,a)){let o=e[a];~r.indexOf(a)||r.push(a),pD.isRef(o)&&o.isSibling?i(o.path,a):pw(o)&&"deps"in o&&o.deps.forEach(e=>i(e,a))}return bc().array(r,n).reverse()}function bf(e,t){let n=1/0;return e.some((e,r)=>{var i;if((null==(i=t.path)?void 0:i.indexOf(e))!==-1)return n=r,!0}),n}function bd(e){return(t,n)=>bf(e,t)-bf(e,n)}function bh(){return(bh=Object.assign||function(e){for(var t=1;t"[object Object]"===Object.prototype.toString.call(e);function bb(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(e=>-1===n.indexOf(e))}let bm=bd([]);class bg extends pU{constructor(e){super({type:"object"}),this.fields=Object.create(null),this._sortErrors=bm,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{this.transform(function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e=null}return this.isType(e)?e:null}),e&&this.shape(e)})}_typeCheck(e){return bp(e)||"function"==typeof e}_cast(e,t={}){var n;let r=super._cast(e,t);if(void 0===r)return this.getDefault();if(!this._typeCheck(r))return r;let i=this.fields,a=null!=(n=t.stripUnknown)?n:this.spec.noUnknown,o=this._nodes.concat(Object.keys(r).filter(e=>-1===this._nodes.indexOf(e))),s={},u=bh({},t,{parent:s,__validating:t.__validating||!1}),c=!1;for(let l of o){let f=i[l],d=py()(r,l);if(f){let h,p=r[l];u.path=(t.path?`${t.path}.`:"")+l;let b="spec"in(f=f.resolve({value:p,context:t.context,parent:s}))?f.spec:void 0,m=null==b?void 0:b.strict;if(null==b?void 0:b.strip){c=c||l in r;continue}void 0!==(h=t.__validating&&m?r[l]:f.cast(r[l],u))&&(s[l]=h)}else d&&!a&&(s[l]=r[l]);s[l]!==r[l]&&(c=!0)}return c?s:r}_validate(e,t={},n){let r=[],{sync:i,from:a=[],originalValue:o=e,abortEarly:s=this.spec.abortEarly,recursive:u=this.spec.recursive}=t;a=[{schema:this,value:o},...a],t.__validating=!0,t.originalValue=o,t.from=a,super._validate(e,t,(e,c)=>{if(e){if(!pT.isError(e)||s)return void n(e,c);r.push(e)}if(!u||!bp(c)){n(r[0]||null,c);return}o=o||c;let l=this._nodes.map(e=>(n,r)=>{let i=-1===e.indexOf(".")?(t.path?`${t.path}.`:"")+e:`${t.path||""}["${e}"]`,s=this.fields[e];if(s&&"validate"in s){s.validate(c[e],bh({},t,{path:i,from:a,strict:!0,parent:c,originalValue:o[e]}),r);return}r(null)});pO({sync:i,tests:l,value:c,errors:r,endEarly:s,sort:this._sortErrors,path:t.path},n)})}clone(e){let t=super.clone(e);return t.fields=bh({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),n=t.fields;for(let[r,i]of Object.entries(this.fields)){let a=n[r];void 0===a?n[r]=i:a instanceof pU&&i instanceof pU&&(n[r]=i.concat(a))}return t.withMutation(()=>t.shape(n))}getDefaultFromShape(){let e={};return this._nodes.forEach(t=>{let n=this.fields[t];e[t]="default"in n?n.getDefault():void 0}),e}_getDefault(){return"default"in this.spec?super._getDefault():this._nodes.length?this.getDefaultFromShape():void 0}shape(e,t=[]){let n=this.clone(),r=Object.assign(n.fields,e);if(n.fields=r,n._sortErrors=bd(Object.keys(r)),t.length){Array.isArray(t[0])||(t=[t]);let i=t.map(([e,t])=>`${e}-${t}`);n._excludedEdges=n._excludedEdges.concat(i)}return n._nodes=bl(r,n._excludedEdges),n}pick(e){let t={};for(let n of e)this.fields[n]&&(t[n]=this.fields[n]);return this.clone().withMutation(e=>(e.fields={},e.shape(t)))}omit(e){let t=this.clone(),n=t.fields;for(let r of(t.fields={},e))delete n[r];return t.withMutation(()=>t.shape(n))}from(e,t,n){let r=(0,pC.getter)(e,!0);return this.transform(i=>{if(null==i)return i;let a=i;return py()(i,e)&&(a=bh({},i),n||delete a[e],a[t]=r(i)),a})}noUnknown(e=!0,t=pm.noUnknown){"string"==typeof e&&(t=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;let n=bb(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,t=pm.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>t&&bs()(t,(t,n)=>e(n)))}camelCase(){return this.transformKeys(ba())}snakeCase(){return this.transformKeys(br())}constantCase(){return this.transformKeys(e=>br()(e).toUpperCase())}describe(){let e=super.describe();return e.fields=pL()(this.fields,e=>e.describe()),e}}function bv(e){return new bg(e)}function by(){return(by=Object.assign||function(e){for(var t=1;t{this.transform(function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e=null}return this.isType(e)?e:null})})}_typeCheck(e){return Array.isArray(e)}get _subType(){return this.innerType}_cast(e,t){let n=super._cast(e,t);if(!this._typeCheck(n)||!this.innerType)return n;let r=!1,i=n.map((e,n)=>{let i=this.innerType.cast(e,by({},t,{path:`${t.path||""}[${n}]`}));return i!==e&&(r=!0),i});return r?i:n}_validate(e,t={},n){var r,i;let a=[],o=t.sync,s=t.path,u=this.innerType,c=null!=(r=t.abortEarly)?r:this.spec.abortEarly,l=null!=(i=t.recursive)?i:this.spec.recursive,f=null!=t.originalValue?t.originalValue:e;super._validate(e,t,(e,r)=>{if(e){if(!pT.isError(e)||c)return void n(e,r);a.push(e)}if(!l||!u||!this._typeCheck(r)){n(a[0]||null,r);return}f=f||r;let i=Array(r.length);for(let d=0;du.validate(h,b,t)}pO({sync:o,path:s,value:r,errors:a,endEarly:c,tests:i},n)})}clone(e){let t=super.clone(e);return t.innerType=this.innerType,t}concat(e){let t=super.concat(e);return t.innerType=this.innerType,e.innerType&&(t.innerType=t.innerType?t.innerType.concat(e.innerType):e.innerType),t}of(e){let t=this.clone();if(!pw(e))throw TypeError("`array.of()` sub-schema must be a valid yup schema not: "+pl(e));return t.innerType=e,t}length(e,t=pg.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},test(t){return pK(t)||t.length===this.resolve(e)}})}min(e,t){return t=t||pg.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return pK(t)||t.length>=this.resolve(e)}})}max(e,t){return t=t||pg.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(t){return pK(t)||t.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,t)=>this._typeCheck(e)?e:null==t?[]:[].concat(t))}compact(e){let t=e?(t,n,r)=>!e(t,n,r):e=>!!e;return this.transform(e=>null!=e?e.filter(t):e)}describe(){let e=super.describe();return this.innerType&&(e.innerType=this.innerType.describe()),e}nullable(e=!0){return super.nullable(e)}defined(){return super.defined()}required(e){return super.required(e)}}bw.prototype=b_.prototype;var bE=bv().shape({name:p0().required("Required"),url:p0().required("Required")}),bS=function(e){var t=e.initialValues,n=e.onSubmit,r=e.submitButtonText,i=e.nameDisabled,a=void 0!==i&&i;return l.createElement(hT,{initialValues:t,validationSchema:bE,onSubmit:n},function(e){var t=e.isSubmitting;return l.createElement(l.Fragment,null,l.createElement(hR,{"data-testid":"bridge-form",noValidate:!0},l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:12,md:7},l.createElement(hP,{component:hX,id:"name",name:"name",label:"Name",disabled:a,required:!0,fullWidth:!0,FormHelperTextProps:{"data-testid":"name-helper-text"}})),l.createElement(d.Z,{item:!0,xs:12,md:7},l.createElement(hP,{component:hX,id:"url",name:"url",label:"Bridge URL",placeholder:"https://",required:!0,fullWidth:!0,FormHelperTextProps:{"data-testid":"url-helper-text"}})),l.createElement(d.Z,{item:!0,xs:12,md:7},l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:7},l.createElement(hP,{component:hX,id:"minimumContractPayment",name:"minimumContractPayment",label:"Minimum Contract Payment",placeholder:"0",fullWidth:!0,inputProps:{min:0},FormHelperTextProps:{"data-testid":"minimumContractPayment-helper-text"}})),l.createElement(d.Z,{item:!0,xs:7},l.createElement(hP,{component:hX,id:"confirmations",name:"confirmations",label:"Confirmations",placeholder:"0",type:"number",fullWidth:!0,inputProps:{min:0},FormHelperTextProps:{"data-testid":"confirmations-helper-text"}})))),l.createElement(d.Z,{item:!0,xs:12,md:7},l.createElement(ok.default,{variant:"contained",color:"primary",type:"submit",disabled:t,size:"large"},r)))))})},bk=function(e){var t=e.bridge,n=e.onSubmit,r={name:t.name,url:t.url,minimumContractPayment:t.minimumContractPayment,confirmations:t.confirmations};return l.createElement(ig,null,l.createElement(d.Z,{container:!0,spacing:40},l.createElement(d.Z,{item:!0,xs:12,md:11,lg:9},l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Edit Bridge",action:l.createElement(aA.Z,{component:tz,href:"/bridges/".concat(t.id)},"Cancel")}),l.createElement(aW.Z,null,l.createElement(bS,{nameDisabled:!0,initialValues:r,onSubmit:n,submitButtonText:"Save Bridge"}))))))};function bx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&void 0!==arguments[0]&&arguments[0],t=e?function(){return l.createElement(x.default,{variant:"body1"},"Loading...")}:function(){return null};return{isLoading:e,LoadingPlaceholder:t}},mc=n(76023);function ml(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function mB(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=4?[e[0],e[1],e[2],e[3],"".concat(e[0],".").concat(e[1]),"".concat(e[0],".").concat(e[2]),"".concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[0]),"".concat(e[1],".").concat(e[2]),"".concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[1]),"".concat(e[2],".").concat(e[3]),"".concat(e[3],".").concat(e[0]),"".concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[0]),"".concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[1],".").concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[2],".").concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[3],".").concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[2],".").concat(e[1],".").concat(e[0])]:void 0}var mZ={};function mX(e){if(0===e.length||1===e.length)return e;var t=e.join(".");return mZ[t]||(mZ[t]=mq(e)),mZ[t]}function mJ(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return mX(e.filter(function(e){return"token"!==e})).reduce(function(e,t){return mK({},e,n[t])},t)}function mQ(e){return e.join(" ")}function m1(e,t){var n=0;return function(r){return n+=1,r.map(function(r,i){return m0({node:r,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(i)})})}}function m0(e){var t=e.node,n=e.stylesheet,r=e.style,i=void 0===r?{}:r,a=e.useInlineStyles,o=e.key,s=t.properties,u=t.type,c=t.tagName,f=t.value;if("text"===u)return f;if(c){var d,h=m1(n,a);if(a){var p=Object.keys(n).reduce(function(e,t){return t.split(".").forEach(function(t){e.includes(t)||e.push(t)}),e},[]),b=s.className&&s.className.includes("token")?["token"]:[],m=s.className&&b.concat(s.className.filter(function(e){return!p.includes(e)}));d=mK({},s,{className:mQ(m)||void 0,style:mJ(s.className,Object.assign({},s.style,i),n)})}else d=mK({},s,{className:mQ(s.className)});var g=h(t.children);return l.createElement(c,(0,mV.Z)({key:o},d),g)}}let m2=function(e,t){return -1!==e.listLanguages().indexOf(t)};var m3=/\n/g;function m4(e){return e.match(m3)}function m6(e){var t=e.lines,n=e.startingLineNumber,r=e.style;return t.map(function(e,t){var i=t+n;return l.createElement("span",{key:"line-".concat(t),className:"react-syntax-highlighter-line-number",style:"function"==typeof r?r(i):r},"".concat(i,"\n"))})}function m5(e){var t=e.codeString,n=e.codeStyle,r=e.containerStyle,i=void 0===r?{float:"left",paddingRight:"10px"}:r,a=e.numberStyle,o=void 0===a?{}:a,s=e.startingLineNumber;return l.createElement("code",{style:Object.assign({},n,i)},m6({lines:t.replace(/\n$/,"").split("\n"),style:o,startingLineNumber:s}))}function m8(e){return"".concat(e.toString().length,".25em")}function m9(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function m7(e,t,n){var r,i={display:"inline-block",minWidth:m8(n),paddingRight:"1em",textAlign:"right",userSelect:"none"};return mK({},i,"function"==typeof e?e(t):e)}function ge(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,i=e.largestLineNumber,a=e.showInlineLineNumbers,o=e.lineProps,s=void 0===o?{}:o,u=e.className,c=void 0===u?[]:u,l=e.showLineNumbers,f=e.wrapLongLines,d="function"==typeof s?s(n):s;if(d.className=c,n&&a){var h=m7(r,n,i);t.unshift(m9(n,h))}return f&l&&(d.style=mK({},d.style,{display:"flex"})),{type:"element",tagName:"span",properties:d,children:t}}function gt(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=0;r2&&void 0!==arguments[2]?arguments[2]:[];return ge({children:e,lineNumber:t,lineNumberStyle:s,largestLineNumber:o,showInlineLineNumbers:i,lineProps:n,className:a,showLineNumbers:r,wrapLongLines:u})}function b(e,t){if(r&&t&&i){var n=m7(s,t,o);e.unshift(m9(t,n))}return e}function m(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return t||r.length>0?p(e,n,r):b(e,n)}for(var g=function(){var e=l[h],t=e.children[0].value;if(m4(t)){var n=t.split("\n");n.forEach(function(t,i){var o=r&&f.length+a,s={type:"text",value:"".concat(t,"\n")};if(0===i){var u=l.slice(d+1,h).concat(ge({children:[s],className:e.properties.className})),c=m(u,o);f.push(c)}else if(i===n.length-1){if(l[h+1]&&l[h+1].children&&l[h+1].children[0]){var p={type:"text",value:"".concat(t)},b=ge({children:[p],className:e.properties.className});l.splice(h+1,0,b)}else{var g=[s],v=m(g,o,e.properties.className);f.push(v)}}else{var y=[s],w=m(y,o,e.properties.className);f.push(w)}}),d=h}h++};h code[class*="language-"]':{background:"#f5f2f0",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"slategray"},prolog:{color:"slategray"},doctype:{color:"slategray"},cdata:{color:"slategray"},punctuation:{color:"#999"},namespace:{Opacity:".7"},property:{color:"#905"},tag:{color:"#905"},boolean:{color:"#905"},number:{color:"#905"},constant:{color:"#905"},symbol:{color:"#905"},deleted:{color:"#905"},selector:{color:"#690"},"attr-name":{color:"#690"},string:{color:"#690"},char:{color:"#690"},builtin:{color:"#690"},inserted:{color:"#690"},operator:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},entity:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)",cursor:"help"},url:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".language-css .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".style .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},atrule:{color:"#07a"},"attr-value":{color:"#07a"},keyword:{color:"#07a"},function:{color:"#DD4A68"},"class-name":{color:"#DD4A68"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"bold"},variable:{color:"#e90"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}};var gu=n(98695),gc=n.n(gu);let gl=["abap","abnf","actionscript","ada","agda","al","antlr4","apacheconf","apl","applescript","aql","arduino","arff","asciidoc","asm6502","aspnet","autohotkey","autoit","bash","basic","batch","bbcode","birb","bison","bnf","brainfuck","brightscript","bro","bsl","c","cil","clike","clojure","cmake","coffeescript","concurnas","cpp","crystal","csharp","csp","css-extras","css","cypher","d","dart","dax","dhall","diff","django","dns-zone-file","docker","ebnf","editorconfig","eiffel","ejs","elixir","elm","erb","erlang","etlua","excel-formula","factor","firestore-security-rules","flow","fortran","fsharp","ftl","gcode","gdscript","gedcom","gherkin","git","glsl","gml","go","graphql","groovy","haml","handlebars","haskell","haxe","hcl","hlsl","hpkp","hsts","http","ichigojam","icon","iecst","ignore","inform7","ini","io","j","java","javadoc","javadoclike","javascript","javastacktrace","jolie","jq","js-extras","js-templates","jsdoc","json","json5","jsonp","jsstacktrace","jsx","julia","keyman","kotlin","latex","latte","less","lilypond","liquid","lisp","livescript","llvm","lolcode","lua","makefile","markdown","markup-templating","markup","matlab","mel","mizar","mongodb","monkey","moonscript","n1ql","n4js","nand2tetris-hdl","naniscript","nasm","neon","nginx","nim","nix","nsis","objectivec","ocaml","opencl","oz","parigp","parser","pascal","pascaligo","pcaxis","peoplecode","perl","php-extras","php","phpdoc","plsql","powerquery","powershell","processing","prolog","properties","protobuf","pug","puppet","pure","purebasic","purescript","python","q","qml","qore","r","racket","reason","regex","renpy","rest","rip","roboconf","robotframework","ruby","rust","sas","sass","scala","scheme","scss","shell-session","smali","smalltalk","smarty","sml","solidity","solution-file","soy","sparql","splunk-spl","sqf","sql","stan","stylus","swift","t4-cs","t4-templating","t4-vb","tap","tcl","textile","toml","tsx","tt2","turtle","twig","typescript","typoscript","unrealscript","vala","vbnet","velocity","verilog","vhdl","vim","visual-basic","warpscript","wasm","wiki","xeora","xml-doc","xojo","xquery","yaml","yang","zig"];var gf=go(gc(),gs);gf.supportedLanguages=gl;let gd=gf;var gh=n(64566);function gp(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function gb(){var e=gp(["\n query FetchConfigV2 {\n configv2 {\n user\n effective\n }\n }\n"]);return gb=function(){return e},e}var gm=n0(gb()),gg=function(e){var t=e.children;return l.createElement(ir.Z,null,l.createElement(r7.default,{component:"th",scope:"row",colSpan:3},t))},gv=function(){return l.createElement(gg,null,"...")},gy=function(e){var t=e.children;return l.createElement(gg,null,t)},gw=function(e){var t=e.loading,n=e.toml,r=e.error,i=void 0===r?"":r,a=e.title,o=e.expanded;if(i)return l.createElement(gy,null,i);if(t)return l.createElement(gv,null);a||(a="TOML");var s={display:"block"};return l.createElement(x.default,null,l.createElement(mP.Z,{defaultExpanded:o},l.createElement(mR.Z,{expandIcon:l.createElement(gh.Z,null)},a),l.createElement(mj.Z,{style:s},l.createElement(gd,{language:"toml",style:gs},n))))},g_=function(){var e=rv(gm,{fetchPolicy:"cache-and-network"}),t=e.data,n=e.loading,r=e.error;return(null==t?void 0:t.configv2.effective)=="N/A"?l.createElement(l.Fragment,null,l.createElement(d.Z,{item:!0,xs:12},l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"TOML Configuration"}),l.createElement(gw,{title:"V2 config dump:",error:null==r?void 0:r.message,loading:n,toml:null==t?void 0:t.configv2.user,showHead:!0})))):l.createElement(l.Fragment,null,l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12},l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"TOML Configuration"}),l.createElement(gw,{title:"User specified:",error:null==r?void 0:r.message,loading:n,toml:null==t?void 0:t.configv2.user,showHead:!0,expanded:!0}),l.createElement(gw,{title:"Effective (with defaults):",error:null==r?void 0:r.message,loading:n,toml:null==t?void 0:t.configv2.effective,showHead:!0})))))},gE=n(34823),gS=function(e){return(0,b.createStyles)({cell:{paddingTop:1.5*e.spacing.unit,paddingBottom:1.5*e.spacing.unit}})},gk=(0,b.withStyles)(gS)(function(e){var t=e.classes,n=(0,A.I0)();(0,l.useEffect)(function(){n((0,ty.DQ)())});var r=(0,A.v9)(gE.N,A.wU);return l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Node"}),l.createElement(r8.Z,null,l.createElement(r9.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,{className:t.cell},l.createElement(x.default,null,"Version"),l.createElement(x.default,{variant:"subtitle1",color:"textSecondary"},r.version))),l.createElement(ir.Z,null,l.createElement(r7.default,{className:t.cell},l.createElement(x.default,null,"SHA"),l.createElement(x.default,{variant:"subtitle1",color:"textSecondary"},r.commitSHA))))))}),gx=function(){return l.createElement(ig,null,l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,sm:12,md:8},l.createElement(d.Z,{container:!0},l.createElement(g_,null))),l.createElement(d.Z,{item:!0,sm:12,md:4},l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12},l.createElement(gk,null)),l.createElement(d.Z,{item:!0,xs:12},l.createElement(mN,null)),l.createElement(d.Z,{item:!0,xs:12},l.createElement(mE,null))))))},gT=function(){return l.createElement(gx,null)},gM=function(){return l.createElement(gT,null)},gO=n(44431),gA=1e18,gL=function(e){return new gO.BigNumber(e).dividedBy(gA).toFixed(8)},gC=function(e){var t=e.keys,n=e.chainID,r=e.hideHeaderTitle;return l.createElement(l.Fragment,null,l.createElement(sl.Z,{title:!r&&"Account Balances",subheader:"Chain ID "+n}),l.createElement(aW.Z,null,l.createElement(w.default,{dense:!1,disablePadding:!0},t&&t.map(function(e,r){return l.createElement(l.Fragment,null,l.createElement(_.default,{disableGutters:!0,key:["acc-balance",n.toString(),r.toString()].join("-")},l.createElement(E.Z,{primary:l.createElement(l.Fragment,null,l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:12},l.createElement(op,{title:"Address"}),l.createElement(ob,{value:e.address})),l.createElement(d.Z,{item:!0,xs:6},l.createElement(op,{title:"Native Token Balance"}),l.createElement(ob,{value:e.ethBalance||"--"})),l.createElement(d.Z,{item:!0,xs:6},l.createElement(op,{title:"LINK Balance"}),l.createElement(ob,{value:e.linkBalance?gL(e.linkBalance):"--"}))))})),r+1s&&l.createElement(gB.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,{className:r.footer},l.createElement(aA.Z,{href:"/runs",component:tz},"View More"))))))});function vt(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function vn(){var e=vt(["\n ","\n query FetchRecentJobRuns($offset: Int, $limit: Int) {\n jobRuns(offset: $offset, limit: $limit) {\n results {\n ...RecentJobRunsPayload_ResultsFields\n }\n metadata {\n total\n }\n }\n }\n"]);return vn=function(){return e},e}var vr=5,vi=n0(vn(),g9),va=function(){var e=rv(vi,{variables:{offset:0,limit:vr},fetchPolicy:"cache-and-network"}),t=e.data,n=e.loading,r=e.error;return l.createElement(ve,{data:t,errorMsg:null==r?void 0:r.message,loading:n,maxRunsSize:vr})},vo=function(e){return(0,b.createStyles)({style:{textAlign:"center",padding:2.5*e.spacing.unit,position:"fixed",left:"0",bottom:"0",width:"100%",borderRadius:0},bareAnchor:{color:e.palette.common.black,textDecoration:"none"}})},vs=(0,b.withStyles)(vo)(function(e){var t=e.classes,n=(0,A.v9)(gE.N,A.wU),r=(0,A.I0)();return(0,l.useEffect)(function(){r((0,ty.DQ)())}),l.createElement(ii.default,{className:t.style},l.createElement(x.default,null,"Chainlink Node ",n.version," at commit"," ",l.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://github.com/smartcontractkit/chainlink/commit/".concat(n.commitSHA),className:t.bareAnchor},n.commitSHA)))}),vu=function(e){return(0,b.createStyles)({cell:{borderColor:e.palette.divider,borderTop:"1px solid",borderBottom:"none",paddingTop:2*e.spacing.unit,paddingBottom:2*e.spacing.unit,paddingLeft:2*e.spacing.unit},block:{display:"block"},overflowEllipsis:{textOverflow:"ellipsis",overflow:"hidden"}})},vc=(0,b.withStyles)(vu)(function(e){var t=e.classes,n=e.job;return l.createElement(ir.Z,null,l.createElement(r7.default,{scope:"row",className:t.cell},l.createElement(d.Z,{container:!0,spacing:0},l.createElement(d.Z,{item:!0,xs:12},l.createElement(ih,{href:"/jobs/".concat(n.id),classes:{linkContent:t.block}},l.createElement(x.default,{className:t.overflowEllipsis,variant:"body1",component:"span",color:"primary"},n.name||n.id))),l.createElement(d.Z,{item:!0,xs:12},l.createElement(x.default,{variant:"body1",color:"textSecondary"},"Created ",l.createElement(aO,{tooltip:!0},n.createdAt))))))});function vl(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function vf(){var e=vl(["\n fragment RecentJobsPayload_ResultsFields on Job {\n id\n name\n createdAt\n }\n"]);return vf=function(){return e},e}var vd=n0(vf()),vh=function(){return(0,b.createStyles)({cardHeader:{borderBottom:0},table:{tableLayout:"fixed"}})},vp=(0,b.withStyles)(vh)(function(e){var t,n,r=e.classes,i=e.data,a=e.errorMsg,o=e.loading;return l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Recent Jobs",className:r.cardHeader}),l.createElement(r8.Z,{className:r.table},l.createElement(r9.Z,null,l.createElement(g$,{visible:o}),l.createElement(gz,{visible:(null===(t=null==i?void 0:i.jobs.results)||void 0===t?void 0:t.length)===0},"No recently created jobs"),l.createElement(gU,{msg:a}),null===(n=null==i?void 0:i.jobs.results)||void 0===n?void 0:n.map(function(e,t){return l.createElement(vc,{job:e,key:t})}))))});function vb(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function vm(){var e=vb(["\n ","\n query FetchRecentJobs($offset: Int, $limit: Int) {\n jobs(offset: $offset, limit: $limit) {\n results {\n ...RecentJobsPayload_ResultsFields\n }\n }\n }\n"]);return vm=function(){return e},e}var vg=5,vv=n0(vm(),vd),vy=function(){var e=rv(vv,{variables:{offset:0,limit:vg},fetchPolicy:"cache-and-network"}),t=e.data,n=e.loading,r=e.error;return l.createElement(vp,{data:t,errorMsg:null==r?void 0:r.message,loading:n})},vw=function(){return l.createElement(ig,null,l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:8},l.createElement(va,null)),l.createElement(d.Z,{item:!0,xs:4},l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12},l.createElement(gY,null)),l.createElement(d.Z,{item:!0,xs:12},l.createElement(vy,null))))),l.createElement(vs,null))},v_=function(){return l.createElement(vw,null)},vE=function(){return l.createElement(v_,null)},vS=n(87239),vk=function(e){switch(e){case"DirectRequestSpec":return"Direct Request";case"FluxMonitorSpec":return"Flux Monitor";default:return e.replace(/Spec$/,"")}},vx=n(5022),vT=n(78718),vM=n.n(vT);function vO(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n1?t-1:0),r=1;r1?t-1:0),r=1;re.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&n.map(function(e){return l.createElement(ir.Z,{key:e.id,style:{cursor:"pointer"},onClick:function(){return r.push("/runs/".concat(e.id))}},l.createElement(r7.default,{className:t.idCell,scope:"row"},l.createElement("div",{className:t.runDetails},l.createElement(x.default,{variant:"h5",color:"primary",component:"span"},e.id))),l.createElement(r7.default,{className:t.stampCell},l.createElement(x.default,{variant:"body1",color:"textSecondary",className:t.stamp},"Created ",l.createElement(aO,{tooltip:!0},e.createdAt))),l.createElement(r7.default,{className:t.statusCell,scope:"row"},l.createElement(x.default,{variant:"body1",className:O()(t.status,yh(t,e.status))},e.status.toLowerCase())))})))}),yb=n(16839),ym=n.n(yb);function yg(e){var t=e.replace(/\w+\s*=\s*<([^>]|[\r\n])*>/g,""),n=ym().read(t),r=n.edges();return n.nodes().map(function(e){var t={id:e,parentIds:r.filter(function(t){return t.w===e}).map(function(e){return e.v})};return Object.keys(n.node(e)).length>0&&(t.attributes=n.node(e)),t})}var yv=n(94164),yy=function(e){var t=e.data,n=[];return(null==t?void 0:t.attributes)&&Object.keys(t.attributes).forEach(function(e){var r;n.push(l.createElement("div",{key:e},l.createElement(x.default,{variant:"body1",color:"textSecondary",component:"div"},l.createElement("b",null,e,":")," ",null===(r=t.attributes)||void 0===r?void 0:r[e])))}),l.createElement("div",null,t&&l.createElement(x.default,{variant:"body1",color:"textPrimary"},l.createElement("b",null,t.id)),n)},yw=n(73343),y_=n(3379),yE=n.n(y_);function yS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);nwindow.innerWidth?u-r.getBoundingClientRect().width-a:u+a,n=c+r.getBoundingClientRect().height+i>window.innerHeight?c-r.getBoundingClientRect().height-a:c+a,r.style.opacity=String(1),r.style.top="".concat(n,"px"),r.style.left="".concat(t,"px"),r.style.zIndex=String(1)}},h=function(e){var t=document.getElementById("tooltip-d3-chart-".concat(e));t&&(t.style.opacity=String(0),t.style.zIndex=String(-1))};return l.createElement("div",{style:{fontFamily:"sans-serif",fontWeight:"normal"}},l.createElement(yv.kJ,{id:"task-list-graph-d3",data:i,config:s,onMouseOverNode:d,onMouseOutNode:h},"D3 chart"),n.map(function(e){return l.createElement("div",{key:"d3-tooltip-key-".concat(e.id),id:"tooltip-d3-chart-".concat(e.id),style:{position:"absolute",opacity:"0",border:"1px solid rgba(0, 0, 0, 0.1)",padding:yw.r.spacing.unit,background:"white",borderRadius:5,zIndex:-1,inlineSize:"min-content"}},l.createElement(yy,{data:e}))}))};function yL(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);nyY&&l.createElement("div",{className:t.runDetails},l.createElement(aA.Z,{href:"/jobs/".concat(n.id,"/runs"),component:tz},"View more")))),l.createElement(d.Z,{item:!0,xs:12,sm:6},l.createElement(yF,{observationSource:n.observationSource})))});function yH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&void 0!==arguments[0]?arguments[0]:"";try{return vx.parse(e),!0}catch(t){return!1}})}),wW=function(e){var t=e.initialValues,n=e.onSubmit,r=e.onTOMLChange;return l.createElement(hT,{initialValues:t,validationSchema:wG,onSubmit:n},function(e){var t=e.isSubmitting,n=e.values;return r&&r(n.toml),l.createElement(hR,{"data-testid":"job-form",noValidate:!0},l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:12},l.createElement(hP,{component:hX,id:"toml",name:"toml",label:"Job Spec (TOML)",required:!0,fullWidth:!0,multiline:!0,rows:10,rowsMax:25,variant:"outlined",autoComplete:"off",FormHelperTextProps:{"data-testid":"toml-helper-text"}})),l.createElement(d.Z,{item:!0,xs:12,md:7},l.createElement(ok.default,{variant:"contained",color:"primary",type:"submit",disabled:t,size:"large"},"Create Job"))))})},wK=n(50109),wV="persistSpec";function wq(e){var t=e.query,n=new URLSearchParams(t).get("definition");return n?(wK.t8(wV,n),{toml:n}):{toml:wK.U2(wV)||""}}var wZ=function(e){var t=e.onSubmit,n=e.onTOMLChange,r=wq({query:(0,h.TH)().search}),i=function(e){var t=e.replace(/[\u200B-\u200D\uFEFF]/g,"");wK.t8("".concat(wV),t),n&&n(t)};return l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"New Job"}),l.createElement(aW.Z,null,l.createElement(wW,{initialValues:r,onSubmit:t,onTOMLChange:i})))};function wX(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]e.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&void 0!==arguments[1]?arguments[1]:{},n=t.start,r=void 0===n?6:n,i=t.end,a=void 0===i?4:i;return e.substring(0,r)+"..."+e.substring(e.length-a)}function _M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&void 0!==arguments[0]?arguments[0]:{};return rv(_W,e)},_V=function(){var e=_K({fetchPolicy:"cache-and-network"}),t=e.data,n=e.loading,r=e.error,i=e.refetch;return l.createElement(_U,{loading:n,data:t,errorMsg:null==r?void 0:r.message,refetch:i})},_q=function(e){var t=e.csaKey;return l.createElement(ir.Z,{hover:!0},l.createElement(r7.default,null,l.createElement(x.default,{variant:"body1"},t.publicKey," ",l.createElement(_x,{data:t.publicKey}))))};function _Z(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function _X(){var e=_Z(["\n fragment CSAKeysPayload_ResultsFields on CSAKey {\n id\n publicKey\n }\n"]);return _X=function(){return e},e}var _J=n0(_X()),_Q=function(e){var t,n,r,i=e.data,a=e.errorMsg,o=e.loading,s=e.onCreate;return l.createElement(r5.Z,null,l.createElement(sl.Z,{action:(null===(t=null==i?void 0:i.csaKeys.results)||void 0===t?void 0:t.length)===0&&l.createElement(ok.default,{variant:"outlined",color:"primary",onClick:s},"New CSA Key"),title:"CSA Key",subheader:"Manage your CSA Key"}),l.createElement(r8.Z,null,l.createElement(ie.Z,null,l.createElement(ir.Z,null,l.createElement(r7.default,null,"Public Key"))),l.createElement(r9.Z,null,l.createElement(g$,{visible:o}),l.createElement(gz,{visible:(null===(n=null==i?void 0:i.csaKeys.results)||void 0===n?void 0:n.length)===0}),l.createElement(gU,{msg:a}),null===(r=null==i?void 0:i.csaKeys.results)||void 0===r?void 0:r.map(function(e,t){return l.createElement(_q,{csaKey:e,key:t})}))))};function _1(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&void 0!==arguments[0]?arguments[0]:{};return rv(EM,e)};function EA(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&void 0!==arguments[0]?arguments[0]:{};return rv(EJ,e)},E3=function(){return oo(EQ)},E4=function(){return oo(E1)},E6=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return rv(E0,e)};function E5(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&void 0!==arguments[0]?arguments[0]:{};return rv(SK,e)};function Sq(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]e.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function kV(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}var kq=function(e){var t=e.run,n=l.useMemo(function(){var e=t.inputs,n=t.outputs,r=t.taskRuns,i=kK(t,["inputs","outputs","taskRuns"]),a={};try{a=JSON.parse(e)}catch(o){a={}}return kW(kz({},i),{inputs:a,outputs:n,taskRuns:r})},[t]);return l.createElement(r5.Z,null,l.createElement(aW.Z,null,l.createElement(kH,{object:n})))};function kZ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kX(e){for(var t=1;t0&&l.createElement(kr,{errors:t.allErrors})),l.createElement(d.Z,{item:!0,xs:12},l.createElement(h.rs,null,l.createElement(h.AW,{path:"".concat(n,"/json")},l.createElement(kq,{run:t})),l.createElement(h.AW,{path:n},t.taskRuns.length>0&&l.createElement(kN,{taskRuns:t.taskRuns,observationSource:t.job.observationSource}))))))))};function k5(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function k8(){var e=k5(["\n ","\n query FetchJobRun($id: ID!) {\n jobRun(id: $id) {\n __typename\n ... on JobRun {\n ...JobRunPayload_Fields\n }\n ... on NotFoundError {\n message\n }\n }\n }\n"]);return k8=function(){return e},e}var k9=n0(k8(),k4),k7=function(){var e=rv(k9,{variables:{id:(0,h.UO)().id}}),t=e.data,n=e.loading,r=e.error;if(n)return l.createElement(iR,null);if(r)return l.createElement(iD,{error:r});var i=null==t?void 0:t.jobRun;switch(null==i?void 0:i.__typename){case"JobRun":return l.createElement(k6,{run:i});case"NotFoundError":return l.createElement(oa,null);default:return null}};function xe(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function xt(){var e=xe(["\n fragment JobRunsPayload_ResultsFields on JobRun {\n id\n allErrors\n createdAt\n finishedAt\n status\n job {\n id\n }\n }\n"]);return xt=function(){return e},e}var xn=n0(xt()),xr=function(e){var t=e.loading,n=e.data,r=e.page,i=e.pageSize,a=(0,h.k6)(),o=l.useMemo(function(){return null==n?void 0:n.jobRuns.results.map(function(e){var t,n=e.allErrors,r=e.id,i=e.createdAt;return{id:r,createdAt:i,errors:n,finishedAt:e.finishedAt,status:e.status}})},[n]);return l.createElement(ig,null,l.createElement(d.Z,{container:!0,spacing:32},l.createElement(d.Z,{item:!0,xs:12},l.createElement(iy,null,"Job Runs")),t&&l.createElement(iR,null),n&&o&&l.createElement(d.Z,{item:!0,xs:12},l.createElement(r5.Z,null,l.createElement(yp,{runs:o}),l.createElement(it.Z,{component:"div",count:n.jobRuns.metadata.total,rowsPerPage:i,rowsPerPageOptions:[i],page:r-1,onChangePage:function(e,t){a.push("/runs?page=".concat(t+1,"&per=").concat(i))},onChangeRowsPerPage:function(){},backIconButtonProps:{"aria-label":"prev-page"},nextIconButtonProps:{"aria-label":"next-page"}})))))};function xi(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function xa(){var e=xi(["\n ","\n query FetchJobRuns($offset: Int, $limit: Int) {\n jobRuns(offset: $offset, limit: $limit) {\n results {\n ...JobRunsPayload_ResultsFields\n }\n metadata {\n total\n }\n }\n }\n"]);return xa=function(){return e},e}var xo=n0(xa(),xn),xs=function(){var e=ij(),t=parseInt(e.get("page")||"1",10),n=parseInt(e.get("per")||"25",10),r=rv(xo,{variables:{offset:(t-1)*n,limit:n},fetchPolicy:"cache-and-network"}),i=r.data,a=r.loading,o=r.error;return o?l.createElement(iD,{error:o}):l.createElement(xr,{loading:a,data:i,page:t,pageSize:n})},xu=function(){var e=(0,h.$B)().path;return l.createElement(h.rs,null,l.createElement(h.AW,{exact:!0,path:e},l.createElement(xs,null)),l.createElement(h.AW,{path:"".concat(e,"/:id")},l.createElement(k7,null)))},xc=bv().shape({name:p0().required("Required"),uri:p0().required("Required"),publicKey:p0().required("Required")}),xl=function(e){var t=e.initialValues,n=e.onSubmit;return l.createElement(hT,{initialValues:t,validationSchema:xc,onSubmit:n},function(e){var t=e.isSubmitting,n=e.submitForm;return l.createElement(hR,{"data-testid":"feeds-manager-form"},l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"name",name:"name",label:"Name",required:!0,fullWidth:!0,FormHelperTextProps:{"data-testid":"name-helper-text"}})),l.createElement(d.Z,{item:!0,xs:!1,md:6}),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"uri",name:"uri",label:"URI",required:!0,fullWidth:!0,helperText:"Provided by the Feeds Manager operator",FormHelperTextProps:{"data-testid":"uri-helper-text"}})),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"publicKey",name:"publicKey",label:"Public Key",required:!0,fullWidth:!0,helperText:"Provided by the Feeds Manager operator",FormHelperTextProps:{"data-testid":"publicKey-helper-text"}})),l.createElement(d.Z,{item:!0,xs:12},l.createElement(ok.default,{variant:"contained",color:"primary",disabled:t,onClick:n},"Submit"))))})},xf=function(e){var t=e.data,n=e.onSubmit,r={name:t.name,uri:t.uri,publicKey:t.publicKey};return l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12,md:11,lg:9},l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Edit Feeds Manager"}),l.createElement(aW.Z,null,l.createElement(xl,{initialValues:r,onSubmit:n})))))};function xd(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function xh(){var e=xd(["\n query FetchFeedsManagers {\n feedsManagers {\n results {\n __typename\n id\n name\n uri\n publicKey\n isConnectionActive\n createdAt\n }\n }\n }\n"]);return xh=function(){return e},e}var xp=n0(xh()),xb=function(){return rv(xp)};function xm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]e.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function xF(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}function xY(e,t){return xD(e)||xP(e,t)||xB(e,t)||xR()}function xB(e,t){if(e){if("string"==typeof e)return xI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xI(e,t)}}var xU=function(e){return"SN_MAIN"===e||"SN_SEPOLIA"===e},xH=bv().shape({chainID:p0().required("Required"),chainType:p0().required("Required"),accountAddr:p0().required("Required"),accountAddrPubKey:p0().nullable(),adminAddr:p0().required("Required"),ocr1Multiaddr:p0().when(["ocr1Enabled","ocr1IsBootstrap"],{is:function(e,t){return e&&t},then:p0().required("Required").nullable()}).nullable(),ocr1P2PPeerID:p0().when(["ocr1Enabled","ocr1IsBootstrap"],{is:function(e,t){return e&&!t},then:p0().required("Required").nullable()}).nullable(),ocr1KeyBundleID:p0().when(["ocr1Enabled","ocr1IsBootstrap"],{is:function(e,t){return e&&!t},then:p0().required("Required").nullable()}).nullable(),ocr2Multiaddr:p0().when(["ocr2Enabled","ocr2IsBootstrap"],{is:function(e,t){return e&&t},then:p0().required("Required").nullable()}).nullable(),ocr2P2PPeerID:p0().when(["ocr2Enabled","ocr2IsBootstrap"],{is:function(e,t){return e&&!t},then:p0().required("Required").nullable()}).nullable(),ocr2KeyBundleID:p0().when(["ocr2Enabled","ocr2IsBootstrap"],{is:function(e,t){return e&&!t},then:p0().required("Required").nullable()}).nullable(),ocr2CommitPluginEnabled:pV().required("Required"),ocr2ExecutePluginEnabled:pV().required("Required"),ocr2MedianPluginEnabled:pV().required("Required"),ocr2MercuryPluginEnabled:pV().required("Required"),ocr2ForwarderAddress:p0().nullable()}),x$=function(e){return(0,b.createStyles)({supportedJobOptionsPaper:{padding:2*e.spacing.unit}})},xz=function(e){var t=e.chainAccounts,n=xj(e,["chainAccounts"]),r=h_(),i=r.values,a=i.chainID,o=i.accountAddr,s=r.setFieldValue,u=xY(l.useState(!1),2),c=u[0],f=u[1],d=l.useRef();l.useEffect(function(){d.current=a},[a]),l.useEffect(function(){a!==d.current&&(s(n.name,""),f(!1))},[a,s,n.name]);var h=function(e){var t=e.target.value;"custom"===t?(f(!0),s(n.name,"")):(f(!1),s(n.name,t))};return l.createElement(l.Fragment,null,!xU(a)&&l.createElement(hP,xN({},n,{select:!0,value:c?"custom":o,onChange:h}),t.map(function(e){return l.createElement(tE.default,{key:e.address,value:e.address},e.address)})),xU(a)&&l.createElement(hP,{component:hX,id:"accountAddr",name:"accountAddr",label:"Enter your account address",inputProps:{"data-testid":"customAccountAddr-input"},helperText:"The account address used for this chain",required:!0,fullWidth:!0}),xU(a)&&l.createElement("div",null,l.createElement(hP,{component:hX,id:"accountAddrPubKey",name:"accountAddrPubKey",label:"Account Address Public Key",required:!0,fullWidth:!0,helperText:"The public key for your account address",FormHelperTextProps:{"data-testid":"accountAddrPubKey-helper-text"}})))},xG=(0,b.withStyles)(x$)(function(e){var t=e.classes,n=e.editing,r=void 0!==n&&n,i=e.innerRef,a=e.initialValues,o=e.onSubmit,s=e.chainIDs,u=void 0===s?[]:s,c=e.accounts,f=void 0===c?[]:c,h=e.p2pKeys,p=void 0===h?[]:h,b=e.ocrKeys,m=void 0===b?[]:b,g=e.ocr2Keys,v=void 0===g?[]:g,y=e.showSubmit,w=void 0!==y&&y;return l.createElement(hT,{innerRef:i,initialValues:a,validationSchema:xH,onSubmit:o},function(e){var n=e.values,i=f.filter(function(e){return e.chain.id==n.chainID&&!e.isDisabled});return l.createElement(hR,{"data-testid":"feeds-manager-form",id:"chain-configuration-form",noValidate:!0},l.createElement(d.Z,{container:!0,spacing:16},l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"chainType",name:"chainType",label:"Chain Type",select:!0,required:!0,fullWidth:!0,disabled:!0},l.createElement(tE.default,{key:"EVM",value:"EVM"},"EVM"))),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"chainID",name:"chainID",label:"Chain ID",required:!0,fullWidth:!0,select:!0,disabled:r,inputProps:{"data-testid":"chainID-input"},FormHelperTextProps:{"data-testid":"chainID-helper-text"}},u.map(function(e){return l.createElement(tE.default,{key:e,value:e},e)}))),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(xz,{component:hX,id:"accountAddr",name:"accountAddr",label:"Account Address",inputProps:{"data-testid":"accountAddr-input"},required:!0,fullWidth:!0,select:!0,helperText:"The account address used for this chain",chainAccounts:i,FormHelperTextProps:{"data-testid":"accountAddr-helper-text"}})),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"adminAddr",name:"adminAddr",label:"Admin Address",required:!0,fullWidth:!0,helperText:"The address used for LINK payments",FormHelperTextProps:{"data-testid":"adminAddr-helper-text"}})),l.createElement(d.Z,{item:!0,xs:12},l.createElement(x.default,null,"Supported Job Types")),l.createElement(d.Z,{item:!0,xs:12},l.createElement(hP,{component:h2,name:"fluxMonitorEnabled",type:"checkbox",Label:{label:"Flux Monitor"}})),l.createElement(d.Z,{item:!0,xs:12},l.createElement(hP,{component:h2,name:"ocr1Enabled",type:"checkbox",Label:{label:"OCR"}}),n.ocr1Enabled&&l.createElement(ii.default,{className:t.supportedJobOptionsPaper},l.createElement(d.Z,{container:!0,spacing:8},l.createElement(l.Fragment,null,l.createElement(d.Z,{item:!0,xs:12},l.createElement(hP,{component:h2,name:"ocr1IsBootstrap",type:"checkbox",Label:{label:"Is this node running as a bootstrap peer?"}})),n.ocr1IsBootstrap?l.createElement(d.Z,{item:!0,xs:12},l.createElement(hP,{component:hX,id:"ocr1Multiaddr",name:"ocr1Multiaddr",label:"Multiaddr",required:!0,fullWidth:!0,helperText:"The OCR Multiaddr which oracles use to query for network information",FormHelperTextProps:{"data-testid":"ocr1Multiaddr-helper-text"}})):l.createElement(l.Fragment,null,l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"ocr1P2PPeerID",name:"ocr1P2PPeerID",label:"Peer ID",select:!0,required:!0,fullWidth:!0,helperText:"The Peer ID used for this chain",FormHelperTextProps:{"data-testid":"ocr1P2PPeerID-helper-text"}},p.map(function(e){return l.createElement(tE.default,{key:e.peerID,value:e.peerID},e.peerID)}))),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"ocr1KeyBundleID",name:"ocr1KeyBundleID",label:"Key Bundle ID",select:!0,required:!0,fullWidth:!0,helperText:"The OCR Key Bundle ID used for this chain",FormHelperTextProps:{"data-testid":"ocr1KeyBundleID-helper-text"}},m.map(function(e){return l.createElement(tE.default,{key:e.id,value:e.id},e.id)})))))))),l.createElement(d.Z,{item:!0,xs:12},l.createElement(hP,{component:h2,name:"ocr2Enabled",type:"checkbox",Label:{label:"OCR2"}}),n.ocr2Enabled&&l.createElement(ii.default,{className:t.supportedJobOptionsPaper},l.createElement(d.Z,{container:!0,spacing:8},l.createElement(l.Fragment,null,l.createElement(d.Z,{item:!0,xs:12},l.createElement(hP,{component:h2,name:"ocr2IsBootstrap",type:"checkbox",Label:{label:"Is this node running as a bootstrap peer?"}})),n.ocr2IsBootstrap?l.createElement(d.Z,{item:!0,xs:12},l.createElement(hP,{component:hX,id:"ocr2Multiaddr",name:"ocr2Multiaddr",label:"Multiaddr",required:!0,fullWidth:!0,helperText:"The OCR2 Multiaddr which oracles use to query for network information",FormHelperTextProps:{"data-testid":"ocr2Multiaddr-helper-text"}})):l.createElement(l.Fragment,null,l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"ocr2P2PPeerID",name:"ocr2P2PPeerID",label:"Peer ID",select:!0,required:!0,fullWidth:!0,helperText:"The Peer ID used for this chain",FormHelperTextProps:{"data-testid":"ocr2P2PPeerID-helper-text"}},p.map(function(e){return l.createElement(tE.default,{key:e.peerID,value:e.peerID},e.peerID)}))),l.createElement(d.Z,{item:!0,xs:12,md:6},l.createElement(hP,{component:hX,id:"ocr2KeyBundleID",name:"ocr2KeyBundleID",label:"Key Bundle ID",select:!0,required:!0,fullWidth:!0,helperText:"The OCR2 Key Bundle ID used for this chain",FormHelperTextProps:{"data-testid":"ocr2KeyBundleID-helper-text"}},v.map(function(e){return l.createElement(tE.default,{key:e.id,value:e.id},e.id)}))),l.createElement(d.Z,{item:!0,xs:12},l.createElement(x.default,null,"Supported Plugins")),l.createElement(d.Z,{item:!0,xs:6},l.createElement(hP,{component:h2,name:"ocr2CommitPluginEnabled",type:"checkbox",Label:{label:"Commit"}})),l.createElement(d.Z,{item:!0,xs:6},l.createElement(hP,{component:h2,name:"ocr2ExecutePluginEnabled",type:"checkbox",Label:{label:"Execute"}})),l.createElement(d.Z,{item:!0,xs:6},l.createElement(hP,{component:h2,name:"ocr2RebalancerPluginEnabled",type:"checkbox",Label:{label:"Rebalancer"}})),l.createElement(d.Z,{item:!0,xs:6},l.createElement(hP,{component:h2,name:"ocr2MedianPluginEnabled",type:"checkbox",Label:{label:"Median"}})),l.createElement(d.Z,{item:!0,xs:6},l.createElement(hP,{component:h2,name:"ocr2MercuryPluginEnabled",type:"checkbox",Label:{label:"Mercury"}})),l.createElement(d.Z,{item:!0,xs:12,md:12},l.createElement(hP,{component:hX,id:"ocr2ForwarderAddress",name:"ocr2ForwarderAddress",label:"Forwarder Address (optional)",fullWidth:!0,helperText:"The forwarder address from the Operator Forwarder Contract",FormHelperTextProps:{"data-testid":"ocr2ForwarderAddress-helper-text"}}))))))),w&&l.createElement(d.Z,{item:!0,xs:12,md:7},l.createElement(ok.default,{variant:"contained",color:"primary",type:"submit",size:"large"},"Submit"))))})}),xW=function(e){var t=e.onClose,n=e.open,r=e.onSubmit,i=l.useRef(),a=i$({fetchPolicy:"network-only"}).data,o=_K({fetchPolicy:"cache-and-network"}).data,s=SV({fetchPolicy:"cache-and-network"}).data,u=EO({fetchPolicy:"cache-and-network"}).data,c=E2({fetchPolicy:"cache-and-network"}).data,f={chainID:"",chainType:"EVM",accountAddr:"",adminAddr:"",accountAddrPubKey:"",fluxMonitorEnabled:!1,ocr1Enabled:!1,ocr1IsBootstrap:!1,ocr1Multiaddr:"",ocr1P2PPeerID:"",ocr1KeyBundleID:"",ocr2Enabled:!1,ocr2IsBootstrap:!1,ocr2Multiaddr:"",ocr2P2PPeerID:"",ocr2KeyBundleID:"",ocr2CommitPluginEnabled:!1,ocr2ExecutePluginEnabled:!1,ocr2MedianPluginEnabled:!1,ocr2MercuryPluginEnabled:!1,ocr2RebalancerPluginEnabled:!1,ocr2ForwarderAddress:""},d=a?a.chains.results.map(function(e){return e.id}):[],h=o?o.ethKeys.results:[],p=s?s.p2pKeys.results:[],b=u?u.ocrKeyBundles.results:[],m=c?c.ocr2KeyBundles.results:[];return l.createElement(aD.Z,{onClose:t,open:n,disableBackdropClick:!0},l.createElement(oO.Z,{disableTypography:!0},l.createElement(x.default,{variant:"body2"},"New Supported Chain")),l.createElement(oT.Z,null,l.createElement(xG,{innerRef:i,initialValues:f,onSubmit:r,chainIDs:d,accounts:h,p2pKeys:p,ocrKeys:b,ocr2Keys:m})),l.createElement(ox.Z,null,l.createElement(ok.default,{onClick:t},"Cancel"),l.createElement(ok.default,{color:"primary",type:"submit",form:"chain-configuration-form",variant:"contained"},"Submit")))},xK=function(e){var t=e.cfg,n=e.onClose,r=e.open,i=e.onSubmit,a=l.useRef(),o=i$({fetchPolicy:"network-only"}).data,s=_K({fetchPolicy:"cache-and-network"}).data,u=SV({fetchPolicy:"cache-and-network"}).data,c=EO({fetchPolicy:"cache-and-network"}).data,f=E2({fetchPolicy:"cache-and-network"}).data;if(!t)return null;var d={chainID:t.chainID,chainType:"EVM",accountAddr:t.accountAddr,adminAddr:t.adminAddr,accountAddrPubKey:t.accountAddrPubKey,fluxMonitorEnabled:t.fluxMonitorJobConfig.enabled,ocr1Enabled:t.ocr1JobConfig.enabled,ocr1IsBootstrap:t.ocr1JobConfig.isBootstrap,ocr1Multiaddr:t.ocr1JobConfig.multiaddr,ocr1P2PPeerID:t.ocr1JobConfig.p2pPeerID,ocr1KeyBundleID:t.ocr1JobConfig.keyBundleID,ocr2Enabled:t.ocr2JobConfig.enabled,ocr2IsBootstrap:t.ocr2JobConfig.isBootstrap,ocr2Multiaddr:t.ocr2JobConfig.multiaddr,ocr2P2PPeerID:t.ocr2JobConfig.p2pPeerID,ocr2KeyBundleID:t.ocr2JobConfig.keyBundleID,ocr2CommitPluginEnabled:t.ocr2JobConfig.plugins.commit,ocr2ExecutePluginEnabled:t.ocr2JobConfig.plugins.execute,ocr2MedianPluginEnabled:t.ocr2JobConfig.plugins.median,ocr2MercuryPluginEnabled:t.ocr2JobConfig.plugins.mercury,ocr2RebalancerPluginEnabled:t.ocr2JobConfig.plugins.rebalancer,ocr2ForwarderAddress:t.ocr2JobConfig.forwarderAddress},h=o?o.chains.results.map(function(e){return e.id}):[],p=s?s.ethKeys.results:[],b=u?u.p2pKeys.results:[],m=c?c.ocrKeyBundles.results:[],g=f?f.ocr2KeyBundles.results:[];return l.createElement(aD.Z,{onClose:n,open:r,disableBackdropClick:!0},l.createElement(oO.Z,{disableTypography:!0},l.createElement(x.default,{variant:"body2"},"Edit Supported Chain")),l.createElement(oT.Z,null,l.createElement(xG,{innerRef:a,initialValues:d,onSubmit:i,chainIDs:h,accounts:p,p2pKeys:b,ocrKeys:m,ocr2Keys:g,editing:!0})),l.createElement(ox.Z,null,l.createElement(ok.default,{onClick:n},"Cancel"),l.createElement(ok.default,{color:"primary",type:"submit",form:"chain-configuration-form",variant:"contained"},"Submit")))};function xV(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function xq(){var e=xV(["\n fragment FeedsManager_ChainConfigFields on FeedsManagerChainConfig {\n id\n chainID\n chainType\n accountAddr\n adminAddr\n accountAddrPubKey\n fluxMonitorJobConfig {\n enabled\n }\n ocr1JobConfig {\n enabled\n isBootstrap\n multiaddr\n p2pPeerID\n keyBundleID\n }\n ocr2JobConfig {\n enabled\n isBootstrap\n multiaddr\n forwarderAddress\n p2pPeerID\n keyBundleID\n plugins {\n commit\n execute\n median\n mercury\n rebalancer\n }\n }\n }\n"]);return xq=function(){return e},e}function xZ(){var e=xV(["\n ","\n fragment FeedsManagerFields on FeedsManager {\n id\n name\n uri\n publicKey\n isConnectionActive\n chainConfigs {\n ...FeedsManager_ChainConfigFields\n }\n }\n"]);return xZ=function(){return e},e}function xX(){var e=xV(["\n fragment FeedsManager_JobProposalsFields on JobProposal {\n id\n name\n externalJobID\n remoteUUID\n status\n pendingUpdate\n latestSpec {\n createdAt\n version\n }\n }\n"]);return xX=function(){return e},e}function xJ(){var e=xV(["\n ","\n ","\n fragment FeedsManagerPayload_ResultsFields on FeedsManager {\n ...FeedsManagerFields\n jobProposals {\n ...FeedsManager_JobProposalsFields\n }\n }\n"]);return xJ=function(){return e},e}function xQ(){var e=xV(["\n ","\n query FetchFeedManagersWithProposals {\n feedsManagers {\n results {\n ...FeedsManagerPayload_ResultsFields\n }\n }\n }\n"]);return xQ=function(){return e},e}var x1=n0(xq()),x0=n0(xZ(),x1),x2=n0(xX()),x3=n0(xJ(),x0,x2),x4=n0(xQ(),x3),x6=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return rv(x4,e)};function x5(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n0?n.feedsManagers.results[0]:void 0;return n&&a?l.createElement(TZ,{manager:a}):l.createElement(h.l_,{to:{pathname:"/feeds_manager/new",state:{from:e}}})},TJ={name:"Chainlink Feeds Manager",uri:"",publicKey:""},TQ=function(e){var t=e.onSubmit;return l.createElement(d.Z,{container:!0},l.createElement(d.Z,{item:!0,xs:12,md:11,lg:9},l.createElement(r5.Z,null,l.createElement(sl.Z,{title:"Register Feeds Manager"}),l.createElement(aW.Z,null,l.createElement(xl,{initialValues:TJ,onSubmit:t})))))};function T1(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]e.length)&&(t=e.length);for(var n=0,r=Array(t);nt.version?e:t})},[o]),g=l.useMemo(function(){return ME(o).sort(function(e,t){return t.version-e.version})},[o]),v=function(e,t,n){switch(e){case"PENDING":return l.createElement(l.Fragment,null,l.createElement(ok.default,{variant:"text",color:"secondary",onClick:function(){return b("reject",t)}},"Reject"),m.id===t&&"DELETED"!==n.status&&"REVOKED"!==n.status&&l.createElement(ok.default,{variant:"contained",color:"primary",onClick:function(){return b("approve",t)}},"Approve"),m.id===t&&"DELETED"===n.status&&n.pendingUpdate&&l.createElement(l.Fragment,null,l.createElement(ok.default,{variant:"contained",color:"primary",onClick:function(){return b("cancel",t)}},"Cancel"),l.createElement(x.default,{color:"error"},"This proposal was deleted. Cancel the spec to delete any running jobs")));case"APPROVED":return l.createElement(l.Fragment,null,l.createElement(ok.default,{variant:"contained",onClick:function(){return b("cancel",t)}},"Cancel"),"DELETED"===n.status&&n.pendingUpdate&&l.createElement(x.default,{color:"error"},"This proposal was deleted. Cancel the spec to delete any running jobs"));case"CANCELLED":if(m.id===t&&"DELETED"!==n.status&&"REVOKED"!==n.status)return l.createElement(ok.default,{variant:"contained",color:"primary",onClick:function(){return b("approve",t)}},"Approve");return null;default:return null}};return l.createElement("div",null,g.map(function(e,n){return l.createElement(mP.Z,{defaultExpanded:0===n,key:n},l.createElement(mR.Z,{expandIcon:l.createElement(gh.Z,null)},l.createElement(x.default,{className:t.versionText},"Version ",e.version),l.createElement(Es.Z,{label:e.status,color:"APPROVED"===e.status?"primary":"default",variant:"REJECTED"===e.status||"CANCELLED"===e.status?"outlined":"default"}),l.createElement("div",{className:t.proposedAtContainer},l.createElement(x.default,null,"Proposed ",l.createElement(aO,{tooltip:!0},e.createdAt)))),l.createElement(mj.Z,{className:t.expansionPanelDetails},l.createElement("div",{className:t.actions},l.createElement("div",{className:t.editContainer},0===n&&("PENDING"===e.status||"CANCELLED"===e.status)&&"DELETED"!==s.status&&"REVOKED"!==s.status&&l.createElement(ok.default,{variant:"contained",onClick:function(){return p(!0)}},"Edit")),l.createElement("div",{className:t.actionsContainer},v(e.status,e.id,s))),l.createElement(gd,{language:"toml",style:gs,"data-testid":"codeblock"},e.definition)))}),l.createElement(oC,{open:null!=c,title:c?MM[c.action].title:"",body:c?MM[c.action].body:"",onConfirm:function(){if(c){switch(c.action){case"approve":n(c.id);break;case"cancel":r(c.id);break;case"reject":i(c.id)}f(null)}},cancelButtonText:"Cancel",onCancel:function(){return f(null)}}),l.createElement(Md,{open:h,onClose:function(){return p(!1)},initialValues:{definition:m.definition,id:m.id},onSubmit:a}))});function MA(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function ML(){var e=MA(["\n ","\n fragment JobProposalPayloadFields on JobProposal {\n id\n externalJobID\n remoteUUID\n jobID\n specs {\n ...JobProposal_SpecsFields\n }\n status\n pendingUpdate\n }\n"]);return ML=function(){return e},e}var MC=n0(ML(),Mx),MI=function(e){var t=e.onApprove,n=e.onCancel,r=e.onReject,i=e.onUpdateSpec,a=e.proposal;return l.createElement(ig,null,l.createElement(d.Z,{container:!0,spacing:32},l.createElement(d.Z,{item:!0,xs:9},l.createElement(iy,null,"Job Proposal #",a.id))),l.createElement(Mo,{proposal:a}),l.createElement(d.Z,{container:!0,spacing:32},l.createElement(d.Z,{item:!0,xs:9},l.createElement(Tq,null,"Specs"))),l.createElement(d.Z,{container:!0,spacing:32},l.createElement(d.Z,{item:!0,xs:12},l.createElement(MO,{proposal:a,specs:a.specs,onReject:r,onApprove:t,onCancel:n,onUpdateSpec:i}))))};function MD(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);nU,tA:()=>$,KL:()=>H,Iw:()=>V,DQ:()=>W,cB:()=>T,LO:()=>M,t5:()=>k,qt:()=>x,Jc:()=>C,L7:()=>Y,EO:()=>B});var r,i,a=n(66289),o=n(41800),s=n.n(o),u=n(67932);(i=r||(r={})).IN_PROGRESS="in_progress",i.PENDING_INCOMING_CONFIRMATIONS="pending_incoming_confirmations",i.PENDING_CONNECTION="pending_connection",i.PENDING_BRIDGE="pending_bridge",i.PENDING_SLEEP="pending_sleep",i.ERRORED="errored",i.COMPLETED="completed";var c=n(87013),l=n(19084),f=n(34823);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]j,v2:()=>F});var r=n(66289);function i(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var a="/sessions",o="/sessions",s=function e(t){var n=this;i(this,e),this.api=t,this.createSession=function(e){return n.create(e)},this.destroySession=function(){return n.destroy()},this.create=this.api.createResource(a),this.destroy=this.api.deleteResource(o)};function u(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var c="/v2/bulk_delete_runs",l=function e(t){var n=this;u(this,e),this.api=t,this.bulkDeleteJobRuns=function(e){return n.destroy(e)},this.destroy=this.api.deleteResource(c)};function f(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var d="/v2/chains/evm",h="".concat(d,"/:id"),p=function e(t){var n=this;f(this,e),this.api=t,this.getChains=function(){return n.index()},this.createChain=function(e){return n.create(e)},this.destroyChain=function(e){return n.destroy(void 0,{id:e})},this.updateChain=function(e,t){return n.update(t,{id:e})},this.index=this.api.fetchResource(d),this.create=this.api.createResource(d),this.destroy=this.api.deleteResource(h),this.update=this.api.updateResource(h)};function b(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var m="/v2/keys/evm/chain",g=function e(t){var n=this;b(this,e),this.api=t,this.chain=function(e){var t=new URLSearchParams;t.append("address",e.address),t.append("evmChainID",e.evmChainID),null!==e.nextNonce&&t.append("nextNonce",e.nextNonce),null!==e.abandon&&t.append("abandon",String(e.abandon)),null!==e.enabled&&t.append("enabled",String(e.enabled));var r=m+"?"+t.toString();return n.api.createResource(r)()}};function v(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var y="/v2/jobs",w="".concat(y,"/:specId/runs"),_=function e(t){var n=this;v(this,e),this.api=t,this.createJobRunV2=function(e,t){return n.post(t,{specId:e})},this.post=this.api.createResource(w,!0)};function E(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var S="/v2/log",k=function e(t){var n=this;E(this,e),this.api=t,this.getLogConfig=function(){return n.show()},this.updateLogConfig=function(e){return n.update(e)},this.show=this.api.fetchResource(S),this.update=this.api.updateResource(S)};function x(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var T="/v2/nodes",M=function e(t){var n=this;x(this,e),this.api=t,this.getNodes=function(){return n.index()},this.createNode=function(e){return n.create(e)},this.index=this.api.fetchResource(T),this.create=this.api.createResource(T)};function O(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var A="/v2/enroll_webauthn",L=function e(t){var n=this;O(this,e),this.api=t,this.beginKeyRegistration=function(e){return n.create(e)},this.finishKeyRegistration=function(e){return n.put(e)},this.create=this.api.fetchResource(A),this.put=this.api.createResource(A)};function C(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var I="/v2/build_info",D=function e(t){var n=this;C(this,e),this.api=t,this.show=function(){return n.api.GET(I)()}};function N(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var P=function e(t){N(this,e),this.api=t,this.buildInfo=new D(this.api),this.bulkDeleteRuns=new l(this.api),this.chains=new p(this.api),this.logConfig=new k(this.api),this.nodes=new M(this.api),this.jobs=new _(this.api),this.webauthn=new L(this.api),this.evmKeys=new g(this.api)},R=new r.V0({base:void 0}),j=new s(R),F=new P(R)},1398(e,t,n){"use strict";n.d(t,{Z:()=>d});var r=n(67294),i=n(32316),a=n(83638),o=n(94184),s=n.n(o);function u(){return(u=Object.assign||function(e){for(var t=1;tc});var r=n(67294),i=n(32316);function a(){return(a=Object.assign||function(e){for(var t=1;tx,jK:()=>v});var r=n(67294),i=n(37703),a=n(45697),o=n.n(a),s=n(82204),u=n(71426),c=n(94184),l=n.n(c),f=n(32316),d=function(e){var t=e.palette.success||{},n=e.palette.warning||{};return{base:{paddingLeft:5*e.spacing.unit,paddingRight:5*e.spacing.unit},success:{backgroundColor:t.main,color:t.contrastText},error:{backgroundColor:e.palette.error.dark,color:e.palette.error.contrastText},warning:{backgroundColor:n.contrastText,color:n.main}}},h=function(e){var t,n=e.success,r=e.error,i=e.warning,a=e.classes,o=e.className;return n?t=a.success:r?t=a.error:i&&(t=a.warning),l()(a.base,o,t)},p=function(e){return r.createElement(s.Z,{className:h(e),square:!0},r.createElement(u.default,{variant:"body2",color:"inherit",component:"div"},e.children))};p.defaultProps={success:!1,error:!1,warning:!1},p.propTypes={success:o().bool,error:o().bool,warning:o().bool};let b=(0,f.withStyles)(d)(p);var m=function(){return r.createElement(r.Fragment,null,"Unhandled error. Please help us by opening a"," ",r.createElement("a",{href:"https://github.com/smartcontractkit/chainlink/issues/new"},"bug report"))};let g=m;function v(e){return"string"==typeof e?e:e.component?e.component(e.props):r.createElement(g,null)}function y(e,t){var n;return n="string"==typeof e?e:e.component?e.component(e.props):r.createElement(g,null),r.createElement("p",{key:t},n)}var w=function(e){var t=e.notifications;return r.createElement(b,{error:!0},t.map(y))},_=function(e){var t=e.notifications;return r.createElement(b,{success:!0},t.map(y))},E=function(e){var t=e.errors,n=e.successes;return r.createElement("div",null,(null==t?void 0:t.length)>0&&r.createElement(w,{notifications:t}),n.length>0&&r.createElement(_,{notifications:n}))},S=function(e){return{errors:e.notifications.errors,successes:e.notifications.successes}},k=(0,i.$j)(S)(E);let x=k},9409(e,t,n){"use strict";n.d(t,{ZP:()=>j});var r=n(67294),i=n(37703),a=n(5977),o=n(32316),s=n(1398),u=n(82204),c=n(30060),l=n(71426),f=n(60520),d=n(39814),h=n(57209),p=n(26842),b=n(3950),m=n(5536),g=n(45697),v=n.n(g);let y=n.p+"9f6d832ef97e8493764e.svg";function w(){return(w=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&_.map(function(e,t){return r.createElement(d.Z,{item:!0,xs:12,key:t},r.createElement(u.Z,{raised:!1,className:v.error},r.createElement(c.Z,null,r.createElement(l.default,{variant:"body1",className:v.errorText},(0,b.jK)(e)))))}),r.createElement(d.Z,{item:!0,xs:12},r.createElement(f.Z,{id:"email",label:"Email",margin:"normal",value:n,onChange:m("email"),error:_.length>0,variant:"outlined",fullWidth:!0})),r.createElement(d.Z,{item:!0,xs:12},r.createElement(f.Z,{id:"password",label:"Password",type:"password",autoComplete:"password",margin:"normal",value:h,onChange:m("password"),error:_.length>0,variant:"outlined",fullWidth:!0})),r.createElement(d.Z,{item:!0,xs:12},r.createElement(d.Z,{container:!0,spacing:0,justify:"center"},r.createElement(d.Z,{item:!0},r.createElement(s.Z,{type:"submit",variant:"primary"},"Access Account")))),y&&r.createElement(l.default,{variant:"body1",color:"textSecondary"},"Signing in...")))))))},P=function(e){return{fetching:e.authentication.fetching,authenticated:e.authentication.allowed,errors:e.notifications.errors}},R=(0,i.$j)(P,x({submitSignIn:p.L7}))(N);let j=(0,h.wU)(e)((0,o.withStyles)(D)(R))},16353(e,t,n){"use strict";n.d(t,{ZP:()=>H,rH:()=>U});var r,i=n(37703),a=n(97779),o=n(9541),s=n(19084);function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:h,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case s.Mk.RECEIVE_SIGNOUT_SUCCESS:case s.Mk.RECEIVE_SIGNIN_SUCCESS:var n={allowed:t.authenticated};return o.Ks(n),f(c({},e,n),{errors:[]});case s.Mk.RECEIVE_SIGNIN_FAIL:var r={allowed:!1};return o.Ks(r),f(c({},e,r),{errors:[]});case s.Mk.RECEIVE_SIGNIN_ERROR:case s.Mk.RECEIVE_SIGNOUT_ERROR:var i={allowed:!1};return o.Ks(i),f(c({},e,i),{errors:t.errors||[]});default:return e}};let b=p;function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:_,t=arguments.length>1?arguments[1]:void 0;return t.type?t.type.startsWith(r.REQUEST)?y(g({},e),{count:e.count+1}):t.type.startsWith(r.RECEIVE)?y(g({},e),{count:Math.max(e.count-1,0)}):t.type.startsWith(r.RESPONSE)?y(g({},e),{count:Math.max(e.count-1,0)}):t.type===s.di.REDIRECT?y(g({},e),{count:0}):e:e};let S=E;function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:O,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case s.di.MATCH_ROUTE:return M(x({},O),{currentUrl:t.pathname});case s.Ih.NOTIFY_SUCCESS:var n={component:t.component,props:t.props};return M(x({},e),{successes:[n],errors:[]});case s.Ih.NOTIFY_SUCCESS_MSG:return M(x({},e),{successes:[t.msg],errors:[]});case s.Ih.NOTIFY_ERROR:var r=t.error.errors,i=null==r?void 0:r.map(function(e){return L(t,e)});return M(x({},e),{successes:[],errors:i});case s.Ih.NOTIFY_ERROR_MSG:return M(x({},e),{successes:[],errors:[t.msg]});case s.Mk.RECEIVE_SIGNIN_FAIL:return M(x({},e),{successes:[],errors:["Your email or password is incorrect. Please try again"]});default:return e}};function L(e,t){return{component:e.component,props:{msg:t.detail}}}let C=A;function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:R,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case s.di.REDIRECT:return P(D({},e),{to:t.to});case s.di.MATCH_ROUTE:return P(D({},e),{to:void 0});default:return e}};let F=j;var Y=n(87013),B=(0,a.UY)({authentication:b,fetching:S,notifications:C,redirect:F,buildInfo:Y.Z});B(void 0,{type:"INITIAL_STATE"});var U=i.v9;let H=B},19084(e,t,n){"use strict";var r,i,a,o,s,u,c,l,f,d;n.d(t,{Ih:()=>i,Mk:()=>a,Y0:()=>s,di:()=>r,jp:()=>o}),n(67294),(u=r||(r={})).REDIRECT="REDIRECT",u.MATCH_ROUTE="MATCH_ROUTE",(c=i||(i={})).NOTIFY_SUCCESS="NOTIFY_SUCCESS",c.NOTIFY_SUCCESS_MSG="NOTIFY_SUCCESS_MSG",c.NOTIFY_ERROR="NOTIFY_ERROR",c.NOTIFY_ERROR_MSG="NOTIFY_ERROR_MSG",(l=a||(a={})).REQUEST_SIGNIN="REQUEST_SIGNIN",l.RECEIVE_SIGNIN_SUCCESS="RECEIVE_SIGNIN_SUCCESS",l.RECEIVE_SIGNIN_FAIL="RECEIVE_SIGNIN_FAIL",l.RECEIVE_SIGNIN_ERROR="RECEIVE_SIGNIN_ERROR",l.RECEIVE_SIGNOUT_SUCCESS="RECEIVE_SIGNOUT_SUCCESS",l.RECEIVE_SIGNOUT_ERROR="RECEIVE_SIGNOUT_ERROR",(f=o||(o={})).RECEIVE_CREATE_ERROR="RECEIVE_CREATE_ERROR",f.RECEIVE_CREATE_SUCCESS="RECEIVE_CREATE_SUCCESS",f.RECEIVE_DELETE_ERROR="RECEIVE_DELETE_ERROR",f.RECEIVE_DELETE_SUCCESS="RECEIVE_DELETE_SUCCESS",f.RECEIVE_UPDATE_ERROR="RECEIVE_UPDATE_ERROR",f.RECEIVE_UPDATE_SUCCESS="RECEIVE_UPDATE_SUCCESS",f.REQUEST_CREATE="REQUEST_CREATE",f.REQUEST_DELETE="REQUEST_DELETE",f.REQUEST_UPDATE="REQUEST_UPDATE",f.UPSERT_CONFIGURATION="UPSERT_CONFIGURATION",f.UPSERT_JOB_RUN="UPSERT_JOB_RUN",f.UPSERT_JOB_RUNS="UPSERT_JOB_RUNS",f.UPSERT_TRANSACTION="UPSERT_TRANSACTION",f.UPSERT_TRANSACTIONS="UPSERT_TRANSACTIONS",f.UPSERT_BUILD_INFO="UPSERT_BUILD_INFO",(d=s||(s={})).FETCH_BUILD_INFO_REQUESTED="FETCH_BUILD_INFO_REQUESTED",d.FETCH_BUILD_INFO_SUCCEEDED="FETCH_BUILD_INFO_SUCCEEDED",d.FETCH_BUILD_INFO_FAILED="FETCH_BUILD_INFO_FAILED"},87013(e,t,n){"use strict";n.d(t,{Y:()=>o,Z:()=>u});var r=n(19084);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:o,t=arguments.length>1?arguments[1]:void 0;return t.type===r.Y0.FETCH_BUILD_INFO_SUCCEEDED?a({},t.buildInfo):e};let u=s},34823(e,t,n){"use strict";n.d(t,{N:()=>r});var r=function(e){return e.buildInfo}},73343(e,t,n){"use strict";n.d(t,{r:()=>u});var r=n(19350),i=n(32316),a=n(59114),o=n(5324),s={props:{MuiGrid:{spacing:3*o.default.unit},MuiCardHeader:{titleTypographyProps:{color:"secondary"}}},palette:{action:{hoverOpacity:.3},primary:{light:"#E5F1FF",main:"#3c40c6",contrastText:"#fff"},secondary:{main:"#3d5170"},success:{light:"#e8faf1",main:r.ek.A700,dark:r.ek[700],contrastText:r.y0.white},warning:{light:"#FFFBF1",main:"#fff6b6",contrastText:"#fad27a"},error:{light:"#ffdada",main:"#f44336",dark:"#d32f2f",contrastText:"#fff"},background:{default:"#f5f6f8",appBar:"#3c40c6"},text:{primary:(0,a.darken)(r.BA.A700,.7),secondary:"#818ea3"},listPendingStatus:{background:"#fef7e5",color:"#fecb4c"},listCompletedStatus:{background:"#e9faf2",color:"#4ed495"}},shape:{borderRadius:o.default.unit},overrides:{MuiButton:{root:{borderRadius:o.default.unit/2,textTransform:"none"},sizeLarge:{padding:void 0,fontSize:void 0,paddingTop:o.default.unit,paddingBottom:o.default.unit,paddingLeft:5*o.default.unit,paddingRight:5*o.default.unit}},MuiTableCell:{body:{fontSize:"1rem"},head:{fontSize:"1rem",fontWeight:400}},MuiCardHeader:{root:{borderBottom:"1px solid rgba(0, 0, 0, 0.12)"},action:{marginTop:-2,marginRight:0,"& >*":{marginLeft:2*o.default.unit}},subheader:{marginTop:.5*o.default.unit}}},typography:{useNextVariants:!0,fontFamily:"-apple-system,BlinkMacSystemFont,Roboto,Helvetica,Arial,sans-serif",button:{textTransform:"none",fontSize:"1.2em"},body1:{fontSize:"1.0rem",fontWeight:400,lineHeight:"1.46429em",color:"rgba(0, 0, 0, 0.87)",letterSpacing:-.4},body2:{fontSize:"1.0rem",fontWeight:500,lineHeight:"1.71429em",color:"rgba(0, 0, 0, 0.87)",letterSpacing:-.4},body1Next:{color:"rgb(29, 29, 29)",fontWeight:400,fontSize:"1rem",lineHeight:1.5,letterSpacing:-.4},body2Next:{color:"rgb(29, 29, 29)",fontWeight:400,fontSize:"0.875rem",lineHeight:1.5,letterSpacing:-.4},display1:{color:"#818ea3",fontSize:"2.125rem",fontWeight:400,lineHeight:"1.20588em",letterSpacing:-.4},display2:{color:"#818ea3",fontSize:"2.8125rem",fontWeight:400,lineHeight:"1.13333em",marginLeft:"-.02em",letterSpacing:-.4},display3:{color:"#818ea3",fontSize:"3.5rem",fontWeight:400,lineHeight:"1.30357em",marginLeft:"-.02em",letterSpacing:-.4},display4:{fontSize:14,fontWeightLight:300,fontWeightMedium:500,fontWeightRegular:400,letterSpacing:-.4},h1:{color:"rgb(29, 29, 29)",fontSize:"6rem",fontWeight:300,lineHeight:1},h2:{color:"rgb(29, 29, 29)",fontSize:"3.75rem",fontWeight:300,lineHeight:1},h3:{color:"rgb(29, 29, 29)",fontSize:"3rem",fontWeight:400,lineHeight:1.04},h4:{color:"rgb(29, 29, 29)",fontSize:"2.125rem",fontWeight:400,lineHeight:1.17},h5:{color:"rgb(29, 29, 29)",fontSize:"1.5rem",fontWeight:400,lineHeight:1.33,letterSpacing:-.4},h6:{fontSize:"0.8rem",fontWeight:450,lineHeight:"1.71429em",color:"rgba(0, 0, 0, 0.87)",letterSpacing:-.4},subheading:{color:"rgb(29, 29, 29)",fontSize:"1rem",fontWeight:400,lineHeight:"1.5em",letterSpacing:-.4},subtitle1:{color:"rgb(29, 29, 29)",fontSize:"1rem",fontWeight:400,lineHeight:1.75,letterSpacing:-.4},subtitle2:{color:"rgb(29, 29, 29)",fontSize:"0.875rem",fontWeight:500,lineHeight:1.57,letterSpacing:-.4}},shadows:["none","0px 1px 3px 0px rgba(0, 0, 0, 0.1),0px 1px 1px 0px rgba(0, 0, 0, 0.04),0px 2px 1px -1px rgba(0, 0, 0, 0.02)","0px 1px 5px 0px rgba(0, 0, 0, 0.1),0px 2px 2px 0px rgba(0, 0, 0, 0.04),0px 3px 1px -2px rgba(0, 0, 0, 0.02)","0px 1px 8px 0px rgba(0, 0, 0, 0.1),0px 3px 4px 0px rgba(0, 0, 0, 0.04),0px 3px 3px -2px rgba(0, 0, 0, 0.02)","0px 2px 4px -1px rgba(0, 0, 0, 0.1),0px 4px 5px 0px rgba(0, 0, 0, 0.04),0px 1px 10px 0px rgba(0, 0, 0, 0.02)","0px 3px 5px -1px rgba(0, 0, 0, 0.1),0px 5px 8px 0px rgba(0, 0, 0, 0.04),0px 1px 14px 0px rgba(0, 0, 0, 0.02)","0px 3px 5px -1px rgba(0, 0, 0, 0.1),0px 6px 10px 0px rgba(0, 0, 0, 0.04),0px 1px 18px 0px rgba(0, 0, 0, 0.02)","0px 4px 5px -2px rgba(0, 0, 0, 0.1),0px 7px 10px 1px rgba(0, 0, 0, 0.04),0px 2px 16px 1px rgba(0, 0, 0, 0.02)","0px 5px 5px -3px rgba(0, 0, 0, 0.1),0px 8px 10px 1px rgba(0, 0, 0, 0.04),0px 3px 14px 2px rgba(0, 0, 0, 0.02)","0px 5px 6px -3px rgba(0, 0, 0, 0.1),0px 9px 12px 1px rgba(0, 0, 0, 0.04),0px 3px 16px 2px rgba(0, 0, 0, 0.02)","0px 6px 6px -3px rgba(0, 0, 0, 0.1),0px 10px 14px 1px rgba(0, 0, 0, 0.04),0px 4px 18px 3px rgba(0, 0, 0, 0.02)","0px 6px 7px -4px rgba(0, 0, 0, 0.1),0px 11px 15px 1px rgba(0, 0, 0, 0.04),0px 4px 20px 3px rgba(0, 0, 0, 0.02)","0px 7px 8px -4px rgba(0, 0, 0, 0.1),0px 12px 17px 2px rgba(0, 0, 0, 0.04),0px 5px 22px 4px rgba(0, 0, 0, 0.02)","0px 7px 8px -4px rgba(0, 0, 0, 0.1),0px 13px 19px 2px rgba(0, 0, 0, 0.04),0px 5px 24px 4px rgba(0, 0, 0, 0.02)","0px 7px 9px -4px rgba(0, 0, 0, 0.1),0px 14px 21px 2px rgba(0, 0, 0, 0.04),0px 5px 26px 4px rgba(0, 0, 0, 0.02)","0px 8px 9px -5px rgba(0, 0, 0, 0.1),0px 15px 22px 2px rgba(0, 0, 0, 0.04),0px 6px 28px 5px rgba(0, 0, 0, 0.02)","0px 8px 10px -5px rgba(0, 0, 0, 0.1),0px 16px 24px 2px rgba(0, 0, 0, 0.04),0px 6px 30px 5px rgba(0, 0, 0, 0.02)","0px 8px 11px -5px rgba(0, 0, 0, 0.1),0px 17px 26px 2px rgba(0, 0, 0, 0.04),0px 6px 32px 5px rgba(0, 0, 0, 0.02)","0px 9px 11px -5px rgba(0, 0, 0, 0.1),0px 18px 28px 2px rgba(0, 0, 0, 0.04),0px 7px 34px 6px rgba(0, 0, 0, 0.02)","0px 9px 12px -6px rgba(0, 0, 0, 0.1),0px 19px 29px 2px rgba(0, 0, 0, 0.04),0px 7px 36px 6px rgba(0, 0, 0, 0.02)","0px 10px 13px -6px rgba(0, 0, 0, 0.1),0px 20px 31px 3px rgba(0, 0, 0, 0.04),0px 8px 38px 7px rgba(0, 0, 0, 0.02)","0px 10px 13px -6px rgba(0, 0, 0, 0.1),0px 21px 33px 3px rgba(0, 0, 0, 0.04),0px 8px 40px 7px rgba(0, 0, 0, 0.02)","0px 10px 14px -6px rgba(0, 0, 0, 0.1),0px 22px 35px 3px rgba(0, 0, 0, 0.04),0px 8px 42px 7px rgba(0, 0, 0, 0.02)","0px 11px 14px -7px rgba(0, 0, 0, 0.1),0px 23px 36px 3px rgba(0, 0, 0, 0.04),0px 9px 44px 8px rgba(0, 0, 0, 0.02)","0px 11px 15px -7px rgba(0, 0, 0, 0.1),0px 24px 38px 3px rgba(0, 0, 0, 0.04),0px 9px 46px 8px rgba(0, 0, 0, 0.02)",]},u=(0,i.createMuiTheme)(s)},66289(e,t,n){"use strict";function r(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function i(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function a(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function o(e,t,n){return(o=a()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&f(i,n.prototype),i}).apply(null,arguments)}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}function c(e){return -1!==Function.toString.call(e).indexOf("[native code]")}function l(e,t){return t&&("object"===p(t)||"function"==typeof t)?t:r(e)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,{V0:()=>B,_7:()=>v});var d,h,p=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function b(e){var t="function"==typeof Map?new Map:void 0;return(b=function(e){if(null===e||!c(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return o(e,arguments,s(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),f(n,e)})(e)}function m(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function g(e){var t=m();return function(){var n,r=s(e);if(t){var i=s(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return l(this,n)}}var v=function(e){u(n,e);var t=g(n);function n(e){var r;return i(this,n),(r=t.call(this,"AuthenticationError(".concat(e.statusText,")"))).errors=[{status:e.status,detail:e},],r}return n}(b(Error)),y=function(e){u(n,e);var t=g(n);function n(e){var r,a=e.errors;return i(this,n),(r=t.call(this,"BadRequestError")).errors=a,r}return n}(b(Error)),w=function(e){u(n,e);var t=g(n);function n(e){var r;return i(this,n),(r=t.call(this,"UnprocessableEntityError")).errors=e,r}return n}(b(Error)),_=function(e){u(n,e);var t=g(n);function n(e){var r;return i(this,n),(r=t.call(this,"ServerError")).errors=e,r}return n}(b(Error)),E=function(e){u(n,e);var t=g(n);function n(e){var r,a=e.errors;return i(this,n),(r=t.call(this,"ConflictError")).errors=a,r}return n}(b(Error)),S=function(e){u(n,e);var t=g(n);function n(e){var r;return i(this,n),(r=t.call(this,"UnknownResponseError(".concat(e.statusText,")"))).errors=[{status:e.status,detail:e.statusText},],r}return n}(b(Error));function k(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2e4;return Promise.race([fetch(e,t),new Promise(function(e,t){return setTimeout(function(){return t(Error("timeout"))},n)}),])}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=200&&e.status<300))return[3,2];return[2,e.json()];case 2:if(400!==e.status)return[3,3];return[2,e.json().then(function(e){throw new y(e)})];case 3:if(401!==e.status)return[3,4];throw new v(e);case 4:if(422!==e.status)return[3,6];return[4,$(e)];case 5:throw n=i.sent(),new w(n);case 6:if(409!==e.status)return[3,7];return[2,e.json().then(function(e){throw new E(e)})];case 7:if(!(e.status>=500))return[3,9];return[4,$(e)];case 8:throw r=i.sent(),new _(r);case 9:throw new S(e);case 10:return[2]}})})).apply(this,arguments)}function $(e){return z.apply(this,arguments)}function z(){return(z=j(function(e){return Y(this,function(t){return[2,e.json().then(function(t){return t.errors?t.errors.map(function(t){return{status:e.status,detail:t.detail}}):G(e)}).catch(function(){return G(e)})]})})).apply(this,arguments)}function G(e){return[{status:e.status,detail:e.statusText},]}},50109(e,t,n){"use strict";n.d(t,{LK:()=>o,U2:()=>i,eT:()=>s,t8:()=>a});var r=n(12795);function i(e){return r.ZP.getItem("chainlink.".concat(e))}function a(e,t){r.ZP.setItem("chainlink.".concat(e),t)}function o(e){var t=i(e),n={};if(t)try{return JSON.parse(t)}catch(r){}return n}function s(e,t){a(e,JSON.stringify(t))}},9541(e,t,n){"use strict";n.d(t,{Ks:()=>u,Tp:()=>a,iR:()=>o,pm:()=>s});var r=n(50109),i="persistURL";function a(){return r.U2(i)||""}function o(e){r.t8(i,e)}function s(){return r.LK("authentication")}function u(e){r.eT("authentication",e)}},67121(e,t,n){"use strict";function r(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}n.r(t),n.d(t,{default:()=>o}),e=n.hmd(e),i="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:e;var i,a=r(i);let o=a},2177(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=!0,i="Invariant failed";function a(e,t){if(!e){if(r)throw Error(i);throw Error(i+": "+(t||""))}}let o=a},11742(e){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;ru,ZT:()=>i,_T:()=>o,ev:()=>c,mG:()=>s,pi:()=>a});var r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function s(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){e.done?n(e.value):i(e.value).then(o,s)}u((r=r.apply(e,t||[])).next())})}function u(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(n)throw TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]r})},94927(e,t,n){function r(e,t){if(i("noDeprecation"))return e;var n=!1;function r(){if(!n){if(i("throwDeprecation"))throw Error(t);i("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}return r}function i(e){try{if(!n.g.localStorage)return!1}catch(t){return!1}var r=n.g.localStorage[e];return null!=r&&"true"===String(r).toLowerCase()}e.exports=r},42473(e){"use strict";var t=function(){};e.exports=t},84763(e){e.exports=Worker},47529(e){e.exports=n;var t=Object.prototype.hasOwnProperty;function n(){for(var e={},n=0;ne.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},7071(e){function t(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},94993(e,t,n){var r=n(18698).default,i=n(66115);function a(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return i(e)}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports},6015(e){function t(n,r){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},861(e,t,n){var r=n(63405),i=n(79498),a=n(86116),o=n(42281);function s(e){return r(e)||i(e)||a(e)||o()}e.exports=s,e.exports.__esModule=!0,e.exports.default=e.exports},18698(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},86116(e,t,n){var r=n(73897);function i(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},1644(e,t,n){"use strict";var r,i;function a(e){return!!e&&e<7}n.d(t,{I:()=>r,O:()=>a}),(i=r||(r={}))[i.loading=1]="loading",i[i.setVariables=2]="setVariables",i[i.fetchMore=3]="fetchMore",i[i.refetch=4]="refetch",i[i.poll=6]="poll",i[i.ready=7]="ready",i[i.error=8]="error"},30990(e,t,n){"use strict";n.d(t,{MS:()=>s,YG:()=>a,cA:()=>c,ls:()=>o});var r=n(70655);n(83952);var i=n(13154),a=Symbol();function o(e){return!!e.extensions&&Array.isArray(e.extensions[a])}function s(e){return e.hasOwnProperty("graphQLErrors")}var u=function(e){var t=(0,r.ev)((0,r.ev)((0,r.ev)([],e.graphQLErrors,!0),e.clientErrors,!0),e.protocolErrors,!0);return e.networkError&&t.push(e.networkError),t.map(function(e){return(0,i.s)(e)&&e.message||"Error message not found."}).join("\n")},c=function(e){function t(n){var r=n.graphQLErrors,i=n.protocolErrors,a=n.clientErrors,o=n.networkError,s=n.errorMessage,c=n.extraInfo,l=e.call(this,s)||this;return l.name="ApolloError",l.graphQLErrors=r||[],l.protocolErrors=i||[],l.clientErrors=a||[],l.networkError=o||null,l.message=s||u(l),l.extraInfo=c,l.__proto__=t.prototype,l}return(0,r.ZT)(t,e),t}(Error)},85317(e,t,n){"use strict";n.d(t,{K:()=>a});var r=n(67294),i=n(30320).aS?Symbol.for("__APOLLO_CONTEXT__"):"__APOLLO_CONTEXT__";function a(){var e=r.createContext[i];return e||(Object.defineProperty(r.createContext,i,{value:e=r.createContext({}),enumerable:!1,writable:!1,configurable:!0}),e.displayName="ApolloContext"),e}},21436(e,t,n){"use strict";n.d(t,{O:()=>i,k:()=>r});var r=Array.isArray;function i(e){return Array.isArray(e)&&e.length>0}},30320(e,t,n){"use strict";n.d(t,{DN:()=>s,JC:()=>l,aS:()=>o,mr:()=>i,sy:()=>a});var r=n(83952),i="function"==typeof WeakMap&&"ReactNative"!==(0,r.wY)(function(){return navigator.product}),a="function"==typeof WeakSet,o="function"==typeof Symbol&&"function"==typeof Symbol.for,s=o&&Symbol.asyncIterator,u="function"==typeof(0,r.wY)(function(){return window.document.createElement}),c=(0,r.wY)(function(){return navigator.userAgent.indexOf("jsdom")>=0})||!1,l=u&&!c},53712(e,t,n){"use strict";function r(){for(var e=[],t=0;tr})},10542(e,t,n){"use strict";n.d(t,{J:()=>o}),n(83952);var r=n(13154);function i(e){var t=new Set([e]);return t.forEach(function(e){(0,r.s)(e)&&a(e)===e&&Object.getOwnPropertyNames(e).forEach(function(n){(0,r.s)(e[n])&&t.add(e[n])})}),e}function a(e){if(__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(t){if(t instanceof TypeError)return null;throw t}return e}function o(e){return __DEV__&&i(e),e}},14012(e,t,n){"use strict";n.d(t,{J:()=>a});var r=n(70655),i=n(53712);function a(e,t){return(0,i.o)(e,t,t.variables&&{variables:(0,r.pi)((0,r.pi)({},e&&e.variables),t.variables)})}},13154(e,t,n){"use strict";function r(e){return null!==e&&"object"==typeof e}n.d(t,{s:()=>r})},83952(e,t,n){"use strict";n.d(t,{ej:()=>u,kG:()=>c,wY:()=>h});var r,i=n(70655),a="Invariant Violation",o=Object.setPrototypeOf,s=void 0===o?function(e,t){return e.__proto__=t,e}:o,u=function(e){function t(n){void 0===n&&(n=a);var r=e.call(this,"number"==typeof n?a+": "+n+" (see https://github.com/apollographql/invariant-packages)":n)||this;return r.framesToPop=1,r.name=a,s(r,t.prototype),r}return(0,i.ZT)(t,e),t}(Error);function c(e,t){if(!e)throw new u(t)}var l=["debug","log","warn","error","silent"],f=l.indexOf("log");function d(e){return function(){if(l.indexOf(e)>=f)return(console[e]||console.log).apply(console,arguments)}}function h(e){try{return e()}catch(t){}}(r=c||(c={})).debug=d("debug"),r.log=d("log"),r.warn=d("warn"),r.error=d("error");let p=h(function(){return globalThis})||h(function(){return window})||h(function(){return self})||h(function(){return global})||h(function(){return h.constructor("return this")()});var b="__",m=[b,b].join("DEV");function g(){try{return Boolean(__DEV__)}catch(e){return Object.defineProperty(p,m,{value:"production"!==h(function(){return"production"}),enumerable:!1,configurable:!0,writable:!0}),p[m]}}let v=g();function y(e){try{return e()}catch(t){}}var w=y(function(){return globalThis})||y(function(){return window})||y(function(){return self})||y(function(){return global})||y(function(){return y.constructor("return this")()}),_=!1;function E(){!w||y(function(){return"production"})||y(function(){return process})||(Object.defineProperty(w,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),_=!0)}function S(){_&&(delete w.process,_=!1)}E();var k=n(10143);function x(){return k.H,S()}function T(){__DEV__?c("boolean"==typeof v,v):c("boolean"==typeof v,39)}x(),T()},4942(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{Z:()=>r})},87462(e,t,n){"use strict";function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;tr})},51721(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,{Z:()=>i})},63366(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}n.d(t,{Z:()=>r})},25821(e,t,n){"use strict";n.d(t,{Z:()=>s});var r=n(45695);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a=10,o=2;function s(e){return u(e,[])}function u(e,t){switch(i(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":if(null===e)return"null";return c(e,t);default:return String(e)}}function c(e,t){if(-1!==t.indexOf(e))return"[Circular]";var n=[].concat(t,[e]),r=d(e);if(void 0!==r){var i=r.call(e);if(i!==e)return"string"==typeof i?i:u(i,n)}else if(Array.isArray(e))return f(e,n);return l(e,n)}function l(e,t){var n=Object.keys(e);return 0===n.length?"{}":t.length>o?"["+h(e)+"]":"{ "+n.map(function(n){var r=u(e[n],t);return n+": "+r}).join(", ")+" }"}function f(e,t){if(0===e.length)return"[]";if(t.length>o)return"[Array]";for(var n=Math.min(a,e.length),r=e.length-n,i=[],s=0;s1&&i.push("... ".concat(r," more items")),"["+i.join(", ")+"]"}function d(e){var t=e[String(r.Z)];return"function"==typeof t?t:"function"==typeof e.inspect?e.inspect:void 0}function h(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return t}},45695(e,t,n){"use strict";n.d(t,{Z:()=>i});var r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;let i=r},25217(e,t,n){"use strict";function r(e,t){if(!Boolean(e))throw Error(null!=t?t:"Unexpected invariant triggered.")}n.d(t,{Ye:()=>o,WU:()=>s,UG:()=>u});var i=n(45695);function a(e){var t=e.prototype.toJSON;"function"==typeof t||r(0),e.prototype.inspect=t,i.Z&&(e.prototype[i.Z]=t)}var o=function(){function e(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();a(o);var s=function(){function e(e,t,n,r,i,a,o){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=o,this.prev=a,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();function u(e){return null!=e&&"string"==typeof e.kind}a(s)},87392(e,t,n){"use strict";function r(e){var t=e.split(/\r\n|[\n\r]/g),n=a(e);if(0!==n)for(var r=1;ro&&i(t[s-1]);)--s;return t.slice(o,s).join("\n")}function i(e){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===e.indexOf("\n"),i=" "===e[0]||" "===e[0],a='"'===e[e.length-1],o="\\"===e[e.length-1],s=!r||a||o||n,u="";return s&&!(r&&i)&&(u+="\n"+t),u+=t?e.replace(/\n/g,"\n"+t):e,s&&(u+="\n"),'"""'+u.replace(/"""/g,'\\"""')+'"""'}n.d(t,{LZ:()=>o,W7:()=>r})},97359(e,t,n){"use strict";n.d(t,{h:()=>r});var r=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"})},10143(e,t,n){"use strict";n.d(t,{H:()=>c,T:()=>l});var r=n(99763),i=n(25821);function a(e,t){if(!Boolean(e))throw Error(t)}let o=function(e,t){return e instanceof t};function s(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof e||a(0,"Body must be a string. Received: ".concat((0,i.Z)(e),".")),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||a(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||a(0,"column in locationOffset is 1-indexed and must be positive.")}return u(e,[{key:r.YF,get:function(){return"Source"}}]),e}();function l(e){return o(e,c)}},99763(e,t,n){"use strict";n.d(t,{YF:()=>r});var r="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag"},37452(e){"use strict";e.exports=JSON.parse('{"AElig":"\xc6","AMP":"&","Aacute":"\xc1","Acirc":"\xc2","Agrave":"\xc0","Aring":"\xc5","Atilde":"\xc3","Auml":"\xc4","COPY":"\xa9","Ccedil":"\xc7","ETH":"\xd0","Eacute":"\xc9","Ecirc":"\xca","Egrave":"\xc8","Euml":"\xcb","GT":">","Iacute":"\xcd","Icirc":"\xce","Igrave":"\xcc","Iuml":"\xcf","LT":"<","Ntilde":"\xd1","Oacute":"\xd3","Ocirc":"\xd4","Ograve":"\xd2","Oslash":"\xd8","Otilde":"\xd5","Ouml":"\xd6","QUOT":"\\"","REG":"\xae","THORN":"\xde","Uacute":"\xda","Ucirc":"\xdb","Ugrave":"\xd9","Uuml":"\xdc","Yacute":"\xdd","aacute":"\xe1","acirc":"\xe2","acute":"\xb4","aelig":"\xe6","agrave":"\xe0","amp":"&","aring":"\xe5","atilde":"\xe3","auml":"\xe4","brvbar":"\xa6","ccedil":"\xe7","cedil":"\xb8","cent":"\xa2","copy":"\xa9","curren":"\xa4","deg":"\xb0","divide":"\xf7","eacute":"\xe9","ecirc":"\xea","egrave":"\xe8","eth":"\xf0","euml":"\xeb","frac12":"\xbd","frac14":"\xbc","frac34":"\xbe","gt":">","iacute":"\xed","icirc":"\xee","iexcl":"\xa1","igrave":"\xec","iquest":"\xbf","iuml":"\xef","laquo":"\xab","lt":"<","macr":"\xaf","micro":"\xb5","middot":"\xb7","nbsp":"\xa0","not":"\xac","ntilde":"\xf1","oacute":"\xf3","ocirc":"\xf4","ograve":"\xf2","ordf":"\xaa","ordm":"\xba","oslash":"\xf8","otilde":"\xf5","ouml":"\xf6","para":"\xb6","plusmn":"\xb1","pound":"\xa3","quot":"\\"","raquo":"\xbb","reg":"\xae","sect":"\xa7","shy":"\xad","sup1":"\xb9","sup2":"\xb2","sup3":"\xb3","szlig":"\xdf","thorn":"\xfe","times":"\xd7","uacute":"\xfa","ucirc":"\xfb","ugrave":"\xf9","uml":"\xa8","uuml":"\xfc","yacute":"\xfd","yen":"\xa5","yuml":"\xff"}')},93580(e){"use strict";e.exports=JSON.parse('{"0":"�","128":"€","130":"‚","131":"ƒ","132":"„","133":"…","134":"†","135":"‡","136":"ˆ","137":"‰","138":"Š","139":"‹","140":"Œ","142":"Ž","145":"‘","146":"’","147":"“","148":"”","149":"•","150":"–","151":"—","152":"˜","153":"™","154":"š","155":"›","156":"œ","158":"ž","159":"Ÿ"}')},67946(e){"use strict";e.exports=JSON.parse('{"locale":"en","long":{"year":{"previous":"last year","current":"this year","next":"next year","past":{"one":"{0} year ago","other":"{0} years ago"},"future":{"one":"in {0} year","other":"in {0} years"}},"quarter":{"previous":"last quarter","current":"this quarter","next":"next quarter","past":{"one":"{0} quarter ago","other":"{0} quarters ago"},"future":{"one":"in {0} quarter","other":"in {0} quarters"}},"month":{"previous":"last month","current":"this month","next":"next month","past":{"one":"{0} month ago","other":"{0} months ago"},"future":{"one":"in {0} month","other":"in {0} months"}},"week":{"previous":"last week","current":"this week","next":"next week","past":{"one":"{0} week ago","other":"{0} weeks ago"},"future":{"one":"in {0} week","other":"in {0} weeks"}},"day":{"previous":"yesterday","current":"today","next":"tomorrow","past":{"one":"{0} day ago","other":"{0} days ago"},"future":{"one":"in {0} day","other":"in {0} days"}},"hour":{"current":"this hour","past":{"one":"{0} hour ago","other":"{0} hours ago"},"future":{"one":"in {0} hour","other":"in {0} hours"}},"minute":{"current":"this minute","past":{"one":"{0} minute ago","other":"{0} minutes ago"},"future":{"one":"in {0} minute","other":"in {0} minutes"}},"second":{"current":"now","past":{"one":"{0} second ago","other":"{0} seconds ago"},"future":{"one":"in {0} second","other":"in {0} seconds"}}},"short":{"year":{"previous":"last yr.","current":"this yr.","next":"next yr.","past":"{0} yr. ago","future":"in {0} yr."},"quarter":{"previous":"last qtr.","current":"this qtr.","next":"next qtr.","past":{"one":"{0} qtr. ago","other":"{0} qtrs. ago"},"future":{"one":"in {0} qtr.","other":"in {0} qtrs."}},"month":{"previous":"last mo.","current":"this mo.","next":"next mo.","past":"{0} mo. ago","future":"in {0} mo."},"week":{"previous":"last wk.","current":"this wk.","next":"next wk.","past":"{0} wk. ago","future":"in {0} wk."},"day":{"previous":"yesterday","current":"today","next":"tomorrow","past":{"one":"{0} day ago","other":"{0} days ago"},"future":{"one":"in {0} day","other":"in {0} days"}},"hour":{"current":"this hour","past":"{0} hr. ago","future":"in {0} hr."},"minute":{"current":"this minute","past":"{0} min. ago","future":"in {0} min."},"second":{"current":"now","past":"{0} sec. ago","future":"in {0} sec."}},"narrow":{"year":{"previous":"last yr.","current":"this yr.","next":"next yr.","past":"{0} yr. ago","future":"in {0} yr."},"quarter":{"previous":"last qtr.","current":"this qtr.","next":"next qtr.","past":{"one":"{0} qtr. ago","other":"{0} qtrs. ago"},"future":{"one":"in {0} qtr.","other":"in {0} qtrs."}},"month":{"previous":"last mo.","current":"this mo.","next":"next mo.","past":"{0} mo. ago","future":"in {0} mo."},"week":{"previous":"last wk.","current":"this wk.","next":"next wk.","past":"{0} wk. ago","future":"in {0} wk."},"day":{"previous":"yesterday","current":"today","next":"tomorrow","past":{"one":"{0} day ago","other":"{0} days ago"},"future":{"one":"in {0} day","other":"in {0} days"}},"hour":{"current":"this hour","past":"{0} hr. ago","future":"in {0} hr."},"minute":{"current":"this minute","past":"{0} min. ago","future":"in {0} min."},"second":{"current":"now","past":"{0} sec. ago","future":"in {0} sec."}},"now":{"now":{"current":"now","future":"in a moment","past":"just now"}},"mini":{"year":"{0}yr","month":"{0}mo","week":"{0}wk","day":"{0}d","hour":"{0}h","minute":"{0}m","second":"{0}s","now":"now"},"short-time":{"year":"{0} yr.","month":"{0} mo.","week":"{0} wk.","day":{"one":"{0} day","other":"{0} days"},"hour":"{0} hr.","minute":"{0} min.","second":"{0} sec."},"long-time":{"year":{"one":"{0} year","other":"{0} years"},"month":{"one":"{0} month","other":"{0} months"},"week":{"one":"{0} week","other":"{0} weeks"},"day":{"one":"{0} day","other":"{0} days"},"hour":{"one":"{0} hour","other":"{0} hours"},"minute":{"one":"{0} minute","other":"{0} minutes"},"second":{"one":"{0} second","other":"{0} seconds"}}}')}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(n.exports,n,n.exports,__webpack_require__),n.loaded=!0,n.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;__webpack_require__.t=function(n,r){if(1&r&&(n=this(n)),8&r||"object"==typeof n&&n&&(4&r&&n.__esModule||16&r&&"function"==typeof n.then))return n;var i=Object.create(null);__webpack_require__.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var o=2&r&&n;"object"==typeof o&&!~e.indexOf(o);o=t(o))Object.getOwnPropertyNames(o).forEach(e=>a[e]=()=>n[e]);return a.default=()=>n,__webpack_require__.d(i,a),i}})(),__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set(){throw Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),__webpack_require__.p="/assets/",__webpack_require__.nc=void 0;var __webpack_exports__={};(()=>{"use strict";var e,t,n,r,i=__webpack_require__(32316),a=__webpack_require__(8126),o=__webpack_require__(5690),s=__webpack_require__(30381),u=__webpack_require__.n(s),c=__webpack_require__(67294),l=__webpack_require__(73935),f=__webpack_require__.n(l),d=__webpack_require__(57209),h=__webpack_require__(37703),p=__webpack_require__(97779),b=__webpack_require__(28500);function m(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(i){return"function"==typeof i?i(n,r,e):t(i)}}}}var g=m();g.withExtraArgument=m;let v=g;var y=__webpack_require__(76489);function w(e){return function(t){return function(n){return function(r){n(r);var i=e||document&&document.cookie||"",a=t.getState();if("MATCH_ROUTE"===r.type&&"/signin"!==a.notifications.currentUrl){var o=(0,y.Q)(i);if(o.explorer)try{var s=JSON.parse(o.explorer);if("error"===s.status){var u=_(s.url);n({type:"NOTIFY_ERROR_MSG",msg:u})}}catch(c){n({type:"NOTIFY_ERROR_MSG",msg:"Invalid explorer status"})}}}}}}function _(e){var t="Can't connect to explorer: ".concat(e);return e.match(/^wss?:.+/)?t:"".concat(t,". You must use a websocket.")}var E=__webpack_require__(16353);function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ei(e,t){if(e){if("string"==typeof e)return ea(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ea(e,t)}}function ea(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n1,i=!1,a=arguments[1],o=a;return new n(function(n){return t.subscribe({next:function(t){var a=!i;if(i=!0,!a||r)try{o=e(o,t)}catch(s){return n.error(s)}else o=t},error:function(e){n.error(e)},complete:function(){if(!i&&!r)return n.error(TypeError("Cannot reduce an empty sequence"));n.next(o),n.complete()}})})},t.concat=function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r=0&&i.splice(e,1),o()}});i.push(s)},error:function(e){r.error(e)},complete:function(){o()}});function o(){a.closed&&0===i.length&&r.complete()}return function(){i.forEach(function(e){return e.unsubscribe()}),a.unsubscribe()}})},t[ed]=function(){return this},e.from=function(t){var n="function"==typeof this?this:e;if(null==t)throw TypeError(t+" is not an object");var r=ep(t,ed);if(r){var i=r.call(t);if(Object(i)!==i)throw TypeError(i+" is not an object");return em(i)&&i.constructor===n?i:new n(function(e){return i.subscribe(e)})}if(ec("iterator")&&(r=ep(t,ef)))return new n(function(e){ev(function(){if(!e.closed){for(var n,i=er(r.call(t));!(n=i()).done;){var a=n.value;if(e.next(a),e.closed)return}e.complete()}})});if(Array.isArray(t))return new n(function(e){ev(function(){if(!e.closed){for(var n=0;n0))return n.connection.key;var r=n.connection.filter?n.connection.filter:[];r.sort();var i={};return r.forEach(function(e){i[e]=t[e]}),"".concat(n.connection.key,"(").concat(eV(i),")")}var a=e;if(t){var o=eV(t);a+="(".concat(o,")")}return n&&Object.keys(n).forEach(function(e){-1===eW.indexOf(e)&&(n[e]&&Object.keys(n[e]).length?a+="@".concat(e,"(").concat(eV(n[e]),")"):a+="@".concat(e))}),a},{setStringify:function(e){var t=eV;return eV=e,t}}),eV=function(e){return JSON.stringify(e,eq)};function eq(e,t){return(0,eO.s)(t)&&!Array.isArray(t)&&(t=Object.keys(t).sort().reduce(function(e,n){return e[n]=t[n],e},{})),t}function eZ(e,t){if(e.arguments&&e.arguments.length){var n={};return e.arguments.forEach(function(e){var r;return ez(n,e.name,e.value,t)}),n}return null}function eX(e){return e.alias?e.alias.value:e.name.value}function eJ(e,t,n){for(var r,i=0,a=t.selections;it.indexOf(i))throw __DEV__?new Q.ej("illegal argument: ".concat(i)):new Q.ej(27)}return e}function tt(e,t){return t?t(e):eT.of()}function tn(e){return"function"==typeof e?new ta(e):e}function tr(e){return e.request.length<=1}var ti=function(e){function t(t,n){var r=e.call(this,t)||this;return r.link=n,r}return(0,en.ZT)(t,e),t}(Error),ta=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e(function(){return eT.of()})},e.from=function(t){return 0===t.length?e.empty():t.map(tn).reduce(function(e,t){return e.concat(t)})},e.split=function(t,n,r){var i=tn(n),a=tn(r||new e(tt));return new e(tr(i)&&tr(a)?function(e){return t(e)?i.request(e)||eT.of():a.request(e)||eT.of()}:function(e,n){return t(e)?i.request(e,n)||eT.of():a.request(e,n)||eT.of()})},e.execute=function(e,t){return e.request(eM(t.context,e7(te(t))))||eT.of()},e.concat=function(t,n){var r=tn(t);if(tr(r))return __DEV__&&Q.kG.warn(new ti("You are calling concat on a terminating link, which will have no effect",r)),r;var i=tn(n);return new e(tr(i)?function(e){return r.request(e,function(e){return i.request(e)||eT.of()})||eT.of()}:function(e,t){return r.request(e,function(e){return i.request(e,t)||eT.of()})||eT.of()})},e.prototype.split=function(t,n,r){return this.concat(e.split(t,n,r||new e(tt)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw __DEV__?new Q.ej("request is not implemented"):new Q.ej(22)},e.prototype.onError=function(e,t){if(t&&t.error)return t.error(e),!1;throw e},e.prototype.setOnError=function(e){return this.onError=e,this},e}(),to=__webpack_require__(25821),ts=__webpack_require__(25217),tu={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},tc=Object.freeze({});function tl(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:tu,r=void 0,i=Array.isArray(e),a=[e],o=-1,s=[],u=void 0,c=void 0,l=void 0,f=[],d=[],h=e;do{var p,b=++o===a.length,m=b&&0!==s.length;if(b){if(c=0===d.length?void 0:f[f.length-1],u=l,l=d.pop(),m){if(i)u=u.slice();else{for(var g={},v=0,y=Object.keys(u);v1)for(var r=new tB,i=1;i=0;--a){var o=i[a],s=isNaN(+o)?{}:[];s[o]=t,t=s}n=r.merge(n,t)}),n}var tW=Object.prototype.hasOwnProperty;function tK(e,t){var n,r,i,a,o;return(0,en.mG)(this,void 0,void 0,function(){var s,u,c,l,f,d,h,p,b,m,g,v,y,w,_,E,S,k,x,T,M,O,A;return(0,en.Jh)(this,function(L){switch(L.label){case 0:if(void 0===TextDecoder)throw Error("TextDecoder must be defined in the environment: please import a polyfill.");s=new TextDecoder("utf-8"),u=null===(n=e.headers)||void 0===n?void 0:n.get("content-type"),c="boundary=",l=(null==u?void 0:u.includes(c))?null==u?void 0:u.substring((null==u?void 0:u.indexOf(c))+c.length).replace(/['"]/g,"").replace(/\;(.*)/gm,"").trim():"-",f="\r\n--".concat(l),d="",h=tI(e),p=!0,L.label=1;case 1:if(!p)return[3,3];return[4,h.next()];case 2:for(m=(b=L.sent()).value,g=b.done,v="string"==typeof m?m:s.decode(m),y=d.length-f.length+1,p=!g,d+=v,w=d.indexOf(f,y);w>-1;){if(_=void 0,_=(O=[d.slice(0,w),d.slice(w+f.length),])[0],d=O[1],E=_.indexOf("\r\n\r\n"),(k=(S=tV(_.slice(0,E)))["content-type"])&&-1===k.toLowerCase().indexOf("application/json"))throw Error("Unsupported patch content type: application/json is required.");if(x=_.slice(E))try{T=tq(e,x),Object.keys(T).length>1||"data"in T||"incremental"in T||"errors"in T||"payload"in T?tz(T)?(M={},"payload"in T&&(M=(0,en.pi)({},T.payload)),"errors"in T&&(M=(0,en.pi)((0,en.pi)({},M),{extensions:(0,en.pi)((0,en.pi)({},"extensions"in M?M.extensions:null),((A={})[tN.YG]=T.errors,A))})),null===(r=t.next)||void 0===r||r.call(t,M)):null===(i=t.next)||void 0===i||i.call(t,T):1===Object.keys(T).length&&"hasNext"in T&&!T.hasNext&&(null===(a=t.complete)||void 0===a||a.call(t))}catch(C){tZ(C,t)}w=d.indexOf(f)}return[3,1];case 3:return null===(o=t.complete)||void 0===o||o.call(t),[2]}})})}function tV(e){var t={};return e.split("\n").forEach(function(e){var n=e.indexOf(":");if(n>-1){var r=e.slice(0,n).trim().toLowerCase(),i=e.slice(n+1).trim();t[r]=i}}),t}function tq(e,t){e.status>=300&&tD(e,function(){try{return JSON.parse(t)}catch(e){return t}}(),"Response not successful: Received status code ".concat(e.status));try{return JSON.parse(t)}catch(n){var r=n;throw r.name="ServerParseError",r.response=e,r.statusCode=e.status,r.bodyText=t,r}}function tZ(e,t){var n,r;"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&(null===(n=t.next)||void 0===n||n.call(t,e.result)),null===(r=t.error)||void 0===r||r.call(t,e))}function tX(e,t,n){tJ(t)(e).then(function(e){var t,r;null===(t=n.next)||void 0===t||t.call(n,e),null===(r=n.complete)||void 0===r||r.call(n)}).catch(function(e){return tZ(e,n)})}function tJ(e){return function(t){return t.text().then(function(e){return tq(t,e)}).then(function(n){return t.status>=300&&tD(t,n,"Response not successful: Received status code ".concat(t.status)),Array.isArray(n)||tW.call(n,"data")||tW.call(n,"errors")||tD(t,n,"Server response was missing for query '".concat(Array.isArray(e)?e.map(function(e){return e.operationName}):e.operationName,"'.")),n})}}var tQ=function(e){if(!e&&"undefined"==typeof fetch)throw __DEV__?new Q.ej("\n\"fetch\" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:\n\nimport fetch from 'cross-fetch';\nimport { ApolloClient, HttpLink } from '@apollo/client';\nconst client = new ApolloClient({\n link: new HttpLink({ uri: '/graphql', fetch })\n});\n "):new Q.ej(23)},t1=__webpack_require__(87392);function t0(e){return tl(e,{leave:t3})}var t2=80,t3={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return t6(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,n=e.name,r=t8("(",t6(e.variableDefinitions,", "),")"),i=t6(e.directives," "),a=e.selectionSet;return n||i||r||"query"!==t?t6([t,t6([n,r]),i,a]," "):a},VariableDefinition:function(e){var t=e.variable,n=e.type,r=e.defaultValue,i=e.directives;return t+": "+n+t8(" = ",r)+t8(" ",t6(i," "))},SelectionSet:function(e){return t5(e.selections)},Field:function(e){var t=e.alias,n=e.name,r=e.arguments,i=e.directives,a=e.selectionSet,o=t8("",t,": ")+n,s=o+t8("(",t6(r,", "),")");return s.length>t2&&(s=o+t8("(\n",t9(t6(r,"\n")),"\n)")),t6([s,t6(i," "),a]," ")},Argument:function(e){var t;return e.name+": "+e.value},FragmentSpread:function(e){var t;return"..."+e.name+t8(" ",t6(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,n=e.directives,r=e.selectionSet;return t6(["...",t8("on ",t),t6(n," "),r]," ")},FragmentDefinition:function(e){var t=e.name,n=e.typeCondition,r=e.variableDefinitions,i=e.directives,a=e.selectionSet;return"fragment ".concat(t).concat(t8("(",t6(r,", "),")")," ")+"on ".concat(n," ").concat(t8("",t6(i," ")," "))+a},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?(0,t1.LZ)(n,"description"===t?"":" "):JSON.stringify(n)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+t6(e.values,", ")+"]"},ObjectValue:function(e){return"{"+t6(e.fields,", ")+"}"},ObjectField:function(e){var t;return e.name+": "+e.value},Directive:function(e){var t;return"@"+e.name+t8("(",t6(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:t4(function(e){var t=e.directives,n=e.operationTypes;return t6(["schema",t6(t," "),t5(n)]," ")}),OperationTypeDefinition:function(e){var t;return e.operation+": "+e.type},ScalarTypeDefinition:t4(function(e){var t;return t6(["scalar",e.name,t6(e.directives," ")]," ")}),ObjectTypeDefinition:t4(function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return t6(["type",t,t8("implements ",t6(n," & ")),t6(r," "),t5(i)]," ")}),FieldDefinition:t4(function(e){var t=e.name,n=e.arguments,r=e.type,i=e.directives;return t+(ne(n)?t8("(\n",t9(t6(n,"\n")),"\n)"):t8("(",t6(n,", "),")"))+": "+r+t8(" ",t6(i," "))}),InputValueDefinition:t4(function(e){var t=e.name,n=e.type,r=e.defaultValue,i=e.directives;return t6([t+": "+n,t8("= ",r),t6(i," ")]," ")}),InterfaceTypeDefinition:t4(function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return t6(["interface",t,t8("implements ",t6(n," & ")),t6(r," "),t5(i)]," ")}),UnionTypeDefinition:t4(function(e){var t=e.name,n=e.directives,r=e.types;return t6(["union",t,t6(n," "),r&&0!==r.length?"= "+t6(r," | "):""]," ")}),EnumTypeDefinition:t4(function(e){var t=e.name,n=e.directives,r=e.values;return t6(["enum",t,t6(n," "),t5(r)]," ")}),EnumValueDefinition:t4(function(e){var t;return t6([e.name,t6(e.directives," ")]," ")}),InputObjectTypeDefinition:t4(function(e){var t=e.name,n=e.directives,r=e.fields;return t6(["input",t,t6(n," "),t5(r)]," ")}),DirectiveDefinition:t4(function(e){var t=e.name,n=e.arguments,r=e.repeatable,i=e.locations;return"directive @"+t+(ne(n)?t8("(\n",t9(t6(n,"\n")),"\n)"):t8("(",t6(n,", "),")"))+(r?" repeatable":"")+" on "+t6(i," | ")}),SchemaExtension:function(e){var t=e.directives,n=e.operationTypes;return t6(["extend schema",t6(t," "),t5(n)]," ")},ScalarTypeExtension:function(e){var t;return t6(["extend scalar",e.name,t6(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return t6(["extend type",t,t8("implements ",t6(n," & ")),t6(r," "),t5(i)]," ")},InterfaceTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,i=e.fields;return t6(["extend interface",t,t8("implements ",t6(n," & ")),t6(r," "),t5(i)]," ")},UnionTypeExtension:function(e){var t=e.name,n=e.directives,r=e.types;return t6(["extend union",t,t6(n," "),r&&0!==r.length?"= "+t6(r," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,n=e.directives,r=e.values;return t6(["extend enum",t,t6(n," "),t5(r)]," ")},InputObjectTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return t6(["extend input",t,t6(n," "),t5(r)]," ")}};function t4(e){return function(t){return t6([t.description,e(t)],"\n")}}function t6(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter(function(e){return e}).join(n))&&void 0!==t?t:""}function t5(e){return t8("{\n",t9(t6(e,"\n")),"\n}")}function t8(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return null!=t&&""!==t?e+t+n:""}function t9(e){return t8(" ",e.replace(/\n/g,"\n "))}function t7(e){return -1!==e.indexOf("\n")}function ne(e){return null!=e&&e.some(t7)}var nt,nn,nr,ni={http:{includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},na=function(e,t){return t(e)};function no(e,t){for(var n=[],r=2;rObject.create(null),{forEach:nv,slice:ny}=Array.prototype,{hasOwnProperty:nw}=Object.prototype;class n_{constructor(e=!0,t=ng){this.weakness=e,this.makeData=t}lookup(...e){return this.lookupArray(e)}lookupArray(e){let t=this;return nv.call(e,e=>t=t.getChildTrie(e)),nw.call(t,"data")?t.data:t.data=this.makeData(ny.call(e))}peek(...e){return this.peekArray(e)}peekArray(e){let t=this;for(let n=0,r=e.length;t&&n=0;--o)t.definitions[o].kind===nL.h.OPERATION_DEFINITION&&++a;var s=nN(e),u=e.some(function(e){return e.remove}),c=function(e){return u&&e&&e.some(s)},l=new Map,f=!1,d={enter:function(e){if(c(e.directives))return f=!0,null}},h=tl(t,{Field:d,InlineFragment:d,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(e,t,n,r,a){var o=i(a);o&&o.variables.add(e.name.value)}},FragmentSpread:{enter:function(e,t,n,r,a){if(c(e.directives))return f=!0,null;var o=i(a);o&&o.fragmentSpreads.add(e.name.value)}},FragmentDefinition:{enter:function(e,t,n,r){l.set(JSON.stringify(r),e)},leave:function(e,t,n,i){return e===l.get(JSON.stringify(i))?e:a>0&&e.selectionSet.selections.every(function(e){return e.kind===nL.h.FIELD&&"__typename"===e.name.value})?(r(e.name.value).removed=!0,f=!0,null):void 0}},Directive:{leave:function(e){if(s(e))return f=!0,null}}});if(!f)return t;var p=function(e){return e.transitiveVars||(e.transitiveVars=new Set(e.variables),e.removed||e.fragmentSpreads.forEach(function(t){p(r(t)).transitiveVars.forEach(function(t){e.transitiveVars.add(t)})})),e},b=new Set;h.definitions.forEach(function(e){e.kind===nL.h.OPERATION_DEFINITION?p(n(e.name&&e.name.value)).fragmentSpreads.forEach(function(e){b.add(e)}):e.kind!==nL.h.FRAGMENT_DEFINITION||0!==a||r(e.name.value).removed||b.add(e.name.value)}),b.forEach(function(e){p(r(e)).fragmentSpreads.forEach(function(e){b.add(e)})});var m=function(e){return!!(!b.has(e)||r(e).removed)},g={enter:function(e){if(m(e.name.value))return null}};return nD(tl(h,{FragmentSpread:g,FragmentDefinition:g,OperationDefinition:{leave:function(e){if(e.variableDefinitions){var t=p(n(e.name&&e.name.value)).transitiveVars;if(t.size0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach(function(e){return e.unsubscribe()}),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t}(eT);function n4(e){var t=e.options,n=t.fetchPolicy,r=t.nextFetchPolicy;return"cache-and-network"===n||"network-only"===n?e.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(){return(this.nextFetchPolicy=r,"function"==typeof r)?r.apply(this,arguments):n}}):e.reobserve()}function n6(e){__DEV__&&Q.kG.error("Unhandled error",e.message,e.stack)}function n5(e){__DEV__&&e&&__DEV__&&Q.kG.debug("Missing cache result fields: ".concat(JSON.stringify(e)),e)}function n8(e){return"network-only"===e||"no-cache"===e||"standby"===e}nK(n3);function n9(e){return e.kind===nL.h.FIELD||e.kind===nL.h.FRAGMENT_SPREAD||e.kind===nL.h.INLINE_FRAGMENT}function n7(e){return e.kind===Kind.SCALAR_TYPE_DEFINITION||e.kind===Kind.OBJECT_TYPE_DEFINITION||e.kind===Kind.INTERFACE_TYPE_DEFINITION||e.kind===Kind.UNION_TYPE_DEFINITION||e.kind===Kind.ENUM_TYPE_DEFINITION||e.kind===Kind.INPUT_OBJECT_TYPE_DEFINITION}function re(e){return e.kind===Kind.SCALAR_TYPE_EXTENSION||e.kind===Kind.OBJECT_TYPE_EXTENSION||e.kind===Kind.INTERFACE_TYPE_EXTENSION||e.kind===Kind.UNION_TYPE_EXTENSION||e.kind===Kind.ENUM_TYPE_EXTENSION||e.kind===Kind.INPUT_OBJECT_TYPE_EXTENSION}var rt=function(){return Object.create(null)},rn=Array.prototype,rr=rn.forEach,ri=rn.slice,ra=function(){function e(e,t){void 0===e&&(e=!0),void 0===t&&(t=rt),this.weakness=e,this.makeData=t}return e.prototype.lookup=function(){for(var e=[],t=0;tclass{constructor(){this.id=["slot",rc++,Date.now(),Math.random().toString(36).slice(2),].join(":")}hasValue(){for(let e=rs;e;e=e.parent)if(this.id in e.slots){let t=e.slots[this.id];if(t===ru)break;return e!==rs&&(rs.slots[this.id]=t),!0}return rs&&(rs.slots[this.id]=ru),!1}getValue(){if(this.hasValue())return rs.slots[this.id]}withValue(e,t,n,r){let i={__proto__:null,[this.id]:e},a=rs;rs={parent:a,slots:i};try{return t.apply(r,n)}finally{rs=a}}static bind(e){let t=rs;return function(){let n=rs;try{return rs=t,e.apply(this,arguments)}finally{rs=n}}}static noContext(e,t,n){if(!rs)return e.apply(n,t);{let r=rs;try{return rs=null,e.apply(n,t)}finally{rs=r}}}};function rf(e){try{return e()}catch(t){}}let rd="@wry/context:Slot",rh=rf(()=>globalThis)||rf(()=>global)||Object.create(null),rp=rh,rb=rp[rd]||Array[rd]||function(e){try{Object.defineProperty(rp,rd,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(rl()),{bind:rm,noContext:rg}=rb;function rv(){}var ry=function(){function e(e,t){void 0===e&&(e=1/0),void 0===t&&(t=rv),this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}return e.prototype.has=function(e){return this.map.has(e)},e.prototype.get=function(e){var t=this.getNode(e);return t&&t.value},e.prototype.getNode=function(e){var t=this.map.get(e);if(t&&t!==this.newest){var n=t.older,r=t.newer;r&&(r.older=n),n&&(n.newer=r),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=r)}return t},e.prototype.set=function(e,t){var n=this.getNode(e);return n?n.value=t:(n={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.map.set(e,n),n.value)},e.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},e.prototype.delete=function(e){var t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)},e}(),rw=new rb,r_=Object.prototype.hasOwnProperty,rE=void 0===(n=Array.from)?function(e){var t=[];return e.forEach(function(e){return t.push(e)}),t}:n;function rS(e){var t=e.unsubscribe;"function"==typeof t&&(e.unsubscribe=void 0,t())}var rk=[],rx=100;function rT(e,t){if(!e)throw Error(t||"assertion failure")}function rM(e,t){var n=e.length;return n>0&&n===t.length&&e[n-1]===t[n-1]}function rO(e){switch(e.length){case 0:throw Error("unknown value");case 1:return e[0];case 2:throw e[1]}}function rA(e){return e.slice(0)}var rL=function(){function e(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++e.count}return e.prototype.peek=function(){if(1===this.value.length&&!rN(this))return rC(this),this.value[0]},e.prototype.recompute=function(e){return rT(!this.recomputing,"already recomputing"),rC(this),rN(this)?rI(this,e):rO(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,rR(this),rS(this))},e.prototype.dispose=function(){var e=this;this.setDirty(),rH(this),rF(this,function(t,n){t.setDirty(),r$(t,e)})},e.prototype.forget=function(){this.dispose()},e.prototype.dependOn=function(e){e.add(this),this.deps||(this.deps=rk.pop()||new Set),this.deps.add(e)},e.prototype.forgetDeps=function(){var e=this;this.deps&&(rE(this.deps).forEach(function(t){return t.delete(e)}),this.deps.clear(),rk.push(this.deps),this.deps=null)},e.count=0,e}();function rC(e){var t=rw.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),rN(e)?rY(t,e):rB(t,e),t}function rI(e,t){return rH(e),rw.withValue(e,rD,[e,t]),rz(e,t)&&rP(e),rO(e.value)}function rD(e,t){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,t)}catch(n){e.value[1]=n}e.recomputing=!1}function rN(e){return e.dirty||!!(e.dirtyChildren&&e.dirtyChildren.size)}function rP(e){e.dirty=!1,!rN(e)&&rj(e)}function rR(e){rF(e,rY)}function rj(e){rF(e,rB)}function rF(e,t){var n=e.parents.size;if(n)for(var r=rE(e.parents),i=0;i0&&e.childValues.forEach(function(t,n){r$(e,n)}),e.forgetDeps(),rT(null===e.dirtyChildren)}function r$(e,t){t.parents.delete(e),e.childValues.delete(t),rU(e,t)}function rz(e,t){if("function"==typeof e.subscribe)try{rS(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(n){return e.setDirty(),!1}return!0}var rG={setDirty:!0,dispose:!0,forget:!0};function rW(e){var t=new Map,n=e&&e.subscribe;function r(e){var r=rw.getValue();if(r){var i=t.get(e);i||t.set(e,i=new Set),r.dependOn(i),"function"==typeof n&&(rS(i),i.unsubscribe=n(e))}}return r.dirty=function(e,n){var r=t.get(e);if(r){var i=n&&r_.call(rG,n)?n:"setDirty";rE(r).forEach(function(e){return e[i]()}),t.delete(e),rS(r)}},r}function rK(){var e=new ra("function"==typeof WeakMap);return function(){return e.lookupArray(arguments)}}var rV=rK(),rq=new Set;function rZ(e,t){void 0===t&&(t=Object.create(null));var n=new ry(t.max||65536,function(e){return e.dispose()}),r=t.keyArgs,i=t.makeCacheKey||rK(),a=function(){var a=i.apply(null,r?r.apply(null,arguments):arguments);if(void 0===a)return e.apply(null,arguments);var o=n.get(a);o||(n.set(a,o=new rL(e)),o.subscribe=t.subscribe,o.forget=function(){return n.delete(a)});var s=o.recompute(Array.prototype.slice.call(arguments));return n.set(a,o),rq.add(n),rw.hasValue()||(rq.forEach(function(e){return e.clean()}),rq.clear()),s};function o(e){var t=n.get(e);t&&t.setDirty()}function s(e){var t=n.get(e);if(t)return t.peek()}function u(e){return n.delete(e)}return Object.defineProperty(a,"size",{get:function(){return n.map.size},configurable:!1,enumerable:!1}),a.dirtyKey=o,a.dirty=function(){o(i.apply(null,arguments))},a.peekKey=s,a.peek=function(){return s(i.apply(null,arguments))},a.forgetKey=u,a.forget=function(){return u(i.apply(null,arguments))},a.makeCacheKey=i,a.getKey=r?function(){return i.apply(null,r.apply(null,arguments))}:i,Object.freeze(a)}var rX=new rb,rJ=new WeakMap;function rQ(e){var t=rJ.get(e);return t||rJ.set(e,t={vars:new Set,dep:rW()}),t}function r1(e){rQ(e).vars.forEach(function(t){return t.forgetCache(e)})}function r0(e){rQ(e).vars.forEach(function(t){return t.attachCache(e)})}function r2(e){var t=new Set,n=new Set,r=function(a){if(arguments.length>0){if(e!==a){e=a,t.forEach(function(e){rQ(e).dep.dirty(r),r3(e)});var o=Array.from(n);n.clear(),o.forEach(function(t){return t(e)})}}else{var s=rX.getValue();s&&(i(s),rQ(s).dep(r))}return e};r.onNextChange=function(e){return n.add(e),function(){n.delete(e)}};var i=r.attachCache=function(e){return t.add(e),rQ(e).vars.add(r),r};return r.forgetCache=function(e){return t.delete(e)},r}function r3(e){e.broadcastWatches&&e.broadcastWatches()}var r4=function(){function e(e){var t=e.cache,n=e.client,r=e.resolvers,i=e.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=t,n&&(this.client=n),r&&this.addResolvers(r),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach(function(e){t.resolvers=tj(t.resolvers,e)}):this.resolvers=tj(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,n=e.remoteResult,r=e.context,i=e.variables,a=e.onlyRunForcedResolvers,o=void 0!==a&&a;return(0,en.mG)(this,void 0,void 0,function(){return(0,en.Jh)(this,function(e){return t?[2,this.resolveDocument(t,n.data,r,i,this.fragmentMatcher,o).then(function(e){return(0,en.pi)((0,en.pi)({},n),{data:e.result})})]:[2,n]})})},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return tb(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return n$(e)},e.prototype.prepareContext=function(e){var t=this.cache;return(0,en.pi)((0,en.pi)({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),(0,en.mG)(this,void 0,void 0,function(){return(0,en.Jh)(this,function(r){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(n),t).then(function(e){return(0,en.pi)((0,en.pi)({},t),e.exportedVariables)})]:[2,(0,en.pi)({},t)]})})},e.prototype.shouldForceResolvers=function(e){var t=!1;return tl(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some(function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value})))return tc}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:nH(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,n,r,i,a){return void 0===n&&(n={}),void 0===r&&(r={}),void 0===i&&(i=function(){return!0}),void 0===a&&(a=!1),(0,en.mG)(this,void 0,void 0,function(){var o,s,u,c,l,f,d,h,p,b,m;return(0,en.Jh)(this,function(g){return o=e8(e),s=e4(e),u=eL(s),c=this.collectSelectionsToResolve(o,u),f=(l=o.operation)?l.charAt(0).toUpperCase()+l.slice(1):"Query",d=this,h=d.cache,p=d.client,b={fragmentMap:u,context:(0,en.pi)((0,en.pi)({},n),{cache:h,client:p}),variables:r,fragmentMatcher:i,defaultOperationType:f,exportedVariables:{},selectionsToResolve:c,onlyRunForcedResolvers:a},m=!1,[2,this.resolveSelectionSet(o.selectionSet,m,t,b).then(function(e){return{result:e,exportedVariables:b.exportedVariables}})]})})},e.prototype.resolveSelectionSet=function(e,t,n,r){return(0,en.mG)(this,void 0,void 0,function(){var i,a,o,s,u,c=this;return(0,en.Jh)(this,function(l){return i=r.fragmentMap,a=r.context,o=r.variables,s=[n],u=function(e){return(0,en.mG)(c,void 0,void 0,function(){var u,c;return(0,en.Jh)(this,function(l){return(t||r.selectionsToResolve.has(e))&&td(e,o)?eQ(e)?[2,this.resolveField(e,t,n,r).then(function(t){var n;void 0!==t&&s.push(((n={})[eX(e)]=t,n))})]:(e1(e)?u=e:(u=i[e.name.value],__DEV__?(0,Q.kG)(u,"No fragment named ".concat(e.name.value)):(0,Q.kG)(u,11)),u&&u.typeCondition&&(c=u.typeCondition.name.value,r.fragmentMatcher(n,c,a)))?[2,this.resolveSelectionSet(u.selectionSet,t,n,r).then(function(e){s.push(e)})]:[2]:[2]})})},[2,Promise.all(e.selections.map(u)).then(function(){return tF(s)})]})})},e.prototype.resolveField=function(e,t,n,r){return(0,en.mG)(this,void 0,void 0,function(){var i,a,o,s,u,c,l,f,d,h=this;return(0,en.Jh)(this,function(p){return n?(i=r.variables,a=e.name.value,o=eX(e),s=a!==o,c=Promise.resolve(u=n[o]||n[a]),(!r.onlyRunForcedResolvers||this.shouldForceResolvers(e))&&(l=n.__typename||r.defaultOperationType,(f=this.resolvers&&this.resolvers[l])&&(d=f[s?a:o])&&(c=Promise.resolve(rX.withValue(this.cache,d,[n,eZ(e,i),r.context,{field:e,fragmentMap:r.fragmentMap},])))),[2,c.then(function(n){if(void 0===n&&(n=u),e.directives&&e.directives.forEach(function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach(function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(r.exportedVariables[e.value.value]=n)})}),!e.selectionSet||null==n)return n;var i,a,o=null!==(a=null===(i=e.directives)||void 0===i?void 0:i.some(function(e){return"client"===e.name.value}))&&void 0!==a&&a;return Array.isArray(n)?h.resolveSubSelectedArray(e,t||o,n,r):e.selectionSet?h.resolveSelectionSet(e.selectionSet,t||o,n,r):void 0})]):[2,null]})})},e.prototype.resolveSubSelectedArray=function(e,t,n,r){var i=this;return Promise.all(n.map(function(n){return null===n?null:Array.isArray(n)?i.resolveSubSelectedArray(e,t,n,r):e.selectionSet?i.resolveSelectionSet(e.selectionSet,t,n,r):void 0}))},e.prototype.collectSelectionsToResolve=function(e,t){var n=function(e){return!Array.isArray(e)},r=this.selectionsToResolveCache;function i(e){if(!r.has(e)){var a=new Set;r.set(e,a),tl(e,{Directive:function(e,t,r,i,o){"client"===e.name.value&&o.forEach(function(e){n(e)&&n9(e)&&a.add(e)})},FragmentSpread:function(e,r,o,s,u){var c=t[e.name.value];__DEV__?(0,Q.kG)(c,"No fragment named ".concat(e.name.value)):(0,Q.kG)(c,12);var l=i(c);l.size>0&&(u.forEach(function(e){n(e)&&n9(e)&&a.add(e)}),a.add(e),l.forEach(function(e){a.add(e)}))}})}return r.get(e)}return i(e)},e}(),r6=new(t_.mr?WeakMap:Map);function r5(e,t){var n=e[t];"function"==typeof n&&(e[t]=function(){return r6.set(e,(r6.get(e)+1)%1e15),n.apply(this,arguments)})}function r8(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var r9=function(){function e(e,t){void 0===t&&(t=e.generateQueryId()),this.queryId=t,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.subscriptions=new Set,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var n=this.cache=e.cache;r6.has(n)||(r6.set(n,0),r5(n,"evict"),r5(n,"modify"),r5(n,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||nZ.I.loading;return this.variables&&this.networkStatus!==nZ.I.loading&&!(0,nm.D)(this.variables,e.variables)&&(t=nZ.I.setVariables),(0,nm.D)(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.reset=function(){r8(this),this.dirty=!1},e.prototype.getDiff=function(e){void 0===e&&(e=this.variables);var t=this.getDiffOptions(e);if(this.lastDiff&&(0,nm.D)(t,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables=e);var n=this.observableQuery;if(n&&"no-cache"===n.options.fetchPolicy)return{complete:!1};var r=this.cache.diff(t);return this.updateLastDiff(r,t),r},e.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(e){var t;return void 0===e&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:null===(t=this.observableQuery)||void 0===t?void 0:t.options.canonizeResults}},e.prototype.setDiff=function(e){var t=this,n=this.lastDiff&&this.lastDiff.diff;this.updateLastDiff(e),this.dirty||(0,nm.D)(n&&n.result,e&&e.result)||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(function(){return t.notify()},0)))},e.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){t.getDiff().fromOptimisticTransaction?e.observe():n4(e)})):delete this.oqListener)},e.prototype.notify=function(){var e=this;r8(this),this.shouldNotify()&&this.listeners.forEach(function(t){return t(e)}),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if((0,nZ.O)(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if("cache-only"!==e&&"cache-and-network"!==e)return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel,this.subscriptions.forEach(function(e){return e.unsubscribe()});var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var n=this.observableQuery;if(!n||"no-cache"!==n.options.fetchPolicy){var r=(0,en.pi)((0,en.pi)({},this.getDiffOptions(e)),{watcher:this,callback:function(e){return t.setDiff(e)}});this.lastWatch&&(0,nm.D)(r,this.lastWatch)||(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=r))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(e,t){var n=this.lastWrite;return!(n&&n.dmCount===r6.get(this.cache)&&(0,nm.D)(t,n.variables)&&(0,nm.D)(e.data,n.result.data))},e.prototype.markResult=function(e,t,n,r){var i=this,a=new tB,o=(0,tP.O)(e.errors)?e.errors.slice(0):[];if(this.reset(),"incremental"in e&&(0,tP.O)(e.incremental)){var s=tG(this.getDiff().result,e);e.data=s}else if("hasNext"in e&&e.hasNext){var u=this.getDiff();e.data=a.merge(u.result,e.data)}this.graphQLErrors=o,"no-cache"===n.fetchPolicy?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(n.variables)):0!==r&&(r7(e,n.errorPolicy)?this.cache.performTransaction(function(a){if(i.shouldWrite(e,n.variables))a.writeQuery({query:t,data:e.data,variables:n.variables,overwrite:1===r}),i.lastWrite={result:e,variables:n.variables,dmCount:r6.get(i.cache)};else if(i.lastDiff&&i.lastDiff.diff.complete){e.data=i.lastDiff.diff.result;return}var o=i.getDiffOptions(n.variables),s=a.diff(o);i.stopped||i.updateWatch(n.variables),i.updateLastDiff(s,o),s.complete&&(e.data=s.result)}):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=nZ.I.ready},e.prototype.markError=function(e){return this.networkStatus=nZ.I.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function r7(e,t){void 0===t&&(t="none");var n="ignore"===t||"all"===t,r=!nO(e);return!r&&n&&e.data&&(r=!0),r}var ie=Object.prototype.hasOwnProperty,it=function(){function e(e){var t=e.cache,n=e.link,r=e.defaultOptions,i=e.queryDeduplication,a=void 0!==i&&i,o=e.onBroadcast,s=e.ssrMode,u=void 0!==s&&s,c=e.clientAwareness,l=void 0===c?{}:c,f=e.localState,d=e.assumeImmutableResults;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new(t_.mr?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map,this.cache=t,this.link=n,this.defaultOptions=r||Object.create(null),this.queryDeduplication=a,this.clientAwareness=l,this.localState=f||new r4({cache:t}),this.ssrMode=u,this.assumeImmutableResults=!!d,(this.onBroadcast=o)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var e=this;this.queries.forEach(function(t,n){e.stopQueryNoBroadcast(n)}),this.cancelPendingFetches(__DEV__?new Q.ej("QueryManager stopped while query was in flight"):new Q.ej(14))},e.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach(function(t){return t(e)}),this.fetchCancelFns.clear()},e.prototype.mutate=function(e){var t,n,r=e.mutation,i=e.variables,a=e.optimisticResponse,o=e.updateQueries,s=e.refetchQueries,u=void 0===s?[]:s,c=e.awaitRefetchQueries,l=void 0!==c&&c,f=e.update,d=e.onQueryUpdated,h=e.fetchPolicy,p=void 0===h?(null===(t=this.defaultOptions.mutate)||void 0===t?void 0:t.fetchPolicy)||"network-only":h,b=e.errorPolicy,m=void 0===b?(null===(n=this.defaultOptions.mutate)||void 0===n?void 0:n.errorPolicy)||"none":b,g=e.keepRootFields,v=e.context;return(0,en.mG)(this,void 0,void 0,function(){var e,t,n,s,c,h;return(0,en.Jh)(this,function(b){switch(b.label){case 0:if(__DEV__?(0,Q.kG)(r,"mutation option is required. You must specify your GraphQL document in the mutation option."):(0,Q.kG)(r,15),__DEV__?(0,Q.kG)("network-only"===p||"no-cache"===p,"Mutations support only 'network-only' or 'no-cache' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write."):(0,Q.kG)("network-only"===p||"no-cache"===p,16),e=this.generateMutationId(),n=(t=this.transform(r)).document,s=t.hasClientExports,r=this.cache.transformForLink(n),i=this.getVariables(r,i),!s)return[3,2];return[4,this.localState.addExportedVariables(r,i,v)];case 1:i=b.sent(),b.label=2;case 2:return c=this.mutationStore&&(this.mutationStore[e]={mutation:r,variables:i,loading:!0,error:null}),a&&this.markMutationOptimistic(a,{mutationId:e,document:r,variables:i,fetchPolicy:p,errorPolicy:m,context:v,updateQueries:o,update:f,keepRootFields:g}),this.broadcastQueries(),h=this,[2,new Promise(function(t,n){return nM(h.getObservableFromLink(r,(0,en.pi)((0,en.pi)({},v),{optimisticResponse:a}),i,!1),function(t){if(nO(t)&&"none"===m)throw new tN.cA({graphQLErrors:nA(t)});c&&(c.loading=!1,c.error=null);var n=(0,en.pi)({},t);return"function"==typeof u&&(u=u(n)),"ignore"===m&&nO(n)&&delete n.errors,h.markMutationResult({mutationId:e,result:n,document:r,variables:i,fetchPolicy:p,errorPolicy:m,context:v,update:f,updateQueries:o,awaitRefetchQueries:l,refetchQueries:u,removeOptimistic:a?e:void 0,onQueryUpdated:d,keepRootFields:g})}).subscribe({next:function(e){h.broadcastQueries(),"hasNext"in e&&!1!==e.hasNext||t(e)},error:function(t){c&&(c.loading=!1,c.error=t),a&&h.cache.removeOptimistic(e),h.broadcastQueries(),n(t instanceof tN.cA?t:new tN.cA({networkError:t}))}})})]}})})},e.prototype.markMutationResult=function(e,t){var n=this;void 0===t&&(t=this.cache);var r=e.result,i=[],a="no-cache"===e.fetchPolicy;if(!a&&r7(r,e.errorPolicy)){if(tU(r)||i.push({result:r.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}),tU(r)&&(0,tP.O)(r.incremental)){var o=t.diff({id:"ROOT_MUTATION",query:this.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0}),s=void 0;o.result&&(s=tG(o.result,r)),void 0!==s&&(r.data=s,i.push({result:s,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}))}var u=e.updateQueries;u&&this.queries.forEach(function(e,a){var o=e.observableQuery,s=o&&o.queryName;if(s&&ie.call(u,s)){var c,l=u[s],f=n.queries.get(a),d=f.document,h=f.variables,p=t.diff({query:d,variables:h,returnPartialData:!0,optimistic:!1}),b=p.result;if(p.complete&&b){var m=l(b,{mutationResult:r,queryName:d&&e3(d)||void 0,queryVariables:h});m&&i.push({result:m,dataId:"ROOT_QUERY",query:d,variables:h})}}})}if(i.length>0||e.refetchQueries||e.update||e.onQueryUpdated||e.removeOptimistic){var c=[];if(this.refetchQueries({updateCache:function(t){a||i.forEach(function(e){return t.write(e)});var o=e.update,s=!t$(r)||tU(r)&&!r.hasNext;if(o){if(!a){var u=t.diff({id:"ROOT_MUTATION",query:n.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});u.complete&&("incremental"in(r=(0,en.pi)((0,en.pi)({},r),{data:u.result}))&&delete r.incremental,"hasNext"in r&&delete r.hasNext)}s&&o(t,r,{context:e.context,variables:e.variables})}a||e.keepRootFields||!s||t.modify({id:"ROOT_MUTATION",fields:function(e,t){var n=t.fieldName,r=t.DELETE;return"__typename"===n?e:r}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach(function(e){return c.push(e)}),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(c).then(function(){return r})}return Promise.resolve(r)},e.prototype.markMutationOptimistic=function(e,t){var n=this,r="function"==typeof e?e(t.variables):e;return this.cache.recordOptimisticTransaction(function(e){try{n.markMutationResult((0,en.pi)((0,en.pi)({},t),{result:{data:r}}),e)}catch(i){__DEV__&&Q.kG.error(i)}},t.mutationId)},e.prototype.fetchQuery=function(e,t,n){return this.fetchQueryObservable(e,t,n).promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach(function(t,n){e[n]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}}),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){var t=this.transformCache;if(!t.has(e)){var n=this.cache.transformDocument(e),r=nY(n),i=this.localState.clientQuery(n),a=r&&this.localState.serverQuery(r),o={document:n,hasClientExports:tm(n),hasForcedResolvers:this.localState.shouldForceResolvers(n),clientQuery:i,serverQuery:a,defaultVars:e9(e2(n)),asQuery:(0,en.pi)((0,en.pi)({},n),{definitions:n.definitions.map(function(e){return"OperationDefinition"===e.kind&&"query"!==e.operation?(0,en.pi)((0,en.pi)({},e),{operation:"query"}):e})})},s=function(e){e&&!t.has(e)&&t.set(e,o)};s(e),s(n),s(i),s(a)}return t.get(e)},e.prototype.getVariables=function(e,t){return(0,en.pi)((0,en.pi)({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e){void 0===(e=(0,en.pi)((0,en.pi)({},e),{variables:this.getVariables(e.query,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var t=new r9(this),n=new n3({queryManager:this,queryInfo:t,options:e});return this.queries.set(n.queryId,t),t.init({document:n.query,observableQuery:n,variables:n.variables}),n},e.prototype.query=function(e,t){var n=this;return void 0===t&&(t=this.generateQueryId()),__DEV__?(0,Q.kG)(e.query,"query option is required. You must specify your GraphQL document in the query option."):(0,Q.kG)(e.query,17),__DEV__?(0,Q.kG)("Document"===e.query.kind,'You must wrap the query string in a "gql" tag.'):(0,Q.kG)("Document"===e.query.kind,18),__DEV__?(0,Q.kG)(!e.returnPartialData,"returnPartialData option only supported on watchQuery."):(0,Q.kG)(!e.returnPartialData,19),__DEV__?(0,Q.kG)(!e.pollInterval,"pollInterval option only supported on watchQuery."):(0,Q.kG)(!e.pollInterval,20),this.fetchQuery(t,e).finally(function(){return n.stopQuery(t)})},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(e){return void 0===e&&(e={discardWatches:!0}),this.cancelPendingFetches(__DEV__?new Q.ej("Store reset while query was in flight (not completed in link chain)"):new Q.ej(21)),this.queries.forEach(function(e){e.observableQuery?e.networkStatus=nZ.I.loading:e.stop()}),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},e.prototype.getObservableQueries=function(e){var t=this;void 0===e&&(e="active");var n=new Map,r=new Map,i=new Set;return Array.isArray(e)&&e.forEach(function(e){"string"==typeof e?r.set(e,!1):eN(e)?r.set(t.transform(e).document,!1):(0,eO.s)(e)&&e.query&&i.add(e)}),this.queries.forEach(function(t,i){var a=t.observableQuery,o=t.document;if(a){if("all"===e){n.set(i,a);return}var s=a.queryName;if("standby"===a.options.fetchPolicy||"active"===e&&!a.hasObservers())return;("active"===e||s&&r.has(s)||o&&r.has(o))&&(n.set(i,a),s&&r.set(s,!0),o&&r.set(o,!0))}}),i.size&&i.forEach(function(e){var r=nG("legacyOneTimeQuery"),i=t.getQuery(r).init({document:e.query,variables:e.variables}),a=new n3({queryManager:t,queryInfo:i,options:(0,en.pi)((0,en.pi)({},e),{fetchPolicy:"network-only"})});(0,Q.kG)(a.queryId===r),i.setObservableQuery(a),n.set(r,a)}),__DEV__&&r.size&&r.forEach(function(e,t){!e&&__DEV__&&Q.kG.warn("Unknown query ".concat("string"==typeof t?"named ":"").concat(JSON.stringify(t,null,2)," requested in refetchQueries options.include array"))}),n},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var n=[];return this.getObservableQueries(e?"all":"active").forEach(function(r,i){var a=r.options.fetchPolicy;r.resetLastResults(),(e||"standby"!==a&&"cache-only"!==a)&&n.push(r.refetch()),t.getQuery(i).setDiff(null)}),this.broadcastQueries(),Promise.all(n)},e.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},e.prototype.startGraphQLSubscription=function(e){var t=this,n=e.query,r=e.fetchPolicy,i=e.errorPolicy,a=e.variables,o=e.context,s=void 0===o?{}:o;n=this.transform(n).document,a=this.getVariables(n,a);var u=function(e){return t.getObservableFromLink(n,s,e).map(function(a){"no-cache"!==r&&(r7(a,i)&&t.cache.write({query:n,result:a.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries());var o=nO(a),s=(0,tN.ls)(a);if(o||s){var u={};throw o&&(u.graphQLErrors=a.errors),s&&(u.protocolErrors=a.extensions[tN.YG]),new tN.cA(u)}return a})};if(this.transform(n).hasClientExports){var c=this.localState.addExportedVariables(n,a,s).then(u);return new eT(function(e){var t=null;return c.then(function(n){return t=n.subscribe(e)},e.error),function(){return t&&t.unsubscribe()}})}return u(a)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.queries.has(e)&&(this.getQuery(e).stop(),this.queries.delete(e))},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach(function(e){return e.notify()})},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,n,r){var i,a,o=this;void 0===r&&(r=null!==(i=null==t?void 0:t.queryDeduplication)&&void 0!==i?i:this.queryDeduplication);var s=this.transform(e).serverQuery;if(s){var u=this,c=u.inFlightLinkObservables,l=u.link,f={query:s,variables:n,operationName:e3(s)||void 0,context:this.prepareContext((0,en.pi)((0,en.pi)({},t),{forceFetch:!r}))};if(t=f.context,r){var d=c.get(s)||new Map;c.set(s,d);var h=nx(n);if(!(a=d.get(h))){var p=new nq([np(l,f)]);d.set(h,a=p),p.beforeNext(function(){d.delete(h)&&d.size<1&&c.delete(s)})}}else a=new nq([np(l,f)])}else a=new nq([eT.of({data:{}})]),t=this.prepareContext(t);var b=this.transform(e).clientQuery;return b&&(a=nM(a,function(e){return o.localState.runResolvers({document:b,remoteResult:e,context:t,variables:n})})),a},e.prototype.getResultsFromLink=function(e,t,n){var r=e.lastRequestId=this.generateRequestId(),i=this.cache.transformForLink(this.transform(e.document).document);return nM(this.getObservableFromLink(i,n.context,n.variables),function(a){var o=nA(a),s=o.length>0;if(r>=e.lastRequestId){if(s&&"none"===n.errorPolicy)throw e.markError(new tN.cA({graphQLErrors:o}));e.markResult(a,i,n,t),e.markReady()}var u={data:a.data,loading:!1,networkStatus:nZ.I.ready};return s&&"ignore"!==n.errorPolicy&&(u.errors=o,u.networkStatus=nZ.I.error),u},function(t){var n=(0,tN.MS)(t)?t:new tN.cA({networkError:t});throw r>=e.lastRequestId&&e.markError(n),n})},e.prototype.fetchQueryObservable=function(e,t,n){return this.fetchConcastWithInfo(e,t,n).concast},e.prototype.fetchConcastWithInfo=function(e,t,n){var r,i,a=this;void 0===n&&(n=nZ.I.loading);var o=this.transform(t.query).document,s=this.getVariables(o,t.variables),u=this.getQuery(e),c=this.defaultOptions.watchQuery,l=t.fetchPolicy,f=void 0===l?c&&c.fetchPolicy||"cache-first":l,d=t.errorPolicy,h=void 0===d?c&&c.errorPolicy||"none":d,p=t.returnPartialData,b=void 0!==p&&p,m=t.notifyOnNetworkStatusChange,g=void 0!==m&&m,v=t.context,y=void 0===v?{}:v,w=Object.assign({},t,{query:o,variables:s,fetchPolicy:f,errorPolicy:h,returnPartialData:b,notifyOnNetworkStatusChange:g,context:y}),_=function(e){w.variables=e;var r=a.fetchQueryByPolicy(u,w,n);return"standby"!==w.fetchPolicy&&r.sources.length>0&&u.observableQuery&&u.observableQuery.applyNextFetchPolicy("after-fetch",t),r},E=function(){return a.fetchCancelFns.delete(e)};if(this.fetchCancelFns.set(e,function(e){E(),setTimeout(function(){return r.cancel(e)})}),this.transform(w.query).hasClientExports)r=new nq(this.localState.addExportedVariables(w.query,w.variables,w.context).then(_).then(function(e){return e.sources})),i=!0;else{var S=_(w.variables);i=S.fromLink,r=new nq(S.sources)}return r.promise.then(E,E),{concast:r,fromLink:i}},e.prototype.refetchQueries=function(e){var t=this,n=e.updateCache,r=e.include,i=e.optimistic,a=void 0!==i&&i,o=e.removeOptimistic,s=void 0===o?a?nG("refetchQueries"):void 0:o,u=e.onQueryUpdated,c=new Map;r&&this.getObservableQueries(r).forEach(function(e,n){c.set(n,{oq:e,lastDiff:t.getQuery(n).getDiff()})});var l=new Map;return n&&this.cache.batch({update:n,optimistic:a&&s||!1,removeOptimistic:s,onWatchUpdated:function(e,t,n){var r=e.watcher instanceof r9&&e.watcher.observableQuery;if(r){if(u){c.delete(r.queryId);var i=u(r,t,n);return!0===i&&(i=r.refetch()),!1!==i&&l.set(r,i),i}null!==u&&c.set(r.queryId,{oq:r,lastDiff:n,diff:t})}}}),c.size&&c.forEach(function(e,n){var r,i=e.oq,a=e.lastDiff,o=e.diff;if(u){if(!o){var s=i.queryInfo;s.reset(),o=s.getDiff()}r=u(i,o,a)}u&&!0!==r||(r=i.refetch()),!1!==r&&l.set(i,r),n.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(n)}),s&&this.cache.removeOptimistic(s),l},e.prototype.fetchQueryByPolicy=function(e,t,n){var r=this,i=t.query,a=t.variables,o=t.fetchPolicy,s=t.refetchWritePolicy,u=t.errorPolicy,c=t.returnPartialData,l=t.context,f=t.notifyOnNetworkStatusChange,d=e.networkStatus;e.init({document:this.transform(i).document,variables:a,networkStatus:n});var h=function(){return e.getDiff(a)},p=function(t,n){void 0===n&&(n=e.networkStatus||nZ.I.loading);var o=t.result;!__DEV__||c||(0,nm.D)(o,{})||n5(t.missing);var s=function(e){return eT.of((0,en.pi)({data:e,loading:(0,nZ.O)(n),networkStatus:n},t.complete?null:{partial:!0}))};return o&&r.transform(i).hasForcedResolvers?r.localState.runResolvers({document:i,remoteResult:{data:o},context:l,variables:a,onlyRunForcedResolvers:!0}).then(function(e){return s(e.data||void 0)}):"none"===u&&n===nZ.I.refetch&&Array.isArray(t.missing)?s(void 0):s(o)},b="no-cache"===o?0:n===nZ.I.refetch&&"merge"!==s?1:2,m=function(){return r.getResultsFromLink(e,b,{variables:a,context:l,fetchPolicy:o,errorPolicy:u})},g=f&&"number"==typeof d&&d!==n&&(0,nZ.O)(n);switch(o){default:case"cache-first":var v=h();if(v.complete)return{fromLink:!1,sources:[p(v,e.markReady())]};if(c||g)return{fromLink:!0,sources:[p(v),m()]};return{fromLink:!0,sources:[m()]};case"cache-and-network":var v=h();if(v.complete||c||g)return{fromLink:!0,sources:[p(v),m()]};return{fromLink:!0,sources:[m()]};case"cache-only":return{fromLink:!1,sources:[p(h(),e.markReady())]};case"network-only":if(g)return{fromLink:!0,sources:[p(h()),m()]};return{fromLink:!0,sources:[m()]};case"no-cache":if(g)return{fromLink:!0,sources:[p(e.getDiff()),m(),]};return{fromLink:!0,sources:[m()]};case"standby":return{fromLink:!1,sources:[]}}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new r9(this,e)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return(0,en.pi)((0,en.pi)({},t),{clientAwareness:this.clientAwareness})},e}(),ir=__webpack_require__(14012),ii=!1,ia=function(){function e(e){var t=this;this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var n=e.uri,r=e.credentials,i=e.headers,a=e.cache,o=e.ssrMode,s=void 0!==o&&o,u=e.ssrForceFetchDelay,c=void 0===u?0:u,l=e.connectToDevTools,f=void 0===l?"object"==typeof window&&!window.__APOLLO_CLIENT__&&__DEV__:l,d=e.queryDeduplication,h=void 0===d||d,p=e.defaultOptions,b=e.assumeImmutableResults,m=void 0!==b&&b,g=e.resolvers,v=e.typeDefs,y=e.fragmentMatcher,w=e.name,_=e.version,E=e.link;if(E||(E=n?new nh({uri:n,credentials:r,headers:i}):ta.empty()),!a)throw __DEV__?new Q.ej("To initialize Apollo Client, you must specify a 'cache' property in the options object. \nFor more information, please visit: https://go.apollo.dev/c/docs"):new Q.ej(9);if(this.link=E,this.cache=a,this.disableNetworkFetches=s||c>0,this.queryDeduplication=h,this.defaultOptions=p||Object.create(null),this.typeDefs=v,c&&setTimeout(function(){return t.disableNetworkFetches=!1},c),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),f&&"object"==typeof window&&(window.__APOLLO_CLIENT__=this),!ii&&f&&__DEV__&&(ii=!0,"undefined"!=typeof window&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__)){var S=window.navigator,k=S&&S.userAgent,x=void 0;"string"==typeof k&&(k.indexOf("Chrome/")>-1?x="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":k.indexOf("Firefox/")>-1&&(x="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),x&&__DEV__&&Q.kG.log("Download the Apollo DevTools for a better development experience: "+x)}this.version=nb,this.localState=new r4({cache:a,client:this,resolvers:g,fragmentMatcher:y}),this.queryManager=new it({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,queryDeduplication:h,ssrMode:s,clientAwareness:{name:w,version:_},localState:this.localState,assumeImmutableResults:m,onBroadcast:f?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=(0,ir.J)(this.defaultOptions.watchQuery,e)),this.disableNetworkFetches&&("network-only"===e.fetchPolicy||"cache-and-network"===e.fetchPolicy)&&(e=(0,en.pi)((0,en.pi)({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=(0,ir.J)(this.defaultOptions.query,e)),__DEV__?(0,Q.kG)("cache-and-network"!==e.fetchPolicy,"The cache-and-network fetchPolicy does not work with client.query, because client.query can only return a single result. Please use client.watchQuery to receive multiple results from the cache and the network, or consider using a different fetchPolicy, such as cache-first or network-only."):(0,Q.kG)("cache-and-network"!==e.fetchPolicy,10),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=(0,en.pi)((0,en.pi)({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=(0,ir.J)(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){var t=this.cache.writeQuery(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t},e.prototype.writeFragment=function(e){var t=this.cache.writeFragment(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return np(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!1})}).then(function(){return Promise.all(e.resetStoreCallbacks.map(function(e){return e()}))}).then(function(){return e.reFetchObservableQueries()})},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!0})}).then(function(){return Promise.all(e.clearStoreCallbacks.map(function(e){return e()}))})},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter(function(t){return t!==e})}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter(function(t){return t!==e})}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),n=[],r=[];t.forEach(function(e,t){n.push(t),r.push(e)});var i=Promise.all(r);return i.queries=n,i.results=r,i.catch(function(e){__DEV__&&Q.kG.debug("In client.refetchQueries, Promise.all promise rejected with error ".concat(e))}),i},e.prototype.getObservableQueries=function(e){return void 0===e&&(e="active"),this.queryManager.getObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e.prototype.setLink=function(e){this.link=this.queryManager.link=e},e}(),io=function(){function e(){this.getFragmentDoc=rZ(eA)}return e.prototype.batch=function(e){var t,n=this,r="string"==typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;return this.performTransaction(function(){return t=e.update(n)},r),t},e.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},e.prototype.transformDocument=function(e){return e},e.prototype.transformForLink=function(e){return e},e.prototype.identify=function(e){},e.prototype.gc=function(){return[]},e.prototype.modify=function(e){return!1},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,en.pi)((0,en.pi)({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,en.pi)((0,en.pi)({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))},e.prototype.writeQuery=function(e){var t=e.id,n=e.data,r=(0,en._T)(e,["id","data"]);return this.write(Object.assign(r,{dataId:t||"ROOT_QUERY",result:n}))},e.prototype.writeFragment=function(e){var t=e.id,n=e.data,r=e.fragment,i=e.fragmentName,a=(0,en._T)(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(a,{query:this.getFragmentDoc(r,i),dataId:t,result:n}))},e.prototype.updateQuery=function(e,t){return this.batch({update:function(n){var r=n.readQuery(e),i=t(r);return null==i?r:(n.writeQuery((0,en.pi)((0,en.pi)({},e),{data:i})),i)}})},e.prototype.updateFragment=function(e,t){return this.batch({update:function(n){var r=n.readFragment(e),i=t(r);return null==i?r:(n.writeFragment((0,en.pi)((0,en.pi)({},e),{data:i})),i)}})},e}(),is=function(e){function t(n,r,i,a){var o,s=e.call(this,n)||this;if(s.message=n,s.path=r,s.query=i,s.variables=a,Array.isArray(s.path)){s.missing=s.message;for(var u=s.path.length-1;u>=0;--u)s.missing=((o={})[s.path[u]]=s.missing,o)}else s.missing=s.path;return s.__proto__=t.prototype,s}return(0,en.ZT)(t,e),t}(Error),iu=__webpack_require__(10542),ic=Object.prototype.hasOwnProperty;function il(e){return null==e}function id(e,t){var n=e.__typename,r=e.id,i=e._id;if("string"==typeof n&&(t&&(t.keyObject=il(r)?il(i)?void 0:{_id:i}:{id:r}),il(r)&&!il(i)&&(r=i),!il(r)))return"".concat(n,":").concat("number"==typeof r||"string"==typeof r?r:JSON.stringify(r))}var ih={dataIdFromObject:id,addTypename:!0,resultCaching:!0,canonizeResults:!1};function ip(e){return(0,n1.o)(ih,e)}function ib(e){var t=e.canonizeResults;return void 0===t?ih.canonizeResults:t}function im(e,t){return eD(t)?e.get(t.__ref,"__typename"):t&&t.__typename}var ig=/^[_a-z][_0-9a-z]*/i;function iv(e){var t=e.match(ig);return t?t[0]:e}function iy(e,t,n){return!!(0,eO.s)(t)&&((0,tP.k)(t)?t.every(function(t){return iy(e,t,n)}):e.selections.every(function(e){if(eQ(e)&&td(e,n)){var r=eX(e);return ic.call(t,r)&&(!e.selectionSet||iy(e.selectionSet,t[r],n))}return!0}))}function iw(e){return(0,eO.s)(e)&&!eD(e)&&!(0,tP.k)(e)}function i_(){return new tB}function iE(e,t){var n=eL(e4(e));return{fragmentMap:n,lookupFragment:function(e){var r=n[e];return!r&&t&&(r=t.lookup(e)),r||null}}}var iS=Object.create(null),ik=function(){return iS},ix=Object.create(null),iT=function(){function e(e,t){var n=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(e,t){return(0,iu.J)(eD(e)?n.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return eD(e)?n.has(e.__ref):"object"==typeof e},this.toReference=function(e,t){if("string"==typeof e)return eI(e);if(eD(e))return e;var r=n.policies.identify(e)[0];if(r){var i=eI(r);return t&&n.merge(r,e),i}}}return e.prototype.toObject=function(){return(0,en.pi)({},this.data)},e.prototype.has=function(e){return void 0!==this.lookup(e,!0)},e.prototype.get=function(e,t){if(this.group.depend(e,t),ic.call(this.data,e)){var n=this.data[e];if(n&&ic.call(n,t))return n[t]}return"__typename"===t&&ic.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof iL?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return(t&&this.group.depend(e,"__exists"),ic.call(this.data,e))?this.data[e]:this instanceof iL?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var n,r=this;eD(e)&&(e=e.__ref),eD(t)&&(t=t.__ref);var i="string"==typeof e?this.lookup(n=e):e,a="string"==typeof t?this.lookup(n=t):t;if(a){__DEV__?(0,Q.kG)("string"==typeof n,"store.merge expects a string ID"):(0,Q.kG)("string"==typeof n,1);var o=new tB(iI).merge(i,a);if(this.data[n]=o,o!==i&&(delete this.refs[n],this.group.caching)){var s=Object.create(null);i||(s.__exists=1),Object.keys(a).forEach(function(e){if(!i||i[e]!==o[e]){s[e]=1;var t=iv(e);t===e||r.policies.hasKeyArgs(o.__typename,t)||(s[t]=1),void 0!==o[e]||r instanceof iL||delete o[e]}}),s.__typename&&!(i&&i.__typename)&&this.policies.rootTypenamesById[n]===o.__typename&&delete s.__typename,Object.keys(s).forEach(function(e){return r.group.dirty(n,e)})}}},e.prototype.modify=function(e,t){var n=this,r=this.lookup(e);if(r){var i=Object.create(null),a=!1,o=!0,s={DELETE:iS,INVALIDATE:ix,isReference:eD,toReference:this.toReference,canRead:this.canRead,readField:function(t,r){return n.policies.readField("string"==typeof t?{fieldName:t,from:r||eI(e)}:t,{store:n})}};if(Object.keys(r).forEach(function(u){var c=iv(u),l=r[u];if(void 0!==l){var f="function"==typeof t?t:t[u]||t[c];if(f){var d=f===ik?iS:f((0,iu.J)(l),(0,en.pi)((0,en.pi)({},s),{fieldName:c,storeFieldName:u,storage:n.getStorage(e,u)}));d===ix?n.group.dirty(e,u):(d===iS&&(d=void 0),d!==l&&(i[u]=d,a=!0,l=d))}void 0!==l&&(o=!1)}}),a)return this.merge(e,i),o&&(this instanceof iL?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},e.prototype.delete=function(e,t,n){var r,i=this.lookup(e);if(i){var a=this.getFieldValue(i,"__typename"),o=t&&n?this.policies.getStoreFieldName({typename:a,fieldName:t,args:n}):t;return this.modify(e,o?((r={})[o]=ik,r):ik)}return!1},e.prototype.evict=function(e,t){var n=!1;return e.id&&(ic.call(this.data,e.id)&&(n=this.delete(e.id,e.fieldName,e.args)),this instanceof iL&&this!==t&&(n=this.parent.evict(e,t)||n),(e.fieldName||n)&&this.group.dirty(e.id,e.fieldName||"__exists")),n},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var e=this,t=this.toObject(),n=[];return this.getRootIdSet().forEach(function(t){ic.call(e.policies.rootTypenamesById,t)||n.push(t)}),n.length&&(t.__META={extraRootIds:n.sort()}),t},e.prototype.replace=function(e){var t=this;if(Object.keys(this.data).forEach(function(n){e&&ic.call(e,n)||t.delete(n)}),e){var n=e.__META,r=(0,en._T)(e,["__META"]);Object.keys(r).forEach(function(e){t.merge(e,r[e])}),n&&n.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},e.prototype.release=function(e){if(this.rootIds[e]>0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof iL?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),n=this.toObject();t.forEach(function(r){ic.call(n,r)&&(Object.keys(e.findChildRefIds(r)).forEach(t.add,t),delete n[r])});var r=Object.keys(n);if(r.length){for(var i=this;i instanceof iL;)i=i.parent;r.forEach(function(e){return i.delete(e)})}return r},e.prototype.findChildRefIds=function(e){if(!ic.call(this.refs,e)){var t=this.refs[e]=Object.create(null),n=this.data[e];if(!n)return t;var r=new Set([n]);r.forEach(function(e){eD(e)&&(t[e.__ref]=!0),(0,eO.s)(e)&&Object.keys(e).forEach(function(t){var n=e[t];(0,eO.s)(n)&&r.add(n)})})}return this.refs[e]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),iM=function(){function e(e,t){void 0===t&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?rW():null,this.keyMaker=new n_(t_.mr)},e.prototype.depend=function(e,t){if(this.d){this.d(iO(e,t));var n=iv(t);n!==t&&this.d(iO(e,n)),this.parent&&this.parent.depend(e,t)}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty(iO(e,t),"__exists"===t?"forget":"setDirty")},e}();function iO(e,t){return t+"#"+e}function iA(e,t){iD(e)&&e.group.depend(t,"__exists")}!function(e){var t=function(e){function t(t){var n=t.policies,r=t.resultCaching,i=void 0===r||r,a=t.seed,o=e.call(this,n,new iM(i))||this;return o.stump=new iC(o),o.storageTrie=new n_(t_.mr),a&&o.replace(a),o}return(0,en.ZT)(t,e),t.prototype.addLayer=function(e,t){return this.stump.addLayer(e,t)},t.prototype.removeLayer=function(){return this},t.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},t}(e);e.Root=t}(iT||(iT={}));var iL=function(e){function t(t,n,r,i){var a=e.call(this,n.policies,i)||this;return a.id=t,a.parent=n,a.replay=r,a.group=i,r(a),a}return(0,en.ZT)(t,e),t.prototype.addLayer=function(e,n){return new t(e,this,n,this.group)},t.prototype.removeLayer=function(e){var t=this,n=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach(function(e){var r=t.data[e],i=n.lookup(e);i?r?r!==i&&Object.keys(r).forEach(function(n){(0,nm.D)(r[n],i[n])||t.group.dirty(e,n)}):(t.group.dirty(e,"__exists"),Object.keys(i).forEach(function(n){t.group.dirty(e,n)})):t.delete(e)}),n):n===this.parent?this:n.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return(0,en.pi)((0,en.pi)({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var n=this.parent.findChildRefIds(t);return ic.call(this.data,t)?(0,en.pi)((0,en.pi)({},n),e.prototype.findChildRefIds.call(this,t)):n},t.prototype.getStorage=function(){for(var e=this.parent;e.parent;)e=e.parent;return e.getStorage.apply(e,arguments)},t}(iT),iC=function(e){function t(t){return e.call(this,"EntityStore.Stump",t,function(){},new iM(t.group.caching,t.group))||this}return(0,en.ZT)(t,e),t.prototype.removeLayer=function(){return this},t.prototype.merge=function(){return this.parent.merge.apply(this.parent,arguments)},t}(iL);function iI(e,t,n){var r=e[n],i=t[n];return(0,nm.D)(r,i)?r:i}function iD(e){return!!(e instanceof iT&&e.group.caching)}function iN(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults,]}var iP=function(){function e(e){var t=this;this.knownResults=new(t_.mr?WeakMap:Map),this.config=(0,n1.o)(e,{addTypename:!1!==e.addTypename,canonizeResults:ib(e)}),this.canon=e.canon||new nk,this.executeSelectionSet=rZ(function(e){var n,r=e.context.canonizeResults,i=iN(e);i[3]=!r;var a=(n=t.executeSelectionSet).peek.apply(n,i);return a?r?(0,en.pi)((0,en.pi)({},a),{result:t.canon.admit(a.result)}):a:(iA(e.context.store,e.enclosingRef.__ref),t.execSelectionSetImpl(e))},{max:this.config.resultCacheMaxSize,keyArgs:iN,makeCacheKey:function(e,t,n,r){if(iD(n.store))return n.store.makeCacheKey(e,eD(t)?t.__ref:t,n.varString,r)}}),this.executeSubSelectedArray=rZ(function(e){return iA(e.context.store,e.enclosingRef.__ref),t.execSubSelectedArrayImpl(e)},{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var t=e.field,n=e.array,r=e.context;if(iD(r.store))return r.store.makeCacheKey(t,n,r.varString)}})}return e.prototype.resetCanon=function(){this.canon=new nk},e.prototype.diffQueryAgainstStore=function(e){var t,n=e.store,r=e.query,i=e.rootId,a=void 0===i?"ROOT_QUERY":i,o=e.variables,s=e.returnPartialData,u=void 0===s||s,c=e.canonizeResults,l=void 0===c?this.config.canonizeResults:c,f=this.config.cache.policies;o=(0,en.pi)((0,en.pi)({},e9(e6(r))),o);var d=eI(a),h=this.executeSelectionSet({selectionSet:e8(r).selectionSet,objectOrReference:d,enclosingRef:d,context:(0,en.pi)({store:n,query:r,policies:f,variables:o,varString:nx(o),canonizeResults:l},iE(r,this.config.fragments))});if(h.missing&&(t=[new is(iR(h.missing),h.missing,r,o)],!u))throw t[0];return{result:h.result,complete:!t,missing:t}},e.prototype.isFresh=function(e,t,n,r){if(iD(r.store)&&this.knownResults.get(e)===n){var i=this.executeSelectionSet.peek(n,t,r,this.canon.isKnown(e));if(i&&e===i.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t,n=this,r=e.selectionSet,i=e.objectOrReference,a=e.enclosingRef,o=e.context;if(eD(i)&&!o.policies.rootTypenamesById[i.__ref]&&!o.store.has(i.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(i.__ref," object")};var s=o.variables,u=o.policies,c=o.store.getFieldValue(i,"__typename"),l=[],f=new tB;function d(e,n){var r;return e.missing&&(t=f.merge(t,((r={})[n]=e.missing,r))),e.result}this.config.addTypename&&"string"==typeof c&&!u.rootIdsByTypename[c]&&l.push({__typename:c});var h=new Set(r.selections);h.forEach(function(e){var r,p;if(td(e,s)){if(eQ(e)){var b=u.readField({fieldName:e.name.value,field:e,variables:o.variables,from:i},o),m=eX(e);void 0===b?nj.added(e)||(t=f.merge(t,((r={})[m]="Can't find field '".concat(e.name.value,"' on ").concat(eD(i)?i.__ref+" object":"object "+JSON.stringify(i,null,2)),r))):(0,tP.k)(b)?b=d(n.executeSubSelectedArray({field:e,array:b,enclosingRef:a,context:o}),m):e.selectionSet?null!=b&&(b=d(n.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:b,enclosingRef:eD(b)?b:a,context:o}),m)):o.canonizeResults&&(b=n.canon.pass(b)),void 0!==b&&l.push(((p={})[m]=b,p))}else{var g=eC(e,o.lookupFragment);if(!g&&e.kind===nL.h.FRAGMENT_SPREAD)throw __DEV__?new Q.ej("No fragment named ".concat(e.name.value)):new Q.ej(5);g&&u.fragmentMatches(g,c)&&g.selectionSet.selections.forEach(h.add,h)}}});var p={result:tF(l),missing:t},b=o.canonizeResults?this.canon.admit(p):(0,iu.J)(p);return b.result&&this.knownResults.set(b.result,r),b},e.prototype.execSubSelectedArrayImpl=function(e){var t,n=this,r=e.field,i=e.array,a=e.enclosingRef,o=e.context,s=new tB;function u(e,n){var r;return e.missing&&(t=s.merge(t,((r={})[n]=e.missing,r))),e.result}return r.selectionSet&&(i=i.filter(o.store.canRead)),i=i.map(function(e,t){return null===e?null:(0,tP.k)(e)?u(n.executeSubSelectedArray({field:r,array:e,enclosingRef:a,context:o}),t):r.selectionSet?u(n.executeSelectionSet({selectionSet:r.selectionSet,objectOrReference:e,enclosingRef:eD(e)?e:a,context:o}),t):(__DEV__&&ij(o.store,r,e),e)}),{result:o.canonizeResults?this.canon.admit(i):i,missing:t}},e}();function iR(e){try{JSON.stringify(e,function(e,t){if("string"==typeof t)throw t;return t})}catch(t){return t}}function ij(e,t,n){if(!t.selectionSet){var r=new Set([n]);r.forEach(function(n){(0,eO.s)(n)&&(__DEV__?(0,Q.kG)(!eD(n),"Missing selection set for object of type ".concat(im(e,n)," returned for query field ").concat(t.name.value)):(0,Q.kG)(!eD(n),6),Object.values(n).forEach(r.add,r))})}}function iF(e){var t=nG("stringifyForDisplay");return JSON.stringify(e,function(e,n){return void 0===n?t:n}).split(JSON.stringify(t)).join("")}var iY=Object.create(null);function iB(e){var t=JSON.stringify(e);return iY[t]||(iY[t]=Object.create(null))}function iU(e){var t=iB(e);return t.keyFieldsFn||(t.keyFieldsFn=function(t,n){var r=function(e,t){return n.readField(t,e)},i=n.keyObject=i$(e,function(e){var i=iW(n.storeObject,e,r);return void 0===i&&t!==n.storeObject&&ic.call(t,e[0])&&(i=iW(t,e,iG)),__DEV__?(0,Q.kG)(void 0!==i,"Missing field '".concat(e.join("."),"' while extracting keyFields from ").concat(JSON.stringify(t))):(0,Q.kG)(void 0!==i,2),i});return"".concat(n.typename,":").concat(JSON.stringify(i))})}function iH(e){var t=iB(e);return t.keyArgsFn||(t.keyArgsFn=function(t,n){var r=n.field,i=n.variables,a=n.fieldName,o=JSON.stringify(i$(e,function(e){var n=e[0],a=n.charAt(0);if("@"===a){if(r&&(0,tP.O)(r.directives)){var o=n.slice(1),s=r.directives.find(function(e){return e.name.value===o}),u=s&&eZ(s,i);return u&&iW(u,e.slice(1))}return}if("$"===a){var c=n.slice(1);if(i&&ic.call(i,c)){var l=e.slice(0);return l[0]=c,iW(i,l)}return}if(t)return iW(t,e)}));return(t||"{}"!==o)&&(a+=":"+o),a})}function i$(e,t){var n=new tB;return iz(e).reduce(function(e,r){var i,a=t(r);if(void 0!==a){for(var o=r.length-1;o>=0;--o)a=((i={})[r[o]]=a,i);e=n.merge(e,a)}return e},Object.create(null))}function iz(e){var t=iB(e);if(!t.paths){var n=t.paths=[],r=[];e.forEach(function(t,i){(0,tP.k)(t)?(iz(t).forEach(function(e){return n.push(r.concat(e))}),r.length=0):(r.push(t),(0,tP.k)(e[i+1])||(n.push(r.slice(0)),r.length=0))})}return t.paths}function iG(e,t){return e[t]}function iW(e,t,n){return n=n||iG,iK(t.reduce(function e(t,r){return(0,tP.k)(t)?t.map(function(t){return e(t,r)}):t&&n(t,r)},e))}function iK(e){return(0,eO.s)(e)?(0,tP.k)(e)?e.map(iK):i$(Object.keys(e).sort(),function(t){return iW(e,t)}):e}function iV(e){return void 0!==e.args?e.args:e.field?eZ(e.field,e.variables):null}eK.setStringify(nx);var iq=function(){},iZ=function(e,t){return t.fieldName},iX=function(e,t,n){return(0,n.mergeObjects)(e,t)},iJ=function(e,t){return t},iQ=function(){function e(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=(0,en.pi)({dataIdFromObject:id},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return e.prototype.identify=function(e,t){var n,r,i=this,a=t&&(t.typename||(null===(n=t.storeObject)||void 0===n?void 0:n.__typename))||e.__typename;if(a===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var o=t&&t.storeObject||e,s=(0,en.pi)((0,en.pi)({},t),{typename:a,storeObject:o,readField:t&&t.readField||function(){var e=i0(arguments,o);return i.readField(e,{store:i.cache.data,variables:e.variables})}}),u=a&&this.getTypePolicy(a),c=u&&u.keyFn||this.config.dataIdFromObject;c;){var l=c((0,en.pi)((0,en.pi)({},e),o),s);if((0,tP.k)(l))c=iU(l);else{r=l;break}}return r=r?String(r):void 0,s.keyObject?[r,s.keyObject]:[r]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach(function(n){var r=e[n],i=r.queryType,a=r.mutationType,o=r.subscriptionType,s=(0,en._T)(r,["queryType","mutationType","subscriptionType"]);i&&t.setRootTypename("Query",n),a&&t.setRootTypename("Mutation",n),o&&t.setRootTypename("Subscription",n),ic.call(t.toBeAdded,n)?t.toBeAdded[n].push(s):t.toBeAdded[n]=[s]})},e.prototype.updateTypePolicy=function(e,t){var n=this,r=this.getTypePolicy(e),i=t.keyFields,a=t.fields;function o(e,t){e.merge="function"==typeof t?t:!0===t?iX:!1===t?iJ:e.merge}o(r,t.merge),r.keyFn=!1===i?iq:(0,tP.k)(i)?iU(i):"function"==typeof i?i:r.keyFn,a&&Object.keys(a).forEach(function(t){var r=n.getFieldPolicy(e,t,!0),i=a[t];if("function"==typeof i)r.read=i;else{var s=i.keyArgs,u=i.read,c=i.merge;r.keyFn=!1===s?iZ:(0,tP.k)(s)?iH(s):"function"==typeof s?s:r.keyFn,"function"==typeof u&&(r.read=u),o(r,c)}r.read&&r.merge&&(r.keyFn=r.keyFn||iZ)})},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var n="ROOT_"+e.toUpperCase(),r=this.rootTypenamesById[n];t!==r&&(__DEV__?(0,Q.kG)(!r||r===e,"Cannot change root ".concat(e," __typename more than once")):(0,Q.kG)(!r||r===e,3),r&&delete this.rootIdsByTypename[r],this.rootIdsByTypename[t]=n,this.rootTypenamesById[n]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach(function(n){t.getSupertypeSet(n,!0),e[n].forEach(function(e){t.getSupertypeSet(e,!0).add(n);var r=e.match(ig);r&&r[0]===e||t.fuzzySubtypes.set(e,RegExp(e))})})},e.prototype.getTypePolicy=function(e){var t=this;if(!ic.call(this.typePolicies,e)){var n=this.typePolicies[e]=Object.create(null);n.fields=Object.create(null);var r=this.supertypeMap.get(e);r&&r.size&&r.forEach(function(e){var r=t.getTypePolicy(e),i=r.fields;Object.assign(n,(0,en._T)(r,["fields"])),Object.assign(n.fields,i)})}var i=this.toBeAdded[e];return i&&i.length&&i.splice(0).forEach(function(n){t.updateTypePolicy(e,n)}),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t,n){if(e){var r=this.getTypePolicy(e).fields;return r[t]||n&&(r[t]=Object.create(null))}},e.prototype.getSupertypeSet=function(e,t){var n=this.supertypeMap.get(e);return!n&&t&&this.supertypeMap.set(e,n=new Set),n},e.prototype.fragmentMatches=function(e,t,n,r){var i=this;if(!e.typeCondition)return!0;if(!t)return!1;var a=e.typeCondition.name.value;if(t===a)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(a))for(var o=this.getSupertypeSet(t,!0),s=[o],u=function(e){var t=i.getSupertypeSet(e,!1);t&&t.size&&0>s.indexOf(t)&&s.push(t)},c=!!(n&&this.fuzzySubtypes.size),l=!1,f=0;f1?a:t}:(r=(0,en.pi)({},i),ic.call(r,"from")||(r.from=t)),__DEV__&&void 0===r.from&&__DEV__&&Q.kG.warn("Undefined 'from' passed to readField with arguments ".concat(iF(Array.from(e)))),void 0===r.variables&&(r.variables=n),r}function i2(e){return function(t,n){if((0,tP.k)(t)||(0,tP.k)(n))throw __DEV__?new Q.ej("Cannot automatically merge arrays"):new Q.ej(4);if((0,eO.s)(t)&&(0,eO.s)(n)){var r=e.getFieldValue(t,"__typename"),i=e.getFieldValue(n,"__typename");if(r&&i&&r!==i)return n;if(eD(t)&&iw(n))return e.merge(t.__ref,n),t;if(iw(t)&&eD(n))return e.merge(t,n.__ref),n;if(iw(t)&&iw(n))return(0,en.pi)((0,en.pi)({},t),n)}return n}}function i3(e,t,n){var r="".concat(t).concat(n),i=e.flavors.get(r);return i||e.flavors.set(r,i=e.clientOnly===t&&e.deferred===n?e:(0,en.pi)((0,en.pi)({},e),{clientOnly:t,deferred:n})),i}var i4=function(){function e(e,t,n){this.cache=e,this.reader=t,this.fragments=n}return e.prototype.writeToStore=function(e,t){var n=this,r=t.query,i=t.result,a=t.dataId,o=t.variables,s=t.overwrite,u=e2(r),c=i_();o=(0,en.pi)((0,en.pi)({},e9(u)),o);var l=(0,en.pi)((0,en.pi)({store:e,written:Object.create(null),merge:function(e,t){return c.merge(e,t)},variables:o,varString:nx(o)},iE(r,this.fragments)),{overwrite:!!s,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),f=this.processSelectionSet({result:i||Object.create(null),dataId:a,selectionSet:u.selectionSet,mergeTree:{map:new Map},context:l});if(!eD(f))throw __DEV__?new Q.ej("Could not identify object ".concat(JSON.stringify(i))):new Q.ej(7);return l.incomingById.forEach(function(t,r){var i=t.storeObject,a=t.mergeTree,o=t.fieldNodeSet,s=eI(r);if(a&&a.map.size){var u=n.applyMerges(a,s,i,l);if(eD(u))return;i=u}if(__DEV__&&!l.overwrite){var c=Object.create(null);o.forEach(function(e){e.selectionSet&&(c[e.name.value]=!0)});var f=function(e){return!0===c[iv(e)]},d=function(e){var t=a&&a.map.get(e);return Boolean(t&&t.info&&t.info.merge)};Object.keys(i).forEach(function(e){f(e)&&!d(e)&&at(s,i,e,l.store)})}e.merge(r,i)}),e.retain(f.__ref),f},e.prototype.processSelectionSet=function(e){var t=this,n=e.dataId,r=e.result,i=e.selectionSet,a=e.context,o=e.mergeTree,s=this.cache.policies,u=Object.create(null),c=n&&s.rootTypenamesById[n]||eJ(r,i,a.fragmentMap)||n&&a.store.get(n,"__typename");"string"==typeof c&&(u.__typename=c);var l=function(){var e=i0(arguments,u,a.variables);if(eD(e.from)){var t=a.incomingById.get(e.from.__ref);if(t){var n=s.readField((0,en.pi)((0,en.pi)({},e),{from:t.storeObject}),a);if(void 0!==n)return n}}return s.readField(e,a)},f=new Set;this.flattenFields(i,r,a,c).forEach(function(e,n){var i,a=r[eX(n)];if(f.add(n),void 0!==a){var d=s.getStoreFieldName({typename:c,fieldName:n.name.value,field:n,variables:e.variables}),h=i5(o,d),p=t.processFieldValue(a,n,n.selectionSet?i3(e,!1,!1):e,h),b=void 0;n.selectionSet&&(eD(p)||iw(p))&&(b=l("__typename",p));var m=s.getMergeFunction(c,n.name.value,b);m?h.info={field:n,typename:c,merge:m}:i7(o,d),u=e.merge(u,((i={})[d]=p,i))}else __DEV__&&!e.clientOnly&&!e.deferred&&!nj.added(n)&&!s.getReadFunction(c,n.name.value)&&__DEV__&&Q.kG.error("Missing field '".concat(eX(n),"' while writing result ").concat(JSON.stringify(r,null,2)).substring(0,1e3))});try{var d=s.identify(r,{typename:c,selectionSet:i,fragmentMap:a.fragmentMap,storeObject:u,readField:l}),h=d[0],p=d[1];n=n||h,p&&(u=a.merge(u,p))}catch(b){if(!n)throw b}if("string"==typeof n){var m=eI(n),g=a.written[n]||(a.written[n]=[]);if(g.indexOf(i)>=0||(g.push(i),this.reader&&this.reader.isFresh(r,m,i,a)))return m;var v=a.incomingById.get(n);return v?(v.storeObject=a.merge(v.storeObject,u),v.mergeTree=i8(v.mergeTree,o),f.forEach(function(e){return v.fieldNodeSet.add(e)})):a.incomingById.set(n,{storeObject:u,mergeTree:i9(o)?void 0:o,fieldNodeSet:f}),m}return u},e.prototype.processFieldValue=function(e,t,n,r){var i=this;return t.selectionSet&&null!==e?(0,tP.k)(e)?e.map(function(e,a){var o=i.processFieldValue(e,t,n,i5(r,a));return i7(r,a),o}):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:n,mergeTree:r}):__DEV__?nJ(e):e},e.prototype.flattenFields=function(e,t,n,r){void 0===r&&(r=eJ(t,e,n.fragmentMap));var i=new Map,a=this.cache.policies,o=new n_(!1);return function e(s,u){var c=o.lookup(s,u.clientOnly,u.deferred);c.visited||(c.visited=!0,s.selections.forEach(function(o){if(td(o,n.variables)){var s=u.clientOnly,c=u.deferred;if(!(s&&c)&&(0,tP.O)(o.directives)&&o.directives.forEach(function(e){var t=e.name.value;if("client"===t&&(s=!0),"defer"===t){var r=eZ(e,n.variables);r&&!1===r.if||(c=!0)}}),eQ(o)){var l=i.get(o);l&&(s=s&&l.clientOnly,c=c&&l.deferred),i.set(o,i3(n,s,c))}else{var f=eC(o,n.lookupFragment);if(!f&&o.kind===nL.h.FRAGMENT_SPREAD)throw __DEV__?new Q.ej("No fragment named ".concat(o.name.value)):new Q.ej(8);f&&a.fragmentMatches(f,r,t,n.variables)&&e(f.selectionSet,i3(n,s,c))}}}))}(e,n),i},e.prototype.applyMerges=function(e,t,n,r,i){var a=this;if(e.map.size&&!eD(n)){var o,s,u=!(0,tP.k)(n)&&(eD(t)||iw(t))?t:void 0,c=n;u&&!i&&(i=[eD(u)?u.__ref:u]);var l=function(e,t){return(0,tP.k)(e)?"number"==typeof t?e[t]:void 0:r.store.getFieldValue(e,String(t))};e.map.forEach(function(e,t){var n=l(u,t),o=l(c,t);if(void 0!==o){i&&i.push(t);var f=a.applyMerges(e,n,o,r,i);f!==o&&(s=s||new Map).set(t,f),i&&(0,Q.kG)(i.pop()===t)}}),s&&(n=(0,tP.k)(c)?c.slice(0):(0,en.pi)({},c),s.forEach(function(e,t){n[t]=e}))}return e.info?this.cache.policies.runMergeFunction(t,n,e.info,r,i&&(o=r.store).getStorage.apply(o,i)):n},e}(),i6=[];function i5(e,t){var n=e.map;return n.has(t)||n.set(t,i6.pop()||{map:new Map}),n.get(t)}function i8(e,t){if(e===t||!t||i9(t))return e;if(!e||i9(e))return t;var n=e.info&&t.info?(0,en.pi)((0,en.pi)({},e.info),t.info):e.info||t.info,r=e.map.size&&t.map.size,i=r?new Map:e.map.size?e.map:t.map,a={info:n,map:i};if(r){var o=new Set(t.map.keys());e.map.forEach(function(e,n){a.map.set(n,i8(e,t.map.get(n))),o.delete(n)}),o.forEach(function(n){a.map.set(n,i8(t.map.get(n),e.map.get(n)))})}return a}function i9(e){return!e||!(e.info||e.map.size)}function i7(e,t){var n=e.map,r=n.get(t);r&&i9(r)&&(i6.push(r),n.delete(t))}var ae=new Set;function at(e,t,n,r){var i=function(e){var t=r.getFieldValue(e,n);return"object"==typeof t&&t},a=i(e);if(a){var o=i(t);if(!(!o||eD(a)||(0,nm.D)(a,o)||Object.keys(a).every(function(e){return void 0!==r.getFieldValue(o,e)}))){var s=r.getFieldValue(e,"__typename")||r.getFieldValue(t,"__typename"),u=iv(n),c="".concat(s,".").concat(u);if(!ae.has(c)){ae.add(c);var l=[];(0,tP.k)(a)||(0,tP.k)(o)||[a,o].forEach(function(e){var t=r.getFieldValue(e,"__typename");"string"!=typeof t||l.includes(t)||l.push(t)}),__DEV__&&Q.kG.warn("Cache data may be lost when replacing the ".concat(u," field of a ").concat(s," object.\n\nThis could cause additional (usually avoidable) network requests to fetch data that were otherwise cached.\n\nTo address this problem (which is not a bug in Apollo Client), ").concat(l.length?"either ensure all objects of type "+l.join(" and ")+" have an ID or a custom merge function, or ":"","define a custom merge function for the ").concat(c," field, so InMemoryCache can safely merge these objects:\n\n existing: ").concat(JSON.stringify(a).slice(0,1e3),"\n incoming: ").concat(JSON.stringify(o).slice(0,1e3),"\n\nFor more information about these options, please refer to the documentation:\n\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\n"))}}}}var an=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;return n.watches=new Set,n.typenameDocumentCache=new Map,n.makeVar=r2,n.txCount=0,n.config=ip(t),n.addTypename=!!n.config.addTypename,n.policies=new iQ({cache:n,dataIdFromObject:n.config.dataIdFromObject,possibleTypes:n.config.possibleTypes,typePolicies:n.config.typePolicies}),n.init(),n}return(0,en.ZT)(t,e),t.prototype.init=function(){var e=this.data=new iT.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()},t.prototype.resetResultCache=function(e){var t=this,n=this.storeReader,r=this.config.fragments;this.storeWriter=new i4(this,this.storeReader=new iP({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:ib(this.config),canon:e?void 0:n&&n.canon,fragments:r}),r),this.maybeBroadcastWatch=rZ(function(e,n){return t.broadcastWatch(e,n)},{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var n=e.optimistic?t.optimisticData:t.data;if(iD(n)){var r=e.optimistic,i=e.id,a=e.variables;return n.makeCacheKey(e.query,e.callback,nx({optimistic:r,id:i,variables:a}))}}}),new Set([this.data.group,this.optimisticData.group,]).forEach(function(e){return e.resetCaching()})},t.prototype.restore=function(e){return this.init(),e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).extract()},t.prototype.read=function(e){var t=e.returnPartialData,n=void 0!==t&&t;try{return this.storeReader.diffQueryAgainstStore((0,en.pi)((0,en.pi)({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:n})).result||null}catch(r){if(r instanceof is)return null;throw r}},t.prototype.write=function(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.modify=function(e){if(ic.call(e,"id")&&!e.id)return!1;var t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore((0,en.pi)((0,en.pi)({},e),{store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(e){var t=this;return this.watches.size||r0(this),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),function(){t.watches.delete(e)&&!t.watches.size&&r1(t),t.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(e){nx.reset();var t=this.optimisticData.gc();return e&&!this.txCount&&(e.resetResultCache?this.resetResultCache(e.resetResultIdentities):e.resetResultIdentities&&this.storeReader.resetCanon()),t},t.prototype.retain=function(e,t){return(t?this.optimisticData:this.data).retain(e)},t.prototype.release=function(e,t){return(t?this.optimisticData:this.data).release(e)},t.prototype.identify=function(e){if(eD(e))return e.__ref;try{return this.policies.identify(e)[0]}catch(t){__DEV__&&Q.kG.warn(t)}},t.prototype.evict=function(e){if(!e.id){if(ic.call(e,"id"))return!1;e=(0,en.pi)((0,en.pi)({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.reset=function(e){var t=this;return this.init(),nx.reset(),e&&e.discardWatches?(this.watches.forEach(function(e){return t.maybeBroadcastWatch.forget(e)}),this.watches.clear(),r1(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){var t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())},t.prototype.batch=function(e){var t,n=this,r=e.update,i=e.optimistic,a=void 0===i||i,o=e.removeOptimistic,s=e.onWatchUpdated,u=function(e){var i=n,a=i.data,o=i.optimisticData;++n.txCount,e&&(n.data=n.optimisticData=e);try{return t=r(n)}finally{--n.txCount,n.data=a,n.optimisticData=o}},c=new Set;return s&&!this.txCount&&this.broadcastWatches((0,en.pi)((0,en.pi)({},e),{onWatchUpdated:function(e){return c.add(e),!1}})),"string"==typeof a?this.optimisticData=this.optimisticData.addLayer(a,u):!1===a?u(this.data):u(),"string"==typeof o&&(this.optimisticData=this.optimisticData.removeLayer(o)),s&&c.size?(this.broadcastWatches((0,en.pi)((0,en.pi)({},e),{onWatchUpdated:function(e,t){var n=s.call(this,e,t);return!1!==n&&c.delete(e),n}})),c.size&&c.forEach(function(e){return n.maybeBroadcastWatch.dirty(e)})):this.broadcastWatches(e),t},t.prototype.performTransaction=function(e,t){return this.batch({update:e,optimistic:t||null!==t})},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.typenameDocumentCache.get(e);return t||(t=nj(e),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}return e},t.prototype.transformForLink=function(e){var t=this.config.fragments;return t?t.transform(e):e},t.prototype.broadcastWatches=function(e){var t=this;this.txCount||this.watches.forEach(function(n){return t.maybeBroadcastWatch(n,e)})},t.prototype.broadcastWatch=function(e,t){var n=e.lastDiff,r=this.diff(e);(!t||(e.optimistic&&"string"==typeof t.optimistic&&(r.fromOptimisticTransaction=!0),!t.onWatchUpdated||!1!==t.onWatchUpdated.call(this,e,r,n)))&&(n&&(0,nm.D)(n.result,r.result)||e.callback(e.lastDiff=r,n))},t}(io),ar={possibleTypes:{ApproveJobProposalSpecPayload:["ApproveJobProposalSpecSuccess","JobAlreadyExistsError","NotFoundError"],BridgePayload:["Bridge","NotFoundError"],CancelJobProposalSpecPayload:["CancelJobProposalSpecSuccess","NotFoundError"],ChainPayload:["Chain","NotFoundError"],CreateAPITokenPayload:["CreateAPITokenSuccess","InputErrors"],CreateBridgePayload:["CreateBridgeSuccess"],CreateCSAKeyPayload:["CSAKeyExistsError","CreateCSAKeySuccess"],CreateFeedsManagerChainConfigPayload:["CreateFeedsManagerChainConfigSuccess","InputErrors","NotFoundError"],CreateFeedsManagerPayload:["CreateFeedsManagerSuccess","InputErrors","NotFoundError","SingleFeedsManagerError"],CreateJobPayload:["CreateJobSuccess","InputErrors"],CreateOCR2KeyBundlePayload:["CreateOCR2KeyBundleSuccess"],CreateOCRKeyBundlePayload:["CreateOCRKeyBundleSuccess"],CreateP2PKeyPayload:["CreateP2PKeySuccess"],DeleteAPITokenPayload:["DeleteAPITokenSuccess","InputErrors"],DeleteBridgePayload:["DeleteBridgeConflictError","DeleteBridgeInvalidNameError","DeleteBridgeSuccess","NotFoundError"],DeleteCSAKeyPayload:["DeleteCSAKeySuccess","NotFoundError"],DeleteFeedsManagerChainConfigPayload:["DeleteFeedsManagerChainConfigSuccess","NotFoundError"],DeleteJobPayload:["DeleteJobSuccess","NotFoundError"],DeleteOCR2KeyBundlePayload:["DeleteOCR2KeyBundleSuccess","NotFoundError"],DeleteOCRKeyBundlePayload:["DeleteOCRKeyBundleSuccess","NotFoundError"],DeleteP2PKeyPayload:["DeleteP2PKeySuccess","NotFoundError"],DeleteVRFKeyPayload:["DeleteVRFKeySuccess","NotFoundError"],DismissJobErrorPayload:["DismissJobErrorSuccess","NotFoundError"],Error:["CSAKeyExistsError","DeleteBridgeConflictError","DeleteBridgeInvalidNameError","InputError","JobAlreadyExistsError","NotFoundError","RunJobCannotRunError","SingleFeedsManagerError"],EthTransactionPayload:["EthTransaction","NotFoundError"],FeaturesPayload:["Features"],FeedsManagerPayload:["FeedsManager","NotFoundError"],GetSQLLoggingPayload:["SQLLogging"],GlobalLogLevelPayload:["GlobalLogLevel"],JobPayload:["Job","NotFoundError"],JobProposalPayload:["JobProposal","NotFoundError"],JobRunPayload:["JobRun","NotFoundError"],JobSpec:["BlockHeaderFeederSpec","BlockhashStoreSpec","BootstrapSpec","CronSpec","DirectRequestSpec","FluxMonitorSpec","GatewaySpec","KeeperSpec","OCR2Spec","OCRSpec","StandardCapabilitiesSpec","VRFSpec","WebhookSpec","WorkflowSpec"],NodePayload:["Node","NotFoundError"],PaginatedPayload:["BridgesPayload","ChainsPayload","EthTransactionAttemptsPayload","EthTransactionsPayload","JobRunsPayload","JobsPayload","NodesPayload"],RejectJobProposalSpecPayload:["NotFoundError","RejectJobProposalSpecSuccess"],RunJobPayload:["NotFoundError","RunJobCannotRunError","RunJobSuccess"],SetGlobalLogLevelPayload:["InputErrors","SetGlobalLogLevelSuccess"],SetSQLLoggingPayload:["SetSQLLoggingSuccess"],SetServicesLogLevelsPayload:["InputErrors","SetServicesLogLevelsSuccess"],UpdateBridgePayload:["NotFoundError","UpdateBridgeSuccess"],UpdateFeedsManagerChainConfigPayload:["InputErrors","NotFoundError","UpdateFeedsManagerChainConfigSuccess"],UpdateFeedsManagerPayload:["InputErrors","NotFoundError","UpdateFeedsManagerSuccess"],UpdateJobProposalSpecDefinitionPayload:["NotFoundError","UpdateJobProposalSpecDefinitionSuccess"],UpdatePasswordPayload:["InputErrors","UpdatePasswordSuccess"],VRFKeyPayload:["NotFoundError","VRFKeySuccess"]}};let ai=ar;var aa=(r=void 0,location.origin),ao=new nh({uri:"".concat(aa,"/query"),credentials:"include"}),as=new ia({cache:new an({possibleTypes:ai.possibleTypes}),link:ao});if(a.Z.locale(o),u().defaultFormat="YYYY-MM-DD h:mm:ss A","undefined"!=typeof document){var au,ac,al=f().hydrate;ac=X,al(c.createElement(et,{client:as},c.createElement(d.zj,null,c.createElement(i.MuiThemeProvider,{theme:J.r},c.createElement(ac,null)))),document.getElementById("root"))}})()})(); \ No newline at end of file diff --git a/core/web/assets/main.026013f04da39527a75d.js.gz b/core/web/assets/main.6f07a88cfc748f57e21d.js.gz similarity index 94% rename from core/web/assets/main.026013f04da39527a75d.js.gz rename to core/web/assets/main.6f07a88cfc748f57e21d.js.gz index 8524ee8d01a..1a833982299 100644 Binary files a/core/web/assets/main.026013f04da39527a75d.js.gz and b/core/web/assets/main.6f07a88cfc748f57e21d.js.gz differ diff --git a/core/web/auth/auth_test.go b/core/web/auth/auth_test.go index 9896a2e359a..25479409545 100644 --- a/core/web/auth/auth_test.go +++ b/core/web/auth/auth_test.go @@ -274,19 +274,24 @@ var routesRolesMap = [...]routeRules{ {"POST", "/v2/keys/p2p/export/MOCK", false, false, false}, {"GET", "/v2/keys/solana", true, true, true}, {"GET", "/v2/keys/cosmos", true, true, true}, - {"GET", "/v2/keys/dkgsign", true, true, true}, + {"GET", "/v2/keys/starknet", true, true, true}, + {"GET", "/v2/keys/aptos", true, true, true}, {"POST", "/v2/keys/solana", false, false, true}, {"POST", "/v2/keys/cosmos", false, false, true}, - {"POST", "/v2/keys/dkgsign", false, false, true}, + {"POST", "/v2/keys/starknet", false, false, true}, + {"POST", "/v2/keys/aptos", false, false, true}, {"DELETE", "/v2/keys/solana/MOCK", false, false, false}, {"DELETE", "/v2/keys/cosmos/MOCK", false, false, false}, - {"DELETE", "/v2/keys/dkgsign/MOCK", false, false, false}, + {"DELETE", "/v2/keys/starknet/MOCK", false, false, false}, + {"DELETE", "/v2/keys/aptos/MOCK", false, false, false}, {"POST", "/v2/keys/solana/import", false, false, false}, {"POST", "/v2/keys/cosmos/import", false, false, false}, - {"POST", "/v2/keys/dkgsign/import", false, false, false}, + {"POST", "/v2/keys/starknet/import", false, false, false}, + {"POST", "/v2/keys/aptos/import", false, false, false}, {"POST", "/v2/keys/solana/export/MOCK", false, false, false}, {"POST", "/v2/keys/cosmos/export/MOCK", false, false, false}, - {"POST", "/v2/keys/dkgsign/export/MOCK", false, false, false}, + {"POST", "/v2/keys/starknet/export/MOCK", false, false, false}, + {"POST", "/v2/keys/aptos/export/MOCK", false, false, false}, {"GET", "/v2/keys/vrf", true, true, true}, {"POST", "/v2/keys/vrf", false, false, true}, {"DELETE", "/v2/keys/vrf/MOCK", false, false, false}, diff --git a/core/web/dkgencrypt_keys_controller.go b/core/web/dkgencrypt_keys_controller.go deleted file mode 100644 index 5bd6fe2f347..00000000000 --- a/core/web/dkgencrypt_keys_controller.go +++ /dev/null @@ -1,17 +0,0 @@ -package web - -import ( - "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/dkgencryptkey" - "github.com/smartcontractkit/chainlink/v2/core/web/presenters" -) - -func NewDKGEncryptKeysController(app chainlink.Application) KeysController { - return NewKeysController[dkgencryptkey.Key, presenters.DKGEncryptKeyResource]( - app.GetKeyStore().DKGEncrypt(), - app.GetLogger(), - app.GetAuditLogger(), - "dkgencryptKey", - presenters.NewDKGEncryptKeyResource, - presenters.NewDKGEncryptKeyResources) -} diff --git a/core/web/dkgencrypt_keys_controller_test.go b/core/web/dkgencrypt_keys_controller_test.go deleted file mode 100644 index 0f4344fdc23..00000000000 --- a/core/web/dkgencrypt_keys_controller_test.go +++ /dev/null @@ -1,109 +0,0 @@ -package web_test - -import ( - "fmt" - "net/http" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "github.com/smartcontractkit/chainlink-common/pkg/utils" - "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" - "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore" - "github.com/smartcontractkit/chainlink/v2/core/web" - "github.com/smartcontractkit/chainlink/v2/core/web/presenters" -) - -func TestDKGEncryptKeysController_Index_HappyPath(t *testing.T) { - t.Parallel() - - client, keyStore := setupDKGEncryptKeysControllerTests(t) - keys, _ := keyStore.DKGEncrypt().GetAll() - - response, cleanup := client.Get("/v2/keys/dkgencrypt") - t.Cleanup(cleanup) - cltest.AssertServerResponse(t, response, http.StatusOK) - - resources := []presenters.DKGEncryptKeyResource{} - err := web.ParseJSONAPIResponse(cltest.ParseResponseBody(t, response), &resources) - assert.NoError(t, err) - - assert.Len(t, resources, len(keys)) - - assert.Equal(t, keys[0].ID(), resources[0].ID) - assert.Equal(t, keys[0].PublicKeyString(), resources[0].PublicKey) -} - -func TestDKGEncryptKeysController_Create_HappyPath(t *testing.T) { - t.Parallel() - - client, keyStore := setupDKGEncryptKeysControllerTests(t) - - response, cleanup := client.Post("/v2/keys/dkgencrypt", nil) - t.Cleanup(cleanup) - cltest.AssertServerResponse(t, response, http.StatusOK) - - keys, _ := keyStore.DKGEncrypt().GetAll() - assert.Len(t, keys, 2) - - resource := presenters.DKGEncryptKeyResource{} - err := web.ParseJSONAPIResponse(cltest.ParseResponseBody(t, response), &resource) - assert.NoError(t, err) - - // the order in which keys are returned by GetAll is non-deterministic - // due to map iteration non-determinism. - found := false - for _, key := range keys { - if key.ID() == resource.ID { - assert.Equal(t, key.PublicKeyString(), resource.PublicKey) - found = true - } - } - assert.True(t, found) - - _, err = keyStore.DKGEncrypt().Get(resource.ID) - assert.NoError(t, err) -} - -func TestDKGEncryptKeysController_Delete_NonExistentDKGEncryptKeyID(t *testing.T) { - t.Parallel() - - client, _ := setupDKGEncryptKeysControllerTests(t) - - response, cleanup := client.Delete("/v2/keys/dkgencrypt/" + "nonexistentKey") - t.Cleanup(cleanup) - assert.Equal(t, http.StatusNotFound, response.StatusCode) -} - -func TestDKGEncryptKeysController_Delete_HappyPath(t *testing.T) { - t.Parallel() - - client, keyStore := setupDKGEncryptKeysControllerTests(t) - - keys, _ := keyStore.DKGEncrypt().GetAll() - initialLength := len(keys) - - response, cleanup := client.Delete(fmt.Sprintf("/v2/keys/dkgencrypt/%s", keys[0].ID())) - t.Cleanup(cleanup) - cltest.AssertServerResponse(t, response, http.StatusOK) - assert.Error(t, utils.JustError(keyStore.DKGEncrypt().Get(keys[0].ID()))) - - afterKeys, err := keyStore.DKGEncrypt().GetAll() - assert.NoError(t, err) - assert.Equal(t, initialLength-1, len(afterKeys)) -} - -func setupDKGEncryptKeysControllerTests(t *testing.T) (cltest.HTTPClientCleaner, keystore.Master) { - t.Helper() - - app := cltest.NewApplication(t) - ctx := testutils.Context(t) - require.NoError(t, app.Start(ctx)) - require.NoError(t, app.KeyStore.DKGEncrypt().Add(ctx, cltest.DefaultDKGEncryptKey)) - - client := app.NewHTTPClient(nil) - - return client, app.GetKeyStore() -} diff --git a/core/web/dkgsign_keys_controller.go b/core/web/dkgsign_keys_controller.go deleted file mode 100644 index 39cebb03030..00000000000 --- a/core/web/dkgsign_keys_controller.go +++ /dev/null @@ -1,17 +0,0 @@ -package web - -import ( - "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/dkgsignkey" - "github.com/smartcontractkit/chainlink/v2/core/web/presenters" -) - -func NewDKGSignKeysController(app chainlink.Application) KeysController { - return NewKeysController[dkgsignkey.Key, presenters.DKGSignKeyResource]( - app.GetKeyStore().DKGSign(), - app.GetLogger(), - app.GetAuditLogger(), - "dkgsignKey", - presenters.NewDKGSignKeyResource, - presenters.NewDKGSignKeyResources) -} diff --git a/core/web/dkgsign_keys_controller_test.go b/core/web/dkgsign_keys_controller_test.go deleted file mode 100644 index 01b8489c0b8..00000000000 --- a/core/web/dkgsign_keys_controller_test.go +++ /dev/null @@ -1,109 +0,0 @@ -package web_test - -import ( - "fmt" - "net/http" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "github.com/smartcontractkit/chainlink-common/pkg/utils" - "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" - "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore" - "github.com/smartcontractkit/chainlink/v2/core/web" - "github.com/smartcontractkit/chainlink/v2/core/web/presenters" -) - -func TestDKGSignKeysController_Index_HappyPath(t *testing.T) { - t.Parallel() - - client, keyStore := setupDKGSignKeysControllerTests(t) - keys, _ := keyStore.DKGSign().GetAll() - - response, cleanup := client.Get("/v2/keys/dkgsign") - t.Cleanup(cleanup) - cltest.AssertServerResponse(t, response, http.StatusOK) - - resources := []presenters.DKGSignKeyResource{} - err := web.ParseJSONAPIResponse(cltest.ParseResponseBody(t, response), &resources) - assert.NoError(t, err) - - assert.Len(t, resources, len(keys)) - - assert.Equal(t, keys[0].ID(), resources[0].ID) - assert.Equal(t, keys[0].PublicKeyString(), resources[0].PublicKey) -} - -func TestDKGSignKeysController_Create_HappyPath(t *testing.T) { - t.Parallel() - - client, keyStore := setupDKGSignKeysControllerTests(t) - - response, cleanup := client.Post("/v2/keys/dkgsign", nil) - t.Cleanup(cleanup) - cltest.AssertServerResponse(t, response, http.StatusOK) - - keys, _ := keyStore.DKGSign().GetAll() - assert.Len(t, keys, 2) - - resource := presenters.DKGSignKeyResource{} - err := web.ParseJSONAPIResponse(cltest.ParseResponseBody(t, response), &resource) - assert.NoError(t, err) - - // the order in which keys are returned by GetAll is non-deterministic - // due to map iteration non-determinism. - found := false - for _, key := range keys { - if key.ID() == resource.ID { - assert.Equal(t, key.PublicKeyString(), resource.PublicKey) - found = true - } - } - assert.True(t, found) - - _, err = keyStore.DKGSign().Get(resource.ID) - assert.NoError(t, err) -} - -func TestDKGSignKeysController_Delete_NonExistentDKGSignKeyID(t *testing.T) { - t.Parallel() - - client, _ := setupDKGSignKeysControllerTests(t) - - response, cleanup := client.Delete("/v2/keys/dkgsign/" + "nonexistentKey") - t.Cleanup(cleanup) - assert.Equal(t, http.StatusNotFound, response.StatusCode) -} - -func TestDKGSignKeysController_Delete_HappyPath(t *testing.T) { - t.Parallel() - - client, keyStore := setupDKGSignKeysControllerTests(t) - - keys, _ := keyStore.DKGSign().GetAll() - initialLength := len(keys) - - response, cleanup := client.Delete(fmt.Sprintf("/v2/keys/dkgsign/%s", keys[0].ID())) - t.Cleanup(cleanup) - cltest.AssertServerResponse(t, response, http.StatusOK) - assert.Error(t, utils.JustError(keyStore.DKGSign().Get(keys[0].ID()))) - - afterKeys, err := keyStore.DKGSign().GetAll() - assert.NoError(t, err) - assert.Equal(t, initialLength-1, len(afterKeys)) -} - -func setupDKGSignKeysControllerTests(t *testing.T) (cltest.HTTPClientCleaner, keystore.Master) { - t.Helper() - - app := cltest.NewApplication(t) - ctx := testutils.Context(t) - require.NoError(t, app.Start(ctx)) - require.NoError(t, app.KeyStore.DKGSign().Add(ctx, cltest.DefaultDKGSignKey)) - - client := app.NewHTTPClient(nil) - - return client, app.GetKeyStore() -} diff --git a/core/web/jobs_controller_test.go b/core/web/jobs_controller_test.go index 0401dbdb8c8..60abe61537f 100644 --- a/core/web/jobs_controller_test.go +++ b/core/web/jobs_controller_test.go @@ -28,6 +28,7 @@ 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" + 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" @@ -270,6 +271,25 @@ func TestJobController_Create_HappyPath(t *testing.T) { require.Equal(t, "CRON_TZ=UTC * 0 0 1 1 *", jb.CronSpec.CronSchedule) }, }, + { + name: "cron-evm-chain-id", + tomlTemplate: func(nameAndExternalJobID string) string { + return fmt.Sprintf(testspecs.CronSpecEVMChainIDTemplate, nameAndExternalJobID) + }, + assertion: func(t *testing.T, nameAndExternalJobID string, r *http.Response) { + require.Equal(t, http.StatusOK, r.StatusCode) + resource := presenters.JobResource{} + err := web.ParseJSONAPIResponse(cltest.ParseResponseBody(t, r), &resource) + assert.NoError(t, err) + + jb, err := jorm.FindJob(testutils.Context(t), mustInt32FromString(t, resource.ID)) + require.NoError(t, err) + require.NotNil(t, jb.CronSpec) + + assert.NotNil(t, resource.PipelineSpec.DotDAGSource) + require.Equal(t, ubig.NewI(42), jb.CronSpec.EVMChainID) + }, + }, { name: "directrequest", tomlTemplate: func(nameAndExternalJobID string) string { @@ -464,6 +484,7 @@ targets: t.Run(c.name, func(t *testing.T) { nameAndExternalJobID := uuid.New().String() toml := c.tomlTemplate(nameAndExternalJobID) + t.Log("Job toml:", toml) body, err := json.Marshal(web.CreateJobRequest{ TOML: toml, }) diff --git a/core/web/presenters/aptos_key.go b/core/web/presenters/aptos_key.go new file mode 100644 index 00000000000..6460c325f97 --- /dev/null +++ b/core/web/presenters/aptos_key.go @@ -0,0 +1,32 @@ +package presenters + +import "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/aptoskey" + +// AptosKeyResource represents a Aptos key JSONAPI resource. +type AptosKeyResource struct { + JAID + PubKey string `json:"publicKey"` +} + +// GetName implements the api2go EntityNamer interface +func (AptosKeyResource) GetName() string { + return "encryptedAptosKeys" +} + +func NewAptosKeyResource(key aptoskey.Key) *AptosKeyResource { + r := &AptosKeyResource{ + JAID: JAID{ID: key.ID()}, + PubKey: key.PublicKeyStr(), + } + + return r +} + +func NewAptosKeyResources(keys []aptoskey.Key) []AptosKeyResource { + rs := []AptosKeyResource{} + for _, key := range keys { + rs = append(rs, *NewAptosKeyResource(key)) + } + + return rs +} diff --git a/core/web/presenters/dkgencrypt_key.go b/core/web/presenters/dkgencrypt_key.go deleted file mode 100644 index ae715b79048..00000000000 --- a/core/web/presenters/dkgencrypt_key.go +++ /dev/null @@ -1,38 +0,0 @@ -package presenters - -import ( - "github.com/manyminds/api2go/jsonapi" - - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/dkgencryptkey" -) - -// DKGEncryptKeyResource is just that. -type DKGEncryptKeyResource struct { - JAID - PublicKey string `json:"publicKey"` -} - -var _ jsonapi.EntityNamer = DKGEncryptKeyResource{} - -// GetName implements jsonapi.EntityNamer -func (DKGEncryptKeyResource) GetName() string { - return "encryptedDKGEncryptKeys" -} - -// NewDKGEncryptKeyResource creates a new DKGEncryptKeyResource from the given DKG sign key. -func NewDKGEncryptKeyResource(key dkgencryptkey.Key) *DKGEncryptKeyResource { - return &DKGEncryptKeyResource{ - JAID: JAID{ - ID: key.ID(), - }, - PublicKey: key.PublicKeyString(), - } -} - -// NewDKGEncryptKeyResources creates many DKGEncryptKeyResource objects from the given DKG sign keys. -func NewDKGEncryptKeyResources(keys []dkgencryptkey.Key) (resources []DKGEncryptKeyResource) { - for _, key := range keys { - resources = append(resources, *NewDKGEncryptKeyResource(key)) - } - return -} diff --git a/core/web/presenters/dkgsign_key.go b/core/web/presenters/dkgsign_key.go deleted file mode 100644 index e6aa95ff314..00000000000 --- a/core/web/presenters/dkgsign_key.go +++ /dev/null @@ -1,38 +0,0 @@ -package presenters - -import ( - "github.com/manyminds/api2go/jsonapi" - - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/dkgsignkey" -) - -// DKGSignKeyResource is just that. -type DKGSignKeyResource struct { - JAID - PublicKey string `json:"publicKey"` -} - -var _ jsonapi.EntityNamer = DKGSignKeyResource{} - -// GetName implements jsonapi.EntityNamer -func (DKGSignKeyResource) GetName() string { - return "encryptedDKGSignKeys" -} - -// NewDKGSignKeyResource creates a new DKGSignKeyResource from the given DKG sign key. -func NewDKGSignKeyResource(key dkgsignkey.Key) *DKGSignKeyResource { - return &DKGSignKeyResource{ - JAID: JAID{ - ID: key.ID(), - }, - PublicKey: key.PublicKeyString(), - } -} - -// NewDKGSignKeyResources creates many DKGSignKeyResource objects from the given DKG sign keys. -func NewDKGSignKeyResources(keys []dkgsignkey.Key) (resources []DKGSignKeyResource) { - for _, key := range keys { - resources = append(resources, *NewDKGSignKeyResource(key)) - } - return -} diff --git a/core/web/presenters/job.go b/core/web/presenters/job.go index 8d7dab626cb..ad6bf617a82 100644 --- a/core/web/presenters/job.go +++ b/core/web/presenters/job.go @@ -252,9 +252,10 @@ func NewWebhookSpec(spec *job.WebhookSpec) *WebhookSpec { // CronSpec defines the spec details of a Cron Job type CronSpec struct { - CronSchedule string `json:"schedule" tom:"schedule"` + CronSchedule string `json:"schedule"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` + EVMChainID *big.Big `json:"evmChainID"` } // NewCronSpec generates a new CronSpec from a job.CronSpec @@ -263,6 +264,7 @@ func NewCronSpec(spec *job.CronSpec) *CronSpec { CronSchedule: spec.CronSchedule, CreatedAt: spec.CreatedAt, UpdatedAt: spec.UpdatedAt, + EVMChainID: spec.EVMChainID, } } diff --git a/core/web/presenters/job_test.go b/core/web/presenters/job_test.go index 80856daa8ef..5de71f918e3 100644 --- a/core/web/presenters/job_test.go +++ b/core/web/presenters/job_test.go @@ -374,6 +374,7 @@ func TestJob(t *testing.T) { CronSchedule: cronSchedule, CreatedAt: timestamp, UpdatedAt: timestamp, + EVMChainID: evmChainID, }, ExternalJobID: uuid.MustParse("0EEC7E1D-D0D2-476C-A1A8-72DFB6633F46"), PipelineSpec: &pipeline.Spec{ @@ -404,7 +405,8 @@ func TestJob(t *testing.T) { "cronSpec": { "schedule": "%s", "createdAt":"2000-01-01T00:00:00Z", - "updatedAt":"2000-01-01T00:00:00Z" + "updatedAt":"2000-01-01T00:00:00Z", + "evmChainID":"42" }, "fluxMonitorSpec": null, "gasLimit": null, diff --git a/core/web/resolver/mutation.go b/core/web/resolver/mutation.go index 288d8133db7..4da5b1da651 100644 --- a/core/web/resolver/mutation.go +++ b/core/web/resolver/mutation.go @@ -37,6 +37,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/validate" "github.com/smartcontractkit/chainlink/v2/core/services/ocrbootstrap" "github.com/smartcontractkit/chainlink/v2/core/services/standardcapabilities" + "github.com/smartcontractkit/chainlink/v2/core/services/streams" "github.com/smartcontractkit/chainlink/v2/core/services/vrf/vrfcommon" "github.com/smartcontractkit/chainlink/v2/core/services/webhook" "github.com/smartcontractkit/chainlink/v2/core/services/workflows" @@ -1063,6 +1064,8 @@ func (r *Resolver) CreateJob(ctx context.Context, args struct { jb, err = workflows.ValidatedWorkflowJobSpec(args.Input.TOML) case job.StandardCapabilities: jb, err = standardcapabilities.ValidatedStandardCapabilitiesSpec(args.Input.TOML) + case job.Stream: + jb, err = streams.ValidatedStreamSpec(args.Input.TOML) default: return NewCreateJobPayload(r.App, nil, map[string]string{ "Job Type": fmt.Sprintf("unknown job type: %s", jbt), diff --git a/core/web/resolver/ocr2_keys.go b/core/web/resolver/ocr2_keys.go index df184109331..d04ebbd0e2f 100644 --- a/core/web/resolver/ocr2_keys.go +++ b/core/web/resolver/ocr2_keys.go @@ -25,6 +25,8 @@ const ( OCR2ChainTypeSolana = "SOLANA" // OCR2ChainTypeStarkNet defines OCR2 StarkNet Chain Type OCR2ChainTypeStarkNet = "STARKNET" + // OCRChainTypeAptos defines OCR Aptos Chain Type + OCRChainTypeAptos = "APTOS" ) // ToOCR2ChainType turns a valid string into a OCR2ChainType @@ -38,6 +40,8 @@ func ToOCR2ChainType(s string) (OCR2ChainType, error) { return OCR2ChainTypeSolana, nil case string(chaintype.StarkNet): return OCR2ChainTypeStarkNet, nil + case string(chaintype.Aptos): + return OCRChainTypeAptos, nil default: return "", errors.New("unknown ocr2 chain type") } @@ -54,6 +58,8 @@ func FromOCR2ChainType(ct OCR2ChainType) string { return string(chaintype.Solana) case OCR2ChainTypeStarkNet: return string(chaintype.StarkNet) + case OCRChainTypeAptos: + return string(chaintype.Aptos) default: return strings.ToLower(string(ct)) } diff --git a/core/web/resolver/ocr2_keys_test.go b/core/web/resolver/ocr2_keys_test.go index 2269149bc37..033d22799b1 100644 --- a/core/web/resolver/ocr2_keys_test.go +++ b/core/web/resolver/ocr2_keys_test.go @@ -41,6 +41,7 @@ func TestResolver_GetOCR2KeyBundles(t *testing.T) { ocr2key.MustNewInsecure(keystest.NewRandReaderFromSeed(1), "cosmos"), ocr2key.MustNewInsecure(keystest.NewRandReaderFromSeed(1), "solana"), ocr2key.MustNewInsecure(keystest.NewRandReaderFromSeed(1), "starknet"), + ocr2key.MustNewInsecure(keystest.NewRandReaderFromSeed(1), "aptos"), } expectedBundles := []map[string]interface{}{} for _, k := range fakeKeys { diff --git a/core/web/resolver/spec.go b/core/web/resolver/spec.go index b3c22b3b342..00b2442acab 100644 --- a/core/web/resolver/spec.go +++ b/core/web/resolver/spec.go @@ -141,6 +141,17 @@ func (r *CronSpecResolver) Schedule() string { return r.spec.CronSchedule } +// EVMChainID resolves the spec's evm chain id. +func (r *CronSpecResolver) EVMChainID() *string { + if r.spec.EVMChainID == nil { + return nil + } + + chainID := r.spec.EVMChainID.String() + + return &chainID +} + // CreatedAt resolves the spec's created at timestamp. func (r *CronSpecResolver) CreatedAt() graphql.Time { return graphql.Time{Time: r.spec.CreatedAt} diff --git a/core/web/resolver/spec_test.go b/core/web/resolver/spec_test.go index 2d5dcc71d1f..69d6a56509c 100644 --- a/core/web/resolver/spec_test.go +++ b/core/web/resolver/spec_test.go @@ -42,6 +42,7 @@ func TestResolver_CronSpec(t *testing.T) { Type: job.Cron, CronSpec: &job.CronSpec{ CronSchedule: "CRON_TZ=UTC 0 0 1 1 *", + EVMChainID: ubig.NewI(42), CreatedAt: f.Timestamp(), }, }, nil) @@ -54,6 +55,7 @@ func TestResolver_CronSpec(t *testing.T) { __typename ... on CronSpec { schedule + evmChainID createdAt } } @@ -67,6 +69,7 @@ func TestResolver_CronSpec(t *testing.T) { "spec": { "__typename": "CronSpec", "schedule": "CRON_TZ=UTC 0 0 1 1 *", + "evmChainID": "42", "createdAt": "2021-01-01T00:00:00Z" } } diff --git a/core/web/resolver/testdata/config-empty-effective.toml b/core/web/resolver/testdata/config-empty-effective.toml index 7ee0143870f..1bad3fd91c6 100644 --- a/core/web/resolver/testdata/config-empty-effective.toml +++ b/core/web/resolver/testdata/config-empty-effective.toml @@ -222,6 +222,8 @@ Mode = 'tls' TLSCertPath = '' [Mercury] +VerboseLogging = false + [Mercury.Cache] LatestReportTTL = '1s' MaxStaleAge = '1h0m0s' diff --git a/core/web/resolver/testdata/config-full.toml b/core/web/resolver/testdata/config-full.toml index d69f0aa5064..3e083bd1844 100644 --- a/core/web/resolver/testdata/config-full.toml +++ b/core/web/resolver/testdata/config-full.toml @@ -232,6 +232,8 @@ env = 'dev' test = 'load' [Mercury] +VerboseLogging = true + [Mercury.Cache] LatestReportTTL = '1m40s' MaxStaleAge = '1m41s' @@ -287,6 +289,7 @@ NoNewHeadsThreshold = '1m0s' OperatorFactoryAddress = '0xa5B85635Be42F21f94F28034B7DA440EeFF0F418' RPCDefaultBatchSize = 17 RPCBlockQueryDelay = 10 +FinalizedBlockOffset = 0 [EVM.Transactions] ForwardersEnabled = true @@ -356,6 +359,8 @@ SyncThreshold = 13 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [EVM.NodePool.Errors] NonceTooLow = '(: |^)nonce too low' diff --git a/core/web/resolver/testdata/config-multi-chain-effective.toml b/core/web/resolver/testdata/config-multi-chain-effective.toml index 13aac2db7fa..f391804b7cd 100644 --- a/core/web/resolver/testdata/config-multi-chain-effective.toml +++ b/core/web/resolver/testdata/config-multi-chain-effective.toml @@ -222,6 +222,8 @@ Mode = 'tls' TLSCertPath = '' [Mercury] +VerboseLogging = false + [Mercury.Cache] LatestReportTTL = '1s' MaxStaleAge = '1h0m0s' @@ -274,6 +276,7 @@ NoNewHeadsThreshold = '3m0s' OperatorFactoryAddress = '0x3E64Cd889482443324F91bFA9c84fE72A511f48A' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [EVM.Transactions] ForwardersEnabled = false @@ -328,6 +331,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [EVM.OCR] ContractConfirmations = 4 @@ -370,6 +375,7 @@ NoNewHeadsThreshold = '3m0s' OperatorFactoryAddress = '0x8007e24251b1D2Fc518Eb843A701d9cD21fe0aA3' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [EVM.Transactions] ForwardersEnabled = false @@ -424,6 +430,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [EVM.OCR] ContractConfirmations = 4 @@ -460,6 +468,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '30s' RPCDefaultBatchSize = 100 RPCBlockQueryDelay = 10 +FinalizedBlockOffset = 0 [EVM.Transactions] ForwardersEnabled = false @@ -514,6 +523,8 @@ SyncThreshold = 10 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [EVM.OCR] ContractConfirmations = 4 diff --git a/core/web/resolver/testdata/config-multi-chain.toml b/core/web/resolver/testdata/config-multi-chain.toml index 3598e92cdc2..9abb1719402 100644 --- a/core/web/resolver/testdata/config-multi-chain.toml +++ b/core/web/resolver/testdata/config-multi-chain.toml @@ -39,6 +39,7 @@ CPUProfileRate = 7 ChainID = '1' FinalityDepth = 26 FinalityTagEnabled = false +FinalizedBlockOffset = 0 [EVM.OCR2] [EVM.OCR2.Automation] diff --git a/core/web/router.go b/core/web/router.go index 5e90cea237b..6e96b47981b 100644 --- a/core/web/router.go +++ b/core/web/router.go @@ -350,8 +350,7 @@ func v2Routes(app chainlink.Application, r *gin.RouterGroup) { {"solana", NewSolanaKeysController(app)}, {"cosmos", NewCosmosKeysController(app)}, {"starknet", NewStarkNetKeysController(app)}, - {"dkgsign", NewDKGSignKeysController(app)}, - {"dkgencrypt", NewDKGEncryptKeysController(app)}, + {"aptos", NewAptosKeysController(app)}, } { authv2.GET("/keys/"+keys.path, keys.kc.Index) authv2.POST("/keys/"+keys.path, auth.RequiresEditRole(keys.kc.Create)) diff --git a/core/web/schema/type/ocr2_keys.graphql b/core/web/schema/type/ocr2_keys.graphql index 95da9acf71f..c25148c686a 100644 --- a/core/web/schema/type/ocr2_keys.graphql +++ b/core/web/schema/type/ocr2_keys.graphql @@ -3,6 +3,7 @@ enum OCR2ChainType { COSMOS SOLANA STARKNET + APTOS } type OCR2KeyBundle { diff --git a/core/web/schema/type/spec.graphql b/core/web/schema/type/spec.graphql index db33dd14ee2..5a803e2f8ee 100644 --- a/core/web/schema/type/spec.graphql +++ b/core/web/schema/type/spec.graphql @@ -16,6 +16,7 @@ union JobSpec = type CronSpec { schedule: String! + evmChainID: String createdAt: Time! } diff --git a/core/web/testutils/mock_relayer.go b/core/web/testutils/mock_relayer.go index 1cf9cfc1445..4c2e5661afa 100644 --- a/core/web/testutils/mock_relayer.go +++ b/core/web/testutils/mock_relayer.go @@ -32,6 +32,10 @@ func (m MockRelayer) HealthReport() map[string]error { panic("not implemented") } +func (m MockRelayer) NewChainWriter(_ context.Context, _ []byte) (commontypes.ChainWriter, error) { + panic("not implemented") +} + func (m MockRelayer) NewContractReader(_ context.Context, _ []byte) (commontypes.ContractReader, error) { panic("not implemented") } diff --git a/dashboard-lib/go.mod b/dashboard-lib/go.mod index ecb33bbae30..10270853ed1 100644 --- a/dashboard-lib/go.mod +++ b/dashboard-lib/go.mod @@ -1,6 +1,6 @@ module github.com/smartcontractkit/chainlink/dashboard-lib -go 1.21.7 +go 1.22.5 require ( github.com/K-Phoen/grabana v0.22.1 diff --git a/docs/CONFIG.md b/docs/CONFIG.md index 5f40d9fa69d..7a4d3ca62ca 100644 --- a/docs/CONFIG.md +++ b/docs/CONFIG.md @@ -1670,9 +1670,18 @@ env is an example user specified key-value pair ## Mercury ```toml [Mercury] +VerboseLogging = false # Default ``` +### VerboseLogging +```toml +VerboseLogging = false # Default +``` +VerboseLogging enables detailed logging of mercury/LLO operations. These logs +can be expensive since they may serialize large structs, so they are disabled +by default. + ## Mercury.Cache ```toml [Mercury.Cache] @@ -1776,6 +1785,7 @@ NoNewHeadsThreshold = '3m0s' OperatorFactoryAddress = '0x3E64Cd889482443324F91bFA9c84fE72A511f48A' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -1830,6 +1840,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 4 @@ -1866,6 +1878,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '3m0s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -1920,6 +1933,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 4 @@ -1956,6 +1971,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '3m0s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -2010,6 +2026,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 4 @@ -2046,6 +2064,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '3m0s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -2100,6 +2119,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 4 @@ -2137,6 +2158,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '40s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -2191,6 +2213,8 @@ SyncThreshold = 10 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 1 @@ -2227,6 +2251,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '3m0s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -2281,6 +2306,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 4 @@ -2317,6 +2344,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '3m0s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -2371,6 +2399,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 4 @@ -2408,6 +2438,7 @@ NoNewHeadsThreshold = '3m0s' OperatorFactoryAddress = '0x8007e24251b1D2Fc518Eb843A701d9cD21fe0aA3' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -2462,6 +2493,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 4 @@ -2498,6 +2531,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '30s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 2 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -2552,6 +2586,8 @@ SyncThreshold = 10 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 4 @@ -2587,6 +2623,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '3m0s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -2641,6 +2678,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 4 @@ -2676,6 +2715,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '3m0s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -2730,6 +2770,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 4 @@ -2766,6 +2808,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '30s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 2 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -2820,6 +2863,8 @@ SyncThreshold = 10 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 4 @@ -2857,6 +2902,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '3m0s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -2911,6 +2957,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 4 @@ -2947,6 +2995,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '30s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 2 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -3001,6 +3050,8 @@ SyncThreshold = 10 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 4 @@ -3037,6 +3088,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '30s' RPCDefaultBatchSize = 100 RPCBlockQueryDelay = 10 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -3091,6 +3143,8 @@ SyncThreshold = 10 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 4 @@ -3127,6 +3181,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '12m0s' RPCDefaultBatchSize = 100 RPCBlockQueryDelay = 15 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -3181,6 +3236,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 1 @@ -3217,6 +3274,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '6m0s' RPCDefaultBatchSize = 100 RPCBlockQueryDelay = 15 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -3271,6 +3329,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 1 @@ -3307,6 +3367,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '30s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 2 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -3361,6 +3422,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 4 @@ -3397,6 +3460,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '40s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -3451,6 +3515,8 @@ SyncThreshold = 10 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 1 @@ -3487,6 +3553,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '1m0s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -3541,6 +3608,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 4 @@ -3577,6 +3646,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '1m0s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -3631,6 +3701,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 4 @@ -3667,6 +3739,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '1m0s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -3721,6 +3794,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 4 @@ -3758,6 +3833,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '40s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -3812,6 +3888,8 @@ SyncThreshold = 10 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 1 @@ -3848,6 +3926,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '0s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -3902,6 +3981,8 @@ SyncThreshold = 10 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 1 @@ -3937,6 +4018,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '30s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -3991,6 +4073,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 1 @@ -4027,6 +4111,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '0s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -4081,6 +4166,8 @@ SyncThreshold = 10 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 1 @@ -4117,6 +4204,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '6m0s' RPCDefaultBatchSize = 100 RPCBlockQueryDelay = 15 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -4171,6 +4259,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 1 @@ -4207,6 +4297,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '30s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -4261,6 +4352,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 1 @@ -4297,6 +4390,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '30s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -4351,6 +4445,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 1 @@ -4386,6 +4482,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '0s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -4440,6 +4537,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 1 @@ -4476,6 +4575,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '12m0s' RPCDefaultBatchSize = 100 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -4530,6 +4630,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 1 @@ -4566,6 +4668,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '40s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -4620,6 +4723,8 @@ SyncThreshold = 10 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 1 @@ -4656,6 +4761,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '12m0s' RPCDefaultBatchSize = 100 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -4710,6 +4816,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 1 @@ -4746,6 +4854,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '0s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 2 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -4800,6 +4909,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 4 @@ -4835,6 +4946,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '30s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -4889,6 +5001,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 1 @@ -4925,6 +5039,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '40s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -4979,6 +5094,8 @@ SyncThreshold = 10 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 1 @@ -5015,6 +5132,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '3m0s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -5069,6 +5187,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 4 @@ -5106,6 +5226,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '0s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -5160,6 +5281,8 @@ SyncThreshold = 10 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 1 @@ -5196,6 +5319,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '1m0s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -5250,6 +5374,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 1 @@ -5286,6 +5412,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '30s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 2 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -5340,6 +5467,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 1 @@ -5376,6 +5505,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '30s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 2 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -5430,6 +5560,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 1 @@ -5466,6 +5598,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '1m0s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -5520,6 +5653,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 1 @@ -5555,6 +5690,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '0s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -5609,6 +5745,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 4 @@ -5644,6 +5782,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '0s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -5698,6 +5837,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 4 @@ -5733,6 +5874,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '0s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -5787,6 +5929,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 4 @@ -5823,6 +5967,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '0s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -5877,6 +6022,8 @@ SyncThreshold = 10 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 1 @@ -5913,6 +6060,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '30s' RPCDefaultBatchSize = 100 RPCBlockQueryDelay = 10 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -5967,6 +6115,8 @@ SyncThreshold = 10 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 4 @@ -6002,6 +6152,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '30s' RPCDefaultBatchSize = 100 RPCBlockQueryDelay = 10 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -6056,6 +6207,8 @@ SyncThreshold = 10 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 4 @@ -6092,6 +6245,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '40s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -6146,6 +6300,8 @@ SyncThreshold = 10 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 1 @@ -6182,6 +6338,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '40s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -6236,6 +6393,8 @@ SyncThreshold = 10 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 1 @@ -6273,6 +6432,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '0s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -6327,6 +6487,8 @@ SyncThreshold = 10 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 1 @@ -6364,6 +6526,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '0s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -6418,6 +6581,8 @@ SyncThreshold = 10 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 1 @@ -6454,6 +6619,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '0s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -6508,6 +6674,8 @@ SyncThreshold = 10 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 1 @@ -6532,9 +6700,9 @@ BlockBackfillDepth = 10 BlockBackfillSkip = false ChainType = 'scroll' FinalityDepth = 10 -FinalityTagEnabled = false +FinalityTagEnabled = true LogBackfillBatchSize = 1000 -LogPollInterval = '3s' +LogPollInterval = '5s' LogKeepBlocksDepth = 100000 LogPrunePageSize = 0 BackupLogPollerBlockDelay = 100 @@ -6544,6 +6712,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '0s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -6560,25 +6729,25 @@ Enabled = false Enabled = true [GasEstimator] -Mode = 'SuggestedPrice' +Mode = 'BlockHistory' PriceDefault = '20 gwei' PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether' -PriceMin = '0' +PriceMin = '1 wei' LimitDefault = 500000 LimitMax = 500000 LimitMultiplier = '1' LimitTransfer = 21000 -BumpMin = '5 gwei' +BumpMin = '1 gwei' BumpPercent = 20 BumpThreshold = 3 -EIP1559DynamicFees = false +EIP1559DynamicFees = true FeeCapDefault = '100 gwei' TipCapDefault = '1 wei' TipCapMin = '1 wei' [GasEstimator.BlockHistory] BatchSize = 25 -BlockHistorySize = 0 +BlockHistorySize = 24 CheckInclusionBlocks = 12 CheckInclusionPercentile = 90 TransactionPercentile = 60 @@ -6598,6 +6767,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 1 @@ -6622,9 +6793,9 @@ BlockBackfillDepth = 10 BlockBackfillSkip = false ChainType = 'scroll' FinalityDepth = 10 -FinalityTagEnabled = false +FinalityTagEnabled = true LogBackfillBatchSize = 1000 -LogPollInterval = '3s' +LogPollInterval = '5s' LogKeepBlocksDepth = 100000 LogPrunePageSize = 0 BackupLogPollerBlockDelay = 100 @@ -6634,6 +6805,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '0s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -6650,25 +6822,25 @@ Enabled = false Enabled = true [GasEstimator] -Mode = 'SuggestedPrice' +Mode = 'BlockHistory' PriceDefault = '20 gwei' PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether' -PriceMin = '0' +PriceMin = '1 wei' LimitDefault = 500000 LimitMax = 500000 LimitMultiplier = '1' LimitTransfer = 21000 -BumpMin = '5 gwei' +BumpMin = '1 gwei' BumpPercent = 20 BumpThreshold = 3 -EIP1559DynamicFees = false +EIP1559DynamicFees = true FeeCapDefault = '100 gwei' TipCapDefault = '1 wei' TipCapMin = '1 wei' [GasEstimator.BlockHistory] BatchSize = 25 -BlockHistorySize = 0 +BlockHistorySize = 24 CheckInclusionBlocks = 12 CheckInclusionPercentile = 90 TransactionPercentile = 60 @@ -6688,6 +6860,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 1 @@ -6724,6 +6898,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '3m0s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -6778,6 +6953,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 4 @@ -6814,6 +6991,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '40s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -6868,6 +7046,8 @@ SyncThreshold = 10 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 1 @@ -6904,6 +7084,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '30s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -6958,6 +7139,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 4 @@ -6994,6 +7177,7 @@ NonceAutoSync = true NoNewHeadsThreshold = '30s' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [Transactions] ForwardersEnabled = false @@ -7048,6 +7232,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [OCR] ContractConfirmations = 4 @@ -7236,6 +7422,22 @@ block, but it is possible to receive a head BEFORE that block is actually available from the connected node via RPC, due to race conditions in the code of the remote ETH node. In this case you will get false "zero" blocks that are missing transactions. +### FinalizedBlockOffset +```toml +FinalizedBlockOffset = 0 # Default +``` +FinalizedBlockOffset defines the number of blocks by which the latest finalized block will be shifted/delayed. +For example, suppose RPC returns block 100 as the latest finalized. In that case, the CL Node will treat block `100 - FinalizedBlockOffset` as the latest finalized block and `latest - FinalityDepth - FinalizedBlockOffset` in case of `FinalityTagEnabled = false.` +With `EnforceRepeatableRead = true,` RPC is considered healthy only if its most recent finalized block is larger or equal to the highest finalized block observed by the CL Node minus `FinalizedBlockOffset.` +Higher values of `FinalizedBlockOffset` with `EnforceRepeatableRead = true` reduce the number of false `FinalizedBlockOutOfSync` declarations on healthy RPCs that are slightly lagging behind due to network delays. +This may increase the number of healthy RPCs and reduce the probability that the CL Node will not have any healthy alternatives to the active RPC. +CAUTION: Setting this to values higher than 0 may delay transaction creation in products (e.g., CCIP, Automation) that base their decision on finalized on-chain events. +PoS chains with `FinalityTagEnabled=true` and batched (epochs) blocks finalization (e.g., Ethereum Mainnet) must be treated with special care as a minor increase in the `FinalizedBlockOffset` may lead to significant delays. +For example, let's say that `FinalizedBlockOffset = 1` and blocks are finalized in batches of 32. +The latest finalized block on chain is 64, so block 63 is the latest finalized for CL Node. +Block 64 will be treated as finalized by CL Node only when chain's latest finalized block is 65. As chain finalizes blocks in batches of 32, +CL Node has to wait for a whole new batch to be finalized to treat block 64 as finalized. + ## EVM.Transactions ```toml [EVM.Transactions] @@ -7743,6 +7945,8 @@ SyncThreshold = 5 # Default LeaseDuration = '0s' # Default NodeIsSyncingEnabled = false # Default FinalizedBlockPollInterval = '5s' # Default +EnforceRepeatableRead = false # Default +DeathDeclarationDelay = '10s' # Default ``` The node pool manages multiple RPC endpoints. @@ -7816,6 +8020,25 @@ reported based on latest block and finality depth. Set to 0 to disable. +### EnforceRepeatableRead +```toml +EnforceRepeatableRead = false # Default +``` +EnforceRepeatableRead defines if Core should only use RPCs whose most recently finalized block is greater or equal to +`highest finalized block - FinalizedBlockOffset`. In other words, exclude RPCs lagging on latest finalized +block. + +Set false to disable + +### DeathDeclarationDelay +```toml +DeathDeclarationDelay = '10s' # Default +``` +DeathDeclarationDelay defines the minimum duration an RPC must be in unhealthy state before producing an error log message. +Larger values might be helpful to reduce the noisiness of health checks like `EnforceRepeatableRead = true', which might be falsely +trigger declaration of `FinalizedBlockOutOfSync` due to insignificant network delays in broadcasting of the finalized state among RPCs. +RPC will not be picked to handle a request even if this option is set to a nonzero value. + ## EVM.NodePool.Errors :warning: **_ADVANCED_**: _Do not change these settings unless you know what you are doing._ ```toml diff --git a/flake.lock b/flake.lock index da3a69cd248..c5097f5a477 100644 --- a/flake.lock +++ b/flake.lock @@ -26,11 +26,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1714727549, - "narHash": "sha256-CWXRTxxcgMfQubJugpeg3yVWIfm70MYTtgaKWKgD60U=", + "lastModified": 1719997877, + "narHash": "sha256-/Edw+w0PiGgxwnCeJycM0VgH4HtlCi91v1d8xbi+REE=", "owner": "shazow", "repo": "foundry.nix", - "rev": "47cf189ec395eda4b3e0623179d1075c8027ca97", + "rev": "02febba4f1cf0606d790acdb24adcf7a64afb4e1", "type": "github" }, "original": { @@ -56,11 +56,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1712439257, - "narHash": "sha256-aSpiNepFOMk9932HOax0XwNxbA38GOUVOiXfUVPOrck=", + "lastModified": 1720957393, + "narHash": "sha256-oedh2RwpjEa+TNxhg5Je9Ch6d3W1NKi7DbRO1ziHemA=", "owner": "nixos", "repo": "nixpkgs", - "rev": "ff0dbd94265ac470dda06a657d5fe49de93b4599", + "rev": "693bc46d169f5af9c992095736e82c3488bf7dbb", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index f65847455b2..7e188857ba4 100644 --- a/flake.nix +++ b/flake.nix @@ -8,15 +8,22 @@ foundry.inputs.flake-utils.follows = "flake-utils"; }; - outputs = inputs@{ self, nixpkgs, flake-utils, foundry, ... }: - flake-utils.lib.eachDefaultSystem (system: - let - pkgs = import nixpkgs { inherit system; overlays = [ foundry.overlay ]; }; - in - rec { - devShell = pkgs.callPackage ./shell.nix { - inherit pkgs; - }; - formatter = pkgs.nixpkgs-fmt; - }); + outputs = inputs @ { + self, + nixpkgs, + flake-utils, + foundry, + ... + }: + flake-utils.lib.eachDefaultSystem (system: let + pkgs = import nixpkgs { + inherit system; + overlays = [foundry.overlay]; + }; + in rec { + devShell = pkgs.callPackage ./shell.nix { + inherit pkgs; + }; + formatter = pkgs.nixpkgs-fmt; + }); } diff --git a/fuzz/fuzz_all_native.py b/fuzz/fuzz_all_native.py index 41588b090b7..aa191fc5e8d 100755 --- a/fuzz/fuzz_all_native.py +++ b/fuzz/fuzz_all_native.py @@ -7,8 +7,6 @@ import subprocess import sys -LIBROOT = "../" - def main(): parser = argparse.ArgumentParser( formatter_class=argparse.RawDescriptionHelpFormatter, @@ -19,6 +17,7 @@ def main(): ) parser.add_argument("--ci", required=False, help="In CI mode we run each parser only briefly once", action="store_true") parser.add_argument("--seconds", required=False, help="Run for this many seconds of total fuzz time before exiting") + parser.add_argument("--go_module_root", required=True, help="Path to the root of the go module to fuzz") args = parser.parse_args() # use float for remaining_seconds so we can represent infinity @@ -27,7 +26,7 @@ def main(): else: remaining_seconds = float("inf") - fuzzers = discover_fuzzers() + fuzzers = discover_fuzzers(args.go_module_root) print(f"🐝 Discovered fuzzers:", file=sys.stderr) for fuzzfn, path in fuzzers.items(): print(f"{fuzzfn} in {path}", file=sys.stderr) @@ -50,12 +49,12 @@ def main(): remaining_seconds -= next_duration_seconds print(f"🐝 Running {fuzzfn} in {path} for {next_duration_seconds}s before switching to next fuzzer", file=sys.stderr) - run_fuzzer(fuzzfn, path, next_duration_seconds) + run_fuzzer(fuzzfn, path, next_duration_seconds, args.go_module_root) print(f"🐝 Completed running {fuzzfn} in {path} for {next_duration_seconds}s. Total remaining time is {remaining_seconds}s", file=sys.stderr) -def discover_fuzzers(): +def discover_fuzzers(go_module_root): fuzzers = {} - for root, dirs, files in os.walk(LIBROOT): + for root, dirs, files in os.walk(go_module_root): for file in files: if not file.endswith("test.go"): continue with open(os.path.join(root, file), "r") as f: @@ -68,11 +67,11 @@ def discover_fuzzers(): for fuzzfn in re.findall(r"func\s+(Fuzz\w+)", text): if fuzzfn in fuzzers: raise Exception(f"Duplicate fuzz function: {fuzzfn}") - fuzzers[fuzzfn] = os.path.relpath(root, LIBROOT) + fuzzers[fuzzfn] = os.path.relpath(root, go_module_root) return fuzzers -def run_fuzzer(fuzzfn, dir, duration_seconds): - subprocess.check_call(["go", "test", "-run=^$", f"-fuzz=^{fuzzfn}$", f"-fuzztime={duration_seconds}s", f"./{dir}"], cwd=LIBROOT) +def run_fuzzer(fuzzfn, dir, duration_seconds, go_module_root): + subprocess.check_call(["go", "test", "-run=^$", f"-fuzz=^{fuzzfn}$", f"-fuzztime={duration_seconds}s", f"./{dir}"], cwd=go_module_root) if __name__ == "__main__": main() \ No newline at end of file diff --git a/go.md b/go.md index dda7192c1a1..4ef6c4da9e4 100644 --- a/go.md +++ b/go.md @@ -40,8 +40,6 @@ flowchart LR click chainlink-solana href "https://github.com/smartcontractkit/chainlink-solana" chainlink/v2 --> chainlink-starknet/relayer click chainlink-starknet/relayer href "https://github.com/smartcontractkit/chainlink-starknet" - chainlink/v2 --> chainlink-vrf - click chainlink-vrf href "https://github.com/smartcontractkit/chainlink-vrf" chainlink/v2 --> libocr click libocr href "https://github.com/smartcontractkit/libocr" chainlink/v2 --> tdh2/go/ocr2/decryptionplugin @@ -64,7 +62,6 @@ flowchart LR chainlink-solana --> libocr chainlink-starknet/relayer --> chainlink-common chainlink-starknet/relayer --> libocr - chainlink-vrf --> libocr tdh2/go/ocr2/decryptionplugin --> libocr tdh2/go/ocr2/decryptionplugin --> tdh2/go/tdh2 ``` diff --git a/go.mod b/go.mod index 6208b5e8762..a6a8c5df2c5 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/smartcontractkit/chainlink/v2 -go 1.21.7 +go 1.22.5 require ( github.com/Depado/ginprom v1.8.0 @@ -44,7 +44,7 @@ require ( github.com/jackc/pgconn v1.14.3 github.com/jackc/pgtype v1.14.0 github.com/jackc/pgx/v4 v4.18.2 - github.com/jmoiron/sqlx v1.3.5 + github.com/jmoiron/sqlx v1.4.0 github.com/jonboulle/clockwork v0.4.0 github.com/jpillora/backoff v1.0.0 github.com/kylelemons/godebug v1.1.0 @@ -58,31 +58,30 @@ require ( github.com/onsi/gomega v1.30.0 github.com/patrickmn/go-cache v2.1.0+incompatible github.com/pelletier/go-toml v1.9.5 - github.com/pelletier/go-toml/v2 v2.1.1 + github.com/pelletier/go-toml/v2 v2.2.0 github.com/pkg/errors v0.9.1 - github.com/pressly/goose/v3 v3.16.0 + github.com/pressly/goose/v3 v3.21.1 github.com/prometheus/client_golang v1.17.0 github.com/prometheus/client_model v0.5.0 github.com/prometheus/common v0.45.0 github.com/prometheus/prometheus v0.48.1 github.com/robfig/cron/v3 v3.0.1 - github.com/rogpeppe/go-internal v1.11.0 + github.com/rogpeppe/go-internal v1.12.0 github.com/scylladb/go-reflectx v1.0.1 github.com/shirou/gopsutil/v3 v3.24.3 github.com/shopspring/decimal v1.3.1 github.com/smartcontractkit/chain-selectors v1.0.10 github.com/smartcontractkit/chainlink-automation v1.0.4 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240620164046-1c03d0a97b20 - github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d - github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 - github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917 - github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240605170242-555ff582f36a - github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240531021326-99118e47f696 - github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 - github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240712162033-89bd3351ce6e + github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45 + github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240716180914-6fd88994c89c + github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827 + github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240712132946-267a37c5ac6e + github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799 + github.com/smartcontractkit/libocr v0.0.0-20240702141926-063ceef8c42e github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 - github.com/smartcontractkit/wsrpc v0.8.1 + github.com/smartcontractkit/wsrpc v0.7.3 github.com/spf13/cast v1.6.0 github.com/stretchr/testify v1.9.0 github.com/test-go/testify v1.1.4 @@ -96,21 +95,21 @@ require ( 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.49.0 - go.opentelemetry.io/otel v1.24.0 + go.opentelemetry.io/otel v1.27.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.26.0 - golang.org/x/crypto v0.22.0 - golang.org/x/exp v0.0.0-20240213143201-ec583247a57a - golang.org/x/mod v0.15.0 - golang.org/x/net v0.24.0 - golang.org/x/sync v0.6.0 - golang.org/x/term v0.19.0 - golang.org/x/text v0.14.0 + golang.org/x/crypto v0.24.0 + golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 + golang.org/x/mod v0.17.0 + golang.org/x/net v0.25.0 + golang.org/x/sync v0.7.0 + golang.org/x/term v0.21.0 + golang.org/x/text v0.16.0 golang.org/x/time v0.5.0 - golang.org/x/tools v0.18.0 + golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d gonum.org/v1/gonum v0.14.0 - google.golang.org/grpc v1.59.0 - google.golang.org/protobuf v1.33.0 + google.golang.org/grpc v1.64.0 + google.golang.org/protobuf v1.34.1 gopkg.in/guregu/null.v4 v4.0.0 gopkg.in/natefinch/lumberjack.v2 v2.2.1 ) @@ -122,7 +121,7 @@ require ( cosmossdk.io/depinject v1.0.0-alpha.3 // indirect cosmossdk.io/errors v1.0.0 // indirect cosmossdk.io/math v1.0.1 // indirect - filippo.io/edwards25519 v1.0.0 // indirect + filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 // indirect @@ -143,7 +142,7 @@ require ( github.com/buger/jsonparser v1.1.1 // indirect github.com/bytedance/sonic v1.10.1 // indirect github.com/cenkalti/backoff v2.2.1+incompatible // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect @@ -180,6 +179,7 @@ require ( github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.7.0 // indirect github.com/ethereum/c-kzg-4844 v0.4.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/gabriel-vasile/mimetype v1.4.2 // indirect github.com/gagliardetto/binary v0.7.7 // indirect @@ -205,7 +205,7 @@ require ( github.com/gofrs/flock v0.8.1 // indirect github.com/gogo/protobuf v1.3.3 // indirect github.com/golang-jwt/jwt/v5 v5.2.0 // indirect - github.com/golang/glog v1.1.2 // indirect + github.com/golang/glog v1.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect @@ -213,13 +213,15 @@ require ( github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-tpm v0.9.0 // indirect github.com/google/gofuzz v1.2.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect + github.com/googleapis/gax-go/v2 v2.12.2 // indirect github.com/gorilla/context v1.1.1 // 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 + github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1 // indirect + github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect 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 @@ -259,6 +261,7 @@ require ( github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect + github.com/mfridman/interpolate v0.0.2 // indirect github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect @@ -283,7 +286,6 @@ require ( github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/sethvargo/go-retry v0.2.4 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect - github.com/sirupsen/logrus v1.9.3 // indirect github.com/spf13/afero v1.9.5 // indirect github.com/spf13/cobra v1.8.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect @@ -316,20 +318,19 @@ require ( go.etcd.io/bbolt v1.3.7 // indirect go.mongodb.org/mongo-driver v1.15.0 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc 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.24.0 // indirect - go.opentelemetry.io/proto/otlp v1.0.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/sdk v1.27.0 // indirect + go.opentelemetry.io/otel/trace v1.27.0 // indirect + go.opentelemetry.io/proto/otlp v1.2.0 // indirect go.uber.org/ratelimit v0.3.0 // indirect golang.org/x/arch v0.7.0 // indirect - golang.org/x/sys v0.19.0 // indirect - google.golang.org/api v0.149.0 // indirect - google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect + golang.org/x/sys v0.21.0 // indirect + google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect 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 @@ -346,6 +347,9 @@ replace ( // 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 + // until nolag updates merged upstream + github.com/mitchellh/mapstructure => github.com/nolag/mapstructure v1.5.2-0.20240625151721-90ea83a3f479 + // until merged upstream: https://github.com/mwitkow/grpc-proxy/pull/69 github.com/mwitkow/grpc-proxy => github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f ) diff --git a/go.sum b/go.sum index 636390f117b..637cb251c92 100644 --- a/go.sum +++ b/go.sum @@ -18,23 +18,22 @@ cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHOb cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go v0.110.9 h1:e7ITSqGFFk4rbz/JFIqZh3G4VEHguhAL4BQcFlWtU68= -cloud.google.com/go v0.110.9/go.mod h1:rpxevX/0Lqvlbc88b7Sc1SPNdyK1riNBTUU6JXhYNpM= +cloud.google.com/go v0.112.1 h1:uJSeirPke5UNZHIb4SxfZklVSiWWVqW4oXlETwZziwM= +cloud.google.com/go v0.112.1/go.mod h1:+Vbu+Y1UU+I1rjmzeMOb/8RfkKJK2Gyxi1X6jJCZLo4= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= -cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/compute v1.25.1 h1:ZRpHJedLtTpKgr3RV1Fx23NuaAEN1Zfx9hw1u4aJdjU= +cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= +cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/iam v1.1.4 h1:K6n/GZHFTtEoKT5aUG3l9diPi0VduZNQ1PfdnpkkIFk= -cloud.google.com/go/iam v1.1.4/go.mod h1:l/rg8l1AaA+VFMho/HYx2Vv6xinPSLMF8qfhRPIZ0L8= +cloud.google.com/go/iam v1.1.6 h1:bEa06k05IO4f4uJonbB5iAgKTPpABy1ayxaIZV/GHVc= +cloud.google.com/go/iam v1.1.6/go.mod h1:O0zxdPeGBoFdWW3HWmBxJsk0pfvNM/p/qa82rWOGTwI= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -45,8 +44,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/oNM= -cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= +cloud.google.com/go/storage v1.38.0 h1:Az68ZRGlnNTpIBbLjSMIV2BDcwwXYlRlQzis0llkpJg= +cloud.google.com/go/storage v1.38.0/go.mod h1:tlUADB0mAb9BgYls9lq+8MGkfzOXuLrnHXlpHmvFJoY= contrib.go.opencensus.io/exporter/stackdriver v0.12.6/go.mod h1:8x999/OcIPy5ivx/wDiV7Gx4D+VUPODf0mWRGRc5kSk= contrib.go.opencensus.io/exporter/stackdriver v0.13.4/go.mod h1:aXENhDJ1Y4lIg4EUaVTwzvYETVNZk10Pu26tevFKLUc= contrib.go.opencensus.io/exporter/stackdriver v0.13.5 h1:TNaexHK16gPUoc7uzELKOU7JULqccn1NDuqUxmxSqfo= @@ -67,8 +66,8 @@ cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw cosmossdk.io/tools/rosetta v0.2.1/go.mod h1:Pqdc1FdvkNV3LcNIkYWt2RQY6IP1ge6YWZk8MhhO9Hw= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= -filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= -filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= +filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= +filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= @@ -85,10 +84,6 @@ github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbi github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= -github.com/ClickHouse/ch-go v0.58.2 h1:jSm2szHbT9MCAB1rJ3WuCJqmGLi5UTjlNu+f530UTS0= -github.com/ClickHouse/ch-go v0.58.2/go.mod h1:Ap/0bEmiLa14gYjCiRkYGbXvbe8vwdrfTYWhsuQ99aw= -github.com/ClickHouse/clickhouse-go/v2 v2.15.0 h1:G0hTKyO8fXXR1bGnZ0DY3vTG01xYfOGW76zgjg5tmC4= -github.com/ClickHouse/clickhouse-go/v2 v2.15.0/go.mod h1:kXt1SRq0PIRa6aKZD7TnFnY9PQKmc2b13sHtOYcK6cQ= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= github.com/CosmWasm/wasmd v0.40.1 h1:LxbO78t/6S8TkeQlUrJ0m5O87HtAwLx4RGHq3rdrOEU= @@ -143,8 +138,6 @@ github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax github.com/allegro/bigcache v1.2.1 h1:hg1sY1raCwic3Vnsvje6TT7/pnZba83LeFck5NrFKSc= github.com/allegro/bigcache v1.2.1/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129/go.mod h1:rFgpPQZYZ8vdbc+48xibu8ALc3yeyd64IhHS+PU6Yyg= -github.com/andybalholm/brotli v1.0.6 h1:Yf9fFpf49Zrxb9NlQaluyE92/+X7UVHlhMNJN2sxfOI= -github.com/andybalholm/brotli v1.0.6/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/appleboy/gofight/v2 v2.1.2 h1:VOy3jow4vIK8BRQJoC/I9muxyYlJ2yb9ht2hZoS3rf4= github.com/appleboy/gofight/v2 v2.1.2/go.mod h1:frW+U1QZEdDgixycTj4CygQ48yLTUhplt43+Wczp3rw= @@ -197,8 +190,8 @@ github.com/bytedance/sonic v1.10.1 h1:7a1wuFXL1cMy7a3f7/VFcEtriuXQnUBhtoVfOZiays github.com/bytedance/sonic v1.10.1/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v1.1.1 h1:nCb6ZLdB7NRaqsm91JtQTAme2SKJzXVsdPIPkyJr1MU= github.com/cespare/cp v1.1.1/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= @@ -224,8 +217,6 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= @@ -259,8 +250,8 @@ github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/Yj github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M= github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY= -github.com/containerd/continuity v0.4.3 h1:6HVkalIp+2u1ZLH1J/pYX2oBVXlJZvh1X1A7bEZ9Su8= -github.com/containerd/continuity v0.4.3/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= +github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -341,12 +332,8 @@ github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUn github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/docker/cli v24.0.7+incompatible h1:wa/nIwYFW7BVTGa7SWPVyyXU9lgORqUb1xfI36MSkFg= -github.com/docker/cli v24.0.7+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= -github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -359,10 +346,6 @@ github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+m github.com/dvsekhvalnov/jose2go v1.7.0 h1:bnQc8+GMnidJZA8zc6lLEAb4xNrIqHwO+9TzqvtQZPo= github.com/dvsekhvalnov/jose2go v1.7.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= -github.com/elastic/go-sysinfo v1.11.1 h1:g9mwl05njS4r69TisC+vwHWTSKywZFYYUu3so3T/Lao= -github.com/elastic/go-sysinfo v1.11.1/go.mod h1:6KQb31j0QeWBDF88jIdWSxE8cwoOB9tO4Y4osN7Q70E= -github.com/elastic/go-windows v1.0.1 h1:AlYZOldA+UJ0/2nBuqWdo90GFCgG9xuyw9SYzGUtJm0= -github.com/elastic/go-windows v1.0.1/go.mod h1:FoVvqWSun28vaDQPbj2Elfc0JahhPB7WQEGa3c814Ss= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -370,8 +353,6 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= -github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= github.com/esote/minmaxheap v1.0.0 h1:rgA7StnXXpZG6qlM0S7pUmEv1KpWe32rYT4x8J8ntaA= github.com/esote/minmaxheap v1.0.0/go.mod h1:Ln8+i7fS1k3PLgZI2JAo0iA1as95QnIYiGCrqSJ5FZk= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= @@ -392,8 +373,8 @@ github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYF github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= -github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= @@ -449,10 +430,6 @@ github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclK github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= -github.com/go-faster/city v1.0.1 h1:4WAxSZ3V2Ws4QRDrscLEDcibJY8uf41H6AhXDrNDcGw= -github.com/go-faster/city v1.0.1/go.mod h1:jKcUJId49qdW3L1qKHH/3wPeUstCVpVSXTM6vO3VcTw= -github.com/go-faster/errors v0.6.1 h1:nNIPOBkprlKzkThvS/0YaX8Zs9KewLCOSFQS5BU06FI= -github.com/go-faster/errors v0.6.1/go.mod h1:5MGV2/2T9yvlrbhe9pD9LO5Z/2zCSq2T8j+Jpi2LAyY= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -492,9 +469,8 @@ github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91 github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos= github.com/go-playground/validator/v10 v10.15.5 h1:LEBecTWb/1j5TNY1YYG2RcOUN3R7NLylN+x8TTueE24= github.com/go-playground/validator/v10 v10.15.5/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= -github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= -github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= +github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= +github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= @@ -527,8 +503,8 @@ github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w github.com/golang-jwt/jwt/v5 v5.2.0 h1:d/ix8ftRUorsN+5eMIlF4T6J8CAt9rch3My2winC1Jw= github.com/golang-jwt/jwt/v5 v5.2.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= -github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= +github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= +github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -617,11 +593,10 @@ github.com/google/pprof v0.0.0-20231023181126-ff6d637d2a7b/go.mod h1:czg5+yv1E0Z github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -629,8 +604,8 @@ github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfF github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= -github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= +github.com/googleapis/gax-go/v2 v2.12.2 h1:mhN09QQW1jEWeMF74zGR81R30z4VJzjZsfkUhuHF+DA= +github.com/googleapis/gax-go/v2 v2.12.2/go.mod h1:61M8vcyyXR2kqKFxKrfA22jaA8JGF7Dc8App1U3H6jc= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8= @@ -659,16 +634,16 @@ github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLt github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= -github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.0 h1:f4tggROQKKcnh4eItay6z/HbHLqghBxS8g7pyMhmDio= -github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.0/go.mod h1:hKAkSgNkL0FII46ZkJcpVEAai4KV+swlIWCKfekd1pA= -github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.3 h1:o95KDiV/b1xdkumY5YbLR0/n2+wBxUpgf3HgfKgTyLI= -github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.3/go.mod h1:hTxjzRcX49ogbTGVJ1sM5mz5s+SSgiGIyL3jjPxl32E= +github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1 h1:qnpSQwGEnkcRpTqNOIR6bJbR0gAorgP9CSALpRcKoAA= +github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1/go.mod h1:lXGCsh6c22WGtjr+qGHj1otzZpV/1kwTMAqkwZsnWRU= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0 h1:pRhl55Yx1eC7BZ1N+BBWwnKaMyD8uC+34TLdndZMAKk= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0/go.mod h1:XKMd7iuf/RGPSMJ/U4HP0zS2Z9Fh8Ps9a+6X26m/tmI= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= @@ -720,6 +695,8 @@ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v0.6.0 h1:uL2shRDx7RTrOrTCUZEGP/wJUFiUI8QT6E7z5o8jga4= github.com/hashicorp/golang-lru v0.6.0/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -809,14 +786,9 @@ github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQ github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs= github.com/jackc/pgx/v4 v4.18.2 h1:xVpYkNR5pk5bMCZGfClbO962UIqVABcAGt7ha1s/FeU= github.com/jackc/pgx/v4 v4.18.2/go.mod h1:Ey4Oru5tH5sB6tV7hDmfWFahwF15Eb7DNXlRKx2CkVw= -github.com/jackc/pgx/v5 v5.5.0 h1:NxstgwndsTRy7eq9/kqYc/BZh5w2hHJV86wjvO+1xPw= -github.com/jackc/pgx/v5 v5.5.0/go.mod h1:Ig06C2Vu0t5qXC60W8sqIthScaEnFvojjj9dSljmHRA= github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle v1.3.0 h1:eHK/5clGOatcjX3oWGBO/MpxpbHzSwud5EWTSCI+MX0= -github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk= -github.com/jackc/puddle/v2 v2.2.1/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= @@ -827,10 +799,8 @@ github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9Y github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= -github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= -github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= -github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 h1:rp+c0RAYOWj8l6qbCUTSiRLG/iKnW3K3/QfPPuSsBt4= -github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak= +github.com/jmoiron/sqlx v1.4.0 h1:1PLqN7S1UYp5t4SrVVnt4nUVNemrDAtxlulVe+Qgm3o= +github.com/jmoiron/sqlx v1.4.0/go.mod h1:ZrZ7UsYB/weZdl2Bxg6jCRO9c3YHl8r3ahlKmRT4JLY= github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg= github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= @@ -853,8 +823,6 @@ github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYb github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= @@ -938,7 +906,7 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= +github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/mattn/go-sqlite3 v2.0.3+incompatible h1:gXHsfypPkaMZrKbD5209QV9jbUTJKjyR5WD3HYQSd+U= github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= @@ -946,6 +914,8 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5 github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= +github.com/mfridman/interpolate v0.0.2 h1:pnuTK7MQIxxFz1Gr+rjSIx9u7qVjf5VOoM/u6BbAxPY= +github.com/mfridman/interpolate v0.0.2/go.mod h1:p+7uk6oE07mpE/Ik1b8EckO0O4ZXiGAfshKBWLUM9Xg= github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= @@ -965,10 +935,6 @@ github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJ github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= @@ -977,8 +943,6 @@ github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= -github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= -github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -999,8 +963,12 @@ github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5Vgl github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4= +github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nkovacs/streamquote v0.0.0-20170412213628-49af9bddb229/go.mod h1:0aYXnNPJ8l7uZxf45rWW1a/uME32OF0rhiYGNQ2oF2E= +github.com/nolag/mapstructure v1.5.2-0.20240625151721-90ea83a3f479 h1:1jCGDLFXDOHF2sdeTJYKrIuSLGMpQZpgXXHNGXR5Ouk= +github.com/nolag/mapstructure v1.5.2-0.20240625151721-90ea83a3f479/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/nsf/jsondiff v0.0.0-20210926074059-1e845ec5d249 h1:NHrXEjTNQY7P0Zfx1aMrNhpgxHmow66XQtm0aQLY0AE= github.com/nsf/jsondiff v0.0.0-20210926074059-1e845ec5d249/go.mod h1:mpRZBD8SJ55OIICQ3iWH0Yz3cjzA61JdqMLoWXeB2+8= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= @@ -1028,35 +996,29 @@ github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= -github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= -github.com/opencontainers/runc v1.1.10 h1:EaL5WeO9lv9wmS6SASjszOeQdSctvpbu0DdBQBizE40= -github.com/opencontainers/runc v1.1.10/go.mod h1:+/R6+KmDlh+hOO8NkjmgkG9Qzvypzk0yXxAPYYR65+M= +github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= +github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= +github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= -github.com/ory/dockertest/v3 v3.10.0 h1:4K3z2VMe8Woe++invjaTB7VRyQXQy5UY+loujO4aNE4= -github.com/ory/dockertest/v3 v3.10.0/go.mod h1:nr57ZbRWMqfsdGdFNLHz5jjNdDb7VVFnzAeW1n5N1Lg= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= -github.com/paulmach/orb v0.10.0 h1:guVYVqzxHE/CQ1KpfGO077TR0ATHSNjp4s6XGLn3W9s= -github.com/paulmach/orb v0.10.0/go.mod h1:5mULz1xQfs3bmQm63QEJA6lNGujuRafwA5S/EnuLaLU= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= -github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= -github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= +github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 h1:hDSdbBuw3Lefr6R18ax0tZ2BJeNB3NehB3trOwYBsdU= github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= -github.com/pierrec/lz4/v4 v4.1.18 h1:xaKrnTkyoqfh1YItXl56+6KJNVYWlEEPuAQW9xsplYQ= -github.com/pierrec/lz4/v4 v4.1.18/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -1071,8 +1033,8 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/pressly/goose/v3 v3.16.0 h1:xMJUsZdHLqSnCqESyKSqEfcYVYsUuup1nrOhaEFftQg= -github.com/pressly/goose/v3 v3.16.0/go.mod h1:JwdKVnmCRhnF6XLQs2mHEQtucFD49cQBdRM4UiwkxsM= +github.com/pressly/goose/v3 v3.21.1 h1:5SSAKKWej8LVVzNLuT6KIvP1eFDuPvxa+B6H0w78buQ= +github.com/pressly/goose/v3 v3.21.1/go.mod h1:sqthmzV8PitchEkjecFJII//l43dLOCzfWh8pHEe+vE= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= @@ -1122,8 +1084,8 @@ github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTE github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= @@ -1146,8 +1108,6 @@ github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtm github.com/scylladb/go-reflectx v1.0.1 h1:b917wZM7189pZdlND9PbIJ6NQxfDPfBvUaQ7cjj1iZQ= github.com/scylladb/go-reflectx v1.0.1/go.mod h1:rWnOfDIRWBGN0miMLIcoPt/Dhi2doCMZqwMCJ3KupFc= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys= -github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sethvargo/go-retry v0.2.4 h1:T+jHEQy/zKJf5s95UkguisicE0zuF9y7+/vgz08Ocec= github.com/sethvargo/go-retry v0.2.4/go.mod h1:1afjQuvh7s4gflMObvjLPaWgluLLyhA1wmVZ6KLpICw= @@ -1171,32 +1131,30 @@ github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCq github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8= github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240620164046-1c03d0a97b20 h1:Ea3shtV50R1qMkLbDaOwio2C+Ia1dB7pJQzpm7vHzxM= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240620164046-1c03d0a97b20/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= -github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d h1:5tgMC5Gi2UAOKZ+m28W8ubjLeR0pQCAcrz6eQ0rW510= -github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d/go.mod h1:0UNuO3nDt9MFsZPaHJBEUolxVkN0iC69j1ccDp95e8k= -github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo= -github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540/go.mod h1:sjAmX8K2kbQhvDarZE1ZZgDgmHJ50s0BBc/66vKY2ek= -github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917 h1:MD80ZRCTvxxJ8PBmhtrKoTnky8cVNYrCrIBLVRbrOM0= -github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917/go.mod h1:jwVxhctE6BgLOSSsVq9wbREpZ8Ev34H+UBxeUhESZRs= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240605170242-555ff582f36a h1:/QIQciKjhZy+iBB74WG4pP88O2FwS1KZtSXO5COTTgI= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240605170242-555ff582f36a/go.mod h1:QqcZSwLgEIn7YraAIRmomnBMAuVFephiHrIWVlkWbFI= -github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240531021326-99118e47f696 h1:h1E87+z+JcUEfvbJVF56SnZA/YUFE5ewUE61MaR/Ewg= -github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240531021326-99118e47f696/go.mod h1:OiWUTrrpSLLTMh7FINWjEh6mmDJCVPaC4yEsDCVaWdU= -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/chainlink-common v0.1.7-0.20240712162033-89bd3351ce6e h1:vKVNJfFXy4Wdq5paOV0/fNgql2GoXkei10+D+SmC+Qs= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240712162033-89bd3351ce6e/go.mod h1:fh9eBbrReCmv31bfz52ENCAMa7nTKQbdhb2B3+S2VGo= +github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45 h1:NBQLtqk8zsyY4qTJs+NElI3aDFTcAo83JHvqD04EvB0= +github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45/go.mod h1:LV0h7QBQUpoC2UUi6TcUvcIFm1xjP/DtEcqV8+qeLUs= +github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240716180914-6fd88994c89c h1:xKj2jtIUhVcIm+RH9r7aTrxFdzM7VsaPLD4biUQj5Dg= +github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240716180914-6fd88994c89c/go.mod h1:6DgCnHMGdBaIh0bLs1dK0MtdeMZfeNhc/nvBUN6KIUg= +github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827 h1:BCHu4pNP6arrcHLEWx61XjLaonOd2coQNyL0NTUcaMc= +github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827/go.mod h1:OPX+wC2TWQsyLNpR7daMt2vMpmsNcoBxbZyGTHr6tiA= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240712132946-267a37c5ac6e h1:PzwzlHNv1YbJ6ZIdl/pIFRoOuOS4V4WLvjZvFUnZFL4= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240712132946-267a37c5ac6e/go.mod h1:hsFhop+SlQHKD+DEFjZrMJmbauT1A/wvtZIeeo4PxFU= +github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799 h1:HyLTySm7BR+oNfZqDTkVJ25wnmcTtxBBD31UkFL+kEM= +github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799/go.mod h1:UVFRacRkP7O7TQAzFmR52v5mUlxf+G1ovMlCQAB/cHU= github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16 h1:TFe+FvzxClblt6qRfqEhUfa4kFQx5UobuoFGO2W4mMo= github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI= github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f h1:hgJif132UCdjo8u43i7iPN1/MFnu49hv7lFGFftCHKU= github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f/go.mod h1:MvMXoufZAtqExNexqi4cjrNYE9MefKddKylxjS+//n0= -github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c h1:lIyMbTaF2H0Q71vkwZHX/Ew4KF2BxiKhqEXwF8rn+KI= -github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c/go.mod h1:fb1ZDVXACvu4frX3APHZaEBp0xi1DIm34DcA0CwTsZM= +github.com/smartcontractkit/libocr v0.0.0-20240702141926-063ceef8c42e h1:9ypZ/8aW8Vm497i1gXHcT96oNLiu88jbg9QdX+IUE3E= +github.com/smartcontractkit/libocr v0.0.0-20240702141926-063ceef8c42e/go.mod h1:fb1ZDVXACvu4frX3APHZaEBp0xi1DIm34DcA0CwTsZM= github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 h1:yiKnypAqP8l0OX0P3klzZ7SCcBUxy5KqTAKZmQOvSQE= github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1/go.mod h1:q6f4fe39oZPdsh1i57WznEZgxd8siidMaSFq3wdPmVg= github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 h1:Dai1bn+Q5cpeGMQwRdjOdVjG8mmFFROVkSKuUgBErRQ= github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1/go.mod h1:G5Sd/yzHWf26rQ+X0nG9E0buKPqRGPMJAfk2gwCzOOw= -github.com/smartcontractkit/wsrpc v0.8.1 h1:kk0SXLqWrWaZ3J6c7n8D0NZ2uTMBBBpG5dZZXZX8UGE= -github.com/smartcontractkit/wsrpc v0.8.1/go.mod h1:yfg8v8fPLXkb6Mcnx6Pm/snP6jJ0r5Kf762Yd1a/KpA= +github.com/smartcontractkit/wsrpc v0.7.3 h1:CKYZfawZShZGfvsQep1F9oBansnFk9ByZPCdTMpLphw= +github.com/smartcontractkit/wsrpc v0.7.3/go.mod h1:sj7QX2NQibhkhxTfs3KOhAj/5xwgqMipTvJVSssT9i0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= @@ -1318,8 +1276,6 @@ github.com/valyala/fastjson v1.4.1/go.mod h1:nV6MsjxL2IMJQUoHDIrjEI7oLyeqK6aBD7E github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/vertica/vertica-sql-go v1.3.3 h1:fL+FKEAEy5ONmsvya2WH5T8bhkvY27y/Ik3ReR2T+Qw= -github.com/vertica/vertica-sql-go v1.3.3/go.mod h1:jnn2GFuv+O2Jcjktb7zyc4Utlbu9YVqpHH/lx63+1M4= github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc= github.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+xBAnxjb1X5vnTw= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= @@ -1328,21 +1284,13 @@ github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= -github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= -github.com/ydb-platform/ydb-go-genproto v0.0.0-20231012155159-f85a672542fd h1:dzWP1Lu+A40W883dK/Mr3xyDSM/2MggS8GtHT0qgAnE= -github.com/ydb-platform/ydb-go-genproto v0.0.0-20231012155159-f85a672542fd/go.mod h1:Er+FePu1dNUieD+XTMDduGpQuCPssK5Q4BjF+IIXJ3I= -github.com/ydb-platform/ydb-go-sdk/v3 v3.54.2 h1:E0yUuuX7UmPxXm92+yQCjMveLFO3zfvYFIJVuAqsVRA= -github.com/ydb-platform/ydb-go-sdk/v3 v3.54.2/go.mod h1:fjBLQ2TdQNl4bMjuWl9adoTGBypwUTPoGC+EqYqiIcU= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= @@ -1387,26 +1335,28 @@ 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.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/google.golang.org/grpc/otelgrpc v0.52.0 h1:vS1Ao/R55RNV4O7TA2Qopok8yN+X0LIP6RVWLFkprck= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0/go.mod h1:BMsdeOxN04K0L5FNUBfjFdvwWGNe/rkmSwH4Aelu/X0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= 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.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 v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= 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.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.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= +go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= +go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -1433,6 +1383,7 @@ go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.14.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= +go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= @@ -1465,8 +1416,8 @@ golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= -golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= -golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= +golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= +golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1477,8 +1428,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20240213143201-ec583247a57a h1:HinSgX1tJRX3KsL//Gxynpw5CTOAIPhgL4W8PNiIpVE= -golang.org/x/exp v0.0.0-20240213143201-ec583247a57a/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= +golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 h1:aAcj0Da7eBAtrTp03QXWvm88pSyOt+UgdZw2BFZ+lEw= +golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8/go.mod h1:CQ1k9gNrJ50XIzaKCRR2hssIjF07kZFEiieALBM/ARQ= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1506,8 +1457,8 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= -golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1554,7 +1505,6 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210331212208-0fccb6fa2b5c/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210423184538-5f58ad60dda6/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -1564,8 +1514,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1575,9 +1525,8 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210413134643-5e61552d6c78/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= -golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= +golang.org/x/oauth2 v0.20.0 h1:4mQdhULixXKP1rwYBW0vAijoXnkTG0BLCDRzfe1idMo= +golang.org/x/oauth2 v0.20.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1591,8 +1540,8 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1666,7 +1615,6 @@ golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1678,8 +1626,8 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -1688,8 +1636,8 @@ golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= -golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= -golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= +golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= +golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1703,8 +1651,8 @@ golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1776,8 +1724,8 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= -golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1785,8 +1733,6 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= gonum.org/v1/gonum v0.14.0 h1:2NiG67LD1tEH0D7kM+ps2V+fXmsAnpUeec7n8tcr4S0= gonum.org/v1/gonum v0.14.0/go.mod h1:AoWeoz0becf9QMWtE8iWXNXc27fK4fNeHNf/oMejGfU= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= @@ -1809,8 +1755,8 @@ google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz513 google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.149.0 h1:b2CqT6kG+zqJIVKRQ3ELJVLN1PwHZ6DJ3dW8yl82rgY= -google.golang.org/api v0.149.0/go.mod h1:Mwn1B7JTXrzXtnvmzQE2BD6bYZQ8DShKZDZbeN9I7qI= +google.golang.org/api v0.169.0 h1:QwWPy71FgMWqJN/l6jVlFHUa29a7dcUy02I8o799nPY= +google.golang.org/api v0.169.0/go.mod h1:gpNOiMA2tZ4mf5R9Iwf4rK/Dcz0fbdIgWYWVoxmsyLg= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1819,8 +1765,6 @@ google.golang.org/appengine v1.6.2/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -1855,7 +1799,6 @@ google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEY google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -1866,12 +1809,12 @@ google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210401141331-865547bb08e2/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 h1:I6WNifs6pF9tNdSob2W24JtyxIYjzFB9qDlpUC76q+U= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405/go.mod h1:3WDQMjmJk36UQhjQ89emUzb1mdaHcPeeAh4SCBKznB4= -google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b h1:CIC2YMXmIhYw6evmhPxBKJ4fmLbOFtXQN/GV3XOZR8k= -google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:IBQ646DjkDkvUIsVq/cc03FUFQ9wbZu7yE396YcL870= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= +google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y= +google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s= +google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 h1:P8OJ/WCl/Xo4E4zoe4/bifHpSmmKwARqyqE4nW6J2GQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -1893,11 +1836,9 @@ google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -google.golang.org/grpc/examples v0.0.0-20210424002626-9572fd6faeae/go.mod h1:Ly7ZA/ARzg8fnPU9TyZIxoz33sEUuWX7txiqs8lPTgE= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1911,8 +1852,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1965,30 +1906,22 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= -howett.net/plist v1.0.0 h1:7CrbWYbPPO/PyNy38b2EB/+gYbjCe2DXBxgtOOZbSQM= -howett.net/plist v1.0.0/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g= -lukechampine.com/uint128 v1.3.0 h1:cDdUVfRwDUDovz610ABgFD17nXD4/uDgVHl2sC3+sbo= -lukechampine.com/uint128 v1.3.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= -modernc.org/cc/v3 v3.41.0 h1:QoR1Sn3YWlmA1T4vLaKZfawdVtSiGx8H+cEojbC7v1Q= -modernc.org/cc/v3 v3.41.0/go.mod h1:Ni4zjJYJ04CDOhG7dn640WGfwBzfE0ecX8TyMB0Fv0Y= -modernc.org/ccgo/v3 v3.16.15 h1:KbDR3ZAVU+wiLyMESPtbtE/Add4elztFyfsWoNTgxS0= -modernc.org/ccgo/v3 v3.16.15/go.mod h1:yT7B+/E2m43tmMOT51GMoM98/MtHIcQQSleGnddkUNI= -modernc.org/libc v1.32.0 h1:yXatHTrACp3WaKNRCoZwUK7qj5V8ep1XyY0ka4oYcNc= -modernc.org/libc v1.32.0/go.mod h1:YAXkAZ8ktnkCKaN9sw/UDeUVkGYJ/YquGO4FTi5nmHE= +modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6 h1:5D53IMaUuA5InSeMu9eJtlQXS2NxAhyWQvkKEgXZhHI= +modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6/go.mod h1:Qz0X07sNOR1jWYCrJMEnbW/X55x206Q7Vt4mz6/wHp4= +modernc.org/libc v1.41.0 h1:g9YAc6BkKlgORsUWj+JwqoB1wU3o4DE3bM3yvA3k+Gk= +modernc.org/libc v1.41.0/go.mod h1:w0eszPsiXoOnoMJgrXjglgLuDy/bt5RR4y3QzUUeodY= modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4= modernc.org/mathutil v1.6.0/go.mod h1:Ui5Q9q1TR2gFm0AQRqQUaBWFLAhQpCwNcuhBOSedWPo= modernc.org/memory v1.7.2 h1:Klh90S215mmH8c9gO98QxQFsY+W451E8AnzjoE2ee1E= modernc.org/memory v1.7.2/go.mod h1:NO4NVCQy0N7ln+T9ngWqOQfi7ley4vpwvARR+Hjw95E= -modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4= -modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= -modernc.org/sqlite v1.27.0 h1:MpKAHoyYB7xqcwnUwkuD+npwEa0fojF0B5QRbN+auJ8= -modernc.org/sqlite v1.27.0/go.mod h1:Qxpazz0zH8Z1xCFyi5GSL3FzbtZ3fvbjmywNogldEW0= +modernc.org/sqlite v1.29.6 h1:0lOXGrycJPptfHDuohfYgNqoe4hu+gYuN/pKgY5XjS4= +modernc.org/sqlite v1.29.6/go.mod h1:S02dvcmm7TnTRvGhv8IGYyLnIt7AS2KPaB1F/71p75U= modernc.org/strutil v1.2.0 h1:agBi9dp1I+eOnxXeiZawM8F4LawKv4NzGWSaLfyeNZA= modernc.org/strutil v1.2.0/go.mod h1:/mdcBmfOibveCTBxUl5B5l6W+TTH1FXPLHZE6bTosX0= modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= -nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g= -nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= +nhooyr.io/websocket v1.8.10 h1:mv4p+MnGrLDcPlBoWsvPP7XCzTYMXP9F9eIGoKbgx7Q= +nhooyr.io/websocket v1.8.10/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c= nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= pgregory.net/rapid v0.5.5 h1:jkgx1TjbQPD/feRoK+S/mXw9e1uj6WilpHrXJowi6oA= pgregory.net/rapid v0.5.5/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= diff --git a/integration-tests/.tool-versions b/integration-tests/.tool-versions index 7b9e8ab6bf4..d623afb2832 100644 --- a/integration-tests/.tool-versions +++ b/integration-tests/.tool-versions @@ -1,4 +1,4 @@ -golang 1.21.7 +golang 1.22.5 k3d 5.4.6 kubectl 1.25.5 nodejs 20.13.1 diff --git a/integration-tests/Makefile b/integration-tests/Makefile index 9a85d52125c..1e6828fd35c 100644 --- a/integration-tests/Makefile +++ b/integration-tests/Makefile @@ -143,20 +143,35 @@ test_node_migrations_simulated_verbose: go test -timeout 1h -count=1 -v $(args) ./migration # Soak -.PHONY: test_soak_ocr -test_soak_ocr: +.PHONY: test_soak_ocr1 +test_soak_ocr1: . ./scripts/check_base64_env_var.sh - go test -v -count=1 -run ^TestOCRSoak$$ ./soak + go test -v -count=1 -run TestOCRv1Soak ./soak + +.PHONY: test_soak_ocr2 +test_soak_ocr2: + . ./scripts/check_base64_env_var.sh + go test -v -count=1 -run TestOCRv2Soak ./soak + +.PHONY: test_soak_forwarder_ocr1 +test_soak_forwarder_ocr1: + . ./scripts/check_base64_env_var.sh + go test -v -count=1 -run TestForwarderOCRv1Soak ./soak + +.PHONY: test_soak_forwarder_ocr2 +test_soak_forwarder_ocr2: + . ./scripts/check_base64_env_var.sh + go test -v -count=1 -run TestForwarderOCRv2Soak ./soak .PHONY: test_soak_ocr_reorg_1 test_soak_ocr_reorg_1: . ./scripts/check_base64_env_var.sh - go test -v -count=1 -run ^TestOCRSoak_GethReorgBelowFinality_FinalityTagDisabled$$ ./soak + go test -v -count=1 -run ^TestOCRSoak_GethReorgBelowFinality_FinalityTagDisabled$$ ./soak .PHONY: test_soak_ocr_reorg_2 test_soak_ocr_reorg_2: . ./scripts/check_base64_env_var.sh - go test -v -count=1 -run ^TestOCRSoak_GethReorgBelowFinality_FinalityTagEnabled$$ ./soak + go test -v -count=1 -run ^TestOCRSoak_GethReorgBelowFinality_FinalityTagEnabled$$ ./soak .PHONY: test_soak_ocr_gas_spike test_soak_ocr_gas_spike: @@ -178,10 +193,6 @@ test_soak_ocr_rpc_down_half_cl_nodes: . ./scripts/check_base64_env_var.sh go test -v -count=1 -run ^TestOCRSoak_RPCDownForHalfCLNodes$$ ./soak -.PHONY: test_soak_forwarder_ocr -test_soak_forwarder_ocr: - . ./scripts/check_base64_env_var.sh - go test -v -count=1 -run TestForwarderOCRSoak ./soak .PHONY: test_soak_automation test_soak_automation: @@ -226,4 +237,4 @@ run_test_with_local_image: build_docker_image # removes all occurrences of .run.id file in current folder and it's subdirectories # before making any changes lists all file locations and awaits user confirmation remove_test_execution_artefacts: - ./scripts/search_and_delete.sh .run.id \ No newline at end of file + ./scripts/search_and_delete.sh .run.id diff --git a/integration-tests/README.md b/integration-tests/README.md index d34b4426fd8..fcfefe97a73 100644 --- a/integration-tests/README.md +++ b/integration-tests/README.md @@ -127,4 +127,4 @@ Run soak/ocr_test.go with RPC network chaos by bringing down network to RPC node ```bash make test_soak_ocr_rpc_down_half_cl_nodes -``` \ No newline at end of file +``` diff --git a/integration-tests/actions/actions.go b/integration-tests/actions/actions.go index 6c3ae0f6069..65db18ad6f7 100644 --- a/integration-tests/actions/actions.go +++ b/integration-tests/actions/actions.go @@ -5,12 +5,16 @@ import ( "context" "crypto/ecdsa" "fmt" + "math" "math/big" + "math/rand" "strings" "sync" "testing" "time" + "github.com/pelletier/go-toml/v2" + geth "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/rpc" @@ -22,12 +26,13 @@ import ( "github.com/smartcontractkit/chainlink-testing-framework/testreporters" "github.com/smartcontractkit/chainlink-testing-framework/utils/conversions" "github.com/smartcontractkit/chainlink/integration-tests/contracts" - "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum" + ethContracts "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" + "github.com/rs/zerolog" "github.com/ethereum/go-ethereum/common" @@ -37,10 +42,12 @@ import ( gethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/pkg/errors" "github.com/test-go/testify/require" - "math" + ctfconfig "github.com/smartcontractkit/chainlink-testing-framework/config" "github.com/smartcontractkit/chainlink-testing-framework/utils/testcontext" + "github.com/smartcontractkit/chainlink/integration-tests/client" + "github.com/smartcontractkit/chainlink/integration-tests/types/config/node" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/link_token_interface" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/operator_factory" ) @@ -137,11 +144,12 @@ func DecodeTxInputData(abiString string, data []byte) (map[string]interface{}, e // todo - move to CTF func WaitForBlockNumberToBe( + ctx context.Context, waitForBlockNumberToBe uint64, client *seth.Client, wg *sync.WaitGroup, + desiredBlockNumberReached chan<- bool, timeout time.Duration, - t testing.TB, l zerolog.Logger, ) (uint64, error) { blockNumberChannel := make(chan uint64) @@ -160,7 +168,7 @@ func WaitForBlockNumberToBe( waitForBlockNumberToBe, latestBlockNumber) case <-ticker.C: go func() { - currentBlockNumber, err := client.Client.BlockNumber(testcontext.Get(t)) + currentBlockNumber, err := client.Client.BlockNumber(ctx) if err != nil { errorChannel <- err } @@ -174,6 +182,9 @@ func WaitForBlockNumberToBe( if latestBlockNumber >= waitForBlockNumberToBe { ticker.Stop() wg.Done() + if desiredBlockNumberReached != nil { + desiredBlockNumberReached <- true + } l.Info(). Uint64("Latest Block Number", latestBlockNumber). Uint64("Desired Block Number", waitForBlockNumberToBe). @@ -1069,7 +1080,7 @@ func SendLinkFundsToDeploymentAddresses( // GenerateUpkeepReport generates a report of performed, successful, reverted and stale upkeeps for a given registry contract based on transaction logs. In case of test failure it can help us // to triage the issue by providing more context. -func GenerateUpkeepReport(t *testing.T, chainClient *seth.Client, startBlock, endBlock *big.Int, instance contracts.KeeperRegistry, registryVersion ethereum.KeeperRegistryVersion) (performedUpkeeps, successfulUpkeeps, revertedUpkeeps, staleUpkeeps int, err error) { +func GenerateUpkeepReport(t *testing.T, chainClient *seth.Client, startBlock, endBlock *big.Int, instance contracts.KeeperRegistry, registryVersion ethContracts.KeeperRegistryVersion) (performedUpkeeps, successfulUpkeeps, revertedUpkeeps, staleUpkeeps int, err error) { registryLogs := []gethtypes.Log{} l := logging.GetTestLogger(t) @@ -1150,7 +1161,7 @@ func GenerateUpkeepReport(t *testing.T, chainClient *seth.Client, startBlock, en return } -func GetStalenessReportCleanupFn(t *testing.T, logger zerolog.Logger, chainClient *seth.Client, startBlock uint64, registry contracts.KeeperRegistry, registryVersion ethereum.KeeperRegistryVersion) func() { +func GetStalenessReportCleanupFn(t *testing.T, logger zerolog.Logger, chainClient *seth.Client, startBlock uint64, registry contracts.KeeperRegistry, registryVersion ethContracts.KeeperRegistryVersion) func() { return func() { if t.Failed() { endBlock, err := chainClient.Client.BlockNumber(context.Background()) @@ -1166,3 +1177,70 @@ func GetStalenessReportCleanupFn(t *testing.T, logger zerolog.Logger, chainClien } } } + +func BuildTOMLNodeConfigForK8s(testConfig ctfconfig.GlobalTestConfig, testNetwork blockchain.EVMNetwork) (string, error) { + nodeConfigInToml := testConfig.GetNodeConfig() + + nodeConfig, _, err := node.BuildChainlinkNodeConfig( + []blockchain.EVMNetwork{testNetwork}, + nodeConfigInToml.BaseConfigTOML, + nodeConfigInToml.CommonChainConfigTOML, + nodeConfigInToml.ChainConfigTOMLByChainID, + ) + + if err != nil { + return "", err + } + + if testConfig.GetPyroscopeConfig() != nil && *testConfig.GetPyroscopeConfig().Enabled { + nodeConfig.Pyroscope.Environment = testConfig.GetPyroscopeConfig().Environment + nodeConfig.Pyroscope.ServerAddress = testConfig.GetPyroscopeConfig().ServerUrl + } + + asStr, err := toml.Marshal(nodeConfig) + if err != nil { + return "", err + } + + return string(asStr), nil +} + +func IsOPStackChain(chainID int64) bool { + return chainID == 8453 || //BASE MAINNET + chainID == 84532 || //BASE SEPOLIA + chainID == 10 || //OPTIMISM MAINNET + chainID == 11155420 //OPTIMISM SEPOLIA +} + +func RandBool() bool { + return rand.Intn(2) == 1 +} + +func ContinuouslyGenerateTXsOnChain(sethClient *seth.Client, stopChannel chan bool, l zerolog.Logger) (bool, error) { + counterContract, err := contracts.DeployCounterContract(sethClient) + if err != nil { + return false, err + } + err = counterContract.Reset() + if err != nil { + return false, err + } + var count *big.Int + for { + select { + case <-stopChannel: + l.Info().Str("Number of generated transactions on chain", count.String()).Msg("Stopping generating txs on chain. Desired block number reached.") + return true, nil + default: + err = counterContract.Increment() + if err != nil { + return false, err + } + count, err = counterContract.Count() + if err != nil { + return false, err + } + l.Info().Str("Count", count.String()).Msg("Number of generated transactions on chain") + } + } +} diff --git a/integration-tests/actions/automation_ocr_helpers.go b/integration-tests/actions/automation_ocr_helpers.go index 22220af9d63..05c4501fbe6 100644 --- a/integration-tests/actions/automation_ocr_helpers.go +++ b/integration-tests/actions/automation_ocr_helpers.go @@ -12,6 +12,8 @@ import ( "github.com/pkg/errors" "github.com/smartcontractkit/seth" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_automation_registry_master_wrapper_2_3" + "github.com/ethereum/go-ethereum/common" "github.com/lib/pq" "github.com/stretchr/testify/require" @@ -41,8 +43,12 @@ func BuildAutoOCR2ConfigVars( deltaStage time.Duration, chainModuleAddress common.Address, reorgProtectionEnabled bool, + linkToken contracts.LinkToken, + wethToken contracts.WETHToken, + ethUSDFeed contracts.MockETHUSDFeed, + ) (contracts.OCRv2Config, error) { - return BuildAutoOCR2ConfigVarsWithKeyIndex(t, chainlinkNodes, registryConfig, registrar, deltaStage, 0, common.Address{}, chainModuleAddress, reorgProtectionEnabled) + return BuildAutoOCR2ConfigVarsWithKeyIndex(t, chainlinkNodes, registryConfig, registrar, deltaStage, 0, common.Address{}, chainModuleAddress, reorgProtectionEnabled, linkToken, wethToken, ethUSDFeed) } func BuildAutoOCR2ConfigVarsWithKeyIndex( @@ -55,6 +61,9 @@ func BuildAutoOCR2ConfigVarsWithKeyIndex( registryOwnerAddress common.Address, chainModuleAddress common.Address, reorgProtectionEnabled bool, + linkToken contracts.LinkToken, + wethToken contracts.WETHToken, + ethUSDFeed contracts.MockETHUSDFeed, ) (contracts.OCRv2Config, error) { l := logging.GetTestLogger(t) S, oracleIdentities, err := GetOracleIdentitiesWithKeyIndex(chainlinkNodes, keyIndex) @@ -69,7 +78,7 @@ func BuildAutoOCR2ConfigVarsWithKeyIndex( var offchainConfigVersion uint64 var offchainConfig []byte - if registryConfig.RegistryVersion == ethereum.RegistryVersion_2_1 || registryConfig.RegistryVersion == ethereum.RegistryVersion_2_2 { + if registryConfig.RegistryVersion == ethereum.RegistryVersion_2_1 || registryConfig.RegistryVersion == ethereum.RegistryVersion_2_2 || registryConfig.RegistryVersion == ethereum.RegistryVersion_2_3 { offC, err = json.Marshal(ocr2keepers30config.OffchainConfig{ TargetProbability: "0.999", TargetInRounds: 1, @@ -169,6 +178,31 @@ func BuildAutoOCR2ConfigVarsWithKeyIndex( ocrConfig.TypedOnchainConfig21 = registryConfig.Create21OnchainConfig(registrar, registryOwnerAddress) } else if registryConfig.RegistryVersion == ethereum.RegistryVersion_2_2 { ocrConfig.TypedOnchainConfig22 = registryConfig.Create22OnchainConfig(registrar, registryOwnerAddress, chainModuleAddress, reorgProtectionEnabled) + } else if registryConfig.RegistryVersion == ethereum.RegistryVersion_2_3 { + ocrConfig.TypedOnchainConfig23 = registryConfig.Create23OnchainConfig(registrar, registryOwnerAddress, chainModuleAddress, reorgProtectionEnabled) + ocrConfig.BillingTokens = []common.Address{ + common.HexToAddress(linkToken.Address()), + common.HexToAddress(wethToken.Address()), + } + + ocrConfig.BillingConfigs = []i_automation_registry_master_wrapper_2_3.AutomationRegistryBase23BillingConfig{ + { + GasFeePPB: 100, + FlatFeeMilliCents: big.NewInt(500), + PriceFeed: common.HexToAddress(ethUSDFeed.Address()), // ETH/USD feed and LINK/USD feed are the same + Decimals: 18, + FallbackPrice: big.NewInt(1000), + MinSpend: big.NewInt(200), + }, + { + GasFeePPB: 100, + FlatFeeMilliCents: big.NewInt(500), + PriceFeed: common.HexToAddress(ethUSDFeed.Address()), // ETH/USD feed and LINK/USD feed are the same + Decimals: 18, + FallbackPrice: big.NewInt(1000), + MinSpend: big.NewInt(200), + }, + } } l.Info().Msg("Done building OCR config") @@ -191,14 +225,14 @@ func CreateOCRKeeperJobs( bootstrapP2PId := bootstrapP2PIds.Data[0].Attributes.PeerID var contractVersion string - if registryVersion == ethereum.RegistryVersion_2_2 { + if registryVersion == ethereum.RegistryVersion_2_2 || registryVersion == ethereum.RegistryVersion_2_3 { contractVersion = "v2.1+" } else if registryVersion == ethereum.RegistryVersion_2_1 { contractVersion = "v2.1" } else if registryVersion == ethereum.RegistryVersion_2_0 { contractVersion = "v2.0" } else { - require.FailNow(t, fmt.Sprintf("v2.0, v2.1, and v2.2 are the only supported versions, but got something else: %v (iota)", registryVersion)) + require.FailNow(t, fmt.Sprintf("v2.0, v2.1, v2.2 and v2.3 are the only supported versions, but got something else: %v (iota)", registryVersion)) } bootstrapSpec := &client.OCR2TaskJobSpec{ @@ -265,18 +299,23 @@ func DeployAutoOCRRegistryAndRegistrar( registryVersion ethereum.KeeperRegistryVersion, registrySettings contracts.KeeperRegistrySettings, linkToken contracts.LinkToken, + wethToken contracts.WETHToken, + ethUSDFeed contracts.MockETHUSDFeed, ) (contracts.KeeperRegistry, contracts.KeeperRegistrar) { - registry := deployRegistry(t, client, registryVersion, registrySettings, linkToken) - registrar := deployRegistrar(t, client, registryVersion, registry, linkToken) + registry := deployRegistry(t, client, registryVersion, registrySettings, linkToken, wethToken, ethUSDFeed) + registrar := deployRegistrar(t, client, registryVersion, registry, linkToken, wethToken) return registry, registrar } // DeployConsumers deploys and registers keeper consumers. If ephemeral addresses are enabled, it will deploy and register the consumers from ephemeral addresses, but each upkpeep will be registered with root key address as the admin. Which means // that functions like setting upkeep configuration, pausing, unpausing, etc. will be done by the root key address. It deploys multicall contract and sends link funds to each deployment address. -func DeployConsumers(t *testing.T, chainClient *seth.Client, registry contracts.KeeperRegistry, registrar contracts.KeeperRegistrar, linkToken contracts.LinkToken, numberOfUpkeeps int, linkFundsForEachUpkeep *big.Int, upkeepGasLimit uint32, isLogTrigger bool, isMercury bool) ([]contracts.KeeperConsumer, []*big.Int) { - err := DeployMultiCallAndFundDeploymentAddresses(chainClient, linkToken, numberOfUpkeeps, linkFundsForEachUpkeep) - require.NoError(t, err, "Sending link funds to deployment addresses shouldn't fail") +func DeployConsumers(t *testing.T, chainClient *seth.Client, registry contracts.KeeperRegistry, registrar contracts.KeeperRegistrar, linkToken contracts.LinkToken, numberOfUpkeeps int, linkFundsForEachUpkeep *big.Int, upkeepGasLimit uint32, isLogTrigger bool, isMercury bool, isBillingTokenNative bool, wethToken contracts.WETHToken) ([]contracts.KeeperConsumer, []*big.Int) { + // Fund deployers with LINK, no need to do this for Native token + if !isBillingTokenNative { + err := DeployMultiCallAndFundDeploymentAddresses(chainClient, linkToken, numberOfUpkeeps, linkFundsForEachUpkeep) + require.NoError(t, err, "Sending link funds to deployment addresses shouldn't fail") + } upkeeps := DeployKeeperConsumers(t, chainClient, numberOfUpkeeps, isLogTrigger, isMercury) require.Equal(t, numberOfUpkeeps, len(upkeeps), "Number of upkeeps should match") @@ -285,7 +324,7 @@ func DeployConsumers(t *testing.T, chainClient *seth.Client, registry contracts. upkeepsAddresses = append(upkeepsAddresses, upkeep.Address()) } upkeepIds := RegisterUpkeepContracts( - t, chainClient, linkToken, linkFundsForEachUpkeep, upkeepGasLimit, registry, registrar, numberOfUpkeeps, upkeepsAddresses, isLogTrigger, isMercury, + t, chainClient, linkToken, linkFundsForEachUpkeep, upkeepGasLimit, registry, registrar, numberOfUpkeeps, upkeepsAddresses, isLogTrigger, isMercury, isBillingTokenNative, wethToken, ) require.Equal(t, numberOfUpkeeps, len(upkeepIds), "Number of upkeepIds should match") return upkeeps, upkeepIds @@ -318,7 +357,7 @@ func DeployPerformanceConsumers( for _, upkeep := range upkeeps { upkeepsAddresses = append(upkeepsAddresses, upkeep.Address()) } - upkeepIds := RegisterUpkeepContracts(t, chainClient, linkToken, linkFundsForEachUpkeep, upkeepGasLimit, registry, registrar, numberOfUpkeeps, upkeepsAddresses, false, false) + upkeepIds := RegisterUpkeepContracts(t, chainClient, linkToken, linkFundsForEachUpkeep, upkeepGasLimit, registry, registrar, numberOfUpkeeps, upkeepsAddresses, false, false, false, nil) return upkeeps, upkeepIds } @@ -344,7 +383,7 @@ func DeployPerformDataCheckerConsumers( for _, upkeep := range upkeeps { upkeepsAddresses = append(upkeepsAddresses, upkeep.Address()) } - upkeepIds := RegisterUpkeepContracts(t, chainClient, linkToken, linkFundsForEachUpkeep, upkeepGasLimit, registry, registrar, numberOfUpkeeps, upkeepsAddresses, false, false) + upkeepIds := RegisterUpkeepContracts(t, chainClient, linkToken, linkFundsForEachUpkeep, upkeepGasLimit, registry, registrar, numberOfUpkeeps, upkeepsAddresses, false, false, false, nil) return upkeeps, upkeepIds } @@ -376,12 +415,14 @@ func deployRegistrar( registryVersion ethereum.KeeperRegistryVersion, registry contracts.KeeperRegistry, linkToken contracts.LinkToken, + wethToken contracts.WETHToken, ) contracts.KeeperRegistrar { registrarSettings := contracts.KeeperRegistrarSettings{ AutoApproveConfigType: 2, AutoApproveMaxAllowed: math.MaxUint16, RegistryAddr: registry.Address(), MinLinkJuels: big.NewInt(0), + WETHTokenAddr: wethToken.Address(), } registrar, err := contracts.DeployKeeperRegistrar(client, registryVersion, linkToken.Address(), registrarSettings) require.NoError(t, err, "Deploying KeeperRegistrar contract shouldn't fail") @@ -394,6 +435,8 @@ func deployRegistry( registryVersion ethereum.KeeperRegistryVersion, registrySettings contracts.KeeperRegistrySettings, linkToken contracts.LinkToken, + wethToken contracts.WETHToken, + ethUSDFeed contracts.MockETHUSDFeed, ) contracts.KeeperRegistry { ef, err := contracts.DeployMockETHLINKFeed(client, big.NewInt(2e18)) require.NoError(t, err, "Deploying mock ETH-Link feed shouldn't fail") @@ -407,13 +450,16 @@ func deployRegistry( registry, err := contracts.DeployKeeperRegistry( client, &contracts.KeeperRegistryOpts{ - RegistryVersion: registryVersion, - LinkAddr: linkToken.Address(), - ETHFeedAddr: ef.Address(), - GasFeedAddr: gf.Address(), - TranscoderAddr: transcoder.Address(), - RegistrarAddr: ZeroAddress.Hex(), - Settings: registrySettings, + RegistryVersion: registryVersion, + LinkAddr: linkToken.Address(), + ETHFeedAddr: ef.Address(), + GasFeedAddr: gf.Address(), + TranscoderAddr: transcoder.Address(), + RegistrarAddr: ZeroAddress.Hex(), + Settings: registrySettings, + LinkUSDFeedAddr: ethUSDFeed.Address(), + NativeUSDFeedAddr: ethUSDFeed.Address(), + WrappedNativeAddr: wethToken.Address(), }, ) require.NoError(t, err, "Deploying KeeperRegistry contract shouldn't fail") diff --git a/integration-tests/actions/automationv2/actions.go b/integration-tests/actions/automationv2/actions.go index ced41dfb427..f7d495bda5a 100644 --- a/integration-tests/actions/automationv2/actions.go +++ b/integration-tests/actions/automationv2/actions.go @@ -25,6 +25,8 @@ import ( "golang.org/x/sync/errgroup" "gopkg.in/guregu/null.v4" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_automation_registry_master_wrapper_2_3" + ocr2keepers20config "github.com/smartcontractkit/chainlink-automation/pkg/v2/config" ocr2keepers30config "github.com/smartcontractkit/chainlink-automation/pkg/v3/config" @@ -61,6 +63,8 @@ type AutomationTest struct { LinkToken contracts.LinkToken Transcoder contracts.UpkeepTranscoder EthLinkFeed contracts.MockETHLINKFeed + EthUSDFeed contracts.MockETHUSDFeed + WETHToken contracts.WETHToken GasFeed contracts.MockGasFeed Registry contracts.KeeperRegistry Registrar contracts.KeeperRegistrar @@ -213,6 +217,43 @@ func (a *AutomationTest) LoadEthLinkFeed(address string) error { return nil } +func (a *AutomationTest) DeployEthUSDFeed() error { + // FallbackLinkPrice and FallbackETHPrice are the same + ethUSDFeed, err := contracts.DeployMockETHUSDFeed(a.ChainClient, a.RegistrySettings.FallbackLinkPrice) + if err != nil { + return err + } + a.EthUSDFeed = ethUSDFeed + return nil +} + +func (a *AutomationTest) LoadEthUSDFeed(address string) error { + ethUSDFeed, err := contracts.LoadMockETHUSDFeed(a.ChainClient, common.HexToAddress(address)) + if err != nil { + return err + } + a.EthUSDFeed = ethUSDFeed + return nil +} + +func (a *AutomationTest) DeployWETH() error { + wethToken, err := contracts.DeployWETHTokenContract(a.Logger, a.ChainClient) + if err != nil { + return err + } + a.WETHToken = wethToken + return nil +} + +func (a *AutomationTest) LoadWETH(address string) error { + wethToken, err := contracts.LoadWETHTokenContract(a.Logger, a.ChainClient, common.HexToAddress(address)) + if err != nil { + return err + } + a.WETHToken = wethToken + return nil +} + func (a *AutomationTest) DeployGasFeed() error { gasFeed, err := contracts.DeployMockGASFeed(a.ChainClient, a.RegistrySettings.FallbackGasPrice) if err != nil { @@ -233,13 +274,16 @@ func (a *AutomationTest) LoadEthGasFeed(address string) error { func (a *AutomationTest) DeployRegistry() error { registryOpts := &contracts.KeeperRegistryOpts{ - RegistryVersion: a.RegistrySettings.RegistryVersion, - LinkAddr: a.LinkToken.Address(), - ETHFeedAddr: a.EthLinkFeed.Address(), - GasFeedAddr: a.GasFeed.Address(), - TranscoderAddr: a.Transcoder.Address(), - RegistrarAddr: utils.ZeroAddress.Hex(), - Settings: a.RegistrySettings, + RegistryVersion: a.RegistrySettings.RegistryVersion, + LinkAddr: a.LinkToken.Address(), + ETHFeedAddr: a.EthLinkFeed.Address(), + GasFeedAddr: a.GasFeed.Address(), + TranscoderAddr: a.Transcoder.Address(), + RegistrarAddr: utils.ZeroAddress.Hex(), + Settings: a.RegistrySettings, + LinkUSDFeedAddr: a.EthUSDFeed.Address(), + NativeUSDFeedAddr: a.EthUSDFeed.Address(), + WrappedNativeAddr: a.WETHToken.Address(), } registry, err := contracts.DeployKeeperRegistry(a.ChainClient, registryOpts) if err != nil { @@ -263,6 +307,7 @@ func (a *AutomationTest) DeployRegistrar() error { return fmt.Errorf("registry must be deployed or loaded before registrar") } a.RegistrarSettings.RegistryAddr = a.Registry.Address() + a.RegistrarSettings.WETHTokenAddr = a.WETHToken.Address() registrar, err := contracts.DeployKeeperRegistrar(a.ChainClient, a.RegistrySettings.RegistryVersion, a.LinkToken.Address(), a.RegistrarSettings) if err != nil { return err @@ -361,14 +406,14 @@ func (a *AutomationTest) AddBootstrapJob() error { func (a *AutomationTest) AddAutomationJobs() error { var contractVersion string - if a.RegistrySettings.RegistryVersion == ethereum.RegistryVersion_2_2 { + if a.RegistrySettings.RegistryVersion == ethereum.RegistryVersion_2_2 || a.RegistrySettings.RegistryVersion == ethereum.RegistryVersion_2_3 { contractVersion = "v2.1+" } else if a.RegistrySettings.RegistryVersion == ethereum.RegistryVersion_2_1 { contractVersion = "v2.1" } else if a.RegistrySettings.RegistryVersion == ethereum.RegistryVersion_2_0 { contractVersion = "v2.0" } else { - return fmt.Errorf("v2.0, v2.1, and v2.2 are the only supported versions") + return fmt.Errorf("v2.0, v2.1, v2.2 and v2.3 are the only supported versions") } pluginCfg := map[string]interface{}{ "contractVersion": "\"" + contractVersion + "\"", @@ -473,13 +518,13 @@ func (a *AutomationTest) SetConfigOnRegistry() error { if err != nil { return errors.Join(err, fmt.Errorf("failed to build config args")) } - case ethereum.RegistryVersion_2_1, ethereum.RegistryVersion_2_2: + case ethereum.RegistryVersion_2_1, ethereum.RegistryVersion_2_2, ethereum.RegistryVersion_2_3: signerOnchainPublicKeys, transmitterAccounts, f, _, offchainConfigVersion, offchainConfig, err = calculateOCR3ConfigArgs(a, S, oracleIdentities) if err != nil { return errors.Join(err, fmt.Errorf("failed to build config args")) } default: - return fmt.Errorf("v2.0, v2.1, and v2.2 are the only supported versions") + return fmt.Errorf("v2.0, v2.1, v2.2 and v2.3 are the only supported versions") } var signers []common.Address @@ -517,6 +562,31 @@ func (a *AutomationTest) SetConfigOnRegistry() error { 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()) + } else if a.RegistrySettings.RegistryVersion == ethereum.RegistryVersion_2_3 { + ocrConfig.TypedOnchainConfig23 = a.RegistrySettings.Create23OnchainConfig(a.Registrar.Address(), a.UpkeepPrivilegeManager, a.Registry.ChainModuleAddress(), a.Registry.ReorgProtectionEnabled()) + ocrConfig.BillingTokens = []common.Address{ + common.HexToAddress(a.LinkToken.Address()), + common.HexToAddress(a.WETHToken.Address()), + } + + ocrConfig.BillingConfigs = []i_automation_registry_master_wrapper_2_3.AutomationRegistryBase23BillingConfig{ + { + GasFeePPB: 100, + FlatFeeMilliCents: big.NewInt(500), + PriceFeed: common.HexToAddress(a.EthUSDFeed.Address()), // ETH/USD feed and LINK/USD feed are the same + Decimals: 18, + FallbackPrice: big.NewInt(1000), + MinSpend: big.NewInt(200), + }, + { + GasFeePPB: 100, + FlatFeeMilliCents: big.NewInt(500), + PriceFeed: common.HexToAddress(a.EthUSDFeed.Address()), // ETH/USD feed and LINK/USD feed are the same + Decimals: 18, + FallbackPrice: big.NewInt(1000), + MinSpend: big.NewInt(200), + }, + } } err = a.Registry.SetConfigTypeSafe(ocrConfig) if err != nil { @@ -790,11 +860,17 @@ func (a *AutomationTest) SetupAutomationDeployment(t *testing.T) { err = a.DeployLINK() require.NoError(t, err, "Error deploying link token contract") + err = a.DeployWETH() + require.NoError(t, err, "Error deploying weth token contract") + err = a.DeployEthLinkFeed() require.NoError(t, err, "Error deploying eth link feed contract") err = a.DeployGasFeed() require.NoError(t, err, "Error deploying gas feed contract") + err = a.DeployEthUSDFeed() + require.NoError(t, err, "Error deploying eth usd feed contract") + err = a.DeployTranscoder() require.NoError(t, err, "Error deploying transcoder contract") diff --git a/integration-tests/actions/keeper_helpers.go b/integration-tests/actions/keeper_helpers.go index 882544e858a..ee1662cc180 100644 --- a/integration-tests/actions/keeper_helpers.go +++ b/integration-tests/actions/keeper_helpers.go @@ -8,6 +8,7 @@ import ( "strconv" "testing" + "github.com/ethereum/go-ethereum/core/types" "github.com/google/uuid" "github.com/pkg/errors" "github.com/smartcontractkit/seth" @@ -115,7 +116,7 @@ func DeployKeeperContracts( } registrar := DeployKeeperRegistrar(t, client, registryVersion, linkToken, registrarSettings, registry) - upkeeps, upkeepIds := DeployConsumers(t, client, registry, registrar, linkToken, numberOfUpkeeps, linkFundsForEachUpkeep, upkeepGasLimit, false, false) + upkeeps, upkeepIds := DeployConsumers(t, client, registry, registrar, linkToken, numberOfUpkeeps, linkFundsForEachUpkeep, upkeepGasLimit, false, false, false, nil) return registry, registrar, upkeeps, upkeepIds } @@ -178,7 +179,7 @@ func DeployPerformanceKeeperContracts( upkeepsAddresses = append(upkeepsAddresses, upkeep.Address()) } - upkeepIds := RegisterUpkeepContracts(t, chainClient, linkToken, linkFundsForEachUpkeep, upkeepGasLimit, registry, registrar, numberOfContracts, upkeepsAddresses, false, false) + upkeepIds := RegisterUpkeepContracts(t, chainClient, linkToken, linkFundsForEachUpkeep, upkeepGasLimit, registry, registrar, numberOfContracts, upkeepsAddresses, false, false, false, nil) return registry, registrar, upkeeps, upkeepIds } @@ -236,7 +237,7 @@ func DeployPerformDataCheckerContracts( upkeepsAddresses = append(upkeepsAddresses, upkeep.Address()) } - upkeepIds := RegisterUpkeepContracts(t, chainClient, linkToken, linkFundsForEachUpkeep, upkeepGasLimit, registry, registrar, numberOfContracts, upkeepsAddresses, false, false) + upkeepIds := RegisterUpkeepContracts(t, chainClient, linkToken, linkFundsForEachUpkeep, upkeepGasLimit, registry, registrar, numberOfContracts, upkeepsAddresses, false, false, false, nil) return registry, registrar, upkeeps, upkeepIds } @@ -259,14 +260,14 @@ func DeployKeeperRegistrar( return registrar } -func RegisterUpkeepContracts(t *testing.T, client *seth.Client, linkToken contracts.LinkToken, linkFunds *big.Int, upkeepGasLimit uint32, registry contracts.KeeperRegistry, registrar contracts.KeeperRegistrar, numberOfContracts int, upkeepAddresses []string, isLogTrigger bool, isMercury bool) []*big.Int { +func RegisterUpkeepContracts(t *testing.T, client *seth.Client, linkToken contracts.LinkToken, fundsForEachUpkeep *big.Int, upkeepGasLimit uint32, registry contracts.KeeperRegistry, registrar contracts.KeeperRegistrar, numberOfContracts int, upkeepAddresses []string, isLogTrigger bool, isMercury bool, isBillingTokenNative bool, wethToken contracts.WETHToken) []*big.Int { checkData := make([][]byte, 0) for i := 0; i < numberOfContracts; i++ { checkData = append(checkData, []byte("0")) } return RegisterUpkeepContractsWithCheckData( - t, client, linkToken, linkFunds, upkeepGasLimit, registry, registrar, - numberOfContracts, upkeepAddresses, checkData, isLogTrigger, isMercury) + t, client, linkToken, fundsForEachUpkeep, upkeepGasLimit, registry, registrar, + numberOfContracts, upkeepAddresses, checkData, isLogTrigger, isMercury, isBillingTokenNative, wethToken) } type upkeepRegistrationResult struct { @@ -284,7 +285,7 @@ type upkeepConfig struct { type UpkeepId = *big.Int -func RegisterUpkeepContractsWithCheckData(t *testing.T, client *seth.Client, linkToken contracts.LinkToken, linkFunds *big.Int, upkeepGasLimit uint32, registry contracts.KeeperRegistry, registrar contracts.KeeperRegistrar, numberOfContracts int, upkeepAddresses []string, checkData [][]byte, isLogTrigger bool, isMercury bool) []*big.Int { +func RegisterUpkeepContractsWithCheckData(t *testing.T, client *seth.Client, linkToken contracts.LinkToken, fundsForEachUpkeep *big.Int, upkeepGasLimit uint32, registry contracts.KeeperRegistry, registrar contracts.KeeperRegistrar, numberOfContracts int, upkeepAddresses []string, checkData [][]byte, isLogTrigger bool, isMercury bool, isBillingTokenNative bool, wethToken contracts.WETHToken) []*big.Int { l := logging.GetTestLogger(t) concurrency, err := GetAndAssertCorrectConcurrency(client, 1) @@ -300,44 +301,69 @@ func RegisterUpkeepContractsWithCheckData(t *testing.T, client *seth.Client, lin var registerUpkeepFn = func(resultCh chan upkeepRegistrationResult, errorCh chan error, executorNum int, config upkeepConfig) { id := uuid.New().String() keyNum := executorNum + 1 // key 0 is the root key + var tx *types.Transaction + + if isBillingTokenNative { + // register upkeep with native token + tx, err = registrar.RegisterUpkeepFromKey( + keyNum, + fmt.Sprintf("upkeep_%s", id), + []byte("test@mail.com"), + config.address, + upkeepGasLimit, + client.MustGetRootKeyAddress().Hex(), // upkeep Admin + config.data, + fundsForEachUpkeep, + wethToken.Address(), + isLogTrigger, + isMercury, + ) + if err != nil { + errorCh <- errors.Wrapf(err, "[id: %s] Failed to register upkeep at %s", id, config.address) + return + } + } else { + // register upkeep with LINK + req, err := registrar.EncodeRegisterRequest( + fmt.Sprintf("upkeep_%s", id), + []byte("test@mail.com"), + config.address, + upkeepGasLimit, + client.MustGetRootKeyAddress().Hex(), // upkeep Admin + config.data, + fundsForEachUpkeep, + 0, + client.Addresses[keyNum].Hex(), + isLogTrigger, + isMercury, + linkToken.Address(), + ) + + if err != nil { + errorCh <- errors.Wrapf(err, "[id: %s] Failed to encode register request for upkeep at %s", id, config.address) + return + } - req, err := registrar.EncodeRegisterRequest( - fmt.Sprintf("upkeep_%s", id), - []byte("test@mail.com"), - config.address, - upkeepGasLimit, - client.MustGetRootKeyAddress().Hex(), // upkeep Admin - config.data, - linkFunds, - 0, - client.Addresses[keyNum].Hex(), - isLogTrigger, - isMercury, - ) - - if err != nil { - errorCh <- errors.Wrapf(err, "[id: %s] Failed to encode register request for upkeep at %s", id, config.address) - return - } - - balance, err := linkToken.BalanceOf(context.Background(), client.Addresses[keyNum].Hex()) - if err != nil { - errorCh <- errors.Wrapf(err, "[id: %s]Failed to get LINK balance of %s", id, client.Addresses[keyNum].Hex()) - return - } + balance, err := linkToken.BalanceOf(context.Background(), client.Addresses[keyNum].Hex()) + if err != nil { + errorCh <- errors.Wrapf(err, "[id: %s]Failed to get LINK balance of %s", id, client.Addresses[keyNum].Hex()) + return + } - // not stricly necessary, but helps us to avoid an errorless revert if there is not enough LINK - if balance.Cmp(linkFunds) < 0 { - errorCh <- fmt.Errorf("[id: %s] Not enough LINK balance for %s. Has: %s. Needs: %s", id, client.Addresses[keyNum].Hex(), balance.String(), linkFunds.String()) - return - } + // not strictly necessary, but helps us to avoid an errorless revert if there is not enough LINK + if balance.Cmp(fundsForEachUpkeep) < 0 { + errorCh <- fmt.Errorf("[id: %s] Not enough LINK balance for %s. Has: %s. Needs: %s", id, client.Addresses[keyNum].Hex(), balance.String(), fundsForEachUpkeep.String()) + return + } - tx, err := linkToken.TransferAndCallFromKey(registrar.Address(), linkFunds, req, keyNum) - if err != nil { - errorCh <- errors.Wrapf(err, "[id: %s] Failed to register upkeep at %s", id, config.address) - return + tx, err = linkToken.TransferAndCallFromKey(registrar.Address(), fundsForEachUpkeep, req, keyNum) + if err != nil { + errorCh <- errors.Wrapf(err, "[id: %s] Failed to register upkeep at %s", id, config.address) + return + } } + // parse txn to get upkeep ID receipt, err := client.Client.TransactionReceipt(context.Background(), tx.Hash()) if err != nil { errorCh <- errors.Wrapf(err, "[id: %s] Failed to get receipt for upkeep at %s and tx hash %s", id, config.address, tx.Hash()) @@ -404,10 +430,10 @@ func DeployKeeperConsumers(t *testing.T, client *seth.Client, numberOfContracts // v2.1 only: Conditional based contract with Mercury enabled keeperConsumerInstance, err = contracts.DeployAutomationStreamsLookupUpkeepConsumerFromKey(client, keyNum, big.NewInt(1000), big.NewInt(5), false, true, false) // 1000 block test range } else if isLogTrigger { - // v2.1 only: Log triggered based contract without Mercury + // v2.1+: Log triggered based contract without Mercury keeperConsumerInstance, err = contracts.DeployAutomationLogTriggerConsumerFromKey(client, keyNum, big.NewInt(1000)) // 1000 block test range } else { - // v2.0 and v2.1: Conditional based contract without Mercury + // v2.0+: Conditional based contract without Mercury keeperConsumerInstance, err = contracts.DeployUpkeepCounterFromKey(client, keyNum, big.NewInt(999999), big.NewInt(5)) } @@ -579,7 +605,7 @@ func RegisterNewUpkeeps( err = SendLinkFundsToDeploymentAddresses(chainClient, concurrency, numberOfNewUpkeeps, operationsPerAddress, multicallAddress, linkFundsForEachUpkeep, linkToken) require.NoError(t, err, "Sending link funds to deployment addresses shouldn't fail") - newUpkeepIDs := RegisterUpkeepContracts(t, chainClient, linkToken, linkFundsForEachUpkeep, upkeepGasLimit, registry, registrar, numberOfNewUpkeeps, addressesOfNewUpkeeps, false, false) + newUpkeepIDs := RegisterUpkeepContracts(t, chainClient, linkToken, linkFundsForEachUpkeep, upkeepGasLimit, registry, registrar, numberOfNewUpkeeps, addressesOfNewUpkeeps, false, false, false, nil) return newlyDeployedUpkeeps, newUpkeepIDs } diff --git a/integration-tests/actions/ocr2vrf_actions/ocr2vrf_config_helpers.go b/integration-tests/actions/ocr2vrf_actions/ocr2vrf_config_helpers.go deleted file mode 100644 index 58e394cb797..00000000000 --- a/integration-tests/actions/ocr2vrf_actions/ocr2vrf_config_helpers.go +++ /dev/null @@ -1,338 +0,0 @@ -package ocr2vrf_actions - -import ( - "crypto/ed25519" - "encoding/hex" - "errors" - "fmt" - "strconv" - "testing" - "time" - - "github.com/ethereum/go-ethereum/common" - "github.com/lib/pq" - "github.com/stretchr/testify/require" - "go.dedis.ch/kyber/v3" - "go.dedis.ch/kyber/v3/group/edwards25519" - "gopkg.in/guregu/null.v4" - - "github.com/smartcontractkit/libocr/offchainreporting2plus/confighelper" - "github.com/smartcontractkit/libocr/offchainreporting2plus/types" - - "github.com/smartcontractkit/chainlink-vrf/altbn_128" - "github.com/smartcontractkit/chainlink-vrf/dkg" - "github.com/smartcontractkit/chainlink-vrf/ocr2vrf" - ocr2vrftypes "github.com/smartcontractkit/chainlink-vrf/types" - - "github.com/smartcontractkit/chainlink-testing-framework/logging" - "github.com/smartcontractkit/chainlink/v2/core/services/job" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/chaintype" - - "github.com/smartcontractkit/chainlink/integration-tests/client" - "github.com/smartcontractkit/chainlink/integration-tests/contracts" -) - -// CreateOCR2VRFJobs bootstraps the first node and to the other nodes sends ocr jobs -func CreateOCR2VRFJobs( - t *testing.T, - bootstrapNode *client.ChainlinkK8sClient, - nonBootstrapNodes []*client.ChainlinkK8sClient, - OCR2VRFPluginConfig *OCR2VRFPluginConfig, - chainID int64, - keyIndex int, -) { - l := logging.GetTestLogger(t) - p2pV2Bootstrapper := createBootstrapJob(t, bootstrapNode, OCR2VRFPluginConfig.DKGConfig.DKGContractAddress, chainID) - - createNonBootstrapJobs(t, nonBootstrapNodes, OCR2VRFPluginConfig, chainID, keyIndex, p2pV2Bootstrapper) - l.Info().Msg("Done creating OCR automation jobs") -} - -func createNonBootstrapJobs( - t *testing.T, - nonBootstrapNodes []*client.ChainlinkK8sClient, - OCR2VRFPluginConfig *OCR2VRFPluginConfig, - chainID int64, - keyIndex int, - P2Pv2Bootstrapper string, -) { - for index, nonBootstrapNode := range nonBootstrapNodes { - nodeTransmitterAddress, err := nonBootstrapNode.EthAddresses() - require.NoError(t, err, "Shouldn't fail getting primary ETH address from OCR node %d", index) - nodeOCRKeys, err := nonBootstrapNode.MustReadOCR2Keys() - require.NoError(t, err, "Shouldn't fail getting OCR keys from OCR node %d", index) - var nodeOCRKeyId []string - for _, key := range nodeOCRKeys.Data { - if key.Attributes.ChainType == string(chaintype.EVM) { - nodeOCRKeyId = append(nodeOCRKeyId, key.ID) - break - } - } - - OCR2VRFJobSpec := client.OCR2TaskJobSpec{ - Name: "ocr2", - JobType: "offchainreporting2", - OCR2OracleSpec: job.OCR2OracleSpec{ - PluginType: "ocr2vrf", - Relay: "evm", - RelayConfig: map[string]interface{}{ - "chainID": int(chainID), - }, - ContractID: OCR2VRFPluginConfig.VRFBeaconConfig.VRFBeaconAddress, - OCRKeyBundleID: null.StringFrom(nodeOCRKeyId[keyIndex]), - TransmitterID: null.StringFrom(nodeTransmitterAddress[keyIndex]), - P2PV2Bootstrappers: pq.StringArray{P2Pv2Bootstrapper}, - PluginConfig: map[string]interface{}{ - "dkgEncryptionPublicKey": fmt.Sprintf("\"%s\"", OCR2VRFPluginConfig.DKGConfig.DKGKeyConfigs[index].DKGEncryptionPublicKey), - "dkgSigningPublicKey": fmt.Sprintf("\"%s\"", OCR2VRFPluginConfig.DKGConfig.DKGKeyConfigs[index].DKGSigningPublicKey), - "dkgKeyID": fmt.Sprintf("\"%s\"", OCR2VRFPluginConfig.DKGConfig.DKGKeyID), - "dkgContractAddress": fmt.Sprintf("\"%s\"", OCR2VRFPluginConfig.DKGConfig.DKGContractAddress), - "vrfCoordinatorAddress": fmt.Sprintf("\"%s\"", OCR2VRFPluginConfig.VRFCoordinatorAddress), - "linkEthFeedAddress": fmt.Sprintf("\"%s\"", OCR2VRFPluginConfig.LinkEthFeedAddress), - }, - }, - } - _, err = nonBootstrapNode.MustCreateJob(&OCR2VRFJobSpec) - require.NoError(t, err, "Shouldn't fail creating OCR Task job on OCR node %d", index) - } -} - -func createBootstrapJob(t *testing.T, bootstrapNode *client.ChainlinkK8sClient, dkgAddress string, chainID int64) string { - bootstrapP2PIds, err := bootstrapNode.MustReadP2PKeys() - require.NoError(t, err, "Shouldn't fail reading P2P keys from bootstrap node") - bootstrapP2PId := bootstrapP2PIds.Data[0].Attributes.PeerID - - bootstrapSpec := &client.OCR2TaskJobSpec{ - Name: "ocr2 bootstrap node", - JobType: "bootstrap", - OCR2OracleSpec: job.OCR2OracleSpec{ - ContractID: dkgAddress, - Relay: "evm", - RelayConfig: map[string]interface{}{ - "chainID": int(chainID), - }, - }, - } - _, err = bootstrapNode.MustCreateJob(bootstrapSpec) - require.NoError(t, err, "Shouldn't fail creating bootstrap job on bootstrap node") - return fmt.Sprintf("%s@%s:%d", bootstrapP2PId, bootstrapNode.InternalIP(), 6690) -} - -func BuildOCR2DKGConfigVars( - t *testing.T, - ocr2VRFPluginConfig *OCR2VRFPluginConfig, -) contracts.OCRv2Config { - l := logging.GetTestLogger(t) - var onchainPublicKeys []common.Address - for _, onchainPublicKey := range ocr2VRFPluginConfig.OCR2Config.OnchainPublicKeys { - onchainPublicKeys = append(onchainPublicKeys, common.HexToAddress(onchainPublicKey)) - } - - var transmitters []common.Address - for _, transmitterAddress := range ocr2VRFPluginConfig.OCR2Config.TransmitterAddresses { - transmitters = append(transmitters, common.HexToAddress(transmitterAddress)) - } - oracleIdentities, err := toOraclesIdentityList( - onchainPublicKeys, - ocr2VRFPluginConfig.OCR2Config.OffchainPublicKeys, - ocr2VRFPluginConfig.OCR2Config.ConfigPublicKeys, - ocr2VRFPluginConfig.OCR2Config.PeerIds, - ocr2VRFPluginConfig.OCR2Config.TransmitterAddresses, - ) - require.NoError(t, err) - - ed25519Suite := edwards25519.NewBlakeSHA256Ed25519() - var signingKeys []kyber.Point - for _, dkgKey := range ocr2VRFPluginConfig.DKGConfig.DKGKeyConfigs { - signingKeyBytes, err := hex.DecodeString(dkgKey.DKGSigningPublicKey) - require.NoError(t, err) - signingKeyPoint := ed25519Suite.Point() - err = signingKeyPoint.UnmarshalBinary(signingKeyBytes) - require.NoError(t, err) - signingKeys = append(signingKeys, signingKeyPoint) - } - - altbn128Suite := &altbn_128.PairingSuite{} - var encryptionKeys []kyber.Point - for _, dkgKey := range ocr2VRFPluginConfig.DKGConfig.DKGKeyConfigs { - encryptionKeyBytes, err := hex.DecodeString(dkgKey.DKGEncryptionPublicKey) - require.NoError(t, err) - encryptionKeyPoint := altbn128Suite.G1().Point() - err = encryptionKeyPoint.UnmarshalBinary(encryptionKeyBytes) - require.NoError(t, err) - encryptionKeys = append(encryptionKeys, encryptionKeyPoint) - } - - keyIDBytes, err := DecodeHexTo32ByteArray(ocr2VRFPluginConfig.DKGConfig.DKGKeyID) - require.NoError(t, err, "Shouldn't fail decoding DKG key ID") - - offchainConfig, err := dkg.OffchainConfig(encryptionKeys, signingKeys, &altbn_128.G1{}, &ocr2vrftypes.PairingTranslation{ - Suite: &altbn_128.PairingSuite{}, - }) - require.NoError(t, err) - onchainConfig, err := dkg.OnchainConfig(dkg.KeyID(keyIDBytes)) - require.NoError(t, err) - - _, _, f, onchainConfig, offchainConfigVersion, offchainConfig, err := - confighelper.ContractSetConfigArgsForTests( - 30*time.Second, // deltaProgress time.Duration, - 10*time.Second, // deltaResend time.Duration, - 10*time.Millisecond, // deltaRound time.Duration, - 20*time.Millisecond, // deltaGrace time.Duration, - 20*time.Millisecond, // deltaStage time.Duration, - 3, // rMax uint8, - ocr2VRFPluginConfig.OCR2Config.Schedule, // s []int, - oracleIdentities, // oracles []OracleIdentityExtra, - offchainConfig, - 10*time.Millisecond, // maxDurationQuery time.Duration, - 10*time.Second, // maxDurationObservation time.Duration, - 10*time.Second, // maxDurationReport time.Duration, - 10*time.Millisecond, // maxDurationShouldAcceptFinalizedReport time.Duration, - 1*time.Second, // maxDurationShouldTransmitAcceptedReport time.Duration, - 1, // f int, - onchainConfig, // onchainConfig []byte, - ) - require.NoError(t, err, "Shouldn't fail building OCR config") - - l.Info().Msg("Done building DKG OCR config") - return contracts.OCRv2Config{ - Signers: onchainPublicKeys, - Transmitters: transmitters, - F: f, - OnchainConfig: onchainConfig, - OffchainConfigVersion: offchainConfigVersion, - OffchainConfig: offchainConfig, - } -} - -func toOraclesIdentityList( - onchainPubKeys []common.Address, - offchainPubKeys, - configPubKeys, - peerIDs, - transmitters []string, -) ([]confighelper.OracleIdentityExtra, error) { - offchainPubKeysBytes := []types.OffchainPublicKey{} - for _, pkHex := range offchainPubKeys { - pkBytes, err := hex.DecodeString(pkHex) - if err != nil { - return nil, err - } - pkBytesFixed := [ed25519.PublicKeySize]byte{} - n := copy(pkBytesFixed[:], pkBytes) - if n != ed25519.PublicKeySize { - return nil, errors.New("wrong num elements copied") - } - - offchainPubKeysBytes = append(offchainPubKeysBytes, types.OffchainPublicKey(pkBytesFixed)) - } - - configPubKeysBytes := []types.ConfigEncryptionPublicKey{} - for _, pkHex := range configPubKeys { - pkBytes, err := hex.DecodeString(pkHex) - if err != nil { - return nil, err - } - pkBytesFixed := [ed25519.PublicKeySize]byte{} - n := copy(pkBytesFixed[:], pkBytes) - if n != ed25519.PublicKeySize { - return nil, errors.New("wrong num elements copied") - } - - configPubKeysBytes = append(configPubKeysBytes, types.ConfigEncryptionPublicKey(pkBytesFixed)) - } - - o := []confighelper.OracleIdentityExtra{} - for index := range configPubKeys { - o = append(o, confighelper.OracleIdentityExtra{ - OracleIdentity: confighelper.OracleIdentity{ - OnchainPublicKey: onchainPubKeys[index][:], - OffchainPublicKey: offchainPubKeysBytes[index], - PeerID: peerIDs[index], - TransmitAccount: types.Account(transmitters[index]), - }, - ConfigEncryptionPublicKey: configPubKeysBytes[index], - }) - } - return o, nil -} - -func DecodeHexTo32ByteArray(val string) ([32]byte, error) { - var byteArray [32]byte - decoded, err := hex.DecodeString(val) - if err != nil { - return [32]byte{}, err - } - if len(decoded) != 32 { - return [32]byte{}, fmt.Errorf("expected value to be 32 bytes but received %d bytes", len(decoded)) - } - copy(byteArray[:], decoded) - return byteArray, err -} - -func BuildOCR2VRFConfigVars( - t *testing.T, - ocr2VRFPluginConfig *OCR2VRFPluginConfig, -) contracts.OCRv2Config { - l := logging.GetTestLogger(t) - var onchainPublicKeys []common.Address - for _, onchainPublicKey := range ocr2VRFPluginConfig.OCR2Config.OnchainPublicKeys { - onchainPublicKeys = append(onchainPublicKeys, common.HexToAddress(onchainPublicKey)) - } - - var transmitters []common.Address - for _, transmitterAddress := range ocr2VRFPluginConfig.OCR2Config.TransmitterAddresses { - transmitters = append(transmitters, common.HexToAddress(transmitterAddress)) - } - - oracleIdentities, err := toOraclesIdentityList( - onchainPublicKeys, - ocr2VRFPluginConfig.OCR2Config.OffchainPublicKeys, - ocr2VRFPluginConfig.OCR2Config.ConfigPublicKeys, - ocr2VRFPluginConfig.OCR2Config.PeerIds, - ocr2VRFPluginConfig.OCR2Config.TransmitterAddresses, - ) - require.NoError(t, err) - - confDelays := make(map[uint32]struct{}) - - for _, c := range ocr2VRFPluginConfig.VRFBeaconConfig.ConfDelays { - confDelay, err := strconv.ParseUint(c, 0, 32) - require.NoError(t, err) - confDelays[uint32(confDelay)] = struct{}{} - } - - onchainConfig := ocr2vrf.OnchainConfig(confDelays) - - _, _, f, onchainConfig, offchainConfigVersion, offchainConfig, err := - confighelper.ContractSetConfigArgsForTests( - 30*time.Second, // deltaProgress time.Duration, - 10*time.Second, // deltaResend time.Duration, - 10*time.Second, // deltaRound time.Duration, - 20*time.Second, // deltaGrace time.Duration, - 20*time.Second, // deltaStage time.Duration, - 3, // rMax uint8, - ocr2VRFPluginConfig.OCR2Config.Schedule, // s []int, - oracleIdentities, // oracles []OracleIdentityExtra, - ocr2vrf.OffchainConfig(ocr2VRFPluginConfig.VRFBeaconConfig.CoordinatorConfig), - 10*time.Millisecond, // maxDurationQuery time.Duration, - 10*time.Second, // maxDurationObservation time.Duration, - 10*time.Second, // maxDurationReport time.Duration, - 5*time.Second, // maxDurationShouldAcceptFinalizedReport time.Duration, - 1*time.Second, // maxDurationShouldTransmitAcceptedReport time.Duration, - 1, // f int, - onchainConfig, // onchainConfig []byte, - ) - require.NoError(t, err) - - l.Info().Msg("Done building VRF OCR config") - return contracts.OCRv2Config{ - Signers: onchainPublicKeys, - Transmitters: transmitters, - F: f, - OnchainConfig: onchainConfig, - OffchainConfigVersion: offchainConfigVersion, - OffchainConfig: offchainConfig, - } - -} diff --git a/integration-tests/actions/ocr2vrf_actions/ocr2vrf_constants/ocr2vrf_constants.go b/integration-tests/actions/ocr2vrf_actions/ocr2vrf_constants/ocr2vrf_constants.go deleted file mode 100644 index 7f17be3fd84..00000000000 --- a/integration-tests/actions/ocr2vrf_actions/ocr2vrf_constants/ocr2vrf_constants.go +++ /dev/null @@ -1,31 +0,0 @@ -package ocr2vrf_constants - -import ( - "math/big" - "time" - - ocr2vrftypes "github.com/smartcontractkit/chainlink-vrf/types" -) - -var ( - LinkEthFeedResponse = big.NewInt(1e18) - LinkFundingAmount = big.NewInt(100) - BeaconPeriodBlocksCount = big.NewInt(3) - EthFundingAmount = big.NewFloat(1) - NumberOfRandomWordsToRequest = uint16(2) - ConfirmationDelay = big.NewInt(1) - RandomnessFulfilmentTransmissionEventTimeout = time.Minute * 6 - RandomnessRedeemTransmissionEventTimeout = time.Minute * 5 - //keyId can be any random value - KeyID = "aee00d81f822f882b6fe28489822f59ebb21ea95c0ae21d9f67c0239461148fc" - - CoordinatorConfig = &ocr2vrftypes.CoordinatorConfig{ - CacheEvictionWindowSeconds: 60, - BatchGasLimit: 5_000_000, - CoordinatorOverhead: 50_000, - CallbackOverhead: 50_000, - BlockGasOverhead: 50_000, - LookbackBlocks: 1_000, - } - VRFBeaconAllowedConfirmationDelays = []string{"1", "2", "3", "4", "5", "6", "7", "8"} -) diff --git a/integration-tests/actions/ocr2vrf_actions/ocr2vrf_models.go b/integration-tests/actions/ocr2vrf_actions/ocr2vrf_models.go deleted file mode 100644 index 08580203380..00000000000 --- a/integration-tests/actions/ocr2vrf_actions/ocr2vrf_models.go +++ /dev/null @@ -1,37 +0,0 @@ -package ocr2vrf_actions - -import ocr2vrftypes "github.com/smartcontractkit/chainlink-vrf/types" - -type DKGKeyConfig struct { - DKGEncryptionPublicKey string - DKGSigningPublicKey string -} - -type DKGConfig struct { - DKGKeyConfigs []DKGKeyConfig - DKGKeyID string - DKGContractAddress string -} - -type VRFBeaconConfig struct { - VRFBeaconAddress string - ConfDelays []string - CoordinatorConfig *ocr2vrftypes.CoordinatorConfig -} - -type OCR2Config struct { - OnchainPublicKeys []string - OffchainPublicKeys []string - PeerIds []string - ConfigPublicKeys []string - TransmitterAddresses []string - Schedule []int -} - -type OCR2VRFPluginConfig struct { - OCR2Config OCR2Config - DKGConfig DKGConfig - VRFBeaconConfig VRFBeaconConfig - VRFCoordinatorAddress string - LinkEthFeedAddress string -} diff --git a/integration-tests/actions/ocr2vrf_actions/ocr2vrf_steps.go b/integration-tests/actions/ocr2vrf_actions/ocr2vrf_steps.go deleted file mode 100644 index cda6fa72ca2..00000000000 --- a/integration-tests/actions/ocr2vrf_actions/ocr2vrf_steps.go +++ /dev/null @@ -1,363 +0,0 @@ -package ocr2vrf_actions - -import ( - "math/big" - "strings" - "testing" - "time" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/stretchr/testify/require" - - "github.com/smartcontractkit/seth" - - ocr2vrftypes "github.com/smartcontractkit/chainlink-vrf/types" - - "github.com/smartcontractkit/chainlink-testing-framework/blockchain" - "github.com/smartcontractkit/chainlink-testing-framework/logging" - "github.com/smartcontractkit/chainlink-testing-framework/utils/testcontext" - - "github.com/smartcontractkit/chainlink/integration-tests/actions" - chainlinkutils "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore/chaintype" - - "github.com/smartcontractkit/chainlink/integration-tests/actions/ocr2vrf_actions/ocr2vrf_constants" - "github.com/smartcontractkit/chainlink/integration-tests/client" - "github.com/smartcontractkit/chainlink/integration-tests/contracts" -) - -func SetAndWaitForVRFBeaconProcessToFinish(t *testing.T, ocr2VRFPluginConfig *OCR2VRFPluginConfig, vrfBeacon contracts.VRFBeacon) { - l := logging.GetTestLogger(t) - ocr2VrfConfig := BuildOCR2VRFConfigVars(t, ocr2VRFPluginConfig) - l.Debug().Interface("OCR2 VRF Config", ocr2VrfConfig).Msg("OCR2 VRF Config prepared") - - err := vrfBeacon.SetConfig( - ocr2VrfConfig.Signers, - ocr2VrfConfig.Transmitters, - ocr2VrfConfig.F, - ocr2VrfConfig.OnchainConfig, - ocr2VrfConfig.OffchainConfigVersion, - ocr2VrfConfig.OffchainConfig, - ) - require.NoError(t, err, "Error setting OCR config for VRFBeacon contract") - - vrfConfigSetEvent, err := vrfBeacon.WaitForConfigSetEvent(time.Minute) - require.NoError(t, err, "Error waiting for ConfigSet Event for VRFBeacon contract") - l.Info().Interface("Event", vrfConfigSetEvent).Msg("OCR2 VRF Config was set") -} - -func SetAndWaitForDKGProcessToFinish(t *testing.T, ocr2VRFPluginConfig *OCR2VRFPluginConfig, dkg contracts.DKG) { - l := logging.GetTestLogger(t) - ocr2DkgConfig := BuildOCR2DKGConfigVars(t, ocr2VRFPluginConfig) - - // set config for DKG OCR - l.Debug().Interface("OCR2 DKG Config", ocr2DkgConfig).Msg("OCR2 DKG Config prepared") - err := dkg.SetConfig( - ocr2DkgConfig.Signers, - ocr2DkgConfig.Transmitters, - ocr2DkgConfig.F, - ocr2DkgConfig.OnchainConfig, - ocr2DkgConfig.OffchainConfigVersion, - ocr2DkgConfig.OffchainConfig, - ) - require.NoError(t, err, "Error setting OCR config for DKG contract") - - // wait for the event ConfigSet from DKG contract - dkgConfigSetEvent, err := dkg.WaitForConfigSetEvent(time.Minute) - require.NoError(t, err, "Error waiting for ConfigSet Event for DKG contract") - l.Info().Interface("Event", dkgConfigSetEvent).Msg("OCR2 DKG Config Set") - // wait for the event Transmitted from DKG contract, meaning that OCR committee has sent out the Public key and Shares - dkgSharesTransmittedEvent, err := dkg.WaitForTransmittedEvent(time.Minute * 5) - require.NoError(t, err) - l.Info().Interface("Event", dkgSharesTransmittedEvent).Msg("DKG Shares were generated and transmitted by OCR Committee") -} - -func SetAndGetOCR2VRFPluginConfig( - t *testing.T, - nonBootstrapNodes []*client.ChainlinkK8sClient, - dkg contracts.DKG, - vrfBeacon contracts.VRFBeacon, - coordinator contracts.VRFCoordinatorV3, - mockETHLinkFeed contracts.MockETHLINKFeed, - keyID string, - vrfBeaconAllowedConfirmationDelays []string, - coordinatorConfig *ocr2vrftypes.CoordinatorConfig, -) *OCR2VRFPluginConfig { - var ( - dkgKeyConfigs []DKGKeyConfig - transmitters []string - ocrConfigPubKeys []string - peerIDs []string - ocrOnchainPubKeys []string - ocrOffchainPubKeys []string - schedule []int - ) - - for _, node := range nonBootstrapNodes { - dkgSignKey, err := node.MustCreateDkgSignKey() - require.NoError(t, err, "Error creating DKG Sign Keys") - - dkgEncryptKey, err := node.MustCreateDkgEncryptKey() - require.NoError(t, err, "Error creating DKG Encrypt Keys") - - ethKeys, err := node.MustReadETHKeys() - require.NoError(t, err) - for _, key := range ethKeys.Data { - transmitters = append(transmitters, key.Attributes.Address) - } - - p2pKeys, err := node.MustReadP2PKeys() - require.NoError(t, err, "Shouldn't fail reading P2P keys from node") - - peerId := p2pKeys.Data[0].Attributes.PeerID - peerIDs = append(peerIDs, peerId) - - ocr2Keys, err := node.MustReadOCR2Keys() - require.NoError(t, err, "Shouldn't fail reading OCR2 keys from node") - var ocr2Config client.OCR2KeyAttributes - for _, key := range ocr2Keys.Data { - if key.Attributes.ChainType == string(chaintype.EVM) { - ocr2Config = key.Attributes - break - } - } - - offchainPubKey := strings.TrimPrefix(ocr2Config.OffChainPublicKey, "ocr2off_evm_") - ocrOffchainPubKeys = append(ocrOffchainPubKeys, offchainPubKey) - - configPubKey := strings.TrimPrefix(ocr2Config.ConfigPublicKey, "ocr2cfg_evm_") - ocrConfigPubKeys = append(ocrConfigPubKeys, configPubKey) - - onchainPubKey := strings.TrimPrefix(ocr2Config.OnChainPublicKey, "ocr2on_evm_") - ocrOnchainPubKeys = append(ocrOnchainPubKeys, onchainPubKey) - - schedule = append(schedule, 1) - - dkgKeyConfigs = append(dkgKeyConfigs, DKGKeyConfig{ - DKGEncryptionPublicKey: dkgEncryptKey.Data.Attributes.PublicKey, - DKGSigningPublicKey: dkgSignKey.Data.Attributes.PublicKey, - }) - } - - ocr2VRFPluginConfig := &OCR2VRFPluginConfig{ - OCR2Config: OCR2Config{ - OnchainPublicKeys: ocrOnchainPubKeys, - OffchainPublicKeys: ocrOffchainPubKeys, - ConfigPublicKeys: ocrConfigPubKeys, - PeerIds: peerIDs, - TransmitterAddresses: transmitters, - Schedule: schedule, - }, - - DKGConfig: DKGConfig{ - DKGKeyConfigs: dkgKeyConfigs, - DKGKeyID: keyID, - DKGContractAddress: dkg.Address(), - }, - VRFBeaconConfig: VRFBeaconConfig{ - VRFBeaconAddress: vrfBeacon.Address(), - ConfDelays: vrfBeaconAllowedConfirmationDelays, - CoordinatorConfig: coordinatorConfig, - }, - VRFCoordinatorAddress: coordinator.Address(), - LinkEthFeedAddress: mockETHLinkFeed.Address(), - } - return ocr2VRFPluginConfig -} - -func FundVRFCoordinatorV3Subscription(t *testing.T, linkToken contracts.LinkToken, coordinator contracts.VRFCoordinatorV3, subscriptionID, linkFundingAmount *big.Int) { - encodedSubId, err := chainlinkutils.ABIEncode(`[{"type":"uint256"}]`, subscriptionID) - require.NoError(t, err, "Error Abi encoding subscriptionID") - _, err = linkToken.TransferAndCall(coordinator.Address(), big.NewInt(0).Mul(linkFundingAmount, big.NewInt(1e18)), encodedSubId) - require.NoError(t, err, "Error sending Link token") -} - -func DeployOCR2VRFContracts(t *testing.T, chainClient *seth.Client, linkToken contracts.LinkToken, beaconPeriodBlocksCount *big.Int, keyID string) (contracts.DKG, contracts.VRFCoordinatorV3, contracts.VRFBeacon, contracts.VRFBeaconConsumer) { - dkg, err := contracts.DeployDKG(chainClient) - require.NoError(t, err, "Error deploying DKG Contract") - - coordinator, err := contracts.DeployOCR2VRFCoordinator(chainClient, beaconPeriodBlocksCount, linkToken.Address()) - require.NoError(t, err, "Error deploying OCR2VRFCoordinator Contract") - - vrfBeacon, err := contracts.DeployVRFBeacon(chainClient, coordinator.Address(), linkToken.Address(), dkg.Address(), keyID) - require.NoError(t, err, "Error deploying VRFBeacon Contract") - - consumer, err := contracts.DeployVRFBeaconConsumer(chainClient, coordinator.Address(), beaconPeriodBlocksCount) - require.NoError(t, err, "Error deploying VRFBeaconConsumer Contract") - - return dkg, coordinator, vrfBeacon, consumer -} - -func RequestAndRedeemRandomness( - t *testing.T, - consumer contracts.VRFBeaconConsumer, - vrfBeacon contracts.VRFBeacon, - numberOfRandomWordsToRequest uint16, - subscriptionID, - confirmationDelay *big.Int, - randomnessTransmissionEventTimeout time.Duration, -) *big.Int { - l := logging.GetTestLogger(t) - receipt, err := consumer.RequestRandomness( - numberOfRandomWordsToRequest, - subscriptionID, - confirmationDelay, - ) - require.NoError(t, err, "Error requesting randomness from Consumer Contract") - l.Info().Interface("TX Hash", receipt.TxHash).Msg("Randomness requested from Consumer contract") - - requestID := getRequestId(t, consumer, receipt, confirmationDelay) - - newTransmissionEvent, err := vrfBeacon.WaitForNewTransmissionEvent(randomnessTransmissionEventTimeout) - require.NoError(t, err, "Error waiting for NewTransmission event from VRF Beacon Contract") - l.Info().Interface("NewTransmission event", newTransmissionEvent).Msg("Randomness transmitted by DON") - - err = consumer.RedeemRandomness(subscriptionID, requestID) - require.NoError(t, err, "Error redeeming randomness from Consumer Contract") - - return requestID -} - -func RequestRandomnessFulfillmentAndWaitForFulfilment( - t *testing.T, - consumer contracts.VRFBeaconConsumer, - vrfBeacon contracts.VRFBeacon, - numberOfRandomWordsToRequest uint16, - subscriptionID *big.Int, - confirmationDelay *big.Int, - randomnessTransmissionEventTimeout time.Duration, -) *big.Int { - l := logging.GetTestLogger(t) - receipt, err := consumer.RequestRandomnessFulfillment( - numberOfRandomWordsToRequest, - subscriptionID, - confirmationDelay, - 200_000, - 100_000, - nil, - ) - require.NoError(t, err, "Error requesting Randomness Fulfillment") - l.Info().Interface("TX Hash", receipt.TxHash).Msg("Randomness Fulfillment requested from Consumer contract") - - requestID := getRequestId(t, consumer, receipt, confirmationDelay) - - newTransmissionEvent, err := vrfBeacon.WaitForNewTransmissionEvent(randomnessTransmissionEventTimeout) - require.NoError(t, err, "Error waiting for NewTransmission event from VRF Beacon Contract") - l.Info().Interface("NewTransmission event", newTransmissionEvent).Msg("Randomness Fulfillment transmitted by DON") - - return requestID -} - -func getRequestId(t *testing.T, consumer contracts.VRFBeaconConsumer, receipt *types.Receipt, confirmationDelay *big.Int) *big.Int { - periodBlocks, err := consumer.IBeaconPeriodBlocks(testcontext.Get(t)) - require.NoError(t, err, "Error getting Beacon Period block count") - - blockNumber := receipt.BlockNumber - periodOffset := new(big.Int).Mod(blockNumber, periodBlocks) - nextBeaconOutputHeight := new(big.Int).Sub(new(big.Int).Add(blockNumber, periodBlocks), periodOffset) - - requestID, err := consumer.GetRequestIdsBy(testcontext.Get(t), nextBeaconOutputHeight, confirmationDelay) - require.NoError(t, err, "Error getting requestID from consumer contract") - - return requestID -} - -func SetupOCR2VRFUniverse( - t *testing.T, - linkToken contracts.LinkToken, - mockETHLinkFeed contracts.MockETHLINKFeed, - chainClient *seth.Client, - nodeAddresses []common.Address, - chainlinkNodes []*client.ChainlinkK8sClient, - testNetwork blockchain.EVMNetwork, -) (contracts.DKG, contracts.VRFCoordinatorV3, contracts.VRFBeacon, contracts.VRFBeaconConsumer, *big.Int) { - l := logging.GetTestLogger(t) - - // Deploy DKG contract - // Deploy VRFCoordinator(beaconPeriodBlocks, linkAddress, linkEthfeedAddress) - // Deploy VRFBeacon - // Deploy Consumer Contract - dkgContract, coordinatorContract, vrfBeaconContract, consumerContract := DeployOCR2VRFContracts( - t, - chainClient, - linkToken, - ocr2vrf_constants.BeaconPeriodBlocksCount, - ocr2vrf_constants.KeyID, - ) - - // Add VRFBeacon as DKG client - err := dkgContract.AddClient(ocr2vrf_constants.KeyID, vrfBeaconContract.Address()) - require.NoError(t, err, "Error adding client to DKG Contract") - // Adding VRFBeacon as producer in VRFCoordinator - err = coordinatorContract.SetProducer(vrfBeaconContract.Address()) - require.NoError(t, err, "Error setting Producer for VRFCoordinator contract") - err = coordinatorContract.SetConfig(2.5e6, 160 /* 5 EVM words */) - require.NoError(t, err, "Error setting config for VRFCoordinator contract") - - // Subscription: - //1. Create Subscription - err = coordinatorContract.CreateSubscription() - require.NoError(t, err, "Error creating subscription in VRFCoordinator contract") - subID, err := coordinatorContract.FindSubscriptionID() - require.NoError(t, err) - - //2. Add Consumer to subscription - err = coordinatorContract.AddConsumer(subID, consumerContract.Address()) - require.NoError(t, err, "Error adding a consumer to a subscription in VRFCoordinator contract") - - //3. fund subscription with LINK token - FundVRFCoordinatorV3Subscription( - t, - linkToken, - coordinatorContract, - subID, - ocr2vrf_constants.LinkFundingAmount, - ) - - // set Payees for VRFBeacon ((address which gets the reward) for each transmitter) - nonBootstrapNodeAddresses := nodeAddresses[1:] - err = vrfBeaconContract.SetPayees(nonBootstrapNodeAddresses, nonBootstrapNodeAddresses) - require.NoError(t, err, "Error setting Payees in VRFBeacon Contract") - - // fund OCR Nodes (so that they can transmit) - nodes := contracts.ChainlinkK8sClientToChainlinkNodeWithKeysAndAddress(chainlinkNodes) - err = actions.FundChainlinkNodesFromRootAddress(l, chainClient, nodes, ocr2vrf_constants.EthFundingAmount) - require.NoError(t, err, "Error funding Nodes") - - bootstrapNode := chainlinkNodes[0] - nonBootstrapNodes := chainlinkNodes[1:] - - // Create DKG Sign and Encrypt keys for each non-bootstrap node - // set Job specs for each node - ocr2VRFPluginConfig := SetAndGetOCR2VRFPluginConfig( - t, - nonBootstrapNodes, - dkgContract, - vrfBeaconContract, - coordinatorContract, - mockETHLinkFeed, - ocr2vrf_constants.KeyID, - ocr2vrf_constants.VRFBeaconAllowedConfirmationDelays, - ocr2vrf_constants.CoordinatorConfig, - ) - // Create Jobs for Bootstrap and non-boostrap nodes - CreateOCR2VRFJobs( - t, - bootstrapNode, - nonBootstrapNodes, - ocr2VRFPluginConfig, - testNetwork.ChainID, - 0, - ) - - // set config for DKG OCR, - // wait for the event ConfigSet from DKG contract - // wait for the event Transmitted from DKG contract, meaning that OCR committee has sent out the Public key and Shares - SetAndWaitForDKGProcessToFinish(t, ocr2VRFPluginConfig, dkgContract) - - // set config for VRFBeacon OCR, - // wait for the event ConfigSet from VRFBeacon contract - SetAndWaitForVRFBeaconProcessToFinish(t, ocr2VRFPluginConfig, vrfBeaconContract) - return dkgContract, coordinatorContract, vrfBeaconContract, consumerContract, subID -} diff --git a/integration-tests/actions/vrf/common/actions.go b/integration-tests/actions/vrf/common/actions.go index db8b44efe95..e599c705ef0 100644 --- a/integration-tests/actions/vrf/common/actions.go +++ b/integration-tests/actions/vrf/common/actions.go @@ -10,19 +10,17 @@ import ( "testing" "time" - seth_utils "github.com/smartcontractkit/chainlink-testing-framework/utils/seth" - + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/go-resty/resty/v2" - - "github.com/ethereum/go-ethereum/common" "github.com/google/uuid" "github.com/rs/zerolog" - "github.com/smartcontractkit/seth" ctf_test_env "github.com/smartcontractkit/chainlink-testing-framework/docker/test_env" "github.com/smartcontractkit/chainlink-testing-framework/utils/conversions" + seth_utils "github.com/smartcontractkit/chainlink-testing-framework/utils/seth" + "github.com/smartcontractkit/chainlink/integration-tests/actions" "github.com/smartcontractkit/chainlink/integration-tests/client" "github.com/smartcontractkit/chainlink/integration-tests/contracts" diff --git a/integration-tests/actions/vrf/vrfv2/contract_steps.go b/integration-tests/actions/vrf/vrfv2/contract_steps.go index 4ea49a9b728..324b65b5d6c 100644 --- a/integration-tests/actions/vrf/vrfv2/contract_steps.go +++ b/integration-tests/actions/vrf/vrfv2/contract_steps.go @@ -320,7 +320,7 @@ func FundSubscriptions( for _, subID := range subIDs { //Link Billing amountJuels := conversions.EtherToWei(subscriptionFundingAmountLink) - err := FundVRFCoordinatorV2Subscription(linkAddress, coordinator, subID, amountJuels) + err := FundSubscriptionWithLink(linkAddress, coordinator, subID, amountJuels) if err != nil { return fmt.Errorf("%s, err %w", vrfcommon.ErrFundSubWithLinkToken, err) } @@ -328,7 +328,7 @@ func FundSubscriptions( return nil } -func FundVRFCoordinatorV2Subscription( +func FundSubscriptionWithLink( linkToken contracts.LinkToken, coordinator contracts.VRFCoordinatorV2, subscriptionID uint64, diff --git a/integration-tests/actions/vrf/vrfv2plus/contract_steps.go b/integration-tests/actions/vrf/vrfv2plus/contract_steps.go index 8d06678690f..479b00d952e 100644 --- a/integration-tests/actions/vrf/vrfv2plus/contract_steps.go +++ b/integration-tests/actions/vrf/vrfv2plus/contract_steps.go @@ -10,7 +10,6 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/rs/zerolog" "github.com/shopspring/decimal" - "github.com/smartcontractkit/seth" "github.com/smartcontractkit/chainlink-testing-framework/utils/conversions" @@ -19,12 +18,13 @@ import ( "github.com/smartcontractkit/chainlink/integration-tests/client" "github.com/smartcontractkit/chainlink/integration-tests/contracts" tc "github.com/smartcontractkit/chainlink/integration-tests/testconfig" - vrfv2plus_config "github.com/smartcontractkit/chainlink/integration-tests/testconfig/vrfv2plus" + vrfv2plusconfig "github.com/smartcontractkit/chainlink/integration-tests/testconfig/vrfv2plus" chainlinkutils "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils" ) func DeployVRFV2_5Contracts( chainClient *seth.Client, + configGeneral *vrfv2plusconfig.General, ) (*vrfcommon.VRFContracts, error) { bhs, err := contracts.DeployBlockhashStore(chainClient) if err != nil { @@ -34,9 +34,25 @@ func DeployVRFV2_5Contracts( if err != nil { return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrDeployBatchBlockHashStore, err) } - coordinator, err := contracts.DeployVRFCoordinatorV2_5(chainClient, bhs.Address()) - if err != nil { - return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, ErrDeployCoordinatorV2Plus, err) + var coordinator contracts.VRFCoordinatorV2_5 + if actions.IsOPStackChain(chainClient.ChainID) { + opStackCoordinator, err := contracts.DeployVRFCoordinatorV2_5_Optimism(chainClient, bhs.Address()) + if err != nil { + return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, ErrDeployCoordinatorV2Plus, err) + } + err = opStackCoordinator.SetL1FeeCalculation(configGeneral.L1FeeCalculationMode, configGeneral.L1FeeCoefficient) + if err != nil { + return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, ErrSetL1FeeCalculation, err) + } + coordinator, err = contracts.LoadVRFCoordinatorV2_5(chainClient, opStackCoordinator.Address.String()) + if err != nil { + return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrLoadingCoordinator, err) + } + } else { + coordinator, err = contracts.DeployVRFCoordinatorV2_5(chainClient, bhs.Address()) + if err != nil { + return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, ErrDeployCoordinatorV2Plus, err) + } } batchCoordinator, err := contracts.DeployBatchVRFCoordinatorV2Plus(chainClient, coordinator.Address()) if err != nil { @@ -101,7 +117,7 @@ func VRFV2PlusUpgradedVersionRegisterProvingKey( return provingKey, nil } -func FundVRFCoordinatorV2_5Subscription( +func FundSubscriptionWithLink( linkToken contracts.LinkToken, coordinator contracts.VRFCoordinatorV2_5, subscriptionID *big.Int, @@ -127,6 +143,7 @@ func CreateFundSubsAndAddConsumers( coordinator contracts.VRFCoordinatorV2_5, consumers []contracts.VRFv2PlusLoadTestConsumer, numberOfSubToCreate int, + subFundingType string, ) ([]*big.Int, error) { subIDs, err := CreateSubsAndFund( ctx, @@ -136,6 +153,7 @@ func CreateFundSubsAndAddConsumers( linkToken, coordinator, numberOfSubToCreate, + subFundingType, ) if err != nil { return nil, err @@ -162,9 +180,10 @@ func CreateSubsAndFund( subscriptionFundingAmountLink *big.Float, linkToken contracts.LinkToken, coordinator contracts.VRFCoordinatorV2_5, - subAmountToCreate int, + numberOfSubsToCreate int, + subFundingType string, ) ([]*big.Int, error) { - subs, err := CreateSubs(ctx, sethClient, coordinator, subAmountToCreate) + subs, err := CreateSubs(ctx, sethClient, coordinator, numberOfSubsToCreate) if err != nil { return nil, err } @@ -174,6 +193,7 @@ func CreateSubsAndFund( linkToken, coordinator, subs, + subFundingType, ) if err != nil { return nil, err @@ -236,22 +256,43 @@ func FundSubscriptions( linkAddress contracts.LinkToken, coordinator contracts.VRFCoordinatorV2_5, subIDs []*big.Int, + subFundingType string, ) error { for _, subID := range subIDs { - //Native Billing - amountWei := conversions.EtherToWei(subscriptionFundingAmountNative) - err := coordinator.FundSubscriptionWithNative( - subID, - amountWei, - ) - if err != nil { - return fmt.Errorf(vrfcommon.ErrGenericFormat, ErrFundSubWithNativeToken, err) - } - //Link Billing - amountJuels := conversions.EtherToWei(subscriptionFundingAmountLink) - err = FundVRFCoordinatorV2_5Subscription(linkAddress, coordinator, subID, amountJuels) - if err != nil { - return fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrFundSubWithLinkToken, err) + switch vrfv2plusconfig.BillingType(subFundingType) { + case vrfv2plusconfig.BillingType_Link: + amountJuels := conversions.EtherToWei(subscriptionFundingAmountLink) + err := FundSubscriptionWithLink(linkAddress, coordinator, subID, amountJuels) + if err != nil { + return fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrFundSubWithLinkToken, err) + } + case vrfv2plusconfig.BillingType_Native: + amountWei := conversions.EtherToWei(subscriptionFundingAmountNative) + err := coordinator.FundSubscriptionWithNative( + subID, + amountWei, + ) + if err != nil { + return fmt.Errorf(vrfcommon.ErrGenericFormat, ErrFundSubWithNativeToken, err) + } + case vrfv2plusconfig.BillingType_Link_and_Native: + //Native Billing + amountWei := conversions.EtherToWei(subscriptionFundingAmountNative) + err := coordinator.FundSubscriptionWithNative( + subID, + amountWei, + ) + if err != nil { + return fmt.Errorf(vrfcommon.ErrGenericFormat, ErrFundSubWithNativeToken, err) + } + //Link Billing + amountJuels := conversions.EtherToWei(subscriptionFundingAmountLink) + err = FundSubscriptionWithLink(linkAddress, coordinator, subID, amountJuels) + if err != nil { + return fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrFundSubWithLinkToken, err) + } + default: + return fmt.Errorf("invalid billing type: %s", subFundingType) } } return nil @@ -287,7 +328,7 @@ func RequestRandomness( vrfKeyData *vrfcommon.VRFKeyData, subID *big.Int, isNativeBilling bool, - config *vrfv2plus_config.General, + config *vrfv2plusconfig.General, l zerolog.Logger, keyNum int, ) (*contracts.CoordinatorRandomWordsRequested, error) { @@ -326,7 +367,7 @@ func RequestRandomnessAndWaitForFulfillment( vrfKeyData *vrfcommon.VRFKeyData, subID *big.Int, isNativeBilling bool, - config *vrfv2plus_config.General, + config *vrfv2plusconfig.General, l zerolog.Logger, keyNum int, ) (*contracts.CoordinatorRandomWordsRequested, *contracts.CoordinatorRandomWordsFulfilled, error) { @@ -368,10 +409,28 @@ func DeployVRFV2PlusDirectFundingContracts( coordinator contracts.VRFCoordinatorV2_5, consumerContractsAmount int, wrapperSubId *big.Int, + configGeneral *vrfv2plusconfig.General, ) (*VRFV2PlusWrapperContracts, error) { - vrfv2PlusWrapper, err := contracts.DeployVRFV2PlusWrapper(sethClient, linkTokenAddress, linkEthFeedAddress, coordinator.Address(), wrapperSubId) - if err != nil { - return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, ErrDeployWrapper, err) + var vrfv2PlusWrapper contracts.VRFV2PlusWrapper + var err error + if actions.IsOPStackChain(sethClient.ChainID) { + opStackWrapper, err := contracts.DeployVRFV2PlusWrapperOptimism(sethClient, linkTokenAddress, linkEthFeedAddress, coordinator.Address(), wrapperSubId) + if err != nil { + return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, ErrDeployWrapper, err) + } + err = opStackWrapper.SetL1FeeCalculation(configGeneral.L1FeeCalculationMode, configGeneral.L1FeeCoefficient) + if err != nil { + return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, ErrSetL1FeeCalculation, err) + } + vrfv2PlusWrapper, err = contracts.LoadVRFV2PlusWrapper(sethClient, opStackWrapper.Address.String()) + if err != nil { + return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrLoadingCoordinator, err) + } + } else { + vrfv2PlusWrapper, err = contracts.DeployVRFV2PlusWrapper(sethClient, linkTokenAddress, linkEthFeedAddress, coordinator.Address(), wrapperSubId) + if err != nil { + return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, ErrDeployWrapper, err) + } } consumers, err := DeployVRFV2PlusWrapperConsumers(sethClient, vrfv2PlusWrapper, consumerContractsAmount) if err != nil { @@ -380,7 +439,7 @@ func DeployVRFV2PlusDirectFundingContracts( return &VRFV2PlusWrapperContracts{vrfv2PlusWrapper, consumers}, nil } -func WrapperRequestRandomness(consumer contracts.VRFv2PlusWrapperLoadTestConsumer, coordinator contracts.Coordinator, vrfKeyData *vrfcommon.VRFKeyData, subID *big.Int, isNativeBilling bool, config *vrfv2plus_config.General, l zerolog.Logger) (*contracts.CoordinatorRandomWordsRequested, string, error) { +func WrapperRequestRandomness(consumer contracts.VRFv2PlusWrapperLoadTestConsumer, coordinator contracts.Coordinator, vrfKeyData *vrfcommon.VRFKeyData, subID *big.Int, isNativeBilling bool, config *vrfv2plusconfig.General, l zerolog.Logger) (*contracts.CoordinatorRandomWordsRequested, string, error) { LogRandRequest( l, consumer.Address(), @@ -430,7 +489,7 @@ func DirectFundingRequestRandomnessAndWaitForFulfillment( vrfKeyData *vrfcommon.VRFKeyData, subID *big.Int, isNativeBilling bool, - config *vrfv2plus_config.General, + config *vrfv2plusconfig.General, l zerolog.Logger, ) (*contracts.CoordinatorRandomWordsFulfilled, error) { randomWordsRequestedEvent, _, err := WrapperRequestRandomness(consumer, coordinator, vrfKeyData, subID, @@ -502,11 +561,11 @@ func SetupVRFV2PlusContracts( sethClient *seth.Client, linkToken contracts.LinkToken, mockNativeLINKFeed contracts.VRFMockETHLINKFeed, - configGeneral *vrfv2plus_config.General, + configGeneral *vrfv2plusconfig.General, l zerolog.Logger, ) (*vrfcommon.VRFContracts, error) { l.Info().Msg("Deploying VRFV2 Plus contracts") - vrfContracts, err := DeployVRFV2_5Contracts(sethClient) + vrfContracts, err := DeployVRFV2_5Contracts(sethClient, configGeneral) if err != nil { return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, ErrDeployVRFV2_5Contracts, err) } @@ -565,6 +624,7 @@ func SetupNewConsumersAndSubs( coordinator, consumers, *testConfig.VRFv2Plus.General.NumberOfSubToCreate, + *testConfig.VRFv2Plus.General.SubscriptionBillingType, ) if err != nil { return nil, nil, fmt.Errorf("err: %w", err) diff --git a/integration-tests/actions/vrf/vrfv2plus/errors.go b/integration-tests/actions/vrf/vrfv2plus/errors.go index 250c4da85a7..a2802032ec9 100644 --- a/integration-tests/actions/vrf/vrfv2plus/errors.go +++ b/integration-tests/actions/vrf/vrfv2plus/errors.go @@ -16,4 +16,5 @@ const ( ErrLinkTotalBalance = "error waiting for RandomWordsFulfilled event" ErrNativeTokenBalance = "error waiting for RandomWordsFulfilled event" ErrDeployWrapper = "error deploying VRFV2PlusWrapper" + ErrSetL1FeeCalculation = "error setting L1 fee calculation" ) diff --git a/integration-tests/actions/vrf/vrfv2plus/setup_steps.go b/integration-tests/actions/vrf/vrfv2plus/setup_steps.go index 63890c3b9de..f3c7d53d6ee 100644 --- a/integration-tests/actions/vrf/vrfv2plus/setup_steps.go +++ b/integration-tests/actions/vrf/vrfv2plus/setup_steps.go @@ -268,6 +268,7 @@ func SetupVRFV2PlusWrapperEnvironment( coordinator, wrapperConsumerContractsAmount, wrapperSubId, + vrfv2PlusConfig, ) if err != nil { return nil, nil, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrWaitTXsComplete, err) @@ -309,6 +310,7 @@ func SetupVRFV2PlusWrapperEnvironment( linkToken, coordinator, []*big.Int{wrapperSubID}, + *vrfv2PlusConfig.SubscriptionBillingType, ) if err != nil { return nil, nil, err @@ -530,3 +532,16 @@ func SetupSubsAndConsumersForExistingEnv( } return subIDs, consumers, nil } + +func SelectBillingTypeWithDistribution(billingType string, distributionFn func() bool) (bool, error) { + switch vrfv2plus_config.BillingType(billingType) { + case vrfv2plus_config.BillingType_Link: + return false, nil + case vrfv2plus_config.BillingType_Native: + return true, nil + case vrfv2plus_config.BillingType_Link_and_Native: + return distributionFn(), nil + default: + return false, fmt.Errorf("invalid billing type: %s", billingType) + } +} diff --git a/integration-tests/benchmark/keeper_test.go b/integration-tests/benchmark/keeper_test.go index a0dcad721f3..177b3521013 100644 --- a/integration-tests/benchmark/keeper_test.go +++ b/integration-tests/benchmark/keeper_test.go @@ -29,34 +29,6 @@ import ( ) var ( - keeperBenchmarkBaseTOML = `[Feature] -LogPoller = true - -[OCR2] -Enabled = true - -[P2P] -[P2P.V2] -Enabled = true -AnnounceAddresses = ["0.0.0.0:6690"] -ListenAddresses = ["0.0.0.0:6690"] -[Keeper] -TurnLookBack = 0 -[WebServer] -HTTPWriteTimeout = '1h'` - - simulatedEVMNonDevTOML = ` -Enabled = true -FinalityDepth = 50 -LogPollInterval = '1s' - -[EVM.HeadTracker] -HistoryDepth = 100 - -[EVM.GasEstimator] -Mode = 'FixedPrice' -LimitDefault = 5_000_000` - performanceChainlinkResources = map[string]interface{}{ "resources": map[string]interface{}{ "requests": map[string]interface{}{ @@ -130,7 +102,7 @@ func TestAutomationBenchmark(t *testing.T) { testType, err := tc.GetConfigurationNameFromEnv() require.NoError(t, err, "Error getting test type") - config, err := tc.GetConfig(testType, tc.Keeper) + config, err := tc.GetConfig([]string{testType}, tc.Keeper) require.NoError(t, err, "Error getting test config") testEnvironment, benchmarkNetwork := SetupAutomationBenchmarkEnv(t, &config) @@ -322,8 +294,6 @@ func SetupAutomationBenchmarkEnv(t *testing.T, keeperTestConfig types.KeeperBenc l := logging.GetTestLogger(t) testNetwork := networks.MustGetSelectedNetworkConfig(keeperTestConfig.GetNetworkConfig())[0] // Environment currently being used to run benchmark test on blockTime := "1" - networkDetailTOML := `MinIncomingConfirmations = 1` - numberOfNodes := *keeperTestConfig.GetKeeperConfig().Common.NumberOfNodes if strings.Contains(*keeperTestConfig.GetKeeperConfig().Common.RegistryToTest, "2_") { @@ -338,7 +308,7 @@ func SetupAutomationBenchmarkEnv(t *testing.T, keeperTestConfig types.KeeperBenc TTL: time.Hour * 720, // 30 days, NamespacePrefix: fmt.Sprintf( "automation-%s-%s-%s", - strings.ToLower(keeperTestConfig.GetConfigurationName()), + strings.ToLower(strings.Join(keeperTestConfig.GetConfigurationNames(), "")), strings.ReplaceAll(strings.ToLower(testNetwork.Name), " ", "-"), strings.ReplaceAll(strings.ToLower(*keeperTestConfig.GetKeeperConfig().Common.RegistryToTest), "_", "-"), ), @@ -348,14 +318,13 @@ func SetupAutomationBenchmarkEnv(t *testing.T, keeperTestConfig types.KeeperBenc dbResources := performanceDbResources chainlinkResources := performanceChainlinkResources - if strings.ToLower(keeperTestConfig.GetConfigurationName()) == "soak" { + if strings.Contains(strings.ToLower(strings.Join(keeperTestConfig.GetConfigurationNames(), ",")), "soak") { chainlinkResources = soakChainlinkResources dbResources = soakDbResources } // Test can run on simulated, simulated-non-dev, testnets if testNetwork.Name == networks.SimulatedEVMNonDev.Name { - networkDetailTOML = simulatedEVMNonDevTOML testEnvironment. AddHelm(reorg.New(&reorg.Props{ NetworkName: testNetwork.Name, @@ -447,8 +416,11 @@ func SetupAutomationBenchmarkEnv(t *testing.T, keeperTestConfig types.KeeperBenc ctf_config.MightConfigOverridePyroscopeKey(keeperTestConfig.GetPyroscopeConfig(), target) } + tomlConfig, err := actions.BuildTOMLNodeConfigForK8s(keeperTestConfig, testNetwork) + require.NoError(t, err, "Error building TOML config") + cd := chainlink.NewWithOverride(i, map[string]any{ - "toml": networks.AddNetworkDetailedConfig(keeperBenchmarkBaseTOML, keeperTestConfig.GetPyroscopeConfig(), networkDetailTOML, testNetwork), + "toml": tomlConfig, "chainlink": chainlinkResources, "db": dbResources, }, keeperTestConfig.GetChainlinkImageConfig(), overrideFn) diff --git a/integration-tests/chaos/automation_chaos_test.go b/integration-tests/chaos/automation_chaos_test.go index a6267138d21..79513b2e8fb 100644 --- a/integration-tests/chaos/automation_chaos_test.go +++ b/integration-tests/chaos/automation_chaos_test.go @@ -134,7 +134,7 @@ func TestAutomationChaos(t *testing.T) { t.Run(name, func(t *testing.T) { t.Parallel() - config, err := tc.GetConfig("Chaos", tc.Automation) + config, err := tc.GetConfig([]string{"Chaos"}, tc.Automation) if err != nil { t.Fatal(err) } @@ -261,12 +261,21 @@ func TestAutomationChaos(t *testing.T) { linkToken, err := contracts.DeployLinkTokenContract(l, chainClient) require.NoError(t, err, "Error deploying LINK token") + wethToken, err := contracts.DeployWETHTokenContract(l, chainClient) + require.NoError(t, err, "Error deploying weth token contract") + + // This feed is used for both eth/usd and link/usd + ethUSDFeed, err := contracts.DeployMockETHUSDFeed(chainClient, defaultOCRRegistryConfig.FallbackLinkPrice) + require.NoError(t, err, "Error deploying eth usd feed contract") + registry, registrar := actions.DeployAutoOCRRegistryAndRegistrar( t, chainClient, rv, defaultOCRRegistryConfig, linkToken, + wethToken, + ethUSDFeed, ) // Fund the registry with LINK @@ -276,7 +285,7 @@ func TestAutomationChaos(t *testing.T) { actions.CreateOCRKeeperJobs(t, chainlinkNodes, registry.Address(), network.ChainID, 0, rv) nodesWithoutBootstrap := chainlinkNodes[1:] defaultOCRRegistryConfig.RegistryVersion = rv - ocrConfig, err := actions.BuildAutoOCR2ConfigVars(t, nodesWithoutBootstrap, defaultOCRRegistryConfig, registrar.Address(), 30*time.Second, registry.ChainModuleAddress(), registry.ReorgProtectionEnabled()) + ocrConfig, err := actions.BuildAutoOCR2ConfigVars(t, nodesWithoutBootstrap, defaultOCRRegistryConfig, registrar.Address(), 30*time.Second, registry.ChainModuleAddress(), registry.ReorgProtectionEnabled(), linkToken, wethToken, ethUSDFeed) require.NoError(t, err, "Error building OCR config vars") if rv == eth_contracts.RegistryVersion_2_0 { @@ -286,8 +295,8 @@ func TestAutomationChaos(t *testing.T) { } require.NoError(t, err, "Error setting OCR config") - consumersConditional, upkeepidsConditional := actions.DeployConsumers(t, chainClient, registry, registrar, linkToken, numberOfUpkeeps, big.NewInt(defaultLinkFunds), defaultUpkeepGasLimit, false, false) - consumersLogtrigger, upkeepidsLogtrigger := actions.DeployConsumers(t, chainClient, registry, registrar, linkToken, numberOfUpkeeps, big.NewInt(defaultLinkFunds), defaultUpkeepGasLimit, true, false) + consumersConditional, upkeepidsConditional := actions.DeployConsumers(t, chainClient, registry, registrar, linkToken, numberOfUpkeeps, big.NewInt(defaultLinkFunds), defaultUpkeepGasLimit, false, false, false, nil) + consumersLogtrigger, upkeepidsLogtrigger := actions.DeployConsumers(t, chainClient, registry, registrar, linkToken, numberOfUpkeeps, big.NewInt(defaultLinkFunds), defaultUpkeepGasLimit, true, false, false, nil) consumers := append(consumersConditional, consumersLogtrigger...) upkeepIDs := append(upkeepidsConditional, upkeepidsLogtrigger...) diff --git a/integration-tests/chaos/ocr2vrf_chaos_test.go b/integration-tests/chaos/ocr2vrf_chaos_test.go deleted file mode 100644 index 2800e763f1c..00000000000 --- a/integration-tests/chaos/ocr2vrf_chaos_test.go +++ /dev/null @@ -1,233 +0,0 @@ -package chaos - -import ( - "fmt" - "math/big" - "strings" - "testing" - "time" - - "github.com/stretchr/testify/require" - "go.uber.org/zap/zapcore" - - ctf_config "github.com/smartcontractkit/chainlink-testing-framework/config" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/chaos" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/environment" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/chainlink" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/ethereum" - "github.com/smartcontractkit/chainlink-testing-framework/logging" - "github.com/smartcontractkit/chainlink-testing-framework/networks" - "github.com/smartcontractkit/chainlink-testing-framework/utils/ptr" - seth_utils "github.com/smartcontractkit/chainlink-testing-framework/utils/seth" - "github.com/smartcontractkit/chainlink-testing-framework/utils/testcontext" - "github.com/smartcontractkit/chainlink/integration-tests/contracts" - - "github.com/smartcontractkit/chainlink/integration-tests/actions" - "github.com/smartcontractkit/chainlink/integration-tests/actions/ocr2vrf_actions" - "github.com/smartcontractkit/chainlink/integration-tests/actions/ocr2vrf_actions/ocr2vrf_constants" - "github.com/smartcontractkit/chainlink/integration-tests/client" - "github.com/smartcontractkit/chainlink/integration-tests/config" - tc "github.com/smartcontractkit/chainlink/integration-tests/testconfig" -) - -func TestOCR2VRFChaos(t *testing.T) { - t.Parallel() - l := logging.GetTestLogger(t) - testconfig, err := tc.GetConfig("Chaos", tc.OCR2VRF) - if err != nil { - t.Fatal(err) - } - - loadedNetwork := networks.MustGetSelectedNetworkConfig(testconfig.Network)[0] - - defaultOCR2VRFSettings := map[string]interface{}{ - "replicas": 6, - "toml": networks.AddNetworkDetailedConfig( - config.BaseOCR2Config, - testconfig.Pyroscope, - config.DefaultOCR2VRFNetworkDetailTomlConfig, - loadedNetwork, - ), - } - - defaultOCR2VRFEthereumSettings := ðereum.Props{ - NetworkName: loadedNetwork.Name, - Simulated: loadedNetwork.Simulated, - WsURLs: loadedNetwork.URLs, - } - - var overrideFn = func(_ interface{}, target interface{}) { - ctf_config.MustConfigOverrideChainlinkVersion(testconfig.GetChainlinkImageConfig(), target) - ctf_config.MightConfigOverridePyroscopeKey(testconfig.GetPyroscopeConfig(), target) - } - - chainlinkCfg := chainlink.NewWithOverride(0, defaultOCR2VRFSettings, testconfig.ChainlinkImage, overrideFn) - - testCases := map[string]struct { - networkChart environment.ConnectedChart - clChart environment.ConnectedChart - chaosFunc chaos.ManifestFunc - chaosProps *chaos.Props - }{ - // network-* and pods-* are split intentionally into 2 parallel groups - // we can't use chaos.NewNetworkPartition and chaos.NewFailPods in parallel - // because of jsii runtime bug, see Makefile - - // PodChaosFailMinorityNodes Test description: - //1. DKG and VRF beacon processes are set and VRF request gets fulfilled - //2. Apply chaos experiment - take down 2 nodes out of 5 non-bootstrap - //3. Bring back all nodes to normal - //4. verify VRF request gets fulfilled - PodChaosFailMinorityNodes: { - ethereum.New(defaultOCR2VRFEthereumSettings), - chainlinkCfg, - chaos.NewFailPods, - &chaos.Props{ - LabelsSelector: &map[string]*string{ChaosGroupMinority: ptr.Ptr("1")}, - DurationStr: "1m", - }, - }, - //todo - currently failing, need to investigate deeper - //PodChaosFailMajorityNodes: { - // ethereum.New(defaultOCR2VRFEthereumSettings), - // chainlinkCfg, - // chaos.NewFailPods, - // &chaos.Props{ - // LabelsSelector: &map[string]*string{ChaosGroupMajority: ptr.Ptr("1")}, - // DurationStr: "1m", - // }, - //}, - //todo - do we need these chaos tests? - //PodChaosFailMajorityDB: { - // ethereum.New(defaultOCR2VRFEthereumSettings), - // chainlinkCfg, - // chaos.NewFailPods, - // &chaos.Props{ - // LabelsSelector: &map[string]*string{ChaosGroupMajority: ptr.Ptr("1")}, - // DurationStr: "1m", - // ContainerNames: &[]*string{ptr.Ptr("chainlink-db")}, - // }, - //}, - //NetworkChaosFailMajorityNetwork: { - // ethereum.New(defaultOCR2VRFEthereumSettings), - // chainlinkCfg, - // chaos.NewNetworkPartition, - // &chaos.Props{ - // FromLabels: &map[string]*string{ChaosGroupMajority: ptr.Ptr("1")}, - // ToLabels: &map[string]*string{ChaosGroupMinority: ptr.Ptr("1")}, - // DurationStr: "1m", - // }, - //}, - //NetworkChaosFailBlockchainNode: { - // ethereum.New(defaultOCR2VRFEthereumSettings), - // chainlinkCfg, - // chaos.NewNetworkPartition, - // &chaos.Props{ - // FromLabels: &map[string]*string{"app": ptr.Ptr("geth")}, - // ToLabels: &map[string]*string{ChaosGroupMajority: ptr.Ptr("1")}, - // DurationStr: "1m", - // }, - //}, - } - - for testCaseName, tc := range testCases { - testCase := tc - t.Run(fmt.Sprintf("OCR2VRF_%s", testCaseName), func(t *testing.T) { - t.Parallel() - testNetwork := networks.MustGetSelectedNetworkConfig(testconfig.Network)[0] // Need a new copy of the network for each test - testEnvironment := environment. - New(&environment.Config{ - NamespacePrefix: fmt.Sprintf( - "chaos-ocr2vrf-%s", strings.ReplaceAll(strings.ToLower(testNetwork.Name), " ", "-"), - ), - Test: t, - }). - AddHelm(testCase.networkChart). - AddHelm(testCase.clChart) - err := testEnvironment.Run() - require.NoError(t, err, "Error running test environment") - if testEnvironment.WillUseRemoteRunner() { - return - } - - err = testEnvironment.Client.LabelChaosGroup(testEnvironment.Cfg.Namespace, "instance=node-", 1, 2, ChaosGroupMinority) - require.NoError(t, err) - err = testEnvironment.Client.LabelChaosGroup(testEnvironment.Cfg.Namespace, "instance=node-", 3, 5, ChaosGroupMajority) - require.NoError(t, err) - - testNetwork = seth_utils.MustReplaceSimulatedNetworkUrlWithK8(l, testNetwork, *testEnvironment) - chainClient, err := seth_utils.GetChainClientWithConfigFunction(testconfig, testNetwork, seth_utils.OneEphemeralKeysLiveTestnetCheckFn) - require.NoError(t, err, "Error creating seth client") - - chainlinkNodes, err := client.ConnectChainlinkNodes(testEnvironment) - require.NoError(t, err, "Error connecting to Chainlink nodes") - nodeAddresses, err := actions.ChainlinkNodeAddresses(chainlinkNodes) - require.NoError(t, err, "Retrieving on-chain wallet addresses for chainlink nodes shouldn't fail") - - t.Cleanup(func() { - err := actions.TeardownSuite(t, chainClient, testEnvironment, chainlinkNodes, nil, zapcore.PanicLevel, &testconfig) - require.NoError(t, err, "Error tearing down environment") - }) - - linkToken, err := contracts.DeployLinkTokenContract(l, chainClient) - require.NoError(t, err, "Error deploying LINK token") - - mockETHLinkFeed, err := contracts.DeployMockETHLINKFeed(chainClient, ocr2vrf_constants.LinkEthFeedResponse) - require.NoError(t, err, "Error deploying Mock ETH/LINK Feed") - - _, _, vrfBeaconContract, consumerContract, subID := ocr2vrf_actions.SetupOCR2VRFUniverse( - t, - linkToken, - mockETHLinkFeed, - chainClient, - nodeAddresses, - chainlinkNodes, - testNetwork, - ) - - //Request and Redeem Randomness to verify that process works fine - requestID := ocr2vrf_actions.RequestAndRedeemRandomness( - t, - consumerContract, - vrfBeaconContract, - ocr2vrf_constants.NumberOfRandomWordsToRequest, - subID, - ocr2vrf_constants.ConfirmationDelay, - ocr2vrf_constants.RandomnessRedeemTransmissionEventTimeout, - ) - - for i := uint16(0); i < ocr2vrf_constants.NumberOfRandomWordsToRequest; i++ { - randomness, err := consumerContract.GetRandomnessByRequestId(testcontext.Get(t), requestID, big.NewInt(int64(i))) - require.NoError(t, err) - l.Info().Interface("Random Number", randomness).Interface("Randomness Number Index", i).Msg("Randomness retrieved from Consumer contract") - require.NotEqual(t, 0, randomness.Uint64(), "Randomness retrieved from Consumer contract give an answer other than 0") - } - - id, err := testEnvironment.Chaos.Run(testCase.chaosFunc(testEnvironment.Cfg.Namespace, testCase.chaosProps)) - require.NoError(t, err, "Error running Chaos Experiment") - l.Info().Msg("Chaos Applied") - - err = testEnvironment.Chaos.WaitForAllRecovered(id, time.Minute) - require.NoError(t, err, "Error waiting for Chaos Experiment to end") - l.Info().Msg("Chaos Recovered") - - //Request and Redeem Randomness again to see that after Chaos Experiment whole process is still working - requestID = ocr2vrf_actions.RequestAndRedeemRandomness( - t, - consumerContract, - vrfBeaconContract, - ocr2vrf_constants.NumberOfRandomWordsToRequest, - subID, - ocr2vrf_constants.ConfirmationDelay, - ocr2vrf_constants.RandomnessRedeemTransmissionEventTimeout, - ) - - for i := uint16(0); i < ocr2vrf_constants.NumberOfRandomWordsToRequest; i++ { - randomness, err := consumerContract.GetRandomnessByRequestId(testcontext.Get(t), requestID, big.NewInt(int64(i))) - require.NoError(t, err, "Error getting Randomness result from Consumer Contract") - l.Info().Interface("Random Number", randomness).Interface("Randomness Number Index", i).Msg("Randomness retrieved from Consumer contract") - require.NotEqual(t, 0, randomness.Uint64(), "Randomness retrieved from Consumer contract give an answer other than 0") - } - }) - } -} diff --git a/integration-tests/chaos/ocr_chaos_test.go b/integration-tests/chaos/ocr_chaos_test.go index 99cc9869849..54a02cf64f3 100644 --- a/integration-tests/chaos/ocr_chaos_test.go +++ b/integration-tests/chaos/ocr_chaos_test.go @@ -51,15 +51,10 @@ var ( chaosEndRound int64 = 4 ) -func getDefaultOcrSettings(config *tc.TestConfig) map[string]interface{} { - defaultOCRSettings["toml"] = networks.AddNetworksConfig(baseTOML, config.Pyroscope, networks.MustGetSelectedNetworkConfig(config.Network)[0]) - return defaultAutomationSettings -} - func TestOCRChaos(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Chaos", tc.OCR) + config, err := tc.GetConfig([]string{"Chaos"}, tc.OCR) require.NoError(t, err, "Error getting config") var overrideFn = func(_ interface{}, target interface{}) { @@ -67,7 +62,12 @@ func TestOCRChaos(t *testing.T) { ctf_config.MightConfigOverridePyroscopeKey(config.GetPyroscopeConfig(), target) } - chainlinkCfg := chainlink.NewWithOverride(0, getDefaultOcrSettings(&config), config.ChainlinkImage, overrideFn) + tomlConfig, err := actions.BuildTOMLNodeConfigForK8s(&config, networks.MustGetSelectedNetworkConfig(config.Network)[0]) + require.NoError(t, err, "Error building TOML config") + + defaultOCRSettings["toml"] = tomlConfig + + chainlinkCfg := chainlink.NewWithOverride(0, defaultOCRSettings, config.ChainlinkImage, overrideFn) testCases := map[string]struct { networkChart environment.ConnectedChart diff --git a/integration-tests/citool/cmd/check_tests_cmd.go b/integration-tests/citool/cmd/check_tests_cmd.go new file mode 100644 index 00000000000..3ef3712a572 --- /dev/null +++ b/integration-tests/citool/cmd/check_tests_cmd.go @@ -0,0 +1,166 @@ +package cmd + +import ( + "fmt" + "os" + "path/filepath" + "regexp" + "strings" + + "github.com/spf13/cobra" + "gopkg.in/yaml.v3" +) + +type JobConfig struct { + Jobs map[string]struct { + Strategy struct { + Matrix struct { + Test []struct { + Path string `yaml:"path"` + TestOpts string `yaml:"testOpts"` + } `yaml:"test"` + } `yaml:"matrix"` + } `yaml:"strategy"` + } `yaml:"jobs"` +} + +var checkTestsCmd = &cobra.Command{ + Use: "check-tests [directory] [yaml file]", + Short: "Check if all tests in a directory are included in the test configurations YAML file", + Args: cobra.ExactArgs(2), + Run: func(_ *cobra.Command, args []string) { + directory := args[0] + yamlFile := args[1] + excludedDirs := []string{"../../citool"} + tests, err := extractTests(directory, excludedDirs) + if err != nil { + fmt.Println("Error extracting tests:", err) + os.Exit(1) + } + + checkTestsInPipeline(yamlFile, tests) + }, +} + +// extractTests scans the given directory and subdirectories (except the excluded ones) +// for Go test files, extracts test function names, and returns a slice of Test. +func extractTests(dir string, excludeDirs []string) ([]Test, error) { + var tests []Test + + // Resolve to absolute path + absDir, err := filepath.Abs(dir) + if err != nil { + return nil, err + } + + // filepath.WalkDir provides more control and is more efficient for skipping directories + err = filepath.WalkDir(absDir, func(path string, d os.DirEntry, err error) error { + if err != nil { + return err + } + + // Check if the current path is one of the excluded directories + for _, exclude := range excludeDirs { + absExclude, _ := filepath.Abs(exclude) + if strings.HasPrefix(path, absExclude) { + if d.IsDir() { + return filepath.SkipDir // Skip this directory + } + return nil // Skip this file + } + } + + if !d.IsDir() && strings.HasSuffix(d.Name(), "_test.go") { + content, err := os.ReadFile(path) + if err != nil { + return err + } + re := regexp.MustCompile(`func (Test\w+)`) + matches := re.FindAllSubmatch(content, -1) + for _, match := range matches { + funcName := string(match[1]) + if funcName == "TestMain" { // Skip "TestMain" + continue + } + tests = append(tests, Test{ + Name: funcName, + Path: mustExtractSubpath(path, "integration-tests"), + }) + } + } + return nil + }) + + return tests, err +} + +// ExtractSubpath extracts a specific subpath from a given full path. +// If the subpath is not found, it returns an error. +func mustExtractSubpath(fullPath, subPath string) string { + index := strings.Index(fullPath, subPath) + if index == -1 { + panic("subpath not found in the provided full path") + } + return fullPath[index:] +} + +func checkTestsInPipeline(yamlFile string, tests []Test) { + data, err := os.ReadFile(yamlFile) + if err != nil { + fmt.Printf("Error reading YAML file: %s\n", err) + return + } + + var config Config + err = yaml.Unmarshal(data, &config) + if err != nil { + fmt.Printf("Error parsing YAML: %s\n", err) + return + } + + missingTests := []string{} // Track missing tests + + for _, test := range tests { + found := false + for _, item := range config.Tests { + if item.Path == test.Path { + if strings.Contains(item.TestCmd, "-test.run") { + if matchTestNameInCmd(item.TestCmd, test.Name) { + found = true + break + } + } else { + found = true + break + } + } + } + if !found { + missingTests = append(missingTests, fmt.Sprintf("ERROR: Test '%s' in file '%s' does not have CI configuration in '%s'", test.Name, test.Path, yamlFile)) + } + } + + if len(missingTests) > 0 { + for _, missing := range missingTests { + fmt.Println(missing) + } + os.Exit(1) // Exit with a failure status + } +} + +// matchTestNameInCmd checks if the given test name matches the -test.run pattern in the command string. +func matchTestNameInCmd(cmd string, testName string) bool { + testRunRegex := regexp.MustCompile(`-test\.run ([^\s]+)`) + matches := testRunRegex.FindStringSubmatch(cmd) + if len(matches) > 1 { + // Extract the regex pattern used in the -test.run command + pattern := matches[1] + + // Escape regex metacharacters in the testName before matching + escapedTestName := regexp.QuoteMeta(testName) + + // Check if the escaped test name matches the extracted pattern + return regexp.MustCompile(pattern).MatchString(escapedTestName) + } + return false +} diff --git a/integration-tests/citool/cmd/check_tests_cmd_test.go b/integration-tests/citool/cmd/check_tests_cmd_test.go new file mode 100644 index 00000000000..4b7f50e7f06 --- /dev/null +++ b/integration-tests/citool/cmd/check_tests_cmd_test.go @@ -0,0 +1,47 @@ +package cmd + +import ( + "testing" +) + +func TestMatchTestNameInCmd(t *testing.T) { + tests := []struct { + cmd string + testName string + expected bool + }{ + {"go test -test.run ^TestExample$", "TestExample", true}, + {"go test -test.run ^TestExample$", "TestAnother", false}, + {"go test -test.run ^TestExample$ -v", "TestExample", true}, + {"go test -test.run ^TestExamplePart$", "TestExample", false}, + {"go test -test.run ^TestWithNumbers123$", "TestWithNumbers123", true}, + {"go test -test.run ^Test_With_Underscores$", "Test_With_Underscores", true}, + {"go test -test.run ^Test-With-Dash$", "Test-With-Dash", true}, + {"go test -test.run ^TestWithSpace Space$", "TestWithSpace Space", true}, + {"go test -test.run ^TestWithNewline\nNewline$", "TestWithNewline\nNewline", true}, + {"go test -test.run ^TestOne$|^TestTwo$", "TestOne", true}, + {"go test -test.run ^TestOne$|^TestTwo$", "TestTwo", true}, + {"go test -test.run ^TestOne$|^TestTwo$", "TestThree", false}, + {"go test -test.run TestOne|TestTwo", "TestTwo", true}, + {"go test -test.run TestOne|TestTwo", "TestOne", true}, + {"go test -test.run TestOne|TestTwo|TestThree", "TestFour", false}, + {"go test -test.run ^TestOne$|TestTwo$", "TestTwo", true}, + {"go test -test.run ^TestOne$|TestTwo|TestThree$", "TestThree", true}, + {"go test -test.run TestOne|TestTwo|TestThree", "TestOne", true}, + {"go test -test.run TestOne|TestTwo|TestThree", "TestThree", true}, + {"go test -test.run ^TestA$|^TestB$|^TestC$", "TestA", true}, + {"go test -test.run ^TestA$|^TestB$|^TestC$", "TestB", true}, + {"go test -test.run ^TestA$|^TestB$|^TestC$", "TestD", false}, + {"go test -test.run TestA|^TestB$|TestC", "TestB", true}, + {"go test -test.run ^TestA|^TestB|TestC$", "TestA", true}, + {"go test -test.run ^TestA|^TestB|TestC$", "TestC", true}, + {"go test -test.run ^TestA|^TestB|TestC$", "TestD", false}, + } + + for _, tt := range tests { + result := matchTestNameInCmd(tt.cmd, tt.testName) + if result != tt.expected { + t.Errorf("matchTestNameInCmd(%s, %s) = %t; expected %t", tt.cmd, tt.testName, result, tt.expected) + } + } +} diff --git a/integration-tests/citool/cmd/create_test_config_cmd.go b/integration-tests/citool/cmd/create_test_config_cmd.go new file mode 100644 index 00000000000..bc1b65bcdcd --- /dev/null +++ b/integration-tests/citool/cmd/create_test_config_cmd.go @@ -0,0 +1,178 @@ +package cmd + +import ( + "fmt" + "os" + + "github.com/pelletier/go-toml/v2" + "github.com/spf13/cobra" + + ctf_config "github.com/smartcontractkit/chainlink-testing-framework/config" +) + +var createTestConfigCmd = &cobra.Command{ + Use: "create", + Short: "Create a test config from the provided flags", + Run: func(cmd *cobra.Command, _ []string) { + var tc ctf_config.TestConfig + + var version, postgresVersion *string + if cmd.Flags().Changed(ChainlinkVersionFlag) { + version = &oc.ChainlinkVersion + } + if cmd.Flags().Changed(ChainlinkPostgresVersionFlag) { + version = &oc.ChainlinkPostgresVersion + } + if version != nil || postgresVersion != nil { + tc.ChainlinkImage = &ctf_config.ChainlinkImageConfig{ + Version: version, + PostgresVersion: postgresVersion, + } + } + + var upgradeVersion *string + if cmd.Flags().Changed(ChainlinkUpgradeVersionFlag) { + upgradeVersion = &oc.ChainlinkUpgradeVersion + } + if upgradeVersion != nil { + tc.ChainlinkUpgradeImage = &ctf_config.ChainlinkImageConfig{ + Version: upgradeVersion, + } + } + + var selectedNetworks *[]string + if cmd.Flags().Changed(SelectedNetworksFlag) { + selectedNetworks = &oc.SelectedNetworks + } + if selectedNetworks != nil { + tc.Network = &ctf_config.NetworkConfig{ + SelectedNetworks: oc.SelectedNetworks, + } + } + + var peryscopeEnabled *bool + var pyroscopeServerURL, pyroscopeEnvironment, pyroscopeKey *string + if cmd.Flags().Changed(PyroscopeEnabledFlag) { + peryscopeEnabled = &oc.PyroscopeEnabled + } + if cmd.Flags().Changed(PyroscopeServerURLFlag) { + pyroscopeServerURL = &oc.PyroscopeServerURL + } + if cmd.Flags().Changed(PyroscopeKeyFlag) { + pyroscopeKey = &oc.PyroscopeKey + } + if cmd.Flags().Changed(PyroscopeEnvironmentFlag) { + pyroscopeEnvironment = &oc.PyroscopeEnvironment + } + if peryscopeEnabled != nil { + tc.Pyroscope = &ctf_config.PyroscopeConfig{ + Enabled: peryscopeEnabled, + ServerUrl: pyroscopeServerURL, + Environment: pyroscopeEnvironment, + Key: pyroscopeKey, + } + } + + var testLogCollect *bool + if cmd.Flags().Changed(LoggingTestLogCollectFlag) { + testLogCollect = &oc.LoggingTestLogCollect + } + var loggingRunID *string + if cmd.Flags().Changed(LoggingRunIDFlag) { + loggingRunID = &oc.LoggingRunID + } + var loggingLogTargets []string + if cmd.Flags().Changed(LoggingLogTargetsFlag) { + loggingLogTargets = oc.LoggingLogTargets + } + var loggingLokiTenantID *string + if cmd.Flags().Changed(LoggingLokiTenantIDFlag) { + loggingLokiTenantID = &oc.LoggingLokiTenantID + } + var loggingLokiBasicAuth *string + if cmd.Flags().Changed(LoggingLokiBasicAuthFlag) { + loggingLokiBasicAuth = &oc.LoggingLokiBasicAuth + } + var loggingLokiEndpoint *string + if cmd.Flags().Changed(LoggingLokiEndpointFlag) { + loggingLokiEndpoint = &oc.LoggingLokiEndpoint + } + var loggingGrafanaBaseURL *string + if cmd.Flags().Changed(LoggingGrafanaBaseURLFlag) { + loggingGrafanaBaseURL = &oc.LoggingGrafanaBaseURL + } + var loggingGrafanaDashboardURL *string + if cmd.Flags().Changed(LoggingGrafanaDashboardURLFlag) { + loggingGrafanaDashboardURL = &oc.LoggingGrafanaDashboardURL + } + var loggingGrafanaBearerToken *string + if cmd.Flags().Changed(LoggingGrafanaBearerTokenFlag) { + loggingGrafanaBearerToken = &oc.LoggingGrafanaBearerToken + } + + if testLogCollect != nil || loggingRunID != nil || loggingLogTargets != nil || loggingLokiEndpoint != nil || loggingLokiTenantID != nil || loggingLokiBasicAuth != nil || loggingGrafanaBaseURL != nil || loggingGrafanaDashboardURL != nil || loggingGrafanaBearerToken != nil { + tc.Logging = &ctf_config.LoggingConfig{} + tc.Logging.TestLogCollect = testLogCollect + tc.Logging.RunId = loggingRunID + if loggingLogTargets != nil { + tc.Logging.LogStream = &ctf_config.LogStreamConfig{ + LogTargets: loggingLogTargets, + } + } + if loggingLokiTenantID != nil || loggingLokiBasicAuth != nil || loggingLokiEndpoint != nil { + tc.Logging.Loki = &ctf_config.LokiConfig{ + TenantId: loggingLokiTenantID, + BasicAuth: loggingLokiBasicAuth, + Endpoint: loggingLokiEndpoint, + } + } + if loggingGrafanaBaseURL != nil || loggingGrafanaDashboardURL != nil || loggingGrafanaBearerToken != nil { + tc.Logging.Grafana = &ctf_config.GrafanaConfig{ + BaseUrl: loggingGrafanaBaseURL, + DashboardUrl: loggingGrafanaDashboardURL, + BearerToken: loggingGrafanaBearerToken, + } + } + } + + var privateEthereumNetworkExecutionLayer *string + if cmd.Flags().Changed(PrivateEthereumNetworkExecutionLayerFlag) { + privateEthereumNetworkExecutionLayer = &oc.PrivateEthereumNetworkExecutionLayer + } + var privateEthereumNetworkEthereumVersion *string + if cmd.Flags().Changed(PrivateEthereumNetworkEthereumVersionFlag) { + privateEthereumNetworkEthereumVersion = &oc.PrivateEthereumNetworkEthereumVersion + } + var privateEthereumNetworkCustomDockerImage *string + if cmd.Flags().Changed(PrivateEthereumNetworkCustomDockerImageFlag) { + privateEthereumNetworkCustomDockerImage = &oc.PrivateEthereumNetworkCustomDockerImages + } + if privateEthereumNetworkExecutionLayer != nil || privateEthereumNetworkEthereumVersion != nil || privateEthereumNetworkCustomDockerImage != nil { + var el ctf_config.ExecutionLayer + if privateEthereumNetworkExecutionLayer != nil { + el = ctf_config.ExecutionLayer(*privateEthereumNetworkExecutionLayer) + } + var ev ctf_config.EthereumVersion + if privateEthereumNetworkEthereumVersion != nil { + ev = ctf_config.EthereumVersion(*privateEthereumNetworkEthereumVersion) + } + var customImages map[ctf_config.ContainerType]string + if privateEthereumNetworkCustomDockerImage != nil { + customImages = map[ctf_config.ContainerType]string{"execution_layer": *privateEthereumNetworkCustomDockerImage} + } + tc.PrivateEthereumNetwork = &ctf_config.EthereumNetworkConfig{ + ExecutionLayer: &el, + EthereumVersion: &ev, + CustomDockerImages: customImages, + } + } + + configToml, err := toml.Marshal(tc) + if err != nil { + fmt.Fprintf(os.Stderr, "Error marshalling TestConfig to TOML: %v\n", err) + os.Exit(1) + } + + fmt.Fprintln(cmd.OutOrStdout(), string(configToml)) + }, +} diff --git a/integration-tests/citool/cmd/csv_export_cmd.go b/integration-tests/citool/cmd/csv_export_cmd.go new file mode 100644 index 00000000000..8fe13440c81 --- /dev/null +++ b/integration-tests/citool/cmd/csv_export_cmd.go @@ -0,0 +1,96 @@ +package cmd + +import ( + "encoding/csv" + "fmt" + "os" + "strings" + + "github.com/spf13/cobra" + "gopkg.in/yaml.v3" +) + +var csvExportCmd = &cobra.Command{ + Use: "csvexport", + Short: "Export tests to CSV format", + Run: func(cmd *cobra.Command, _ []string) { + configFile, _ := cmd.Flags().GetString("file") + if err := exportConfigToCSV(configFile); err != nil { + fmt.Fprintf(os.Stderr, "Error: %v\n", err) + os.Exit(1) + } + }, +} + +func init() { + csvExportCmd.Flags().StringP("file", "f", "", "Path to YML file") + err := csvExportCmd.MarkFlagRequired("file") + if err != nil { + fmt.Fprintf(os.Stderr, "Error: %v\n", err) + os.Exit(1) + } +} + +func exportConfigToCSV(configFile string) error { + // Read the YAML file + bytes, err := os.ReadFile(configFile) + if err != nil { + return err + } + + // Unmarshal the YAML into the Config struct + var config Config + if err := yaml.Unmarshal(bytes, &config); err != nil { + return err + } + + // Create a CSV file + file, err := os.Create("output.csv") + if err != nil { + return err + } + defer file.Close() + + writer := csv.NewWriter(file) + defer writer.Flush() + + // Write CSV headers + headers := []string{"ID", "Test Path", "Test Env Type", "Runs On", "Test Cmd", "Test Config Override Required", "Test Secrets Required", "Remote Runner Memory", "Pyroscope Env", "Workflows", "Test Inputs"} + if err := writer.Write(headers); err != nil { + return err + } + + // Iterate over Tests and write data to CSV + for _, test := range config.Tests { + workflows := strings.Join(test.Workflows, ", ") // Combine workflows into a single CSV field + // Serialize TestInputs + testInputs := serializeMap(test.TestInputs) + + record := []string{ + test.ID, + test.Path, + test.TestEnvType, + test.RunsOn, + test.TestCmd, + fmt.Sprintf("%t", test.TestConfigOverrideRequired), + fmt.Sprintf("%t", test.TestSecretsRequired), + test.RemoteRunnerMemory, + test.PyroscopeEnv, + workflows, + testInputs, + } + if err := writer.Write(record); err != nil { + return err + } + } + + return nil +} + +func serializeMap(inputs map[string]string) string { + pairs := make([]string, 0, len(inputs)) + for key, value := range inputs { + pairs = append(pairs, fmt.Sprintf("%s=%s", key, value)) + } + return strings.Join(pairs, ", ") +} diff --git a/integration-tests/citool/cmd/filter_cmd.go b/integration-tests/citool/cmd/filter_cmd.go new file mode 100644 index 00000000000..c1d5f22357d --- /dev/null +++ b/integration-tests/citool/cmd/filter_cmd.go @@ -0,0 +1,165 @@ +package cmd + +import ( + "encoding/base64" + "encoding/json" + "fmt" + "log" + "os" + "regexp" + "strings" + + "github.com/spf13/cobra" + "gopkg.in/yaml.v2" + + "github.com/smartcontractkit/chainlink-testing-framework/utils" +) + +// Filter tests based on workflow, test type, and test IDs. +func filterTests(allTests []CITestConf, workflow, testType, ids string, envresolve bool) []CITestConf { + workflowFilter := workflow + typeFilter := testType + idFilter := strings.Split(ids, ",") + + var filteredTests []CITestConf + + for _, test := range allTests { + workflowMatch := workflow == "" || contains(test.Workflows, workflowFilter) + typeMatch := testType == "" || test.TestEnvType == typeFilter + idMatch := ids == "*" || ids == "" || contains(idFilter, test.ID) + + if workflowMatch && typeMatch && idMatch { + test.IDSanitized = sanitizeTestID(test.ID) + filteredTests = append(filteredTests, test) + } + if envresolve { + for k, v := range test.TestInputs { + test.TestInputs[k] = utils.MustResolveEnvPlaceholder(v) + } + } + } + + return filteredTests +} + +func filterAndMergeTests(allTests []CITestConf, workflow, testType, base64Tests string, envresolve bool) ([]CITestConf, error) { + decodedBytes, err := base64.StdEncoding.DecodeString(base64Tests) + if err != nil { + return nil, err + } + var decodedTests []CITestConf + err = yaml.Unmarshal(decodedBytes, &decodedTests) + if err != nil { + return nil, err + } + + idFilter := make(map[string]CITestConf) + for _, dt := range decodedTests { + idFilter[dt.ID] = dt + } + + var filteredTests []CITestConf + for _, test := range allTests { + workflowMatch := workflow == "" || contains(test.Workflows, workflow) + typeMatch := testType == "" || test.TestEnvType == testType + + if decodedTest, exists := idFilter[test.ID]; exists && workflowMatch && typeMatch { + // Override test inputs from the base64 encoded tests + for k, v := range decodedTest.TestInputs { + if test.TestInputs == nil { + test.TestInputs = make(map[string]string) + } + test.TestInputs[k] = v + } + test.IDSanitized = sanitizeTestID(test.ID) + filteredTests = append(filteredTests, test) + } + if envresolve { + for k, v := range test.TestInputs { + test.TestInputs[k] = utils.MustResolveEnvPlaceholder(v) + } + } + } + + return filteredTests, nil +} + +func sanitizeTestID(id string) string { + // Define a regular expression that matches any character not a letter, digit, hyphen + re := regexp.MustCompile(`[^a-zA-Z0-9-_]+`) + // Replace all occurrences of disallowed characters with "_" + return re.ReplaceAllString(id, "_") +} + +// Utility function to check if a slice contains a string. +func contains(slice []string, element string) bool { + for _, s := range slice { + if s == element { + return true + } + } + return false +} + +// filterCmd represents the filter command +var filterCmd = &cobra.Command{ + Use: "filter", + Short: "Filter test configurations based on specified criteria", + Long: `Filters tests from a YAML configuration based on name, workflow, test type, and test IDs. +Example usage: +./e2e_tests_tool filter --file .github/e2e-tests.yml --workflow "Run Nightly E2E Tests" --test-env-type "docker" --test-ids "test1,test2"`, + Run: func(cmd *cobra.Command, _ []string) { + yamlFile, _ := cmd.Flags().GetString("file") + workflow, _ := cmd.Flags().GetString("workflow") + testType, _ := cmd.Flags().GetString("test-env-type") + testIDs, _ := cmd.Flags().GetString("test-ids") + testMap, _ := cmd.Flags().GetString("test-list") + envresolve, _ := cmd.Flags().GetBool("envresolve") + + data, err := os.ReadFile(yamlFile) + if err != nil { + fmt.Fprintf(os.Stderr, "Error reading YAML file: %v\n", err) + os.Exit(1) + } + + var config Config + err = yaml.Unmarshal(data, &config) + if err != nil { + fmt.Fprintf(os.Stderr, "Error parsing YAML file %s data: %v\n", yamlFile, err) + os.Exit(1) + } + + var filteredTests []CITestConf + if testMap == "" { + filteredTests = filterTests(config.Tests, workflow, testType, testIDs, envresolve) + } else { + filteredTests, err = filterAndMergeTests(config.Tests, workflow, testType, testMap, envresolve) + if err != nil { + log.Fatalf("Error filtering and merging tests: %v", err) + } + } + matrix := map[string][]CITestConf{"tests": filteredTests} + matrixJSON, err := json.Marshal(matrix) + if err != nil { + fmt.Fprintf(os.Stderr, "Error marshaling matrix to JSON: %v\n", err) + os.Exit(1) + } + + fmt.Printf("%s", matrixJSON) + }, +} + +func init() { + filterCmd.Flags().StringP("file", "f", "", "Path to the YAML file") + filterCmd.Flags().String("test-list", "", "Base64 encoded list of tests (YML objects) to filter by. Can include test_inputs for each test.") + filterCmd.Flags().StringP("test-ids", "i", "*", "Comma-separated list of test IDs to filter by") + filterCmd.Flags().StringP("test-env-type", "y", "", "Type of test to filter by") + filterCmd.Flags().StringP("workflow", "t", "", "Workflow filter") + filterCmd.Flags().Bool("envresolve", false, "Resolve environment variables in test inputs") + + err := filterCmd.MarkFlagRequired("file") + if err != nil { + fmt.Fprintf(os.Stderr, "Error marking flag as required: %v\n", err) + os.Exit(1) + } +} diff --git a/integration-tests/citool/cmd/filter_cmd_test.go b/integration-tests/citool/cmd/filter_cmd_test.go new file mode 100644 index 00000000000..ff6e9c981de --- /dev/null +++ b/integration-tests/citool/cmd/filter_cmd_test.go @@ -0,0 +1,64 @@ +package cmd + +import ( + "testing" +) + +func TestFilterTestsByID(t *testing.T) { + tests := []CITestConf{ + {ID: "run_all_in_ocr_tests_go", TestEnvType: "docker"}, + {ID: "run_all_in_ocr2_tests_go", TestEnvType: "docker"}, + {ID: "run_all_in_ocr3_tests_go", TestEnvType: "k8s_remote_runner"}, + } + + cases := []struct { + description string + inputIDs string + expectedLen int + }{ + {"Filter by single ID", "run_all_in_ocr_tests_go", 1}, + {"Filter by multiple IDs", "run_all_in_ocr_tests_go,run_all_in_ocr2_tests_go", 2}, + {"Wildcard to include all", "*", 3}, + {"Empty ID string to include all", "", 3}, + } + + for _, c := range cases { + t.Run(c.description, func(t *testing.T) { + filtered := filterTests(tests, "", "", c.inputIDs, false) + if len(filtered) != c.expectedLen { + t.Errorf("FilterTests(%s) returned %d tests, expected %d", c.description, len(filtered), c.expectedLen) + } + }) + } +} + +func TestFilterTestsIntegration(t *testing.T) { + tests := []CITestConf{ + {ID: "run_all_in_ocr_tests_go", TestEnvType: "docker", Workflows: []string{"Run Nightly E2E Tests"}}, + {ID: "run_all_in_ocr2_tests_go", TestEnvType: "docker", Workflows: []string{"Run PR E2E Tests"}}, + {ID: "run_all_in_ocr3_tests_go", TestEnvType: "k8s_remote_runner", Workflows: []string{"Run PR E2E Tests"}}, + } + + cases := []struct { + description string + inputNames string + inputWorkflow string + inputTestType string + inputIDs string + expectedLen int + }{ + {"Filter by test type and ID", "", "", "docker", "run_all_in_ocr2_tests_go", 1}, + {"Filter by trigger and test type", "", "Run PR E2E Tests", "docker", "*", 1}, + {"No filters applied", "", "", "", "*", 3}, + {"Filter mismatching all criteria", "", "Run Nightly E2E Tests", "", "", 1}, + } + + for _, c := range cases { + t.Run(c.description, func(t *testing.T) { + filtered := filterTests(tests, c.inputWorkflow, c.inputTestType, c.inputIDs, false) + if len(filtered) != c.expectedLen { + t.Errorf("FilterTests(%s) returned %d tests, expected %d", c.description, len(filtered), c.expectedLen) + } + }) + } +} diff --git a/integration-tests/citool/cmd/root_cmd.go b/integration-tests/citool/cmd/root_cmd.go new file mode 100644 index 00000000000..fdb4efd5724 --- /dev/null +++ b/integration-tests/citool/cmd/root_cmd.go @@ -0,0 +1,32 @@ +package cmd + +import ( + "os" + + "github.com/spf13/cobra" +) + +// rootCmd represents the base command when called without any subcommands +var rootCmd = &cobra.Command{ + Use: "citool", + Short: "A tool to manage E2E tests on Github CI", +} + +// Execute adds all child commands to the root command and sets flags appropriately. +// This is called by main.main(). It only needs to happen once to the rootCmd. +func Execute() { + err := rootCmd.Execute() + if err != nil { + os.Exit(1) + } +} + +func init() { + rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") + + rootCmd.AddCommand(checkTestsCmd) + rootCmd.AddCommand(filterCmd) + rootCmd.AddCommand(csvExportCmd) + rootCmd.AddCommand(testConfigCmd) + testConfigCmd.AddCommand(createTestConfigCmd) +} diff --git a/integration-tests/citool/cmd/test_config_cmd.go b/integration-tests/citool/cmd/test_config_cmd.go new file mode 100644 index 00000000000..0c0e272353b --- /dev/null +++ b/integration-tests/citool/cmd/test_config_cmd.go @@ -0,0 +1,123 @@ +package cmd + +import ( + "strings" + + "github.com/spf13/cobra" + + "github.com/smartcontractkit/chainlink-testing-framework/utils" +) + +var testConfigCmd = &cobra.Command{ + Use: "test-config", + Short: "Manage test config", +} + +// OverrideConfig holds the configuration data for overrides +type OverrideConfig struct { + ChainlinkImage string + ChainlinkVersion string + ChainlinkUpgradeImage string + ChainlinkUpgradeVersion string + ChainlinkPostgresVersion string + SelectedNetworks []string + PyroscopeEnabled bool + PyroscopeServerURL string + PyroscopeEnvironment string + PyroscopeKey string + LoggingTestLogCollect bool + LoggingRunID string + LoggingLogTargets []string + LoggingLokiTenantID string + LoggingLokiEndpoint string + LoggingLokiBasicAuth string + LoggingGrafanaBaseURL string + LoggingGrafanaDashboardURL string + LoggingGrafanaBearerToken string + PrivateEthereumNetworkExecutionLayer string + PrivateEthereumNetworkEthereumVersion string + PrivateEthereumNetworkCustomDockerImages string +} + +const ( + ChainlinkVersionFlag = "chainlink-version" + ChainlinkUpgradeVersionFlag = "chainlink-upgrade-version" + ChainlinkPostgresVersionFlag = "chainlink-postgres-version" + SelectedNetworksFlag = "selected-networks" + FromBase64ConfigFlag = "from-base64-config" + LoggingLokiBasicAuthFlag = "logging-loki-basic-auth" + LoggingLokiEndpointFlag = "logging-loki-endpoint" + LoggingRunIDFlag = "logging-run-id" + LoggingLokiTenantIDFlag = "logging-loki-tenant-id" + LoggingGrafanaBaseURLFlag = "logging-grafana-base-url" + LoggingGrafanaDashboardURLFlag = "logging-grafana-dashboard-url" + LoggingGrafanaBearerTokenFlag = "logging-grafana-bearer-token" + LoggingLogTargetsFlag = "logging-log-targets" + LoggingTestLogCollectFlag = "logging-test-log-collect" + PyroscopeEnabledFlag = "pyroscope-enabled" + PyroscopeServerURLFlag = "pyroscope-server-url" + PyroscopeKeyFlag = "pyroscope-key" + PyroscopeEnvironmentFlag = "pyroscope-environment" + PrivateEthereumNetworkExecutionLayerFlag = "private-ethereum-network-execution-layer" + PrivateEthereumNetworkEthereumVersionFlag = "private-ethereum-network-ethereum-version" + PrivateEthereumNetworkCustomDockerImageFlag = "private-ethereum-network-custom-docker-image" +) + +var oc OverrideConfig + +func init() { + cmds := []*cobra.Command{createTestConfigCmd} + for _, c := range cmds { + c.Flags().StringArrayVar(&oc.SelectedNetworks, SelectedNetworksFlag, nil, "Selected networks") + c.Flags().StringVar(&oc.ChainlinkVersion, ChainlinkVersionFlag, "", "Chainlink version") + c.Flags().StringVar(&oc.ChainlinkUpgradeVersion, ChainlinkUpgradeVersionFlag, "", "Chainlink upgrade version") + c.Flags().StringVar(&oc.ChainlinkPostgresVersion, ChainlinkPostgresVersionFlag, "", "Chainlink Postgres version") + c.Flags().BoolVar(&oc.PyroscopeEnabled, PyroscopeEnabledFlag, false, "Pyroscope enabled") + c.Flags().StringVar(&oc.PyroscopeServerURL, PyroscopeServerURLFlag, "", "Pyroscope server URL") + c.Flags().StringVar(&oc.PyroscopeKey, PyroscopeKeyFlag, "", "Pyroscope key") + c.Flags().StringVar(&oc.PyroscopeEnvironment, PyroscopeEnvironmentFlag, "", "Pyroscope environment") + c.Flags().BoolVar(&oc.LoggingTestLogCollect, LoggingTestLogCollectFlag, false, "Test log collect") + c.Flags().StringVar(&oc.LoggingRunID, LoggingRunIDFlag, "", "Run ID") + c.Flags().StringArrayVar(&oc.LoggingLogTargets, LoggingLogTargetsFlag, nil, "Logging.LogStream.LogTargets") + c.Flags().StringVar(&oc.LoggingLokiEndpoint, LoggingLokiEndpointFlag, "", "") + c.Flags().StringVar(&oc.LoggingLokiTenantID, LoggingLokiTenantIDFlag, "", "") + c.Flags().StringVar(&oc.LoggingLokiBasicAuth, LoggingLokiBasicAuthFlag, "", "") + c.Flags().StringVar(&oc.LoggingGrafanaBaseURL, LoggingGrafanaBaseURLFlag, "", "") + c.Flags().StringVar(&oc.LoggingGrafanaDashboardURL, LoggingGrafanaDashboardURLFlag, "", "") + c.Flags().StringVar(&oc.LoggingGrafanaBearerToken, LoggingGrafanaBearerTokenFlag, "", "") + c.Flags().StringVar(&oc.PrivateEthereumNetworkExecutionLayer, PrivateEthereumNetworkExecutionLayerFlag, "", "") + c.Flags().StringVar(&oc.PrivateEthereumNetworkEthereumVersion, PrivateEthereumNetworkEthereumVersionFlag, "", "") + c.Flags().StringVar(&oc.PrivateEthereumNetworkCustomDockerImages, PrivateEthereumNetworkCustomDockerImageFlag, "", "") + + c.PreRun = func(_ *cobra.Command, _ []string) { + // Resolve selected networks environment variable if set + if len(oc.SelectedNetworks) > 0 { + _, hasEnvVar := utils.LookupEnvVarName(oc.SelectedNetworks[0]) + if hasEnvVar { + selectedNetworks := utils.MustResolveEnvPlaceholder(oc.SelectedNetworks[0]) + oc.SelectedNetworks = strings.Split(selectedNetworks, ",") + } + } + + // Resolve all other environment variables + oc.ChainlinkImage = utils.MustResolveEnvPlaceholder(oc.ChainlinkImage) + oc.ChainlinkVersion = utils.MustResolveEnvPlaceholder(oc.ChainlinkVersion) + oc.ChainlinkUpgradeImage = utils.MustResolveEnvPlaceholder(oc.ChainlinkUpgradeImage) + oc.ChainlinkUpgradeVersion = utils.MustResolveEnvPlaceholder(oc.ChainlinkUpgradeVersion) + oc.ChainlinkPostgresVersion = utils.MustResolveEnvPlaceholder(oc.ChainlinkPostgresVersion) + oc.PyroscopeServerURL = utils.MustResolveEnvPlaceholder(oc.PyroscopeServerURL) + oc.PyroscopeKey = utils.MustResolveEnvPlaceholder(oc.PyroscopeKey) + oc.PyroscopeEnvironment = utils.MustResolveEnvPlaceholder(oc.PyroscopeEnvironment) + oc.LoggingRunID = utils.MustResolveEnvPlaceholder(oc.LoggingRunID) + oc.LoggingLokiTenantID = utils.MustResolveEnvPlaceholder(oc.LoggingLokiTenantID) + oc.LoggingLokiEndpoint = utils.MustResolveEnvPlaceholder(oc.LoggingLokiEndpoint) + oc.LoggingLokiBasicAuth = utils.MustResolveEnvPlaceholder(oc.LoggingLokiBasicAuth) + oc.LoggingGrafanaBaseURL = utils.MustResolveEnvPlaceholder(oc.LoggingGrafanaBaseURL) + oc.LoggingGrafanaDashboardURL = utils.MustResolveEnvPlaceholder(oc.LoggingGrafanaDashboardURL) + oc.LoggingGrafanaBearerToken = utils.MustResolveEnvPlaceholder(oc.LoggingGrafanaBearerToken) + oc.PrivateEthereumNetworkExecutionLayer = utils.MustResolveEnvPlaceholder(oc.PrivateEthereumNetworkExecutionLayer) + oc.PrivateEthereumNetworkEthereumVersion = utils.MustResolveEnvPlaceholder(oc.PrivateEthereumNetworkEthereumVersion) + oc.PrivateEthereumNetworkCustomDockerImages = utils.MustResolveEnvPlaceholder(oc.PrivateEthereumNetworkCustomDockerImages) + } + } +} diff --git a/integration-tests/citool/cmd/test_config_cmd_test.go b/integration-tests/citool/cmd/test_config_cmd_test.go new file mode 100644 index 00000000000..fb1ef5332bd --- /dev/null +++ b/integration-tests/citool/cmd/test_config_cmd_test.go @@ -0,0 +1,74 @@ +package cmd + +import ( + "bytes" + "testing" + + "github.com/pelletier/go-toml/v2" + "github.com/spf13/cobra" + "github.com/stretchr/testify/assert" + + ctf_config "github.com/smartcontractkit/chainlink-testing-framework/config" +) + +func TestCreateTestConfigCmd(t *testing.T) { + tests := []struct { + name string + args []string + want interface{} + check func(t *testing.T, tc *ctf_config.TestConfig) + wantErr bool + }{ + { + name: "LoggingLogTargets", + args: []string{"create", "--logging-log-targets=target1", "--logging-log-targets=target2"}, + check: func(t *testing.T, tc *ctf_config.TestConfig) { + assert.NotNil(t, tc.Logging) + assert.NotNil(t, tc.Logging.LogStream) + assert.Equal(t, []string{"target1", "target2"}, tc.Logging.LogStream.LogTargets) + }, + }, + { + name: "PrivateEthereumNetworkExecutionLayerFlag", + args: []string{"create", "--private-ethereum-network-execution-layer=geth", "--private-ethereum-network-ethereum-version=1.10.0"}, + check: func(t *testing.T, tc *ctf_config.TestConfig) { + assert.NotNil(t, tc.PrivateEthereumNetwork) + assert.NotNil(t, tc.PrivateEthereumNetwork.ExecutionLayer) + assert.Equal(t, ctf_config.ExecutionLayer("geth"), *tc.PrivateEthereumNetwork.ExecutionLayer) + assert.Equal(t, ctf_config.EthereumVersion("1.10.0"), *tc.PrivateEthereumNetwork.EthereumVersion) + }, + }, + { + name: "PrivateEthereumNetworkCustomDockerImageFlag", + args: []string{"create", "--private-ethereum-network-execution-layer=geth", "--private-ethereum-network-ethereum-version=1.10.0", "--private-ethereum-network-custom-docker-image=custom-image:v1.0"}, + check: func(t *testing.T, tc *ctf_config.TestConfig) { + assert.NotNil(t, tc.PrivateEthereumNetwork) + assert.NotNil(t, tc.PrivateEthereumNetwork.ExecutionLayer) + assert.Equal(t, map[ctf_config.ContainerType]string{"execution_layer": "custom-image:v1.0"}, tc.PrivateEthereumNetwork.CustomDockerImages) + }, + }, + } + + rootCmd := &cobra.Command{} + rootCmd.AddCommand(createTestConfigCmd) + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + rootCmd.SetArgs(tt.args) + var out bytes.Buffer + rootCmd.SetOutput(&out) + err := rootCmd.Execute() + if (err != nil) != tt.wantErr { + t.Fatalf("Execute() error = %v, wantErr %v", err, tt.wantErr) + } + var tc ctf_config.TestConfig + err = toml.Unmarshal(out.Bytes(), &tc) + if err != nil { + t.Fatalf("Failed to unmarshal output: %v", err) + } + if tt.check != nil { + tt.check(t, &tc) + } + }) + } +} diff --git a/integration-tests/citool/cmd/types.go b/integration-tests/citool/cmd/types.go new file mode 100644 index 00000000000..3c347e9406b --- /dev/null +++ b/integration-tests/citool/cmd/types.go @@ -0,0 +1,26 @@ +package cmd + +type Test struct { + Name string + Path string +} + +// CITestConf defines the configuration for running a test in a CI environment, specifying details like test ID, path, type, runner settings, command, and associated workflows. +type CITestConf struct { + ID string `yaml:"id" json:"id"` + IDSanitized string `json:"id_sanitized"` + Path string `yaml:"path" json:"path"` + TestEnvType string `yaml:"test_env_type" json:"test_env_type"` + RunsOn string `yaml:"runs_on" json:"runs_on"` + TestCmd string `yaml:"test_cmd" json:"test_cmd"` + TestConfigOverrideRequired bool `yaml:"test_config_override_required" json:"testConfigOverrideRequired"` + TestSecretsRequired bool `yaml:"test_secrets_required" json:"testSecretsRequired"` + TestInputs map[string]string `yaml:"test_inputs" json:"test_inputs"` + RemoteRunnerMemory string `yaml:"remote_runner_memory" json:"remoteRunnerMemory"` + PyroscopeEnv string `yaml:"pyroscope_env" json:"pyroscopeEnv"` + Workflows []string `yaml:"workflows" json:"workflows"` +} + +type Config struct { + Tests []CITestConf `yaml:"runner-test-matrix"` +} diff --git a/integration-tests/citool/main.go b/integration-tests/citool/main.go new file mode 100644 index 00000000000..4fa6cac56e5 --- /dev/null +++ b/integration-tests/citool/main.go @@ -0,0 +1,9 @@ +package main + +import ( + "github.com/smartcontractkit/chainlink/integration-tests/citool/cmd" +) + +func main() { + cmd.Execute() +} diff --git a/integration-tests/client/chainlink.go b/integration-tests/client/chainlink.go index bf4dbd9df13..08a47101dc1 100644 --- a/integration-tests/client/chainlink.go +++ b/integration-tests/client/chainlink.go @@ -843,62 +843,6 @@ func (c *ChainlinkClient) ImportVRFKey(vrfExportKey *VRFExportKey) (*VRFKey, *ht return vrfKey, resp.RawResponse, err } -// MustCreateDkgSignKey creates a DKG Sign key on the Chainlink node -// and returns error if the request is unsuccessful -func (c *ChainlinkClient) MustCreateDkgSignKey() (*DKGSignKey, error) { - dkgSignKey := &DKGSignKey{} - c.l.Info().Str(NodeURL, c.Config.URL).Msg("Creating DKG Sign Key") - resp, err := c.APIClient.R(). - SetResult(dkgSignKey). - Post("/v2/keys/dkgsign") - if err == nil { - err = VerifyStatusCode(resp.StatusCode(), http.StatusOK) - } - return dkgSignKey, err -} - -// MustCreateDkgEncryptKey creates a DKG Encrypt key on the Chainlink node -// and returns error if the request is unsuccessful -func (c *ChainlinkClient) MustCreateDkgEncryptKey() (*DKGEncryptKey, error) { - dkgEncryptKey := &DKGEncryptKey{} - c.l.Info().Str(NodeURL, c.Config.URL).Msg("Creating DKG Encrypt Key") - resp, err := c.APIClient.R(). - SetResult(dkgEncryptKey). - Post("/v2/keys/dkgencrypt") - if err == nil { - err = VerifyStatusCode(resp.StatusCode(), http.StatusOK) - } - return dkgEncryptKey, err -} - -// MustReadDKGSignKeys reads all DKG Sign Keys from the Chainlink node returns err if response not 200 -func (c *ChainlinkClient) MustReadDKGSignKeys() (*DKGSignKeys, error) { - dkgSignKeys := &DKGSignKeys{} - c.l.Info().Str(NodeURL, c.Config.URL).Msg("Reading DKG Sign Keys") - resp, err := c.APIClient.R(). - SetResult(dkgSignKeys). - Get("/v2/keys/dkgsign") - if err != nil { - return nil, err - } - err = VerifyStatusCode(resp.StatusCode(), http.StatusOK) - return dkgSignKeys, err -} - -// MustReadDKGEncryptKeys reads all DKG Encrypt Keys from the Chainlink node returns err if response not 200 -func (c *ChainlinkClient) MustReadDKGEncryptKeys() (*DKGEncryptKeys, error) { - dkgEncryptKeys := &DKGEncryptKeys{} - c.l.Info().Str(NodeURL, c.Config.URL).Msg("Reading DKG Encrypt Keys") - resp, err := c.APIClient.R(). - SetResult(dkgEncryptKeys). - Get("/v2/keys/dkgencrypt") - if err != nil { - return nil, err - } - err = VerifyStatusCode(resp.StatusCode(), http.StatusOK) - return dkgEncryptKeys, err -} - // CreateCSAKey creates a CSA key on the Chainlink node, only 1 CSA key per noe func (c *ChainlinkClient) CreateCSAKey() (*CSAKey, *http.Response, error) { csaKey := &CSAKey{} diff --git a/integration-tests/client/chainlink_k8s.go b/integration-tests/client/chainlink_k8s.go index 147238b7950..794e93f7276 100644 --- a/integration-tests/client/chainlink_k8s.go +++ b/integration-tests/client/chainlink_k8s.go @@ -10,6 +10,11 @@ import ( "github.com/smartcontractkit/chainlink-testing-framework/k8s/environment" ) +const ( + CLNodeTestEmail = "notreal@fakeemail.ch" + CLNodeTestPassword = "fj293fbBnlQ!f9vNs" +) + type ChainlinkK8sClient struct { ChartName string PodName string @@ -74,8 +79,8 @@ func ConnectChainlinkNodes(e *environment.Environment) ([]*ChainlinkK8sClient, e for _, nodeDetails := range e.ChainlinkNodeDetails { c, err := NewChainlinkK8sClient(&ChainlinkConfig{ URL: nodeDetails.LocalIP, - Email: "notreal@fakeemail.ch", - Password: "fj293fbBnlQ!f9vNs", + Email: CLNodeTestEmail, + Password: CLNodeTestPassword, InternalIP: parseHostname(nodeDetails.InternalIP), }, nodeDetails.PodName, nodeDetails.ChartName) if err != nil { @@ -100,8 +105,8 @@ func ReconnectChainlinkNodes(testEnvironment *environment.Environment, nodes []* if details.ChartName == node.ChartName { // Make the link from client to pod consistent node, err = NewChainlinkK8sClient(&ChainlinkConfig{ URL: details.LocalIP, - Email: "notreal@fakeemail.ch", - Password: "fj293fbBnlQ!f9vNs", + Email: CLNodeTestEmail, + Password: CLNodeTestPassword, InternalIP: parseHostname(details.InternalIP), }, details.PodName, details.ChartName) if err != nil { @@ -136,8 +141,8 @@ func ConnectChainlinkNodeURLs(urls []string) ([]*ChainlinkK8sClient, error) { func ConnectChainlinkNodeURL(url string) (*ChainlinkK8sClient, error) { return NewChainlinkK8sClient(&ChainlinkConfig{ URL: url, - Email: "notreal@fakeemail.ch", - Password: "fj293fbBnlQ!f9vNs", + Email: CLNodeTestEmail, + Password: CLNodeTestPassword, InternalIP: parseHostname(url), }, parseHostname(url), // a decent guess diff --git a/integration-tests/client/chainlink_models.go b/integration-tests/client/chainlink_models.go index 586fd67f0e2..a0435d53368 100644 --- a/integration-tests/client/chainlink_models.go +++ b/integration-tests/client/chainlink_models.go @@ -214,50 +214,6 @@ type VRFKeys struct { Data []VRFKey `json:"data"` } -// DKGSignKeyAttributes is the model that represents the created DKG Sign key attributes when read -type DKGSignKeyAttributes struct { - PublicKey string `json:"publicKey"` -} - -// DKGSignKeyData is the model that represents the created DKG Sign key's data when read -type DKGSignKeyData struct { - Type string `json:"type"` - ID string `json:"id"` - Attributes DKGSignKeyAttributes `json:"attributes"` -} - -// DKGSignKey is the model that represents the created DKG Sign key when read -type DKGSignKey struct { - Data DKGSignKeyData `json:"data"` -} - -// DKGSignKeys is the model that represents the created DKGSignData key when read -type DKGSignKeys struct { - Data []DKGSignKey `json:"data"` -} - -// DKGEncryptKeyAttributes is the model that represents the created DKG Encrypt key attributes when read -type DKGEncryptKeyAttributes struct { - PublicKey string `json:"publicKey"` -} - -// DKGEncryptKeyData is the model that represents the created DKG Encrypt key's data when read -type DKGEncryptKeyData struct { - Type string `json:"type"` - ID string `json:"id"` - Attributes DKGEncryptKeyAttributes `json:"attributes"` -} - -// DKGEncryptKey is the model that represents the created DKG Encrypt key when read -type DKGEncryptKey struct { - Data DKGEncryptKeyData `json:"data"` -} - -// DKGEncryptKeys is the model that represents the created DKGEncryptKeys key when read -type DKGEncryptKeys struct { - Data []DKGEncryptKey `json:"data"` -} - // OCRKeys is the model that represents the created OCR keys when read type OCRKeys struct { Data []OCRKeyData `json:"data"` diff --git a/integration-tests/config/config.go b/integration-tests/config/config.go deleted file mode 100644 index 6d00ceb32bc..00000000000 --- a/integration-tests/config/config.go +++ /dev/null @@ -1,76 +0,0 @@ -package config - -var ( - BaseOCR1Config = `[OCR] -Enabled = true - -[P2P] -[P2P.V2] -AnnounceAddresses = ["0.0.0.0:6690"] -ListenAddresses = ["0.0.0.0:6690"]` - - BaseOCR2Config = `[Feature] -LogPoller = true - -[OCR2] -Enabled = true - -[P2P] -[P2P.V2] -AnnounceAddresses = ["0.0.0.0:6690"] -ListenAddresses = ["0.0.0.0:6690"]` - - ForwarderNetworkDetailConfig = `[EVM.Transactions] -ForwardersEnabled = true` - - BaseVRFV2NetworkDetailTomlConfig = `BlockBackfillDepth = 500 -MinIncomingConfirmations = 3 -[EVM.GasEstimator] -LimitDefault = 3500000 -[EVM.Transactions] -MaxQueued = 10000 -` - - DefaultOCR2VRFNetworkDetailTomlConfig = `FinalityDepth = 5 -[EVM.GasEstimator] -LimitDefault = 3_500_000 -PriceMax = 100000000000 -FeeCapDefault = 100000000000` - - BaseMercuryTomlConfig = `[Feature] -LogPoller = true - -[Log] -Level = 'debug' -JSONConsole = true - -[WebServer] -AllowOrigins = '*' -HTTPPort = 6688 -SecureCookies = false - -[WebServer.TLS] -HTTPSPort = 0 - -[WebServer.RateLimit] -Authenticated = 2000 -Unauthenticated = 100 - -[JobPipeline] -MaxSuccessfulRuns = 0 - -[OCR2] -Enabled = true -CaptureEATelemetry = true - -[P2P] -[P2P.V2] -ListenAddresses = ['0.0.0.0:6690']` - - TelemetryIngressConfig = `[TelemetryIngress] -UniConn = false -Logging = true -ServerPubKey = '8fa807463ad73f9ee855cfd60ba406dcf98a2855b3dd8af613107b0f6890a707' -URL = 'oti:1337' -` -) diff --git a/integration-tests/contracts/contract_models.go b/integration-tests/contracts/contract_models.go index b548ec1427a..5983f95c9f5 100644 --- a/integration-tests/contracts/contract_models.go +++ b/integration-tests/contracts/contract_models.go @@ -81,6 +81,16 @@ type LinkToken interface { TransferAndCall(to string, amount *big.Int, data []byte) (*types.Transaction, error) TransferAndCallFromKey(to string, amount *big.Int, data []byte, keyNum int) (*types.Transaction, error) Name(context.Context) (string, error) + Decimals() uint +} + +type WETHToken interface { + Address() string + Approve(to string, amount *big.Int) error + Transfer(to string, amount *big.Int) error + BalanceOf(ctx context.Context, addr string) (*big.Int, error) + Name(context.Context) (string, error) + Decimals() uint } type OffchainOptions struct { @@ -220,6 +230,13 @@ type MockETHLINKFeed interface { LatestRoundDataUpdatedAt() (*big.Int, error) } +type MockETHUSDFeed interface { + Address() string + LatestRoundData() (*big.Int, error) + LatestRoundDataUpdatedAt() (*big.Int, error) + Decimals() uint +} + type MockGasFeed interface { Address() string } @@ -227,6 +244,7 @@ type MockGasFeed interface { type BlockHashStore interface { Address() string GetBlockHash(ctx context.Context, blockNumber *big.Int) ([32]byte, error) + StoreVerifyHeader(blockNumber *big.Int, blockHeader []byte) error } type Staking interface { diff --git a/integration-tests/contracts/contract_vrf_models.go b/integration-tests/contracts/contract_vrf_models.go index c30eadd3d3d..45825a18ff3 100644 --- a/integration-tests/contracts/contract_vrf_models.go +++ b/integration-tests/contracts/contract_vrf_models.go @@ -21,8 +21,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrf_v2plus_upgraded_version" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrfv2_wrapper_load_test_consumer" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrfv2plus_wrapper_load_test_consumer" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/dkg" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/vrf_beacon" ) type VRF interface { @@ -322,47 +320,6 @@ type VRFv2PlusWrapperLoadTestConsumer interface { GetLoadTestMetrics(ctx context.Context) (*VRFLoadTestMetrics, error) } -type DKG interface { - Address() string - AddClient(keyID string, clientAddress string) error - SetConfig( - signerAddresses []common.Address, - transmitterAddresses []common.Address, - f uint8, - onchainConfig []byte, - offchainConfigVersion uint64, - offchainConfig []byte, - ) error - WaitForConfigSetEvent(timeout time.Duration) (*dkg.DKGConfigSet, error) - WaitForTransmittedEvent(timeout time.Duration) (*dkg.DKGTransmitted, error) -} - -type VRFCoordinatorV3 interface { - Address() string - SetProducer(producerAddress string) error - CreateSubscription() error - FindSubscriptionID() (*big.Int, error) - AddConsumer(subId *big.Int, consumerAddress string) error - SetConfig(maxCallbackGasLimit, maxCallbackArgumentsLength uint32) error -} - -type VRFBeacon interface { - Address() string - SetPayees(transmitterAddresses []common.Address, payeesAddresses []common.Address) error - SetConfig( - signerAddresses []common.Address, - transmitterAddresses []common.Address, - f uint8, - onchainConfig []byte, - offchainConfigVersion uint64, - offchainConfig []byte, - ) error - WaitForConfigSetEvent(timeout time.Duration) (*vrf_beacon.VRFBeaconConfigSet, error) - WaitForNewTransmissionEvent(timeout time.Duration) (*vrf_beacon.VRFBeaconNewTransmission, error) - LatestConfigDigestAndEpoch(ctx context.Context) (vrf_beacon.LatestConfigDigestAndEpoch, - error) -} - type VRFBeaconConsumer interface { Address() string RequestRandomness( diff --git a/integration-tests/contracts/ethereum/KeeperRegistryVersions.go b/integration-tests/contracts/ethereum/KeeperRegistryVersions.go index 4aee8d75d21..d5d0c2edeae 100644 --- a/integration-tests/contracts/ethereum/KeeperRegistryVersions.go +++ b/integration-tests/contracts/ethereum/KeeperRegistryVersions.go @@ -19,4 +19,5 @@ const ( RegistryVersion_2_0 RegistryVersion_2_1 RegistryVersion_2_2 + RegistryVersion_2_3 ) diff --git a/integration-tests/contracts/ethereum_contracts.go b/integration-tests/contracts/ethereum_contracts.go index 6d6c9108a4f..2db6aeb4637 100644 --- a/integration-tests/contracts/ethereum_contracts.go +++ b/integration-tests/contracts/ethereum_contracts.go @@ -20,6 +20,11 @@ import ( ocrTypes "github.com/smartcontractkit/libocr/offchainreporting/types" "github.com/smartcontractkit/seth" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/counter" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_automation_registry_master_wrapper_2_3" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/mock_ethusd_aggregator_wrapper" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/weth9_wrapper" + contractsethereum "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/functions/generated/functions_coordinator" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/functions/generated/functions_load_test_client" @@ -56,8 +61,11 @@ type OCRv2Config struct { OnchainConfig []byte TypedOnchainConfig21 i_keeper_registry_master_wrapper_2_1.IAutomationV21PlusCommonOnchainConfigLegacy TypedOnchainConfig22 i_automation_registry_master_wrapper_2_2.AutomationRegistryBase22OnchainConfig + TypedOnchainConfig23 i_automation_registry_master_wrapper_2_3.AutomationRegistryBase23OnchainConfig OffchainConfigVersion uint64 OffchainConfig []byte + BillingTokens []common.Address + BillingConfigs []i_automation_registry_master_wrapper_2_3.AutomationRegistryBase23BillingConfig } type EthereumFunctionsLoadStats struct { @@ -92,11 +100,6 @@ func DefaultOffChainAggregatorOptions() OffchainOptions { // DefaultOffChainAggregatorConfig returns some base defaults for configuring an OCR contract func DefaultOffChainAggregatorConfig(numberNodes int) OffChainAggregatorConfig { - if numberNodes <= 4 { - log.Err(fmt.Errorf("insufficient number of nodes (%d) supplied for OCR, need at least 5", numberNodes)). - Int("Number Chainlink Nodes", numberNodes). - Msg("You likely need more chainlink nodes to properly configure OCR, try 5 or more.") - } s := []int{1} // First node's stage already inputted as a 1 in line above, so numberNodes-1. for i := 0; i < numberNodes-1; i++ { @@ -739,6 +742,10 @@ type EthereumLinkToken struct { l zerolog.Logger } +func (l *EthereumLinkToken) Decimals() uint { + return 18 +} + func DeployLinkTokenContract(l zerolog.Logger, client *seth.Client) (*EthereumLinkToken, error) { linkTokenAbi, err := link_token_interface.LinkTokenMetaData.GetAbi() if err != nil { @@ -1483,3 +1490,242 @@ func (e *EthereumFunctionsLoadTestClient) SendRequestWithDONHostedSecrets(times _, err := e.client.Decode(e.instance.SendRequestWithDONHostedSecrets(e.client.NewTXOpts(), times, source, slotID, slotVersion, args, subscriptionId, donID)) return err } + +// EthereumWETHToken represents a WETH address +type EthereumWETHToken struct { + client *seth.Client + instance *weth9_wrapper.WETH9 + address common.Address + l zerolog.Logger +} + +func DeployWETHTokenContract(l zerolog.Logger, client *seth.Client) (*EthereumWETHToken, error) { + wethTokenAbi, err := weth9_wrapper.WETH9MetaData.GetAbi() + if err != nil { + return &EthereumWETHToken{}, fmt.Errorf("failed to get WETH token ABI: %w", err) + } + wethDeploymentData, err := client.DeployContract(client.NewTXOpts(), "WETHToken", *wethTokenAbi, common.FromHex(weth9_wrapper.WETH9MetaData.Bin)) + if err != nil { + return &EthereumWETHToken{}, fmt.Errorf("WETH token instance deployment failed: %w", err) + } + + wethToken, err := weth9_wrapper.NewWETH9(wethDeploymentData.Address, wrappers.MustNewWrappedContractBackend(nil, client)) + if err != nil { + return &EthereumWETHToken{}, fmt.Errorf("failed to instantiate WETHToken instance: %w", err) + } + + return &EthereumWETHToken{ + client: client, + instance: wethToken, + address: wethDeploymentData.Address, + l: l, + }, nil +} + +func LoadWETHTokenContract(l zerolog.Logger, client *seth.Client, address common.Address) (*EthereumWETHToken, error) { + abi, err := weth9_wrapper.WETH9MetaData.GetAbi() + if err != nil { + return &EthereumWETHToken{}, fmt.Errorf("failed to get WETH token ABI: %w", err) + } + + client.ContractStore.AddABI("WETHToken", *abi) + client.ContractStore.AddBIN("WETHToken", common.FromHex(weth9_wrapper.WETH9MetaData.Bin)) + + wethToken, err := weth9_wrapper.NewWETH9(address, wrappers.MustNewWrappedContractBackend(nil, client)) + if err != nil { + return &EthereumWETHToken{}, fmt.Errorf("failed to instantiate WETHToken instance: %w", err) + } + + return &EthereumWETHToken{ + client: client, + instance: wethToken, + address: address, + l: l, + }, nil +} + +// Fund the WETH Token contract with ETH to distribute the token +func (l *EthereumWETHToken) Fund(_ *big.Float) error { + panic("do not use this function, use actions_seth.SendFunds instead") +} + +func (l *EthereumWETHToken) Decimals() uint { + return 18 +} + +func (l *EthereumWETHToken) BalanceOf(ctx context.Context, addr string) (*big.Int, error) { + return l.instance.BalanceOf(&bind.CallOpts{ + From: l.client.Addresses[0], + Context: ctx, + }, common.HexToAddress(addr)) + +} + +// Name returns the name of the weth token +func (l *EthereumWETHToken) Name(ctx context.Context) (string, error) { + return l.instance.Name(&bind.CallOpts{ + From: l.client.Addresses[0], + Context: ctx, + }) +} + +func (l *EthereumWETHToken) Address() string { + return l.address.Hex() +} + +func (l *EthereumWETHToken) Approve(to string, amount *big.Int) error { + l.l.Info(). + Str("From", l.client.Addresses[0].Hex()). + Str("To", to). + Str("Amount", amount.String()). + Msg("Approving WETH Transfer") + _, err := l.client.Decode(l.instance.Approve(l.client.NewTXOpts(), common.HexToAddress(to), amount)) + return err +} + +func (l *EthereumWETHToken) Transfer(to string, amount *big.Int) error { + l.l.Info(). + Str("From", l.client.Addresses[0].Hex()). + Str("To", to). + Str("Amount", amount.String()). + Msg("Transferring WETH") + _, err := l.client.Decode(l.instance.Transfer(l.client.NewTXOpts(), common.HexToAddress(to), amount)) + return err +} + +// EthereumMockETHUSDFeed represents mocked ETH/USD feed contract +// For the integration tests, we also use this ETH/USD feed for LINK/USD feed since they have the same structure +type EthereumMockETHUSDFeed struct { + client *seth.Client + feed *mock_ethusd_aggregator_wrapper.MockETHUSDAggregator + address *common.Address +} + +func (l *EthereumMockETHUSDFeed) Decimals() uint { + return 8 +} + +func (l *EthereumMockETHUSDFeed) Address() string { + return l.address.Hex() +} + +func (l *EthereumMockETHUSDFeed) LatestRoundData() (*big.Int, error) { + data, err := l.feed.LatestRoundData(&bind.CallOpts{ + From: l.client.Addresses[0], + Context: context.Background(), + }) + if err != nil { + return nil, err + } + return data.Ans, nil +} + +func (l *EthereumMockETHUSDFeed) LatestRoundDataUpdatedAt() (*big.Int, error) { + data, err := l.feed.LatestRoundData(&bind.CallOpts{ + From: l.client.Addresses[0], + Context: context.Background(), + }) + if err != nil { + return nil, err + } + return data.UpdatedAt, nil +} + +func DeployMockETHUSDFeed(client *seth.Client, answer *big.Int) (MockETHUSDFeed, error) { + abi, err := mock_ethusd_aggregator_wrapper.MockETHUSDAggregatorMetaData.GetAbi() + if err != nil { + return &EthereumMockETHUSDFeed{}, fmt.Errorf("failed to get MockETHUSDFeed ABI: %w", err) + } + data, err := client.DeployContract(client.NewTXOpts(), "MockETHUSDFeed", *abi, common.FromHex(mock_ethusd_aggregator_wrapper.MockETHUSDAggregatorMetaData.Bin), answer) + if err != nil { + return &EthereumMockETHUSDFeed{}, fmt.Errorf("MockETHUSDFeed instance deployment have failed: %w", err) + } + + instance, err := mock_ethusd_aggregator_wrapper.NewMockETHUSDAggregator(data.Address, wrappers.MustNewWrappedContractBackend(nil, client)) + if err != nil { + return &EthereumMockETHUSDFeed{}, fmt.Errorf("failed to instantiate MockETHUSDFeed instance: %w", err) + } + + return &EthereumMockETHUSDFeed{ + address: &data.Address, + client: client, + feed: instance, + }, nil +} + +func LoadMockETHUSDFeed(client *seth.Client, address common.Address) (MockETHUSDFeed, error) { + abi, err := mock_ethusd_aggregator_wrapper.MockETHUSDAggregatorMetaData.GetAbi() + if err != nil { + return &EthereumMockETHUSDFeed{}, fmt.Errorf("failed to get MockETHUSDFeed ABI: %w", err) + } + client.ContractStore.AddABI("MockETHUSDFeed", *abi) + client.ContractStore.AddBIN("MockETHUSDFeed", common.FromHex(mock_ethusd_aggregator_wrapper.MockETHUSDAggregatorMetaData.Bin)) + + instance, err := mock_ethusd_aggregator_wrapper.NewMockETHUSDAggregator(address, wrappers.MustNewWrappedContractBackend(nil, client)) + if err != nil { + return &EthereumMockETHUSDFeed{}, fmt.Errorf("failed to instantiate MockETHUSDFeed instance: %w", err) + } + + return &EthereumMockETHUSDFeed{ + address: &address, + client: client, + feed: instance, + }, nil +} + +type Counter struct { + client *seth.Client + instance *counter.Counter + address common.Address +} + +func DeployCounterContract(client *seth.Client) (*Counter, error) { + abi, err := counter.CounterMetaData.GetAbi() + if err != nil { + return &Counter{}, fmt.Errorf("failed to get Counter ABI: %w", err) + } + linkDeploymentData, err := client.DeployContract(client.NewTXOpts(), "Counter", *abi, common.FromHex(counter.CounterMetaData.Bin)) + if err != nil { + return &Counter{}, fmt.Errorf("Counter instance deployment have failed: %w", err) + } + + instance, err := counter.NewCounter(linkDeploymentData.Address, wrappers.MustNewWrappedContractBackend(nil, client)) + if err != nil { + return &Counter{}, fmt.Errorf("failed to instantiate Counter instance: %w", err) + } + + return &Counter{ + client: client, + instance: instance, + address: linkDeploymentData.Address, + }, nil +} + +func (c *Counter) Address() string { + return c.address.Hex() +} + +func (c *Counter) Increment() error { + _, err := c.client.Decode(c.instance.Increment( + c.client.NewTXOpts(), + )) + return err +} + +func (c *Counter) Reset() error { + _, err := c.client.Decode(c.instance.Reset( + c.client.NewTXOpts(), + )) + return err +} + +func (c *Counter) Count() (*big.Int, error) { + data, err := c.instance.Count(&bind.CallOpts{ + From: c.client.Addresses[0], + Context: context.Background(), + }) + if err != nil { + return nil, err + } + return data, nil +} diff --git a/integration-tests/contracts/ethereum_contracts_automation.go b/integration-tests/contracts/ethereum_contracts_automation.go index 13cad7ffefb..bd0e1aafc82 100644 --- a/integration-tests/contracts/ethereum_contracts_automation.go +++ b/integration-tests/contracts/ethereum_contracts_automation.go @@ -16,6 +16,9 @@ import ( "github.com/rs/zerolog" "github.com/smartcontractkit/seth" + cltypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" + registrylogicc23 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_registry_logic_c_wrapper_2_3" + "github.com/smartcontractkit/chainlink-testing-framework/blockchain" "github.com/smartcontractkit/chainlink-testing-framework/networks" "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum" @@ -28,12 +31,20 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_consumer_benchmark" automationForwarderLogic "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_forwarder_logic" registrar21 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_registrar_wrapper2_1" + registrar23 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_registrar_wrapper2_3" registrylogica22 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_registry_logic_a_wrapper_2_2" registrylogicb22 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_registry_logic_b_wrapper_2_2" registry22 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_registry_wrapper_2_2" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/chain_module_base" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_automation_registry_master_wrapper_2_2" iregistry22 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_automation_registry_master_wrapper_2_2" + + registrylogica23 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_registry_logic_a_wrapper_2_3" + registrylogicb23 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_registry_logic_b_wrapper_2_3" + registry23 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_registry_wrapper_2_3" + iregistry23 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_automation_registry_master_wrapper_2_3" + + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_automation_registry_master_wrapper_2_3" 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" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_keeper_registry_master_wrapper_2_1" @@ -127,6 +138,7 @@ type EthereumKeeperRegistry struct { registry2_0 *keeper_registry_wrapper2_0.KeeperRegistry registry2_1 *i_keeper_registry_master_wrapper_2_1.IKeeperRegistryMaster registry2_2 *i_automation_registry_master_wrapper_2_2.IAutomationRegistryMaster + registry2_3 *i_automation_registry_master_wrapper_2_3.IAutomationRegistryMaster23 chainModule *i_chain_module.IChainModule address *common.Address l zerolog.Logger @@ -139,7 +151,7 @@ func (v *EthereumKeeperRegistry) ReorgProtectionEnabled() bool { } func (v *EthereumKeeperRegistry) ChainModuleAddress() common.Address { - if v.version == ethereum.RegistryVersion_2_2 { + if v.version >= ethereum.RegistryVersion_2_2 { return v.chainModule.Address() } return common.Address{} @@ -159,6 +171,9 @@ func (v *EthereumKeeperRegistry) RegistryOwnerAddress() common.Address { } switch v.version { + case ethereum.RegistryVersion_2_3: + ownerAddress, _ := v.registry2_3.Owner(callOpts) + return ownerAddress case ethereum.RegistryVersion_2_2: ownerAddress, _ := v.registry2_2.Owner(callOpts) return ownerAddress @@ -198,6 +213,17 @@ func (v *EthereumKeeperRegistry) SetConfigTypeSafe(ocrConfig OCRv2Config) error ocrConfig.OffchainConfigVersion, ocrConfig.OffchainConfig, )) + case ethereum.RegistryVersion_2_3: + _, err = v.client.Decode(v.registry2_3.SetConfigTypeSafe(txOpts, + ocrConfig.Signers, + ocrConfig.Transmitters, + ocrConfig.F, + ocrConfig.TypedOnchainConfig23, + ocrConfig.OffchainConfigVersion, + ocrConfig.OffchainConfig, + ocrConfig.BillingTokens, + ocrConfig.BillingConfigs, + )) default: return fmt.Errorf("SetConfigTypeSafe is not supported in keeper registry version %d", v.version) } @@ -280,8 +306,8 @@ func (v *EthereumKeeperRegistry) SetConfig(config KeeperRegistrySettings, ocrCon ocrConfig.OffchainConfig, )) 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") + case ethereum.RegistryVersion_2_1, ethereum.RegistryVersion_2_2, ethereum.RegistryVersion_2_3: + return fmt.Errorf("registry version 2.1 2.2 and 2.3 must use setConfigTypeSafe function") default: return fmt.Errorf("keeper registry version %d is not supported", v.version) } @@ -298,6 +324,9 @@ func (v *EthereumKeeperRegistry) SetUpkeepOffchainConfig(id *big.Int, offchainCo case ethereum.RegistryVersion_2_2: _, err := v.client.Decode(v.registry2_2.SetUpkeepOffchainConfig(v.client.NewTXOpts(), id, offchainConfig)) return err + case ethereum.RegistryVersion_2_3: + _, err := v.client.Decode(v.registry2_3.SetUpkeepOffchainConfig(v.client.NewTXOpts(), id, offchainConfig)) + return err default: return fmt.Errorf("SetUpkeepOffchainConfig is not supported by keeper registry version %d", v.version) } @@ -321,6 +350,8 @@ func (v *EthereumKeeperRegistry) Pause() error { _, err = v.client.Decode(v.registry2_1.Pause(txOpts)) case ethereum.RegistryVersion_2_2: _, err = v.client.Decode(v.registry2_2.Pause(txOpts)) + case ethereum.RegistryVersion_2_3: + _, err = v.client.Decode(v.registry2_3.Pause(txOpts)) default: return fmt.Errorf("keeper registry version %d is not supported", v.version) } @@ -405,6 +436,8 @@ func (v *EthereumKeeperRegistry) AddUpkeepFundsFromKey(id *big.Int, amount *big. _, err = v.client.Decode(v.registry2_1.AddFunds(opts, id, amount)) case ethereum.RegistryVersion_2_2: _, err = v.client.Decode(v.registry2_2.AddFunds(opts, id, amount)) + case ethereum.RegistryVersion_2_3: + _, err = v.client.Decode(v.registry2_3.AddFunds(opts, id, amount)) } return err @@ -501,6 +534,8 @@ func (v *EthereumKeeperRegistry) GetUpkeepInfo(ctx context.Context, id *big.Int) }, nil case ethereum.RegistryVersion_2_2: return v.getUpkeepInfo22(opts, id) + case ethereum.RegistryVersion_2_3: + return v.getUpkeepInfo23(opts, id) } return nil, fmt.Errorf("keeper registry version %d is not supported", v.version) @@ -525,6 +560,25 @@ func (v *EthereumKeeperRegistry) getUpkeepInfo22(opts *bind.CallOpts, id *big.In }, nil } +func (v *EthereumKeeperRegistry) getUpkeepInfo23(opts *bind.CallOpts, id *big.Int) (*UpkeepInfo, error) { + uk, err := v.registry2_3.GetUpkeep(opts, id) + if err != nil { + return nil, err + } + return &UpkeepInfo{ + Target: uk.Target.Hex(), + ExecuteGas: uk.PerformGas, + CheckData: uk.CheckData, + Balance: uk.Balance, + Admin: uk.Admin.Hex(), + MaxValidBlocknumber: uk.MaxValidBlocknumber, + LastPerformBlockNumber: uk.LastPerformedBlockNumber, + AmountSpent: uk.AmountSpent, + Paused: uk.Paused, + OffchainConfig: uk.OffchainConfig, + }, nil +} + func (v *EthereumKeeperRegistry) GetKeeperInfo(ctx context.Context, keeperAddr string) (*KeeperInfo, error) { opts := &bind.CallOpts{ From: v.client.MustGetRootKeyAddress(), @@ -544,7 +598,7 @@ func (v *EthereumKeeperRegistry) GetKeeperInfo(ctx context.Context, keeperAddr s info, err = v.registry1_2.GetKeeperInfo(opts, common.HexToAddress(keeperAddr)) case ethereum.RegistryVersion_1_3: info, err = v.registry1_3.GetKeeperInfo(opts, common.HexToAddress(keeperAddr)) - case ethereum.RegistryVersion_2_0, ethereum.RegistryVersion_2_1, ethereum.RegistryVersion_2_2: + case ethereum.RegistryVersion_2_0, ethereum.RegistryVersion_2_1, ethereum.RegistryVersion_2_2, ethereum.RegistryVersion_2_3: // this is not used anywhere return nil, fmt.Errorf("not supported") } @@ -588,7 +642,7 @@ func (v *EthereumKeeperRegistry) SetKeepers(keepers []string, payees []string, o ocrConfig.OffchainConfigVersion, ocrConfig.OffchainConfig, )) - case ethereum.RegistryVersion_2_1, ethereum.RegistryVersion_2_2: + case ethereum.RegistryVersion_2_1, ethereum.RegistryVersion_2_2, ethereum.RegistryVersion_2_3: return fmt.Errorf("not supported") } @@ -634,7 +688,7 @@ func (v *EthereumKeeperRegistry) RegisterUpkeep(target string, gasLimit uint32, checkData, nil, //offchain config )) - case ethereum.RegistryVersion_2_1, ethereum.RegistryVersion_2_2: + case ethereum.RegistryVersion_2_1, ethereum.RegistryVersion_2_2, ethereum.RegistryVersion_2_3: return fmt.Errorf("not supported") } @@ -660,6 +714,8 @@ func (v *EthereumKeeperRegistry) CancelUpkeep(id *big.Int) error { tx, err = v.client.Decode(v.registry2_1.CancelUpkeep(opts, id)) case ethereum.RegistryVersion_2_2: tx, err = v.client.Decode(v.registry2_2.CancelUpkeep(opts, id)) + case ethereum.RegistryVersion_2_3: + tx, err = v.client.Decode(v.registry2_3.CancelUpkeep(opts, id)) } txHash := "none" @@ -692,6 +748,8 @@ func (v *EthereumKeeperRegistry) SetUpkeepGasLimit(id *big.Int, gas uint32) erro _, err = v.client.Decode(v.registry2_1.SetUpkeepGasLimit(opts, id, gas)) case ethereum.RegistryVersion_2_2: _, err = v.client.Decode(v.registry2_2.SetUpkeepGasLimit(opts, id, gas)) + case ethereum.RegistryVersion_2_3: + _, err = v.client.Decode(v.registry2_3.SetUpkeepGasLimit(opts, id, gas)) default: return fmt.Errorf("keeper registry version %d is not supported for SetUpkeepGasLimit", v.version) } @@ -729,7 +787,7 @@ func (v *EthereumKeeperRegistry) GetKeeperList(ctx context.Context) ([]string, e return []string{}, err } list = state.Transmitters - case ethereum.RegistryVersion_2_1, ethereum.RegistryVersion_2_2: + case ethereum.RegistryVersion_2_1, ethereum.RegistryVersion_2_2, ethereum.RegistryVersion_2_3: return nil, fmt.Errorf("not supported") } @@ -757,6 +815,8 @@ func (v *EthereumKeeperRegistry) UpdateCheckData(id *big.Int, newCheckData []byt _, err = v.client.Decode(v.registry2_1.SetUpkeepCheckData(opts, id, newCheckData)) case ethereum.RegistryVersion_2_2: _, err = v.client.Decode(v.registry2_2.SetUpkeepCheckData(opts, id, newCheckData)) + case ethereum.RegistryVersion_2_3: + _, err = v.client.Decode(v.registry2_3.SetUpkeepCheckData(opts, id, newCheckData)) default: return fmt.Errorf("UpdateCheckData is not supported by keeper registry version %d", v.version) } @@ -774,6 +834,8 @@ func (v *EthereumKeeperRegistry) SetUpkeepTriggerConfig(id *big.Int, triggerConf _, err = v.client.Decode(v.registry2_1.SetUpkeepTriggerConfig(opts, id, triggerConfig)) case ethereum.RegistryVersion_2_2: _, err = v.client.Decode(v.registry2_2.SetUpkeepTriggerConfig(opts, id, triggerConfig)) + case ethereum.RegistryVersion_2_3: + _, err = v.client.Decode(v.registry2_3.SetUpkeepTriggerConfig(opts, id, triggerConfig)) default: return fmt.Errorf("SetUpkeepTriggerConfig is not supported by keeper registry version %d", v.version) } @@ -791,6 +853,8 @@ func (v *EthereumKeeperRegistry) SetUpkeepPrivilegeConfig(id *big.Int, privilege _, err = v.client.Decode(v.registry2_1.SetUpkeepPrivilegeConfig(opts, id, privilegeConfig)) case ethereum.RegistryVersion_2_2: _, err = v.client.Decode(v.registry2_2.SetUpkeepPrivilegeConfig(opts, id, privilegeConfig)) + case ethereum.RegistryVersion_2_3: + _, err = v.client.Decode(v.registry2_3.SetUpkeepPrivilegeConfig(opts, id, privilegeConfig)) default: return fmt.Errorf("SetUpkeepPrivilegeConfig is not supported by keeper registry version %d", v.version) } @@ -812,6 +876,8 @@ func (v *EthereumKeeperRegistry) PauseUpkeep(id *big.Int) error { _, err = v.client.Decode(v.registry2_1.PauseUpkeep(opts, id)) case ethereum.RegistryVersion_2_2: _, err = v.client.Decode(v.registry2_2.PauseUpkeep(opts, id)) + case ethereum.RegistryVersion_2_3: + _, err = v.client.Decode(v.registry2_3.PauseUpkeep(opts, id)) default: return fmt.Errorf("PauseUpkeep is not supported by keeper registry version %d", v.version) } @@ -833,6 +899,8 @@ func (v *EthereumKeeperRegistry) UnpauseUpkeep(id *big.Int) error { _, err = v.client.Decode(v.registry2_1.UnpauseUpkeep(opts, id)) case ethereum.RegistryVersion_2_2: _, err = v.client.Decode(v.registry2_2.UnpauseUpkeep(opts, id)) + case ethereum.RegistryVersion_2_3: + _, err = v.client.Decode(v.registry2_3.UnpauseUpkeep(opts, id)) default: return fmt.Errorf("UnpauseUpkeep is not supported by keeper registry version %d", v.version) } @@ -903,6 +971,16 @@ func (v *EthereumKeeperRegistry) ParseUpkeepPerformedLog(log *types.Log) (*Upkee Success: parsedLog.Success, From: utils.ZeroAddress, }, nil + case ethereum.RegistryVersion_2_3: + parsedLog, err := v.registry2_3.ParseUpkeepPerformed(*log) + if err != nil { + return nil, err + } + return &UpkeepPerformedLog{ + Id: parsedLog.Id, + Success: parsedLog.Success, + From: utils.ZeroAddress, + }, nil } return nil, fmt.Errorf("keeper registry version %d is not supported", v.version) } @@ -935,6 +1013,14 @@ func (v *EthereumKeeperRegistry) ParseStaleUpkeepReportLog(log *types.Log) (*Sta return &StaleUpkeepReportLog{ Id: parsedLog.Id, }, nil + case ethereum.RegistryVersion_2_3: + parsedLog, err := v.registry2_3.ParseStaleUpkeepReport(*log) + if err != nil { + return nil, err + } + return &StaleUpkeepReportLog{ + Id: parsedLog.Id, + }, nil } return nil, fmt.Errorf("keeper registry version %d is not supported", v.version) } @@ -978,6 +1064,12 @@ func (v *EthereumKeeperRegistry) ParseUpkeepIdFromRegisteredLog(log *types.Log) return nil, err } return parsedLog.Id, nil + case ethereum.RegistryVersion_2_3: + parsedLog, err := v.registry2_3.ParseUpkeepRegistered(*log) + if err != nil { + return nil, err + } + return parsedLog.Id, nil } return nil, fmt.Errorf("keeper registry version %d is not supported", v.version) @@ -1015,6 +1107,8 @@ func DeployKeeperRegistry( return deployRegistry21(client, opts, mode) case eth_contracts.RegistryVersion_2_2: return deployRegistry22(client, opts) + case eth_contracts.RegistryVersion_2_3: + return deployRegistry23(client, opts) default: return nil, fmt.Errorf("keeper registry version %d is not supported", opts.RegistryVersion) } @@ -1339,6 +1433,109 @@ func deployRegistry22(client *seth.Client, opts *KeeperRegistryOpts) (KeeperRegi }, err } +func deployRegistry23(client *seth.Client, opts *KeeperRegistryOpts) (KeeperRegistry, error) { + var chainModuleAddr common.Address + var err error + chainId := client.ChainID + + if chainId == networks.ScrollMainnet.ChainID || chainId == networks.ScrollSepolia.ChainID { + chainModuleAddr, err = deployScrollModule(client) + } else if chainId == networks.ArbitrumMainnet.ChainID || chainId == networks.ArbitrumSepolia.ChainID { + chainModuleAddr, err = deployArbitrumModule(client) + } else if chainId == networks.OptimismMainnet.ChainID || chainId == networks.OptimismSepolia.ChainID { + chainModuleAddr, err = deployOptimismModule(client) + } else { + chainModuleAddr, err = deployBaseModule(client) + } + if err != nil { + return nil, err + } + + automationForwarderLogicAddr, err := deployAutomationForwarderLogicSeth(client) + if err != nil { + return nil, err + } + + var allowedReadOnlyAddress common.Address + if chainId == networks.PolygonZkEvmMainnet.ChainID || chainId == networks.PolygonZkEvmCardona.ChainID { + allowedReadOnlyAddress = common.HexToAddress("0x1111111111111111111111111111111111111111") + } else { + allowedReadOnlyAddress = common.HexToAddress("0x0000000000000000000000000000000000000000") + } + + logicCAbi, err := registrylogicc23.AutomationRegistryLogicCMetaData.GetAbi() + if err != nil { + return &EthereumKeeperRegistry{}, fmt.Errorf("failed to get AutomationRegistryLogicC2_3 ABI: %w", err) + } + + logicCData, err := client.DeployContract(client.NewTXOpts(), "AutomationRegistryLogicC2_3", *logicCAbi, common.FromHex(registrylogicc23.AutomationRegistryLogicCMetaData.Bin), + common.HexToAddress(opts.LinkAddr), + common.HexToAddress(opts.LinkUSDFeedAddr), + common.HexToAddress(opts.NativeUSDFeedAddr), + common.HexToAddress(opts.GasFeedAddr), + automationForwarderLogicAddr, + allowedReadOnlyAddress, + uint8(0), // onchain payout mode + common.HexToAddress(opts.WrappedNativeAddr), + ) + if err != nil { + return &EthereumKeeperRegistry{}, fmt.Errorf("AutomationRegistryLogicC2_3 instance deployment have failed: %w", err) + } + + logicBAbi, err := registrylogicb23.AutomationRegistryLogicBMetaData.GetAbi() + if err != nil { + return &EthereumKeeperRegistry{}, fmt.Errorf("failed to get AutomationRegistryLogicB2_3 ABI: %w", err) + } + + logicBData, err := client.DeployContract(client.NewTXOpts(), "AutomationRegistryLogicB2_3", *logicBAbi, common.FromHex(registrylogicb23.AutomationRegistryLogicBMetaData.Bin), + logicCData.Address, + ) + if err != nil { + return &EthereumKeeperRegistry{}, fmt.Errorf("AutomationRegistryLogicB2_3 instance deployment have failed: %w", err) + } + + logicAAbi, err := registrylogica23.AutomationRegistryLogicAMetaData.GetAbi() + if err != nil { + return &EthereumKeeperRegistry{}, fmt.Errorf("failed to get AutomationRegistryLogicA2_3 ABI: %w", err) + } + logicAData, err := client.DeployContract(client.NewTXOpts(), "AutomationRegistryLogicA2_3", *logicAAbi, common.FromHex(registrylogica23.AutomationRegistryLogicAMetaData.Bin), + logicBData.Address, + ) + if err != nil { + return &EthereumKeeperRegistry{}, fmt.Errorf("AutomationRegistryLogicA2_3 instance deployment have failed: %w", err) + } + + abi, err := registry23.AutomationRegistryMetaData.GetAbi() + if err != nil { + return &EthereumKeeperRegistry{}, fmt.Errorf("failed to get AutomationRegistry2_3 ABI: %w", err) + } + + data, err := client.DeployContract(client.NewTXOpts(), "AutomationRegistry2_3", *abi, common.FromHex(registry23.AutomationRegistryMetaData.Bin), + logicAData.Address, + ) + if err != nil { + return &EthereumKeeperRegistry{}, fmt.Errorf("AutomationRegistry2_3 instance deployment have failed: %w", err) + } + + instance, err := iregistry23.NewIAutomationRegistryMaster23(data.Address, wrappers.MustNewWrappedContractBackend(nil, client)) + if err != nil { + return &EthereumKeeperRegistry{}, fmt.Errorf("failed to instantiate AutomationRegistry2_3 instance: %w", err) + } + + chainModule, err := i_chain_module.NewIChainModule( + chainModuleAddr, + wrappers.MustNewWrappedContractBackend(nil, client), + ) + + return &EthereumKeeperRegistry{ + client: client, + version: eth_contracts.RegistryVersion_2_3, + registry2_3: instance, + chainModule: chainModule, + address: &data.Address, + }, err +} + // LoadKeeperRegistry returns deployed on given address EthereumKeeperRegistry func LoadKeeperRegistry(l zerolog.Logger, client *seth.Client, address common.Address, registryVersion eth_contracts.KeeperRegistryVersion) (KeeperRegistry, error) { var keeper *EthereumKeeperRegistry @@ -1356,6 +1553,8 @@ func LoadKeeperRegistry(l zerolog.Logger, client *seth.Client, address common.Ad keeper, err = loadRegistry2_1(client, address) case eth_contracts.RegistryVersion_2_2: // why the contract name is not the same as the actual contract name? keeper, err = loadRegistry2_2(client, address) + case eth_contracts.RegistryVersion_2_3: + keeper, err = loadRegistry2_3(client, address) default: return nil, fmt.Errorf("keeper registry version %d is not supported", registryVersion) } @@ -1495,6 +1694,27 @@ func loadRegistry2_2(client *seth.Client, address common.Address) (*EthereumKeep }, nil } +func loadRegistry2_3(client *seth.Client, address common.Address) (*EthereumKeeperRegistry, error) { + abi, err := iregistry23.IAutomationRegistryMaster23MetaData.GetAbi() + if err != nil { + return &EthereumKeeperRegistry{}, fmt.Errorf("failed to get AutomationRegistry2_3 ABI: %w", err) + } + + client.ContractStore.AddABI("AutomationRegistry2_3", *abi) + client.ContractStore.AddBIN("AutomationRegistry2_3", common.FromHex(iregistry23.IAutomationRegistryMaster23MetaData.Bin)) + + instance, err := iregistry23.NewIAutomationRegistryMaster23(address, wrappers.MustNewWrappedContractBackend(nil, client)) + if err != nil { + return &EthereumKeeperRegistry{}, fmt.Errorf("failed to instantiate AutomationRegistry2_3 instance: %w", err) + } + + return &EthereumKeeperRegistry{ + address: &address, + client: client, + registry2_3: instance, + }, nil +} + func deployAutomationForwarderLogicSeth(client *seth.Client) (common.Address, error) { abi, err := automationForwarderLogic.AutomationForwarderLogicMetaData.GetAbi() if err != nil { @@ -1567,6 +1787,7 @@ type EthereumKeeperRegistrar struct { registrar *keeper_registrar_wrapper1_2.KeeperRegistrar registrar20 *keeper_registrar_wrapper2_0.KeeperRegistrar registrar21 *registrar21.AutomationRegistrar + registrar23 *registrar23.AutomationRegistrar address *common.Address } @@ -1578,8 +1799,89 @@ func (v *EthereumKeeperRegistrar) Fund(_ *big.Float) error { panic("do not use this function, use actions.SendFunds instead") } +// register Upkeep with native token, only available from v2.3 +func (v *EthereumKeeperRegistrar) RegisterUpkeepFromKey(keyNum int, name string, email []byte, upkeepAddr string, gasLimit uint32, adminAddr string, checkData []byte, amount *big.Int, wethTokenAddr string, isLogTrigger bool, isMercury bool) (*types.Transaction, error) { + if v.registrar23 == nil { + return nil, fmt.Errorf("RegisterUpkeepFromKey with native token is only supported in registrar version v2.3") + } + + registrarABI = cltypes.MustGetABI(registrar23.AutomationRegistrarABI) + txOpts := v.client.NewTXKeyOpts(keyNum, seth.WithValue(amount)) + + if isLogTrigger { + var topic0InBytes [32]byte + // bytes representation of 0x0000000000000000000000000000000000000000000000000000000000000000 + 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, + } + if isMercury { + // bytes representation of 0xd1ffe9e45581c11d7d9f2ed5f75217cd4be9f8b7eee6af0f6d03f46de53956cd + topic0InBytes = [32]byte{209, 255, 233, 228, 85, 129, 193, 29, 125, 159, 46, 213, 247, 82, 23, 205, 75, 233, 248, 183, 238, 230, 175, 15, 109, 3, 244, 109, 229, 57, 86, 205} + } else { + // bytes representation of 0x3d53a39550e04688065827f3bb86584cb007ab9ebca7ebd528e7301c9c31eb5d + topic0InBytes = [32]byte{ + 61, 83, 163, 149, 80, 224, 70, 136, + 6, 88, 39, 243, 187, 134, 88, 76, + 176, 7, 171, 158, 188, 167, 235, + 213, 40, 231, 48, 28, 156, 49, 235, 93, + } + } + + logTriggerConfigStruct := acutils.IAutomationV21PlusCommonLogTriggerConfig{ + ContractAddress: common.HexToAddress(upkeepAddr), + FilterSelector: 0, + Topic0: topic0InBytes, + Topic1: bytes0, + Topic2: bytes0, + Topic3: bytes0, + } + encodedLogTriggerConfig, err := compatibleUtils.Methods["_logTriggerConfig"].Inputs.Pack(&logTriggerConfigStruct) + if err != nil { + return nil, err + } + + params := registrar23.AutomationRegistrar23RegistrationParams{ + UpkeepContract: common.HexToAddress(upkeepAddr), + Amount: amount, + AdminAddress: common.HexToAddress(adminAddr), + GasLimit: gasLimit, + TriggerType: uint8(1), // trigger type + BillingToken: common.HexToAddress(wethTokenAddr), // native + Name: name, + EncryptedEmail: email, + CheckData: checkData, + TriggerConfig: encodedLogTriggerConfig, // log trigger upkeep + OffchainConfig: []byte{}, + } + + decodedTx, err := v.client.Decode(v.registrar23.RegisterUpkeep(txOpts, + params, + )) + return decodedTx.Transaction, err + } + + params := registrar23.AutomationRegistrar23RegistrationParams{ + UpkeepContract: common.HexToAddress(upkeepAddr), + Amount: amount, + AdminAddress: common.HexToAddress(adminAddr), + GasLimit: gasLimit, + TriggerType: uint8(0), // trigger type + BillingToken: common.HexToAddress(wethTokenAddr), // native + Name: name, + EncryptedEmail: email, + CheckData: checkData, + TriggerConfig: []byte{}, // conditional upkeep + OffchainConfig: []byte{}, + } + + decodedTx, err := v.client.Decode(v.registrar23.RegisterUpkeep(txOpts, + params, + )) + return decodedTx.Transaction, err +} + // EncodeRegisterRequest encodes register request to call it through link token TransferAndCall -func (v *EthereumKeeperRegistrar) EncodeRegisterRequest(name string, email []byte, upkeepAddr string, gasLimit uint32, adminAddr string, checkData []byte, amount *big.Int, source uint8, senderAddr string, isLogTrigger bool, isMercury bool) ([]byte, error) { +func (v *EthereumKeeperRegistrar) EncodeRegisterRequest(name string, email []byte, upkeepAddr string, gasLimit uint32, adminAddr string, checkData []byte, amount *big.Int, source uint8, senderAddr string, isLogTrigger bool, isMercury bool, linkTokenAddr string) ([]byte, error) { if v.registrar20 != nil { registryABI, err := abi.JSON(strings.NewReader(keeper_registrar_wrapper2_0.KeeperRegistrarMetaData.ABI)) if err != nil { @@ -1667,6 +1969,76 @@ func (v *EthereumKeeperRegistrar) EncodeRegisterRequest(name string, email []byt common.HexToAddress(senderAddr), ) return req, err + } else if v.registrar23 != nil { + registrarABI = cltypes.MustGetABI(registrar23.AutomationRegistrarABI) + + if isLogTrigger { + var topic0InBytes [32]byte + // bytes representation of 0x0000000000000000000000000000000000000000000000000000000000000000 + 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, + } + if isMercury { + // bytes representation of 0xd1ffe9e45581c11d7d9f2ed5f75217cd4be9f8b7eee6af0f6d03f46de53956cd + topic0InBytes = [32]byte{209, 255, 233, 228, 85, 129, 193, 29, 125, 159, 46, 213, 247, 82, 23, 205, 75, 233, 248, 183, 238, 230, 175, 15, 109, 3, 244, 109, 229, 57, 86, 205} + } else { + // bytes representation of 0x3d53a39550e04688065827f3bb86584cb007ab9ebca7ebd528e7301c9c31eb5d + topic0InBytes = [32]byte{ + 61, 83, 163, 149, 80, 224, 70, 136, + 6, 88, 39, 243, 187, 134, 88, 76, + 176, 7, 171, 158, 188, 167, 235, + 213, 40, 231, 48, 28, 156, 49, 235, 93, + } + } + + logTriggerConfigStruct := acutils.IAutomationV21PlusCommonLogTriggerConfig{ + ContractAddress: common.HexToAddress(upkeepAddr), + FilterSelector: 0, + Topic0: topic0InBytes, + Topic1: bytes0, + Topic2: bytes0, + Topic3: bytes0, + } + encodedLogTriggerConfig, err := compatibleUtils.Methods["_logTriggerConfig"].Inputs.Pack(&logTriggerConfigStruct) + if err != nil { + return nil, err + } + + params := registrar23.AutomationRegistrar23RegistrationParams{ + UpkeepContract: common.HexToAddress(upkeepAddr), + Amount: amount, + AdminAddress: common.HexToAddress(adminAddr), + GasLimit: gasLimit, + TriggerType: uint8(1), // trigger type + BillingToken: common.HexToAddress(linkTokenAddr), + Name: name, + EncryptedEmail: email, + CheckData: checkData, + TriggerConfig: encodedLogTriggerConfig, + OffchainConfig: []byte{}, + } + + req, err := registrarABI.Methods["registerUpkeep"].Inputs.Pack(¶ms) + return req, err + } + + params := registrar23.AutomationRegistrar23RegistrationParams{ + UpkeepContract: common.HexToAddress(upkeepAddr), + Amount: amount, + AdminAddress: common.HexToAddress(adminAddr), + GasLimit: gasLimit, + TriggerType: uint8(0), // trigger type + BillingToken: common.HexToAddress(linkTokenAddr), + Name: name, + EncryptedEmail: email, + CheckData: checkData, + TriggerConfig: []byte{}, + OffchainConfig: []byte{}, + } + + encodedRegistrationParamsStruct, err := registrarABI.Methods["registerUpkeep"].Inputs.Pack(¶ms) + + return encodedRegistrationParamsStruct, err } registryABI, err := abi.JSON(strings.NewReader(keeper_registrar_wrapper1_2.KeeperRegistrarMetaData.ABI)) if err != nil { @@ -1750,6 +2122,50 @@ func DeployKeeperRegistrar(client *seth.Client, registryVersion eth_contracts.Ke registrar21: instance, address: &data.Address, }, nil + } else if registryVersion == eth_contracts.RegistryVersion_2_3 { + abi, err := registrar23.AutomationRegistrarMetaData.GetAbi() + if err != nil { + return &EthereumKeeperRegistrar{}, fmt.Errorf("failed to get KeeperRegistrar2_3 ABI: %w", err) + } + // set default TriggerType to 0(conditional), AutoApproveConfigType to 2(auto approve enabled), AutoApproveMaxAllowed to 1000 + triggerConfigs := []registrar23.AutomationRegistrar23InitialTriggerConfig{ + {TriggerType: 0, AutoApproveType: registrarSettings.AutoApproveConfigType, + AutoApproveMaxAllowed: uint32(registrarSettings.AutoApproveMaxAllowed)}, + {TriggerType: 1, AutoApproveType: registrarSettings.AutoApproveConfigType, + AutoApproveMaxAllowed: uint32(registrarSettings.AutoApproveMaxAllowed)}, + } + + billingTokens := []common.Address{ + common.HexToAddress(linkAddr), + common.HexToAddress(registrarSettings.WETHTokenAddr), + } + minRegistrationFees := []*big.Int{ + big.NewInt(10), + big.NewInt(10), + } + + data, err := client.DeployContract(client.NewTXOpts(), "KeeperRegistrar2_3", *abi, common.FromHex(registrar23.AutomationRegistrarMetaData.Bin), + common.HexToAddress(linkAddr), + common.HexToAddress(registrarSettings.RegistryAddr), + triggerConfigs, + billingTokens, + minRegistrationFees, + common.HexToAddress(registrarSettings.WETHTokenAddr), + ) + if err != nil { + return &EthereumKeeperRegistrar{}, fmt.Errorf("KeeperRegistrar2_3 instance deployment have failed: %w", err) + } + + instance, err := registrar23.NewAutomationRegistrar(data.Address, wrappers.MustNewWrappedContractBackend(nil, client)) + if err != nil { + return &EthereumKeeperRegistrar{}, fmt.Errorf("failed to instantiate KeeperRegistrar2_3 instance: %w", err) + } + + return &EthereumKeeperRegistrar{ + client: client, + registrar23: instance, + address: &data.Address, + }, nil } // non OCR registrar diff --git a/integration-tests/contracts/ethereum_keeper_contracts.go b/integration-tests/contracts/ethereum_keeper_contracts.go index b933c18df0c..28fdd15b13e 100644 --- a/integration-tests/contracts/ethereum_keeper_contracts.go +++ b/integration-tests/contracts/ethereum_keeper_contracts.go @@ -4,13 +4,14 @@ import ( "context" "math/big" - "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/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" goabi "github.com/umbracle/ethgo/abi" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_automation_registry_master_wrapper_2_2" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_automation_registry_master_wrapper_2_3" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_keeper_registry_master_wrapper_2_1" + "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum" cltypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" ac "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/automation_compatible_utils" @@ -23,9 +24,11 @@ var registrarABI = cltypes.MustGetABI(registrar21.AutomationRegistrarABI) type KeeperRegistrar interface { Address() string - EncodeRegisterRequest(name string, email []byte, upkeepAddr string, gasLimit uint32, adminAddr string, checkData []byte, amount *big.Int, source uint8, senderAddr string, isLogTrigger bool, isMercury bool) ([]byte, error) + EncodeRegisterRequest(name string, email []byte, upkeepAddr string, gasLimit uint32, adminAddr string, checkData []byte, amount *big.Int, source uint8, senderAddr string, isLogTrigger bool, isMercury bool, linkTokenAddr string) ([]byte, error) Fund(ethAmount *big.Float) error + + RegisterUpkeepFromKey(keyNum int, name string, email []byte, upkeepAddr string, gasLimit uint32, adminAddr string, checkData []byte, amount *big.Int, wethTokenAddr string, isLogTrigger bool, isMercury bool) (*types.Transaction, error) } type UpkeepTranscoder interface { @@ -123,13 +126,16 @@ type StaleUpkeepReportLog struct { // KeeperRegistryOpts opts to deploy keeper registry version type KeeperRegistryOpts struct { - RegistryVersion ethereum.KeeperRegistryVersion - LinkAddr string - ETHFeedAddr string - GasFeedAddr string - TranscoderAddr string - RegistrarAddr string - Settings KeeperRegistrySettings + RegistryVersion ethereum.KeeperRegistryVersion + LinkAddr string + ETHFeedAddr string + GasFeedAddr string + TranscoderAddr string + RegistrarAddr string + Settings KeeperRegistrySettings + LinkUSDFeedAddr string + NativeUSDFeedAddr string + WrappedNativeAddr string } // KeeperRegistrySettings represents the settings to fine tune keeper registry @@ -150,6 +156,27 @@ type KeeperRegistrySettings struct { RegistryVersion ethereum.KeeperRegistryVersion } +func (rcs *KeeperRegistrySettings) Create23OnchainConfig(registrar string, registryOwnerAddress, chainModuleAddress common.Address, reorgProtectionEnabled bool) i_automation_registry_master_wrapper_2_3.AutomationRegistryBase23OnchainConfig { + return i_automation_registry_master_wrapper_2_3.AutomationRegistryBase23OnchainConfig{ + CheckGasLimit: rcs.CheckGasLimit, + StalenessSeconds: rcs.StalenessSeconds, + GasCeilingMultiplier: rcs.GasCeilingMultiplier, + MaxPerformGas: rcs.MaxPerformGas, + MaxCheckDataSize: rcs.MaxCheckDataSize, + MaxPerformDataSize: rcs.MaxPerformDataSize, + MaxRevertDataSize: rcs.MaxRevertDataSize, + FallbackGasPrice: rcs.FallbackGasPrice, + FallbackLinkPrice: rcs.FallbackLinkPrice, + Transcoder: common.Address{}, + Registrars: []common.Address{common.HexToAddress(registrar)}, + UpkeepPrivilegeManager: registryOwnerAddress, + ChainModule: chainModuleAddress, + ReorgProtectionEnabled: reorgProtectionEnabled, + FinanceAdmin: registryOwnerAddress, + FallbackNativePrice: rcs.FallbackLinkPrice, // Just use the LINK price + } +} + 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{}{ @@ -218,6 +245,7 @@ type KeeperRegistrarSettings struct { AutoApproveMaxAllowed uint16 RegistryAddr string MinLinkJuels *big.Int + WETHTokenAddr string } // KeeperInfo keeper status and balance info diff --git a/integration-tests/contracts/ethereum_ocr2vrf_contracts.go b/integration-tests/contracts/ethereum_ocr2vrf_contracts.go deleted file mode 100644 index 4ef0740fdbc..00000000000 --- a/integration-tests/contracts/ethereum_ocr2vrf_contracts.go +++ /dev/null @@ -1,523 +0,0 @@ -package contracts - -import ( - "context" - "encoding/hex" - "fmt" - "math/big" - "time" - - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/rs/zerolog/log" - - "github.com/smartcontractkit/seth" - - "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/ocr2vrf/generated/dkg" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/vrf_beacon" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/vrf_beacon_consumer" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ocr2vrf/generated/vrf_coordinator" -) - -// EthereumDKG represents DKG contract -type EthereumDKG struct { - address common.Address - client *seth.Client - dkg *dkg.DKG -} - -// EthereumVRFCoordinatorV3 represents VRFCoordinatorV3 contract -type EthereumVRFCoordinatorV3 struct { - address common.Address - client *seth.Client - vrfCoordinatorV3 *vrf_coordinator.VRFCoordinator -} - -// EthereumVRFBeacon represents VRFBeacon contract -type EthereumVRFBeacon struct { - address common.Address - client *seth.Client - vrfBeacon *vrf_beacon.VRFBeacon -} - -// EthereumVRFBeaconConsumer represents VRFBeaconConsumer contract -type EthereumVRFBeaconConsumer struct { - address common.Address - client *seth.Client - vrfBeaconConsumer *vrf_beacon_consumer.BeaconVRFConsumer -} - -// DeployDKG deploys DKG contract -func DeployDKG(seth *seth.Client) (DKG, error) { - abi, err := dkg.DKGMetaData.GetAbi() - if err != nil { - return &EthereumDKG{}, fmt.Errorf("failed to get DKG ABI: %w", err) - } - - data, err := seth.DeployContract( - seth.NewTXOpts(), - "DKG", - *abi, - common.FromHex(dkg.DKGMetaData.Bin)) - if err != nil { - return &EthereumDKG{}, fmt.Errorf("DKG instance deployment have failed: %w", err) - } - - contract, err := dkg.NewDKG(data.Address, wrappers.MustNewWrappedContractBackend(nil, seth)) - if err != nil { - return &EthereumDKG{}, fmt.Errorf("failed to instantiate DKG instance: %w", err) - } - - return &EthereumDKG{ - client: seth, - dkg: contract, - address: data.Address, - }, err -} - -// DeployOCR2VRFCoordinator deploys CR2VRFCoordinator contract -func DeployOCR2VRFCoordinator(seth *seth.Client, beaconPeriodBlocksCount *big.Int, linkAddress string) (VRFCoordinatorV3, error) { - abi, err := vrf_coordinator.VRFCoordinatorMetaData.GetAbi() - if err != nil { - return &EthereumVRFCoordinatorV3{}, fmt.Errorf("failed to get VRFCoordinatorV3 ABI: %w", err) - } - - data, err := seth.DeployContract( - seth.NewTXOpts(), - "VRFCoordinatorV3", - *abi, - common.FromHex(vrf_coordinator.VRFCoordinatorMetaData.Bin), - beaconPeriodBlocksCount, common.HexToAddress(linkAddress)) - if err != nil { - return &EthereumVRFCoordinatorV3{}, fmt.Errorf("VRFCoordinatorV3 instance deployment have failed: %w", err) - } - - contract, err := vrf_coordinator.NewVRFCoordinator(data.Address, wrappers.MustNewWrappedContractBackend(nil, seth)) - if err != nil { - return &EthereumVRFCoordinatorV3{}, fmt.Errorf("failed to instantiate VRFCoordinatorV3 instance: %w", err) - } - - return &EthereumVRFCoordinatorV3{ - client: seth, - vrfCoordinatorV3: contract, - address: data.Address, - }, err -} - -// DeployVRFBeacon deploys DeployVRFBeacon contract -func DeployVRFBeacon(seth *seth.Client, vrfCoordinatorAddress string, linkAddress string, dkgAddress string, keyId string) (VRFBeacon, error) { - abi, err := vrf_beacon.VRFBeaconMetaData.GetAbi() - if err != nil { - return &EthereumVRFBeacon{}, fmt.Errorf("failed to get VRFBeacon ABI: %w", err) - } - keyIDBytes, err := DecodeHexTo32ByteArray(keyId) - if err != nil { - return nil, err - } - data, err := seth.DeployContract( - seth.NewTXOpts(), - "VRFBeacon", - *abi, - common.FromHex(vrf_beacon.VRFBeaconMetaData.Bin), - common.HexToAddress(linkAddress), common.HexToAddress(vrfCoordinatorAddress), common.HexToAddress(dkgAddress), keyIDBytes) - if err != nil { - return &EthereumVRFBeacon{}, fmt.Errorf("VRFBeacon instance deployment have failed: %w", err) - } - - contract, err := vrf_beacon.NewVRFBeacon(data.Address, wrappers.MustNewWrappedContractBackend(nil, seth)) - if err != nil { - return &EthereumVRFBeacon{}, fmt.Errorf("failed to instantiate VRFBeacon instance: %w", err) - } - - return &EthereumVRFBeacon{ - client: seth, - vrfBeacon: contract, - address: data.Address, - }, err -} - -// DeployBatchBlockhashStore deploys DeployBatchBlockhashStore contract -func DeployBatchBlockhashStore(seth *seth.Client, blockhashStoreAddr string) (BatchBlockhashStore, error) { - abi, err := batch_blockhash_store.BatchBlockhashStoreMetaData.GetAbi() - if err != nil { - return &EthereumBatchBlockhashStore{}, fmt.Errorf("failed to get BatchBlockhashStore ABI: %w", err) - } - data, err := seth.DeployContract( - seth.NewTXOpts(), - "BatchBlockhashStore", - *abi, - common.FromHex(batch_blockhash_store.BatchBlockhashStoreMetaData.Bin), - common.HexToAddress(blockhashStoreAddr)) - if err != nil { - return &EthereumBatchBlockhashStore{}, fmt.Errorf("BatchBlockhashStore instance deployment have failed: %w", err) - } - - contract, err := batch_blockhash_store.NewBatchBlockhashStore(data.Address, wrappers.MustNewWrappedContractBackend(nil, seth)) - if err != nil { - return &EthereumBatchBlockhashStore{}, fmt.Errorf("failed to instantiate BatchBlockhashStore instance: %w", err) - } - - return &EthereumBatchBlockhashStore{ - client: seth, - batchBlockhashStore: contract, - address: data.Address, - }, err -} - -// todo - solve import cycle -func DecodeHexTo32ByteArray(val string) ([32]byte, error) { - var byteArray [32]byte - decoded, err := hex.DecodeString(val) - if err != nil { - return [32]byte{}, err - } - if len(decoded) != 32 { - return [32]byte{}, fmt.Errorf("expected value to be 32 bytes but received %d bytes", len(decoded)) - } - copy(byteArray[:], decoded) - return byteArray, err -} - -// DeployVRFBeaconConsumer deploys VRFv@ consumer contract -func DeployVRFBeaconConsumer(seth *seth.Client, vrfCoordinatorAddress string, beaconPeriodBlockCount *big.Int) (VRFBeaconConsumer, error) { - abi, err := vrf_beacon_consumer.BeaconVRFConsumerMetaData.GetAbi() - if err != nil { - return &EthereumVRFBeaconConsumer{}, fmt.Errorf("failed to get VRFBeaconConsumer ABI: %w", err) - } - data, err := seth.DeployContract( - seth.NewTXOpts(), - "VRFBeaconConsumer", - *abi, - common.FromHex(vrf_beacon_consumer.BeaconVRFConsumerMetaData.Bin), - common.HexToAddress(vrfCoordinatorAddress), false, beaconPeriodBlockCount) - if err != nil { - return &EthereumVRFBeaconConsumer{}, fmt.Errorf("VRFBeaconConsumer instance deployment have failed: %w", err) - } - - contract, err := vrf_beacon_consumer.NewBeaconVRFConsumer(data.Address, wrappers.MustNewWrappedContractBackend(nil, seth)) - if err != nil { - return &EthereumVRFBeaconConsumer{}, fmt.Errorf("failed to instantiate VRFBeaconConsumer instance: %w", err) - } - - return &EthereumVRFBeaconConsumer{ - client: seth, - vrfBeaconConsumer: contract, - address: data.Address, - }, err -} - -func (dkgContract *EthereumDKG) Address() string { - return dkgContract.address.Hex() -} - -func (dkgContract *EthereumDKG) AddClient(keyID string, clientAddress string) error { - keyIDBytes, err := DecodeHexTo32ByteArray(keyID) - if err != nil { - return err - } - _, err = dkgContract.client.Decode(dkgContract.dkg.AddClient( - dkgContract.client.NewTXOpts(), - keyIDBytes, - common.HexToAddress(clientAddress), - )) - return err -} - -func (dkgContract *EthereumDKG) SetConfig( - signerAddresses []common.Address, - transmitterAddresses []common.Address, - f uint8, - onchainConfig []byte, - offchainConfigVersion uint64, - offchainConfig []byte, -) error { - _, err := dkgContract.client.Decode(dkgContract.dkg.SetConfig( - dkgContract.client.NewTXOpts(), - signerAddresses, - transmitterAddresses, - f, - onchainConfig, - offchainConfigVersion, - offchainConfig, - )) - return err -} - -func (dkgContract *EthereumDKG) WaitForTransmittedEvent(timeout time.Duration) (*dkg.DKGTransmitted, error) { - transmittedEventsChannel := make(chan *dkg.DKGTransmitted) - subscription, err := dkgContract.dkg.WatchTransmitted(nil, transmittedEventsChannel) - if err != nil { - return nil, err - } - defer subscription.Unsubscribe() - - for { - select { - case err = <-subscription.Err(): - return nil, err - case <-time.After(timeout): - return nil, fmt.Errorf("timeout waiting for DKGTransmitted event") - case transmittedEvent := <-transmittedEventsChannel: - return transmittedEvent, nil - } - } -} - -func (dkgContract *EthereumDKG) WaitForConfigSetEvent(timeout time.Duration) (*dkg.DKGConfigSet, error) { - configSetEventsChannel := make(chan *dkg.DKGConfigSet) - subscription, err := dkgContract.dkg.WatchConfigSet(nil, configSetEventsChannel) - if err != nil { - return nil, err - } - defer subscription.Unsubscribe() - - for { - select { - case err = <-subscription.Err(): - return nil, err - case <-time.After(timeout): - return nil, fmt.Errorf("timeout waiting for DKGConfigSet event") - case configSetEvent := <-configSetEventsChannel: - return configSetEvent, nil - } - } -} - -func (coordinator *EthereumVRFCoordinatorV3) Address() string { - return coordinator.address.Hex() -} - -func (coordinator *EthereumVRFCoordinatorV3) SetProducer(producerAddress string) error { - _, err := coordinator.client.Decode(coordinator.vrfCoordinatorV3.SetProducer( - coordinator.client.NewTXOpts(), - common.HexToAddress(producerAddress), - )) - return err -} - -func (coordinator *EthereumVRFCoordinatorV3) CreateSubscription() error { - _, err := coordinator.client.Decode(coordinator.vrfCoordinatorV3.CreateSubscription( - coordinator.client.NewTXOpts(), - )) - return err -} - -func (coordinator *EthereumVRFCoordinatorV3) FindSubscriptionID() (*big.Int, error) { - fopts := &bind.FilterOpts{} - owner := coordinator.client.MustGetRootKeyAddress() - - subscriptionIterator, err := coordinator.vrfCoordinatorV3.FilterSubscriptionCreated( - fopts, - nil, - []common.Address{owner}, - ) - if err != nil { - return nil, err - } - - if !subscriptionIterator.Next() { - return nil, fmt.Errorf("expected at least 1 subID for the given owner %s", owner) - } - - return subscriptionIterator.Event.SubId, nil -} - -func (coordinator *EthereumVRFCoordinatorV3) AddConsumer(subId *big.Int, consumerAddress string) error { - _, err := coordinator.client.Decode(coordinator.vrfCoordinatorV3.AddConsumer( - coordinator.client.NewTXOpts(), - subId, - common.HexToAddress(consumerAddress), - )) - return err -} - -func (coordinator *EthereumVRFCoordinatorV3) SetConfig(maxCallbackGasLimit uint32, maxCallbackArgumentsLength uint32) error { - _, err := coordinator.client.Decode(coordinator.vrfCoordinatorV3.SetCallbackConfig( - coordinator.client.NewTXOpts(), - vrf_coordinator.VRFCoordinatorCallbackConfig{ - MaxCallbackGasLimit: maxCallbackGasLimit, - MaxCallbackArgumentsLength: maxCallbackArgumentsLength, // 5 EVM words - }, - )) - return err -} - -func (beacon *EthereumVRFBeacon) Address() string { - return beacon.address.Hex() -} - -func (beacon *EthereumVRFBeacon) SetPayees(transmitterAddresses []common.Address, payeesAddresses []common.Address) error { - _, err := beacon.client.Decode(beacon.vrfBeacon.SetPayees( - beacon.client.NewTXOpts(), - transmitterAddresses, - payeesAddresses, - )) - return err -} - -func (beacon *EthereumVRFBeacon) SetConfig( - signerAddresses []common.Address, - transmitterAddresses []common.Address, - f uint8, - onchainConfig []byte, - offchainConfigVersion uint64, - offchainConfig []byte, -) error { - _, err := beacon.client.Decode(beacon.vrfBeacon.SetConfig( - beacon.client.NewTXOpts(), - signerAddresses, - transmitterAddresses, - f, - onchainConfig, - offchainConfigVersion, - offchainConfig, - )) - return err -} - -func (beacon *EthereumVRFBeacon) WaitForConfigSetEvent(timeout time.Duration) (*vrf_beacon.VRFBeaconConfigSet, error) { - configSetEventsChannel := make(chan *vrf_beacon.VRFBeaconConfigSet) - subscription, err := beacon.vrfBeacon.WatchConfigSet(nil, configSetEventsChannel) - if err != nil { - return nil, err - } - defer subscription.Unsubscribe() - - for { - select { - case err := <-subscription.Err(): - return nil, err - case <-time.After(timeout): - return nil, fmt.Errorf("timeout waiting for config set event") - case configSetEvent := <-configSetEventsChannel: - return configSetEvent, nil - } - } -} - -func (beacon *EthereumVRFBeacon) WaitForNewTransmissionEvent(timeout time.Duration) (*vrf_beacon.VRFBeaconNewTransmission, error) { - newTransmissionEventsChannel := make(chan *vrf_beacon.VRFBeaconNewTransmission) - subscription, err := beacon.vrfBeacon.WatchNewTransmission(nil, newTransmissionEventsChannel, nil) - if err != nil { - return nil, err - } - defer subscription.Unsubscribe() - - for { - select { - case err := <-subscription.Err(): - return nil, err - case <-time.After(timeout): - return nil, fmt.Errorf("timeout waiting for new transmission event") - case newTransmissionEvent := <-newTransmissionEventsChannel: - return newTransmissionEvent, nil - } - } -} - -func (beacon *EthereumVRFBeacon) LatestConfigDigestAndEpoch(ctx context.Context) (vrf_beacon.LatestConfigDigestAndEpoch, - error) { - opts := &bind.CallOpts{ - From: beacon.client.MustGetRootKeyAddress(), - Context: ctx, - } - return beacon.vrfBeacon.LatestConfigDigestAndEpoch(opts) -} - -func (consumer *EthereumVRFBeaconConsumer) Address() string { - return consumer.address.Hex() -} - -func (consumer *EthereumVRFBeaconConsumer) RequestRandomness( - numWords uint16, - subID, confirmationDelayArg *big.Int, -) (*types.Receipt, error) { - tx, err := consumer.client.Decode(consumer.vrfBeaconConsumer.TestRequestRandomness( - consumer.client.NewTXOpts(), - numWords, - subID, - confirmationDelayArg, - )) - if err != nil { - return nil, fmt.Errorf("TestRequestRandomness failed, err: %w", err) - } - log.Info().Interface("Sub ID", subID). - Interface("Number of Words", numWords). - Interface("Number of Confirmations", confirmationDelayArg). - Msg("RequestRandomness called") - return tx.Receipt, nil -} - -func (consumer *EthereumVRFBeaconConsumer) RedeemRandomness( - subID, requestID *big.Int, -) error { - _, err := consumer.client.Decode(consumer.vrfBeaconConsumer.TestRedeemRandomness( - consumer.client.NewTXOpts(), - subID, - requestID, - )) - if err != nil { - return err - } - log.Info().Interface("Sub ID", subID). - Interface("Request ID", requestID). - Msg("RedeemRandomness called") - return nil -} - -func (consumer *EthereumVRFBeaconConsumer) RequestRandomnessFulfillment( - numWords uint16, - subID, confirmationDelayArg *big.Int, - requestGasLimit uint32, - callbackGasLimit uint32, - arguments []byte, -) (*types.Receipt, error) { - opts := consumer.client.NewTXOpts() - // overriding gas limit because gas estimated by TestRequestRandomnessFulfillment - // is incorrect - opts.GasLimit = uint64(requestGasLimit) - tx, err := consumer.client.Decode(consumer.vrfBeaconConsumer.TestRequestRandomnessFulfillment( - opts, - subID, - numWords, - confirmationDelayArg, - callbackGasLimit, - arguments, - )) - if err != nil { - return nil, fmt.Errorf("TestRequestRandomnessFulfillment failed, err: %w", err) - } - log.Info().Interface("Sub ID", subID). - Interface("Number of Words", numWords). - Interface("Number of Confirmations", confirmationDelayArg). - Interface("Callback Gas Limit", callbackGasLimit). - Msg("RequestRandomnessFulfillment called") - return tx.Receipt, nil -} - -func (consumer *EthereumVRFBeaconConsumer) IBeaconPeriodBlocks(ctx context.Context) (*big.Int, error) { - opts := &bind.CallOpts{ - From: consumer.client.MustGetRootKeyAddress(), - Context: ctx, - } - return consumer.vrfBeaconConsumer.IBeaconPeriodBlocks(opts) -} - -func (consumer *EthereumVRFBeaconConsumer) GetRequestIdsBy(ctx context.Context, nextBeaconOutputHeight *big.Int, confDelay *big.Int) (*big.Int, error) { - opts := &bind.CallOpts{ - From: consumer.client.MustGetRootKeyAddress(), - Context: ctx, - } - return consumer.vrfBeaconConsumer.SRequestsIDs(opts, nextBeaconOutputHeight, confDelay) -} - -func (consumer *EthereumVRFBeaconConsumer) GetRandomnessByRequestId(ctx context.Context, requestID *big.Int, numWordIndex *big.Int) (*big.Int, error) { - opts := &bind.CallOpts{ - From: consumer.client.MustGetRootKeyAddress(), - Context: ctx, - } - return consumer.vrfBeaconConsumer.SReceivedRandomnessByRequestID(opts, requestID, numWordIndex) -} diff --git a/integration-tests/contracts/ethereum_vrf_contracts.go b/integration-tests/contracts/ethereum_vrf_contracts.go index d4757fa869c..e4dbb87d0b2 100644 --- a/integration-tests/contracts/ethereum_vrf_contracts.go +++ b/integration-tests/contracts/ethereum_vrf_contracts.go @@ -6,13 +6,15 @@ import ( "math/big" "time" - "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/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/rs/zerolog/log" + "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/vrfv2plus_wrapper" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrfv2plus_wrapper_optimism" + "github.com/smartcontractkit/seth" "github.com/smartcontractkit/chainlink-testing-framework/blockchain" @@ -365,6 +367,15 @@ func (v *EthereumBlockhashStore) GetBlockHash(ctx context.Context, blockNumber * return blockHash, nil } +func (v *EthereumBlockhashStore) StoreVerifyHeader(blockNumber *big.Int, blockHeader []byte) error { + _, err := v.client.Decode(v.blockHashStore.StoreVerifyHeader( + v.client.NewTXOpts(), + blockNumber, + blockHeader, + )) + return err +} + func (v *EthereumVRFCoordinator) Address() string { return v.address.Hex() } @@ -497,3 +508,41 @@ func LoadVRFv2PlusLoadTestConsumer(seth *seth.Client, addr string) (VRFv2PlusLoa consumer: contract, }, nil } + +func LoadVRFV2PlusWrapper(seth *seth.Client, addr string) (VRFV2PlusWrapper, error) { + address := common.HexToAddress(addr) + abi, err := vrfv2plus_wrapper.VRFV2PlusWrapperMetaData.GetAbi() + if err != nil { + return nil, fmt.Errorf("failed to get VRFV2PlusWrapper ABI: %w", err) + } + seth.ContractStore.AddABI("VRFV2PlusWrapper", *abi) + seth.ContractStore.AddBIN("VRFV2PlusWrapper", common.FromHex(vrfv2plus_wrapper.VRFV2PlusWrapperMetaData.Bin)) + contract, err := vrfv2plus_wrapper.NewVRFV2PlusWrapper(address, wrappers.MustNewWrappedContractBackend(nil, seth)) + if err != nil { + return nil, fmt.Errorf("failed to instantiate VRFV2PlusWrapper instance: %w", err) + } + return &EthereumVRFV2PlusWrapper{ + client: seth, + address: address, + wrapper: contract, + }, nil +} + +func LoadVRFV2PlusWrapperOptimism(seth *seth.Client, addr string) (*EthereumVRFV2PlusWrapperOptimism, error) { + address := common.HexToAddress(addr) + abi, err := vrfv2plus_wrapper_optimism.VRFV2PlusWrapperOptimismMetaData.GetAbi() + if err != nil { + return nil, fmt.Errorf("failed to get VRFV2PlusWrapper_Optimism ABI: %w", err) + } + seth.ContractStore.AddABI("VRFV2PlusWrapper_Optimism", *abi) + seth.ContractStore.AddBIN("VRFV2PlusWrapper_Optimism", common.FromHex(vrfv2plus_wrapper_optimism.VRFV2PlusWrapperOptimismMetaData.Bin)) + contract, err := vrfv2plus_wrapper_optimism.NewVRFV2PlusWrapperOptimism(address, wrappers.MustNewWrappedContractBackend(nil, seth)) + if err != nil { + return nil, fmt.Errorf("failed to instantiate VRFV2PlusWrapper_Optimism instance: %w", err) + } + return &EthereumVRFV2PlusWrapperOptimism{ + client: seth, + Address: address, + wrapper: contract, + }, nil +} diff --git a/integration-tests/contracts/ethereum_vrfv2plus_contracts.go b/integration-tests/contracts/ethereum_vrfv2plus_contracts.go index 9f6f6665d21..8e099b4f6bc 100644 --- a/integration-tests/contracts/ethereum_vrfv2plus_contracts.go +++ b/integration-tests/contracts/ethereum_vrfv2plus_contracts.go @@ -14,12 +14,15 @@ import ( "github.com/smartcontractkit/seth" "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/batch_vrf_coordinator_v2plus" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrf_coordinator_v2_5" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrf_coordinator_v2_5_optimism" "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" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrfv2plus_wrapper" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrfv2plus_wrapper_load_test_consumer" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/vrfv2plus_wrapper_optimism" ) type EthereumVRFCoordinatorV2_5 struct { @@ -28,6 +31,12 @@ type EthereumVRFCoordinatorV2_5 struct { coordinator vrf_coordinator_v2_5.VRFCoordinatorV25Interface } +type EthereumVRFCoordinatorV2_5_Optimism struct { + Address common.Address + client *seth.Client + coordinator vrf_coordinator_v2_5_optimism.VRFCoordinatorV25Optimism +} + type EthereumBatchVRFCoordinatorV2Plus struct { address common.Address client *seth.Client @@ -59,6 +68,12 @@ type EthereumVRFV2PlusWrapper struct { wrapper *vrfv2plus_wrapper.VRFV2PlusWrapper } +type EthereumVRFV2PlusWrapperOptimism struct { + Address common.Address + client *seth.Client + wrapper *vrfv2plus_wrapper_optimism.VRFV2PlusWrapperOptimism +} + func (v *EthereumVRFV2PlusWrapper) Address() string { return v.address.Hex() } @@ -113,22 +128,22 @@ func (v *EthereumVRFV2PlusWrapper) Coordinator(ctx context.Context) (common.Addr func DeployVRFCoordinatorV2_5(seth *seth.Client, bhsAddr string) (VRFCoordinatorV2_5, error) { abi, err := vrf_coordinator_v2_5.VRFCoordinatorV25MetaData.GetAbi() if err != nil { - return &EthereumVRFCoordinatorV2_5{}, fmt.Errorf("failed to get VRFCoordinatorV2Plus ABI: %w", err) + return &EthereumVRFCoordinatorV2_5{}, fmt.Errorf("failed to get VRFCoordinatorV2_5 ABI: %w", err) } coordinatorDeploymentData, err := seth.DeployContract( seth.NewTXOpts(), - "VRFCoordinatorV2Plus", + "VRFCoordinatorV2_5", *abi, common.FromHex(vrf_coordinator_v2_5.VRFCoordinatorV25MetaData.Bin), common.HexToAddress(bhsAddr)) if err != nil { - return &EthereumVRFCoordinatorV2_5{}, fmt.Errorf("VRFCoordinatorV2Plus instance deployment have failed: %w", err) + return &EthereumVRFCoordinatorV2_5{}, fmt.Errorf("VRFCoordinatorV2_5 instance deployment have failed: %w", err) } contract, err := vrf_coordinator_v2_5.NewVRFCoordinatorV25(coordinatorDeploymentData.Address, wrappers.MustNewWrappedContractBackend(nil, seth)) if err != nil { - return &EthereumVRFCoordinatorV2_5{}, fmt.Errorf("failed to instantiate VRFCoordinatorV2Plus instance: %w", err) + return &EthereumVRFCoordinatorV2_5{}, fmt.Errorf("failed to instantiate VRFCoordinatorV2_5 instance: %w", err) } return &EthereumVRFCoordinatorV2_5{ @@ -138,6 +153,31 @@ func DeployVRFCoordinatorV2_5(seth *seth.Client, bhsAddr string) (VRFCoordinator }, err } +func DeployVRFCoordinatorV2_5_Optimism(seth *seth.Client, bhsAddr string) (*EthereumVRFCoordinatorV2_5_Optimism, error) { + abi, err := vrf_coordinator_v2_5_optimism.VRFCoordinatorV25OptimismMetaData.GetAbi() + if err != nil { + return nil, fmt.Errorf("failed to get VRFCoordinatorV2_5_Optimism ABI: %w", err) + } + coordinatorDeploymentData, err := seth.DeployContract( + seth.NewTXOpts(), + "VRFCoordinatorV2_5_Optimism", + *abi, + common.FromHex(vrf_coordinator_v2_5_optimism.VRFCoordinatorV25OptimismMetaData.Bin), + common.HexToAddress(bhsAddr)) + if err != nil { + return nil, fmt.Errorf("VRFCoordinatorV2_5_Optimism instance deployment have failed: %w", err) + } + contract, err := vrf_coordinator_v2_5_optimism.NewVRFCoordinatorV25Optimism(coordinatorDeploymentData.Address, wrappers.MustNewWrappedContractBackend(nil, seth)) + if err != nil { + return nil, fmt.Errorf("failed to instantiate VRFCoordinatorV2_5_Optimism instance: %w", err) + } + return &EthereumVRFCoordinatorV2_5_Optimism{ + client: seth, + coordinator: *contract, + Address: coordinatorDeploymentData.Address, + }, err +} + func DeployBatchVRFCoordinatorV2Plus(seth *seth.Client, coordinatorAddress string) (BatchVRFCoordinatorV2Plus, error) { abi, err := batch_vrf_coordinator_v2plus.BatchVRFCoordinatorV2PlusMetaData.GetAbi() if err != nil { @@ -146,7 +186,7 @@ func DeployBatchVRFCoordinatorV2Plus(seth *seth.Client, coordinatorAddress strin coordinatorDeploymentData, err := seth.DeployContract( seth.NewTXOpts(), - "VRFCoordinatorV2Plus", + "BatchVRFCoordinatorV2Plus", *abi, common.FromHex(batch_vrf_coordinator_v2plus.BatchVRFCoordinatorV2PlusMetaData.Bin), common.HexToAddress(coordinatorAddress)) @@ -562,6 +602,14 @@ func (v *EthereumVRFCoordinatorV2_5) WaitForConfigSetEvent(timeout time.Duration } } +func (v *EthereumVRFCoordinatorV2_5_Optimism) SetL1FeeCalculation( + mode uint8, + coefficient uint8, +) error { + _, err := v.client.Decode(v.coordinator.SetL1FeeCalculation(v.client.NewTXOpts(), mode, coefficient)) + return err +} + func (v *EthereumVRFv2PlusLoadTestConsumer) Address() string { return v.address.Hex() } @@ -729,6 +777,34 @@ func (v *EthereumVRFv2PlusLoadTestConsumer) GetLoadTestMetrics(ctx context.Conte }, nil } +// DeployBatchBlockhashStore deploys DeployBatchBlockhashStore contract +func DeployBatchBlockhashStore(seth *seth.Client, blockhashStoreAddr string) (BatchBlockhashStore, error) { + abi, err := batch_blockhash_store.BatchBlockhashStoreMetaData.GetAbi() + if err != nil { + return &EthereumBatchBlockhashStore{}, fmt.Errorf("failed to get BatchBlockhashStore ABI: %w", err) + } + data, err := seth.DeployContract( + seth.NewTXOpts(), + "BatchBlockhashStore", + *abi, + common.FromHex(batch_blockhash_store.BatchBlockhashStoreMetaData.Bin), + common.HexToAddress(blockhashStoreAddr)) + if err != nil { + return &EthereumBatchBlockhashStore{}, fmt.Errorf("BatchBlockhashStore instance deployment have failed: %w", err) + } + + contract, err := batch_blockhash_store.NewBatchBlockhashStore(data.Address, wrappers.MustNewWrappedContractBackend(nil, seth)) + if err != nil { + return &EthereumBatchBlockhashStore{}, fmt.Errorf("failed to instantiate BatchBlockhashStore instance: %w", err) + } + + return &EthereumBatchBlockhashStore{ + client: seth, + batchBlockhashStore: contract, + address: data.Address, + }, err +} + func DeployVRFCoordinatorV2PlusUpgradedVersion(client *seth.Client, bhsAddr string) (VRFCoordinatorV2PlusUpgradedVersion, error) { abi, err := vrf_v2plus_upgraded_version.VRFCoordinatorV2PlusUpgradedVersionMetaData.GetAbi() if err != nil { @@ -1064,7 +1140,6 @@ func DeployVRFV2PlusWrapper(seth *seth.Client, linkAddr string, linkEthFeedAddr if err != nil { return &EthereumVRFV2PlusWrapper{}, fmt.Errorf("failed to get VRFV2PlusWrapper ABI: %w", err) } - data, err := seth.DeployContract( seth.NewTXOpts(), "VRFV2PlusWrapper", @@ -1075,12 +1150,10 @@ func DeployVRFV2PlusWrapper(seth *seth.Client, linkAddr string, linkEthFeedAddr if err != nil { return &EthereumVRFV2PlusWrapper{}, fmt.Errorf("VRFV2PlusWrapper instance deployment have failed: %w", err) } - contract, err := vrfv2plus_wrapper.NewVRFV2PlusWrapper(data.Address, wrappers.MustNewWrappedContractBackend(nil, seth)) if err != nil { return &EthereumVRFV2PlusWrapper{}, fmt.Errorf("failed to instantiate VRFV2PlusWrapper instance: %w", err) } - return &EthereumVRFV2PlusWrapper{ client: seth, wrapper: contract, @@ -1088,12 +1161,37 @@ func DeployVRFV2PlusWrapper(seth *seth.Client, linkAddr string, linkEthFeedAddr }, err } +func DeployVRFV2PlusWrapperOptimism(seth *seth.Client, linkAddr string, linkEthFeedAddr string, coordinatorAddr string, subId *big.Int) (*EthereumVRFV2PlusWrapperOptimism, error) { + abi, err := vrfv2plus_wrapper_optimism.VRFV2PlusWrapperOptimismMetaData.GetAbi() + if err != nil { + return nil, fmt.Errorf("failed to get VRFV2PlusWrapperOptimism ABI: %w", err) + } + data, err := seth.DeployContract( + seth.NewTXOpts(), + "VRFV2PlusWrapperOptimism", + *abi, + common.FromHex(vrfv2plus_wrapper_optimism.VRFV2PlusWrapperOptimismMetaData.Bin), + common.HexToAddress(linkAddr), common.HexToAddress(linkEthFeedAddr), + common.HexToAddress(coordinatorAddr), subId) + if err != nil { + return nil, fmt.Errorf("VRFV2PlusWrapperOptimism instance deployment have failed: %w", err) + } + contract, err := vrfv2plus_wrapper_optimism.NewVRFV2PlusWrapperOptimism(data.Address, wrappers.MustNewWrappedContractBackend(nil, seth)) + if err != nil { + return nil, fmt.Errorf("failed to instantiate VRFV2PlusWrapperOptimism instance: %w", err) + } + return &EthereumVRFV2PlusWrapperOptimism{ + client: seth, + wrapper: contract, + Address: data.Address, + }, err +} + func DeployVRFV2PlusWrapperLoadTestConsumer(seth *seth.Client, vrfV2PlusWrapperAddr string) (VRFv2PlusWrapperLoadTestConsumer, error) { abi, err := vrfv2plus_wrapper_load_test_consumer.VRFV2PlusWrapperLoadTestConsumerMetaData.GetAbi() if err != nil { return &EthereumVRFV2PlusWrapperLoadTestConsumer{}, fmt.Errorf("failed to get VRFV2PlusWrapperLoadTestConsumer ABI: %w", err) } - data, err := seth.DeployContract( seth.NewTXOpts(), "VRFV2PlusWrapperLoadTestConsumer", @@ -1108,7 +1206,6 @@ func DeployVRFV2PlusWrapperLoadTestConsumer(seth *seth.Client, vrfV2PlusWrapperA if err != nil { return &EthereumVRFV2PlusWrapperLoadTestConsumer{}, fmt.Errorf("failed to instantiate VRFV2PlusWrapperLoadTestConsumer instance: %w", err) } - return &EthereumVRFV2PlusWrapperLoadTestConsumer{ client: seth, consumer: contract, @@ -1116,6 +1213,11 @@ func DeployVRFV2PlusWrapperLoadTestConsumer(seth *seth.Client, vrfV2PlusWrapperA }, err } +func (v *EthereumVRFV2PlusWrapperOptimism) SetL1FeeCalculation(mode uint8, coefficient uint8) error { + _, err := v.client.Decode(v.wrapper.SetL1FeeCalculation(v.client.NewTXOpts(), mode, coefficient)) + return err +} + func (v *EthereumVRFV2PlusWrapperLoadTestConsumer) Address() string { return v.address.Hex() } diff --git a/integration-tests/crib/connect.go b/integration-tests/crib/connect.go new file mode 100644 index 00000000000..446c53d8f38 --- /dev/null +++ b/integration-tests/crib/connect.go @@ -0,0 +1,120 @@ +package crib + +import ( + "fmt" + "os" + "time" + + "github.com/pkg/errors" + "github.com/smartcontractkit/seth" + + "github.com/smartcontractkit/chainlink-testing-framework/utils/ptr" + seth_utils "github.com/smartcontractkit/chainlink-testing-framework/utils/seth" + tc "github.com/smartcontractkit/chainlink/integration-tests/testconfig" + + "github.com/smartcontractkit/chainlink-testing-framework/blockchain" + msClient "github.com/smartcontractkit/chainlink-testing-framework/client" + "github.com/smartcontractkit/chainlink/integration-tests/client" +) + +const ( + // these are constants for simulated CRIB that should never change + // CRIB: https://github.com/smartcontractkit/crib/tree/main/core + // Core Chart: https://github.com/smartcontractkit/infra-charts/tree/main/chainlink-cluster + mockserverCRIBTemplate = "https://%s-mockserver%s" + internalNodeDNSTemplate = "app-node%d" + ingressNetworkWSURLTemplate = "wss://%s-geth-1337-ws%s" + ingressNetworkHTTPURLTemplate = "https://%s-geth-1337-http%s" +) + +func setSethConfig(cfg tc.TestConfig, netWSURL string, netHTTPURL string) { + netName := "CRIB_SIMULATED" + cfg.Network.SelectedNetworks = []string{netName} + cfg.Network.RpcHttpUrls = map[string][]string{} + cfg.Network.RpcHttpUrls[netName] = []string{netHTTPURL} + cfg.Network.RpcWsUrls = map[string][]string{} + cfg.Network.RpcWsUrls[netName] = []string{netWSURL} + cfg.Seth.EphemeralAddrs = ptr.Ptr(int64(0)) +} + +// ConnectRemote connects to a local environment, see https://github.com/smartcontractkit/crib/tree/main/core +// connects to default CRIB network if simulated = true +func ConnectRemote(simulated bool) ( + *seth.Client, + *msClient.MockserverClient, + *client.ChainlinkK8sClient, + []*client.ChainlinkK8sClient, + error, +) { + ingressSuffix := os.Getenv("K8S_STAGING_INGRESS_SUFFIX") + if ingressSuffix == "" { + return nil, nil, nil, nil, errors.New("K8S_STAGING_INGRESS_SUFFIX must be set to connect to k8s ingresses") + } + config, err := tc.GetConfig([]string{"CRIB"}, tc.OCR) + if err != nil { + return nil, nil, nil, nil, err + } + if config.CRIB.CLNodesNum < 2 { + return nil, nil, nil, nil, fmt.Errorf("not enough chainlink nodes, need at least 2, TOML key: [CRIB.nodes]") + } + cfg := config.CRIB + mockserverURL := fmt.Sprintf(mockserverCRIBTemplate, cfg.Namespace, ingressSuffix) + var sethClient *seth.Client + if simulated { + netWSURL := fmt.Sprintf(ingressNetworkWSURLTemplate, cfg.Namespace, ingressSuffix) + netHTTPURL := fmt.Sprintf(ingressNetworkHTTPURLTemplate, cfg.Namespace, ingressSuffix) + setSethConfig(config, netWSURL, netHTTPURL) + net := blockchain.EVMNetwork{ + Name: cfg.NetworkName, + Simulated: true, + SupportsEIP1559: true, + ClientImplementation: blockchain.EthereumClientImplementation, + ChainID: 1337, + PrivateKeys: []string{ + "ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80", + }, + URLs: []string{netWSURL}, + HTTPURLs: []string{netHTTPURL}, + ChainlinkTransactionLimit: 500000, + Timeout: blockchain.StrDuration{Duration: 2 * time.Minute}, + MinimumConfirmations: 1, + GasEstimationBuffer: 10000, + } + sethClient, err = seth_utils.GetChainClient(config, net) + if err != nil { + return nil, nil, nil, nil, err + } + } + // bootstrap node + clClients := make([]*client.ChainlinkK8sClient, 0) + c, err := client.NewChainlinkK8sClient(&client.ChainlinkConfig{ + URL: fmt.Sprintf("https://%s-node%d%s", cfg.Namespace, 1, ingressSuffix), + Email: client.CLNodeTestEmail, + InternalIP: fmt.Sprintf(internalNodeDNSTemplate, 1), + Password: client.CLNodeTestPassword, + }, fmt.Sprintf(internalNodeDNSTemplate, 1), cfg.Namespace) + if err != nil { + return nil, nil, nil, nil, err + } + clClients = append(clClients, c) + // all the other nodes, indices of nodes in CRIB starts with 1 + for i := 2; i <= cfg.CLNodesNum; i++ { + cl, err := client.NewChainlinkK8sClient(&client.ChainlinkConfig{ + URL: fmt.Sprintf("https://%s-node%d%s", cfg.Namespace, i, ingressSuffix), + Email: client.CLNodeTestEmail, + InternalIP: fmt.Sprintf(internalNodeDNSTemplate, i), + Password: client.CLNodeTestPassword, + }, fmt.Sprintf(internalNodeDNSTemplate, i), cfg.Namespace) + if err != nil { + return nil, nil, nil, nil, err + } + clClients = append(clClients, cl) + } + mockServerClient := msClient.NewMockserverClient(&msClient.MockserverConfig{ + LocalURL: mockserverURL, + ClusterURL: mockserverURL, + }) + + //nolint:gosec // G602 - false positive https://github.com/securego/gosec/issues/1005 + return sethClient, mockServerClient, clClients[0], clClients[1:], nil +} diff --git a/integration-tests/docker/cmd/internal/commands.go b/integration-tests/docker/cmd/internal/commands.go index e05e5d89fac..9939765f7f8 100644 --- a/integration-tests/docker/cmd/internal/commands.go +++ b/integration-tests/docker/cmd/internal/commands.go @@ -28,7 +28,7 @@ var StartNodesCmd = &cobra.Command{ log.Logger = logging.GetLogger(nil, "CORE_DOCKER_ENV_LOG_LEVEL") log.Info().Msg("Starting docker test env with Chainlink nodes..") - config, err := testconfig.GetConfig("Smoke", testconfig.OCR2) + config, err := testconfig.GetConfig([]string{"Smoke"}, testconfig.OCR2) if err != nil { return err } diff --git a/integration-tests/docker/test_env/cl_node.go b/integration-tests/docker/test_env/cl_node.go index 6007e03406b..b28d954688a 100644 --- a/integration-tests/docker/test_env/cl_node.go +++ b/integration-tests/docker/test_env/cl_node.go @@ -75,6 +75,14 @@ func WithNodeEnvVars(ev map[string]string) ClNodeOption { } } +func WithStartupTimeout(timeout time.Duration) ClNodeOption { + return func(n *ClNode) { + if timeout != 0 { + n.StartupTimeout = timeout + } + } +} + // Sets custom node container name if name is not empty func WithNodeContainerName(name string) ClNodeOption { return func(c *ClNode) { @@ -130,6 +138,7 @@ func NewClNode(networks []string, imageName, imageVersion string, nodeConfig *ch ContainerVersion: imageVersion, Networks: networks, LogStream: logStream, + StartupTimeout: 3 * time.Minute, }, UserEmail: "local@local.com", UserPassword: "localdevpassword", @@ -330,8 +339,6 @@ func (n *ClNode) containerStartOrRestart(restartDb bool) error { Str("userEmail", n.UserEmail). Str("userPassword", n.UserPassword). Msg("Started Chainlink Node container") - nodeConfig, _ := n.GetNodeConfigStr() - n.l.Info().Str("containerName", n.ContainerName).Msgf("Chainlink Node config:\n%s", nodeConfig) clClient, err := client.NewChainlinkClient(&client.ChainlinkConfig{ URL: clEndpoint, Email: n.UserEmail, @@ -449,9 +456,9 @@ func (n *ClNode) getContainerRequest(secrets string) ( "-a", apiCredsPath, }, Networks: append(n.Networks, "tracing"), - WaitingFor: tcwait.ForHTTP("/health"). + WaitingFor: tcwait.ForHTTP("/readyz"). WithPort("6688/tcp"). - WithStartupTimeout(90 * time.Second). + WithStartupTimeout(n.StartupTimeout). WithPollInterval(1 * time.Second), Files: []tc.ContainerFile{ { diff --git a/integration-tests/docker/test_env/test_env_builder.go b/integration-tests/docker/test_env/test_env_builder.go index e44cb331806..19ab64671e8 100644 --- a/integration-tests/docker/test_env/test_env_builder.go +++ b/integration-tests/docker/test_env/test_env_builder.go @@ -448,18 +448,21 @@ func (b *CLTestEnvBuilder) Build() (*CLClusterTestEnv, error) { b.te.EVMNetworks = append(b.te.EVMNetworks, &networkConfig) } + // only add EVM networks to node config if running EVM tests dereferrencedEvms := make([]blockchain.EVMNetwork, 0) - for _, en := range b.te.EVMNetworks { - network := *en - if en.Simulated { - if rpcs, ok := b.te.rpcProviders[network.ChainID]; ok { - network.HTTPURLs = rpcs.PrivateHttpUrls() - network.URLs = rpcs.PrivateWsUrsl() - } else { - return nil, fmt.Errorf("rpc provider for chain %d not found", network.ChainID) + if b.isEVM { + for _, en := range b.te.EVMNetworks { + network := *en + if en.Simulated { + if rpcs, ok := b.te.rpcProviders[network.ChainID]; ok { + network.HTTPURLs = rpcs.PrivateHttpUrls() + network.URLs = rpcs.PrivateWsUrsl() + } else { + return nil, fmt.Errorf("rpc provider for chain %d not found", network.ChainID) + } } + dereferrencedEvms = append(dereferrencedEvms, network) } - dereferrencedEvms = append(dereferrencedEvms, network) } nodeConfigInToml := b.testConfig.GetNodeConfig() diff --git a/integration-tests/experiments/gas_test.go b/integration-tests/experiments/gas_test.go index 88bfbcf1926..4d1f4597111 100644 --- a/integration-tests/experiments/gas_test.go +++ b/integration-tests/experiments/gas_test.go @@ -18,7 +18,7 @@ import ( func TestGasExperiment(t *testing.T) { l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Soak", tc.OCR) + config, err := tc.GetConfig([]string{"Soak"}, tc.OCR) require.NoError(t, err, "Error getting config") network := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0] diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 8daca81efae..d65f49405fb 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -1,6 +1,6 @@ module github.com/smartcontractkit/chainlink/integration-tests -go 1.21.7 +go 1.22.5 // Make sure we're working with the latest chainlink libs replace github.com/smartcontractkit/chainlink/v2 => ../ @@ -8,18 +8,18 @@ replace github.com/smartcontractkit/chainlink/v2 => ../ require ( github.com/avast/retry-go/v4 v4.5.1 github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df - github.com/chaos-mesh/chaos-mesh/api/v1alpha1 v0.0.0-20220226050744-799408773657 + github.com/chaos-mesh/chaos-mesh/api v0.0.0-20240709130330-9f4feec7553f github.com/cli/go-gh/v2 v2.0.0 github.com/ethereum/go-ethereum v1.13.8 - github.com/fxamacker/cbor/v2 v2.5.0 + github.com/fxamacker/cbor/v2 v2.6.0 github.com/go-resty/resty/v2 v2.11.0 github.com/google/go-cmp v0.6.0 github.com/google/uuid v1.6.0 - github.com/jmoiron/sqlx v1.3.5 + github.com/jmoiron/sqlx v1.4.0 github.com/lib/pq v1.10.9 github.com/manifoldco/promptui v0.9.0 github.com/montanaflynn/stats v0.7.1 - github.com/onsi/gomega v1.30.0 + github.com/onsi/gomega v1.33.1 github.com/pelletier/go-toml/v2 v2.2.2 github.com/pkg/errors v0.9.1 github.com/rs/zerolog v1.31.0 @@ -28,36 +28,31 @@ require ( github.com/shopspring/decimal v1.3.1 github.com/slack-go/slack v0.12.2 github.com/smartcontractkit/chainlink-automation v1.0.4 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240620164046-1c03d0a97b20 - github.com/smartcontractkit/chainlink-testing-framework v1.31.1 - github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240712162033-89bd3351ce6e + github.com/smartcontractkit/chainlink-testing-framework v1.32.7 + github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240405215812-5a72bc9af239 github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000 github.com/smartcontractkit/havoc/k8schaos v0.0.0-20240409145249-e78d20847e37 - github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c + github.com/smartcontractkit/libocr v0.0.0-20240702141926-063ceef8c42e github.com/smartcontractkit/seth v1.0.12 - github.com/smartcontractkit/wasp v0.4.7 + github.com/smartcontractkit/wasp v0.4.5 github.com/spf13/cobra v1.8.0 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 - go.dedis.ch/kyber/v3 v3.1.0 go.uber.org/zap v1.26.0 - golang.org/x/sync v0.6.0 - golang.org/x/text v0.14.0 + golang.org/x/sync v0.7.0 + golang.org/x/text v0.16.0 gopkg.in/guregu/null.v4 v4.0.0 + gopkg.in/yaml.v2 v2.4.0 + gopkg.in/yaml.v3 v3.0.1 k8s.io/apimachinery v0.28.2 ) // avoids ambigious imports of indirect dependencies exclude github.com/hashicorp/consul v1.2.1 -replace ( - k8s.io/api => k8s.io/api v0.25.11 - k8s.io/client-go => k8s.io/client-go v0.25.11 - k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20230303024457-afdc3dddf62d -) - require ( contrib.go.opencensus.io/exporter/stackdriver v0.13.5 // indirect cosmossdk.io/api v0.3.1 // indirect @@ -66,7 +61,7 @@ require ( cosmossdk.io/errors v1.0.0 // indirect cosmossdk.io/math v1.0.1 // indirect dario.cat/mergo v1.0.0 // indirect - filippo.io/edwards25519 v1.0.0 // indirect + filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0 // indirect @@ -79,6 +74,8 @@ require ( github.com/CosmWasm/wasmd v0.40.1 // indirect github.com/CosmWasm/wasmvm v1.2.4 // indirect github.com/DataDog/zstd v1.5.2 // indirect + github.com/K-Phoen/grabana v0.22.1 // indirect + github.com/K-Phoen/sdk v0.12.4 // indirect github.com/MakeNowJust/heredoc v1.0.0 // indirect github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver/v3 v3.2.1 // indirect @@ -89,7 +86,7 @@ require ( github.com/NethermindEth/starknet.go v0.7.1-0.20240401080518-34a506f3cfdb // indirect github.com/VictoriaMetrics/fastcache v1.12.1 // indirect github.com/XSAM/otelsql v0.27.0 // indirect - github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect + github.com/alecthomas/units v0.0.0-20240626203959-61d1e3462e30 // indirect github.com/armon/go-metrics v0.4.1 // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/avast/retry-go v3.0.0+incompatible // indirect @@ -109,9 +106,9 @@ require ( github.com/c9s/goprocinfo v0.0.0-20210130143923-c95fcf8c64a8 // indirect github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2 v2.7.5 // indirect github.com/cenkalti/backoff v2.2.1+incompatible // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chai2010/gettext-go v1.0.2 // indirect github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect github.com/chenzhuoyu/iasm v0.9.0 // indirect @@ -129,7 +126,7 @@ require ( github.com/consensys/gnark-crypto v0.12.1 // indirect github.com/containerd/containerd v1.7.12 // indirect github.com/containerd/log v0.1.0 // indirect - github.com/coreos/go-semver v0.3.0 // indirect + github.com/coreos/go-semver v0.3.1 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/cosmos-proto v1.0.0-beta.2 // indirect @@ -162,18 +159,18 @@ require ( github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.7.0 // indirect github.com/edsrzf/mmap-go v1.1.0 // indirect - github.com/emicklei/go-restful/v3 v3.10.2 // indirect + github.com/emicklei/go-restful/v3 v3.12.1 // indirect github.com/esote/minmaxheap v1.0.0 // indirect github.com/ethereum/c-kzg-4844 v0.4.0 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect - github.com/evanphx/json-patch/v5 v5.6.0 // indirect + github.com/evanphx/json-patch/v5 v5.9.0 // indirect github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb // indirect github.com/fatih/camelcase v1.0.0 // indirect github.com/fatih/color v1.16.0 // indirect - github.com/felixge/httpsnoop v1.0.3 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/fvbommel/sortorder v1.0.2 // indirect + github.com/fvbommel/sortorder v1.1.0 // indirect github.com/gabriel-vasile/mimetype v1.4.2 // indirect github.com/gagliardetto/binary v0.7.7 // indirect github.com/gagliardetto/solana-go v1.8.4 // indirect @@ -191,23 +188,22 @@ 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.4.1 // indirect + github.com/go-logr/logr v1.4.2 // 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 github.com/go-openapi/errors v0.20.4 // indirect - github.com/go-openapi/jsonpointer v0.20.0 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/jsonpointer v0.21.0 // indirect + github.com/go-openapi/jsonreference v0.21.0 // indirect github.com/go-openapi/loads v0.21.2 // indirect github.com/go-openapi/spec v0.20.9 // indirect github.com/go-openapi/strfmt v0.21.7 // indirect - github.com/go-openapi/swag v0.22.4 // indirect + github.com/go-openapi/swag v0.23.0 // indirect github.com/go-openapi/validate v0.22.1 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-playground/validator/v10 v10.15.5 // indirect github.com/go-redis/redis/v8 v8.11.5 // indirect - github.com/go-test/deep v1.0.8 // indirect github.com/go-webauthn/webauthn v0.9.4 // indirect github.com/go-webauthn/x v0.1.5 // indirect github.com/goccy/go-json v0.10.2 // indirect @@ -217,25 +213,26 @@ require ( github.com/gogo/protobuf v1.3.3 // indirect github.com/gogo/status v1.1.1 // indirect github.com/golang-jwt/jwt/v5 v5.2.0 // indirect - github.com/golang/glog v1.1.2 // indirect + github.com/golang/glog v1.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/btree v1.1.2 // indirect - github.com/google/gnostic v0.6.9 // indirect + github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect github.com/google/go-github/v41 v41.0.0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/go-tpm v0.9.0 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/pprof v0.0.0-20231023181126-ff6d637d2a7b // indirect + github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect github.com/google/s2a-go v0.1.7 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect github.com/gorilla/context v1.1.1 // indirect github.com/gorilla/mux v1.8.0 // indirect 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/gosimple/slug v1.13.1 // indirect + github.com/gosimple/unidecode v1.0.1 // indirect github.com/grafana/dskit v0.0.0-20231120170505-765e343eda4f // indirect github.com/grafana/gomemcache v0.0.0-20231023152154-6947259a0586 // indirect github.com/grafana/grafana-foundation-sdk/go v0.0.0-20240326122733-6f96a993222b // indirect @@ -246,10 +243,10 @@ require ( 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 - 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 + github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1 // indirect + github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect 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 @@ -291,6 +288,7 @@ require ( github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect + github.com/joho/godotenv v1.5.1 // indirect github.com/jonboulle/clockwork v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect @@ -313,7 +311,7 @@ require ( github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect - github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/miekg/dns v1.1.56 // indirect github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect @@ -324,7 +322,7 @@ require ( github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/moby/patternmatcher v0.6.0 // indirect - github.com/moby/spdystream v0.2.0 // indirect + github.com/moby/spdystream v0.4.0 // indirect github.com/moby/sys/sequential v0.5.0 // indirect github.com/moby/sys/user v0.1.0 // indirect github.com/moby/term v0.5.0 // indirect @@ -357,18 +355,18 @@ 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/prometheus/alertmanager v0.26.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/client_golang v1.19.1 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.55.0 // indirect github.com/prometheus/common/sigv4 v0.1.0 // indirect github.com/prometheus/exporter-toolkit v0.10.1-0.20230714054209-2f4150c63f97 // indirect - github.com/prometheus/procfs v0.12.0 // indirect - github.com/prometheus/prometheus v0.48.1 // indirect + github.com/prometheus/procfs v0.15.1 // indirect + github.com/prometheus/prometheus v1.8.2-0.20200727090838-6f296594a852 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rivo/uniseg v0.4.4 // indirect github.com/robfig/cron/v3 v3.0.1 // indirect - github.com/rogpeppe/go-internal v1.11.0 // indirect - github.com/russross/blackfriday v1.6.0 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect @@ -378,15 +376,14 @@ require ( github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/smartcontractkit/chain-selectors v1.0.10 // indirect - github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d // indirect - github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 // indirect - github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917 // indirect - github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240605170242-555ff582f36a // indirect - github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240531021326-99118e47f696 // indirect - github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240405215812-5a72bc9af239 // indirect + github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45 // indirect + github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240716180914-6fd88994c89c // indirect + github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827 // indirect + github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240712132946-267a37c5ac6e // indirect + github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799 // indirect github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 // indirect github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 // indirect - github.com/smartcontractkit/wsrpc v0.8.1 // indirect + github.com/smartcontractkit/wsrpc v0.7.3 // indirect github.com/soheilhy/cmux v0.1.5 // indirect github.com/sony/gobreaker v0.5.0 // indirect github.com/spf13/afero v1.9.5 // indirect @@ -416,81 +413,80 @@ require ( github.com/uber/jaeger-lib v2.4.1+incompatible // indirect github.com/ugorji/go/codec v1.2.12 // indirect github.com/umbracle/fastrlp v0.0.0-20220527094140-59d5dd30e722 // indirect - github.com/urfave/cli/v2 v2.27.1 // indirect github.com/valyala/fastjson v1.4.1 // indirect github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect github.com/x448/float16 v0.8.4 // indirect - github.com/xlab/treeprint v1.1.0 // indirect + github.com/xlab/treeprint v1.2.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect github.com/zondax/hid v0.9.1 // indirect github.com/zondax/ledger-go v0.14.1 // indirect go.dedis.ch/fixbuf v1.0.3 // indirect - go.etcd.io/bbolt v1.3.7 // indirect - go.etcd.io/etcd/api/v3 v3.5.7 // indirect - go.etcd.io/etcd/client/pkg/v3 v3.5.7 // indirect - go.etcd.io/etcd/client/v3 v3.5.7 // indirect + go.dedis.ch/kyber/v3 v3.1.0 // indirect + go.etcd.io/bbolt v1.3.8 // indirect + go.etcd.io/etcd/api/v3 v3.5.10 // indirect + go.etcd.io/etcd/client/pkg/v3 v3.5.10 // indirect + go.etcd.io/etcd/client/v3 v3.5.10 // indirect go.mongodb.org/mongo-driver v1.15.0 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/collector/pdata v1.0.0-rcv0016 // indirect go.opentelemetry.io/collector/semconv v0.87.0 // indirect - 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.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.24.0 // indirect - go.opentelemetry.io/otel/sdk 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.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/sdk v1.27.0 // indirect + go.opentelemetry.io/otel/trace v1.27.0 // indirect + go.opentelemetry.io/proto/otlp v1.2.0 // indirect + go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/goleak v1.3.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/ratelimit v0.3.0 // indirect go4.org/netipx v0.0.0-20230125063823-8449b0a6169f // indirect golang.org/x/arch v0.7.0 // indirect - golang.org/x/crypto v0.22.0 // indirect - golang.org/x/exp v0.0.0-20240213143201-ec583247a57a // indirect - golang.org/x/mod v0.15.0 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/oauth2 v0.17.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/term v0.19.0 // indirect + golang.org/x/crypto v0.25.0 // indirect + golang.org/x/exp v0.0.0-20240707233637-46b078467d37 // indirect + golang.org/x/mod v0.19.0 // indirect + golang.org/x/net v0.27.0 // indirect + golang.org/x/oauth2 v0.21.0 // indirect + golang.org/x/sys v0.22.0 // indirect + golang.org/x/term v0.22.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.18.0 // indirect - gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect + golang.org/x/tools v0.23.0 // indirect + gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect gonum.org/v1/gonum v0.14.0 // indirect - google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.33.0 // indirect + google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/grpc v1.64.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/api v0.28.2 // indirect - k8s.io/apiextensions-apiserver v0.25.3 // indirect - k8s.io/cli-runtime v0.25.11 // indirect + k8s.io/apiextensions-apiserver v0.28.1 // indirect + k8s.io/cli-runtime v0.28.2 // indirect k8s.io/client-go v0.28.2 // indirect - k8s.io/component-base v0.26.2 // indirect - k8s.io/klog/v2 v2.100.1 // indirect - k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect - k8s.io/kubectl v0.25.11 // indirect - k8s.io/utils v0.0.0-20230711102312-30195339c3c7 // indirect + k8s.io/component-base v0.28.2 // indirect + k8s.io/klog/v2 v2.130.1 // indirect + k8s.io/kube-openapi v0.0.0-20240709000822-3c01b740850f // indirect + k8s.io/kubectl v0.28.1 // indirect + k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 // indirect nhooyr.io/websocket v1.8.7 // indirect pgregory.net/rapid v0.5.5 // indirect rsc.io/tmplfunc v0.0.3 // indirect - sigs.k8s.io/controller-runtime v0.13.0 // indirect + sigs.k8s.io/controller-runtime v0.16.2 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/kustomize/api v0.12.1 // indirect - sigs.k8s.io/kustomize/kyaml v0.13.9 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect + sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 // indirect + sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) +exclude github.com/chaos-mesh/chaos-mesh/api/v1alpha1 v0.0.0-20220226050744-799408773657 + replace ( github.com/go-kit/log => github.com/go-kit/log v0.2.1 @@ -506,3 +502,42 @@ replace ( // type func(a Label, b Label) bool of func(a, b Label) bool {…} does not match inferred type func(a Label, b Label) int for func(a E, b E) int github.com/prometheus/prometheus => github.com/prometheus/prometheus v0.47.2-0.20231010075449-4b9c19fe5510 ) + +replace ( + github.com/prometheus/client_golang => github.com/prometheus/client_golang v1.14.0 + github.com/prometheus/common => github.com/prometheus/common v0.42.0 +) + +replace ( + k8s.io/api => k8s.io/api v0.28.2 + k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.28.2 + k8s.io/apimachinery => k8s.io/apimachinery v0.28.2 + k8s.io/apiserver => k8s.io/apiserver v0.28.2 + k8s.io/cli-runtime => k8s.io/cli-runtime v0.28.2 + k8s.io/client-go => k8s.io/client-go v0.28.2 + k8s.io/cloud-provider => k8s.io/cloud-provider v0.28.2 + k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.28.2 + k8s.io/code-generator => k8s.io/code-generator v0.28.2 + k8s.io/component-base => k8s.io/component-base v0.28.2 + k8s.io/component-helpers => k8s.io/component-helpers v0.28.2 + k8s.io/controller-manager => k8s.io/controller-manager v0.28.2 + k8s.io/cri-api => k8s.io/cri-api v0.28.2 + k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.28.2 + k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.28.2 + k8s.io/endpointslice => k8s.io/endpointslice v0.28.2 + k8s.io/kms => k8s.io/kms v0.28.2 + k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.28.2 + k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.28.2 + k8s.io/kube-proxy => k8s.io/kube-proxy v0.28.2 + k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.28.2 + k8s.io/kubectl => k8s.io/kubectl v0.28.2 + k8s.io/kubelet => k8s.io/kubelet v0.28.2 + k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.28.2 + k8s.io/metrics => k8s.io/metrics v0.28.2 + k8s.io/mount-utils => k8s.io/mount-utils v0.28.2 + k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.28.2 + k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.28.2 + k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.28.2 + k8s.io/sample-controller => k8s.io/sample-controller v0.28.2 + sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.16.2 +) diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 97813f85ea1..07ad70c4d30 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -18,23 +18,23 @@ cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHOb cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go v0.110.9 h1:e7ITSqGFFk4rbz/JFIqZh3G4VEHguhAL4BQcFlWtU68= -cloud.google.com/go v0.110.9/go.mod h1:rpxevX/0Lqvlbc88b7Sc1SPNdyK1riNBTUU6JXhYNpM= +cloud.google.com/go v0.112.1 h1:uJSeirPke5UNZHIb4SxfZklVSiWWVqW4oXlETwZziwM= +cloud.google.com/go v0.112.1/go.mod h1:+Vbu+Y1UU+I1rjmzeMOb/8RfkKJK2Gyxi1X6jJCZLo4= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= -cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/compute v1.25.1 h1:ZRpHJedLtTpKgr3RV1Fx23NuaAEN1Zfx9hw1u4aJdjU= +cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= +cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= +cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/iam v1.1.4 h1:K6n/GZHFTtEoKT5aUG3l9diPi0VduZNQ1PfdnpkkIFk= -cloud.google.com/go/iam v1.1.4/go.mod h1:l/rg8l1AaA+VFMho/HYx2Vv6xinPSLMF8qfhRPIZ0L8= +cloud.google.com/go/iam v1.1.6 h1:bEa06k05IO4f4uJonbB5iAgKTPpABy1ayxaIZV/GHVc= +cloud.google.com/go/iam v1.1.6/go.mod h1:O0zxdPeGBoFdWW3HWmBxJsk0pfvNM/p/qa82rWOGTwI= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -45,8 +45,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/oNM= -cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= +cloud.google.com/go/storage v1.38.0 h1:Az68ZRGlnNTpIBbLjSMIV2BDcwwXYlRlQzis0llkpJg= +cloud.google.com/go/storage v1.38.0/go.mod h1:tlUADB0mAb9BgYls9lq+8MGkfzOXuLrnHXlpHmvFJoY= contrib.go.opencensus.io/exporter/stackdriver v0.12.6/go.mod h1:8x999/OcIPy5ivx/wDiV7Gx4D+VUPODf0mWRGRc5kSk= contrib.go.opencensus.io/exporter/stackdriver v0.13.4/go.mod h1:aXENhDJ1Y4lIg4EUaVTwzvYETVNZk10Pu26tevFKLUc= contrib.go.opencensus.io/exporter/stackdriver v0.13.5 h1:TNaexHK16gPUoc7uzELKOU7JULqccn1NDuqUxmxSqfo= @@ -69,8 +69,8 @@ dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= -filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= -filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= +filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= +filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= @@ -130,6 +130,10 @@ github.com/GeertJohan/go.rice v1.0.0/go.mod h1:eH6gbSOAUv07dQuZVnBmoDP8mgsM1rtix github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= +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/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= @@ -166,15 +170,13 @@ github.com/XSAM/otelsql v0.27.0 h1:i9xtxtdcqXV768a5C6SoT/RkG+ue3JTOgkYInzlTOqs= github.com/XSAM/otelsql v0.27.0/go.mod h1:0mFB3TvLa7NCuhm/2nU7/b2wEtsczkj8Rey8ygO7V+A= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= +github.com/alecthomas/kingpin/v2 v2.3.1/go.mod h1:oYL5vtsvEHZGHxU7DMp32Dvx+qL+ptGn6lWaot2vCNE= github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= github.com/alecthomas/participle/v2 v2.0.0-alpha7/go.mod h1:NumScqsC42o9x+dGj8/YqsIfhrIQjFEOFovxotbBirA= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= +github.com/alecthomas/units v0.0.0-20240626203959-61d1e3462e30 h1:t3eaIm0rUkzbrIewtiFmMK5RXHej2XnoXNhxVsAYUfg= +github.com/alecthomas/units v0.0.0-20240626203959-61d1e3462e30/go.mod h1:fvzegU4vN3H1qMT+8wDmzjAcDONcgo2/SZ/TyfdUOFs= github.com/alexbrainman/sspi v0.0.0-20210105120005-909beea2cc74 h1:Kk6a4nehpJ3UuJRqlA3JxYxBZEqCeOmATOvrbT4p9RA= github.com/alexbrainman/sspi v0.0.0-20210105120005-909beea2cc74/go.mod h1:cEWa1LVoE5KvSD9ONXsZrj0z6KqySlCCNKHlLzbqAt4= github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a h1:HbKu58rmZpUGpz5+4FfNmIU+FmZg2P3Xaj2v2bfNWmk= @@ -220,8 +222,6 @@ github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df/go.mod h1:h github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= @@ -259,20 +259,22 @@ github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2 v2.7.5 h1:rvc39Ol6z3MvaBzXkxFC6Nfsn github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2 v2.7.5/go.mod h1:R/pdNYDYFQk+tuuOo7QES1kkv6OLmp5ze2XBZQIVffM= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v1.1.1 h1:nCb6ZLdB7NRaqsm91JtQTAme2SKJzXVsdPIPkyJr1MU= github.com/cespare/cp v1.1.1/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chai2010/gettext-go v1.0.2 h1:1Lwwip6Q2QGsAdl/ZKPCwTe9fe0CjlUbqj5bFNSjIRk= github.com/chai2010/gettext-go v1.0.2/go.mod h1:y+wnP2cHYaVj19NZhYKAwEMH2CI1gNHeQQ+5AjwawxA= -github.com/chaos-mesh/chaos-mesh/api/v1alpha1 v0.0.0-20220226050744-799408773657 h1:CyuI+igIjadM/GRnE2o0q+WCwipDh0n2cUYFPAvxziM= -github.com/chaos-mesh/chaos-mesh/api/v1alpha1 v0.0.0-20220226050744-799408773657/go.mod h1:JRiumF+RFsH1mrrP8FUsi9tExPylKkO/oSRWeQEUdLE= +github.com/chaos-mesh/chaos-mesh/api v0.0.0-20240709130330-9f4feec7553f h1:onZ3oc6l1Gz8pVpQ0c1U1Cb11kIMoDb3xtEy/iZbYZM= +github.com/chaos-mesh/chaos-mesh/api v0.0.0-20240709130330-9f4feec7553f/go.mod h1:x11iCbZV6hzzSQWMq610B6Wl5Lg1dhwqcVfeiWQQnQQ= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0= @@ -300,9 +302,8 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20240318125728-8a4994d93e50 h1:DBmgJDC9dTfkVyGgipamEh2BpGYxScCH1TOF1LL1cXc= +github.com/cncf/xds/go v0.0.0-20240318125728-8a4994d93e50/go.mod h1:5e1+Vvlzido69INQaVO6d87Qn543Xr6nooe9Kz7oBFM= github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= @@ -347,8 +348,9 @@ github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= +github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= @@ -432,7 +434,6 @@ github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WA github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/digitalocean/godo v1.99.0 h1:gUHO7n9bDaZFWvbzOum4bXE0/09ZuYA9yA8idQHX57E= github.com/digitalocean/godo v1.99.0/go.mod h1:SsS2oXo2rznfM/nORlZ/6JaUJZFhmKTib1YhopUc8NA= github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= @@ -447,7 +448,6 @@ github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dominikbraun/graph v0.23.0 h1:TdZB4pPqCLFxYhdyMFb1TBdFxp8XLcJfTTBQucVPgCo= github.com/dominikbraun/graph v0.23.0/go.mod h1:yOjYyogZLY1LSG9E33JWZJiq5k83Qy2C6POAuiViluc= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -458,20 +458,19 @@ github.com/dvsekhvalnov/jose2go v1.7.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB github.com/edsrzf/mmap-go v1.1.0 h1:6EUwBLQ/Mcr1EYLE4Tn1VdW1A4ckqCQWZBw8Hr0kjpQ= github.com/edsrzf/mmap-go v1.1.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= -github.com/emicklei/go-restful/v3 v3.10.2 h1:hIovbnmBTLjHXkqEBUz3HGpXZdM7ZrE9fJIZIqlJLqE= -github.com/emicklei/go-restful/v3 v3.10.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU= +github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.11.1 h1:wSUXTlLfiAQRWs2F+p+EKOY9rUyis1MyGqJ2DIk5HpM= -github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g= +github.com/envoyproxy/go-control-plane v0.12.0 h1:4X+VP1GHd1Mhj6IB5mMeGbLCleqxjletLK6K0rbxyZI= +github.com/envoyproxy/go-control-plane v0.12.0/go.mod h1:ZBTaoJ23lqITozF0M6G4/IragXCQKCnYbmlmtHvwRG0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= -github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= +github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= +github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/esote/minmaxheap v1.0.0 h1:rgA7StnXXpZG6qlM0S7pUmEv1KpWe32rYT4x8J8ntaA= github.com/esote/minmaxheap v1.0.0/go.mod h1:Ln8+i7fS1k3PLgZI2JAo0iA1as95QnIYiGCrqSJ5FZk= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= @@ -479,11 +478,10 @@ github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= github.com/ethereum/go-ethereum v1.13.8 h1:1od+thJel3tM52ZUNQwvpYOeRHlbkVFZ5S8fhi0Lgsg= github.com/ethereum/go-ethereum v1.13.8/go.mod h1:sc48XYQxCzH3fG9BcrXCOOgQk2JfZzNAmIKnceogzsA= -github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= -github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= +github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg= +github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2Wvf/TIe2xdyJxTlb6obmF18d8QdkxNDu4= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= @@ -503,11 +501,10 @@ github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYF github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= -github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= -github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= @@ -517,10 +514,10 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/fvbommel/sortorder v1.0.2 h1:mV4o8B2hKboCdkJm+a7uX/SIpZob4JzUpc5GGnM45eo= -github.com/fvbommel/sortorder v1.0.2/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= -github.com/fxamacker/cbor/v2 v2.5.0 h1:oHsG0V/Q6E/wqTS2O1Cozzsy69nqCiguo5Q1a1ADivE= -github.com/fxamacker/cbor/v2 v2.5.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo= +github.com/fvbommel/sortorder v1.1.0 h1:fUmoe+HLsBTctBDoaBwpQo5N+nrCp8g/BjKb/6ZQmYw= +github.com/fvbommel/sortorder v1.1.0/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= +github.com/fxamacker/cbor/v2 v2.6.0 h1:sU6J2usfADwWlYDAFhZBQ6TnLFBHxgesMrQfQgk1tWA= +github.com/fxamacker/cbor/v2 v2.6.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= github.com/gagliardetto/binary v0.7.7 h1:QZpT38+sgoPg+TIQjH94sLbl/vX+nlIRA37pEyOsjfY= @@ -568,7 +565,6 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-json-experiment/json v0.0.0-20231102232822-2e55bd4e08b0 h1:ymLjT4f35nQbASLnvxEde4XOBL+Sn7rFuV+FOJqkljg= github.com/go-json-experiment/json v0.0.0-20231102232822-2e55bd4e08b0/go.mod h1:6daplAwHHGbUGib4990V3Il26O0OC4aRyvewaaAihaA= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= @@ -576,19 +572,17 @@ github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-ldap/ldap/v3 v3.4.6 h1:ert95MdbiG7aWo/oPYp9btL3KJlMPKnP58r09rI8T+A= github.com/go-ldap/ldap/v3 v3.4.6/go.mod h1:IGMQANNtxpsOzj7uUAMjpGBaOVTC4DYyIy8VsTdxmtc= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= 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.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.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/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= -github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= +github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= +github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= @@ -602,13 +596,12 @@ github.com/go-openapi/errors v0.20.4 h1:unTcVm6PispJsMECE3zWgvG4xTiKda1LIR5rCRWL github.com/go-openapi/errors v0.20.4/go.mod h1:Z3FlZ4I8jEGxjUK+bugx3on2mIAk4txuAOhlsB1FSgk= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= -github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= +github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= +github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= +github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= github.com/go-openapi/loads v0.21.1/go.mod h1:/DtAMXXneXFjbQMGEtbamCZb+4x7eGwkvZCvBmwUG+g= github.com/go-openapi/loads v0.21.2 h1:r2a/xFIYeZ4Qd2TnGpWDIQNcP80dIaZgf704za8enro= github.com/go-openapi/loads v0.21.2/go.mod h1:Jq58Os6SSGz0rzh62ptiu8Z31I+OTHqmULx5e/gJbNw= @@ -624,9 +617,8 @@ github.com/go-openapi/strfmt v0.21.7/go.mod h1:adeGTkxE44sPyLk0JV235VQAO/ZXUr8KA github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= -github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= +github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-openapi/validate v0.22.1 h1:G+c2ub6q47kfX1sOBLwIQwzBVt8qmOAARyo/9Fqs9NU= github.com/go-openapi/validate v0.22.1/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= @@ -645,16 +637,15 @@ github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= github.com/go-resty/resty/v2 v2.11.0 h1:i7jMfNOJYMp69lq7qozJP+bjgzfAzeOhuGlyDrqxT/8= github.com/go-resty/resty/v2 v2.11.0/go.mod h1:iiP/OpA0CkcL3IGt1O0+/SIItFUbkkyw5BGXiVdTu+A= -github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= -github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= +github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= +github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= +github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= +github.com/go-test/deep v1.0.4 h1:u2CU3YKy9I2pmu9pX0eq50wCgjfGIt539SqR7FbHiho= github.com/go-test/deep v1.0.4/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= -github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= github.com/go-webauthn/webauthn v0.9.4 h1:YxvHSqgUyc5AK2pZbqkWWR55qKeDPhP8zLDr6lpIc2g= github.com/go-webauthn/webauthn v0.9.4/go.mod h1:LqupCtzSef38FcxzaklmOn7AykGKhAhr9xlRbdbgnTw= github.com/go-webauthn/x v0.1.5 h1:V2TCzDU2TGLd0kSZOXdrqDVV5JB9ILnKxA9S53CSBw0= @@ -717,8 +708,8 @@ github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w github.com/golang-jwt/jwt/v5 v5.2.0 h1:d/ix8ftRUorsN+5eMIlF4T6J8CAt9rch3My2winC1Jw= github.com/golang-jwt/jwt/v5 v5.2.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= -github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= +github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= +github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -764,10 +755,8 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= -github.com/google/gnostic v0.6.9/go.mod h1:Nm8234We1lq6iB9OmlgNv3nH91XLLVZHCDayfA3xq+E= -github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= -github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= +github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 h1:0VpGH+cDhbDtdcweoyCVsF3fhN8kejK6rFe/2FFX2nU= +github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49/go.mod h1:BkkQ4L1KS1xMt2aWSPStnn55ChGC0DPOn2FQYj+f25M= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -781,6 +770,7 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= @@ -811,8 +801,8 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20231023181126-ff6d637d2a7b h1:RMpPgZTSApbPf7xaVel+QkoGPRLFLrwFO89uDUHEGf0= -github.com/google/pprof v0.0.0-20231023181126-ff6d637d2a7b/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= +github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg= +github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= @@ -821,6 +811,7 @@ github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3 github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -828,8 +819,8 @@ github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfF github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= -github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= +github.com/googleapis/gax-go/v2 v2.12.2 h1:mhN09QQW1jEWeMF74zGR81R30z4VJzjZsfkUhuHF+DA= +github.com/googleapis/gax-go/v2 v2.12.2/go.mod h1:61M8vcyyXR2kqKFxKrfA22jaA8JGF7Dc8App1U3H6jc= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gophercloud/gophercloud v1.5.0 h1:cDN6XFCLKiiqvYpjQLq9AiM7RDRbIC9450WpPH+yvXo= github.com/gophercloud/gophercloud v1.5.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= @@ -849,6 +840,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/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/dskit v0.0.0-20231120170505-765e343eda4f h1:gyojr97YeWZ70pKNakWv5/tKwBHuLy3icnIeCo9gQr4= github.com/grafana/dskit v0.0.0-20231120170505-765e343eda4f/go.mod h1:8dsy5tQOkeNQyjXpm5mQsbCu3H5uzeBD35MzRQFznKU= github.com/grafana/gomemcache v0.0.0-20231023152154-6947259a0586 h1:/of8Z8taCPftShATouOrBVy6GaTTjgQd/VfNiZp/VXQ= @@ -874,16 +869,16 @@ github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:Fecb github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= -github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.0 h1:f4tggROQKKcnh4eItay6z/HbHLqghBxS8g7pyMhmDio= -github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.0/go.mod h1:hKAkSgNkL0FII46ZkJcpVEAai4KV+swlIWCKfekd1pA= -github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.3 h1:o95KDiV/b1xdkumY5YbLR0/n2+wBxUpgf3HgfKgTyLI= -github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.3/go.mod h1:hTxjzRcX49ogbTGVJ1sM5mz5s+SSgiGIyL3jjPxl32E= +github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1 h1:qnpSQwGEnkcRpTqNOIR6bJbR0gAorgP9CSALpRcKoAA= +github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1/go.mod h1:lXGCsh6c22WGtjr+qGHj1otzZpV/1kwTMAqkwZsnWRU= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0 h1:pRhl55Yx1eC7BZ1N+BBWwnKaMyD8uC+34TLdndZMAKk= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0/go.mod h1:XKMd7iuf/RGPSMJ/U4HP0zS2Z9Fh8Ps9a+6X26m/tmI= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= @@ -1068,11 +1063,11 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGw github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= -github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= -github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= +github.com/jmoiron/sqlx v1.4.0 h1:1PLqN7S1UYp5t4SrVVnt4nUVNemrDAtxlulVe+Qgm3o= +github.com/jmoiron/sqlx v1.4.0/go.mod h1:ZrZ7UsYB/weZdl2Bxg6jCRO9c3YHl8r3ahlKmRT4JLY= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg= -github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= +github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= +github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4= github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= @@ -1082,14 +1077,11 @@ github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2E github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= @@ -1121,11 +1113,9 @@ github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b h1:udzkj9S/zlT5X367kqJ github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b/go.mod h1:pcaDhQK0/NJZEvtCO0qQPPropqV0sJOJ6YW7X+9kRwM= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -1203,14 +1193,16 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= +github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/mattn/go-sqlite3 v2.0.3+incompatible h1:gXHsfypPkaMZrKbD5209QV9jbUTJKjyR5WD3HYQSd+U= github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= +github.com/mfridman/interpolate v0.0.2 h1:pnuTK7MQIxxFz1Gr+rjSIx9u7qVjf5VOoM/u6BbAxPY= +github.com/mfridman/interpolate v0.0.2/go.mod h1:p+7uk6oE07mpE/Ik1b8EckO0O4ZXiGAfshKBWLUM9Xg= github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= @@ -1254,8 +1246,8 @@ github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqky github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= -github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= -github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/moby/spdystream v0.4.0 h1:Vy79D6mHeJJjiPdFEL2yku1kl0chZpJfZcPpb16BRl8= +github.com/moby/spdystream v0.4.0/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI= github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= @@ -1289,7 +1281,6 @@ github.com/muesli/termenv v0.12.0 h1:KuQRUE3PgxRFWhq4gHvZtPSLCGDqM5q/cYr1pZ39ytc github.com/muesli/termenv v0.12.0/go.mod h1:WCCv32tusQ/EEZ5S8oUIIrC/nIuBcxCVqlN4Xfkv+7A= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= @@ -1316,14 +1307,14 @@ github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vv github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= -github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= +github.com/onsi/ginkgo/v2 v2.17.2 h1:7eMhcy3GimbsA3hEnVKdw/PQM9XN9krpKVXsZdph0/g= +github.com/onsi/ginkgo/v2 v2.17.2/go.mod h1:nP2DPOQoNsQmsVyv5rDA8JkXQoCs6goXIvr/PRJ1eCc= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= -github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= +github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= +github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= @@ -1382,48 +1373,28 @@ github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndr github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/pressly/goose/v3 v3.16.0 h1:xMJUsZdHLqSnCqESyKSqEfcYVYsUuup1nrOhaEFftQg= -github.com/pressly/goose/v3 v3.16.0/go.mod h1:JwdKVnmCRhnF6XLQs2mHEQtucFD49cQBdRM4UiwkxsM= +github.com/pressly/goose/v3 v3.21.1 h1:5SSAKKWej8LVVzNLuT6KIvP1eFDuPvxa+B6H0w78buQ= +github.com/pressly/goose/v3 v3.21.1/go.mod h1:sqthmzV8PitchEkjecFJII//l43dLOCzfWh8pHEe+vE= github.com/prometheus/alertmanager v0.26.0 h1:uOMJWfIwJguc3NaM3appWNbbrh6G/OjvaHMk22aBBYc= github.com/prometheus/alertmanager v0.26.0/go.mod h1:rVcnARltVjavgVaNnmevxK7kOn7IZavyf0KNgHkbEpU= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= +github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= -github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= +github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/exporter-toolkit v0.10.1-0.20230714054209-2f4150c63f97 h1:oHcfzdJnM/SFppy2aUlvomk37GI33x9vgJULihE5Dt8= github.com/prometheus/exporter-toolkit v0.10.1-0.20230714054209-2f4150c63f97/go.mod h1:LoBCZeRh+5hX+fSULNyFnagYlQG/gBsyA/deNzROkq8= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/prometheus/prometheus v0.47.2-0.20231010075449-4b9c19fe5510 h1:6ksZ7t1hNOzGPPs8DK7SvXQf6UfWzi+W5Z7PCBl8gx4= github.com/prometheus/prometheus v0.47.2-0.20231010075449-4b9c19fe5510/go.mod h1:UC0TwJiF90m2T3iYPQBKnGu8gv3s55dF/EgpTq8gyvo= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/pyroscope-io/client v0.7.1 h1:yFRhj3vbgjBxehvxQmedmUWJQ4CAfCHhn+itPsuWsHw= github.com/pyroscope-io/client v0.7.1/go.mod h1:4h21iOU4pUOq0prKyDlvYRL+SCKsBc5wKiEtV+rJGqU= github.com/pyroscope-io/godeltaprof v0.1.2 h1:MdlEmYELd5w+lvIzmZvXGNMVzW2Qc9jDMuJaPOR75g4= @@ -1449,8 +1420,8 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.9.0 h1:l9HGsTsHJcvW14Nk7J9KFz8bzeAWXn3CG6bgt7LsrAE= github.com/rs/cors v1.9.0/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= @@ -1460,8 +1431,6 @@ github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThC github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww= -github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -1501,11 +1470,9 @@ github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFR github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/slack-go/slack v0.12.2 h1:x3OppyMyGIbbiyFhsBmpf9pwkUzMhthJMRNmNlA4LaQ= @@ -1514,42 +1481,40 @@ github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCq github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8= github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240620164046-1c03d0a97b20 h1:Ea3shtV50R1qMkLbDaOwio2C+Ia1dB7pJQzpm7vHzxM= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240620164046-1c03d0a97b20/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= -github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d h1:5tgMC5Gi2UAOKZ+m28W8ubjLeR0pQCAcrz6eQ0rW510= -github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d/go.mod h1:0UNuO3nDt9MFsZPaHJBEUolxVkN0iC69j1ccDp95e8k= -github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo= -github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540/go.mod h1:sjAmX8K2kbQhvDarZE1ZZgDgmHJ50s0BBc/66vKY2ek= -github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917 h1:MD80ZRCTvxxJ8PBmhtrKoTnky8cVNYrCrIBLVRbrOM0= -github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917/go.mod h1:jwVxhctE6BgLOSSsVq9wbREpZ8Ev34H+UBxeUhESZRs= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240605170242-555ff582f36a h1:/QIQciKjhZy+iBB74WG4pP88O2FwS1KZtSXO5COTTgI= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240605170242-555ff582f36a/go.mod h1:QqcZSwLgEIn7YraAIRmomnBMAuVFephiHrIWVlkWbFI= -github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240531021326-99118e47f696 h1:h1E87+z+JcUEfvbJVF56SnZA/YUFE5ewUE61MaR/Ewg= -github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240531021326-99118e47f696/go.mod h1:OiWUTrrpSLLTMh7FINWjEh6mmDJCVPaC4yEsDCVaWdU= -github.com/smartcontractkit/chainlink-testing-framework v1.31.1 h1:Qqo5VngCqbHQPfQKZneAN0L1dWXOWWd074Oo9Bex/Q0= -github.com/smartcontractkit/chainlink-testing-framework v1.31.1/go.mod h1:E6uNEZhZZid9PHv6/Kq5Vn63GlO61ZcKB+/f0DKo3Q4= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240712162033-89bd3351ce6e h1:vKVNJfFXy4Wdq5paOV0/fNgql2GoXkei10+D+SmC+Qs= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240712162033-89bd3351ce6e/go.mod h1:fh9eBbrReCmv31bfz52ENCAMa7nTKQbdhb2B3+S2VGo= +github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45 h1:NBQLtqk8zsyY4qTJs+NElI3aDFTcAo83JHvqD04EvB0= +github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45/go.mod h1:LV0h7QBQUpoC2UUi6TcUvcIFm1xjP/DtEcqV8+qeLUs= +github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240716180914-6fd88994c89c h1:xKj2jtIUhVcIm+RH9r7aTrxFdzM7VsaPLD4biUQj5Dg= +github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240716180914-6fd88994c89c/go.mod h1:6DgCnHMGdBaIh0bLs1dK0MtdeMZfeNhc/nvBUN6KIUg= +github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827 h1:BCHu4pNP6arrcHLEWx61XjLaonOd2coQNyL0NTUcaMc= +github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827/go.mod h1:OPX+wC2TWQsyLNpR7daMt2vMpmsNcoBxbZyGTHr6tiA= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240712132946-267a37c5ac6e h1:PzwzlHNv1YbJ6ZIdl/pIFRoOuOS4V4WLvjZvFUnZFL4= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240712132946-267a37c5ac6e/go.mod h1:hsFhop+SlQHKD+DEFjZrMJmbauT1A/wvtZIeeo4PxFU= +github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799 h1:HyLTySm7BR+oNfZqDTkVJ25wnmcTtxBBD31UkFL+kEM= +github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799/go.mod h1:UVFRacRkP7O7TQAzFmR52v5mUlxf+G1ovMlCQAB/cHU= +github.com/smartcontractkit/chainlink-testing-framework v1.32.7 h1:/I6Upq9KdnleWnUF1W3c3mAgMowAgi0yAcn8Vh5Px50= +github.com/smartcontractkit/chainlink-testing-framework v1.32.7/go.mod h1:Y1D6k7KLPZ52kwp3WJxShp4Wzw22jKldIzMT2yosipI= github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240405215812-5a72bc9af239 h1:Kk5OVlx/5g9q3Z3lhxytZS4/f8ds1MiNM8yaHgK3Oe8= github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240405215812-5a72bc9af239/go.mod h1:DC8sQMyTlI/44UCTL8QWFwb0bYNoXCfjwCv2hMivYZU= -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= github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI= github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f h1:hgJif132UCdjo8u43i7iPN1/MFnu49hv7lFGFftCHKU= github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f/go.mod h1:MvMXoufZAtqExNexqi4cjrNYE9MefKddKylxjS+//n0= github.com/smartcontractkit/havoc/k8schaos v0.0.0-20240409145249-e78d20847e37 h1:ZEhn2Yo1jY4hqy8nasDL4k4pNtopT3rS3Ap1GDb7ODc= github.com/smartcontractkit/havoc/k8schaos v0.0.0-20240409145249-e78d20847e37/go.mod h1:/kFr0D7SI/vueXl1N03uzOun4nViGPFRyA5X6eL3jXw= -github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c h1:lIyMbTaF2H0Q71vkwZHX/Ew4KF2BxiKhqEXwF8rn+KI= -github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c/go.mod h1:fb1ZDVXACvu4frX3APHZaEBp0xi1DIm34DcA0CwTsZM= +github.com/smartcontractkit/libocr v0.0.0-20240702141926-063ceef8c42e h1:9ypZ/8aW8Vm497i1gXHcT96oNLiu88jbg9QdX+IUE3E= +github.com/smartcontractkit/libocr v0.0.0-20240702141926-063ceef8c42e/go.mod h1:fb1ZDVXACvu4frX3APHZaEBp0xi1DIm34DcA0CwTsZM= github.com/smartcontractkit/seth v1.0.12 h1:iVdgMx42XWanPPnBaM5StR4c1XsTr/0/B/kKRZL5BsY= github.com/smartcontractkit/seth v1.0.12/go.mod h1:thWtbLyW4nRHJGzC5heknQDORoJPErE15sF34LHkorg= github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 h1:yiKnypAqP8l0OX0P3klzZ7SCcBUxy5KqTAKZmQOvSQE= github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1/go.mod h1:q6f4fe39oZPdsh1i57WznEZgxd8siidMaSFq3wdPmVg= github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 h1:Dai1bn+Q5cpeGMQwRdjOdVjG8mmFFROVkSKuUgBErRQ= github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1/go.mod h1:G5Sd/yzHWf26rQ+X0nG9E0buKPqRGPMJAfk2gwCzOOw= -github.com/smartcontractkit/wasp v0.4.7 h1:7mKJfwzFbuE8xVLUYtLt7Bjw8q/bmVZRW6Ks8kc1LVM= -github.com/smartcontractkit/wasp v0.4.7/go.mod h1:jeabvyXikb2aNoLQwcZGqaz17efrR8NJhpq4seAmdgs= -github.com/smartcontractkit/wsrpc v0.8.1 h1:kk0SXLqWrWaZ3J6c7n8D0NZ2uTMBBBpG5dZZXZX8UGE= -github.com/smartcontractkit/wsrpc v0.8.1/go.mod h1:yfg8v8fPLXkb6Mcnx6Pm/snP6jJ0r5Kf762Yd1a/KpA= +github.com/smartcontractkit/wasp v0.4.5 h1:pgiXwBci2m15eo33AzspzhpNG/gxg+8QGxl+I5LpfsQ= +github.com/smartcontractkit/wasp v0.4.5/go.mod h1:eVhBVLbVv0qORUlN7aR5C4aTN/lTYO3KnN1erO4ROOI= +github.com/smartcontractkit/wsrpc v0.7.3 h1:CKYZfawZShZGfvsQep1F9oBansnFk9ByZPCdTMpLphw= +github.com/smartcontractkit/wsrpc v0.7.3/go.mod h1:sj7QX2NQibhkhxTfs3KOhAj/5xwgqMipTvJVSssT9i0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= @@ -1585,7 +1550,6 @@ github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= -github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/streamingfast/logging v0.0.0-20220405224725-2755dab2ce75 h1:ZqpS7rAhhKD7S7DnrpEdrnW1/gZcv82ytpMviovkli4= github.com/streamingfast/logging v0.0.0-20220405224725-2755dab2ce75/go.mod h1:VlduQ80JcGJSargkRU4Sg9Xo63wZD/l8A5NC/Uo1/uU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -1673,8 +1637,8 @@ github.com/unrolled/secure v1.13.0 h1:sdr3Phw2+f8Px8HE5sd1EHdj1aV3yUwed/uZXChLFs github.com/unrolled/secure v1.13.0/go.mod h1:BmF5hyM6tXczk3MpQkFf1hpKSRqCyhqcbiQtiAF7+40= github.com/urfave/cli v1.22.14 h1:ebbhrRiGK2i4naQJr+1Xj92HXZCrK7MsyTS/ob3HnAk= github.com/urfave/cli v1.22.14/go.mod h1:X0eDS6pD6Exaclxm99NJ3FiCDRED7vIHpx2mDOHLvkA= -github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho= -github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= +github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs= +github.com/urfave/cli/v2 v2.25.7/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= @@ -1697,9 +1661,10 @@ github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgk github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +github.com/xhit/go-str2duration v1.2.0/go.mod h1:3cPSlfZlUHVlneIVfePFWcJZsuwf+P1v2SRTV4cUmp4= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xlab/treeprint v1.1.0 h1:G/1DjNkPpfZCFt9CSh6b5/nY4VimlbHF3Rh4obvtzDk= -github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= +github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ= +github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= @@ -1731,17 +1696,16 @@ go.dedis.ch/kyber/v3 v3.1.0 h1:ghu+kiRgM5JyD9TJ0hTIxTLQlJBR/ehjWvWwYW3XsC0= go.dedis.ch/kyber/v3 v3.1.0/go.mod h1:kXy7p3STAurkADD+/aZcsznZGKVHEqbtmdIzvPfrs1U= go.dedis.ch/protobuf v1.0.5/go.mod h1:eIV4wicvi6JK0q/QnfIEGeSFNG0ZeB24kzut5+HaRLo= go.dedis.ch/protobuf v1.0.7/go.mod h1:pv5ysfkDX/EawiPqcW3ikOxsL5t+BqnV6xHSmE79KI4= -go.dedis.ch/protobuf v1.0.11 h1:FTYVIEzY/bfl37lu3pR4lIj+F9Vp1jE8oh91VmxKgLo= go.dedis.ch/protobuf v1.0.11/go.mod h1:97QR256dnkimeNdfmURz0wAMNVbd1VmLXhG1CrTYrJ4= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= -go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= -go.etcd.io/etcd/api/v3 v3.5.7 h1:sbcmosSVesNrWOJ58ZQFitHMdncusIifYcrBfwrlJSY= -go.etcd.io/etcd/api/v3 v3.5.7/go.mod h1:9qew1gCdDDLu+VwmeG+iFpL+QlpHTo7iubavdVDgCAA= -go.etcd.io/etcd/client/pkg/v3 v3.5.7 h1:y3kf5Gbp4e4q7egZdn5T7W9TSHUvkClN6u+Rq9mEOmg= -go.etcd.io/etcd/client/pkg/v3 v3.5.7/go.mod h1:o0Abi1MK86iad3YrWhgUsbGx1pmTS+hrORWc2CamuhY= -go.etcd.io/etcd/client/v3 v3.5.7 h1:u/OhpiuCgYY8awOHlhIhmGIGpxfBU/GZBUP3m/3/Iz4= -go.etcd.io/etcd/client/v3 v3.5.7/go.mod h1:sOWmj9DZUMyAngS7QQwCyAXXAL6WhgTOPLNS/NabQgw= +go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= +go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/etcd/api/v3 v3.5.10 h1:szRajuUUbLyppkhs9K6BRtjY37l66XQQmw7oZRANE4k= +go.etcd.io/etcd/api/v3 v3.5.10/go.mod h1:TidfmT4Uycad3NM/o25fG3J07odo4GBB9hoxaodFCtI= +go.etcd.io/etcd/client/pkg/v3 v3.5.10 h1:kfYIdQftBnbAq8pUWFXfpuuxFSKzlmM5cSn76JByiT0= +go.etcd.io/etcd/client/pkg/v3 v3.5.10/go.mod h1:DYivfIviIuQ8+/lCq4vcxuseg2P2XbHygkKwFo9fc8U= +go.etcd.io/etcd/client/v3 v3.5.10 h1:W9TXNZ+oB3MCd/8UjxHTWK5J9Nquw9fQBLJd5ne5/Ao= +go.etcd.io/etcd/client/v3 v3.5.10/go.mod h1:RVeBnDz2PUEZqTpgqwAtUd8nAPf5kjyFyND7P1VkOKc= go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= @@ -1761,35 +1725,32 @@ go.opentelemetry.io/collector/pdata v1.0.0-rcv0016 h1:qCPXSQCoD3qeWFb1RuIks8fw9A go.opentelemetry.io/collector/pdata v1.0.0-rcv0016/go.mod h1:OdN0alYOlYhHXu6BDlGehrZWgtBuiDsz/rlNeJeXiNg= 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.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.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= -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/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 h1:vS1Ao/R55RNV4O7TA2Qopok8yN+X0LIP6RVWLFkprck= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0/go.mod h1:BMsdeOxN04K0L5FNUBfjFdvwWGNe/rkmSwH4Aelu/X0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ= 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.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/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= 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.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= -go.starlark.net v0.0.0-20220817180228-f738f5508c12 h1:xOBJXWGEDwU5xSDxH6macxO11Us0AH2fTa9rmsbbF7g= -go.starlark.net v0.0.0-20220817180228-f738f5508c12/go.mod h1:VZcBMdr3cT3PnBoWunTabuSEXwVAH+ZJ5zxfs3AdASk= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= +go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= +go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= +go.starlark.net v0.0.0-20230525235612-a134d8f9ddca h1:VdD38733bfYv5tUZwEIskMM93VanwNIi5bIKnDrJdEY= +go.starlark.net v0.0.0-20230525235612-a134d8f9ddca/go.mod h1:jxU+3+j+71eXOW14274+SmmuW82qJzl6iZSeqEtTGds= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -1816,6 +1777,7 @@ go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.14.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= +go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= go4.org/netipx v0.0.0-20230125063823-8449b0a6169f h1:ketMxHg+vWm3yccyYiq+uK8D3fRmna2Fcj+awpQp84s= @@ -1855,8 +1817,8 @@ golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= -golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= -golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= +golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= +golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1867,8 +1829,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20240213143201-ec583247a57a h1:HinSgX1tJRX3KsL//Gxynpw5CTOAIPhgL4W8PNiIpVE= -golang.org/x/exp v0.0.0-20240213143201-ec583247a57a/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= +golang.org/x/exp v0.0.0-20240707233637-46b078467d37 h1:uLDX+AfeFCct3a2C7uIWBKMJIR3CJMhcgfrUAqjRK6w= +golang.org/x/exp v0.0.0-20240707233637-46b078467d37/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1896,13 +1858,12 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= -golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= +golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1913,7 +1874,6 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1948,22 +1908,21 @@ golang.org/x/net v0.0.0-20210331212208-0fccb6fa2b5c/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= -golang.org/x/net v0.0.0-20210423184538-5f58ad60dda6/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= +golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1973,10 +1932,10 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210413134643-5e61552d6c78/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= -golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= +golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= +golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1989,17 +1948,17 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190124100055-b90733256f2e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -2029,7 +1988,6 @@ golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2043,8 +2001,6 @@ golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2054,7 +2010,6 @@ golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2066,7 +2021,6 @@ golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2095,20 +2049,21 @@ golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= -golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= -golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= +golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= +golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2118,13 +2073,12 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -2202,8 +2156,8 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= -golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= +golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg= +golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -2211,10 +2165,8 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= -gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= -gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= +gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= +gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= gonum.org/v1/gonum v0.14.0 h1:2NiG67LD1tEH0D7kM+ps2V+fXmsAnpUeec7n8tcr4S0= gonum.org/v1/gonum v0.14.0/go.mod h1:AoWeoz0becf9QMWtE8iWXNXc27fK4fNeHNf/oMejGfU= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= @@ -2237,8 +2189,8 @@ google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz513 google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.149.0 h1:b2CqT6kG+zqJIVKRQ3ELJVLN1PwHZ6DJ3dW8yl82rgY= -google.golang.org/api v0.149.0/go.mod h1:Mwn1B7JTXrzXtnvmzQE2BD6bYZQ8DShKZDZbeN9I7qI= +google.golang.org/api v0.169.0 h1:QwWPy71FgMWqJN/l6jVlFHUa29a7dcUy02I8o799nPY= +google.golang.org/api v0.169.0/go.mod h1:gpNOiMA2tZ4mf5R9Iwf4rK/Dcz0fbdIgWYWVoxmsyLg= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -2247,8 +2199,6 @@ google.golang.org/appengine v1.6.2/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -2283,7 +2233,6 @@ google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEY google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -2294,13 +2243,12 @@ google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210401141331-865547bb08e2/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 h1:I6WNifs6pF9tNdSob2W24JtyxIYjzFB9qDlpUC76q+U= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405/go.mod h1:3WDQMjmJk36UQhjQ89emUzb1mdaHcPeeAh4SCBKznB4= -google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b h1:CIC2YMXmIhYw6evmhPxBKJ4fmLbOFtXQN/GV3XOZR8k= -google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:IBQ646DjkDkvUIsVq/cc03FUFQ9wbZu7yE396YcL870= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= +google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y= +google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s= +google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 h1:P8OJ/WCl/Xo4E4zoe4/bifHpSmmKwARqyqE4nW6J2GQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -2321,14 +2269,10 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -google.golang.org/grpc/examples v0.0.0-20210424002626-9572fd6faeae/go.mod h1:Ly7ZA/ARzg8fnPU9TyZIxoz33sEUuWX7txiqs8lPTgE= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -2341,10 +2285,10 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -2372,11 +2316,9 @@ gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= @@ -2399,26 +2341,26 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= -k8s.io/api v0.25.11 h1:4mjYDfE3yp22jrytjH0knwgzjXKkxHX4D01ZCAazvZM= -k8s.io/api v0.25.11/go.mod h1:bK4UvD4bthtutNlvensrfBX21PRQ/vs2cIYggHkOOAo= -k8s.io/apiextensions-apiserver v0.25.3 h1:bfI4KS31w2f9WM1KLGwnwuVlW3RSRPuIsfNF/3HzR0k= -k8s.io/apiextensions-apiserver v0.25.3/go.mod h1:ZJqwpCkxIx9itilmZek7JgfUAM0dnTsA48I4krPqRmo= +k8s.io/api v0.28.2 h1:9mpl5mOb6vXZvqbQmankOfPIGiudghwCoLl1EYfUZbw= +k8s.io/api v0.28.2/go.mod h1:RVnJBsjU8tcMq7C3iaRSGMeaKt2TWEUXcpIt/90fjEg= +k8s.io/apiextensions-apiserver v0.28.2 h1:J6/QRWIKV2/HwBhHRVITMLYoypCoPY1ftigDM0Kn+QU= +k8s.io/apiextensions-apiserver v0.28.2/go.mod h1:5tnkxLGa9nefefYzWuAlWZ7RZYuN/765Au8cWLA6SRg= k8s.io/apimachinery v0.28.2 h1:KCOJLrc6gu+wV1BYgwik4AF4vXOlVJPdiqn0yAWWwXQ= k8s.io/apimachinery v0.28.2/go.mod h1:RdzF87y/ngqk9H4z3EL2Rppv5jj95vGS/HaFXrLDApU= -k8s.io/cli-runtime v0.25.11 h1:GE2yNZm1tN+MJtw1SGMOLesLF7Kp7NVAVqRSTbXfu4o= -k8s.io/cli-runtime v0.25.11/go.mod h1:r/nEINuHVEpgGhcd2WamU7hD1t/lMnSz8XM44Autltc= -k8s.io/client-go v0.25.11 h1:DJQ141UsbNRI6wYSlcYLP5J5BW5Wq7Bgm42Ztq2SW70= -k8s.io/client-go v0.25.11/go.mod h1:41Xs7p1SfhoReUnmjjYCfCNWFiq4xSkexwJfbxF2F7A= -k8s.io/component-base v0.26.2 h1:IfWgCGUDzrD6wLLgXEstJKYZKAFS2kO+rBRi0p3LqcI= -k8s.io/component-base v0.26.2/go.mod h1:DxbuIe9M3IZPRxPIzhch2m1eT7uFrSBJUBuVCQEBivs= -k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= -k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20230303024457-afdc3dddf62d h1:VcFq5n7wCJB2FQMCIHfC+f+jNcGgNMar1uKd6rVlifU= -k8s.io/kube-openapi v0.0.0-20230303024457-afdc3dddf62d/go.mod h1:y5VtZWM9sHHc2ZodIH/6SHzXj+TPU5USoA8lcIeKEKY= -k8s.io/kubectl v0.25.11 h1:6bsft5Gan6BCvQ7cJbDRFjTm4Zfq8GuUYpsWAdVngYE= -k8s.io/kubectl v0.25.11/go.mod h1:8mIfgkFgT+yJ8/TlmPW1qoRh46H2si9q5nW8id7i9iM= -k8s.io/utils v0.0.0-20230711102312-30195339c3c7 h1:ZgnF1KZsYxWIifwSNZFZgNtWE89WI5yiP5WwlfDoIyc= -k8s.io/utils v0.0.0-20230711102312-30195339c3c7/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/cli-runtime v0.28.2 h1:64meB2fDj10/ThIMEJLO29a1oujSm0GQmKzh1RtA/uk= +k8s.io/cli-runtime v0.28.2/go.mod h1:bTpGOvpdsPtDKoyfG4EG041WIyFZLV9qq4rPlkyYfDA= +k8s.io/client-go v0.28.2 h1:DNoYI1vGq0slMBN/SWKMZMw0Rq+0EQW6/AK4v9+3VeY= +k8s.io/client-go v0.28.2/go.mod h1:sMkApowspLuc7omj1FOSUxSoqjr+d5Q0Yc0LOFnYFJY= +k8s.io/component-base v0.28.2 h1:Yc1yU+6AQSlpJZyvehm/NkJBII72rzlEsd6MkBQ+G0E= +k8s.io/component-base v0.28.2/go.mod h1:4IuQPQviQCg3du4si8GpMrhAIegxpsgPngPRR/zWpzc= +k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= +k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/kube-openapi v0.0.0-20240709000822-3c01b740850f h1:2sXuKesAYbRHxL3aE2PN6zX/gcJr22cjrsej+W784Tc= +k8s.io/kube-openapi v0.0.0-20240709000822-3c01b740850f/go.mod h1:UxDHUPsUwTOOxSU+oXURfFBcAS6JwiRXTYqYwfuGowc= +k8s.io/kubectl v0.28.2 h1:fOWOtU6S0smdNjG1PB9WFbqEIMlkzU5ahyHkc7ESHgM= +k8s.io/kubectl v0.28.2/go.mod h1:6EQWTPySF1fn7yKoQZHYf9TPwIl2AygHEcJoxFekr64= +k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 h1:jgGTlFYnhF1PM1Ax/lAlxUPE+KfCIXHaathvJg1C3ak= +k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g= nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= @@ -2430,15 +2372,15 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= -sigs.k8s.io/controller-runtime v0.13.0 h1:iqa5RNciy7ADWnIc8QxCbOX5FEKVR3uxVxKHRMc2WIQ= -sigs.k8s.io/controller-runtime v0.13.0/go.mod h1:Zbz+el8Yg31jubvAEyglRZGdLAjplZl+PgtYNI6WNTI= +sigs.k8s.io/controller-runtime v0.16.2 h1:mwXAVuEk3EQf478PQwQ48zGOXvW27UJc8NHktQVuIPU= +sigs.k8s.io/controller-runtime v0.16.2/go.mod h1:vpMu3LpI5sYWtujJOa2uPK61nB5rbwlN7BAB8aSLvGU= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/kustomize/api v0.12.1 h1:7YM7gW3kYBwtKvoY216ZzY+8hM+lV53LUayghNRJ0vM= -sigs.k8s.io/kustomize/api v0.12.1/go.mod h1:y3JUhimkZkR6sbLNwfJHxvo1TCLwuwm14sCYnkH6S1s= -sigs.k8s.io/kustomize/kyaml v0.13.9 h1:Qz53EAaFFANyNgyOEJbT/yoIHygK40/ZcvU3rgry2Tk= -sigs.k8s.io/kustomize/kyaml v0.13.9/go.mod h1:QsRbD0/KcU+wdk0/L0fIp2KLnohkVzs6fQ85/nOXac4= -sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= -sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 h1:XX3Ajgzov2RKUdc5jW3t5jwY7Bo7dcRm+tFxT+NfgY0= +sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3/go.mod h1:9n16EZKMhXBNSiUC5kSdFQJkdH3zbxS/JoO619G1VAY= +sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 h1:W6cLQc5pnqM7vh3b7HvGNfXrJ/xL6BDMS0v1V/HHg5U= +sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3/go.mod h1:JWP1Fj0VWGHyw3YUPjXSQnRnrwezrZSrApfX5S0nIag= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/integration-tests/k8s/connect.go b/integration-tests/k8s/connect.go deleted file mode 100644 index be1f9a25f9d..00000000000 --- a/integration-tests/k8s/connect.go +++ /dev/null @@ -1,99 +0,0 @@ -package k8s - -import ( - "fmt" - "os" - "time" - - "github.com/pelletier/go-toml/v2" - "github.com/rs/zerolog/log" - - "github.com/smartcontractkit/chainlink-testing-framework/blockchain" - client2 "github.com/smartcontractkit/chainlink-testing-framework/client" - "github.com/smartcontractkit/chainlink/integration-tests/client" -) - -const ( - DefaultConfigFilePath = "../connect.toml" - ErrReadConnectionConfig = "failed to read TOML environment connection config" - ErrUnmarshalConnectionConfig = "failed to unmarshal TOML environment connection config" -) - -type ConnectionVars struct { - Namespace string `toml:"namespace"` - NetworkName string `toml:"network_name"` - NetworkChainID int64 `toml:"network_chain_id"` - NetworkPrivateKey string `toml:"network_private_key"` - NetworkWSURL string `toml:"network_ws_url"` - NetworkHTTPURL string `toml:"network_http_url"` - CLNodesNum int `toml:"cl_nodes_num"` - CLNodeURLTemplate string `toml:"cl_node_url_template"` - CLNodeInternalDNSRecordTemplate string `toml:"cl_node_internal_dns_record_template"` - CLNodeUser string `toml:"cl_node_user"` - CLNodePassword string `toml:"cl_node_password"` - MockServerURL string `toml:"mockserver_url"` -} - -// ConnectRemote connects to a local environment, see charts/chainlink-cluster -func ConnectRemote() (*blockchain.EVMNetwork, *client2.MockserverClient, *client.ChainlinkK8sClient, []*client.ChainlinkK8sClient, error) { - cfg, err := ReadConfig() - if err != nil { - return &blockchain.EVMNetwork{}, nil, nil, nil, err - } - net := &blockchain.EVMNetwork{ - Name: cfg.NetworkName, - Simulated: true, - SupportsEIP1559: true, - ClientImplementation: blockchain.EthereumClientImplementation, - ChainID: 1337, - PrivateKeys: []string{ - cfg.NetworkPrivateKey, - }, - URLs: []string{cfg.NetworkWSURL}, - HTTPURLs: []string{cfg.NetworkHTTPURL}, - ChainlinkTransactionLimit: 500000, - Timeout: blockchain.StrDuration{Duration: 2 * time.Minute}, - MinimumConfirmations: 1, - GasEstimationBuffer: 10000, - } - clClients := make([]*client.ChainlinkK8sClient, 0) - for i := 1; i <= cfg.CLNodesNum; i++ { - c, err := client.NewChainlinkK8sClient(&client.ChainlinkConfig{ - URL: fmt.Sprintf(cfg.CLNodeURLTemplate, i), - Email: cfg.CLNodeUser, - InternalIP: fmt.Sprintf(cfg.CLNodeInternalDNSRecordTemplate, i), - Password: cfg.CLNodePassword, - }, fmt.Sprintf(cfg.CLNodeInternalDNSRecordTemplate, i), cfg.Namespace) - if err != nil { - return &blockchain.EVMNetwork{}, nil, nil, nil, err - } - clClients = append(clClients, c) - } - msClient := client2.NewMockserverClient(&client2.MockserverConfig{ - LocalURL: cfg.MockServerURL, - ClusterURL: cfg.MockServerURL, - }) - - if len(clClients) < 2 { - return &blockchain.EVMNetwork{}, nil, nil, nil, fmt.Errorf("not enough chainlink nodes, need at least 2, got %d", len(clClients)) - } - - //nolint:gosec // G602 - how is this potentially causing slice out of bounds is beyond me - return net, msClient, clClients[0], clClients[1:], nil -} - -func ReadConfig() (*ConnectionVars, error) { - var cfg *ConnectionVars - var d []byte - var err error - d, err = os.ReadFile(DefaultConfigFilePath) - if err != nil { - return nil, fmt.Errorf("%s, err: %w", ErrReadConnectionConfig, err) - } - err = toml.Unmarshal(d, &cfg) - if err != nil { - return nil, fmt.Errorf("%s, err: %w", ErrUnmarshalConnectionConfig, err) - } - log.Info().Interface("Config", cfg).Msg("Connecting to environment from config") - return cfg, nil -} diff --git a/integration-tests/load/automationv2_1/automationv2_1_test.go b/integration-tests/load/automationv2_1/automationv2_1_test.go index 1761e58f861..b0555cdd3f8 100644 --- a/integration-tests/load/automationv2_1/automationv2_1_test.go +++ b/integration-tests/load/automationv2_1/automationv2_1_test.go @@ -59,17 +59,6 @@ const ( ) var ( - baseTOML = `[Feature] -LogPoller = true - -[OCR2] -Enabled = true - -[P2P] -[P2P.V2] -Enabled = true -AnnounceAddresses = ["0.0.0.0:6690"] -ListenAddresses = ["0.0.0.0:6690"]` secretsTOML = `[Mercury.Credentials.%s] LegacyURL = '%s' URL = '%s' @@ -100,8 +89,9 @@ Password = '%s'` "memory": "4Gi", }, }, - "stateful": true, - "capacity": "20Gi", + "stateful": true, + "capacity": "20Gi", + "enablePrometheusPostgresExporter": true, } recNodeSpec = map[string]interface{}{ @@ -164,7 +154,7 @@ func TestLogTrigger(t *testing.T) { ctx := tests.Context(t) l := logging.GetTestLogger(t) - loadedTestConfig, err := tc.GetConfig("Load", tc.Automation) + loadedTestConfig, err := tc.GetConfig([]string{"Load"}, tc.Automation) if err != nil { t.Fatal(err) } @@ -292,21 +282,16 @@ Load Config: numberOfUpkeeps := *loadedTestConfig.Automation.General.NumberOfNodes for i := 0; i < numberOfUpkeeps+1; i++ { // +1 for the OCR boot node - var nodeTOML string - if i == 1 || i == 3 { - nodeTOML = fmt.Sprintf("%s\n\n[Log]\nLevel = \"%s\"", baseTOML, *loadedTestConfig.Automation.General.ChainlinkNodeLogLevel) - } else { - nodeTOML = fmt.Sprintf("%s\n\n[Log]\nLevel = \"info\"", baseTOML) - } - nodeTOML = networks.AddNetworksConfig(nodeTOML, loadedTestConfig.Pyroscope, testNetwork) - var overrideFn = func(_ interface{}, target interface{}) { ctfconfig.MustConfigOverrideChainlinkVersion(loadedTestConfig.GetChainlinkImageConfig(), target) ctfconfig.MightConfigOverridePyroscopeKey(loadedTestConfig.GetPyroscopeConfig(), target) } + tomlConfig, err := actions.BuildTOMLNodeConfigForK8s(&loadedTestConfig, testNetwork) + require.NoError(t, err, "Error building TOML config") + cd := chainlink.NewWithOverride(i, map[string]any{ - "toml": nodeTOML, + "toml": tomlConfig, "chainlink": nodeSpec, "db": dbSpec, "prometheus": *loadedTestConfig.Automation.General.UsePrometheus, diff --git a/integration-tests/load/connect.toml b/integration-tests/load/connect.toml deleted file mode 100644 index 919c5102c84..00000000000 --- a/integration-tests/load/connect.toml +++ /dev/null @@ -1,13 +0,0 @@ -# this is a static configuration to connect with CRIB k8s environment (Default Geth) -namespace = "cl-cluster" -network_name = "geth" -network_chain_id = 1337 -network_private_key = "ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" -network_ws_url = "ws://geth-1337:8546" -network_http_url = "http://geth:8544" -cl_nodes_num = 6 -cl_node_url_template = "http://app-node-%d:6688" -cl_node_internal_dns_record_template = "app-node-%d" -cl_node_user = "notreal@fakeemail.ch" -cl_node_password = "fj293fbBnlQ!f9vNs" -mockserver_url = "http://mockserver:1080" \ No newline at end of file diff --git a/integration-tests/load/functions/functions_test.go b/integration-tests/load/functions/functions_test.go index 49102bcaa66..374b3df705c 100644 --- a/integration-tests/load/functions/functions_test.go +++ b/integration-tests/load/functions/functions_test.go @@ -11,7 +11,7 @@ import ( ) func TestFunctionsLoad(t *testing.T) { - generalConfig, err := tc.GetConfig(tc.NoKey, tc.Functions) + generalConfig, err := tc.GetConfig([]string{""}, tc.Functions) require.NoError(t, err, "failed to get config") ft, err := SetupLocalLoadTestEnv(&generalConfig, &generalConfig) @@ -25,7 +25,7 @@ func TestFunctionsLoad(t *testing.T) { MonitorLoadStats(t, ft, labels, &generalConfig) t.Run("mumbai functions soak test http", func(t *testing.T) { - config, err := tc.GetConfig("Soak", tc.Functions) + config, err := tc.GetConfig([]string{"Soak"}, tc.Functions) require.NoError(t, err, "failed to get config") cfg := config.Functions cfgl := config.Logging.Loki @@ -59,7 +59,7 @@ func TestFunctionsLoad(t *testing.T) { }) t.Run("mumbai functions stress test http", func(t *testing.T) { - config, err := tc.GetConfig("Stress", tc.Functions) + config, err := tc.GetConfig([]string{"Stress"}, tc.Functions) require.NoError(t, err, "failed to get config") cfg := config.Functions cfgl := config.Logging.Loki @@ -93,7 +93,7 @@ func TestFunctionsLoad(t *testing.T) { }) t.Run("mumbai functions soak test only secrets", func(t *testing.T) { - config, err := tc.GetConfig("SecretsSoak", tc.Functions) + config, err := tc.GetConfig([]string{"SecretsSoak"}, tc.Functions) require.NoError(t, err, "failed to get config") cfg := config.Functions cfgl := config.Logging.Loki @@ -127,7 +127,7 @@ func TestFunctionsLoad(t *testing.T) { }) t.Run("mumbai functions stress test only secrets", func(t *testing.T) { - config, err := tc.GetConfig("SecretsStress", tc.Functions) + config, err := tc.GetConfig([]string{"SecretsStress"}, tc.Functions) require.NoError(t, err, "failed to get config") cfg := config.Functions cfgl := config.Logging.Loki @@ -161,7 +161,7 @@ func TestFunctionsLoad(t *testing.T) { }) t.Run("mumbai functions soak test real", func(t *testing.T) { - config, err := tc.GetConfig("RealSoak", tc.Functions) + config, err := tc.GetConfig([]string{"RealSoak"}, tc.Functions) require.NoError(t, err, "failed to get config") cfg := config.Functions cfgl := config.Logging.Loki @@ -195,7 +195,7 @@ func TestFunctionsLoad(t *testing.T) { }) t.Run("mumbai functions stress test real", func(t *testing.T) { - config, err := tc.GetConfig("RealStress", tc.Functions) + config, err := tc.GetConfig([]string{"RealStress"}, tc.Functions) require.NoError(t, err, "failed to get config") cfg := config.Functions cfgl := config.Logging.Loki diff --git a/integration-tests/load/functions/gateway_test.go b/integration-tests/load/functions/gateway_test.go index c2d5bd7c2cd..dd1092a595c 100644 --- a/integration-tests/load/functions/gateway_test.go +++ b/integration-tests/load/functions/gateway_test.go @@ -11,7 +11,7 @@ import ( ) func TestGatewayLoad(t *testing.T) { - listConfig, err := tc.GetConfig("GatewayList", tc.Functions) + listConfig, err := tc.GetConfig([]string{"GatewayList"}, tc.Functions) require.NoError(t, err) cfgl := listConfig.Logging.Loki @@ -42,7 +42,7 @@ func TestGatewayLoad(t *testing.T) { LokiConfig: wasp.NewLokiConfig(cfgl.Endpoint, cfgl.TenantId, cfgl.BasicAuth, cfgl.BearerToken), } - setConfig, err := tc.GetConfig("GatewaySet", tc.Functions) + setConfig, err := tc.GetConfig([]string{"GatewaySet"}, tc.Functions) require.NoError(t, err) secretsSetCfg := &wasp.Config{ diff --git a/integration-tests/load/functions/setup.go b/integration-tests/load/functions/setup.go index bf1cc54f009..5519c90846b 100644 --- a/integration-tests/load/functions/setup.go +++ b/integration-tests/load/functions/setup.go @@ -54,30 +54,30 @@ type S4SecretsCfg struct { func SetupLocalLoadTestEnv(globalConfig ctf_config.GlobalTestConfig, functionsConfig types.FunctionsTestConfig) (*FunctionsTest, error) { selectedNetwork := networks.MustGetSelectedNetworkConfig(globalConfig.GetNetworkConfig())[0] - seth, err := seth_utils.GetChainClient(globalConfig, selectedNetwork) + sethClient, err := seth_utils.GetChainClient(globalConfig, selectedNetwork) if err != nil { return nil, err } cfg := functionsConfig.GetFunctionsConfig() - lt, err := contracts.DeployLinkTokenContract(log.Logger, seth) + lt, err := contracts.DeployLinkTokenContract(log.Logger, sethClient) if err != nil { return nil, err } - coord, err := contracts.LoadFunctionsCoordinator(seth, *cfg.Common.Coordinator) + coord, err := contracts.LoadFunctionsCoordinator(sethClient, *cfg.Common.Coordinator) if err != nil { return nil, err } - router, err := contracts.LoadFunctionsRouter(log.Logger, seth, *cfg.Common.Router) + router, err := contracts.LoadFunctionsRouter(log.Logger, sethClient, *cfg.Common.Router) if err != nil { return nil, err } var loadTestClient contracts.FunctionsLoadTestClient if cfg.Common.LoadTestClient != nil && *cfg.Common.LoadTestClient != "" { - loadTestClient, err = contracts.LoadFunctionsLoadTestClient(seth, *cfg.Common.LoadTestClient) + loadTestClient, err = contracts.LoadFunctionsLoadTestClient(sethClient, *cfg.Common.LoadTestClient) } else { - loadTestClient, err = contracts.DeployFunctionsLoadTestClient(seth, *cfg.Common.Router) + loadTestClient, err = contracts.DeployFunctionsLoadTestClient(sethClient, *cfg.Common.Router) } if err != nil { return nil, err @@ -144,7 +144,7 @@ func SetupLocalLoadTestEnv(globalConfig ctf_config.GlobalTestConfig, functionsCo Msg("Set new secret") } return &FunctionsTest{ - SethClient: *seth, + SethClient: *sethClient, LinkToken: lt, Coordinator: coord, Router: router, diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index f00ba4a35d7..b1d2dbb9615 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -1,6 +1,6 @@ module github.com/smartcontractkit/chainlink/load-tests -go 1.21.7 +go 1.22.5 // Make sure we're working with the latest chainlink libs replace github.com/smartcontractkit/chainlink/v2 => ../../ @@ -16,11 +16,11 @@ require ( github.com/rs/zerolog v1.31.0 github.com/slack-go/slack v0.12.2 github.com/smartcontractkit/chainlink-automation v1.0.4 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240620164046-1c03d0a97b20 - github.com/smartcontractkit/chainlink-testing-framework v1.31.1 + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240712162033-89bd3351ce6e + github.com/smartcontractkit/chainlink-testing-framework v1.32.7 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-20240419185742-fd3cab206b2c + github.com/smartcontractkit/libocr v0.0.0-20240702141926-063ceef8c42e github.com/smartcontractkit/seth v1.0.12 github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 github.com/smartcontractkit/wasp v0.4.7 @@ -29,18 +29,26 @@ require ( go.uber.org/ratelimit v0.3.0 ) -// avoids ambigious imports of indirect dependencies -exclude github.com/hashicorp/consul v1.2.1 - require ( - contrib.go.opencensus.io/exporter/stackdriver v0.13.5 // indirect cosmossdk.io/api v0.3.1 // indirect cosmossdk.io/core v0.5.1 // indirect cosmossdk.io/depinject v1.0.0-alpha.3 // indirect cosmossdk.io/errors v1.0.0 // indirect cosmossdk.io/math v1.0.1 // indirect + github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/russross/blackfriday/v2 v2.1.0 // indirect + github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45 // indirect + k8s.io/apimachinery v0.30.2 // indirect +) + +// avoids ambigious imports of indirect dependencies +exclude github.com/hashicorp/consul v1.2.1 + +require ( + contrib.go.opencensus.io/exporter/stackdriver v0.13.5 // indirect dario.cat/mergo v1.0.0 // indirect - filippo.io/edwards25519 v1.0.0 // indirect + filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0 // indirect @@ -64,7 +72,7 @@ require ( github.com/NethermindEth/starknet.go v0.7.1-0.20240401080518-34a506f3cfdb // indirect github.com/VictoriaMetrics/fastcache v1.12.1 // indirect github.com/XSAM/otelsql v0.27.0 // indirect - github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect + github.com/alecthomas/units v0.0.0-20240626203959-61d1e3462e30 // indirect github.com/armon/go-metrics v0.4.1 // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/avast/retry-go v3.0.0+incompatible // indirect @@ -86,11 +94,11 @@ require ( github.com/c9s/goprocinfo v0.0.0-20210130143923-c95fcf8c64a8 // indirect github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2 v2.7.5 // indirect github.com/cenkalti/backoff v2.2.1+incompatible // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chai2010/gettext-go v1.0.2 // indirect - github.com/chaos-mesh/chaos-mesh/api/v1alpha1 v0.0.0-20220226050744-799408773657 // indirect + github.com/chaos-mesh/chaos-mesh/api v0.0.0-20240709130330-9f4feec7553f // indirect github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect github.com/chenzhuoyu/iasm v0.9.0 // indirect github.com/cockroachdb/errors v1.9.1 // indirect @@ -106,7 +114,7 @@ require ( github.com/containerd/containerd v1.7.12 // indirect github.com/containerd/continuity v0.4.3 // indirect github.com/containerd/log v0.1.0 // indirect - github.com/coreos/go-semver v0.3.0 // indirect + github.com/coreos/go-semver v0.3.1 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/cosmos-proto v1.0.0-beta.2 // indirect @@ -139,19 +147,19 @@ require ( github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.7.0 // indirect github.com/edsrzf/mmap-go v1.1.0 // indirect - github.com/emicklei/go-restful/v3 v3.10.2 // indirect + github.com/emicklei/go-restful/v3 v3.12.1 // indirect github.com/esote/minmaxheap v1.0.0 // indirect github.com/ethereum/c-kzg-4844 v0.4.0 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect - github.com/evanphx/json-patch/v5 v5.6.0 // indirect + github.com/evanphx/json-patch/v5 v5.9.0 // indirect github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb // indirect github.com/fatih/camelcase v1.0.0 // indirect github.com/fatih/color v1.16.0 // indirect - github.com/felixge/httpsnoop v1.0.3 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/fvbommel/sortorder v1.0.2 // indirect - github.com/fxamacker/cbor/v2 v2.5.0 // indirect + github.com/fvbommel/sortorder v1.1.0 // indirect + github.com/fxamacker/cbor/v2 v2.6.0 // indirect github.com/gabriel-vasile/mimetype v1.4.2 // indirect github.com/gagliardetto/binary v0.7.7 // indirect github.com/gagliardetto/solana-go v1.8.4 // indirect @@ -169,17 +177,17 @@ 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.4.1 // indirect + github.com/go-logr/logr v1.4.2 // 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 github.com/go-openapi/errors v0.20.4 // indirect - github.com/go-openapi/jsonpointer v0.20.0 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/jsonpointer v0.21.0 // indirect + github.com/go-openapi/jsonreference v0.21.0 // indirect github.com/go-openapi/loads v0.21.2 // indirect github.com/go-openapi/spec v0.20.9 // indirect github.com/go-openapi/strfmt v0.21.7 // indirect - github.com/go-openapi/swag v0.22.4 // indirect + github.com/go-openapi/swag v0.23.0 // indirect github.com/go-openapi/validate v0.22.1 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect @@ -194,18 +202,17 @@ require ( github.com/gogo/protobuf v1.3.3 // indirect github.com/gogo/status v1.1.1 // indirect github.com/golang-jwt/jwt/v5 v5.2.0 // indirect - github.com/golang/glog v1.1.2 // indirect + github.com/golang/glog v1.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/btree v1.1.2 // indirect - github.com/google/gnostic v0.6.9 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-github/v41 v41.0.0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/go-tpm v0.9.0 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/pprof v0.0.0-20231023181126-ff6d637d2a7b // indirect + github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.6.0 // indirect github.com/gorilla/context v1.1.1 // indirect @@ -225,10 +232,10 @@ require ( 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 - 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 + github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1 // indirect + github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect 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 @@ -270,7 +277,8 @@ require ( github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/jmoiron/sqlx v1.3.5 // indirect + github.com/jmoiron/sqlx v1.4.0 // indirect + github.com/joho/godotenv v1.5.1 // indirect github.com/jonboulle/clockwork v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect @@ -294,7 +302,6 @@ require ( github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect - github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/miekg/dns v1.1.56 // indirect github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect @@ -305,7 +312,7 @@ require ( github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/moby/patternmatcher v0.6.0 // indirect - github.com/moby/spdystream v0.2.0 // indirect + github.com/moby/spdystream v0.4.0 // indirect github.com/moby/sys/sequential v0.5.0 // indirect github.com/moby/sys/user v0.1.0 // indirect github.com/moby/term v0.5.0 // indirect @@ -323,7 +330,6 @@ require ( github.com/oklog/run v1.1.0 // indirect github.com/oklog/ulid v1.3.1 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect - github.com/onsi/ginkgo/v2 v2.13.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0-rc5 // indirect github.com/opencontainers/runc v1.1.10 // indirect @@ -340,18 +346,17 @@ 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/prometheus/alertmanager v0.26.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/client_golang v1.19.1 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.55.0 // indirect github.com/prometheus/common/sigv4 v0.1.0 // indirect github.com/prometheus/exporter-toolkit v0.10.1-0.20230714054209-2f4150c63f97 // indirect - github.com/prometheus/procfs v0.12.0 // indirect - github.com/prometheus/prometheus v0.48.1 // indirect + github.com/prometheus/procfs v0.15.1 // indirect + github.com/prometheus/prometheus v1.8.2-0.20200727090838-6f296594a852 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rivo/uniseg v0.4.4 // indirect github.com/robfig/cron/v3 v3.0.1 // indirect - github.com/rogpeppe/go-internal v1.11.0 // indirect - github.com/russross/blackfriday v1.6.0 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/scylladb/go-reflectx v1.0.1 // indirect @@ -364,20 +369,18 @@ require ( github.com/shopspring/decimal v1.3.1 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/smartcontractkit/chain-selectors v1.0.10 // indirect - github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d // indirect - github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 // indirect - github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917 // indirect - github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240605170242-555ff582f36a // indirect - github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240531021326-99118e47f696 // indirect + github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240716180914-6fd88994c89c // indirect + github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827 // indirect + github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240712132946-267a37c5ac6e // indirect + github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799 // indirect github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240405215812-5a72bc9af239 // indirect - github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 // indirect github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 // indirect - github.com/smartcontractkit/wsrpc v0.8.1 // indirect + github.com/smartcontractkit/wsrpc v0.7.3 // indirect github.com/soheilhy/cmux v0.1.5 // indirect github.com/sony/gobreaker v0.5.0 // indirect github.com/spf13/afero v1.9.5 // indirect github.com/spf13/cast v1.6.0 // indirect - github.com/spf13/cobra v1.8.0 // indirect + github.com/spf13/cobra v1.8.1 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.15.0 // indirect @@ -409,80 +412,78 @@ require ( github.com/valyala/fastjson v1.4.1 // indirect github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect github.com/x448/float16 v0.8.4 // indirect - github.com/xlab/treeprint v1.1.0 // indirect + github.com/xlab/treeprint v1.2.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect github.com/zondax/hid v0.9.1 // indirect github.com/zondax/ledger-go v0.14.1 // indirect go.dedis.ch/fixbuf v1.0.3 // indirect go.dedis.ch/kyber/v3 v3.1.0 // indirect - go.etcd.io/bbolt v1.3.7 // indirect - go.etcd.io/etcd/api/v3 v3.5.7 // indirect - go.etcd.io/etcd/client/pkg/v3 v3.5.7 // indirect - go.etcd.io/etcd/client/v3 v3.5.7 // indirect + go.etcd.io/bbolt v1.3.8 // indirect + go.etcd.io/etcd/api/v3 v3.5.10 // indirect + go.etcd.io/etcd/client/pkg/v3 v3.5.10 // indirect + go.etcd.io/etcd/client/v3 v3.5.10 // indirect go.mongodb.org/mongo-driver v1.15.0 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/collector/pdata v1.0.0-rcv0016 // indirect go.opentelemetry.io/collector/semconv v0.87.0 // indirect - 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.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.24.0 // indirect - go.opentelemetry.io/otel/sdk 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.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/sdk v1.27.0 // indirect + go.opentelemetry.io/otel/trace v1.27.0 // indirect + go.opentelemetry.io/proto/otlp v1.2.0 // indirect + go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/goleak v1.3.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.26.0 // indirect go4.org/netipx v0.0.0-20230125063823-8449b0a6169f // indirect golang.org/x/arch v0.7.0 // indirect - golang.org/x/crypto v0.22.0 // indirect - golang.org/x/exp v0.0.0-20240213143201-ec583247a57a // indirect - golang.org/x/mod v0.15.0 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/oauth2 v0.17.0 // indirect - golang.org/x/sync v0.6.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/term v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect + golang.org/x/crypto v0.25.0 // indirect + golang.org/x/exp v0.0.0-20240707233637-46b078467d37 // indirect + golang.org/x/mod v0.19.0 // indirect + golang.org/x/net v0.27.0 // indirect + golang.org/x/oauth2 v0.21.0 // indirect + golang.org/x/sync v0.7.0 // indirect + golang.org/x/sys v0.22.0 // indirect + golang.org/x/term v0.22.0 // indirect + golang.org/x/text v0.16.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.18.0 // indirect - gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect + golang.org/x/tools v0.23.0 // indirect + gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect gonum.org/v1/gonum v0.14.0 // indirect - google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.33.0 // indirect + google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect + google.golang.org/grpc v1.64.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/guregu/null.v4 v4.0.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/api v0.28.2 // indirect - k8s.io/apiextensions-apiserver v0.25.3 // indirect - k8s.io/apimachinery v0.28.2 // indirect - k8s.io/cli-runtime v0.25.11 // indirect - k8s.io/client-go v0.28.2 // indirect - k8s.io/component-base v0.26.2 // indirect - k8s.io/klog/v2 v2.100.1 // indirect - k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect - k8s.io/kubectl v0.25.11 // indirect - k8s.io/utils v0.0.0-20230711102312-30195339c3c7 // indirect + k8s.io/api v0.30.2 // indirect + k8s.io/apiextensions-apiserver v0.30.2 // indirect + k8s.io/cli-runtime v0.28.2 // indirect + k8s.io/client-go v1.5.2 // indirect + k8s.io/component-base v0.30.2 // indirect + k8s.io/klog/v2 v2.130.1 // indirect + k8s.io/kube-openapi v0.0.0-20240709000822-3c01b740850f // indirect + k8s.io/kubectl v0.28.1 // indirect + k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 // indirect nhooyr.io/websocket v1.8.7 // indirect pgregory.net/rapid v0.5.5 // indirect rsc.io/tmplfunc v0.0.3 // indirect - sigs.k8s.io/controller-runtime v0.13.0 // indirect + sigs.k8s.io/controller-runtime v0.18.4 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/kustomize/api v0.12.1 // indirect - sigs.k8s.io/kustomize/kyaml v0.13.9 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect - sigs.k8s.io/yaml v1.4.0 // indirect + sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 // indirect + sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect; indirect nhooyr.io/websocket v1.8.7 // indirect ) replace ( @@ -492,16 +493,52 @@ replace ( github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 // until merged upstream: https://github.com/hashicorp/go-plugin/pull/257 - github.com/hashicorp/go-plugin => github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306 + github.com/hashicorp/go-plugin => github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16 // until merged upstream: https://github.com/mwitkow/grpc-proxy/pull/69 github.com/mwitkow/grpc-proxy => github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f // type func(a Label, b Label) bool of func(a, b Label) bool {…} does not match inferred type func(a Label, b Label) int for func(a E, b E) int github.com/prometheus/prometheus => github.com/prometheus/prometheus v0.47.2-0.20231010075449-4b9c19fe5510 +) + +replace ( + github.com/prometheus/client_golang => github.com/prometheus/client_golang v1.14.0 + github.com/prometheus/common => github.com/prometheus/common v0.42.0 +) - // Pin K8s versions as their updates are highly disruptive and go mod keeps wanting to update them - k8s.io/api => k8s.io/api v0.25.11 - k8s.io/client-go => k8s.io/client-go v0.25.11 - k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20230303024457-afdc3dddf62d +replace github.com/chaos-mesh/chaos-mesh/api => github.com/chaos-mesh/chaos-mesh/api v0.0.0-20240709130330-9f4feec7553f + +replace ( + k8s.io/api => k8s.io/api v0.28.2 + k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.28.2 + k8s.io/apimachinery => k8s.io/apimachinery v0.28.2 + k8s.io/apiserver => k8s.io/apiserver v0.28.2 + k8s.io/cli-runtime => k8s.io/cli-runtime v0.28.2 + k8s.io/client-go => k8s.io/client-go v0.28.2 + k8s.io/cloud-provider => k8s.io/cloud-provider v0.28.2 + k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.28.2 + k8s.io/code-generator => k8s.io/code-generator v0.28.2 + k8s.io/component-base => k8s.io/component-base v0.28.2 + k8s.io/component-helpers => k8s.io/component-helpers v0.28.2 + k8s.io/controller-manager => k8s.io/controller-manager v0.28.2 + k8s.io/cri-api => k8s.io/cri-api v0.28.2 + k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.28.2 + k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.28.2 + k8s.io/endpointslice => k8s.io/endpointslice v0.28.2 + k8s.io/kms => k8s.io/kms v0.28.2 + k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.28.2 + k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.28.2 + k8s.io/kube-proxy => k8s.io/kube-proxy v0.28.2 + k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.28.2 + k8s.io/kubectl => k8s.io/kubectl v0.28.2 + k8s.io/kubelet => k8s.io/kubelet v0.28.2 + k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.28.2 + k8s.io/metrics => k8s.io/metrics v0.28.2 + k8s.io/mount-utils => k8s.io/mount-utils v0.28.2 + k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.28.2 + k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.28.2 + k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.28.2 + k8s.io/sample-controller => k8s.io/sample-controller v0.28.2 + sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.16.2 ) diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index e3e9254d67c..2a56fad1aa4 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -18,23 +18,23 @@ cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHOb cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go v0.110.9 h1:e7ITSqGFFk4rbz/JFIqZh3G4VEHguhAL4BQcFlWtU68= -cloud.google.com/go v0.110.9/go.mod h1:rpxevX/0Lqvlbc88b7Sc1SPNdyK1riNBTUU6JXhYNpM= +cloud.google.com/go v0.112.1 h1:uJSeirPke5UNZHIb4SxfZklVSiWWVqW4oXlETwZziwM= +cloud.google.com/go v0.112.1/go.mod h1:+Vbu+Y1UU+I1rjmzeMOb/8RfkKJK2Gyxi1X6jJCZLo4= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= -cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/compute v1.25.1 h1:ZRpHJedLtTpKgr3RV1Fx23NuaAEN1Zfx9hw1u4aJdjU= +cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= +cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= +cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/iam v1.1.4 h1:K6n/GZHFTtEoKT5aUG3l9diPi0VduZNQ1PfdnpkkIFk= -cloud.google.com/go/iam v1.1.4/go.mod h1:l/rg8l1AaA+VFMho/HYx2Vv6xinPSLMF8qfhRPIZ0L8= +cloud.google.com/go/iam v1.1.6 h1:bEa06k05IO4f4uJonbB5iAgKTPpABy1ayxaIZV/GHVc= +cloud.google.com/go/iam v1.1.6/go.mod h1:O0zxdPeGBoFdWW3HWmBxJsk0pfvNM/p/qa82rWOGTwI= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -45,8 +45,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/oNM= -cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= +cloud.google.com/go/storage v1.38.0 h1:Az68ZRGlnNTpIBbLjSMIV2BDcwwXYlRlQzis0llkpJg= +cloud.google.com/go/storage v1.38.0/go.mod h1:tlUADB0mAb9BgYls9lq+8MGkfzOXuLrnHXlpHmvFJoY= contrib.go.opencensus.io/exporter/stackdriver v0.12.6/go.mod h1:8x999/OcIPy5ivx/wDiV7Gx4D+VUPODf0mWRGRc5kSk= contrib.go.opencensus.io/exporter/stackdriver v0.13.4/go.mod h1:aXENhDJ1Y4lIg4EUaVTwzvYETVNZk10Pu26tevFKLUc= contrib.go.opencensus.io/exporter/stackdriver v0.13.5 h1:TNaexHK16gPUoc7uzELKOU7JULqccn1NDuqUxmxSqfo= @@ -69,8 +69,8 @@ dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= -filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= -filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= +filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= +filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= @@ -170,15 +170,13 @@ github.com/XSAM/otelsql v0.27.0 h1:i9xtxtdcqXV768a5C6SoT/RkG+ue3JTOgkYInzlTOqs= github.com/XSAM/otelsql v0.27.0/go.mod h1:0mFB3TvLa7NCuhm/2nU7/b2wEtsczkj8Rey8ygO7V+A= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= +github.com/alecthomas/kingpin/v2 v2.3.1/go.mod h1:oYL5vtsvEHZGHxU7DMp32Dvx+qL+ptGn6lWaot2vCNE= github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= github.com/alecthomas/participle/v2 v2.0.0-alpha7/go.mod h1:NumScqsC42o9x+dGj8/YqsIfhrIQjFEOFovxotbBirA= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= +github.com/alecthomas/units v0.0.0-20240626203959-61d1e3462e30 h1:t3eaIm0rUkzbrIewtiFmMK5RXHej2XnoXNhxVsAYUfg= +github.com/alecthomas/units v0.0.0-20240626203959-61d1e3462e30/go.mod h1:fvzegU4vN3H1qMT+8wDmzjAcDONcgo2/SZ/TyfdUOFs= github.com/alexbrainman/sspi v0.0.0-20210105120005-909beea2cc74 h1:Kk6a4nehpJ3UuJRqlA3JxYxBZEqCeOmATOvrbT4p9RA= github.com/alexbrainman/sspi v0.0.0-20210105120005-909beea2cc74/go.mod h1:cEWa1LVoE5KvSD9ONXsZrj0z6KqySlCCNKHlLzbqAt4= github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a h1:HbKu58rmZpUGpz5+4FfNmIU+FmZg2P3Xaj2v2bfNWmk= @@ -224,8 +222,6 @@ github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df/go.mod h1:h github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= @@ -263,20 +259,22 @@ github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2 v2.7.5 h1:rvc39Ol6z3MvaBzXkxFC6Nfsn github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2 v2.7.5/go.mod h1:R/pdNYDYFQk+tuuOo7QES1kkv6OLmp5ze2XBZQIVffM= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v1.1.1 h1:nCb6ZLdB7NRaqsm91JtQTAme2SKJzXVsdPIPkyJr1MU= github.com/cespare/cp v1.1.1/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chai2010/gettext-go v1.0.2 h1:1Lwwip6Q2QGsAdl/ZKPCwTe9fe0CjlUbqj5bFNSjIRk= github.com/chai2010/gettext-go v1.0.2/go.mod h1:y+wnP2cHYaVj19NZhYKAwEMH2CI1gNHeQQ+5AjwawxA= -github.com/chaos-mesh/chaos-mesh/api/v1alpha1 v0.0.0-20220226050744-799408773657 h1:CyuI+igIjadM/GRnE2o0q+WCwipDh0n2cUYFPAvxziM= -github.com/chaos-mesh/chaos-mesh/api/v1alpha1 v0.0.0-20220226050744-799408773657/go.mod h1:JRiumF+RFsH1mrrP8FUsi9tExPylKkO/oSRWeQEUdLE= +github.com/chaos-mesh/chaos-mesh/api v0.0.0-20240709130330-9f4feec7553f h1:onZ3oc6l1Gz8pVpQ0c1U1Cb11kIMoDb3xtEy/iZbYZM= +github.com/chaos-mesh/chaos-mesh/api v0.0.0-20240709130330-9f4feec7553f/go.mod h1:x11iCbZV6hzzSQWMq610B6Wl5Lg1dhwqcVfeiWQQnQQ= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ0g/qfRdp61a3Uu/AWrgIq2s0ClJV1g0= @@ -294,9 +292,8 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20240318125728-8a4994d93e50 h1:DBmgJDC9dTfkVyGgipamEh2BpGYxScCH1TOF1LL1cXc= +github.com/cncf/xds/go v0.0.0-20240318125728-8a4994d93e50/go.mod h1:5e1+Vvlzido69INQaVO6d87Qn543Xr6nooe9Kz7oBFM= github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= @@ -341,8 +338,9 @@ github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= +github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= @@ -376,8 +374,8 @@ github.com/cpuguy83/dockercfg v0.3.1/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHf github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM= -github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 h1:d28BXYi+wUpz1KBmiF9bWrjEMacUEREV6MBi2ODnrfQ= github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233/go.mod h1:geZJZH3SzKCqnz5VT0q/DyIG/tvu/dZk+VIfXicupJs= github.com/crate-crypto/go-kzg-4844 v0.7.0 h1:C0vgZRk4q4EZ/JgPfzuSoxdCq3C3mOZMBShovmncxvA= @@ -426,7 +424,6 @@ github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WA github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/digitalocean/godo v1.99.0 h1:gUHO7n9bDaZFWvbzOum4bXE0/09ZuYA9yA8idQHX57E= github.com/digitalocean/godo v1.99.0/go.mod h1:SsS2oXo2rznfM/nORlZ/6JaUJZFhmKTib1YhopUc8NA= github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= @@ -441,7 +438,6 @@ github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dominikbraun/graph v0.23.0 h1:TdZB4pPqCLFxYhdyMFb1TBdFxp8XLcJfTTBQucVPgCo= github.com/dominikbraun/graph v0.23.0/go.mod h1:yOjYyogZLY1LSG9E33JWZJiq5k83Qy2C6POAuiViluc= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -452,20 +448,19 @@ github.com/dvsekhvalnov/jose2go v1.7.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB github.com/edsrzf/mmap-go v1.1.0 h1:6EUwBLQ/Mcr1EYLE4Tn1VdW1A4ckqCQWZBw8Hr0kjpQ= github.com/edsrzf/mmap-go v1.1.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= -github.com/emicklei/go-restful/v3 v3.10.2 h1:hIovbnmBTLjHXkqEBUz3HGpXZdM7ZrE9fJIZIqlJLqE= -github.com/emicklei/go-restful/v3 v3.10.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU= +github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.11.1 h1:wSUXTlLfiAQRWs2F+p+EKOY9rUyis1MyGqJ2DIk5HpM= -github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g= +github.com/envoyproxy/go-control-plane v0.12.0 h1:4X+VP1GHd1Mhj6IB5mMeGbLCleqxjletLK6K0rbxyZI= +github.com/envoyproxy/go-control-plane v0.12.0/go.mod h1:ZBTaoJ23lqITozF0M6G4/IragXCQKCnYbmlmtHvwRG0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= -github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= +github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= +github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/esote/minmaxheap v1.0.0 h1:rgA7StnXXpZG6qlM0S7pUmEv1KpWe32rYT4x8J8ntaA= github.com/esote/minmaxheap v1.0.0/go.mod h1:Ln8+i7fS1k3PLgZI2JAo0iA1as95QnIYiGCrqSJ5FZk= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= @@ -473,11 +468,10 @@ github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= github.com/ethereum/go-ethereum v1.13.8 h1:1od+thJel3tM52ZUNQwvpYOeRHlbkVFZ5S8fhi0Lgsg= github.com/ethereum/go-ethereum v1.13.8/go.mod h1:sc48XYQxCzH3fG9BcrXCOOgQk2JfZzNAmIKnceogzsA= -github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= -github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= +github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg= +github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2Wvf/TIe2xdyJxTlb6obmF18d8QdkxNDu4= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= @@ -497,11 +491,10 @@ github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYF github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= -github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= -github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= @@ -511,10 +504,10 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/fvbommel/sortorder v1.0.2 h1:mV4o8B2hKboCdkJm+a7uX/SIpZob4JzUpc5GGnM45eo= -github.com/fvbommel/sortorder v1.0.2/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= -github.com/fxamacker/cbor/v2 v2.5.0 h1:oHsG0V/Q6E/wqTS2O1Cozzsy69nqCiguo5Q1a1ADivE= -github.com/fxamacker/cbor/v2 v2.5.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo= +github.com/fvbommel/sortorder v1.1.0 h1:fUmoe+HLsBTctBDoaBwpQo5N+nrCp8g/BjKb/6ZQmYw= +github.com/fvbommel/sortorder v1.1.0/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= +github.com/fxamacker/cbor/v2 v2.6.0 h1:sU6J2usfADwWlYDAFhZBQ6TnLFBHxgesMrQfQgk1tWA= +github.com/fxamacker/cbor/v2 v2.6.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= github.com/gagliardetto/binary v0.7.7 h1:QZpT38+sgoPg+TIQjH94sLbl/vX+nlIRA37pEyOsjfY= @@ -562,7 +555,6 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-json-experiment/json v0.0.0-20231102232822-2e55bd4e08b0 h1:ymLjT4f35nQbASLnvxEde4XOBL+Sn7rFuV+FOJqkljg= github.com/go-json-experiment/json v0.0.0-20231102232822-2e55bd4e08b0/go.mod h1:6daplAwHHGbUGib4990V3Il26O0OC4aRyvewaaAihaA= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= @@ -570,19 +562,17 @@ github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-ldap/ldap/v3 v3.4.6 h1:ert95MdbiG7aWo/oPYp9btL3KJlMPKnP58r09rI8T+A= github.com/go-ldap/ldap/v3 v3.4.6/go.mod h1:IGMQANNtxpsOzj7uUAMjpGBaOVTC4DYyIy8VsTdxmtc= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= 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.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.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/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= -github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= +github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= +github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= @@ -596,13 +586,12 @@ github.com/go-openapi/errors v0.20.4 h1:unTcVm6PispJsMECE3zWgvG4xTiKda1LIR5rCRWL github.com/go-openapi/errors v0.20.4/go.mod h1:Z3FlZ4I8jEGxjUK+bugx3on2mIAk4txuAOhlsB1FSgk= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= -github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= +github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= +github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= +github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= github.com/go-openapi/loads v0.21.1/go.mod h1:/DtAMXXneXFjbQMGEtbamCZb+4x7eGwkvZCvBmwUG+g= github.com/go-openapi/loads v0.21.2 h1:r2a/xFIYeZ4Qd2TnGpWDIQNcP80dIaZgf704za8enro= github.com/go-openapi/loads v0.21.2/go.mod h1:Jq58Os6SSGz0rzh62ptiu8Z31I+OTHqmULx5e/gJbNw= @@ -618,9 +607,8 @@ github.com/go-openapi/strfmt v0.21.7/go.mod h1:adeGTkxE44sPyLk0JV235VQAO/ZXUr8KA github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= -github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= +github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-openapi/validate v0.22.1 h1:G+c2ub6q47kfX1sOBLwIQwzBVt8qmOAARyo/9Fqs9NU= github.com/go-openapi/validate v0.22.1/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= @@ -639,16 +627,15 @@ github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= github.com/go-resty/resty/v2 v2.11.0 h1:i7jMfNOJYMp69lq7qozJP+bjgzfAzeOhuGlyDrqxT/8= github.com/go-resty/resty/v2 v2.11.0/go.mod h1:iiP/OpA0CkcL3IGt1O0+/SIItFUbkkyw5BGXiVdTu+A= -github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= -github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= +github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= +github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= +github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= +github.com/go-test/deep v1.0.4 h1:u2CU3YKy9I2pmu9pX0eq50wCgjfGIt539SqR7FbHiho= github.com/go-test/deep v1.0.4/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= -github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= github.com/go-webauthn/webauthn v0.9.4 h1:YxvHSqgUyc5AK2pZbqkWWR55qKeDPhP8zLDr6lpIc2g= github.com/go-webauthn/webauthn v0.9.4/go.mod h1:LqupCtzSef38FcxzaklmOn7AykGKhAhr9xlRbdbgnTw= github.com/go-webauthn/x v0.1.5 h1:V2TCzDU2TGLd0kSZOXdrqDVV5JB9ILnKxA9S53CSBw0= @@ -711,8 +698,8 @@ github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w github.com/golang-jwt/jwt/v5 v5.2.0 h1:d/ix8ftRUorsN+5eMIlF4T6J8CAt9rch3My2winC1Jw= github.com/golang-jwt/jwt/v5 v5.2.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= -github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= +github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= +github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -758,10 +745,8 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= -github.com/google/gnostic v0.6.9/go.mod h1:Nm8234We1lq6iB9OmlgNv3nH91XLLVZHCDayfA3xq+E= -github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= -github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= +github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 h1:0VpGH+cDhbDtdcweoyCVsF3fhN8kejK6rFe/2FFX2nU= +github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49/go.mod h1:BkkQ4L1KS1xMt2aWSPStnn55ChGC0DPOn2FQYj+f25M= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -775,6 +760,7 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= @@ -805,8 +791,8 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20231023181126-ff6d637d2a7b h1:RMpPgZTSApbPf7xaVel+QkoGPRLFLrwFO89uDUHEGf0= -github.com/google/pprof v0.0.0-20231023181126-ff6d637d2a7b/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= +github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg= +github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= @@ -815,6 +801,7 @@ github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3 github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -822,8 +809,8 @@ github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfF github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= -github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= +github.com/googleapis/gax-go/v2 v2.12.2 h1:mhN09QQW1jEWeMF74zGR81R30z4VJzjZsfkUhuHF+DA= +github.com/googleapis/gax-go/v2 v2.12.2/go.mod h1:61M8vcyyXR2kqKFxKrfA22jaA8JGF7Dc8App1U3H6jc= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gophercloud/gophercloud v1.5.0 h1:cDN6XFCLKiiqvYpjQLq9AiM7RDRbIC9450WpPH+yvXo= github.com/gophercloud/gophercloud v1.5.0/go.mod h1:aAVqcocTSXh2vYFZ1JTvx4EQmfgzxRcNupUfxZbBNDM= @@ -872,16 +859,16 @@ github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:Fecb github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= -github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.0 h1:f4tggROQKKcnh4eItay6z/HbHLqghBxS8g7pyMhmDio= -github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.0/go.mod h1:hKAkSgNkL0FII46ZkJcpVEAai4KV+swlIWCKfekd1pA= -github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.3 h1:o95KDiV/b1xdkumY5YbLR0/n2+wBxUpgf3HgfKgTyLI= -github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.3/go.mod h1:hTxjzRcX49ogbTGVJ1sM5mz5s+SSgiGIyL3jjPxl32E= +github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1 h1:qnpSQwGEnkcRpTqNOIR6bJbR0gAorgP9CSALpRcKoAA= +github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1/go.mod h1:lXGCsh6c22WGtjr+qGHj1otzZpV/1kwTMAqkwZsnWRU= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0 h1:pRhl55Yx1eC7BZ1N+BBWwnKaMyD8uC+34TLdndZMAKk= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0/go.mod h1:XKMd7iuf/RGPSMJ/U4HP0zS2Z9Fh8Ps9a+6X26m/tmI= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= @@ -1064,11 +1051,11 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGw github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= -github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= -github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= +github.com/jmoiron/sqlx v1.4.0 h1:1PLqN7S1UYp5t4SrVVnt4nUVNemrDAtxlulVe+Qgm3o= +github.com/jmoiron/sqlx v1.4.0/go.mod h1:ZrZ7UsYB/weZdl2Bxg6jCRO9c3YHl8r3ahlKmRT4JLY= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg= -github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= +github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= +github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4= github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= @@ -1078,14 +1065,11 @@ github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2E github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= @@ -1117,11 +1101,9 @@ github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b h1:udzkj9S/zlT5X367kqJ github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b/go.mod h1:pcaDhQK0/NJZEvtCO0qQPPropqV0sJOJ6YW7X+9kRwM= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -1197,14 +1179,16 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= +github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/mattn/go-sqlite3 v2.0.3+incompatible h1:gXHsfypPkaMZrKbD5209QV9jbUTJKjyR5WD3HYQSd+U= github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= +github.com/mfridman/interpolate v0.0.2 h1:pnuTK7MQIxxFz1Gr+rjSIx9u7qVjf5VOoM/u6BbAxPY= +github.com/mfridman/interpolate v0.0.2/go.mod h1:p+7uk6oE07mpE/Ik1b8EckO0O4ZXiGAfshKBWLUM9Xg= github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= @@ -1248,8 +1232,8 @@ github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqky github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= -github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= -github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/moby/spdystream v0.4.0 h1:Vy79D6mHeJJjiPdFEL2yku1kl0chZpJfZcPpb16BRl8= +github.com/moby/spdystream v0.4.0/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI= github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= @@ -1279,7 +1263,6 @@ github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= @@ -1306,14 +1289,14 @@ github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vv github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= -github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= +github.com/onsi/ginkgo/v2 v2.17.2 h1:7eMhcy3GimbsA3hEnVKdw/PQM9XN9krpKVXsZdph0/g= +github.com/onsi/ginkgo/v2 v2.17.2/go.mod h1:nP2DPOQoNsQmsVyv5rDA8JkXQoCs6goXIvr/PRJ1eCc= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= -github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= +github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= +github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= @@ -1372,48 +1355,28 @@ github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndr github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/pressly/goose/v3 v3.16.0 h1:xMJUsZdHLqSnCqESyKSqEfcYVYsUuup1nrOhaEFftQg= -github.com/pressly/goose/v3 v3.16.0/go.mod h1:JwdKVnmCRhnF6XLQs2mHEQtucFD49cQBdRM4UiwkxsM= +github.com/pressly/goose/v3 v3.21.1 h1:5SSAKKWej8LVVzNLuT6KIvP1eFDuPvxa+B6H0w78buQ= +github.com/pressly/goose/v3 v3.21.1/go.mod h1:sqthmzV8PitchEkjecFJII//l43dLOCzfWh8pHEe+vE= github.com/prometheus/alertmanager v0.26.0 h1:uOMJWfIwJguc3NaM3appWNbbrh6G/OjvaHMk22aBBYc= github.com/prometheus/alertmanager v0.26.0/go.mod h1:rVcnARltVjavgVaNnmevxK7kOn7IZavyf0KNgHkbEpU= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= +github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= -github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= +github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/exporter-toolkit v0.10.1-0.20230714054209-2f4150c63f97 h1:oHcfzdJnM/SFppy2aUlvomk37GI33x9vgJULihE5Dt8= github.com/prometheus/exporter-toolkit v0.10.1-0.20230714054209-2f4150c63f97/go.mod h1:LoBCZeRh+5hX+fSULNyFnagYlQG/gBsyA/deNzROkq8= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/prometheus/prometheus v0.47.2-0.20231010075449-4b9c19fe5510 h1:6ksZ7t1hNOzGPPs8DK7SvXQf6UfWzi+W5Z7PCBl8gx4= github.com/prometheus/prometheus v0.47.2-0.20231010075449-4b9c19fe5510/go.mod h1:UC0TwJiF90m2T3iYPQBKnGu8gv3s55dF/EgpTq8gyvo= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/pyroscope-io/client v0.7.1 h1:yFRhj3vbgjBxehvxQmedmUWJQ4CAfCHhn+itPsuWsHw= github.com/pyroscope-io/client v0.7.1/go.mod h1:4h21iOU4pUOq0prKyDlvYRL+SCKsBc5wKiEtV+rJGqU= github.com/pyroscope-io/godeltaprof v0.1.2 h1:MdlEmYELd5w+lvIzmZvXGNMVzW2Qc9jDMuJaPOR75g4= @@ -1439,8 +1402,8 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.9.0 h1:l9HGsTsHJcvW14Nk7J9KFz8bzeAWXn3CG6bgt7LsrAE= github.com/rs/cors v1.9.0/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= @@ -1450,8 +1413,6 @@ github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThC github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww= -github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -1491,11 +1452,9 @@ github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFR github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/slack-go/slack v0.12.2 h1:x3OppyMyGIbbiyFhsBmpf9pwkUzMhthJMRNmNlA4LaQ= @@ -1504,30 +1463,28 @@ github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCq github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8= github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240620164046-1c03d0a97b20 h1:Ea3shtV50R1qMkLbDaOwio2C+Ia1dB7pJQzpm7vHzxM= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240620164046-1c03d0a97b20/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= -github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d h1:5tgMC5Gi2UAOKZ+m28W8ubjLeR0pQCAcrz6eQ0rW510= -github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d/go.mod h1:0UNuO3nDt9MFsZPaHJBEUolxVkN0iC69j1ccDp95e8k= -github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo= -github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540/go.mod h1:sjAmX8K2kbQhvDarZE1ZZgDgmHJ50s0BBc/66vKY2ek= -github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917 h1:MD80ZRCTvxxJ8PBmhtrKoTnky8cVNYrCrIBLVRbrOM0= -github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917/go.mod h1:jwVxhctE6BgLOSSsVq9wbREpZ8Ev34H+UBxeUhESZRs= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240605170242-555ff582f36a h1:/QIQciKjhZy+iBB74WG4pP88O2FwS1KZtSXO5COTTgI= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240605170242-555ff582f36a/go.mod h1:QqcZSwLgEIn7YraAIRmomnBMAuVFephiHrIWVlkWbFI= -github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240531021326-99118e47f696 h1:h1E87+z+JcUEfvbJVF56SnZA/YUFE5ewUE61MaR/Ewg= -github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240531021326-99118e47f696/go.mod h1:OiWUTrrpSLLTMh7FINWjEh6mmDJCVPaC4yEsDCVaWdU= -github.com/smartcontractkit/chainlink-testing-framework v1.31.1 h1:Qqo5VngCqbHQPfQKZneAN0L1dWXOWWd074Oo9Bex/Q0= -github.com/smartcontractkit/chainlink-testing-framework v1.31.1/go.mod h1:E6uNEZhZZid9PHv6/Kq5Vn63GlO61ZcKB+/f0DKo3Q4= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240712162033-89bd3351ce6e h1:vKVNJfFXy4Wdq5paOV0/fNgql2GoXkei10+D+SmC+Qs= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240712162033-89bd3351ce6e/go.mod h1:fh9eBbrReCmv31bfz52ENCAMa7nTKQbdhb2B3+S2VGo= +github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45 h1:NBQLtqk8zsyY4qTJs+NElI3aDFTcAo83JHvqD04EvB0= +github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240710121324-3ed288aa9b45/go.mod h1:LV0h7QBQUpoC2UUi6TcUvcIFm1xjP/DtEcqV8+qeLUs= +github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240716180914-6fd88994c89c h1:xKj2jtIUhVcIm+RH9r7aTrxFdzM7VsaPLD4biUQj5Dg= +github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240716180914-6fd88994c89c/go.mod h1:6DgCnHMGdBaIh0bLs1dK0MtdeMZfeNhc/nvBUN6KIUg= +github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827 h1:BCHu4pNP6arrcHLEWx61XjLaonOd2coQNyL0NTUcaMc= +github.com/smartcontractkit/chainlink-feeds v0.0.0-20240710170203-5b41615da827/go.mod h1:OPX+wC2TWQsyLNpR7daMt2vMpmsNcoBxbZyGTHr6tiA= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240712132946-267a37c5ac6e h1:PzwzlHNv1YbJ6ZIdl/pIFRoOuOS4V4WLvjZvFUnZFL4= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240712132946-267a37c5ac6e/go.mod h1:hsFhop+SlQHKD+DEFjZrMJmbauT1A/wvtZIeeo4PxFU= +github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799 h1:HyLTySm7BR+oNfZqDTkVJ25wnmcTtxBBD31UkFL+kEM= +github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240709043547-03612098f799/go.mod h1:UVFRacRkP7O7TQAzFmR52v5mUlxf+G1ovMlCQAB/cHU= +github.com/smartcontractkit/chainlink-testing-framework v1.32.7 h1:/I6Upq9KdnleWnUF1W3c3mAgMowAgi0yAcn8Vh5Px50= +github.com/smartcontractkit/chainlink-testing-framework v1.32.7/go.mod h1:Y1D6k7KLPZ52kwp3WJxShp4Wzw22jKldIzMT2yosipI= github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240405215812-5a72bc9af239 h1:Kk5OVlx/5g9q3Z3lhxytZS4/f8ds1MiNM8yaHgK3Oe8= github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240405215812-5a72bc9af239/go.mod h1:DC8sQMyTlI/44UCTL8QWFwb0bYNoXCfjwCv2hMivYZU= -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-20231003134350-e49dad63b306 h1:ko88+ZznniNJZbZPWAvHQU8SwKAdHngdDZ+pvVgB5ss= -github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= +github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16 h1:TFe+FvzxClblt6qRfqEhUfa4kFQx5UobuoFGO2W4mMo= +github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI= github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f h1:hgJif132UCdjo8u43i7iPN1/MFnu49hv7lFGFftCHKU= github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f/go.mod h1:MvMXoufZAtqExNexqi4cjrNYE9MefKddKylxjS+//n0= -github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c h1:lIyMbTaF2H0Q71vkwZHX/Ew4KF2BxiKhqEXwF8rn+KI= -github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c/go.mod h1:fb1ZDVXACvu4frX3APHZaEBp0xi1DIm34DcA0CwTsZM= +github.com/smartcontractkit/libocr v0.0.0-20240702141926-063ceef8c42e h1:9ypZ/8aW8Vm497i1gXHcT96oNLiu88jbg9QdX+IUE3E= +github.com/smartcontractkit/libocr v0.0.0-20240702141926-063ceef8c42e/go.mod h1:fb1ZDVXACvu4frX3APHZaEBp0xi1DIm34DcA0CwTsZM= github.com/smartcontractkit/seth v1.0.12 h1:iVdgMx42XWanPPnBaM5StR4c1XsTr/0/B/kKRZL5BsY= github.com/smartcontractkit/seth v1.0.12/go.mod h1:thWtbLyW4nRHJGzC5heknQDORoJPErE15sF34LHkorg= github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 h1:yiKnypAqP8l0OX0P3klzZ7SCcBUxy5KqTAKZmQOvSQE= @@ -1536,8 +1493,8 @@ github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 h1:D github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1/go.mod h1:G5Sd/yzHWf26rQ+X0nG9E0buKPqRGPMJAfk2gwCzOOw= github.com/smartcontractkit/wasp v0.4.7 h1:7mKJfwzFbuE8xVLUYtLt7Bjw8q/bmVZRW6Ks8kc1LVM= github.com/smartcontractkit/wasp v0.4.7/go.mod h1:jeabvyXikb2aNoLQwcZGqaz17efrR8NJhpq4seAmdgs= -github.com/smartcontractkit/wsrpc v0.8.1 h1:kk0SXLqWrWaZ3J6c7n8D0NZ2uTMBBBpG5dZZXZX8UGE= -github.com/smartcontractkit/wsrpc v0.8.1/go.mod h1:yfg8v8fPLXkb6Mcnx6Pm/snP6jJ0r5Kf762Yd1a/KpA= +github.com/smartcontractkit/wsrpc v0.7.3 h1:CKYZfawZShZGfvsQep1F9oBansnFk9ByZPCdTMpLphw= +github.com/smartcontractkit/wsrpc v0.7.3/go.mod h1:sj7QX2NQibhkhxTfs3KOhAj/5xwgqMipTvJVSssT9i0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= @@ -1558,8 +1515,8 @@ github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cA github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= -github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= -github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= @@ -1573,7 +1530,6 @@ github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= -github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/streamingfast/logging v0.0.0-20220405224725-2755dab2ce75 h1:ZqpS7rAhhKD7S7DnrpEdrnW1/gZcv82ytpMviovkli4= github.com/streamingfast/logging v0.0.0-20220405224725-2755dab2ce75/go.mod h1:VlduQ80JcGJSargkRU4Sg9Xo63wZD/l8A5NC/Uo1/uU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -1659,8 +1615,8 @@ github.com/unrolled/secure v1.13.0 h1:sdr3Phw2+f8Px8HE5sd1EHdj1aV3yUwed/uZXChLFs github.com/unrolled/secure v1.13.0/go.mod h1:BmF5hyM6tXczk3MpQkFf1hpKSRqCyhqcbiQtiAF7+40= github.com/urfave/cli v1.22.14 h1:ebbhrRiGK2i4naQJr+1Xj92HXZCrK7MsyTS/ob3HnAk= github.com/urfave/cli v1.22.14/go.mod h1:X0eDS6pD6Exaclxm99NJ3FiCDRED7vIHpx2mDOHLvkA= -github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho= -github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= +github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs= +github.com/urfave/cli/v2 v2.25.7/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= @@ -1685,9 +1641,10 @@ github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgk github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +github.com/xhit/go-str2duration v1.2.0/go.mod h1:3cPSlfZlUHVlneIVfePFWcJZsuwf+P1v2SRTV4cUmp4= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xlab/treeprint v1.1.0 h1:G/1DjNkPpfZCFt9CSh6b5/nY4VimlbHF3Rh4obvtzDk= -github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= +github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ= +github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= @@ -1719,17 +1676,16 @@ go.dedis.ch/kyber/v3 v3.1.0 h1:ghu+kiRgM5JyD9TJ0hTIxTLQlJBR/ehjWvWwYW3XsC0= go.dedis.ch/kyber/v3 v3.1.0/go.mod h1:kXy7p3STAurkADD+/aZcsznZGKVHEqbtmdIzvPfrs1U= go.dedis.ch/protobuf v1.0.5/go.mod h1:eIV4wicvi6JK0q/QnfIEGeSFNG0ZeB24kzut5+HaRLo= go.dedis.ch/protobuf v1.0.7/go.mod h1:pv5ysfkDX/EawiPqcW3ikOxsL5t+BqnV6xHSmE79KI4= -go.dedis.ch/protobuf v1.0.11 h1:FTYVIEzY/bfl37lu3pR4lIj+F9Vp1jE8oh91VmxKgLo= go.dedis.ch/protobuf v1.0.11/go.mod h1:97QR256dnkimeNdfmURz0wAMNVbd1VmLXhG1CrTYrJ4= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= -go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= -go.etcd.io/etcd/api/v3 v3.5.7 h1:sbcmosSVesNrWOJ58ZQFitHMdncusIifYcrBfwrlJSY= -go.etcd.io/etcd/api/v3 v3.5.7/go.mod h1:9qew1gCdDDLu+VwmeG+iFpL+QlpHTo7iubavdVDgCAA= -go.etcd.io/etcd/client/pkg/v3 v3.5.7 h1:y3kf5Gbp4e4q7egZdn5T7W9TSHUvkClN6u+Rq9mEOmg= -go.etcd.io/etcd/client/pkg/v3 v3.5.7/go.mod h1:o0Abi1MK86iad3YrWhgUsbGx1pmTS+hrORWc2CamuhY= -go.etcd.io/etcd/client/v3 v3.5.7 h1:u/OhpiuCgYY8awOHlhIhmGIGpxfBU/GZBUP3m/3/Iz4= -go.etcd.io/etcd/client/v3 v3.5.7/go.mod h1:sOWmj9DZUMyAngS7QQwCyAXXAL6WhgTOPLNS/NabQgw= +go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= +go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/etcd/api/v3 v3.5.10 h1:szRajuUUbLyppkhs9K6BRtjY37l66XQQmw7oZRANE4k= +go.etcd.io/etcd/api/v3 v3.5.10/go.mod h1:TidfmT4Uycad3NM/o25fG3J07odo4GBB9hoxaodFCtI= +go.etcd.io/etcd/client/pkg/v3 v3.5.10 h1:kfYIdQftBnbAq8pUWFXfpuuxFSKzlmM5cSn76JByiT0= +go.etcd.io/etcd/client/pkg/v3 v3.5.10/go.mod h1:DYivfIviIuQ8+/lCq4vcxuseg2P2XbHygkKwFo9fc8U= +go.etcd.io/etcd/client/v3 v3.5.10 h1:W9TXNZ+oB3MCd/8UjxHTWK5J9Nquw9fQBLJd5ne5/Ao= +go.etcd.io/etcd/client/v3 v3.5.10/go.mod h1:RVeBnDz2PUEZqTpgqwAtUd8nAPf5kjyFyND7P1VkOKc= go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= @@ -1749,35 +1705,32 @@ go.opentelemetry.io/collector/pdata v1.0.0-rcv0016 h1:qCPXSQCoD3qeWFb1RuIks8fw9A go.opentelemetry.io/collector/pdata v1.0.0-rcv0016/go.mod h1:OdN0alYOlYhHXu6BDlGehrZWgtBuiDsz/rlNeJeXiNg= 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.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.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= -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/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 h1:vS1Ao/R55RNV4O7TA2Qopok8yN+X0LIP6RVWLFkprck= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0/go.mod h1:BMsdeOxN04K0L5FNUBfjFdvwWGNe/rkmSwH4Aelu/X0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ= 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.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/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= 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.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= -go.starlark.net v0.0.0-20220817180228-f738f5508c12 h1:xOBJXWGEDwU5xSDxH6macxO11Us0AH2fTa9rmsbbF7g= -go.starlark.net v0.0.0-20220817180228-f738f5508c12/go.mod h1:VZcBMdr3cT3PnBoWunTabuSEXwVAH+ZJ5zxfs3AdASk= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= +go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= +go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= +go.starlark.net v0.0.0-20230525235612-a134d8f9ddca h1:VdD38733bfYv5tUZwEIskMM93VanwNIi5bIKnDrJdEY= +go.starlark.net v0.0.0-20230525235612-a134d8f9ddca/go.mod h1:jxU+3+j+71eXOW14274+SmmuW82qJzl6iZSeqEtTGds= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -1804,6 +1757,7 @@ go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.14.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= +go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= go4.org/netipx v0.0.0-20230125063823-8449b0a6169f h1:ketMxHg+vWm3yccyYiq+uK8D3fRmna2Fcj+awpQp84s= @@ -1843,8 +1797,8 @@ golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= -golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= -golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= +golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= +golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1855,8 +1809,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20240213143201-ec583247a57a h1:HinSgX1tJRX3KsL//Gxynpw5CTOAIPhgL4W8PNiIpVE= -golang.org/x/exp v0.0.0-20240213143201-ec583247a57a/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= +golang.org/x/exp v0.0.0-20240707233637-46b078467d37 h1:uLDX+AfeFCct3a2C7uIWBKMJIR3CJMhcgfrUAqjRK6w= +golang.org/x/exp v0.0.0-20240707233637-46b078467d37/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1884,13 +1838,12 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= -golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= +golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1901,7 +1854,6 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1936,22 +1888,21 @@ golang.org/x/net v0.0.0-20210331212208-0fccb6fa2b5c/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= -golang.org/x/net v0.0.0-20210423184538-5f58ad60dda6/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= +golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1961,10 +1912,10 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210413134643-5e61552d6c78/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= -golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= +golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= +golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1977,17 +1928,17 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190124100055-b90733256f2e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -2016,7 +1967,6 @@ golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2030,8 +1980,6 @@ golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2041,7 +1989,6 @@ golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2053,7 +2000,6 @@ golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2081,20 +2027,21 @@ golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= -golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= -golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= +golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= +golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2104,13 +2051,12 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -2188,8 +2134,8 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= -golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= +golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg= +golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -2197,10 +2143,8 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= -gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= -gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= +gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= +gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= gonum.org/v1/gonum v0.14.0 h1:2NiG67LD1tEH0D7kM+ps2V+fXmsAnpUeec7n8tcr4S0= gonum.org/v1/gonum v0.14.0/go.mod h1:AoWeoz0becf9QMWtE8iWXNXc27fK4fNeHNf/oMejGfU= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= @@ -2223,8 +2167,8 @@ google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz513 google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.149.0 h1:b2CqT6kG+zqJIVKRQ3ELJVLN1PwHZ6DJ3dW8yl82rgY= -google.golang.org/api v0.149.0/go.mod h1:Mwn1B7JTXrzXtnvmzQE2BD6bYZQ8DShKZDZbeN9I7qI= +google.golang.org/api v0.169.0 h1:QwWPy71FgMWqJN/l6jVlFHUa29a7dcUy02I8o799nPY= +google.golang.org/api v0.169.0/go.mod h1:gpNOiMA2tZ4mf5R9Iwf4rK/Dcz0fbdIgWYWVoxmsyLg= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -2233,8 +2177,6 @@ google.golang.org/appengine v1.6.2/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -2269,7 +2211,6 @@ google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEY google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -2280,13 +2221,12 @@ google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210401141331-865547bb08e2/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 h1:I6WNifs6pF9tNdSob2W24JtyxIYjzFB9qDlpUC76q+U= -google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405/go.mod h1:3WDQMjmJk36UQhjQ89emUzb1mdaHcPeeAh4SCBKznB4= -google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b h1:CIC2YMXmIhYw6evmhPxBKJ4fmLbOFtXQN/GV3XOZR8k= -google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:IBQ646DjkDkvUIsVq/cc03FUFQ9wbZu7yE396YcL870= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= +google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y= +google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s= +google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 h1:P8OJ/WCl/Xo4E4zoe4/bifHpSmmKwARqyqE4nW6J2GQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -2307,14 +2247,10 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -google.golang.org/grpc/examples v0.0.0-20210424002626-9572fd6faeae/go.mod h1:Ly7ZA/ARzg8fnPU9TyZIxoz33sEUuWX7txiqs8lPTgE= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -2327,10 +2263,10 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -2358,11 +2294,9 @@ gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= @@ -2385,26 +2319,26 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= -k8s.io/api v0.25.11 h1:4mjYDfE3yp22jrytjH0knwgzjXKkxHX4D01ZCAazvZM= -k8s.io/api v0.25.11/go.mod h1:bK4UvD4bthtutNlvensrfBX21PRQ/vs2cIYggHkOOAo= -k8s.io/apiextensions-apiserver v0.25.3 h1:bfI4KS31w2f9WM1KLGwnwuVlW3RSRPuIsfNF/3HzR0k= -k8s.io/apiextensions-apiserver v0.25.3/go.mod h1:ZJqwpCkxIx9itilmZek7JgfUAM0dnTsA48I4krPqRmo= +k8s.io/api v0.28.2 h1:9mpl5mOb6vXZvqbQmankOfPIGiudghwCoLl1EYfUZbw= +k8s.io/api v0.28.2/go.mod h1:RVnJBsjU8tcMq7C3iaRSGMeaKt2TWEUXcpIt/90fjEg= +k8s.io/apiextensions-apiserver v0.28.2 h1:J6/QRWIKV2/HwBhHRVITMLYoypCoPY1ftigDM0Kn+QU= +k8s.io/apiextensions-apiserver v0.28.2/go.mod h1:5tnkxLGa9nefefYzWuAlWZ7RZYuN/765Au8cWLA6SRg= k8s.io/apimachinery v0.28.2 h1:KCOJLrc6gu+wV1BYgwik4AF4vXOlVJPdiqn0yAWWwXQ= k8s.io/apimachinery v0.28.2/go.mod h1:RdzF87y/ngqk9H4z3EL2Rppv5jj95vGS/HaFXrLDApU= -k8s.io/cli-runtime v0.25.11 h1:GE2yNZm1tN+MJtw1SGMOLesLF7Kp7NVAVqRSTbXfu4o= -k8s.io/cli-runtime v0.25.11/go.mod h1:r/nEINuHVEpgGhcd2WamU7hD1t/lMnSz8XM44Autltc= -k8s.io/client-go v0.25.11 h1:DJQ141UsbNRI6wYSlcYLP5J5BW5Wq7Bgm42Ztq2SW70= -k8s.io/client-go v0.25.11/go.mod h1:41Xs7p1SfhoReUnmjjYCfCNWFiq4xSkexwJfbxF2F7A= -k8s.io/component-base v0.26.2 h1:IfWgCGUDzrD6wLLgXEstJKYZKAFS2kO+rBRi0p3LqcI= -k8s.io/component-base v0.26.2/go.mod h1:DxbuIe9M3IZPRxPIzhch2m1eT7uFrSBJUBuVCQEBivs= -k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= -k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20230303024457-afdc3dddf62d h1:VcFq5n7wCJB2FQMCIHfC+f+jNcGgNMar1uKd6rVlifU= -k8s.io/kube-openapi v0.0.0-20230303024457-afdc3dddf62d/go.mod h1:y5VtZWM9sHHc2ZodIH/6SHzXj+TPU5USoA8lcIeKEKY= -k8s.io/kubectl v0.25.11 h1:6bsft5Gan6BCvQ7cJbDRFjTm4Zfq8GuUYpsWAdVngYE= -k8s.io/kubectl v0.25.11/go.mod h1:8mIfgkFgT+yJ8/TlmPW1qoRh46H2si9q5nW8id7i9iM= -k8s.io/utils v0.0.0-20230711102312-30195339c3c7 h1:ZgnF1KZsYxWIifwSNZFZgNtWE89WI5yiP5WwlfDoIyc= -k8s.io/utils v0.0.0-20230711102312-30195339c3c7/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/cli-runtime v0.28.2 h1:64meB2fDj10/ThIMEJLO29a1oujSm0GQmKzh1RtA/uk= +k8s.io/cli-runtime v0.28.2/go.mod h1:bTpGOvpdsPtDKoyfG4EG041WIyFZLV9qq4rPlkyYfDA= +k8s.io/client-go v0.28.2 h1:DNoYI1vGq0slMBN/SWKMZMw0Rq+0EQW6/AK4v9+3VeY= +k8s.io/client-go v0.28.2/go.mod h1:sMkApowspLuc7omj1FOSUxSoqjr+d5Q0Yc0LOFnYFJY= +k8s.io/component-base v0.28.2 h1:Yc1yU+6AQSlpJZyvehm/NkJBII72rzlEsd6MkBQ+G0E= +k8s.io/component-base v0.28.2/go.mod h1:4IuQPQviQCg3du4si8GpMrhAIegxpsgPngPRR/zWpzc= +k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= +k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/kube-openapi v0.0.0-20240709000822-3c01b740850f h1:2sXuKesAYbRHxL3aE2PN6zX/gcJr22cjrsej+W784Tc= +k8s.io/kube-openapi v0.0.0-20240709000822-3c01b740850f/go.mod h1:UxDHUPsUwTOOxSU+oXURfFBcAS6JwiRXTYqYwfuGowc= +k8s.io/kubectl v0.28.2 h1:fOWOtU6S0smdNjG1PB9WFbqEIMlkzU5ahyHkc7ESHgM= +k8s.io/kubectl v0.28.2/go.mod h1:6EQWTPySF1fn7yKoQZHYf9TPwIl2AygHEcJoxFekr64= +k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 h1:jgGTlFYnhF1PM1Ax/lAlxUPE+KfCIXHaathvJg1C3ak= +k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g= nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= @@ -2416,15 +2350,15 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= -sigs.k8s.io/controller-runtime v0.13.0 h1:iqa5RNciy7ADWnIc8QxCbOX5FEKVR3uxVxKHRMc2WIQ= -sigs.k8s.io/controller-runtime v0.13.0/go.mod h1:Zbz+el8Yg31jubvAEyglRZGdLAjplZl+PgtYNI6WNTI= +sigs.k8s.io/controller-runtime v0.16.2 h1:mwXAVuEk3EQf478PQwQ48zGOXvW27UJc8NHktQVuIPU= +sigs.k8s.io/controller-runtime v0.16.2/go.mod h1:vpMu3LpI5sYWtujJOa2uPK61nB5rbwlN7BAB8aSLvGU= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/kustomize/api v0.12.1 h1:7YM7gW3kYBwtKvoY216ZzY+8hM+lV53LUayghNRJ0vM= -sigs.k8s.io/kustomize/api v0.12.1/go.mod h1:y3JUhimkZkR6sbLNwfJHxvo1TCLwuwm14sCYnkH6S1s= -sigs.k8s.io/kustomize/kyaml v0.13.9 h1:Qz53EAaFFANyNgyOEJbT/yoIHygK40/ZcvU3rgry2Tk= -sigs.k8s.io/kustomize/kyaml v0.13.9/go.mod h1:QsRbD0/KcU+wdk0/L0fIp2KLnohkVzs6fQ85/nOXac4= -sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= -sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 h1:XX3Ajgzov2RKUdc5jW3t5jwY7Bo7dcRm+tFxT+NfgY0= +sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3/go.mod h1:9n16EZKMhXBNSiUC5kSdFQJkdH3zbxS/JoO619G1VAY= +sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 h1:W6cLQc5pnqM7vh3b7HvGNfXrJ/xL6BDMS0v1V/HHg5U= +sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3/go.mod h1:JWP1Fj0VWGHyw3YUPjXSQnRnrwezrZSrApfX5S0nIag= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/integration-tests/load/ocr/README.md b/integration-tests/load/ocr/README.md index e63828a7d93..ad0df73218e 100644 --- a/integration-tests/load/ocr/README.md +++ b/integration-tests/load/ocr/README.md @@ -1,28 +1,31 @@ ### OCR Load tests -## Setup -These tests can connect to any cluster create with [chainlink-cluster](../../../charts/chainlink-cluster/README.md) - -Create your cluster, if you already have one just use `kubefwd` -``` -kubectl create ns cl-cluster -devspace use namespace cl-cluster -devspace deploy -sudo kubefwd svc -n cl-cluster +## Setup CRIB +CRIB CORE user documentation is available in [CORE CRIB - Deploy & Access Instructions](https://smartcontract-it.atlassian.net/wiki/spaces/TT/pages/597197209/CORE+CRIB+-+Deploy+Access+Instructions) +```shell +devspace deploy --debug --profile local-dev-simulated-core-ocr1 --skip-build ``` -Change environment connection configuration [here](../../../charts/chainlink-cluster/connect.toml) - -If you haven't changed anything in [devspace.yaml](../../crib/devspace.yaml) then default connection configuration will work - ## Usage +Create `overrides.toml` in this directory +```toml +[CRIB] +namespace = "$your_crib_namespace_here" +# only Geth is supported right now +network_name = "geth" +nodes = 5 + +[Logging.Loki] +tenant_id="promtail" +endpoint="..." +basic_auth_secret="..." ``` -export LOKI_TOKEN=... -export LOKI_URL=... +Run the tests +Set `K8S_STAGING_INGRESS_SUFFIX` when run locally (`export K8S_STAGING_INGRESS_SUFFIX=$(op read op://CRIB/secrets/K8S_STAGING_INGRESS_SUFFIX)`) + +``` go test -v -run TestOCRLoad go test -v -run TestOCRVolume -``` - -Check test configuration [here](config.toml) \ No newline at end of file +``` \ No newline at end of file diff --git a/integration-tests/load/ocr/ocr_test.go b/integration-tests/load/ocr/ocr_test.go index 15f52acbffa..8d4638f9771 100644 --- a/integration-tests/load/ocr/ocr_test.go +++ b/integration-tests/load/ocr/ocr_test.go @@ -3,15 +3,13 @@ package ocr import ( "testing" - seth_utils "github.com/smartcontractkit/chainlink-testing-framework/utils/seth" - "github.com/stretchr/testify/require" "github.com/smartcontractkit/wasp" "github.com/smartcontractkit/chainlink-testing-framework/logging" - "github.com/smartcontractkit/chainlink/integration-tests/k8s" + "github.com/smartcontractkit/chainlink/integration-tests/crib" tc "github.com/smartcontractkit/chainlink/integration-tests/testconfig" ) @@ -25,18 +23,15 @@ var ( func TestOCRLoad(t *testing.T) { l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Load", tc.OCR) + config, err := tc.GetConfig([]string{"Load"}, tc.OCR) require.NoError(t, err) - evmNetwork, msClient, bootstrapNode, workerNodes, err := k8s.ConnectRemote() + sethClient, msClient, bootstrapNode, workerNodes, err := crib.ConnectRemote(true) require.NoError(t, err) - seth, err := seth_utils.GetChainClient(config, *evmNetwork) - require.NoError(t, err, "Error creating seth client") - - lta, err := SetupCluster(l, seth, workerNodes) + lta, err := SetupCluster(l, sethClient, workerNodes) require.NoError(t, err) - ocrInstances, err := SetupFeed(l, seth, lta, msClient, bootstrapNode, workerNodes) + ocrInstances, err := SetupFeed(l, sethClient, lta, msClient, bootstrapNode, workerNodes) require.NoError(t, err) cfg := config.OCR @@ -51,7 +46,7 @@ func TestOCRLoad(t *testing.T) { CallTimeout: cfg.Load.VerificationTimeout.Duration, RateLimitUnitDuration: cfg.Load.RateLimitUnitDuration.Duration, Schedule: wasp.Plain(*cfg.Load.Rate, cfg.Load.TestDuration.Duration), - Gun: NewGun(l, seth, ocrInstances), + Gun: NewGun(l, sethClient, ocrInstances), Labels: CommonTestLabels, LokiConfig: wasp.NewLokiConfig(cfgl.Endpoint, cfgl.TenantId, cfgl.BasicAuth, cfgl.BearerToken), })) @@ -61,16 +56,13 @@ func TestOCRLoad(t *testing.T) { func TestOCRVolume(t *testing.T) { l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Volume", tc.OCR) + config, err := tc.GetConfig([]string{"Volume"}, tc.OCR) require.NoError(t, err) - evmNetwork, msClient, bootstrapNode, workerNodes, err := k8s.ConnectRemote() + sethClient, msClient, bootstrapNode, workerNodes, err := crib.ConnectRemote(true) require.NoError(t, err) - seth, err := seth_utils.GetChainClient(config, *evmNetwork) - require.NoError(t, err, "Error creating seth client") - - lta, err := SetupCluster(l, seth, workerNodes) + lta, err := SetupCluster(l, sethClient, workerNodes) require.NoError(t, err) cfg := config.OCR @@ -83,7 +75,7 @@ func TestOCRVolume(t *testing.T) { LoadType: wasp.VU, CallTimeout: cfg.Volume.VerificationTimeout.Duration, Schedule: wasp.Plain(*cfg.Volume.Rate, cfg.Volume.TestDuration.Duration), - VU: NewVU(l, seth, *cfg.Volume.VURequestsPerUnit, cfg.Volume.RateLimitUnitDuration.Duration, lta, bootstrapNode, workerNodes, msClient), + VU: NewVU(l, sethClient, *cfg.Volume.VURequestsPerUnit, cfg.Volume.RateLimitUnitDuration.Duration, lta, bootstrapNode, workerNodes, msClient), Labels: CommonTestLabels, LokiConfig: wasp.NewLokiConfig(cfgl.Endpoint, cfgl.TenantId, cfgl.BasicAuth, cfgl.BearerToken), })) diff --git a/integration-tests/load/vrfv2/vrfv2_test.go b/integration-tests/load/vrfv2/vrfv2_test.go index 5f7e184a488..0075300c7d3 100644 --- a/integration-tests/load/vrfv2/vrfv2_test.go +++ b/integration-tests/load/vrfv2/vrfv2_test.go @@ -46,7 +46,7 @@ func TestVRFV2Performance(t *testing.T) { l := logging.GetTestLogger(t) testType, err := tc.GetConfigurationNameFromEnv() require.NoError(t, err) - testConfig, err := tc.GetConfig(testType, tc.VRFv2) + testConfig, err := tc.GetChainAndTestTypeSpecificConfig(testType, tc.VRFv2) require.NoError(t, err) cfgl := testConfig.Logging.Loki @@ -188,7 +188,7 @@ func TestVRFV2BHSPerformance(t *testing.T) { testType, err := tc.GetConfigurationNameFromEnv() require.NoError(t, err) - testConfig, err := tc.GetConfig(testType, tc.VRFv2) + testConfig, err := tc.GetChainAndTestTypeSpecificConfig(testType, tc.VRFv2) require.NoError(t, err) vrfv2Config := testConfig.VRFv2 testReporter := &testreporters.VRFV2TestReporter{} @@ -309,11 +309,12 @@ func TestVRFV2BHSPerformance(t *testing.T) { latestBlockNumber, err := sethClient.Client.BlockNumber(testcontext.Get(t)) require.NoError(t, err) _, err = actions.WaitForBlockNumberToBe( + testcontext.Get(t), latestBlockNumber+uint64(257), sethClient, &wgBlockNumberTobe, + nil, configCopy.VRFv2.General.WaitFor256BlocksTimeout.Duration, - t, l, ) wgBlockNumberTobe.Wait() diff --git a/integration-tests/load/vrfv2plus/gun.go b/integration-tests/load/vrfv2plus/gun.go index 79f477294bb..430e9f5ff12 100644 --- a/integration-tests/load/vrfv2plus/gun.go +++ b/integration-tests/load/vrfv2plus/gun.go @@ -1,7 +1,6 @@ package loadvrfv2plus import ( - "fmt" "math/big" "math/rand" @@ -10,6 +9,7 @@ import ( "github.com/smartcontractkit/wasp" seth_utils "github.com/smartcontractkit/chainlink-testing-framework/utils/seth" + "github.com/smartcontractkit/chainlink/integration-tests/actions" vrfcommon "github.com/smartcontractkit/chainlink/integration-tests/actions/vrf/common" "github.com/smartcontractkit/chainlink/integration-tests/actions/vrf/vrfv2plus" @@ -46,7 +46,7 @@ func NewBHSTestGun( // Call implements example gun call, assertions on response bodies should be done here func (m *BHSTestGun) Call(_ *wasp.Generator) *wasp.Response { vrfv2PlusConfig := m.testConfig.General - billingType, err := selectBillingType(*vrfv2PlusConfig.SubscriptionBillingType) + billingType, err := vrfv2plus.SelectBillingTypeWithDistribution(*vrfv2PlusConfig.SubscriptionBillingType, actions.RandBool) if err != nil { return &wasp.Response{Error: err.Error(), Failed: true} } @@ -101,7 +101,7 @@ func NewSingleHashGun( func (m *SingleHashGun) Call(_ *wasp.Generator) *wasp.Response { //todo - should work with multiple consumers and consumers having different keyhashes and wallets vrfv2PlusConfig := m.testConfig.General - billingType, err := selectBillingType(*vrfv2PlusConfig.SubscriptionBillingType) + billingType, err := vrfv2plus.SelectBillingTypeWithDistribution(*vrfv2PlusConfig.SubscriptionBillingType, actions.RandBool) if err != nil { return &wasp.Response{Error: err.Error(), Failed: true} } @@ -128,7 +128,7 @@ func (m *SingleHashGun) Call(_ *wasp.Generator) *wasp.Response { } func deviateValue(requestCountPerTX uint16, deviation uint16) uint16 { - if randBool() && requestCountPerTX > deviation { + if actions.RandBool() && requestCountPerTX > deviation { requestCountPerTX -= uint16(randInRange(0, int(deviation))) } else { requestCountPerTX += uint16(randInRange(0, int(deviation))) @@ -136,22 +136,6 @@ func deviateValue(requestCountPerTX uint16, deviation uint16) uint16 { return requestCountPerTX } -func randBool() bool { - return rand.Intn(2) == 1 -} func randInRange(min int, max int) int { return rand.Intn(max-min+1) + min } - -func selectBillingType(billingType string) (bool, error) { - switch vrfv2plus_config.BillingType(billingType) { - case vrfv2plus_config.BillingType_Link: - return false, nil - case vrfv2plus_config.BillingType_Native: - return true, nil - case vrfv2plus_config.BillingType_Link_and_Native: - return randBool(), nil - default: - return false, fmt.Errorf("invalid billing type: %s", billingType) - } -} diff --git a/integration-tests/load/vrfv2plus/vrfv2plus_test.go b/integration-tests/load/vrfv2plus/vrfv2plus_test.go index 3ff9a12996e..e8e1d7779c1 100644 --- a/integration-tests/load/vrfv2plus/vrfv2plus_test.go +++ b/integration-tests/load/vrfv2plus/vrfv2plus_test.go @@ -45,7 +45,7 @@ func TestVRFV2PlusPerformance(t *testing.T) { l := logging.GetTestLogger(t) testType, err := tc.GetConfigurationNameFromEnv() require.NoError(t, err) - testConfig, err := tc.GetConfig(testType, tc.VRFv2Plus) + testConfig, err := tc.GetChainAndTestTypeSpecificConfig(testType, tc.VRFv2Plus) require.NoError(t, err) cfgl := testConfig.Logging.Loki @@ -188,7 +188,7 @@ func TestVRFV2PlusBHSPerformance(t *testing.T) { testType, err := tc.GetConfigurationNameFromEnv() require.NoError(t, err) - testConfig, err := tc.GetConfig(testType, tc.VRFv2Plus) + testConfig, err := tc.GetChainAndTestTypeSpecificConfig(testType, tc.VRFv2Plus) require.NoError(t, err) vrfv2PlusConfig := testConfig.VRFv2Plus testReporter := &testreporters.VRFV2PlusTestReporter{} @@ -311,11 +311,12 @@ func TestVRFV2PlusBHSPerformance(t *testing.T) { latestBlockNumber, err := sethClient.Client.BlockNumber(testcontext.Get(t)) require.NoError(t, err, "error getting latest block number") _, err = actions.WaitForBlockNumberToBe( + testcontext.Get(t), latestBlockNumber+uint64(257), sethClient, &wgBlockNumberTobe, + nil, configCopy.VRFv2Plus.General.WaitFor256BlocksTimeout.Duration, - t, l, ) wgBlockNumberTobe.Wait() @@ -334,13 +335,15 @@ func TestVRFV2PlusBHSPerformance(t *testing.T) { Float64("SubscriptionRefundingAmountNative", *configCopy.VRFv2Plus.General.SubscriptionRefundingAmountNative). Float64("SubscriptionRefundingAmountLink", *configCopy.VRFv2Plus.General.SubscriptionRefundingAmountLink). Strs("SubIDs", subIDsString). - Msg("Funding Subscriptions with Link and Native Tokens") + Str("Funding type", *configCopy.VRFv2Plus.General.SubscriptionBillingType). + Msg("Funding Subscriptions with Link and/or Native Tokens") err = vrfv2plus.FundSubscriptions( big.NewFloat(*configCopy.VRFv2Plus.General.SubscriptionRefundingAmountNative), big.NewFloat(*configCopy.VRFv2Plus.General.SubscriptionRefundingAmountLink), vrfContracts.LinkToken, vrfContracts.CoordinatorV2Plus, underfundedSubIDs, + *configCopy.VRFv2Plus.General.SubscriptionBillingType, ) require.NoError(t, err, "error funding subscriptions") diff --git a/integration-tests/load/zcluster/cluster_entrypoint_test.go b/integration-tests/load/zcluster/cluster_entrypoint_test.go index 35b3ee422ca..aace97b0825 100644 --- a/integration-tests/load/zcluster/cluster_entrypoint_test.go +++ b/integration-tests/load/zcluster/cluster_entrypoint_test.go @@ -10,7 +10,7 @@ import ( ) func TestClusterEntrypoint(t *testing.T) { - config, err := tc.GetConfig("Load", tc.OCR) + config, err := tc.GetConfig([]string{"Load"}, tc.OCR) require.NoError(t, err) cfgBase64, err := config.AsBase64() require.NoError(t, err) diff --git a/integration-tests/migration/upgrade_version_test.go b/integration-tests/migration/upgrade_version_test.go index 4c7b275e299..a17f00e179f 100644 --- a/integration-tests/migration/upgrade_version_test.go +++ b/integration-tests/migration/upgrade_version_test.go @@ -17,7 +17,7 @@ func TestVersionUpgrade(t *testing.T) { l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Migration", tc.Node) + config, err := tc.GetConfig([]string{"Migration"}, tc.Node) require.NoError(t, err, "Error getting config") err = config.ChainlinkUpgradeImage.Validate() diff --git a/integration-tests/reorg/automation_reorg_test.go b/integration-tests/reorg/automation_reorg_test.go index e41244e55e1..383c8d5c95b 100644 --- a/integration-tests/reorg/automation_reorg_test.go +++ b/integration-tests/reorg/automation_reorg_test.go @@ -4,6 +4,10 @@ package reorg import ( "fmt" "math/big" + "regexp" + "strconv" + "strings" + "sync" "testing" "time" @@ -30,37 +34,15 @@ import ( ) var ( - baseTOML = ` -[Feature] -LogPoller = true - -[OCR2] -Enabled = true - -[P2P] -[P2P.V2] -AnnounceAddresses = ["0.0.0.0:6690"] -ListenAddresses = ["0.0.0.0:6690"] - ` - finalityDepth = 20 - historyDepth = 30 - reorgBlockCount = 10 // Number of blocks to reorg (less than finalityDepth) - networkTOML = fmt.Sprintf(` -Enabled = true -FinalityDepth = %d - -[EVM.HeadTracker] -HistoryDepth = %d - -[EVM.GasEstimator] -Mode = 'FixedPrice' -LimitDefault = 5_000_000 - `, finalityDepth, historyDepth) - upkeepCount = 2 - nodeCount = 6 - nodeFundsAmount = new(big.Float).SetFloat64(2) // Each node will have 2 ETH - defaultUpkeepGasLimit = uint32(2500000) - defaultLinkFunds = int64(9e18) + reorgBlockCount = 10 // Number of blocks to reorg (should be less than finalityDepth) + upkeepCount = 2 + nodeCount = 6 + nodeFundsAmount = new(big.Float).SetFloat64(2) // Each node will have 2 ETH + defaultUpkeepGasLimit = uint32(2500000) + defaultLinkFunds = int64(9e18) + finalityDepth int + historyDepth int + defaultAutomationSettings = map[string]interface{}{ "toml": "", "db": map[string]interface{}{ @@ -78,6 +60,7 @@ LimitDefault = 5_000_000 }, }, } + mutex sync.Mutex defaultOCRRegistryConfig = contracts.KeeperRegistrySettings{ PaymentPremiumPPB: uint32(200000000), FlatFeeMicroLINK: uint32(0), @@ -104,6 +87,30 @@ LimitDefault = 5_000_000 * Upkeeps are expected to be performed during the reorg. */ func TestAutomationReorg(t *testing.T) { + c, err := tc.GetConfig([]string{"Reorg"}, tc.Automation) + require.NoError(t, err, "Error getting config") + + findIntValue := func(text string, substring string) (int, error) { + re := regexp.MustCompile(fmt.Sprintf(`%s\s*=\s*(\d+)`, substring)) + + match := re.FindStringSubmatch(text) + if len(match) > 1 { + asInt, err := strconv.Atoi(match[1]) + if err != nil { + return 0, err + } + return asInt, nil + } + + return 0, fmt.Errorf("no match found for %s", substring) + } + + finalityDepth, err = findIntValue(c.NodeConfig.CommonChainConfigTOML, "FinalityDepth") + require.NoError(t, err, "Error getting finality depth") + + historyDepth, err = findIntValue(c.NodeConfig.CommonChainConfigTOML, "HistoryDepth") + require.NoError(t, err, "Error getting history depth") + require.Less(t, reorgBlockCount, finalityDepth, "Reorg block count should be less than finality depth") t.Parallel() @@ -115,6 +122,8 @@ func TestAutomationReorg(t *testing.T) { "registry_2_1_logtrigger": ethereum.RegistryVersion_2_1, "registry_2_2_conditional": ethereum.RegistryVersion_2_2, // Works only on Chainlink Node v2.10.0 or greater "registry_2_2_logtrigger": ethereum.RegistryVersion_2_2, // Works only on Chainlink Node v2.10.0 or greater + "registry_2_3_conditional": ethereum.RegistryVersion_2_3, + "registry_2_3_logtrigger": ethereum.RegistryVersion_2_3, } for n, rv := range registryVersions { @@ -122,15 +131,20 @@ func TestAutomationReorg(t *testing.T) { registryVersion := rv t.Run(name, func(t *testing.T) { t.Parallel() - config, err := tc.GetConfig("Reorg", tc.Automation) + config, err := tc.GetConfig([]string{"Reorg"}, tc.Automation) if err != nil { t.Fatal(err) } network := networks.MustGetSelectedNetworkConfig(config.Network)[0] + tomlConfig, err := actions.BuildTOMLNodeConfigForK8s(&config, network) + require.NoError(t, err, "Error building TOML config") + + mutex.Lock() defaultAutomationSettings["replicas"] = nodeCount - defaultAutomationSettings["toml"] = networks.AddNetworkDetailedConfig(baseTOML, config.Pyroscope, networkTOML, network) + defaultAutomationSettings["toml"] = tomlConfig + mutex.Unlock() var overrideFn = func(_ interface{}, target interface{}) { ctf_config.MustConfigOverrideChainlinkVersion(config.GetChainlinkImageConfig(), target) @@ -185,12 +199,22 @@ func TestAutomationReorg(t *testing.T) { linkToken, err := contracts.DeployLinkTokenContract(l, chainClient) require.NoError(t, err, "Error deploying LINK token") + wethToken, err := contracts.DeployWETHTokenContract(l, chainClient) + require.NoError(t, err, "Error deploying weth token contract") + + // This feed is used for both eth/usd and link/usd + ethUSDFeed, err := contracts.DeployMockETHUSDFeed(chainClient, defaultOCRRegistryConfig.FallbackLinkPrice) + require.NoError(t, err, "Error deploying eth usd feed contract") + + defaultOCRRegistryConfig.RegistryVersion = registryVersion registry, registrar := actions.DeployAutoOCRRegistryAndRegistrar( t, chainClient, registryVersion, defaultOCRRegistryConfig, linkToken, + wethToken, + ethUSDFeed, ) // Fund the registry with LINK @@ -199,18 +223,18 @@ func TestAutomationReorg(t *testing.T) { actions.CreateOCRKeeperJobs(t, chainlinkNodes, registry.Address(), network.ChainID, 0, registryVersion) nodesWithoutBootstrap := chainlinkNodes[1:] - defaultOCRRegistryConfig.RegistryVersion = registryVersion - ocrConfig, err := actions.BuildAutoOCR2ConfigVars(t, nodesWithoutBootstrap, defaultOCRRegistryConfig, registrar.Address(), 5*time.Second, registry.ChainModuleAddress(), registry.ReorgProtectionEnabled()) + + ocrConfig, err := actions.BuildAutoOCR2ConfigVars(t, nodesWithoutBootstrap, defaultOCRRegistryConfig, registrar.Address(), 5*time.Second, registry.ChainModuleAddress(), registry.ReorgProtectionEnabled(), linkToken, wethToken, ethUSDFeed) require.NoError(t, err, "OCR2 config should be built successfully") 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, err, "Registry config should be set successfully") // Use the name to determine if this is a log trigger or not - isLogTrigger := name == "registry_2_1_logtrigger" || name == "registry_2_2_logtrigger" + isLogTrigger := strings.Contains(name, "logtrigger") consumers, upkeepIDs := actions.DeployConsumers( t, chainClient, @@ -222,6 +246,8 @@ func TestAutomationReorg(t *testing.T) { defaultUpkeepGasLimit, isLogTrigger, false, + false, + wethToken, ) if isLogTrigger { diff --git a/integration-tests/smoke/automation_test.go b/integration-tests/smoke/automation_test.go index 50b5fb96230..62462d641a8 100644 --- a/integration-tests/smoke/automation_test.go +++ b/integration-tests/smoke/automation_test.go @@ -8,6 +8,7 @@ import ( "net/http" "os" "strconv" + "strings" "testing" "time" @@ -98,18 +99,25 @@ func TestAutomationBasic(t *testing.T) { func SetupAutomationBasic(t *testing.T, nodeUpgrade bool) { t.Parallel() + // native, mercury_v02, mercury_v03 and logtrigger are reserved keywords, use them with caution registryVersions := map[string]ethereum.KeeperRegistryVersion{ - "registry_2_0": ethereum.RegistryVersion_2_0, - "registry_2_1_conditional": ethereum.RegistryVersion_2_1, - "registry_2_1_logtrigger": ethereum.RegistryVersion_2_1, - "registry_2_1_with_mercury_v02": ethereum.RegistryVersion_2_1, - "registry_2_1_with_mercury_v03": ethereum.RegistryVersion_2_1, - "registry_2_1_with_logtrigger_and_mercury_v02": ethereum.RegistryVersion_2_1, - "registry_2_2_conditional": ethereum.RegistryVersion_2_2, - "registry_2_2_logtrigger": ethereum.RegistryVersion_2_2, - "registry_2_2_with_mercury_v02": ethereum.RegistryVersion_2_2, - "registry_2_2_with_mercury_v03": ethereum.RegistryVersion_2_2, - "registry_2_2_with_logtrigger_and_mercury_v02": ethereum.RegistryVersion_2_2, + "registry_2_0": ethereum.RegistryVersion_2_0, + "registry_2_1_conditional": ethereum.RegistryVersion_2_1, + "registry_2_1_logtrigger": ethereum.RegistryVersion_2_1, + "registry_2_1_with_mercury_v02": ethereum.RegistryVersion_2_1, + "registry_2_1_with_mercury_v03": ethereum.RegistryVersion_2_1, + "registry_2_1_with_logtrigger_and_mercury_v02": ethereum.RegistryVersion_2_1, + "registry_2_2_conditional": ethereum.RegistryVersion_2_2, + "registry_2_2_logtrigger": ethereum.RegistryVersion_2_2, + "registry_2_2_with_mercury_v02": ethereum.RegistryVersion_2_2, + "registry_2_2_with_mercury_v03": ethereum.RegistryVersion_2_2, + "registry_2_2_with_logtrigger_and_mercury_v02": ethereum.RegistryVersion_2_2, + "registry_2_3_conditional_native": ethereum.RegistryVersion_2_3, + "registry_2_3_conditional_link": ethereum.RegistryVersion_2_3, + "registry_2_3_logtrigger_native": ethereum.RegistryVersion_2_3, + "registry_2_3_logtrigger_link": ethereum.RegistryVersion_2_3, + "registry_2_3_with_mercury_v03_link": ethereum.RegistryVersion_2_3, + "registry_2_3_with_logtrigger_and_mercury_v02_link": ethereum.RegistryVersion_2_3, } for n, rv := range registryVersions { @@ -119,7 +127,7 @@ func SetupAutomationBasic(t *testing.T, nodeUpgrade bool) { t.Parallel() l := logging.GetTestLogger(t) - cfg, err := tc.GetConfig("Smoke", tc.Automation) + cfg, err := tc.GetConfig([]string{"Smoke"}, tc.Automation) require.NoError(t, err, "Failed to get config") if nodeUpgrade { @@ -128,10 +136,11 @@ func SetupAutomationBasic(t *testing.T, nodeUpgrade bool) { } } - // Use the name to determine if this is a log trigger or mercury - isLogTrigger := name == "registry_2_1_logtrigger" || name == "registry_2_1_with_logtrigger_and_mercury_v02" || name == "registry_2_2_logtrigger" || name == "registry_2_2_with_logtrigger_and_mercury_v02" - isMercuryV02 := name == "registry_2_1_with_mercury_v02" || name == "registry_2_1_with_logtrigger_and_mercury_v02" || name == "registry_2_2_with_mercury_v02" || name == "registry_2_2_with_logtrigger_and_mercury_v02" - isMercuryV03 := name == "registry_2_1_with_mercury_v03" || name == "registry_2_2_with_mercury_v03" + // Use the name to determine if this is a log trigger or mercury or billing token is native + isBillingTokenNative := strings.Contains(name, "native") + isLogTrigger := strings.Contains(name, "logtrigger") + isMercuryV02 := strings.Contains(name, "mercury_v02") + isMercuryV03 := strings.Contains(name, "mercury_v03") isMercury := isMercuryV02 || isMercuryV03 a := setupAutomationTestDocker( @@ -152,6 +161,8 @@ func SetupAutomationBasic(t *testing.T, nodeUpgrade bool) { automationDefaultUpkeepGasLimit, isLogTrigger, isMercury, + isBillingTokenNative, + a.WETHToken, ) // Do it in two separate loops, so we don't end up setting up one upkeep, but starting the consumer for another one @@ -188,8 +199,6 @@ func SetupAutomationBasic(t *testing.T, nodeUpgrade bool) { actions.GetStalenessReportCleanupFn(t, a.Logger, a.ChainClient, sb, a.Registry, registryVersion)() }) - // TODO Tune this timeout window after stress testing - l.Info().Msg("Waiting 10m for all upkeeps to perform at least 1 upkeep") gom.Eventually(func(g gomega.Gomega) { // Check if the upkeeps are performing multiple times by analyzing their counters for i := 0; i < len(upkeepIDs); i++ { @@ -270,7 +279,7 @@ func TestSetUpkeepTriggerConfig(t *testing.T) { registryVersion := rv t.Run(name, func(t *testing.T) { t.Parallel() - config, err := tc.GetConfig("Smoke", tc.Automation) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Automation) require.NoError(t, err, "Failed to get config") a := setupAutomationTestDocker( @@ -291,6 +300,8 @@ func TestSetUpkeepTriggerConfig(t *testing.T) { automationDefaultUpkeepGasLimit, true, false, + false, + nil, ) // Start log trigger based upkeeps for all consumers @@ -452,7 +463,7 @@ func TestAutomationAddFunds(t *testing.T) { t.Run(name, func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Automation) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Automation) require.NoError(t, err, "Failed to get config") a := setupAutomationTestDocker( t, registryVersion, automationDefaultRegistryConfig(config), false, false, &config, @@ -472,6 +483,8 @@ func TestAutomationAddFunds(t *testing.T) { automationDefaultUpkeepGasLimit, false, false, + false, + nil, ) t.Cleanup(func() { @@ -529,7 +542,7 @@ func TestAutomationPauseUnPause(t *testing.T) { t.Run(name, func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Automation) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Automation) require.NoError(t, err, "Failed to get config") a := setupAutomationTestDocker( @@ -550,6 +563,8 @@ func TestAutomationPauseUnPause(t *testing.T) { automationDefaultUpkeepGasLimit, false, false, + false, + nil, ) t.Cleanup(func() { @@ -628,7 +643,7 @@ func TestAutomationRegisterUpkeep(t *testing.T) { t.Run(name, func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Automation) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Automation) require.NoError(t, err, "Failed to get config") a := setupAutomationTestDocker( @@ -649,6 +664,8 @@ func TestAutomationRegisterUpkeep(t *testing.T) { automationDefaultUpkeepGasLimit, false, false, + false, + nil, ) t.Cleanup(func() { @@ -722,7 +739,7 @@ func TestAutomationPauseRegistry(t *testing.T) { t.Run(name, func(t *testing.T) { t.Parallel() - config, err := tc.GetConfig("Smoke", tc.Automation) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Automation) require.NoError(t, err, "Failed to get config") a := setupAutomationTestDocker( @@ -743,6 +760,8 @@ func TestAutomationPauseRegistry(t *testing.T) { automationDefaultUpkeepGasLimit, false, false, + false, + nil, ) t.Cleanup(func() { @@ -800,7 +819,7 @@ func TestAutomationKeeperNodesDown(t *testing.T) { t.Run(name, func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Automation) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Automation) require.NoError(t, err, "Failed to get config") a := setupAutomationTestDocker( @@ -821,6 +840,8 @@ func TestAutomationKeeperNodesDown(t *testing.T) { automationDefaultUpkeepGasLimit, false, false, + false, + nil, ) t.Cleanup(func() { @@ -906,7 +927,7 @@ func TestAutomationPerformSimulation(t *testing.T) { registryVersion := rv t.Run(name, func(t *testing.T) { t.Parallel() - config, err := tc.GetConfig("Smoke", tc.Automation) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Automation) require.NoError(t, err, "Failed to get config") a := setupAutomationTestDocker( @@ -978,7 +999,7 @@ func TestAutomationCheckPerformGasLimit(t *testing.T) { t.Run(name, func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Automation) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Automation) require.NoError(t, err, "Failed to get config") a := setupAutomationTestDocker( t, registryVersion, automationDefaultRegistryConfig(config), false, false, &config, @@ -1132,7 +1153,7 @@ func TestUpdateCheckData(t *testing.T) { t.Run(name, func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Automation) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Automation) require.NoError(t, err, "Failed to get config") a := setupAutomationTestDocker( @@ -1212,7 +1233,7 @@ func TestSetOffchainConfigWithMaxGasPrice(t *testing.T) { t.Run(name, func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Automation) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Automation) if err != nil { t.Fatal(err) } @@ -1234,6 +1255,8 @@ func TestSetOffchainConfigWithMaxGasPrice(t *testing.T) { automationDefaultUpkeepGasLimit, false, false, + false, + nil, ) t.Cleanup(func() { diff --git a/integration-tests/smoke/automation_test.go_test_list.json b/integration-tests/smoke/automation_test.go_test_list.json index e8f0f838dfd..1b8477ca289 100644 --- a/integration-tests/smoke/automation_test.go_test_list.json +++ b/integration-tests/smoke/automation_test.go_test_list.json @@ -35,6 +35,30 @@ {"name":"registry_2_2_with_logtrigger_and_mercury_v02"} ] }, + { + "name": "TestAutomationBasic", + "nodes": 2, + "run":[ + {"name":"registry_2_3_conditional_native"}, + {"name":"registry_2_3_conditional_link"} + ] + }, + { + "name": "TestAutomationBasic", + "nodes": 2, + "run":[ + {"name":"registry_2_3_logtrigger_native"}, + {"name":"registry_2_3_logtrigger_link"} + ] + }, + { + "name": "TestAutomationBasic", + "nodes": 2, + "run":[ + {"name":"registry_2_3_with_mercury_v03_link"}, + {"name":"registry_2_3_with_logtrigger_and_mercury_v02_link"} + ] + }, { "name": "TestSetUpkeepTriggerConfig", "nodes": 2 diff --git a/integration-tests/smoke/cron_test.go b/integration-tests/smoke/cron_test.go index 6f864b2e49f..98c1fe0caf7 100644 --- a/integration-tests/smoke/cron_test.go +++ b/integration-tests/smoke/cron_test.go @@ -21,7 +21,7 @@ func TestCronBasic(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Cron) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Cron) if err != nil { t.Fatal(err) } @@ -76,7 +76,7 @@ func TestCronJobReplacement(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Cron) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Cron) if err != nil { t.Fatal(err) } diff --git a/integration-tests/smoke/flux_test.go b/integration-tests/smoke/flux_test.go index 05b75da2237..d8773690b23 100644 --- a/integration-tests/smoke/flux_test.go +++ b/integration-tests/smoke/flux_test.go @@ -27,7 +27,7 @@ func TestFluxBasic(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Flux) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Flux) require.NoError(t, err, "Error getting config") privateNetwork, err := actions.EthereumNetworkConfigFromConfig(l, &config) diff --git a/integration-tests/smoke/forwarder_ocr_test.go b/integration-tests/smoke/forwarder_ocr_test.go index 0377553191b..a249775dc6a 100644 --- a/integration-tests/smoke/forwarder_ocr_test.go +++ b/integration-tests/smoke/forwarder_ocr_test.go @@ -24,7 +24,7 @@ func TestForwarderOCRBasic(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.ForwarderOcr) + config, err := tc.GetConfig([]string{"Smoke"}, tc.ForwarderOcr) require.NoError(t, err, "Error getting config") privateNetwork, err := actions.EthereumNetworkConfigFromConfig(l, &config) diff --git a/integration-tests/smoke/forwarders_ocr2_test.go b/integration-tests/smoke/forwarders_ocr2_test.go index 3970a0b43b1..863b36e4ede 100644 --- a/integration-tests/smoke/forwarders_ocr2_test.go +++ b/integration-tests/smoke/forwarders_ocr2_test.go @@ -25,7 +25,7 @@ func TestForwarderOCR2Basic(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.ForwarderOcr2) + config, err := tc.GetConfig([]string{"Smoke"}, tc.ForwarderOcr2) require.NoError(t, err, "Error getting config") privateNetwork, err := actions.EthereumNetworkConfigFromConfig(l, &config) diff --git a/integration-tests/smoke/keeper_test.go b/integration-tests/smoke/keeper_test.go index 21e1aa6e08f..4ff1c90bd1e 100644 --- a/integration-tests/smoke/keeper_test.go +++ b/integration-tests/smoke/keeper_test.go @@ -89,7 +89,7 @@ func TestKeeperBasicSmoke(t *testing.T) { t.Run(fmt.Sprintf("registry_1_%d", registryVersion), func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Keeper) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Keeper) require.NoError(t, err, "Failed to get config") chainClient, chainlinkNodes, linkToken, _ := setupKeeperTest(l, t, &config) @@ -170,7 +170,7 @@ func TestKeeperBlockCountPerTurn(t *testing.T) { t.Run(fmt.Sprintf("registry_1_%d", registryVersion), func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Keeper) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Keeper) require.NoError(t, err, "Failed to get config") chainClient, chainlinkNodes, linkToken, _ := setupKeeperTest(l, t, &config) @@ -314,7 +314,7 @@ func TestKeeperSimulation(t *testing.T) { t.Run(fmt.Sprintf("registry_1_%d", registryVersion), func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Keeper) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Keeper) require.NoError(t, err, "Failed to get config") chainClient, chainlinkNodes, linkToken, _ := setupKeeperTest(l, t, &config) @@ -393,7 +393,7 @@ func TestKeeperCheckPerformGasLimit(t *testing.T) { t.Run(fmt.Sprintf("registry_1_%d", registryVersion), func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Keeper) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Keeper) require.NoError(t, err, "Failed to get config") chainClient, chainlinkNodes, linkToken, _ := setupKeeperTest(l, t, &config) @@ -530,7 +530,7 @@ func TestKeeperRegisterUpkeep(t *testing.T) { t.Run(fmt.Sprintf("registry_1_%d", registryVersion), func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Keeper) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Keeper) require.NoError(t, err, "Failed to get config") chainClient, chainlinkNodes, linkToken, _ := setupKeeperTest(l, t, &config) @@ -626,7 +626,7 @@ func TestKeeperAddFunds(t *testing.T) { t.Run(fmt.Sprintf("registry_1_%d", registryVersion), func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Keeper) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Keeper) require.NoError(t, err, "Failed to get config") chainClient, chainlinkNodes, linkToken, _ := setupKeeperTest(l, t, &config) @@ -701,7 +701,7 @@ func TestKeeperRemove(t *testing.T) { t.Run(fmt.Sprintf("registry_1_%d", registryVersion), func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Keeper) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Keeper) require.NoError(t, err, "Failed to get config") chainClient, chainlinkNodes, linkToken, _ := setupKeeperTest(l, t, &config) @@ -786,7 +786,7 @@ func TestKeeperPauseRegistry(t *testing.T) { t.Run(fmt.Sprintf("registry_1_%d", registryVersion), func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Keeper) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Keeper) require.NoError(t, err, "Failed to get config") chainClient, chainlinkNodes, linkToken, _ := setupKeeperTest(l, t, &config) @@ -853,7 +853,7 @@ func TestKeeperPauseRegistry(t *testing.T) { func TestKeeperMigrateRegistry(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Keeper) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Keeper) require.NoError(t, err, "Error getting config") chainClient, chainlinkNodes, linkToken, _ := setupKeeperTest(l, t, &config) @@ -956,7 +956,7 @@ func TestKeeperNodeDown(t *testing.T) { t.Run(fmt.Sprintf("registry_1_%d", registryVersion), func(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Keeper) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Keeper) require.NoError(t, err, "Failed to get config") chainClient, chainlinkNodes, linkToken, _ := setupKeeperTest(l, t, &config) @@ -1066,7 +1066,7 @@ type nodeAndJob struct { func TestKeeperPauseUnPauseUpkeep(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Keeper) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Keeper) require.NoError(t, err, "Failed to get config") chainClient, chainlinkNodes, linkToken, _ := setupKeeperTest(l, t, &config) @@ -1158,7 +1158,7 @@ func TestKeeperPauseUnPauseUpkeep(t *testing.T) { func TestKeeperUpdateCheckData(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.Keeper) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Keeper) require.NoError(t, err, "Failed to get config") chainClient, chainlinkNodes, linkToken, _ := setupKeeperTest(l, t, &config) @@ -1264,7 +1264,7 @@ func TestKeeperJobReplacement(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) registryVersion := ethereum.RegistryVersion_1_3 - config, err := tc.GetConfig("Smoke", tc.Keeper) + config, err := tc.GetConfig([]string{"Smoke"}, tc.Keeper) require.NoError(t, err, "Failed to get config") chainClient, chainlinkNodes, linkToken, _ := setupKeeperTest(l, t, &config) diff --git a/integration-tests/smoke/log_poller_test.go b/integration-tests/smoke/log_poller_test.go index 05be29a90bc..f1a257552a2 100644 --- a/integration-tests/smoke/log_poller_test.go +++ b/integration-tests/smoke/log_poller_test.go @@ -91,7 +91,7 @@ func TestLogPollerReplayFinalityTag(t *testing.T) { // HELPER FUNCTIONS func executeBasicLogPollerTest(t *testing.T, logScannerSettings test_env.ChainlinkNodeLogScannerSettings) { - testConfig, err := tc.GetConfig(t.Name(), tc.LogPoller) + testConfig, err := tc.GetConfig([]string{t.Name()}, tc.LogPoller) require.NoError(t, err, "Error getting config") overrideEphemeralAddressesCount(&testConfig) @@ -174,7 +174,7 @@ func executeBasicLogPollerTest(t *testing.T, logScannerSettings test_env.Chainli } func executeLogPollerReplay(t *testing.T, consistencyTimeout string) { - testConfig, err := tc.GetConfig(t.Name(), tc.LogPoller) + testConfig, err := tc.GetConfig([]string{t.Name()}, tc.LogPoller) require.NoError(t, err, "Error getting config") overrideEphemeralAddressesCount(&testConfig) @@ -317,6 +317,8 @@ func prepareEnvironment(l zerolog.Logger, t *testing.T, testConfig *tc.TestConfi uint32(2500000), true, false, + false, + nil, ) err = logpoller.AssertUpkeepIdsUniqueness(upkeepIDs) diff --git a/integration-tests/smoke/ocr2_test.go b/integration-tests/smoke/ocr2_test.go index 09a9a222494..56a95c50bda 100644 --- a/integration-tests/smoke/ocr2_test.go +++ b/integration-tests/smoke/ocr2_test.go @@ -139,7 +139,7 @@ func TestOCRv2JobReplacement(t *testing.T) { } func prepareORCv2SmokeTestEnv(t *testing.T, testData ocr2test, l zerolog.Logger, firstRoundResult int) (*test_env.CLClusterTestEnv, []contracts.OffchainAggregatorV2, *seth.Client) { - config, err := tc.GetConfig("Smoke", tc.OCR2) + config, err := tc.GetConfig([]string{"Smoke"}, tc.OCR2) if err != nil { t.Fatal(err) } diff --git a/integration-tests/smoke/ocr2vrf_test.go b/integration-tests/smoke/ocr2vrf_test.go deleted file mode 100644 index b99e313a026..00000000000 --- a/integration-tests/smoke/ocr2vrf_test.go +++ /dev/null @@ -1,202 +0,0 @@ -package smoke - -import ( - "fmt" - "math/big" - "strings" - "testing" - - "github.com/stretchr/testify/require" - "go.uber.org/zap/zapcore" - - "github.com/smartcontractkit/chainlink-testing-framework/blockchain" - ctf_config "github.com/smartcontractkit/chainlink-testing-framework/config" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/environment" - "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/chainlink" - eth "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/ethereum" - "github.com/smartcontractkit/chainlink-testing-framework/logging" - "github.com/smartcontractkit/chainlink-testing-framework/networks" - seth_utils "github.com/smartcontractkit/chainlink-testing-framework/utils/seth" - "github.com/smartcontractkit/chainlink-testing-framework/utils/testcontext" - - "github.com/smartcontractkit/chainlink/integration-tests/actions" - "github.com/smartcontractkit/chainlink/integration-tests/actions/ocr2vrf_actions" - "github.com/smartcontractkit/chainlink/integration-tests/actions/ocr2vrf_actions/ocr2vrf_constants" - "github.com/smartcontractkit/chainlink/integration-tests/client" - "github.com/smartcontractkit/chainlink/integration-tests/config" - "github.com/smartcontractkit/chainlink/integration-tests/contracts" - "github.com/smartcontractkit/chainlink/integration-tests/testconfig" -) - -var ocr2vrfSmokeConfig *testconfig.TestConfig - -func TestOCR2VRFRedeemModel(t *testing.T) { - t.Parallel() - // remember to add TOML testConfig for Chainlink node before trying to run this test in future - t.Skip("VRFv3 is on pause, skipping") - l := logging.GetTestLogger(t) - testConfig, err := testconfig.GetConfig("Smoke", testconfig.OCR2) - if err != nil { - t.Fatal(err) - } - - testEnvironment, testNetwork := setupOCR2VRFEnvironment(t) - if testEnvironment.WillUseRemoteRunner() { - return - } - - testNetwork = seth_utils.MustReplaceSimulatedNetworkUrlWithK8(l, testNetwork, *testEnvironment) - chainClient, err := seth_utils.GetChainClientWithConfigFunction(testConfig, testNetwork, seth_utils.OneEphemeralKeysLiveTestnetCheckFn) - require.NoError(t, err, "Error creating seth client") - - chainlinkNodes, err := client.ConnectChainlinkNodes(testEnvironment) - require.NoError(t, err, "Error connecting to Chainlink nodes") - nodeAddresses, err := actions.ChainlinkNodeAddresses(chainlinkNodes) - require.NoError(t, err, "Retreiving on-chain wallet addresses for chainlink nodes shouldn't fail") - - t.Cleanup(func() { - err := actions.TeardownSuite(t, chainClient, testEnvironment, chainlinkNodes, nil, zapcore.ErrorLevel, &testConfig) - require.NoError(t, err, "Error tearing down environment") - }) - - linkToken, err := contracts.DeployLinkTokenContract(l, chainClient) - require.NoError(t, err, "Error deploying LINK token") - - mockETHLinkFeed, err := contracts.DeployMockETHLINKFeed(chainClient, ocr2vrf_constants.LinkEthFeedResponse) - require.NoError(t, err, "Error deploying Mock ETH/LINK Feed") - - _, _, vrfBeaconContract, consumerContract, subID := ocr2vrf_actions.SetupOCR2VRFUniverse( - t, - linkToken, - mockETHLinkFeed, - chainClient, - nodeAddresses, - chainlinkNodes, - testNetwork, - ) - - //Request and Redeem Randomness - requestID := ocr2vrf_actions.RequestAndRedeemRandomness( - t, - consumerContract, - vrfBeaconContract, - ocr2vrf_constants.NumberOfRandomWordsToRequest, - subID, - ocr2vrf_constants.ConfirmationDelay, - ocr2vrf_constants.RandomnessRedeemTransmissionEventTimeout, - ) - - for i := uint16(0); i < ocr2vrf_constants.NumberOfRandomWordsToRequest; i++ { - randomness, err := consumerContract.GetRandomnessByRequestId(testcontext.Get(t), requestID, big.NewInt(int64(i))) - require.NoError(t, err) - l.Info().Interface("Random Number", randomness).Interface("Randomness Number Index", i).Msg("Randomness retrieved from Consumer contract") - require.NotEqual(t, 0, randomness.Uint64(), "Randomness retrieved from Consumer contract give an answer other than 0") - } -} - -func TestOCR2VRFFulfillmentModel(t *testing.T) { - t.Parallel() - t.Skip("VRFv3 is on pause, skipping") - l := logging.GetTestLogger(t) - testConfig, err := testconfig.GetConfig("Smoke", testconfig.OCR2) - if err != nil { - t.Fatal(err) - } - - testEnvironment, testNetwork := setupOCR2VRFEnvironment(t) - if testEnvironment.WillUseRemoteRunner() { - return - } - - testNetwork = seth_utils.MustReplaceSimulatedNetworkUrlWithK8(l, testNetwork, *testEnvironment) - chainClient, err := seth_utils.GetChainClientWithConfigFunction(testConfig, testNetwork, seth_utils.OneEphemeralKeysLiveTestnetCheckFn) - require.NoError(t, err, "Error creating seth client") - - chainlinkNodes, err := client.ConnectChainlinkNodes(testEnvironment) - require.NoError(t, err, "Error connecting to Chainlink nodes") - nodeAddresses, err := actions.ChainlinkNodeAddresses(chainlinkNodes) - require.NoError(t, err, "Retreiving on-chain wallet addresses for chainlink nodes shouldn't fail") - - t.Cleanup(func() { - err := actions.TeardownSuite(t, chainClient, testEnvironment, chainlinkNodes, nil, zapcore.ErrorLevel, &testConfig) - require.NoError(t, err, "Error tearing down environment") - }) - - linkToken, err := contracts.DeployLinkTokenContract(l, chainClient) - require.NoError(t, err, "Error deploying LINK token") - - mockETHLinkFeed, err := contracts.DeployMockETHLINKFeed(chainClient, ocr2vrf_constants.LinkEthFeedResponse) - require.NoError(t, err, "Error deploying Mock ETH/LINK Feed") - - _, _, vrfBeaconContract, consumerContract, subID := ocr2vrf_actions.SetupOCR2VRFUniverse( - t, - linkToken, - mockETHLinkFeed, - chainClient, - nodeAddresses, - chainlinkNodes, - testNetwork, - ) - - requestID := ocr2vrf_actions.RequestRandomnessFulfillmentAndWaitForFulfilment( - t, - consumerContract, - vrfBeaconContract, - ocr2vrf_constants.NumberOfRandomWordsToRequest, - subID, - ocr2vrf_constants.ConfirmationDelay, - ocr2vrf_constants.RandomnessFulfilmentTransmissionEventTimeout, - ) - - for i := uint16(0); i < ocr2vrf_constants.NumberOfRandomWordsToRequest; i++ { - randomness, err := consumerContract.GetRandomnessByRequestId(testcontext.Get(t), requestID, big.NewInt(int64(i))) - require.NoError(t, err, "Error getting Randomness result from Consumer Contract") - l.Info().Interface("Random Number", randomness).Interface("Randomness Number Index", i).Msg("Randomness Fulfillment retrieved from Consumer contract") - require.NotEqual(t, 0, randomness.Uint64(), "Randomness Fulfillment retrieved from Consumer contract give an answer other than 0") - } -} - -func setupOCR2VRFEnvironment(t *testing.T) (testEnvironment *environment.Environment, testNetwork blockchain.EVMNetwork) { - if ocr2vrfSmokeConfig == nil { - c, err := testconfig.GetConfig("Smoke", testconfig.OCR2VRF) - require.NoError(t, err, "Error getting config") - ocr2vrfSmokeConfig = &c - } - - testNetwork = networks.MustGetSelectedNetworkConfig(ocr2vrfSmokeConfig.Network)[0] - evmConfig := eth.New(nil) - if !testNetwork.Simulated { - evmConfig = eth.New(ð.Props{ - NetworkName: testNetwork.Name, - Simulated: testNetwork.Simulated, - WsURLs: testNetwork.URLs, - }) - } - - var overrideFn = func(_ interface{}, target interface{}) { - ctf_config.MustConfigOverrideChainlinkVersion(ocr2vrfSmokeConfig.GetChainlinkImageConfig(), target) - ctf_config.MightConfigOverridePyroscopeKey(ocr2vrfSmokeConfig.GetPyroscopeConfig(), target) - } - - cd := chainlink.NewWithOverride(0, map[string]interface{}{ - "replicas": 6, - "toml": networks.AddNetworkDetailedConfig( - config.BaseOCR2Config, - ocr2vrfSmokeConfig.Pyroscope, - config.DefaultOCR2VRFNetworkDetailTomlConfig, - testNetwork, - ), - }, ocr2vrfSmokeConfig.ChainlinkImage, overrideFn) - - testEnvironment = environment.New(&environment.Config{ - NamespacePrefix: fmt.Sprintf("smoke-ocr2vrf-%s", strings.ReplaceAll(strings.ToLower(testNetwork.Name), " ", "-")), - Test: t, - }). - AddHelm(evmConfig). - AddHelm(cd) - err := testEnvironment.Run() - - require.NoError(t, err, "Error running test environment") - - return testEnvironment, testNetwork -} diff --git a/integration-tests/smoke/ocr_test.go b/integration-tests/smoke/ocr_test.go index d989517278e..0b4ac3de30b 100644 --- a/integration-tests/smoke/ocr_test.go +++ b/integration-tests/smoke/ocr_test.go @@ -80,10 +80,8 @@ func TestOCRJobReplacement(t *testing.T) { } func prepareORCv1SmokeTestEnv(t *testing.T, l zerolog.Logger, firstRoundResult int64) (*test_env.CLClusterTestEnv, []contracts.OffchainAggregator, *seth.Client) { - config, err := tc.GetConfig("Smoke", tc.OCR) - if err != nil { - t.Fatal(err) - } + config, err := tc.GetConfig([]string{"Smoke"}, tc.OCR) + require.NoError(t, err, "Error getting config") network, err := actions.EthereumNetworkConfigFromConfig(l, &config) require.NoError(t, err, "Error building ethereum network config") diff --git a/integration-tests/smoke/reorg_above_finality_test.go b/integration-tests/smoke/reorg_above_finality_test.go index 829aa66fdce..e7b9e4a2183 100644 --- a/integration-tests/smoke/reorg_above_finality_test.go +++ b/integration-tests/smoke/reorg_above_finality_test.go @@ -19,7 +19,7 @@ func TestReorgAboveFinality_FinalityTagDisabled(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig(t.Name(), tc.LogPoller) + config, err := tc.GetConfig([]string{t.Name()}, tc.LogPoller) require.NoError(t, err, "Error getting config") privateNetworkConf, err := actions.EthereumNetworkConfigFromConfig(l, &config) diff --git a/integration-tests/smoke/runlog_test.go b/integration-tests/smoke/runlog_test.go index 862ac911b36..515d9dea33c 100644 --- a/integration-tests/smoke/runlog_test.go +++ b/integration-tests/smoke/runlog_test.go @@ -28,7 +28,7 @@ func TestRunLogBasic(t *testing.T) { t.Parallel() l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.RunLog) + config, err := tc.GetConfig([]string{"Smoke"}, tc.RunLog) require.NoError(t, err, "Error getting config") privateNetwork, err := actions.EthereumNetworkConfigFromConfig(l, &config) diff --git a/integration-tests/smoke/vrf_test.go b/integration-tests/smoke/vrf_test.go index 0f706f1576b..04e760796db 100644 --- a/integration-tests/smoke/vrf_test.go +++ b/integration-tests/smoke/vrf_test.go @@ -186,7 +186,7 @@ func TestVRFJobReplacement(t *testing.T) { } func prepareVRFtestEnv(t *testing.T, l zerolog.Logger) (*test_env.CLClusterTestEnv, *vrfv1.Contracts, *seth.Client) { - config, err := tc.GetConfig("Smoke", tc.VRF) + config, err := tc.GetChainAndTestTypeSpecificConfig("Smoke", tc.VRF) require.NoError(t, err, "Error getting config") privateNetwork, err := actions.EthereumNetworkConfigFromConfig(l, &config) diff --git a/integration-tests/smoke/vrfv2_test.go b/integration-tests/smoke/vrfv2_test.go index 70fcb4bcf7d..7a53d2c57c8 100644 --- a/integration-tests/smoke/vrfv2_test.go +++ b/integration-tests/smoke/vrfv2_test.go @@ -52,7 +52,7 @@ func TestVRFv2Basic(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.VRFv2) + config, err := tc.GetChainAndTestTypeSpecificConfig("Smoke", tc.VRFv2) require.NoError(t, err, "Error getting config") vrfv2Config := config.VRFv2 chainID := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0].ChainID @@ -569,7 +569,7 @@ func TestVRFv2MultipleSendingKeys(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.VRFv2) + config, err := tc.GetChainAndTestTypeSpecificConfig("Smoke", tc.VRFv2) if err != nil { t.Fatal(err) } @@ -677,7 +677,7 @@ func TestVRFOwner(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.VRFv2) + config, err := tc.GetChainAndTestTypeSpecificConfig("Smoke", tc.VRFv2) require.NoError(t, err, "Error getting config") chainID := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0].ChainID vrfv2Config := config.VRFv2 @@ -813,7 +813,7 @@ func TestVRFV2WithBHS(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.VRFv2) + config, err := tc.GetChainAndTestTypeSpecificConfig("Smoke", tc.VRFv2) require.NoError(t, err, "Error getting config") vrfv2Config := config.VRFv2 chainID := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0].ChainID @@ -900,22 +900,25 @@ func TestVRFV2WithBHS(t *testing.T) { wg.Add(1) //Wait at least 256 blocks _, err = actions.WaitForBlockNumberToBe( + testcontext.Get(t), randRequestBlockNumber+uint64(257), sethClient, &wg, + nil, configCopy.VRFv2.General.WaitFor256BlocksTimeout.Duration, - t, l, ) wg.Wait() require.NoError(t, err) err = vrfv2.FundSubscriptions(big.NewFloat(*configCopy.VRFv2.General.SubscriptionFundingAmountLink), vrfContracts.LinkToken, vrfContracts.CoordinatorV2, subIDsForBHS) require.NoError(t, err, "error funding subscriptions") - randomWordsFulfilledEvent, err := vrfContracts.CoordinatorV2.WaitForRandomWordsFulfilledEvent( - contracts.RandomWordsFulfilledEventFilter{ - RequestIds: []*big.Int{randomWordsRequestedEvent.RequestId}, - Timeout: configCopy.VRFv2.General.RandomWordsFulfilledEventTimeout.Duration, - }, + + randomWordsFulfilledEvent, err := vrfv2.WaitRandomWordsFulfilledEvent( + vrfContracts.CoordinatorV2, + randomWordsRequestedEvent.RequestId, + randomWordsRequestedEvent.Raw.BlockNumber, + configCopy.VRFv2.General.RandomWordsFulfilledEventTimeout.Duration, + l, ) require.NoError(t, err, "error waiting for randomness fulfilled event") vrfcommon.LogRandomWordsFulfilledEvent(l, vrfContracts.CoordinatorV2, randomWordsFulfilledEvent, false, 0) @@ -970,11 +973,12 @@ func TestVRFV2WithBHS(t *testing.T) { var wg sync.WaitGroup wg.Add(1) _, err = actions.WaitForBlockNumberToBe( + testcontext.Get(t), randRequestBlockNumber+uint64(*configCopy.VRFv2.General.BHSJobWaitBlocks), sethClient, &wg, + nil, time.Minute*1, - t, l, ) wg.Wait() @@ -1031,7 +1035,7 @@ func TestVRFV2NodeReorg(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.VRFv2) + config, err := tc.GetChainAndTestTypeSpecificConfig("Smoke", tc.VRFv2) require.NoError(t, err, "Error getting config") vrfv2Config := config.VRFv2 network := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0] @@ -1187,11 +1191,12 @@ func TestVRFV2NodeReorg(t *testing.T) { // For context - when performing debug_setHead on geth simulated chain and therefore rewinding chain to a previous block, //then tx that was mined after reorg will not appear in canonical chain contrary to real world scenario //Hence, we only verify that VRF node will not generate fulfillment for the reorged fork request - _, err = vrfContracts.CoordinatorV2.WaitForRandomWordsFulfilledEvent( - contracts.RandomWordsFulfilledEventFilter{ - RequestIds: []*big.Int{randomWordsRequestedEvent.RequestId}, - Timeout: time.Second * 10, - }, + _, err = vrfv2.WaitRandomWordsFulfilledEvent( + vrfContracts.CoordinatorV2, + randomWordsRequestedEvent.RequestId, + randomWordsRequestedEvent.Raw.BlockNumber, + time.Second*10, + l, ) require.Error(t, err, "fulfillment should not be generated for the request which was made on reorged fork on Simulated Chain") }) @@ -1210,7 +1215,7 @@ func TestVRFv2BatchFulfillmentEnabledDisabled(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.VRFv2) + config, err := tc.GetChainAndTestTypeSpecificConfig("Smoke", tc.VRFv2) require.NoError(t, err, "Error getting config") vrfv2Config := config.VRFv2 network := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0] diff --git a/integration-tests/smoke/vrfv2plus_test.go b/integration-tests/smoke/vrfv2plus_test.go index b713cdf9409..f519aa6cd5f 100644 --- a/integration-tests/smoke/vrfv2plus_test.go +++ b/integration-tests/smoke/vrfv2plus_test.go @@ -49,8 +49,9 @@ func TestVRFv2Plus(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.VRFv2Plus) + config, err := tc.GetChainAndTestTypeSpecificConfig("Smoke", tc.VRFv2Plus) require.NoError(t, err, "Error getting config") + vrfv2PlusConfig := config.VRFv2Plus chainID := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0].ChainID @@ -746,7 +747,7 @@ func TestVRFv2PlusMultipleSendingKeys(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.VRFv2Plus) + config, err := tc.GetChainAndTestTypeSpecificConfig("Smoke", tc.VRFv2Plus) require.NoError(t, err, "Error getting config") vrfv2PlusConfig := config.VRFv2Plus chainID := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0].ChainID @@ -851,7 +852,7 @@ func TestVRFv2PlusMigration(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.VRFv2Plus) + config, err := tc.GetChainAndTestTypeSpecificConfig("Smoke", tc.VRFv2Plus) require.NoError(t, err, "Error getting config") vrfv2PlusConfig := config.VRFv2Plus chainID := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0].ChainID @@ -1245,7 +1246,7 @@ func TestVRFV2PlusWithBHS(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.VRFv2Plus) + config, err := tc.GetChainAndTestTypeSpecificConfig("Smoke", tc.VRFv2Plus) require.NoError(t, err, "Error getting config") vrfv2PlusConfig := config.VRFv2Plus chainID := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0].ChainID @@ -1328,31 +1329,51 @@ func TestVRFV2PlusWithBHS(t *testing.T) { randRequestBlockNumber := randomWordsRequestedEvent.Raw.BlockNumber var wg sync.WaitGroup wg.Add(1) - //Wait at least 256 blocks - _, err = actions.WaitForBlockNumberToBe( - randRequestBlockNumber+uint64(257), - sethClient, - &wg, - configCopy.VRFv2Plus.General.WaitFor256BlocksTimeout.Duration, - t, - l, - ) + + waitForNumberOfBlocks := 257 + desiredBlockNumberReached := make(chan bool) + go func() { + //Wait at least 256 blocks + _, err = actions.WaitForBlockNumberToBe( + testcontext.Get(t), + randRequestBlockNumber+uint64(waitForNumberOfBlocks), + sethClient, + &wg, + desiredBlockNumberReached, + configCopy.VRFv2Plus.General.WaitFor256BlocksTimeout.Duration, + l, + ) + require.NoError(t, err) + }() + + if *configCopy.VRFv2Plus.General.GenerateTXsOnChain { + go func() { + _, err := actions.ContinuouslyGenerateTXsOnChain(sethClient, desiredBlockNumberReached, l) + require.NoError(t, err) + // Wait to let the transactions be mined and avoid nonce issues + time.Sleep(time.Second * 5) + }() + } wg.Wait() - require.NoError(t, err) + err = vrfv2plus.FundSubscriptions( big.NewFloat(*configCopy.VRFv2Plus.General.SubscriptionRefundingAmountNative), big.NewFloat(*configCopy.VRFv2Plus.General.SubscriptionRefundingAmountLink), vrfContracts.LinkToken, vrfContracts.CoordinatorV2Plus, subIDs, + *configCopy.VRFv2Plus.General.SubscriptionBillingType, ) require.NoError(t, err, "error funding subscriptions") - randomWordsFulfilledEvent, err := vrfContracts.CoordinatorV2Plus.WaitForRandomWordsFulfilledEvent( - contracts.RandomWordsFulfilledEventFilter{ - RequestIds: []*big.Int{randomWordsRequestedEvent.RequestId}, - SubIDs: []*big.Int{subID}, - Timeout: configCopy.VRFv2Plus.General.RandomWordsFulfilledEventTimeout.Duration, - }, + randomWordsFulfilledEvent, err := vrfv2plus.WaitRandomWordsFulfilledEvent( + vrfContracts.CoordinatorV2Plus, + randomWordsRequestedEvent.RequestId, + subID, + randomWordsRequestedEvent.Raw.BlockNumber, + isNativeBilling, + configCopy.VRFv2Plus.General.RandomWordsFulfilledEventTimeout.Duration, + l, + 0, ) require.NoError(t, err, "error waiting for randomness fulfilled event") vrfcommon.LogRandomWordsFulfilledEvent(l, vrfContracts.CoordinatorV2Plus, randomWordsFulfilledEvent, isNativeBilling, 0) @@ -1367,6 +1388,7 @@ func TestVRFV2PlusWithBHS(t *testing.T) { l.Info(). Str("Randomness Request's Blockhash", randomWordsRequestedEvent.Raw.BlockHash.String()). Str("Block Hash stored by BHS contract", fmt.Sprintf("0x%x", randRequestBlockHash)). + Str("BHS Contract", vrfContracts.BHS.Address()). Msg("BHS Contract's stored Blockhash for Randomness Request") require.Equal(t, 0, randomWordsRequestedEvent.Raw.BlockHash.Cmp(randRequestBlockHash)) }) @@ -1413,11 +1435,12 @@ func TestVRFV2PlusWithBHS(t *testing.T) { var wg sync.WaitGroup wg.Add(1) _, err = actions.WaitForBlockNumberToBe( + testcontext.Get(t), randRequestBlockNumber+uint64(*configCopy.VRFv2Plus.General.BHSJobWaitBlocks+10), sethClient, &wg, + nil, time.Minute*1, - t, l, ) wg.Wait() @@ -1474,7 +1497,7 @@ func TestVRFV2PlusWithBHF(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.VRFv2Plus) + config, err := tc.GetChainAndTestTypeSpecificConfig("Smoke", tc.VRFv2Plus) require.NoError(t, err, "Error getting config") vrfv2PlusConfig := config.VRFv2Plus chainID := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0].ChainID @@ -1564,11 +1587,12 @@ func TestVRFV2PlusWithBHF(t *testing.T) { wg.Add(1) //Wait at least 256 blocks _, err = actions.WaitForBlockNumberToBe( + testcontext.Get(t), randRequestBlockNumber+uint64(257), sethClient, &wg, + nil, configCopy.VRFv2Plus.General.WaitFor256BlocksTimeout.Duration, - t, l, ) wg.Wait() @@ -1582,14 +1606,19 @@ func TestVRFV2PlusWithBHF(t *testing.T) { vrfContracts.LinkToken, vrfContracts.CoordinatorV2Plus, subIDs, + *configCopy.VRFv2Plus.General.SubscriptionBillingType, ) require.NoError(t, err, "error funding subscriptions") - randomWordsFulfilledEvent, err := vrfContracts.CoordinatorV2Plus.WaitForRandomWordsFulfilledEvent( - contracts.RandomWordsFulfilledEventFilter{ - RequestIds: []*big.Int{randomWordsRequestedEvent.RequestId}, - SubIDs: []*big.Int{subID}, - Timeout: configCopy.VRFv2Plus.General.RandomWordsFulfilledEventTimeout.Duration, - }, + + randomWordsFulfilledEvent, err := vrfv2plus.WaitRandomWordsFulfilledEvent( + vrfContracts.CoordinatorV2Plus, + randomWordsRequestedEvent.RequestId, + subID, + randomWordsRequestedEvent.Raw.BlockNumber, + isNativeBilling, + configCopy.VRFv2Plus.General.RandomWordsFulfilledEventTimeout.Duration, + l, + 0, ) require.NoError(t, err, "error waiting for randomness fulfilled event") vrfcommon.LogRandomWordsFulfilledEvent(l, vrfContracts.CoordinatorV2Plus, randomWordsFulfilledEvent, isNativeBilling, 0) @@ -1631,7 +1660,7 @@ func TestVRFv2PlusReplayAfterTimeout(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.VRFv2Plus) + config, err := tc.GetChainAndTestTypeSpecificConfig("Smoke", tc.VRFv2Plus) require.NoError(t, err, "Error getting config") vrfv2PlusConfig := config.VRFv2Plus chainID := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0].ChainID @@ -1720,6 +1749,7 @@ func TestVRFv2PlusReplayAfterTimeout(t *testing.T) { vrfContracts.LinkToken, vrfContracts.CoordinatorV2Plus, []*big.Int{subID}, + *configCopy.VRFv2Plus.General.SubscriptionBillingType, ) require.NoError(t, err, "error funding subs after request timeout") @@ -1767,12 +1797,15 @@ func TestVRFv2PlusReplayAfterTimeout(t *testing.T) { l.Info().Str("reqID", initialReqRandomWordsRequestedEvent.RequestId.String()). Str("subID", subID.String()). Msg("Waiting for initalReqRandomWordsFulfilledEvent") - initalReqRandomWordsFulfilledEvent, err := vrfContracts.CoordinatorV2Plus.WaitForRandomWordsFulfilledEvent( - contracts.RandomWordsFulfilledEventFilter{ - RequestIds: []*big.Int{initialReqRandomWordsRequestedEvent.RequestId}, - SubIDs: []*big.Int{subID}, - Timeout: configCopy.VRFv2Plus.General.RandomWordsFulfilledEventTimeout.Duration, - }, + initalReqRandomWordsFulfilledEvent, err := vrfv2plus.WaitRandomWordsFulfilledEvent( + vrfContracts.CoordinatorV2Plus, + initialReqRandomWordsRequestedEvent.RequestId, + subID, + initialReqRandomWordsRequestedEvent.Raw.BlockNumber, + isNativeBilling, + configCopy.VRFv2Plus.General.RandomWordsFulfilledEventTimeout.Duration, + l, + 0, ) require.NoError(t, err, "error waiting for initial request RandomWordsFulfilledEvent") @@ -1800,7 +1833,7 @@ func TestVRFv2PlusPendingBlockSimulationAndZeroConfirmationDelays(t *testing.T) ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.VRFv2Plus) + config, err := tc.GetChainAndTestTypeSpecificConfig("Smoke", tc.VRFv2Plus) require.NoError(t, err, "Error getting config") vrfv2PlusConfig := config.VRFv2Plus chainID := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0].ChainID @@ -1894,7 +1927,7 @@ func TestVRFv2PlusNodeReorg(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.VRFv2Plus) + config, err := tc.GetChainAndTestTypeSpecificConfig("Smoke", tc.VRFv2Plus) require.NoError(t, err, "Error getting config") vrfv2PlusConfig := config.VRFv2Plus network := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0] @@ -2046,12 +2079,15 @@ func TestVRFv2PlusNodeReorg(t *testing.T) { // For context - when performing debug_setHead on geth simulated chain and therefore rewinding chain to a previous block, //then tx that was mined after reorg will not appear in canonical chain contrary to real world scenario //Hence, we only verify that VRF node will not generate fulfillment for the reorged fork request - _, err = vrfContracts.CoordinatorV2Plus.WaitForRandomWordsFulfilledEvent( - contracts.RandomWordsFulfilledEventFilter{ - RequestIds: []*big.Int{randomWordsRequestedEvent.RequestId}, - SubIDs: []*big.Int{subID}, - Timeout: time.Second * 10, - }, + _, err = vrfv2plus.WaitRandomWordsFulfilledEvent( + vrfContracts.CoordinatorV2Plus, + randomWordsRequestedEvent.RequestId, + subID, + randomWordsRequestedEvent.Raw.BlockNumber, + isNativeBilling, + time.Second*10, + l, + 0, ) require.Error(t, err, "fulfillment should not be generated for the request which was made on reorged fork on Simulated Chain") }) @@ -2071,7 +2107,7 @@ func TestVRFv2PlusBatchFulfillmentEnabledDisabled(t *testing.T) { ) l := logging.GetTestLogger(t) - config, err := tc.GetConfig("Smoke", tc.VRFv2Plus) + config, err := tc.GetChainAndTestTypeSpecificConfig("Smoke", tc.VRFv2Plus) require.NoError(t, err, "Error getting config") vrfv2PlusConfig := config.VRFv2Plus network := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0] diff --git a/integration-tests/soak/forwarder_ocr_test.go b/integration-tests/soak/forwarder_ocr_test.go index 37837c666aa..dd7eb102170 100644 --- a/integration-tests/soak/forwarder_ocr_test.go +++ b/integration-tests/soak/forwarder_ocr_test.go @@ -12,22 +12,30 @@ import ( "github.com/smartcontractkit/chainlink/integration-tests/testsetups" ) -func TestForwarderOCRSoak(t *testing.T) { - l := logging.GetTestLogger(t) - // Use this variable to pass in any custom EVM specific TOML values to your Chainlink nodes - customNetworkTOML := `[EVM.Transactions] -ForwardersEnabled = true` - // Uncomment below for debugging TOML issues on the node - // fmt.Println("Using Chainlink TOML\n---------------------") - // fmt.Println(networks.AddNetworkDetailedConfig(config.BaseOCRP2PV1Config, customNetworkTOML, network)) - // fmt.Println("---------------------") - - config, err := tc.GetConfig("Soak", tc.OCR) +func TestForwarderOCRv1Soak(t *testing.T) { + //nolint:revive + t.Fatalf("This test is disabled because the implementation is broken") + config, err := tc.GetConfig([]string{"Soak"}, tc.ForwarderOcr) + require.NoError(t, err, "Error getting config") + + executeForwarderOCRSoakTest(t, &config) +} + +func TestForwarderOCRv2Soak(t *testing.T) { + //nolint:revive + t.Fatalf("This test is disabled because the implementation is broken") + config, err := tc.GetConfig([]string{"Soak"}, tc.ForwarderOcr2) require.NoError(t, err, "Error getting config") - ocrSoakTest, err := testsetups.NewOCRSoakTest(t, &config, testsetups.WithForwarderFlow(true)) + executeForwarderOCRSoakTest(t, &config) +} + +func executeForwarderOCRSoakTest(t *testing.T, config *tc.TestConfig) { + l := logging.GetTestLogger(t) + + ocrSoakTest, err := testsetups.NewOCRSoakTest(t, config, testsetups.WithForwarderFlow(true)) require.NoError(t, err, "Error creating soak test") - ocrSoakTest.DeployEnvironment(customNetworkTOML, &config) + ocrSoakTest.DeployEnvironment(config) if ocrSoakTest.Environment().WillUseRemoteRunner() { return } @@ -36,6 +44,6 @@ ForwardersEnabled = true` l.Error().Err(err).Msg("Error tearing down environment") } }) - ocrSoakTest.Setup(&config) + ocrSoakTest.Setup(config) ocrSoakTest.Run() } diff --git a/integration-tests/soak/ocr_test.go b/integration-tests/soak/ocr_test.go index 290cc00255c..1f437e565eb 100644 --- a/integration-tests/soak/ocr_test.go +++ b/integration-tests/soak/ocr_test.go @@ -4,6 +4,8 @@ import ( "fmt" "testing" + seth_utils "github.com/smartcontractkit/chainlink-testing-framework/utils/seth" + "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-testing-framework/logging" @@ -15,63 +17,66 @@ import ( "github.com/smartcontractkit/havoc/k8schaos" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "github.com/smartcontractkit/chainlink-testing-framework/networks" "github.com/smartcontractkit/chainlink-testing-framework/utils/ptr" "github.com/smartcontractkit/chainlink/integration-tests/actions" tc "github.com/smartcontractkit/chainlink/integration-tests/testconfig" "github.com/smartcontractkit/chainlink/integration-tests/testsetups" ) -func TestOCRSoak(t *testing.T) { - // Use this variable to pass in any custom EVM specific TOML values to your Chainlink nodes - customNetworkTOML := `` - // Uncomment below for debugging TOML issues on the node - // network := networks.MustGetSelectedNetworksFromEnv()[0] - // fmt.Println("Using Chainlink TOML\n---------------------") - // fmt.Println(networks.AddNetworkDetailedConfig(config.BaseOCR1Config, customNetworkTOML, network)) - // fmt.Println("---------------------") - config, err := tc.GetConfig("Soak", tc.OCR) +func TestOCRv1Soak(t *testing.T) { + config, err := tc.GetConfig([]string{"Soak"}, tc.OCR) + require.NoError(t, err, "Error getting config") + ocrSoakTest, err := testsetups.NewOCRSoakTest(t, &config) + require.NoError(t, err, "Error creating OCR soak test") + executeOCRSoakTest(t, ocrSoakTest, &config) +} + +func TestOCRv2Soak(t *testing.T) { + config, err := tc.GetConfig([]string{"Soak"}, tc.OCR2) require.NoError(t, err, "Error getting config") + ocrSoakTest, err := testsetups.NewOCRSoakTest(t, &config) require.NoError(t, err, "Error creating OCR soak test") - runOCRSoakTest(t, ocrSoakTest, config, customNetworkTOML) + executeOCRSoakTest(t, ocrSoakTest, &config) } func TestOCRSoak_GethReorgBelowFinality_FinalityTagDisabled(t *testing.T) { - config, err := tc.GetConfig(t.Name(), tc.OCR) + config, err := tc.GetConfig([]string{t.Name()}, tc.OCR) require.NoError(t, err, "Error getting config") ocrSoakTest, err := testsetups.NewOCRSoakTest(t, &config) require.NoError(t, err, "Error creating OCR soak test") - runOCRSoakTest(t, ocrSoakTest, config, "") + executeOCRSoakTest(t, ocrSoakTest, &config) } func TestOCRSoak_GethReorgBelowFinality_FinalityTagEnabled(t *testing.T) { - config, err := tc.GetConfig(t.Name(), tc.OCR) + config, err := tc.GetConfig([]string{t.Name()}, tc.OCR) require.NoError(t, err, "Error getting config") ocrSoakTest, err := testsetups.NewOCRSoakTest(t, &config) require.NoError(t, err, "Error creating OCR soak test") - runOCRSoakTest(t, ocrSoakTest, config, "") + executeOCRSoakTest(t, ocrSoakTest, &config) } func TestOCRSoak_GasSpike(t *testing.T) { - config, err := tc.GetConfig(t.Name(), tc.OCR) + config, err := tc.GetConfig([]string{t.Name()}, tc.OCR) require.NoError(t, err, "Error getting config") ocrSoakTest, err := testsetups.NewOCRSoakTest(t, &config) require.NoError(t, err, "Error creating OCR soak test") - runOCRSoakTest(t, ocrSoakTest, config, "") + executeOCRSoakTest(t, ocrSoakTest, &config) } // TestOCRSoak_ChangeBlockGasLimit changes next block gas limit and sets it to percentage of last gasUsed in previous block creating congestion func TestOCRSoak_ChangeBlockGasLimit(t *testing.T) { - config, err := tc.GetConfig(t.Name(), tc.OCR) + config, err := tc.GetConfig([]string{t.Name()}, tc.OCR) require.NoError(t, err, "Error getting config") ocrSoakTest, err := testsetups.NewOCRSoakTest(t, &config) require.NoError(t, err, "Error creating OCR soak test") - runOCRSoakTest(t, ocrSoakTest, config, "") + executeOCRSoakTest(t, ocrSoakTest, &config) } // TestOCRSoak_RPCDownForAllCLNodes simulates a network chaos by bringing down network to RPC node for all Chainlink Nodes func TestOCRSoak_RPCDownForAllCLNodes(t *testing.T) { - config, err := tc.GetConfig(t.Name(), tc.OCR) + config, err := tc.GetConfig([]string{t.Name()}, tc.OCR) require.NoError(t, err, "Error getting config") require.True(t, config.Network.IsSimulatedGethSelected(), "This test requires simulated geth") @@ -98,12 +103,12 @@ func TestOCRSoak_RPCDownForAllCLNodes(t *testing.T) { testsetups.WithChaos([]*k8schaos.Chaos{chaos}), ) require.NoError(t, err, "Error creating OCR soak test") - runOCRSoakTest(t, ocrSoakTest, config, "") + executeOCRSoakTest(t, ocrSoakTest, &config) } // TestOCRSoak_RPCDownForAllCLNodes simulates a network chaos by bringing down network to RPC node for 50% of Chainlink Nodes func TestOCRSoak_RPCDownForHalfCLNodes(t *testing.T) { - config, err := tc.GetConfig(t.Name(), tc.OCR) + config, err := tc.GetConfig([]string{t.Name()}, tc.OCR) require.NoError(t, err, "Error getting config") require.True(t, config.Network.IsSimulatedGethSelected(), "This test requires simulated geth") @@ -131,16 +136,24 @@ func TestOCRSoak_RPCDownForHalfCLNodes(t *testing.T) { testsetups.WithChaos([]*k8schaos.Chaos{chaos}), ) require.NoError(t, err, "Error creating OCR soak test") - runOCRSoakTest(t, ocrSoakTest, config, "") + executeOCRSoakTest(t, ocrSoakTest, &config) } -func runOCRSoakTest(t *testing.T, test *testsetups.OCRSoakTest, config tc.TestConfig, customNetworkTOML string) { +func executeOCRSoakTest(t *testing.T, test *testsetups.OCRSoakTest, config *tc.TestConfig) { l := logging.GetTestLogger(t) + // validate Seth config before anything else, but only for live networks (simulated will fail, since there's no chain started yet) + network := networks.MustGetSelectedNetworkConfig(config.GetNetworkConfig())[0] + if !network.Simulated { + _, err := seth_utils.GetChainClient(config, network) + require.NoError(t, err, "Error creating seth client") + } + l.Info().Str("test", t.Name()).Msg("Starting OCR soak test") if !test.Interrupted() { - test.DeployEnvironment(customNetworkTOML, &config) + test.DeployEnvironment(config) } + if test.Environment().WillUseRemoteRunner() { return } @@ -154,7 +167,7 @@ func runOCRSoakTest(t *testing.T, test *testsetups.OCRSoakTest, config tc.TestCo require.NoError(t, err, "Error loading state") test.Resume() } else { - test.Setup(&config) + test.Setup(config) test.Run() } } diff --git a/integration-tests/testconfig/README.md b/integration-tests/testconfig/README.md index bb3d7c000f7..7ff6cedd24c 100644 --- a/integration-tests/testconfig/README.md +++ b/integration-tests/testconfig/README.md @@ -64,31 +64,16 @@ cat << EOF > config.toml selected_networks=["$SELECTED_NETWORKS"] [ChainlinkImage] -image="$CHAINLINK_IMAGE" +image="" version="$CHAINLINK_VERSION" postgres_version="$CHAINLINK_POSTGRES_VERSION" -[Pyroscope] -enabled=$pyroscope_enabled -server_url="$PYROSCOPE_SERVER" -environment="$PYROSCOPE_ENVIRONMENT" -key_secret="$PYROSCOPE_KEY" - [Logging] test_log_collect=false run_id="$RUN_ID" [Logging.LogStream] log_targets=["$LOG_TARGETS"] - -[Logging.Loki] -tenant_id="$LOKI_TENANT_ID" -endpoint="$LOKI_ENDPOINT" -basic_auth_secret="$LOKI_BASIC_AUTH" - -[Logging.Grafana] -base_url="$GRAFANA_URL" -dashboard_url="$GRAFANA_DASHBOARD_URL" EOF BASE64_CONFIG_OVERRIDE=$(cat config.toml | base64 -w 0) @@ -98,6 +83,11 @@ echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV **It is highly recommended to use reusable GHA actions present in [.actions](../../../.github/.actions) to generate and apply the base64-encoded configuration.** Own implementation of `BASE64_CONFIG_OVERRIDE` generation is discouraged and should be used only if existing actions do not cover the use case. But even in that case it might be a better idea to extend existing actions. This variable is automatically relayed to Kubernetes-based tests, eliminating the need for manual intervention in test scripts. +## Test Secrets + +Test secrets are not stored directly within the `TestConfig` TOML for security reasons. Instead, they are passed into `TestConfig` via environment variables. This ensures sensitive data is handled securely throughout our testing processes. + +For detailed instructions on how to set test secrets both locally and within CI environments, please visit: [Test Secrets Guide in CTF](https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/config/README.md#test-secrets) ## Named Configurations diff --git a/integration-tests/testconfig/automation/automation.toml b/integration-tests/testconfig/automation/automation.toml index cf158301127..a30202d0ec7 100644 --- a/integration-tests/testconfig/automation/automation.toml +++ b/integration-tests/testconfig/automation/automation.toml @@ -30,11 +30,6 @@ Unauthenticated = 1000 [WebServer.TLS] HTTPSPort = 0 -[Database] -MaxIdleConns = 20 -MaxOpenConns = 40 -MigrateOnStartup = true - [OCR2] Enabled = true @@ -43,8 +38,6 @@ Enabled = true Enabled = true ListenAddresses = ['0.0.0.0:6690'] AnnounceAddresses = ['0.0.0.0:6690'] -DeltaDial = '500ms' -DeltaReconcile = '5s' """ # smoke test specific overrodes @@ -95,6 +88,20 @@ max_revert_data_size=5_000 # reorg test specific overrides [Reorg.Automation] + +[Reorg.NodeConfig] +CommonChainConfigTOML = """ +FinalityDepth = 20 +LogPollInterval = '1s' + +[HeadTracker] +HistoryDepth = 30 + +[GasEstimator] +Mode = 'FixedPrice' +LimitDefault = 5_000_000 +""" + [Reorg.Automation.General] number_of_nodes=6 duration=100 diff --git a/integration-tests/testconfig/automation/example.toml b/integration-tests/testconfig/automation/example.toml index cc48749a15b..3b48e89a548 100644 --- a/integration-tests/testconfig/automation/example.toml +++ b/integration-tests/testconfig/automation/example.toml @@ -31,6 +31,8 @@ bearer_token_secret="bearer_token" base_url="http://grafana.url" # url of your grafana dashboard (prefix and suffix "/" are stirpped), example: /d/ad61652-2712-1722/my-dashboard dashboard_url="/d/your-dashboard" +# Grafana dashboard uid to annotate. Find it in Dashboard Settings -> JSON Model +dashboard_uid="dashboard-uid-to-annotate" bearer_token_secret="my-awesome-token" # if you want to use polygon_mumbial diff --git a/integration-tests/testconfig/common/vrf/common.go b/integration-tests/testconfig/common/vrf/common.go index a5b4078f429..e213191075f 100644 --- a/integration-tests/testconfig/common/vrf/common.go +++ b/integration-tests/testconfig/common/vrf/common.go @@ -182,6 +182,8 @@ type General struct { BHFJobLookBackBlocks *int `toml:"bhf_job_lookback_blocks"` BHFJobPollPeriod *blockchain.StrDuration `toml:"bhf_job_poll_period"` BHFJobRunTimeout *blockchain.StrDuration `toml:"bhf_job_run_timeout"` + + GenerateTXsOnChain *bool `toml:"generate_txs_on_chain"` } func (c *General) Validate() error { @@ -299,5 +301,25 @@ func (c *General) Validate() error { return errors.New("bhs_job_wait_blocks must be set to a non-negative value") } + if c.BHFJobLookBackBlocks == nil || *c.BHFJobLookBackBlocks < 0 { + return errors.New("bhf_job_lookback_blocks must be set to a non-negative value") + } + + if c.BHFJobPollPeriod == nil || c.BHFJobPollPeriod.Duration == 0 { + return errors.New("bhf_job_poll_period must be set to a non-negative value") + } + + if c.BHFJobRunTimeout == nil || c.BHFJobRunTimeout.Duration == 0 { + return errors.New("bhf_job_run_timeout must be set to a non-negative value") + } + + if c.BHFJobWaitBlocks == nil || *c.BHFJobWaitBlocks < 0 { + return errors.New("bhf_job_wait_blocks must be set to a non-negative value") + } + + if c.GenerateTXsOnChain == nil { + return errors.New("generate_txs_on_chain must not be nil") + } + return nil } diff --git a/integration-tests/testconfig/configs_embed.go b/integration-tests/testconfig/configs_embed.go index 67e954ff503..31303357a43 100644 --- a/integration-tests/testconfig/configs_embed.go +++ b/integration-tests/testconfig/configs_embed.go @@ -7,11 +7,15 @@ import "embed" //go:embed default.toml //go:embed automation/automation.toml +//go:embed forwarder_ocr/forwarder_ocr.toml +//go:embed forwarder_ocr2/forwarder_ocr2.toml //go:embed functions/functions.toml //go:embed keeper/keeper.toml //go:embed log_poller/log_poller.toml //go:embed node/node.toml //go:embed ocr/ocr.toml +//go:embed ocr2/ocr2.toml +//go:embed vrf/vrf.toml //go:embed vrfv2/vrfv2.toml //go:embed vrfv2plus/vrfv2plus.toml var embeddedConfigsFs embed.FS diff --git a/integration-tests/testconfig/default.toml b/integration-tests/testconfig/default.toml index 397fc2ee792..d317d05bc49 100644 --- a/integration-tests/testconfig/default.toml +++ b/integration-tests/testconfig/default.toml @@ -80,10 +80,14 @@ DeltaReconcile = '5s' # override config toml related to EVMNode configs for chainlink nodes; applicable to all EVM node configs in chainlink toml CommonChainConfigTOML = """ +""" + +[NodeConfig.ChainConfigTOMLByChainID] +# applicable for simulated chain +1337 = """ AutoCreateKey = true FinalityDepth = 1 MinContractPayment = 0 - [GasEstimator] PriceMax = '200 gwei' LimitDefault = 6000000 diff --git a/integration-tests/testconfig/forwarder_ocr/example.toml b/integration-tests/testconfig/forwarder_ocr/example.toml index 314c1b6781c..0b762299af1 100644 --- a/integration-tests/testconfig/forwarder_ocr/example.toml +++ b/integration-tests/testconfig/forwarder_ocr/example.toml @@ -31,6 +31,8 @@ bearer_token_secret="bearer_token" base_url="http://grafana.url" # url of your grafana dashboard (prefix and suffix "/" are stirpped), example: /d/ad61652-2712-1722/my-dashboard dashboard_url="/d/your-dashboard" +# Grafana dashboard uid to annotate. Find it in Dashboard Settings -> JSON Model +dashboard_uid="dashboard-uid-to-annotate" bearer_token_secret="my-awesome-token" # if you want to use polygon_mumbial diff --git a/integration-tests/testconfig/forwarder_ocr/forwarder_ocr.toml b/integration-tests/testconfig/forwarder_ocr/forwarder_ocr.toml index 79e6763e24f..8fa0fa5db25 100644 --- a/integration-tests/testconfig/forwarder_ocr/forwarder_ocr.toml +++ b/integration-tests/testconfig/forwarder_ocr/forwarder_ocr.toml @@ -44,6 +44,11 @@ DeltaDial = '500ms' DeltaReconcile = '5s' """ +CommonChainConfigTOML = """ +[Transactions] +ForwardersEnabled = true +""" + [NodeConfig.ChainConfigTOMLByChainID] 1337 = """ AutoCreateKey = true @@ -54,4 +59,41 @@ MinContractPayment = 0 ForwardersEnabled = true """ +# load test specific configuration +[Load.OCR] +[Load.OCR.Common] +eth_funds = 3 + +[Load.OCR.Load] +test_duration = "3m" +rate_limit_unit_duration = "1m" +rate = 3 +verification_interval = "5s" +verification_timeout = "3m" +ea_change_interval = "5s" + +# volume test specific configuration +[Volume.OCR] +[Volume.OCR.Common] +eth_funds = 3 + +[Volume.OCR.Volume] +test_duration = "3m" +rate_limit_unit_duration = "1m" +vu_requests_per_unit = 10 +rate = 1 +verification_interval = "5s" +verification_timeout = "3m" +ea_change_interval = "5s" + +# soak test specific configuration +[Soak.Common] +chainlink_node_funding = 0.5 + +[Soak.OCR] +[Soak.OCR.Common] +test_duration = "15m" +[Soak.OCR.Soak] +number_of_contracts = 2 +time_between_rounds = "1m" diff --git a/integration-tests/testconfig/forwarder_ocr2/example.toml b/integration-tests/testconfig/forwarder_ocr2/example.toml index 9f99284cc29..b3bc45d270c 100644 --- a/integration-tests/testconfig/forwarder_ocr2/example.toml +++ b/integration-tests/testconfig/forwarder_ocr2/example.toml @@ -31,6 +31,8 @@ bearer_token_secret="bearer_token" base_url="http://grafana.url" # url of your grafana dashboard (prefix and suffix "/" are stirpped), example: /d/ad61652-2712-1722/my-dashboard dashboard_url="/d/your-dashboard" +# Grafana dashboard uid to annotate. Find it in Dashboard Settings -> JSON Model +dashboard_uid="dashboard-uid-to-annotate" bearer_token_secret="my-awesome-token" # if you want to use polygon_mumbial diff --git a/integration-tests/testconfig/forwarder_ocr2/forwarder_ocr2.toml b/integration-tests/testconfig/forwarder_ocr2/forwarder_ocr2.toml index f95b56f17cf..3f2a8610a83 100644 --- a/integration-tests/testconfig/forwarder_ocr2/forwarder_ocr2.toml +++ b/integration-tests/testconfig/forwarder_ocr2/forwarder_ocr2.toml @@ -40,6 +40,11 @@ DefaultTransactionQueueDepth = 0 ListenAddresses = ['0.0.0.0:6690'] """ +CommonChainConfigTOML = """ +[Transactions] +ForwardersEnabled = true +""" + [NodeConfig.ChainConfigTOMLByChainID] 1337 = """ AutoCreateKey = true @@ -50,4 +55,40 @@ MinContractPayment = 0 ForwardersEnabled = true """ +# load test specific configuration +[Load.OCR2.Common] +eth_funds = 3 + +[Load.OCR2.Load] +test_duration = "3m" +rate_limit_unit_duration = "1m" +rate = 3 +verification_interval = "5s" +verification_timeout = "3m" +ea_change_interval = "5s" + +# volume test specific configuration +[Volume.OCR2.Common] +eth_funds = 3 + +[Volume.OCR2.Volume] +test_duration = "3m" +rate_limit_unit_duration = "1m" +vu_requests_per_unit = 10 +rate = 1 +verification_interval = "5s" +verification_timeout = "3m" +ea_change_interval = "5s" + +# soak test specific configuration +[Soak.Common] +chainlink_node_funding = 1 + +[Soak.OCR2.Common] +test_duration="15m" + +[Soak.OCR2.Soak] +number_of_contracts=2 +time_between_rounds="1m" + diff --git a/integration-tests/testconfig/functions/example.toml b/integration-tests/testconfig/functions/example.toml index 77420ceaf30..7502a6fc440 100644 --- a/integration-tests/testconfig/functions/example.toml +++ b/integration-tests/testconfig/functions/example.toml @@ -31,6 +31,8 @@ bearer_token_secret="bearer_token" base_url="http://grafana.url" # url of your grafana dashboard (prefix and suffix "/" are stirpped), example: /d/ad61652-2712-1722/my-dashboard dashboard_url="/d/your-dashboard" +# Grafana dashboard uid to annotate. Find it in Dashboard Settings -> JSON Model +dashboard_uid="dashboard-uid-to-annotate" bearer_token_secret="my-awesome-token" # if you want to use simulated network diff --git a/integration-tests/testconfig/keeper/example.toml b/integration-tests/testconfig/keeper/example.toml index c9a5c829d38..5abb5835629 100644 --- a/integration-tests/testconfig/keeper/example.toml +++ b/integration-tests/testconfig/keeper/example.toml @@ -31,6 +31,8 @@ bearer_token_secret="bearer_token" base_url="http://grafana.url" # url of your grafana dashboard (prefix and suffix "/" are stirpped), example: /d/ad61652-2712-1722/my-dashboard dashboard_url="/d/your-dashboard" +# Grafana dashboard uid to annotate. Find it in Dashboard Settings -> JSON Model +dashboard_uid="dashboard-uid-to-annotate" bearer_token_secret="my-awesome-token" # if you want to use polygon_mumbial diff --git a/integration-tests/testconfig/keeper/keeper.toml b/integration-tests/testconfig/keeper/keeper.toml index 9b2a1a65891..b4a6a3b2c0e 100644 --- a/integration-tests/testconfig/keeper/keeper.toml +++ b/integration-tests/testconfig/keeper/keeper.toml @@ -30,11 +30,6 @@ Unauthenticated = 1000 [WebServer.TLS] HTTPSPort = 0 -[Database] -MaxIdleConns = 20 -MaxOpenConns = 40 -MigrateOnStartup = true - [Keeper] TurnLookBack = 0 """ @@ -62,4 +57,41 @@ contract_call_interval = "4s" [Seth] # keeper benchmark running on simulated network requires 100k per node -root_key_funds_buffer = 700_000 \ No newline at end of file +root_key_funds_buffer = 700_000 + +[Benchmark.NodeConfig] +BaseConfigTOML = """ +[Feature] +LogPoller = true + +[OCR2] +Enabled = true + +[P2P] +[P2P.V2] +Enabled = true +AnnounceAddresses = ["0.0.0.0:6690"] +ListenAddresses = ["0.0.0.0:6690"] +[Keeper] +TurnLookBack = 0 +[WebServer] +HTTPWriteTimeout = '1h' +""" + +CommonChainConfigTOML = """ +""" + +[Benchmark.NodeConfig.ChainConfigTOMLByChainID] +# applicable for simulated chain +1337 = """ +FinalityDepth = 50 +LogPollInterval = '1s' +MinIncomingConfirmations = 1 + +[HeadTracker] +HistoryDepth = 100 + +[GasEstimator] +Mode = 'FixedPrice' +LimitDefault = 5_000_000 +""" diff --git a/integration-tests/testconfig/log_poller/example.toml b/integration-tests/testconfig/log_poller/example.toml index 69d1263b94e..c28d36ae12f 100644 --- a/integration-tests/testconfig/log_poller/example.toml +++ b/integration-tests/testconfig/log_poller/example.toml @@ -31,6 +31,8 @@ bearer_token_secret="bearer_token" base_url="http://grafana.url" # url of your grafana dashboard (prefix and suffix "/" are stirpped), example: /d/ad61652-2712-1722/my-dashboard dashboard_url="/d/your-dashboard" +# Grafana dashboard uid to annotate. Find it in Dashboard Settings -> JSON Model +dashboard_uid="dashboard-uid-to-annotate" bearer_token_secret="my-awesome-token" # if you want to use polygon_mumbial diff --git a/integration-tests/testconfig/log_poller/log_poller.toml b/integration-tests/testconfig/log_poller/log_poller.toml index d2277d619a5..8c74a9a4cdb 100644 --- a/integration-tests/testconfig/log_poller/log_poller.toml +++ b/integration-tests/testconfig/log_poller/log_poller.toml @@ -81,8 +81,8 @@ use_finality_tag = true [LogPoller.Looped] execution_count = 100 -min_emit_wait_time_ms = 200 -max_emit_wait_time_ms = 500 +min_emit_wait_time_ms = 400 +max_emit_wait_time_ms = 600 # test-specific [TestLogPollerFewFiltersFixedDepth.NodeConfig] diff --git a/integration-tests/testconfig/node/example.toml b/integration-tests/testconfig/node/example.toml index e6777bc8352..510379b4f05 100644 --- a/integration-tests/testconfig/node/example.toml +++ b/integration-tests/testconfig/node/example.toml @@ -31,6 +31,8 @@ bearer_token_secret="bearer_token" base_url="http://grafana.url" # url of your grafana dashboard (prefix and suffix "/" are stirpped), example: /d/ad61652-2712-1722/my-dashboard dashboard_url="/d/your-dashboard" +# Grafana dashboard uid to annotate. Find it in Dashboard Settings -> JSON Model +dashboard_uid="dashboard-uid-to-annotate" bearer_token_secret="my-awesome-token" # if you want to use polygon_mumbial diff --git a/integration-tests/testconfig/ocr/example.toml b/integration-tests/testconfig/ocr/example.toml index 3f449566760..92262241dff 100644 --- a/integration-tests/testconfig/ocr/example.toml +++ b/integration-tests/testconfig/ocr/example.toml @@ -31,6 +31,8 @@ bearer_token_secret="bearer_token" base_url="http://grafana.url" # url of your grafana dashboard (prefix and suffix "/" are stirpped), example: /d/ad61652-2712-1722/my-dashboard dashboard_url="/d/your-dashboard" +# Grafana dashboard uid to annotate. Find it in Dashboard Settings -> JSON Model +dashboard_uid="dashboard-uid-to-annotate" bearer_token_secret="my-awesome-token" # if you want to use polygon_mumbial @@ -162,6 +164,5 @@ chainlink_node_funding = 100 test_duration="15m" [Soak.OCR.Soak] -ocr_version="1" number_of_contracts=2 -time_between_rounds="1m" \ No newline at end of file +time_between_rounds="1m" diff --git a/integration-tests/testconfig/ocr/ocr.go b/integration-tests/testconfig/ocr/ocr.go index 0fd995a96f1..f23d6473643 100644 --- a/integration-tests/testconfig/ocr/ocr.go +++ b/integration-tests/testconfig/ocr/ocr.go @@ -117,15 +117,11 @@ func (o *Volume) Validate() error { } type SoakConfig struct { - OCRVersion *string `toml:"ocr_version"` NumberOfContracts *int `toml:"number_of_contracts"` TimeBetweenRounds *blockchain.StrDuration `toml:"time_between_rounds"` } func (o *SoakConfig) Validate() error { - if o.OCRVersion == nil || *o.OCRVersion == "" { - return errors.New("ocr_version must be set to either 1 or 2") - } if o.NumberOfContracts == nil || *o.NumberOfContracts <= 1 { return errors.New("number_of_contracts must be set and be greater than 1") } diff --git a/integration-tests/testconfig/ocr/ocr.toml b/integration-tests/testconfig/ocr/ocr.toml index 4e280e88f04..ac0249334da 100644 --- a/integration-tests/testconfig/ocr/ocr.toml +++ b/integration-tests/testconfig/ocr/ocr.toml @@ -72,14 +72,13 @@ ea_change_interval = "5s" # soak test specific configuration [Soak.Common] -chainlink_node_funding = 100 +chainlink_node_funding = 0.5 [Soak.OCR] [Soak.OCR.Common] test_duration="15m" [Soak.OCR.Soak] -ocr_version="1" number_of_contracts=2 time_between_rounds="1m" @@ -105,7 +104,6 @@ chainlink_node_funding = 0.5 [TestOCRSoak_GethReorgBelowFinality_FinalityTagDisabled.OCR.Common] test_duration="15m" [TestOCRSoak_GethReorgBelowFinality_FinalityTagDisabled.OCR.Soak] -ocr_version="1" number_of_contracts=2 time_between_rounds="1m" @@ -133,17 +131,16 @@ chainlink_node_funding = 0.5 [TestOCRSoak_GethReorgBelowFinality_FinalityTagEnabled.OCR.Common] test_duration="15m" [TestOCRSoak_GethReorgBelowFinality_FinalityTagEnabled.OCR.Soak] -ocr_version="1" number_of_contracts=2 time_between_rounds="1m" + # OCR soak test configuration with gas spike on Anvil network [TestOCRSoak_GasSpike.Common] chainlink_node_funding = 0.5 [TestOCRSoak_GasSpike.OCR.Common] test_duration="15m" [TestOCRSoak_GasSpike.OCR.Soak] -ocr_version="1" number_of_contracts=2 time_between_rounds="1m" [TestOCRSoak_GasSpike.Network] @@ -162,7 +159,6 @@ chainlink_node_funding = 0.5 [TestOCRSoak_ChangeBlockGasLimit.OCR.Common] test_duration="15m" [TestOCRSoak_ChangeBlockGasLimit.OCR.Soak] -ocr_version="1" number_of_contracts=2 time_between_rounds="1m" [TestOCRSoak_ChangeBlockGasLimit.Network] @@ -178,7 +174,6 @@ chainlink_node_funding = 0.5 [TestOCRSoak_RPCDownForAllCLNodes.OCR.Common] test_duration="15m" [TestOCRSoak_RPCDownForAllCLNodes.OCR.Soak] -ocr_version="1" number_of_contracts=2 time_between_rounds="1m" [TestOCRSoak_RPCDownForAllCLNodes.Network] @@ -189,8 +184,7 @@ chainlink_node_funding = 0.5 [TestOCRSoak_RPCDownForHalfCLNodes.OCR.Common] test_duration="15m" [TestOCRSoak_RPCDownForHalfCLNodes.OCR.Soak] -ocr_version="1" number_of_contracts=2 time_between_rounds="1m" [TestOCRSoak_RPCDownForHalfCLNodes.Network] -selected_networks=["simulated"] \ No newline at end of file +selected_networks=["simulated"] diff --git a/integration-tests/testconfig/ocr2/example.toml b/integration-tests/testconfig/ocr2/example.toml index 6e7138aeda3..36e3105f219 100644 --- a/integration-tests/testconfig/ocr2/example.toml +++ b/integration-tests/testconfig/ocr2/example.toml @@ -31,6 +31,8 @@ bearer_token_secret="bearer_token" base_url="http://grafana.url" # url of your grafana dashboard (prefix and suffix "/" are stirpped), example: /d/ad61652-2712-1722/my-dashboard dashboard_url="/d/your-dashboard" +# Grafana dashboard uid to annotate. Find it in Dashboard Settings -> JSON Model +dashboard_uid="dashboard-uid-to-annotate" bearer_token_secret="my-awesome-token" # if you want to use polygon_mumbial @@ -141,11 +143,11 @@ BumpMin = '100 gwei' """ # load test specific configuration -[Load.OCR] -[Load.OCR.Common] +[Load.OCR2] +[Load.OCR2.Common] eth_funds = 3 -[Load.OCR.Load] +[Load.OCR2.Load] test_duration = "3m" rate_limit_unit_duration = "1m" rate = 3 @@ -157,11 +159,10 @@ ea_change_interval = "5s" [Soak.Common] chainlink_node_funding = 100 -[Soak.OCR] +[Soak.OCR2] [Soak.OCR.Common] test_duration="15m" -[Soak.OCR.Soak] -ocr_version="1" +[Soak.OCR2.Soak] number_of_contracts=2 -time_between_rounds="1m" \ No newline at end of file +time_between_rounds="1m" diff --git a/integration-tests/testconfig/ocr2/ocr2.go b/integration-tests/testconfig/ocr2/ocr2.go index c039de0ff6f..73c9cd10056 100644 --- a/integration-tests/testconfig/ocr2/ocr2.go +++ b/integration-tests/testconfig/ocr2/ocr2.go @@ -1,4 +1,4 @@ -package ocr +package ocr2 import ( "errors" @@ -38,15 +38,11 @@ func (o *Common) Validate() error { } type SoakConfig struct { - OCRVersion *string `toml:"ocr_version"` NumberOfContracts *int `toml:"number_of_contracts"` TimeBetweenRounds *blockchain.StrDuration `toml:"time_between_rounds"` } func (o *SoakConfig) Validate() error { - if o.OCRVersion == nil || *o.OCRVersion == "" { - return errors.New("ocr_version must be set to either 1 or 2") - } if o.NumberOfContracts == nil || *o.NumberOfContracts <= 1 { return errors.New("number_of_contracts must be set and be greater than 1") } diff --git a/integration-tests/testconfig/ocr2/ocr2.toml b/integration-tests/testconfig/ocr2/ocr2.toml index 856dd73beb3..ad195913bd0 100644 --- a/integration-tests/testconfig/ocr2/ocr2.toml +++ b/integration-tests/testconfig/ocr2/ocr2.toml @@ -44,11 +44,11 @@ ListenAddresses = ['0.0.0.0:6690'] """ # load test specific configuration -[Load.OCR] -[Load.OCR.Common] +[Load.OCR2] +[Load.OCR2.Common] eth_funds = 3 -[Load.OCR.Load] +[Load.OCR2.Load] test_duration = "3m" rate_limit_unit_duration = "1m" rate = 3 @@ -57,11 +57,11 @@ verification_timeout = "3m" ea_change_interval = "5s" # volume test specific configuration -[Volume.OCR] -[Volume.OCR.Common] +[Volume.OCR2] +[Volume.OCR2.Common] eth_funds = 3 -[Volume.OCR.Volume] +[Volume.OCR2.Volume] test_duration = "3m" rate_limit_unit_duration = "1m" vu_requests_per_unit = 10 @@ -72,13 +72,12 @@ ea_change_interval = "5s" # soak test specific configuration [Soak.Common] -chainlink_node_funding = 100 +chainlink_node_funding = 0.5 -[Soak.OCR] -[Soak.OCR.Common] +[Soak.OCR2] +[Soak.OCR2.Common] test_duration="15m" -[Soak.OCR.Soak] -ocr_version="1" +[Soak.OCR2.Soak] number_of_contracts=2 -time_between_rounds="1m" \ No newline at end of file +time_between_rounds="1m" diff --git a/integration-tests/testconfig/testconfig.go b/integration-tests/testconfig/testconfig.go index 624c374491b..5ddb70e5012 100644 --- a/integration-tests/testconfig/testconfig.go +++ b/integration-tests/testconfig/testconfig.go @@ -13,6 +13,7 @@ import ( "github.com/google/uuid" "github.com/pelletier/go-toml/v2" "github.com/pkg/errors" + "github.com/rs/zerolog" "golang.org/x/text/cases" "golang.org/x/text/language" @@ -21,14 +22,15 @@ import ( ctf_config "github.com/smartcontractkit/chainlink-testing-framework/config" k8s_config "github.com/smartcontractkit/chainlink-testing-framework/k8s/config" "github.com/smartcontractkit/chainlink-testing-framework/logging" + "github.com/smartcontractkit/chainlink-testing-framework/networks" "github.com/smartcontractkit/chainlink-testing-framework/utils/conversions" "github.com/smartcontractkit/chainlink-testing-framework/utils/osutil" + a_config "github.com/smartcontractkit/chainlink/integration-tests/testconfig/automation" f_config "github.com/smartcontractkit/chainlink/integration-tests/testconfig/functions" keeper_config "github.com/smartcontractkit/chainlink/integration-tests/testconfig/keeper" lp_config "github.com/smartcontractkit/chainlink/integration-tests/testconfig/log_poller" ocr_config "github.com/smartcontractkit/chainlink/integration-tests/testconfig/ocr" - ocr2_config "github.com/smartcontractkit/chainlink/integration-tests/testconfig/ocr2" vrf_config "github.com/smartcontractkit/chainlink/integration-tests/testconfig/vrf" vrfv2_config "github.com/smartcontractkit/chainlink/integration-tests/testconfig/vrfv2" vrfv2plus_config "github.com/smartcontractkit/chainlink/integration-tests/testconfig/vrfv2plus" @@ -63,11 +65,11 @@ type AutomationTestConfig interface { } type OcrTestConfig interface { - GetOCRConfig() *ocr_config.Config + GetActiveOCRConfig() *ocr_config.Config } type Ocr2TestConfig interface { - GetOCR2Config() *ocr2_config.Config + GetOCR2Config() *ocr_config.Config } type TestConfig struct { @@ -79,12 +81,19 @@ type TestConfig struct { Keeper *keeper_config.Config `toml:"Keeper"` LogPoller *lp_config.Config `toml:"LogPoller"` OCR *ocr_config.Config `toml:"OCR"` - OCR2 *ocr2_config.Config `toml:"OCR2"` + OCR2 *ocr_config.Config `toml:"OCR2"` VRF *vrf_config.Config `toml:"VRF"` VRFv2 *vrfv2_config.Config `toml:"VRFv2"` VRFv2Plus *vrfv2plus_config.Config `toml:"VRFv2Plus"` + CRIB *CRIB `toml:"CRIB"` + + ConfigurationNames []string `toml:"-"` +} - ConfigurationName string `toml:"-"` +type CRIB struct { + Namespace string `toml:"namespace"` + NetworkName string `toml:"network_name"` + CLNodesNum int `toml:"nodes"` } var embeddedConfigs embed.FS @@ -196,14 +205,22 @@ func (c TestConfig) GetOCRConfig() *ocr_config.Config { return c.OCR } -func (c TestConfig) GetConfigurationName() string { - return c.ConfigurationName +func (c TestConfig) GetConfigurationNames() []string { + return c.ConfigurationNames } func (c TestConfig) GetSethConfig() *seth.Config { return c.Seth } +func (c TestConfig) GetActiveOCRConfig() *ocr_config.Config { + if c.OCR != nil { + return c.OCR + } + + return c.OCR2 +} + func (c *TestConfig) AsBase64() (string, error) { content, err := toml.Marshal(*c) if err != nil { @@ -239,7 +256,6 @@ const ( Node Product = "node" OCR Product = "ocr" OCR2 Product = "ocr2" - OCR2VRF Product = "ocr2vrf" RunLog Product = "runlog" VRF Product = "vrf" VRFv2 Product = "vrfv2" @@ -259,15 +275,23 @@ func GetConfigurationNameFromEnv() (string, error) { const ( Base64OverrideEnvVarName = k8s_config.EnvBase64ConfigOverride - NoKey = "NO_KEY" ) -func GetConfig(configurationName string, product Product) (TestConfig, error) { +func GetConfig(configurationNames []string, product Product) (TestConfig, error) { logger := logging.GetTestLogger(nil) - configurationName = strings.ReplaceAll(configurationName, "/", "_") - configurationName = strings.ReplaceAll(configurationName, " ", "_") - configurationName = cases.Title(language.English, cases.NoLower).String(configurationName) + for idx, configurationName := range configurationNames { + configurationNames[idx] = strings.ReplaceAll(configurationName, "/", "_") + configurationNames[idx] = strings.ReplaceAll(configurationName, " ", "_") + configurationNames[idx] = cases.Title(language.English, cases.NoLower).String(configurationName) + } + + // add unnamed (default) configuration as the first one to be read + configurationNamesCopy := make([]string, len(configurationNames)) + copy(configurationNamesCopy, configurationNames) + + configurationNames = append([]string{""}, configurationNamesCopy...) + fileNames := []string{ "default.toml", fmt.Sprintf("%s.toml", product), @@ -275,8 +299,9 @@ func GetConfig(configurationName string, product Product) (TestConfig, error) { } testConfig := TestConfig{} - testConfig.ConfigurationName = configurationName - logger.Debug().Msgf("Will apply configuration named '%s' if it is found in any of the configs", configurationName) + testConfig.ConfigurationNames = configurationNames + + logger.Debug().Msgf("Will apply configurations named '%s' if they are found in any of the configs", strings.Join(configurationNames, ",")) // read embedded configs is build tag "embed" is set // this makes our life much easier when using a binary @@ -292,9 +317,11 @@ func GetConfig(configurationName string, product Product) (TestConfig, error) { return TestConfig{}, errors.Wrapf(err, "error reading embedded config") } - err = ctf_config.BytesToAnyTomlStruct(logger, fileName, configurationName, &testConfig, file) - if err != nil { - return TestConfig{}, errors.Wrapf(err, "error unmarshalling embedded config") + for _, configurationName := range configurationNames { + err = ctf_config.BytesToAnyTomlStruct(logger, fileName, configurationName, &testConfig, file) + if err != nil { + return TestConfig{}, errors.Wrapf(err, "error unmarshalling embedded config %s", embeddedFiles) + } } } } else { @@ -316,13 +343,23 @@ func GetConfig(configurationName string, product Product) (TestConfig, error) { return TestConfig{}, errors.Wrapf(err, "error reading file %s", filePath) } - err = ctf_config.BytesToAnyTomlStruct(logger, fileName, configurationName, &testConfig, content) - if err != nil { - return TestConfig{}, errors.Wrapf(err, "error reading file %s", filePath) + _ = checkSecretsInToml(content) + + for _, configurationName := range configurationNames { + err = ctf_config.BytesToAnyTomlStruct(logger, fileName, configurationName, &testConfig, content) + if err != nil { + return TestConfig{}, errors.Wrapf(err, "error reading file %s", filePath) + } } } } + // it needs some custom logic, so we do it separately + err := testConfig.readNetworkConfiguration() + if err != nil { + return TestConfig{}, errors.Wrapf(err, "error reading network config") + } + logger.Info().Msg("Reading configs from Base64 override env var") configEncoded, isSet := os.LookupEnv(Base64OverrideEnvVarName) if isSet && configEncoded != "" { @@ -332,18 +369,28 @@ func GetConfig(configurationName string, product Product) (TestConfig, error) { return TestConfig{}, err } - err = ctf_config.BytesToAnyTomlStruct(logger, Base64OverrideEnvVarName, configurationName, &testConfig, decoded) - if err != nil { - return TestConfig{}, errors.Wrapf(err, "error unmarshaling base64 config") + _ = checkSecretsInToml(decoded) + + for _, configurationName := range configurationNames { + err = ctf_config.BytesToAnyTomlStruct(logger, Base64OverrideEnvVarName, configurationName, &testConfig, decoded) + if err != nil { + return TestConfig{}, errors.Wrapf(err, "error unmarshaling base64 config") + } } } else { logger.Debug().Msg("Base64 config override from environment variable not found") } - // it needs some custom logic, so we do it separately - err := testConfig.readNetworkConfiguration() + logger.Info().Msg("Loading config values from default ~/.testsecrets env file") + err = ctf_config.LoadSecretEnvsFromFiles() if err != nil { - return TestConfig{}, errors.Wrapf(err, "error reading network config") + return TestConfig{}, errors.Wrapf(err, "error reading test config values from ~/.testsecrets file") + } + + logger.Info().Msg("Reading values from environment variables") + err = testConfig.ReadFromEnvVar() + if err != nil { + return TestConfig{}, errors.Wrapf(err, "error reading test config values from env vars") } logger.Debug().Msg("Validating test config") @@ -358,27 +405,34 @@ func GetConfig(configurationName string, product Product) (TestConfig, error) { testConfig.Common = &Common{} } + testConfig.logRiskySettings(logger) + + logger.Debug().Msg("Correct test config constructed successfully") + return testConfig, nil +} + +func (c *TestConfig) logRiskySettings(logger zerolog.Logger) { isAnySimulated := false - for _, network := range testConfig.Network.SelectedNetworks { + for _, network := range c.Network.SelectedNetworks { if strings.Contains(strings.ToUpper(network), "SIMULATED") { isAnySimulated = true break } } - if testConfig.Seth != nil && !isAnySimulated && (testConfig.Seth.EphemeralAddrs != nil && *testConfig.Seth.EphemeralAddrs != 0) { - testConfig.Seth.EphemeralAddrs = new(int64) + if c.Seth != nil && !isAnySimulated && (c.Seth.EphemeralAddrs != nil && *c.Seth.EphemeralAddrs != 0) { + c.Seth.EphemeralAddrs = new(int64) logger.Warn(). Msg("Ephemeral addresses were enabled, but test was setup to run on a live network. Ephemeral addresses will be disabled.") } - if testConfig.Seth != nil && (testConfig.Seth.EphemeralAddrs != nil && *testConfig.Seth.EphemeralAddrs != 0) { - rootBuffer := testConfig.Seth.RootKeyFundsBuffer + if c.Seth != nil && (c.Seth.EphemeralAddrs != nil && *c.Seth.EphemeralAddrs != 0) { + rootBuffer := c.Seth.RootKeyFundsBuffer zero := int64(0) if rootBuffer == nil { rootBuffer = &zero } - clNodeFunding := testConfig.Common.ChainlinkNodeFunding + clNodeFunding := c.Common.ChainlinkNodeFunding if clNodeFunding == nil { zero := 0.0 clNodeFunding = &zero @@ -405,8 +459,66 @@ root_key_funds_buffer = 1_000 } } - logger.Debug().Msg("Correct test config constructed successfully") - return testConfig, nil + var customChainSettings []string + for _, network := range networks.MustGetSelectedNetworkConfig(c.Network) { + if c.NodeConfig != nil && len(c.NodeConfig.ChainConfigTOMLByChainID) > 0 { + if _, ok := c.NodeConfig.ChainConfigTOMLByChainID[fmt.Sprint(network.ChainID)]; ok { + logger.Warn().Msgf("You have provided custom Chainlink Node configuration for network '%s' (chain id: %d). Chainlink Node's default settings won't be used", network.Name, network.ChainID) + customChainSettings = append(customChainSettings, fmt.Sprint(network.ChainID)) + } + } + } + + if len(customChainSettings) == 0 && c.NodeConfig != nil && c.NodeConfig.CommonChainConfigTOML != "" { + logger.Warn().Msg("***** You have provided your own default Chainlink Node configuration for all networks. Chainlink Node's default settings for selected networks won't be used *****") + } + +} + +// checkSecretsInToml checks if the TOML file contains secrets and shows error logs if it does +// This is a temporary and will be removed after migration to test secrets from env vars +func checkSecretsInToml(content []byte) error { + logger := logging.GetTestLogger(nil) + data := make(map[string]interface{}) + + // Decode the TOML data + err := toml.Unmarshal(content, &data) + if err != nil { + return errors.Wrapf(err, "error decoding TOML file") + } + + logError := func(key, envVar string) { + logger.Error().Msgf("Error in TOML test config!! TOML cannot have '%s' key. Remove it and set %s env in ~/.testsecrets instead", key, envVar) + } + + if data["ChainlinkImage"] != nil { + chainlinkImage := data["ChainlinkImage"].(map[string]interface{}) + if chainlinkImage["image"] != nil { + logError("ChainlinkImage.image", "E2E_TEST_CHAINLINK_IMAGE") + } + } + + if data["ChainlinkUpgradeImage"] != nil { + chainlinkUpgradeImage := data["ChainlinkUpgradeImage"].(map[string]interface{}) + if chainlinkUpgradeImage["image"] != nil { + logError("ChainlinkUpgradeImage.image", "E2E_TEST_CHAINLINK_UPGRADE_IMAGE") + } + } + + if data["Network"] != nil { + network := data["Network"].(map[string]interface{}) + if network["RpcHttpUrls"] != nil { + logError("Network.RpcHttpUrls", "`E2E_TEST_(.+)_RPC_HTTP_URL$` like E2E_TEST_ARBITRUM_SEPOLIA_RPC_HTTP_URL") + } + if network["RpcWsUrls"] != nil { + logError("Network.RpcWsUrls", "`E2E_TEST_(.+)_RPC_WS_URL$` like E2E_TEST_ARBITRUM_SEPOLIA_RPC_WS_URL") + } + if network["WalletKeys"] != nil { + logError("Network.wallet_keys", "`E2E_TEST_(.+)_WALLET_KEY$` E2E_TEST_ARBITRUM_SEPOLIA_WALLET_KEY") + } + } + + return nil } func (c *TestConfig) readNetworkConfiguration() error { @@ -526,6 +638,12 @@ func (c *TestConfig) Validate() error { } } + if c.OCR2 != nil { + if err := c.OCR2.Validate(); err != nil { + return errors.Wrapf(err, "OCR2 config validation failed") + } + } + if c.VRF != nil { if err := c.VRF.Validate(); err != nil { return errors.Wrapf(err, "VRF config validation failed") diff --git a/integration-tests/testconfig/testconfig_test.go b/integration-tests/testconfig/testconfig_test.go index fd5230dac2d..91d2524fcf0 100644 --- a/integration-tests/testconfig/testconfig_test.go +++ b/integration-tests/testconfig/testconfig_test.go @@ -76,7 +76,7 @@ func TestBase64ConfigRead(t *testing.T) { testConfigEncoded := base64.StdEncoding.EncodeToString(configMarshalled) os.Setenv(Base64OverrideEnvVarName, testConfigEncoded) - readConfig, err := GetConfig("test", Automation) + readConfig, err := GetConfig([]string{"test"}, Automation) require.NoError(t, err, "Error reading config") require.NotNil(t, readConfig.Automation, "Automation config read from base64 is nil") diff --git a/integration-tests/testconfig/testconfig_utils.go b/integration-tests/testconfig/testconfig_utils.go index d4290689bc0..e7b38ea3e4e 100644 --- a/integration-tests/testconfig/testconfig_utils.go +++ b/integration-tests/testconfig/testconfig_utils.go @@ -9,32 +9,21 @@ import ( // MissingImageInfoAsError return a helfpul error message when the no Chainlink image info is found in TOML config. // If legacy env vars are found it prints ready to use TOML configuration func MissingImageInfoAsError(errStr string) error { - intro := ` -You might have used old configuration approach. If so, use TOML instead of env vars. + missingImage := ` +Chainlink image is a secret and must be set as env var in ~/.testsecrets file or passed as env var (either E2E_TEST_CHAINLINK_IMAGE or E2E_TEST_CHAINLINK_UPGRADE_IMAGE). You might have used old configuration approach. Please refer to integration-tests/testconfig/README.md for more information. +` + missingVersion := ` +Chainlink version must be set in toml config. ` - var imgStr, versionStr string - - if img := os.Getenv("CHAINLINK_IMAGE"); img != "" { - imgStr = fmt.Sprintf("image = \"%s\"\n", img) - } - - if version := os.Getenv("CHAINLINK_VERSION"); version != "" { - versionStr = fmt.Sprintf("version = \"%s\"\n", version) + if os.Getenv("E2E_TEST_CHAINLINK_IMAGE") == "" || os.Getenv("E2E_TEST_CHAINLINK_UPGRADE_IMAGE") == "" { + return fmt.Errorf(fmt.Sprintf("%s\n%s", errStr, missingImage)) } - - finalErrStr := fmt.Sprintf("%s\n%s", errStr, intro) - - if imgStr != "" && versionStr != "" { - extraInfo := ` -Or if you want to run your tests right now add following content to integration-tests/testconfig/overrides.toml: -[ChainlinkImage] -` - finalErrStr = fmt.Sprintf("%s\n%s%s%s%s", errStr, intro, extraInfo, imgStr, versionStr) + if os.Getenv("CHAINLINK_VERSION") == "" || os.Getenv("CHAINLINK_UPGRADE_VERSION") == "" { + return fmt.Errorf(fmt.Sprintf("%s\n%s", errStr, missingVersion)) } - - return fmt.Errorf(finalErrStr) + return fmt.Errorf(errStr) } // NoSelectedNetworkInfoAsError return a helfpul error message when the no selected network info is found in TOML config. @@ -68,3 +57,22 @@ selected_networks=` return fmt.Errorf(finalErrStr) } + +func GetChainAndTestTypeSpecificConfig(testType string, product Product) (TestConfig, error) { + config, err := GetConfig([]string{testType}, product) + if err != nil { + return TestConfig{}, fmt.Errorf("error getting config: %w", err) + } + config, err = GetConfig( + []string{ + testType, + config.GetNetworkConfig().SelectedNetworks[0], + fmt.Sprintf("%s-%s", config.GetNetworkConfig().SelectedNetworks[0], testType), + }, + product, + ) + if err != nil { + return TestConfig{}, fmt.Errorf("error getting config: %w", err) + } + return config, err +} diff --git a/integration-tests/testconfig/vrfv2/example.toml b/integration-tests/testconfig/vrfv2/example.toml index 7b15597d59a..9417a422cf0 100644 --- a/integration-tests/testconfig/vrfv2/example.toml +++ b/integration-tests/testconfig/vrfv2/example.toml @@ -31,6 +31,8 @@ bearer_token_secret="bearer_token" base_url="http://grafana.url" # url of your grafana dashboard (prefix and suffix "/" are stirpped), example: /d/ad61652-2712-1722/my-dashboard dashboard_url="/d/your-dashboard" +# Grafana dashboard uid to annotate. Find it in Dashboard Settings -> JSON Model +dashboard_uid="dashboard-uid-to-annotate" bearer_token_secret="my-awesome-token" # if you want to use polygon_mumbial diff --git a/integration-tests/testconfig/vrfv2/vrfv2.toml b/integration-tests/testconfig/vrfv2/vrfv2.toml index 4ff48a3181a..011e90c15fd 100644 --- a/integration-tests/testconfig/vrfv2/vrfv2.toml +++ b/integration-tests/testconfig/vrfv2/vrfv2.toml @@ -59,6 +59,7 @@ cl_node_max_gas_price_gwei = 10 link_native_feed_response = 1000000000000000000 #todo - need to have separate minimum_confirmations config for Coordinator, CL Node and Consumer request minimum_confirmations = 3 +generate_txs_on_chain = false number_of_words = 3 callback_gas_limit = 1000000 @@ -102,6 +103,12 @@ bhs_job_lookback_blocks = 250 bhs_job_poll_period = "1s" bhs_job_run_timeout = "24h" +# BHF Job config +bhf_job_wait_blocks = 260 +bhf_job_lookback_blocks = 500 +bhf_job_poll_period = "30s" +bhf_job_run_timeout = "1h" + # PERFORMANCE test specific config [VRFv2.ExistingEnv] diff --git a/integration-tests/testconfig/vrfv2plus/config.go b/integration-tests/testconfig/vrfv2plus/config.go index eb5ba061984..9d863afdd14 100644 --- a/integration-tests/testconfig/vrfv2plus/config.go +++ b/integration-tests/testconfig/vrfv2plus/config.go @@ -55,6 +55,10 @@ type General struct { CoordinatorGasOverheadLink *uint32 `toml:"coordinator_gas_overhead_link"` CoordinatorNativePremiumPercentage *uint8 `toml:"coordinator_native_premium_percentage"` CoordinatorLinkPremiumPercentage *uint8 `toml:"coordinator_link_premium_percentage"` + + //OP Stack chains settings + L1FeeCalculationMode uint8 `toml:"l1_fee_calculation_mode"` + L1FeeCoefficient uint8 `toml:"l1_fee_coefficient"` } func (c *General) Validate() error { diff --git a/integration-tests/testconfig/vrfv2plus/example.toml b/integration-tests/testconfig/vrfv2plus/example.toml index 7931b879084..d6e7a3f28d5 100644 --- a/integration-tests/testconfig/vrfv2plus/example.toml +++ b/integration-tests/testconfig/vrfv2plus/example.toml @@ -31,6 +31,8 @@ bearer_token_secret="bearer_token" base_url="http://grafana.url" # url of your grafana dashboard (prefix and suffix "/" are stirpped), example: /d/ad61652-2712-1722/my-dashboard dashboard_url="/d/your-dashboard" +# Grafana dashboard uid to annotate. Find it in Dashboard Settings -> JSON Model +dashboard_uid="dashboard-uid-to-annotate" bearer_token_secret="my-awesome-token" # if you want to use polygon_mumbial diff --git a/integration-tests/testconfig/vrfv2plus/vrfv2plus.toml b/integration-tests/testconfig/vrfv2plus/vrfv2plus.toml index 717a62e997f..8f8aa9530e7 100644 --- a/integration-tests/testconfig/vrfv2plus/vrfv2plus.toml +++ b/integration-tests/testconfig/vrfv2plus/vrfv2plus.toml @@ -67,6 +67,7 @@ use_existing_env = false minimum_confirmations = 3 # Can be "LINK", "NATIVE" or "LINK_AND_NATIVE" subscription_billing_type = "LINK_AND_NATIVE" +generate_txs_on_chain = false #CL Node config cl_node_max_gas_price_gwei = 10 @@ -96,6 +97,10 @@ fulfillment_flat_fee_link_discount_ppm=0 native_premium_percentage=24 link_premium_percentage=20 +# 0 = L1_GAS_FEES_MODE; 1 = L1_CALLDATA_GAS_COST_MODE; 2 = L1_GAS_FEES_UPPER_BOUND_MODE +l1_fee_calculation_mode = 2 +l1_fee_coefficient = 80 + # Wrapper config wrapped_gas_overhead = 50000 coordinator_gas_overhead_native = 52000 @@ -123,6 +128,12 @@ bhs_job_lookback_blocks = 250 bhs_job_poll_period = "1s" bhs_job_run_timeout = "24h" +# BHF Job config +bhf_job_wait_blocks = 260 +bhf_job_lookback_blocks = 500 +bhf_job_poll_period = "30s" +bhf_job_run_timeout = "1h" + # PERFORMANCE test specific config [VRFv2Plus.ExistingEnv] @@ -143,29 +154,21 @@ bhs_test_duration = "10s" bhs_test_rate_limit_unit_duration = "3s" bhs_test_rps = 1 -[Smoke.VRFv2.Performance] -test_duration = "10s" -rate_limit_unit_duration = "3s" -rps = 1 -bhs_test_duration = "10s" -bhs_test_rate_limit_unit_duration = "3s" -bhs_test_rps = 1 - #SOAK TEST CONFIG [Soak.Common] chainlink_node_funding = 0.1 [Soak.VRFv2Plus.General] -randomness_request_count_per_request = 3 # amount of randomness requests to make per one TX request -randomness_request_count_per_request_deviation = 2 #NOTE - deviation should be less than randomness_request_count_per_request setting +randomness_request_count_per_request = 4 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 0 #NOTE - deviation should be less than randomness_request_count_per_request setting number_of_sub_to_create = 1 number_of_sending_keys_to_create = 0 -subscription_funding_amount_link = 5.0 -subscription_funding_amount_native=1 +subscription_funding_amount_link = 50 +subscription_funding_amount_native=10 [Soak.VRFv2Plus.Performance] test_duration = "2m" -rate_limit_unit_duration = "3s" +rate_limit_unit_duration = "10s" rps = 1 bhs_test_duration = "1m" bhs_test_rate_limit_unit_duration = "3s" @@ -211,3 +214,992 @@ bhs_test_duration = "1m" bhs_test_rate_limit_unit_duration = "3s" bhs_test_rps = 1 +### POLYGON AMOY Config + +[POLYGON_AMOY.VRFv2Plus.General] +#todo - need to have separate minimum_confirmations config for Coordinator, CL Node and Consumer request +minimum_confirmations = 3 + +# Consumer Request config +subscription_billing_type = "LINK_AND_NATIVE" +callback_gas_limit = 1000000 + +# NEW ENV CONFIG +# CL Node config +cl_node_max_gas_price_gwei = 200 +number_of_sending_keys_to_create = 0 + +# Coordinator config +max_gas_limit_coordinator_config = 2500000 +fallback_wei_per_unit_link = "19823132181656390000" +staleness_seconds = 172_800 +gas_after_payment_calculation = 48_500 +fulfillment_flat_fee_native_ppm = 0 +fulfillment_flat_fee_link_discount_ppm = 0 +native_premium_percentage = 84 +link_premium_percentage = 70 + +# Wrapper config +wrapped_gas_overhead = 13_400 +coordinator_gas_overhead_native = 99_500 +coordinator_gas_overhead_link = 121_500 +coordinator_gas_overhead_per_word = 435 +coordinator_native_premium_percentage = 84 +coordinator_link_premium_percentage = 70 +wrapper_max_number_of_words = 10 + +# VRF Job config +vrf_job_forwarding_allowed = false +vrf_job_estimate_gas_multiplier = 3.0 +vrf_job_batch_fulfillment_enabled = true +vrf_job_batch_fulfillment_gas_multiplier = 1.1 +vrf_job_poll_period = "2s" +vrf_job_request_timeout = "2h0m0s" +vrf_job_simulation_block = "latest" + +# BHS Job config +bhs_job_wait_blocks = 30 +bhs_job_lookback_blocks = 200 +bhs_job_poll_period = "2s" +bhs_job_run_timeout = "30s" +# NEW ENV CONFIG END + +[POLYGON_AMOY.VRFv2Plus.ExistingEnv] +coordinator_address = "0x7541EbaE23f32B4A1A2e7a8Cbf9da9582767A9B4" +consumer_address = "" +sub_id = "" +key_hash = "0xd360445bacd26df47086ccf255c4f932d297ed8d5c7334b51eed32f61c541601" +#key_hash = "0x2328cbee29e32d0b6662d6df82ff0fea7be300bd310561c92f515c9ee19464f1" +#key_hash = "0x25f4e2d0509f42ec77db5380f3433a89fe623fa75f65d5b398d5f498327be4dd" +create_fund_subs_and_add_consumers = true +link_address = "0x0Fd9e8d3aF1aaee056EB9e802c3A762a667b1904" +node_sending_key_funding_min = 10 +node_sending_keys = [ + "0xD96013C241f1741C35a135321969f92Aae02A12F", + "0x0580E61a5523F5CAAC4968E4f8FE63b59596BdD7", + "0xd15FcEa6a6AA17085930Fbd5647A9F7fD2Ff58b8", + "0xB7277cBb6E7028AE65235b8ee9201AcBb14B11d4", + "0x6D36a1dC1eEd25C75961E989c4d01Cd4453bE465", + "0xd299Cd7C0073b71e620bf8A3bfD50F75c0b49af8", + "0x48BE7BAED0b65776D85DF971fA901c637cFC5e87", + # BHS + "0x638372de870eF0F8E675A3f67F18D5bd4A2fd804", + "0xF9eF03816411D037202d5ed4457dC1613e3bd729", + "0xCD66973f8fbaE787211EC20228c6bd90D83562A8", + "0x242ea1F4Bb72EF643B2D8EF22e18a89f00742F40", + "0xaA09B4F9B5710b239fdbf1D0f535dd7f86F91219", + "0xe6b72B647B8B45C5562F7a5259E187889C747d3b", + "0x2c1185C4d3B0B4a577d4079Ee193A4e293164D9d" +] + +#SMOKE TEST CONFIG +[POLYGON_AMOY-Smoke.VRFv2Plus.General] +randomness_request_count_per_request = 1 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 0 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 5 +subscription_funding_amount_native = 1 +subscription_refunding_amount_link = 5 +subscription_refunding_amount_native = 1 +number_of_words = 1 +random_words_fulfilled_event_timeout = "1m30s" +wait_for_256_blocks_timeout = "15m" + +wrapper_consumer_funding_amount_native_token = 1.0 +wrapper_consumer_funding_amount_link = 5 + + +[POLYGON_AMOY-Smoke.VRFv2Plus.Performance] +test_duration = "2s" +rate_limit_unit_duration = "15s" +rps = 1 + + +#SOAK TEST CONFIG +[POLYGON_AMOY-Soak.VRFv2Plus.General] +randomness_request_count_per_request = 1 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 0 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 500 +subscription_funding_amount_native = 200 + +[POLYGON_AMOY-Soak.VRFv2Plus.Performance] +test_duration = "5h" +rate_limit_unit_duration = "3s" +rps = 1 + +# LOAD TEST CONFIG +[POLYGON_AMOY-Load.VRFv2Plus.General] +randomness_request_count_per_request = 3 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 2 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 300 +subscription_funding_amount_native = 300 + +[POLYGON_AMOY-Load.VRFv2Plus.Performance] +test_duration = "2m" +rate_limit_unit_duration = "3s" +rps = 1 + + +# STRESS TEST CONFIG +[POLYGON_AMOY-Stress.VRFv2Plus.General] +randomness_request_count_per_request = 3 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 2 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 5.0 +subscription_funding_amount_native = 0.1 + +[POLYGON_AMOY-Stress.VRFv2Plus.Performance] +test_duration = "2m" +rate_limit_unit_duration = "3s" +rps = 1 + +### ARBITRUM SEPOLIA Config + +[ARBITRUM_SEPOLIA.VRFv2Plus.General] +#todo - need to have separate minimum_confirmations config for Coordinator, CL Node and Consumer request +minimum_confirmations = 0 +subscription_billing_type = "LINK_AND_NATIVE" + +cl_node_max_gas_price_gwei = 50 +number_of_sending_keys_to_create = 0 + +# Coordinator config +callback_gas_limit = 1000000 +max_gas_limit_coordinator_config = 2500000 +fallback_wei_per_unit_link = "5352799651145251" +staleness_seconds = 172_800 +gas_after_payment_calculation = 56000 +fulfillment_flat_fee_native_ppm=0 +fulfillment_flat_fee_link_discount_ppm=0 +native_premium_percentage=60 +link_premium_percentage=50 + +# Wrapper config +wrapped_gas_overhead = 13_400 +coordinator_gas_overhead_native = 104_500 +coordinator_gas_overhead_link = 126_500 +coordinator_gas_overhead_per_word = 435 +coordinator_native_premium_percentage=60 +coordinator_link_premium_percentage=50 +wrapper_max_number_of_words = 10 + +# VRF Job config +vrf_job_forwarding_allowed = false +vrf_job_estimate_gas_multiplier = 3.0 +vrf_job_batch_fulfillment_enabled = true +vrf_job_batch_fulfillment_gas_multiplier = 1.1 +vrf_job_poll_period = "300ms" +vrf_job_request_timeout = "2h0m0s" +vrf_job_simulation_block="pending" + +# BHS Job config +bhs_job_wait_blocks = 30 +bhs_job_lookback_blocks = 200 +bhs_job_poll_period = "300ms" +bhs_job_run_timeout = "30s" +# NEW ENV CONFIG END + +[ARBITRUM_SEPOLIA.VRFv2Plus.ExistingEnv] +coordinator_address = "0xF7ba1Cf141F9729abC43c146dc2bf86EbcfD8603" +consumer_address = "" +sub_id = "" +key_hash = "0xe13aa26fe94bfcd2ae055911f4d3bf1aed54ca6cf77af34e17f918802fd69ba1" +create_fund_subs_and_add_consumers = true +link_address = "0xb1D4538B4571d411F07960EF2838Ce337FE1E80E" +node_sending_key_funding_min = 20 +node_sending_keys = [ + "0xbE21ae371FcA1aC2d8A152e707D21e68d7d99252", + "0xb13e9BA0aE94FD3b89B13b092e6d41614c805134", + "0x27aa703e585Ee165B7c977EAA652eCFa13b08294", + "0x9324643ACD2ec5b0813488E5EdAb64C3758ae4Ee", + "0x7CBA8c8e86f23f23363051650Fe5AE4DE78c3652", + "0x9A0143a4BAB55A826331A8ef82462557633aA016", + "0xD4259633F8e87949F683433a17e1fFcCE27865AC", + "0x5e47B71d6F95f68cd5538907ec6A9635b1Fe30Fa", + "0xa850a1a257FDF439c8f854ce3b89dd5b6F411827", + "0x7c82D56087c10aF2c3970f9a9Be7786B2850ce91", + "0x9545CB59956347d3debf27f5029754bBE1d398FA", + "0xEb8C69ac19709f27A97FB4A561f51AD2F9b34c5B", + # BHS + "0xf0e8cF7Fbd28Fc4D412B76B744CDA269df671F8e", + "0x317A02A658d12E5Bb4A6270171E7385928dD2d53", + "0x480f1dbcEc118Bd91e4dbb7e45bFa4A73180d21f", + "0x500a2662FaF981EC4669f791349D37Cbf1bE7d85", + "0x2ad350374B904c10B47c64ECdBD9e70BB0833Be2", + "0x0b946F0bF4e63C12b5157137f1c130f0788bC1b1", + # BHF + "0x571BBF4a5b07fc3F47Bd3B65CE2FE73739f86623" +] + +#SMOKE TEST CONFIG +[ARBITRUM_SEPOLIA-Smoke.VRFv2Plus.General] +randomness_request_count_per_request = 1 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 0 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 5 +subscription_funding_amount_native = 1 +subscription_refunding_amount_link = 20 +subscription_refunding_amount_native = 10 +number_of_words = 1 +random_words_fulfilled_event_timeout = "1m30s" +wait_for_256_blocks_timeout = "100s" + +wrapper_consumer_funding_amount_native_token = 1.0 +wrapper_consumer_funding_amount_link = 5 + +[ARBITRUM_SEPOLIA-Smoke.VRFv2Plus.Performance] +test_duration = "1s" +rate_limit_unit_duration = "10s" +rps = 1 + + +#SOAK TEST CONFIG +[ARBITRUM_SEPOLIA-Soak.VRFv2Plus.General] +randomness_request_count_per_request = 4 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 0 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 300 +subscription_funding_amount_native = 100 + +[ARBITRUM_SEPOLIA-Soak.VRFv2Plus.Performance] +test_duration = "1h" +rate_limit_unit_duration = "10s" +rps = 1 + +# LOAD TEST CONFIG +[ARBITRUM_SEPOLIA-Load.VRFv2Plus.General] +randomness_request_count_per_request = 1 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 0 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 100 +subscription_funding_amount_native = 60 + +[ARBITRUM_SEPOLIA-Load.VRFv2Plus.Performance] +test_duration = "30m" +rate_limit_unit_duration = "3s" +rps = 1 + + +# STRESS TEST CONFIG +[ARBITRUM_SEPOLIA-Stress.VRFv2Plus.General] +randomness_request_count_per_request = 3 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 2 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 5.0 +subscription_funding_amount_native = 0.1 + +[ARBITRUM_SEPOLIA-Stress.VRFv2Plus.Performance] +test_duration = "2m" +rate_limit_unit_duration = "3s" +rps = 1 + + +### AVALANCHE FUJI Config +[AVALANCHE_FUJI.VRFv2Plus.General] +#todo - need to have separate minimum_confirmations config for Coordinator, CL Node and Consumer request +minimum_confirmations = 0 + +# Consumer Request config +subscription_billing_type = "LINK_AND_NATIVE" +callback_gas_limit = 1000000 + +# NEW ENV CONFIG +# CL Node config +cl_node_max_gas_price_gwei = 300 +number_of_sending_keys_to_create = 0 + +# Coordinator config +max_gas_limit_coordinator_config = 2500000 +fallback_wei_per_unit_link = "378709808510249900" +staleness_seconds = 172_800 +gas_after_payment_calculation = 56_000 +fulfillment_flat_fee_native_ppm = 0 +fulfillment_flat_fee_link_discount_ppm = 0 +native_premium_percentage = 60 +link_premium_percentage = 50 + +# Wrapper config +wrapped_gas_overhead = 13_400 +coordinator_gas_overhead_native = 107_000 +coordinator_gas_overhead_link = 129_000 +coordinator_gas_overhead_per_word = 435 +coordinator_native_premium_percentage = 60 +coordinator_link_premium_percentage = 50 +wrapper_max_number_of_words = 10 + +# VRF Job config +vrf_job_forwarding_allowed = false +vrf_job_estimate_gas_multiplier = 3.0 +vrf_job_batch_fulfillment_enabled = true +vrf_job_batch_fulfillment_gas_multiplier = 1.1 +vrf_job_poll_period = "2s" +vrf_job_request_timeout = "2h0m0s" +vrf_job_simulation_block = "pending" + +# BHS Job config +bhs_job_wait_blocks = 30 +bhs_job_lookback_blocks = 200 +bhs_job_poll_period = "2s" +bhs_job_run_timeout = "30s" +# NEW ENV CONFIG END + +[AVALANCHE_FUJI.VRFv2Plus.ExistingEnv] +coordinator_address = "0xE122bf3Badd6545bDec5D4627a6DAd16352A1b36" +consumer_address = "" +sub_id = "" +key_hash = "0x5b03254a80ea3eb72139ff0423cb88be42612780c3dd25f1d95a5ba7708a4be1" +create_fund_subs_and_add_consumers = true +link_address = "0x0b9d5D9136855f6FEc3c0993feE6E9CE8a297846" +node_sending_key_funding_min = 50 +node_sending_keys = [ + "0x3D7Da5D6A23CA2240CE576C8638C1798a023920a", + # BHS + "0x72c8565279430F5179b0090d51ab8BB53Da323B5" +] + +#SMOKE TEST CONFIG +[AVALANCHE_FUJI-Smoke.VRFv2Plus.General] +randomness_request_count_per_request = 1 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 0 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 20 +subscription_funding_amount_native = 20 +subscription_refunding_amount_link = 20 +subscription_refunding_amount_native = 20 +number_of_words = 1 +random_words_fulfilled_event_timeout = "1m30s" +wait_for_256_blocks_timeout = "10m" + +wrapper_consumer_funding_amount_native_token = 1.0 +wrapper_consumer_funding_amount_link = 5 + +[AVALANCHE_FUJI-Smoke.VRFv2Plus.Performance] +test_duration = "2s" +rate_limit_unit_duration = "10s" +rps = 1 + + +#SOAK TEST CONFIG +[AVALANCHE_FUJI-Soak.VRFv2Plus.General] +randomness_request_count_per_request = 1 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 0 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 400 +subscription_funding_amount_native = 200 + +[AVALANCHE_FUJI-Soak.VRFv2Plus.Performance] +test_duration = "5h" +rate_limit_unit_duration = "3s" +rps = 1 + +# LOAD TEST CONFIG +[AVALANCHE_FUJI-Load.VRFv2Plus.General] +randomness_request_count_per_request = 3 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 2 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 300 +subscription_funding_amount_native = 300 + +[AVALANCHE_FUJI-Load.VRFv2Plus.Performance] +test_duration = "2m" +rate_limit_unit_duration = "3s" +rps = 1 + + +# STRESS TEST CONFIG +[AVALANCHE_FUJI-Stress.VRFv2Plus.General] +randomness_request_count_per_request = 3 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 2 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 5.0 +subscription_funding_amount_native = 0.1 + +[AVALANCHE_FUJI-Stress.VRFv2Plus.Performance] +test_duration = "2m" +rate_limit_unit_duration = "3s" +rps = 1 + +### ETH SEPOLIA Config +[SEPOLIA.VRFv2Plus.General] +#todo - need to have separate minimum_confirmations config for Coordinator, CL Node and Consumer request +minimum_confirmations = 3 + +# Consumer Request config +subscription_billing_type = "LINK_AND_NATIVE" +callback_gas_limit = 1000000 + +# NEW ENV CONFIG +# CL Node config +cl_node_max_gas_price_gwei = 100 +number_of_sending_keys_to_create = 0 + +# Coordinator config +max_gas_limit_coordinator_config = 2500000 +fallback_wei_per_unit_link = "5354747932930759" +staleness_seconds = 172_800 +gas_after_payment_calculation = 38_900 +fulfillment_flat_fee_native_ppm = 0 +fulfillment_flat_fee_link_discount_ppm = 0 +native_premium_percentage = 24 +link_premium_percentage = 20 + +# Wrapper config +wrapped_gas_overhead = 13_400 +coordinator_gas_overhead_native = 90_000 +coordinator_gas_overhead_link = 112_000 +coordinator_gas_overhead_per_word = 435 +coordinator_native_premium_percentage = 24 +coordinator_link_premium_percentage = 20 +wrapper_max_number_of_words = 10 + +# VRF Job config +vrf_job_forwarding_allowed = false +vrf_job_estimate_gas_multiplier = 1.15 +vrf_job_batch_fulfillment_enabled = false +vrf_job_batch_fulfillment_gas_multiplier = 1.1 +vrf_job_poll_period = "5s" +vrf_job_request_timeout = "2h0m0s" +vrf_job_simulation_block = "latest" + +# BHS Job config +bhs_job_wait_blocks = 30 +bhs_job_lookback_blocks = 200 +bhs_job_poll_period = "30s" +bhs_job_run_timeout = "1m0s" +# NEW ENV CONFIG END + +[SEPOLIA.VRFv2Plus.ExistingEnv] +coordinator_address = "0x2F3b892710523Ee9A85c3155a42089fFe99Ca31e" +consumer_address = "" +sub_id = "" +key_hash = "0xf5b4a359df0598eef89872ea2170f2afa844dbf74b417e6d44d4bda9420aceb2" +create_fund_subs_and_add_consumers = true +link_address = "0x779877A7B0D9E8603169DdbD7836e478b4624789" +node_sending_key_funding_min = 50 +node_sending_keys = [ + "0x0c0DC7f33A1256f0247c5ea75861d385fa5FED31", + # BHS + "0xEd8A4b792d16484f6c9B4df1e721e8280925Db80", +] + +#SMOKE TEST CONFIG +[SEPOLIA-Smoke.VRFv2Plus.General] +randomness_request_count_per_request = 1 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 0 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 5 +subscription_funding_amount_native = 1 +subscription_refunding_amount_link = 5 +subscription_refunding_amount_native = 1 +number_of_words = 1 +random_words_fulfilled_event_timeout = "1m30s" +wait_for_256_blocks_timeout = "70m" + +wrapper_consumer_funding_amount_native_token = 1.0 +wrapper_consumer_funding_amount_link = 5 + +[SEPOLIA-Smoke.VRFv2Plus.Performance] +test_duration = "2s" +rate_limit_unit_duration = "3s" +rps = 1 + +#SOAK TEST CONFIG +[SEPOLIA-Soak.VRFv2Plus.General] +randomness_request_count_per_request = 1 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 0 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 500 +subscription_funding_amount_native = 200 + +[SEPOLIA-Soak.VRFv2Plus.Performance] +test_duration = "2h" +rate_limit_unit_duration = "3s" +rps = 1 + +# LOAD TEST CONFIG +[SEPOLIA-Load.VRFv2Plus.General] +randomness_request_count_per_request = 3 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 2 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 5.0 +subscription_funding_amount_native = 30 + +[SEPOLIA-Load.VRFv2Plus.Performance] +test_duration = "2m" +rate_limit_unit_duration = "3s" +rps = 1 + +# STRESS TEST CONFIG +[SEPOLIA-Stress.VRFv2Plus.General] +randomness_request_count_per_request = 3 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 2 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 5.0 +subscription_funding_amount_native = 0.1 + +[SEPOLIA-Stress.VRFv2Plus.Performance] +test_duration = "2m" +rate_limit_unit_duration = "3s" +rps = 1 + +### BSC SEPOLIA Config +[BSC_TESTNET.VRFv2Plus.General] +#todo - need to have separate minimum_confirmations config for Coordinator, CL Node and Consumer request +minimum_confirmations = 3 + +# Consumer Request config +subscription_billing_type = "LINK_AND_NATIVE" +callback_gas_limit = 1000000 + +# NEW ENV CONFIG +# CL Node config +cl_node_max_gas_price_gwei = 50 +number_of_sending_keys_to_create = 0 + +# Coordinator config +max_gas_limit_coordinator_config = 2500000 +fallback_wei_per_unit_link = "30531029880396850" +staleness_seconds = 172_800 +gas_after_payment_calculation = 48_500 +fulfillment_flat_fee_native_ppm = 0 +fulfillment_flat_fee_link_discount_ppm = 0 +native_premium_percentage = 60 +link_premium_percentage = 50 + +# Wrapper config +wrapped_gas_overhead = 13_400 +coordinator_gas_overhead_native = 99_500 +coordinator_gas_overhead_link = 121_500 +coordinator_gas_overhead_per_word = 435 +coordinator_native_premium_percentage = 60 +coordinator_link_premium_percentage = 50 +wrapper_max_number_of_words = 10 + +# VRF Job config +vrf_job_forwarding_allowed = false +vrf_job_estimate_gas_multiplier = 1.1 +vrf_job_batch_fulfillment_enabled = true +vrf_job_batch_fulfillment_gas_multiplier = 1.1 +vrf_job_poll_period = "3s" +vrf_job_request_timeout = "2h0m0s" +vrf_job_simulation_block = "latest" + +# BHS Job config +bhs_job_wait_blocks = 30 +bhs_job_lookback_blocks = 200 +bhs_job_poll_period = "2s" +bhs_job_run_timeout = "30s" +# NEW ENV CONFIG END + +[BSC_TESTNET.VRFv2Plus.ExistingEnv] +coordinator_address = "0x84A477F6ebF33501eE3ACA86fEcB980b1fC99AC2" +consumer_address = "" +sub_id = "" +key_hash = "0x4d43763d3eff849a89cf578a42787baa32132d7a80032125710e95b3972cd214" +create_fund_subs_and_add_consumers = true +link_address = "0x84b9B910527Ad5C03A9Ca831909E21e236EA7b06" +node_sending_key_funding_min = 150 +node_sending_keys = [ + "0x4EE2Cc6D50E8acb6BaEf673B03559525a6c92fB8", + # BHS + "0xAFB44568f7DAc218EA6e1C71c366692ED4758A07" +] + +#SMOKE TEST CONFIG +[BSC_TESTNET-Smoke.VRFv2Plus.General] +randomness_request_count_per_request = 1 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 0 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 10 +subscription_funding_amount_native = 10 + +[BSC_TESTNET-Smoke.VRFv2Plus.Performance] +test_duration = "15s" +rate_limit_unit_duration = "3s" +rps = 1 + + +#SOAK TEST CONFIG +[BSC_TESTNET-Soak.VRFv2Plus.General] +randomness_request_count_per_request = 1 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 0 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 400 +subscription_funding_amount_native = 200 + +[BSC_TESTNET-Soak.VRFv2Plus.Performance] +test_duration = "5h" +rate_limit_unit_duration = "3s" +rps = 1 + +# LOAD TEST CONFIG +[BSC_TESTNET-Load.VRFv2Plus.General] +randomness_request_count_per_request = 3 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 2 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 300 +subscription_funding_amount_native = 300 + +[BSC_TESTNET-Load.VRFv2Plus.Performance] +test_duration = "2m" +rate_limit_unit_duration = "3s" +rps = 1 + + +# STRESS TEST CONFIG +[BSC_TESTNET-Stress.VRFv2Plus.General] +randomness_request_count_per_request = 3 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 2 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 5.0 +subscription_funding_amount_native = 0.1 + +[BSC_TESTNET-Stress.VRFv2Plus.Performance] +test_duration = "2m" +rate_limit_unit_duration = "3s" +rps = 1 + + +### NEXON QA Config +[NEXON_QA.VRFv2Plus.General] +#todo - need to have separate minimum_confirmations config for Coordinator, CL Node and Consumer request +minimum_confirmations = 0 +generate_txs_on_chain = true + +# Consumer Request config +subscription_billing_type = "LINK_AND_NATIVE" +callback_gas_limit = 1000000 + +[NEXON_QA.VRFv2Plus.ExistingEnv] +coordinator_address = "0xF1F0beBcc284591FCD28d8f2BAc9f30efdA3E0ea" +consumer_address = "" +sub_id = "" +key_hash = "0x7d5692e71807c4c02f5a109627a9ad2b12a361a346790a306983af9a5e3a186f" +create_fund_subs_and_add_consumers = true +link_address = "0x92Bd61014c5BDc4A43BBbaAEa63d0694BE43ECDd" +node_sending_key_funding_min = 30 +node_sending_keys = [ + "0xB97c0C52A2B957b45DA213e652c76090DDd0FEc6", + "0xe205F5d4a99ca0f474d0b4d12f60a0153c786B4E", + # BHS + "0xf85E291edF0352435f2fD5e817030f6542375a99", +] + +#SMOKE TEST CONFIG +[NEXON_QA-Smoke.VRFv2Plus.General] +randomness_request_count_per_request = 1 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 0 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 21 +subscription_funding_amount_native = 2 +subscription_refunding_amount_link = 21 +subscription_refunding_amount_native = 2 +number_of_words = 1 +random_words_fulfilled_event_timeout = "1m30s" +wait_for_256_blocks_timeout = "25m" +wrapper_consumer_funding_amount_link = 21 +wrapper_consumer_funding_amount_native_token = 3 + + +[NEXON_QA-Smoke.VRFv2Plus.Performance] +test_duration = "2s" +rate_limit_unit_duration = "3s" +rps = 1 + + +#SOAK TEST CONFIG +[NEXON_QA-Soak.VRFv2Plus.General] +randomness_request_count_per_request = 1 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 0 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 400 +subscription_funding_amount_native = 200 + +[NEXON_QA-Soak.VRFv2Plus.Performance] +test_duration = "5h" +rate_limit_unit_duration = "3s" +rps = 1 + +# LOAD TEST CONFIG +[NEXON_QA-Load.VRFv2Plus.General] +randomness_request_count_per_request = 3 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 2 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 300 +subscription_funding_amount_native = 300 + +[NEXON_QA-Load.VRFv2Plus.Performance] +test_duration = "2m" +rate_limit_unit_duration = "3s" +rps = 1 + + +# STRESS TEST CONFIG +[NEXON_QA-Stress.VRFv2Plus.General] +randomness_request_count_per_request = 3 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 2 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 5.0 +subscription_funding_amount_native = 2 + +[NEXON_QA-Stress.VRFv2Plus.Performance] +test_duration = "2m" +rate_limit_unit_duration = "3s" +rps = 1 + +### NEXON DEV Config +[NEXON_DEV.VRFv2Plus.General] +#todo - need to have separate minimum_confirmations config for Coordinator, CL Node and Consumer request +minimum_confirmations = 0 +generate_txs_on_chain = true + +# Consumer Request config +subscription_billing_type = "LINK_AND_NATIVE" +callback_gas_limit = 1000000 + +[NEXON_DEV.VRFv2Plus.ExistingEnv] +coordinator_address = "0x6901d7236A823E7B7911d90FBe46E6FA770CC823" +consumer_address = "" +sub_id = "" +key_hash = "0xdc023892a41e5fe74ec7c4c2e8c0a808b01aea7acaf2b2ae30f4e08df877c48b" +create_fund_subs_and_add_consumers = true +link_address = "0xE4DDEDb5A220eC218791dC35b1b4D737ba813EE7" +node_sending_key_funding_min = 30 +node_sending_keys = [ + "0xF3d9879a75BBD85890056D7c6cB37C555F9b41A3", + # BHS + "0xb544f9D7c16a30af0EEd0afcC4132D1c63bAF8AC", +] + +#SMOKE TEST CONFIG +[NEXON_DEV-Smoke.VRFv2Plus.General] +randomness_request_count_per_request = 1 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 0 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 21 +subscription_funding_amount_native = 2 +subscription_refunding_amount_link = 21 +subscription_refunding_amount_native = 2 +number_of_words = 1 +random_words_fulfilled_event_timeout = "1m30s" +wait_for_256_blocks_timeout = "25m" +wrapper_consumer_funding_amount_link = 21 +wrapper_consumer_funding_amount_native_token = 3 + +[NEXON_DEV-Smoke.VRFv2Plus.Performance] +test_duration = "2s" +rate_limit_unit_duration = "3s" +rps = 1 + + +#SOAK TEST CONFIG +[NEXON_DEV-Soak.VRFv2Plus.General] +randomness_request_count_per_request = 1 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 0 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 400 +subscription_funding_amount_native = 200 + +[NEXON_DEV-Soak.VRFv2Plus.Performance] +test_duration = "5h" +rate_limit_unit_duration = "3s" +rps = 1 + +# LOAD TEST CONFIG +[NEXON_DEV-Load.VRFv2Plus.General] +randomness_request_count_per_request = 3 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 2 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 300 +subscription_funding_amount_native = 300 + +[NEXON_DEV-Load.VRFv2Plus.Performance] +test_duration = "2m" +rate_limit_unit_duration = "3s" +rps = 1 + + +# STRESS TEST CONFIG +[NEXON_DEV-Stress.VRFv2Plus.General] +randomness_request_count_per_request = 3 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 2 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 5.0 +subscription_funding_amount_native = 0.1 + +[NEXON_DEV-Stress.VRFv2Plus.Performance] +test_duration = "2m" +rate_limit_unit_duration = "3s" +rps = 1 + + +### NEXON TEST Config +[NEXON_TEST.VRFv2Plus.General] +#todo - need to have separate minimum_confirmations config for Coordinator, CL Node and Consumer request +minimum_confirmations = 0 +generate_txs_on_chain = true + +# Consumer Request config +subscription_billing_type = "LINK_AND_NATIVE" +callback_gas_limit = 1000000 + +[NEXON_TEST.VRFv2Plus.ExistingEnv] +coordinator_address = "0xAa92Ba21168B48195cAdB87cfaB3eB70B2499F55" +consumer_address = "" +sub_id = "" +key_hash = "0x0cb2a18e8b762cb4c8f7b17a6cc02ac7b9d2a3346f048cfd2f5d37677f8747d8" +create_fund_subs_and_add_consumers = true +link_address = "0xD694472F1CD02E1f3fc3534386bda6802fCFe0f7" +node_sending_key_funding_min = 30 +node_sending_keys = [ + "0xBFD780Af421e98C35918e10B9d6da7389C3e1D10", + "0xbf6c76024672F233aB8164EC00683e1AE774F6b0", + # BHS + "0x2a3900Ac77de110670E060DBFf4fCbe36c6f8170", +] + +#SMOKE TEST CONFIG +[NEXON_TEST-Smoke.VRFv2Plus.General] +randomness_request_count_per_request = 1 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 0 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 21 +subscription_funding_amount_native = 2 +subscription_refunding_amount_link = 21 +subscription_refunding_amount_native = 2 +number_of_words = 1 +random_words_fulfilled_event_timeout = "1m30s" +wait_for_256_blocks_timeout = "25m" +wrapper_consumer_funding_amount_link = 5 +wrapper_consumer_funding_amount_native_token = 3 + +[NEXON_TEST-Smoke.VRFv2Plus.Performance] +test_duration = "2s" +rate_limit_unit_duration = "3s" +rps = 1 + + +#SOAK TEST CONFIG +[NEXON_TEST-Soak.VRFv2Plus.General] +randomness_request_count_per_request = 1 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 0 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 400 +subscription_funding_amount_native = 200 + +[NEXON_TEST-Soak.VRFv2Plus.Performance] +test_duration = "5h" +rate_limit_unit_duration = "3s" +rps = 1 + +# LOAD TEST CONFIG +[NEXON_TEST-Load.VRFv2Plus.General] +randomness_request_count_per_request = 3 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 2 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 300 +subscription_funding_amount_native = 300 + +[NEXON_TEST-Load.VRFv2Plus.Performance] +test_duration = "2m" +rate_limit_unit_duration = "3s" +rps = 1 + + +# STRESS TEST CONFIG +[NEXON_TEST-Stress.VRFv2Plus.General] +randomness_request_count_per_request = 3 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 2 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 5.0 +subscription_funding_amount_native = 0.1 + +[NEXON_TEST-Stress.VRFv2Plus.Performance] +test_duration = "2m" +rate_limit_unit_duration = "3s" +rps = 1 + + +### NEXON STAGE Config +[NEXON_STAGE.VRFv2Plus.General] +#todo - need to have separate minimum_confirmations config for Coordinator, CL Node and Consumer request +minimum_confirmations = 0 +generate_txs_on_chain = true + +# Consumer Request config +subscription_billing_type = "LINK_AND_NATIVE" +callback_gas_limit = 1000000 + +[NEXON_STAGE.VRFv2Plus.ExistingEnv] +coordinator_address = "0xF705dD3e7E717F32de0Cc5F833f8009f16122AD1" +consumer_address = "" +sub_id = "" +key_hash = "0xbc9f525e3e1d9e2336f7c77d5f33f5b60aab3765944617fed7f66a6afecac616" +create_fund_subs_and_add_consumers = true +link_address = "0x8E3f5E6dFeb4498437149b0d347ef51427dB1DE2" +node_sending_key_funding_min = 30 +node_sending_keys = [ +] + +#SMOKE TEST CONFIG +[NEXON_STAGE-Smoke.VRFv2Plus.General] +randomness_request_count_per_request = 1 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 0 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 21 +subscription_funding_amount_native = 2 +subscription_refunding_amount_link = 21 +subscription_refunding_amount_native = 2 +number_of_words = 1 +random_words_fulfilled_event_timeout = "1m30s" +wait_for_256_blocks_timeout = "25m" +wrapper_consumer_funding_amount_link = 21 +wrapper_consumer_funding_amount_native_token = 3 + +[NEXON_STAGE-Smoke.VRFv2Plus.Performance] +test_duration = "2s" +rate_limit_unit_duration = "3s" +rps = 1 + + +#SOAK TEST CONFIG +[NEXON_STAGE-Soak.VRFv2Plus.General] +randomness_request_count_per_request = 1 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 0 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 400 +subscription_funding_amount_native = 200 + +[NEXON_STAGE-Soak.VRFv2Plus.Performance] +test_duration = "5h" +rate_limit_unit_duration = "3s" +rps = 1 + +# LOAD TEST CONFIG +[NEXON_STAGE-Load.VRFv2Plus.General] +randomness_request_count_per_request = 3 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 2 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 300 +subscription_funding_amount_native = 300 + +[NEXON_STAGE-Load.VRFv2Plus.Performance] +test_duration = "2m" +rate_limit_unit_duration = "3s" +rps = 1 + + +# STRESS TEST CONFIG +[NEXON_STAGE-Stress.VRFv2Plus.General] +randomness_request_count_per_request = 3 # amount of randomness requests to make per one TX request +randomness_request_count_per_request_deviation = 2 #NOTE - deviation should be less than randomness_request_count_per_request setting +number_of_sub_to_create = 1 +subscription_funding_amount_link = 5.0 +subscription_funding_amount_native = 0.1 + +[NEXON_STAGE-Stress.VRFv2Plus.Performance] +test_duration = "2m" +rate_limit_unit_duration = "3s" +rps = 1 diff --git a/integration-tests/testsetups/keeper_benchmark.go b/integration-tests/testsetups/keeper_benchmark.go index 81f2ce0edf4..4803a5249f0 100644 --- a/integration-tests/testsetups/keeper_benchmark.go +++ b/integration-tests/testsetups/keeper_benchmark.go @@ -240,8 +240,9 @@ func (k *KeeperBenchmarkTest) Run() { txKeyId = 0 } kr := k.keeperRegistries[rIndex] + // TODO: need to add the LINK, WETH and WETH/USD feed to support v23 ocrConfig, err := actions.BuildAutoOCR2ConfigVarsWithKeyIndex( - k.t, nodesWithoutBootstrap, *inputs.KeeperRegistrySettings, kr.Address(), k.Inputs.DeltaStage, txKeyId, common.Address{}, kr.ChainModuleAddress(), kr.ReorgProtectionEnabled(), + k.t, nodesWithoutBootstrap, *inputs.KeeperRegistrySettings, kr.Address(), k.Inputs.DeltaStage, txKeyId, common.Address{}, kr.ChainModuleAddress(), kr.ReorgProtectionEnabled(), nil, nil, nil, ) require.NoError(k.t, err, "Building OCR config shouldn't fail") @@ -730,13 +731,13 @@ func (k *KeeperBenchmarkTest) DeployBenchmarkKeeperContracts(index int) { require.NoError(k.t, err, "Funding keeper registrar contract shouldn't fail") } else { // OCR automation - v2.X registry, registrar = actions.DeployAutoOCRRegistryAndRegistrar( - k.t, k.chainClient, registryVersion, *k.Inputs.KeeperRegistrySettings, k.linkToken, + k.t, k.chainClient, registryVersion, *k.Inputs.KeeperRegistrySettings, k.linkToken, nil, nil, ) // Fund the registry with LINK err := k.linkToken.Transfer(registry.Address(), big.NewInt(0).Mul(big.NewInt(1e18), big.NewInt(int64(k.Inputs.Upkeeps.NumberOfUpkeeps)))) require.NoError(k.t, err, "Funding keeper registry contract shouldn't fail") - ocrConfig, err := actions.BuildAutoOCR2ConfigVars(k.t, k.chainlinkNodes[1:], *k.Inputs.KeeperRegistrySettings, registrar.Address(), k.Inputs.DeltaStage, registry.ChainModuleAddress(), registry.ReorgProtectionEnabled()) + ocrConfig, err := actions.BuildAutoOCR2ConfigVars(k.t, k.chainlinkNodes[1:], *k.Inputs.KeeperRegistrySettings, registrar.Address(), k.Inputs.DeltaStage, registry.ChainModuleAddress(), registry.ReorgProtectionEnabled(), nil, nil, nil) require.NoError(k.t, err, "Building OCR config shouldn't fail") k.log.Debug().Interface("KeeperRegistrySettings", *k.Inputs.KeeperRegistrySettings).Interface("OCRConfig", ocrConfig).Msg("Config") require.NoError(k.t, err, "Error building OCR config vars") @@ -801,7 +802,7 @@ func (k *KeeperBenchmarkTest) DeployBenchmarkKeeperContracts(index int) { err = actions.DeployMultiCallAndFundDeploymentAddresses(k.chainClient, k.linkToken, upkeep.NumberOfUpkeeps, linkFunds) require.NoError(k.t, err, "Sending link funds to deployment addresses shouldn't fail") - upkeepIds := actions.RegisterUpkeepContractsWithCheckData(k.t, k.chainClient, k.linkToken, linkFunds, uint32(upkeep.UpkeepGasLimit), registry, registrar, upkeep.NumberOfUpkeeps, upkeepAddresses, checkData, false, false) + upkeepIds := actions.RegisterUpkeepContractsWithCheckData(k.t, k.chainClient, k.linkToken, linkFunds, uint32(upkeep.UpkeepGasLimit), registry, registrar, upkeep.NumberOfUpkeeps, upkeepAddresses, checkData, false, false, false, nil) k.keeperRegistries[index] = registry k.keeperRegistrars[index] = registrar diff --git a/integration-tests/testsetups/ocr.go b/integration-tests/testsetups/ocr.go index be11de6313b..45c334bf69d 100644 --- a/integration-tests/testsetups/ocr.go +++ b/integration-tests/testsetups/ocr.go @@ -15,12 +15,12 @@ import ( "testing" "time" + "github.com/smartcontractkit/chainlink-testing-framework/grafana" seth_utils "github.com/smartcontractkit/chainlink-testing-framework/utils/seth" geth "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" - "github.com/google/uuid" "github.com/pelletier/go-toml/v2" "github.com/rs/zerolog" "github.com/smartcontractkit/seth" @@ -47,7 +47,6 @@ import ( "github.com/smartcontractkit/chainlink/integration-tests/actions" "github.com/smartcontractkit/chainlink/integration-tests/client" - "github.com/smartcontractkit/chainlink/integration-tests/config" "github.com/smartcontractkit/chainlink/integration-tests/contracts" tc "github.com/smartcontractkit/chainlink/integration-tests/testconfig" "github.com/smartcontractkit/chainlink/integration-tests/testreporters" @@ -65,6 +64,7 @@ type OCRSoakTest struct { TestReporter testreporters.OCRSoakTestReporter OperatorForwarderFlow bool seth *seth.Client + OCRVersion string t *testing.T startTime time.Time @@ -119,17 +119,25 @@ func NewOCRSoakTest(t *testing.T, config *tc.TestConfig, opts ...OCRSoakTestOpti test := &OCRSoakTest{ Config: config, TestReporter: testreporters.OCRSoakTestReporter{ - OCRVersion: *config.OCR.Soak.OCRVersion, - StartTime: time.Now(), + StartTime: time.Now(), }, t: t, startTime: time.Now(), - timeLeft: config.OCR.Common.TestDuration.Duration, + timeLeft: config.GetActiveOCRConfig().Common.TestDuration.Duration, log: logging.GetTestLogger(t), ocrRoundStates: make([]*testreporters.OCRRoundState, 0), ocrV1InstanceMap: make(map[string]contracts.OffchainAggregator), ocrV2InstanceMap: make(map[string]contracts.OffchainAggregatorV2), } + + ocrVersion := "1" + if config.OCR2 != nil { + ocrVersion = "2" + } + + test.TestReporter.OCRVersion = ocrVersion + test.OCRVersion = ocrVersion + for _, opt := range opts { opt(test) } @@ -140,25 +148,20 @@ func NewOCRSoakTest(t *testing.T, config *tc.TestConfig, opts ...OCRSoakTestOpti } // DeployEnvironment deploys the test environment, starting all Chainlink nodes and other components for the test -func (o *OCRSoakTest) DeployEnvironment(customChainlinkNetworkTOML string, ocrTestConfig tt.OcrTestConfig) { +func (o *OCRSoakTest) DeployEnvironment(ocrTestConfig tt.OcrTestConfig) { nodeNetwork := networks.MustGetSelectedNetworkConfig(ocrTestConfig.GetNetworkConfig())[0] // Environment currently being used to soak test on - // Define namespace if default not set - if o.namespace == "" { - nsPre := fmt.Sprintf("soak-ocr-v%s-", *ocrTestConfig.GetOCRConfig().Soak.OCRVersion) - if o.OperatorForwarderFlow { - nsPre = fmt.Sprintf("%sforwarder-", nsPre) - } - - nsPre = fmt.Sprintf("%s%s", nsPre, strings.ReplaceAll(strings.ToLower(nodeNetwork.Name), " ", "-")) - nsPre = strings.ReplaceAll(nsPre, "_", "-") - - o.namespace = fmt.Sprintf("%s-%s", nsPre, uuid.NewString()[0:5]) + nsPre := fmt.Sprintf("soak-ocr-v%s-", o.OCRVersion) + if o.OperatorForwarderFlow { + nsPre = fmt.Sprintf("%sforwarder-", nsPre) } + nsPre = fmt.Sprintf("%s%s", nsPre, strings.ReplaceAll(strings.ToLower(nodeNetwork.Name), " ", "-")) + nsPre = strings.ReplaceAll(nsPre, "_", "-") + baseEnvironmentConfig := &environment.Config{ TTL: time.Hour * 720, // 30 days, - Namespace: o.namespace, + NamespacePrefix: nsPre, Test: o.t, PreventPodEviction: true, } @@ -206,21 +209,17 @@ func (o *OCRSoakTest) DeployEnvironment(customChainlinkNetworkTOML string, ocrTe })) } - var conf string - if *ocrTestConfig.GetOCRConfig().Soak.OCRVersion == "1" { - conf = config.BaseOCR1Config - } else if *ocrTestConfig.GetOCRConfig().Soak.OCRVersion == "2" { - conf = config.BaseOCR2Config - } - var overrideFn = func(_ interface{}, target interface{}) { ctf_config.MustConfigOverrideChainlinkVersion(ocrTestConfig.GetChainlinkImageConfig(), target) ctf_config.MightConfigOverridePyroscopeKey(ocrTestConfig.GetPyroscopeConfig(), target) } + tomlConfig, err := actions.BuildTOMLNodeConfigForK8s(ocrTestConfig, nodeNetwork) + require.NoError(o.t, err, "Error building TOML config for Chainlink nodes") + cd := chainlink.NewWithOverride(0, map[string]any{ "replicas": 6, - "toml": networks.AddNetworkDetailedConfig(conf, ocrTestConfig.GetPyroscopeConfig(), customChainlinkNetworkTOML, nodeNetwork), + "toml": tomlConfig, "db": map[string]any{ "stateful": true, // stateful DB by default for soak tests }, @@ -228,7 +227,7 @@ func (o *OCRSoakTest) DeployEnvironment(customChainlinkNetworkTOML string, ocrTe }, ocrTestConfig.GetChainlinkImageConfig(), overrideFn) testEnv.AddHelm(cd) - err := testEnv.Run() + err = testEnv.Run() require.NoError(o.t, err, "Error launching test environment") o.testEnvironment = testEnv o.namespace = testEnv.Cfg.Namespace @@ -255,8 +254,8 @@ func (o *OCRSoakTest) DeployEnvironment(customChainlinkNetworkTOML string, ocrTe o.rpcNetwork.URLs = blockchain.SimulatedEVMNetwork.URLs } else { // Test is running locally, set forwarded URL of Geth blockchain node - wsURLs := o.testEnvironment.URLs[blockchain.SimulatedEVMNetwork.Name+"_internal"] - httpURLs := o.testEnvironment.URLs[blockchain.SimulatedEVMNetwork.Name+"_internal_http"] + wsURLs := o.testEnvironment.URLs[blockchain.SimulatedEVMNetwork.Name] + httpURLs := o.testEnvironment.URLs[blockchain.SimulatedEVMNetwork.Name+"_http"] require.NotEmpty(o.t, wsURLs, "Forwarded Geth URLs should not be empty") require.NotEmpty(o.t, httpURLs, "Forwarded Geth URLs should not be empty") o.rpcNetwork.URLs = wsURLs @@ -271,9 +270,9 @@ func (o *OCRSoakTest) Environment() *environment.Environment { } func (o *OCRSoakTest) Setup(ocrTestConfig tt.OcrTestConfig) { - seth, err := seth_utils.GetChainClient(o.Config, o.rpcNetwork) + sethClient, err := seth_utils.GetChainClient(o.Config, o.rpcNetwork) require.NoError(o.t, err, "Error creating seth client") - o.seth = seth + o.seth = sethClient nodes, err := client.ConnectChainlinkNodes(o.testEnvironment) require.NoError(o.t, err, "Connecting to chainlink nodes shouldn't fail") @@ -281,12 +280,12 @@ func (o *OCRSoakTest) Setup(ocrTestConfig tt.OcrTestConfig) { o.mockServer, err = ctf_client.ConnectMockServer(o.testEnvironment) require.NoError(o.t, err, "Creating mockserver clients shouldn't fail") - linkContract, err := contracts.DeployLinkTokenContract(o.log, seth) + linkContract, err := contracts.DeployLinkTokenContract(o.log, sethClient) require.NoError(o.t, err, "Error deploying LINK contract") // Fund Chainlink nodes, excluding the bootstrap node o.log.Info().Float64("ETH amount per node", *o.Config.Common.ChainlinkNodeFunding).Msg("Funding Chainlink nodes") - err = actions.FundChainlinkNodesFromRootAddress(o.log, seth, contracts.ChainlinkK8sClientToChainlinkNodeWithKeysAndAddress(o.workerNodes), big.NewFloat(*o.Config.Common.ChainlinkNodeFunding)) + err = actions.FundChainlinkNodesFromRootAddress(o.log, sethClient, contracts.ChainlinkK8sClientToChainlinkNodeWithKeysAndAddress(o.workerNodes), big.NewFloat(*o.Config.Common.ChainlinkNodeFunding)) require.NoError(o.t, err, "Error funding Chainlink nodes") var forwarders []common.Address @@ -304,15 +303,14 @@ func (o *OCRSoakTest) Setup(ocrTestConfig tt.OcrTestConfig) { actions.AcceptAuthorizedReceiversOperator( o.t, o.log, o.seth, operators[i], forwarders[i], []common.Address{forwarderNodesAddresses[i]}) require.NoError(o.t, err, "Accepting Authorize Receivers on Operator shouldn't fail") - actions.TrackForwarder(o.t, o.seth, forwarders[i], o.workerNodes[i]) } - } else if *ocrTestConfig.GetOCRConfig().Soak.OCRVersion == "1" { + } else if o.OCRVersion == "1" { if o.OperatorForwarderFlow { o.ocrV1Instances, err = actions.DeployOCRContractsForwarderFlow( o.log, o.seth, - *o.Config.OCR.Soak.NumberOfContracts, + *o.Config.GetActiveOCRConfig().Soak.NumberOfContracts, common.HexToAddress(linkContract.Address()), contracts.ChainlinkK8sClientToChainlinkNodeWithKeysAndAddress(o.workerNodes), forwarders, @@ -321,14 +319,14 @@ func (o *OCRSoakTest) Setup(ocrTestConfig tt.OcrTestConfig) { } else { o.ocrV1Instances, err = actions.DeployOCRv1Contracts( o.log, - seth, - *o.Config.OCR.Soak.NumberOfContracts, + sethClient, + *o.Config.GetActiveOCRConfig().Soak.NumberOfContracts, common.HexToAddress(linkContract.Address()), contracts.ChainlinkK8sClientToChainlinkNodeWithKeysAndAddress(o.workerNodes), ) require.NoError(o.t, err) } - } else if *ocrTestConfig.GetOCRConfig().Soak.OCRVersion == "2" { + } else if o.OCRVersion == "2" { var transmitters []string if o.OperatorForwarderFlow { @@ -347,7 +345,7 @@ func (o *OCRSoakTest) Setup(ocrTestConfig tt.OcrTestConfig) { o.ocrV2Instances, err = actions.DeployOCRv2Contracts( o.log, o.seth, - *ocrTestConfig.GetOCRConfig().Soak.NumberOfContracts, + *ocrTestConfig.GetActiveOCRConfig().Soak.NumberOfContracts, common.HexToAddress(linkContract.Address()), transmitters, ocrOffchainOptions, @@ -359,11 +357,11 @@ func (o *OCRSoakTest) Setup(ocrTestConfig tt.OcrTestConfig) { require.NoError(o.t, err, "Error configuring OCRv2 aggregator contracts") } - if *ocrTestConfig.GetOCRConfig().Soak.OCRVersion == "1" { + if o.OCRVersion == "1" { for _, ocrInstance := range o.ocrV1Instances { o.ocrV1InstanceMap[ocrInstance.Address()] = ocrInstance } - } else if *ocrTestConfig.GetOCRConfig().Soak.OCRVersion == "2" { + } else if o.OCRVersion == "2" { for _, ocrInstance := range o.ocrV2Instances { o.ocrV2InstanceMap[ocrInstance.Address()] = ocrInstance } @@ -374,7 +372,7 @@ func (o *OCRSoakTest) Setup(ocrTestConfig tt.OcrTestConfig) { // Run starts the OCR soak test func (o *OCRSoakTest) Run() { - config, err := tc.GetConfig("soak", tc.OCR) + config, err := tc.GetConfig([]string{"soak"}, tc.OCR) require.NoError(o.t, err, "Error getting config") ctx, cancel := context.WithTimeout(testcontext.Get(o.t), time.Second*5) @@ -386,25 +384,25 @@ func (o *OCRSoakTest) Run() { startingValue := 5 if o.OperatorForwarderFlow { actions.CreateOCRJobsWithForwarder(o.t, o.ocrV1Instances, o.bootstrapNode, o.workerNodes, startingValue, o.mockServer, o.seth.ChainID) - } else if *config.OCR.Soak.OCRVersion == "1" { + } else if o.OCRVersion == "1" { ctx, cancel := context.WithTimeout(testcontext.Get(o.t), time.Second*5) chainId, err := o.seth.Client.ChainID(ctx) cancel() require.NoError(o.t, err, "Error getting chain ID") err = actions.CreateOCRJobs(o.ocrV1Instances, o.bootstrapNode, o.workerNodes, startingValue, o.mockServer, chainId.String()) require.NoError(o.t, err, "Error creating OCR jobs") - } else if *config.OCR.Soak.OCRVersion == "2" { + } else if o.OCRVersion == "2" { err := actions.CreateOCRv2Jobs(o.ocrV2Instances, o.bootstrapNode, o.workerNodes, o.mockServer, startingValue, o.seth.ChainID, o.OperatorForwarderFlow) require.NoError(o.t, err, "Error creating OCR jobs") } o.log.Info(). - Str("Test Duration", o.Config.OCR.Common.TestDuration.Duration.Truncate(time.Second).String()). - Int("Number of OCR Contracts", *config.OCR.Soak.NumberOfContracts). - Str("OCR Version", *config.OCR.Soak.OCRVersion). + Str("Test Duration", o.Config.GetActiveOCRConfig().Common.TestDuration.Duration.Truncate(time.Second).String()). + Int("Number of OCR Contracts", *config.GetActiveOCRConfig().Soak.NumberOfContracts). + Str("OCR Version", o.OCRVersion). Msg("Starting OCR Soak Test") - o.testLoop(o.Config.OCR.Common.TestDuration.Duration, startingValue) + o.testLoop(o.Config.GetActiveOCRConfig().Common.TestDuration.Duration, startingValue) o.complete() } @@ -458,9 +456,9 @@ func (o *OCRSoakTest) SaveState() error { StartingBlockNum: o.startingBlockNum, StartTime: o.startTime, TimeRunning: time.Since(o.startTime), - TestDuration: o.Config.OCR.Common.TestDuration.Duration, + TestDuration: o.Config.GetActiveOCRConfig().Common.TestDuration.Duration, OCRContractAddresses: ocrAddresses, - OCRVersion: *o.Config.OCR.Soak.OCRVersion, + OCRVersion: o.OCRVersion, MockServerURL: "http://mockserver:1080", // TODO: Make this dynamic BootStrapNodeURL: o.bootstrapNode.URL(), @@ -512,12 +510,12 @@ func (o *OCRSoakTest) LoadState() error { duration := blockchain.StrDuration{Duration: testState.TestDuration} o.ocrRoundStates = testState.OCRRoundStates o.testIssues = testState.TestIssues - o.Config.OCR.Common.TestDuration = &duration + o.Config.GetActiveOCRConfig().Common.TestDuration = &duration o.timeLeft = testState.TestDuration - testState.TimeRunning o.startTime = testState.StartTime o.startingBlockNum = testState.StartingBlockNum o.reorgHappened = testState.ReorgHappened - o.Config.OCR.Soak.OCRVersion = &testState.OCRVersion + o.OCRVersion = testState.OCRVersion o.bootstrapNode, err = client.ConnectChainlinkNodeURL(testState.BootStrapNodeURL) if err != nil { @@ -562,13 +560,13 @@ func (o *OCRSoakTest) Resume() { Message: "Test Resumed", }) o.log.Info(). - Str("Total Duration", o.Config.OCR.Common.TestDuration.String()). + Str("Total Duration", o.Config.GetActiveOCRConfig().Common.TestDuration.String()). Str("Time Left", o.timeLeft.String()). Msg("Resuming OCR Soak Test") - ocrAddresses := make([]common.Address, *o.Config.OCR.Soak.NumberOfContracts) + ocrAddresses := make([]common.Address, *o.Config.GetActiveOCRConfig().Soak.NumberOfContracts) - if *o.Config.OCR.Soak.OCRVersion == "1" { + if o.OCRVersion == "1" { for i, ocrInstance := range o.ocrV1Instances { ocrAddresses[i] = common.HexToAddress(ocrInstance.Address()) } @@ -579,7 +577,7 @@ func (o *OCRSoakTest) Resume() { Topics: [][]common.Hash{{contractABI.Events["AnswerUpdated"].ID}}, FromBlock: big.NewInt(0).SetUint64(o.startingBlockNum), } - } else if *o.Config.OCR.Soak.OCRVersion == "2" { + } else if o.OCRVersion == "2" { for i, ocrInstance := range o.ocrV2Instances { ocrAddresses[i] = common.HexToAddress(ocrInstance.Address()) } @@ -689,9 +687,9 @@ func (o *OCRSoakTest) testLoop(testDuration time.Duration, newValue int) { chaos.AddListener(ocrTestChaosListener{t: o.t}) // Add Grafana annotation if configured if o.Config.Logging.Grafana != nil && o.Config.Logging.Grafana.BaseUrl != nil && o.Config.Logging.Grafana.BearerToken != nil && o.Config.Logging.Grafana.DashboardUID != nil { - chaos.AddListener(k8schaos.NewSingleLineGrafanaAnnotator( - *o.Config.Logging.Grafana.BaseUrl, *o.Config.Logging.Grafana.BearerToken, - *o.Config.Logging.Grafana.DashboardUID, o.log)) + chaos.AddListener(k8schaos.NewSingleLineGrafanaAnnotator(*o.Config.Logging.Grafana.BaseUrl, *o.Config.Logging.Grafana.BearerToken, *o.Config.Logging.Grafana.DashboardUID, o.log)) + } else { + o.log.Warn().Msg("Skipping Grafana annotation for chaos simulation. Grafana config is missing either BearerToken, BaseUrl or DashboardUID") } } } @@ -715,7 +713,7 @@ func (o *OCRSoakTest) testLoop(testDuration time.Duration, newValue int) { return case <-newRoundTrigger.C: err := o.triggerNewRound(newValue) - timerReset := o.Config.OCR.Soak.TimeBetweenRounds.Duration + timerReset := o.Config.GetActiveOCRConfig().Soak.TimeBetweenRounds.Duration if err != nil { timerReset = time.Second * 5 o.log.Error().Err(err). @@ -751,6 +749,7 @@ func (o *OCRSoakTest) startGethBlockchainReorg(network blockchain.EVMNetwork, co Str("URL", client.URL). Int("Depth", conf.Depth). Msg("Starting blockchain reorg on Simulated Geth chain") + o.postGrafanaAnnotation(fmt.Sprintf("Starting blockchain reorg on Simulated Geth chain with depth %d", conf.Depth), nil) err := client.GethSetHead(conf.Depth) require.NoError(o.t, err, "Error starting blockchain reorg on Simulated Geth chain") o.reorgHappened = true @@ -762,7 +761,9 @@ func (o *OCRSoakTest) startAnvilGasSpikeSimulation(network blockchain.EVMNetwork Str("URL", client.URL). Any("GasSpikeSimulationConfig", conf). Msg("Starting gas spike simulation on Anvil chain") + o.postGrafanaAnnotation(fmt.Sprintf("Starting gas spike simulation on Anvil chain. Config: %+v", conf), nil) err := client.ModulateBaseFeeOverDuration(o.log, conf.StartGasPrice, conf.GasRisePercentage, conf.Duration.Duration, conf.GasSpike) + o.postGrafanaAnnotation(fmt.Sprintf("Gas spike simulation ended. Config: %+v", conf), nil) require.NoError(o.t, err, "Error starting gas simulation on Anvil chain") o.gasSpikeSimulationHappened = true } @@ -779,7 +780,8 @@ func (o *OCRSoakTest) startAnvilGasLimitSimulation(network blockchain.EVMNetwork Uint64("LatestGasUsed", latestBlock.GasUsed()). Uint64("LatestGasLimit", latestBlock.GasLimit()). Int64("NewGasLimit", newGasLimit). - Msg("Starting new gas limit simulation on Anvil chain") + Msg("Starting gas limit simulation on Anvil chain") + o.postGrafanaAnnotation(fmt.Sprintf("Starting gas limit simulation on Anvil chain. Config: %+v", conf), nil) err = client.AnvilSetBlockGasLimit([]interface{}{newGasLimit}) require.NoError(o.t, err, "Error starting gas simulation on Anvil chain") time.Sleep(conf.Duration.Duration) @@ -788,6 +790,7 @@ func (o *OCRSoakTest) startAnvilGasLimitSimulation(network blockchain.EVMNetwork Any("GasLimitSimulationConfig", conf). Uint64("LatestGasLimit", latestBlock.GasLimit()). Msg("Returning to old gas limit simulation on Anvil chain") + o.postGrafanaAnnotation(fmt.Sprintf("Returning to old gas limit simulation on Anvil chain. Config: %+v", conf), nil) err = client.AnvilSetBlockGasLimit([]interface{}{latestBlock.GasLimit()}) require.NoError(o.t, err, "Error starting gas simulation on Anvil chain") o.gasLimitSimulationHappened = true @@ -837,7 +840,7 @@ func (o *OCRSoakTest) observeOCREvents() error { for { select { case event := <-eventLogs: - if *o.Config.OCR.Soak.OCRVersion == "1" { + if o.OCRVersion == "1" { answerUpdated, err := o.ocrV1Instances[0].ParseEventAnswerUpdated(event) if err != nil { o.log.Warn(). @@ -853,7 +856,7 @@ func (o *OCRSoakTest) observeOCREvents() error { Uint64("Round ID", answerUpdated.RoundId.Uint64()). Int64("Answer", answerUpdated.Current.Int64()). Msg("Answer Updated Event") - } else if *o.Config.OCR.Soak.OCRVersion == "2" { + } else if o.OCRVersion == "2" { answerUpdated, err := o.ocrV2Instances[0].ParseEventAnswerUpdated(event) if err != nil { o.log.Warn(). @@ -900,9 +903,9 @@ func (o *OCRSoakTest) triggerNewRound(newValue int) error { } var err error - if *o.Config.OCR.Soak.OCRVersion == "1" { + if o.OCRVersion == "1" { err = actions.SetAllAdapterResponsesToTheSameValue(newValue, o.ocrV1Instances, o.workerNodes, o.mockServer) - } else if *o.Config.OCR.Soak.OCRVersion == "2" { + } else if o.OCRVersion == "2" { err = actions.SetOCR2AllAdapterResponsesToTheSameValue(newValue, o.ocrV2Instances, o.workerNodes, o.mockServer) } if err != nil { @@ -914,11 +917,11 @@ func (o *OCRSoakTest) triggerNewRound(newValue int) error { Answer: int64(newValue), FoundEvents: make(map[string][]*testreporters.FoundEvent), } - if *o.Config.OCR.Soak.OCRVersion == "1" { + if o.OCRVersion == "1" { for _, ocrInstance := range o.ocrV1Instances { expectedState.FoundEvents[ocrInstance.Address()] = make([]*testreporters.FoundEvent, 0) } - } else if *o.Config.OCR.Soak.OCRVersion == "2" { + } else if o.OCRVersion == "2" { for _, ocrInstance := range o.ocrV2Instances { expectedState.FoundEvents[ocrInstance.Address()] = make([]*testreporters.FoundEvent, 0) } @@ -959,7 +962,7 @@ func (o *OCRSoakTest) collectEvents() error { sortedFoundEvents := make([]*testreporters.FoundEvent, 0) for _, event := range contractEvents { - if *o.Config.OCR.Soak.OCRVersion == "1" { + if o.OCRVersion == "1" { answerUpdated, err := o.ocrV1Instances[0].ParseEventAnswerUpdated(event) if err != nil { return fmt.Errorf("error parsing EventAnswerUpdated for event: %v, %w", event, err) @@ -971,7 +974,7 @@ func (o *OCRSoakTest) collectEvents() error { RoundID: answerUpdated.RoundId.Uint64(), BlockNumber: event.BlockNumber, }) - } else if *o.Config.OCR.Soak.OCRVersion == "2" { + } else if o.OCRVersion == "2" { answerUpdated, err := o.ocrV2Instances[0].ParseEventAnswerUpdated(event) if err != nil { return fmt.Errorf("error parsing EventAnswerUpdated for event: %v, %w", event, err) @@ -1009,30 +1012,36 @@ func (o *OCRSoakTest) collectEvents() error { o.log.Info(). Str("Time", time.Since(start).String()). + Int("Events collected", len(contractEvents)). Msg("Collected on-chain events") + + if len(contractEvents) == 0 { + return fmt.Errorf("no events were collected") + } + return nil } // ensureValues ensures that all values needed to run the test are present func (o *OCRSoakTest) ensureInputValues() error { - ocrConfig := o.Config.OCR.Soak - if *ocrConfig.OCRVersion != "1" && *ocrConfig.OCRVersion != "2" { - return fmt.Errorf("OCR version must be 1 or 2, found %s", *ocrConfig.OCRVersion) + ocrConfig := o.Config.GetActiveOCRConfig().Soak + if o.OCRVersion != "1" && o.OCRVersion != "2" { + return fmt.Errorf("OCR version must be 1 or 2, found %s", o.OCRVersion) } if ocrConfig.NumberOfContracts != nil && *ocrConfig.NumberOfContracts <= 0 { - return fmt.Errorf("Number of OCR contracts must be set and greater than 0, found %d", ocrConfig.NumberOfContracts) + return fmt.Errorf("number of OCR contracts must be set and greater than 0, found %d", ocrConfig.NumberOfContracts) } if o.Config.Common.ChainlinkNodeFunding != nil && *o.Config.Common.ChainlinkNodeFunding <= 0 { - return fmt.Errorf("Chainlink node funding must be greater than 0, found %f", *o.Config.Common.ChainlinkNodeFunding) + return fmt.Errorf("chainlink node funding must be greater than 0, found %f", *o.Config.Common.ChainlinkNodeFunding) } - if o.Config.OCR.Common.TestDuration != nil && o.Config.OCR.Common.TestDuration.Duration <= time.Minute { - return fmt.Errorf("Test duration must be greater than 1 minute, found %s", o.Config.OCR.Common.TestDuration) + if o.Config.GetActiveOCRConfig().Common.TestDuration != nil && o.Config.GetActiveOCRConfig().Common.TestDuration.Duration <= time.Minute { + return fmt.Errorf("test duration must be greater than 1 minute, found %s", o.Config.GetActiveOCRConfig().Common.TestDuration) } if ocrConfig.TimeBetweenRounds != nil && ocrConfig.TimeBetweenRounds.Duration >= time.Hour { - return fmt.Errorf("Time between rounds must be less than 1 hour, found %s", ocrConfig.TimeBetweenRounds) + return fmt.Errorf("time between rounds must be less than 1 hour, found %s", ocrConfig.TimeBetweenRounds) } if ocrConfig.TimeBetweenRounds != nil && ocrConfig.TimeBetweenRounds.Duration < time.Second*30 { - return fmt.Errorf("Time between rounds must be greater or equal to 30 seconds, found %s", ocrConfig.TimeBetweenRounds) + return fmt.Errorf("time between rounds must be greater or equal to 30 seconds, found %s", ocrConfig.TimeBetweenRounds) } return nil @@ -1058,7 +1067,7 @@ func (o *OCRSoakTest) getContractAddressesString() []string { // getContractAddresses returns the addresses of all OCR contracts deployed func (o *OCRSoakTest) getContractAddresses() []common.Address { - contractAddresses := []common.Address{} + var contractAddresses []common.Address if len(o.ocrV1Instances) != 0 { for _, ocrInstance := range o.ocrV1Instances { contractAddresses = append(contractAddresses, common.HexToAddress(ocrInstance.Address())) @@ -1074,6 +1083,31 @@ func (o *OCRSoakTest) getContractAddresses() []common.Address { return contractAddresses } +func (o *OCRSoakTest) postGrafanaAnnotation(text string, tags []string) { + var grafanaClient *grafana.Client + var dashboardUID *string + if o.Config.Logging.Grafana != nil { + baseURL := o.Config.Logging.Grafana.BaseUrl + dashboardUID = o.Config.Logging.Grafana.DashboardUID + token := o.Config.Logging.Grafana.BearerToken + if token == nil || baseURL == nil || dashboardUID == nil { + o.log.Warn().Msg("Skipping Grafana annotation. Grafana config is missing either BearerToken, BaseUrl or DashboardUID") + return + } + grafanaClient = grafana.NewGrafanaClient(*baseURL, *token) + } + _, _, err := grafanaClient.PostAnnotation(grafana.PostAnnotation{ + DashboardUID: *dashboardUID, + Tags: tags, + Text: fmt.Sprintf("Test Namespace: %s
%s
", o.namespace, text), + }) + if err != nil { + o.log.Error().Err(err).Msg("Error posting annotation to Grafana") + } else { + o.log.Info().Msgf("Annotated Grafana dashboard with text: %s", text) + } +} + type ocrTestChaosListener struct { t *testing.T } diff --git a/integration-tests/types/config/node/core.go b/integration-tests/types/config/node/core.go index 290d3e57dfb..181d57a17ed 100644 --- a/integration-tests/types/config/node/core.go +++ b/integration-tests/types/config/node/core.go @@ -133,12 +133,6 @@ func WithKeySpecificMaxGasPrice(addresses []string, maxGasPriceGWei int64) NodeC } } -func WithLogPollInterval(interval time.Duration) NodeConfigOpt { - return func(c *chainlink.Config) { - c.EVM[0].Chain.LogPollInterval = commonconfig.MustNewDuration(interval) - } -} - func BuildChainlinkNodeConfig(nets []blockchain.EVMNetwork, nodeConfig, commonChain string, configByChain map[string]string) (*corechainlink.Config, string, error) { var tomlCfg *corechainlink.Config var err error diff --git a/integration-tests/types/testconfigs.go b/integration-tests/types/testconfigs.go index 58eb1a7c8cf..ee8a614baef 100644 --- a/integration-tests/types/testconfigs.go +++ b/integration-tests/types/testconfigs.go @@ -35,7 +35,7 @@ type KeeperBenchmarkTestConfig interface { ctf_config.GlobalTestConfig tc.CommonTestConfig tc.KeeperTestConfig - ctf_config.NamedConfiguration + ctf_config.NamedConfigurations testreporters.GrafanaURLProvider } diff --git a/integration-tests/universal/log_poller/helpers.go b/integration-tests/universal/log_poller/helpers.go index 7bedef393df..daa4784ec16 100644 --- a/integration-tests/universal/log_poller/helpers.go +++ b/integration-tests/universal/log_poller/helpers.go @@ -13,25 +13,24 @@ import ( "testing" "time" - seth_utils "github.com/smartcontractkit/chainlink-testing-framework/utils/seth" + "github.com/jmoiron/sqlx" + "github.com/smartcontractkit/seth" + "github.com/smartcontractkit/wasp" geth "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" geth_types "github.com/ethereum/go-ethereum/core/types" - "github.com/jmoiron/sqlx" "github.com/rs/zerolog" "github.com/scylladb/go-reflectx" "github.com/stretchr/testify/require" - "github.com/smartcontractkit/seth" - "github.com/smartcontractkit/wasp" - "github.com/smartcontractkit/chainlink-testing-framework/blockchain" + ctf_concurrency "github.com/smartcontractkit/chainlink-testing-framework/concurrency" ctf_test_env "github.com/smartcontractkit/chainlink-testing-framework/docker/test_env" "github.com/smartcontractkit/chainlink-testing-framework/logging" "github.com/smartcontractkit/chainlink-testing-framework/networks" - + seth_utils "github.com/smartcontractkit/chainlink-testing-framework/utils/seth" "github.com/smartcontractkit/chainlink/integration-tests/actions" "github.com/smartcontractkit/chainlink/integration-tests/client" "github.com/smartcontractkit/chainlink/integration-tests/contracts" @@ -204,11 +203,6 @@ func randomWait(minMilliseconds, maxMilliseconds int) { time.Sleep(time.Duration(randomMilliseconds) * time.Millisecond) } -type LogEmitterChannel struct { - logsEmitted int - err error -} - // getIntSlice returns a slice of ints of the provided length func getIntSlice(length int) []int { result := make([]int, length) @@ -229,95 +223,6 @@ func getStringSlice(length int) []string { return result } -// emitEvents emits events from the provided log emitter concurrently according to the provided config -func emitEvents(ctx context.Context, l zerolog.Logger, client *seth.Client, logEmitter *contracts.LogEmitter, cfg *lp_config.Config, wg *sync.WaitGroup, results chan LogEmitterChannel) { - address := (*logEmitter).Address().String() - defer wg.Done() - - var executionGroup sync.WaitGroup - - // Atomic counter is used to keep track of the number of logs emitted - var atomicCounter = atomic.Int32{} - - for i := 0; i < *cfg.LoopedConfig.ExecutionCount; i++ { - executionGroup.Add(1) - } - - var emitAllEvents = func() { - defer executionGroup.Done() - current := atomicCounter.Add(1) - - for _, event := range cfg.General.EventsToEmit { - select { - case <-ctx.Done(): - l.Warn().Str("Emitter address", address).Msg("Context cancelled, not emitting events") - return - default: - l.Debug().Str("Emitter address", address).Str("Event type", event.Name).Str("index", fmt.Sprintf("%d/%d", current, *cfg.LoopedConfig.ExecutionCount)).Msg("Emitting log from emitter") - var err error - switch event.Name { - case "Log1": - _, err = client.Decode((*logEmitter).EmitLogIntsFromKey(getIntSlice(*cfg.General.EventsPerTx), client.AnySyncedKey())) - case "Log2": - _, err = client.Decode((*logEmitter).EmitLogIntsIndexedFromKey(getIntSlice(*cfg.General.EventsPerTx), client.AnySyncedKey())) - case "Log3": - _, err = client.Decode((*logEmitter).EmitLogStringsFromKey(getStringSlice(*cfg.General.EventsPerTx), client.AnySyncedKey())) - case "Log4": - _, err = client.Decode((*logEmitter).EmitLogIntMultiIndexedFromKey(1, 1, *cfg.General.EventsPerTx, client.AnySyncedKey())) - default: - err = fmt.Errorf("unknown event name: %s", event.Name) - } - - if err != nil { - results <- LogEmitterChannel{ - err: err, - } - return - } - randomWait(*cfg.LoopedConfig.MinEmitWaitTimeMs, *cfg.LoopedConfig.MaxEmitWaitTimeMs) - } - - if (current)%10 == 0 { - l.Info().Str("Emitter address", address).Str("Index", fmt.Sprintf("%d/%d", current, *cfg.LoopedConfig.ExecutionCount)).Msgf("Emitted all %d events", len(cfg.General.EventsToEmit)) - } - } - } - - clientNumber := int(*client.Cfg.EphemeralAddrs) - emissionsPerClient := *cfg.LoopedConfig.ExecutionCount / clientNumber - extraEmissions := *cfg.LoopedConfig.ExecutionCount % clientNumber - - l.Debug().Str("Emitter address", address). - Int("Total logs to emit", *cfg.LoopedConfig.ExecutionCount*len(cfg.General.EventsToEmit)*(*cfg.General.EventsPerTx)). - Int("Total clients", clientNumber). - Int("Emissions per client", emissionsPerClient). - Int("Extra emissions", extraEmissions). - Msg("Starting to emit events") - - for i := 0; i < clientNumber; i++ { - go func(key int) { - numTasks := emissionsPerClient - if key < extraEmissions { - numTasks++ - } - - for idx := 0; idx < numTasks; idx++ { - emitAllEvents() - } - }(i) - } - - executionGroup.Wait() - - localCounter := int(atomicCounter.Load()) * *cfg.General.EventsPerTx * len(cfg.General.EventsToEmit) - l.Info().Str("Emitter address", address).Int("Total logs emitted", localCounter).Msg("Finished emitting events") - - results <- LogEmitterChannel{ - logsEmitted: localCounter, - err: nil, - } -} - // LogPollerHasFinalisedEndBlock returns true if all CL nodes have finalised processing the provided end block func LogPollerHasFinalisedEndBlock(endBlock int64, chainID *big.Int, l zerolog.Logger, coreLogger core_logger.SugaredLogger, nodes *test_env.ClCluster) (bool, error) { wg := &sync.WaitGroup{} @@ -699,7 +604,7 @@ func GetMissingLogs(startBlock, endBlock int64, logEmitters []*contracts.LogEmit if int64(len(allLogsInEVMNode)) != expectedTotalLogsEmitted { l.Warn(). Str("Actual/Expected", fmt.Sprintf("%d/%d", expectedTotalLogsEmitted, len(allLogsInEVMNode))). - Msg("Some of the test logs were not found in EVM node. This is a bug in the test") + Msg("Actual number of logs found on EVM nodes differs from expected ones. Most probably this is a bug in the test") } return missingLogs, nil @@ -854,58 +759,89 @@ func runWaspGenerator(t *testing.T, cfg *lp_config.Config, logEmitters []*contra return counter.value, nil } +type logEmissionTask struct { + emitter *contracts.LogEmitter + eventsToEmit []abi.Event + eventsPerTx int +} + +type emittedLogsData struct { + count int +} + +func (d emittedLogsData) GetResult() emittedLogsData { + return d +} + // runLoopedGenerator runs the looped generator and returns the total number of logs emitted func runLoopedGenerator(t *testing.T, cfg *lp_config.Config, client *seth.Client, logEmitters []*contracts.LogEmitter) (int, error) { l := logging.GetTestLogger(t) - // Start emitting events in parallel, each contract is emitting events in a separate goroutine - // We will stop as soon as we encounter an error - wg := &sync.WaitGroup{} - emitterCh := make(chan LogEmitterChannel, len(logEmitters)) + tasks := make([]logEmissionTask, 0) + for i := 0; i < *cfg.LoopedConfig.ExecutionCount; i++ { + for _, logEmitter := range logEmitters { + tasks = append(tasks, logEmissionTask{ + emitter: logEmitter, + eventsToEmit: cfg.General.EventsToEmit, + eventsPerTx: *cfg.General.EventsPerTx, + }) + } + } - ctx, cancelFn := context.WithCancel(context.Background()) - defer cancelFn() + l.Info().Int("Total tasks", len(tasks)).Msg("Starting to emit events") - for i := 0; i < len(logEmitters); i++ { - wg.Add(1) - go func(idx int) { - emitEvents(ctx, l, client, logEmitters[idx], cfg, wg, emitterCh) - }(i) - } + var atomicCounter = atomic.Int32{} - var emitErr error - total := 0 + var emitAllEventsFn = func(resultCh chan emittedLogsData, errorCh chan error, _ int, task logEmissionTask) { + current := atomicCounter.Add(1) - aggrChan := make(chan int, len(logEmitters)) + address := (*task.emitter).Address().String() - go func() { - for { - select { - case <-ctx.Done(): + for _, event := range cfg.General.EventsToEmit { + l.Debug().Str("Emitter address", address).Str("Event type", event.Name).Str("index", fmt.Sprintf("%d/%d", current, *cfg.LoopedConfig.ExecutionCount)).Msg("Emitting log from emitter") + var err error + switch event.Name { + case "Log1": + _, err = client.Decode((*task.emitter).EmitLogIntsFromKey(getIntSlice(*cfg.General.EventsPerTx), client.AnySyncedKey())) + case "Log2": + _, err = client.Decode((*task.emitter).EmitLogIntsIndexedFromKey(getIntSlice(*cfg.General.EventsPerTx), client.AnySyncedKey())) + case "Log3": + _, err = client.Decode((*task.emitter).EmitLogStringsFromKey(getStringSlice(*cfg.General.EventsPerTx), client.AnySyncedKey())) + case "Log4": + _, err = client.Decode((*task.emitter).EmitLogIntMultiIndexedFromKey(1, 1, *cfg.General.EventsPerTx, client.AnySyncedKey())) + default: + err = fmt.Errorf("unknown event name: %s", event.Name) + } + + if err != nil { + errorCh <- err return - case emitter := <-emitterCh: - if emitter.err != nil { - emitErr = emitter.err - cancelFn() - return - } - aggrChan <- emitter.logsEmitted + } + randomWait(*cfg.LoopedConfig.MinEmitWaitTimeMs, *cfg.LoopedConfig.MaxEmitWaitTimeMs) + + if (current)%10 == 0 { + l.Info().Str("Emitter address", address).Str("Index", fmt.Sprintf("%d/%d", current, *cfg.LoopedConfig.ExecutionCount)).Msgf("Emitted all %d events", len(cfg.General.EventsToEmit)) } } - }() - wg.Wait() - close(emitterCh) + resultCh <- emittedLogsData{ + *cfg.General.EventsPerTx * len(cfg.General.EventsToEmit), + } + } + + executor := ctf_concurrency.NewConcurrentExecutor[emittedLogsData, emittedLogsData, logEmissionTask](l) + r, err := executor.Execute(int(*client.Cfg.EphemeralAddrs), tasks, emitAllEventsFn) - if emitErr != nil { - return 0, emitErr + if err != nil { + return 0, err } - for i := 0; i < len(logEmitters); i++ { - total += <-aggrChan + var total int + for _, result := range r { + total += result.count } - return int(total), nil + return total, nil } // GetExpectedLogCount returns the expected number of logs to be emitted based on the provided config @@ -1135,6 +1071,13 @@ func SetupLogPollerTestDocker( linkToken, err := contracts.DeployLinkTokenContract(l, chainClient) require.NoError(t, err, "Error deploying LINK token") + wethToken, err := contracts.DeployWETHTokenContract(l, chainClient) + require.NoError(t, err, "Error deploying weth token contract") + + // This feed is used for both eth/usd and link/usd + ethUSDFeed, err := contracts.DeployMockETHUSDFeed(chainClient, registryConfig.FallbackLinkPrice) + require.NoError(t, err, "Error deploying eth usd feed contract") + linkBalance, err := linkToken.BalanceOf(context.Background(), chainClient.MustGetRootKeyAddress().Hex()) require.NoError(t, err, "Error getting LINK balance") @@ -1151,6 +1094,8 @@ func SetupLogPollerTestDocker( registryVersion, registryConfig, linkToken, + wethToken, + ethUSDFeed, ) // Fund the registry with LINK diff --git a/internal/testdb/testdb.go b/internal/testdb/testdb.go index 9b531166113..88251ae2c6f 100644 --- a/internal/testdb/testdb.go +++ b/internal/testdb/testdb.go @@ -5,6 +5,7 @@ import ( "errors" "fmt" "net/url" + "strings" "github.com/smartcontractkit/chainlink/v2/core/store/dialects" ) @@ -54,3 +55,27 @@ func CreateOrReplace(parsed url.URL, suffix string, withTemplate bool) (string, parsed.Path = fmt.Sprintf("/%s", dbname) return parsed.String(), nil } + +// Drop drops the database at the given URL. +func Drop(dbURL url.URL) error { + if dbURL.Path == "" { + return errors.New("path missing from database URL") + } + dbname := strings.TrimPrefix(dbURL.Path, "/") + + // Cannot drop test database if we are connected to it, so we must connect + // to a different one. 'postgres' should be present on all postgres installations + dbURL.Path = "/postgres" + db, err := sql.Open(string(dialects.Postgres), dbURL.String()) + if err != nil { + return fmt.Errorf("in order to drop the test database, we need to connect to a separate database"+ + " called 'postgres'. But we are unable to open 'postgres' database: %+v\n", err) + } + defer db.Close() + + _, err = db.Exec(fmt.Sprintf("DROP DATABASE IF EXISTS %s", dbname)) + if err != nil { + return fmt.Errorf("unable to drop postgres migrations test database: %v", err) + } + return nil +} diff --git a/operator_ui/TAG b/operator_ui/TAG index 57ed352173b..bd6882b0f5c 100644 --- a/operator_ui/TAG +++ b/operator_ui/TAG @@ -1 +1 @@ -v0.8.0-7e6a14f +v0.8.0-094d250 diff --git a/package.json b/package.json index 7c9194144a4..b60a4573d5e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "chainlink", - "version": "2.13.0", + "version": "2.14.0", "description": "node of the decentralized oracle network, bridging on and off-chain computation", "main": "index.js", "scripts": { @@ -17,6 +17,10 @@ "url": "https://github.com/smartcontractkit/chainlink/issues" }, "homepage": "https://github.com/smartcontractkit/chainlink#readme", + "engines": { + "node": ">=18", + "pnpm": ">=9" + }, "devDependencies": { "@changesets/changelog-github": "^0.4.8", "@changesets/cli": "~2.26.2", diff --git a/plugins/chainlink.Dockerfile b/plugins/chainlink.Dockerfile index 50986396296..6d42567c745 100644 --- a/plugins/chainlink.Dockerfile +++ b/plugins/chainlink.Dockerfile @@ -1,5 +1,5 @@ # Build image: Chainlink binary -FROM golang:1.21-bullseye as buildgo +FROM golang:1.22-bullseye as buildgo RUN go version WORKDIR /chainlink @@ -33,7 +33,7 @@ RUN mkdir /chainlink-starknet RUN go list -m -f "{{.Dir}}" github.com/smartcontractkit/chainlink-starknet/relayer | xargs -I % ln -s % /chainlink-starknet/relayer # Build image: Plugins -FROM golang:1.21-bullseye as buildplugins +FROM golang:1.22-bullseye as buildplugins RUN go version WORKDIR /chainlink-feeds diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 785f0f05456..95d247d9937 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,53 +1,1054 @@ -lockfileVersion: '6.0' +lockfileVersion: '9.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.6.1 - version: 7.6.1 +importers: + + .: + 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.6.1 + version: 7.6.1 packages: - /@babel/code-frame@7.23.5: - resolution: {integrity: sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==} - engines: {node: '>=6.9.0'} + '@babel/code-frame@7.23.5': + resolution: {integrity: sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-identifier@7.22.20': + resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==} + engines: {node: '>=6.9.0'} + + '@babel/highlight@7.23.4': + resolution: {integrity: sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==} + engines: {node: '>=6.9.0'} + + '@babel/runtime@7.23.9': + resolution: {integrity: sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw==} + engines: {node: '>=6.9.0'} + + '@changesets/apply-release-plan@6.1.4': + resolution: {integrity: sha512-FMpKF1fRlJyCZVYHr3CbinpZZ+6MwvOtWUuO8uo+svcATEoc1zRDcj23pAurJ2TZ/uVz1wFHH6K3NlACy0PLew==} + + '@changesets/assemble-release-plan@5.2.4': + resolution: {integrity: sha512-xJkWX+1/CUaOUWTguXEbCDTyWJFECEhmdtbkjhn5GVBGxdP/JwaHBIU9sW3FR6gD07UwZ7ovpiPclQZs+j+mvg==} + + '@changesets/changelog-git@0.1.14': + resolution: {integrity: sha512-+vRfnKtXVWsDDxGctOfzJsPhaCdXRYoe+KyWYoq5X/GqoISREiat0l3L8B0a453B2B4dfHGcZaGyowHbp9BSaA==} + + '@changesets/changelog-github@0.4.8': + resolution: {integrity: sha512-jR1DHibkMAb5v/8ym77E4AMNWZKB5NPzw5a5Wtqm1JepAuIF+hrKp2u04NKM14oBZhHglkCfrla9uq8ORnK/dw==} + + '@changesets/cli@2.26.2': + resolution: {integrity: sha512-dnWrJTmRR8bCHikJHl9b9HW3gXACCehz4OasrXpMp7sx97ECuBGGNjJhjPhdZNCvMy9mn4BWdplI323IbqsRig==} + hasBin: true + + '@changesets/config@2.3.1': + resolution: {integrity: sha512-PQXaJl82CfIXddUOppj4zWu+987GCw2M+eQcOepxN5s+kvnsZOwjEJO3DH9eVy+OP6Pg/KFEWdsECFEYTtbg6w==} + + '@changesets/errors@0.1.4': + resolution: {integrity: sha512-HAcqPF7snsUJ/QzkWoKfRfXushHTu+K5KZLJWPb34s4eCZShIf8BFO3fwq6KU8+G7L5KdtN2BzQAXOSXEyiY9Q==} + + '@changesets/get-dependents-graph@1.3.6': + resolution: {integrity: sha512-Q/sLgBANmkvUm09GgRsAvEtY3p1/5OCzgBE5vX3vgb5CvW0j7CEljocx5oPXeQSNph6FXulJlXV3Re/v3K3P3Q==} + + '@changesets/get-github-info@0.5.2': + resolution: {integrity: sha512-JppheLu7S114aEs157fOZDjFqUDpm7eHdq5E8SSR0gUBTEK0cNSHsrSR5a66xs0z3RWuo46QvA3vawp8BxDHvg==} + + '@changesets/get-release-plan@3.0.17': + resolution: {integrity: sha512-6IwKTubNEgoOZwDontYc2x2cWXfr6IKxP3IhKeK+WjyD6y3M4Gl/jdQvBw+m/5zWILSOCAaGLu2ZF6Q+WiPniw==} + + '@changesets/get-version-range-type@0.3.2': + resolution: {integrity: sha512-SVqwYs5pULYjYT4op21F2pVbcrca4qA/bAA3FmFXKMN7Y+HcO8sbZUTx3TAy2VXulP2FACd1aC7f2nTuqSPbqg==} + + '@changesets/git@2.0.0': + resolution: {integrity: sha512-enUVEWbiqUTxqSnmesyJGWfzd51PY4H7mH9yUw0hPVpZBJ6tQZFMU3F3mT/t9OJ/GjyiM4770i+sehAn6ymx6A==} + + '@changesets/logger@0.0.5': + resolution: {integrity: sha512-gJyZHomu8nASHpaANzc6bkQMO9gU/ib20lqew1rVx753FOxffnCrJlGIeQVxNWCqM+o6OOleCo/ivL8UAO5iFw==} + + '@changesets/parse@0.3.16': + resolution: {integrity: sha512-127JKNd167ayAuBjUggZBkmDS5fIKsthnr9jr6bdnuUljroiERW7FBTDNnNVyJ4l69PzR57pk6mXQdtJyBCJKg==} + + '@changesets/pre@1.0.14': + resolution: {integrity: sha512-dTsHmxQWEQekHYHbg+M1mDVYFvegDh9j/kySNuDKdylwfMEevTeDouR7IfHNyVodxZXu17sXoJuf2D0vi55FHQ==} + + '@changesets/read@0.5.9': + resolution: {integrity: sha512-T8BJ6JS6j1gfO1HFq50kU3qawYxa4NTbI/ASNVVCBTsKquy2HYwM9r7ZnzkiMe8IEObAJtUVGSrePCOxAK2haQ==} + + '@changesets/types@4.1.0': + resolution: {integrity: sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==} + + '@changesets/types@5.2.1': + resolution: {integrity: sha512-myLfHbVOqaq9UtUKqR/nZA/OY7xFjQMdfgfqeZIBK4d0hA6pgxArvdv8M+6NUzzBsjWLOtvApv8YHr4qM+Kpfg==} + + '@changesets/write@0.2.3': + resolution: {integrity: sha512-Dbamr7AIMvslKnNYsLFafaVORx4H0pvCA2MHqgtNCySMe1blImEyAEOzDmcgKAkgz4+uwoLz7demIrX+JBr/Xw==} + + '@manypkg/find-root@1.1.0': + resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} + + '@manypkg/get-packages@1.1.3': + resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==} + + '@nodelib/fs.scandir@2.1.5': + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} + + '@nodelib/fs.stat@2.0.5': + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} + + '@nodelib/fs.walk@1.2.8': + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} + + '@types/is-ci@3.0.4': + resolution: {integrity: sha512-AkCYCmwlXeuH89DagDCzvCAyltI2v9lh3U3DqSg/GrBYoReAaWwxfXCqMx9UV5MajLZ4ZFwZzV4cABGIxk2XRw==} + + '@types/minimist@1.2.5': + resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} + + '@types/node@12.20.55': + resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} + + '@types/normalize-package-data@2.4.4': + resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} + + '@types/semver@7.5.8': + resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} + + ansi-colors@4.1.3: + resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} + engines: {node: '>=6'} + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-styles@3.2.1: + resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} + engines: {node: '>=4'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + argparse@1.0.10: + resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} + + array-buffer-byte-length@1.0.1: + resolution: {integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==} + engines: {node: '>= 0.4'} + + array-union@2.1.0: + resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} + engines: {node: '>=8'} + + array.prototype.flat@1.3.2: + resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==} + engines: {node: '>= 0.4'} + + arraybuffer.prototype.slice@1.0.3: + resolution: {integrity: sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==} + engines: {node: '>= 0.4'} + + arrify@1.0.1: + resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==} + engines: {node: '>=0.10.0'} + + available-typed-arrays@1.0.7: + resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} + engines: {node: '>= 0.4'} + + better-path-resolve@1.0.0: + resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} + engines: {node: '>=4'} + + braces@3.0.2: + resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} + engines: {node: '>=8'} + + breakword@1.0.6: + resolution: {integrity: sha512-yjxDAYyK/pBvws9H4xKYpLDpYKEH6CzrBPAuXq3x18I+c/2MkVtT3qAr7Oloi6Dss9qNhPVueAAVU1CSeNDIXw==} + + call-bind@1.0.7: + resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} + engines: {node: '>= 0.4'} + + camelcase-keys@6.2.2: + resolution: {integrity: sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==} + engines: {node: '>=8'} + + camelcase@5.3.1: + resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} + engines: {node: '>=6'} + + chalk@2.4.2: + resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} + engines: {node: '>=4'} + + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + + chardet@0.7.0: + resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} + + ci-info@3.9.0: + resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} + engines: {node: '>=8'} + + cliui@6.0.0: + resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==} + + cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + + clone@1.0.4: + resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} + engines: {node: '>=0.8'} + + color-convert@1.9.3: + resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.3: + resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + cross-spawn@5.1.0: + resolution: {integrity: sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==} + + csv-generate@3.4.3: + resolution: {integrity: sha512-w/T+rqR0vwvHqWs/1ZyMDWtHHSJaN06klRqJXBEpDJaM/+dZkso0OKh1VcuuYvK3XM53KysVNq8Ko/epCK8wOw==} + + csv-parse@4.16.3: + resolution: {integrity: sha512-cO1I/zmz4w2dcKHVvpCr7JVRu8/FymG5OEpmvsZYlccYolPBLoVGKUHgNoc4ZGkFeFlWGEDmMyBM+TTqRdW/wg==} + + csv-stringify@5.6.5: + resolution: {integrity: sha512-PjiQ659aQ+fUTQqSrd1XEDnOr52jh30RBurfzkscaE2tPaFsDH5wOAHJiw8XAHphRknCwMUE9KRayc4K/NbO8A==} + + csv@5.5.3: + resolution: {integrity: sha512-QTaY0XjjhTQOdguARF0lGKm5/mEq9PD9/VhZZegHDIBq2tQwgNpHc3dneD4mGo2iJs+fTKv5Bp0fZ+BRuY3Z0g==} + engines: {node: '>= 0.1.90'} + + dataloader@1.4.0: + resolution: {integrity: sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==} + + decamelize-keys@1.1.1: + resolution: {integrity: sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==} + engines: {node: '>=0.10.0'} + + decamelize@1.2.0: + resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} + engines: {node: '>=0.10.0'} + + defaults@1.0.4: + resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} + + define-data-property@1.1.4: + resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} + engines: {node: '>= 0.4'} + + define-properties@1.2.1: + resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} + engines: {node: '>= 0.4'} + + detect-indent@6.1.0: + resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} + engines: {node: '>=8'} + + dir-glob@3.0.1: + resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} + engines: {node: '>=8'} + + dotenv@8.6.0: + resolution: {integrity: sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==} + engines: {node: '>=10'} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + enquirer@2.4.1: + resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} + engines: {node: '>=8.6'} + + error-ex@1.3.2: + resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} + + es-abstract@1.22.4: + resolution: {integrity: sha512-vZYJlk2u6qHYxBOTjAeg7qUxHdNfih64Uu2J8QqWgXZ2cri0ZpJAkzDUK/q593+mvKwlxyaxr6F1Q+3LKoQRgg==} + engines: {node: '>= 0.4'} + + es-define-property@1.0.0: + resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} + engines: {node: '>= 0.4'} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + + es-set-tostringtag@2.0.3: + resolution: {integrity: sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==} + engines: {node: '>= 0.4'} + + es-shim-unscopables@1.0.2: + resolution: {integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==} + + es-to-primitive@1.2.1: + resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} + engines: {node: '>= 0.4'} + + escalade@3.1.2: + resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} + engines: {node: '>=6'} + + escape-string-regexp@1.0.5: + resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} + engines: {node: '>=0.8.0'} + + esprima@4.0.1: + resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} + engines: {node: '>=4'} + hasBin: true + + extendable-error@0.1.7: + resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} + + external-editor@3.1.0: + resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} + engines: {node: '>=4'} + + fast-glob@3.3.2: + resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} + engines: {node: '>=8.6.0'} + + fastq@1.17.1: + resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} + + fill-range@7.0.1: + resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} + engines: {node: '>=8'} + + find-up@4.1.0: + resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} + engines: {node: '>=8'} + + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + + find-yarn-workspace-root2@1.2.16: + resolution: {integrity: sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==} + + for-each@0.3.3: + resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + + fs-extra@7.0.1: + resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} + engines: {node: '>=6 <7 || >=8'} + + fs-extra@8.1.0: + resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} + engines: {node: '>=6 <7 || >=8'} + + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + + function.prototype.name@1.1.6: + resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} + engines: {node: '>= 0.4'} + + functions-have-names@1.2.3: + resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} + + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + + get-intrinsic@1.2.4: + resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} + engines: {node: '>= 0.4'} + + get-symbol-description@1.0.2: + resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} + engines: {node: '>= 0.4'} + + glob-parent@5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + + globalthis@1.0.3: + resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} + engines: {node: '>= 0.4'} + + globby@11.1.0: + resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} + engines: {node: '>=10'} + + gopd@1.0.1: + resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + + graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + + grapheme-splitter@1.0.4: + resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} + + hard-rejection@2.1.0: + resolution: {integrity: sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==} + engines: {node: '>=6'} + + has-bigints@1.0.2: + resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} + + has-flag@3.0.0: + resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} + engines: {node: '>=4'} + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + has-property-descriptors@1.0.2: + resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} + + has-proto@1.0.3: + resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} + engines: {node: '>= 0.4'} + + has-symbols@1.0.3: + resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} + engines: {node: '>= 0.4'} + + has-tostringtag@1.0.2: + resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} + engines: {node: '>= 0.4'} + + hasown@2.0.1: + resolution: {integrity: sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==} + engines: {node: '>= 0.4'} + + hosted-git-info@2.8.9: + resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} + + human-id@1.0.2: + resolution: {integrity: sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==} + + iconv-lite@0.4.24: + resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} + engines: {node: '>=0.10.0'} + + ignore@5.3.1: + resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} + engines: {node: '>= 4'} + + indent-string@4.0.0: + resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} + engines: {node: '>=8'} + + internal-slot@1.0.7: + resolution: {integrity: sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==} + engines: {node: '>= 0.4'} + + is-array-buffer@3.0.4: + resolution: {integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==} + engines: {node: '>= 0.4'} + + is-arrayish@0.2.1: + resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} + + is-bigint@1.0.4: + resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} + + is-boolean-object@1.1.2: + resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} + engines: {node: '>= 0.4'} + + is-callable@1.2.7: + resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} + engines: {node: '>= 0.4'} + + is-ci@3.0.1: + resolution: {integrity: sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==} + hasBin: true + + is-core-module@2.13.1: + resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} + + is-date-object@1.0.5: + resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} + engines: {node: '>= 0.4'} + + is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + + is-negative-zero@2.0.3: + resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==} + engines: {node: '>= 0.4'} + + is-number-object@1.0.7: + resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} + engines: {node: '>= 0.4'} + + is-number@7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + + is-plain-obj@1.1.0: + resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} + engines: {node: '>=0.10.0'} + + is-regex@1.1.4: + resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} + engines: {node: '>= 0.4'} + + is-shared-array-buffer@1.0.3: + resolution: {integrity: sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==} + engines: {node: '>= 0.4'} + + is-string@1.0.7: + resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} + engines: {node: '>= 0.4'} + + is-subdir@1.2.0: + resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} + engines: {node: '>=4'} + + is-symbol@1.0.4: + resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} + engines: {node: '>= 0.4'} + + is-typed-array@1.1.13: + resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==} + engines: {node: '>= 0.4'} + + is-weakref@1.0.2: + resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} + + is-windows@1.0.2: + resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} + engines: {node: '>=0.10.0'} + + isarray@2.0.5: + resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + + js-yaml@3.14.1: + resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} + hasBin: true + + json-parse-even-better-errors@2.3.1: + resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + + jsonfile@4.0.0: + resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} + + kind-of@6.0.3: + resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} + engines: {node: '>=0.10.0'} + + kleur@4.1.5: + resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} + engines: {node: '>=6'} + + lines-and-columns@1.2.4: + resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + + load-yaml-file@0.2.0: + resolution: {integrity: sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==} + engines: {node: '>=6'} + + locate-path@5.0.0: + resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} + engines: {node: '>=8'} + + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + + lodash.startcase@4.4.0: + resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} + + lru-cache@4.1.5: + resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==} + + map-obj@1.0.1: + resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} + engines: {node: '>=0.10.0'} + + map-obj@4.3.0: + resolution: {integrity: sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==} + engines: {node: '>=8'} + + meow@6.1.1: + resolution: {integrity: sha512-3YffViIt2QWgTy6Pale5QpopX/IvU3LPL03jOTqp6pGj3VjesdO/U8CuHMKpnQr4shCNCM5fd5XFFvIIl6JBHg==} + engines: {node: '>=8'} + + merge2@1.4.1: + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} + + micromatch@4.0.5: + resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} + engines: {node: '>=8.6'} + + min-indent@1.0.1: + resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} + engines: {node: '>=4'} + + minimist-options@4.1.0: + resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} + engines: {node: '>= 6'} + + mixme@0.5.10: + resolution: {integrity: sha512-5H76ANWinB1H3twpJ6JY8uvAtpmFvHNArpilJAjXRKXSDDLPIMoZArw5SH0q9z+lLs8IrMw7Q2VWpWimFKFT1Q==} + engines: {node: '>= 8.0.0'} + + 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 + + normalize-package-data@2.5.0: + resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} + + object-inspect@1.13.1: + resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} + + object-keys@1.1.1: + resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} + engines: {node: '>= 0.4'} + + object.assign@4.1.5: + resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} + engines: {node: '>= 0.4'} + + os-tmpdir@1.0.2: + resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} + engines: {node: '>=0.10.0'} + + outdent@0.5.0: + resolution: {integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==} + + p-filter@2.1.0: + resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==} + engines: {node: '>=8'} + + p-limit@2.3.0: + resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} + engines: {node: '>=6'} + + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + + p-locate@4.1.0: + resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} + engines: {node: '>=8'} + + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + + p-map@2.1.0: + resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} + engines: {node: '>=6'} + + p-try@2.2.0: + resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} + engines: {node: '>=6'} + + parse-json@5.2.0: + resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} + engines: {node: '>=8'} + + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-parse@1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + + path-type@4.0.0: + resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} + engines: {node: '>=8'} + + picomatch@2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + + pify@4.0.1: + resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} + engines: {node: '>=6'} + + pkg-dir@4.2.0: + resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} + engines: {node: '>=8'} + + possible-typed-array-names@1.0.0: + resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} + engines: {node: '>= 0.4'} + + preferred-pm@3.1.3: + resolution: {integrity: sha512-MkXsENfftWSRpzCzImcp4FRsCc3y1opwB73CfCNWyzMqArju2CrlMHlqB7VexKiPEOjGMbttv1r9fSCn5S610w==} + engines: {node: '>=10'} + + prettier@2.8.8: + resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} + engines: {node: '>=10.13.0'} + hasBin: true + + pseudomap@1.0.2: + resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} + + queue-microtask@1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + + quick-lru@4.0.1: + resolution: {integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==} + engines: {node: '>=8'} + + read-pkg-up@7.0.1: + resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==} + engines: {node: '>=8'} + + read-pkg@5.2.0: + resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==} + engines: {node: '>=8'} + + read-yaml-file@1.1.0: + resolution: {integrity: sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==} + engines: {node: '>=6'} + + redent@3.0.0: + resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} + engines: {node: '>=8'} + + regenerator-runtime@0.14.1: + resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} + + regexp.prototype.flags@1.5.2: + resolution: {integrity: sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==} + engines: {node: '>= 0.4'} + + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + + require-main-filename@2.0.0: + resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} + + resolve-from@5.0.0: + resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} + engines: {node: '>=8'} + + resolve@1.22.8: + resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} + hasBin: true + + reusify@1.0.4: + resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + + run-parallel@1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + + safe-array-concat@1.1.0: + resolution: {integrity: sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==} + engines: {node: '>=0.4'} + + safe-regex-test@1.0.3: + resolution: {integrity: sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==} + engines: {node: '>= 0.4'} + + safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + + semver@5.7.2: + resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} + hasBin: true + + semver@7.6.1: + resolution: {integrity: sha512-f/vbBsu+fOiYt+lmwZV0rVwJScl46HppnOA1ZvIuBWKOTlllpyJ3bfVax76/OrhCH38dyxoDIA8K7uB963IYgA==} + engines: {node: '>=10'} + hasBin: true + + set-blocking@2.0.0: + resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} + + set-function-length@1.2.1: + resolution: {integrity: sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==} + engines: {node: '>= 0.4'} + + set-function-name@2.0.2: + resolution: {integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==} + engines: {node: '>= 0.4'} + + shebang-command@1.2.0: + resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} + engines: {node: '>=0.10.0'} + + shebang-regex@1.0.0: + resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==} + engines: {node: '>=0.10.0'} + + side-channel@1.0.5: + resolution: {integrity: sha512-QcgiIWV4WV7qWExbN5llt6frQB/lBven9pqliLXfGPB+K9ZYXxDozp0wLkHS24kWCm+6YXH/f0HhnObZnZOBnQ==} + engines: {node: '>= 0.4'} + + signal-exit@3.0.7: + resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + + slash@3.0.0: + resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} + engines: {node: '>=8'} + + smartwrap@2.0.2: + resolution: {integrity: sha512-vCsKNQxb7PnCNd2wY1WClWifAc2lwqsG8OaswpJkVJsvMGcnEntdTCDajZCkk93Ay1U3t/9puJmb525Rg5MZBA==} + engines: {node: '>=6'} + hasBin: true + + spawndamnit@2.0.0: + resolution: {integrity: sha512-j4JKEcncSjFlqIwU5L/rp2N5SIPsdxaRsIv678+TZxZ0SRDJTm8JrxJMjE/XuiEZNEir3S8l0Fa3Ke339WI4qA==} + + spdx-correct@3.2.0: + resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} + + spdx-exceptions@2.5.0: + resolution: {integrity: sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==} + + spdx-expression-parse@3.0.1: + resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} + + spdx-license-ids@3.0.17: + resolution: {integrity: sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg==} + + sprintf-js@1.0.3: + resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} + + stream-transform@2.1.3: + resolution: {integrity: sha512-9GHUiM5hMiCi6Y03jD2ARC1ettBXkQBoQAe7nJsPknnI0ow10aXjTnew8QtYQmLjzn974BnmWEAJgCY6ZP1DeQ==} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + string.prototype.trim@1.2.8: + resolution: {integrity: sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==} + engines: {node: '>= 0.4'} + + string.prototype.trimend@1.0.7: + resolution: {integrity: sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==} + + string.prototype.trimstart@1.0.7: + resolution: {integrity: sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-bom@3.0.0: + resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} + engines: {node: '>=4'} + + strip-indent@3.0.0: + resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} + engines: {node: '>=8'} + + supports-color@5.5.0: + resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} + engines: {node: '>=4'} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + supports-preserve-symlinks-flag@1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + + term-size@2.2.1: + resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} + engines: {node: '>=8'} + + tmp@0.0.33: + resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} + engines: {node: '>=0.6.0'} + + to-regex-range@5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + + tr46@0.0.3: + resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + + trim-newlines@3.0.1: + resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} + engines: {node: '>=8'} + + tty-table@4.2.3: + resolution: {integrity: sha512-Fs15mu0vGzCrj8fmJNP7Ynxt5J7praPXqFN0leZeZBXJwkMxv9cb2D454k1ltrtUSJbZ4yH4e0CynsHLxmUfFA==} + engines: {node: '>=8.0.0'} + hasBin: true + + type-fest@0.13.1: + resolution: {integrity: sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==} + engines: {node: '>=10'} + + type-fest@0.6.0: + resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==} + engines: {node: '>=8'} + + type-fest@0.8.1: + resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} + engines: {node: '>=8'} + + typed-array-buffer@1.0.2: + resolution: {integrity: sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==} + engines: {node: '>= 0.4'} + + typed-array-byte-length@1.0.1: + resolution: {integrity: sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==} + engines: {node: '>= 0.4'} + + typed-array-byte-offset@1.0.2: + resolution: {integrity: sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==} + engines: {node: '>= 0.4'} + + typed-array-length@1.0.5: + resolution: {integrity: sha512-yMi0PlwuznKHxKmcpoOdeLwxBoVPkqZxd7q2FgMkmD3bNwvF5VW0+UlUQ1k1vmktTu4Yu13Q0RIxEP8+B+wloA==} + engines: {node: '>= 0.4'} + + unbox-primitive@1.0.2: + resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} + + universalify@0.1.2: + resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} + engines: {node: '>= 4.0.0'} + + validate-npm-package-license@3.0.4: + resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} + + wcwidth@1.0.1: + resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} + + webidl-conversions@3.0.1: + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + + whatwg-url@5.0.0: + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + + which-boxed-primitive@1.0.2: + resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} + + which-module@2.0.1: + resolution: {integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==} + + which-pm@2.0.0: + resolution: {integrity: sha512-Lhs9Pmyph0p5n5Z3mVnN0yWcbQYUAD7rbQUiMsQxOJ3T57k7RFe35SUwWMf7dsbDZks1uOmw4AecB/JMDj3v/w==} + engines: {node: '>=8.15'} + + which-typed-array@1.1.14: + resolution: {integrity: sha512-VnXFiIW8yNn9kIHN88xvZ4yOWchftKDsRJ8fEPacX/wl1lOvBrhsJ/OeJCXq7B0AaijRuqgzSKalJoPk+D8MPg==} + engines: {node: '>= 0.4'} + + which@1.3.1: + resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} + hasBin: true + + wrap-ansi@6.2.0: + resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} + engines: {node: '>=8'} + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + y18n@4.0.3: + resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} + + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + + yallist@2.1.2: + resolution: {integrity: sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==} + + yargs-parser@18.1.3: + resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} + engines: {node: '>=6'} + + yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + + yargs@15.4.1: + resolution: {integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==} + engines: {node: '>=8'} + + yargs@17.7.2: + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} + engines: {node: '>=12'} + + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + +snapshots: + + '@babel/code-frame@7.23.5': 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/helper-validator-identifier@7.22.20': {} - /@babel/highlight@7.23.4: - resolution: {integrity: sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==} - engines: {node: '>=6.9.0'} + '@babel/highlight@7.23.4': 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'} + '@babel/runtime@7.23.9': dependencies: regenerator-runtime: 0.14.1 - dev: true - /@changesets/apply-release-plan@6.1.4: - resolution: {integrity: sha512-FMpKF1fRlJyCZVYHr3CbinpZZ+6MwvOtWUuO8uo+svcATEoc1zRDcj23pAurJ2TZ/uVz1wFHH6K3NlACy0PLew==} + '@changesets/apply-release-plan@6.1.4': dependencies: '@babel/runtime': 7.23.9 '@changesets/config': 2.3.1 @@ -62,10 +1063,8 @@ packages: prettier: 2.8.8 resolve-from: 5.0.0 semver: 7.6.1 - dev: true - /@changesets/assemble-release-plan@5.2.4: - resolution: {integrity: sha512-xJkWX+1/CUaOUWTguXEbCDTyWJFECEhmdtbkjhn5GVBGxdP/JwaHBIU9sW3FR6gD07UwZ7ovpiPclQZs+j+mvg==} + '@changesets/assemble-release-plan@5.2.4': dependencies: '@babel/runtime': 7.23.9 '@changesets/errors': 0.1.4 @@ -73,27 +1072,20 @@ packages: '@changesets/types': 5.2.1 '@manypkg/get-packages': 1.1.3 semver: 7.6.1 - dev: true - /@changesets/changelog-git@0.1.14: - resolution: {integrity: sha512-+vRfnKtXVWsDDxGctOfzJsPhaCdXRYoe+KyWYoq5X/GqoISREiat0l3L8B0a453B2B4dfHGcZaGyowHbp9BSaA==} + '@changesets/changelog-git@0.1.14': dependencies: '@changesets/types': 5.2.1 - dev: true - /@changesets/changelog-github@0.4.8: - resolution: {integrity: sha512-jR1DHibkMAb5v/8ym77E4AMNWZKB5NPzw5a5Wtqm1JepAuIF+hrKp2u04NKM14oBZhHglkCfrla9uq8ORnK/dw==} + '@changesets/changelog-github@0.4.8': 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 + '@changesets/cli@2.26.2': dependencies: '@babel/runtime': 7.23.9 '@changesets/apply-release-plan': 6.1.4 @@ -128,10 +1120,8 @@ packages: 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==} + '@changesets/config@2.3.1': dependencies: '@changesets/errors': 0.1.4 '@changesets/get-dependents-graph': 1.3.6 @@ -140,35 +1130,27 @@ packages: '@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==} + '@changesets/errors@0.1.4': dependencies: extendable-error: 0.1.7 - dev: true - /@changesets/get-dependents-graph@1.3.6: - resolution: {integrity: sha512-Q/sLgBANmkvUm09GgRsAvEtY3p1/5OCzgBE5vX3vgb5CvW0j7CEljocx5oPXeQSNph6FXulJlXV3Re/v3K3P3Q==} + '@changesets/get-dependents-graph@1.3.6': dependencies: '@changesets/types': 5.2.1 '@manypkg/get-packages': 1.1.3 chalk: 2.4.2 fs-extra: 7.0.1 semver: 7.6.1 - dev: true - /@changesets/get-github-info@0.5.2: - resolution: {integrity: sha512-JppheLu7S114aEs157fOZDjFqUDpm7eHdq5E8SSR0gUBTEK0cNSHsrSR5a66xs0z3RWuo46QvA3vawp8BxDHvg==} + '@changesets/get-github-info@0.5.2': 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==} + '@changesets/get-release-plan@3.0.17': dependencies: '@babel/runtime': 7.23.9 '@changesets/assemble-release-plan': 5.2.4 @@ -177,14 +1159,10 @@ packages: '@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/get-version-range-type@0.3.2': {} - /@changesets/git@2.0.0: - resolution: {integrity: sha512-enUVEWbiqUTxqSnmesyJGWfzd51PY4H7mH9yUw0hPVpZBJ6tQZFMU3F3mT/t9OJ/GjyiM4770i+sehAn6ymx6A==} + '@changesets/git@2.0.0': dependencies: '@babel/runtime': 7.23.9 '@changesets/errors': 0.1.4 @@ -193,33 +1171,25 @@ packages: 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==} + '@changesets/logger@0.0.5': dependencies: chalk: 2.4.2 - dev: true - /@changesets/parse@0.3.16: - resolution: {integrity: sha512-127JKNd167ayAuBjUggZBkmDS5fIKsthnr9jr6bdnuUljroiERW7FBTDNnNVyJ4l69PzR57pk6mXQdtJyBCJKg==} + '@changesets/parse@0.3.16': dependencies: '@changesets/types': 5.2.1 js-yaml: 3.14.1 - dev: true - /@changesets/pre@1.0.14: - resolution: {integrity: sha512-dTsHmxQWEQekHYHbg+M1mDVYFvegDh9j/kySNuDKdylwfMEevTeDouR7IfHNyVodxZXu17sXoJuf2D0vi55FHQ==} + '@changesets/pre@1.0.14': 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==} + '@changesets/read@0.5.9': dependencies: '@babel/runtime': 7.23.9 '@changesets/git': 2.0.0 @@ -229,37 +1199,27 @@ packages: 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@4.1.0': {} - /@changesets/types@5.2.1: - resolution: {integrity: sha512-myLfHbVOqaq9UtUKqR/nZA/OY7xFjQMdfgfqeZIBK4d0hA6pgxArvdv8M+6NUzzBsjWLOtvApv8YHr4qM+Kpfg==} - dev: true + '@changesets/types@5.2.1': {} - /@changesets/write@0.2.3: - resolution: {integrity: sha512-Dbamr7AIMvslKnNYsLFafaVORx4H0pvCA2MHqgtNCySMe1blImEyAEOzDmcgKAkgz4+uwoLz7demIrX+JBr/Xw==} + '@changesets/write@0.2.3': 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==} + '@manypkg/find-root@1.1.0': 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==} + '@manypkg/get-packages@1.1.3': dependencies: '@babel/runtime': 7.23.9 '@changesets/types': 4.1.0 @@ -267,107 +1227,62 @@ packages: 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'} + '@nodelib/fs.scandir@2.1.5': 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.stat@2.0.5': {} - /@nodelib/fs.walk@1.2.8: - resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} - engines: {node: '>= 8'} + '@nodelib/fs.walk@1.2.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==} + '@types/is-ci@3.0.4': dependencies: ci-info: 3.9.0 - dev: true - /@types/minimist@1.2.5: - resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} - dev: true + '@types/minimist@1.2.5': {} - /@types/node@12.20.55: - resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - dev: true + '@types/node@12.20.55': {} - /@types/normalize-package-data@2.4.4: - resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} - dev: true + '@types/normalize-package-data@2.4.4': {} - /@types/semver@7.5.8: - resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} - dev: true + '@types/semver@7.5.8': {} - /ansi-colors@4.1.3: - resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} - engines: {node: '>=6'} - dev: true + ansi-colors@4.1.3: {} - /ansi-regex@5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} - engines: {node: '>=8'} - dev: true + ansi-regex@5.0.1: {} - /ansi-styles@3.2.1: - resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} - engines: {node: '>=4'} + ansi-styles@3.2.1: dependencies: color-convert: 1.9.3 - dev: true - /ansi-styles@4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} + ansi-styles@4.3.0: dependencies: color-convert: 2.0.1 - dev: true - /argparse@1.0.10: - resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} + argparse@1.0.10: 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'} + array-buffer-byte-length@1.0.1: 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-union@2.1.0: {} - /array.prototype.flat@1.3.2: - resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==} - engines: {node: '>= 0.4'} + array.prototype.flat@1.3.2: 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'} + arraybuffer.prototype.slice@1.0.3: dependencies: array-buffer-byte-length: 1.0.1 call-bind: 1.0.7 @@ -377,243 +1292,146 @@ packages: 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 + arrify@1.0.1: {} - /available-typed-arrays@1.0.7: - resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} - engines: {node: '>= 0.4'} + available-typed-arrays@1.0.7: 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'} + better-path-resolve@1.0.0: dependencies: is-windows: 1.0.2 - dev: true - /braces@3.0.2: - resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} - engines: {node: '>=8'} + braces@3.0.2: dependencies: fill-range: 7.0.1 - dev: true - /breakword@1.0.6: - resolution: {integrity: sha512-yjxDAYyK/pBvws9H4xKYpLDpYKEH6CzrBPAuXq3x18I+c/2MkVtT3qAr7Oloi6Dss9qNhPVueAAVU1CSeNDIXw==} + breakword@1.0.6: dependencies: wcwidth: 1.0.1 - dev: true - /call-bind@1.0.7: - resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} - engines: {node: '>= 0.4'} + call-bind@1.0.7: 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'} + camelcase-keys@6.2.2: 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 + camelcase@5.3.1: {} - /chalk@2.4.2: - resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} - engines: {node: '>=4'} + chalk@2.4.2: 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'} + chalk@4.1.2: 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 + chardet@0.7.0: {} - /ci-info@3.9.0: - resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} - engines: {node: '>=8'} - dev: true + ci-info@3.9.0: {} - /cliui@6.0.0: - resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==} + cliui@6.0.0: 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'} + cliui@8.0.1: 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 + clone@1.0.4: {} - /color-convert@1.9.3: - resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} + color-convert@1.9.3: 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'} + color-convert@2.0.1: 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.3: {} - /color-name@1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - dev: true + color-name@1.1.4: {} - /cross-spawn@5.1.0: - resolution: {integrity: sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==} + cross-spawn@5.1.0: 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-generate@3.4.3: {} - /csv-parse@4.16.3: - resolution: {integrity: sha512-cO1I/zmz4w2dcKHVvpCr7JVRu8/FymG5OEpmvsZYlccYolPBLoVGKUHgNoc4ZGkFeFlWGEDmMyBM+TTqRdW/wg==} - dev: true + csv-parse@4.16.3: {} - /csv-stringify@5.6.5: - resolution: {integrity: sha512-PjiQ659aQ+fUTQqSrd1XEDnOr52jh30RBurfzkscaE2tPaFsDH5wOAHJiw8XAHphRknCwMUE9KRayc4K/NbO8A==} - dev: true + csv-stringify@5.6.5: {} - /csv@5.5.3: - resolution: {integrity: sha512-QTaY0XjjhTQOdguARF0lGKm5/mEq9PD9/VhZZegHDIBq2tQwgNpHc3dneD4mGo2iJs+fTKv5Bp0fZ+BRuY3Z0g==} - engines: {node: '>= 0.1.90'} + csv@5.5.3: 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 + dataloader@1.4.0: {} - /decamelize-keys@1.1.1: - resolution: {integrity: sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==} - engines: {node: '>=0.10.0'} + decamelize-keys@1.1.1: 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 + decamelize@1.2.0: {} - /defaults@1.0.4: - resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} + defaults@1.0.4: 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'} + define-data-property@1.1.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'} + define-properties@1.2.1: 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 + detect-indent@6.1.0: {} - /dir-glob@3.0.1: - resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} - engines: {node: '>=8'} + dir-glob@3.0.1: dependencies: path-type: 4.0.0 - dev: true - /dotenv@8.6.0: - resolution: {integrity: sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==} - engines: {node: '>=10'} - dev: true + dotenv@8.6.0: {} - /emoji-regex@8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - dev: true + emoji-regex@8.0.0: {} - /enquirer@2.4.1: - resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} - engines: {node: '>=8.6'} + enquirer@2.4.1: 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==} + error-ex@1.3.2: dependencies: is-arrayish: 0.2.1 - dev: true - /es-abstract@1.22.4: - resolution: {integrity: sha512-vZYJlk2u6qHYxBOTjAeg7qUxHdNfih64Uu2J8QqWgXZ2cri0ZpJAkzDUK/q593+mvKwlxyaxr6F1Q+3LKoQRgg==} - engines: {node: '>= 0.4'} + es-abstract@1.22.4: dependencies: array-buffer-byte-length: 1.0.1 arraybuffer.prototype.slice: 1.0.3 @@ -656,204 +1474,126 @@ packages: 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'} + es-define-property@1.0.0: 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-errors@1.3.0: {} - /es-set-tostringtag@2.0.3: - resolution: {integrity: sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==} - engines: {node: '>= 0.4'} + es-set-tostringtag@2.0.3: 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==} + es-shim-unscopables@1.0.2: dependencies: hasown: 2.0.1 - dev: true - /es-to-primitive@1.2.1: - resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} - engines: {node: '>= 0.4'} + es-to-primitive@1.2.1: 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 + escalade@3.1.2: {} - /escape-string-regexp@1.0.5: - resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} - engines: {node: '>=0.8.0'} - dev: true + escape-string-regexp@1.0.5: {} - /esprima@4.0.1: - resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} - engines: {node: '>=4'} - hasBin: true - dev: true + esprima@4.0.1: {} - /extendable-error@0.1.7: - resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} - dev: true + extendable-error@0.1.7: {} - /external-editor@3.1.0: - resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} - engines: {node: '>=4'} + external-editor@3.1.0: 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'} + fast-glob@3.3.2: 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==} + fastq@1.17.1: dependencies: reusify: 1.0.4 - dev: true - /fill-range@7.0.1: - resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} - engines: {node: '>=8'} + fill-range@7.0.1: dependencies: to-regex-range: 5.0.1 - dev: true - /find-up@4.1.0: - resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} - engines: {node: '>=8'} + find-up@4.1.0: 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'} + find-up@5.0.0: 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==} + find-yarn-workspace-root2@1.2.16: dependencies: micromatch: 4.0.5 pkg-dir: 4.2.0 - dev: true - /for-each@0.3.3: - resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + for-each@0.3.3: dependencies: is-callable: 1.2.7 - dev: true - /fs-extra@7.0.1: - resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} - engines: {node: '>=6 <7 || >=8'} + fs-extra@7.0.1: 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'} + fs-extra@8.1.0: 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-bind@1.1.2: {} - /function.prototype.name@1.1.6: - resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} - engines: {node: '>= 0.4'} + function.prototype.name@1.1.6: 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 + functions-have-names@1.2.3: {} - /get-caller-file@2.0.5: - resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} - engines: {node: 6.* || 8.* || >= 10.*} - dev: true + get-caller-file@2.0.5: {} - /get-intrinsic@1.2.4: - resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} - engines: {node: '>= 0.4'} + get-intrinsic@1.2.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'} + get-symbol-description@1.0.2: 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'} + glob-parent@5.1.2: dependencies: is-glob: 4.0.3 - dev: true - /globalthis@1.0.3: - resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} - engines: {node: '>= 0.4'} + globalthis@1.0.3: dependencies: define-properties: 1.2.1 - dev: true - /globby@11.1.0: - resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} - engines: {node: '>=10'} + globby@11.1.0: dependencies: array-union: 2.1.0 dir-glob: 3.0.1 @@ -861,341 +1601,186 @@ packages: ignore: 5.3.1 merge2: 1.4.1 slash: 3.0.0 - dev: true - /gopd@1.0.1: - resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + gopd@1.0.1: 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 + graceful-fs@4.2.11: {} - /grapheme-splitter@1.0.4: - resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} - dev: true + grapheme-splitter@1.0.4: {} - /hard-rejection@2.1.0: - resolution: {integrity: sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==} - engines: {node: '>=6'} - dev: true + hard-rejection@2.1.0: {} - /has-bigints@1.0.2: - resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} - dev: true + has-bigints@1.0.2: {} - /has-flag@3.0.0: - resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} - engines: {node: '>=4'} - dev: true + has-flag@3.0.0: {} - /has-flag@4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} - engines: {node: '>=8'} - dev: true + has-flag@4.0.0: {} - /has-property-descriptors@1.0.2: - resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} + has-property-descriptors@1.0.2: 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-proto@1.0.3: {} - /has-symbols@1.0.3: - resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} - engines: {node: '>= 0.4'} - dev: true + has-symbols@1.0.3: {} - /has-tostringtag@1.0.2: - resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} - engines: {node: '>= 0.4'} + has-tostringtag@1.0.2: dependencies: has-symbols: 1.0.3 - dev: true - /hasown@2.0.1: - resolution: {integrity: sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==} - engines: {node: '>= 0.4'} + hasown@2.0.1: dependencies: function-bind: 1.1.2 - dev: true - /hosted-git-info@2.8.9: - resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} - dev: true + hosted-git-info@2.8.9: {} - /human-id@1.0.2: - resolution: {integrity: sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==} - dev: true + human-id@1.0.2: {} - /iconv-lite@0.4.24: - resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} - engines: {node: '>=0.10.0'} + iconv-lite@0.4.24: dependencies: safer-buffer: 2.1.2 - dev: true - /ignore@5.3.1: - resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} - engines: {node: '>= 4'} - dev: true + ignore@5.3.1: {} - /indent-string@4.0.0: - resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} - engines: {node: '>=8'} - dev: true + indent-string@4.0.0: {} - /internal-slot@1.0.7: - resolution: {integrity: sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==} - engines: {node: '>= 0.4'} + internal-slot@1.0.7: 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'} + is-array-buffer@3.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-arrayish@0.2.1: {} - /is-bigint@1.0.4: - resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} + is-bigint@1.0.4: dependencies: has-bigints: 1.0.2 - dev: true - /is-boolean-object@1.1.2: - resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} - engines: {node: '>= 0.4'} + is-boolean-object@1.1.2: 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-callable@1.2.7: {} - /is-ci@3.0.1: - resolution: {integrity: sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==} - hasBin: true + is-ci@3.0.1: dependencies: ci-info: 3.9.0 - dev: true - /is-core-module@2.13.1: - resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} + is-core-module@2.13.1: dependencies: hasown: 2.0.1 - dev: true - /is-date-object@1.0.5: - resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} - engines: {node: '>= 0.4'} + is-date-object@1.0.5: 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-extglob@2.1.1: {} - /is-fullwidth-code-point@3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} - engines: {node: '>=8'} - dev: true + is-fullwidth-code-point@3.0.0: {} - /is-glob@4.0.3: - resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} - engines: {node: '>=0.10.0'} + is-glob@4.0.3: 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-negative-zero@2.0.3: {} - /is-number-object@1.0.7: - resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} - engines: {node: '>= 0.4'} + is-number-object@1.0.7: 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-number@7.0.0: {} - /is-plain-obj@1.1.0: - resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} - engines: {node: '>=0.10.0'} - dev: true + is-plain-obj@1.1.0: {} - /is-regex@1.1.4: - resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} - engines: {node: '>= 0.4'} + is-regex@1.1.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'} + is-shared-array-buffer@1.0.3: dependencies: call-bind: 1.0.7 - dev: true - /is-string@1.0.7: - resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} - engines: {node: '>= 0.4'} + is-string@1.0.7: dependencies: has-tostringtag: 1.0.2 - dev: true - /is-subdir@1.2.0: - resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} - engines: {node: '>=4'} + is-subdir@1.2.0: dependencies: better-path-resolve: 1.0.0 - dev: true - /is-symbol@1.0.4: - resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} - engines: {node: '>= 0.4'} + is-symbol@1.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'} + is-typed-array@1.1.13: dependencies: which-typed-array: 1.1.14 - dev: true - /is-weakref@1.0.2: - resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} + is-weakref@1.0.2: 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 + is-windows@1.0.2: {} - /isarray@2.0.5: - resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} - dev: true + isarray@2.0.5: {} - /isexe@2.0.0: - resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - dev: true + isexe@2.0.0: {} - /js-tokens@4.0.0: - resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - dev: true + js-tokens@4.0.0: {} - /js-yaml@3.14.1: - resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} - hasBin: true + js-yaml@3.14.1: 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 + json-parse-even-better-errors@2.3.1: {} - /jsonfile@4.0.0: - resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} + jsonfile@4.0.0: 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 + kind-of@6.0.3: {} - /kleur@4.1.5: - resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} - engines: {node: '>=6'} - dev: true + kleur@4.1.5: {} - /lines-and-columns@1.2.4: - resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - dev: true + lines-and-columns@1.2.4: {} - /load-yaml-file@0.2.0: - resolution: {integrity: sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==} - engines: {node: '>=6'} + load-yaml-file@0.2.0: 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'} + locate-path@5.0.0: dependencies: p-locate: 4.1.0 - dev: true - /locate-path@6.0.0: - resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} - engines: {node: '>=10'} + locate-path@6.0.0: dependencies: p-locate: 5.0.0 - dev: true - /lodash.startcase@4.4.0: - resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} - dev: true + lodash.startcase@4.4.0: {} - /lru-cache@4.1.5: - resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==} + lru-cache@4.1.5: dependencies: pseudomap: 1.0.2 yallist: 2.1.2 - dev: true - /map-obj@1.0.1: - resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} - engines: {node: '>=0.10.0'} - dev: true + map-obj@1.0.1: {} - /map-obj@4.3.0: - resolution: {integrity: sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==} - engines: {node: '>=8'} - dev: true + map-obj@4.3.0: {} - /meow@6.1.1: - resolution: {integrity: sha512-3YffViIt2QWgTy6Pale5QpopX/IvU3LPL03jOTqp6pGj3VjesdO/U8CuHMKpnQr4shCNCM5fd5XFFvIIl6JBHg==} - engines: {node: '>=8'} + meow@6.1.1: dependencies: '@types/minimist': 1.2.5 camelcase-keys: 6.2.2 @@ -1208,335 +1793,186 @@ packages: 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 + merge2@1.4.1: {} - /micromatch@4.0.5: - resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} - engines: {node: '>=8.6'} + micromatch@4.0.5: 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 + min-indent@1.0.1: {} - /minimist-options@4.1.0: - resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} - engines: {node: '>= 6'} + minimist-options@4.1.0: 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 + mixme@0.5.10: {} - /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 + node-fetch@2.7.0: dependencies: whatwg-url: 5.0.0 - dev: true - /normalize-package-data@2.5.0: - resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} + normalize-package-data@2.5.0: 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-inspect@1.13.1: {} - /object-keys@1.1.1: - resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} - engines: {node: '>= 0.4'} - dev: true + object-keys@1.1.1: {} - /object.assign@4.1.5: - resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} - engines: {node: '>= 0.4'} + object.assign@4.1.5: 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 + os-tmpdir@1.0.2: {} - /outdent@0.5.0: - resolution: {integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==} - dev: true + outdent@0.5.0: {} - /p-filter@2.1.0: - resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==} - engines: {node: '>=8'} + p-filter@2.1.0: dependencies: p-map: 2.1.0 - dev: true - /p-limit@2.3.0: - resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} - engines: {node: '>=6'} + p-limit@2.3.0: dependencies: p-try: 2.2.0 - dev: true - /p-limit@3.1.0: - resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} - engines: {node: '>=10'} + p-limit@3.1.0: dependencies: yocto-queue: 0.1.0 - dev: true - /p-locate@4.1.0: - resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} - engines: {node: '>=8'} + p-locate@4.1.0: 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'} + p-locate@5.0.0: dependencies: p-limit: 3.1.0 - dev: true - /p-map@2.1.0: - resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} - engines: {node: '>=6'} - dev: true + p-map@2.1.0: {} - /p-try@2.2.0: - resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} - engines: {node: '>=6'} - dev: true + p-try@2.2.0: {} - /parse-json@5.2.0: - resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} - engines: {node: '>=8'} + parse-json@5.2.0: 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-exists@4.0.0: {} - /path-parse@1.0.7: - resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - dev: true + path-parse@1.0.7: {} - /path-type@4.0.0: - resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} - engines: {node: '>=8'} - dev: true + path-type@4.0.0: {} - /picomatch@2.3.1: - resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} - engines: {node: '>=8.6'} - dev: true + picomatch@2.3.1: {} - /pify@4.0.1: - resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} - engines: {node: '>=6'} - dev: true + pify@4.0.1: {} - /pkg-dir@4.2.0: - resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} - engines: {node: '>=8'} + pkg-dir@4.2.0: 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 + possible-typed-array-names@1.0.0: {} - /preferred-pm@3.1.3: - resolution: {integrity: sha512-MkXsENfftWSRpzCzImcp4FRsCc3y1opwB73CfCNWyzMqArju2CrlMHlqB7VexKiPEOjGMbttv1r9fSCn5S610w==} - engines: {node: '>=10'} + preferred-pm@3.1.3: 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 + prettier@2.8.8: {} - /pseudomap@1.0.2: - resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} - dev: true + pseudomap@1.0.2: {} - /queue-microtask@1.2.3: - resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} - dev: true + queue-microtask@1.2.3: {} - /quick-lru@4.0.1: - resolution: {integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==} - engines: {node: '>=8'} - dev: true + quick-lru@4.0.1: {} - /read-pkg-up@7.0.1: - resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==} - engines: {node: '>=8'} + read-pkg-up@7.0.1: 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'} + read-pkg@5.2.0: 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'} + read-yaml-file@1.1.0: 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'} + redent@3.0.0: 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 + regenerator-runtime@0.14.1: {} - /regexp.prototype.flags@1.5.2: - resolution: {integrity: sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==} - engines: {node: '>= 0.4'} + regexp.prototype.flags@1.5.2: 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-directory@2.1.1: {} - /require-main-filename@2.0.0: - resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} - dev: true + require-main-filename@2.0.0: {} - /resolve-from@5.0.0: - resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} - engines: {node: '>=8'} - dev: true + resolve-from@5.0.0: {} - /resolve@1.22.8: - resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} - hasBin: true + resolve@1.22.8: 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 + reusify@1.0.4: {} - /run-parallel@1.2.0: - resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + run-parallel@1.2.0: 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'} + safe-array-concat@1.1.0: 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'} + safe-regex-test@1.0.3: 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 + safer-buffer@2.1.2: {} - /semver@5.7.2: - resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} - hasBin: true - dev: true + semver@5.7.2: {} - /semver@7.6.1: - resolution: {integrity: sha512-f/vbBsu+fOiYt+lmwZV0rVwJScl46HppnOA1ZvIuBWKOTlllpyJ3bfVax76/OrhCH38dyxoDIA8K7uB963IYgA==} - engines: {node: '>=10'} - hasBin: true - dev: true + semver@7.6.1: {} - /set-blocking@2.0.0: - resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} - dev: true + set-blocking@2.0.0: {} - /set-function-length@1.2.1: - resolution: {integrity: sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==} - engines: {node: '>= 0.4'} + set-function-length@1.2.1: dependencies: define-data-property: 1.1.4 es-errors: 1.3.0 @@ -1544,53 +1980,32 @@ packages: 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'} + set-function-name@2.0.2: 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'} + shebang-command@1.2.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 + shebang-regex@1.0.0: {} - /side-channel@1.0.5: - resolution: {integrity: sha512-QcgiIWV4WV7qWExbN5llt6frQB/lBven9pqliLXfGPB+K9ZYXxDozp0wLkHS24kWCm+6YXH/f0HhnObZnZOBnQ==} - engines: {node: '>= 0.4'} + side-channel@1.0.5: 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 + signal-exit@3.0.7: {} - /slash@3.0.0: - resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} - engines: {node: '>=8'} - dev: true + slash@3.0.0: {} - /smartwrap@2.0.2: - resolution: {integrity: sha512-vCsKNQxb7PnCNd2wY1WClWifAc2lwqsG8OaswpJkVJsvMGcnEntdTCDajZCkk93Ay1U3t/9puJmb525Rg5MZBA==} - engines: {node: '>=6'} - hasBin: true + smartwrap@2.0.2: dependencies: array.prototype.flat: 1.3.2 breakword: 1.0.6 @@ -1598,151 +2013,91 @@ packages: 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==} + spawndamnit@2.0.0: dependencies: cross-spawn: 5.1.0 signal-exit: 3.0.7 - dev: true - /spdx-correct@3.2.0: - resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} + spdx-correct@3.2.0: 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-exceptions@2.5.0: {} - /spdx-expression-parse@3.0.1: - resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} + spdx-expression-parse@3.0.1: 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 + spdx-license-ids@3.0.17: {} - /sprintf-js@1.0.3: - resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} - dev: true + sprintf-js@1.0.3: {} - /stream-transform@2.1.3: - resolution: {integrity: sha512-9GHUiM5hMiCi6Y03jD2ARC1ettBXkQBoQAe7nJsPknnI0ow10aXjTnew8QtYQmLjzn974BnmWEAJgCY6ZP1DeQ==} + stream-transform@2.1.3: dependencies: mixme: 0.5.10 - dev: true - /string-width@4.2.3: - resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} - engines: {node: '>=8'} + string-width@4.2.3: 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'} + string.prototype.trim@1.2.8: 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==} + string.prototype.trimend@1.0.7: 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==} + string.prototype.trimstart@1.0.7: 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'} + strip-ansi@6.0.1: 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-bom@3.0.0: {} - /strip-indent@3.0.0: - resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} - engines: {node: '>=8'} + strip-indent@3.0.0: dependencies: min-indent: 1.0.1 - dev: true - /supports-color@5.5.0: - resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} - engines: {node: '>=4'} + supports-color@5.5.0: dependencies: has-flag: 3.0.0 - dev: true - /supports-color@7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} - engines: {node: '>=8'} + supports-color@7.2.0: 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 + supports-preserve-symlinks-flag@1.0.0: {} - /term-size@2.2.1: - resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} - engines: {node: '>=8'} - dev: true + term-size@2.2.1: {} - /tmp@0.0.33: - resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} - engines: {node: '>=0.6.0'} + tmp@0.0.33: 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'} + to-regex-range@5.0.1: dependencies: is-number: 7.0.0 - dev: true - /tr46@0.0.3: - resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} - dev: true + tr46@0.0.3: {} - /trim-newlines@3.0.1: - resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} - engines: {node: '>=8'} - dev: true + trim-newlines@3.0.1: {} - /tty-table@4.2.3: - resolution: {integrity: sha512-Fs15mu0vGzCrj8fmJNP7Ynxt5J7praPXqFN0leZeZBXJwkMxv9cb2D454k1ltrtUSJbZ4yH4e0CynsHLxmUfFA==} - engines: {node: '>=8.0.0'} - hasBin: true + tty-table@4.2.3: dependencies: chalk: 4.1.2 csv: 5.5.3 @@ -1751,46 +2106,28 @@ packages: 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.13.1: {} - /type-fest@0.6.0: - resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==} - engines: {node: '>=8'} - dev: true + type-fest@0.6.0: {} - /type-fest@0.8.1: - resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} - engines: {node: '>=8'} - dev: true + type-fest@0.8.1: {} - /typed-array-buffer@1.0.2: - resolution: {integrity: sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==} - engines: {node: '>= 0.4'} + typed-array-buffer@1.0.2: 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'} + typed-array-byte-length@1.0.1: 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'} + typed-array-byte-offset@1.0.2: dependencies: available-typed-arrays: 1.0.7 call-bind: 1.0.7 @@ -1798,11 +2135,8 @@ packages: 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'} + typed-array-length@1.0.5: dependencies: call-bind: 1.0.7 for-each: 0.3.3 @@ -1810,133 +2144,85 @@ packages: 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==} + unbox-primitive@1.0.2: 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 + universalify@0.1.2: {} - /validate-npm-package-license@3.0.4: - resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} + validate-npm-package-license@3.0.4: dependencies: spdx-correct: 3.2.0 spdx-expression-parse: 3.0.1 - dev: true - /wcwidth@1.0.1: - resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} + wcwidth@1.0.1: dependencies: defaults: 1.0.4 - dev: true - /webidl-conversions@3.0.1: - resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} - dev: true + webidl-conversions@3.0.1: {} - /whatwg-url@5.0.0: - resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + whatwg-url@5.0.0: dependencies: tr46: 0.0.3 webidl-conversions: 3.0.1 - dev: true - /which-boxed-primitive@1.0.2: - resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} + which-boxed-primitive@1.0.2: 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-module@2.0.1: {} - /which-pm@2.0.0: - resolution: {integrity: sha512-Lhs9Pmyph0p5n5Z3mVnN0yWcbQYUAD7rbQUiMsQxOJ3T57k7RFe35SUwWMf7dsbDZks1uOmw4AecB/JMDj3v/w==} - engines: {node: '>=8.15'} + which-pm@2.0.0: 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'} + which-typed-array@1.1.14: 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 + which@1.3.1: dependencies: isexe: 2.0.0 - dev: true - /wrap-ansi@6.2.0: - resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} - engines: {node: '>=8'} + wrap-ansi@6.2.0: 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'} + wrap-ansi@7.0.0: 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@4.0.3: {} - /y18n@5.0.8: - resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} - engines: {node: '>=10'} - dev: true + y18n@5.0.8: {} - /yallist@2.1.2: - resolution: {integrity: sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==} - dev: true + yallist@2.1.2: {} - /yargs-parser@18.1.3: - resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} - engines: {node: '>=6'} + yargs-parser@18.1.3: 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-parser@21.1.1: {} - /yargs@15.4.1: - resolution: {integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==} - engines: {node: '>=8'} + yargs@15.4.1: dependencies: cliui: 6.0.0 decamelize: 1.2.0 @@ -1949,11 +2235,8 @@ packages: 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'} + yargs@17.7.2: dependencies: cliui: 8.0.1 escalade: 3.1.2 @@ -1962,9 +2245,5 @@ packages: 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 + yocto-queue@0.1.0: {} diff --git a/shell.nix b/shell.nix index 9aa24ccdd89..3626cb11cf4 100644 --- a/shell.nix +++ b/shell.nix @@ -1,59 +1,63 @@ -{ pkgs }: -with pkgs; -let +{pkgs}: +with pkgs; let go = go_1_21; postgresql = postgresql_14; nodejs = nodejs-18_x; - nodePackages = pkgs.nodePackages.override { inherit nodejs; }; + nodePackages = pkgs.nodePackages.override {inherit nodejs;}; + pnpm = pnpm_9; mkShell' = mkShell.override { # The current nix default sdk for macOS fails to compile go projects, so we use a newer one for now. - stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + stdenv = + if stdenv.isDarwin + then overrideSDK stdenv "11.0" + else stdenv; }; in -mkShell' { - nativeBuildInputs = [ - go - goreleaser - postgresql - - python3 - python3Packages.pip - protobuf - protoc-gen-go - protoc-gen-go-grpc - - foundry-bin - - curl - nodejs - nodePackages.pnpm - # TODO: compiler / gcc for secp compilation - go-ethereum # geth - go-mockery - - # tooling - gotools - gopls - delve - golangci-lint - github-cli - jq - - # cross-compiling, used in CRIB - zig - - # gofuzz - ] ++ lib.optionals stdenv.isLinux [ - # some dependencies needed for node-gyp on pnpm install - pkg-config - libudev-zero - libusb1 - ]; - LD_LIBRARY_PATH = "${stdenv.cc.cc.lib}/lib64:$LD_LIBRARY_PATH"; - GOROOT = "${go}/share/go"; - - PGDATA = "db"; - CL_DATABASE_URL = "postgresql://chainlink:chainlink@localhost:5432/chainlink_test?sslmode=disable"; - -} + mkShell' { + nativeBuildInputs = + [ + go + goreleaser + postgresql + + python3 + python3Packages.pip + protobuf + protoc-gen-go + protoc-gen-go-grpc + + foundry-bin + + curl + nodejs + pnpm + # TODO: compiler / gcc for secp compilation + go-ethereum # geth + go-mockery + + # tooling + gotools + gopls + delve + golangci-lint + github-cli + jq + + # cross-compiling, used in CRIB + zig + + # gofuzz + ] + ++ lib.optionals stdenv.isLinux [ + # some dependencies needed for node-gyp on pnpm install + pkg-config + libudev-zero + libusb1 + ]; + LD_LIBRARY_PATH = "${stdenv.cc.cc.lib}/lib64:$LD_LIBRARY_PATH"; + GOROOT = "${go}/share/go"; + + PGDATA = "db"; + CL_DATABASE_URL = "postgresql://chainlink:chainlink@localhost:5432/chainlink_test?sslmode=disable"; + } diff --git a/testdata/scripts/help-all/help-all.txtar b/testdata/scripts/help-all/help-all.txtar index e111295abb4..372b149bd19 100644 --- a/testdata/scripts/help-all/help-all.txtar +++ b/testdata/scripts/help-all/help-all.txtar @@ -55,6 +55,12 @@ 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 aptos # Remote commands for administering the node's Aptos keys +keys aptos create # Create a Aptos key +keys aptos delete # Delete Aptos key if present +keys aptos export # Export Aptos key to keyfile +keys aptos import # Import Aptos key from keyfile +keys aptos list # List the Aptos keys 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 @@ -66,18 +72,6 @@ keys csa create # Create a CSA key, encrypted with password from the password fi 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 diff --git a/testdata/scripts/keys/aptos/help.txtar b/testdata/scripts/keys/aptos/help.txtar new file mode 100644 index 00000000000..94f0c7db8c3 --- /dev/null +++ b/testdata/scripts/keys/aptos/help.txtar @@ -0,0 +1,20 @@ +exec chainlink keys aptos --help +cmp stdout out.txt + +-- out.txt -- +NAME: + chainlink keys aptos - Remote commands for administering the node's Aptos keys + +USAGE: + chainlink keys aptos command [command options] [arguments...] + +COMMANDS: + create Create a Aptos key + import Import Aptos key from keyfile + export Export Aptos key to keyfile + delete Delete Aptos key if present + list List the Aptos keys + +OPTIONS: + --help, -h show help + diff --git a/testdata/scripts/keys/dkgencrypt/help.txtar b/testdata/scripts/keys/dkgencrypt/help.txtar deleted file mode 100644 index 98a791eccf0..00000000000 --- a/testdata/scripts/keys/dkgencrypt/help.txtar +++ /dev/null @@ -1,20 +0,0 @@ -exec chainlink keys dkgencrypt --help -cmp stdout out.txt - --- out.txt -- -NAME: - chainlink keys dkgencrypt - Remote commands for administering the node's DKGEncrypt keys - -USAGE: - chainlink keys dkgencrypt command [command options] [arguments...] - -COMMANDS: - create Create a DKGEncrypt key - import Import DKGEncrypt key from keyfile - export Export DKGEncrypt key to keyfile - delete Delete DKGEncrypt key if present - list List the DKGEncrypt keys - -OPTIONS: - --help, -h show help - diff --git a/testdata/scripts/keys/dkgsign/help.txtar b/testdata/scripts/keys/dkgsign/help.txtar deleted file mode 100644 index 7c3e2258423..00000000000 --- a/testdata/scripts/keys/dkgsign/help.txtar +++ /dev/null @@ -1,20 +0,0 @@ -exec chainlink keys dkgsign --help -cmp stdout out.txt - --- out.txt -- -NAME: - chainlink keys dkgsign - Remote commands for administering the node's DKGSign keys - -USAGE: - chainlink keys dkgsign command [command options] [arguments...] - -COMMANDS: - create Create a DKGSign key - import Import DKGSign key from keyfile - export Export DKGSign key to keyfile - delete Delete DKGSign key if present - list List the DKGSign keys - -OPTIONS: - --help, -h show help - diff --git a/testdata/scripts/keys/help.txtar b/testdata/scripts/keys/help.txtar index a54002e272b..83253d6906d 100644 --- a/testdata/scripts/keys/help.txtar +++ b/testdata/scripts/keys/help.txtar @@ -9,17 +9,16 @@ USAGE: chainlink keys command [command options] [arguments...] COMMANDS: - eth Remote commands for administering the node's Ethereum keys - p2p Remote commands for administering the node's p2p keys - csa Remote commands for administering the node's CSA keys - ocr Remote commands for administering the node's legacy off chain reporting keys - ocr2 Remote commands for administering the node's off chain reporting keys - cosmos Remote commands for administering the node's Cosmos keys - solana Remote commands for administering the node's Solana keys - starknet Remote commands for administering the node's StarkNet keys - dkgsign Remote commands for administering the node's DKGSign keys - dkgencrypt Remote commands for administering the node's DKGEncrypt keys - vrf Remote commands for administering the node's vrf keys + eth Remote commands for administering the node's Ethereum keys + p2p Remote commands for administering the node's p2p keys + csa Remote commands for administering the node's CSA keys + ocr Remote commands for administering the node's legacy off chain reporting keys + ocr2 Remote commands for administering the node's off chain reporting keys + cosmos Remote commands for administering the node's Cosmos keys + solana Remote commands for administering the node's Solana keys + starknet Remote commands for administering the node's StarkNet keys + aptos Remote commands for administering the node's Aptos keys + vrf Remote commands for administering the node's vrf keys OPTIONS: --help, -h show help diff --git a/testdata/scripts/node/db/migrate/db.txtar b/testdata/scripts/node/db/migrate/db.txtar index f040a937fd0..179af944c9d 100644 --- a/testdata/scripts/node/db/migrate/db.txtar +++ b/testdata/scripts/node/db/migrate/db.txtar @@ -1,6 +1,6 @@ exec chainlink node db migrate ! stdout . -stderr 'goose: no migrations to run. current version:' +stderr 'Migrating database:' -- testdb.txt -- CL_DATABASE_URL diff --git a/testdata/scripts/node/db/preparetest/help.txtar b/testdata/scripts/node/db/preparetest/help.txtar index 0173cd5b6cd..7ba7450a79d 100644 --- a/testdata/scripts/node/db/preparetest/help.txtar +++ b/testdata/scripts/node/db/preparetest/help.txtar @@ -11,4 +11,5 @@ USAGE: OPTIONS: --user-only only include test user fixture + --force set to true to force the reset by dropping any existing connections to the database diff --git a/testdata/scripts/node/db/reset/help.txtar b/testdata/scripts/node/db/reset/help.txtar index 2f03884be9c..d69a0624528 100644 --- a/testdata/scripts/node/db/reset/help.txtar +++ b/testdata/scripts/node/db/reset/help.txtar @@ -11,4 +11,5 @@ USAGE: OPTIONS: --dangerWillRobinson set to true to enable dropping non-test databases + --force set to true to force the reset by dropping any existing connections to the database diff --git a/testdata/scripts/node/validate/default.txtar b/testdata/scripts/node/validate/default.txtar index 9c50188141c..1063d9c2a5a 100644 --- a/testdata/scripts/node/validate/default.txtar +++ b/testdata/scripts/node/validate/default.txtar @@ -234,6 +234,8 @@ Mode = 'tls' TLSCertPath = '' [Mercury] +VerboseLogging = false + [Mercury.Cache] LatestReportTTL = '1s' MaxStaleAge = '1h0m0s' diff --git a/testdata/scripts/node/validate/disk-based-logging-disabled.txtar b/testdata/scripts/node/validate/disk-based-logging-disabled.txtar index 6e2a40beb7f..327e84c51bb 100644 --- a/testdata/scripts/node/validate/disk-based-logging-disabled.txtar +++ b/testdata/scripts/node/validate/disk-based-logging-disabled.txtar @@ -278,6 +278,8 @@ Mode = 'tls' TLSCertPath = '' [Mercury] +VerboseLogging = false + [Mercury.Cache] LatestReportTTL = '1s' MaxStaleAge = '1h0m0s' @@ -330,6 +332,7 @@ NoNewHeadsThreshold = '3m0s' OperatorFactoryAddress = '0x3E64Cd889482443324F91bFA9c84fE72A511f48A' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [EVM.Transactions] ForwardersEnabled = false @@ -384,6 +387,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [EVM.OCR] ContractConfirmations = 4 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 5db4e8527d3..724b59e52d3 100644 --- a/testdata/scripts/node/validate/disk-based-logging-no-dir.txtar +++ b/testdata/scripts/node/validate/disk-based-logging-no-dir.txtar @@ -278,6 +278,8 @@ Mode = 'tls' TLSCertPath = '' [Mercury] +VerboseLogging = false + [Mercury.Cache] LatestReportTTL = '1s' MaxStaleAge = '1h0m0s' @@ -330,6 +332,7 @@ NoNewHeadsThreshold = '3m0s' OperatorFactoryAddress = '0x3E64Cd889482443324F91bFA9c84fE72A511f48A' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [EVM.Transactions] ForwardersEnabled = false @@ -384,6 +387,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [EVM.OCR] ContractConfirmations = 4 diff --git a/testdata/scripts/node/validate/disk-based-logging.txtar b/testdata/scripts/node/validate/disk-based-logging.txtar index bcf054cbca3..e0eefcba85b 100644 --- a/testdata/scripts/node/validate/disk-based-logging.txtar +++ b/testdata/scripts/node/validate/disk-based-logging.txtar @@ -278,6 +278,8 @@ Mode = 'tls' TLSCertPath = '' [Mercury] +VerboseLogging = false + [Mercury.Cache] LatestReportTTL = '1s' MaxStaleAge = '1h0m0s' @@ -330,6 +332,7 @@ NoNewHeadsThreshold = '3m0s' OperatorFactoryAddress = '0x3E64Cd889482443324F91bFA9c84fE72A511f48A' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [EVM.Transactions] ForwardersEnabled = false @@ -384,6 +387,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [EVM.OCR] ContractConfirmations = 4 diff --git a/testdata/scripts/node/validate/invalid-ocr-p2p.txtar b/testdata/scripts/node/validate/invalid-ocr-p2p.txtar index 3c6e24a897b..6a09dd06c47 100644 --- a/testdata/scripts/node/validate/invalid-ocr-p2p.txtar +++ b/testdata/scripts/node/validate/invalid-ocr-p2p.txtar @@ -263,6 +263,8 @@ Mode = 'tls' TLSCertPath = '' [Mercury] +VerboseLogging = false + [Mercury.Cache] LatestReportTTL = '1s' MaxStaleAge = '1h0m0s' diff --git a/testdata/scripts/node/validate/invalid.txtar b/testdata/scripts/node/validate/invalid.txtar index 6b5932cfefd..1955e919da3 100644 --- a/testdata/scripts/node/validate/invalid.txtar +++ b/testdata/scripts/node/validate/invalid.txtar @@ -268,6 +268,8 @@ Mode = 'tls' TLSCertPath = '' [Mercury] +VerboseLogging = false + [Mercury.Cache] LatestReportTTL = '1s' MaxStaleAge = '1h0m0s' @@ -320,6 +322,7 @@ NoNewHeadsThreshold = '3m0s' OperatorFactoryAddress = '0x3E64Cd889482443324F91bFA9c84fE72A511f48A' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [EVM.Transactions] ForwardersEnabled = false @@ -374,6 +377,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [EVM.OCR] ContractConfirmations = 4 diff --git a/testdata/scripts/node/validate/valid.txtar b/testdata/scripts/node/validate/valid.txtar index 688829513e9..3ba20f6f9d6 100644 --- a/testdata/scripts/node/validate/valid.txtar +++ b/testdata/scripts/node/validate/valid.txtar @@ -275,6 +275,8 @@ Mode = 'tls' TLSCertPath = '' [Mercury] +VerboseLogging = false + [Mercury.Cache] LatestReportTTL = '1s' MaxStaleAge = '1h0m0s' @@ -327,6 +329,7 @@ NoNewHeadsThreshold = '3m0s' OperatorFactoryAddress = '0x3E64Cd889482443324F91bFA9c84fE72A511f48A' RPCDefaultBatchSize = 250 RPCBlockQueryDelay = 1 +FinalizedBlockOffset = 0 [EVM.Transactions] ForwardersEnabled = false @@ -381,6 +384,8 @@ SyncThreshold = 5 LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +EnforceRepeatableRead = false +DeathDeclarationDelay = '10s' [EVM.OCR] ContractConfirmations = 4 diff --git a/testdata/scripts/node/validate/warnings.txtar b/testdata/scripts/node/validate/warnings.txtar index d8d0de337aa..a652943e26b 100644 --- a/testdata/scripts/node/validate/warnings.txtar +++ b/testdata/scripts/node/validate/warnings.txtar @@ -257,6 +257,8 @@ Mode = 'unencrypted' TLSCertPath = 'something' [Mercury] +VerboseLogging = false + [Mercury.Cache] LatestReportTTL = '1s' MaxStaleAge = '1h0m0s' diff --git a/tools/bin/go_core_fuzz b/tools/bin/go_core_fuzz index c3119f4beb4..d81e6909300 100755 --- a/tools/bin/go_core_fuzz +++ b/tools/bin/go_core_fuzz @@ -6,6 +6,11 @@ SCRIPT_PATH=`dirname "$0"`; SCRIPT_PATH=`eval "cd \"$SCRIPT_PATH\" && pwd"` OUTPUT_FILE=${OUTPUT_FILE:-"./output.txt"} USE_TEE="${USE_TEE:-true}" +# To allow reuse in CI from other repositories +FUZZ_TOOL_PATH=${FUZZ_TOOL_PATH:-"./fuzz"} +GO_MODULE_ROOT_PATH=${GO_MODULE_ROOT_PATH:-"./"} +FUZZ_TIMEOUT=${FUZZ_TIMEOUT:-10m} + echo "Failed fuzz tests and panics: ---------------------" echo "" use_tee() { @@ -19,7 +24,7 @@ use_tee() { # the amount of --seconds here is subject to change based on how long the CI job takes in the future # as we add more fuzz tests, we should take into consideration increasing this timelapse, so we can have enough coverage. # We are timing out after ~10mins in case the tests hang. (Current CI duration is ~8m, modify if needed) -cd ./fuzz && timeout 10m ./fuzz_all_native.py --ci --seconds 420 | use_tee $OUTPUT_FILE +timeout "${FUZZ_TIMEOUT}" "${FUZZ_TOOL_PATH}"/fuzz_all_native.py --ci --seconds 420 --go_module_root "${GO_MODULE_ROOT_PATH}" | use_tee $OUTPUT_FILE EXITCODE=${PIPESTATUS[0]} # Assert no known sensitive strings present in test logger output diff --git a/tools/bin/go_core_race_tests b/tools/bin/go_core_race_tests index aa6510c1127..d0fcb6cae41 100755 --- a/tools/bin/go_core_race_tests +++ b/tools/bin/go_core_race_tests @@ -4,7 +4,11 @@ OUTPUT_FILE=${OUTPUT_FILE:-"./output.txt"} USE_TEE="${USE_TEE:-true}" TIMEOUT="${TIMEOUT:-30s}" COUNT="${COUNT:-10}" -GO_LDFLAGS=$(bash tools/bin/ldflags) + +# To allow reuse in CI from other repositories +TOOLS_PATH=${TOOLS_PATH:-"./tools"} + +GO_LDFLAGS=$(bash ${TOOLS_PATH}/bin/ldflags) use_tee() { if [ "$USE_TEE" = "true" ]; then tee "$@" diff --git a/tools/bin/go_core_tests b/tools/bin/go_core_tests index 074527698b3..f7c1dfaf231 100755 --- a/tools/bin/go_core_tests +++ b/tools/bin/go_core_tests @@ -6,9 +6,12 @@ SCRIPT_PATH=`dirname "$0"`; SCRIPT_PATH=`eval "cd \"$SCRIPT_PATH\" && pwd"` OUTPUT_FILE=${OUTPUT_FILE:-"./output.txt"} USE_TEE="${USE_TEE:-true}" +# To allow reuse in CI from other repositories +TOOLS_PATH=${TOOLS_PATH:-"./tools"} + echo "Failed tests and panics: ---------------------" echo "" -GO_LDFLAGS=$(bash tools/bin/ldflags) +GO_LDFLAGS=$(bash ${TOOLS_PATH}/bin/ldflags) use_tee() { if [ "$USE_TEE" = "true" ]; then tee "$@" diff --git a/tools/docker/.env b/tools/docker/.env index 05f4314ff22..35583b43636 100644 --- a/tools/docker/.env +++ b/tools/docker/.env @@ -1,40 +1,4 @@ -# All of these variables can be overridden by -# setting the same variable within your shell - -# Chainlink env vars +# Postgres env vars +CHAINLINK_PGUSER=chainlink-dev CHAINLINK_DB_NAME=node_dev -CL_DEV=true CHAINLINK_PGPASSWORD=thispasswordislongenough - -# Explorer env vars -EXPLORER_DB_NAME=explorer_dev -EXPLORER_DB_PORT=5432 -EXPLORER_PGPASSWORD=explorer -EXPLORER_SERVER_PORT=3001 -EXPLORER_COOKIE_SECRET=testingtestingtestingtestingtesting - -# Ingester -INGESTER_DB_HOST=chainlink-explorer-db -INGESTER_DB_USERNAME=postgres - -# Integration test env vars -SRCROOT=/chainlink - -ECHO_SERVER_PORT=6690 -ECHO_SERVER_URL=http://echo-server:6690/count - -CHAINLINK_PORT=6688 -CHAINLINK_URL=http://node:6688 -CLIENT_NODE_URL=http://node:6688 - -CYPRESS_EXPLORER_URL=http://explorer:3001 -CYPRESS_JOB_SERVER_HOST=cypress-job-server -CYPRESS_JOB_SERVER_PORT=6692 - -EXTERNAL_ADAPTER_PORT=6644 -EXTERNAL_ADAPTER_URL=http://external-adapter:6644 - -NODE_1_CONTAINER=chainlink-node -NODE_2_CONTAINER=chainlink-node-2 -CLIENT_NODE_2_URL=http://node-2:6688 -EXTERNAL_ADAPTER_2_URL=http://external-adapter-2:6644 diff --git a/tools/docker/README.md b/tools/docker/README.md index 58c1e196699..e0ccadd68c3 100644 --- a/tools/docker/README.md +++ b/tools/docker/README.md @@ -1,6 +1,6 @@ # Using docker-compose for local development -The docker-compose configuration present in this directory allows for a user to quickly setup all of chainlink's services to perform actions like integration tests, acceptance tests, and development across multiple services. +The docker-compose configuration present in this directory allows to quickly run a local development environment. # Requirements @@ -8,152 +8,78 @@ The docker-compose configuration present in this directory allows for a user to # Using the compose script -Inside the `chainlink/tools/docker` directory, there is a helper script that is included which should cover all cases of integration / acceptance / development needs acroos multiple services. To see a list of available commands, perform the following: +You should use the script `compose` located in the `chainlink/tools/docker` directory. +To see a list of available commands, perform the following: ```sh cd tools/docker ./compose help ``` -## Examples +## Env vars -### Acceptance testing +### .env file +.env file is used to set the environment variables for the docker-compose commands -Acceptance can be accomplished by using the `acceptance` command. +### Compose script env vars +The following env vars are used for the compose script : +- `GETH_MODE=true` to use geth instead of parity +- `CHAIN_ID=` to specify the chainID (default is 34055 for parity and 1337 for geth) +- `HTTPURL=` to specify the RPC node HTTP url (default is set if you use geth or parity) +- `WSURL=` to specify the RPC node WS url (default is set if you use geth or parity) -```sh -./compose acceptance -``` - -- The chainlink node can be reached at `http://localhost:6688` - -Credentials for logging into the operator-ui can be found [here](../../tools/secrets/apicredentials) - -### - -### Doing local development on the core node - -Doing quick, iterative changes on the core codebase can still be achieved within the compose setup with the `cld` or `cldo` commands. -The `cld` command will bring up the services that a chainlink node needs to connect to (parity/geth, postgres), and then attach the users terminal to a docker container containing the host's chainlink repository bind-mounted inside the container at `/usr/local/src/chainlink`. What this means is that any changes made within the host's repository will be synchronized to the container, and vice versa for changes made within the container at `/usr/local/src/chainlink`. - -This enables a user to make quick changes on either the container or the host, run `cldev` within the attached container, check the new behaviour of the re-built node, and repeat this process until the desired results are achieved. +If you specify both `HTTPURL` and `WSURL`, it won't run the devnet RPC node. +for example : ```sh -./compose cld -# -# Now you are inside the container -cldev # cldev without the "core" postfix simply calls the core node cli -# -# NAME: -# main - CLI for Chainlink -# -# USAGE: -# main [global options] command [command options] [arguments...] -# -# VERSION: -# unset@unset -# -# COMMANDS: -# admin Commands for remotely taking admin related actions -# bridges Commands for Bridges communicating with External Adapters -# config Commands for the node's configuration -# jobs Commands for managing Jobs -# node, local Commands for admin actions that must be run locally -# runs Commands for managing Runs -# txs Commands for handling Ethereum transactions -# agreements, agree Commands for handling service agreements -# attempts, txas Commands for managing Ethereum Transaction Attempts -# createextrakey Create a key in the node's keystore alongside the existing key; to create an original key, just run the node -# initiators Commands for managing External Initiators -# help, h Shows a list of commands or help for one command -# -# GLOBAL OPTIONS: -# --json, -j json output as opposed to table -# --help, -h show help -# --version, -v print the version -cldev core # import our testing key and api credentials, then start the node -# -# ** Importing default key 0x9ca9d2d5e04012c9ed24c0e513c9bfaa4a2dd77f -# 2019-12-11T20:31:18Z [INFO] Locking postgres for exclusive access with 500ms timeout orm/orm.go:74 # -# 2019-12-11T20:31:18Z [WARN] pq: relation "migrations" does not exist migrations/migrate.go:149 -# ** Running node -# 2019-12-11T20:31:20Z [INFO] Starting Chainlink Node 0.7.0 at commit 7324e9c476ed6b5c0a08d5a38779d4a6bfbb3880 cmd/local_client.go:27 -# ... -# ... +CHAIN_ID=11155111 WSURL=wss://eth.sepolia HTTPURL=https://eth.sepolia ./compose dev ``` -### Cleaning up +## Dev -To remove any containers, volumes, and networks related to our docker-compose setup, we can run the `clean` command: +Will run one node with a postgres database and by default a devnet RPC node that can be either geth or parity. ```sh -./compose clean +./compose dev ``` -### Running your own commands based off of docker-compose +The chainlink node can be reached at `http://localhost:6688` -The following commands allow you do just about anything: +Credentials for logging into the operator-ui can be found [here](../../tools/secrets/apicredentials) -```sh -./compose -./compose dev -``` +## Up -For example, to see what our compose configuration looks like: +Runs all services including two nodes with two postgres databases and by default a devnet RPC node that can be either geth or parity. ```sh -./compose config # base config +./compose up ``` -Or, to run just an ethereum node: +## Cleaning up -```sh -./compose up devnet # start a parity devnet node -``` +To remove any containers, volumes, and networks related to our docker-compose setup, we can run the `clean` command: ```sh -GETH_MODE=true ./compose up devnet # start a geth devnet node +./compose clean ``` -# Environment Variables - -For more information regarding environment variables, the docker [documentation](https://docs.docker.com/compose/environment-variables/) explains it in great detail. -All of the environment variables listed under the `environment` key in each service contains a default entry under the `.env` file of this directory. Additional environment variables can be added by using the `chainlink-variables.env` file. Both files are further expanded upon below. +## Logs -## Overriding existing variables - -The existing variables listed under the `environment` key in each service can be overridden by setting a shell environment variable of the same key. For example, referring to `ETH_CHAIN_ID` variable under the `node` service, the default value of `ETH_CHAIN_ID` in `.env` is `34055`. If we wanted to change this to `1337`, we could set a shell variable to override this value. +You can use logs command to see the logs of a specific service or all services. ```sh -export ETH_CHAIN_ID=1337 -./compose acceptance # ETH_CHAIN_ID now has the value of 1337, instead of the default value of 34055 +./compose logs node # shows the logs of the node service ``` -## Adding new environment variables - -What if we want to add new environment variables that are not listed under the `environment` key of a service? `docker-compose` provides us with a way to pass our own variables that are not defined under the `environment` key by using an [env_file](https://docs.docker.com/compose/compose-file/#env_file). We can see from our `docker-compose.yaml` file that there is an env file under the name of `chainlink-variables.env`. In this file, you can specify any extra environment variables that you'd like to pass to the associated container. - -For example, lets say we want to pass the variable `ALLOW_ORIGINS` defined in `store/orm/schema.go`, so that we can serve our api from a different port without getting CORS errors. We can't pass this in as a shell variable, as the variable is not defined under the `environment` key under the `node` service. What we can do though, is specify `ALLOW_ORIGINS` in `chainlink-variables.env`, which will get passed to the container. - ```sh -# assuming that we're in the tools/docker directory - -# Add our custom environment variable -echo "ALLOW_ORIGINS=http://localhost:1337" > chainlink-variables.env - -# now the node will allow requests from the origin of http://localhost:1337 rather than the default value of http://localhost:3000,http://localhost:6688 -./compose acceptance +./compose logs # shows the combined logs of all running services ``` -# Following logs +## Connecting to the dev environment -The `logs` command will allow you to follow the logs of any running service. For example: - -```bash -./compose up node # starts the node service and all it's dependencies, including devnet, the DB... -./compose logs devnet # shows the blockchain logs -# ^C to exit -./compose logs # shows the combined logs of all running services +```sh +# connect to the container by opening bash prompts +./compose connect ``` # Troubleshooting @@ -187,80 +113,3 @@ docker ps # Follow logs using name of container docker logs -f chainlink-node ``` - -## Logging into via the frontend results in HTTP Status Forbidden (403) - -This is most likely due to the (Allow Origins access policy](https://docs.chain.link/docs/configuration-variables#section-allow-origins). Make sure you are using 'http://localhost' (not 127.0.0.1), or try disabling ALLOW_ORIGINS. - -``` -# Disable ALLOW_ORIGINS for testing -echo "ALLOW_ORIGINS=*" >> chainlink-variables.env -``` - -# Using the dockerized development environment - -The dockerized development environment provides an alternative development and testing environment to the docker-compose setup as described above. The goals for this environment are to: - -- create a development environment that is easily configured by interview candidates, potential contributors, etc. -- contain all dependencies in a single docker image -- contain sensible, pre-configured defaults - -The entire chainlink repo is bind-mounted so any changes will take effect immediately - this makes the env good for TDD. Node modules are also bind-mounted, so you shouldn't have to install many deps after launching the container. Go deps are not bind-mounted, so you will have to install those after starting the container. You should only need to do this once, as long as you re-use the container. - -The docker env contains direnv, so whatever changes you make locally to your (bind-mounted) `.envrc` will be reflected in the docker container. The container is built with a default ENV that should require minimal changes for basic testing and development. - -### Building the dev environment - -```bash -# build the image and tag it as chainlink-develop -docker build ./tools/docker/ -t chainlink-develop:latest -f ./tools/docker/develop.Dockerfile -# create the image -docker container create -v /home/ryan/chainlink/chainlink:/root/chainlink --name chainlink-dev chainlink-develop:latest -# if you want to access the db, chain, node, or from the host... expose the relevant ports -# This could also be used in case you want to run some services in the container, and others directly -# on the host -docker container create -v /home/ryan/chainlink/chainlink:/root/chainlink --name chainlink-dev -p 5432:5432 -p 6688:6688 -p 6689:6689 -p 3000:3000 -p 3001:3001 -p 8545:8545 -p 8546:8546 chainlink-develop:latest -# start the container (this will run in the background until you stop it) -docker start chainlink-dev -``` - -### Connecting to the dev environment - -```bash -# connect to the container by opening bash prompts - you can open as many as you'd like -docker exec -ti chainlink-dev bash -``` - -### Run services / tests inside container - -\$ --> inside container bash prompt - -This is nothing new, just a demonstration that you should be able to run all the commands/tests/services you normally do for development/testing, but now inside of the docker container. As mentioned above, if you want access to these services on the host machine, you will have to expose their ports. - -```bash -# install deps and chainlink -$ make install - -# run go tests -$ make testdb -$ go test ./... - -# run evm tests -$ cd contracts -$ pnpm test - -# start geth -$ geth --dev --datadir ./tools/gethnet/datadir --mine --ipcdisable --dev.period 2 --unlock 0x9ca9d2d5e04012c9ed24c0e513c9bfaa4a2dd77f --password ./tools/clroot/password.txt --config ./tools/gethnet/config.toml - -# run chainlink node (will require changing env vars from defaults) -$ chainlink local node -a ./tools/secrets/apicredentials -p ./tools/secrets/password.txt -``` - -### Included Tooling: - -This image contains the following additional tools: - -- geth, openethereum, ganache -- delve, gofuzz -- slither, echidna -- web3.py diff --git a/tools/docker/chainlink-variables.env b/tools/docker/chainlink-variables.env deleted file mode 100644 index c9495248925..00000000000 --- a/tools/docker/chainlink-variables.env +++ /dev/null @@ -1,3 +0,0 @@ -# Add in your environment variables here -# if you want to add more environment variables not listed -# in .env diff --git a/tools/docker/cldev.Dockerfile b/tools/docker/cldev.Dockerfile deleted file mode 100644 index 72f2f06d7ce..00000000000 --- a/tools/docker/cldev.Dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -FROM golang:1.21-bullseye - -ARG SRCROOT=/usr/local/src/chainlink -WORKDIR ${SRCROOT} - -ADD go.* ./ -RUN go mod download -RUN mkdir -p tools/bin diff --git a/tools/docker/compose b/tools/docker/compose index b16c1e19332..0e754a5ffcb 100755 --- a/tools/docker/compose +++ b/tools/docker/compose @@ -1,43 +1,61 @@ -#!/usr/bin/env bash -set -ex +#!/bin/sh export DOCKER_BUILDKIT=1 export COMPOSE_DOCKER_CLI_BUILD=1 base_files="-f docker-compose.yaml -f docker-compose.postgres.yaml" -# Allow for choosing between geth or parity -if [ $GETH_MODE ]; then - base_files="$base_files -f docker-compose.gethnet.yaml" -else - base_files="$base_files -f docker-compose.paritynet.yaml" + +# No RPC URL provided, default to Devnet +if [ -z "$WSURL" ] && [ -z "$HTTPURL" ]; then + # Allow for choosing between geth or parity + if [ "$GETH_MODE" ]; then + export CHAIN_ID=1337 + base_files="$base_files -f docker-compose.gethnet.yaml" + else + base_files="$base_files -f docker-compose.paritynet.yaml" + fi fi -base="docker-compose $base_files" # base config, used standalone for acceptance -dev="$base -f docker-compose.dev.yaml" # config for cldev +base="docker-compose $base_files" +dev="$base -f docker-compose.dev.yaml" + +configure() { + if [ -z "$CHAIN_ID" ]; then + export CHAIN_ID=34055 + fi + + if [ -z "$WSURL" ]; then + export WSURL="ws://devnet:8546" + fi + + if [ -z "$HTTPURL" ]; then + export HTTPURL="http://devnet:8545" + fi + + sed -e "s/SET_CHAIN_ID/$CHAIN_ID/" \ + -e "s,SET_WSURL,$WSURL," \ + -e "s,SET_HTTPURL,$HTTPURL," \ + config.toml.tmpl > config.toml +} clean_docker() { $base down -v --remove-orphans $dev down -v --remove-orphans + rm -f config.toml } -function usage() { +usage() { echo "compose -- A helper script for running common docker-compose commands\ Commands: help Displays this help menu clean Remove any containers and volumes related to compose files logs Display the logs of any service(s) by name - - cld Runs the chainlink node container in dev mode - - acceptance Run the services required to perform an acceptance test - - dev Run docker-compose with dev config for the core node - - eth:restart Reset blockchain data to genesis state - cl:restart Reset chainlink database - - * Run docker-compose with base config" + dev Runs the chainlink node container in dev mode + connect Connect to chainlink node container + up Run the chainlink cluster with base config + eth:restart Reset blockchain data to genesis state + db:restart Reset chainlink database" } case "$1" in @@ -48,40 +66,35 @@ clean) clean_docker ;; logs) - $base logs -f ${@:2} + $base logs -f "${@:2}" ;; -cld) +dev) + configure $dev build $dev up -d node + $dev watch --no-up node + ;; +connect) docker exec -it chainlink-node bash - $dev down -v --remove-orphans ;; - -acceptance) +up) + configure $base up ;; - -dev) - $dev ${@:2} - ;; - eth:restart) $base rm --force --stop devnet - if [ $GETH_MODE ]; then + if [ "$GETH_MODE" ]; then docker volume rm --force docker_geth-db-data else docker volume rm --force docker_parity-db-data fi $base up -d devnet ;; -cl:restart) +db:restart) $base stop node $base rm --force --stop node-db docker volume rm --force docker_node-db-data ./compose eth:restart $base start node ;; -*) - $base $@ - ;; esac diff --git a/tools/docker/config.toml b/tools/docker/config.toml.tmpl similarity index 70% rename from tools/docker/config.toml rename to tools/docker/config.toml.tmpl index 23108ae295c..abd38981adb 100644 --- a/tools/docker/config.toml +++ b/tools/docker/config.toml.tmpl @@ -12,11 +12,11 @@ HTTPSPort = 0 DefaultTimeout = '5s' [[EVM]] -ChainID = '34055' +ChainID = 'SET_CHAIN_ID' MinIncomingConfirmations = 1 MinContractPayment = '0.000001 link' [[EVM.Nodes]] -Name = 'primary-0-34055' -WSURL = 'ws://devnet:8546' -HTTPURL = 'http://devnet:8545' +Name = 'primary-0-SET_CHAIN_ID' +WSURL = 'SET_WSURL' +HTTPURL = 'SET_HTTPURL' diff --git a/tools/docker/develop.Dockerfile b/tools/docker/develop.Dockerfile deleted file mode 100644 index f663eaf1cf2..00000000000 --- a/tools/docker/develop.Dockerfile +++ /dev/null @@ -1,66 +0,0 @@ -FROM ubuntu:20.04 - -# Add the PostgreSQL PGP key & repository -RUN apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8 -RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" > /etc/apt/sources.list.d/pgdg.list - -# Install deps -RUN apt-get update && apt-get install -y postgresql postgresql-contrib direnv build-essential cmake libudev-dev unzip - -# Install additional tooling -RUN mkdir -p ~/.local/bin/ -ENV PATH="/root/.local/bin:${PATH}" -RUN go get github.com/go-delve/delve/cmd/dlv -RUN go get github.com/google/gofuzz -RUN pnpm install -g ganache-cli -RUN pip3 install web3 slither-analyzer crytic-compile -RUN curl -L https://github.com/crytic/echidna/releases/download/v1.5.1/echidna-test-v1.5.1-Ubuntu-18.04.tar.gz | tar -xz -C ~/.local/bin -RUN curl -L https://github.com/openethereum/openethereum/releases/download/v3.2.4/openethereum-linux-v3.2.4.zip --output openethereum.zip -RUN unzip openethereum.zip -d ~/.local/bin/ && rm openethereum.zip -RUN chmod +x ~/.local/bin/* - -# Setup direnv -RUN echo 'eval "$(direnv hook bash)"' > /root/.bashrc - -# Setup postgres -USER postgres -RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/10/main/pg_hba.conf -RUN echo "listen_addresses='*'" >> /etc/postgresql/10/main/postgresql.conf -RUN /etc/init.d/postgresql start &&\ - createdb chainlink_test &&\ - createdb node_dev &&\ - createuser --superuser --no-password root &&\ - psql -c "ALTER USER postgres PASSWORD 'node';" - -USER root - -# add init file - this file starts postgres and keeps container alive after started -RUN touch ~/init -RUN chmod +x ~/init -RUN echo "#!/usr/local/bin/dumb-init /bin/sh" >> ~/init -RUN echo "/etc/init.d/postgresql start" >> ~/init -RUN echo "while true; do sleep 1; done" >> ~/init - -ARG SRCROOT=/root/chainlink -WORKDIR ${SRCROOT} - -EXPOSE 5432 -EXPOSE 6688 -EXPOSE 6689 -EXPOSE 3000 -EXPOSE 3001 -EXPOSE 8545 -EXPOSE 8546 - -# Default env setup for testing -ENV CHAINLINK_DB_NAME chainlink_test -ENV CHAINLINK_PGPASSWORD=thispasswordislongenough -ENV CL_DATABASE_URL=postgresql://postgres:$CHAINLINK_PGPASSWORD@localhost:5432/$CHAINLINK_DB_NAME?sslmode=disable -ENV TYPEORM_USERNAME=postgres -ENV TYPEORM_PASSWORD=node -ENV ETH_CHAIN_ID=1337 -ENV CHAINLINK_DEV=true -ENV CHAINLINK_TLS_PORT=0 -ENV SECURE_COOKIES=false - -ENTRYPOINT [ "/root/init" ] diff --git a/tools/docker/docker-compose.deps.yaml b/tools/docker/docker-compose.deps.yaml deleted file mode 100644 index 43071e152ac..00000000000 --- a/tools/docker/docker-compose.deps.yaml +++ /dev/null @@ -1,21 +0,0 @@ -version: '3.5' - -services: - wait-db: - container_name: wait-for-db - build: - context: . - dockerfile: wait-postgres.Dockerfile - command: '-h node-db -p 5432 -U postgres -d $CHAINLINK_DB_NAME --timeout=600' - depends_on: - - node-db - wait-db-2: - container_name: wait-for-db-2 - build: - context: . - dockerfile: wait-postgres.Dockerfile - command: '-h node-db-2 -p 5432 -U postgres -d $CHAINLINK_DB_NAME --timeout=600' - depends_on: - - node-db-2 -volumes: - node-db-data: diff --git a/tools/docker/docker-compose.dev.yaml b/tools/docker/docker-compose.dev.yaml index 2138d1c2af9..5388f32114f 100644 --- a/tools/docker/docker-compose.dev.yaml +++ b/tools/docker/docker-compose.dev.yaml @@ -1,13 +1,15 @@ -version: '3.5' services: node: - entrypoint: '/bin/sh -c "while sleep 1000; do :; done"' - build: - context: ../../ - dockerfile: tools/docker/cldev.Dockerfile - args: - - SRCROOT - command: '' - image: smartcontract/chainlink-dev - volumes: - - ../..:$SRCROOT + develop: + watch: + - action: rebuild + path: ../../ + ignore: + - '.changeset/' + - '.github/' + - 'charts/' + - 'core/sgx/target/' + - 'docs/' + - 'fuzz/' + - 'integration-tests/' + - 'tools/' \ No newline at end of file diff --git a/tools/docker/docker-compose.gethnet.local.yaml b/tools/docker/docker-compose.gethnet.local.yaml index ae2a1e17007..6d7793d5e85 100644 --- a/tools/docker/docker-compose.gethnet.local.yaml +++ b/tools/docker/docker-compose.gethnet.local.yaml @@ -1,14 +1,8 @@ -version: '3.5' - services: node: - environment: - - ETH_CHAIN_ID=1337 depends_on: - devnet node-2: - environment: - - ETH_CHAIN_ID=1337 depends_on: - devnet devnet: diff --git a/tools/docker/docker-compose.gethnet.yaml b/tools/docker/docker-compose.gethnet.yaml index 6ab388dc8f9..dbc5ac276b7 100644 --- a/tools/docker/docker-compose.gethnet.yaml +++ b/tools/docker/docker-compose.gethnet.yaml @@ -1,14 +1,8 @@ -version: '3.5' - services: node: - environment: - - ETH_CHAIN_ID=1337 depends_on: - devnet node-2: - environment: - - ETH_CHAIN_ID=1337 depends_on: - devnet devnet: diff --git a/tools/docker/docker-compose.paritynet.local.yaml b/tools/docker/docker-compose.paritynet.local.yaml index 518e2cce4f2..36123cc7de1 100644 --- a/tools/docker/docker-compose.paritynet.local.yaml +++ b/tools/docker/docker-compose.paritynet.local.yaml @@ -1,5 +1,3 @@ -version: '3.5' - services: node: depends_on: diff --git a/tools/docker/docker-compose.paritynet.yaml b/tools/docker/docker-compose.paritynet.yaml index b5e6a6311ed..680c203bff3 100644 --- a/tools/docker/docker-compose.paritynet.yaml +++ b/tools/docker/docker-compose.paritynet.yaml @@ -1,5 +1,3 @@ -version: '3.5' - services: node: depends_on: diff --git a/tools/docker/docker-compose.postgres.yaml b/tools/docker/docker-compose.postgres.yaml index d7356897b96..486bc9e4f50 100644 --- a/tools/docker/docker-compose.postgres.yaml +++ b/tools/docker/docker-compose.postgres.yaml @@ -1,33 +1,33 @@ -version: '3.5' - services: node: depends_on: - node-db environment: - - CL_DATABASE_URL=postgresql://postgres:$CHAINLINK_PGPASSWORD@node-db:5432/$CHAINLINK_DB_NAME?sslmode=disable + - CL_DATABASE_URL=postgresql://$CHAINLINK_PGUSER:$CHAINLINK_PGPASSWORD@node-db:5432/$CHAINLINK_DB_NAME?sslmode=disable node-2: depends_on: - node-db-2 environment: - - CL_DATABASE_URL=postgresql://postgres:$CHAINLINK_PGPASSWORD@node-db-2:5432/$CHAINLINK_DB_NAME?sslmode=disable + - CL_DATABASE_URL=postgresql://$CHAINLINK_PGUSER:$CHAINLINK_PGPASSWORD@node-db-2:5432/$CHAINLINK_DB_NAME?sslmode=disable node-db: container_name: chainlink-db - image: postgres:14 + image: postgres:16 volumes: - node-db-data:/var/lib/postgresql/data environment: + POSTGRES_USER: $CHAINLINK_PGUSER POSTGRES_DB: $CHAINLINK_DB_NAME POSTGRES_PASSWORD: $CHAINLINK_PGPASSWORD node-db-2: container_name: chainlink-db-2 - image: postgres:14 + image: postgres:16 volumes: - node-db-2-data:/var/lib/postgresql/data environment: + POSTGRES_USER: $CHAINLINK_PGUSER POSTGRES_DB: $CHAINLINK_DB_NAME POSTGRES_PASSWORD: $CHAINLINK_PGPASSWORD diff --git a/tools/docker/docker-compose.yaml b/tools/docker/docker-compose.yaml index c01d3579356..1178196256c 100644 --- a/tools/docker/docker-compose.yaml +++ b/tools/docker/docker-compose.yaml @@ -1,5 +1,3 @@ -version: '3.5' - services: node: container_name: chainlink-node @@ -12,10 +10,8 @@ services: # parity/geth node to be prefunded with eth. entrypoint: /bin/sh -c "chainlink -c /run/secrets/config node start -d -p /run/secrets/node_password -a /run/secrets/apicredentials" restart: always - environment: - - CL_DATABASE_URL env_file: - - chainlink-variables.env + - .env ports: - 6688:6688 secrets: @@ -32,10 +28,8 @@ services: dockerfile: core/chainlink.Dockerfile entrypoint: /bin/sh -c "chainlink -c /run/secrets/config node start -d -p /run/secrets/node_password -a /run/secrets/apicredentials" restart: always - environment: - - CL_DATABASE_URL env_file: - - chainlink-variables.env + - .env ports: - 6699:6688 secrets: @@ -44,10 +38,6 @@ services: - keystore - config -# TODO -# - replace clroot with secrets -# - extract tools into separate docker-compose files - secrets: node_password: file: ../clroot/password.txt diff --git a/tools/docker/wait-for-postgres.sh b/tools/docker/wait-for-postgres.sh deleted file mode 100755 index b7548085d00..00000000000 --- a/tools/docker/wait-for-postgres.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -RETRIES=5 -THRESHOLD=2 - -until [ $THRESHOLD -eq 0 ] || [ $RETRIES -eq 0 ]; do - if pg_isready $@; then - ((THRESHOLD--)) - fi - echo "Waiting for postgres server, $((RETRIES--)) remaining attempts..." - sleep 2 -done - -if [ $THRESHOLD -eq 0 ]; then exit 0; fi -exit 1 diff --git a/tools/docker/wait-postgres.Dockerfile b/tools/docker/wait-postgres.Dockerfile deleted file mode 100644 index b663d131beb..00000000000 --- a/tools/docker/wait-postgres.Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM ubuntu:18.04 - -RUN apt-get update -RUN apt-get install -y postgresql-client -COPY wait-for-postgres.sh /bin/wait-for-postgres - -ENTRYPOINT ["wait-for-postgres"] \ No newline at end of file